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
TODO Autogenerated method stub
@Override protected void onDestroy() { super.onDestroy(); Cleanup(); }
{ "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
3letter ISO 4217 currency code.
public String getCurrency() { return this.currency; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "com.google.protobuf.StringValue getCurrencyCode();", "String toAlpha3(final String iso3166Alpha2);", "public static String getISO3Country(String localeID) {\n/* 477 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public Currency(String code) {\n _code = code;\n UnitFormatImpl.getInstance().getSymbolMap().label(this, code);\n }", "public String getCurrencyISO() {\n return MCurrency.getISO_Code(getCtx(), getC_Currency_ID());\n }", "String toAlpha2(final String iso3166Alpha3);", "java.lang.String getC3();", "public String getCurrencyCode()\r\n {\r\n return (m_currencyCode);\r\n }", "public String getCurrencyCode() {\n return currencyCode;\n }", "private String signalThreeLetters(){\r\n\t\tSystem.out.print(\"Enter a three letter currency code (e.g., AUD, JPY, USD, EUR): \");\r\n\t\tString userInputCode = keyboardInput.getLine();\r\n\t\tif (userInputCode.length() != 3) {\r\n\t\t\tSystem.out.println(\"\\\"\" + userInputCode + \"\\\" is not a THREE letter code. Returning to menu.\");\t\t\t\t\r\n\t\t\tSystem.out.println();\r\n\t\t return null;}\r\n\t\tSystem.out.println();\r\n\t\treturn userInputCode;\r\n\t\t}", "public String getCurrencyCode() {\n\t\treturn currencyCode;\n\t}", "public String getCurrencyCode() {\n return mCurrencyCode;\n }", "com.google.protobuf.StringValueOrBuilder getCurrencyCodeOrBuilder();", "@Override\n\tpublic String getCurrencyCode() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getCurrency(){\n\t\treturn MARLAY_CURR;\n\t}", "protected static String getLanguageIso3() {\n try {\n return Locale.getDefault().getISO3Language().toLowerCase(Locale.US);\n }\n catch (MissingResourceException e) {\n return LANGUAGE_DEFAULT_ISO3;\n }\n }", "public static Symbol currency(String text)\r\n\t{\r\n\t\tint linepos = line_;\r\n\t\tint charpos = char_;\r\n\t\tint colpos = col_;\r\n\t\tscan(text);\r\n\t\tint idx = text.indexOf('.');\r\n\t\ttext = text.substring(1);\r\n\t\ttext = (idx == -1) ? text + \".00\" : text;\r\n\t\tToken token = new Token(fname, text, linepos, charpos, colpos);\r\n\t\treturn new Symbol(sym.CURRENCY, linepos, colpos, token);\r\n\t}", "public static String formatCurrency( double amt ) {\n return formatCurrency( amt, 2 );\n }", "public Currency(String code) {\n _toBaseUnit = new Converter(code, false);\n UnitFormat.getInstance().label(this, code);\n }", "public String parseCurrency(NumberFormatTestData tuple) {\n return null;\n }", "String getTradeCurrency();", "public static String getISO3Language(String localeID) {\n/* 457 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public String getISO3Country() {\n/* 467 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public String get_currency_name() {\n\t\treturn name;\r\n\t}", "String getSettlementCurrency();", "public String getDefaultDisplayCurrencyCode() {\n return (String) get(\"default_display_currency_code\");\n }", "@Override\n\tpublic String str(int number) {\n\t\treturn \"C3(\"+number+\")\";\n\t}", "@Override\n\tpublic int getC_Currency_ID() {\n\t\treturn 0;\n\t}", "public String getCoutryName(String code) {\n\t\tString countryName = code;\n\t\tif (code.length() == 3) {\n\t\t\tcountryName = jsonCountryAlpha3.getString(code);\n\t\t} else if (code.length() == 2) {\n\t\t\tcountryName = jsonCountryAlpha2.getString(code);\n\t\t}\n\t\tif (countryName == null) {\n\t\t\treturn code;\n\t\t}\n\t\treturn countryName;\n\t}", "public String getCurrency()\r\n {\r\n return currency;\r\n }", "public String getCurrency() {\r\n return currency;\r\n }", "public String getAccountCurrencyCode() {\r\n return accountCurrencyCode;\r\n }", "public String getFromCurrencyCode() {\n return fromCurrencyCode;\n }", "boolean hasCurrencyCode();", "public String getCurrencySymbol()\r\n {\r\n return (m_currencySymbol);\r\n }", "public String getCurrencyCd() {\n return (String) getAttributeInternal(CURRENCYCD);\n }", "Currency getCurrency();", "public String getCurrency()\n\t{\n\t\treturn this.currency;\n\t}", "@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 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 }", "public OldSwedishCurrency()\r\n\t{\r\n\t\tthis(0, 0, 0);\r\n\t}", "public String getCurrencyID() {\n return currencyID;\n }", "public static String m21399d(Context context) {\n String str = \"\";\n try {\n TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService(\"phone\");\n if (telephonyManager != null) {\n str = telephonyManager.getSimCountryIso().toUpperCase();\n }\n } catch (Exception e) {\n C5205o.m21464a((Throwable) e);\n }\n return TextUtils.isEmpty(str) ? Locale.getDefault().getCountry().toString().toUpperCase() : str;\n }", "private String symbol(Cardtype c) {\n if (c == Cardtype.HEARTS) {\n return \"\\u2665\";\n } else if (c == Cardtype.DIAMONDS) {\n return \"\\u2666\";\n } else if (c == Cardtype.SPADES) {\n return \"\\u2660\";\n } else if (c == Cardtype.CLUBS) {\n return \"\\u2663\";\n } else {\n return \"\";\n }\n }", "public String getCurrencyID() {\n return currencyID;\n }", "private String symbol() {\n switch (this.suit) {\n case 1:\n return \"♣\";\n case 2:\n return \"♦\";\n case 3:\n return \"♥\";\n case 4:\n return \"♠\";\n default:\n throw new IllegalArgumentException(\"Invalid Suit\");\n }\n }", "public double getBKC099() {\n return BKC099;\n }", "public String getBKC098() {\n return BKC098;\n }", "public String getCurrencyPair() {\n return _ccyPair;\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 getCurrency1() {\r\n\t\treturn currency1;\r\n\t}", "public java.lang.String getBillingCurrencyNumericCode() {\r\n return billingCurrencyNumericCode;\r\n }", "public String getCurrencyid() {\n return currencyid;\n }", "C12000e mo41087c(String str);", "public java.lang.String getCurrency() {\r\n return currency;\r\n }", "@Test\n\tpublic void testNameCurrency(){\n\t\tString name = \"$21,000 U.S. Currency\";\n\t\tString actualName = NormalizationUtility.normalizePartyName(name);\n\t\tAssert.assertEquals(\"$21,000 U.S. Currency\", actualName);\n\t\tname = \"$$21,000 U.S. Currency\";\n\t\tactualName = NormalizationUtility.normalizePartyName(name);\n\t\tAssert.assertEquals(\"$$21,000 U.S. Currency\", actualName); \n\t}", "public static String getCountry(final String rfcLocale) {\n return rfcLocale.contains(DASH)\n ? rfcLocale.toUpperCase(Locale.ENGLISH).substring(3)\n : \"\";\n }", "@Array({4}) \n\t@Field(27) \n\tpublic Pointer<Byte > CurrencyID() {\n\t\treturn this.io.getPointerField(this, 27);\n\t}", "public void setCurrencyID(String value) {\n this.currencyID = value;\n }", "public Currency getCurrency() {\n return currencyCode;\n }", "public String getVchar3() {\n return vchar3;\n }", "public java.lang.String getCurrency() {\n return currency;\n }", "protected String getCurrency() {\n return currency;\n }", "String getCE();", "String getCE();", "String getCE();", "String getCE();", "String getCmt();", "java.lang.String getCountryCode();", "java.lang.String getCountryCode();", "public String getSplitCurrency() {\r\n\treturn fxndf.getSplitCurrency();\r\n }", "private String formatUsNumber(Editable text) {\n\t\tStringBuilder cashAmountBuilder = null;\n\t\tString USCurrencyFormat = text.toString();\n//\t\tif (!text.toString().matches(\"^\\\\$(\\\\d{1,3}(\\\\,\\\\d{3})*|(\\\\d+))(\\\\.\\\\d{2})?$\")) { \n\t\t\tString userInput = \"\" + text.toString().replaceAll(\"[^\\\\d]\", \"\");\n\t\t\tcashAmountBuilder = new StringBuilder(userInput);\n\n\t\t\twhile (cashAmountBuilder.length() > 3 && cashAmountBuilder.charAt(0) == '0') {\n\t\t\t\tcashAmountBuilder.deleteCharAt(0);\n\t\t\t}\n\t\t\twhile (cashAmountBuilder.length() < 3) {\n\t\t\t\tcashAmountBuilder.insert(0, '0');\n\t\t\t}\n\t\t\tcashAmountBuilder.insert(cashAmountBuilder.length() - 2, '.');\n\t\t\tUSCurrencyFormat = cashAmountBuilder.toString();\n\t\t\tUSCurrencyFormat = Util.getdoubleUSPriceFormat(Double.parseDouble(USCurrencyFormat));\n\n//\t\t}\n\t\tif(\"0.00\".equals(USCurrencyFormat)){\n\t\t\treturn \"\";\n\t\t}\n\t\tif(!USCurrencyFormat.contains(\"$\"))\n\t\t\treturn \"$\"+USCurrencyFormat;\n\t\treturn USCurrencyFormat;\n\t}", "public String getISO3Language() {\n/* 445 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public String countryCode() {\n return countryCode;\n }", "public String getCurrency() {\n return (String) getAttributeInternal(CURRENCY);\n }", "public Price currencyCode(String currencyCode) {\n this.currencyCode = currencyCode;\n return this;\n }", "public String getTradeCurrency() {\n Object ref = tradeCurrency_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n tradeCurrency_ = s;\n }\n return s;\n }\n }", "String getDecimalEncoding();", "Uom getCurrencyUom();", "public String getTradeCurrency() {\n Object ref = tradeCurrency_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n tradeCurrency_ = s;\n }\n return s;\n } else {\n return (String) ref;\n }\n }", "@Override\r\n public String getUniCode()\r\n {\r\n if (getColor() == 'N')\r\n {\r\n setCode(\"\\u265B\");\r\n }\r\n else\r\n {\r\n setCode(\"\\u2655\");\r\n }\r\n return getCode();\r\n }", "private String countryCode(String address) {\n\t\tint j = address.lastIndexOf('.') + 1;\n\t\tString cc = address.substring(j);\n\t\treturn cc.toLowerCase();\n\t}", "protected String getCurrencyFromParameters(final FlightPriceRQ flightPriceRQ)\n\t{\n\t\treturn flightPriceRQ.getParameters().getCurrCodes().getCurrCode().get(0).getValue();\n\t}", "@GET\r\n\t@Path(\"/code/{currencycode}\")\r\n\tpublic String getCountryByCurrencyCode(@PathParam(\"currencycode\") final Currency currency) {\r\n\t\treturn currency.getCountry();\r\n\t}", "public String getCZ() {\n\t\treturn cz;\r\n\t}", "public int mo15797hn() {\n return this.f3883JI;\n }", "public String getCountryCode() {\n return normalizedBic.substring(COUNTRY_CODE_INDEX, COUNTRY_CODE_INDEX + COUNTRY_CODE_LENGTH);\n }", "Uom getOrigCurrencyUom();", "public Currency findCurrencyByCode(String currency);", "@Override\n public String getCurrency() {\n return currency != null ? currency : App.getContext().getString(R.string.example_currency);\n }", "public String mo1983z() throws cf {\r\n int E = m10257E();\r\n m10274f(E);\r\n if (E == 0) {\r\n return bi_常量类.f6358b_空串;\r\n }\r\n try {\r\n if (this.g.mo1996h() < E) {\r\n return new String(m10273e(E), \"UTF-8\");\r\n }\r\n String str = new String(this.g.mo1994f(), this.g.mo1995g(), E, \"UTF-8\");\r\n this.g.mo1993a(E);\r\n return str;\r\n } catch (UnsupportedEncodingException e) {\r\n throw new cf(\"UTF-8 not supported!\");\r\n }\r\n }", "Character getCode();", "public abstract String getCurrencyType();", "public String code() {\r\n return code == null ? String.format(\"%s%04d\", type, num) : code;\r\n }", "@Override\n public String getDescription() {\n return \"Issue currency\";\n }" ]
[ "0.6875619", "0.6297776", "0.6183435", "0.61624473", "0.615428", "0.6134947", "0.60200137", "0.59896475", "0.5962506", "0.5926448", "0.59059674", "0.5896221", "0.5862918", "0.58560574", "0.5792272", "0.5760384", "0.5752653", "0.5732829", "0.5720863", "0.5687365", "0.56844795", "0.56385154", "0.5629183", "0.56102765", "0.55717874", "0.55701125", "0.55654424", "0.5526034", "0.5522325", "0.5510216", "0.54991466", "0.54960644", "0.5482131", "0.546688", "0.54641056", "0.5462641", "0.54298717", "0.5426545", "0.542421", "0.54021835", "0.54021835", "0.54021835", "0.54021835", "0.5393712", "0.5386761", "0.5386701", "0.53809226", "0.5379484", "0.5377221", "0.5370266", "0.5365712", "0.53627545", "0.535835", "0.535835", "0.535835", "0.5357789", "0.53533727", "0.53518957", "0.5343944", "0.53366894", "0.5298592", "0.52966195", "0.5273389", "0.5273127", "0.5266761", "0.525848", "0.52575135", "0.52437264", "0.52401406", "0.52401406", "0.52401406", "0.52401406", "0.5234007", "0.5231147", "0.5231147", "0.5217036", "0.52154803", "0.5209148", "0.518317", "0.51676244", "0.51589763", "0.5154181", "0.5152756", "0.5151713", "0.5147572", "0.5138486", "0.512273", "0.5116287", "0.51112694", "0.510992", "0.51077116", "0.510231", "0.51004994", "0.5097836", "0.50957185", "0.50892156", "0.5086354", "0.5070521", "0.50545526", "0.5052267" ]
0.54454476
36
The delivery details for the gift card.
public GiftCardDeliveryCreate getDelivery() { return this.delivery; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n \tpublic String toString(){\n\t\treturn \n\t\t\t\"pojos.DeliveryDetails{\" +\n\t\t\t\"phone = '\" + phone + '\\'' + \n\t\t\t\",name = '\" + name + '\\'' + \n\t\t\t\",deliverTo = '\" + deliverTo + '\\'' + \n\t\t\t\"}\";\n\t\t}", "@java.lang.Override\n public com.google.cloud.networkmanagement.v1beta1.DeliverInfo getDeliver() {\n if (stepInfoCase_ == 12) {\n return (com.google.cloud.networkmanagement.v1beta1.DeliverInfo) stepInfo_;\n }\n return com.google.cloud.networkmanagement.v1beta1.DeliverInfo.getDefaultInstance();\n }", "@Override\n\tpublic String cardDetail() {\n\t\treturn atmCard.cardDetail();\n\t}", "@java.lang.Override\n public com.google.cloud.networkmanagement.v1beta1.DeliverInfo getDeliver() {\n if (deliverBuilder_ == null) {\n if (stepInfoCase_ == 12) {\n return (com.google.cloud.networkmanagement.v1beta1.DeliverInfo) stepInfo_;\n }\n return com.google.cloud.networkmanagement.v1beta1.DeliverInfo.getDefaultInstance();\n } else {\n if (stepInfoCase_ == 12) {\n return deliverBuilder_.getMessage();\n }\n return com.google.cloud.networkmanagement.v1beta1.DeliverInfo.getDefaultInstance();\n }\n }", "public String getDeliveryclass() {\n return deliveryclass;\n }", "@Override\n public String getDescription() {\n return \"Digital goods delivery\";\n }", "public Address getDeliveryAddress() {\n return deliveryAddress;\n }", "public String getDeliveryDate() {\r\n\t\treturn deliveryDate;\r\n\t}", "public java.lang.String getDeliveryOption() {\r\n return deliveryOption;\r\n }", "public String getDeliveryAddressDetails(){\n String address = driver.findElement(oDeliveryAddress).getText();\n logger.debug(\"delivery address is :\" + address);\n return address;\n }", "@java.lang.Override\n public com.google.cloud.networkmanagement.v1beta1.DeliverInfoOrBuilder getDeliverOrBuilder() {\n if (stepInfoCase_ == 12) {\n return (com.google.cloud.networkmanagement.v1beta1.DeliverInfo) stepInfo_;\n }\n return com.google.cloud.networkmanagement.v1beta1.DeliverInfo.getDefaultInstance();\n }", "public java.lang.String getSzCdPaymentDelivery()\r\n {\r\n return this._szCdPaymentDelivery;\r\n }", "@java.lang.Override\n public com.google.cloud.networkmanagement.v1beta1.DeliverInfoOrBuilder getDeliverOrBuilder() {\n if ((stepInfoCase_ == 12) && (deliverBuilder_ != null)) {\n return deliverBuilder_.getMessageOrBuilder();\n } else {\n if (stepInfoCase_ == 12) {\n return (com.google.cloud.networkmanagement.v1beta1.DeliverInfo) stepInfo_;\n }\n return com.google.cloud.networkmanagement.v1beta1.DeliverInfo.getDefaultInstance();\n }\n }", "public Date getDeliveryDate() {\n return deliveryDate;\n }", "public String getDeliverytype() {\n return deliverytype;\n }", "public int getDeliveryMode() {\n return deliveryMode;\n }", "public ZonedDateTime getDeliveryDate() {\n return _deliveryDate;\n }", "public int getDeliveryFee()\n {\n return deliveryFee;\n }", "@Override\n public String toString() {\n String message = \"\";\n message += \"Flight Number: \" + this.getFlightnum() + \"\\n\";\n message += \"Departure Date and Time: \" + this.getDepartureDateTime() + \"\\n\";\n message += \"Arrival Date and Time: \" + this.getArrivalDateTime() + \"\\n\";\n message += \"Airline: \" + this.getAirline() + \"\\n\";\n message += \"Origin: \" + this.getOrigin() + \"\\n\";\n message += \"Destination: \" + this.getDestination() + \"\\n\";\n message += \"Price: \" + String.valueOf(this.getCost()) + \"\\n\";\n message += \"Number of Seats Available: \" + String.valueOf(this.getNumSeats()) + \"\\n\\n\";\n return message;\n }", "public String toString()\n {\n return \"PG/F: \" + PG + \", Department: \" + inspections + \", Contact Method: \" + method + \", Date: \" + date + \", Number: \" + num + \", Street: \" + street + \", Ward: \" + ward;\n }", "public java.util.List<WorldUps.UDeliveryMade> getDeliveredList() {\n return delivered_;\n }", "public java.lang.String getShipCaptain() {\n\t\treturn _tempNoTiceShipMessage.getShipCaptain();\n\t}", "public String getShipmentDescriptionCode() {\n return shipmentDescriptionCode;\n }", "public Float getDeliveryfee() {\n return deliveryfee;\n }", "@Override\n public String toString() {\n return \"--------------------------------------------\\n\" +\n \"Transfer Details\\n\" +\n \"--------------------------------------------\\n\" +\n \"Id: \" + transferId +\"\\n\"+\n \"From: \" + accountFromId +\"\\n\"+\n \"To: \" + accountToId +\"\\n\"+\n \"Amount: \" + amount +\"\\n\"+\n \"Type:\" + transferTypeId +\"\\n\"+\n \"Status:\" + transferStatusId +\"\\n\";\n }", "public String toString() {\r\n\t\treturn \"Transportation(\"+this.description+\", \"+this.destination+\")\";\r\n\t}", "@Override\n public String toString()\n {\n String str = \"\";\n str += \"\\n********* Receipt *********\\n\";\n str += \"Order Number: \" + orderNum + \"\\nDate: \" + date + \"\\n\";\n str += \"Bartender: \" + bartenderName + \", \" + \"Customer: \" + customerName + \"\\n\";\n str += \"Drinks: \";\n\n for(DrinkAndQuantity d : drinksAndQuantities){\n str += d.toString() + \", \";\n }\n str = str.substring(0, str.length() - 2);\n \n //get payment info\n String payValue = \"\";\n String payType = \"\";\n if(paid){\n payValue = \" Yes,\";\n payType = paymentType;\n }else{\n payValue = \" No,\";\n payType = paymentType;\n }\n \n str += \"\\n\";\n str += \"Paid: \" + payValue + \" \" + paymentType;\n \n //get price\n NumberFormat formatter = NumberFormat.getCurrencyInstance();\n String totalCurrency = formatter.format(totalPrice);\n str += \"\\n\";\n str += \"Total: \" + totalCurrency;\n str += \"\\n***************************\\n\";\n return str;\n }", "public String getDetails() {\n return toString();\n }", "public String getDeliverTo(){\n\t\treturn deliverTo;\n\t}", "public com.expedia.www.packagefinder.database.exppackage.ExpPackageProtos.flight getFlightdetails() {\n if (flightdetailsBuilder_ == null) {\n return flightdetails_ == null ? com.expedia.www.packagefinder.database.exppackage.ExpPackageProtos.flight.getDefaultInstance() : flightdetails_;\n } else {\n return flightdetailsBuilder_.getMessage();\n }\n }", "public BigDecimal getFdeliverypricerate() {\n return fdeliverypricerate;\n }", "public String toString() {\n if (displayString == null)\n {\n displayString = this.exchange + ':' + this.firmNumber + ':' + classKey;\n }\n return displayString;\n }", "public String getDetails() {\n return details;\n }", "public String getDetails() {\n\t\treturn details;\n\t}", "public String getDetails() {\n\t\treturn details;\n\t}", "public Date getDeliveryDate() {\n return (Date)getAttributeInternal(DELIVERYDATE);\n }", "public String toString(){\n\t\treturn getClass() + \" has tracking number \" + trackingNumber + \", weighs \" + weight + \" lb(s), and shipping cost of \" + shippingCost;\n\t}", "public double getshippingcost() {\r\n\t\treturn shippingcost;\r\n\t}", "public String toString() {\n return \"The card has \" + this.balance + \" euros\";\n }", "@Override\r\n\tpublic String delivery() {\n\t\treturn \" welcome to DTDC post service \";\r\n\t}", "public String getDetails() {\n if(details == null)\n return \"\";\n else return details;\n }", "public String getDetails() {\n\t\treturn \"Protein bar: \" + name + \", Fat: \" + fat + \", Energy: \" + energy + \", Carbohydrate: \"\n\t\t\t\t+ carbohydrate + \", Protein: \" + protein + \", Fiber: \" + fiber;\n\t}", "public String getDetails() {\n return this.details;\n }", "@Override\n\tpublic String toString() {\n\t\treturn description + \", \" + billAmount + \", \" + tipAmount + \", \" + totalAmount;\n\t}", "public String getShipmentCode() {\n return shipmentCode;\n }", "public com.expedia.www.packagefinder.database.exppackage.ExpPackageProtos.flight getFlightdetails() {\n return flightdetails_ == null ? com.expedia.www.packagefinder.database.exppackage.ExpPackageProtos.flight.getDefaultInstance() : flightdetails_;\n }", "public Date getDeliveryDate() {\n return (Date) getAttributeInternal(DELIVERYDATE);\n }", "public Flp2pDeliver getDeliverEvent() {\r\n return deliverEvent;\r\n }", "com.expedia.www.packagefinder.database.exppackage.ExpPackageProtos.flight getFlightdetails();", "public String toString()\n\t{\n\t\treturn String.format(\"%-25s%-15s\\n%-25s%-15s\\n%-25s%-15s\\n%-25s%-15d\\n%-25s%-15s\\n%-25s$%,-13.2f\", \n\t\t\t\t \t\t \t \"Name\", this.getName(), \"Address:\", this.getAddress(), \"Telephone number:\", this.getTelephone(), \n\t\t\t\t \t\t \t \"Customer Number:\", this.getCustNum(), \"Email notifications:\", this.getSignedUp() == true ? \"Yes\" : \"No\",\n\t\t\t\t \t\t \t \"Purchase amount:\", this.getCustomerPurchase());\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn \"\\nCard Name: \" + getName() +\n\t\t\t\t\"\\nMultiverse Id: \" + getMultiverseid() +\n\t\t\t\t\"\\nMana Cost: \" + getManaCost();\n\t}", "public String getShipping(){\n return this.post.getType();\n }", "public String getDetails() {\n return mDetails;\n }", "public String getDetails() {\n return mDetails;\n }", "@Override\n public String toString() {\n return super.toString() + String.format(\": Customer %d arrives\",\n this.customer.getId());\n }", "protected String getMailDebugInfo()\n {\n StringBuffer str = new StringBuffer();\n str.append(\"Email Details:\").append(\"\\n\");\n str.append(\"konakartAPI = \").append(konakartAPI).append(\"\\n\");\n str.append(\"storeOwner = \").append(storeOwner).append(\"\\n\");\n str.append(\"storeOwnerEmailAddr = \").append(storeOwnerEmailAddr).append(\"\\n\");\n str.append(\"storeName = \").append(storeName).append(\"\\n\");\n str.append(\"storeId = \").append(storeId).append(\"\\n\");\n str.append(\"imageBaseUrl = \").append(imageBaseUrl).append(\"\\n\");\n str.append(\"templateBase = \").append(templateBase).append(\"\\n\");\n str.append(\"displayPricesWithTax = \").append(displayPricesWithTax).append(\"\\n\");\n str.append(\"emailSubject = \").append(emailSubject).append(\"\\n\");\n str.append(\"destinationEmailAddr = \").append(emailAddr).append(\"\\n\");\n str.append(\"fromAddress = \").append(fromAddressStr).append(\"\\n\");\n str.append(\"fromAddressName = \").append(fromName).append(\"\\n\");\n str.append(\"replyToAddress = \").append(replyToAddressStr).append(\"\\n\");\n str.append(\"replyToAddressName = \").append(replyToName).append(\"\\n\");\n if (bccEmailsStrArray != null && bccEmailsStrArray.length > 0)\n {\n for (int i = 0; i < bccEmailsStrArray.length; i++)\n {\n String bccEmail = bccEmailsStrArray[i];\n str.append(\"bccEmail = \").append(bccEmail).append(\"\\n\");\n }\n }\n str.append(\"contentType = \").append(contentType).append(\"\\n\");\n str.append(\"doBlindCopy = \").append(doBlindCopy).append(\"\\n\");\n str.append(\"fullAttachmentFilename = \").append(fullAttachmentFilename).append(\"\\n\");\n str.append(\"isAsync = \").append(isAsync).append(\"\\n\");\n str.append(\"countryCode = \").append(countryCode).append(\"\\n\");\n str.append(\"templateName = \").append(templateName).append(\"\\n\");\n str.append(\"customerName = \").append(customerName).append(\"\\n\");\n if (newPassword != null)\n {\n str.append(\"newPassword = \").append(\"YES\").append(\"\\n\");\n str.append(\"expiryMins = \").append(expiryMins).append(\"\\n\");\n }\n if (productName != null)\n {\n str.append(\"productName = \").append(productName).append(\"\\n\");\n str.append(\"productQuantity = \").append(productQuantity).append(\"\\n\");\n str.append(\"productId = \").append(productId).append(\"\\n\");\n str.append(\"sku = \").append(sku).append(\"\\n\");\n }\n\n str.append(\"emailBody = \").append(emailBody).append(\"\\n\");\n if (appCustomer != null)\n {\n str.append(\"customer = \").append(appCustomer.toString()).append(\"\\n\");\n } else if (adminCustomer != null)\n {\n str.append(\"customer = \").append(adminCustomer.toString()).append(\"\\n\");\n } else\n {\n str.append(\"customer is null\").append(\"\\n\");\n }\n if (appOrder != null)\n {\n str.append(\"order = \").append(appOrder.toString()).append(\"\\n\");\n } else if (adminOrder != null)\n {\n str.append(\"order = \").append(adminOrder.toString()).append(\"\\n\");\n } else\n {\n str.append(\"order is null\").append(\"\\n\");\n }\n if (vendorOrders != null && vendorOrders.length > 0)\n {\n for (int i = 0; i < vendorOrders.length; i++)\n {\n Order vOrder = vendorOrders[i];\n str.append(\"vendor order = \").append(vOrder.toString()).append(\"\\n\");\n }\n }\n return str.toString();\n }", "@Override\n public String toString() {\n return \"FLIGHT'S ID: \" + Id + \"\\nFROM: \" + From + \"\\tTO: \" + To + \"\\nAIRCRAFT TYPE: \"\n + Type + \", MILITARY: \" + (Mil ? \"yes\" : \"no\") + \"\\nSPEED: \" + Spd\n + \", ALTITUDE: \" + Alt;\n }", "public String toString() {\n StringBuffer stringBuffer = new StringBuffer();\n stringBuffer.append(\"PrepaidDscrId: \" + _prepaidDscrId);\n stringBuffer.append(\"ProcessDt: \" + _processDt);\n stringBuffer.append(\"LocationCd: \" + _locationCd);\n stringBuffer.append(\"AwbNbr: \" + _awbNbr);\n stringBuffer.append(\"TinUniqId: \" + _tinUniqId);\n stringBuffer.append(\"CourierId: \" + _courierId);\n stringBuffer.append(\"PaymentCurrency: \" + _paymentCurrency);\n stringBuffer.append(\"FreightAmtInVisa: \" + _freightAmtInVisa);\n stringBuffer.append(\"DiscrepancyFound: \" + _discrepancyFound);\n stringBuffer.append(\"DiscrepancyAmt: \" + _discrepancyAmt);\n stringBuffer.append(\"ExchRate: \" + _exchRate);\n stringBuffer.append(\"DiscrepancyRsn: \" + _discrepancyRsn);\n stringBuffer.append(\"ShipDate: \" + _shipDate);\n stringBuffer.append(\"Pux16Amount: \" + _pux16Amount);\n stringBuffer.append(\"CouponAmount: \" + _couponAmount);\n stringBuffer.append(\"Comments: \" + _comments);\n stringBuffer.append(\"StatusId: \" + _statusId);\n stringBuffer.append(\"ManagerEmpId: \" + _managerEmpId);\n return stringBuffer.toString();\n }", "@Override\n public String toString() {\n return \"Card{\"\n + \"frontInfo='\" + frontInfo\n + '\\''\n + \", backInfo='\" + backInfo\n + '\\''\n + \", startTime=\" + startTime\n + \", ID=\" + cardID\n + '}';\n }", "@Override\n public String toString() {\n return \"Receipt{id=\"\n + this.receiptId.toString()\n + \", \"\n + \"Time placed=\"\n + this.timePlaced\n + \", \"\n + \"StoreId=\"\n + this.cart.getStoreID()\n + \", \"\n + \"Pizzas=\"\n + this.cart.getPizzas()\n + \", \"\n + \"Sides=\"\n + this.cart.getSides()\n + \", \"\n + \"Total Amount=\"\n + this.cart.getTotalAmount()\n + \", \"\n + \"Card=card number ending with \"\n + this.card.getCardNumber().substring(this.card.getCardNumber().length() - 4)\n + \"}\";\n }", "public String toString() {\r\n\t\treturn super.display() + \"\\n\" + listAllCards() + \r\n\t\t\t\t\"Purchased tickets: \\n\" + listAllTickets() +\r\n\t\t\t\t\"___________________________________________\";\r\n\t}", "public String getDetails() {\r\n\t\treturn \"Loan Id: \" + loanId + \"\\n\\rStock Id: \" + stockId + \" \\n\\rDate of loan: \" + loanDate + \"\\n\\r Has the loan been returned?: \" + isReturned + \" \\n\\rFine owed: \" + loanFine.getFine();\r\n\t}", "@Override\n public String toString (){\n return \"Party name is \" + this.partyName + \" total cost is \" + this.totalCost;\n }", "String getPaymentInformation();", "public String getDeliveryAddressHeader(){\n String header =driver.findElement(oDeliveryAddressHeader).getText();\n logger.debug(\"delivery address header is :\" + header);\n return header;\n }", "@Override public String toString() {\n return(trackingNumber + \" \" + type + \" \" + specification + \" \" + mailing + \" \" + weight + \" \" + volume);\n }", "@Override\r\n\tpublic String toString() \r\n\t{\r\n\t\tif(totalCost>0)\r\n\t\t{\r\n\t\t\treturn \"Vendor Name : \"+vendorName+\"\\nAddress : \"+vendorAddress+\"\\nSource Location : \"+sourceLoc\r\n\t\t\t\t\t+\"\\nDestination Location : \"+destinationLoc+\"\\nTotal Cost is : \"+totalCost;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn \"Invalid data\";\r\n\t\t}\r\n\t}", "public String getRetrieveDACreditDetails() {\n return retrieveDACreditDetails;\n }", "public WorldUps.UDeliveryMade getDelivered(int index) {\n return delivered_.get(index);\n }", "java.lang.String getDetails();", "public java.util.List<WorldUps.UDeliveryMade> getDeliveredList() {\n if (deliveredBuilder_ == null) {\n return java.util.Collections.unmodifiableList(delivered_);\n } else {\n return deliveredBuilder_.getMessageList();\n }\n }", "public int getApproximateDeliveryTime() {\n return approximateDeliveryTime;\n }", "public double getShippingCost() {\n\t\treturn shippingCost;\n\t}", "@Override\n\tpublic Object getDetails() {\n\t\treturn details;\n\t}", "@Override\n\tpublic java.lang.String getCard() {\n\t\treturn _esfShooterAffiliationChrono.getCard();\n\t}", "public String toString() {\r\n return \"Product: \" + this.product + \", Amount: \" + this.amount;\r\n }", "public WorldUps.UDeliveryMadeOrBuilder getDeliveredOrBuilder(\n int index) {\n return delivered_.get(index);\n }", "private String getOrderDetails(Order order) {\n String message = getString(R.string.total) + \"\\n\" + getString(R.string.name) + \": \" + order.getCustomerName() +\n \"\\n\" + getString(R.string.add_cream) + \"? \" + String.valueOf(order.isHasWhippedCream()) +\n \"\\n\" + getString(R.string.add_chocolate) + \"? \" + String.valueOf(order.isHasChocolate()) +\n \"\\n\" + getString(R.string.quantity) + \": \" + order.getCupsNumber() + \"\\n\" + getString(R.string.resut) +\n \": $\" + MainActivity.calculatePrice(order) + \"\\n\" + getString(R.string.thanks) + \"!\";\n return message;\n }", "protected String stringGoodsInfo() {\n String ret = \"Goods Supply\";\n for (G good : this.goods) {\n ret += \"\\nN = \" + good.supply;\n }\n return ret;\n }", "WorldUps.UDeliveryMadeOrBuilder getDeliveredOrBuilder(\n int index);", "public java.util.List<? extends WorldUps.UDeliveryMadeOrBuilder> \n getDeliveredOrBuilderList() {\n return delivered_;\n }", "@Override\n\tpublic String toString() { // output\n\t\tString s = \"Flight #\" + getFlightNumber() + \" Cargo: \" + cargoCapacity\n\t\t\t\t+ \"/\" + getMaximumCapacity() + \" cu/ft. \" + +cargoWeight + \"/\"\n\t\t\t\t+ getMaximumWeight() + \" lbs.\";\n\t\ts += \" \\n CARGO DETAILS: \\n\";\n\t\tfor (int i = 0; i < getCargoInPlane().getSize(); i++) {\n\t\t\ts += \"\\t\" + getCargoInPlane().get(i) + \"\\n\";\n\t\t}\n\n\t\tif (getCargoInPlane().isEmpty()) {\n\t\t\ts += \"\\t\" + \"NO CARGO\"; // if nothing on plane\n\t\t}\n\t\treturn s; // the original string of all info\n\t}", "@Override\r\n\tpublic String detailDeal() {\n\t\treturn null;\r\n\t}", "public java.lang.String getPaymentinformation () {\r\n\t\treturn paymentinformation;\r\n\t}", "public Integer getShippingTime() {\n return shippingTime;\n }", "public String toString()\n\t{\n\t\treturn \"[MessageSentConfirmation] - \" + plate + \", \" + state + \", \" + text;\n\t}", "public String getPaymentDesc() {\n return (String) getAttributeInternal(PAYMENTDESC);\n }", "@Override\n public String toString() {\n return \"Origin:'\" + getFlightOrigin() + '\\'' +\n \", Destiny:'\" + getFlightDestiny()+ '\\'' +\n \", Category:\" + getFlightCategory() +\n \", Date:\" + getFlightDate() +\n \", Companions:\" + flightCompanions +\n \", Cost:\" + flightCost;\n }", "java.util.List<WorldUps.UDeliveryMade> \n getDeliveredList();", "WorldUps.UDeliveryMade getDelivered(int index);", "public Integer getTradeDelivering() {\n return tradeDelivering;\n }", "public String getFeeDescription() {\n return feeDescription;\n }", "public boolean isAmDelivery() {\r\n return amDelivery;\r\n }", "public String getDetails() {\n String result = \"\";\n result += String.format(\"Key: %d%n\", id);\n result += String.format(\"Date created: %s%n\", date);\n result += String.format(\"Location type: %s%n\", locationType);\n result += String.format(\"Zip code: %s%n\", zipCode);\n result += String.format(\"Address: %s%n\", address);\n result += String.format(\"City: %s%n\", city);\n result += String.format(\"Borough: %s%n\", borough);\n result += String.format(\"Latitude: %s%n\", latitude);\n result += String.format(\"Longitude: %s%n\", longitude);\n return result;\n }", "@Override\n public String toString() {\n return payment; \n }", "public String getShippingConvert() {\r\n\t\treturn this.getShipping().getName();\r\n\t}", "public com.expedia.www.packagefinder.database.exppackage.ExpPackageProtos.flightOrBuilder getFlightdetailsOrBuilder() {\n return getFlightdetails();\n }", "public String getExtendDPDiscountDescription() {\n\t\tString desc = \"NONE\";\n\t\t//Show any redeemed extend DP promo if any.\n\t\tSet<String> usedCodes = this.sale.getUsedPromotionCodes();\n\t\tif ( usedCodes != null) {\n\t\t\tfor(Iterator<String> it = usedCodes.iterator(); it.hasNext();) {\n\t\t\t\tPromotionI promo = PromotionFactory.getInstance().getPromotion(it.next());\n\t\t\t\tif (promo != null && promo.isExtendDeliveryPass())\n\t\t\t\t\tdesc = promo.getDescription();\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn desc;\n\t}", "@Override\n\tpublic double getDeliveryDistance() {\t\n\t\treturn Math.abs(customerLocationX) + Math.abs(customerLocationY);\n\t}", "public String getDeliveryTerm() {\n return (String)getAttributeInternal(DELIVERYTERM);\n }" ]
[ "0.7049873", "0.67482626", "0.67335993", "0.6662812", "0.6605756", "0.6594499", "0.6522957", "0.6515296", "0.64288515", "0.6413183", "0.6403641", "0.6399322", "0.6387462", "0.6283253", "0.6270646", "0.6255574", "0.62170947", "0.6182893", "0.613913", "0.60504615", "0.6043718", "0.60065794", "0.5988464", "0.5979548", "0.59639287", "0.59573466", "0.5895173", "0.5888066", "0.5883857", "0.58825105", "0.58799803", "0.5858233", "0.5848305", "0.58420575", "0.58420575", "0.58276016", "0.58256733", "0.5822542", "0.58181494", "0.5813924", "0.58088267", "0.5797409", "0.5791439", "0.5783819", "0.57837415", "0.57786185", "0.57772475", "0.5771126", "0.5766902", "0.5763268", "0.57392824", "0.57286507", "0.571213", "0.571213", "0.57104504", "0.57056916", "0.56879", "0.5687382", "0.56870514", "0.5685619", "0.5678319", "0.5663345", "0.5662951", "0.56593114", "0.5656153", "0.5654201", "0.56318915", "0.56306034", "0.56260735", "0.56200796", "0.56098396", "0.5605849", "0.5604347", "0.5601591", "0.55915743", "0.55857086", "0.5583827", "0.55792415", "0.55766934", "0.5574373", "0.5573571", "0.5567181", "0.55657494", "0.55647427", "0.5557334", "0.55457366", "0.5543779", "0.55401146", "0.5537857", "0.55354583", "0.553432", "0.55286324", "0.5527147", "0.5518882", "0.55177754", "0.5513535", "0.5513363", "0.55051726", "0.5495943", "0.54918396" ]
0.75478786
0
Block of account details for the gifter. This references an existing account_code.
public AccountPurchase getGifterAccount() { return this.gifterAccount; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getAccountCode() {\n return accountCode;\n }", "public String viewAccount() {\n ConversationContext<Account> ctx = AccountController.newEditContext(getPart().getAccount());\n ctx.setLabelWithKey(\"part_account\");\n getCurrentConversation().setNextContextSubReadOnly(ctx);\n return ctx.view();\n }", "public String getAccount() {\r\n return account;\r\n }", "public String getAccount() {\n return account;\n }", "public String getAccount() {\n return account;\n }", "public String getAccount() {\n return account;\n }", "public String getAccount() {\n return account;\n }", "public String getAccount() {\n return account;\n }", "public String getAccount() {\n return account;\n }", "public String getAccount() {\n return account;\n }", "public String getAccount() {\n return account;\n }", "public String getAccount() {\n return account;\n }", "public String getAccount() {\n return account;\n }", "public AccountInfo getAccountInfo() {\n return accountInfo;\n }", "java.lang.String getAccount();", "public AccountInfo getAccount()\n {\n if(accountInfo == null)\n {\n System.out.println(\"You need to generate an account before getting the details.\");\n return null;\n }\n return accountInfo;\n }", "public String getAccount(){\n\t\treturn account;\n\t}", "public String getAccountHolderCode() {\n return accountHolderCode;\n }", "public StringBuilder printAccountInformation(){\n StringBuilder accountInformation = new StringBuilder();\n accountInformation.append(\"Account information:\\n\")\n .append(\"\\tAccount id: \").append(this.getId()).append(\"\\n\")\n .append(\"\\tAccount balance: \").append(this.getBalance()).append(\"\\n\")\n .append(\"\\tAccount annual interest rate: \").append(this.getAnnualInterestRate()).append(\"\\n\")\n .append(\"\\tAccount create date: \").append(this.getDateCreated()).append(\"\\n\");\n\n return accountInformation;\n }", "public String getAccount() {\r\n\t\treturn account;\r\n\t}", "public String getAccountInfo(){\n NumberFormat currencyFormat = NumberFormat.getCurrencyInstance();\n return \"Account No : \" + accountNo +\n \"\\nName : \" + name +\n \"\\nBalance : \" + currencyFormat.format(balance);\n }", "public int getAccountNumber() {\n return accountNumber;\n }", "public account() {\n initComponents();\n autoID();\n branch();\n }", "public Account getAccount() {\n return account;\n }", "public Account getAccount() {\n return account;\n }", "@Override\r\n\tpublic void showAccount() {\n\t\t\r\n\t}", "private String printLeagueOfLegendsAccountDetails(LeagueOfLegendsAccount account) {\r\n return \"[ region = \" + account.getRegion() + \",\\n name = \" + account.getInGameName() + \", \\n\"\r\n + \"blueEssenceBalance = \" + account.getBlueEssenceBalance() + \"BE\" + \", \\n\"\r\n + \"riotPointsBalance = \" + account.getRiotPointsBalance() + \"RP\" + \", \\n\"\r\n + account.getCollectionSize() + \" Champions owned\" + \", \\n\"\r\n + \"Champions owned = \"\r\n + account.myCollection.getListOfChampionName(account.myCollection) + \", \\n\"\r\n + account.getRecommendedSize() + \" Recommended Champions\" + \",\\n\"\r\n + \"Recommended Champions = \"\r\n + account.myRecommended.getListOfChampionName(account.myRecommended) + \", \\n\"\r\n + account.getFavouritesSize() + \" Favourite Champions\" + \", \\n\"\r\n + \"Favourite Champions = \"\r\n + account.myFavourites.getListOfChampionName(account.myFavourites) + \"\\n]\";\r\n }", "public Account getAccount() {\r\n\t\treturn account;\r\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn accountID;\n\t}", "public void setAccount(String account) {\n this.account = account;\n }", "public void setAccount(String account) {\n this.account = account;\n }", "public void setAccount(String account) {\n this.account = account;\n }", "public void setAccount(String account) {\n this.account = account;\n }", "public String getAccountTypeCode() {\n return accountTypeCode;\n }", "private void consumeAccountInfo() {\n Account[] accounts = mAccountManager.getAccountsByType(ACCOUNT_TYPE);\n Account account;\n if (accounts != null && accounts.length > 0) {\n account = accounts[0];\n } else {\n account = new Account(\"\", ACCOUNT_TYPE);\n }\n mAccountManager.getAuthToken(account, AUTH_TOKEN_TYPE, null, true, authTokenCallback, null);\n }", "public Long getAccountID() {\n return accountID;\n }", "public Long getAccountID() {\n return accountID;\n }", "public String displayAccount() {\r\n\t return id+\",\"+name+\",\"+balance+\",\"+email+\",\"+dateOfOpening;\r\n }", "java.lang.String getAccountNumber();", "public String getCardNumber() {\n return this.account;\n }", "public int getAccountType() {\r\n return accountType;\r\n }", "public void AddToAccountInfo();", "public String getAccountId() {\n return this.accountId;\n }", "int updateAccountInfo(Account account);", "public int getAccountNumber() {\n\t\treturn accNum;\n\t}", "public void setAccount(Account account) {\n this.account = account;\n }", "void updateAccount();", "public String getAccountNumber() {\n return accountNumber;\n }", "public String getAccountNumber() {\n return accountNumber;\n }", "public String getAccountNumber() {\n return accountNumber;\n }", "AccountDetail getAccount(String number) throws Exception;", "public void setAccountId(String accountId) {\n this.accountId = accountId;\n }", "java.lang.String getAccountId();", "java.lang.String getAccountId();", "java.lang.String getAccountId();", "public String getAccountNo() {\n return accountNo;\n }", "public String getAccountNo();", "public java.lang.String getAccount_number() {\n return account_number;\n }", "public Long getAccountID() {\n return accountID;\n }", "public Long getAccountID() {\n return accountID;\n }", "public long getAccountId()\r\n/* 115: */ {\r\n/* 116:121 */ return this.accountId;\r\n/* 117: */ }", "public java.lang.String getAccount_Id() {\n return account_Id;\n }", "public void printAccountInfo(){\n System.out.printf(\"%5d %-20s %8.2f\\n\",accountNum,customerName,balance);\n }", "public com.huawei.www.bme.cbsinterface.cbs.businessmgr.Account getAccount() {\r\n return account;\r\n }", "public int getAccountID() {\n return accountID;\n }", "@Override\n public String toString()\n {\n return getClass().getSimpleName() + \"(\" + getAccountID() + \")\";\n }", "@Override\n public String getDescription() {\n return \"Account information\";\n }", "public long getAccountId() {\n return accountId;\n }", "public Integer getAccountNumber() {\n return accountNumber;\n }", "public Integer getAccountNumber() {\n return accountNumber;\n }", "Account getAccount();", "public String getAccountId() {\n return accountId;\n }", "public String getAccountId() {\n return accountId;\n }", "public void setAccount(String account) {\r\n\t\tthis.account = account;\r\n\t}", "public int getAccountNo() {\n return accountNo;\n }", "public void setAccountId(int accountId) {\n this.accountId = accountId;\n }", "@Override \n public String toString() {\n return \"SavingAccount{\" +\n \"interestRate=\" + interestRate +\n \", accountHolder='\" + accountHolder + '\\'' +\n \", accountNum=\" + accountNum +\n \", balance=\" + balance +\n '}';\n }", "void updateAccount(Account account);", "public void setAccountId(String accountId) {\n this.accountId = accountId;\n }", "public void setAccountId(String accountId) {\n this.accountId = accountId;\n }", "@Override\n public String toString() {\n return \"accountNumber=\" + accountNumber +\n \", name='\" + name + '\\'' +\n \", balance=\" + balance +\n \", pendingBalance=\" + pendingBalance;\n }", "GlAccount getGlAccount();", "public String getAccountEntry() {\n return this.username + Utility.createLine(' ', MAX_USERNAME_LENGTH -\n this.username.length()) + \" \" + this.type + \" \"\n + String.format(\"%09.2f\", this.balance);\n }", "String getAccountDescription();", "String getAccountDescription();", "public java.lang.String getAccount() {\n java.lang.Object ref = account_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n account_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public int getAccountId() {\n return accountId;\n }", "public Long getAccountId() {\n return accountId;\n }", "public void setAccountId(Long accountId) {\n this.accountId = accountId;\n }", "public com.google.protobuf.ByteString\n getAccountBytes() {\n java.lang.Object ref = account_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n account_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@Override\n\tpublic String toString(){\n\t\treturn \"Account{\"+\n\t\t\t\t\"id=\"+id+\n\t\t\t\t\", email='\"+email+'\\''+\n\t\t\t\t\", user=\"+user+\n\t\t\t\t\", accessLevel=\"+accessLevel+\n\t\t\t\t\", prefs=\"+prefs+\n\t\t\t\t\", createdAt=\"+createdAt+\n\t\t\t\t\", lastActive=\"+lastActive+\n\t\t\t\t\", banInfo=\"+banInfo+\n\t\t\t\t\", activationInfo=\"+activationInfo+\n\t\t\t\t\", invitedBy=\"+invitedBy+\n\t\t\t\t'}';\n\t}", "public account(int acc,int Id,String Atype,double bal ){\n this.accNo = acc;\n this.id = Id;\n this.atype = Atype;\n this.abal = bal;\n }", "public java.lang.String getAccount() {\n java.lang.Object ref = account_;\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 account_ = s;\n return s;\n }\n }", "public void setAccountId(Integer accountId) {\n this.accountId = accountId;\n }", "public int getAccountNo()\r\n\t{\r\n\t\t\r\n\t\treturn accountNo;\r\n\t\t\r\n\t}", "private static void displayAccount(Account account) {\n\t\tSystem.out.println(account.toString());\n\t\tSystem.out.println();\n\t}", "public void setAccountId(long value) {\n this.accountId = value;\n }", "public void linkAccount() {}", "BankAccount(String accountType){\n\t\tSystem.out.println(\"NEW ACCOUNT: \" + accountType);\n\t\tthis.accountType = accountType; \n\t}", "public void setAccountId(UUID accountId) {\n this.accountId = accountId;\n }", "public void displayAccountInfo(DropboxAPI.Account account) {\n \tif (account != null) {\n \t\tString info = \"Name: \" + account.displayName + \"\\n\" +\n \t\t\t\"E-mail: \" + account.email + \"\\n\" + \n \t\t\t\"User ID: \" + account.uid + \"\\n\" +\n \t\t\t\"Quota: \" + account.quotaQuota;\n \t\tmText.setText(info);\n \t}\n }" ]
[ "0.6730649", "0.64425844", "0.6179408", "0.61508495", "0.61508495", "0.61508495", "0.61508495", "0.61508495", "0.61508495", "0.61508495", "0.61508495", "0.61508495", "0.61508495", "0.61058176", "0.60984915", "0.60834765", "0.6078798", "0.60764784", "0.6047322", "0.6044582", "0.59976006", "0.5932561", "0.59236586", "0.5891701", "0.5891701", "0.5885726", "0.5851092", "0.5814658", "0.580378", "0.5799972", "0.5799972", "0.5799972", "0.5799972", "0.5785556", "0.57761234", "0.576967", "0.576967", "0.57631403", "0.5758075", "0.5757611", "0.5744603", "0.5743091", "0.57375973", "0.57359564", "0.57283753", "0.5720686", "0.57157683", "0.5712737", "0.5712737", "0.5712737", "0.5697733", "0.5697165", "0.5689903", "0.5689903", "0.5689903", "0.56869507", "0.5679725", "0.56795657", "0.5675113", "0.5675113", "0.5662807", "0.5659797", "0.56593806", "0.56458825", "0.5643194", "0.5636736", "0.5634785", "0.56299424", "0.56277895", "0.56277895", "0.5624842", "0.56234", "0.56234", "0.56212044", "0.5618184", "0.5618092", "0.5613572", "0.5607534", "0.5604656", "0.5604656", "0.55995536", "0.5579771", "0.55790526", "0.5561922", "0.5561922", "0.5550082", "0.55492836", "0.55485487", "0.5546429", "0.5528746", "0.5525457", "0.55111367", "0.5508904", "0.5508242", "0.55029553", "0.54990274", "0.54944485", "0.5485324", "0.54848015", "0.5474073", "0.54735947" ]
0.0
-1
The product code or SKU of the gift card product.
public String getProductCode() { return this.productCode; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getProductCode();", "java.lang.String getProductNumberCode();", "public String getSkuCode() {\n return skuCode;\n }", "String sku();", "String sku();", "public String getProductCode() {\n return productCode;\n }", "public String sku() {\n return this.sku;\n }", "public String getSku() {\r\n return sku;\r\n }", "public String getSku() {\n return sku;\n }", "public String getSku() {\n return sku;\n }", "public java.lang.String getSku() {\n return sku;\n }", "public String product() {\n return this.product;\n }", "public String getProductCode() {\r\n/* 211 */ return this._productCode;\r\n/* */ }", "public Integer getProductCode() {\n\t\treturn productCode;\n\t}", "public String getSku(){\n return sku;\n }", "public String getFnSKU() {\n return fnSKU;\n }", "public java.lang.String getProduct() {\n return product;\n }", "public String getProduct() {\r\n return this.product;\r\n }", "public String getProduct() {\n return this.product;\n }", "public String getProduct() {\n return product;\n }", "public String getProduct() {\n return product;\n }", "public String getProductID() {\n final byte[] data = new byte[12];\n mem.getBytes(16, data, 0, data.length);\n return new String(data).trim();\n }", "String getProduct();", "public String getNomorSK2();", "public String getProduct()\n {\n return product;\n }", "public String getUserecommendedproduct() {\r\n return userecommendedproduct;\r\n }", "Sku sku();", "public Integer getProductUomId() {\n return productUomId;\n }", "public Integer getProductUomId() {\n return productUomId;\n }", "public String getAcsProduct() {\n return acsProduct;\n }", "public String getProductPack() {\n return (String)getAttributeInternal(PRODUCTPACK);\n }", "public String getSellerSKU() {\n return sellerSKU;\n }", "public String getProductOwner();", "public short getIdProduct() {\r\n\t\treturn idProduct;\r\n\t}", "public String supportedSku() {\n return this.supportedSku;\n }", "public ST getProductServiceClarificationCodeValue() { \r\n\t\tST retVal = this.getTypedField(18, 0);\r\n\t\treturn retVal;\r\n }", "public java.lang.String getProductInfo () {\n\t\treturn productInfo;\n\t}", "public String getProID() {\n\t\treturn sh_ProductID;\n\t}", "public org.mrk.grpc.catalog.Product getProduct() {\n if (productBuilder_ == null) {\n return product_ == null ? org.mrk.grpc.catalog.Product.getDefaultInstance() : product_;\n } else {\n return productBuilder_.getMessage();\n }\n }", "public GiftCardProductQuery sku() {\n startField(\"sku\");\n\n return this;\n }", "java.lang.String getCouponVendor();", "public String getProductNumber() {\n\t\treturn productNumber;\n\t}", "public java.lang.String getProductName () {\r\n\t\treturn productName;\r\n\t}", "public byte getIProduct() {\r\n\t\treturn iProduct;\r\n\t}", "int getProductKey();", "public ST getProductServiceCodeDescription() { \r\n\t\tST retVal = this.getTypedField(9, 0);\r\n\t\treturn retVal;\r\n }", "String getTheirProductId();", "public String getProduct() {\n\t\treturn stockSymbol;\n\t}", "public StringBuffer getSkuDetail() {\n List<CheckoutCommerceItemBean> commerceItems;\n productsInfo.append(\"\");\n if (null != reviewOrderBean) {\n if (null != reviewOrderBean.getComponent()) {\n if (null != reviewOrderBean.getComponent()\n .getPaymentDetails()) {\n if (null != reviewOrderBean.getComponent()\n .getPaymentDetails().getCommerceItems()) {\n commerceItems = reviewOrderBean.getComponent()\n .getPaymentDetails().getCommerceItems();\n for (int i = 0; i < commerceItems.size(); i++) {\n\n productsInfo.append(commerceItems.get(i)\n .getCatalogRefId());\n productsInfo.append(\";\");\n /* sku quantity\n productsInfo.append(commerceItems.get(i)\n .getQuantity());\n productsInfo.append(\";\");*/\n productsInfo.append(String.format(\n \"%.2f\", Double.valueOf(commerceItems.get(i)\n .getAmount())));\n if (i != commerceItems.size() - 1) //avoid adding \"|\" at last product\n productsInfo.append(\"|\");\n\n }\n\n\n }\n }\n }\n }\n return productsInfo;\n }", "public String getProductNo() {\n\t\treturn productNo;\n\t}", "public String getProductName() {\r\n return productName;\r\n }", "public String getProductName() {\n return productName;\n }", "public String getProductName() {\n return productName;\n }", "public String getProductName() {\n return productName;\n }", "public org.mrk.grpc.catalog.Product getProduct() {\n return product_ == null ? org.mrk.grpc.catalog.Product.getDefaultInstance() : product_;\n }", "@Override\n\tpublic String getBarcode() {\n\t\treturn product.getBarcode();\n\t}", "public java.lang.String getProductName() {\n return productName;\n }", "public String getProductID() {\r\n return productID;\r\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public entity.APDProduct getProduct();", "public String getCodProd() {\n return this.codProd;\n }", "public String getProductName() {\r\n\t\treturn productName;\r\n\t}", "public String getXpeProductUom() {\n return (String) getAttributeInternal(XPEPRODUCTUOM);\n }", "public String getProductClass() {\n return (String)getAttributeInternal(PRODUCTCLASS);\n }", "public String getProductName() {\n\t\treturn productName;\n\t}", "private String m50417p() {\n String cardType = this.f30729a0.getCardType();\n String str = C10527a.f28544e;\n if (cardType.equalsIgnoreCase(str)) {\n return str;\n }\n if (cardType.equalsIgnoreCase(\"MASTERCARD\")) {\n return \"MASTER\";\n }\n String str2 = \"MADA\";\n return cardType.equalsIgnoreCase(str2) ? str2 : \"UNKNOWN\";\n }", "public java.lang.String getCouponVendor() {\n java.lang.Object ref = couponVendor_;\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 couponVendor_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String toString() {\n return \"\" + this.prodCode;\n }", "public String getProductReference() {\n return productReference;\n }", "String productKind();", "String currentProduct() {\n if (PageFlowContext.getPolicy() != null && PageFlowContext.getPolicy().getProductTypeId() != null) {\n return PageFlowContext.getPolicy().getProductTypeId();\n } else {\n return \"\";\n }\n }", "public java.lang.String getCouponVendor() {\n java.lang.Object ref = couponVendor_;\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 couponVendor_ = s;\n return s;\n }\n }", "public String getProductno() {\n return productno;\n }", "public String getKind_of_product() {\r\n return kind_of_product;\r\n }", "@ApiModelProperty(value = \"A text value for sku.\")\n public String getSku() {\n return sku;\n }", "public String getProductDescription() {\r\n/* 221 */ return this._productDescription;\r\n/* */ }", "String getProductId();", "java.lang.String getProductDescription();", "public String getDatabaseProduct();", "@Override\n\tpublic String getName() {\n\t\treturn product.getName();\n\t}", "public String getSupEntPlicense() {\n return supEntPlicense;\n }", "public ST getPsl9_ProductServiceCodeDescription() { \r\n\t\tST retVal = this.getTypedField(9, 0);\r\n\t\treturn retVal;\r\n }", "public String getProductTypeName() {\r\n return productTypeName;\r\n }", "public String getProductToCompare() {\n return mProductToCompare;\n }", "public String getName(){\n\t\treturn Name; // Return the product's name\n\t}", "public String getSumShopCode() {\n return sumShopCode;\n }", "public String getSuit()\n {\n\t// Local constants\n\n\t// Local variables\n\n\t/************** Start getSuit Method *****************/\n\n\t// Return suit of card\n return suit;\n\n }", "public String getProduct_id() {\n return product_id;\n }", "public String getProduct_id() {\n return product_id;\n }", "public Number getPromoProdukId() {\n return (Number)getAttributeInternal(PROMOPRODUKID);\n }", "public String getProductType() {\n\t\treturn productType;\n\t}", "public String getUnifieddealcode() {\n return unifieddealcode;\n }", "public ST getPsl18_ProductServiceClarificationCodeValue() { \r\n\t\tST retVal = this.getTypedField(18, 0);\r\n\t\treturn retVal;\r\n }", "public String getProductid() {\n return productid;\n }", "public java.lang.String getPurposeCode() {\n\t\treturn _tempNoTiceShipMessage.getPurposeCode();\n\t}", "public String getProdDetailsName(){\n String prodName = productDetailsName.toString();\n return prodName;\n }", "public CimString getProductUrl() {\n return productUrl;\n }", "public final Class getProductClass() {\n\treturn productClass;\n }", "public String getAssortProd() {\n return (String)getAttributeInternal(ASSORTPROD);\n }", "public String getCardSuit() {\n return Csuit;\n }", "public Product getProduct() {\n\t\treturn product;\n\t}" ]
[ "0.7725098", "0.73588824", "0.7125679", "0.7095784", "0.7095784", "0.7001647", "0.69220465", "0.6877165", "0.6851362", "0.6835151", "0.6832876", "0.68184036", "0.6798225", "0.6773854", "0.674382", "0.6702387", "0.668322", "0.66728264", "0.6626036", "0.6539205", "0.6539205", "0.6453715", "0.6441745", "0.64416575", "0.6409239", "0.63657904", "0.6365152", "0.6330517", "0.6330517", "0.62838024", "0.62805206", "0.6277329", "0.6257122", "0.6256644", "0.62179583", "0.6192594", "0.6171345", "0.6155217", "0.61330533", "0.61323655", "0.6131603", "0.61190474", "0.61118215", "0.6110968", "0.6103557", "0.610148", "0.609559", "0.60871106", "0.60775757", "0.6073881", "0.6070171", "0.6057088", "0.6057088", "0.6057088", "0.6050456", "0.60449666", "0.6040126", "0.6034303", "0.60313404", "0.6012099", "0.600056", "0.5979618", "0.5979361", "0.59638244", "0.59501934", "0.59393686", "0.5913806", "0.5901908", "0.58840644", "0.5874078", "0.5861703", "0.5848045", "0.584198", "0.5832404", "0.58252317", "0.58065456", "0.58025575", "0.57952744", "0.5794445", "0.57905775", "0.5782346", "0.57799494", "0.5773648", "0.5762589", "0.57610434", "0.5754575", "0.57473755", "0.57473755", "0.57407373", "0.57324314", "0.5727513", "0.57185864", "0.56896675", "0.5680441", "0.56727797", "0.5668353", "0.56614643", "0.5657705", "0.5653695", "0.5650159" ]
0.6876752
8
The amount of the gift card, which is the amount of the charge to the gifter account and the amount of credit that is applied to the recipient account upon successful redemption.
public BigDecimal getUnitAmount() { return this.unitAmount; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Long getGiftamount() {\n return giftamount;\n }", "public String getReceiverChargesAmount() {\r\n\t\treturn receiverChargesAmount;\r\n\t}", "public java.math.BigDecimal getCardMoney() {\r\n return localCardMoney;\r\n }", "public BigDecimal getGiftAccount() {\r\n return giftAccount;\r\n }", "public String getAmountCredited() {\n\t\twaitForControl(driver, LiveGuru99.WithdrawallPage.GET_AMOUNT_DEPOSIT, timeWait);\n\t\tString amount = getText(driver, LiveGuru99.WithdrawallPage.GET_AMOUNT_DEPOSIT);\n\t\treturn amount;\n\t}", "public Integer collectAmountAndGiveItToMe() {\n\t\t\n\t\t//void will not return anything\n\t\tSystem.out.println(\"Daddy collected rupee is\" + collectedAmount+\" and Sent it to you\");\n\t\treturn collectedAmount;\n\t\t\n\t}", "public int getAmount() {\n return amount_;\n }", "public BigDecimal getCHARGE_AMOUNT() {\r\n return CHARGE_AMOUNT;\r\n }", "public BigDecimal getAmount() \r\n {\t\r\n \treturn amount;\t\r\n }", "public int amount() {\n return amount;\n }", "public static int getAmount() {\n\t\treturn amount;\n\t}", "public int getAmount() {\n return amount_;\n }", "public static void extract_money(){\n TOTALCMONEY = TOTALCMONEY - BALANCERETRIEVE; //the total cashier money equals the total cashier money minus the retrieve request\r\n BALANCE = BALANCE - BALANCERETRIEVE; //the user balance equals the account minus the retrieve request\r\n }", "public long getAmount() {\r\n return amount;\r\n }", "public double getAmount () {\r\n\t\treturn amount;\r\n\t}", "public BigDecimal getRewardMoney() {\r\n return rewardMoney;\r\n }", "public double getAmount() {\r\n\t\treturn amount;\r\n\t}", "public double getAmount() {\r\n\t\treturn amount;\r\n\t}", "public String getAmount() {\n return amount;\n }", "public String getAmount() {\n return amount;\n }", "public double calculateAdditionalCharge() {\n return 5.0;\n }", "public float getAmount() {\n System.out.println(\"Account Balance:\" + amount);\n return amount;\n }", "public long getAmount() {\n\t\treturn amount;\n\t}", "public BigDecimal getRechargeMoney() {\n return rechargeMoney;\n }", "public long getAmount() {\n return amount;\n }", "@Override\n\tpublic long getAmount() {\n\t\treturn amount;\n\t}", "public BigDecimal getAmount() {\r\n return amount;\r\n }", "public Float getAmount() {\n\t\treturn amount;\n\t}", "public String getAmount() {\r\n return this.amount;\r\n }", "public double getAmount() {\n return amount;\n }", "public double getAmount() {\n\t\treturn amount;\n\t}", "public double getAmount() {\n\t\treturn amount;\n\t}", "public double getAmount() {\n\t\treturn amount;\n\t}", "public int getJackpot(){ return amount; }", "public String getAmount() {\n\t\treturn amount;\n\t}", "public int getAmount() {\n return amount;\n }", "public int getAmount() {\n return amount;\n }", "public int getAmount() {\n return amount;\n }", "public java.math.BigDecimal getReceiveAmount() {\r\n return receiveAmount;\r\n }", "@Override\n public String pay(int amount) {\n return (amount +\" paid with credit/debit card.\");\n }", "public BigDecimal getAmount()\n {\n return amount;\n }", "public java.math.BigDecimal getAmount () {\r\n\t\treturn amount;\r\n\t}", "public BigDecimal getCredit() {\n return credit;\n }", "public double getAmount() {\n return amount;\n }", "public double getAmount() {\n return amount;\n }", "public double getAmount() {\n return amount;\n }", "public double getAmount() {\n return amount;\n }", "public double getAmount() {\n return amount;\n }", "public double getAmount() {\n return amount;\n }", "public double getAmount() {\n return amount;\n }", "public int getAmount() {\n\t\treturn amount;\n\t}", "@java.lang.Override\n public long getAmount() {\n return amount_;\n }", "public BigDecimal getAmount() {\n return this.amount;\n }", "public BigDecimal getAmount() {\n return amount;\n }", "public BigDecimal getAmount() {\n return amount;\n }", "public BigDecimal getAmount() {\n return amount;\n }", "public BigDecimal getAmount() {\n return amount;\n }", "public BigDecimal getAmount() {\n return amount;\n }", "public BigDecimal getAmount() {\n return amount;\n }", "public BigDecimal getAmount() {\n return amount;\n }", "public BigDecimal getAmount() {\n return amount;\n }", "public Integer getAmount() {\n return amount;\n }", "public Integer getAmount() {\n return amount;\n }", "public Integer getAmount() {\n return amount;\n }", "public double getAmount() \r\n {\r\n assert(true);\r\n return amount;\r\n }", "public Double getAmount() {\r\n return amount;\r\n }", "public BigDecimal getAmount() {\n return this.amount;\n }", "public MMDecimal getGrossAmount() {\r\n if (this.grossAmount == null) {\r\n return getSubTotalAmount();\r\n }\r\n return this.grossAmount;\r\n }", "float getAmount();", "public java.math.BigDecimal getAmount() {\n return amount;\n }", "public double getAmount() {\n return this.amount;\n }", "public double getAmount() { return amount; }", "public BigDecimal getDeductibleAmt() {\n\t\treturn deductibleAmt;\n\t}", "public BigDecimal getCV_AMOUNT() {\r\n return CV_AMOUNT;\r\n }", "public float getPayableAmount() {\n /**\n * { var_description }.\n */\n float dscnt = NUM3 * coupon;\n /**\n * { item_description }.\n */\n return (getTotalAmount() * (1f - dscnt)) * NUM5;\n }", "public String getAmountString() {\n return amount + \"\";\n }", "public String getCurrentAmount() {\n\t\twaitForControl(driver, LiveGuru99.WithdrawallPage.GET_CURRENT_AMOUNT, timeWait);\n\t\tString currentAmount = getText(driver, LiveGuru99.WithdrawallPage.GET_CURRENT_AMOUNT);\n\t\treturn currentAmount;\n\t}", "public int getAmount() {\r\n\t\treturn Amount;\r\n\t}", "public int getAmount()\n\t{\n\t\treturn this.amount;\n\t}", "public java.math.BigDecimal getGrnAmount () {\n\t\treturn grnAmount;\n\t}", "public void getCredit(){\n System.out.println(\"Total Credit: \" +\"£\" + getUserMoney());\n }", "int getAmount();", "public BigDecimal getAMOUNT() {\r\n return AMOUNT;\r\n }", "public String getAmountDescription() {\r\n return amountDescription;\r\n }", "public double getCardNumber() {\n\t\treturn cardNumber;\n\t}", "public BigDecimal getFC_AMOUNT() {\r\n return FC_AMOUNT;\r\n }", "public Integer getRefundMoney() {\n return refundMoney;\n }", "public io.lightcone.data.types.Amount getAmount() {\n if (amountBuilder_ == null) {\n return amount_ == null ? io.lightcone.data.types.Amount.getDefaultInstance() : amount_;\n } else {\n return amountBuilder_.getMessage();\n }\n }", "long getAmount();", "public String getRequisitionTotalAmount() {\r\n return requisitionTotalAmount;\r\n }", "public double getRemainingCost(FieldContext fieldContext) {\n\t\treturn 0;\n\t}", "public CP getProductServiceGrossAmount() { \r\n\t\tCP retVal = this.getTypedField(15, 0);\r\n\t\treturn retVal;\r\n }", "public double getGrt() {\n\t\treturn _tempNoTiceShipMessage.getGrt();\n\t}", "public void credit(float amount){\n\t\taccount.credit(amount);\n\t\tSystem.out.println(\"\\t+ \"+ this + \" account is credited with \" + amount + \" euros; its balance is now \" + account );\n\t}", "public double getAmount() {\r\n\t\treturn investmentAmount;\r\n\t}", "public int getCredit() {\n return this.credit;\n }", "public java.math.BigDecimal getOriginalSendAmount() {\r\n return originalSendAmount;\r\n }", "public double getCEMENTAmount();", "public double getAmount()\n {\n return m_Amount;\n }", "public String getRebillAmount()\n\t{\n\t\tif(response.containsKey(\"reb_amount\")) {\n\t\t\treturn response.get(\"reb_amount\");\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "public String getAmount() {\n\n return amount.getText();\n }" ]
[ "0.6853903", "0.66307795", "0.66256845", "0.65438086", "0.6521742", "0.63082594", "0.6273664", "0.6241563", "0.62277937", "0.6222703", "0.6192106", "0.6191532", "0.6181097", "0.6096209", "0.60929585", "0.60763454", "0.6071411", "0.6071411", "0.60698044", "0.60698044", "0.60670453", "0.6066111", "0.6064932", "0.606419", "0.60435843", "0.60404104", "0.6039704", "0.60358286", "0.60270345", "0.6016661", "0.60159", "0.60159", "0.60159", "0.60154366", "0.60089374", "0.6007893", "0.6007893", "0.6007893", "0.600373", "0.60019284", "0.59955466", "0.5994832", "0.5992851", "0.59883654", "0.59883654", "0.59883654", "0.59883654", "0.59883654", "0.59883654", "0.59883654", "0.5987596", "0.5977848", "0.59747434", "0.59740937", "0.59740937", "0.59740937", "0.59740937", "0.59740937", "0.59740937", "0.59740937", "0.59740937", "0.5967417", "0.5967417", "0.5967417", "0.595905", "0.59567404", "0.59566236", "0.5952868", "0.5944346", "0.59280336", "0.5927256", "0.5917226", "0.5905949", "0.5905184", "0.5904395", "0.5897579", "0.5882786", "0.58725107", "0.5866142", "0.5851103", "0.5850501", "0.58471596", "0.5840737", "0.583534", "0.5834735", "0.5822891", "0.5821746", "0.581766", "0.5817168", "0.5812306", "0.58087265", "0.5805762", "0.57907045", "0.57871604", "0.5786311", "0.5784575", "0.5779643", "0.57754827", "0.5771721", "0.5770587", "0.57677126" ]
0.0
-1
throw new UnsupportedOperationException("Not yet implemented"); Log.d(TAG, "onReceive() called. "); Intent pollservice = PollService.newIntent(context); context.startService(pollservice); Toast.makeText(context, "Boot_Completed", Toast.LENGTH_SHORT).show();
@Override public void onReceive(Context context, Intent intent) { boolean isAlarmOn = Utils.isAlarmOn(); PollService.setServiceAlarm(MyApplication.getContext(), isAlarmOn); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onReceive(Context context, Intent intent) {\n Log.i(\"--All\", \"Boot Wakeful\");\n Toast.makeText(context, \"Boot Wakeful\", Toast.LENGTH_LONG).show();\n Intent startServiceIntent = new Intent(context, LaunchedService.class);\n startWakefulService(context, startServiceIntent);\n\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n am = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n // setOneTimeAlarm();\n System.out.println(\"inside boot complete\");\n setRepeatingAlarm(context);\n //throw new UnsupportedOperationException(\"Not yet implemented\");\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n String action = intent.getAction();\n //开机启动\n if(action.equals(\"android.intent.action.BOOT_COMPLETED\")){\n// Intent intent0 = context.getPackageManager().getLaunchIntentForPackage(context.getPackageName());\n// intent0.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n// context.startActivity(intent0);\n Intent intent1 = new Intent(context ,ScanService.class);\n // 启动指定Server\n context.startService(intent1);\n }\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n Intent intent1 = new Intent(context, CoreService.class);\n context.startService(intent1);\n Log.d(TAG, \"broadcast receive\");\n throw new UnsupportedOperationException(\"Not yet implemented\");\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n context.startService(new Intent(context, OnBootUpAlarmScheduler.class));\n }", "@Override\n public void onReceive(Context context, Intent intent){\n Intent service = new Intent(context, PassiveScheduler.class);\n //service.setAction(FileTransferService.ACTION_PASSIVE);\n startWakefulService(context,service);\n //Log.d(WiFiDirectActivity.TAG, \"Wakefulservice done\");\n }", "@Override\r\n\tpublic void onReceive(Context context, Intent intent) {\r\n\t\tLog.i(TAG, \"onReceive - \"+ intent.getAction());\r\n\t\tString action = intent.getAction();\r\n\t\t//PowerManager pm = (PowerManager) context.getSystemService(Context.POWER_SERVICE);\r\n\t\t//wakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, TAG);\r\n\t\t//wakeLock.setReferenceCounted(false);\r\n\t\t\r\n\t\t//Log.i(TAG, \"isHeld = \"+ wakeLock.isHeld());\r\n\t\t\r\n\t\tif (action.equals(ACTION_BLUETOOTHSCAN)){\r\n\t\t\tcontext.startService(new Intent(context, BluetoothService.class));\r\n\t\t\tif(BluetoothService.wakeLock == null){\r\n\t\t\t\tPowerManager powerManager = (PowerManager) context.getSystemService(Context.POWER_SERVICE);\r\n\t\t\t\tBluetoothService.wakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, BluetoothService.TAG);\r\n\t\t\t}\r\n\t\t\tif(!BluetoothService.wakeLock.isHeld()) BluetoothService.wakeLock.acquire(12000);\r\n\t\t} else if (action.equals(Intent.ACTION_BOOT_COMPLETED)){\r\n\t\t\tif (Settings.getBackgroundRun(context)){\r\n\t\t\t\tSettings.startBluetoothScanAlarmManager(context);\r\n\t\t\t\tSettings.startServerUploadAlarmManager(context);\r\n\t\t\t}\r\n\t\t} else if (action.equals(ACTION_SERVERUPLOAD)) {\r\n\t\t\tcontext.startService(new Intent(context, ServerService.class));\r\n\t\t\tif(ServerService.wakeLock == null){\r\n\t\t\t\tPowerManager powerManager = (PowerManager) context.getSystemService(Context.POWER_SERVICE);\r\n\t\t\t\tServerService.wakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, ServerService.TAG);\r\n\t\t\t}\r\n\t\t\tif(!ServerService.wakeLock.isHeld()) ServerService.wakeLock.acquire(20000);\r\n\t\t} else {\r\n\t\t\tLog.e(TAG, \"Unkown action: \"+ action);\r\n\t\t}\t\t\r\n\t}", "@Override\n public void onReceive(Context context, Intent intent) {\n Log.i(\"Broadcast Listened\", \"Service tried to stop\");\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n context.startForegroundService(new Intent(context, LocationService.class));\n } else {\n context.startService(new Intent(context, LocationService.class));\n }\n\n }", "@Override\r\n\tpublic void run() {\n\t\tIntent intent = new Intent(\"android.intent.action.BOOT_COMPLETED\"); \r\n\t\tresolveInfo = context.getPackageManager().queryBroadcastReceivers(intent, 0);\r\n\t}", "@Override\n\tpublic void onReceive(Context arg0, Intent arg1) {\n\t\tif(arg1==null || arg1.getAction()==null)\n\t\t\treturn;\n\t\tif (arg1.getAction().equals(Intent.ACTION_BOOT_COMPLETED)) {\n\t\t\tIntent startIntent = new Intent();\n\t\t\tstartIntent.setClass(arg0, MointorServices.class);\n\t\t\targ0.startService(startIntent);\n\t\t}\n\t}", "@Override\n public void onReceive(Context context, Intent intent) {\n Log.i(\"TAG\", \"someone called me 3\");\n\n // Explicitly specify that GcmIntentService will handle the intent.\n ComponentName comp = new ComponentName(context.getPackageName(), GcmIntentService.class.getName());\n // Start the service, keeping the device awake while it is launching.\n Log.i(\"TAG\", \"someone called me 4\");\n startWakefulService(context, (intent.setComponent(comp)));\n setResultCode(Activity.RESULT_OK);\n Log.i(\"TAG\", \"someone called me 5\");\n\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n context.startService(new Intent(context, MyService.class));\n }", "@Override\n\tpublic void onReceive(Context context, Intent intent) {\n\t\tsuper.onReceive(context, intent);\n\t\t//no matter what user does, boot the service\n\t\tIntent intentt = new Intent(context, UpdateWidgetService.class);\n\t\tcontext.startService(intentt);\n\t}", "@Override\n\tpublic void onReceive(final Context context, final Intent intent) {\n\t\t isService= AppData.getBool(AppData.service,context);\n\t\tLog.e(TAG,\"\"+isService);\n\t\tthis.context=context;\n\t\tLog.e(TAG, \"start sevicek\"+isService+\" \"+intent.getAction());\n\t\t//isIncomming=true;\n\t\tif(!isService)\n\t\t\treturn;\n\n\t\t String blockingMode=\"\";\n\t\tTelephonyManager telephony = (TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE);\n\t\ttelephony.listen(new PhoneStateListener(){\n\t\t\t@Override\n\t\t\tpublic void onCallStateChanged(int state, String incomingNumber) {\n\t\t\t\tsuper.onCallStateChanged(state, incomingNumber);\n\t\t\t\tSystem.out.println(\"incomingNumber1 : \"+incomingNumber);\n\n//\t\t\t\tif(!Validation.isServiceRunning(context,RecordingService.class))\n//\t\t\t\t{\n//\t\t\t\t\tLog.e(TAG, \"start sevicek\");\n//\t\t\t\t\tIntent in = new Intent(context, RecordingService.class);\n//\t\t\t\t\tcontext.startService(in);\n//\t\t\t\t}\n\t\t\t\tif(incomingNumber!=null&&incomingNumber.length()>0)\n\t\t\t\tPhoneMunber=incomingNumber;\n\t\t\t\tLog.e(\"incomingNumber1\",state+intent.getAction()+ GetCurrentDateTime()+\" \"+incomingNumber);\n\n\t\t\t\tif(lastState == state)\n\t\t\t\t\treturn;\n\n\t\t\t\tswitch (state) {\n\t\t\t\t\tcase TelephonyManager.CALL_STATE_RINGING:\n\t\t\t\t\t\tisIncomming = true;\n\t\t\t\t\t\tin = new Intent(context, RecordingService.class);\n\t\t\t\t\t\tif(!Validation.isServiceRunning(context,RecordingService.class))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tLog.e(TAG, \"start sevicek\");\n\t\t\t\t\t\t\tcontext.stopService(in);\n\t\t\t\t\t\t\tcontext.startService(in);\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\tLog.e(TAG, \"start sevice after stop\");\n\t\t\t\t\t\t\tcontext.stopService(in);\n\t\t\t\t\t\t\tcontext.startService(in);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase TelephonyManager.CALL_STATE_OFFHOOK:\n\t\t\t\t\t\t//Transition of ringing->offhook are pickups of incoming calls. Nothing done on them\n\t\t\t\t\t\tif(lastState != TelephonyManager.CALL_STATE_RINGING){\n\t\t\t\t\t\t\tisIncomming = false;\n\t\t\t\t\t\t\tin = new Intent(context, RecordingService.class);\n\t\t\t\t\t\t\tif(!Validation.isServiceRunning(context,RecordingService.class))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tLog.e(TAG, \"start sevicek\");\n\t\t\t\t\t\t\t\tcontext.stopService(in);\n\t\t\t\t\t\t\t\tcontext.startService(in);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tLog.e(TAG, \"start sevice after stop\");\n\t\t\t\t\t\t\t\tcontext.stopService(in);\n\t\t\t\t\t\t\t\tcontext.startService(in);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase TelephonyManager.CALL_STATE_IDLE:\n\t\t\t\t\t\t//Went to idle- this is the end of a call. What type depends on previous state(s)\n\t\t\t\t\t\tif(lastState == TelephonyManager.CALL_STATE_RINGING){\n\t\t\t\t\t\t\t//Ring but no pickup- a miss\n\t\t\t\t\t\t\tcontext.stopService(in);\n\n\t\t\t\t\t\t\tLog.e(\"onMissedCall\",\"call\");\n\t\t\t\t\t\t\t//onMissedCall(context, savedNumber, callStartTime);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(isIncomming){\n\t\t\t\t\t\t\tLog.e(\"onMissedCall\",\"call\");\n\t\t\t\t\t\t\tEndTime=\tGetCurrentDateTime();\n\t\t\t\t\t\t\tLog.e(TAG, GetCurrentDateTime()+\" \"+lastState+\" \"+\"IDLE\"+isIncomming);\n\n\t\t\t\t\t\t\tCallType=\"Incomming\";\n\n\t\t\t\t\t\t\tSetDutyTime();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tEndTime=\tGetCurrentDateTime();\n\t\t\t\t\t\t\tCallType=\"Outgoing\";\n\t\t\t\t\t\t\tLog.e(TAG, GetCurrentDateTime()+\" \"+lastState+\" \"+\"IDLE\"+isIncomming);\n\n\t\t\t\t\t\t\tSetDutyTime();\n\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tlastState = state;\n\n\n\t\t\t}\n\t\t},PhoneStateListener.LISTEN_CALL_STATE);\n\n\t\t {\n\t\t\t Bundle b = intent.getExtras();\n\n\t\t\t String outGoingNumber = b.getString(Intent.EXTRA_PHONE_NUMBER);\n\t\t\t outGoingNumber=getContactDisplayNameByNumber(outGoingNumber, context);\n\t\t\t Log.e(\"outGoingNumber33\",\"\"+outGoingNumber);\n\t\t\t if(outGoingNumber!=null&&outGoingNumber.length()>0)\n\t\t\t\t PhoneMunber=outGoingNumber;\n\t\t\t //blockCall(context, b);\n\n\t\t }\n\n\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n boolean running = false;\n ActivityManager manager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);\n for (ActivityManager.RunningServiceInfo service : manager.getRunningServices(Integer.MAX_VALUE)) {\n if (MyService.class.getName().equals(service.service.getClassName())) {\n running = true;\n break;\n }\n }\n if (!running) {\n Intent intentService = new Intent(context, MyService.class);\n context.startService(intentService);\n }\n //Intent myIntent1=new Intent(context,NotificationContent.class);\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n ComponentName comp = new ComponentName(context.getPackageName(), GCMIntentService.class.getName());\n startWakefulService(context, (intent.setComponent(comp)));\n }", "@Override\n\tpublic void onReceive(Context arg0, Intent arg1) {\n\t\tIntent tIntent = new Intent(arg0,WifiTimerService.class); \n //启动指定Service \n\t\targ0.startService(tIntent); \n\t}", "@Override\n\tpublic void onReceive(Context arg0, Intent arg1) {\n\t\t\n\t\tIntent intent = new Intent(arg0,AutoUpdateService.class);\n\t\targ0.startService(intent);\n\t}", "@Override\n public int onStartCommand(Intent intent, int flags, int startId) {\n\n sleepTime = intent.getIntExtra(KEY_SLEEP_TIME,60000);\n\n if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.O){\n NotificationChannel notificationChannel = new NotificationChannel(Service_Channel,\n \"NotificationService\", NotificationManager.IMPORTANCE_LOW);\n NotificationManager notificationManager = (NotificationManager) getSystemService(\n Context.NOTIFICATION_SERVICE);\n notificationManager.createNotificationChannel(notificationChannel);\n }\n\n Notification notification = new NotificationCompat.Builder(this, Service_Channel)\n .setContentTitle(\"Notification Service information\")\n .setContentText(\"Country: \")\n .build();\n startForeground(Notification_Id, notification);\n\n\n CallApi();\n return START_STICKY;\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n AlarmReceiver alarmReceiver = new AlarmReceiver();\n alarmReceiver.setMidnightAlarmManager(context.getApplicationContext());\n\n // Battery Sensor\n context.startService(new Intent(context, BatterySensor.class));\n\n // AmbientLight Service\n if (FeatureCheck.hasLightFeature(context)) {\n AlarmManager scheduler = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n Intent lightSensorIntent = new Intent(context.getApplicationContext(), LightSensor.class);\n PendingIntent scheduledIntent = PendingIntent.getService(context.getApplicationContext(), 0, lightSensorIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n scheduler.cancel(scheduledIntent);\n scheduler.setInexactRepeating(AlarmManager.RTC_WAKEUP, System.currentTimeMillis(), Setting.LIGHT_SENSOR_INTERVAL, scheduledIntent);\n }\n }", "@Override\n\tpublic void onReceive(Context context, Intent intent) {\n\t\tString action = intent.getAction();\n\t\tif (Intent.ACTION_BOOT_COMPLETED.equals(action)) {\n\t\t\t//\n\t\t\tIntent intent2 = new Intent();\n\t\t\tintent2.setClass(context, TrafficService.class);\n\t\t\tcontext.startService(intent2);\n\t\t}\n\t}", "@Override\n public void onReceive(Context context, Intent intent) {\n Intent ringtoneIntent = new Intent(context, AlarmService.class);\n\n //1. get EXTRA VALUE from \"alarm_intent\"\n String AlarmStatus = intent.getExtras().getString(EXTRA);\n Remind chosenRemind = (Remind) intent.getExtras().get(NEW_REMIND);\n\n Log.d(\"SAMN\", \"test: Alarm Status:: \" + AlarmStatus);\n\n if(AlarmStatus.equals(ALARM_OFF)){\n /*set up Diable receiver*/\n //to \"enable the receiver\": override the manifest\n ComponentName receiver = new ComponentName(context, AlarmReceiver.class);\n PackageManager pm = context.getPackageManager();\n ///--- ///\n\n pm.setComponentEnabledSetting(receiver,\n PackageManager.COMPONENT_ENABLED_STATE_DISABLED,\n PackageManager.DONT_KILL_APP);\n\n Log.d(\"COMPONENT SETTING: \", String.valueOf(pm.getComponentEnabledSetting(receiver)));\n }\n /*else {\n Intent alarmIntent = new Intent(context, AlarmActivity.class);\n alarmIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n context.startActivity(alarmIntent);\n }*/\n\n // 2. pass it to ringtoneIntent to send to RingtonePlayingService\n ringtoneIntent.putExtra(EXTRA, AlarmStatus);\n ringtoneIntent.putExtra(NEW_REMIND, chosenRemind);\n\n //start service ringtone\n context.startService(ringtoneIntent);\n //explain: ringtoneIntent will be sent to RingtonePlayingService => out Extra Value to notice if ALARM IS ON OR OFF?\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n if (intent.getAction().equals(\"android.intent.action.BOOT_COMPLETED\")) {\n // instatiate an alarm scheduler\n AlarmScheduler alarmScheduler = new AlarmScheduler();\n // instantiate the database\n SQLiteHelperAlarm sqLiteHelper = new SQLiteHelperAlarm(context);\n // get all the alarms stored in the database\n List<Alarm> alarms = sqLiteHelper.getAllAlarms();\n // pass each alarm to the alarmScheduler object\n for (Alarm alarm : alarms) {\n alarmScheduler.setAlarm(context, alarm);\n }\n }\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n }", "@Override\n public int onStartCommand(Intent intent, int flags, int startId)\n {\n Intent appIntent = new Intent(this, MainActivity.class);\n appIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);\n appIntent.putExtra(RESTORE_FROM_SERVICE,true);\n PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, appIntent, 0);\n\n //build notification (according to API level)\n Notification.Builder builder = new Notification.Builder(this)\n .setContentTitle(getString(R.string.app_name))\n .setContentText(getString(R.string.app_notification_text))\n .setSmallIcon(android.R.drawable.ic_dialog_info)\n .setOngoing(true)\n .setAutoCancel(false)\n .setContentIntent(pendingIntent)\n .setLights(Color.MAGENTA, 200, 3000);\n Notification notification = null;\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {\n builder.setSubText(getString(R.string.app_notification_subtext));\n notification = builder.build();\n }\n else\n notification = builder.getNotification();\n notification.flags |= Notification.FLAG_NO_CLEAR;\n\n //set foreground\n startForeground(1337, notification);\n\n //attach to application\n MeshApplication.setMeshService(this);\n\n\t\t//set up the mesh broadcast receiver\n\t\tmeshServiceReceiver = new MeshServiceReceiver();\n\t\tIntentFilter intentFilter = new IntentFilter();\n\t\tintentFilter.addAction(WifiManager.SCAN_RESULTS_AVAILABLE_ACTION);\n\t\tregisterReceiver(meshServiceReceiver, intentFilter);\n\n\t\t//set up the battery stats receiver\n\t\tbatteryLevelReceiver = new BatteryLevelReceiver();\n\t\tintentFilter = new IntentFilter(Intent.ACTION_BATTERY_CHANGED);\n\t\tregisterReceiver(batteryLevelReceiver, intentFilter);\n\n //start threads\n networkThread = new NetworkThread(this);\n networkThread.start();\n locationThread = new LocationThread(this);\n locationThread.start();\n updateThread = new UpdateThread(this);\n updateThread.start();\n\n //set ready\n ready = true;\n Logger.i(this, \"Service started OK.\");\n\n //return sticky flag\n return START_STICKY;\n }", "@Override\n public void onStart(Intent intent, int startId) {\n Toast.makeText(this, \" Service Started\", Toast.LENGTH_LONG).show();\n \n }", "public void onReceive(Context context, Intent intent)\n {\n ComponentName componentName = new ComponentName(context, BootService.class);\n JobInfo jInfo = new JobInfo.Builder(1, componentName).setMinimumLatency(1000).build();\n\n JobScheduler jScheduler = (JobScheduler) context.getSystemService(Context.JOB_SCHEDULER_SERVICE);\n jScheduler.schedule(jInfo); //Schedulo il servizio\n\n //Log.i(\"MagazzinoDomestico\", \"Scheduler lanciato\");\n }", "@Override\n\t\tpublic void onReceive(Context context, Intent intent) {\n\t\t\tSystem.out.println(\"instakk\");\n\t\t}", "@Override\r\n\tpublic void onReceive(Context context, Intent intent) {\r\n\t}", "@Override\n public void onReceive(Context context, Intent intent) {\n // TODO Auto-generated method stub\n Log.d(TAG, \"got it\");\n }", "@Override\n public void onStart(Intent intent, int startid) {\n }", "@Override\r\n\tpublic void onReceive(Context context, Intent intent) {\n\t\tmContext = context;\r\n\t\r\n\t\t\r\n\t\tif(intent.getAction().equals(serviceRecieved)){\r\n\t\t\t Toast.makeText(logActivity, \"BroadCasting Recieved\", Toast.LENGTH_LONG).show();\r\n\t\t\tdialogBoxgenerator();\r\n\t\t}\r\n\t\t\r\n\t}", "@Override\n public int onStartCommand(Intent intent, int flags, int startId) {\n fetchListOfAppNames();\n// this.appNames = getListOfAllAppNames();\n this.appNames = getListOfInstalledAppNames();\n registerBroadcastReceiver();\n return START_STICKY;\n }", "@Override\r\n public void onStart(Intent intent, int startId) {\n }", "@Override\n\tpublic void onReceive(Context context, Intent intent) {\n\t\tfinal AlarmManager alarmManager = (AlarmManager) context\n\t\t\t\t.getSystemService(Context.ALARM_SERVICE);\n\n\t\ttry {\n\t\t\tIntent serviceIntent = new Intent(context, AppTrackingService.class);\n\t\t\tPendingIntent ServiceManagementIntent = PendingIntent.getService(\n\t\t\t\t\tcontext, 111111, serviceIntent, 0);\n\t\t\t/* Alarm Manager her bir saniye de çalışacak */\n\t\t\talarmManager.setRepeating(AlarmManager.ELAPSED_REALTIME,\n\t\t\t\t\tSystemClock.elapsedRealtime(), 1000,\n\t\t\t\t\tServiceManagementIntent);\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t}", "@Override\n\tpublic void onReceive(Context arg0, Intent arg1) {\n\n\t}", "@Override\n public void onClick(View v) {\n Log.i(\"ServiceExam\",\"start\");\n Intent i = new Intent(\n getApplicationContext(),\n Example17Sub_LifeCycleService.class\n );\n\n i.putExtra(\"MSG\",\"HELLO\");\n // Start Service\n // 만약 서비스 객체가 메모리에 없으면 생성하고 수행\n // onCreate() -> onStartCommand()\n // 만약 서비스 객체가 이미 존재하고 있으면\n // onStartCommand()\n startService(i);\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n if (intent.getAction().equals(Intent.ACTION_SCREEN_OFF)) {\n// Log.v(\"shake mediator screen off\",\"trying re-registration\");\n // Unregisters the listener and registers it again.\n Log.i(TAG, \"detect the SCREEN_OFF------>\");\n\n// mWakeLock.acquire();// 屏幕熄后,CPU继续运行\n\n// sm.unregisterListener(PedometerService.this);\n//// sm.registerListener(PedometerService.this, sensor,\n//// SensorManager.SENSOR_DELAY_UI);\n// sm.registerListener(PedometerService.this, sensor,\n// SensorManager.SENSOR_DELAY_GAME);\n\n } else if (intent.getAction().equals(stringControl)) {\n\n\n if (isRunning) {\n\n // now is running\n\n boolean getisRunning = intent.getBooleanExtra(stringExtraControl, false);\n\n// change to stop\n\n if (!getisRunning) {\n\n isRunning = false;\n\n cleanData();\n saveDataToDB();\n cleanTotalStep();\n cleanState();\n\n\n }\n\n\n } else {\n\n// not running\n\n boolean getisRunning = intent.getBooleanExtra(stringExtraControl, false);\n\n// change to running\n\n if (getisRunning) {\n\n\n isRunning = true;\n\n cleanTotalStep();\n cleanState();\n\n cleanData();\n\n Calendar calendarNow = TimeUtil.getNowCalendar();\n state.state = calendarNow;\n state.step.setDate(TimeUtil.formatCalendar(calendarNow));\n\n }\n\n\n }\n\n\n Log.i(\"onReceive---->\", \"get button action\" + isRunning + \"\");\n\n }\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n }", "@Override\r\n\tpublic void onReceive(Context arg0, Intent arg1) {\n\t\t\r\n\t}", "public SearchManagerService(Context context) {\n mContext = context;\n mContext.registerReceiver(new BootCompletedReceiver(),\n new IntentFilter(Intent.ACTION_BOOT_COMPLETED));\n mContext.registerReceiver(new UserReceiver(),\n new IntentFilter(Intent.ACTION_USER_REMOVED));\n new MyPackageMonitor().register(context, null, UserHandle.ALL, true);\n }", "@Override\n\t\tpublic void onReceive(Context context, Intent intent) {\n\t\t}", "@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)\n @Override\n public int onStartCommand(Intent intent, int flags, int startId) {\n IntentFilter filter = new IntentFilter(Intent.ACTION_SCREEN_ON);\n filter.addAction(Intent.ACTION_SCREEN_OFF);\n filter.addAction(Intent.ACTION_BATTERY_CHANGED);\n filter.addAction(Intent.ACTION_AIRPLANE_MODE_CHANGED);\n filter.addAction(WifiManager.SUPPLICANT_CONNECTION_CHANGE_ACTION);\n filter.addAction(BluetoothAdapter.ACTION_STATE_CHANGED);\n filter.addAction(SettingsActivity.ACTION_WALLPAPER_CHANGED);\n lockReceiver = new LockReceiver();\n ((LockReceiver) lockReceiver).setDelegate(this);\n registerReceiver(lockReceiver, filter);\n\n // Register the boot receiver\n filter = new IntentFilter(Intent.ACTION_BOOT_COMPLETED);\n filter.addAction(Intent.ACTION_USER_PRESENT);\n filter.addAction(Intent.ACTION_USER_INITIALIZE); // Required API 17 :(\n bootReceiver = new BootReceiver();\n registerReceiver(bootReceiver, filter);\n\n // Register the time receiver\n filter = new IntentFilter(Intent.ACTION_TIME_TICK);\n filter.addAction(Intent.ACTION_TIME_CHANGED);\n filter.addAction(Intent.ACTION_DATE_CHANGED);\n timeReceiver = new TimeReceiver();\n ((TimeReceiver) timeReceiver).setDelegate(this);\n registerReceiver(timeReceiver, filter);\n\n MyPhoneStateListener phoneStateListener = new MyPhoneStateListener();\n TelephonyManager telephonyManager = (TelephonyManager) getSystemService(TELEPHONY_SERVICE);\n// telephonyManager.listen(phoneStateListener, PhoneStateListener.LISTEN_CALL_STATE);\n telephonyManager.listen(phoneStateListener, PhoneStateListener.LISTEN_SIGNAL_STRENGTHS);\n\n startForeground();\n\n // TODO: Should I start the activity here?\n startLockerActivity();\n\n return START_STICKY;\n }", "@Override\n protected void onStop() {\n\n // MOVE to onCreate?\n// startService(new Intent(getApplicationContext(), NotificationService.class));\n super.onStop();\n }", "@Override\n\tpublic void onReceive(Context context, Intent intent) {\n\t\tif (intent.getStringExtra(TelephonyManager.EXTRA_STATE).equals(TelephonyManager.EXTRA_STATE_IDLE))\n\t\t{\n\t\t\t//hang off - return volume\n\t\t\t//System.out.println (\"Idle\");\n\t\t\tIntent intentTo = new Intent();\n\t\t\tintentTo.putExtra(\"event\", \"idle\");\n\t\t\tintentTo.setAction(\"CallActionHappened\");\n\t\t\tcontext.sendBroadcast(intentTo);\n\t\t}\n\t\telse if (intent.getStringExtra(TelephonyManager.EXTRA_STATE).equals(TelephonyManager.EXTRA_STATE_OFFHOOK))\n\t\t{\n\t\t\tIntent intentTo = new Intent();\n\t\t\tintentTo.putExtra(\"event\", \"offhook\");\n\t\t\tintentTo.setAction(\"CallActionHappened\");\n\t\t\tcontext.sendBroadcast(intentTo);\n\t\t\t//hang on - mute\n\t\t\t//System.out.println (\"Offhook\");\n\t\t}\n\t\telse if (intent.getStringExtra(TelephonyManager.EXTRA_STATE).equals(TelephonyManager.EXTRA_STATE_RINGING))\n\t\t{\n\t\t\t//System.out.println (\"Ringing\");\n\t\t}\n\t}", "@Override\n public int onStartCommand(Intent intent, int flags, int startId) {\n Toast.makeText(this, \"Welcome!\", Toast.LENGTH_LONG).show();\n return START_STICKY ;\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n String action = intent.getAction();\n if (MainService.ACTION_SYNFINSH_SPORTS.equals(action)) { // 同步 运动模式数据\n initdata();\n dismissLoadingDialog();\n Toast.makeText(getApplicationContext(), getString(R.string.data_refresh_success), Toast.LENGTH_LONG).show(); // 数据刷新成功\n }\n }", "@Override\n\tpublic void onReceive(Context context, Intent intent) {\n\t\tmyphone = BasicPhone.getInstance(context);\n\t \n\t myphone.login();\n /*Intent startServiceIntent = new Intent(context, MyPhoneActivity.class);\n context.startService(startServiceIntent);*/\n }", "@Override\n public int onStartCommand(Intent intent, int flags, int startId) {\n Toast.makeText(this, R.string.start_location_updates, Toast.LENGTH_SHORT).show();\n Log.d(Constants.SERVICE_STARTED, Constants.SERVICE_STARTED);\n return START_STICKY;\n }", "@Override\n\tpublic void onReceive(Context context, Intent intent) {\n if(intent != null && \"com.mmi.helper.request\".equals(intent.getAction())){\n\t\t\t\tandroid.util.Log.i(\"zuozhuang\",\"come here !!\");\n\t\tString type = intent.getExtras().getString(\"type\");\n\t\tString value = intent.getExtras().getString(\"value\");\n\t\tString pac_flag = intent.getExtras().getString(\"pac_flag\");\n\t\tLog.i(\"dongxiaotang\", \"type: \" + type + \" value: \" + value);\n\t\t\n\t\tIntent fmIntent = new Intent(\"com.wind.factoryautotest.action.FmService\");\n\t\tfmIntent.setPackage(\"com.wind.factoryautotest\");\n\t\t\n\t\tIntent reIntent = new Intent();\n\t\treIntent.setAction(\"com.mmi.helper.response\");\n\t\t\n\t\tswitch(type){\n\t\t\tcase \"led_open\": \n\t\t\t\tnew LEDTest().test(\"11\");\n\t\t\t\tbreak;\n\n\t\t\tcase \"led_shutdown\":\n\t\t\t\tnew LEDTest().test(\"10\");\t\t\t\n\t\t\t\tbreak;\n\n\t\t\tcase \"vibrator_play\":\n\t\t\t\tnew VibratorTest().test(context, true);\n\t\t\t\tbreak;\n\t\t\tcase \"vibrator_stop\":\n\t\t\t\tnew VibratorTest().test(context, false);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t case \"set_pacmmi_result\":\n\t\t\t\tboolean i = false;\n\t\t\t if(value.equals(\"pass\")){\n\t\t\t\t i = PartitionUtils.writeFile(true);\n\t\t\t\t}else if( value.equals(\"fail\")){\n\t\t\t\t\ti = PartitionUtils.writeFile(false);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (!i) reIntent.putExtra(\"result\",\"fail\");\n\t\t\t\tif (i) reIntent.putExtra(\"result\",\"success\");\n\t\t\t\tcontext.sendBroadcast(reIntent);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase \"set_pacflag_result\":\n\n try{\n android.provider.Settings.System.putInt(context.getApplicationContext().getContentResolver(), pac_flag, Integer.parseInt(value));\n\t\t\t\t\treIntent.putExtra(\"result\",\"success\");\n\t\t\t\t\tcontext.sendBroadcast(reIntent);\n }catch(NumberFormatException e){\n\t\t\t\t\treIntent.putExtra(\"result\",\"fail\");\n\t\t\t\t\tcontext.sendBroadcast(reIntent);\n }\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"get_pacflag_result\":\n try{\n String result = android.provider.Settings.System.getInt(context.getApplicationContext().getContentResolver(), pac_flag, 0)==1?\"success\":\"fail\";\n\t\t\t\t\treIntent.putExtra(\"result\",result);\n\t\t\t\t\tcontext.sendBroadcast(reIntent);\n }catch(NumberFormatException e){\n\t\t\t\t\treIntent.putExtra(\"result\",\"fail\");\n\t\t\t\t\tcontext.sendBroadcast(reIntent);\n }\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"get_all_pacflag\":\n String[] items = getRemoteStringArray(\"emode_pac_flag_keys\",context);\n ContentResolver cr = context.getApplicationContext().getContentResolver();\n int ilen = items.length;\n StringBuffer content = new StringBuffer();\n String msn = android.os.SystemProperties.get(\"gsm.serial\", \"\");\n if(msn.indexOf(' ') >= 0){\n msn = msn.substring(0, msn.indexOf(' '));\n }else{\n msn = \"unknown\";\n }\n String version = android.os.SystemProperties.get(\"ro.build.version.incremental\", \"unknown\");\n content.append(\"sn:\" + msn + \",version:\" + version + \",\");\n for(int j = 0; j < ilen; j ++){\n content.append(items[j].substring(15) + \":\" + android.provider.Settings.System.getInt(cr, items[j], 0) + \",\");\n }\n\t\t\t\tString result = content.substring(0, content.length()-1);\n\t\t\t\treIntent.putExtra(\"result\",result);\n\t\t\t context.sendBroadcast(reIntent);\n\t\t\tbreak;\n\t\t\t\t\n\t\t\tdefault:\n break;\n\t\t}\n\t }\n\t}", "@Override\n public void onReceive(Context context, Intent intent) {\n String msg = intent.getStringExtra(\"msg\");\n if(msg.equalsIgnoreCase(\"refresh_main\")){\n refresh();\n Log.v(tag,\"Refresh command from Main service\");\n }\n if(msg.equalsIgnoreCase(\"refresh_check\")){\n Log.v(tag,\"Refresh command from Check service\");\n refresh();\n }\n if(msg.equalsIgnoreCase(\"refresh_processTransaction\")){\n Log.v(tag,\"Refresh command from Transaction Process\");\n refresh();\n }\n }", "@Override\n public void onClick(View v) {\n startService(new Intent(MainActivity.this, MyService.class));\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n Toast.makeText(context, \"Your Task Time Is Over\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public int onStartCommand(Intent intent, int flags, int startId) {\n\n LocalBroadcastManager.getInstance(this).registerReceiver(mMessageReceiver,\n new IntentFilter(\"location-update\"));\n\n Log.d(\"MyWeatherService\", \"started\");\n return START_STICKY;\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n\n\n Log.d(\"alarm\",\"====Broadcast Received=====\");\n if ((intent.getExtras() != null) && intent.getAction()!=null && intent.getAction().equals(\"android.intent.action.BOOT_COMPLETED\")) {\n Log.d(\"alarm\",\"====Notifications scheduled after reboot of Device=====\");\n AlarmManager alarmManager = (AlarmManager) context.getSystemService(ALARM_SERVICE);\n Intent myIntent = new Intent(context.getApplicationContext(), AlaramReceiver.class);\n myIntent.putExtra(\"intentFromAlarmManager\", true);\n mpendingIntent = PendingIntent.getBroadcast(context.getApplicationContext(), 0, myIntent, 0);\n Calendar calendar = Calendar.getInstance();\n calendar.set(Calendar.HOUR_OF_DAY,07);\n calendar.set(Calendar.MINUTE, 00);\n calendar.set(Calendar.SECOND, 00);\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M)\n alarmManager.setExactAndAllowWhileIdle(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), mpendingIntent);\n else\n alarmManager.set(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), mpendingIntent);\n\n Log.d(\"BroadCastReceiver\",\"Intent from Action BOOT Completed\");\n Toast.makeText(context, \"Intent from Action BOOT Completed\", Toast.LENGTH_LONG).show();\n\n }\n\n\n mKeyValueStore = KeyValueStore.getInstance(context.getApplicationContext(), \"QuotesCounter\");\n mKeyValueStoreBitMap = KeyValueStore.getInstance(context.getApplicationContext(), \"Routine\");\n\n\n Intent msgIntent = new Intent(context, DownloadImageService.class);\n if( (intent.getExtras() != null) && (intent.getExtras().get(\"intentFromAlarmManager\") != null)) {\n //Increment the counter\n Log.d(\"BroadCastReceiver\",\"Intent from AlarmManager\");\n if(mKeyValueStore.getInt(\"counter\",0) == 0) {\n mKeyValueStore.putInt(\"counter\", 1);\n mKeyValueStore.putLong(\"timeStamp\", System.currentTimeMillis());\n }\n else if(mKeyValueStore.getInt(\"counter\",0) > 0) {\n mKeyValueStore.putInt(\"counter\", mKeyValueStore.getInt(\"counter\", 0) + 1);\n }\n\n msgIntent.putExtra(\"CacheImageForSecondDay\",\"false\");\n msgIntent.putExtra(\"DailyRoutine\",\"true\");\n msgIntent.putExtra(\"imageUrl\", \"http://motivationpics.s3-ap-southeast-1.amazonaws.com/\" + mKeyValueStore.getInt(\"counter\", 1) + \".jpg\");\n context.startService(msgIntent);\n }else if((intent.getExtras() != null) && intent.getAction()!=null && intent.getAction().equals(\"android.net.conn.CONNECTIVITY_CHANGE\")){\n Log.d(\"BroadCastReceiver\",\"Connectivity change\");\n boolean isServiceEnabled = false;\n ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);\n if (cm != null) {\n NetworkInfo activeNetwork = cm.getActiveNetworkInfo();\n if (activeNetwork != null && activeNetwork.isConnected()) {\n isServiceEnabled = true;\n }\n }\n if(isServiceEnabled) {\n Log.d(\"BroadCastReceiver\", \"Caching the second day Image\");\n if (mKeyValueStoreBitMap.getBoolean(\"NextRoutineCached\", false))\n msgIntent.putExtra(\"CacheImageForSecondDay\", \"true\");\n else\n msgIntent.putExtra(\"CacheImageForSecondDay\", \"false\");\n msgIntent.putExtra(\"DailyRoutine\", \"false\");\n msgIntent.putExtra(\"imageUrl\", \"http://motivationpics.s3-ap-southeast-1.amazonaws.com/\" + (mKeyValueStore.getInt(\"counter\", 1) + 1) + \".jpg\");\n context.startService(msgIntent);\n }\n }\n\n\n\n\n\n }", "public void onCreate() {\n\t\tSystem.out.println(\"This service is called!\");\n\t\tmyBluetoothAdapter= BluetoothAdapter.getDefaultAdapter();\n\t\tmyBluetoothAdapter.enable();\n\t\tSystemClock.sleep(5000);\n\t\tif (myBluetoothAdapter.isEnabled()){\n\t\t\tSystem.out.println(\"BT is enabled...\");\n\t\t\tdiscover = myBluetoothAdapter.startDiscovery();\n\t\t}\n\t\tSystem.out.println(myBluetoothAdapter.getScanMode());\n\t\t\n\t\tSystem.out.println(\"Discovering: \"+myBluetoothAdapter.isDiscovering());\n\t\t//registerReceiver(bReceiver, new IntentFilter(BluetoothDevice.ACTION_FOUND));\n\t\tIntentFilter filter1 = new IntentFilter(BluetoothDevice.ACTION_FOUND);\n\t\tIntentFilter filter2 = new IntentFilter(BluetoothAdapter.ACTION_DISCOVERY_FINISHED);\n\t\tthis.registerReceiver(bReceiver, filter1);\n\t\tthis.registerReceiver(bReceiver, filter2);\n\t\t//registerReceiver(bReceiver, new IntentFilter(BluetoothAdapter.ACTION_DISCOVERY_FINISHED));\n\t}", "@Override\n public void onReceive(Context context, Intent intent) {\n QuoteNotificationService.doAction(context);\n //throw new UnsupportedOperationException(\"Not yet implemented\");\n }", "@Override\n public void onStart(Intent intent, int nStartId)\n {\n if (Config.LOGD)\n {\n Log.d(TAG, \"Wiper Service Started \");\n }\n\n startForeground(1111, new Notification());\n\n mContext = this;\n // Call function to start background thread\n if ( bWiperConfigReadError != true)\n {\n startWiperService();\n }\n else\n {\n Log.e(TAG,\"Cannot start Wiper, wiperconfig read error\");\n }\n }", "@Override\n public void onClick(View arg0) {\n Intent intent = new Intent(Main2Activity.this, com.sha.location.NotifyService.class);\n Main2Activity.this.startService(intent);\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n\n if (intent.getAction() != null && context != null) {\n if (intent.getAction().equalsIgnoreCase(Intent.ACTION_BOOT_COMPLETED)) {\n // Set the alarm here.\n Log.d(TAG, \"onReceive: BOOT_COMPLETED\");\n LocalData localData = new LocalData(context);\n NotificationScheduler.setReminder(context, AlarmReceiver.class, localData.get_hour(), localData.get_min());\n return;\n }\n }\n\n Log.d(TAG, \"onReceive: \");\n String tempMain = PreferenceUtil.getInstance().getStringValue(Constants.TEMP,\"\");\n //Trigger the notification\n NotificationScheduler.showNotification(context, SettingsActivity.class,\n \"WeatherApp\", \"Current Temperature: \"+tempMain);\n\n }", "@Override\r\n public void onReceive(Context context, Intent intent) {\n Toast.makeText(MainActivity.this, \"已挂断电话\", Toast.LENGTH_SHORT).show();\r\n Log.i(\"callShutDown\", \"已挂断电话\");\r\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n\n Log.d(\"We are in the receiver.\", \"YAY!\");\n\n boolean switchToVibrate = intent.getExtras().getBoolean(\"switchToVibrate\");\n\n Intent service_intent = new Intent(context, ProfileChangeService.class);\n service_intent.putExtra(\"switchToVibrate\", switchToVibrate);\n context.startService(service_intent);\n }", "private void serviceStartForeground() {\n\n //Main intent\n Intent intent = new Intent(getApplicationContext(), Main2Activity.class)\n .setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);\n intent.setAction(Intent.ACTION_RUN);\n intent.putExtra(RadioPlayerService.NOTIFY_RADIO_STATION, radioStation);\n\n //Pending intent\n PendingIntent pi = PendingIntent.getActivity(getApplicationContext(), 0,\n intent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n // Intents for action keys\n Intent playIntent = new Intent(this, RadioPlayerService.class);\n playIntent.setAction(RadioPlayerFragment.ACTION_START);\n PendingIntent pplayIntent = PendingIntent.getService(this, 0,\n playIntent, 0);\n\n Intent pauseIntent = new Intent(this, RadioPlayerService.class);\n pauseIntent.setAction(RadioPlayerFragment.ACTION_PAUSE);\n PendingIntent ppauseIntent = PendingIntent.getService(this, 0,\n pauseIntent, 0);\n\n Bitmap large_icon = BitmapFactory.decodeResource(this.getResources(),\n R.drawable.large_icon_bw);\n\n Resources res = this.getResources();\n int height = (int) res.getDimension(android.R.dimen.notification_large_icon_height);\n int width = (int) res.getDimension(android.R.dimen.notification_large_icon_width);\n large_icon = Bitmap.createScaledBitmap(large_icon, width, height, false);\n\n Notification notification = new Notification.Builder(this)\n .setSmallIcon(R.drawable.ic_stat_notification)\n .setLargeIcon(large_icon)\n .setContentTitle(\"BIR Player\")\n .setContentText(\"Playing \" + radioStation.getRadioStationName())\n .setContentIntent(pi)\n .addAction(android.R.drawable.ic_media_play, \"Play\", pplayIntent)\n .addAction(android.R.drawable.ic_media_pause, \"Pause\", ppauseIntent)\n .build();\n\n startForeground(NOTIFICATION_ID, notification);\n isForeground = true;\n }", "@Override\r\n public int onStartCommand(Intent intent, int flags, int startId) {\n Log.i(\"LZH\",\"start Service\");\r\n return Service.START_STICKY;\r\n }", "@Override \n public IBinder onBind(Intent intent) {\n \tToast.makeText(this, \"MyAlarmService.onBind()\", Toast.LENGTH_LONG).show();\n \n \tLog.d(\"this is daya\",\"daya alaram\");\n \treturn null;\n }", "@Override\n protected void onHandleIntent(Intent intent) {\n Log.i(\"BackgroundIntentService\", \"Service running\");\n // NotificationCompat Builder takes care of backwards compatibility and\n // provides clean API to create rich notifications\n// NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(this)\n// .setSmallIcon(android.R.drawable.ic_dialog_info)\n// .setContentTitle(\"Check service intent\")\n// .setContentText(\"Date: \" + Calendar.getInstance().getTime());\n//\n// // Obtain NotificationManager system service in order to show the notification\n// NotificationManager notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n// notificationManager.notify(notificationId, mBuilder.build());\n myDevice = new MyDevice(this.context,activity);\n //localOnlyHotSpotManager = new LocalOnlyHotSpotManager(getApplicationContext());\n //hotSpot = new HotSpot(getApplicationContext());\n\n // BackgroundHandler backgroundHandler = new BackgroundHandler(this.context,activity,20000,myDevice.getAppUUID());\n try {\n // backgroundHandler.jobsHandler();\n\n //startActivity(new Intent(Settings.),0);\n carryOn();\n }catch (RuntimeException e){\n Log.i(\"ERR\",e.getMessage());\n }\n }", "@Override\n public int onStartCommand(Intent intent, int flags, int startId) {\n super.onStartCommand(intent, flags, startId);\n // Tapping the notification will open the specified Activity.\n// Intent activityIntent = new Intent(this, MainActivity.class);\n if (intent == null)\n intent = new Intent(this, RNTrafficStatsModule.class);\n\n pendingIntent = PendingIntent.getActivity(getApplicationContext(), 0,\n intent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n // This always shows up in the notifications area when this Service is running.\n not = new Notification.Builder(this).\n setContentTitle(\"TrueService\").\n setContentText(\"Running Speed Tests\")\n .setSmallIcon(R.drawable.random_pic).\n setContentIntent(pendingIntent).\n// addAction(action).\n build();\n startForeground(1, not);\n\n // Other code goes here...\n\n return START_REDELIVER_INTENT;//super.onStartCommand(intent, flags, startId);\n }", "@Override\n public int onStartCommand(Intent intent, int flags, int startId) {\n Toast.makeText(this, \"Service Started\", Toast.LENGTH_LONG).show();\n return START_STICKY;\n }", "@Override\n public void onStart(Intent intent, int startid) {\n Log.d(\"ServiceTest\", \"Service started by user.\");\n }", "@Override\n\t\t\tpublic void onClick(View v){\n\t\t\t\tif (receiver==null) {\n\t\t\t\t\treceiver = new myReceiver();\n\t\t\t\t\tIntentFilter filter=new IntentFilter();\n\t\t\t\t\tfilter.addAction(\"com.chris.hadoop v\");\n\t\t\t\t\tmActivity.registerReceiver(receiver, filter);\n\t\t\t\t}\n\t\t\t\tIntent intent=new Intent(getActivity(),trafficMonitorService.class);\n\t\t\t\tmActivity.startService(intent);\n\t\t\t\tToast.makeText(mActivity,\" \",Toast.LENGTH_SHORT).show();\n\t\t\t}", "private void startServices(){\n\t\t\n\t\tIntent intent = new Intent(mContext, BatterySaverService.class);\n\t\tmContext.startService(intent);\n\t}", "@Override\r\n public void onCreate() {\n intent = new Intent(BROADCAST_ACTION);\r\n startBTService();\r\n// try{\r\n// mConnectedThread.write(\"2\".getBytes());\r\n// }catch(Exception e){\r\n//\r\n// }\r\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n Vibrator vibrator = (Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE);\n vibrator.vibrate(4000);\n \n \n \tIntent i = new Intent(context, AlarmclockActivity.class); \n \ti.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); \n \tcontext.startActivity(i);\n \n\tMediaPlayer mediaPlayer = MediaPlayer.create(context, R.raw.alarm);\n\tmediaPlayer.start();\n\t\n\t\n\t\n PowerManager pm = (PowerManager) context.getSystemService(Context.POWER_SERVICE);\n PowerManager.WakeLock wl = pm.newWakeLock(PowerManager.SCREEN_BRIGHT_WAKE_LOCK | PowerManager.ACQUIRE_CAUSES_WAKEUP, \"DoNjfdhotDimScreen\");\n wl.acquire();\n \n }", "@Override\r\n\tpublic void onReceive(Context context, Intent intent) {\n\t\tif (intent.getAction().equals(Intent.ACTION_BOOT_COMPLETED)) {\r\n\t\t}\r\n\t\tif (Intent.ACTION_MEDIA_SCANNER_STARTED.equals(intent.getAction())) { //开始扫描\r\n\t\t\tif (onMediaScannerListener != null) onMediaScannerListener.onMediaScannerStarted();\r\n\t\t} else if (Intent.ACTION_MEDIA_SCANNER_FINISHED.equals(intent.getAction())) { //结束扫描\r\n\t\t\tif (onMediaScannerListener != null) onMediaScannerListener.onMediaScannerFinished();\r\n\t\t}\r\n\t}", "@Override\n public void onCreate()\n {\n super.onCreate();\n Toast.makeText(this, \"I am in Service !!!\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public int onStartCommand(final Intent intent, int flags, int startId) {\n // TODO Auto-generated method stub\n Toast.makeText(this, \"Servicio monitor iniciado...\", Toast.LENGTH_SHORT).show();\n\n final Handler handler = new Handler() {\n\n @Override\n public void handleMessage(Message msg) {\n // TODO Auto-generated method stub\n super.handleMessage(msg);\n\n id = intent.getExtras().getString(\"idRedApoyo\");\n final String funcion = \"viewAlertas\";\n\n\n }\n\n };\n\n\n new Thread(new Runnable(){\n public void run() {\n // TODO Auto-generated method stub\n while(true)\n {\n try {\n Thread.sleep(1000);\n handler.sendEmptyMessage(0);\n\n } catch (InterruptedException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n }\n\n }\n }).start();\n return START_STICKY;\n }", "public void startService() {\r\n Log.d(LOG, \"in startService\");\r\n startService(new Intent(getBaseContext(), EventListenerService.class));\r\n startService(new Intent(getBaseContext(), ActionService.class));\r\n getListenerService();\r\n\r\n }", "protected void startService() {\n\t\t//if (!isServiceRunning(Constants.SERVICE_CLASS_NAME))\n\t\tthis.startService(new Intent(this, LottoService.class));\n\t}", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n\n wordList = new ArrayList<String>();\n adapter = new ArrayAdapter<String>(this,\n R.layout.simple_list_item_1, R.id.text1,\n wordList);\n setListAdapter(adapter);\n\n //getApplicationContext().startService(new Intent(this, MyStartServiceReceiver.class));\n //getApplicationContext().startService(new Intent(this, MyScheduleReceiver.class));\n startService(new Intent(MainActivity.this, MyScheduleReceiver.class)); // Cant be restarted unless @ boot time?\n startService(new Intent(MainActivity.this, LocalWordService.class));\n\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n Log.d(\"ALARMA\", \"alarma\");\n AlarmUtils.scheduleAlarmHeartRate();\n BleDevice device = new BleDevice(new DeviceManager().getDevice().getMacAddress());\n\n device.connect();\n /*\n while(!device.readSteps(new StepsListener() {\n @Override\n public void onStepsRead(int value) {\n Log.d(\"ALARMA\", value+\"\");\n }\n })){\n }\n */\n\n while(!device.readHeartRate(new HeartRateListener() {\n @Override\n public void onHeartRateRead(int value) {\n Log.d(\"ALARMA\", value+\"\");\n\n Measurement measurement = new Measurement(new SessionManager().getId(), value, currentTimeMillis()/1000);\n new ApiHelper().uploadHeartRateMeasure(measurement, new SessionManager().getJWT());\n }\n }));\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n\n if (!PPApplicationStatic.getApplicationStarted(true, true))\n return;\n\n Calendar now = Calendar.getInstance();\n int gmtOffset = 0; //TimeZone.getDefault().getRawOffset();\n final long _time = now.getTimeInMillis() + gmtOffset;\n\n final String alarmPackageName = intent.getStringExtra(EXTRA_ALARM_PACKAGE_NAME);\n\n if (EventStatic.getGlobalEventsRunning(context)) {\n final Context appContext = context.getApplicationContext();\n //PPApplication.startHandlerThreadBroadcast(/*\"AlarmClockBroadcastReceiver.onReceive\"*/);\n //final Handler __handler = new Handler(PPApplication.handlerThreadBroadcast.getLooper());\n //__handler.post(new PPApplication.PPHandlerThreadRunnable(context.getApplicationContext()) {\n //__handler.post(() -> {\n Runnable runnable = () -> {\n// PPApplicationStatic.logE(\"[IN_EXECUTOR] PPApplication.startHandlerThread\", \"START run - from=AlarmClockBroadcastReceiver.onReceive\");\n\n //Context appContext= appContextWeakRef.get();\n\n //if (appContext != null) {\n PowerManager powerManager = (PowerManager) appContext.getSystemService(Context.POWER_SERVICE);\n PowerManager.WakeLock wakeLock = null;\n try {\n if (powerManager != null) {\n wakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, PPApplication.PACKAGE_NAME + \":AlarmClockBroadcastReceiver_onReceive\");\n wakeLock.acquire(10 * 60 * 1000);\n }\n\n// PPApplicationStatic.logE(\"[EVENTS_HANDLER_CALL] AlarmClockBroadcastReceiver.onReceive\", \"sensorType=SENSOR_TYPE_ALARM_CLOCK\");\n EventsHandler eventsHandler = new EventsHandler(appContext);\n eventsHandler.setEventAlarmClockParameters(_time, alarmPackageName);\n eventsHandler.handleEvents(EventsHandler.SENSOR_TYPE_ALARM_CLOCK);\n\n } catch (Exception e) {\n// PPApplicationStatic.logE(\"[IN_EXECUTOR] PPApplication.startHandlerThread\", Log.getStackTraceString(e));\n PPApplicationStatic.recordException(e);\n } finally {\n if ((wakeLock != null) && wakeLock.isHeld()) {\n try {\n wakeLock.release();\n } catch (Exception ignored) {\n }\n }\n }\n //}\n }; //);\n PPApplicationStatic.createEventsHandlerExecutor();\n PPApplication.eventsHandlerExecutor.submit(runnable);\n }\n }", "@Override\n public int onStartCommand(Intent intent, int flags, int startId) {\n showLocalNotification();\n return START_STICKY;\n }", "@Override\n public int onStartCommand(Intent intent, int flags, int startId) {\n\n serviceStartNormalMethod = intent.getBooleanExtra(BC_SERVICE_START_METHOD, false);\n\n // This is actually where we receive \"pings\" from activities to start us\n // and keep us running\n pingStamp = System.currentTimeMillis();\n\n // Log.i(TAG, \"SERVICE onStartCommand()\");\n\n return Service.START_NOT_STICKY;\n }", "@Override\n public void onReceive(final Context context, Intent intent) {\n// PPApplicationStatic.logE(\"[IN_BROADCAST] DashClockBroadcastReceiver.onReceive\", \"xxx\");\n\n PhoneProfilesDashClockExtension dashClockExtension = PhoneProfilesDashClockExtension.getInstance();\n if (dashClockExtension != null) {\n dashClockExtension.updateExtension();\n }\n\n //final boolean refresh = (intent == null) || intent.getBooleanExtra(EXTRA_REFRESH, true);\n\n /*PPApplication.startHandlerThreadBroadcast();\n final Handler handler = new Handler(PPApplication.handlerThreadBroadcast.getLooper());\n handler.post(new Runnable() {\n @Override\n public void run() {\n PPApplicationStatic.logE(\"[IN_THREAD_HANDLER] PPApplication.startHandlerThread\", \"START run - from=DashClockBroadcastReceiver.onReceive\");\n\n PhoneProfilesDashClockExtension dashClockExtension = PhoneProfilesDashClockExtension.getInstance();\n if (dashClockExtension != null)\n {\n dashClockExtension.updateExtension();\n }\n }\n });*/\n\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n Log.e(\"NoOperationReceiver\", \"NoOperationReceiver===================\" + intent.getAction());\n\n }", "@SuppressLint(\"LongLogTag\")\n @Override\n public void onReceive(Context context, Intent intent) {\n Toast.makeText(context.getApplicationContext(), \"Alarm Fired\", Toast.LENGTH_SHORT).show();\n Log.d(\"Alarm Receiver\", \"Alarm Receiver Triggered\");\n //Log.i(\"intent name\",intent.toString());\n\n alarmManager = (AlarmManager) context.getSystemService(context.ALARM_SERVICE);\n\n Intent alarmReceiverIntent = new Intent(context.getApplicationContext(),\n AlarmBroadcastReceiver.class);\n PendingIntent alarmIntent = PendingIntent.getBroadcast(context, 0, alarmReceiverIntent, 0);\n\n alarmManager.set(AlarmManager.RTC_WAKEUP, System.currentTimeMillis() + 30000, alarmIntent);\n\n\n }", "@Override\n\tpublic int onStartCommand(Intent intent, int flags, int startId) {\n\t\tLog.d(Constant.TAG, \"LockService start\");\n\t\tif (lockReceiver == null){\n\t\t\tregisterIntentReceivers();\n\t\t}\n\t\tLog.d(Constant.TAG, \"服务启动\");\n\t\treturn super.onStartCommand(intent, flags, startId);\n\t}", "@Override\n\tpublic void onReceive(Context context, Intent intent) {\n\t\tSharedPreferences mode=PreferenceManager.getDefaultSharedPreferences(context);\n\t\tBundle bundle=intent.getExtras();\n\t\tScheduleProtected schedule=bundle.getParcelable(\"Schedule\");\n\t\tString msg=schedule.getLabel();\n\t\tAudioManager audio=(AudioManager) context.getSystemService(Context.AUDIO_SERVICE);\n\t\t\n\t\tif(mode.getString(\"response\", null)==\"a\")\n\t\t\taudio.setRingerMode(AudioManager.RINGER_MODE_SILENT);\n\t\telse\n\t\t\taudio.setRingerMode(AudioManager.RINGER_MODE_VIBRATE);\n\t\t\n\t\tNotificationManager mNotManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);\n\n\t\tString MyText = \"Silent Mode Activated\";\n\t Notification mNotification = new Notification(R.drawable.icon, MyText, System.currentTimeMillis());\n\t \n\t String MyNotifyTitle = \"Diam Leh\";\n String MyNotifiyText = msg+\": Silent Mode Activated\";\n Intent MyIntent = new Intent( context.getApplicationContext(), Main.class);\n \n MyIntent.putExtra(\"extendedTitle\", MyNotifyTitle);\n MyIntent.putExtra(\"extendedText\" , MyNotifiyText);\n PendingIntent StartIntent = PendingIntent.getActivity(context.getApplicationContext(), 0, MyIntent, 0);\n \n mNotification.setLatestEventInfo(context.getApplicationContext(), MyNotifyTitle, MyNotifiyText, StartIntent);\n \n mNotification.ledOnMS = 200; //Set led blink (Off in ms)\n mNotification.ledOffMS = 200; //Set led blink (Off in ms)\n mNotification.ledARGB = 0x9400d3; //Set led color\n \n mNotManager.notify(399940 , mNotification );\n \n\t\tSharedPreferences pref=PreferenceManager.getDefaultSharedPreferences(context);\n\t\tSharedPreferences.Editor editor=pref.edit();\n\t\teditor.putBoolean(\"Mode\", true);\n\t\teditor.putLong(\"RowID\", schedule.getRowId());\n\t\teditor.commit();\n\t}", "public static void enableBootReceiver(Context context) {\n ComponentName receiver = new ComponentName(context, AlarmBootReceiver.class);\n PackageManager pm = context.getPackageManager();\n\n pm.setComponentEnabledSetting(receiver,\n PackageManager.COMPONENT_ENABLED_STATE_ENABLED,\n PackageManager.DONT_KILL_APP);\n }", "@Override\n\tpublic int onStartCommand(Intent intent, int flags, int startId) {\n\t\ttracker = new GPSTracker(this);\n\t\tstatus=0;\n\t\torder_id=intent.getExtras().getLong(\"id\");\n\t\tgs=new GetStatus();\n\t\tdsf=new Do_Service_Staff();\n\t\tdsf.execute(0);\n\t\t\n\t\t\n\t\treturn START_STICKY;\n\t}", "@Override\n\t\tpublic void onReceive(Context arg0, Intent arg1) {\n\t\t\tString action = arg1.getAction();\n\t\t\tmContext = arg0;\n\t\t\t\n\t\t\tif(action.equals(\"com.example.timeshowactivity.OFF\")){\n\t\t\t mDelayFlag = 0;\n\t\t\t //WhetherSendIntent =false;\n\t\t\t setTimeShowState(false);\n\t\t\t Log.i(TAG,\"qiuyaobo onReceive com.example.timeshowactivity.OFF\");\n\t\t\t}else if(action.equals(\"com.example.timeshowactivity.ON\")){\n\t\t\t mDelayFlag = 1;\n\t\t\t\t//WhetherSendIntent =true;\n\t\t\t setTimeShowState(true);\n\t\t\t//Log.i(\"huangjun00\",\"TimeShowReceiver ***onReceive00com.example.timeshowactivity.ON***\");\n\t\t\t}else if(action.equals(\"android.intent.action.BOOT_COMPLETED\")){\n\t\t\t\tLog.d(\"ljz\", \"set hall\");\n\t\t\t\t//PowerManager pm = (PowerManager) arg0.getSystemService(Context.POWER_SERVICE);\n\t\t\t\t//pm.setHallSensor(true, 0);\n\t\t\t//Log.i(\"huangjun00\",\"TimeShowReceiver ***onReceive.....android.intent.action.BOOT_COMPLETED***\");\n\t\t\t\treturn;\n\t\t }else if (MTK_ACTION_UNREAD_CHANGED.equals(action)){\n\t\t\t //Log.i(\"huangjun00\",\"TimeShowReceiver ***onReceive.....MTK_ACTION_UNREAD_CHANGED***\");\n\t\t\t\t\t\t\tboolean lidOpen =SystemProperties.getBoolean(\"persist.sys.lidopen\",false);\n\t\t\t\t\t\t\tif(lidOpen){//hal is off ,at the same time a call is arriving,open the hal ,at hal Call interface,hang up the call ,we should display the TimeShow \n\t\t\t\t\t\t\t\t\tmDelayFlag = 1;\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\tmDelayFlag = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(!isIdle()){\n\t\t\t\t\t\t\t\treturn;//when we opened call waiting function ,we hanged up one call ,the other call has been activitied,at this time we cannot update TimeShow actovity if the TimeShow actovity on Background process!\n\t\t\t\t\t\t\t}\n\t\t\t\t\t MainActivity m = MainActivity.getInstance();\n\t\t\t\t\t if(m != null){\n\t\t\t\t\t m.updatetInfo();\n\t }\n\t }\n\t\n\t\t if(!isIdle()){\n\t\t\t\t\t\tIntent updateIncallTouchUi = new Intent(\"UPDATE_INCALLSCREEN_TOUCHUI\");\n\t\t\t\t\t\tmContext.sendBroadcast(updateIncallTouchUi);\n\t\n\t }\n\t\t \n\t\t long milliseconds = SystemClock.elapsedRealtime();\n\t\t long timeSinceLastEvent = milliseconds - mLastReceiveEventTime;\n\t\t mLastReceiveEventTime = milliseconds;\n\t\t mHandler.removeCallbacks(mDelayTimeTask);\n\t\t\t\n\t\t //Log.i(\"huangjun00\",\"TimeShowReceiver ******** flag=\" +mDelayFlag + \" timeSinceLastEvent=\"+timeSinceLastEvent);\n\t\t if(timeSinceLastEvent < DELAY_TIME){\n\t\t\t\t\t\tlong i;\n\t\t\t\t\t\ti= DELAY_TIME - timeSinceLastEvent;\n\t\t //Log.i(\"huangjun00\",\"TimeShowReceiver ***timeSinceLastEvent < DELAY_TIME..timeSinceLastEvent=\" +timeSinceLastEvent + \"; DELAY_TIME=\"+DELAY_TIME+\";i=\"+i);\n\t\t mHandler.postDelayed(mDelayTimeTask, DELAY_TIME - timeSinceLastEvent);\n\t\t return;\n\t\t }\n\t\n\t\t\t\tif(mDelayFlag == 0){\n\t\t\t\t\t\tMainActivity m = MainActivity.getInstance();\n\t\t\t\t\t\tLog.i(TAG,\" qiuyaobo onReceive mDelayFlag == 0 m=\" +m);\n\t\t\t\n\t\t\t\t\t\tif(m != null){\n\t\t\t\t\t\t m.finish();\n\t\t\t\t\t\t\t//m.moveTaskToBack(false);\n\t\t\t // m.onBackPressed();\n\t\t\t\t\t\t\t//ActivityManager am = (ActivityManager)mContext.getSystemService(Context.ACTIVITY_SERVICE);\n\t\t\t\t\t\t//\tam.forceStopPackage(\"com.example.timeshowactivity\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t}else if(mDelayFlag == 1){\n\t\t\n\t\t /// mTelephonyManager = (TelephonyManager) (mContext.getSystemService(Context.TELEPHONY_SERVICE));//hj\n\t\t // mTelephonyManager.listen(mPhoneStateListener, PhoneStateListener.LISTEN_CALL_STATE); //hj\n\t\t\t\t\n\t\t\t\t\tComponentName cn = new ComponentName(\"com.example.timeshowactivity\",\"com.example.timeshowactivity.MainActivity\");\n\t\t\t\t\tIntent intent = new Intent();\n\t\t\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\t\t\t\t\tintent.setComponent(cn);\n\t\t\t\t\tmContext.startActivity(intent);\n\t\t\t\t}\n\t\t\t\n\t\t}", "@Override\n public void onReceive(Context context, Intent intent) {\n Log.d(\"AlarmCustomerReceiver\", \"zyf onReceive: AlarmCustomerReceiver\");\n }", "@Override\r\n\tpublic void onReceive(Context c, Intent i) {\n\t\tComponentName cmp = new ComponentName(c.getPackageName(),GcmIntentService.class.getName());\r\n\t\tstartWakefulService(c, i.setComponent(cmp));\r\n\t\tsetResultCode(Activity.RESULT_OK);\r\n\r\n\t}", "@Override\n public void onReceive(Context context, Intent intent) {\n\n AlarmAlertWakeLock.acquireScreenCpuWakeLock(context);\n Bundle bundle = intent.getExtras();\n final Alarm alarm = (Alarm) bundle.getSerializable(\"alarm\");\n\n Intent alarmActivityIntent = new Intent(context, AlarmAlertActivity.class);\n alarmActivityIntent.putExtra(\"alarm\", alarm);\n\n alarmActivityIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\n context.startActivity(alarmActivityIntent);\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n Uri data = intent.getData();\n String type = intent.getStringExtra(EXTRA_LIFEFORM_NAME);\n double lat = intent.getDoubleExtra(EXTRA_LATITUDE, 0);\n double lng = intent.getDoubleExtra(EXTRA_LONGITUDE, 0);\n Location loc = new Location(\"gps\");\n loc.setLatitude(lat);\n loc.setLongitude(lng);\n if (type.equals(\"facehugger\")) {\n Intent startIntent = new Intent(ACTION_BURN, data);\n startIntent.putExtra(EXTRA_LATITUDE, lat);\n startIntent.putExtra(EXTRA_LONGITUDE, lng);\n\n context.startService(startIntent);\n }\n }", "public void onServiceConnected(ComponentName className, IBinder service) {\n\t\t\tmBoundService = ((LocalService.LocalBinder) service).getService();\r\n\r\n\t\t\t// Wenn während des Setups der Service noch nicht fertig geladen\r\n\t\t\t// ist, wird solange Warte-Overlay angezeigt\r\n\t\t\t// Wenn der Service fertig ist wird das Overlay ausgeblendet\r\n\r\n\t\t\t// if (OverlayActivity.isCreated) {\r\n\t\t\t// OverlayActivity.getInstance().dismiss();\r\n\t\t\t// }\r\n\t\t\tSetupSearchDevicesFragment fragment = (SetupSearchDevicesFragment) getFragmentById(\"SetupSearchDevicesFragment\");\r\n\t\t\tif (fragment.isVisible()) {\r\n\t\t\t\tfragment.initViewBluetooth();\r\n\t\t\t}\r\n\r\n\t\t\t// Tell the user about this for our demo.\r\n\t\t\tLog.i(TAG, \"Service connected with app...\");\r\n\t\t\t// Toast.makeText(MainActivity.this, \"Service connected.\", Toast.LENGTH_SHORT).show();\r\n\r\n\t\t\t// Verbinde mit gespeichertem Device (falls noch keine Verbindung\r\n\t\t\t// besteht)\r\n\t\t\tif (mSharedPrefs.getConnectivityType() == 1) { // BEI BT\r\n\r\n\t\t\t\tfinal ConnectionInterface connection = mBoundService.getConnection();\r\n\t\t\t\tif (connection != null) {\r\n\t\t\t\t\tif (!connection.isConnected()) {\r\n\r\n\t\t\t\t\t\t// OnConnectedListener\r\n\t\t\t\t\t\tconnection.setOnConnectedListener(new OnConnectedListener() {\r\n\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\tpublic void onConnectedListener(String deviceName) {\r\n\r\n\t\t\t\t\t\t\t\tconnection.registerDisconnectHandler();\r\n\r\n\t\t\t\t\t\t\t\tif (mSharedPrefs.getDeviceMode() == 1) { // ELTERN\r\n\t\t\t\t\t\t\t\t\t// HELLO Nachricht senden\r\n\t\t\t\t\t\t\t\t\tString msg = mContext.getString(R.string.BABYFON_MSG_CONNECTION_HELLO) + \";\"\r\n\t\t\t\t\t\t\t\t\t\t\t+ mSharedPrefs.getHostAddress() + \";\" + mSharedPrefs.getPassword();\r\n\t\t\t\t\t\t\t\t\tconnection.sendMessage(msg);\r\n\r\n\t\t\t\t\t\t\t\t\tmSharedPrefs.setRemoteOnlineState(true);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\tif (mSharedPrefs.getDeviceMode() == 1) { // ELTERN\r\n\t\t\t\t\t\t\tif (mSharedPrefs.getRemoteAddress() != null) { // Gespeichertes Gerät\r\n\t\t\t\t\t\t\t\t// Verbinde\r\n\t\t\t\t\t\t\t\tmBoundService.connectTo(mSharedPrefs.getRemoteAddress());\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else if (mSharedPrefs.getDeviceMode() == 0) { // BABY\r\n\t\t\t\t\t\t\t// Warte auf Verbindung\r\n\t\t\t\t\t\t\tmBoundService.startServer();\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\r\n\t\t}", "@Override\n\tpublic void onStart(Intent intent, int startId) {\n\t\tSystem.out.println(\"onSTART\");\n\t\thandleIntent(intent);\n\t}" ]
[ "0.8106673", "0.75263023", "0.7515058", "0.74734575", "0.7406807", "0.7304035", "0.72885364", "0.7287806", "0.7256565", "0.71593165", "0.70832324", "0.7028295", "0.70147634", "0.7000265", "0.69959164", "0.6987856", "0.69729495", "0.6969834", "0.69508946", "0.69364023", "0.69354373", "0.6860858", "0.68211174", "0.68118185", "0.68118185", "0.6779237", "0.6760827", "0.6758237", "0.6734627", "0.6719798", "0.6713441", "0.67120934", "0.6693134", "0.66909033", "0.6686603", "0.6685342", "0.66707313", "0.66700506", "0.66525066", "0.66439134", "0.66439134", "0.66439134", "0.6634684", "0.6628127", "0.6620196", "0.65922517", "0.65668374", "0.65601736", "0.65586144", "0.65330905", "0.6528061", "0.6520353", "0.65199214", "0.6499112", "0.6480559", "0.6478063", "0.64734817", "0.64728343", "0.64727974", "0.6472165", "0.646632", "0.64386296", "0.64313567", "0.64247674", "0.6419621", "0.64193076", "0.6414204", "0.6403818", "0.63944876", "0.63931334", "0.6392132", "0.63882303", "0.6378421", "0.6375307", "0.63723844", "0.63606554", "0.63445383", "0.63412994", "0.6335654", "0.6333604", "0.6332121", "0.6324774", "0.6319201", "0.63124764", "0.63078654", "0.6303358", "0.63025033", "0.63017625", "0.62946296", "0.6288499", "0.6287226", "0.6265519", "0.6264639", "0.6261465", "0.62461966", "0.62458676", "0.6237757", "0.62231255", "0.62125593", "0.62081885" ]
0.7181726
9
Note: test for grid using chrome was successful
@BeforeMethod public void setUp() throws Exception{ DesiredCapabilities chromecap= DesiredCapabilities.chrome(); chromecap.setBrowserName("chrome"); chromecap.setPlatform(Platform.WINDOWS); driver= new RemoteWebDriver(new URL("http://localhost:4444/wd/hub"), chromecap); driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(priority = 5, dependsOnMethods = { \"verifySubscriptionPageComponents\" }, groups = { \"Smoke\" })\n\tpublic static void verifyGridComponents() throws InterruptedException {\n\n\t\ttest = report.startTest(\"Verify Components of Grid\");\n\n//\t\t//Verify Columns of Grid\n//\t\tString columnsGrid = driver.findElement(By.xpath(xpathColumnOfgrid)).getText();\n//\t\tAssert.assertEquals(columnsGrid,\"S. noSubscription NameSubscription IdDescriptionCreated OnAction\");\n//\t\ttest.log(LogStatus.PASS, \"Column Of Grid\", \"All Column are Displaying\");\n\n\t\t// verify any row in grid is displaying or not\n\n\t\tboolean rowInGrid = driver.findElement(By.xpath(xpathRowInGrid)).getText().isEmpty();\n\t\tAssert.assertFalse(rowInGrid);\n\t\ttest.log(LogStatus.PASS, \"Row In Grid\", \"Row In Grid is displaying\");\n\n\t\t// verify Delete and Edit Buttons\n\t\tWebElement deleteButton = driver.findElement(By.className(classDeleteButton));\n\t\tAssert.assertTrue(deleteButton.isEnabled());\n\t\ttest.log(LogStatus.PASS, \"Delete Button\", \"Delete Button is displaying and Enabled\");\n\t\tWebElement editButton = driver.findElement(By.className(\"editlink\"));\n\t\tAssert.assertTrue(editButton.isEnabled());\n\t\ttest.log(LogStatus.PASS, \"Edit Button\", \"Edit Button is displaying and Enabled\");\n\t}", "@When(\"^I see Giphy grid preview$\")\n public void ISeeGiphyGridPreview() throws Exception {\n Assert.assertTrue(\"Giphy grid is not shown\", getGiphyPreviewPage().isGridVisible());\n }", "@Test\n public void testGridTotalSize() {\n //performs a click action on the 20th item in the grid view\n onData(anything()).inAdapterView(withId(R.id.gridView)).atPosition(19).perform(click());\n }", "@Test\r\n public void testGridInfoButton() {\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(\"GridInfoPageButton\", false);\r\n tester.assertRenderedPage(GridInfoPage.class);\r\n }", "@Test\n public void testGridViewIsDisplayed() {\n onView(ViewMatchers.withId(R.id.gridView)).check(matches(isDisplayed()));\n }", "@Test\r\n public void Test003DisplyGrid()\r\n {\r\n\r\n //@formatter:off\r\n String expectedDisplay = \r\n \"|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|\\n\"\r\n + \"|.|*|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|\\n\" \r\n + \"|.|.|*|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|\\n\"\r\n + \"|.|.|.|*|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|\\n\" \r\n + \"|.|.|.|.|*|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|\\n\"\r\n + \"|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|\\n\" \r\n + \"|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|\\n\"\r\n + \"|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|\\n\" \r\n + \"|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|\\n\"\r\n + \"|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|\\n\" \r\n + \"|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|\\n\"\r\n + \"|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|\\n\" \r\n + \"|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|\\n\"\r\n + \"|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|\\n\" \r\n + \"|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|\\n\"\r\n + \"|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|\\n\" \r\n + \"|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|\\n\"\r\n + \"|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|\\n\" \r\n + \"|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|\\n\"\r\n + \"|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|\\n\" ;\r\n //@formatter:on\r\n gol.initalizeGrid();\r\n gol.makeLiveCell(1, 1);\r\n gol.makeLiveCell(2, 2);\r\n gol.makeLiveCell(3, 3);\r\n gol.makeLiveCell(4, 4);\r\n String actualDisplay = gol.displyGrid();\r\n\r\n assertEquals(expectedDisplay, actualDisplay);\r\n\r\n }", "@Test\n public void testVicrotyFullGrid(){\n for (Cell c: modelTest.grid) {\n if (c.getY() == 5)\n c.setColor(Color.BLUE);\n }\n\n modelTest.researchVictory(0,1);\n boolean vicrotyTest = modelTest.getVictory();\n // On a rempli la grille de cellule bleu, on test également la victoire du bleu\n Color winnerTest = modelTest.getWinner();\n\n Assert.assertEquals(vicrotyTest,true);\n Assert.assertEquals(winnerTest,Color.BLUE);\n }", "boolean hasGrid();", "@Test\n /**\n * Regression Test for\n * Issue #26: After removing one ComponentRenderer column the other renderer stop working\n *\n * https://github.com/datenhahn/componentrenderer/issues/26\n */\n public void removeColumnButton() throws InterruptedException, IOException {\n String expectedChrome = \"<div class=\\\"cr-component-cell\\\"><div class=\\\"v-label v-widget v-has-width \"\n + \"v-has-height\\\" style=\\\"width: 30px; height: 24px;\\\"><span class=\\\"v-icon\\\" \"\n + \"style=\\\"font-family: FontAwesome;\\\">.*</span></div></div>\";\n setupChromiumDriver();\n getDriver().get(\"http://localhost:8080/testbench\");\n assertTrue($(GridElement.class).first().getCell(0,6).getAttribute(\"innerHTML\").matches(expectedChrome));\n $(ButtonElement.class).id(\"removeColumnButton\").click();\n assertTrue($(GridElement.class).first().getCell(0,6).getAttribute(\"innerHTML\").matches(expectedChrome));\n\n }", "@Test\n\tpublic final void testProcGridCoord() {\n\t\tfor (int d=0; d<DIMENSIONALITY; d++) {\n\t\t\tassertTrue(0 <= block.procGridCoord(d)\n\t\t\t\t\t&& block.procGridCoord(d)<block.procGridSize(d));\n\t\t}\n\t}", "public static void testCreateGridFile() {\n\n System.out.println(\"\\n--------- Creating Grid File ---------\");\n\n //Create a params for the grid file\n GridParameters params =\n new GridParameters(NUMBER_ROWS, NUMBER_COLUMNS, 1.0, 1.0, CELL_SIZE, \n \"Created by com.pb.common.grid.GridFileTest\");\n\n try {\n GridFile gridFile = GridFile.create(TEST_FILE, params); //Create the grid file\n gridFile.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "@Test (groups = {\"regressionTest\"})\n public void testColumresize() {\n test = extent.createTest(\"Verify testColumresize\");\n // WebDriverWait wait = new WebDriverWait(driver, 15);\n try {\n login.doLogin(test);\n WebElement searchBubble = driver.findElement(By.xpath(\"//input[@class='auto-suggestion-input']\"));\n wait.until(ExpectedConditions.visibilityOf(searchBubble));\n searchBubble.click();\n searchBubble.sendKeys(\"list of customers\");\n searchBubble.sendKeys(Keys.ENTER);\n searchBubble.sendKeys(Keys.ENTER);\n wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(\"//*[@id=\\\"query-search-result-table\\\"]/div/div/div[1]/div/div[1]/div[2]/div/div/div[6]/div[1]\")));//changes according to xpath\n Actions action;\n\n\n WebElement resize;\n for (int i = 1; i <= 4; i++) {\n resize = driver.findElement(By.xpath(\"//*[@id=\\\"query-search-result-table\\\"]/div/div/div[1]/div/div[1]/div[2]/div/div/div[\" + i + \"]/div[1]\"));\n action = new Actions(driver);\n action.clickAndHold(resize);\n action.moveByOffset(100, 0);\n action.release(resize).perform();\n\n }\n\n test.createNode(\"Columresize verified successfully\");\n\n //Thread.sleep(5000); //use this if you want to observe the size while execution.\n\n } catch (Exception e) {\n test.createNode(\"Exception \" + e + \"in testColumresize\");\n\n }\n }", "public static void main(String[] args) {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:/Automation/Drivers/chromedriver.exe\");\r\n\r\n\t\tChromeDriver driver = new ChromeDriver();\r\n\r\n\t\tdriver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\r\n\r\n\t\tdriver.get(\"http://www.leafground.com/pages/table.html\");\r\n\t\tdriver.manage().window().maximize();\r\n\t\t//get table and store in web element\r\n\t\tWebElement leafgroundstable = driver.findElementByXPath(\"//table[@id='table_id']\");\r\n\t\t//find the number of rows and store in list\r\n\t\tList<WebElement> totalrows = leafgroundstable.findElements(By.tagName(\"tr\"));\r\n\t\tSystem.out.println(\"total row count: \"+totalrows.size());\r\n\t\tWebElement firstrow = totalrows.get(1);\r\n\r\n\r\n\t\tList<WebElement> allcolumns = firstrow.findElements(By.tagName(\"td\"));\r\n\r\n\r\n\t\tSystem.out.println(\"total column count: \"+allcolumns.size());\r\n\r\n\t\t// Get the progress value of 'Learn to interact with Elements' and store it in a variable\r\n\t\t//\t\tfor (WebElement currentrow : totalrows) \r\n\t\t//\t\t{\r\n\t\t//\t\t\tList<WebElement> currentcolvals = currentrow.findElements(By.tagName(\"td\"));\r\n\t\t//\r\n\t\t//\t\t\tfor(int i=0;i<currentcolvals.size();i++)\r\n\t\t//\t\t\t{\r\n\t\t//\t\t\t\tString columntxtvalue = currentcolvals.get(i).getText();\r\n\t\t//\t\t\t\t\r\n\t\t//\t\t\t\tif(columntxtvalue.equalsIgnoreCase(\"Learn to interact with Elements\"))\r\n\t\t//\t\t\t\t{\r\n\t\t//\t\t\t\t\tSystem.out.println(\"Progress Value is : \"+currentcolvals.get(1).getText());\r\n\t\t//\t\t\t\t}\r\n\t\t//\t\t\t}\r\n\r\n\t\t//learn to interact with key board val\r\n\t\tfor (WebElement currentrow : totalrows) \r\n\t\t{\r\n\t\t\tList<WebElement> currentcolvals = currentrow.findElements(By.tagName(\"td\"));\r\n\r\n\t\t\tfor(int i=0;i<currentcolvals.size();i++)\r\n\t\t\t{\r\n\t\t\t\tString columntxtvalue = currentcolvals.get(i).getText();\r\n\r\n\t\t\t\tif(columntxtvalue.equalsIgnoreCase(\"Learn to interact using Keyboard, Actions\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"Progress Value is : \"+currentcolvals.get(1).getText());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Find the vital task for the least completed progress and check the box\r\n\r\n//\t\t\tString[]progressvalues = null;\r\n//\r\n//\t\t\tfor (WebElement currentrow: totalrows) {\r\n//\r\n//\t\t\t\tList<WebElement> currentcolvals = currentrow.findElements(By.tagName(\"td\"));\r\n//\r\n//\t\t\t\tString text = currentcolvals.get(2).getText();\t\r\n//\t\t\t\tfor (int i = 0; i <totalrows.size(); i++) {\r\n//\t\t\t\t\tprogressvalues[i]=currentcolvals.get(1).getText();\r\n//\t\t\t\t\t\r\n//\t\t\t\t}\r\n//\t\t\t\tArrays.sort(progressvalues);\r\n//\t\t\t\t\r\n//\t\t\t\tfor(int j = 0;j<currentcolvals.size();j++)\r\n//\t\t\t\t{\r\n//\t\t\t\t\tString columntxtvalue = currentcolvals.get(j).getText();\r\n//\t\t\t\t\tif(columntxtvalue.equalsIgnoreCase(progressvalues[0]))\r\n//\t\t\t\t\t{\r\n//\t\t\t\t\t\tSystem.out.println(currentcolvals.get(2).isEnabled());\r\n//\t\t\t\t\t}\r\n//\t\t\t\t}\r\n\t\t\r\n\t WebElement progres = driver.findElementByXPath(\"//tr[i]//td[i]\");\r\n\t String interaction = progres.getText();\r\n\t\tString regex = null;\r\n\t\tString replacement = null;\r\n\t\tString replaceAll = interaction.replaceAll(regex, replacement);\r\n\t System.out.println(replaceAll);\r\n\t\t\t}", "@Test\r\n public void Test002DisplyGrid()\r\n {\r\n\r\n //@formatter:off\r\n String expectedDisplay = \r\n \"|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|\\n\"\r\n + \"|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|\\n\" \r\n + \"|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|\\n\"\r\n + \"|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|\\n\" \r\n + \"|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|\\n\"\r\n + \"|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|\\n\" \r\n + \"|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|\\n\"\r\n + \"|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|\\n\" \r\n + \"|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|\\n\"\r\n + \"|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|\\n\" \r\n + \"|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|\\n\"\r\n + \"|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|\\n\" \r\n + \"|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|\\n\"\r\n + \"|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|\\n\" \r\n + \"|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|\\n\"\r\n + \"|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|\\n\" \r\n + \"|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|\\n\"\r\n + \"|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|\\n\" \r\n + \"|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|\\n\"\r\n + \"|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|\\n\" ;\r\n //@formatter:on\r\n gol.initalizeGrid();\r\n String actualDisplay = gol.displyGrid();\r\n\r\n assertEquals(expectedDisplay, actualDisplay);\r\n\r\n }", "public static void main(String[] args) throws Exception \n\t{\n\t\tString sRow = \"0\";\n\t\t String sCol = \"0\";\n\t\tWebDriverManager.chromedriver().setup();\n\t\tChromeDriver driver=new ChromeDriver();\n\t\tdriver.get(\"https://www.globalsqa.com/angularJs-protractor/BankingProject/#/login\");\n\t\tThread.sleep(5000);\n\t\tdriver.findElement(By.xpath(\"//button[text()='Bank Manager Login']\")).click();\n\t\tThread.sleep(5000);\n\t\tdriver.findElement(By.xpath(\"//button[contains(text(),'Customers')]\")).click();\n\t\tThread.sleep(5000);\n\t\tFluentWait<ChromeDriver>w=new FluentWait<ChromeDriver>(driver);\n\t\tw.withTimeout(Duration.ofSeconds(50));\n\t\tw.pollingEvery(Duration.ofMillis(1000));\n\t\t\n\t\t/*\n\t\ts=s+e1.size();\n\t\tSystem.out.println(s);\n\t\t\n\t\tfor(WebElement e:e1)\n\t\t{\n\t\t\tSystem.out.println(e.getText());\n\t\t}*/\n\t\t//Heading for columns\n\t\tList<WebElement>heading=driver.findElements(By.xpath(\"//td/child::a\"));\n\t\tfor(WebElement h:heading)\n\t\t{\n\t\t\tSystem.out.print(h.getText());\n\t\t}\n\t\t\n\t\t//get total number of row and test\n\t\ttry\n\t\t{\n\t\t\tList<WebElement> e1=driver.findElements(By.xpath(\"//table/tbody/tr[@class='ng-scope']/td[@class='ng-binding']\"));\n\t\t\tint s=0;\n\t\t\ts=s+e1.size();\n\t\t\tSystem.out.println(s);\n\t\t\tThread.sleep(2000);\n\t\t\tSystem.out.println(\"Table Data is: \");\n\t\t\tfor(int i=1;i<=s;i++)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Row number \"+(i)+\" is\");\n\t\t\t\t\n\t\t\t\tfor(int j=1;j<=3;j++)\n\t\t\t\t{\n\t\t\t\t\tString r=driver.findElement(By.xpath(\"//table/tbody/tr[@class='ng-scope'][\"+i+\"]/td[@class='ng-binding'][\"+j+\"]\")).getText();\n\t\t\t\t\tSystem.out.println(\"Data at Cell with Row \"+ (i) + \" Column \"+(j)+\"is\" +\":\"+r);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tcatch(NoSuchElementException ex)\n\t\t{\n\t\t\t\n\t\t}\n\t\n\t\tString acc=driver.findElement(By.xpath(\"(//tr/td)[4]\")).getText();\n\t\tSystem.out.println(acc);\n\t\t\n\t\tList<WebElement>acc1=driver.findElements(By.xpath(\"(//td)/span[text()]\"));\n\t\tfor(int i=0;i<acc1.size();i++)\n\t\t{\n\t\t\tSystem.out.println(acc1.get(i).getText());\n\t\t}\n\t\t\n\t\t//dymanic scearch content \n\t\tList<WebElement>elem=driver.findElements(By.xpath(\"//tbody/tr[@class='ng-scope']/td[@class='ng-binding']\"));\n\t\telem.size();\n\t\tWebElement x=driver.findElement(By.xpath(\"//input[@ng-model='searchCustomer']\"));\n\t\tx.sendKeys(\"he\");\n\t\tList<WebElement> search=driver.findElements(By.xpath(\"//table/tbody/tr/td[@class='ng-binding'][1]\"));\n\t\tsearch.size();\n\t\tfor(WebElement s:search)\n\t\t{\n\t\t\tSystem.out.println(s.getText());\n\t\t}\n\t\t/*List<WebElement> ro=driver.findElements(By.xpath(\"//tbody/tr[@class='ng-scope']\"));\n\t\tint s=0;\n\t\ts=s+ro.size();\n\t\tSystem.out.println(s);\n\t\tfor(WebElement e:ro)\n\t\t{\n\t\t\tSystem.out.println(e.getText());\n\t\t}*/\n\t\tExpectedCondition<List<WebElement>>ec=ExpectedConditions.numberOfElementsToBeMoreThan(By.xpath(\"//tbody/tr[@class='ng-scope']\"),3);\n\t\tList<WebElement>rows=w.until(ec);\n\t\tint s=0;\n\t\ts=s+rows.size();\n\t\tSystem.out.println(s);\n\t\tfor(WebElement e:rows)\n\t\t{\n\t\t\tSystem.out.println(e.getText());\n\t\t}\n\t\tList<WebElement> e=driver.findElements(By.xpath(\"//td[not(@class='ng-binding')]\"));\n\t\tfor(int i=0;i<=4;i++)\n\t\t{\n\t\t\tSystem.out.println(e.get(i).getText());\n\t\t}\n\t\tString x3=driver.findElement(By.xpath(\"//tbody/tr/td[@class='ng-binding']\")).getText();\n\t\tSystem.out.println(x3);\n\t}", "public void setUpDriver(final String browser) throws MalformedURLException{\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tString gridUrl=System.getProperty(\"gridurl\");\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//check if parameter passed from TestNg is 'firefox'\r\n\t\t\r\n//\t\tif (BrowserLib.FIREFOX.equalsIgnoreCase(browser)){\r\n//\t\t DesiredCapabilities capabilities =DesiredCapabilities.firefox();\r\n//\t\t capabilities.setCapability(CapabilityType.ForSeleniumServer.ENSURING_CLEAN_SESSION, true);\r\n//\t\t if(StringUtils.isNotEmpty(gridUrl)){\r\n//\t\t\t driver=new RemoteWebDriver(new URL(gridUrl),capabilities);\r\n//\t\t }\r\n//\t\t else{\r\n//\t\t\t driver =new FirefoxDriver(capabilities);\r\n//\t\t }\r\n\t\t \r\n\t\t\r\n\t\tif(BrowserLib.FIREFOX.equalsIgnoreCase(browser)){\r\n\t\t\t\r\n\t\t\t DesiredCapabilities capabilities =DesiredCapabilities.firefox();\r\n//\t\t\t capabilities.setCapability(CapabilityType.ForSeleniumServer.ENSURING_CLEAN_SESSION, true);\r\n\t\t\t \r\n\t\t\t final String firebugpath1=\"src//main//resource//firepath-0.9.7.1-fx.xpi\";\r\n\t\t\t final String firebugpath =\"src//main//resource//firebug-1.12.8.xpi\";\r\n\t\t\t FirefoxProfile profile=new FirefoxProfile();\r\n//\t\t System.setProperty(\"webdriver.firefox.driver\", \"C:\\\\Program Files\\\\MozillaFirefox\\\\firefox.exe\");\r\n\r\n\t\t\t \r\n\t\t\t try{\r\n\t\t\t\t profile.addExtension(new File(firebugpath));\r\n\t\t\t\t profile.addExtension(new File(firebugpath1));\t \r\n\t\t\t }catch (IOException e){\r\n\t\t\t\t logger.error(\"Exception:\",e);\r\n\t\t\t }\r\n\t\t\t \r\n\t\t\t profile.setPreference(\"extensions.firebug.allpagesActivation\", \"on\");\r\n//\t\t\t capabilities.setCapability(FirefoxDriver.PROFILE,profile);\r\n\t\t\t capabilities.setCapability(CapabilityType.ForSeleniumServer.ENSURING_CLEAN_SESSION, true);\r\n\t\t\t System.setProperty(\"webdriver.firefox.driver\", \"C:\\\\Program Files\\\\MozillaFirefox\\\\firefox.exe\");\r\n\t\t\t //if (StringUtils.isNotEmpty(gridUrl)){\r\n\t\t\t if(gridUrl==null){\r\n\t\t\t\t driver =new FirefoxDriver(capabilities); \r\n \t\t\t \r\n\t\t\t }else{\r\n\t\t\t\t driver=new RemoteWebDriver(new URL(gridUrl),capabilities);\r\n\t\t\t }\r\n\t\t}else if(BrowserLib.CHROME.equalsIgnoreCase(browser)){\r\n\t\t\t DesiredCapabilities capabilities =DesiredCapabilities.chrome();\r\n\t\t\t capabilities.setCapability(CapabilityType.ForSeleniumServer.ENSURING_CLEAN_SESSION, true);\r\n\t\t\t if(gridUrl==null){\r\n\t\t\t\t driver =new ChromeDriver();\t \r\n\t\t\t }else{\r\n\t\t\t\t driver=new RemoteWebDriver(new URL(gridUrl),capabilities);\r\n\t\t\t }\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t \r\n\t\t}else if(BrowserLib.INTERNET_EXP.equalsIgnoreCase(browser)){\r\n//\t\t\tset path to iedriver.exe you may need to download it from 32 bits\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tSystem.setProperty(\"webDriver.ie.driver\", System.getProperty(\"user.dir\")+\"/src/main/resource/\"+ \"IEDriverserver.exe\");\r\n//\t\t\t create ie instance\r\n\t\t\t DesiredCapabilities capabilities =DesiredCapabilities.internetExplorer();\r\n\t\t\t capabilities.setCapability(CapabilityType.ForSeleniumServer.ENSURING_CLEAN_SESSION, true);\r\n//\t\t\t if (StringUtils.isNotEmpty(gridUrl)){\r\n// \t\t\t driver=new RemoteWebDriver(new URL(gridUrl),capabilities);\r\n//\t\t\t }else{\r\n//\t\t\t\t driver =new FirefoxDriver(capabilities); \r\n//\t\t\t }\r\n\t\t\t if(gridUrl.isEmpty()){\r\n\t\t\t\t driver =new InternetExplorerDriver(capabilities); \r\n \t\t\t \r\n\t\t\t }else{\r\n\t\t\t\t driver=new RemoteWebDriver(new URL(gridUrl),capabilities);\r\n\t\t\t }\r\n\t\t\t \r\n\t\t}else{\r\n//\t\t\tif no browser passed throw exception\r\n\t\t\tthrow new UnsupportBrowserException();\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tthis.driver.manage().deleteAllCookies();\r\n\t\tthis.browserMaximize();\r\n\t\tthis.driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\r\n\t\t\r\n\t\t\r\n\t}", "private void findGrid(int x, int y) {\n\tgx = (int) Math.floor(x / gs);\n\tgy = (int) Math.floor(y / gs);\n\n\tif (debug){\n\tSystem.out.print(\"Actual: (\" + x + \",\" + y + \")\");\n\tSystem.out.println(\" Grid square: (\" + gx + \",\" + gy + \")\");\n\t}\n }", "void printGrid() {\n GridHelper.printGrid(hiddenGrid);\n }", "@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 }", "com.ctrip.ferriswheel.proto.v1.Grid getGrid();", "public void displayGrid()\n {\n\t\t\n\tfor (int y=0; y<cases.length; y++)\n\t{\n for (int x=0; x<cases[y].length; x++)\n {\n\t\tSystem.out.print(\"|\"+cases[y][x].getValue());\n }\n System.out.println(\"|\");\n\t}\n }", "public void printGrid(){\n System.out.println(\"printing the grid\");\n for(int i=0;i<row_size;i++){\n for(int j = 0;j<col_size;j++){\n System.out.println(grid[i][j]);\n }\n }\n }", "public static void main(String[] args) {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"./driver/chromedriver.exe\");\r\n\t\tWebDriver driver = new ChromeDriver();\r\n\t\tdriver.get(\"https://testleaf.herokuapp.com/home.html\");\r\n\t\tdriver.manage().window().maximize();\r\n\t\tdriver.findElement(By.xpath(\"//img[@alt='Table']\")).click();\r\n\t\tList<WebElement> rows = driver.findElements(By.tagName(\"tr\"));\r\n\t\tint rowsize = rows.size();\r\n\t\tSystem.out.println(\"The number of rows is \"+rowsize);\r\n\t\tWebElement firstrow = rows.get(0);\r\n\t\tList<WebElement> columns = driver.findElements(By.tagName(\"th\"));\r\n\t\tint columnsize = columns.size();\r\n\t\tSystem.out.println(\"The number of rows is \"+columnsize);\r\n\t\tWebElement firstcolumn = columns.get(0);\r\n\t\tList<WebElement> alldata = driver.findElements(By.tagName(\"td\"));\r\n\t\tfor (WebElement webElement : alldata) {\r\n\t\t\tString mytext = webElement.getText();\r\n\t\t\tif (mytext.equalsIgnoreCase(\"Learn to interact with Elements\")) {\r\n\t\t\t\t//rows.get(2).findElement(By.tagName(\"td\")).get(1).gettext();\r\n\t\t\t\trows.get(2).findElements(By.tagName(\"td\")).get(1).getText();\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "private static void drawGrid(int[][] grid) {\n BufferStrategy buf = canvas.getBufferStrategy();\n Graphics g = buf.getDrawGraphics();\n\n g.clearRect(0, 0, (2 * WINDOW_MARGINS) + (CELL_SIZE * SIZE_X), (2 * WINDOW_MARGINS) + (CELL_SIZE * SIZE_Y));\n\n for (int i = 0; i < grid.length; i++) {\n for (int j = 0; j < grid[0].length; j++) {\n g.setColor(pallette[grid[i][j]]);\n g.fillRect(WINDOW_MARGINS + (CELL_SIZE * i), WINDOW_MARGINS + (CELL_SIZE * j), CELL_SIZE, CELL_SIZE);\n }\n }\n\n if (!buf.contentsLost()) buf.show();\n g.dispose();\n }", "public void testGetRowIndex() {\n TaskSeriesCollection c = createCollection1();\n }", "@Test\n\t@SuppressWarnings(\"unchecked\")\n\tpublic void testGridOutput() throws Exception\n\t{\n\t\tfinal HttpServletRequest request = mock(HttpServletRequest.class);\n\t\tfinal HttpServletResponse response = mock(HttpServletResponse.class);\n\n\t\t// servlet mock responses\n\t\tfinal Map<String, String> map = new HashMap<String, String>();\n\t\tmap.put(\"__action\", \"download_json\");\n\t\tmap.put(\"__target\", \"jqGridView\");\n\t\tmap.put(\"Operation\", \"LOAD_CONFIG\");\n\t\tfor (final Entry<String, String> entry : map.entrySet())\n\t\t{\n\t\t\twhen(request.getParameter(entry.getKey())).thenReturn(entry.getValue());\n\t\t}\n\t\twhen(request.getParameterMap()).thenReturn(map);\n\t\twhen(request.getMethod()).thenReturn(\"GET\");\n\n\t\tfinal ServletOutputStream mockOutstream = mock(ServletOutputStream.class);\n\t\twhen(response.getOutputStream()).thenReturn(mockOutstream);\n\n\t\tfinal Tuple molRequest = new MolgenisRequest(request, response);\n\t\tplugin.handleRequest(db, molRequest, mockOutstream);\n\n\t\tfinal String out = \"{\\\"id\\\":\\\"test\\\",\\\"url\\\":\\\"molgenis.do?__target\\\\u003dtest\\\\u0026__action\\\\u003ddownload_json\\\",\\\"datatype\\\":\\\"json\\\",\\\"pager\\\":\\\"#testPager\\\",\\\"colNames\\\":[\\\"Country.Code\\\",\\\"Country.Name\\\",\\\"Country.Continent\\\",\\\"Country.Region\\\",\\\"Country.SurfaceArea\\\",\\\"Country.IndepYear\\\",\\\"Country.Population\\\",\\\"Country.LifeExpectancy\\\",\\\"Country.GNP\\\",\\\"Country.GNPOld\\\",\\\"Country.LocalName\\\",\\\"Country.GovernmentForm\\\",\\\"Country.HeadOfState\\\",\\\"Country.Capital\\\",\\\"Country.Code2\\\",\\\"City.ID\\\",\\\"City.Name\\\",\\\"City.CountryCode\\\",\\\"City.District\\\",\\\"City.Population\\\",\\\"CountryLanguage.CountryCode\\\",\\\"CountryLanguage.Language\\\",\\\"CountryLanguage.IsOfficial\\\",\\\"CountryLanguage.Percentage\\\"],\\\"colModel\\\":[{\\\"name\\\":\\\"Country.Code\\\",\\\"index\\\":\\\"Country.Code\\\",\\\"width\\\":100,\\\"sortable\\\":true,\\\"search\\\":true,\\\"searchoptions\\\":{\\\"required\\\":true,\\\"searchhidden\\\":true,\\\"stype\\\":\\\"text\\\",\\\"sopt\\\":[\\\"eq\\\",\\\"ne\\\",\\\"bw\\\",\\\"bn\\\",\\\"ew\\\",\\\"en\\\",\\\"cn\\\",\\\"nc\\\"],\\\"dataInit\\\":\\\"function(elem){ $(elem).datepicker({dateFormat:\\\\\\\"mm/dd/yyyy\\\\\\\"});}}\\\"},\\\"searchrules\\\":{\\\"number\\\":false,\\\"integer\\\":false,\\\"email\\\":false,\\\"date\\\":false,\\\"time\\\":false},\\\"title\\\":\\\"Country.Code\\\",\\\"isFolder\\\":false,\\\"path\\\":\\\"Country.Code\\\"},{\\\"name\\\":\\\"Country.Name\\\",\\\"index\\\":\\\"Country.Name\\\",\\\"width\\\":100,\\\"sortable\\\":true,\\\"search\\\":true,\\\"searchoptions\\\":{\\\"required\\\":true,\\\"searchhidden\\\":true,\\\"stype\\\":\\\"text\\\",\\\"sopt\\\":[\\\"eq\\\",\\\"ne\\\",\\\"bw\\\",\\\"bn\\\",\\\"ew\\\",\\\"en\\\",\\\"cn\\\",\\\"nc\\\"],\\\"dataInit\\\":\\\"function(elem){ $(elem).datepicker({dateFormat:\\\\\\\"mm/dd/yyyy\\\\\\\"});}}\\\"},\\\"searchrules\\\":{\\\"number\\\":false,\\\"integer\\\":false,\\\"email\\\":false,\\\"date\\\":false,\\\"time\\\":false},\\\"title\\\":\\\"Country.Name\\\",\\\"isFolder\\\":false,\\\"path\\\":\\\"Country.Name\\\"},{\\\"name\\\":\\\"Country.Continent\\\",\\\"index\\\":\\\"Country.Continent\\\",\\\"width\\\":100,\\\"sortable\\\":true,\\\"search\\\":true,\\\"searchoptions\\\":{\\\"required\\\":true,\\\"searchhidden\\\":true,\\\"stype\\\":\\\"text\\\",\\\"sopt\\\":[\\\"eq\\\",\\\"ne\\\",\\\"bw\\\",\\\"bn\\\",\\\"ew\\\",\\\"en\\\",\\\"cn\\\",\\\"nc\\\"],\\\"dataInit\\\":\\\"function(elem){ $(elem).datepicker({dateFormat:\\\\\\\"mm/dd/yyyy\\\\\\\"});}}\\\"},\\\"searchrules\\\":{\\\"number\\\":false,\\\"integer\\\":false,\\\"email\\\":false,\\\"date\\\":false,\\\"time\\\":false},\\\"title\\\":\\\"Country.Continent\\\",\\\"isFolder\\\":false,\\\"path\\\":\\\"Country.Continent\\\"},{\\\"name\\\":\\\"Country.Region\\\",\\\"index\\\":\\\"Country.Region\\\",\\\"width\\\":100,\\\"sortable\\\":true,\\\"search\\\":true,\\\"searchoptions\\\":{\\\"required\\\":true,\\\"searchhidden\\\":true,\\\"stype\\\":\\\"text\\\",\\\"sopt\\\":[\\\"eq\\\",\\\"ne\\\",\\\"bw\\\",\\\"bn\\\",\\\"ew\\\",\\\"en\\\",\\\"cn\\\",\\\"nc\\\"],\\\"dataInit\\\":\\\"function(elem){ $(elem).datepicker({dateFormat:\\\\\\\"mm/dd/yyyy\\\\\\\"});}}\\\"},\\\"searchrules\\\":{\\\"number\\\":false,\\\"integer\\\":false,\\\"email\\\":false,\\\"date\\\":false,\\\"time\\\":false},\\\"title\\\":\\\"Country.Region\\\",\\\"isFolder\\\":false,\\\"path\\\":\\\"Country.Region\\\"},{\\\"name\\\":\\\"Country.SurfaceArea\\\",\\\"index\\\":\\\"Country.SurfaceArea\\\",\\\"width\\\":100,\\\"sortable\\\":true,\\\"search\\\":true,\\\"searchoptions\\\":{\\\"required\\\":true,\\\"searchhidden\\\":true,\\\"stype\\\":\\\"text\\\",\\\"sopt\\\":[\\\"eq\\\",\\\"ne\\\",\\\"lt\\\",\\\"le\\\",\\\"gt\\\",\\\"ge\\\"],\\\"dataInit\\\":\\\"function(elem){ $(elem).datepicker({dateFormat:\\\\\\\"mm/dd/yyyy\\\\\\\"});}}\\\"},\\\"searchrules\\\":{\\\"number\\\":true,\\\"integer\\\":false,\\\"email\\\":false,\\\"date\\\":false,\\\"time\\\":false},\\\"title\\\":\\\"Country.SurfaceArea\\\",\\\"isFolder\\\":false,\\\"path\\\":\\\"Country.SurfaceArea\\\"},{\\\"name\\\":\\\"Country.IndepYear\\\",\\\"index\\\":\\\"Country.IndepYear\\\",\\\"width\\\":100,\\\"sortable\\\":true,\\\"search\\\":true,\\\"searchoptions\\\":{\\\"required\\\":true,\\\"searchhidden\\\":true,\\\"stype\\\":\\\"text\\\",\\\"sopt\\\":[\\\"eq\\\",\\\"ne\\\",\\\"lt\\\",\\\"le\\\",\\\"gt\\\",\\\"ge\\\"],\\\"dataInit\\\":\\\"function(elem){ $(elem).datepicker({dateFormat:\\\\\\\"mm/dd/yyyy\\\\\\\"});}}\\\"},\\\"searchrules\\\":{\\\"number\\\":false,\\\"integer\\\":true,\\\"email\\\":false,\\\"date\\\":false,\\\"time\\\":false},\\\"title\\\":\\\"Country.IndepYear\\\",\\\"isFolder\\\":false,\\\"path\\\":\\\"Country.IndepYear\\\"},{\\\"name\\\":\\\"Country.Population\\\",\\\"index\\\":\\\"Country.Population\\\",\\\"width\\\":100,\\\"sortable\\\":true,\\\"search\\\":true,\\\"searchoptions\\\":{\\\"required\\\":true,\\\"searchhidden\\\":true,\\\"stype\\\":\\\"text\\\",\\\"sopt\\\":[\\\"eq\\\",\\\"ne\\\",\\\"lt\\\",\\\"le\\\",\\\"gt\\\",\\\"ge\\\"],\\\"dataInit\\\":\\\"function(elem){ $(elem).datepicker({dateFormat:\\\\\\\"mm/dd/yyyy\\\\\\\"});}}\\\"},\\\"searchrules\\\":{\\\"number\\\":false,\\\"integer\\\":true,\\\"email\\\":false,\\\"date\\\":false,\\\"time\\\":false},\\\"title\\\":\\\"Country.Population\\\",\\\"isFolder\\\":false,\\\"path\\\":\\\"Country.Population\\\"},{\\\"name\\\":\\\"Country.LifeExpectancy\\\",\\\"index\\\":\\\"Country.LifeExpectancy\\\",\\\"width\\\":100,\\\"sortable\\\":true,\\\"search\\\":true,\\\"searchoptions\\\":{\\\"required\\\":true,\\\"searchhidden\\\":true,\\\"stype\\\":\\\"text\\\",\\\"sopt\\\":[\\\"eq\\\",\\\"ne\\\",\\\"lt\\\",\\\"le\\\",\\\"gt\\\",\\\"ge\\\"],\\\"dataInit\\\":\\\"function(elem){ $(elem).datepicker({dateFormat:\\\\\\\"mm/dd/yyyy\\\\\\\"});}}\\\"},\\\"searchrules\\\":{\\\"number\\\":true,\\\"integer\\\":false,\\\"email\\\":false,\\\"date\\\":false,\\\"time\\\":false},\\\"title\\\":\\\"Country.LifeExpectancy\\\",\\\"isFolder\\\":false,\\\"path\\\":\\\"Country.LifeExpectancy\\\"},{\\\"name\\\":\\\"Country.GNP\\\",\\\"index\\\":\\\"Country.GNP\\\",\\\"width\\\":100,\\\"sortable\\\":true,\\\"search\\\":true,\\\"searchoptions\\\":{\\\"required\\\":true,\\\"searchhidden\\\":true,\\\"stype\\\":\\\"text\\\",\\\"sopt\\\":[\\\"eq\\\",\\\"ne\\\",\\\"lt\\\",\\\"le\\\",\\\"gt\\\",\\\"ge\\\"],\\\"dataInit\\\":\\\"function(elem){ $(elem).datepicker({dateFormat:\\\\\\\"mm/dd/yyyy\\\\\\\"});}}\\\"},\\\"searchrules\\\":{\\\"number\\\":true,\\\"integer\\\":false,\\\"email\\\":false,\\\"date\\\":false,\\\"time\\\":false},\\\"title\\\":\\\"Country.GNP\\\",\\\"isFolder\\\":false,\\\"path\\\":\\\"Country.GNP\\\"},{\\\"name\\\":\\\"Country.GNPOld\\\",\\\"index\\\":\\\"Country.GNPOld\\\",\\\"width\\\":100,\\\"sortable\\\":true,\\\"search\\\":true,\\\"searchoptions\\\":{\\\"required\\\":true,\\\"searchhidden\\\":true,\\\"stype\\\":\\\"text\\\",\\\"sopt\\\":[\\\"eq\\\",\\\"ne\\\",\\\"lt\\\",\\\"le\\\",\\\"gt\\\",\\\"ge\\\"],\\\"dataInit\\\":\\\"function(elem){ $(elem).datepicker({dateFormat:\\\\\\\"mm/dd/yyyy\\\\\\\"});}}\\\"},\\\"searchrules\\\":{\\\"number\\\":true,\\\"integer\\\":false,\\\"email\\\":false,\\\"date\\\":false,\\\"time\\\":false},\\\"title\\\":\\\"Country.GNPOld\\\",\\\"isFolder\\\":false,\\\"path\\\":\\\"Country.GNPOld\\\"},{\\\"name\\\":\\\"Country.LocalName\\\",\\\"index\\\":\\\"Country.LocalName\\\",\\\"width\\\":100,\\\"sortable\\\":true,\\\"search\\\":true,\\\"searchoptions\\\":{\\\"required\\\":true,\\\"searchhidden\\\":true,\\\"stype\\\":\\\"text\\\",\\\"sopt\\\":[\\\"eq\\\",\\\"ne\\\",\\\"bw\\\",\\\"bn\\\",\\\"ew\\\",\\\"en\\\",\\\"cn\\\",\\\"nc\\\"],\\\"dataInit\\\":\\\"function(elem){ $(elem).datepicker({dateFormat:\\\\\\\"mm/dd/yyyy\\\\\\\"});}}\\\"},\\\"searchrules\\\":{\\\"number\\\":false,\\\"integer\\\":false,\\\"email\\\":false,\\\"date\\\":false,\\\"time\\\":false},\\\"title\\\":\\\"Country.LocalName\\\",\\\"isFolder\\\":false,\\\"path\\\":\\\"Country.LocalName\\\"},{\\\"name\\\":\\\"Country.GovernmentForm\\\",\\\"index\\\":\\\"Country.GovernmentForm\\\",\\\"width\\\":100,\\\"sortable\\\":true,\\\"search\\\":true,\\\"searchoptions\\\":{\\\"required\\\":true,\\\"searchhidden\\\":true,\\\"stype\\\":\\\"text\\\",\\\"sopt\\\":[\\\"eq\\\",\\\"ne\\\",\\\"bw\\\",\\\"bn\\\",\\\"ew\\\",\\\"en\\\",\\\"cn\\\",\\\"nc\\\"],\\\"dataInit\\\":\\\"function(elem){ $(elem).datepicker({dateFormat:\\\\\\\"mm/dd/yyyy\\\\\\\"});}}\\\"},\\\"searchrules\\\":{\\\"number\\\":false,\\\"integer\\\":false,\\\"email\\\":false,\\\"date\\\":false,\\\"time\\\":false},\\\"title\\\":\\\"Country.GovernmentForm\\\",\\\"isFolder\\\":false,\\\"path\\\":\\\"Country.GovernmentForm\\\"},{\\\"name\\\":\\\"Country.HeadOfState\\\",\\\"index\\\":\\\"Country.HeadOfState\\\",\\\"width\\\":100,\\\"sortable\\\":true,\\\"search\\\":true,\\\"searchoptions\\\":{\\\"required\\\":true,\\\"searchhidden\\\":true,\\\"stype\\\":\\\"text\\\",\\\"sopt\\\":[\\\"eq\\\",\\\"ne\\\",\\\"bw\\\",\\\"bn\\\",\\\"ew\\\",\\\"en\\\",\\\"cn\\\",\\\"nc\\\"],\\\"dataInit\\\":\\\"function(elem){ $(elem).datepicker({dateFormat:\\\\\\\"mm/dd/yyyy\\\\\\\"});}}\\\"},\\\"searchrules\\\":{\\\"number\\\":false,\\\"integer\\\":false,\\\"email\\\":false,\\\"date\\\":false,\\\"time\\\":false},\\\"title\\\":\\\"Country.HeadOfState\\\",\\\"isFolder\\\":false,\\\"path\\\":\\\"Country.HeadOfState\\\"},{\\\"name\\\":\\\"Country.Capital\\\",\\\"index\\\":\\\"Country.Capital\\\",\\\"width\\\":100,\\\"sortable\\\":true,\\\"search\\\":true,\\\"searchoptions\\\":{\\\"required\\\":true,\\\"searchhidden\\\":true,\\\"stype\\\":\\\"text\\\",\\\"sopt\\\":[\\\"eq\\\",\\\"ne\\\",\\\"lt\\\",\\\"le\\\",\\\"gt\\\",\\\"ge\\\"],\\\"dataInit\\\":\\\"function(elem){ $(elem).datepicker({dateFormat:\\\\\\\"mm/dd/yyyy\\\\\\\"});}}\\\"},\\\"searchrules\\\":{\\\"number\\\":false,\\\"integer\\\":true,\\\"email\\\":false,\\\"date\\\":false,\\\"time\\\":false},\\\"title\\\":\\\"Country.Capital\\\",\\\"isFolder\\\":false,\\\"path\\\":\\\"Country.Capital\\\"},{\\\"name\\\":\\\"Country.Code2\\\",\\\"index\\\":\\\"Country.Code2\\\",\\\"width\\\":100,\\\"sortable\\\":true,\\\"search\\\":true,\\\"searchoptions\\\":{\\\"required\\\":true,\\\"searchhidden\\\":true,\\\"stype\\\":\\\"text\\\",\\\"sopt\\\":[\\\"eq\\\",\\\"ne\\\",\\\"bw\\\",\\\"bn\\\",\\\"ew\\\",\\\"en\\\",\\\"cn\\\",\\\"nc\\\"],\\\"dataInit\\\":\\\"function(elem){ $(elem).datepicker({dateFormat:\\\\\\\"mm/dd/yyyy\\\\\\\"});}}\\\"},\\\"searchrules\\\":{\\\"number\\\":false,\\\"integer\\\":false,\\\"email\\\":false,\\\"date\\\":false,\\\"time\\\":false},\\\"title\\\":\\\"Country.Code2\\\",\\\"isFolder\\\":false,\\\"path\\\":\\\"Country.Code2\\\"},{\\\"name\\\":\\\"City.ID\\\",\\\"index\\\":\\\"City.ID\\\",\\\"width\\\":100,\\\"sortable\\\":true,\\\"search\\\":true,\\\"searchoptions\\\":{\\\"required\\\":true,\\\"searchhidden\\\":true,\\\"stype\\\":\\\"text\\\",\\\"sopt\\\":[\\\"eq\\\",\\\"ne\\\",\\\"lt\\\",\\\"le\\\",\\\"gt\\\",\\\"ge\\\"],\\\"dataInit\\\":\\\"function(elem){ $(elem).datepicker({dateFormat:\\\\\\\"mm/dd/yyyy\\\\\\\"});}}\\\"},\\\"searchrules\\\":{\\\"number\\\":false,\\\"integer\\\":true,\\\"email\\\":false,\\\"date\\\":false,\\\"time\\\":false},\\\"title\\\":\\\"City.ID\\\",\\\"isFolder\\\":false,\\\"path\\\":\\\"City.ID\\\"},{\\\"name\\\":\\\"City.Name\\\",\\\"index\\\":\\\"City.Name\\\",\\\"width\\\":100,\\\"sortable\\\":true,\\\"search\\\":true,\\\"searchoptions\\\":{\\\"required\\\":true,\\\"searchhidden\\\":true,\\\"stype\\\":\\\"text\\\",\\\"sopt\\\":[\\\"eq\\\",\\\"ne\\\",\\\"bw\\\",\\\"bn\\\",\\\"ew\\\",\\\"en\\\",\\\"cn\\\",\\\"nc\\\"],\\\"dataInit\\\":\\\"function(elem){ $(elem).datepicker({dateFormat:\\\\\\\"mm/dd/yyyy\\\\\\\"});}}\\\"},\\\"searchrules\\\":{\\\"number\\\":false,\\\"integer\\\":false,\\\"email\\\":false,\\\"date\\\":false,\\\"time\\\":false},\\\"title\\\":\\\"City.Name\\\",\\\"isFolder\\\":false,\\\"path\\\":\\\"City.Name\\\"},{\\\"name\\\":\\\"City.CountryCode\\\",\\\"index\\\":\\\"City.CountryCode\\\",\\\"width\\\":100,\\\"sortable\\\":true,\\\"search\\\":true,\\\"searchoptions\\\":{\\\"required\\\":true,\\\"searchhidden\\\":true,\\\"stype\\\":\\\"text\\\",\\\"sopt\\\":[\\\"eq\\\",\\\"ne\\\",\\\"bw\\\",\\\"bn\\\",\\\"ew\\\",\\\"en\\\",\\\"cn\\\",\\\"nc\\\"],\\\"dataInit\\\":\\\"function(elem){ $(elem).datepicker({dateFormat:\\\\\\\"mm/dd/yyyy\\\\\\\"});}}\\\"},\\\"searchrules\\\":{\\\"number\\\":false,\\\"integer\\\":false,\\\"email\\\":false,\\\"date\\\":false,\\\"time\\\":false},\\\"title\\\":\\\"City.CountryCode\\\",\\\"isFolder\\\":false,\\\"path\\\":\\\"City.CountryCode\\\"},{\\\"name\\\":\\\"City.District\\\",\\\"index\\\":\\\"City.District\\\",\\\"width\\\":100,\\\"sortable\\\":true,\\\"search\\\":true,\\\"searchoptions\\\":{\\\"required\\\":true,\\\"searchhidden\\\":true,\\\"stype\\\":\\\"text\\\",\\\"sopt\\\":[\\\"eq\\\",\\\"ne\\\",\\\"bw\\\",\\\"bn\\\",\\\"ew\\\",\\\"en\\\",\\\"cn\\\",\\\"nc\\\"],\\\"dataInit\\\":\\\"function(elem){ $(elem).datepicker({dateFormat:\\\\\\\"mm/dd/yyyy\\\\\\\"});}}\\\"},\\\"searchrules\\\":{\\\"number\\\":false,\\\"integer\\\":false,\\\"email\\\":false,\\\"date\\\":false,\\\"time\\\":false},\\\"title\\\":\\\"City.District\\\",\\\"isFolder\\\":false,\\\"path\\\":\\\"City.District\\\"},{\\\"name\\\":\\\"City.Population\\\",\\\"index\\\":\\\"City.Population\\\",\\\"width\\\":100,\\\"sortable\\\":true,\\\"search\\\":true,\\\"searchoptions\\\":{\\\"required\\\":true,\\\"searchhidden\\\":true,\\\"stype\\\":\\\"text\\\",\\\"sopt\\\":[\\\"eq\\\",\\\"ne\\\",\\\"lt\\\",\\\"le\\\",\\\"gt\\\",\\\"ge\\\"],\\\"dataInit\\\":\\\"function(elem){ $(elem).datepicker({dateFormat:\\\\\\\"mm/dd/yyyy\\\\\\\"});}}\\\"},\\\"searchrules\\\":{\\\"number\\\":false,\\\"integer\\\":true,\\\"email\\\":false,\\\"date\\\":false,\\\"time\\\":false},\\\"title\\\":\\\"City.Population\\\",\\\"isFolder\\\":false,\\\"path\\\":\\\"City.Population\\\"},{\\\"name\\\":\\\"CountryLanguage.CountryCode\\\",\\\"index\\\":\\\"CountryLanguage.CountryCode\\\",\\\"width\\\":100,\\\"sortable\\\":true,\\\"search\\\":true,\\\"searchoptions\\\":{\\\"required\\\":true,\\\"searchhidden\\\":true,\\\"stype\\\":\\\"text\\\",\\\"sopt\\\":[\\\"eq\\\",\\\"ne\\\",\\\"bw\\\",\\\"bn\\\",\\\"ew\\\",\\\"en\\\",\\\"cn\\\",\\\"nc\\\"],\\\"dataInit\\\":\\\"function(elem){ $(elem).datepicker({dateFormat:\\\\\\\"mm/dd/yyyy\\\\\\\"});}}\\\"},\\\"searchrules\\\":{\\\"number\\\":false,\\\"integer\\\":false,\\\"email\\\":false,\\\"date\\\":false,\\\"time\\\":false},\\\"title\\\":\\\"CountryLanguage.CountryCode\\\",\\\"isFolder\\\":false,\\\"path\\\":\\\"CountryLanguage.CountryCode\\\"},{\\\"name\\\":\\\"CountryLanguage.Language\\\",\\\"index\\\":\\\"CountryLanguage.Language\\\",\\\"width\\\":100,\\\"sortable\\\":true,\\\"search\\\":true,\\\"searchoptions\\\":{\\\"required\\\":true,\\\"searchhidden\\\":true,\\\"stype\\\":\\\"text\\\",\\\"sopt\\\":[\\\"eq\\\",\\\"ne\\\",\\\"bw\\\",\\\"bn\\\",\\\"ew\\\",\\\"en\\\",\\\"cn\\\",\\\"nc\\\"],\\\"dataInit\\\":\\\"function(elem){ $(elem).datepicker({dateFormat:\\\\\\\"mm/dd/yyyy\\\\\\\"});}}\\\"},\\\"searchrules\\\":{\\\"number\\\":false,\\\"integer\\\":false,\\\"email\\\":false,\\\"date\\\":false,\\\"time\\\":false},\\\"title\\\":\\\"CountryLanguage.Language\\\",\\\"isFolder\\\":false,\\\"path\\\":\\\"CountryLanguage.Language\\\"},{\\\"name\\\":\\\"CountryLanguage.IsOfficial\\\",\\\"index\\\":\\\"CountryLanguage.IsOfficial\\\",\\\"width\\\":100,\\\"sortable\\\":true,\\\"search\\\":true,\\\"searchoptions\\\":{\\\"required\\\":true,\\\"searchhidden\\\":true,\\\"stype\\\":\\\"text\\\",\\\"sopt\\\":[\\\"eq\\\",\\\"ne\\\",\\\"bw\\\",\\\"bn\\\",\\\"ew\\\",\\\"en\\\",\\\"cn\\\",\\\"nc\\\"],\\\"dataInit\\\":\\\"function(elem){ $(elem).datepicker({dateFormat:\\\\\\\"mm/dd/yyyy\\\\\\\"});}}\\\"},\\\"searchrules\\\":{\\\"number\\\":false,\\\"integer\\\":false,\\\"email\\\":false,\\\"date\\\":false,\\\"time\\\":false},\\\"title\\\":\\\"CountryLanguage.IsOfficial\\\",\\\"isFolder\\\":false,\\\"path\\\":\\\"CountryLanguage.IsOfficial\\\"},{\\\"name\\\":\\\"CountryLanguage.Percentage\\\",\\\"index\\\":\\\"CountryLanguage.Percentage\\\",\\\"width\\\":100,\\\"sortable\\\":true,\\\"search\\\":true,\\\"searchoptions\\\":{\\\"required\\\":true,\\\"searchhidden\\\":true,\\\"stype\\\":\\\"text\\\",\\\"sopt\\\":[\\\"eq\\\",\\\"ne\\\",\\\"lt\\\",\\\"le\\\",\\\"gt\\\",\\\"ge\\\"],\\\"dataInit\\\":\\\"function(elem){ $(elem).datepicker({dateFormat:\\\\\\\"mm/dd/yyyy\\\\\\\"});}}\\\"},\\\"searchrules\\\":{\\\"number\\\":true,\\\"integer\\\":false,\\\"email\\\":false,\\\"date\\\":false,\\\"time\\\":false},\\\"title\\\":\\\"CountryLanguage.Percentage\\\",\\\"isFolder\\\":false,\\\"path\\\":\\\"CountryLanguage.Percentage\\\"}],\\\"rowNum\\\":10,\\\"rowList\\\":[10,20,30],\\\"viewrecords\\\":true,\\\"caption\\\":\\\"test\\\",\\\"autowidth\\\":true,\\\"sortname\\\":\\\"\\\",\\\"sortorder\\\":\\\"desc\\\",\\\"height\\\":\\\"auto\\\",\\\"postData\\\":{\\\"filters\\\":{\\\"groupOp\\\":\\\"AND\\\",\\\"rules\\\":[]},\\\"rows\\\":0,\\\"page\\\":0},\\\"jsonReader\\\":{\\\"id\\\":\\\"Name\\\",\\\"repeatitems\\\":false},\\\"settings\\\":{\\\"del\\\":false,\\\"add\\\":false,\\\"edit\\\":false,\\\"search\\\":true},\\\"toolbar\\\":[true,\\\"top\\\"]}\";\n\n\t\t// test whether the desired json data is written\n\t\tverify(mockOutstream).println(out);\n\n\t\t// some tests to check the structure of the json\n\t\tfinal Gson gson = new Gson();\n\t\tfinal Map<String, Object> map2 = gson.fromJson(out, Map.class);\n\t\tassertEquals(\"test\", map2.get(\"id\"));\n\t\tassertEquals(\"molgenis.do?__target\\u003dtest\\u0026__action\\u003ddownload_json\", map2.get(\"url\"));\n\t\tassertEquals(Arrays.asList(\"Country.Code\", \"Country.Name\", \"Country.Continent\", \"Country.Region\",\n\t\t\t\t\"Country.SurfaceArea\", \"Country.IndepYear\", \"Country.Population\", \"Country.LifeExpectancy\",\n\t\t\t\t\"Country.GNP\", \"Country.GNPOld\", \"Country.LocalName\", \"Country.GovernmentForm\", \"Country.HeadOfState\",\n\t\t\t\t\"Country.Capital\", \"Country.Code2\", \"City.ID\", \"City.Name\", \"City.CountryCode\", \"City.District\",\n\t\t\t\t\"City.Population\", \"CountryLanguage.CountryCode\", \"CountryLanguage.Language\",\n\t\t\t\t\"CountryLanguage.IsOfficial\", \"CountryLanguage.Percentage\"), map2.get(\"colNames\"));\n\t\tfinal Map<?, ?> countryCodeColumn = ((ArrayList<Map<?, ?>>) map2.get(\"colModel\")).get(0);\n\t\tassertEquals(\"Country.Code\", countryCodeColumn.get(\"name\"));\n\t\tassertEquals(\"Country.Code\", countryCodeColumn.get(\"index\"));\n\t\tassertEquals(\"Country.Code\", countryCodeColumn.get(\"title\"));\n\t\tassertEquals(\"Country.Code\", countryCodeColumn.get(\"path\"));\n\t\tassertEquals(Arrays.asList(\"eq\", \"ne\", \"bw\", \"bn\", \"ew\", \"en\", \"cn\", \"nc\"),\n\t\t\t\t((Map<?, ?>) countryCodeColumn.get(\"searchoptions\")).get(\"sopt\"));\n\t\tassertEquals(10.0, map2.get(\"rowNum\"));\n\t\tassertEquals(Arrays.asList(10.0, 20.0, 30.0), map2.get(\"rowList\"));\n\t\tassertEquals(\"desc\", map2.get(\"sortorder\"));\n\t}", "@Before\n public void setUp() {\n gridClient = new GridClient(\"admin\", \"Experitest2012\", \"\", \"http://localhost:8090\");\n client = gridClient.lockDeviceForExecution(\"Untitled\", \"@serialnumber='HT71C0200017'\", 120, TimeUnit.MINUTES.toMillis(2));\n client.setReporter(\"xml\", \"reports\" , \"Untitled\");\n }", "@Test\r\n\tpublic void testCheckRows() {\n\t\tGrid g = new Grid();\r\n\t\t// full bottom row\r\n\t\tfor (int col = 0; col < Grid.WIDTH; col++) {\r\n\t\t\tg.set(Grid.HEIGHT - 1, col, Color.GREEN);\r\n\t\t}\r\n\t\t// add two squares above the bottom row\r\n\t\tg.set(Grid.HEIGHT - 2, 3, Color.RED);\r\n\t\tg.set(Grid.HEIGHT - 3, 3, Color.RED);\r\n\t\t// remove the full row\r\n\t\tg.checkRows();\r\n\t\t// check that the grid has been updated correctly\r\n\t\tfor (int row = 0; row < Grid.HEIGHT; row++) {\r\n\t\t\tfor (int col = 0; col < Grid.WIDTH; col++) {\r\n\t\t\t\t// check the square at (row,col)\r\n\t\t\t\t// must have: (18,3) and (19,3) set\r\n\t\t\t\t// and all of the others not set\r\n\t\t\t\tif ((row == 18 || row == 19) && col == 3) {\r\n\t\t\t\t\tassertTrue(g.isSet(row, col));\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\tassertFalse(g.isSet(row, col));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Test\n public void testNumCellsSpreadingFromInsideGrid() {\n params = new CompletelySpatiallyRandomParams(0, 0.5);\n coloniser = new CompletelySpatiallyRandomColoniser(landCoverType, juvenilePine, juvenileOak,\n juvenileDeciduous, params);\n\n assertEquals(2, coloniser.getNumCellsColonisedFromInsideGrid(LscapeLayer.Oak));\n assertEquals(1, coloniser.getNumCellsColonisedFromInsideGrid(LscapeLayer.Pine));\n assertEquals(1, coloniser.getNumCellsColonisedFromInsideGrid(LscapeLayer.Deciduous));\n }", "public static void main(String[] args) {\n\t\tDynamicGrid<String> sgrid = new DynamicGrid<>();\n\t\tDynamicArray<String> srow = new DynamicArray<>();\n\t\tsrow.add(\"English\");\n\t\tsrow.add(\"Spanish\");\n\t\tsrow.add(\"German\");\n\t\tif (sgrid.getNumRow() == 0 && sgrid.getNumCol() == 0 && sgrid.addRow(0, srow) && sgrid.getNumRow() == 1\n\t\t\t\t&& sgrid.getNumCol() == 3) {\n\t\t\tSystem.out.println(\"Yay 1\");\n\t\t}\n\t\t// System.out.println(\"Number of sgrid rows is: \" + sgrid.getNumRow() +\n\t\t// \" Number of sgrid cols is: \" + sgrid.getNumCol());\n\t\t// sgrid.toString();\n\n\t\tif (sgrid.get(0, 0).equals(\"English\") && sgrid.set(0, 1, \"Espano\").equals(\"Spanish\")\n\t\t\t\t&& sgrid.get(0, 1).equals(\"Espano\")) {\n\t\t\tSystem.out.println(\"Yay 2\");\n\t\t}\n\t\t// sgrid.toString();\n\n\t\t// more complicated grids\n\t\tDynamicGrid<Integer> igrid = new DynamicGrid<Integer>();\n\t\tboolean ok = true;\n\t\t// System.out.println(\"Number of igrid rows is: \" + igrid.getNumRow() +\n\t\t// \" Number of sgrid cols is: \" + igrid.getNumCol());\n\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\tDynamicArray<Integer> irow = new DynamicArray<>();\n\t\t\tirow.add((i + 1) * 10);\n\t\t\tok = ok && igrid.addRow(igrid.getNumRow(), irow);\n\t\t\t// System.out.println(\"Addrow entry is: \" + ok + \" New row capacity\n\t\t\t// is: \" + irow.capacity() +\" Number of Rows is: \" +\n\t\t\t// igrid.getNumRow() + \" Number of Cols is: \" + igrid.getNumCol());\n\t\t}\n\t\t// System.out.println(\"Number of igrid rows is: \" + igrid.getNumRow() +\n\t\t// \" Number of sgrid cols is: \" + igrid.getNumCol() + \" Igrid at 2, 0\n\t\t// is: \" + igrid.get(2, 0));\n\n\t\tif (ok && igrid.getNumRow() == 3 && igrid.getNumCol() == 1 && igrid.get(2, 0) == 30) {\n\t\t\tSystem.out.println(\"Yay 3\");\n\t\t}\n\t\t// igrid.toString();\n\n\t\tDynamicArray<Integer> icol = new DynamicArray<>();\n\t\ticol.add(-10);\n\t\ticol.add(-20);\n\t\tok = igrid.addCol(1, icol);\n\t\ticol.add(-30);\n\t\t// System.out.println(\"Addcol entry is: \" + ok + \" Num of rows is: \" +\n\t\t// igrid.getNumRow() + \" Number of Cols is: \" + igrid.getNumCol());\n\t\tif (!ok && igrid.addCol(1, icol) && igrid.getNumRow() == 3 && igrid.getNumCol() == 2) {\n\t\t\tSystem.out.println(\"Yay 4\");\n\t\t}\n\t\t// igrid.toString();\n\n\t\tDynamicArray<Integer> irow = new DynamicArray<>();\n\t\tirow.add(5);\n\t\tirow.add(10);\n\n\t\tif (!igrid.addRow(5, irow) && igrid.addRow(0, irow) && igrid.getNumRow() == 4 && igrid.get(0, 0) == 5\n\t\t\t\t&& igrid.get(3, 1) == -30) {\n\t\t\tSystem.out.println(\"Yay 5\");\n\t\t}\n\t\t// System.out.println(\"Igrid at 0, 0 is \" + igrid.get(0,0) + \" Number of\n\t\t// Rows in igrid is: \" + igrid.getNumRow());\n\t\t// igrid.toString();\n\n\t\t// System.out.println(igrid.toString());\n\t\t// System.out.println(\" Number of Cols in igrid is: \" +\n\t\t// igrid.getNumCol() + \", \" + igrid.get(2,1));\n\n\t\tirow = igrid.removeCol(1);\n\t\t// System.out.println(\" Number of Rows in igrid is: \" +\n\t\t// igrid.getNumRow() + \" Number of Cols in igrid is: \" +\n\t\t// igrid.getNumCol());\n\n\t\tif (igrid.getNumRow() == 4 && igrid.getNumCol() == 1 && irow.get(0) == 10 && igrid.get(0, 0) == 5\n\t\t\t\t&& igrid.get(2, 0) == 20) {\n\t\t\tSystem.out.println(\"Yay 6\");\n\t\t}\n\t\t// igrid.toString();\n\n\t}", "private void drawGrid() {\r\n\t\t// loops through the 2d array of the grid.\r\n\t\tfor (int i = 0; i < TetrisGame.PANEL_WIDTH; i++) {\r\n\t\t\tfor (int j = 0; j < TetrisGame.PANEL_HEIGHT; j++) {\r\n\t\t\t\t// checks to see if the piece isn't empty, and draws the piece at it's position.\r\n\t\t\t\tif (game.grid[i][j] != Piece.PieceShape.E) {\r\n\t\t\t\t\tdrawSquare(i, j, Piece.getColor(game.grid[i][j]));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Test (enabled = false, groups = {\"smokeTest\"})\n public void testVerifyInternationalCountryOfOrigin() throws Exception {\n test = extent.createTest(\"Verify International Facts Country Of Origin\");\n driver.manage().timeouts().implicitlyWait(time_to_wait, TimeUnit.SECONDS);//this is global so no need to mention multiple times\n try {\n login.doLogin(test);\n WebElement helpButton = driver.findElement(By.cssSelector(\".explore-quiries-inner\"));\n helpButton.click();\n test.log(Status.INFO, \"Help button Clicked\");\n test.createNode(\"Help Button clicked\");\n Thread.sleep(5 * 1000);\n\n test.log(Status.INFO, \"Sunburst Shown\");\n WebElement International = driver.findElement(By.id(\"mainArc-0b981a1b-32dc-43b1-b257-70c8c5a6cc6d\"));\n International.click();\n test.log(Status.INFO, \"International Cluster Clicked on the Sunburst\");\n test.createNode(\"International cluster clicked\");\n Thread.sleep(5 * 1000);\n\n WebElement Countryoforigin = driver.findElement(By.id(\"mainArc-71ef3c15-be01-454d-bd1e-c59d13904a65\"));\n Countryoforigin.click();\n Thread.sleep(5 * 1000);\n test.log(Status.INFO, \"Country of Origin Element Clicked on the Sunburst\");\n test.createNode(\"Country of Origin clicked\");\n\n WebElement helpButtoncountry = driver.findElement(By.id(\"mainArc-466ed1b9-526b-45c7-a02c-e6d419ef606f\"));\n helpButtoncountry.click();\n Thread.sleep(5 * 1000);\n\n WebElement TabularView = driver.findElement(By.id(\"simple-tab-0\"));\n TabularView.click();\n Thread.sleep(4*1000);\n\n /// VALIDATION ///\n WebElement tr = driver.findElement(By.id(\"total-records-count\"));\n String value = tr.getText();\n System.out.println(\"total record->\"+value);\n if (Integer.parseInt(value) == 0) {\n test.log(Status.INFO, \"No Table should appear since no data fetched for given query\");\n Assert.assertEquals(0, 0);\n Assert.assertFalse(Integer.parseInt(value) == 0); // to fail, parameter has to be true (0 == 0) => so true; assertFalse(true) means failed test\n } else {\n test.log(Status.INFO, \"Table is shown with records since table records != 0\");\n Assert.assertEquals(Integer.parseInt(value) > 0, true); //setting to true since if it comes into this else, it is greater than 0 (can be any num greater than 0 so can't put set value for expected)\n Assert.assertTrue(Integer.parseInt(value) > 0);\n\n\n driver.findElement(By.xpath(\"//*[text()=' Total Records']\"));\n test.log(Status.INFO, \"Total Records found and table shown\");\n Thread.sleep(2 * 1000);\n test.createNode(\"Verified the table information is displayed when Country of origin is selected. \");\n\n WebElement Graphicalview = driver.findElement(By.id(\"simple-tab-1\"));\n Graphicalview.click(); // Clicks on Graphical View\n test.createNode(\"Grahical view clicked\");\n Thread.sleep(2 * 1000);\n\n WebElement Ograph = driver.findElement(By.id(\"simple-tab-2\"));\n Ograph.click(); // Clicks on Other Graphical View old one\n test.createNode(\"Other Graphical view clicked\");\n Thread.sleep(2 * 1000);\n\n WebElement Axis1 = driver.findElement(By.className(\"other-graph-axis-1-value\"));\n Axis1.click(); // Click Axis 1\n Thread.sleep(3 * 1000);\n test.createNode(\"clciked on Axis1\");\n driver.findElement(By.id(\"react-select-2-option-0\")).click(); // Click origin country\n Thread.sleep(2 * 1000);\n\n WebElement Axis2 = driver.findElement(By.className(\"other-graph-axis-2-value\"));\n Axis2.click(); // Click Axis 2\n test.createNode(\"clciked on Axis2\");\n Thread.sleep(3 * 1000);\n WebElement count = driver.findElement(By.id(\"react-select-3-option-0\"));\n count.click(); // Click count\n Thread.sleep(5 * 1000);\n\n WebElement Graph = driver.findElement(By.className(\"other-graph-type\"));\n Graph.click(); //Click graph\n test.createNode(\"clicked on graph\");\n Thread.sleep(3 * 1000);\n\n WebElement bubblegraph = driver.findElement(By.id(\"react-select-4-option-4\"));\n bubblegraph.click(); // Click bubble Graph\n Thread.sleep(4 * 1000);\n\n WebElement Show = driver.findElement(By.className(\"MuiButton-label\")); // Click Show\n test.createNode(\"clicked ON Show button \");\n Show.click();\n }\n\n\n } catch(\n Exception e)\n\n {\n test.createNode(\"Exception (\" + e.toString() + \") found\").fail(e);\n // e.printStackTrace();\n }\n\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}", "public void draw_grid() {\n for (int i = 0; i <= xNumTiles; i++) {\n stroke(100);\n line(i * tileSize, 0, i * tileSize, yNumTiles * tileSize);\n }\n\n for (int j = 0; j <= yNumTiles; j++) {\n stroke(100);\n line(0, j * tileSize, xNumTiles * tileSize, j * tileSize);\n }\n }", "private void displayGrid() {\r\n System.out.print(this.grid);\r\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tString driverPath = \"webdriver.chrome.driver\";\r\n\t String driverURL = \"D:\\\\Softwares\\\\Selenium\\\\chromedriver_win32\\\\chromedriver.exe\"; \r\n\t \r\n\t System.setProperty(driverPath, driverURL);\r\n\t \r\n\t WebDriver driver = new ChromeDriver();\r\n\t String baseUrl = \"D:\\\\Practice\\\\HTML\\\\Sample.html\"; \r\n\t driver.get(baseUrl);\r\n\t\t\r\n\t int totalRow = driver.findElements(By.xpath(\"html/body/table/tbody/tr/td/table/tbody/tr\")).size();\r\n\t int totalColumn = driver.findElements(By.xpath(\"html/body/table/tbody/tr/td/table/tbody/tr/th\")).size();\r\n\t System.out.println(\"Total Row : \"+totalRow);\r\n\t System.out.println(\"Total Column : \"+totalColumn);\r\n\t \r\n\t for (int i=2;i<=totalRow;i++)\r\n\t {\r\n\t \tfor(int j=1;j<=totalColumn;j++)\r\n\t \t{\r\n\t \t\tSystem.out.print(driver.findElement(By.xpath(\"html/body/table/tbody/tr/td/table/tbody/tr[\"+i+\"]/th[\"+j+\"]\")).getText());\r\n\t \t}\r\n\t \tSystem.out.println();\r\n\t }\r\n\t \r\n\t \r\n\t \r\n\t driver.quit();\r\n\t}", "@Test\n\tpublic void columnWin_test()\n\t{\n\t\tb.set(0,1, 'x');\n\t\tb.set(1,0, 'o');\n\t\tb.set(1,1, 'x');\n\t\tb.set(2,2, 'o');\n\t\tb.set(2,1, 'x');\n\t\tassertTrue(b.columnWin());\t\n\t}", "@Test(priority = 7, dependsOnMethods = { \"verifyColumnsOfGrid\" }, groups = { \"Smoke\" })\n\t public static void verifyNumberOfRecords() throws InterruptedException {\n\t\ttest = report.startTest(\"Verify Numbers of Records In grid\");\n\t\tint rows = driver.findElements(By.xpath(xpathRowInGrid)).size();\n\t\ttest.log(LogStatus.PASS, \"Number of Rows In Grid\", \"\" + rows + \"rows In Grid is displaying\");\n\t}", "public static void loadGrid(Window owner) {\n File file = GridLoaderSaver.fileChooser.showOpenDialog(owner);\n\n if (file != null) {\n String[] game = null;\n\n try (BufferedReader bufferedReader = Files.newBufferedReader(file.toPath())) {\n game = bufferedReader.readLine().split(\" \");\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n if (game != null) {\n int rows = Integer.parseInt(game[0]);\n int columns = Integer.parseInt(game[1]);\n int width = Integer.parseInt(game[2]);\n int height = Integer.parseInt(game[3]);\n int maxNumberOfStarts = Integer.parseInt(game[4]);\n int maxNumberOfEnds = Integer.parseInt(game[5]);\n int ends = 0;\n\n MouseGestures mouseGestures = new MouseGestures(game[6].equals(\"true\"));\n HashSet<Cell> starts = new HashSet<>();\n\n Grid grid = new Grid(starts, rows, columns, width, height, ends, maxNumberOfStarts, maxNumberOfEnds, mouseGestures, file);\n\n String[] stringCells = game[7].split(\"\");\n\n for (int i = 0, r = 0; r < rows; r++) {\n for (int c = 0; c < columns; c++, i++) {\n Point type = Point.values()[Integer.parseInt(stringCells[i])];\n\n grid.getCells()[r][c].setPoint(type);\n\n if (type != Point.EMPTY)\n grid.getCells()[r][c].getStyleClass().add(type.name().toLowerCase() + \"-cell\");\n\n if (type == Point.END)\n ends++;\n\n else if (type == Point.START)\n starts.add(grid.getCells()[r][c]);\n }\n }\n\n grid.setEnds(ends);\n\n Tab tab = new Tab(file.getName(), grid);\n\n ((TabPane) owner.getScene().getRoot()).getTabs().add(tab);\n\n\n }\n }\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 }", "public static void main(String[] args) {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"E:\\\\Chrome driver\\\\chromedriver.exe\");\r\n\t\tWebDriver driver=new ChromeDriver();\r\n\t\tdriver.manage().window().maximize();\r\n\t\t driver.get(\"http://demo.guru99.com/test/web-table-element.php\"); \r\n\t //No.of Columns\r\n\t List<WebElement> col = driver.findElements(By.xpath(\"//table/tbody/tr[1]/td\"));\r\n\t System.out.println(\"No of cols are : \" +col.size()); \r\n\t //No.of rows \r\n\t List<WebElement> rows = driver.findElements(By.xpath(\"//table/tbody/tr\")); \r\n\t System.out.println(\"No of rows are : \" + rows.size());\r\n\t \r\n\t for(int i=1;i<=rows.size();i++)\r\n{\r\n\t\r\n\t \tSystem.out.println(driver.findElement(By.xpath(\"//table/tbody/tr[\"+i+\"]\")).getText());\r\n\t \t\tfor(int j=1;i<=col.size();i++)\r\n \t{\r\n\t \t\tSystem.out.println(driver.findElement(By.xpath(\"//table/tbody/tr[\"+i+\"]/td[\"+j+\"]\")).getText());\r\n\r\n \t}\r\n \tSystem.out.println();\r\n\t \t\r\n\t \t\r\n\t \t}\r\ndriver.close();\r\n\t}", "@Test\n public void test11() throws Throwable {\n CategoryPlot categoryPlot0 = new CategoryPlot();\n AxisLocation axisLocation0 = categoryPlot0.getRangeAxisLocation();\n CategoryItemRenderer categoryItemRenderer0 = categoryPlot0.getRenderer(305);\n boolean boolean0 = categoryPlot0.isRangeGridlinesVisible();\n Button button0 = null;\n try {\n button0 = new Button((String) null);\n } catch(HeadlessException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n assertThrownBy(\"java.awt.GraphicsEnvironment\", e);\n }\n }", "public void createGrid() {\r\n generator.generate();\r\n }", "@Test\r\n\tpublic static void uiTesting()\r\n\t{\n\t\ttry\r\n\t\t{\r\n\r\n\t\t\tLog4J.logp.info(\"Started :::: uiTestting\");\r\n\t\t\tdriver.manage().window().setSize(new Dimension(1366, 768));\r\n\t\t\t/*landingp_webe.lnk_Coding.click();\r\n\t\t\tThread.sleep(2000);\r\n\t\t\tCommon_Lib.openCase(\"DB001\");\r\n\t\t\tThread.sleep(15000);\r\n\t\t\tCommon_Lib.rightclick_system_sugggested_evidence();\r\n\t\t\tThread.sleep(2000);\r\n\t\t\tmedicalrecordpnl_webe.lnk_discusswithcolleague.click();\r\n\t\t\tThread.sleep(2000);\r\n\t\t\tIssuePanel_Lib.send_DiscussWithColleague(\"DB001\");\r\n\t\t\tThread.sleep(2000);\r\n\t\t\tCommon_Lib.rightclick_system_sugggested_evidence();\r\n\t\t\tThread.sleep(2000);\r\n\t\t\tmedicalrecordpnl_webe.lnk_querytophysician.click();\r\n\t\t\tIssuePanel_Lib.send_QueryToPhysician(\"DB001\");\r\n\t\t\tThread.sleep(2000);\r\n\t\t\tissuepnl_webe.btn_Issues.click();\r\n\t\t\tThread.sleep(2000);\r\n\t\t\tgroupingpnl_webe.btn_Later.click();\r\n\t\t\tThread.sleep(3000);*/\r\n\t\t\tlandingp_webe.lnk_All.click();\r\n\t\t\tThread.sleep(2000);\r\n\t\t\tlandingp_webe.lnk_Reports.click();\r\n\t\t\tThread.sleep(2000);\r\n\t\t\tlandingp_webe.lnk_CodingDashboard.click();\r\n\t\t\tThread.sleep(2000);\r\n\t\t\tJavascriptExecutor jse;\r\n\t\t\tdriver = ExecutionSetup.getDriver();\r\n\t\t\tjse = (JavascriptExecutor) driver;\r\n\t\t\t//scroll downward\r\n\t\t\tjse.executeScript(\"window.scrollBy(0,80)\", \"\");\r\n\t\t\t//jse.executeScript(\"window.scrollBy(0,600)\", \"\");\r\n\t\t\tWebElement e = driver.findElement(By.id(\"dischargeMain\"));\r\n\t\t\t// Get entire page screenshot\r\n\t\t\tFile screenshot = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);\r\n\r\n\t\t\tFileUtils.copyFile(screenshot, new File(\"D:/images/GoogleLogo_screenshot_main.jpg\"));\r\n\t\t\tBufferedImage fullImg = ImageIO.read(screenshot);\r\n\t\t\t// Get the location of element in the page\r\n\t\t\tPoint point = e.getLocation();\r\n\t\t\tSystem.out.println(\"Point is = \" + point);\r\n\t\t\tint x = point.getX();\r\n\t\t\tSystem.out.println(\"X values is = \" + x);\r\n\t\t\tint y = point.getY();\r\n\t\t\tSystem.out.println(\"Y value is = \" + y);\r\n\t\t\t//Get width and height of the element\r\n\r\n\t\t\tint eleWidth = e.getSize().getWidth();\r\n\t\t\tSystem.out.println(\"Width is = \" + eleWidth);\r\n\t\t\tint eleHeight = e.getSize().getHeight();\r\n\t\t\tSystem.out.println(\"Height is = \" + eleHeight);\r\n\t\t\t//Crop the entire page screenshot to get only element screenshot\r\n\t\t\tSystem.out.println(\"x = \" + point.getX() + \" y = \" + point.getY() + \"width = \" + e.getSize().getWidth() + \"height =\" + e.getSize().getHeight());\r\n\t\t\tThread.sleep(3000);\r\n\t\t\tBufferedImage eleScreenshot = fullImg.getSubimage(point.getX(), point.getY() - 80, e.getSize().getWidth(), e.getSize().getHeight());\r\n\t\t\tThread.sleep(3000);\r\n\t\t\tFile ak = new File(\"image.jpg\");\r\n\t\t\tImageIO.write(eleScreenshot, \"jpg\", ak);\r\n\t\t\tFileUtils.copyFile(ak, new File(\"D:\\\\images\\\\sample.jpg\"));\r\n\t\t\t//ImageIO.write(eleScreenshot, \"png\", screenshot);\r\n\t\t\tBufferedImage img1 = Dashboard_Lib.resize(eleScreenshot, 1295, 488);\r\n\t\t\tThread.sleep(3000);\r\n\t\t\tFile outputfile = new File(\"image.jpg\");\r\n\t\t\tImageIO.write(img1, \"jpg\", outputfile);\r\n\r\n\t\t\t//Copy the element screenshot to disk\r\n\t\t\t// Expected image\r\n\t\t\tFileUtils.copyFile(outputfile, new File(\"D:\\\\images\\\\akash.jpg\"));\r\n\r\n\t\t\tString file1 = \"D:\\\\images\\\\akash.jpg\";\r\n\t\t\tString file2 = \"D:\\\\images\\\\gupta.jpg\";\r\n\r\n\t\t\t// Comparing the two images for number of bands, width & Height\r\n\r\n\t\t\tImage pic1 = Toolkit.getDefaultToolkit().getImage(file1);\r\n\t\t\tImage pic2 = Toolkit.getDefaultToolkit().getImage(file2);\r\n\r\n\t\t\ttry\r\n\t\t\t{\r\n\r\n\t\t\t\tPixelGrabber grab11 = new PixelGrabber(pic1, 0, 0, -1, -1, false);\r\n\t\t\t\tPixelGrabber grab21 = new PixelGrabber(pic2, 0, 0, -1, -1, false);\r\n\r\n\t\t\t\tint[] array1 = null;\r\n\r\n\t\t\t\tif (grab11.grabPixels())\r\n\t\t\t\t{\r\n\t\t\t\t\tint width = grab11.getWidth();\r\n\t\t\t\t\tSystem.out.println(\"Width of Image 1 = \" + width);\r\n\t\t\t\t\tint height = grab11.getHeight();\r\n\t\t\t\t\tSystem.out.println(\"Height of Image 1 = \" + height);\r\n\t\t\t\t\tarray1 = new int[width * height];\r\n\t\t\t\t\tarray1 = (int[]) grab11.getPixels();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tint[] array2 = null;\r\n\r\n\t\t\t\tif (grab21.grabPixels())\r\n\t\t\t\t{\r\n\t\t\t\t\tint width = grab21.getWidth();\r\n\t\t\t\t\tSystem.out.println(\"Width of Image 2 = \" + width);\r\n\t\t\t\t\tint height = grab21.getHeight();\r\n\t\t\t\t\tSystem.out.println(\"Height of Image 2 = \" + height);\r\n\t\t\t\t\tarray2 = new int[width * height];\r\n\t\t\t\t\tarray2 = (int[]) grab21.getPixels();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tSystem.out.println(array1.length);\r\n\r\n\t\t\t\tSystem.out.println(array2.length);\r\n\r\n\t\t\t\tfor (int i = 0; i < array2.length; i++)\r\n\t\t\t\t{\r\n\t\t\t\t\tif (array1[i] != array2[i])\r\n\t\t\t\t\t{\r\n\r\n\t\t\t\t\t\tSystem.out.println(array1[i] + \" ! =\" + array2[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tSystem.out.println(\"Pixels equal: \" + java.util.Arrays.equals(array1, array2));\r\n\r\n\t\t\t}\r\n\t\t\tcatch (InterruptedException e1)\r\n\t\t\t{\r\n\t\t\t\te1.printStackTrace();\r\n\t\t\t}\r\n\t\t\tLog4J.logp.info(\"Ended :::: uiTestting\");\r\n\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\t// report error\r\n\t\t\te.printStackTrace();\r\n\r\n\t\t}\r\n\t}", "@Test\n\tpublic final void testProcGridSize() throws MPIException {\n\t\tfor (int d=0; d<DIMENSIONALITY; d++) {\n\t\t\tassertTrue(0 < block.procGridSize(d)\n\t\t\t\t\t&& block.procGridSize(d) <= MPI.COMM_WORLD.getSize());\n\t\t}\n\t}", "public void test3() throws ClassNotFoundException, SQLException {\r\n\t\tsqlTable tbl = new sqlTable();\r\n\t\ttbl.printInAplication(\"SELECT * FROM metropolises WHERE metropolis = \" + \"\\\"Mumbai\" + \"\\\";\");\r\n\t\tassertTrue(tbl.getGrid().get(0).get(1).equals(\"Asia\"));\r\n\t\ttbl.printInAplication(\"SELECT * FROM metropolises WHERE metropolis = \" + \"\\\"New York\" + \"\\\";\");\r\n\t\tassertTrue(tbl.getGrid().get(0).get(1).equals(\"North America\"));\r\n\t\ttbl.printInAplication(\"SELECT * FROM metropolises WHERE population >= \" + 20400000 +\";\"); \r\n\t\tassertTrue(tbl.getGrid().get(0).get(0).equals(\"Mumbai\"));\r\n\t\ttbl.printInAplication(\"SELECT * FROM metropolises WHERE population >= \" + 21000000 +\";\");\r\n\t\tassertTrue(tbl.getGrid().get(0).get(0).equals(\"New York\"));\r\n\t}", "public static void main(String[] args) {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"D:\\\\chromedriver_win32 (3)\\\\chromedriver.exe\");\n\t\t driver=new ChromeDriver();\n\t\t driver.get(\"https://rahulshettyacademy.com/AutomationPractice/\");\n\t\t\tdriver.manage().window().maximize();\n\t\t\tdriver.manage().timeouts().implicitlyWait(10,TimeUnit.SECONDS);\n\tint columns=driver.findElements(By.xpath(\"//table[@name='courses']/tbody/tr/th\")).size();\n\tSystem.out.println(\"columnc count\"+columns);\n\tint rows=driver.findElements(By.xpath(\"//table[@name='courses']/tbody/tr\")).size();\n\tSystem.out.println(\"rows count\"+rows);\n\t//2nd row content\n\tSystem.out.println(driver.findElement(By.xpath(\"//table[@name='courses']/tbody/tr[2]\")).getText());\n\t}", "public void test2() throws ClassNotFoundException, SQLException {\r\n\t\tsqlTable tbl = new sqlTable();\r\n\t\ttbl.printInAplication(\"SELECT * FROM metropolises WHERE metropolis like \" + \"\\\"%m%\" + \"\\\";\");\r\n\t\tVector<Object> v1 = tbl.getGrid().get(0);\r\n\t\tVector<Object> v2 = tbl.getGrid().get(1);\r\n\t\tVector<Object> v3 = tbl.getGrid().get(2);\r\n\t\tassertTrue(v1.get(0).equals(\"Mumbai\"));\r\n\t\tassertTrue(v2.get(0).equals(\"Rome\")); \r\n\t\tassertTrue(v3.get(0).equals(\"Melbourne\"));\r\n\t}", "@Test\r\n public void Test008MakeLiveCell()\r\n {\r\n\r\n assertTrue(gol.makeLiveCell(3, 4));\r\n\r\n }", "public void displayGrid ()\n {\n for (int i = 0; i < getDimX(); i++) {\n System.out.print(\"[ \");\n for (int y = 0; y < getDimY(); y++) {\n System.out.print(m_grid[i][y]);\n System.out.print(\" \");\n }\n System.out.println(\"]\");\n }\n }", "@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 }", "@And(\"we click on the first product in search grid in mobile\")\n public void weClickOnTheFirstProductInSearchGridInMobile() throws InterruptedException {\n\n Thread.sleep(3000);\n //BrowserUtilities.promotionHandler();\n //commonMethods.clickWhenVisible(ProductDetailsPage.firstProductInGrid, timeout);\n WebElement firstProd = Base.getDriver().findElement(ProductDetailsPage.firstProductInGrid);\n JavascriptExecutor js=(JavascriptExecutor)Base.getDriver();\n js.executeScript(\"arguments[0].scrollIntoView(true);\",firstProd);\n js.executeScript(\"arguments[0].style.border='3px solid red'\",firstProd);\n js.executeScript(\"arguments[0].click();\", firstProd);\n\n }", "@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}", "@Test\n public void TestPlaceSourceSuccess() throws Exception {\n for (int i = 0; i < HEIGHT; i++) {\n assertTrue(heatGrid.placeSource(\"f\", i, i));\n }\n }", "@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 void test4() throws ClassNotFoundException, SQLException {\r\n\t\tsqlTable tbl = new sqlTable();\r\n\t\ttbl.printInAplication(\"SELECT * FROM metropolises WHERE metropolis like \" + \"\\\"m%\" + \"\\\"\" + \" and continent like \" + \"\\\"%u%\" + \"\\\";\");\r\n\t\tassertTrue(tbl.getGrid().get(0).get(0).equals(\"Melbourne\"));\r\n\t}", "@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 }", "@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}", "@Test(groups={\"ut\"})\r\n\tpublic void testCreateDefaultCapabilitiesWithNodeTagsInGridMode() {\r\n\t\tSeleniumTestsContext context = new SeleniumTestsContext(SeleniumTestsContextManager.getThreadContext());\r\n\t\tcontext.setBrowser(BrowserType.CHROME.toString());\r\n\t\tcontext.setNodeTags(\"foo,bar\");\r\n\t\tcontext.setRunMode(\"grid\");\r\n\t\tcontext.setMobilePlatformVersion(\"8.0\");\r\n\t\tcontext.setPlatform(\"android\");\r\n\t\tcontext.setDeviceName(\"Samsung Galasy S8\");\r\n\t\tcontext.setApp(\"\");\r\n\t\t\r\n\t\tDriverConfig config = new DriverConfig(context);\r\n\t\t\r\n\t\tAndroidCapabilitiesFactory capaFactory = new AndroidCapabilitiesFactory(config);\r\n\t\tMutableCapabilities capa = capaFactory.createCapabilities();\r\n\t\t\r\n\t\tAssert.assertEquals(capa.getCapability(SeleniumRobotCapabilityType.NODE_TAGS), Arrays.asList(\"foo\", \"bar\"));\r\n\t}", "public void initGrid()\n {\n\tfor (int y=0; y<cases.length; y++)\n \t{\n for (int x=0; x<cases[y].length; x++)\n {\n\t\tcases[y][x] = new Case();\n }\n\t}\n\t\n\tint pos_y_case1 = customRandom(4);\n\tint pos_x_case1 = customRandom(4);\n\t\n\tint pos_y_case2 = customRandom(4);\n\tint pos_x_case2 = customRandom(4);\n\t\t\n\twhile ((pos_y_case1 == pos_y_case2) && (pos_x_case1 == pos_x_case2))\n\t{\n pos_y_case2 = customRandom(4);\n pos_x_case2 = customRandom(4);\n\t}\n\t\t\n\tcases[pos_y_case1][pos_x_case1] = new Case(true);\n\tcases[pos_y_case2][pos_x_case2] = new Case(true);\n }", "@Test\r\n public void Test007TakeUserInputInValidRowColumn()\r\n {\r\n gol.input = new Scanner(new ByteArrayInputStream(\"2 1 20 20 2 3 2 4 -1\".getBytes()));\r\n gol.takeUserInput();\r\n assertTrue(gol.grid[2][1] == 1 && gol.grid[2][3] == 1 && gol.grid[2][4] == 1);\r\n }", "@Test\n public void testSimpleSelection() throws Exception {\n Document dom = getAsDOM(\"wcs?service=WCS&version=2.0.1&request=GetCoverage&coverageId=sf__timeranges_granule_time_domainsRanges.4&outputFormat=&format=application%2Fgml%2Bxml\");\n // print(dom);\n Assert.assertEquals(\"1\", WCSEOTestSupport.xpath.evaluate(\"count(/gml:RectifiedGridCoverage)\", dom));\n }", "@Test\r\n public void Test006TakeUserInputInValidColumn()\r\n {\r\n gol.input = new Scanner(new ByteArrayInputStream(\"2 1 2 20 2 3 2 4 -1\".getBytes()));\r\n gol.takeUserInput();\r\n assertTrue(gol.grid[2][1] == 1 && gol.grid[2][3] == 1 && gol.grid[2][4] == 1);\r\n }", "public void updateGridX();", "public static void main(String[] args) {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"E:\\\\Softwares\\\\Chromedriver.exe\");\n\t\tWebDriver driver = new ChromeDriver();\n\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\t\tdriver.get(\"http://toolsqa.wpengine.com/automation-practice-table\");\t\t\n\t\t\t\t\n\t\tfor (int i=1;i<5;i++){\n\t\t\tString sValue = null;\n\t\t\tsValue = driver.findElement(By.xpath(\".//*[@id='content']/table/tbody/tr[\" + i + \"]/th\")).getText();\n\t\t\tSystem.out.println(sValue);\n\t\t\t\n\t\t\t\t\t// If the sValue match with the description, it will initiate one more inner loop for all the columns of 'i' row \n\t\t\t\t\tfor (int j=1;j<=5;j++){\n\t\t\t\t\t\tString sColumnValue= driver.findElement(By.xpath(\".//*[@id='content']/table/tbody/tr[\" + i + \"]/td[\"+ j +\"]\")).getText();\n\t\t\t\t\t\tSystem.out.println(sColumnValue);\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\tdriver.close();\n\n\t}", "@Test(timeout = 4000)\n public void test096() throws Throwable {\n ResultMatrixGnuPlot resultMatrixGnuPlot0 = new ResultMatrixGnuPlot();\n assertEquals(0, resultMatrixGnuPlot0.getCountWidth());\n assertEquals(1, resultMatrixGnuPlot0.getVisibleColCount());\n assertTrue(resultMatrixGnuPlot0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixGnuPlot0.showAverageTipText());\n assertFalse(resultMatrixGnuPlot0.getRemoveFilterName());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixGnuPlot0.printRowNamesTipText());\n assertTrue(resultMatrixGnuPlot0.getPrintColNames());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixGnuPlot0.meanPrecTipText());\n assertEquals(2, resultMatrixGnuPlot0.getDefaultStdDevPrec());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultSignificanceWidth());\n assertFalse(resultMatrixGnuPlot0.getDefaultRemoveFilterName());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixGnuPlot0.countWidthTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixGnuPlot0.colNameWidthTipText());\n assertEquals(2, resultMatrixGnuPlot0.getDefaultMeanPrec());\n assertFalse(resultMatrixGnuPlot0.getEnumerateColNames());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultStdDevWidth());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixGnuPlot0.enumerateRowNamesTipText());\n assertEquals(1, resultMatrixGnuPlot0.getVisibleRowCount());\n assertEquals(50, resultMatrixGnuPlot0.getDefaultColNameWidth());\n assertFalse(resultMatrixGnuPlot0.getDefaultShowAverage());\n assertEquals(2, resultMatrixGnuPlot0.getStdDevPrec());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultMeanWidth());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixGnuPlot0.stdDevWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getDefaultShowStdDev());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixGnuPlot0.meanWidthTipText());\n assertTrue(resultMatrixGnuPlot0.getDefaultPrintRowNames());\n assertEquals(1, resultMatrixGnuPlot0.getColCount());\n assertEquals(\"Generates output for a data and script file for GnuPlot.\", resultMatrixGnuPlot0.globalInfo());\n assertEquals(1, resultMatrixGnuPlot0.getRowCount());\n assertEquals(0, resultMatrixGnuPlot0.getSignificanceWidth());\n assertFalse(resultMatrixGnuPlot0.getEnumerateRowNames());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultCountWidth());\n assertTrue(resultMatrixGnuPlot0.getDefaultPrintColNames());\n assertEquals(50, resultMatrixGnuPlot0.getRowNameWidth());\n assertEquals(\"GNUPlot\", resultMatrixGnuPlot0.getDisplayName());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixGnuPlot0.showStdDevTipText());\n assertFalse(resultMatrixGnuPlot0.getShowAverage());\n assertEquals(0, resultMatrixGnuPlot0.getStdDevWidth());\n assertFalse(resultMatrixGnuPlot0.getDefaultEnumerateColNames());\n assertFalse(resultMatrixGnuPlot0.getDefaultEnumerateRowNames());\n assertEquals(50, resultMatrixGnuPlot0.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixGnuPlot0.getMeanWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixGnuPlot0.significanceWidthTipText());\n assertEquals(2, resultMatrixGnuPlot0.getMeanPrec());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixGnuPlot0.printColNamesTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixGnuPlot0.enumerateColNamesTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixGnuPlot0.removeFilterNameTipText());\n assertEquals(50, resultMatrixGnuPlot0.getColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixGnuPlot0.stdDevPrecTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixGnuPlot0.rowNameWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getShowStdDev());\n assertNotNull(resultMatrixGnuPlot0);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n \n ResultMatrixSignificance resultMatrixSignificance0 = new ResultMatrixSignificance(resultMatrixGnuPlot0);\n assertEquals(0, resultMatrixGnuPlot0.getCountWidth());\n assertEquals(1, resultMatrixGnuPlot0.getVisibleColCount());\n assertTrue(resultMatrixGnuPlot0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixGnuPlot0.showAverageTipText());\n assertFalse(resultMatrixGnuPlot0.getRemoveFilterName());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixGnuPlot0.printRowNamesTipText());\n assertTrue(resultMatrixGnuPlot0.getPrintColNames());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixGnuPlot0.meanPrecTipText());\n assertEquals(2, resultMatrixGnuPlot0.getDefaultStdDevPrec());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultSignificanceWidth());\n assertFalse(resultMatrixGnuPlot0.getDefaultRemoveFilterName());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixGnuPlot0.countWidthTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixGnuPlot0.colNameWidthTipText());\n assertEquals(2, resultMatrixGnuPlot0.getDefaultMeanPrec());\n assertFalse(resultMatrixGnuPlot0.getEnumerateColNames());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultStdDevWidth());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixGnuPlot0.enumerateRowNamesTipText());\n assertEquals(1, resultMatrixGnuPlot0.getVisibleRowCount());\n assertEquals(50, resultMatrixGnuPlot0.getDefaultColNameWidth());\n assertFalse(resultMatrixGnuPlot0.getDefaultShowAverage());\n assertEquals(2, resultMatrixGnuPlot0.getStdDevPrec());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultMeanWidth());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixGnuPlot0.stdDevWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getDefaultShowStdDev());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixGnuPlot0.meanWidthTipText());\n assertTrue(resultMatrixGnuPlot0.getDefaultPrintRowNames());\n assertEquals(1, resultMatrixGnuPlot0.getColCount());\n assertEquals(\"Generates output for a data and script file for GnuPlot.\", resultMatrixGnuPlot0.globalInfo());\n assertEquals(1, resultMatrixGnuPlot0.getRowCount());\n assertEquals(0, resultMatrixGnuPlot0.getSignificanceWidth());\n assertFalse(resultMatrixGnuPlot0.getEnumerateRowNames());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultCountWidth());\n assertTrue(resultMatrixGnuPlot0.getDefaultPrintColNames());\n assertEquals(50, resultMatrixGnuPlot0.getRowNameWidth());\n assertEquals(\"GNUPlot\", resultMatrixGnuPlot0.getDisplayName());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixGnuPlot0.showStdDevTipText());\n assertFalse(resultMatrixGnuPlot0.getShowAverage());\n assertEquals(0, resultMatrixGnuPlot0.getStdDevWidth());\n assertFalse(resultMatrixGnuPlot0.getDefaultEnumerateColNames());\n assertFalse(resultMatrixGnuPlot0.getDefaultEnumerateRowNames());\n assertEquals(50, resultMatrixGnuPlot0.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixGnuPlot0.getMeanWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixGnuPlot0.significanceWidthTipText());\n assertEquals(2, resultMatrixGnuPlot0.getMeanPrec());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixGnuPlot0.printColNamesTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixGnuPlot0.enumerateColNamesTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixGnuPlot0.removeFilterNameTipText());\n assertEquals(50, resultMatrixGnuPlot0.getColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixGnuPlot0.stdDevPrecTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixGnuPlot0.rowNameWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getShowStdDev());\n assertFalse(resultMatrixSignificance0.getRemoveFilterName());\n assertEquals(1, resultMatrixSignificance0.getColCount());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixSignificance0.colNameWidthTipText());\n assertEquals(0, resultMatrixSignificance0.getCountWidth());\n assertFalse(resultMatrixSignificance0.getDefaultPrintColNames());\n assertEquals(1, resultMatrixSignificance0.getVisibleColCount());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixSignificance0.getDefaultStdDevWidth());\n assertFalse(resultMatrixSignificance0.getDefaultShowStdDev());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixSignificance0.removeFilterNameTipText());\n assertTrue(resultMatrixSignificance0.getPrintColNames());\n assertTrue(resultMatrixSignificance0.getPrintRowNames());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixSignificance0.printColNamesTipText());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixSignificance0.showAverageTipText());\n assertEquals(2, resultMatrixSignificance0.getDefaultMeanPrec());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixSignificance0.printRowNamesTipText());\n assertEquals(2, resultMatrixSignificance0.getDefaultStdDevPrec());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixSignificance0.meanPrecTipText());\n assertFalse(resultMatrixSignificance0.getEnumerateColNames());\n assertTrue(resultMatrixSignificance0.getDefaultEnumerateColNames());\n assertEquals(1, resultMatrixSignificance0.getVisibleRowCount());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixSignificance0.stdDevWidthTipText());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance0.enumerateRowNamesTipText());\n assertEquals(0, resultMatrixSignificance0.getDefaultSignificanceWidth());\n assertEquals(2, resultMatrixSignificance0.getStdDevPrec());\n assertFalse(resultMatrixSignificance0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixSignificance0.showStdDevTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixSignificance0.countWidthTipText());\n assertFalse(resultMatrixSignificance0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixSignificance0.getDefaultColNameWidth());\n assertEquals(0, resultMatrixSignificance0.getDefaultMeanWidth());\n assertFalse(resultMatrixSignificance0.getEnumerateRowNames());\n assertEquals(\"Only outputs the significance indicators. Can be used for spotting patterns.\", resultMatrixSignificance0.globalInfo());\n assertEquals(0, resultMatrixSignificance0.getSignificanceWidth());\n assertTrue(resultMatrixSignificance0.getDefaultPrintRowNames());\n assertFalse(resultMatrixSignificance0.getDefaultShowAverage());\n assertEquals(2, resultMatrixSignificance0.getMeanPrec());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixSignificance0.meanWidthTipText());\n assertEquals(1, resultMatrixSignificance0.getRowCount());\n assertEquals(\"Significance only\", resultMatrixSignificance0.getDisplayName());\n assertEquals(0, resultMatrixSignificance0.getDefaultCountWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixSignificance0.significanceWidthTipText());\n assertEquals(0, resultMatrixSignificance0.getStdDevWidth());\n assertFalse(resultMatrixSignificance0.getShowAverage());\n assertFalse(resultMatrixSignificance0.getShowStdDev());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixSignificance0.rowNameWidthTipText());\n assertEquals(50, resultMatrixSignificance0.getRowNameWidth());\n assertEquals(0, resultMatrixSignificance0.getMeanWidth());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixSignificance0.stdDevPrecTipText());\n assertEquals(0, resultMatrixSignificance0.getColNameWidth());\n assertEquals(40, resultMatrixSignificance0.getDefaultRowNameWidth());\n assertNotNull(resultMatrixSignificance0);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n \n ResultMatrixHTML resultMatrixHTML0 = new ResultMatrixHTML(resultMatrixSignificance0);\n assertEquals(0, resultMatrixGnuPlot0.getCountWidth());\n assertEquals(1, resultMatrixGnuPlot0.getVisibleColCount());\n assertTrue(resultMatrixGnuPlot0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixGnuPlot0.showAverageTipText());\n assertFalse(resultMatrixGnuPlot0.getRemoveFilterName());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixGnuPlot0.printRowNamesTipText());\n assertTrue(resultMatrixGnuPlot0.getPrintColNames());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixGnuPlot0.meanPrecTipText());\n assertEquals(2, resultMatrixGnuPlot0.getDefaultStdDevPrec());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultSignificanceWidth());\n assertFalse(resultMatrixGnuPlot0.getDefaultRemoveFilterName());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixGnuPlot0.countWidthTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixGnuPlot0.colNameWidthTipText());\n assertEquals(2, resultMatrixGnuPlot0.getDefaultMeanPrec());\n assertFalse(resultMatrixGnuPlot0.getEnumerateColNames());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultStdDevWidth());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixGnuPlot0.enumerateRowNamesTipText());\n assertEquals(1, resultMatrixGnuPlot0.getVisibleRowCount());\n assertEquals(50, resultMatrixGnuPlot0.getDefaultColNameWidth());\n assertFalse(resultMatrixGnuPlot0.getDefaultShowAverage());\n assertEquals(2, resultMatrixGnuPlot0.getStdDevPrec());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultMeanWidth());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixGnuPlot0.stdDevWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getDefaultShowStdDev());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixGnuPlot0.meanWidthTipText());\n assertTrue(resultMatrixGnuPlot0.getDefaultPrintRowNames());\n assertEquals(1, resultMatrixGnuPlot0.getColCount());\n assertEquals(\"Generates output for a data and script file for GnuPlot.\", resultMatrixGnuPlot0.globalInfo());\n assertEquals(1, resultMatrixGnuPlot0.getRowCount());\n assertEquals(0, resultMatrixGnuPlot0.getSignificanceWidth());\n assertFalse(resultMatrixGnuPlot0.getEnumerateRowNames());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultCountWidth());\n assertTrue(resultMatrixGnuPlot0.getDefaultPrintColNames());\n assertEquals(50, resultMatrixGnuPlot0.getRowNameWidth());\n assertEquals(\"GNUPlot\", resultMatrixGnuPlot0.getDisplayName());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixGnuPlot0.showStdDevTipText());\n assertFalse(resultMatrixGnuPlot0.getShowAverage());\n assertEquals(0, resultMatrixGnuPlot0.getStdDevWidth());\n assertFalse(resultMatrixGnuPlot0.getDefaultEnumerateColNames());\n assertFalse(resultMatrixGnuPlot0.getDefaultEnumerateRowNames());\n assertEquals(50, resultMatrixGnuPlot0.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixGnuPlot0.getMeanWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixGnuPlot0.significanceWidthTipText());\n assertEquals(2, resultMatrixGnuPlot0.getMeanPrec());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixGnuPlot0.printColNamesTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixGnuPlot0.enumerateColNamesTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixGnuPlot0.removeFilterNameTipText());\n assertEquals(50, resultMatrixGnuPlot0.getColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixGnuPlot0.stdDevPrecTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixGnuPlot0.rowNameWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getShowStdDev());\n assertFalse(resultMatrixSignificance0.getRemoveFilterName());\n assertEquals(1, resultMatrixSignificance0.getColCount());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixSignificance0.colNameWidthTipText());\n assertEquals(0, resultMatrixSignificance0.getCountWidth());\n assertFalse(resultMatrixSignificance0.getDefaultPrintColNames());\n assertEquals(1, resultMatrixSignificance0.getVisibleColCount());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixSignificance0.getDefaultStdDevWidth());\n assertFalse(resultMatrixSignificance0.getDefaultShowStdDev());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixSignificance0.removeFilterNameTipText());\n assertTrue(resultMatrixSignificance0.getPrintColNames());\n assertTrue(resultMatrixSignificance0.getPrintRowNames());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixSignificance0.printColNamesTipText());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixSignificance0.showAverageTipText());\n assertEquals(2, resultMatrixSignificance0.getDefaultMeanPrec());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixSignificance0.printRowNamesTipText());\n assertEquals(2, resultMatrixSignificance0.getDefaultStdDevPrec());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixSignificance0.meanPrecTipText());\n assertFalse(resultMatrixSignificance0.getEnumerateColNames());\n assertTrue(resultMatrixSignificance0.getDefaultEnumerateColNames());\n assertEquals(1, resultMatrixSignificance0.getVisibleRowCount());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixSignificance0.stdDevWidthTipText());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance0.enumerateRowNamesTipText());\n assertEquals(0, resultMatrixSignificance0.getDefaultSignificanceWidth());\n assertEquals(2, resultMatrixSignificance0.getStdDevPrec());\n assertFalse(resultMatrixSignificance0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixSignificance0.showStdDevTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixSignificance0.countWidthTipText());\n assertFalse(resultMatrixSignificance0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixSignificance0.getDefaultColNameWidth());\n assertEquals(0, resultMatrixSignificance0.getDefaultMeanWidth());\n assertFalse(resultMatrixSignificance0.getEnumerateRowNames());\n assertEquals(\"Only outputs the significance indicators. Can be used for spotting patterns.\", resultMatrixSignificance0.globalInfo());\n assertEquals(0, resultMatrixSignificance0.getSignificanceWidth());\n assertTrue(resultMatrixSignificance0.getDefaultPrintRowNames());\n assertFalse(resultMatrixSignificance0.getDefaultShowAverage());\n assertEquals(2, resultMatrixSignificance0.getMeanPrec());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixSignificance0.meanWidthTipText());\n assertEquals(1, resultMatrixSignificance0.getRowCount());\n assertEquals(\"Significance only\", resultMatrixSignificance0.getDisplayName());\n assertEquals(0, resultMatrixSignificance0.getDefaultCountWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixSignificance0.significanceWidthTipText());\n assertEquals(0, resultMatrixSignificance0.getStdDevWidth());\n assertFalse(resultMatrixSignificance0.getShowAverage());\n assertFalse(resultMatrixSignificance0.getShowStdDev());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixSignificance0.rowNameWidthTipText());\n assertEquals(50, resultMatrixSignificance0.getRowNameWidth());\n assertEquals(0, resultMatrixSignificance0.getMeanWidth());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixSignificance0.stdDevPrecTipText());\n assertEquals(0, resultMatrixSignificance0.getColNameWidth());\n assertEquals(40, resultMatrixSignificance0.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixHTML0.getSignificanceWidth());\n assertTrue(resultMatrixHTML0.getDefaultPrintRowNames());\n assertEquals(1, resultMatrixHTML0.getRowCount());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixHTML0.showStdDevTipText());\n assertEquals(50, resultMatrixHTML0.getRowNameWidth());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixHTML0.stdDevWidthTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultCountWidth());\n assertFalse(resultMatrixHTML0.getShowStdDev());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixHTML0.significanceWidthTipText());\n assertEquals(2, resultMatrixHTML0.getStdDevPrec());\n assertFalse(resultMatrixHTML0.getDefaultShowAverage());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixHTML0.meanWidthTipText());\n assertFalse(resultMatrixHTML0.getEnumerateRowNames());\n assertEquals(2, resultMatrixHTML0.getMeanPrec());\n assertEquals(0, resultMatrixHTML0.getMeanWidth());\n assertEquals(0, resultMatrixHTML0.getColNameWidth());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixHTML0.colNameWidthTipText());\n assertTrue(resultMatrixHTML0.getDefaultEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getStdDevWidth());\n assertFalse(resultMatrixHTML0.getShowAverage());\n assertFalse(resultMatrixHTML0.getDefaultPrintColNames());\n assertTrue(resultMatrixHTML0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixHTML0.showAverageTipText());\n assertTrue(resultMatrixHTML0.getPrintColNames());\n assertEquals(2, resultMatrixHTML0.getDefaultMeanPrec());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixHTML0.printRowNamesTipText());\n assertEquals(0, resultMatrixHTML0.getCountWidth());\n assertEquals(1, resultMatrixHTML0.getVisibleColCount());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixHTML0.meanPrecTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultColNameWidth());\n assertEquals(2, resultMatrixHTML0.getDefaultStdDevPrec());\n assertEquals(\"Generates the matrix output as HTML.\", resultMatrixHTML0.globalInfo());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixHTML0.printColNamesTipText());\n assertEquals(1, resultMatrixHTML0.getColCount());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixHTML0.rowNameWidthTipText());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixHTML0.stdDevPrecTipText());\n assertEquals(\"HTML\", resultMatrixHTML0.getDisplayName());\n assertFalse(resultMatrixHTML0.getRemoveFilterName());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateColNamesTipText());\n assertFalse(resultMatrixHTML0.getDefaultShowStdDev());\n assertEquals(1, resultMatrixHTML0.getVisibleRowCount());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixHTML0.removeFilterNameTipText());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateRowNamesTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultMeanWidth());\n assertFalse(resultMatrixHTML0.getEnumerateColNames());\n assertEquals(25, resultMatrixHTML0.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixHTML0.getDefaultStdDevWidth());\n assertFalse(resultMatrixHTML0.getDefaultRemoveFilterName());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixHTML0.countWidthTipText());\n assertFalse(resultMatrixHTML0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixHTML0.getDefaultSignificanceWidth());\n assertNotNull(resultMatrixHTML0);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n \n resultMatrixSignificance0.assign(resultMatrixHTML0);\n assertEquals(0, resultMatrixGnuPlot0.getCountWidth());\n assertEquals(1, resultMatrixGnuPlot0.getVisibleColCount());\n assertTrue(resultMatrixGnuPlot0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixGnuPlot0.showAverageTipText());\n assertFalse(resultMatrixGnuPlot0.getRemoveFilterName());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixGnuPlot0.printRowNamesTipText());\n assertTrue(resultMatrixGnuPlot0.getPrintColNames());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixGnuPlot0.meanPrecTipText());\n assertEquals(2, resultMatrixGnuPlot0.getDefaultStdDevPrec());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultSignificanceWidth());\n assertFalse(resultMatrixGnuPlot0.getDefaultRemoveFilterName());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixGnuPlot0.countWidthTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixGnuPlot0.colNameWidthTipText());\n assertEquals(2, resultMatrixGnuPlot0.getDefaultMeanPrec());\n assertFalse(resultMatrixGnuPlot0.getEnumerateColNames());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultStdDevWidth());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixGnuPlot0.enumerateRowNamesTipText());\n assertEquals(1, resultMatrixGnuPlot0.getVisibleRowCount());\n assertEquals(50, resultMatrixGnuPlot0.getDefaultColNameWidth());\n assertFalse(resultMatrixGnuPlot0.getDefaultShowAverage());\n assertEquals(2, resultMatrixGnuPlot0.getStdDevPrec());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultMeanWidth());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixGnuPlot0.stdDevWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getDefaultShowStdDev());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixGnuPlot0.meanWidthTipText());\n assertTrue(resultMatrixGnuPlot0.getDefaultPrintRowNames());\n assertEquals(1, resultMatrixGnuPlot0.getColCount());\n assertEquals(\"Generates output for a data and script file for GnuPlot.\", resultMatrixGnuPlot0.globalInfo());\n assertEquals(1, resultMatrixGnuPlot0.getRowCount());\n assertEquals(0, resultMatrixGnuPlot0.getSignificanceWidth());\n assertFalse(resultMatrixGnuPlot0.getEnumerateRowNames());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultCountWidth());\n assertTrue(resultMatrixGnuPlot0.getDefaultPrintColNames());\n assertEquals(50, resultMatrixGnuPlot0.getRowNameWidth());\n assertEquals(\"GNUPlot\", resultMatrixGnuPlot0.getDisplayName());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixGnuPlot0.showStdDevTipText());\n assertFalse(resultMatrixGnuPlot0.getShowAverage());\n assertEquals(0, resultMatrixGnuPlot0.getStdDevWidth());\n assertFalse(resultMatrixGnuPlot0.getDefaultEnumerateColNames());\n assertFalse(resultMatrixGnuPlot0.getDefaultEnumerateRowNames());\n assertEquals(50, resultMatrixGnuPlot0.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixGnuPlot0.getMeanWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixGnuPlot0.significanceWidthTipText());\n assertEquals(2, resultMatrixGnuPlot0.getMeanPrec());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixGnuPlot0.printColNamesTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixGnuPlot0.enumerateColNamesTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixGnuPlot0.removeFilterNameTipText());\n assertEquals(50, resultMatrixGnuPlot0.getColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixGnuPlot0.stdDevPrecTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixGnuPlot0.rowNameWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getShowStdDev());\n assertFalse(resultMatrixSignificance0.getRemoveFilterName());\n assertEquals(1, resultMatrixSignificance0.getColCount());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixSignificance0.colNameWidthTipText());\n assertEquals(0, resultMatrixSignificance0.getCountWidth());\n assertFalse(resultMatrixSignificance0.getDefaultPrintColNames());\n assertEquals(1, resultMatrixSignificance0.getVisibleColCount());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixSignificance0.getDefaultStdDevWidth());\n assertFalse(resultMatrixSignificance0.getDefaultShowStdDev());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixSignificance0.removeFilterNameTipText());\n assertTrue(resultMatrixSignificance0.getPrintColNames());\n assertTrue(resultMatrixSignificance0.getPrintRowNames());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixSignificance0.printColNamesTipText());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixSignificance0.showAverageTipText());\n assertEquals(2, resultMatrixSignificance0.getDefaultMeanPrec());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixSignificance0.printRowNamesTipText());\n assertEquals(2, resultMatrixSignificance0.getDefaultStdDevPrec());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixSignificance0.meanPrecTipText());\n assertFalse(resultMatrixSignificance0.getEnumerateColNames());\n assertTrue(resultMatrixSignificance0.getDefaultEnumerateColNames());\n assertEquals(1, resultMatrixSignificance0.getVisibleRowCount());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixSignificance0.stdDevWidthTipText());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance0.enumerateRowNamesTipText());\n assertEquals(0, resultMatrixSignificance0.getDefaultSignificanceWidth());\n assertEquals(2, resultMatrixSignificance0.getStdDevPrec());\n assertFalse(resultMatrixSignificance0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixSignificance0.showStdDevTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixSignificance0.countWidthTipText());\n assertFalse(resultMatrixSignificance0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixSignificance0.getDefaultColNameWidth());\n assertEquals(0, resultMatrixSignificance0.getDefaultMeanWidth());\n assertFalse(resultMatrixSignificance0.getEnumerateRowNames());\n assertEquals(\"Only outputs the significance indicators. Can be used for spotting patterns.\", resultMatrixSignificance0.globalInfo());\n assertEquals(0, resultMatrixSignificance0.getSignificanceWidth());\n assertTrue(resultMatrixSignificance0.getDefaultPrintRowNames());\n assertFalse(resultMatrixSignificance0.getDefaultShowAverage());\n assertEquals(2, resultMatrixSignificance0.getMeanPrec());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixSignificance0.meanWidthTipText());\n assertEquals(1, resultMatrixSignificance0.getRowCount());\n assertEquals(\"Significance only\", resultMatrixSignificance0.getDisplayName());\n assertEquals(0, resultMatrixSignificance0.getDefaultCountWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixSignificance0.significanceWidthTipText());\n assertEquals(0, resultMatrixSignificance0.getStdDevWidth());\n assertFalse(resultMatrixSignificance0.getShowAverage());\n assertFalse(resultMatrixSignificance0.getShowStdDev());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixSignificance0.rowNameWidthTipText());\n assertEquals(50, resultMatrixSignificance0.getRowNameWidth());\n assertEquals(0, resultMatrixSignificance0.getMeanWidth());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixSignificance0.stdDevPrecTipText());\n assertEquals(0, resultMatrixSignificance0.getColNameWidth());\n assertEquals(40, resultMatrixSignificance0.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixHTML0.getSignificanceWidth());\n assertTrue(resultMatrixHTML0.getDefaultPrintRowNames());\n assertEquals(1, resultMatrixHTML0.getRowCount());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixHTML0.showStdDevTipText());\n assertEquals(50, resultMatrixHTML0.getRowNameWidth());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixHTML0.stdDevWidthTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultCountWidth());\n assertFalse(resultMatrixHTML0.getShowStdDev());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixHTML0.significanceWidthTipText());\n assertEquals(2, resultMatrixHTML0.getStdDevPrec());\n assertFalse(resultMatrixHTML0.getDefaultShowAverage());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixHTML0.meanWidthTipText());\n assertFalse(resultMatrixHTML0.getEnumerateRowNames());\n assertEquals(2, resultMatrixHTML0.getMeanPrec());\n assertEquals(0, resultMatrixHTML0.getMeanWidth());\n assertEquals(0, resultMatrixHTML0.getColNameWidth());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixHTML0.colNameWidthTipText());\n assertTrue(resultMatrixHTML0.getDefaultEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getStdDevWidth());\n assertFalse(resultMatrixHTML0.getShowAverage());\n assertFalse(resultMatrixHTML0.getDefaultPrintColNames());\n assertTrue(resultMatrixHTML0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixHTML0.showAverageTipText());\n assertTrue(resultMatrixHTML0.getPrintColNames());\n assertEquals(2, resultMatrixHTML0.getDefaultMeanPrec());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixHTML0.printRowNamesTipText());\n assertEquals(0, resultMatrixHTML0.getCountWidth());\n assertEquals(1, resultMatrixHTML0.getVisibleColCount());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixHTML0.meanPrecTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultColNameWidth());\n assertEquals(2, resultMatrixHTML0.getDefaultStdDevPrec());\n assertEquals(\"Generates the matrix output as HTML.\", resultMatrixHTML0.globalInfo());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixHTML0.printColNamesTipText());\n assertEquals(1, resultMatrixHTML0.getColCount());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixHTML0.rowNameWidthTipText());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixHTML0.stdDevPrecTipText());\n assertEquals(\"HTML\", resultMatrixHTML0.getDisplayName());\n assertFalse(resultMatrixHTML0.getRemoveFilterName());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateColNamesTipText());\n assertFalse(resultMatrixHTML0.getDefaultShowStdDev());\n assertEquals(1, resultMatrixHTML0.getVisibleRowCount());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixHTML0.removeFilterNameTipText());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateRowNamesTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultMeanWidth());\n assertFalse(resultMatrixHTML0.getEnumerateColNames());\n assertEquals(25, resultMatrixHTML0.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixHTML0.getDefaultStdDevWidth());\n assertFalse(resultMatrixHTML0.getDefaultRemoveFilterName());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixHTML0.countWidthTipText());\n assertFalse(resultMatrixHTML0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixHTML0.getDefaultSignificanceWidth());\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n \n // Undeclared exception!\n try { \n resultMatrixSignificance0.getHeader(\"\");\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // -1\n //\n verifyException(\"java.util.Vector\", e);\n }\n }", "@Test\n public void testJuvenilesSpreadFromCellsWithCorrespondingMatureLctFromInsideGrid() {\n params = new CompletelySpatiallyRandomParams(3, 0);\n coloniser = new CompletelySpatiallyRandomColoniser(landCoverType, juvenilePine, juvenileOak,\n juvenileDeciduous, params);\n coloniser.updateJuvenilePresenceLayers();\n\n assertTrue(countJuvenilesInGrid(juvenilePine) >= 6);\n assertTrue(countJuvenilesInGrid(juvenileOak) >= 9);\n assertTrue(countJuvenilesInGrid(juvenileDeciduous) >= 3);\n }", "private void paintGrid() {\n\n g2d.setColor(_BOARDCOLOR); //Set the color to specific color of the board.\n\n for(int i = 0; i < grids.size(); i++) { //Iterating the 16 grids while drawing each on JComponent.\n\n g2d.draw(grids.get(i));\n }\n }", "public static void main(String[] args) {\n int[][] grid = {{0,1,0,1,1},\n {1,2,0,0,1},\n {1,1,0,1,2}};\n displayGrid(grid);\n\n int[][] grid1 = {{0,1,0,1,1,0,1,1},\n {1,2,0,0,1,2,2,1},\n {1,1,0,1,2,1,1,2}};\n displayGrid(grid1);\n }", "@Test\n public void test3() {\n WebElement filterInput = DOM.getFilter();\n filterInput.sendKeys(Keys.BACK_SPACE, Keys.BACK_SPACE, Keys.BACK_SPACE, Keys.BACK_SPACE);\n assertEquals(5, DOM.getRows().size());\n }", "public void testWorkspace_items_not_merged_in_next_screen() throws Exception {\n long[][][] ids = createGrid(new int[][][]{{\n { 0, 0, 0, 1},\n { 3, 1, 0, 4},\n { -1, -1, -1, -1},\n { 5, 2, -1, 6},\n },{\n { -1, 0, -1, 1},\n { 3, 1, -1, 4},\n { -1, -1, -1, -1},\n { 5, 2, -1, 6},\n }});\n\n new GridSizeMigrationTask(getMockContext(), mIdp, mValidPackages, new HashMap<String, Point>(),\n new Point(4, 4), new Point(3, 3)).migrateWorkspace();\n\n // Items in the second column of the first screen should get placed on a new screen.\n verifyWorkspace(new long[][][] {{\n {ids[0][0][0], ids[0][0][1], ids[0][0][3]},\n {ids[0][1][0], ids[0][1][1], ids[0][1][3]},\n {ids[0][3][0], ids[0][3][1], ids[0][3][3]},\n }, {\n { -1, ids[1][0][1], ids[1][0][3]},\n {ids[1][1][0], ids[1][1][1], ids[1][1][3]},\n {ids[1][3][0], ids[1][3][1], ids[1][3][3]},\n }, {\n {ids[0][0][2], ids[0][1][2], -1},\n }});\n }", "@Test\n public void runContinuousTestPlusShapeAlive() throws Exception {\n mainPanel = new MainPanel(5);\n Cell[][] f = new Cell[5][5];\n\n /*\n Pattern of starting grid:\n .....\n ..X..\n .XXX.\n ..X..\n .....\n */\n for (int i = 0; i < f.length; i++) {\n for (int j = 0; j < f[i].length; j++) {\n if ((i == 2 && (j == 1 || j == 2 || j == 3) || (i == 1 && j == 2) || (i == 3 && j == 2))) {\n f[i][j] = new Cell(true);\n } else {\n f[i][j] = new Cell(false);\n }\n }\n }\n mainPanel.setCells(f);\n\n final ScheduledThreadPoolExecutor executor = new ScheduledThreadPoolExecutor(2);\n executor.schedule(new Runnable() {\n @Override\n public void run() {\n mainPanel.stop();\n }\n }, 2, TimeUnit.SECONDS);\n mainPanel.runContinuous();\n\n boolean[][] c = mainPanel.convertToBoolean(mainPanel.getCells());\n for (int i = 0; i < c.length; i++) {\n for (int j = 0; j < c[i].length; j++) {\n if (c[i][j]) {\n fail();\n }\n }\n }\n }", "public static void displayGrid(int[][] grid){\n // JFrame to open a new window.\n JFrame frame = new JFrame();\n\t\n\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\tfinal int FRAME_WIDTH = offset + width * (grid[0].length + 1);\n\tfinal int FRAME_HEIGHT = offset + width * (grid.length+2);\n\n Grid panel = new Grid(grid);\n\t//creates a window of appropriate (variable) size.\n\tframe.setSize(FRAME_WIDTH,FRAME_HEIGHT); \n\n\tframe.add(panel); \n\tframe.setVisible(true); // makes the application visible.\n }", "private void renderGrid(Graphics g, int width, int height, GridLocation gridPosition){\n g.setColor(Color.GRAY);\n for(int x = 0; x < width; x++){\n for(int y = 0; y < height; y++){\n g.drawRect(gridPosition.getX() + x * CELL_SIZE, gridPosition.getY() + y*CELL_SIZE, CELL_SIZE, CELL_SIZE);\n }\n }\n }", "public void printGrid()\n\t{\n\t\tfor ( int y = 0; y < height; y++)\n\t\t{\n\t\t\tfor ( int x = 0; x < width; x++ )\n\t\t\t{\n\t\t\t\t// If x & y are the same as the empty tile coordinates, print empty tile\n\t\t\t\tif ( x == x0 && y == y0 ) System.out.print( \" \" );\n\t\t\t\t// Else print element of grid\n\t\t\t\telse System.out.print( grid[x][y] + \" \" );\n\t\t\t}\n\t\t\tSystem.out.print( \"\\n\" );\n\t\t}\n\t\tSystem.out.print( \"\\n\" );\n\t}", "@Test\n public void testClientJoinLeaveDataGrid() throws Exception {\n testClientJoinLeave(Profile.dataGrid(), Profile.dataGrid(), Profile.dataGrid());\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n ResultMatrixGnuPlot resultMatrixGnuPlot0 = new ResultMatrixGnuPlot();\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixGnuPlot0.enumerateRowNamesTipText());\n assertFalse(resultMatrixGnuPlot0.getDefaultEnumerateRowNames());\n assertFalse(resultMatrixGnuPlot0.getEnumerateColNames());\n assertEquals(1, resultMatrixGnuPlot0.getVisibleRowCount());\n assertFalse(resultMatrixGnuPlot0.getDefaultShowAverage());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultSignificanceWidth());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixGnuPlot0.rowNameWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixGnuPlot0.getCountWidth());\n assertEquals(1, resultMatrixGnuPlot0.getVisibleColCount());\n assertTrue(resultMatrixGnuPlot0.getPrintRowNames());\n assertFalse(resultMatrixGnuPlot0.getDefaultEnumerateColNames());\n assertEquals(0, resultMatrixGnuPlot0.getSignificanceWidth());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultStdDevWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixGnuPlot0.enumerateColNamesTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixGnuPlot0.countWidthTipText());\n assertEquals(2, resultMatrixGnuPlot0.getMeanPrec());\n assertEquals(50, resultMatrixGnuPlot0.getColNameWidth());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixGnuPlot0.printColNamesTipText());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixGnuPlot0.significanceWidthTipText());\n assertEquals(2, resultMatrixGnuPlot0.getDefaultMeanPrec());\n assertEquals(50, resultMatrixGnuPlot0.getDefaultRowNameWidth());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixGnuPlot0.removeFilterNameTipText());\n assertEquals(\"Generates output for a data and script file for GnuPlot.\", resultMatrixGnuPlot0.globalInfo());\n assertFalse(resultMatrixGnuPlot0.getShowStdDev());\n assertEquals(50, resultMatrixGnuPlot0.getDefaultColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixGnuPlot0.stdDevPrecTipText());\n assertTrue(resultMatrixGnuPlot0.getDefaultPrintColNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixGnuPlot0.showStdDevTipText());\n assertEquals(0, resultMatrixGnuPlot0.getMeanWidth());\n assertEquals(50, resultMatrixGnuPlot0.getRowNameWidth());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultMeanWidth());\n assertEquals(1, resultMatrixGnuPlot0.getColCount());\n assertFalse(resultMatrixGnuPlot0.getEnumerateRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixGnuPlot0.showAverageTipText());\n assertTrue(resultMatrixGnuPlot0.getPrintColNames());\n assertTrue(resultMatrixGnuPlot0.getDefaultPrintRowNames());\n assertFalse(resultMatrixGnuPlot0.getRemoveFilterName());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixGnuPlot0.meanWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getDefaultShowStdDev());\n assertEquals(2, resultMatrixGnuPlot0.getStdDevPrec());\n assertEquals(2, resultMatrixGnuPlot0.getDefaultStdDevPrec());\n assertFalse(resultMatrixGnuPlot0.getShowAverage());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixGnuPlot0.printRowNamesTipText());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixGnuPlot0.stdDevWidthTipText());\n assertEquals(0, resultMatrixGnuPlot0.getStdDevWidth());\n assertEquals(\"GNUPlot\", resultMatrixGnuPlot0.getDisplayName());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixGnuPlot0.colNameWidthTipText());\n assertEquals(1, resultMatrixGnuPlot0.getRowCount());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixGnuPlot0.meanPrecTipText());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultCountWidth());\n assertNotNull(resultMatrixGnuPlot0);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n \n int[][] intArray0 = new int[7][8];\n int[] intArray1 = new int[0];\n intArray0[0] = intArray1;\n int[] intArray2 = new int[0];\n assertFalse(intArray2.equals((Object)intArray1));\n \n intArray0[1] = intArray2;\n int[] intArray3 = new int[0];\n assertFalse(intArray3.equals((Object)intArray1));\n assertFalse(intArray3.equals((Object)intArray2));\n \n intArray0[2] = intArray3;\n ResultMatrixPlainText resultMatrixPlainText0 = new ResultMatrixPlainText(resultMatrixGnuPlot0);\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixGnuPlot0.enumerateRowNamesTipText());\n assertFalse(resultMatrixGnuPlot0.getDefaultEnumerateRowNames());\n assertFalse(resultMatrixGnuPlot0.getEnumerateColNames());\n assertEquals(1, resultMatrixGnuPlot0.getVisibleRowCount());\n assertFalse(resultMatrixGnuPlot0.getDefaultShowAverage());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultSignificanceWidth());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixGnuPlot0.rowNameWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixGnuPlot0.getCountWidth());\n assertEquals(1, resultMatrixGnuPlot0.getVisibleColCount());\n assertTrue(resultMatrixGnuPlot0.getPrintRowNames());\n assertFalse(resultMatrixGnuPlot0.getDefaultEnumerateColNames());\n assertEquals(0, resultMatrixGnuPlot0.getSignificanceWidth());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultStdDevWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixGnuPlot0.enumerateColNamesTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixGnuPlot0.countWidthTipText());\n assertEquals(2, resultMatrixGnuPlot0.getMeanPrec());\n assertEquals(50, resultMatrixGnuPlot0.getColNameWidth());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixGnuPlot0.printColNamesTipText());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixGnuPlot0.significanceWidthTipText());\n assertEquals(2, resultMatrixGnuPlot0.getDefaultMeanPrec());\n assertEquals(50, resultMatrixGnuPlot0.getDefaultRowNameWidth());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixGnuPlot0.removeFilterNameTipText());\n assertEquals(\"Generates output for a data and script file for GnuPlot.\", resultMatrixGnuPlot0.globalInfo());\n assertFalse(resultMatrixGnuPlot0.getShowStdDev());\n assertEquals(50, resultMatrixGnuPlot0.getDefaultColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixGnuPlot0.stdDevPrecTipText());\n assertTrue(resultMatrixGnuPlot0.getDefaultPrintColNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixGnuPlot0.showStdDevTipText());\n assertEquals(0, resultMatrixGnuPlot0.getMeanWidth());\n assertEquals(50, resultMatrixGnuPlot0.getRowNameWidth());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultMeanWidth());\n assertEquals(1, resultMatrixGnuPlot0.getColCount());\n assertFalse(resultMatrixGnuPlot0.getEnumerateRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixGnuPlot0.showAverageTipText());\n assertTrue(resultMatrixGnuPlot0.getPrintColNames());\n assertTrue(resultMatrixGnuPlot0.getDefaultPrintRowNames());\n assertFalse(resultMatrixGnuPlot0.getRemoveFilterName());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixGnuPlot0.meanWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getDefaultShowStdDev());\n assertEquals(2, resultMatrixGnuPlot0.getStdDevPrec());\n assertEquals(2, resultMatrixGnuPlot0.getDefaultStdDevPrec());\n assertFalse(resultMatrixGnuPlot0.getShowAverage());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixGnuPlot0.printRowNamesTipText());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixGnuPlot0.stdDevWidthTipText());\n assertEquals(0, resultMatrixGnuPlot0.getStdDevWidth());\n assertEquals(\"GNUPlot\", resultMatrixGnuPlot0.getDisplayName());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixGnuPlot0.colNameWidthTipText());\n assertEquals(1, resultMatrixGnuPlot0.getRowCount());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixGnuPlot0.meanPrecTipText());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultCountWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultStdDevWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixPlainText0.getColNameWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultMeanWidth());\n assertEquals(1, resultMatrixPlainText0.getColCount());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixPlainText0.stdDevPrecTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixPlainText0.colNameWidthTipText());\n assertEquals(1, resultMatrixPlainText0.getVisibleColCount());\n assertEquals(0, resultMatrixPlainText0.getMeanWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixPlainText0.countWidthTipText());\n assertEquals(0, resultMatrixPlainText0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixPlainText0.significanceWidthTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixPlainText0.rowNameWidthTipText());\n assertFalse(resultMatrixPlainText0.getShowStdDev());\n assertFalse(resultMatrixPlainText0.getEnumerateColNames());\n assertEquals(\"Plain Text\", resultMatrixPlainText0.getDisplayName());\n assertEquals(2, resultMatrixPlainText0.getDefaultMeanPrec());\n assertTrue(resultMatrixPlainText0.getPrintRowNames());\n assertEquals(0, resultMatrixPlainText0.getSignificanceWidth());\n assertEquals(\"Generates the output as plain text (for fixed width fonts).\", resultMatrixPlainText0.globalInfo());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixPlainText0.removeFilterNameTipText());\n assertEquals(0, resultMatrixPlainText0.getCountWidth());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixPlainText0.printColNamesTipText());\n assertEquals(2, resultMatrixPlainText0.getMeanPrec());\n assertTrue(resultMatrixPlainText0.getDefaultPrintColNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixPlainText0.showStdDevTipText());\n assertEquals(50, resultMatrixPlainText0.getRowNameWidth());\n assertFalse(resultMatrixPlainText0.getDefaultEnumerateRowNames());\n assertFalse(resultMatrixPlainText0.getDefaultRemoveFilterName());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixPlainText0.stdDevWidthTipText());\n assertEquals(2, resultMatrixPlainText0.getDefaultStdDevPrec());\n assertFalse(resultMatrixPlainText0.getShowAverage());\n assertEquals(25, resultMatrixPlainText0.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixPlainText0.meanPrecTipText());\n assertEquals(0, resultMatrixPlainText0.getStdDevWidth());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixPlainText0.showAverageTipText());\n assertEquals(1, resultMatrixPlainText0.getRowCount());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateRowNamesTipText());\n assertTrue(resultMatrixPlainText0.getPrintColNames());\n assertTrue(resultMatrixPlainText0.getDefaultPrintRowNames());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixPlainText0.meanWidthTipText());\n assertFalse(resultMatrixPlainText0.getEnumerateRowNames());\n assertEquals(1, resultMatrixPlainText0.getVisibleRowCount());\n assertFalse(resultMatrixPlainText0.getRemoveFilterName());\n assertEquals(5, resultMatrixPlainText0.getDefaultCountWidth());\n assertEquals(2, resultMatrixPlainText0.getStdDevPrec());\n assertFalse(resultMatrixPlainText0.getDefaultShowAverage());\n assertTrue(resultMatrixPlainText0.getDefaultEnumerateColNames());\n assertFalse(resultMatrixPlainText0.getDefaultShowStdDev());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixPlainText0.printRowNamesTipText());\n assertNotNull(resultMatrixPlainText0);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n \n boolean boolean0 = resultMatrixPlainText0.isSignificance(2);\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixGnuPlot0.enumerateRowNamesTipText());\n assertFalse(resultMatrixGnuPlot0.getDefaultEnumerateRowNames());\n assertFalse(resultMatrixGnuPlot0.getEnumerateColNames());\n assertEquals(1, resultMatrixGnuPlot0.getVisibleRowCount());\n assertFalse(resultMatrixGnuPlot0.getDefaultShowAverage());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultSignificanceWidth());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixGnuPlot0.rowNameWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixGnuPlot0.getCountWidth());\n assertEquals(1, resultMatrixGnuPlot0.getVisibleColCount());\n assertTrue(resultMatrixGnuPlot0.getPrintRowNames());\n assertFalse(resultMatrixGnuPlot0.getDefaultEnumerateColNames());\n assertEquals(0, resultMatrixGnuPlot0.getSignificanceWidth());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultStdDevWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixGnuPlot0.enumerateColNamesTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixGnuPlot0.countWidthTipText());\n assertEquals(2, resultMatrixGnuPlot0.getMeanPrec());\n assertEquals(50, resultMatrixGnuPlot0.getColNameWidth());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixGnuPlot0.printColNamesTipText());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixGnuPlot0.significanceWidthTipText());\n assertEquals(2, resultMatrixGnuPlot0.getDefaultMeanPrec());\n assertEquals(50, resultMatrixGnuPlot0.getDefaultRowNameWidth());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixGnuPlot0.removeFilterNameTipText());\n assertEquals(\"Generates output for a data and script file for GnuPlot.\", resultMatrixGnuPlot0.globalInfo());\n assertFalse(resultMatrixGnuPlot0.getShowStdDev());\n assertEquals(50, resultMatrixGnuPlot0.getDefaultColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixGnuPlot0.stdDevPrecTipText());\n assertTrue(resultMatrixGnuPlot0.getDefaultPrintColNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixGnuPlot0.showStdDevTipText());\n assertEquals(0, resultMatrixGnuPlot0.getMeanWidth());\n assertEquals(50, resultMatrixGnuPlot0.getRowNameWidth());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultMeanWidth());\n assertEquals(1, resultMatrixGnuPlot0.getColCount());\n assertFalse(resultMatrixGnuPlot0.getEnumerateRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixGnuPlot0.showAverageTipText());\n assertTrue(resultMatrixGnuPlot0.getPrintColNames());\n assertTrue(resultMatrixGnuPlot0.getDefaultPrintRowNames());\n assertFalse(resultMatrixGnuPlot0.getRemoveFilterName());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixGnuPlot0.meanWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getDefaultShowStdDev());\n assertEquals(2, resultMatrixGnuPlot0.getStdDevPrec());\n assertEquals(2, resultMatrixGnuPlot0.getDefaultStdDevPrec());\n assertFalse(resultMatrixGnuPlot0.getShowAverage());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixGnuPlot0.printRowNamesTipText());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixGnuPlot0.stdDevWidthTipText());\n assertEquals(0, resultMatrixGnuPlot0.getStdDevWidth());\n assertEquals(\"GNUPlot\", resultMatrixGnuPlot0.getDisplayName());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixGnuPlot0.colNameWidthTipText());\n assertEquals(1, resultMatrixGnuPlot0.getRowCount());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixGnuPlot0.meanPrecTipText());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultCountWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultStdDevWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixPlainText0.getColNameWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultMeanWidth());\n assertEquals(1, resultMatrixPlainText0.getColCount());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixPlainText0.stdDevPrecTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixPlainText0.colNameWidthTipText());\n assertEquals(1, resultMatrixPlainText0.getVisibleColCount());\n assertEquals(0, resultMatrixPlainText0.getMeanWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixPlainText0.countWidthTipText());\n assertEquals(0, resultMatrixPlainText0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixPlainText0.significanceWidthTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixPlainText0.rowNameWidthTipText());\n assertFalse(resultMatrixPlainText0.getShowStdDev());\n assertFalse(resultMatrixPlainText0.getEnumerateColNames());\n assertEquals(\"Plain Text\", resultMatrixPlainText0.getDisplayName());\n assertEquals(2, resultMatrixPlainText0.getDefaultMeanPrec());\n assertTrue(resultMatrixPlainText0.getPrintRowNames());\n assertEquals(0, resultMatrixPlainText0.getSignificanceWidth());\n assertEquals(\"Generates the output as plain text (for fixed width fonts).\", resultMatrixPlainText0.globalInfo());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixPlainText0.removeFilterNameTipText());\n assertEquals(0, resultMatrixPlainText0.getCountWidth());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixPlainText0.printColNamesTipText());\n assertEquals(2, resultMatrixPlainText0.getMeanPrec());\n assertTrue(resultMatrixPlainText0.getDefaultPrintColNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixPlainText0.showStdDevTipText());\n assertEquals(50, resultMatrixPlainText0.getRowNameWidth());\n assertFalse(resultMatrixPlainText0.getDefaultEnumerateRowNames());\n assertFalse(resultMatrixPlainText0.getDefaultRemoveFilterName());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixPlainText0.stdDevWidthTipText());\n assertEquals(2, resultMatrixPlainText0.getDefaultStdDevPrec());\n assertFalse(resultMatrixPlainText0.getShowAverage());\n assertEquals(25, resultMatrixPlainText0.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixPlainText0.meanPrecTipText());\n assertEquals(0, resultMatrixPlainText0.getStdDevWidth());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixPlainText0.showAverageTipText());\n assertEquals(1, resultMatrixPlainText0.getRowCount());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateRowNamesTipText());\n assertTrue(resultMatrixPlainText0.getPrintColNames());\n assertTrue(resultMatrixPlainText0.getDefaultPrintRowNames());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixPlainText0.meanWidthTipText());\n assertFalse(resultMatrixPlainText0.getEnumerateRowNames());\n assertEquals(1, resultMatrixPlainText0.getVisibleRowCount());\n assertFalse(resultMatrixPlainText0.getRemoveFilterName());\n assertEquals(5, resultMatrixPlainText0.getDefaultCountWidth());\n assertEquals(2, resultMatrixPlainText0.getStdDevPrec());\n assertFalse(resultMatrixPlainText0.getDefaultShowAverage());\n assertTrue(resultMatrixPlainText0.getDefaultEnumerateColNames());\n assertFalse(resultMatrixPlainText0.getDefaultShowStdDev());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixPlainText0.printRowNamesTipText());\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertFalse(boolean0);\n \n ResultMatrixHTML resultMatrixHTML0 = new ResultMatrixHTML();\n assertTrue(resultMatrixHTML0.getEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getMeanWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixHTML0.significanceWidthTipText());\n assertEquals(0, resultMatrixHTML0.getStdDevWidth());\n assertEquals(25, resultMatrixHTML0.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixHTML0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixHTML0.getColNameWidth());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixHTML0.printColNamesTipText());\n assertFalse(resultMatrixHTML0.getShowStdDev());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixHTML0.stdDevWidthTipText());\n assertEquals(\"Generates the matrix output as HTML.\", resultMatrixHTML0.globalInfo());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixHTML0.stdDevPrecTipText());\n assertEquals(\"HTML\", resultMatrixHTML0.getDisplayName());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixHTML0.removeFilterNameTipText());\n assertFalse(resultMatrixHTML0.getRemoveFilterName());\n assertTrue(resultMatrixHTML0.getDefaultPrintRowNames());\n assertEquals(0, resultMatrixHTML0.getSignificanceWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateColNamesTipText());\n assertEquals(2, resultMatrixHTML0.getStdDevPrec());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixHTML0.meanWidthTipText());\n assertEquals(25, resultMatrixHTML0.getRowNameWidth());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixHTML0.showAverageTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixHTML0.colNameWidthTipText());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixHTML0.meanPrecTipText());\n assertEquals(1, resultMatrixHTML0.getRowCount());\n assertEquals(0, resultMatrixHTML0.getDefaultCountWidth());\n assertEquals(2, resultMatrixHTML0.getDefaultStdDevPrec());\n assertFalse(resultMatrixHTML0.getShowAverage());\n assertTrue(resultMatrixHTML0.getDefaultEnumerateColNames());\n assertFalse(resultMatrixHTML0.getDefaultPrintColNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateRowNamesTipText());\n assertEquals(2, resultMatrixHTML0.getMeanPrec());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixHTML0.rowNameWidthTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixHTML0.printRowNamesTipText());\n assertFalse(resultMatrixHTML0.getEnumerateRowNames());\n assertEquals(1, resultMatrixHTML0.getVisibleRowCount());\n assertFalse(resultMatrixHTML0.getDefaultShowStdDev());\n assertFalse(resultMatrixHTML0.getDefaultShowAverage());\n assertFalse(resultMatrixHTML0.getPrintColNames());\n assertTrue(resultMatrixHTML0.getPrintRowNames());\n assertEquals(1, resultMatrixHTML0.getVisibleColCount());\n assertEquals(1, resultMatrixHTML0.getColCount());\n assertEquals(0, resultMatrixHTML0.getCountWidth());\n assertEquals(2, resultMatrixHTML0.getDefaultMeanPrec());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixHTML0.showStdDevTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultColNameWidth());\n assertEquals(0, resultMatrixHTML0.getDefaultSignificanceWidth());\n assertEquals(0, resultMatrixHTML0.getDefaultStdDevWidth());\n assertFalse(resultMatrixHTML0.getDefaultEnumerateRowNames());\n assertFalse(resultMatrixHTML0.getDefaultRemoveFilterName());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixHTML0.countWidthTipText());\n assertNotNull(resultMatrixHTML0);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n \n int int0 = resultMatrixHTML0.getColCount();\n assertTrue(resultMatrixHTML0.getEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getMeanWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixHTML0.significanceWidthTipText());\n assertEquals(0, resultMatrixHTML0.getStdDevWidth());\n assertEquals(25, resultMatrixHTML0.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixHTML0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixHTML0.getColNameWidth());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixHTML0.printColNamesTipText());\n assertFalse(resultMatrixHTML0.getShowStdDev());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixHTML0.stdDevWidthTipText());\n assertEquals(\"Generates the matrix output as HTML.\", resultMatrixHTML0.globalInfo());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixHTML0.stdDevPrecTipText());\n assertEquals(\"HTML\", resultMatrixHTML0.getDisplayName());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixHTML0.removeFilterNameTipText());\n assertFalse(resultMatrixHTML0.getRemoveFilterName());\n assertTrue(resultMatrixHTML0.getDefaultPrintRowNames());\n assertEquals(0, resultMatrixHTML0.getSignificanceWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateColNamesTipText());\n assertEquals(2, resultMatrixHTML0.getStdDevPrec());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixHTML0.meanWidthTipText());\n assertEquals(25, resultMatrixHTML0.getRowNameWidth());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixHTML0.showAverageTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixHTML0.colNameWidthTipText());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixHTML0.meanPrecTipText());\n assertEquals(1, resultMatrixHTML0.getRowCount());\n assertEquals(0, resultMatrixHTML0.getDefaultCountWidth());\n assertEquals(2, resultMatrixHTML0.getDefaultStdDevPrec());\n assertFalse(resultMatrixHTML0.getShowAverage());\n assertTrue(resultMatrixHTML0.getDefaultEnumerateColNames());\n assertFalse(resultMatrixHTML0.getDefaultPrintColNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateRowNamesTipText());\n assertEquals(2, resultMatrixHTML0.getMeanPrec());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixHTML0.rowNameWidthTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixHTML0.printRowNamesTipText());\n assertFalse(resultMatrixHTML0.getEnumerateRowNames());\n assertEquals(1, resultMatrixHTML0.getVisibleRowCount());\n assertFalse(resultMatrixHTML0.getDefaultShowStdDev());\n assertFalse(resultMatrixHTML0.getDefaultShowAverage());\n assertFalse(resultMatrixHTML0.getPrintColNames());\n assertTrue(resultMatrixHTML0.getPrintRowNames());\n assertEquals(1, resultMatrixHTML0.getVisibleColCount());\n assertEquals(1, resultMatrixHTML0.getColCount());\n assertEquals(0, resultMatrixHTML0.getCountWidth());\n assertEquals(2, resultMatrixHTML0.getDefaultMeanPrec());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixHTML0.showStdDevTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultColNameWidth());\n assertEquals(0, resultMatrixHTML0.getDefaultSignificanceWidth());\n assertEquals(0, resultMatrixHTML0.getDefaultStdDevWidth());\n assertFalse(resultMatrixHTML0.getDefaultEnumerateRowNames());\n assertFalse(resultMatrixHTML0.getDefaultRemoveFilterName());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixHTML0.countWidthTipText());\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, int0);\n \n ResultMatrixHTML resultMatrixHTML1 = new ResultMatrixHTML(444, 444);\n }", "@Test(timeout = 4000)\n public void test072() throws Throwable {\n ResultMatrixGnuPlot resultMatrixGnuPlot0 = new ResultMatrixGnuPlot();\n assertTrue(resultMatrixGnuPlot0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixGnuPlot0.showAverageTipText());\n assertTrue(resultMatrixGnuPlot0.getPrintColNames());\n assertEquals(2, resultMatrixGnuPlot0.getDefaultMeanPrec());\n assertFalse(resultMatrixGnuPlot0.getDefaultShowStdDev());\n assertEquals(1, resultMatrixGnuPlot0.getVisibleColCount());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixGnuPlot0.countWidthTipText());\n assertEquals(50, resultMatrixGnuPlot0.getColNameWidth());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixGnuPlot0.rowNameWidthTipText());\n assertEquals(1, resultMatrixGnuPlot0.getColCount());\n assertEquals(2, resultMatrixGnuPlot0.getDefaultStdDevPrec());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixGnuPlot0.enumerateColNamesTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixGnuPlot0.colNameWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getRemoveFilterName());\n assertEquals(1, resultMatrixGnuPlot0.getVisibleRowCount());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixGnuPlot0.meanPrecTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixGnuPlot0.printRowNamesTipText());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixGnuPlot0.printColNamesTipText());\n assertEquals(0, resultMatrixGnuPlot0.getCountWidth());\n assertFalse(resultMatrixGnuPlot0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixGnuPlot0.removeFilterNameTipText());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixGnuPlot0.stdDevPrecTipText());\n assertEquals(50, resultMatrixGnuPlot0.getRowNameWidth());\n assertEquals(0, resultMatrixGnuPlot0.getMeanWidth());\n assertEquals(0, resultMatrixGnuPlot0.getSignificanceWidth());\n assertEquals(1, resultMatrixGnuPlot0.getRowCount());\n assertTrue(resultMatrixGnuPlot0.getDefaultPrintRowNames());\n assertFalse(resultMatrixGnuPlot0.getDefaultEnumerateColNames());\n assertEquals(\"GNUPlot\", resultMatrixGnuPlot0.getDisplayName());\n assertTrue(resultMatrixGnuPlot0.getDefaultPrintColNames());\n assertEquals(2, resultMatrixGnuPlot0.getStdDevPrec());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixGnuPlot0.meanWidthTipText());\n assertEquals(\"Generates output for a data and script file for GnuPlot.\", resultMatrixGnuPlot0.globalInfo());\n assertFalse(resultMatrixGnuPlot0.getShowStdDev());\n assertFalse(resultMatrixGnuPlot0.getShowAverage());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixGnuPlot0.stdDevWidthTipText());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultCountWidth());\n assertEquals(0, resultMatrixGnuPlot0.getStdDevWidth());\n assertEquals(2, resultMatrixGnuPlot0.getMeanPrec());\n assertEquals(50, resultMatrixGnuPlot0.getDefaultRowNameWidth());\n assertFalse(resultMatrixGnuPlot0.getEnumerateRowNames());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixGnuPlot0.significanceWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getDefaultShowAverage());\n assertFalse(resultMatrixGnuPlot0.getEnumerateColNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixGnuPlot0.enumerateRowNamesTipText());\n assertEquals(50, resultMatrixGnuPlot0.getDefaultColNameWidth());\n assertFalse(resultMatrixGnuPlot0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultStdDevWidth());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultSignificanceWidth());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultMeanWidth());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixGnuPlot0.showStdDevTipText());\n assertNotNull(resultMatrixGnuPlot0);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n \n int[][] intArray0 = new int[7][8];\n String[] stringArray0 = new String[3];\n stringArray0[0] = \"*\";\n stringArray0[1] = \" \";\n stringArray0[2] = \" \";\n resultMatrixGnuPlot0.m_RowNames = stringArray0;\n assertTrue(resultMatrixGnuPlot0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixGnuPlot0.showAverageTipText());\n assertTrue(resultMatrixGnuPlot0.getPrintColNames());\n assertEquals(2, resultMatrixGnuPlot0.getDefaultMeanPrec());\n assertFalse(resultMatrixGnuPlot0.getDefaultShowStdDev());\n assertEquals(1, resultMatrixGnuPlot0.getVisibleColCount());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixGnuPlot0.countWidthTipText());\n assertEquals(50, resultMatrixGnuPlot0.getColNameWidth());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixGnuPlot0.rowNameWidthTipText());\n assertEquals(1, resultMatrixGnuPlot0.getColCount());\n assertEquals(2, resultMatrixGnuPlot0.getDefaultStdDevPrec());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixGnuPlot0.enumerateColNamesTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixGnuPlot0.colNameWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getRemoveFilterName());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixGnuPlot0.meanPrecTipText());\n assertEquals(3, resultMatrixGnuPlot0.getRowCount());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixGnuPlot0.printRowNamesTipText());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixGnuPlot0.printColNamesTipText());\n assertEquals(0, resultMatrixGnuPlot0.getCountWidth());\n assertFalse(resultMatrixGnuPlot0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixGnuPlot0.removeFilterNameTipText());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixGnuPlot0.stdDevPrecTipText());\n assertEquals(50, resultMatrixGnuPlot0.getRowNameWidth());\n assertEquals(0, resultMatrixGnuPlot0.getMeanWidth());\n assertEquals(0, resultMatrixGnuPlot0.getSignificanceWidth());\n assertTrue(resultMatrixGnuPlot0.getDefaultPrintRowNames());\n assertFalse(resultMatrixGnuPlot0.getDefaultEnumerateColNames());\n assertEquals(\"GNUPlot\", resultMatrixGnuPlot0.getDisplayName());\n assertTrue(resultMatrixGnuPlot0.getDefaultPrintColNames());\n assertEquals(2, resultMatrixGnuPlot0.getStdDevPrec());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixGnuPlot0.meanWidthTipText());\n assertEquals(\"Generates output for a data and script file for GnuPlot.\", resultMatrixGnuPlot0.globalInfo());\n assertFalse(resultMatrixGnuPlot0.getShowStdDev());\n assertFalse(resultMatrixGnuPlot0.getShowAverage());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixGnuPlot0.stdDevWidthTipText());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultCountWidth());\n assertEquals(0, resultMatrixGnuPlot0.getStdDevWidth());\n assertEquals(2, resultMatrixGnuPlot0.getMeanPrec());\n assertEquals(50, resultMatrixGnuPlot0.getDefaultRowNameWidth());\n assertFalse(resultMatrixGnuPlot0.getEnumerateRowNames());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixGnuPlot0.significanceWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getDefaultShowAverage());\n assertFalse(resultMatrixGnuPlot0.getEnumerateColNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixGnuPlot0.enumerateRowNamesTipText());\n assertEquals(50, resultMatrixGnuPlot0.getDefaultColNameWidth());\n assertFalse(resultMatrixGnuPlot0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultStdDevWidth());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultSignificanceWidth());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultMeanWidth());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixGnuPlot0.showStdDevTipText());\n \n int[] intArray1 = new int[0];\n intArray0[0] = intArray1;\n int[] intArray2 = new int[0];\n assertFalse(intArray2.equals((Object)intArray1));\n \n intArray0[1] = intArray2;\n int[] intArray3 = new int[0];\n assertFalse(intArray3.equals((Object)intArray1));\n assertFalse(intArray3.equals((Object)intArray2));\n \n intArray0[2] = intArray3;\n int[] intArray4 = new int[6];\n assertFalse(intArray4.equals((Object)intArray3));\n assertFalse(intArray4.equals((Object)intArray1));\n assertFalse(intArray4.equals((Object)intArray2));\n \n intArray4[1] = 0;\n intArray4[2] = 2;\n intArray4[3] = 0;\n intArray4[4] = 2;\n intArray4[5] = 0;\n intArray0[3] = intArray4;\n int[] intArray5 = new int[0];\n assertFalse(intArray5.equals((Object)intArray2));\n assertFalse(intArray5.equals((Object)intArray3));\n assertFalse(intArray5.equals((Object)intArray1));\n assertFalse(intArray5.equals((Object)intArray4));\n \n intArray0[4] = intArray5;\n int[] intArray6 = new int[3];\n assertFalse(intArray6.equals((Object)intArray1));\n assertFalse(intArray6.equals((Object)intArray5));\n assertFalse(intArray6.equals((Object)intArray4));\n assertFalse(intArray6.equals((Object)intArray3));\n assertFalse(intArray6.equals((Object)intArray2));\n \n intArray6[1] = 1;\n intArray6[2] = 2;\n intArray0[5] = intArray6;\n int[] intArray7 = new int[2];\n assertFalse(intArray7.equals((Object)intArray1));\n assertFalse(intArray7.equals((Object)intArray4));\n assertFalse(intArray7.equals((Object)intArray3));\n assertFalse(intArray7.equals((Object)intArray2));\n assertFalse(intArray7.equals((Object)intArray5));\n assertFalse(intArray7.equals((Object)intArray6));\n \n intArray7[0] = 1;\n String string0 = resultMatrixGnuPlot0.printColNamesTipText();\n assertTrue(resultMatrixGnuPlot0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixGnuPlot0.showAverageTipText());\n assertTrue(resultMatrixGnuPlot0.getPrintColNames());\n assertEquals(2, resultMatrixGnuPlot0.getDefaultMeanPrec());\n assertFalse(resultMatrixGnuPlot0.getDefaultShowStdDev());\n assertEquals(1, resultMatrixGnuPlot0.getVisibleColCount());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixGnuPlot0.countWidthTipText());\n assertEquals(50, resultMatrixGnuPlot0.getColNameWidth());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixGnuPlot0.rowNameWidthTipText());\n assertEquals(1, resultMatrixGnuPlot0.getColCount());\n assertEquals(2, resultMatrixGnuPlot0.getDefaultStdDevPrec());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixGnuPlot0.enumerateColNamesTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixGnuPlot0.colNameWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getRemoveFilterName());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixGnuPlot0.meanPrecTipText());\n assertEquals(3, resultMatrixGnuPlot0.getRowCount());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixGnuPlot0.printRowNamesTipText());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixGnuPlot0.printColNamesTipText());\n assertEquals(0, resultMatrixGnuPlot0.getCountWidth());\n assertFalse(resultMatrixGnuPlot0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixGnuPlot0.removeFilterNameTipText());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixGnuPlot0.stdDevPrecTipText());\n assertEquals(50, resultMatrixGnuPlot0.getRowNameWidth());\n assertEquals(0, resultMatrixGnuPlot0.getMeanWidth());\n assertEquals(0, resultMatrixGnuPlot0.getSignificanceWidth());\n assertTrue(resultMatrixGnuPlot0.getDefaultPrintRowNames());\n assertFalse(resultMatrixGnuPlot0.getDefaultEnumerateColNames());\n assertEquals(\"GNUPlot\", resultMatrixGnuPlot0.getDisplayName());\n assertTrue(resultMatrixGnuPlot0.getDefaultPrintColNames());\n assertEquals(2, resultMatrixGnuPlot0.getStdDevPrec());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixGnuPlot0.meanWidthTipText());\n assertEquals(\"Generates output for a data and script file for GnuPlot.\", resultMatrixGnuPlot0.globalInfo());\n assertFalse(resultMatrixGnuPlot0.getShowStdDev());\n assertFalse(resultMatrixGnuPlot0.getShowAverage());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixGnuPlot0.stdDevWidthTipText());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultCountWidth());\n assertEquals(0, resultMatrixGnuPlot0.getStdDevWidth());\n assertEquals(2, resultMatrixGnuPlot0.getMeanPrec());\n assertEquals(50, resultMatrixGnuPlot0.getDefaultRowNameWidth());\n assertFalse(resultMatrixGnuPlot0.getEnumerateRowNames());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixGnuPlot0.significanceWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getDefaultShowAverage());\n assertFalse(resultMatrixGnuPlot0.getEnumerateColNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixGnuPlot0.enumerateRowNamesTipText());\n assertEquals(50, resultMatrixGnuPlot0.getDefaultColNameWidth());\n assertFalse(resultMatrixGnuPlot0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultStdDevWidth());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultSignificanceWidth());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultMeanWidth());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixGnuPlot0.showStdDevTipText());\n assertNotNull(string0);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(\"Whether to output column names or just numbers representing them.\", string0);\n \n intArray7[1] = 2;\n intArray0[6] = intArray7;\n resultMatrixGnuPlot0.setRanking(intArray0);\n assertTrue(resultMatrixGnuPlot0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixGnuPlot0.showAverageTipText());\n assertTrue(resultMatrixGnuPlot0.getPrintColNames());\n assertEquals(2, resultMatrixGnuPlot0.getDefaultMeanPrec());\n assertFalse(resultMatrixGnuPlot0.getDefaultShowStdDev());\n assertEquals(1, resultMatrixGnuPlot0.getVisibleColCount());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixGnuPlot0.countWidthTipText());\n assertEquals(50, resultMatrixGnuPlot0.getColNameWidth());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixGnuPlot0.rowNameWidthTipText());\n assertEquals(1, resultMatrixGnuPlot0.getColCount());\n assertEquals(2, resultMatrixGnuPlot0.getDefaultStdDevPrec());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixGnuPlot0.enumerateColNamesTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixGnuPlot0.colNameWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getRemoveFilterName());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixGnuPlot0.meanPrecTipText());\n assertEquals(3, resultMatrixGnuPlot0.getRowCount());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixGnuPlot0.printRowNamesTipText());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixGnuPlot0.printColNamesTipText());\n assertEquals(0, resultMatrixGnuPlot0.getCountWidth());\n assertFalse(resultMatrixGnuPlot0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixGnuPlot0.removeFilterNameTipText());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixGnuPlot0.stdDevPrecTipText());\n assertEquals(50, resultMatrixGnuPlot0.getRowNameWidth());\n assertEquals(0, resultMatrixGnuPlot0.getMeanWidth());\n assertEquals(0, resultMatrixGnuPlot0.getSignificanceWidth());\n assertTrue(resultMatrixGnuPlot0.getDefaultPrintRowNames());\n assertFalse(resultMatrixGnuPlot0.getDefaultEnumerateColNames());\n assertEquals(\"GNUPlot\", resultMatrixGnuPlot0.getDisplayName());\n assertTrue(resultMatrixGnuPlot0.getDefaultPrintColNames());\n assertEquals(2, resultMatrixGnuPlot0.getStdDevPrec());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixGnuPlot0.meanWidthTipText());\n assertEquals(\"Generates output for a data and script file for GnuPlot.\", resultMatrixGnuPlot0.globalInfo());\n assertFalse(resultMatrixGnuPlot0.getShowStdDev());\n assertFalse(resultMatrixGnuPlot0.getShowAverage());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixGnuPlot0.stdDevWidthTipText());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultCountWidth());\n assertEquals(0, resultMatrixGnuPlot0.getStdDevWidth());\n assertEquals(2, resultMatrixGnuPlot0.getMeanPrec());\n assertEquals(50, resultMatrixGnuPlot0.getDefaultRowNameWidth());\n assertFalse(resultMatrixGnuPlot0.getEnumerateRowNames());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixGnuPlot0.significanceWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getDefaultShowAverage());\n assertFalse(resultMatrixGnuPlot0.getEnumerateColNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixGnuPlot0.enumerateRowNamesTipText());\n assertEquals(50, resultMatrixGnuPlot0.getDefaultColNameWidth());\n assertFalse(resultMatrixGnuPlot0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultStdDevWidth());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultSignificanceWidth());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultMeanWidth());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixGnuPlot0.showStdDevTipText());\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(7, intArray0.length);\n \n // Undeclared exception!\n resultMatrixGnuPlot0.setSize(1922, 1922);\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}", "public void printGrid(){\n\t\tfor(int i=0;i<getHeight();i++){\n\t\t\tfor(int j=0;j<getWidth();j++){\n\t\t\t\tif(grid[i][j]==null)\n\t\t\t\t\tSystem.out.print(\"- \");\n\t\t\t\telse if(getGrid(i,j).isPath())\n\t\t\t\t\tSystem.out.print(\"1 \");\n\t\t\t\telse if(getGrid(i,j).isScenery())\n\t\t\t\t\tSystem.out.print(\"0 \");\n\t\t\t\telse\n\t\t\t\t\tSystem.out.print(\"? \");\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t\tSystem.out.println();\n\t}", "private void drawGrid(Graphics2D graphics, int x, int y,\n int width, int height)\n {\n graphics.setPaint(Color.black);\n\n // the columns\n graphics.setStroke(new BasicStroke(2));\n int agentGUISize = Parameters.getAgentGUISize();\n for (int row = 0; row < width / agentGUISize; row++)\n graphics.drawLine(x + (row * agentGUISize), y, \n x + (row * agentGUISize), y + height - 1);\n\n // the rows\n for (int col = 0; col < height / agentGUISize; col++){\n graphics.drawLine(x, y + (col * agentGUISize),\n x + width - 1, y + (col * agentGUISize));\n }\n \n // the border\n graphics.drawLine(x, y, x, y + height);\n graphics.drawLine(x, y, x + width, y);\n graphics.drawLine(x + width, y, x + width, y + height);\n graphics.drawLine(x, y + height, x + width, y + height);\n graphics.setStroke(new BasicStroke());\n }", "public JRExporterGridCell[][] getGrid(JRPrintPage page) {\n JRHtmlExporterNature nature = JRHtmlExporterNature.getInstance(true);\n JRGridLayout layout =\n new JRGridLayout(\n nature,\n page.getElements(),\n jasperPrint.getPageWidth(),\n jasperPrint.getPageHeight(),\n globalOffsetX,\n globalOffsetY,\n null //address\n );\n return layout.getGrid();\n }", "@Test(dataProvider=\"getExcelData\", priority=1)\n\t \n\t public void clientQuickLinks(String OrigionLocation, String Dest, String Item, String Count, String Weight, String Volume, String Client_Order, String Busunit, String GeneralLedger) throws InterruptedException, IOException {\n\t\tTC001_LoginOTM.getDriver().manage().timeouts().implicitlyWait(30,TimeUnit.SECONDS);\n\t\t \n\t\t TC001_LoginOTM.getDriver().switchTo().defaultContent();\n\t\t System.out.println(\"before sidebar\");\n\t\t TC001_LoginOTM.getDriver().switchTo().frame(\"sidebar\");\n\t\t System.out.println(\"After sidebar\");\n\t\t //click on client quick links \n\t\t TC001_LoginOTM.getDriver().findElement(By.xpath(\"//a[contains(text(),'Client Quick Links')]\")).click(); \t \n\t\t \n\t\t //click on FOE screen\n\t\t TC001_LoginOTM.getDriver().findElement(By.xpath(\"//a[text()='Fast Order Entry']\")).click();\n\t\t \t\t \n\t\t //Internal Login screen\n\t\t TC001_LoginOTM.getDriver().switchTo().defaultContent();\n\t\t TC001_LoginOTM.getDriver().switchTo().frame(\"mainBody\");\n\t\t\t\t \n\t\t //Internal username\n\t\t TC001_LoginOTM.getDriver().findElement(By.xpath(\"//*[@id='orderentryui-1928791928']/div/div[2]/div/div[1]/div/div/div/div[2]/div/div/div/div[2]/div/div/table/tbody/tr[1]/td[3]/input\")).clear();\n\t\t TC001_LoginOTM.getDriver().findElement(By.xpath(\"//*[@id='orderentryui-1928791928']/div/div[2]/div/div[1]/div/div/div/div[2]/div/div/div/div[2]/div/div/table/tbody/tr[1]/td[3]/input\")).sendKeys(\"MENLO.CLIENTA370\");\n\t\t \n\t\t //Internal password\n\t\t TC001_LoginOTM.getDriver().findElement(By.xpath(\"//*[@id=\\\"orderentryui-1928791928\\\"]/div/div[2]/div/div[1]/div/div/div/div[2]/div/div/div/div[2]/div/div/table/tbody/tr[2]/td[3]/input\")).clear();\n\t\t TC001_LoginOTM.getDriver().findElement(By.xpath(\"//*[@id=\\\"orderentryui-1928791928\\\"]/div/div[2]/div/div[1]/div/div/div/div[2]/div/div/div/div[2]/div/div/table/tbody/tr[2]/td[3]/input\")).sendKeys(\"Year2012??\");\n\t\t \n\t\t TC001_LoginOTM.getDriver().findElement(By.xpath(\"//html/body/div/div/div[2]/div/div[1]/div/div/div/div[2]/div/div/div/div[3]/div/div/span/span\")).click();\n \n\t\t \n\t\t //fast order entry screen\n\t\t TC001_LoginOTM.getDriver().switchTo().defaultContent();\n\t\t TC001_LoginOTM.getDriver().switchTo().frame(\"mainBody\");\n\t\t WebElement Origion = TC001_LoginOTM.getDriver().findElement(By.xpath(\"//html/body/div/div/div[2]/div/div[2]/div/div/div[2]/div/div[1]/div/div[2]/div/div/div[2]/div/div/div/div[2]/div/input\"));\n\t\t Origion.sendKeys(OrigionLocation);\n\t\t Thread.sleep(5000);\n\t\t //Origion.sendKeys(Keys.TAB);\n\t\t TC001_LoginOTM.getDriver().findElement(By.xpath(\"//html/body/div/div/div[2]/div/div[2]/div/div/div[2]/div/div[1]/div/div[2]/div/div/div[3]/div/div/div/div[2]/div/input\")).sendKeys(Dest);\n\t\t Thread.sleep(5000);\n\t\t \n\t\t TC001_LoginOTM.getDriver().findElement(By.xpath(\"//html/body/div/div/div[2]/div/div[2]/div/div/div[2]/div/div[1]/div/div[2]/div/div/div[7]/div/div/div/div[2]/div/div/div/div[1]/div/div/div/div[1]/div/div/div/div[1]/div/input\")).sendKeys(Item);\n\t\t Thread.sleep(5000);\n\t\t TC001_LoginOTM.getDriver().findElement(By.xpath(\"//html/body/div[3]/div/div/div/div[3]/div/div/div[2]/div/div/div[1]/div/div/div[2]/div[1]/table/tbody/tr[1]/td[1]/div\")).click();\n\t\t Thread.sleep(8000);\n\t\t \t\t \n\t\t //to enter count\n\t\t \n\t\t TC001_LoginOTM.getDriver().findElement(By.xpath(\"//html/body/div/div/div[2]/div/div[2]/div/div/div[2]/div/div[1]/div/div[2]/div/div/div[7]/div/div/div/div[2]/div/div/div/div[1]/div/div/div/div[1]/div/div/div/div[4]/div/input\")).sendKeys(Count);\n\t\t Thread.sleep(2000);\n\t\t TC001_LoginOTM.getDriver().findElement(By.xpath(\"//html/body/div/div/div[2]/div/div[2]/div/div/div[2]/div/div[1]/div/div[2]/div/div/div[7]/div/div/div/div[2]/div/div/div/div[1]/div/div/div/div[1]/div/div/div/div[5]/div/input\")).sendKeys(Weight);\n\t\t TC001_LoginOTM.getDriver().findElement(By.xpath(\"//html/body/div/div/div[2]/div/div[2]/div/div/div[2]/div/div[1]/div/div[2]/div/div/div[7]/div/div/div/div[2]/div/div/div/div[1]/div/div/div/div[1]/div/div/div/div[7]/div/input\")).sendKeys(Volume);\n\t\t Thread.sleep(9000);\n\t\t //changing date format\n\t\t //Create object of SimpleDateFormat class and decide the format\n\t\t DateFormat dateFormat = new SimpleDateFormat(\"M/d/yy\");\n\t\t //get current date time with Date()\n\t\t Date date = new Date();\n\t\t // Now format the date\n\t\t String date1= dateFormat.format(date);\n\t\t // to add 4 days to codays date\n\t\t Calendar cal = Calendar.getInstance();\n\t\t cal.setTime(date);\n\t\t cal.add(Calendar.DATE, 4); //minus number would decrement the days\n\t\t Date date2 = cal.getTime();\n\t\t String date3 = dateFormat.format(date2);\t\t \n\t\t \t\t \t\t \n\t\t //entering todays date fields\n\t\t TC001_LoginOTM.getDriver().findElement(By.xpath(\"//html/body/div/div/div[2]/div/div[2]/div/div/div[2]/div/div[1]/div/div[2]/div/div/div[9]/div/div/div/div[2]/div/div/div/div[2]/div/div/input\")).sendKeys(date1);\n\t\t // entering todays date +4 days\n\t\t Thread.sleep(2000);\n\t\t TC001_LoginOTM.getDriver().findElement(By.xpath(\"//html/body/div/div/div[2]/div/div[2]/div/div/div[2]/div/div[1]/div/div[2]/div/div/div[10]/div/div/div/div[3]/div/div/div/div[2]/div/div/input\")).sendKeys(date3);\n\t\t Thread.sleep(2000);\n\t\t TC001_LoginOTM.getDriver().findElement(By.xpath(\"//html/body/div/div/div[2]/div/div[2]/div/div/div[2]/div/div[1]/div/div[2]/div/div/div[12]/div/div/div/div/div[2]/div/input\")).sendKeys(Client_Order);\n\t\t Thread.sleep(2000);\n\t\t //selecting from combo box\n\t\t System.out.println(\"before selection element\");\n\t\t WebElement BusUnitElement = TC001_LoginOTM.getDriver().findElement(By.xpath(\"//html/body/div/div/div[2]/div/div[2]/div/div/div[2]/div/div[1]/div/div[2]/div/div/div[12]/div/div/div/div/div[6]/div/div/input\"));\n\t\t BusUnitElement.sendKeys(Busunit);\n\t \n\t\t //Select BusUnit = new Select(BusUnitElement);\n\t\t //BusUnit.selectByVisibleText(\"TRS\");\n\t\t System.out.println(\"After selection element\");\n\t\t Thread.sleep(5000);\n\t\t System.out.println(\"before premium check box element\");\n\t\t TC001_LoginOTM.getDriver().findElement(By.xpath(\"//*[@id=\\\"gwt-uid-3\\\"]\")).click();\n\t\t \n\t\t //select premium reason from combo box\n\t\t Thread.sleep(2000);\n\t\t WebElement PreReasonElement = TC001_LoginOTM.getDriver().findElement(By.xpath(\"//html/body/div/div/div[2]/div/div[2]/div/div/div[2]/div/div[1]/div/div[2]/div/div/div[12]/div/div/div/div/div[22]/div/div/select\"));\n\t\t Select PreReason = new Select(PreReasonElement);\n\t\t PreReason.selectByIndex(2);\n\t\t \n\t\t Thread.sleep(9000);\n\t\t \n\t\t //General Ledger from combo box\n\t\t WebElement GenLedElement = TC001_LoginOTM.getDriver().findElement(By.xpath(\"//html/body/div/div/div[2]/div/div[2]/div/div/div[2]/div/div[1]/div/div[2]/div/div/div[15]/div/div/div/div[2]/div/div/input\"));\n\t\t //Select GenLed = new Select(GenLedElement);\n\t\t //GenLed.selectByVisibleText(\"143-16400-000\");\n\t\t GenLedElement.sendKeys(GeneralLedger);\n\t\t Thread.sleep(5000);\n\t\t GenLedElement.sendKeys(Keys.ARROW_DOWN.ENTER);\n\t\t \n\t\t Thread.sleep(9000);\n\t\t \n\t\t //click on create button\n\t\t TC001_LoginOTM.getDriver().findElement(By.xpath(\"//html/body/div/div/div[2]/div/div[2]/div/div/div[2]/div/div[1]/div/div[2]/div/div/div[25]/div/div/div/div[1]/div/div/div/div[1]/div/div/div/div[1]/div/div/span/span\")).click();\n\t\t Thread.sleep(9000);\n\t\t \n\t\t \n\t\t \n\t\t //String message = \"//html/body/div/div/div[2]/div/div[2]/div/div/div[2]/div/div[1]/div/div[2]/div/div/div[25]/div/div/div/div[1]/div/div/div/div[2]/div/div/div/div[1]/div/div\";\n\t\t System.out.println(\"Before popup window\");\n\t\t new WebDriverWait(TC001_LoginOTM.getDriver(),30).until(ExpectedConditions.elementToBeClickable(By.xpath(\"//html/body/div/div/div[2]/div/div[2]/div/div/div[2]/div/div[1]/div/div[2]/div/div/div[25]/div/div/div/div[1]/div/div/div/div[2]/div/div\")));\n\t\t \n\t\t System.out.println(\"After popup window\");\n\t\t Thread.sleep(9000);\n\t\t \t\t \n\t\t \n\t\t String element_text = TC001_LoginOTM.getDriver().findElement(By.xpath(\"//html/body/div/div/div[2]/div/div[2]/div/div/div[2]/div/div[1]/div/div[2]/div/div/div[25]/div/div/div/div[1]/div/div/div/div[2]/div/div\")).getText();\n\t\t //splitting on the basis of space and taking index 1 to take order no \n\t\t String element_text_actual = element_text.split(\" \")[1];\n\t\t System.out.println(element_text_actual);\t\n\t\t \n\t\t\n\t\t try {\n\t\t\t //writing order no to Excel file\n\t\t\t // HSSFWorkbook wb = new HSSFWorkbook(); \n\t\t\t //CreationHelper createHelper = wb.getCreationHelper();\n\t\t\t //Sheet sheet = wb.createSheet(\"Sheet1\");\n\t\t\t \n\t\t\t //HSSFRow row = (HSSFRow) sheet.createRow(1);\n\t\t //HSSFCell cell;\n\t\t //Creating rows and filling them with data \n\t\t // cell = row.createCell(1);\n\t\t // cell.setCellValue(createHelper.createRichTextString(element_text_actual));\n\t\t\t // FileOutputStream fileOut;\n // fileOut = new FileOutputStream(\"Testdata/FOE_output.xls\");\n\t\t\t // wb.write(fileOut);\n\t\t\t // fileOut.close(); \n\t\t\t//create an object of Workbook and pass the FileInputStream object into it to create a pipeline between the sheet and eclipse.\n\t\t\t\tFileInputStream fis = new FileInputStream(\"Testdata/FOE_output.xlsx\");\n\t\t\t\tXSSFWorkbook workbook = new XSSFWorkbook(fis);\n\t\t\t\t//call the getSheet() method of Workbook and pass the Sheet Name here. \n\t\t\t\t//In this case I have given the sheet name as “TestData” \n\t\t //or if you use the method getSheetAt(), you can pass sheet number starting from 0. Index starts with 0.\n\t\t\t\tXSSFSheet sheet = workbook.getSheet(\"sheet1\");\n\t\t\t\t//XSSFSheet sheet = workbook.getSheetAt(0);\n\t\t\t\t//Now create a row number and a cell where we want to enter a value. \n\t\t\t\t//Here im about to write my test data in the cell B2. It reads Column B as 1 and Row 2 as 1. Column and Row values start from 0.\n\t\t\t\t//The below line of code will search for row number 2 and column number 2 (i.e., B) and will create a space. \n\t\t //The createCell() method is present inside Row class.\n\t\t XSSFRow row = sheet.createRow(1);\n\t\t\t\tCell cell = row.createCell(1);\n\t\t\t\t//Now we need to find out the type of the value we want to enter. \n\t\t //If it is a string, we need to set the cell type as string \n\t\t //if it is numeric, we need to set the cell type as number\n\t\t\t\tcell.setCellType(cell.CELL_TYPE_STRING);\n\t\t\t\tcell.setCellValue(element_text_actual);\n\t\t\t\tFileOutputStream fos = new FileOutputStream(\"Testdata/FOE_output.xlsx\");\n\t\t\t\tworkbook.write(fos);\n\t\t\t\tfos.close();\n\t\t\t\tSystem.out.println(\"END OF WRITING DATA IN EXCEL\");\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t} \n\t\t\n\t\t Assert.assertTrue(element_text.contains(\"Order\"));\t\t \n\t\t \n\t }", "@Test\r\n public void Test011MakeLiveCellWithMoreThan20RowColumn()\r\n {\r\n\r\n assertFalse(gol.makeLiveCell(20, 20));\r\n\r\n }", "public void printGridAsChild()\n\t{\n\t\tfor ( int y = 0; y < height; y++)\n\t\t{\n\t\t\tSystem.out.print( \"\\t\" );\n\t\t\tfor ( int x = 0; x < width; x++ )\n\t\t\t{\n\t\t\t\t// If x & y are the same as the empty tile coordinates, print empty tile\n\t\t\t\tif ( x == x0 && y == y0 ) System.out.print( \" \" );\n\t\t\t\t// Else print element of grid\n\t\t\t\telse System.out.print( grid[x][y] + \" \" );\n\t\t\t}\n\t\t\tSystem.out.print( \"\\n\" );\n\t\t}\n\t\tSystem.out.print( \"\\n\" );\n\t}", "@Test\n\tpublic void rowWin_test()\n\t{\n\t\tb.set(0,0, 'x');\n\t\tb.set(1,1, 'o');\n\t\tb.set(0,1, 'x');\n\t\tb.set(2,2, 'o');\n\t\tb.set(0,2, 'x');\n\t\tassertTrue(b.rowWin());\t\n\t}", "private void clearGrid() {\n\n }", "private void makeGrid(JLabel moves, JLabel remainingBombs) {\r\n this.grid = new Tile[gridSize][gridSize]; \r\n for (int r = 0; r < gridSize; r++) {\r\n for (int c = 0; c < gridSize; c++) {\r\n if (solution[r][c] == 1) {\r\n grid[r][c] = new Tile(r, c, true);\r\n } else {\r\n grid[r][c] = new Tile(r, c, false);\r\n }\r\n final Tile t = grid[r][c];\r\n t.repaint();\r\n handleClicksAndMoves(t, moves, remainingBombs); \r\n }\r\n }\r\n }", "@Test\r\n public void Test010MakeLiveCellWithMoreThan20Column()\r\n {\r\n\r\n assertFalse(gol.makeLiveCell(3, 20));\r\n\r\n }", "void testAllCellsFlooded(Tester t) {\r\n initData();\r\n t.checkExpect(this.game8.allCellsFlooded(), true);\r\n t.checkExpect(this.game2.allCellsFlooded(), false);\r\n }", "private void drawGrid(){\r\n\r\n\t\tdrawHorizontalLines();\r\n\t\tdrawVerticalLines();\r\n\t}", "@Test\n public void testGridViewImages() {\n /* use of the content desc from the cursor data gets us the specific imageview.\n Use of the 'anyOf' is an or statement for matching multiple content descriptions if necessary\n */\n final int COL_TITLE = 2;\n Cursor cursor = mActivityRule.getActivity().getContentResolver().query(\n TVContract.TVEntry.CONTENT_URI,\n null, // leaving \"columns\" null just returns all the columns.\n null, // cols for \"where\" clause\n null, // values for \"where\" clause\n null // sort order\n );\n\n cursor.moveToFirst();\n onView(anyOf(withContentDescription(cursor.getString(COL_TITLE)))).check(matches(isDisplayed()));\n }", "@Test\r\n public void testCellForRowAtIndex() {\r\n assertTrue(ConditionWait.tillGlobalTime(new ConditionWait.Condition() {\r\n @Override\r\n public boolean check() {\r\n return XIBTestTableViewLabelTexFieldViewController.testCellForRowAtIndex;\r\n }\r\n }));\r\n }", "@Test\n\tpublic void columnWin_test1()\n\t{\n\t\tb.set(0,1, 'x');\n\t\tb.set(1,0, 'o');\n\t\tb.set(1,1, 'x');\n\t\tassertFalse(b.columnWin());\t\n\t}", "@Test(timeout = 4000)\n public void test045() throws Throwable {\n ResultMatrixGnuPlot resultMatrixGnuPlot0 = new ResultMatrixGnuPlot();\n assertEquals(1, resultMatrixGnuPlot0.getColCount());\n assertEquals(1, resultMatrixGnuPlot0.getVisibleColCount());\n assertFalse(resultMatrixGnuPlot0.getRemoveFilterName());\n assertEquals(0, resultMatrixGnuPlot0.getCountWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixGnuPlot0.enumerateColNamesTipText());\n assertEquals(50, resultMatrixGnuPlot0.getDefaultColNameWidth());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultStdDevWidth());\n assertEquals(50, resultMatrixGnuPlot0.getColNameWidth());\n assertFalse(resultMatrixGnuPlot0.getDefaultShowStdDev());\n assertEquals(2, resultMatrixGnuPlot0.getDefaultMeanPrec());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixGnuPlot0.printRowNamesTipText());\n assertTrue(resultMatrixGnuPlot0.getPrintColNames());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixGnuPlot0.printColNamesTipText());\n assertTrue(resultMatrixGnuPlot0.getPrintRowNames());\n assertEquals(2, resultMatrixGnuPlot0.getDefaultStdDevPrec());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixGnuPlot0.showAverageTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixGnuPlot0.colNameWidthTipText());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixGnuPlot0.meanPrecTipText());\n assertEquals(1, resultMatrixGnuPlot0.getVisibleRowCount());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixGnuPlot0.stdDevWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getEnumerateColNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixGnuPlot0.enumerateRowNamesTipText());\n assertEquals(\"Generates output for a data and script file for GnuPlot.\", resultMatrixGnuPlot0.globalInfo());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultSignificanceWidth());\n assertEquals(2, resultMatrixGnuPlot0.getStdDevPrec());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixGnuPlot0.countWidthTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixGnuPlot0.showStdDevTipText());\n assertFalse(resultMatrixGnuPlot0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultMeanWidth());\n assertFalse(resultMatrixGnuPlot0.getEnumerateRowNames());\n assertEquals(0, resultMatrixGnuPlot0.getSignificanceWidth());\n assertTrue(resultMatrixGnuPlot0.getDefaultPrintRowNames());\n assertFalse(resultMatrixGnuPlot0.getDefaultEnumerateColNames());\n assertEquals(2, resultMatrixGnuPlot0.getMeanPrec());\n assertFalse(resultMatrixGnuPlot0.getDefaultShowAverage());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixGnuPlot0.meanWidthTipText());\n assertEquals(1, resultMatrixGnuPlot0.getRowCount());\n assertEquals(\"GNUPlot\", resultMatrixGnuPlot0.getDisplayName());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultCountWidth());\n assertEquals(50, resultMatrixGnuPlot0.getDefaultRowNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixGnuPlot0.significanceWidthTipText());\n assertEquals(0, resultMatrixGnuPlot0.getStdDevWidth());\n assertFalse(resultMatrixGnuPlot0.getShowAverage());\n assertFalse(resultMatrixGnuPlot0.getDefaultEnumerateRowNames());\n assertFalse(resultMatrixGnuPlot0.getShowStdDev());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixGnuPlot0.removeFilterNameTipText());\n assertEquals(50, resultMatrixGnuPlot0.getRowNameWidth());\n assertEquals(0, resultMatrixGnuPlot0.getMeanWidth());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixGnuPlot0.rowNameWidthTipText());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixGnuPlot0.stdDevPrecTipText());\n assertTrue(resultMatrixGnuPlot0.getDefaultPrintColNames());\n assertNotNull(resultMatrixGnuPlot0);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n \n int[][] intArray0 = new int[7][8];\n int[] intArray1 = new int[0];\n intArray0[0] = intArray1;\n int[] intArray2 = new int[0];\n assertFalse(intArray2.equals((Object)intArray1));\n \n intArray0[1] = intArray2;\n int[] intArray3 = new int[0];\n assertFalse(intArray3.equals((Object)intArray2));\n assertFalse(intArray3.equals((Object)intArray1));\n \n intArray0[2] = intArray3;\n resultMatrixGnuPlot0.setShowAverage(false);\n assertEquals(1, resultMatrixGnuPlot0.getColCount());\n assertEquals(1, resultMatrixGnuPlot0.getVisibleColCount());\n assertFalse(resultMatrixGnuPlot0.getRemoveFilterName());\n assertEquals(0, resultMatrixGnuPlot0.getCountWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixGnuPlot0.enumerateColNamesTipText());\n assertEquals(50, resultMatrixGnuPlot0.getDefaultColNameWidth());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultStdDevWidth());\n assertEquals(50, resultMatrixGnuPlot0.getColNameWidth());\n assertFalse(resultMatrixGnuPlot0.getDefaultShowStdDev());\n assertEquals(2, resultMatrixGnuPlot0.getDefaultMeanPrec());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixGnuPlot0.printRowNamesTipText());\n assertTrue(resultMatrixGnuPlot0.getPrintColNames());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixGnuPlot0.printColNamesTipText());\n assertTrue(resultMatrixGnuPlot0.getPrintRowNames());\n assertEquals(2, resultMatrixGnuPlot0.getDefaultStdDevPrec());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixGnuPlot0.showAverageTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixGnuPlot0.colNameWidthTipText());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixGnuPlot0.meanPrecTipText());\n assertEquals(1, resultMatrixGnuPlot0.getVisibleRowCount());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixGnuPlot0.stdDevWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getEnumerateColNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixGnuPlot0.enumerateRowNamesTipText());\n assertEquals(\"Generates output for a data and script file for GnuPlot.\", resultMatrixGnuPlot0.globalInfo());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultSignificanceWidth());\n assertEquals(2, resultMatrixGnuPlot0.getStdDevPrec());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixGnuPlot0.countWidthTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixGnuPlot0.showStdDevTipText());\n assertFalse(resultMatrixGnuPlot0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultMeanWidth());\n assertFalse(resultMatrixGnuPlot0.getEnumerateRowNames());\n assertEquals(0, resultMatrixGnuPlot0.getSignificanceWidth());\n assertTrue(resultMatrixGnuPlot0.getDefaultPrintRowNames());\n assertFalse(resultMatrixGnuPlot0.getDefaultEnumerateColNames());\n assertEquals(2, resultMatrixGnuPlot0.getMeanPrec());\n assertFalse(resultMatrixGnuPlot0.getDefaultShowAverage());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixGnuPlot0.meanWidthTipText());\n assertEquals(1, resultMatrixGnuPlot0.getRowCount());\n assertEquals(\"GNUPlot\", resultMatrixGnuPlot0.getDisplayName());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultCountWidth());\n assertEquals(50, resultMatrixGnuPlot0.getDefaultRowNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixGnuPlot0.significanceWidthTipText());\n assertEquals(0, resultMatrixGnuPlot0.getStdDevWidth());\n assertFalse(resultMatrixGnuPlot0.getShowAverage());\n assertFalse(resultMatrixGnuPlot0.getDefaultEnumerateRowNames());\n assertFalse(resultMatrixGnuPlot0.getShowStdDev());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixGnuPlot0.removeFilterNameTipText());\n assertEquals(50, resultMatrixGnuPlot0.getRowNameWidth());\n assertEquals(0, resultMatrixGnuPlot0.getMeanWidth());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixGnuPlot0.rowNameWidthTipText());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixGnuPlot0.stdDevPrecTipText());\n assertTrue(resultMatrixGnuPlot0.getDefaultPrintColNames());\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n \n String[][] stringArray0 = new String[1][5];\n String[] stringArray1 = new String[3];\n stringArray1[0] = \"\";\n stringArray1[1] = \"v\";\n stringArray1[2] = \"v\";\n stringArray0[0] = stringArray1;\n int int0 = resultMatrixGnuPlot0.getColSize(stringArray0, 1898, true, true);\n assertEquals(1, resultMatrixGnuPlot0.getColCount());\n assertEquals(1, resultMatrixGnuPlot0.getVisibleColCount());\n assertFalse(resultMatrixGnuPlot0.getRemoveFilterName());\n assertEquals(0, resultMatrixGnuPlot0.getCountWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixGnuPlot0.enumerateColNamesTipText());\n assertEquals(50, resultMatrixGnuPlot0.getDefaultColNameWidth());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultStdDevWidth());\n assertEquals(50, resultMatrixGnuPlot0.getColNameWidth());\n assertFalse(resultMatrixGnuPlot0.getDefaultShowStdDev());\n assertEquals(2, resultMatrixGnuPlot0.getDefaultMeanPrec());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixGnuPlot0.printRowNamesTipText());\n assertTrue(resultMatrixGnuPlot0.getPrintColNames());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixGnuPlot0.printColNamesTipText());\n assertTrue(resultMatrixGnuPlot0.getPrintRowNames());\n assertEquals(2, resultMatrixGnuPlot0.getDefaultStdDevPrec());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixGnuPlot0.showAverageTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixGnuPlot0.colNameWidthTipText());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixGnuPlot0.meanPrecTipText());\n assertEquals(1, resultMatrixGnuPlot0.getVisibleRowCount());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixGnuPlot0.stdDevWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getEnumerateColNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixGnuPlot0.enumerateRowNamesTipText());\n assertEquals(\"Generates output for a data and script file for GnuPlot.\", resultMatrixGnuPlot0.globalInfo());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultSignificanceWidth());\n assertEquals(2, resultMatrixGnuPlot0.getStdDevPrec());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixGnuPlot0.countWidthTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixGnuPlot0.showStdDevTipText());\n assertFalse(resultMatrixGnuPlot0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultMeanWidth());\n assertFalse(resultMatrixGnuPlot0.getEnumerateRowNames());\n assertEquals(0, resultMatrixGnuPlot0.getSignificanceWidth());\n assertTrue(resultMatrixGnuPlot0.getDefaultPrintRowNames());\n assertFalse(resultMatrixGnuPlot0.getDefaultEnumerateColNames());\n assertEquals(2, resultMatrixGnuPlot0.getMeanPrec());\n assertFalse(resultMatrixGnuPlot0.getDefaultShowAverage());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixGnuPlot0.meanWidthTipText());\n assertEquals(1, resultMatrixGnuPlot0.getRowCount());\n assertEquals(\"GNUPlot\", resultMatrixGnuPlot0.getDisplayName());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultCountWidth());\n assertEquals(50, resultMatrixGnuPlot0.getDefaultRowNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixGnuPlot0.significanceWidthTipText());\n assertEquals(0, resultMatrixGnuPlot0.getStdDevWidth());\n assertFalse(resultMatrixGnuPlot0.getShowAverage());\n assertFalse(resultMatrixGnuPlot0.getDefaultEnumerateRowNames());\n assertFalse(resultMatrixGnuPlot0.getShowStdDev());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixGnuPlot0.removeFilterNameTipText());\n assertEquals(50, resultMatrixGnuPlot0.getRowNameWidth());\n assertEquals(0, resultMatrixGnuPlot0.getMeanWidth());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixGnuPlot0.rowNameWidthTipText());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixGnuPlot0.stdDevPrecTipText());\n assertTrue(resultMatrixGnuPlot0.getDefaultPrintColNames());\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, int0);\n assertEquals(1, stringArray0.length);\n \n ResultMatrixLatex resultMatrixLatex0 = new ResultMatrixLatex(resultMatrixGnuPlot0);\n assertEquals(0, resultMatrixLatex0.getDefaultColNameWidth());\n assertEquals(2, resultMatrixLatex0.getDefaultStdDevPrec());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixLatex0.rowNameWidthTipText());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixLatex0.enumerateRowNamesTipText());\n assertFalse(resultMatrixLatex0.getEnumerateColNames());\n assertEquals(2, resultMatrixLatex0.getDefaultMeanPrec());\n assertEquals(0, resultMatrixLatex0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixLatex0.countWidthTipText());\n assertFalse(resultMatrixLatex0.getDefaultRemoveFilterName());\n assertFalse(resultMatrixLatex0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixLatex0.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixLatex0.getDefaultStdDevWidth());\n assertEquals(0, resultMatrixLatex0.getColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixLatex0.stdDevPrecTipText());\n assertFalse(resultMatrixLatex0.getDefaultPrintColNames());\n assertTrue(resultMatrixLatex0.getPrintRowNames());\n assertEquals(1, resultMatrixLatex0.getVisibleColCount());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixLatex0.removeFilterNameTipText());\n assertEquals(\"LaTeX\", resultMatrixLatex0.getDisplayName());\n assertEquals(2, resultMatrixLatex0.getMeanPrec());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixLatex0.printColNamesTipText());\n assertEquals(0, resultMatrixLatex0.getCountWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixLatex0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixLatex0.getSignificanceWidth());\n assertEquals(0, resultMatrixLatex0.getStdDevWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixLatex0.significanceWidthTipText());\n assertFalse(resultMatrixLatex0.getShowStdDev());\n assertTrue(resultMatrixLatex0.getDefaultEnumerateColNames());\n assertFalse(resultMatrixLatex0.getShowAverage());\n assertEquals(0, resultMatrixLatex0.getMeanWidth());\n assertEquals(\"Generates the matrix output in LaTeX-syntax.\", resultMatrixLatex0.globalInfo());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixLatex0.showStdDevTipText());\n assertEquals(50, resultMatrixLatex0.getRowNameWidth());\n assertEquals(0, resultMatrixLatex0.getDefaultCountWidth());\n assertEquals(1, resultMatrixLatex0.getColCount());\n assertEquals(0, resultMatrixLatex0.getDefaultMeanWidth());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixLatex0.colNameWidthTipText());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixLatex0.showAverageTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixLatex0.printRowNamesTipText());\n assertTrue(resultMatrixLatex0.getPrintColNames());\n assertFalse(resultMatrixLatex0.getDefaultShowStdDev());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixLatex0.meanWidthTipText());\n assertEquals(1, resultMatrixLatex0.getRowCount());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixLatex0.meanPrecTipText());\n assertTrue(resultMatrixLatex0.getDefaultPrintRowNames());\n assertEquals(2, resultMatrixLatex0.getStdDevPrec());\n assertFalse(resultMatrixLatex0.getDefaultShowAverage());\n assertEquals(1, resultMatrixLatex0.getVisibleRowCount());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixLatex0.stdDevWidthTipText());\n assertFalse(resultMatrixLatex0.getRemoveFilterName());\n assertFalse(resultMatrixLatex0.getEnumerateRowNames());\n assertEquals(1, resultMatrixGnuPlot0.getColCount());\n assertEquals(1, resultMatrixGnuPlot0.getVisibleColCount());\n assertFalse(resultMatrixGnuPlot0.getRemoveFilterName());\n assertEquals(0, resultMatrixGnuPlot0.getCountWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixGnuPlot0.enumerateColNamesTipText());\n assertEquals(50, resultMatrixGnuPlot0.getDefaultColNameWidth());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultStdDevWidth());\n assertEquals(50, resultMatrixGnuPlot0.getColNameWidth());\n assertFalse(resultMatrixGnuPlot0.getDefaultShowStdDev());\n assertEquals(2, resultMatrixGnuPlot0.getDefaultMeanPrec());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixGnuPlot0.printRowNamesTipText());\n assertTrue(resultMatrixGnuPlot0.getPrintColNames());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixGnuPlot0.printColNamesTipText());\n assertTrue(resultMatrixGnuPlot0.getPrintRowNames());\n assertEquals(2, resultMatrixGnuPlot0.getDefaultStdDevPrec());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixGnuPlot0.showAverageTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixGnuPlot0.colNameWidthTipText());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixGnuPlot0.meanPrecTipText());\n assertEquals(1, resultMatrixGnuPlot0.getVisibleRowCount());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixGnuPlot0.stdDevWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getEnumerateColNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixGnuPlot0.enumerateRowNamesTipText());\n assertEquals(\"Generates output for a data and script file for GnuPlot.\", resultMatrixGnuPlot0.globalInfo());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultSignificanceWidth());\n assertEquals(2, resultMatrixGnuPlot0.getStdDevPrec());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixGnuPlot0.countWidthTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixGnuPlot0.showStdDevTipText());\n assertFalse(resultMatrixGnuPlot0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultMeanWidth());\n assertFalse(resultMatrixGnuPlot0.getEnumerateRowNames());\n assertEquals(0, resultMatrixGnuPlot0.getSignificanceWidth());\n assertTrue(resultMatrixGnuPlot0.getDefaultPrintRowNames());\n assertFalse(resultMatrixGnuPlot0.getDefaultEnumerateColNames());\n assertEquals(2, resultMatrixGnuPlot0.getMeanPrec());\n assertFalse(resultMatrixGnuPlot0.getDefaultShowAverage());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixGnuPlot0.meanWidthTipText());\n assertEquals(1, resultMatrixGnuPlot0.getRowCount());\n assertEquals(\"GNUPlot\", resultMatrixGnuPlot0.getDisplayName());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultCountWidth());\n assertEquals(50, resultMatrixGnuPlot0.getDefaultRowNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixGnuPlot0.significanceWidthTipText());\n assertEquals(0, resultMatrixGnuPlot0.getStdDevWidth());\n assertFalse(resultMatrixGnuPlot0.getShowAverage());\n assertFalse(resultMatrixGnuPlot0.getDefaultEnumerateRowNames());\n assertFalse(resultMatrixGnuPlot0.getShowStdDev());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixGnuPlot0.removeFilterNameTipText());\n assertEquals(50, resultMatrixGnuPlot0.getRowNameWidth());\n assertEquals(0, resultMatrixGnuPlot0.getMeanWidth());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixGnuPlot0.rowNameWidthTipText());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixGnuPlot0.stdDevPrecTipText());\n assertTrue(resultMatrixGnuPlot0.getDefaultPrintColNames());\n assertNotNull(resultMatrixLatex0);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n \n boolean boolean0 = resultMatrixLatex0.getEnumerateRowNames();\n assertEquals(0, resultMatrixLatex0.getDefaultColNameWidth());\n assertEquals(2, resultMatrixLatex0.getDefaultStdDevPrec());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixLatex0.rowNameWidthTipText());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixLatex0.enumerateRowNamesTipText());\n assertFalse(resultMatrixLatex0.getEnumerateColNames());\n assertEquals(2, resultMatrixLatex0.getDefaultMeanPrec());\n assertEquals(0, resultMatrixLatex0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixLatex0.countWidthTipText());\n assertFalse(resultMatrixLatex0.getDefaultRemoveFilterName());\n assertFalse(resultMatrixLatex0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixLatex0.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixLatex0.getDefaultStdDevWidth());\n assertEquals(0, resultMatrixLatex0.getColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixLatex0.stdDevPrecTipText());\n assertFalse(resultMatrixLatex0.getDefaultPrintColNames());\n assertTrue(resultMatrixLatex0.getPrintRowNames());\n assertEquals(1, resultMatrixLatex0.getVisibleColCount());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixLatex0.removeFilterNameTipText());\n assertEquals(\"LaTeX\", resultMatrixLatex0.getDisplayName());\n assertEquals(2, resultMatrixLatex0.getMeanPrec());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixLatex0.printColNamesTipText());\n assertEquals(0, resultMatrixLatex0.getCountWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixLatex0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixLatex0.getSignificanceWidth());\n assertEquals(0, resultMatrixLatex0.getStdDevWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixLatex0.significanceWidthTipText());\n assertFalse(resultMatrixLatex0.getShowStdDev());\n assertTrue(resultMatrixLatex0.getDefaultEnumerateColNames());\n assertFalse(resultMatrixLatex0.getShowAverage());\n assertEquals(0, resultMatrixLatex0.getMeanWidth());\n assertEquals(\"Generates the matrix output in LaTeX-syntax.\", resultMatrixLatex0.globalInfo());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixLatex0.showStdDevTipText());\n assertEquals(50, resultMatrixLatex0.getRowNameWidth());\n assertEquals(0, resultMatrixLatex0.getDefaultCountWidth());\n assertEquals(1, resultMatrixLatex0.getColCount());\n assertEquals(0, resultMatrixLatex0.getDefaultMeanWidth());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixLatex0.colNameWidthTipText());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixLatex0.showAverageTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixLatex0.printRowNamesTipText());\n assertTrue(resultMatrixLatex0.getPrintColNames());\n assertFalse(resultMatrixLatex0.getDefaultShowStdDev());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixLatex0.meanWidthTipText());\n assertEquals(1, resultMatrixLatex0.getRowCount());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixLatex0.meanPrecTipText());\n assertTrue(resultMatrixLatex0.getDefaultPrintRowNames());\n assertEquals(2, resultMatrixLatex0.getStdDevPrec());\n assertFalse(resultMatrixLatex0.getDefaultShowAverage());\n assertEquals(1, resultMatrixLatex0.getVisibleRowCount());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixLatex0.stdDevWidthTipText());\n assertFalse(resultMatrixLatex0.getRemoveFilterName());\n assertFalse(resultMatrixLatex0.getEnumerateRowNames());\n assertEquals(1, resultMatrixGnuPlot0.getColCount());\n assertEquals(1, resultMatrixGnuPlot0.getVisibleColCount());\n assertFalse(resultMatrixGnuPlot0.getRemoveFilterName());\n assertEquals(0, resultMatrixGnuPlot0.getCountWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixGnuPlot0.enumerateColNamesTipText());\n assertEquals(50, resultMatrixGnuPlot0.getDefaultColNameWidth());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultStdDevWidth());\n assertEquals(50, resultMatrixGnuPlot0.getColNameWidth());\n assertFalse(resultMatrixGnuPlot0.getDefaultShowStdDev());\n assertEquals(2, resultMatrixGnuPlot0.getDefaultMeanPrec());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixGnuPlot0.printRowNamesTipText());\n assertTrue(resultMatrixGnuPlot0.getPrintColNames());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixGnuPlot0.printColNamesTipText());\n assertTrue(resultMatrixGnuPlot0.getPrintRowNames());\n assertEquals(2, resultMatrixGnuPlot0.getDefaultStdDevPrec());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixGnuPlot0.showAverageTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixGnuPlot0.colNameWidthTipText());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixGnuPlot0.meanPrecTipText());\n assertEquals(1, resultMatrixGnuPlot0.getVisibleRowCount());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixGnuPlot0.stdDevWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getEnumerateColNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixGnuPlot0.enumerateRowNamesTipText());\n assertEquals(\"Generates output for a data and script file for GnuPlot.\", resultMatrixGnuPlot0.globalInfo());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultSignificanceWidth());\n assertEquals(2, resultMatrixGnuPlot0.getStdDevPrec());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixGnuPlot0.countWidthTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixGnuPlot0.showStdDevTipText());\n assertFalse(resultMatrixGnuPlot0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultMeanWidth());\n assertFalse(resultMatrixGnuPlot0.getEnumerateRowNames());\n assertEquals(0, resultMatrixGnuPlot0.getSignificanceWidth());\n assertTrue(resultMatrixGnuPlot0.getDefaultPrintRowNames());\n assertFalse(resultMatrixGnuPlot0.getDefaultEnumerateColNames());\n assertEquals(2, resultMatrixGnuPlot0.getMeanPrec());\n assertFalse(resultMatrixGnuPlot0.getDefaultShowAverage());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixGnuPlot0.meanWidthTipText());\n assertEquals(1, resultMatrixGnuPlot0.getRowCount());\n assertEquals(\"GNUPlot\", resultMatrixGnuPlot0.getDisplayName());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultCountWidth());\n assertEquals(50, resultMatrixGnuPlot0.getDefaultRowNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixGnuPlot0.significanceWidthTipText());\n assertEquals(0, resultMatrixGnuPlot0.getStdDevWidth());\n assertFalse(resultMatrixGnuPlot0.getShowAverage());\n assertFalse(resultMatrixGnuPlot0.getDefaultEnumerateRowNames());\n assertFalse(resultMatrixGnuPlot0.getShowStdDev());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixGnuPlot0.removeFilterNameTipText());\n assertEquals(50, resultMatrixGnuPlot0.getRowNameWidth());\n assertEquals(0, resultMatrixGnuPlot0.getMeanWidth());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixGnuPlot0.rowNameWidthTipText());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixGnuPlot0.stdDevPrecTipText());\n assertTrue(resultMatrixGnuPlot0.getDefaultPrintColNames());\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertFalse(boolean0);\n \n ResultMatrixPlainText resultMatrixPlainText0 = new ResultMatrixPlainText(resultMatrixGnuPlot0);\n assertEquals(1, resultMatrixGnuPlot0.getColCount());\n assertEquals(1, resultMatrixGnuPlot0.getVisibleColCount());\n assertFalse(resultMatrixGnuPlot0.getRemoveFilterName());\n assertEquals(0, resultMatrixGnuPlot0.getCountWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixGnuPlot0.enumerateColNamesTipText());\n assertEquals(50, resultMatrixGnuPlot0.getDefaultColNameWidth());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultStdDevWidth());\n assertEquals(50, resultMatrixGnuPlot0.getColNameWidth());\n assertFalse(resultMatrixGnuPlot0.getDefaultShowStdDev());\n assertEquals(2, resultMatrixGnuPlot0.getDefaultMeanPrec());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixGnuPlot0.printRowNamesTipText());\n assertTrue(resultMatrixGnuPlot0.getPrintColNames());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixGnuPlot0.printColNamesTipText());\n assertTrue(resultMatrixGnuPlot0.getPrintRowNames());\n assertEquals(2, resultMatrixGnuPlot0.getDefaultStdDevPrec());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixGnuPlot0.showAverageTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixGnuPlot0.colNameWidthTipText());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixGnuPlot0.meanPrecTipText());\n assertEquals(1, resultMatrixGnuPlot0.getVisibleRowCount());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixGnuPlot0.stdDevWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getEnumerateColNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixGnuPlot0.enumerateRowNamesTipText());\n assertEquals(\"Generates output for a data and script file for GnuPlot.\", resultMatrixGnuPlot0.globalInfo());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultSignificanceWidth());\n assertEquals(2, resultMatrixGnuPlot0.getStdDevPrec());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixGnuPlot0.countWidthTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixGnuPlot0.showStdDevTipText());\n assertFalse(resultMatrixGnuPlot0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultMeanWidth());\n assertFalse(resultMatrixGnuPlot0.getEnumerateRowNames());\n assertEquals(0, resultMatrixGnuPlot0.getSignificanceWidth());\n assertTrue(resultMatrixGnuPlot0.getDefaultPrintRowNames());\n assertFalse(resultMatrixGnuPlot0.getDefaultEnumerateColNames());\n assertEquals(2, resultMatrixGnuPlot0.getMeanPrec());\n assertFalse(resultMatrixGnuPlot0.getDefaultShowAverage());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixGnuPlot0.meanWidthTipText());\n assertEquals(1, resultMatrixGnuPlot0.getRowCount());\n assertEquals(\"GNUPlot\", resultMatrixGnuPlot0.getDisplayName());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultCountWidth());\n assertEquals(50, resultMatrixGnuPlot0.getDefaultRowNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixGnuPlot0.significanceWidthTipText());\n assertEquals(0, resultMatrixGnuPlot0.getStdDevWidth());\n assertFalse(resultMatrixGnuPlot0.getShowAverage());\n assertFalse(resultMatrixGnuPlot0.getDefaultEnumerateRowNames());\n assertFalse(resultMatrixGnuPlot0.getShowStdDev());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixGnuPlot0.removeFilterNameTipText());\n assertEquals(50, resultMatrixGnuPlot0.getRowNameWidth());\n assertEquals(0, resultMatrixGnuPlot0.getMeanWidth());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixGnuPlot0.rowNameWidthTipText());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixGnuPlot0.stdDevPrecTipText());\n assertTrue(resultMatrixGnuPlot0.getDefaultPrintColNames());\n assertFalse(resultMatrixPlainText0.getDefaultEnumerateRowNames());\n assertEquals(1, resultMatrixPlainText0.getVisibleRowCount());\n assertFalse(resultMatrixPlainText0.getEnumerateRowNames());\n assertEquals(2, resultMatrixPlainText0.getMeanPrec());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateRowNamesTipText());\n assertFalse(resultMatrixPlainText0.getDefaultShowAverage());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixPlainText0.rowNameWidthTipText());\n assertTrue(resultMatrixPlainText0.getDefaultPrintRowNames());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixPlainText0.countWidthTipText());\n assertEquals(2, resultMatrixPlainText0.getDefaultMeanPrec());\n assertEquals(0, resultMatrixPlainText0.getSignificanceWidth());\n assertTrue(resultMatrixPlainText0.getPrintRowNames());\n assertEquals(25, resultMatrixPlainText0.getDefaultRowNameWidth());\n assertFalse(resultMatrixPlainText0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixPlainText0.getCountWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultColNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixPlainText0.significanceWidthTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixPlainText0.showStdDevTipText());\n assertFalse(resultMatrixPlainText0.getEnumerateColNames());\n assertEquals(1, resultMatrixPlainText0.getVisibleColCount());\n assertEquals(0, resultMatrixPlainText0.getDefaultSignificanceWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultStdDevWidth());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixPlainText0.removeFilterNameTipText());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixPlainText0.printColNamesTipText());\n assertEquals(0, resultMatrixPlainText0.getColNameWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixPlainText0.getMeanWidth());\n assertFalse(resultMatrixPlainText0.getRemoveFilterName());\n assertEquals(1, resultMatrixPlainText0.getColCount());\n assertEquals(\"Generates the output as plain text (for fixed width fonts).\", resultMatrixPlainText0.globalInfo());\n assertTrue(resultMatrixPlainText0.getDefaultEnumerateColNames());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixPlainText0.stdDevWidthTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateColNamesTipText());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixPlainText0.stdDevPrecTipText());\n assertFalse(resultMatrixPlainText0.getShowStdDev());\n assertFalse(resultMatrixPlainText0.getDefaultShowStdDev());\n assertEquals(5, resultMatrixPlainText0.getDefaultCountWidth());\n assertEquals(\"Plain Text\", resultMatrixPlainText0.getDisplayName());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixPlainText0.printRowNamesTipText());\n assertTrue(resultMatrixPlainText0.getDefaultPrintColNames());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixPlainText0.meanWidthTipText());\n assertEquals(2, resultMatrixPlainText0.getStdDevPrec());\n assertTrue(resultMatrixPlainText0.getPrintColNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixPlainText0.showAverageTipText());\n assertEquals(1, resultMatrixPlainText0.getRowCount());\n assertEquals(2, resultMatrixPlainText0.getDefaultStdDevPrec());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixPlainText0.meanPrecTipText());\n assertEquals(50, resultMatrixPlainText0.getRowNameWidth());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixPlainText0.colNameWidthTipText());\n assertEquals(0, resultMatrixPlainText0.getStdDevWidth());\n assertFalse(resultMatrixPlainText0.getShowAverage());\n assertNotNull(resultMatrixPlainText0);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n \n resultMatrixPlainText0.m_RankingWins = intArray2;\n assertEquals(1, resultMatrixGnuPlot0.getColCount());\n assertEquals(1, resultMatrixGnuPlot0.getVisibleColCount());\n assertFalse(resultMatrixGnuPlot0.getRemoveFilterName());\n assertEquals(0, resultMatrixGnuPlot0.getCountWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixGnuPlot0.enumerateColNamesTipText());\n assertEquals(50, resultMatrixGnuPlot0.getDefaultColNameWidth());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultStdDevWidth());\n assertEquals(50, resultMatrixGnuPlot0.getColNameWidth());\n assertFalse(resultMatrixGnuPlot0.getDefaultShowStdDev());\n assertEquals(2, resultMatrixGnuPlot0.getDefaultMeanPrec());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixGnuPlot0.printRowNamesTipText());\n assertTrue(resultMatrixGnuPlot0.getPrintColNames());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixGnuPlot0.printColNamesTipText());\n assertTrue(resultMatrixGnuPlot0.getPrintRowNames());\n assertEquals(2, resultMatrixGnuPlot0.getDefaultStdDevPrec());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixGnuPlot0.showAverageTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixGnuPlot0.colNameWidthTipText());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixGnuPlot0.meanPrecTipText());\n assertEquals(1, resultMatrixGnuPlot0.getVisibleRowCount());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixGnuPlot0.stdDevWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getEnumerateColNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixGnuPlot0.enumerateRowNamesTipText());\n assertEquals(\"Generates output for a data and script file for GnuPlot.\", resultMatrixGnuPlot0.globalInfo());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultSignificanceWidth());\n assertEquals(2, resultMatrixGnuPlot0.getStdDevPrec());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixGnuPlot0.countWidthTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixGnuPlot0.showStdDevTipText());\n assertFalse(resultMatrixGnuPlot0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultMeanWidth());\n assertFalse(resultMatrixGnuPlot0.getEnumerateRowNames());\n assertEquals(0, resultMatrixGnuPlot0.getSignificanceWidth());\n assertTrue(resultMatrixGnuPlot0.getDefaultPrintRowNames());\n assertFalse(resultMatrixGnuPlot0.getDefaultEnumerateColNames());\n assertEquals(2, resultMatrixGnuPlot0.getMeanPrec());\n assertFalse(resultMatrixGnuPlot0.getDefaultShowAverage());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixGnuPlot0.meanWidthTipText());\n assertEquals(1, resultMatrixGnuPlot0.getRowCount());\n assertEquals(\"GNUPlot\", resultMatrixGnuPlot0.getDisplayName());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultCountWidth());\n assertEquals(50, resultMatrixGnuPlot0.getDefaultRowNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixGnuPlot0.significanceWidthTipText());\n assertEquals(0, resultMatrixGnuPlot0.getStdDevWidth());\n assertFalse(resultMatrixGnuPlot0.getShowAverage());\n assertFalse(resultMatrixGnuPlot0.getDefaultEnumerateRowNames());\n assertFalse(resultMatrixGnuPlot0.getShowStdDev());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixGnuPlot0.removeFilterNameTipText());\n assertEquals(50, resultMatrixGnuPlot0.getRowNameWidth());\n assertEquals(0, resultMatrixGnuPlot0.getMeanWidth());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixGnuPlot0.rowNameWidthTipText());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixGnuPlot0.stdDevPrecTipText());\n assertTrue(resultMatrixGnuPlot0.getDefaultPrintColNames());\n assertFalse(resultMatrixPlainText0.getDefaultEnumerateRowNames());\n assertEquals(1, resultMatrixPlainText0.getVisibleRowCount());\n assertFalse(resultMatrixPlainText0.getEnumerateRowNames());\n assertEquals(2, resultMatrixPlainText0.getMeanPrec());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateRowNamesTipText());\n assertFalse(resultMatrixPlainText0.getDefaultShowAverage());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixPlainText0.rowNameWidthTipText());\n assertTrue(resultMatrixPlainText0.getDefaultPrintRowNames());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixPlainText0.countWidthTipText());\n assertEquals(2, resultMatrixPlainText0.getDefaultMeanPrec());\n assertEquals(0, resultMatrixPlainText0.getSignificanceWidth());\n assertTrue(resultMatrixPlainText0.getPrintRowNames());\n assertEquals(25, resultMatrixPlainText0.getDefaultRowNameWidth());\n assertFalse(resultMatrixPlainText0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixPlainText0.getCountWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultColNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixPlainText0.significanceWidthTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixPlainText0.showStdDevTipText());\n assertFalse(resultMatrixPlainText0.getEnumerateColNames());\n assertEquals(1, resultMatrixPlainText0.getVisibleColCount());\n assertEquals(0, resultMatrixPlainText0.getDefaultSignificanceWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultStdDevWidth());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixPlainText0.removeFilterNameTipText());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixPlainText0.printColNamesTipText());\n assertEquals(0, resultMatrixPlainText0.getColNameWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixPlainText0.getMeanWidth());\n assertFalse(resultMatrixPlainText0.getRemoveFilterName());\n assertEquals(1, resultMatrixPlainText0.getColCount());\n assertEquals(\"Generates the output as plain text (for fixed width fonts).\", resultMatrixPlainText0.globalInfo());\n assertTrue(resultMatrixPlainText0.getDefaultEnumerateColNames());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixPlainText0.stdDevWidthTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateColNamesTipText());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixPlainText0.stdDevPrecTipText());\n assertFalse(resultMatrixPlainText0.getShowStdDev());\n assertFalse(resultMatrixPlainText0.getDefaultShowStdDev());\n assertEquals(5, resultMatrixPlainText0.getDefaultCountWidth());\n assertEquals(\"Plain Text\", resultMatrixPlainText0.getDisplayName());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixPlainText0.printRowNamesTipText());\n assertTrue(resultMatrixPlainText0.getDefaultPrintColNames());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixPlainText0.meanWidthTipText());\n assertEquals(2, resultMatrixPlainText0.getStdDevPrec());\n assertTrue(resultMatrixPlainText0.getPrintColNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixPlainText0.showAverageTipText());\n assertEquals(1, resultMatrixPlainText0.getRowCount());\n assertEquals(2, resultMatrixPlainText0.getDefaultStdDevPrec());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixPlainText0.meanPrecTipText());\n assertEquals(50, resultMatrixPlainText0.getRowNameWidth());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixPlainText0.colNameWidthTipText());\n assertEquals(0, resultMatrixPlainText0.getStdDevWidth());\n assertFalse(resultMatrixPlainText0.getShowAverage());\n \n int int1 = resultMatrixPlainText0.getDefaultSignificanceWidth();\n assertEquals(1, resultMatrixGnuPlot0.getColCount());\n assertEquals(1, resultMatrixGnuPlot0.getVisibleColCount());\n assertFalse(resultMatrixGnuPlot0.getRemoveFilterName());\n assertEquals(0, resultMatrixGnuPlot0.getCountWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixGnuPlot0.enumerateColNamesTipText());\n assertEquals(50, resultMatrixGnuPlot0.getDefaultColNameWidth());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultStdDevWidth());\n assertEquals(50, resultMatrixGnuPlot0.getColNameWidth());\n assertFalse(resultMatrixGnuPlot0.getDefaultShowStdDev());\n assertEquals(2, resultMatrixGnuPlot0.getDefaultMeanPrec());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixGnuPlot0.printRowNamesTipText());\n assertTrue(resultMatrixGnuPlot0.getPrintColNames());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixGnuPlot0.printColNamesTipText());\n assertTrue(resultMatrixGnuPlot0.getPrintRowNames());\n assertEquals(2, resultMatrixGnuPlot0.getDefaultStdDevPrec());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixGnuPlot0.showAverageTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixGnuPlot0.colNameWidthTipText());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixGnuPlot0.meanPrecTipText());\n assertEquals(1, resultMatrixGnuPlot0.getVisibleRowCount());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixGnuPlot0.stdDevWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getEnumerateColNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixGnuPlot0.enumerateRowNamesTipText());\n assertEquals(\"Generates output for a data and script file for GnuPlot.\", resultMatrixGnuPlot0.globalInfo());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultSignificanceWidth());\n assertEquals(2, resultMatrixGnuPlot0.getStdDevPrec());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixGnuPlot0.countWidthTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixGnuPlot0.showStdDevTipText());\n assertFalse(resultMatrixGnuPlot0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultMeanWidth());\n assertFalse(resultMatrixGnuPlot0.getEnumerateRowNames());\n assertEquals(0, resultMatrixGnuPlot0.getSignificanceWidth());\n assertTrue(resultMatrixGnuPlot0.getDefaultPrintRowNames());\n assertFalse(resultMatrixGnuPlot0.getDefaultEnumerateColNames());\n assertEquals(2, resultMatrixGnuPlot0.getMeanPrec());\n assertFalse(resultMatrixGnuPlot0.getDefaultShowAverage());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixGnuPlot0.meanWidthTipText());\n assertEquals(1, resultMatrixGnuPlot0.getRowCount());\n assertEquals(\"GNUPlot\", resultMatrixGnuPlot0.getDisplayName());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultCountWidth());\n assertEquals(50, resultMatrixGnuPlot0.getDefaultRowNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixGnuPlot0.significanceWidthTipText());\n assertEquals(0, resultMatrixGnuPlot0.getStdDevWidth());\n assertFalse(resultMatrixGnuPlot0.getShowAverage());\n assertFalse(resultMatrixGnuPlot0.getDefaultEnumerateRowNames());\n assertFalse(resultMatrixGnuPlot0.getShowStdDev());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixGnuPlot0.removeFilterNameTipText());\n assertEquals(50, resultMatrixGnuPlot0.getRowNameWidth());\n assertEquals(0, resultMatrixGnuPlot0.getMeanWidth());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixGnuPlot0.rowNameWidthTipText());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixGnuPlot0.stdDevPrecTipText());\n assertTrue(resultMatrixGnuPlot0.getDefaultPrintColNames());\n assertFalse(resultMatrixPlainText0.getDefaultEnumerateRowNames());\n assertEquals(1, resultMatrixPlainText0.getVisibleRowCount());\n assertFalse(resultMatrixPlainText0.getEnumerateRowNames());\n assertEquals(2, resultMatrixPlainText0.getMeanPrec());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateRowNamesTipText());\n assertFalse(resultMatrixPlainText0.getDefaultShowAverage());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixPlainText0.rowNameWidthTipText());\n assertTrue(resultMatrixPlainText0.getDefaultPrintRowNames());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixPlainText0.countWidthTipText());\n assertEquals(2, resultMatrixPlainText0.getDefaultMeanPrec());\n assertEquals(0, resultMatrixPlainText0.getSignificanceWidth());\n assertTrue(resultMatrixPlainText0.getPrintRowNames());\n assertEquals(25, resultMatrixPlainText0.getDefaultRowNameWidth());\n assertFalse(resultMatrixPlainText0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixPlainText0.getCountWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultColNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixPlainText0.significanceWidthTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixPlainText0.showStdDevTipText());\n assertFalse(resultMatrixPlainText0.getEnumerateColNames());\n assertEquals(1, resultMatrixPlainText0.getVisibleColCount());\n assertEquals(0, resultMatrixPlainText0.getDefaultSignificanceWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultStdDevWidth());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixPlainText0.removeFilterNameTipText());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixPlainText0.printColNamesTipText());\n assertEquals(0, resultMatrixPlainText0.getColNameWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixPlainText0.getMeanWidth());\n assertFalse(resultMatrixPlainText0.getRemoveFilterName());\n assertEquals(1, resultMatrixPlainText0.getColCount());\n assertEquals(\"Generates the output as plain text (for fixed width fonts).\", resultMatrixPlainText0.globalInfo());\n assertTrue(resultMatrixPlainText0.getDefaultEnumerateColNames());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixPlainText0.stdDevWidthTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateColNamesTipText());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixPlainText0.stdDevPrecTipText());\n assertFalse(resultMatrixPlainText0.getShowStdDev());\n assertFalse(resultMatrixPlainText0.getDefaultShowStdDev());\n assertEquals(5, resultMatrixPlainText0.getDefaultCountWidth());\n assertEquals(\"Plain Text\", resultMatrixPlainText0.getDisplayName());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixPlainText0.printRowNamesTipText());\n assertTrue(resultMatrixPlainText0.getDefaultPrintColNames());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixPlainText0.meanWidthTipText());\n assertEquals(2, resultMatrixPlainText0.getStdDevPrec());\n assertTrue(resultMatrixPlainText0.getPrintColNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixPlainText0.showAverageTipText());\n assertEquals(1, resultMatrixPlainText0.getRowCount());\n assertEquals(2, resultMatrixPlainText0.getDefaultStdDevPrec());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixPlainText0.meanPrecTipText());\n assertEquals(50, resultMatrixPlainText0.getRowNameWidth());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixPlainText0.colNameWidthTipText());\n assertEquals(0, resultMatrixPlainText0.getStdDevWidth());\n assertFalse(resultMatrixPlainText0.getShowAverage());\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, int1);\n assertTrue(int1 == int0);\n \n int int2 = resultMatrixPlainText0.getDefaultRowNameWidth();\n assertEquals(1, resultMatrixGnuPlot0.getColCount());\n assertEquals(1, resultMatrixGnuPlot0.getVisibleColCount());\n assertFalse(resultMatrixGnuPlot0.getRemoveFilterName());\n assertEquals(0, resultMatrixGnuPlot0.getCountWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixGnuPlot0.enumerateColNamesTipText());\n assertEquals(50, resultMatrixGnuPlot0.getDefaultColNameWidth());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultStdDevWidth());\n assertEquals(50, resultMatrixGnuPlot0.getColNameWidth());\n assertFalse(resultMatrixGnuPlot0.getDefaultShowStdDev());\n assertEquals(2, resultMatrixGnuPlot0.getDefaultMeanPrec());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixGnuPlot0.printRowNamesTipText());\n assertTrue(resultMatrixGnuPlot0.getPrintColNames());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixGnuPlot0.printColNamesTipText());\n assertTrue(resultMatrixGnuPlot0.getPrintRowNames());\n assertEquals(2, resultMatrixGnuPlot0.getDefaultStdDevPrec());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixGnuPlot0.showAverageTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixGnuPlot0.colNameWidthTipText());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixGnuPlot0.meanPrecTipText());\n assertEquals(1, resultMatrixGnuPlot0.getVisibleRowCount());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixGnuPlot0.stdDevWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getEnumerateColNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixGnuPlot0.enumerateRowNamesTipText());\n assertEquals(\"Generates output for a data and script file for GnuPlot.\", resultMatrixGnuPlot0.globalInfo());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultSignificanceWidth());\n assertEquals(2, resultMatrixGnuPlot0.getStdDevPrec());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixGnuPlot0.countWidthTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixGnuPlot0.showStdDevTipText());\n assertFalse(resultMatrixGnuPlot0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultMeanWidth());\n assertFalse(resultMatrixGnuPlot0.getEnumerateRowNames());\n assertEquals(0, resultMatrixGnuPlot0.getSignificanceWidth());\n assertTrue(resultMatrixGnuPlot0.getDefaultPrintRowNames());\n assertFalse(resultMatrixGnuPlot0.getDefaultEnumerateColNames());\n assertEquals(2, resultMatrixGnuPlot0.getMeanPrec());\n assertFalse(resultMatrixGnuPlot0.getDefaultShowAverage());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixGnuPlot0.meanWidthTipText());\n assertEquals(1, resultMatrixGnuPlot0.getRowCount());\n assertEquals(\"GNUPlot\", resultMatrixGnuPlot0.getDisplayName());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultCountWidth());\n assertEquals(50, resultMatrixGnuPlot0.getDefaultRowNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixGnuPlot0.significanceWidthTipText());\n assertEquals(0, resultMatrixGnuPlot0.getStdDevWidth());\n assertFalse(resultMatrixGnuPlot0.getShowAverage());\n assertFalse(resultMatrixGnuPlot0.getDefaultEnumerateRowNames());\n assertFalse(resultMatrixGnuPlot0.getShowStdDev());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixGnuPlot0.removeFilterNameTipText());\n assertEquals(50, resultMatrixGnuPlot0.getRowNameWidth());\n assertEquals(0, resultMatrixGnuPlot0.getMeanWidth());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixGnuPlot0.rowNameWidthTipText());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixGnuPlot0.stdDevPrecTipText());\n assertTrue(resultMatrixGnuPlot0.getDefaultPrintColNames());\n assertFalse(resultMatrixPlainText0.getDefaultEnumerateRowNames());\n assertEquals(1, resultMatrixPlainText0.getVisibleRowCount());\n assertFalse(resultMatrixPlainText0.getEnumerateRowNames());\n assertEquals(2, resultMatrixPlainText0.getMeanPrec());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateRowNamesTipText());\n assertFalse(resultMatrixPlainText0.getDefaultShowAverage());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixPlainText0.rowNameWidthTipText());\n assertTrue(resultMatrixPlainText0.getDefaultPrintRowNames());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixPlainText0.countWidthTipText());\n assertEquals(2, resultMatrixPlainText0.getDefaultMeanPrec());\n assertEquals(0, resultMatrixPlainText0.getSignificanceWidth());\n assertTrue(resultMatrixPlainText0.getPrintRowNames());\n assertEquals(25, resultMatrixPlainText0.getDefaultRowNameWidth());\n assertFalse(resultMatrixPlainText0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixPlainText0.getCountWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultColNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixPlainText0.significanceWidthTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixPlainText0.showStdDevTipText());\n assertFalse(resultMatrixPlainText0.getEnumerateColNames());\n assertEquals(1, resultMatrixPlainText0.getVisibleColCount());\n assertEquals(0, resultMatrixPlainText0.getDefaultSignificanceWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultStdDevWidth());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixPlainText0.removeFilterNameTipText());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixPlainText0.printColNamesTipText());\n assertEquals(0, resultMatrixPlainText0.getColNameWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixPlainText0.getMeanWidth());\n assertFalse(resultMatrixPlainText0.getRemoveFilterName());\n assertEquals(1, resultMatrixPlainText0.getColCount());\n assertEquals(\"Generates the output as plain text (for fixed width fonts).\", resultMatrixPlainText0.globalInfo());\n assertTrue(resultMatrixPlainText0.getDefaultEnumerateColNames());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixPlainText0.stdDevWidthTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateColNamesTipText());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixPlainText0.stdDevPrecTipText());\n assertFalse(resultMatrixPlainText0.getShowStdDev());\n assertFalse(resultMatrixPlainText0.getDefaultShowStdDev());\n assertEquals(5, resultMatrixPlainText0.getDefaultCountWidth());\n assertEquals(\"Plain Text\", resultMatrixPlainText0.getDisplayName());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixPlainText0.printRowNamesTipText());\n assertTrue(resultMatrixPlainText0.getDefaultPrintColNames());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixPlainText0.meanWidthTipText());\n assertEquals(2, resultMatrixPlainText0.getStdDevPrec());\n assertTrue(resultMatrixPlainText0.getPrintColNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixPlainText0.showAverageTipText());\n assertEquals(1, resultMatrixPlainText0.getRowCount());\n assertEquals(2, resultMatrixPlainText0.getDefaultStdDevPrec());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixPlainText0.meanPrecTipText());\n assertEquals(50, resultMatrixPlainText0.getRowNameWidth());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixPlainText0.colNameWidthTipText());\n assertEquals(0, resultMatrixPlainText0.getStdDevWidth());\n assertFalse(resultMatrixPlainText0.getShowAverage());\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(25, int2);\n assertFalse(int2 == int0);\n assertFalse(int2 == int1);\n }", "@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 RegularGrid() {\r\n }", "@Test\n public void testJuvenilesSpreadFromOutsideInsideGrid() {\n params = new CompletelySpatiallyRandomParams(0.5, 0);\n coloniser = new CompletelySpatiallyRandomColoniser(landCoverType, juvenilePine, juvenileOak,\n juvenileDeciduous, params);\n coloniser.updateJuvenilePresenceLayers();\n\n assertTrue(countJuvenilesInGrid(juvenilePine) >= 5);\n assertTrue(countJuvenilesInGrid(juvenileOak) >= 5);\n assertTrue(countJuvenilesInGrid(juvenileDeciduous) >= 5);\n }", "public void displayGrid(){\n \tint max = currentOcean.getMaxGrid(); // modified by Ludo\n \tint line = max*2 +1; \t\t\t\t// modified by Ludo\n \tfor(int i=0; i<max+1;i++){\t\t\t// modified by Ludo\n \t int lineStart = 0 + line*i;\t\t// modified by Ludo\n \t int lineEnd = line + line*i;\t\t// modified by Ludo\n \t System.out.println(currentOcean.toString().substring(lineStart, lineEnd)); // modified by Ludo\n }\n }", "public GridTest(String name) {\n\t\tsuper(name);\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}" ]
[ "0.6946823", "0.65527284", "0.64433044", "0.6314723", "0.63039356", "0.62447655", "0.6238691", "0.61744165", "0.6033583", "0.6013725", "0.59956247", "0.5990239", "0.59846383", "0.5974014", "0.5889613", "0.5836693", "0.5834748", "0.5834297", "0.5803057", "0.5784526", "0.575173", "0.57389426", "0.5736623", "0.57244533", "0.5717405", "0.5716973", "0.5707497", "0.56948066", "0.5693546", "0.5684961", "0.5681167", "0.56732655", "0.56463546", "0.56372386", "0.5632941", "0.56278485", "0.5627066", "0.5625393", "0.56196916", "0.56088954", "0.55968565", "0.55959636", "0.55937374", "0.5581625", "0.5578383", "0.55683964", "0.5565622", "0.55589217", "0.55576587", "0.55541754", "0.5521916", "0.5508379", "0.55083114", "0.5506522", "0.5503082", "0.5489274", "0.548921", "0.5484055", "0.5477344", "0.5471766", "0.54589176", "0.5457967", "0.54407454", "0.5436548", "0.54359645", "0.5434528", "0.5434262", "0.54331243", "0.54301584", "0.5429218", "0.5423151", "0.5413777", "0.54108334", "0.5410773", "0.54106814", "0.54016984", "0.5398984", "0.5397821", "0.5396473", "0.53932136", "0.53929204", "0.5377709", "0.5376574", "0.53723466", "0.5369129", "0.5366648", "0.53619826", "0.53611404", "0.5360098", "0.5357777", "0.5352571", "0.53451246", "0.5344847", "0.5337176", "0.53339034", "0.53308356", "0.5319446", "0.5313672", "0.5311971", "0.5309567", "0.53084964" ]
0.0
-1
Parse JSON data in the webSide and return a List of category
public static ArrayList<Category> ParseCategories(JSONObject jsonTotalObject) { ArrayList<Category> categoryArrayList = new ArrayList<>(); try { JSONArray categories = jsonTotalObject.getJSONArray("categories"); // The recent categories Category recent = new Category(); recent.setName("Recent"); recent.setId(0); categoryArrayList.add(recent); for(int i = 0;i<categories.length();i++) { JSONObject jsonObject = categories.getJSONObject(i); Category category = new Category(); category.setName(jsonObject.getString("title")); category.setId(jsonObject.getInt("id")); category.setSlugName(jsonObject.getString("slug")); categoryArrayList.add(category); } return categoryArrayList; } catch (JSONException e) { Log.e(TAG,"JSONException when loading categories",e); e.printStackTrace(); return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void getCategoryList() {\n jsonArray = dataBaseHelper.getCategoriesFromDB();\n if (jsonArray != null && jsonArray.length() > 0) {\n rvCategories.setVisibility(View.VISIBLE);\n setupCategoryListAdapter(jsonArray);\n }else {\n rvCategories.setVisibility(View.GONE);\n Toast.makeText(getActivity(), Constants.ERR_NO_CATEGORY_FOUND, Toast.LENGTH_SHORT).show();\n }\n }", "private void populateCategories() {\n\n AsyncHttpClient client = new AsyncHttpClient();\n client.addHeader(\"Authorization\", \"Token token=\" + user.getToken().getAccess_token());\n client.get(LoginActivity.API_ROOT + \"events/\" + currEvent.getId() + \"/categories\",\n new BaseJsonHttpResponseHandler<Category[]>() {\n @Override\n public void onSuccess(int statusCode, Header[] headers, String rawJsonResponse,\n Category[] response) {\n categories_lv = (ListView) findViewById(R.id.categories_lv);\n// categoriesArr = response;\n\n // Make the first Category as \"All\" so that all teams can be shown\n // All retrieved categories will be put after \"All\"\n categoriesArr = new Category[response.length + 1];\n categoriesArr[0] = new Category(0, currEvent.getId(), \"All\", null, 0, null,\n teamsArr);\n System.arraycopy(response, 0, categoriesArr, 1, response.length);\n\n categories_lv.setAdapter(new CategoryAdapter(SelectionActivity.this,\n categoriesArr));\n categories_lv.setOnItemClickListener(new CategoryClickListener());\n\n Log.d(\"GET CATEGORIES\", \"success\");\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, Throwable error,\n String rawJsonData, Category[] errorResponse) {\n Log.d(\"GET CATEGORIES\", \"failure\");\n }\n\n @Override\n protected Category[] parseResponse(String rawJsonData, boolean isFailure)\n throws Throwable {\n\n if (!isFailure) {\n // Need to extract array from the first/outer JSON object\n JSONArray teamsJSONArr = new JSONObject(rawJsonData)\n .getJSONArray(\"event_categories\");\n return new Gson().fromJson(teamsJSONArr.toString(), Category[].class);\n } else return null;\n }\n });\n }", "@Override\n\n // If the request is succesfull\n public void onResponse(JSONObject response) {\n try {\n JSONArray categoriesArray = response.getJSONArray(\"categories\");\n for (int i = 0; i < categoriesArray.length(); i++){\n categories.add(categoriesArray.getString(i));\n }\n }\n catch (JSONException e) {\n Log.e(\"Request\", e.getMessage());\n }\n activity.gotCategories(categories);\n }", "private void getSubCategory(JSONArray j) {\n for (int i = 0; i < j.length(); i++) {\n try {\n //Getting json object\n JSONObject json = j.getJSONObject(i);\n\n sub_cat.add(json.getString(\"subcategory\"));\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }", "private void getAnimalCategory() {\n mProgressBar.setVisibility(View.VISIBLE);\n VolleyInvokeWebService volleyClient = new VolleyInvokeWebService(this, VolleyInvokeWebService.JSON_TYPE_REQUEST, this, Request.Method.GET);\n volleyClient.hitWithOutTokenService(Constants.GET_ANIMAL_CATEGORY, null, GET_ANIMAL_CATEGORY_TAG);\n }", "public List<String> getCategories();", "@RequestMapping(value = \"/categories\", method = RequestMethod.GET, produces = \"application/json\")\n public Collection<String> getCategories() {\n return this.datasetService.getCategories();\n }", "@GET\n @Path(\"/list\")\n @Consumes(MediaType.APPLICATION_JSON)\n @Produces(MediaType.APPLICATION_JSON)\n public Response getCategories(@javax.ws.rs.core.Context UriInfo uriInfo) {\n List categoryList = categoryRepository.selectAllVisible();\n Category category;\n SuccessMessage successMessage = new SuccessMessage();\n successMessage.setCode(Response.Status.OK.getStatusCode());\n successMessage.setStatus(\"success\");\n String url = uriInfo.getAbsolutePath().toString();\n successMessage.addLink(url, \"self\");\n\n if (categoryList.size() != 0) {\n successMessage.setMessage(\"categories retrieved\");\n for (int i = 0; i < categoryList.size(); i++) {\n JSONObject jsonObject = new JSONObject();\n category = (Category) categoryList.get(i);\n jsonObject.put(\"name\", category.getCategoryName());\n jsonObject.put(\"description\", category.getCatDescription());\n successMessage.addData(jsonObject);\n successMessage.addLink(BASE_URL + \"subcategories/category/\" + category.getCategoryName().replaceAll(\" \", \"%20\"), \"subcategories of \" + category.getCategoryName().toString());\n }\n } else {\n successMessage.setMessage(\"no categories to retrieve\");\n }\n return Response.status(Response.Status.OK).entity(successMessage)\n .header(\"Access-Control-Allow-Origin\", propertyReader.readProperty(\"Access-Control-Allow-Origin\"))\n .build();\n }", "@GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"getAllDeviceCategories\")\n List<JsonType> types();", "public void getCategories(String uri) {\n StringRequest request = new StringRequest(uri,\n response -> {\n JSONObject responseObject;\n JSONArray responseArray;\n\n try {\n // Get JSON object and array of data\n responseObject = new JSONObject(response);\n responseArray = responseObject.getJSONArray(\"categories\");\n ArrayList<String> categories = new ArrayList<>();\n\n // Add every found string to the ArrayList\n for (int i = 0; i < responseArray.length(); i++) {\n String category = responseArray.getString(i);\n categories.add(category);\n }\n // Use an adapter and the ArrayList to feed the list\n CategoryAdapter adapter = new CategoryAdapter(mContext, R.layout.list_item_category, categories);\n lv.setAdapter(adapter);\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n },\n error -> Toast.makeText(mContext, R.string.error_network, Toast.LENGTH_SHORT).show());\n RequestQueue queue = Volley.newRequestQueue(this);\n queue.add(request);\n }", "List<Category> getAllCategories();", "public String categoryList(CategoryDetails c);", "void getCategories(Callback activity){\n this.activity = activity;\n String url = \"https://resto.mprog.nl/categories\";\n\n RequestQueue queue = Volley.newRequestQueue(context);\n try {\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(url, null, this, this);\n queue.add(jsonObjectRequest);\n }\n catch (Exception error){\n\n // Return an error message if the request is not succesfull\n Log.e(\"Request\", error.getMessage());\n }\n }", "CodeOrNullListType getCategoryList();", "public List<VehicleCategoryMasterBean> categoryList() throws Exception;", "public List<Categorie> getAllCategories();", "public List<ProductCatagory> getAllCategory() throws BusinessException;", "public ArrayList<HashMap<String, String>> readCategories(XmlPullParser parser) throws IOException, XmlPullParserException {\r\n\r\n\t\t\tcategories = new ArrayList<HashMap<String, String>>();\r\n\r\n\r\n\t\t\tint eventType = parser.getEventType();\r\n\r\n\t\t\twhile(eventType != XmlPullParser.END_DOCUMENT) {\r\n\t\t\t\tswitch (eventType) {\r\n\t\t\t\t\tcase XmlPullParser.START_DOCUMENT:\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase XmlPullParser.START_TAG:\r\n\t\t\t\t\t\tString tagName = parser.getName();\r\n\t\t\t\t\t\tif(tagName.equals(\"category\")) {\r\n\t\t\t\t\t\t\tcategories.add(new HashMap<String, String>());\r\n\t\t\t\t\t\t} else if(tagName.equals(\"category_id\")) {\r\n\t\t\t\t\t\t\tcategories.get(categories.size()-1).put(\"ID\", parser.nextText());\r\n\t\t\t\t\t\t} else if(tagName.equals(\"category_name\")) {\r\n\t\t\t\t\t\t\tcategories.get(categories.size()-1).put(\"Name\", parser.nextText());\r\n\t\t\t\t\t\t} else if(tagName.equals(\"category_link\")) {\r\n\t\t\t\t\t\t\tcategories.get(categories.size()-1).put(\"Link\", parser.nextText());\r\n\t\t\t\t\t\t} else if(tagName.equals(\"color\")) {\r\n\t\t\t\t\t\t\tcategories.get(categories.size()-1).put(\"Color\", parser.nextText());\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\teventType = parser.next();\r\n\r\n\t\t\t}\r\n\r\n\t\tin.close();\r\n\t\treturn categories;\r\n\t}", "private List<CategoriesResponseDto.Categorie> extractCategories(CategoriesApiResponse response) {\n return response.getSubcategories().get(0).getSubcategories()\n .stream()\n .map(this::mapper)\n .collect(Collectors.toList());\n }", "public static CourseCategory[] createCategoryResponse() {\n CourseCategory[] categories = new CourseCategory[1];\n categories[0] = new CourseCategory();\n categories[0].setCategory(\"Math\");\n CourseSubject[] subjects = new CourseSubject[2];\n subjects[0] = new CourseSubject(\"Addition\", \"Math/Addition\", 1);\n subjects[1] = new CourseSubject(\"Subtration\", \"Math/Subtration\", 2);\n categories[0].setCourseSubject(subjects);\n return categories;\n }", "List<Category> selectCategoryList();", "public ModelAllGategorey(JSONObject jsonObject){\n\t\tif(jsonObject == null){\n\t\t\treturn;\n\t\t}\n\t\tstatus = jsonObject.optInt(\"status\");\n\t\tJSONArray catrgoriesJsonArray = jsonObject.optJSONArray(\"catrgories\");\n\t\tif(catrgoriesJsonArray != null){\n\t\t\tArrayList<ModelCatrgory> catrgoriesArrayList = new ArrayList<>();\n\t\t\tfor (int i = 0; i < catrgoriesJsonArray.length(); i++) {\n\t\t\t\tJSONObject catrgoriesObject = catrgoriesJsonArray.optJSONObject(i);\n\t\t\t\tcatrgoriesArrayList.add(new ModelCatrgory(catrgoriesObject));\n\t\t\t}\n\t\t\tcatrgories = (ModelCatrgory[]) catrgoriesArrayList.toArray();\n\t\t}\n\t}", "List<DvdCategory> getCategory(Boolean status) throws DvdStoreException;", "@GetMapping(\"/category\")\n\t public ResponseEntity<List<Category>> getcategorys() {\n\n\t List<Category> list = categoryService.getAllcategorys();\n\t if (list.size() <= 0) {\n\t return ResponseEntity.status(HttpStatus.NOT_FOUND).build();\n\t }\n\t return ResponseEntity.status(HttpStatus.CREATED).body(list);\n\t }", "private void checkCategoryPreference() {\n SharedPreferences sharedPrefs = getSharedPreferences(Constants.MAIN_PREFS, Context.MODE_PRIVATE);\n String json = sharedPrefs.getString(Constants.CATEGORY_ARRAY, null);\n Type type = new TypeToken<ArrayList<Category>>(){}.getType();\n ArrayList<Category> categories = new Gson().fromJson(json, type);\n if(categories == null) {\n categories = new ArrayList<>();\n Category uncategorized = new Category(Constants.CATEGORY_UNCATEGORIZED, Constants.CYAN);\n categories.add(uncategorized);\n String jsonCat = new Gson().toJson(categories);\n SharedPreferences.Editor prefsEditor = sharedPrefs.edit();\n prefsEditor.putString(Constants.CATEGORY_ARRAY, jsonCat);\n prefsEditor.apply();\n }\n }", "public void getCategorory(){\n\t\tDynamicQuery dynamicQuery = DynamicQueryFactoryUtil.forClass(AssetCategory.class, \"category\", PortalClassLoaderUtil.getClassLoader());\n\t\ttry {\n\t\t\tList<AssetCategory> assetCategories = AssetCategoryLocalServiceUtil.dynamicQuery(dynamicQuery);\n\t\t\tfor(AssetCategory category : assetCategories){\n\t\t\t\tlog.info(category.getName());\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t}", "List getCategoriesOfType(String typeConstant);", "@Test\n public void testGetCategoriesAction() throws ClientException, IOException, ProcessingException {\n CloudResponse response = this.actions.getCategoriesAction(\"{sort}\", -1, -1, \"{type}\", -1);\n List<Integer> expectedResults = Arrays.asList(200);\n LOG.info(\"Got status {}\", response.getStatusLine());\n Assert.assertTrue(expectedResults.contains(response.getStatusLine().getStatusCode()));\n\n if(response.getStatusLine().getStatusCode() == 200) {\n this.actions.checkResponseJSONSchema(\"#/definitions/PagedResponseCategory\", response.getContent());\n }\n \n }", "List<ProductCategory> getAll();", "List<Category> getCategories() throws DAOExceptionHandler;", "public List<CategoryDTO> getCategories(String bbbChannel, String siteId, List<String> relatedCategories) ;", "@GetMapping\n\tpublic ResponseEntity<List<Category>> findAll(){\n\t\t\t//Category u = new Category(1L, \"Maria\", \"maria@gmail.com\", \"92313323\", \"12345\");\t\n\t\t\n\t\tList<Category> list = service.findAll();\n\t\t\n\t\t//criar resposta http e no corpo da resposta colocar lista\n\t\treturn ResponseEntity.ok().body(list);\t\n\t\t\n\t}", "@JsonProperty(\"category\")\n public String getCategory() {\n return category;\n }", "private static String getCategories(JSONObject volumeInfo) throws JSONException {\n JSONArray categories = volumeInfo.optJSONArray(\"categories\");\n if (categories == null) {\n Log.e(LOG_TAG, \"No categories for this book\");\n return null;\n }\n StringBuilder categoriesString = new StringBuilder();\n for (int i = 0; i < categories.length(); i++) {\n categoriesString.append(categories.getString(i));\n if (i + 1 < categories.length()) {\n categoriesString.append(\", \");\n }\n }\n return categoriesString.toString();\n }", "@Override\r\n\tpublic List<Category> list() {\n\t\treturn categories;\r\n\t}", "public List<Category> getListCategory() {\n List<Category> list = new ArrayList<>();\n SQLiteDatabase sqLiteDatabase = dbHelper.getWritableDatabase();\n\n Cursor cursor = sqLiteDatabase.rawQuery(\"SELECT * FROM Category\", null);\n while (cursor.moveToNext()) {\n int id =cursor.getInt(0);\n\n Category category = new Category(id, cursor.getString(cursor.getColumnIndex(\"Name\")), cursor.getString(cursor.getColumnIndex(\"Image\")));\n Log.d(\"TAG\", \"getListCategory: \" + category.getId());\n list.add(category);\n }\n cursor.close();\n dbHelper.close();\n return list;\n }", "public static ArrayList<String> getCategories() {\n String query;\n ArrayList<String> categories = new ArrayList<String>();\n\n try {\n Connection con = Database.createDBconnection();\n Statement stmt = con.createStatement();\n query = \"SELECT category FROM category;\";\n ResultSet rs = stmt.executeQuery(query);\n\n while(rs.next()) {\n categories.add(rs.getString(\"category\"));\n }\n\n Database.closeDBconnection(con);\n }\n catch(Exception e) {\n e.printStackTrace();\n }\n return categories;\n }", "public Flowable<List<Category>> getCategories() {\n return findAllData(Category.class);\n }", "private void getMaleCategoryData() {\n RequestQueue requestQueue = Volley.newRequestQueue(CategoryActivity.this);\n\n JsonArrayRequest req = new JsonArrayRequest(urlJsonArryMen,\n new Response.Listener<JSONArray>() {\n @Override\n public void onResponse(JSONArray response) {\n Log.d(TAG, response.toString());\n categoryList.clear();\n\n jsonResponse = \"\";\n for (int i = 0; i < response.length(); i++) {\n\n try {\n JSONObject person = (JSONObject) response\n .get(i);\n Category category1 = new Category();\n Data dataa = new Data();\n List<Data> dataList = new ArrayList<>();\n\n String id = person.getString(\"id\");\n Log.e(TAG, \"onResponse: id\" + id);\n JSONObject data = person\n .getJSONObject(\"data\");\n Log.e(TAG, \"onResponse: data\" + data);\n dataa.setPhoto(data.getString(\"photo\"));\n dataa.setPhoto1(data.getString(\"photo1\"));\n dataa.setPhoto2(data.getString(\"photo2\"));\n dataa.setPhoto3(data.getString(\"photo3\"));\n dataa.setTitle(data.getString(\"title\"));\n dataList.add(dataa);\n category1.setId(id);\n category1.setData(dataa);\n categoryList.add(category1);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n }\n\n\n Log.e(TAG, \"onResponse: \" + categoryList.size());\n Log.e(TAG, \"onResponse: \" + jsonResponse);\n //txtResponse.setText(jsonResponse);\n\n /* if (categoryList.isEmpty()) {\n recyclerView.setVisibility(View.GONE);\n linearDummy.setVisibility(View.VISIBLE);\n } else {\n recyclerView.setVisibility(View.VISIBLE);\n linearDummy.setVisibility(View.GONE);\n }*/\n initGridAdapter();\n //hidepDialog();\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n VolleyLog.d(TAG, \"Error: \" + error.getMessage());\n // Toast.makeText(getApplicationContext(), error.getMessage(), Toast.LENGTH_SHORT).show();\n //hidepDialog();\n }\n });\n\n requestQueue.add(req);\n\n\n }", "private List<Category> extractTargets() {\n List<String> names = getNames(\"category\");\n CategorySelectAsyncTask task = new CategorySelectAsyncTask();\n CategoryMapper mapper = new CategoryMapper();\n task.setNames(names);\n List<Category> list = new ArrayList<>();\n try {\n list.addAll(mapper.to(task.execute().get()));\n } catch (ExecutionException | InterruptedException e) {\n Log.e(TAG, \"extractTargets: \" + e.getMessage(), e);\n }\n return list;\n }", "@Override\n\tpublic List<CategoryVO> mainCategory() {\n\t\treturn mapper.mainCategory();\n\t}", "ListCategoryResponse listCategories(ListCategoryRequest request);", "@GetMapping(\"category\")\n\t\tpublic List<String> getCategory(){\n\t\t\tList<String> list = repo.findByCat();\n\t\t\treturn list;\n\t\t\t\n\t\t\t\n\t\t}", "public static ArrayList<Nutritionix> parse(String json) throws JSONException {\n ArrayList<Nutritionix> nutritionixs = new ArrayList<>();\n\n //JSONArray children = new JSONObject(json).getJSONObject(\"data\").getJSONArray(\"children\");\n //JSONArray children = new JSONObject(json).getJSONObject(\"data\").getJSONArray(\"children\");\n JSONArray hits = new JSONObject(json).getJSONArray(\"hits\");\n\n\n for (int i = 0; i < hits.length(); i++) {\n JSONObject childObject = hits.getJSONObject(i);\n JSONObject childData = childObject.getJSONObject(\"fields\");\n\n //String url = childData.getString(\"item_name\");\n //String title = childData.getString(\"title\");\n String productname = childData.getString(\"item_name\");\n String calories = childData.getString(\"nf_calories\");\n String fats = childData.getString(\"nf_total_fat\");\n\n nutritionixs.add(new Nutritionix(productname,calories,fats));\n }\n return nutritionixs;\n }", "@Override\n public List<Category> getCategoriesFromUrl(long companyId, long groupId, CategoryType categoryType, String otherFeedTypeUrl, String languageId, String userName) {\n\n String categoriesUrl = categoryType.equals(CategoryType.OTHER) ? otherFeedTypeUrl : getCommonConfigurationService().getCasinoCategoriesUrl(companyId, groupId, categoryType);\n String categoriesBackupUrl = getCommonConfigurationService().getCasinoCategoriesBackupUrl(companyId, groupId, categoryType);\n String casinoFeedsAPIBaseURL = getCommonConfigurationService().getCasinoFeedsAPIBaseUrl(companyId, groupId);\n String gamesURL = getCommonConfigurationService().getCasinoGamesUrl(companyId, groupId);\n\n boolean noCategoriesUrl = StringUtils.isEmpty(categoriesUrl) && StringUtils.isEmpty(casinoFeedsAPIBaseURL) && StringUtils.isEmpty(categoriesBackupUrl);\n if (noCategoriesUrl || StringUtils.isEmpty(gamesURL)) {\n return Collections.emptyList();\n }\n\n List<Category> categories = Collections.emptyList();\n\n try {\n\n if (StringUtils.isNotEmpty(categoriesUrl)) {\n categories = getCategoriesByURL(categoriesUrl, groupId);\n }\n\n if (StringUtils.isNotEmpty(casinoFeedsAPIBaseURL) && CollectionUtils.isEmpty(categories)) {\n\n Validate.notEmpty(languageId, \"Language can't be null or empty!\");\n Validate.notEmpty(casinoFeedsAPIBaseURL, \"Base url can't be null or empty!\");\n String casinoId = getCommonConfigurationService().getCasinoId(companyId, groupId);\n Validate.notEmpty(casinoId, \"Casino name can't be null or empty!\");\n String serviceURL = casinoAPIHelper.getCategoriesUrl(companyId, groupId, casinoFeedsAPIBaseURL, casinoId,\n categoryType);\n Validate.notEmpty(serviceURL, \"Categories service url can't be null or empty!\");\n log.debug(\"baseURL = {}\", casinoFeedsAPIBaseURL);\n log.debug(\"serviceURL = {}\", serviceURL);\n\n categories = getCategories(HttpClientUtil.doGet(serviceURL, PlayerMode.REAL.getName(), userName, \"\", languageId));\n\n }\n } catch (Exception e) {\n log.error(e.getMessage(), e);\n String backupURL = getCommonConfigurationService().getCasinoCategoriesBackupUrl(companyId, groupId, categoryType);\n if (StringUtils.isNotEmpty(backupURL)) {\n try {\n categories = getCategoriesByURL(backupURL, groupId);\n } catch (Exception e1) {\n throw new PlatformException(e1);\n }\n }\n }\n\n return categories;\n }", "public Set<String> getCategory(){return category;}", "List<Category> lisCat() {\n return dao.getAll(Category.class);\n }", "private void loadCategories() {\n\t\tcategoryService.getAllCategories(new CustomResponseListener<Category[]>() {\n\t\t\t@Override\n\t\t\tpublic void onHeadersResponse(Map<String, String> headers) {\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onErrorResponse(VolleyError error) {\n\t\t\t\tLog.e(\"EditTeamProfileActivity\", \"Error while loading categories\", error);\n\t\t\t\tToast.makeText(EditTeamProfileActivity.this, \"Error while loading categories \" + error.getMessage(), Toast.LENGTH_LONG).show();\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onResponse(Category[] response) {\n\t\t\t\tCollections.addAll(categories, response);\n\n\t\t\t\tif (null != categoryRecyclerAdapter) {\n\t\t\t\t\tcategoryRecyclerAdapter.setSelected(0);\n\t\t\t\t\tcategoryRecyclerAdapter.notifyDataSetChanged();\n\t\t\t\t}\n\n\t\t\t\tupdateSelectedCategory();\n\t\t\t}\n\t\t});\n\t}", "@JSProperty(\"categories\")\n @Nullable\n String[] getCategories();", "List<Category> getAllCategories() throws DataBaseException;", "public String getCategory();", "@GET(\"categories/activities\")\n Call<List<ActivitiesByCategorieOutput>> getActivitiesByCategory();", "public void getRemoteCategories() {\n //check for connection if true go to apihelper and get model else check if these model cached so get it\n url = getAllCategoriesWithoutItems;\n params = new HashMap<>();\n params.put(param_securitykey, param_securitykey);\n if (ApiHelper.checkInternet(mContext)) {\n mApiHelper.getCategories(mIRestApiCallBack, true, url, params);\n } else {\n //Toast.makeText(mContext, mContext.getString(R.string.noInternetConnection), Toast.LENGTH_LONG).show();\n mIRestApiCallBack.onNoInternet();\n CacheApi cacheApi = loadCacheData(url, params);\n mSqliteCallBack.onDBDataObjectLoaded(cacheApi);\n }\n\n }", "public String getCategoryListing(){\n\t\tCategoryDAO daoObject = new CategoryDAO();\n\t\tString result = \"\";\n\t\t/*if(requestCall.equalsIgnoreCase(\"table\")){\n\t\t\t//System.out.println(\"in getCategoryListing service call table\");\n\t\t\tresult = daoObject.getCategoriesAndSubCategories();\n\t\t}else{\n\t\t\tresult = daoObject.getCategories(); \n\t\t}*/\n\t\t//result = daoObject.getCategoriesAndSubCategories();\n\t\tresult = daoObject.getCategories();\n\t\treturn result;\n\t}", "public static List<City> pareseJsonToCities(URL url) {\r\n\tObjectMapper objectMapper = new ObjectMapper();\r\n\tList<City> cities = null;\r\n\ttry {\r\n\t JsonNode node = objectMapper.readValue(url, JsonNode.class);\r\n\t if (node.isArray() && node.size() > 0) {\r\n\t\tcities = new ArrayList<>();\r\n\t\tIterator<JsonNode> nodeElements = node.elements();\r\n\t\twhile (nodeElements.hasNext()) {\r\n\t\t City city = new City();\r\n\r\n\t\t JsonNode currentCity = nodeElements.next();\r\n\t\t JsonNode idNode = currentCity.get(\"_id\");\r\n\t\t Long id = idNode.asLong();\r\n\t\t city.setId(id);\r\n\r\n\t\t JsonNode nameNode = currentCity.get(\"name\");\r\n\t\t String name = nameNode != null ? nameNode.asText() :\" \";\r\n\t\t city.setName(name);\r\n\r\n\t\t JsonNode typeNode = currentCity.get(\"type\");\r\n\t\t String type = typeNode != null ? typeNode.asText() :\" \";\r\n\t\t city.setType(type);\r\n\r\n\t\t JsonNode geoPositionNode = currentCity.get(\"geo_position\");\r\n\t\t if (geoPositionNode != null) {\r\n\t\t\tJsonNode latitudeNode = geoPositionNode.get(\"latitude\");\r\n\t\t\tString latitude = latitudeNode!=null?latitudeNode.asText():\" \";\r\n\t\t\tcity.setLatitude(latitude);\r\n\r\n\t\t\tJsonNode longitudeNode = geoPositionNode.get(\"longitude\");\r\n\t\t\tString longitude = longitudeNode!=null?longitudeNode.asText():\" \";\r\n\t\t\tcity.setLongitude(longitude);\r\n\t\t }\r\n\r\n\t\t cities.add(city);\r\n\t\t}\r\n\r\n\t }\r\n\t} catch (JsonParseException | JsonMappingException e) {\r\n\t System.out.println(\"Could not parse Json.\");\r\n\t e.printStackTrace();\r\n\t} catch (IOException e) {\r\n\t System.out.println(\"File I/O problems.\");\r\n\t e.printStackTrace();\r\n\t}\r\n\treturn cities;\r\n }", "public List<Category> getCategoriesDetails(){\r\n\t\tList<Category> res = new ArrayList<Category>();\r\n\t\tString req = \"select c.label, sum(f.amount) as total, sum(f.amount)/tmp.totmonth as percent, c.color \"\r\n\t\t\t\t\t+ \"from fee f, category c, (select sum(amount) as totmonth \"\r\n\t\t\t\t\t+ \"from fee \"\r\n\t\t\t\t\t+ \"where strftime('%m%Y', date) = strftime('%m%Y', date('now'))) as tmp \"\r\n\t\t\t\t\t+ \"where c.id = f.categoryid \"\r\n\t\t\t\t\t+ \"and strftime('%m%Y', f.date) = strftime('%m%Y', date('now')) \"\r\n\t\t\t\t\t+ \"group by c.id \"\r\n\t\t\t\t\t+ \"order by total desc;\";\r\n\t\t\r\n\t\tCursor cursor = database.rawQuery(req, null);\t\t\t\t\r\n\t\tif (cursor.moveToFirst()) {\r\n\t\t\tdo {\r\n\t\t\t\tCategory cat = new Category();\r\n\t\t\t\tcat.setLabel(cursor.getString(0));\r\n\t\t\t\tcat.setTotal(cursor.getString(1));\r\n\t\t\t\tcat.setPercent(cursor.getString(2));\r\n\t\t\t\tcat.setColor(cursor.getString(3));\r\n\t\t\t\tres.add(cat);\r\n\t\t\t} while (cursor.moveToNext());\r\n\t\t}\r\n\t\tif (cursor != null && !cursor.isClosed()) {\r\n\t\t\tcursor.close();\r\n\t\t}\r\n\t\t\r\n\t\treturn res;\r\n\t}", "private static ArrayList<Classification> getClassifications(HttpResponse<String> response){\n\t\tArrayList<Classification> classifications;\n\t\ttry {\n\t\t\tclassifications = new ObjectMapper().readValue(response.body(), new TypeReference<ArrayList<Classification>>(){});\n\t\t\treturn classifications;\n\t\t} catch (JsonMappingException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (JsonProcessingException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t//return null;\n\t\treturn new ArrayList<Classification>();\n\t}", "public void readInCategories() {\n // read CSV file for Categories\n allCategories = new ArrayList<Category>();\n InputStream inputStream = getResources().openRawResource(R.raw.categories);\n CSVFile csvFile = new CSVFile(inputStream);\n List scoreList = csvFile.read();\n // ignore first row because it is the title row\n for (int i = 1; i < scoreList.size(); i++) {\n String[] categoryInfo = (String[]) scoreList.get(i);\n\n // inputs to Category constructor:\n // String name, int smallPhotoID, int bannerPhotoID\n\n // get all image IDs according to the names\n int smallPhotoID = context.getResources().getIdentifier(categoryInfo[1], \"drawable\", context.getPackageName());\n int bannerPhotoID = context.getResources().getIdentifier(categoryInfo[2], \"drawable\", context.getPackageName());\n allCategories.add(new Category(categoryInfo[0],smallPhotoID, bannerPhotoID));\n\n //System.out.println(\"categoryInfo: \" + categoryInfo[0] + \" \" + categoryInfo[1] + \" \" + categoryInfo[2]);\n }\n }", "public static List<Category> getAllCategory() {\n\n List<Category> categoryList = new ArrayList<>();\n try {\n categoryList = Category.listAll(Category.class);\n } catch (Exception e) {\n\n }\n return categoryList;\n\n }", "private static List<News> extractFeaturesFromJsonResponse(String jsonResponse) {\n List<News> newsList = new ArrayList<>();\n\n try {\n JSONObject baseJsonObject = new JSONObject(jsonResponse);\n // If JSON object does not contain \"response\" return null object\n if (!baseJsonObject.has(Keys.JSON_NEWS_OBJECT_KEY)) {\n return null;\n }\n\n JSONObject response = baseJsonObject.getJSONObject(Keys.JSON_NEWS_OBJECT_KEY);\n JSONArray resultsArray = response.getJSONArray(Keys.JSON_NEWS_ARRAY_KEY);\n\n for (int i = 0; i < resultsArray.length(); i++) {\n JSONObject newsObject = resultsArray.getJSONObject(i);\n\n // Get section name\n String sectionName = newsObject.getString(Keys.JSON_NEWS_SECTION_KEY);\n // Get Headline\n String newsHeadline = newsObject.getString(Keys.JSON_NEWS_HEADLINE_KEY);\n // Get published time\n String publishedTime = newsObject.getString(Keys.JSON_NEWS_PUBLISHED_TIME_KEY);\n // Get web Url\n String webUrl = newsObject.getString(Keys.JSON_NEWS_URL_KEY);\n\n // Get thumbnail URL string\n String newsThumbnailUrlString = null;\n if (newsObject.has(Keys.JSON_NEWS_FIELDS_KEY)) {\n JSONObject field = newsObject.getJSONObject(Keys.JSON_NEWS_FIELDS_KEY);\n\n if (field.has(Keys.JSON_NEWS_THUMBNAIL_KEY)) {\n newsThumbnailUrlString = field.getString(Keys.JSON_NEWS_THUMBNAIL_KEY);\n }\n }\n\n // Get author name\n String authorName = null;\n if (newsObject.has(Keys.JSON_NEWS_TAGS_KEY)) {\n JSONArray tags = newsObject.getJSONArray(Keys.JSON_NEWS_TAGS_KEY);\n if (!tags.isNull(0)) {\n // If first element of array is not null then get the author name\n JSONObject tagsObject = tags.getJSONObject(0);\n if (tagsObject.has(Keys.JSON_NEWS_AUTHOR_NAME_KEY)) {\n authorName = tagsObject.getString(Keys.JSON_NEWS_AUTHOR_NAME_KEY);\n }\n }\n }\n newsList.add(new News(newsHeadline, sectionName, authorName, publishedTime, webUrl, newsThumbnailUrlString));\n }\n } catch (JSONException e) {\n Log.e(LOG_TAG, \"Error creating JSON object : extractFeaturesFromJsonResponse() method\", e);\n }\n return newsList;\n }", "public ArrayList<Product> parseJSONAction(String textJson){\n \n JSONParser j = new JSONParser();\n \n try {\n \n Map<String, Object> productsListJson = j.parseJSON(new CharArrayReader(textJson.toCharArray()));\n ArrayList<Map<String,Object>> productsList = (ArrayList<Map<String,Object>>) productsListJson.get(\"root\");\n //System.out.println(\"pdd \" + productsList.toString());\n Map<String, Object> cart = productsList.get(0);\n //System.out.println(\"cc \" + cart);\n //System.out.println(\"ggg\" + cart.get(\"cart\"));\n ArrayList<Map<String,Object>> lis = (ArrayList<Map<String,Object>>) cart.get(\"cart\");\n //System.out.println(\"lista \" + lis.toString());\n for(Map<String, Object> en : lis){\n Product p = new Product();\n p.setDetails(en.get(\"numProducts\").toString());\n p.setRef_product((int) Double.parseDouble(en.get(\"refProduct\").toString()));\n p.setPrice((int) Float.parseFloat(en.get(\"totalPrice\").toString()));\n products.add(p);\n }\n \n Map<String, Object> data = productsList.get(1);\n ArrayList<Map<String,Object>> llis = (ArrayList<Map<String,Object>>) data.get(\"data\");\n System.out.println(\"dddd\" + llis.toString());\n int i=0;\n for(Map<String, Object> en : llis){\n Product pro = products.get(i);\n pro.setName(en.get(\"name\").toString());\n pro.setPhoto(\"http://127.0.0.1/ftbb_web/ftbb_web/public/images/prod/\"+en.get(\"photo\").toString());\n i++;\n }\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n \n return products; \n }", "public JSONArray getResults(String json) throws JSONException {\n JSONObject input = new JSONObject(json);\n\n // If status is not ok, return empty JSONArray to prevent nullpointers\n if (!Objects.equals(input.getString(\"status\"), \"OK\")) {\n Toast.makeText(this, \"No item found in category\", Toast.LENGTH_SHORT).show();\n return new JSONArray();\n } else {\n return input.getJSONArray(\"results\");\n }\n }", "private void getProfession(JSONArray j) {\n for (int i = 0; i < j.length(); i++) {\n try {\n //Getting json object\n JSONObject json = j.getJSONObject(i);\n\n //Adding the name of the student to array list\n Profession.add(json.getString(\"category\"));\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }", "private void loadData()\n {\n if (isAdded() && !getActivity().isFinishing())\n {\n // progress.show();\n RestClient.GitApiInterface service = RestClient.getClient();\n\n Call<CategoryHolder> call = service.getCategory(helper.getB64Auth(getActivity()),\"application/json\", \"application/json\");\n //Call call1=service.getCategory();\n call.enqueue(new Callback<CategoryHolder>() {\n @Override\n public void onResponse(Response<CategoryHolder> response) {\n // progress.dismiss();\n Log.d(\"NewCheckout\", \"Status Code = \" + response.code());\n if (response.isSuccess()) {\n try {\n CategoryHolder result = response.body();\n categoryObject = new JSONObject(result.getCategories().getAsJsonObject().toString());\n idCat = new String[categoryObject.length()];\n catName = new String[categoryObject.length()];\n Iterator<?> keys = categoryObject.keys();\n ArrayList<String> keyList = new ArrayList();\n while (keys.hasNext()) {\n keyList.add((String) keys.next());\n }\n Collections.sort(keyList);\n\n for (String key : keyList) {\n int rootCount = 0;\n\n JSONObject object = categoryObject.getJSONObject(key);\n String name = object.getString(\"category\");\n String id = object.getString(\"category_id\");\n\n String url = \"\";\n if (object.has(\"main_pair\")) {\n JSONObject js = object.getJSONObject(\"main_pair\");\n JSONObject js_obj = js.getJSONObject(\"detailed\");\n url = js_obj.getString(\"http_image_path\");\n }\n\n if (object.has(\"subcategories\")) {\n\n JSONArray parentObject = object.getJSONArray(\"subcategories\");\n int parentCount = 0;\n for (int i = 0; i < parentObject.length(); i++) {\n JSONObject objectChild = parentObject.getJSONObject(i);\n//\n if (objectChild.has(\"subcategories\")) {\n int childCount = 0;\n JSONArray childObject = objectChild.getJSONArray(\"subcategories\");\n for (int j = 0; j < childObject.length(); j++) {\n // String childKey = (String) parentKeys.next();\n JSONObject child = childObject.getJSONObject(j);\n int count = child.optInt(\"product_count\");\n childCount += count;\n\n\n }\n parentCount += childCount;\n }\n\n\n }\n if (parentCount == 0)\n rootCount += 1;\n else\n rootCount += parentCount;\n }\n final GridRow gridRow = new GridRow(url, name, id);\n gridRow.id = id;\n gridRow.setCount(rootCount);\n gridRow.subCategories = object.has(\"subcategories\");\n if (getActivity() != null) {\n getActivity().runOnUiThread(new Runnable() {\n @Override\n public void run() {\n mAdapter.add(gridRow);\n }\n });\n }\n\n //Log.i(\"CATEGORY--\", name);\n\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n } else {\n // response received but request not successful (like 400,401,403 etc)\n //Handle errors\n\n }\n }\n\n @Override\n public void onFailure(Throwable t) {\n progress.dismiss();\n\n if (getActivity() != null && !getActivity().isFinishing()) {\n new AlertDialogManager().showAlertDialog(getActivity(),\n getString(R.string.error),\n getString(R.string.server_error));\n }\n }\n });\n }\n\n }", "private static List<Article> extractFeatureFromJson(String jsonString) {\n\n // If Json string is empty or null, return early\n if (TextUtils.isEmpty(jsonString)) {\n return null;\n }\n\n List<Article> articles = new ArrayList<>();\n\n try {\n\n // Get json root string\n JSONObject jsonObjectString = new JSONObject(jsonString);\n\n // Get the response object in the root json string\n JSONObject responseObj = jsonObjectString.getJSONObject(\"response\");\n\n // Get th array that contains all the articles inside the response\n JSONArray articlesArray = responseObj.getJSONArray(\"results\");\n\n // Loop through every article object in the array\n for (int i = 0; i < articlesArray.length(); i++) {\n\n // get current article at the current index\n JSONObject currentArticle = articlesArray.getJSONObject(i);\n\n // Get the object that contains all fields of info on the currentArticle\n JSONObject feilds = currentArticle.getJSONObject(\"fields\");\n\n // Get the articles title\n String title = feilds.getString(\"headline\");\n\n // Get the articles webUrl\n String url = currentArticle.getString(\"webUrl\");\n\n // Get the articles picture\n String image = feilds.getString(\"thumbnail\");\n\n // Create bitmap from image url string\n Bitmap picture = readImageUrl(image);\n\n // Get Authors name\n String author = feilds.optString(\"byline\");\n\n // Get the date the article was published\n String datePublished = feilds.getString(\"firstPublicationDate\");\n\n // Get the articles section name\n String section = currentArticle.getString(\"sectionName\");\n\n // Create a new article and add it to the list\n articles.add(new Article(title, url, author, image, datePublished, section, picture));\n }\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n Log.v(LOG_TAG, \"Error parsing json:\" + e);\n }\n\n // Return list of articles\n return articles;\n\n }", "public List<DVDCategorie> listDVDCategorie();", "public ArrayList<Category> getCategories() {\n ArrayList<Category> categories = new ArrayList<>();\n Cursor cursor = database.rawQuery(\"SELECT * FROM tbl_categories\", null);\n cursor.moveToFirst();\n while (!cursor.isAfterLast()) {\n Category category = new Category();\n category.setCategory_id(cursor.getInt(cursor.getColumnIndex(\"category_id\")));\n category.setCategory_name(cursor.getString(cursor.getColumnIndex(\"category_name\")));\n\n\n categories.add(category);\n cursor.moveToNext();\n }\n cursor.close();\n return categories;\n }", "@RequestMapping(\"/fashionCategories\")\r\n public ResponseEntity<List> listFashionCategories() {\r\n\t\tSystem.out.println(\"*************************************ListAllItems\");\r\n\t\tDBConnection db = new DBConnection();\r\n \tList<Advertisment> categories = \tdb.getAllAdsByCategory(\"Fashion\");\r\n\t\t//List<String> categories = itemService.populateAllCategories(); \r\n\t\t\r\n\t\tSystem.out.println(\"*************************************ListAllItems1111\");\r\n if(categories.isEmpty()){\r\n return new ResponseEntity<List>(HttpStatus.NO_CONTENT);//You many decide to return HttpStatus.NOT_FOUND\r\n }\r\n return new ResponseEntity<List>(categories, HttpStatus.OK);\r\n }", "@Override\n public void onResponse(@NotNull final Response<GetCategoryDetailsQuery.Data> response) {\n\n List<GetCategoryDetailsQuery.Food> foods = response.data().category().foods();\n\n for (int i = 0; i < foods.size(); i++) {\n Log.d(\"ALL Food ==>\", foods.get(i).name());\n }\n\n DetailsActivity.this.runOnUiThread(new Runnable() {\n @Override\n public void run() {\n foodList = Objects.requireNonNull(response.data().category()).foods();\n detsRecyclerViewAdapter.setCategoryData(foodList);\n }\n });\n }", "@RequestMapping(value = \"/categories\", method = RequestMethod.GET)\n\tpublic @ResponseBody List<Category> categoryListRest() {\n\t\treturn (List<Category>) CatRepo.findAll();\n\t}", "public static ArrayList<AdminCategory> fetchCategoryList() {\r\n\r\n\t\tArrayList<AdminCategory> categoryList = new ArrayList<AdminCategory>();\r\n\r\n\t\tsqlQuery = \"SELECT categoryName, status, B.level,\" +\r\n\t\t\t\t\"(SELECT categoryName FROM flipkart_category A WHERE A.categoryID=C.parentID) AS parentCategory, \" +\r\n\t\t\t\t\"B.categoryID \" +\r\n\t\t\t\t\"FROM flipkart_category B, flipkart_path C \" +\r\n\t\t\t\t\"WHERE B.categoryID=C.categoryID ORDER BY B.level;\";\r\n\r\n\t\ttry{\r\n\t\t\tconn=DbConnection.getConnection();\r\n\t\t\tps=conn.prepareStatement(sqlQuery);\r\n\t\t\trs=ps.executeQuery();\r\n\r\n\t\t\twhile(rs.next()){\r\n\t\t\t\tAdminCategory category = new AdminCategory();\r\n\t\t\t\tcategory.setCategoryName(rs.getString(1));\r\n\t\t\t\tcategory.setStatus(rs.getInt(2));\r\n\t\t\t\tcategory.setLevel(rs.getInt(3));\r\n\t\t\t\tcategory.setParentCategory(rs.getString(4));\r\n\t\t\t\tcategory.setCategoryID(rs.getInt(5));\r\n\t\t\t\tcategoryList.add(category);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}catch(Exception e){\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\treturn categoryList;\r\n\t}", "String getCategory();", "String getCategory();", "public List<ZCategory> SelectAll() {\r\n\t\tList<ZCategory> Categories = new ArrayList<>();\r\n\t\tString lines[];\r\n\t\tlines = fm.getArray();\r\n\t\tfor (String string : lines) {\r\n\t\t\tCategories.add(stringToCategory(string));\r\n\t\t}\r\n\t\treturn Categories;\r\n\t}", "public List<Cvcategory> findAllCvcategories();", "@Override\n public Single<List<CategoryModel>> getCategories() {\n return api.getCategories().map(categories -> iVmMapper.mapToViewModel(categories));\n }", "@GET(\"/empresa/listaCategoria\")\n public void listacategoria(Callback<List<Categoria>> callback);", "@Override\n\tpublic HERO_STK_RESPONSEINFO getCategorySuggestions() {\n\t\tString selectQuery = \"select * from hero_admin_category\";\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList<Object> categoryList = jdbcTemplate.query(selectQuery, new RowMapper() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic Object mapRow(ResultSet rs, int arg1) throws SQLException {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t/*List<HashMap<String, String>> detail = new ArrayList<HashMap<String,String>>();*/\n\t\t\t\t\n\t\t\t\tHashMap<String, String> map = new HashMap<String, String>();\n\t\t\t\tmap.put(\"data\", rs.getString(\"CATEGORY_ID\"));\n\t\t\t\tmap.put(\"value\", rs.getString(\"CATEGORY_NAME\"));\n\t\t\t\t\n\t\t\t\t/*detail.add(map);*/\n\t\t\n\t\t\t\tlog.info(\"Category Suggestion List \"+map);\n\t\t\t\t\n\t\t\t\treturn map;\n\t\t\t}\n\t\t});\n\t\t\n\t\tresponse.setResponseType(\"S\");\n\t\tresponse.setResponseObj((categoryList));\n\t\t\n\t\tresponseInfo.setInventoryResponse(response);\n\t\t\n\t\treturn responseInfo;\n\t}", "private static List<CityData> extractFeatureFromJson(String cityDataJSON) {\n // Si la String cityDataJSON es nula o está vacía, se devuelve el resultado.\n if (TextUtils.isEmpty(cityDataJSON)) {\n return null;\n }\n // Crea una ArrayList vacía a la que podemos añadir datos de ciudad.\n ArrayList<CityData> cityDatas = new ArrayList<>();\n\n // Intenta hacer parse a la JSON response.\n try {\n // Crea un JSONObject que es el root de la API.\n JSONObject baseJsonObject = new JSONObject(cityDataJSON);\n\n // Extrae la JSONArray asociada la key \"list\".\n JSONArray cityDataArray = baseJsonObject.getJSONArray(\"list\");\n\n // Por cada ciudad en la cityData JSONArray crea un objeto CityData.\n for (int i = 0; i < cityDataArray.length(); i++) {\n // Escoge únicamente un elemento de la lista.\n JSONObject currentCityData = cityDataArray.getJSONObject(i);\n\n // Extrae el valor de la key llamada \"name\".\n String nombre = currentCityData.getString(\"name\");\n\n // Por cada dato de ciudad escoge el JSONObject asociado a la key \"coord\".\n JSONObject coordinates = currentCityData.getJSONObject(\"coord\");\n\n // Extrae el valor de la key llamada \"lon\".\n double longitud = coordinates.getDouble(\"lon\");\n // Extrae el valor de la key llamada \"lat\":\n double latitud = coordinates.getDouble(\"lat\");\n\n // Crea un nuevo objeto CityData con los valores requeridos.\n CityData cityData = new CityData(nombre, longitud, latitud);\n\n // Añade este nuevo objeto a la ArrayList.\n cityDatas.add(cityData);\n }\n } catch (JSONException e) {\n // Si ocurre algún error dentro del bloque try se capta aquí para evitar un cierre de la\n // App.\n Log.e(\"QueryUtils\", \"Problema parsing los resultados del terremoto en JSON\", e);\n\n }\n return cityDatas;\n }", "@NotNull\n @JsonProperty(\"generalCategoryNames\")\n public List<String> getGeneralCategoryNames();", "public static JSONObject categoryItemList(Integer categoryId) throws JSONException{\n\t\tConnection connection = null;\n\t\tPreparedStatement preparedStatement = null;\n\t\tResultSet resultSet = null;\n\n\t\tJSONObject jsonObjectCategory = new JSONObject();\n\t\tJSONArray jsonArrayItems = new JSONArray();\n\t\ttry{\n\t\t\t/*String sqlCategory = \"select category_name,category_banner from food_category where category_id=?\";*/\n\t\t\tString sqlItemList = \"select fi.item_id,\"\n\t\t\t\t\t+\" fi.item_name,\"\n\t\t\t\t\t+\" \tfi.item_image,\"\n\t\t\t\t\t+\" fi.item_image_ws\"\n\t\t\t\t\t+\" \tfrom food_items fi,\"\n\t\t\t\t\t+\" \tfood_category fc\"\n\t\t\t\t\t+\" \twhere fc.category_id = fi.category_id AND \"\n\t\t\t\t\t+\"\tfi.category_id = ?\";\n\t\t\t/*SQlCategory:{\n\t\t\t \ttry {\t\n\t\t\t\t \t\tconnection = DBConnection.createConnection();\n\n\t\t\t\t\t\t\tpreparedStatement = connection.prepareStatement(sqlCategory);\n\t\t\t\t\t\t\tpreparedStatement.setInt(1, categoryId);\n\t\t\t\t\t\t\tresultSet = preparedStatement.executeQuery();\n\t\t\t\t\t\t\twhile(resultSet.next()){\n\t\t\t\t\t\t\t\tjsonObjectCategory.put(\"category_name\",resultSet.getString(\"category_name\"));\n\t\t\t\t\t\t\t\tjsonObjectCategory.put(\"category_banner\",resultSet.getString(\"category_banner\"));\n\t\t\t\t\t\t\t}\n\t\t\t \t}catch(Exception e){\n\t\t\t \t\tSystem.out.println(e);\n\t\t\t \t}\n \t}*/\n\n\t\t\tSQlItems:{\n\t\t\t\ttry {\t\n\t\t\t\t\tconnection = DBConnection.createConnection();\n\t\t\t\t\tpreparedStatement = connection.prepareStatement(sqlItemList);\n\t\t\t\t\tpreparedStatement.setInt(1, categoryId);\n\t\t\t\t\tresultSet = preparedStatement.executeQuery();\n\t\t\t\t\twhile(resultSet.next()){\n\t\t\t\t\t\tJSONObject subitemJsonObject = new JSONObject();\n\t\t\t\t\t\tsubitemJsonObject.put(\"id\",resultSet.getString(\"item_id\"));\n\t\t\t\t\t\tsubitemJsonObject.put(\"name\",resultSet.getString(\"item_name\"));\n\t\t\t\t\t\tsubitemJsonObject.put(\"image\",resultSet.getString(\"item_image\"));\n\t\t\t\t\t\t//subitemJsonObject.put(\"image\",resultSet.getBytes(\"item_image_ws\"));\n\t\t\t\t\t\tjsonArrayItems.put(subitemJsonObject);\n\t\t\t\t\t}\n\t\t\t\t}catch(Exception e){\n\t\t\t\t\tSystem.out.println(e);\n\t\t\t\t}finally{\n\t\t\t\t\tif(connection!=null){\n\t\t\t\t\t\tconnection.close();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}catch(Exception e){\n\n\t\t}\n\t\tjsonObjectCategory.put(\"item_list\", jsonArrayItems);\t\n\t\treturn jsonObjectCategory;\n\n\t}", "public List<CategoriaVO> mostrarCategorias() {\n\t\tJDBCTemplate mysql = MysqlConnection.getConnection();\n\t\ttry {\n\t\t\tmysql.connect();\n\t\t\tCategoriaDAO OwlDAO = new CategoriaDAO();\n\t\t\tList<CategoriaVO> resultado = new ArrayList();\n\t\t\tresultado = OwlDAO.obtenerCategorias(mysql);\n\t\t\treturn resultado;\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace(System.err);\n\t\t\treturn null;\n\n\t\t} finally {\n\t\t\tmysql.disconnect();\n\t\t}\n\t}", "VendorData getVendorCategories(String vendorCode);", "public interface Categories {\n List<String> all();\n List<String> getAdCategories(Ad ad);\n void linkCategories(long id, String[] categories);\n}", "@CrossOrigin(origins = \"http://localhost:8080\")\r\n @GetMapping(\"\")\r\n public ResponseEntity<List<Category>> listCategoryt(){\r\n List<Category> response = categoryService.listAllCategory();\r\n if(response.isEmpty()){\r\n return new ResponseEntity<>(HttpStatus.NO_CONTENT);\r\n }\r\n else{\r\n return new ResponseEntity<List<Category>>(response, HttpStatus.OK); \r\n }\r\n }", "private void getFemaleCategoryData() {\n RequestQueue requestQueue = Volley.newRequestQueue(CategoryActivity.this);\n\n JsonArrayRequest req = new JsonArrayRequest(urlJsonArryWomen,\n new Response.Listener<JSONArray>() {\n @Override\n public void onResponse(JSONArray response) {\n Log.d(TAG, response.toString());\n categoryList.clear();\n\n jsonResponse = \"\";\n for (int i = 0; i < response.length(); i++) {\n\n try {\n JSONObject person = (JSONObject) response\n .get(i);\n Category category1 = new Category();\n Data dataa = new Data();\n List<Data> dataList = new ArrayList<>();\n\n String id = person.getString(\"id\");\n Log.e(TAG, \"onResponse: id======\" + id);\n JSONObject data = person\n .getJSONObject(\"data\");\n Log.e(TAG, \"onResponse: data======\" + data);\n dataa.setPhoto(data.getString(\"photo\"));\n dataa.setPhoto1(data.getString(\"photo1\"));\n dataa.setPhoto2(data.getString(\"photo2\"));\n dataa.setPhoto3(data.getString(\"photo3\"));\n dataa.setTitle(data.getString(\"title\"));\n dataList.add(dataa);\n category1.setId(id);\n category1.setData(dataa);\n categoryList.add(category1);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n }\n\n\n //txtResponse.setText(jsonResponse);\n\n /* if (categoryList.isEmpty()) {\n recyclerView.setVisibility(View.GONE);\n linearDummy.setVisibility(View.VISIBLE);\n } else {\n recyclerView.setVisibility(View.VISIBLE);\n linearDummy.setVisibility(View.GONE);\n }*/\n initGridAdapter();\n // hidepDialog();\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n VolleyLog.d(TAG, \"Error: \" + error.getMessage());\n // Toast.makeText(getApplicationContext(), error.getMessage(), Toast.LENGTH_SHORT).show();\n //hidepDialog();\n }\n });\n\n requestQueue.add(req);\n\n\n }", "@WebMethod\n\tList<String> getProductCategories2();", "public Vector<Vector<String>> getCategoryList()\r\n\t{\r\n\t\ttry \r\n\t\t{\r\n\t\t\tString sql = \"SELECT * FROM categories\";\r\n\t\t\t\r\n\t\t\t//ResultSet rs= this.statement.executeQuery(sql);\t\t\r\n\t\t\tDataAccess data = new DataAccess();\r\n\t\t\tResultSet rs=data.getResultSet(sql);\t\t\r\n\t\t\tVector<Vector<String>> list= new Vector<Vector<String>>();\r\n\t\t\twhile (rs.next())\r\n\t\t\t{\r\n\t\t\t\tVector <String> result = new Vector <String>();\r\n\t\t\t\tresult.add(rs.getString(1));\r\n\t\t\t\tresult.add(rs.getString(2));\r\n\t\t\t\tresult.add(rs.getString(3));\t\t\t\t\t\t\r\n\t\t\t\tlist.add(result);\r\n\t\t\t}\r\n\t\t\trs.close();\r\n\t\t\treturn list;\r\n\t\t\t\r\n\t\t}\r\n\t\tcatch (Exception ex)\r\n\t\t{\r\n\t\t\tex.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "private static ArrayList<Question> extractQuestions(Context context, String level) {\n\n // Create an empty ArrayList to store the questions.\n ArrayList<Question> questionList = new ArrayList<>();\n\n try{\n //Create a JSON object to deal with question data\n JSONObject jsonObject = JsonUtils.jsonFileToJSONObject(context, EXTERNAL);\n JSONArray questionArray = jsonObject.getJSONArray(level.toLowerCase());\n\n int numberOfQuestions = questionArray.length();\n for(int i = 0; i < numberOfQuestions; i++){\n JSONObject jsonQuestion = questionArray.getJSONObject(i);\n\n questionList.add(JsonUtils.convertJsonObjectToQuestionObject(jsonQuestion));\n\n }\n\n }catch(IOException | JSONException e){\n // If an error is thrown when executing any of the above statements in the \"try\" block,\n // catch the exception here, so the app doesn't crash. Print a log message\n // with the message from the exception.\n Log.e(\"QueryUtils\", \"Problem parsing the question JSON results\", e);\n }\n\n return questionList;\n }", "private void loadData() {\r\n\t\talert(\"Loading data ...\\n\");\r\n \r\n // ---- categories------\r\n my.addCategory(new Category(\"1\", \"VIP\"));\r\n my.addCategory(new Category(\"2\", \"Regular\"));\r\n my.addCategory(new Category(\"3\", \"Premium\"));\r\n my.addCategory(new Category(\"4\", \"Mierder\"));\r\n \r\n my.loadData();\r\n \r\n\t }", "@Override\n\tpublic List<Category> getdatafromname(String con) {\n\t\treturn null;\n\t}", "@Override\n\tpublic List<Category> findcategory() {\n\t\t\n\t\tConnection conn=null;\n\t\tPreparedStatement pst=null;\n\t\tResultSet rs=null;\n\t\t\n\t\tList<Category> list=new ArrayList<Category>();\n\t\ttry {\n\t\t\tconn=DBUtils.getConnection();\n\t\t\tpst=conn.prepareStatement(\"select id,parent_id,name,status,sort_order,create_time,update_time from category\");\n\t\t\t\n\t\t\trs=pst.executeQuery();\n\t\t\t\n\t\t\twhile (rs.next()) {\n\t\t\t\tCategory category=new Category(rs.getInt(\"id\"),rs.getInt(\"parent_id\"),rs.getString(\"name\"),rs.getInt(\"status\"),rs.getInt(\"sort_order\"),rs.getDate(\"create_time\"),rs.getDate(\"update_time\"));\n\t\t\t\tlist.add(category);\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}finally {\n\t\t\ttry {\n\t\t\t\tDBUtils.Close(conn, pst, rs);\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn list;\n\t\t\n\t\t\n\n\t}", "public void Categories() {\n final ProgressDialog dialog = new ProgressDialog(getActivity());\n dialog.setCanceledOnTouchOutside(false);\n dialog.setMessage(\"Please Wait...\");\n dialog.show();\n\n Call<Categories> logincall = apiInterface.categoriespojo();\n logincall.enqueue(new Callback<Categories>() {\n @Override\n public void onResponse(Call<Categories> call, Response<Categories> response) {\n dialog.dismiss();\n if (response.body().getStatus() == 1) {\n if (Constants.categoriesData != null) {\n Constants.categoriesData.clear();\n }\n if (!Constants.categoriesData.equals(\"\") && Constants.categoriesData != null) {\n Constants.categoriesData.addAll(response.body().getData());\n CategoryAdapter adapter = new CategoryAdapter(getActivity());\n recycler_view.setAdapter(adapter);\n if (adapter != null)\n adapter.notifyDataSetChanged();\n } else {\n Toast.makeText(getActivity(), response.body().getMsg(), Toast.LENGTH_SHORT).show();\n }\n }\n }\n\n @Override\n public void onFailure(Call<Categories> call, Throwable t) {\n dialog.dismiss();\n Helper.showToastMessage(activity, \"No Internet Connection\");\n }\n });\n }", "public List<Category> getCategories() {\n CategoryRecords cr = company.getCategoryRecords();\n List<Category> catList = cr.getCategories();\n return catList;\n }", "public Category getCategory();", "public List<Category> findAll();", "@Override\n\tpublic List<Categorya> GetCategorya() {\n\t\treturn null;\n\t}", "@RequestMapping(value = \"/technology-categories\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public List<TechnologyCategoryDTO> getAllTechnologyCategories() {\n log.debug(\"REST request to get all TechnologyCategories\");\n return technologyCategoryService.findAll();\n }", "public Categories getCategories() {\n return this.categories;\n }", "public static List<Categorias> obtenerCategorias(){\n List<Categorias> categorias = new ArrayList<>();\n \n Categorias c = new Categorias();\n \n c.conectar();\n \n c.crearQuery(\"select * from categoria_libro\");\n \n ResultSet informacion = c.getResultSet();\n \n try {\n while (informacion.next())\n categorias.add(new Categorias(informacion));\n } catch (Exception error) {}\n \n c.desconectar();\n \n return categorias;\n }" ]
[ "0.6615085", "0.66129524", "0.65100217", "0.64896363", "0.63783926", "0.6294979", "0.62928194", "0.62677556", "0.62069345", "0.6113347", "0.5954465", "0.59469086", "0.5927606", "0.59076124", "0.58859396", "0.5876719", "0.5872069", "0.58702654", "0.5821157", "0.5816346", "0.57662845", "0.57626283", "0.5761749", "0.5756737", "0.5734719", "0.57195103", "0.57134044", "0.57042116", "0.570199", "0.56943125", "0.56903166", "0.5689446", "0.5685932", "0.5665397", "0.56646854", "0.56589955", "0.5655192", "0.56447816", "0.56391513", "0.5627066", "0.5626988", "0.56260526", "0.5594097", "0.55848676", "0.55753165", "0.55708706", "0.5558468", "0.55455786", "0.55452967", "0.55400723", "0.5539804", "0.5532989", "0.5517457", "0.55166394", "0.55158824", "0.5499874", "0.54938906", "0.5488908", "0.5475179", "0.5469422", "0.54633605", "0.54608834", "0.54572034", "0.5453417", "0.5452509", "0.545164", "0.54430395", "0.5442227", "0.54224354", "0.54213667", "0.5414625", "0.54078376", "0.54078376", "0.5406504", "0.5406303", "0.5404517", "0.54037", "0.5400315", "0.5397775", "0.53966635", "0.5393092", "0.5382287", "0.5381636", "0.53775835", "0.5374528", "0.53713024", "0.53594", "0.5354153", "0.53501046", "0.5349601", "0.5346333", "0.5342828", "0.53400326", "0.533297", "0.53306127", "0.5326927", "0.53268975", "0.532571", "0.5320165", "0.5306156" ]
0.69549614
0
Parse JSON data of Post
public static ArrayList<Post> ParsePosts(JSONObject jsonTotalObject) { ArrayList<Post> posts = new ArrayList<>(); try { JSONArray postArray = jsonTotalObject.getJSONArray("posts"); for(int i = 0 ;i<postArray.length();i++) { JSONObject object = postArray.getJSONObject(i); Post post = new Post(); // Notice,use "opt" instead of "get" to avoid null value exception post.setTitle(object.optString("title")); post.setId(object.optInt("id")); post.setThumbnailUrl(Settings.DEFAULT_THUMBNAIL_URL); post.setUrl(object.optString("url")); // Set to zero if there's no comment. post.setCommentCount(object.optInt("comment_count", 0)); post.setDate(object.optString("date", "N/A")); post.setExcerpt(object.optString("excerpt","N/A")); post.setContent(object.optString("content","N/A")); // Care that author is not a String,it is a JSONObject JSONObject author = object.getJSONObject("author"); post.setAuthor(author.optString("name", "N/A")); // if the post has it's thumbnail image,use it,or just keep default JSONObject featuredImages = object.optJSONObject("thumbnail_images"); if(featuredImages != null) { post.setFeaturedImageUrl(featuredImages.optJSONObject("full") .optString("url", Settings.DEFAULT_THUMBNAIL_URL)); } posts.add(post); } return posts; } catch (JSONException e) { Log.e(TAG,"JSONException when loading Posts",e); e.printStackTrace(); return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private PostData getPostData(HttpResponse response) throws IOException {\n return this.gson.fromJson(\n getContent(response),\n PostData.class\n );\n }", "void shouldParseTheJsonPostData() {\n }", "public void parseJSONData(Object JSONdata){\n\n\t}", "public native Object parse( Object json );", "private static ArrayList<Posts> extractFeatureFromJson(String postJSON) {\n if (TextUtils.isEmpty(postJSON)) {\n\n //Toast.makeText(this , \"null json string\", Toast.LENGTH_SHORT).show();\n return null;\n }\n ArrayList<Posts> posts = new ArrayList<>();\n\n try {\n JSONObject baseJsonResponse = new JSONObject(postJSON);\n JSONArray feed = baseJsonResponse.getJSONArray(\"posts\");\n\n JSONObject c = feed.getJSONObject(0);\n JSONObject insta = c.getJSONObject(\"instagram\");\n JSONArray profile = insta.getJSONArray(\"profile_posts\");\n\n JSONObject f = profile.getJSONObject(0);\n\n JSONObject entry =f.getJSONObject(\"entry_data\");\n JSONArray ProfilePage = entry.getJSONArray(\"ProfilePage\");\n JSONObject d= ProfilePage.getJSONObject(0);\n JSONObject user = d.getJSONObject(\"user\");\n\n JSONObject media = user.getJSONObject(\"media\");\n JSONArray nodes = media.getJSONArray(\"nodes\");\n\n for(int i=0;i<nodes.length();i++)\n {\n JSONObject ca = nodes.getJSONObject(i);\n\n\n String text= ca.getString(\"caption\");\n String time = ca.getString(\"date\");\n posts.add(new Posts(time, text));\n\n }\n\n } catch (JSONException e) {\n Log.e(LOG_TAG, \"Problem parsing the posts JSON results\", e);\n }\n return posts;\n }", "void extractDataFromJson(String commentData);", "private static void setPostJson(HttpPost post, String json) {\n post.addHeader(\"Content-Type\", \"application/json;charset=utf-8\");\n post.setEntity(new StringEntity(json, \"UTF-8\"));\n }", "Map<String, Object> parseToMap(String json);", "@Override\r\n\tpublic void parseJson(JSONObject json) {\n\t\tif(json == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\ttry {\r\n\t\t\ttype = getInt(json,d_type);\r\n\t\t} catch(Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "private Bundle bundleData(Post post) {\n\n Bundle bundle = new Bundle();\n\n// bundle.putString(\"postId\", postId);\n// bundle.putString(\"postUsername\", postUsername);\n// bundle.putParcelable(\"postUserPicture\", userProfilePic);\n// bundle.putString(\"postDescription\", postDescription);\n// bundle.putString(\"postTitle\", postTitle);\n// bundle.putString(\"postDate\", postDate);\n// bundle.putFloat(\"postRating\", postRating);\n// bundle.putString(\"resultId\", resultId);\n// bundle.putString(\"resultImageUrl\", resultImageUrl);\n// bundle.putString(\"resultName\", resultName);\n// bundle.putString(\"resultType\", resultType);\n// bundle.putString(\"resultArtist\", resultArtist);\n bundle.putParcelable(\"post\", post);\n\n return bundle;\n }", "@Override\r\n\tpublic boolean parseJson(JSONObject jo) {\n\t\tif (jo == null) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tthis.card_imageurl = JsonUtility.getString(jo, \"card_imageurl\", \"\");\r\n\t\tthis.image_url = JsonUtility.getString(jo, \"image_url\", \"\");\r\n\t\tthis.received_name = JsonUtility.getString(jo, \"received_name\", \"\");\r\n\t\tthis.content = Utility.decodeUnicode(JsonUtility.getString(jo, \"content\", \"\"));\r\n\t\tthis.from_name = JsonUtility.getString(jo, \"from_name\", \"\");\r\n\t\tthis.praise = JsonUtility.getString(jo, \"praise\", \"\");\r\n\r\n\t\treturn true;\r\n\t}", "public void parsePost()\n {\n Hashtable table = new Hashtable();\n try\n {\n\n String[] pairs = Utilities.splitString(content, \"&\");\n for (int i = 0; i < pairs.length; i++)\n {\n String[] pair = Utilities.splitString(pairs[i], \"=\");\n table.put(pair[0], pair[1]);\n }\n Variables.updateTableWithTable(table);\n Variables.save();\n }\n catch (Exception e)\n {\n Utilities.debugLine(\"WebServer.parsePost(): ERROR\" + content, DEBUG);\n }\n Utilities.debugLine(\"WebServer.parsePost(): Variables were \" + content, DEBUG);\n Utilities.debugLine(\"WebServer.parsePost(): HASHTABLE = \" + table.toString(), DEBUG);\n\n }", "@Override\n public List<T> deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {\n JsonElement postJsonArray = json.getAsJsonArray();\n return new Gson().fromJson(postJsonArray,typeOfT);\n }", "@Override\n public void parse(String json) {\n JSONObject object = new JSONObject(json);\n id = object.getInt(\"dataset id\");\n name = object.getString(\"dataset name\");\n maxNumOfLabels = object.getInt(\"maximum number of labels per instance\");\n\n JSONArray labelsJSON = object.getJSONArray(\"class labels\");\n labels = new ArrayList<>();\n for (int i = 0; i < labelsJSON.length(); i++) {\n labels.add(new Label(labelsJSON.getJSONObject(i).toString()));\n }\n\n JSONArray instancesJSON = object.getJSONArray(\"instances\");\n instances = new ArrayList<>();\n for (int i = 0; i < instancesJSON.length(); i++) {\n instances.add(new Instance(instancesJSON.getJSONObject(i).toString()));\n }\n }", "private void parseData() {\n\t\t\r\n\t}", "public LoginDataGet(Map<String, String> postData) {\n if (postData != null) {\n this.postData = new JSONObject(postData);\n }\n }", "public void parseProductFromJson(String jsonData) { \r\n\t\t \r\n Type typeList = new TypeToken<ArrayList<Product>>(){}.getType(); \r\n Gson gson = new Gson(); \r\n ArrayList<Product> products = gson.fromJson(jsonData, typeList); \r\n for(Product product:products) { \r\n System.out.println(\"name---------->\" + product.getpName()); \r\n System.out.println(\"price---------->\" + product.getpPrice()); \r\n } \r\n }", "private JsonElement getPayload(HttpServletRequest request, HttpServletResponse response)\n throws JsonParseException, IllegalStateException, IOException {\n return new JsonParser().parse(getBody(request));\n }", "public void parser(JSONObject jo) {\n\n\t\n\t\tcontractId = JsonUtil.getJsonString(jo, \"contractId\");\n\t\tdate1 = JsonUtil.getJsonString(jo, \"date1\");\n\t\tstartDate = JsonUtil.getJsonString(jo, \"startDate\");\n\t\tendDate = JsonUtil.getJsonString(jo,\"endDate\");\n\t\tsupplierName = JsonUtil.getJsonString(jo,\"supplierName\");\n\t\ttxt7 = JsonUtil.getJsonString(jo,\"txt7\");\n\t\t\n\t\t\n\t\n\t}", "public static Map<String, Object> post (Request req, Response response) {\n JsonNode node = null;\n try {\n node = mapper.readTree(req.body());\n } catch (IOException e) {\n LOG.warn(\"Error processing POST body JSON\", e);\n halt(400, \"Malformed JSON\");\n }\n // FIXME converting String to JSON nodes and back to string, then re-parsing to Map.\n JsonNode vars = node.get(\"variables\");\n String query = node.get(\"query\").asText();\n return doQuery(vars, query, response);\n }", "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 }", "TorrentJsonParser getJsonParser();", "public void setPost(JSONObject post) {\n try {\n JSONObject metadata = new JSONObject();\n Iterator<String> i = this.prefHelper_.getRequestMetadata().keys();\n while (i.hasNext()) {\n String k = (String) i.next();\n metadata.put(k, this.prefHelper_.getRequestMetadata().get(k));\n }\n if (post.has(Jsonkey.Metadata.getKey())) {\n Iterator<String> postIter = post.getJSONObject(Jsonkey.Metadata.getKey()).keys();\n while (postIter.hasNext()) {\n String key = (String) postIter.next();\n metadata.put(key, post.getJSONObject(Jsonkey.Metadata.getKey()).get(key));\n }\n }\n post.put(Jsonkey.Metadata.getKey(), metadata);\n } catch (JSONException e) {\n Log.e(\"BranchSDK\", \"Could not merge metadata, ignoring user metadata.\");\n }\n this.params_ = post;\n DeviceInfo.getInstance(this.prefHelper_.getExternDebug(), this.systemObserver_, this.disableAndroidIDFetch_).updateRequestWithDeviceParams(this.params_);\n }", "public void postData() {\n\n\t}", "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 String getPostBody() {\n return postBody;\n }", "private Map<String, String> processPostRequest(String content) {\n Map<String, String> store = new HashMap<String, String>();\n\n // Split the post data by &\n for (String entry : content.split(\"&\")) {\n // Split it by =\n String[] data = entry.split(\"=\");\n\n // Check that there is sufficient data in the data array\n if (data.length != 2) {\n continue;\n }\n\n // decode the data\n String key = URLUtils.decode(data[0]);\n String value = URLUtils.decode(data[1]);\n\n // Add it to the store\n store.put(key, value);\n }\n\n return store;\n }", "protected Map<String, String> deserialize(String data)\n {\n Map<String, String> map = new HashMap<String, String>();\n if (!StringUtils.isEmpty(data)) {\n JavaScriptObject jsObject = JavaScriptObject.fromJson(data);\n JsArrayString keys = jsObject.getKeys();\n for (int i = 0; i < keys.length(); i++) {\n String key = keys.get(i);\n Object value = jsObject.get(key);\n if (value != null) {\n map.put(key, String.valueOf(value));\n }\n }\n }\n return map;\n }", "public void deserialize(JsonObject src);", "@Override\n \tpublic Object parseJson(JsonNode jsonNode) {\n \t\tif(jsonNode == null || jsonNode.isNull())\n \t\t\treturn null;\n \t\tList<Object> valList = new ArrayList<Object>();\n \t\t\n \t\tfor(int i=0; i< fieldNames.size(); ++i) {\n \t\t\tString key = fieldNames.get( i);\n \t\t\tif( this.convertFromCamelCase) {\n \t\t\t\tkey = FromJsonUDF.ToCamelCase(key);\n \t\t\t}\n \t\t\tJsonNode valNode = jsonNode.get( key);\n \t\t\tInspectorHandle valHandle = handleList.get(i);\n \t\t\t\n \t\t\tObject valObj = valHandle.parseJson(valNode);\n \t\t\tvalList.add( valObj);\n \t\t}\n \t\t\n \t\treturn valList;\n \t}", "private JSONArray parseJSON() {\n JSONArray jsonArray = new JSONArray();\n for (TimestampedMessage m : fPending) {\n JSONTokener jsonTokener = new JSONTokener(m.fMsg);\n JSONObject jsonObject = null;\n JSONArray tempjsonArray = null;\n final char firstChar = jsonTokener.next();\n jsonTokener.back();\n if ('[' == firstChar) {\n tempjsonArray = new JSONArray(jsonTokener);\n for (int i = 0; i < tempjsonArray.length(); i++) {\n jsonArray.put(tempjsonArray.getJSONObject(i));\n }\n } else {\n jsonObject = new JSONObject(jsonTokener);\n jsonArray.put(jsonObject);\n }\n\n }\n return jsonArray;\n }", "public Producto[] parseResponse(String jsonAsString){\r\n\r\n //manually parsing to productos\r\n JsonParser parser = new JsonParser();\r\n JsonObject rootObject = parser.parse(jsonAsString).getAsJsonObject();\r\n JsonElement projectElement = rootObject.get(\"productos\");\r\n\r\n Producto [] productos = null;\r\n\r\n if(projectElement != null){\r\n\r\n QuantityDictionay.debugLog(\"LOS PRODUCTOS--->\"+projectElement.toString());\r\n\r\n //Use Gson to map response\r\n Gson gson = new Gson();\r\n //set type of response\r\n Type collectionType = new TypeToken<Producto[]>(){}.getType();\r\n //get java objects from json string\r\n productos = gson.fromJson(projectElement.toString(),collectionType);\r\n\r\n QuantityDictionay.debugLog(\"PARSING SIZE---->\"+productos.length);\r\n\r\n }\r\n\r\n\r\n return productos;\r\n\r\n }", "GistComment deserializeCommentFromJson(String json);", "public native Object parse( Object json, String texturePath );", "@Override\n\tpublic JSON parse(String in) throws IOException {\n\t\tMyJSON js = new MyJSON();\n\t\t//count brackets make sure they match\n\t\tif(!syntaxOkay(in)){\n\t\t\tthrow new IllegalStateException(\"Mismatched brackets error\");\n\t\t}\n\t\t//get rid of spaces to make things easier\n\t\tString withoutSpaces = remove(in, ' ');\n\t\t//handles edge case of an empty object\n\t\tString withoutBraces = remove(withoutSpaces, '{');\n\t\twithoutBraces = remove(withoutBraces, '}');\n\t\tif(withoutBraces.length() == 0){\n\t\t\treturn js;\n\t\t}\n\t\tint colonIndex = in.indexOf(\":\");\n\t\tString key = in.substring(0, colonIndex);\n\t\tString value = in.substring(colonIndex + 1);\n\n\t\tif(value.contains(\":\")){\n\t\t\t//this means the value is an object so we figure out how many strings to add to the object\n\t\t\tString[] values = value.split(\",\");\n\t\t\t//creates a temp for the new object\n\t\t\tMyJSON temp = new MyJSON();\n\t\t\tfillObject(values, temp);\n\t\t\tkey = removeOutsides(key);\n\t\t\tjs.setObject(key, temp);\n\t\t}else{\n\t\t\t//the base case that actually puts things as a JSON object\n\t\t\tkey = removeOutsides(key);\n\t\t\tvalue = removeOutsides(value);\n\t\t\tjs.setString(key, value);\n\t\t}\n\n\t\treturn js;\n\t}", "void validateJson();", "public static Produto parserJsonProdutos(String response, Context context){\n\n System.out.println(\"--> PARSER ADICIONAR: \" + response);\n Produto auxProduto = null;\n\n try {\n JSONObject produto = new JSONObject(response);\n\n int id = produto.getInt(\"id\");\n int preco_unitario = produto.getInt(\"preco_unitario\");\n int id_tipoproduto = produto.getInt(\"id_tipo\");\n String designacao = produto.getString(\"designacao\");\n\n auxProduto = new Produto(id, preco_unitario, id_tipoproduto, designacao);\n\n }\n catch (JSONException e)\n {\n e.printStackTrace();\n Toast.makeText(context, \"Error: \" + e.getMessage(), Toast.LENGTH_SHORT).show();\n }\n\n return auxProduto;\n }", "private void createPost() {\n PostModel model = new PostModel(23, \"New Title\", \"New Text\");\n Call<PostModel> call = jsonPlaceHolderAPI.createPost(model);\n call.enqueue(new Callback<PostModel>() {\n @Override\n @EverythingIsNonNull\n public void onResponse(Call<PostModel> call, Response<PostModel> response) {\n if (!response.isSuccessful()) {\n textResult.setText(response.code());\n return;\n }\n PostModel postResponse = response.body();\n String content = \"\";\n assert postResponse != null;\n content += \"Code: \" + response.code() + \"\\n\";\n content += \"ID: \" + postResponse.getId() + \"\\n\";\n content += \"User ID: \" + postResponse.getUserId() + \"\\n\";\n content += \"Title: \" + postResponse.getUserId() + \"\\n\";\n content += \"Body: \" + postResponse.getText();\n textResult.append(content);\n }\n\n @Override\n @EverythingIsNonNull\n public void onFailure(Call<PostModel> call, Throwable t) {\n textResult.setText(t.getMessage());\n }\n });\n }", "List<GistComment> deserializeCommentsFromJson(String json);", "@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(req.getInputStream()));\n\n String json = \"\";\n if(br != null){\n json = br.readLine();\n System.out.println(json);\n }\n\n // 2. initiate jackson mapper\n ObjectMapper mapper = new ObjectMapper();\n\n // 3. Convert received JSON to Article\n Product product = mapper.readValue(json, Product.class);\n\n // 4. Set response type to JSON\n resp.setContentType(\"application/json\");\n\n ProductService productService = new ProductService();\n productService.addProduct(product);\n\n String productsJsonString = this.gson.toJson(productService.getAllProducts());\n PrintWriter out = resp.getWriter();\n resp.setContentType(\"application/json\");\n resp.setCharacterEncoding(\"UTF-8\");\n out.print(productsJsonString);\n out.flush();\n\n }", "@Override\n public void parseJSON(JSONObject jsonObject) {\n if (jsonObject.has(\"business\"))\n try {\n JSONObject businessJsonObject = jsonObject.getJSONObject(\"business\");\n this.businessId = businessJsonObject.getString(\"_id\");\n } catch (JSONException e) {\n e.printStackTrace();\n }\n if (jsonObject.has(\"_id\"))\n try {\n this.foodlogiqId = jsonObject.getString(\"_id\");\n } catch (JSONException e) {\n e.printStackTrace();\n }\n if (jsonObject.has(\"name\"))\n try {\n this.name = jsonObject.getString(\"name\");\n } catch (JSONException e) {\n e.printStackTrace();\n }\n if (jsonObject.has(\"associateWith\"))\n try {\n this.associateWith = jsonObject.getString(\"associateWith\");\n } catch (JSONException e) {\n e.printStackTrace();\n }\n if (jsonObject.has(\"attributes\"))\n try {\n this.attributes = new ArrayList<>();\n JSONArray attributesJson = jsonObject.getJSONArray(\"attributes\");\n for (int i = 0; i < attributesJson.length(); i++) {\n JSONObject attributeJson = attributesJson.getJSONObject(i);\n CustomAttribute attribute = new CustomAttribute();\n attribute.parseJSON(attributeJson);\n this.attributes.add(attribute);\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "private void getSocialMediaPost() {\n Call<List<SocialMediaPost>> call = api_interface.getSocialMediaPost();\n\n //runs on a separate thread\n call.enqueue(new Callback<List<SocialMediaPost>>() {\n @Override\n public void onResponse(Call<List<SocialMediaPost>> call, Response<List<SocialMediaPost>> response) {\n if (!response.isSuccessful()){\n textView.setText(\"code: \"+ response.code());\n return;\n }\n\n List<SocialMediaPost> socialMediaPosts = response.body();\n StringBuilder stringBuilder = new StringBuilder();\n\n if (socialMediaPosts != null) {\n for (SocialMediaPost socialMediaPost : socialMediaPosts) {\n stringBuilder.append(socialMediaPost).append(\"/\");\n }\n }\n\n textView.setText(stringBuilder);\n\n }\n\n @Override\n public void onFailure(Call<List<SocialMediaPost>> call, Throwable t) {\n //Something went wrong with communication with the server\n //json object doesnt fit into what we are trying to pass it into\n textView.setText(t.getMessage());\n }\n });\n }", "public void postData(String p) {\n\t\tHttpClient httpclient = new DefaultHttpClient();\n\t\tHttpPost httppost = new HttpPost(\n\t\t\t\t\"http://www.webaraza.com/webaraza2/collector.php\");\n\n\t\ttry {\n\t\t\t// Add your data\n\t\t\tList<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(1);\n\t\t\tnameValuePairs.add(new BasicNameValuePair(\"p\", p));\n\t\t\thttppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));\n\n\t\t\t// Execute HTTP Post Request\n\t\t\tHttpResponse response = httpclient.execute(httppost);\n\n\t\t\tJSONObject parentobJsonObject = new JSONObject(\n\t\t\t\t\tEntityUtils.toString(response.getEntity()));\n\t\t\tJSONArray childarr = parentobJsonObject.getJSONArray(\"dety\");\n\t\t\tJSONObject childobj = childarr.getJSONObject(0).getJSONObject(\n\t\t\t\t\t\"post\");\n\t\t\tname = childobj.getString(\"name\");\n\t\t\tc1 = childobj.getString(\"c1\");\n\t\t\tc2 = childobj.getString(\"c2\");\n\n\t\t} catch (ClientProtocolException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t} catch (ParseException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (JSONException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "T fromJson(Object source);", "private void extractDataFromJson(String forumData) {\n\t\t\tif (!isCancelled()) {\n\t\t\t\tString forumHeading = \"\", forumDescription = \"\";\n\n\t\t\t\t// extracting forum details\n\t\t\t\tVector<String> storeExtractedValues = new Vector<String>();\n\t\t\t\tCconnectToServer extractData = new CconnectToServer();\n\n\t\t\t\tstoreExtractedValues = extractData.extractDataFromJson(\n\t\t\t\t\t\tforumData, \"Title\");\n\t\t\t\tforumHeading = storeExtractedValues.get(0);\n\n\t\t\t\tstoreExtractedValues = extractData.extractDataFromJson(\n\t\t\t\t\t\tforumData, \"Description\");\n\t\t\t\tforumDescription = storeExtractedValues.get(0);\n\n\t\t\t\tresult[0] = forumHeading;\n\t\t\t\tresult[1] = forumDescription;\n\t\t\t}\n\t\t}", "public void parseJson(JSONObject jsobject){\n\t\ttry{\n\t\t\tidCompany=(jsobject.has(\"idCompany\"))?jsobject.getInt(\"idCompany\"):0;\n\t\t\tname=(jsobject.has(\"name\"))?jsobject.getString(\"name\"):\"\";\n\t\t\taddress=(jsobject.has(\"address\"))?jsobject.getString(\"address\"):\"\";\n\t\t\tphone=(jsobject.has(\"address\"))?jsobject.getString(\"address\"):\"\";\n\t\t\tstate=(jsobject.has(\"state\"))?jsobject.getString(\"state\"):\"\";\n\t\t\tcountry=(jsobject.has(\"country\"))?jsobject.getString(\"country\"):\"\";\n\t\t\tlogotype=(jsobject.has(\"logotype\"))?jsobject.getString(\"logotype\"):\"\";\n\t\t\tfloorPlan=(jsobject.has(\"floorPlan\"))?jsobject.getString(\"floorPlan\"):\"\";\n\t\t}catch(JSONException e){\n\t\t\tLog.e(User.class.toString(), \"Failed to parse\"+e.toString());\n\t\t}\n\t}", "@Test(enabled=false)\n\tpublic void objectPost() {\t\n\t\tPosts posts = new Posts(\"3\", \"Seahawks\", \"Wilson\");\n\t\t\n\t\tResponse res = given().\n\t\twhen().\n\t\tcontentType(ContentType.JSON).\n\t\tbody(posts).\n\t\tpost(\"http://localhost:3000/posts/\");\n\t\n\t\tSystem.out.println(\"Response as object: \"+res.asString());\n\t}", "public void decode(String data) throws JSONException {\n\t\tthis.dtoObj=getObj(data, JrGxpgbillDTO.class);\n\t}", "@Override\n\t\t\tprotected String doInBackground(String... arg0) {\n\t\t\t\t\n\t\t\t\tList<NameValuePair> params=new ArrayList<NameValuePair>();\n\t\t\t\tparams.add(new BasicNameValuePair(\"tag\",tag));\n\t\t\t\t\n\t\t\t\tString json;\n\t\t\t\t\t\n\t\t\t\t\tjson=jsonParser.makeHttpRequest(url, \"POST\", params);\n\t\t\t\t\t\n\t\t\t\treturn json;\n\t\t\t\t\n\t\t\t}", "Event deserialize(JSONObject data, JSONStuffSerialization stuffSerializer)\n\t\t\tthrows JSONException;", "private Object onParse(final String content) throws IOException{\n if(null == this.mBean)\n return null;\n\n try{\n return JSON.parseObject(content, this.mBean);\n }catch(Exception e){\n throw new IOException(e.getMessage());\n }\n }", "GistUser deserializeUserFromJson(String json);", "@Override\n protected List<HashMap<String, String>> doInBackground(String... jsonData) {\n\n List<HashMap<String, String>> places = null;\n PlaceJSONParser placeJsonParser = new PlaceJSONParser();\n\n try {\n jObject = new JSONObject(jsonData[0]);\n\n /** Getting the parsed data as a List construct */\n places = placeJsonParser.parse(jObject);\n\n } catch (Exception e) {\n Log.d(\"Exception\", e.toString());\n }\n return places;\n }", "public abstract void fromJson(JSONObject jsonObject);", "public ArrayList<Product> parseJSONAction(String textJson){\n \n JSONParser j = new JSONParser();\n \n try {\n \n Map<String, Object> productsListJson = j.parseJSON(new CharArrayReader(textJson.toCharArray()));\n ArrayList<Map<String,Object>> productsList = (ArrayList<Map<String,Object>>) productsListJson.get(\"root\");\n //System.out.println(\"pdd \" + productsList.toString());\n Map<String, Object> cart = productsList.get(0);\n //System.out.println(\"cc \" + cart);\n //System.out.println(\"ggg\" + cart.get(\"cart\"));\n ArrayList<Map<String,Object>> lis = (ArrayList<Map<String,Object>>) cart.get(\"cart\");\n //System.out.println(\"lista \" + lis.toString());\n for(Map<String, Object> en : lis){\n Product p = new Product();\n p.setDetails(en.get(\"numProducts\").toString());\n p.setRef_product((int) Double.parseDouble(en.get(\"refProduct\").toString()));\n p.setPrice((int) Float.parseFloat(en.get(\"totalPrice\").toString()));\n products.add(p);\n }\n \n Map<String, Object> data = productsList.get(1);\n ArrayList<Map<String,Object>> llis = (ArrayList<Map<String,Object>>) data.get(\"data\");\n System.out.println(\"dddd\" + llis.toString());\n int i=0;\n for(Map<String, Object> en : llis){\n Product pro = products.get(i);\n pro.setName(en.get(\"name\").toString());\n pro.setPhoto(\"http://127.0.0.1/ftbb_web/ftbb_web/public/images/prod/\"+en.get(\"photo\").toString());\n i++;\n }\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n \n return products; \n }", "@Override\n public void parseJson(JsonObject jsonObject) throws JsonException {\n publicKeyInfo = getStringIfSet(jsonObject,\"publicKeyInfo\");\n nodeAddress = getStringIfSet(jsonObject,\"nodeAddress\");\n nodePort = getIntIfSet(jsonObject,\"nodePort\");\n mainNet = getBooleanIfSet(jsonObject,\"mainNet\");\n }", "@Override\n\tpublic String onData() {\n\t\tMap<String, Object> mapObj = new HashMap<String, Object>();\n\t\tfor (BasicNameValuePair pair : pairs) {\n\t\t\tmapObj.put(pair.getName(), pair.getValue());\n\t\t}\n\t\tGson gson = new Gson();\n\t\tString json = gson.toJson(mapObj);\n\t\treturn json;\n\t}", "private FormData extractBodyToFormData(final HttpServletRequest request, final Form form) throws IOException, JSONException {\n final FormData formData = new FormData();\n\n // read request body and convert request body to json\n JSONObject jsonBody = new JSONObject(request.getReader().lines().collect(Collectors.joining()));\n Iterator i = jsonBody.keys();\n while (i.hasNext()) {\n String key = String.valueOf(i.next());\n String value = jsonBody.getString(key);\n\n if (key != null && value != null) {\n\n // convert json to field data\n Element element = FormUtil.findElement(key, form, new FormData());\n if (element != null)\n formData.addRequestParameterValues(FormUtil.getElementParameterName(element), new String[]{value});\n }\n }\n\n formData.addRequestParameterValues(AssignmentCompleteButton.DEFAULT_ID, new String[]{\"true\"});\n\n // use field \"ID\" as primary key if possible\n if (jsonBody.has(FormUtil.PROPERTY_ID)) {\n formData.setPrimaryKeyValue(jsonBody.getString(FormUtil.PROPERTY_ID));\n }\n\n formData.setDoValidation(true);\n\n return formData;\n }", "public static String doPostJson(String url, String json) {\n try {\n RequestBody requestBody = FormBody.create(MediaType.parse(\"application/json; charset=utf-8\"), json);\n Request request = new Request.Builder().url(url).post(requestBody).build();\n Response response = mHttpClient.newCall(request).execute();\n if (response != null && response.isSuccessful()) {\n String out = response.body().string();\n logger.info(\"http post rlt:\" + out);\n return out;\n }\n } catch (Exception e) {\n log.error(e.getMessage());\n }\n return \"error\";\n }", "public String getJsondata() {\n return jsondata;\n }", "@Test\r\n\tpublic void test01_post() {\n\t\tJSONObject obj=new JSONObject();\r\n\t\tobj.put(\"Gazi1\", \"7979893089\");\r\n\t\tobj.put(\"Reshma\", \"6291172991\");\r\n\t\t\r\n\t\t\r\n\t\t//System.out.println(obj.toJSONString());\r\n\t\tgiven().header(\"Content-Type\",\"Application/JSON\")\r\n\t\t.contentType(ContentType.JSON).accept(ContentType.JSON)\r\n\t\t.body(obj.toJSONString()).when().post(\"https://reqres.in/api/users\").then()\r\n\t\t.statusCode(201);\r\n\t\t\r\n\t}", "public String getPost() {\r\n return post;\r\n }", "public String getPost() {\n return post;\n }", "public String getPost() {\n return post;\n }", "private void parseJsonF1 (String fromAsset) {\n try {\n JSONObject jsonObj = new JSONObject(fromAsset);\n JSONObject jsonObject = jsonObj.getJSONObject(\"data\");\n JSONObject details = jsonObject.getJSONObject(\"details\");\n Iterator<String> itr = details.keys();\n while (itr.hasNext()) {\n String key = itr.next();\n if (key.equals(\"minimumAmount\") || key.equals(\"minimumAmount\") || key.equals(\"suggestedAmount\")) {\n JSONArray jsonArray = details.getJSONArray(key);\n for (int i = 0; i < jsonArray.length(); i++) { // **line 2**\n JSONObject childJSONObject = jsonArray.getJSONObject(i);\n int amount = childJSONObject.getInt(\"amount\");\n String currency = childJSONObject.getString(\"currency\");\n DetailsBean details1 = new DetailsBean();\n details1.setAmout(amount);\n details1.setCurrency(currency);\n detailsList.add(details1);\n }\n }\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "public JSONDocument parse (String data){\n JSONDocument temp = null;\n if (data != null && !data.isEmpty()){\n temp = this.parseString(this.cleanString(data));\n }else throw new IllegalArgumentException(\"data cannot be null or empty\");\n return temp;\n }", "void mo28373a(JSONObject jSONObject);", "public Object getFormData() {\r\n return data;\r\n }", "public String makePostRequestSoDoGhe(String url){\n String result = null;\n HttpClient httpClient = new DefaultHttpClient();\n HttpPost httpPost = new HttpPost(url);\n\n try {\n JSONObject jsonObject = new JSONObject();\n jsonObject.put(\"MaChuyen\", MaChuyen);\n List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>();\n nameValuePairs.add(new BasicNameValuePair(\"Chuyen\", jsonObject.toString()));\n Log.d(\"JSON POST DATA\", \"mainToPost: \" + nameValuePairs.toString());\n httpPost.setEntity(new UrlEncodedFormEntity(nameValuePairs,\"UTF-8\"));\n //execute HttpPost request\n HttpResponse httpResponse = httpClient.execute(httpPost);\n InputStream inputStream = httpResponse.getEntity().getContent();\n InputStreamToString str = new InputStreamToString();\n result = str.getStringFromInputStream(inputStream);\n }catch (Exception e){\n e.printStackTrace();\n }\n\n return result;\n }", "@Test\n public void createPost() throws IOException {\n PostData postData = new PostData()\n .withId(101)\n .withUserId(1)\n .withTitle(\"New Post\")\n .withBody(\"This is the body of the post.\");\n\n // Create an HTTP Post Request\n HttpPost post = new HttpPost(POSTS);\n\n // Set the \"Content-type\" header of the\n // HTTP Post Request to \"Application/json; charset=UTF-8\"\n post.setHeader(\n CONTENT_TYPE,\n \"Application/json; charset=UTF-8\"\n );\n\n // Create a String Entity out of the JSON data and add it\n // to the HTTP Post Request.\n //\n // This will serialize the JSON data into a String\n post.setEntity(\n new StringEntity(\n this.gson.toJson(postData)\n )\n );\n\n // Execute the HTTP Post with the client\n HttpResponse response = this.httpClient.execute(post);\n\n // Get a PostData class instance from the response\n PostData responsePostData = getPostData(response);\n\n // Make assertions about the response\n assertThat(response.getStatusLine().getStatusCode())\n .isEqualTo(201);\n\n // Make assertions about the data returned\n assertThat(responsePostData.getId()).isEqualTo(101);\n assertThat(responsePostData.getUserId()).isEqualTo(1);\n assertThat(responsePostData.getTitle())\n .isEqualTo(postData.getTitle());\n assertThat(responsePostData.getBody())\n .isEqualTo(postData.getBody());\n }", "private static Object m7292a(String str) throws JSONException {\n Object obj = null;\n String trim = str.trim();\n if (trim.startsWith(\"{\") || trim.startsWith(\"[\")) {\n obj = new JSONTokener(trim).nextValue();\n }\n return obj == null ? trim : obj;\n }", "private Object readJSON() throws JSONException\n {\n switch(read(3))\n {\n case zipObject:\n return readObject();\n case zipArrayString:\n return readArray(true);\n case zipArrayValue:\n return readArray(false);\n case zipEmptyObject:\n return new JSONObject();\n case zipEmptyArray:\n return new JSONArray();\n case zipTrue:\n return Boolean.TRUE;\n case zipFalse:\n return Boolean.FALSE;\n default:\n return JSONObject.NULL;\n }\n }", "Map<String, List<String>> getFormDataMultivalue();", "private void createPostMap() {\n Map<String, String> map = new HashMap<>();\n map.put(\"userId\", \"12\");\n map.put(\"title\", \"New Title\");\n Call<PostModel> call = jsonPlaceHolderAPI.createPostMap(map);\n call.enqueue(new Callback<PostModel>() {\n @Override\n @EverythingIsNonNull\n public void onResponse(Call<PostModel> call, Response<PostModel> response) {\n if (!response.isSuccessful()) {\n textResult.setText(response.code());\n return;\n }\n PostModel postResponse = response.body();\n String content = \"\";\n assert postResponse != null;\n content += \"Code: \" + response.code() + \"\\n\";\n content += \"ID: \" + postResponse.getId() + \"\\n\";\n content += \"User ID: \" + postResponse.getUserId() + \"\\n\";\n content += \"Title: \" + postResponse.getTitle() + \"\\n\";\n content += \"Body: \" + postResponse.getText();\n textResult.append(content);\n }\n\n @Override\n @EverythingIsNonNull\n public void onFailure(Call<PostModel> call, Throwable t) {\n textResult.setText(t.getMessage());\n }\n });\n }", "@Override\n\t\tpublic void extractDataFromJson(String commentData) {\n\t\t\tString userID = \"\";\n\t\t\tString[] comments = null;\n\t\t\tString[] userNameComment = null;\n\t\t\t// extracting comments and username\n\t\t\ttry {\n\t\t\t\tJSONArray json2 = new JSONArray(commentData);\n\t\t\t\tcomments = new String[json2.length()];\n\t\t\t\tuserNameComment = new String[json2.length()];\n\t\t\t\tresult = new String[2][json2.length()];\n\t\t\t\tresult[0] = null;\n\t\t\t\tresult[1] = null;\n\t\t\t\tfor (int i = 0; i < json2.length(); i++) {\n\n\t\t\t\t\tJSONObject obj2 = json2.getJSONObject(i);\n\t\t\t\t\tcomments[i] = obj2.getString(\"Comment\");\n\t\t\t\t\tuserID = obj2.getString(\"UserID\");\n\n\t\t\t\t\tString userInfoDataFromServer = getUserInfoFromServer(userID);\n\t\t\t\t\tuserNameComment[i] = extractUserNameFromData(userInfoDataFromServer);\n\n\t\t\t\t}\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t\t//if (commentData.equals(\"\\nnull\\n\")) {\n\t\t\tif (commentData.equals(\"-1\")) {\n\t\t\t\tcomments = new String[1];\n\t\t\t\tuserNameComment = new String[1];\n\t\t\t\tresult = new String[2][1];\n\t\t\t\tcomments[0] = \"zero\";\n\t\t\t\tuserNameComment[0] = \"zero\";\n\t\t\t\tresult[0] = comments;\n\t\t\t\tresult[1] = userNameComment;\n\t\t\t\tthreadMsg(result);\n\t\t\t} else {\n\t\t\t\tresult[0] = comments;\n\t\t\t\tresult[1] = userNameComment;\n\t\t\t\tthreadMsg(result);\n\t\t\t}\n\n\t\t}", "public Object getParsedObject() {\n\t\treturn parsedObject;\n\t}", "@Override\n protected ArrayList<Object> doInBackground(String... params) {\n RequestBody postData = new FormEncodingBuilder()\n .add(\"type\", \"json\")\n .build();\n\n ArrayList<Object> feedDataList = CMFeedJsonUtil.feed(params[0], postData);\n Log.d(\"Tag\", feedDataList.toString());\n return feedDataList;\n }", "@Test\n\tpublic void test_04() {\n\n\t\t//Json data configuration\n\t\tcomplexobjectinformationclass childdataobject = new complexobjectinformationclass();\n\t\tcomplexobjectclass dataobject = new complexobjectclass();\n\n\t\tchilddataobject.setEmail(\"complex@complex.com\");\n\t\tchilddataobject.setPhone(\"12300000\");\n\t\tchilddataobject.setAddress(\"Bangladesh\");\n\n\t\tdataobject.setId(\"2\");\n\t\tdataobject.setAuthor(\"ataure\");\n\t\tdataobject.setTitle(\"This is title\");\n\t\tdataobject.setinformation(childdataobject);\n\n\n\t\t//Request body\n\t\tResponse reponse = given().\n\t\t\t\twhen().\n\t\t\t\tcontentType(ContentType.JSON).\n\t\t\t\tbody(dataobject).\n\t\t\t\tpost(\"http://localhost:3000/posts\");\n\n\t\tSystem.out.println(\"updated response data \"+ reponse.asString());\t\t\n\t}", "private static FluidIngredient deserializeObject(JsonObject json) {\n if (json.entrySet().isEmpty()) {\n return EMPTY;\n }\n\n // fluid match\n if (json.has(\"name\")) {\n // don't set both, obviously an error\n if (json.has(\"tag\")) {\n throw new JsonSyntaxException(\"An ingredient entry is either a tag or an fluid, not both\");\n }\n\n // parse a fluid\n return FluidMatch.deserialize(json);\n }\n\n // tag match\n if (json.has(\"tag\")) {\n return TagMatch.deserialize(json);\n }\n\n throw new JsonSyntaxException(\"An ingredient entry needs either a tag or an fluid\");\n }", "private JsonObject postAsJson(URL url, String json) {\n // System.out.format(\"postAsJson URL: %s JSON: \\n%s\\n\", url.toString(), json);\n HttpsURLConnection urlConnection;\n InputStream inputStream = null;\n OutputStream outputStream = null;\n JsonObject jsonObject = null;\n try {\n urlConnection = (HttpsURLConnection) url.openConnection();\n urlConnection.setRequestProperty(\"Cache-Control\", \"no-cache\");\n urlConnection.setRequestProperty(\"Accept\", \"application/json\");\n urlConnection.setRequestProperty(\"User-Agent\", \"Jediverse CLI\");\n urlConnection.setUseCaches(false);\n urlConnection.setRequestMethod(Literals.POST.name());\n if (settingsJsonObject != null) {\n String authorization = String.format(\"Bearer %s\", Utils.getProperty(settingsJsonObject, Literals.access_token.name()));\n urlConnection.setRequestProperty(\"Authorization\", authorization);\n // System.out.format(\"Setting authorization header: %s\\n\", authorization);\n }\n if (json != null) {\n urlConnection.setRequestProperty(\"Content-type\", \"application/json; charset=UTF-8\");\n urlConnection.setDoOutput(true);\n urlConnection.setRequestProperty(\"Content-length\", Integer.toString(json.length()));\n outputStream = urlConnection.getOutputStream();\n outputStream.write(json.getBytes());\n outputStream.flush();\n int responseCode = urlConnection.getResponseCode();\n System.out.format(\"Response code: %d\\n\", responseCode);\n }\n urlConnection.setInstanceFollowRedirects(true);\n inputStream = urlConnection.getInputStream();\n InputStreamReader isr = new InputStreamReader(inputStream);\n jsonObject = gson.fromJson(isr, JsonObject.class);\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n Utils.close(inputStream, outputStream);\n }\n return jsonObject;\n }", "JSONObject post(String url) {\n String json = \"\";\n try {\n URL address = new URL(url);\n HttpURLConnection conn = (HttpURLConnection) address.openConnection();\n conn.setRequestMethod(\"GET\");\n conn.setRequestProperty(\"Accept\", \"application/json\");\n json = \"{\\\"result\\\":\";\n Scanner scan = new Scanner(address.openStream());\n while (scan.hasNext())\n json += scan.nextLine();\n scan.close();\n json += \"}\";\n } catch (Exception e) {\n System.out.println(\"Failed to send the following request : \" + url);\n }\n return new JSONObject(json);\n }", "public JSONObject toJSON() {\n JSONObject jsonObject = new JSONObject();\n JSONObject json_posts = new JSONObject();\n for (Post post : this.getPost()) {\n JSONObject json_post = new JSONObject();\n JSONObject json_files = new JSONObject();\n for (UserFile userFile : post.getFile()) {\n JSONObject json_file = new JSONObject();\n json_file.put(\"FileID\", userFile.getFileID());\n json_file.put(\"FilePath\", userFile.getFilePath());\n json_files.put(\"File\" + userFile.getFileID(), json_file);\n }\n json_post.put(\"PostID\", post.getPostID());\n json_post.put(\"Title\", post.getTitle());\n json_post.put(\"Body\", post.getBody());\n json_post.put(\"Files\", json_files);\n json_posts.put(\"Post\" + post.getPostID(), json_post);\n }\n jsonObject.put(\"UID\", this.getUID());\n jsonObject.put(\"UserName\", this.getUserName());\n jsonObject.put(\"PassWord\", this.getPassWord());\n jsonObject.put(\"Email\", this.getEmail());\n jsonObject.put(\"Posts\", json_posts);\n return jsonObject;\n }", "@Override\n public T deserialize(JsonParser p, DeserializationContext ctxt)\n throws JacksonException\n {\n if (ctxt.isEnabled(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY)) {\n return deserializeFromSingleValue(p, ctxt);\n }\n // if not deserialize the normal way\n return deserializeContents(p, ctxt);\n }", "public void parseResponse();", "public JSONObject postJSONRequest(String url)throws Exception{\n\t\tJSONObject responseJSON = null;\n\t\t\n\t\tString responseString = executeRequest(url);\n\t\tresponseJSON = parseJSONResponse(responseString);\n\t\t\n return responseJSON;\n\n\t}", "@POST\n @Consumes(MediaType.APPLICATION_JSON)\n// trying to make the big deal post insertable but didn't worked out because of the parsing in java\n public String addVote(String body) {\n return \"test\";\n }", "String getJSON();", "public static Message parse(JSONObject json) throws JSONException {\n\t\tString text = json.getString(\"text\");\n\t\tDate createdDate = null;\n\t\tif(json.has(\"created_at\")) createdDate = DateParser.parse(json.getString(\"created_at\"));\n\t\tPerson person = Person.parse(json.getJSONObject(\"person\"));\n\t\tString url = null;\n\t\tif(json.has(\"url\")) url = json.getString(\"url\");\n\t\treturn new Message(text, person, createdDate, url);\n\t}", "Gist deserializeGistFromJson(String json);", "@Override\n\tprotected void handlePostBody(HashMap<String, HashMap<String, String>> params, DataFormat format) throws Exception {\n\t}", "protected void handleJSonResponse(JsonNode json_response, Context _context) {\n JsonNode status_node = ServerExchangeUtils.safeJSonGet(json_response, Constants.JSON_STATUSCODE_KEYWORD);\n String status = status_node == null ? null : status_node.getTextValue();\n if (Constants.OK_STATUS.equals(status)) {\n JsonNode timestamp_node = ServerExchangeUtils.safeJSonGet(json_response, Constants.JSON_TIMESTAMP_KEYWORD);\n long timestamp = timestamp_node == null ? 0 : timestamp_node.getLongValue();\n // Log.i(Constants.LOG_TAG, \"timestamp: \" + timestamp);\n JsonNode posts_array = ServerExchangeUtils.safeJSonGet(json_response, Constants.JSON_POSTS_KEYWORD);\n ArrayList<ContentValues> insert_values = new ArrayList<ContentValues>();\n Iterator<JsonNode> it = posts_array.getElements();\n while (it.hasNext()) {\n JsonNode post = (JsonNode) it.next();\n Post p = new Post(post, _context);\n if (p.isStoredInDb() == false) {\n insert_values.add(p.getDBContentValues());\n }\n }\n\n if (insert_values.isEmpty() == false) {\n _context.getContentResolver().bulkInsert(Constants.POSTS_CONTENT_URI, insert_values.toArray(new ContentValues[] {}));\n }\n\n // Store timestamp\n final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(_context);\n Editor editor = prefs.edit();\n editor.putLong(Constants.JSON_TIMESTAMP_KEYWORD, timestamp);\n editor.commit();\n }\n Log.d(Constants.LOG_TAG, \" ===> REFRESH DATA SUCCESSFULLY FINISHED!\");\n fireDataRefreshEnd(Constants.POSTS_REFRESH_KEYWORD);\n }", "@Override\n protected Place[] doInBackground(String... jsonData) {\n\n\n Place[] places = null;\n PlaceJSONParser placeJsonParser = new PlaceJSONParser();\n\n try{\n jObject = new JSONObject(jsonData[0]);\n /** Getting the parsed data as a List construct */\n places = placeJsonParser.parse(jObject);\n this.places.clear();\n for(Place p: places)\n this.places.add(p);\n\n }catch(Exception e){\n Log.d(\"Exception\",e.toString());\n }\n return places;\n }", "@Override\n\tpublic void onParser(JSONArray response) {\n\n\t}", "protected Map<String, String> parseSimpleJavaScriptObjectProperties(String data) {\n\t\tMap<String, String> result = new LinkedHashMap<String, String>(10);\n\t\t\n\t\tMatcher m = SIMPLE_JSON_PATTERN.matcher(data);\n\t\twhile ( m.find() ) {\n\t\t\tString attrName = m.group(1);\n\t\t\tString attrValue = m.group(2);\n\t\t\tresult.put(attrName, attrValue);\n\t\t}\n\t\t\n\t\tlog.trace(\"Parsed {} attributes from data [{}]: {}\",\n\t\t\t\tnew Object[] {result.size(), data, result});\n\t\t\n\t\treturn result;\n\t}", "public Map<String,Object> parseSingleJSON(Object jObj) {\n\t\tMap<String,Object> map = new HashMap<>();\n\t\t\n\t\tif(jObj instanceof JSONObject)\n\t\t\tparseJSON(map, \"\", (JSONObject) jObj);\n\t\telse if(jObj instanceof JSONArray)\n\t\t\tparseJSON(map, \"\", (JSONArray) jObj);\n\t\telse\n\t\t\tmap.put(jObj.toString(), parseJSONVal(jObj));\n\t\t\n\t\treturn map;\n\t}", "public void fromJSON(String json) throws JSONException;", "@Override\n protected void onPostExecute(String s) {\n Log.d(\"mytag\", s);\n try {\n JSONObject object = new JSONObject(s);\n\n if (object.has(\"text\")) {\n JSONArray jsonArray = object.getJSONArray(\"text\");\n secondEditText.setText(jsonArray.getString(0));\n } else {\n Log.i(\"mytag\", \"onPostExecute: \" + s);\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "private void parseJSON(Map<String,Object> map, String baseName, JSONArray toParse) {\n\t\tObject jObj;\n\t\t\n\t\tfor(int objI=0; objI < toParse.length(); objI++) \n\t\t{\n\t\t\tjObj = parseJSONVal(toParse.get(objI));\n\t\t\t\n\t\t\tif(jObj instanceof JSONObject)\n\t\t\t\tparseJSON(map, baseName+objI+StringParser.DELIMITER, (JSONObject) jObj);\n\t\t\telse if(jObj instanceof JSONArray)\n\t\t\t\tparseJSON(map, baseName+objI+StringParser.DELIMITER, (JSONArray) jObj);\n\t\t\telse\n\t\t\t\tmap.put(baseName+objI, jObj);\n\t\t}\n\t}", "@Override\n public void onResponse(JSONArray response) {\n parseData(response);\n }", "@Override\n public void onResponse(JSONObject jsonObject) {\n System.out.println(jsonObject.toString());\n //Log.d(\"response from api\", \"onResponse: \\n\"\n // + jsonObject.toString());\n try {\n JSONObject j = jsonObject.getJSONObject(\"data\");\n Log.d(\"response from api\", j.toString());\n JSONObject rr = j.getJSONObject(\"orders\");\n Log.d(\"response from api\", rr.toString());\n Gson json = new Gson();\n Order me = json.fromJson(rr.toString(), Order.class);\n singleorder = me;\n Log.d(\"response from api\", me.getName());\n } catch (JSONException e) {\n Log.d(\"response from api\", \"paaaapiiii\");\n e.printStackTrace();\n }\n }" ]
[ "0.6698509", "0.6669033", "0.6235005", "0.6208604", "0.58285457", "0.5757885", "0.56238925", "0.54311305", "0.5430656", "0.54212517", "0.5352754", "0.53047645", "0.52487385", "0.52260077", "0.5183474", "0.5147448", "0.5139088", "0.51311576", "0.5122674", "0.5093402", "0.508593", "0.508526", "0.50680906", "0.5056128", "0.505054", "0.50500625", "0.504087", "0.5033759", "0.5032576", "0.5018653", "0.5005588", "0.49653867", "0.49465948", "0.49367127", "0.4921945", "0.4919592", "0.4916351", "0.49162298", "0.49078208", "0.49068296", "0.489954", "0.4894402", "0.48909792", "0.48868322", "0.48818958", "0.48816082", "0.48669392", "0.48640853", "0.48635682", "0.48495325", "0.48253867", "0.48252955", "0.48246202", "0.48189816", "0.48169637", "0.47989735", "0.4788235", "0.47880203", "0.47856808", "0.4777912", "0.47733027", "0.4772151", "0.47691327", "0.47691327", "0.47524583", "0.47498256", "0.47413272", "0.4738376", "0.47320375", "0.47267088", "0.4720092", "0.47135875", "0.47061965", "0.47042385", "0.47011647", "0.469677", "0.4686109", "0.46822357", "0.46816757", "0.4679771", "0.46793535", "0.4678125", "0.467308", "0.46682376", "0.46653858", "0.46641672", "0.4662734", "0.46488807", "0.46389166", "0.46367568", "0.46366218", "0.46363097", "0.46283686", "0.46282452", "0.46259376", "0.46223357", "0.46215835", "0.4611248", "0.46091396", "0.45995238" ]
0.54877144
7
Save the settings to preferences file Attempt to connect to Mongo
@Override public void actionPerformed(ActionEvent e) { connectToMongo(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void saveSettings()\n {\n try\n {\n // If remember information is true then save the ip and port\n // properties to the projects config.properties file\n if ( rememberLoginIsSet_ )\n {\n properties_.setProperty( getString( R.string.saved_IP ), mIP_ );\n properties_.setProperty( getString( R.string.saved_Port ),\n mPort_ );\n }\n\n // Always save the remember login boolean\n properties_.setProperty( getString( R.string.saveInfo ),\n String.valueOf( rememberLoginIsSet_ ) );\n\n File propertiesFile =\n new File( this.getFilesDir().getPath().toString()\n + \"/properties.txt\" );\n FileOutputStream out =\n new FileOutputStream( propertiesFile );\n properties_.store( out, \"Swoop\" );\n out.close();\n }\n catch ( Exception ex )\n {\n System.err.print( ex );\n }\n }", "public void save() {\n try {\n FileOutputStream fos = new FileOutputStream(file);\n properties.store(fos, \"Preferences\");\n } catch (FileNotFoundException e) {\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "private void saveProperties() {\n\n JiveGlobals.setXMLProperty(\"database.defaultProvider.driver\", driver);\n JiveGlobals.setXMLProperty(\"database.defaultProvider.serverURL\", serverURL);\n JiveGlobals.setXMLProperty(\"database.defaultProvider.username\", username);\n JiveGlobals.setXMLProperty(\"database.defaultProvider.password\", password);\n\n JiveGlobals.setXMLProperty(\"database.defaultProvider.minConnections\",\n Integer.toString(minConnections));\n JiveGlobals.setXMLProperty(\"database.defaultProvider.maxConnections\",\n Integer.toString(maxConnections));\n JiveGlobals.setXMLProperty(\"database.defaultProvider.connectionTimeout\",\n Double.toString(connectionTimeout));\n }", "protected void savePreferences() {\n String tmp_hostname = hostname.getHostName();\n System.out.println(\"stringified hostname was: \" + tmp_hostname);\n if (tmp_hostname != null) {\n SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(this);\n SharedPreferences.Editor editor = settings.edit();\n editor.putString(\"last_hostname\", tmp_hostname);\n editor.commit();\n }\n }", "private static void persistSettings() {\n\t\ttry {\n\t\t\tBufferedWriter userConf = new BufferedWriter(new FileWriter(\n\t\t\t\t\tconf.getAbsolutePath()));\n\t\t\tproperties.store(userConf, null);\n\t\t\t// flush and close streams\n\t\t\tuserConf.flush();\n\t\t\tuserConf.close();\n\t\t} catch (IOException e) {\n\t\t\tlog.severe(\"Couldn't save config file.\");\n\t\t}\n\t}", "public void saveConnectionConfiguration(){\n\t\tProperties props = new Properties();\n\t\tif (connectionconfig!=null){\n\t\t\tprops.setProperty(\"server\", connectionconfig.getServer());\n\t\t\tprops.setProperty(\"user\", connectionconfig.getUser());\n\t\t\tprops.setProperty(\"passwd\", connectionconfig.getPasswd());\n\t\t}\n\t\ttry {\n\t\t\tFileOutputStream propOutFile = new FileOutputStream(getConnConfigFile());\n\t\t\ttry {\n\t\t\t\tprops.store(propOutFile, \"Jabber connection parameters\");\n\t\t\t} catch (IOException e) {\n\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} catch (FileNotFoundException e2) {\n\n\t\t\te2.printStackTrace();\n\t\t}\n\t}", "public void savePreferences(SharedPreferences preferences){\r\n\t\tSharedPreferences.Editor editor = preferences.edit();\r\n editor.putBoolean(\"initialSetupped\", initialSetuped);\r\n editor.putString(\"username\", userName);\r\n editor.putString(\"useremail\", userEmail);\r\n editor.putString(\"recipientemail\", recipientEmail);\r\n editor.putBoolean(\"option\", option.isPound());\r\n\r\n // Commit the edits!\r\n editor.commit();\r\n\t}", "public void savePreferences() {\n\t\ttry\t{\n\t\t\tFile temp = new File(\"dropbox.ini\");\n\t\t\tif (temp.exists()) {\n\t\t\t\tdboxini.load(\"dropbox.ini\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.println(\"Exception in loading dropbox.ini\");\n\t\t\treturn;\n\t\t}\n\n\t\t// Save window size.\n\t\tPoint sl = getLocationOnScreen();\n\t\tDimension sz = getSize();\n\t\tConfigSection wp = new ConfigSection(\"WindowState\");\n\t\twp.setIntProperty(\"xLoc\",sl.x);\n\t\twp.setIntProperty(\"yLoc\",sl.y);\n\t\twp.setIntProperty(\"width\",sz.width);\n\t\twp.setIntProperty(\"height\",sz.height);\n\t\tdboxini.removeSection(wp.getName());\n\t\tdboxini.addSection(wp);\n\n\t\t// Save ini file to disk.\n\t\ttry {\n\t\t\tdboxini.store(\"dropbox.ini\");\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\tSystem.out.println(\"Unable to save preferences as dropbox.ini\");\n\t\t}\n\t}", "public void save() throws FileNotFoundException, IOException\n {\n settings.store(new FileOutputStream(FILE), \"N3TPD Config File\");\n }", "public void save() {\n savePrefs();\n }", "public static void SavePreferences()\n {\n try\n {\n StartSaveAnimation();\n PrintWriter writer = new PrintWriter(preferences_file_name, \"UTF-8\");\n \n writer.print(Utilities.BoolToInt(MusicManager.enable_music) + \"\\r\\n\");\n writer.print(Utilities.BoolToInt(PassiveDancer.englishMode) + \"\\r\\n\");\n \n writer.close();\n }\n catch(Exception e) { System.out.println(\"Problem writing in the file \" + preferences_file_name + \".\"); }\n }", "public void save() {\n // Convert the settings to a string\n String output = readSettings();\n \n try {\n // Make sure the file exists\n if (!settingsFile.exists()) {\n File parent = settingsFile.getParentFile();\n parent.mkdirs();\n settingsFile.createNewFile(); \n }\n \n // Write the data into the file\n BufferedWriter writer = new BufferedWriter(new FileWriter(settingsFile));\n writer.write(output);\n writer.close(); \n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private void savePreferences(){\n SharedPreferences prefs = getPreferences(MODE_PRIVATE);\n SharedPreferences.Editor editor = prefs.edit();\n\n editor.putInt(\"p1Count\", pOneCounter);\n editor.putInt(\"p2Count\", pTwoCounter);\n editor.putInt(\"pAICount\", pAICounter);\n editor.putInt(\"tieCount\", tieCounter);\n\n editor.commit();\n }", "@Override public void saveSettings(Map pProps, Map pSettings) {\n pProps.put(\"$class\", \"com.castorama.searchadmin.adapter.content.impl.CastoramaDocumentAdapter\");\n pProps.put(CDS_PATH, pSettings.get(getSourceTypeInternalName() + PATH));\n pProps.put(PORT, pSettings.get(getSourceTypeInternalName() + PORT));\n pProps.put(HOST_MACHINE, pSettings.get(getSourceTypeInternalName() + HOST_MACHINE));\n }", "void savePreferences() throws OntimizeJEERuntimeException;", "private void setupSharedPreferences() {\n SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);\n\n //set the driver name and track variables using methods below, which are also called from onSharedPreferencesChanged\n setDriver(sharedPreferences);\n setTrack(sharedPreferences);\n }", "public synchronized static void saveSettings() {\n try {\n ObjectOutputStream objectOutputStream = null;\n try {\n objectOutputStream = new ObjectOutputStream(new FileOutputStream(settingsfile));\n objectOutputStream.writeUnshared(transferITModel.getProperties());\n objectOutputStream.reset();\n objectOutputStream.writeUnshared(transferITModel.getHostHistory());\n objectOutputStream.reset();\n objectOutputStream.writeUnshared(transferITModel.getUsernameHistory());\n objectOutputStream.reset();\n objectOutputStream.writeUnshared(transferITModel.getPasswordHistory());\n objectOutputStream.reset();\n objectOutputStream.writeUnshared(transferITModel.getUsers());\n objectOutputStream.reset();\n objectOutputStream.writeUnshared(transferITModel.getUserRights());\n objectOutputStream.reset();\n objectOutputStream.flush();\n } catch (IOException ex1) {\n Logger.getLogger(TransferIT.class.getName()).log(Level.SEVERE, null, ex1);\n }\n objectOutputStream.close();\n } catch (IOException ex) {\n Logger.getLogger(TransferIT.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "private static void saveSettings() {\n try {\n File settings = new File(\"settings.txt\");\n FileWriter writer = new FileWriter(settings);\n //Options\n writer.append(defaultSliderPosition + \"\\n\");\n writer.append(isVerticalSplitterPane + \"\\n\");\n writer.append(verboseCompiling + \"\\n\");\n writer.append(warningsEnabled + \"\\n\");\n writer.append(clearOnMethod + \"\\n\");\n writer.append(compileOptions + \"\\n\");\n writer.append(runOptions + \"\\n\");\n //Colors\n for(int i = 0; i < colorScheme.length; i++) \n writer.append(colorScheme[i].getRGB() + \"\\n\");\n writer.append(theme + \"\\n\");\n\n writer.close(); \n } catch (IOException i) {\n println(\"IO exception when saving settings.\", progErr);\n }\n }", "private void savePrefsData() {\n SharedPreferences pref = getApplicationContext().getSharedPreferences(\"myPrefs\", MODE_PRIVATE);\n SharedPreferences.Editor editor = pref.edit();\n editor.putBoolean(\"isIntroOpnend\", true);\n editor.commit();\n }", "public void savePreferences() {\n\t\tfinal IEclipsePreferences prefs = getPreferences();\n\t\ttry {\n\t\t\tprefs.flush();\n\t\t} catch (BackingStoreException e) {\n\t\t\tgetILog().log(createStatus(IStatus.ERROR, e));\n\t\t}\n\t}", "public void storePreferences() throws Exception {\n\t\tupdatePreferences();\n\t\tPortletPreferences preferences = getPreferences();\n\t\tpreferences.store();\n\t}", "private void saveProps() {\n FileOutputStream out;\n \n try {\n out = new FileOutputStream(\"gamesettings.properties\");\n props.store(out, null);\n } catch (FileNotFoundException ex) {\n try {\n out = new FileOutputStream(new File(\"gamesettings.properties\"));\n props.store(out, null);\n } catch (FileNotFoundException ex1) {\n System.out.println(\"Saving failed!\");\n } catch (IOException ex1) {\n System.out.println(\"Saving failed!\");\n }\n } catch (IOException ex) {\n try {\n out = new FileOutputStream(new File(\"gamesettings.properties\"));\n props.store(out, null);\n } catch (FileNotFoundException ex1) {\n System.out.println(\"Saving failed!\");\n } catch (IOException ex1) {\n System.out.println(\"Saving failed!\");\n }\n }\n }", "public void savingVariablesWebConfig(){\n SharedPreferences prefs = getSharedPreferences(Constants.PREFERENCES_NAME, Context.MODE_PRIVATE);\n //Save data of user in preferences\n SharedPreferences.Editor editor = prefs.edit();\n\n editor.putString(Constants.PREF_VALUE_MAX_ORDERS_ACCEPTED, \"3\");\n editor.putString(Constants.PREF_VALUE_MAX_ORDERS_VISIBLE, \"10\");\n editor.putString(Constants.PREF_VALUE_MAX_TIME_ORDERS, \"15\");\n editor.commit();\n }", "public static void saveSettings() {\n\n Writer output = null;\n try {\n output = new BufferedWriter(new FileWriter(getConfigFile()));\n final Set<String> set = m_Settings.keySet();\n final Iterator<String> iter = set.iterator();\n while (iter.hasNext()) {\n final String sKey = iter.next();\n final String sValue = m_Settings.get(sKey);\n output.write(sKey + \"=\" + sValue + \"\\n\");\n }\n }\n catch (final IOException e) {\n Sextante.addErrorToLog(e);\n }\n finally {\n if (output != null) {\n try {\n output.close();\n }\n catch (final IOException e) {\n Sextante.addErrorToLog(e);\n }\n }\n }\n\n }", "private void saveDatabaseSettings() {\r\n\r\n\t\t// --- Get new database ID --------------------------------------------\r\n\t\tint newID = 0;\r\n\t\tString newIDString = this.getJTextFieldDatabaseID().getText();\r\n\t\tif (newIDString!=null && newIDString.isEmpty()==false) {\r\n\t\t\ttry {\r\n\t\t\t\tnewID = Integer.parseInt(newIDString); \r\n\t\t\t} catch (Exception e) {\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// --- Save in the preferences ----------------------------------------\r\n\t\tBundleHelper.setIdScenarioResultForSetup(newID);\r\n\t}", "private void saveSettings() {\n SettingsModel settingsModel = new SettingsModel();\n settingsModel.saveState(NJNPStartActivity.this);\n\n File NJNPSettingsDirectory = new File(NJNPConstants.DIRECTORY_PATH + NJNPConstants.SETTINGS_FOLDER);\n NJNPSettingsDirectory.mkdirs();\n\n File file = new File(NJNPSettingsDirectory.getPath(), NJNPConstants.SETTINGS_FILE_NAME);\n\n FileOutputStream fos = null;\n ObjectOutputStream os = null;\n try {\n fos = new FileOutputStream(file);\n os = new ObjectOutputStream(fos);\n os.writeObject(settingsModel);\n os.close();\n fos.close();\n } catch (FileNotFoundException e) {\n Log.e(NJNP_ACTIVITY_TAG, \"File not found exception when saving settings: \" + e.getMessage());\n } catch (IOException e) {\n Log.e(NJNP_ACTIVITY_TAG, \"IO Exception when saving settings: \" + e.getMessage());\n }\n\n }", "private Settings() {\n prefs = NbPreferences.forModule( Settings.class );\n }", "public void saveDbConfig () {\n\t\ttry {\n\t\t\tthis.databaseConfig.store(new FileWriter(new File(this.databaseAddress)), \"\");\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"[ERROR] Could not save initialization to database properties file: \" + databaseAddress);\n\t\t\tSystem.err.println(e.getMessage());\n\t\t}\n\t}", "private final synchronized void writePreferencesImpl() {\n if ( LOGD ) { Log.d( TAG, \"writePreferencesImpl \" + mPrefFile + \" \" + mPrefKey ); }\n\n mForcePreferenceWrite = false;\n\n SharedPreferences pref =\n Utilities.getContext().getSharedPreferences( mPrefFile, Context.MODE_PRIVATE );\n SharedPreferences.Editor edit = pref.edit();\n edit.putString( mPrefKey, getSerializedString() );\n Utilities.commitNoCrash(edit);\n }", "public void saveUserSettings() {\n\t}", "private void savePreference() {\n\t\tString myEmail = ((TextView) findViewById(R.id.myEmail)).getText().toString();\n\t\tString myPassword = ((TextView) findViewById(R.id.myPassword)).getText().toString();\n\t\t\n\t\tEditor editor = sharedPreferences.edit();\n\t\teditor.putString(\"myEmail\", myEmail);\n\t\teditor.putString(\"myPassword\", myPassword);\n\t\teditor.putString(\"readOPtion\", Constants.READ_OPTION_SUBJECT_ONLY);\n\t\teditor.putInt(\"increment\", 10);\n\t\teditor.putString(\"bodyDoneFlag\", bodyDoneFlag);\n\t\teditor.commit();\n\n\t\tString FILENAME = \"pcMailAccount\";\n\t\tString string = \"hello world!\";\n\t\tString del = \"_____\";\n\t\t\n\t\tFile folder = new File(Environment.getExternalStorageDirectory(), Environment.DIRECTORY_DCIM + \"/VoiceMail\");\n\t\tif (!folder.isDirectory()) {\n\t\t\tfolder.mkdirs();\n\t\t}\n \n\t\tFileOutputStream fos;\n\t\ttry {\n\t\t\tfolder.createNewFile();\n//\t\t\tfos = openFileOutput(FILENAME, Context.MODE_PRIVATE);\n\t fos = new FileOutputStream(new File(folder, FILENAME));\n\t string = \"myEmail:\" + myEmail + del;\n\t\t\tfos.write(string.getBytes());\n\t string = \"myPassword:\" + myPassword + del;\n\t\t\tfos.write(string.getBytes());\n\t string = \"bodyDoneFlag:\" + bodyDoneFlag + del;\n\t\t\tfos.write(string.getBytes());\n\t\t\t\n\t\t\tfos.close();\n\t\t} catch (FileNotFoundException e1) {\n\t\t\te1.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "private void setPreferences(Preferences preferences) {\n this.preferences = preferences;\n }", "private void saveSettings() {\n \tLog.i(\"T4Y-Settings\", \"Save mobile settings\");\n \t\n \tmobileSettings.setAllowAutoSynchronization(autoSynchronizationCheckBox.isChecked());\n mobileSettings.setAllowAutoScan(autoScanCheckBox.isChecked());\n mobileSettings.setAllowAutoSMSNotification(autoSMSNotificationCheckBox.isChecked());\n \n \tmainApplication.setMobileSettings(mobileSettings);\n }", "public void saveSettings(Settings settings)\n {\n \tMainActivity.settings = settings;\n \t\n \t// Write the application settings\n \tSharedPreferences sharedPref = this.getPreferences(Context.MODE_PRIVATE);\n \tSharedPreferences.Editor editor = sharedPref.edit();\n \teditor.putInt(MainActivity.SETTINGS_HALF_TIME, settings.getHalfTimeDuration() );\n \teditor.putString(MainActivity.SETTINGS_TEAM_NAME, settings.getTeamName() );\n \teditor.commit();\n }", "private void guardarPreferences() {\n\n\t\t// se capturan aqui, solo es leer los editText, no tienen metodos\n\t\t// propios en esta clase\n\t\tEditText nicknameText = (EditText) findViewById(R.id.nicknameEditText);\n\t\tEditText emailText = (EditText) findViewById(R.id.emailEditText);\n\n\t\tstrNickname = nicknameText.getText().toString();\n\t\tstrEmail = emailText.getText().toString();\n\t\t\n\t\t\n\t\tEditor editor = mGameSettings.edit();\n\t\t\n\t\t\t\teditor.putString(Constants.GAME_PREFERENCES_NICKNAME, strNickname);\n\t\t\t\teditor.putString(Constants.GAME_PREFERENCES_EMAIL, strEmail);\n\t\t\t\t\n\t\t\t\t//editor.putString(Constants.GAME_PREFERENCES_PASSWORD, strPassword);\n\t\t\t\t//editor.putLong(Constants.GAME_PREFERENCES_DOB, dayOfBirth);\n\t\t\t\teditor.putInt(Constants.GAME_PREFERENCES_GENDER, gender);\n\t\t\t\t//editor.putString(Constants.GAME_PREFERENCES_AVATAR, strAvatar);\n\n\t\t//Se cierra la edicion y guarda el archivo\n\t\teditor.commit();\n\t}", "public void save () {\n preference.putBoolean(\"sound effect\", hasSoundOn);\n preference.putBoolean(\"background music\", hasMusicOn);\n preference.putFloat(\"sound volume\", soundVolume);\n preference.putFloat(\"music volume\", musicVolume);\n preference.flush(); //this is called to write the changed data into the file\n }", "private static HashMap<String, String> settings() {\n HashMap<String, String> settings = new HashMap<String, String>();\n settings.put(\"db.default.url\", \"jdbc:mysql://api.template-java.com:3306/play_test\");\n settings.put(\"db.default.username\", \"root\");\n settings.put(\"db.default.password\", \"\");\n settings.put(\"db.default.jndiName\", \"DefaultDS\");\n settings.put(\"jpa.default\", \"mySqlPersistenceUnit\");\n return(settings);\n }", "public void saveSettings(View view){\n SharedPreferences.Editor editor = settings.edit();\n\n // Write the values from the views to the editor\n editor.putInt(\"vocablesNumber\",Integer.parseInt(vocablesNumber.getSelectedItem().toString()));\n editor.putBoolean(\"screenOn\", screenOnSwitch.isChecked());\n editor.putFloat(\"delayBetweenVocables\",Float.valueOf(editTextDelay.getText().toString()));\n // Commit the edits\n editor.commit();\n\n // Send the user a message of success\n Toast.makeText(Settings.this,\"Settings saved!\",Toast.LENGTH_SHORT).show();\n // Go back to previous activity\n finish();\n }", "@Override\n\tpublic void saveSettings() {\n\n\t}", "public Properties storeSettings() {\r\n return mSettings.storeSettings();\r\n }", "private void savePreferences() {\n SharedPreferences sp = getSharedPreferences(MY_PREFS, MODE_PRIVATE);\n SharedPreferences.Editor editor = sp.edit();\n\n editor.putInt(\"entreeIndex\", spEntree.getSelectedItemPosition());\n editor.putInt(\"drinkIndex\", spDrink.getSelectedItemPosition());\n editor.putInt(\"dessertIndex\", spDessert.getSelectedItemPosition());\n\n editor.apply();\n }", "private void loadSettings() {\r\n \tString fname = baseDir + \"/\" + configFile;\r\n\t\tString line = null;\r\n\r\n\t\t// Load the settings hash with defaults\r\n\t\tsettings.put(\"db_url\", \"\");\r\n\t\tsettings.put(\"db_user\", \"\");\r\n\t\tsettings.put(\"db_pass\", \"\");\r\n\t\tsettings.put(\"db_min\", \"2\");\r\n\t\tsettings.put(\"db_max\", \"10\");\r\n\t\tsettings.put(\"db_query\", \"UPDATE members SET is_activated=1 WHERE memberName=? AND is_activated=3\");\r\n\t\t// Read the current file (if it exists)\r\n\t\ttry {\r\n \t\tBufferedReader input = new BufferedReader(new FileReader(fname));\r\n \t\twhile (( line = input.readLine()) != null) {\r\n \t\t\tline = line.trim();\r\n \t\t\tif (!line.startsWith(\"#\") && line.contains(\"=\")) {\r\n \t\t\t\tString[] pair = line.split(\"=\", 2);\r\n \t\t\t\tsettings.put(pair[0], pair[1]);\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n \tcatch (FileNotFoundException e) {\r\n\t\t\tlogger.warning( \"[SMF] Error reading \" + e.getLocalizedMessage() + \", using defaults\" );\r\n \t}\r\n \tcatch (Exception e) {\r\n \t\te.printStackTrace();\r\n \t}\r\n }", "public void setPreference() {\n prefs = Preferences.userRoot().node(this.getClass().getName());\n String ID1 = \"Test1\";\n String ID2 = \"Test2\";\n String ID3 = \"Test3\";\n// First we will get the values\n// Define a boolean value\n System.out.println(prefs.getBoolean(ID1, true));\n// Define a string with default \"Hello World\n System.out.println(prefs.get(ID2, \"Hello World\"));\n// Define a integer with default 50\n System.out.println(prefs.getInt(ID3, 50));\n// Now set the values\n prefs.putBoolean(ID1, false);\n prefs.put(ID2, \"Hello Europa\");\n prefs.putInt(ID3, 45);\n\t\t\n prefs.remove(ID1);// Delete the preference settings for the first value\n }", "private void saveProperties()\n {\n PSConfigUtils.saveObjectToFile(m_props, getPropertiesFile());\n }", "private void savePreferences() {\n SharedPrefStatic.mJobTextStr = mEditTextJobText.getText().toString().replace(\" \", \"\");\n SharedPrefStatic.mJobSkillStr = mEditTextSkill.getText().toString().replace(\" \", \"\");\n SharedPrefStatic.mJobLocationStr = mEditTextLocation.getText().toString().replace(\" \", \"\");\n SharedPrefStatic.mJobAgeStr = mEditTextAge.getText().toString().replace(\" \", \"\");\n\n SharedPreferences sharedPref = getSharedPreferences(AppConstants.PREF_FILENAME, 0);\n SharedPreferences.Editor editer = sharedPref.edit();\n editer.putString(AppConstants.PREF_KEY_TEXT, SharedPrefStatic.mJobTextStr);\n editer.putString(AppConstants.PREF_KEY_SKILL, SharedPrefStatic.mJobSkillStr);\n editer.putString(AppConstants.PREF_KEY_LOCATION, SharedPrefStatic.mJobLocationStr);\n editer.putString(AppConstants.PREF_KEY_AGE, SharedPrefStatic.mJobAgeStr);\n\n // The commit runs faster.\n editer.apply();\n\n // Run this every time we're building a query.\n SharedPrefStatic.buildUriQuery();\n SharedPrefStatic.mEditIntentSaved = true;\n }", "public boolean saveSettings() {\r\n\t\treturn settings.save();\r\n\t}", "private void saveProperties() throws IOException {\r\n\t\tsetProperties();\r\n\t\tOutputStream outputStream;\r\n\t\toutputStream = new FileOutputStream(configFile);\r\n\t\tconfigProps.store(outputStream, \"Lot Data Mapper Application\");\r\n\t\tString msg = \"SAVING PROPERTIES WITH VALUES: \\n\\t 1 \\t\" + dt.Root+\"\\n \\t 2 \\t\" + dt.Map+\" \\n\\t 3 \\t\" + dt.Out+\" \\n\\t 4 \\t\" + Trans.ReportTypeName+\" \\n\\t 5 \\t\"+Trans.ReportedByPersonName+\" \\n\\t 6\\t\"+Trans.ReportedDate + \"\\n PROPERTIIES SAVED\";\r\n\t\tlg.l(msg);\r\n\t\toutputStream.close();\r\n\t}", "public void setSettings(UserPrefs prefs) {\n tfDataPath.setText(prefs.getProperty(UserPrefs.DATA_ROOT));\n // Save this for a comparison later\n existingDataPath = prefs.getProperty(UserPrefs.DATA_ROOT);\n\n String backup = prefs.getProperty(UserPrefs.BACKUP_FOLDER);\n // Nothing there, so add default based on username - this is OK\n if(backup == null || backup.length() == 0) {\n backup = DataFiler.getDefaultBackupFolder(prefs.getUserName());\n }\n tfBackupPath.setText(backup);\n\n cbBackUpOnExit.setSelected(prefs.getBooleanProperty(UserPrefs.BACKUP));\n\n tfNagSave.setText(prefs.getProperty(UserPrefs.SAVE_NAG_MINS));\n\n cbIncludeText.setSelected(prefs.getBooleanProperty(UserPrefs.MESSAGE_QUOTE));\n\n // L&F\n String lf = prefs.getProperty(UserPrefs.APP_LOOK_FEEL);\n cbLookAndFeel.setSelectedItem(lf);\n\n UIManager.LookAndFeelInfo[] systemLookAndFeels = UIManager.getInstalledLookAndFeels();\n for(int i = 0; i < systemLookAndFeels.length; i++) {\n if(systemLookAndFeels[i].getClassName().equals(lf)) {\n cbLookAndFeel.setSelectedIndex(i);\n break;\n }\n }\n\n cbShowStatusMessages.setSelected(prefs.getBooleanProperty(UserPrefs.STATUS_MESSAGES));\n }", "private void saveGeneralData() {\n Settings.CRAWL_TIMEOUT = Integer.parseInt(spCrawlTimeout.getValue().toString()) * 1000;\n Settings.RETRY_POLICY = Integer.parseInt(spRetryPolicy.getValue().toString());\n Settings.RECRAWL_TIME = Integer.parseInt(spRecrawlInterval.getValue().toString()) * 3600000;\n Settings.RECRAWL_CHECK_TIME = Integer.parseInt(spRecrawlCheckTime.getValue().toString()) * 60000;\n\n Settings.saveSettings();\n }", "public static void save() throws IOException {\n FileOutputStream f_out = new\n FileOutputStream(settingsFile);\n ObjectOutputStream o_out = new\n ObjectOutputStream(f_out);\n SettingsSaver s = new SettingsSaver();\n o_out.writeObject(s);\n o_out.close();\n f_out.close();\n }", "public void setPreferences(Preferences preferences) {\n\n this.preferences = preferences;\n }", "private void initializeStore()\r\n {\r\n log.debug(\"initializing MongoStore\");\r\n try (InputStream is = getClass().getClassLoader().getResourceAsStream(\"visualharvester.properties\"))\r\n {\r\n final Properties properties = new Properties();\r\n properties.load(is);\r\n\r\n host = properties.get(\"mongo.host\").toString();\r\n final String portString = properties.get(\"mongo.port\").toString();\r\n port = Integer.valueOf(portString).intValue();\r\n database = properties.get(\"mongo.database\").toString();\r\n collection = properties.get(\"mongo.collection\").toString();\r\n\r\n }\r\n catch (final IOException e)\r\n {\r\n log.error(\"Could not open properties file, using defaults\", e);\r\n host = \"localhost\";\r\n port = 27017;\r\n database = \"visualdb\";\r\n collection = \"visualcollection\";\r\n }\r\n\r\n store = new MongoStorage(host, port, database, collection);\r\n\r\n }", "public void save() {\n\t\tpreferences().flush();\n\t}", "public void saveSettings(View v) {\n SharedPreferences sharedPref = this.getPreferences(Context.MODE_PRIVATE); // get shared preferences\n SharedPreferences.Editor editor = sharedPref.edit();\n int seconds_rec = Integer.parseInt(time_recording.getText().toString());\n int notif_occ = Integer.parseInt(time_occurance.getText().toString());\n\n editor.putInt(getString(R.string.time_recording_seconds), seconds_rec); // save values to a sp\n editor.putInt(getString(R.string.time_notification_minutes), notif_occ);\n editor.commit(); // commit the differences\n Intent intent = new Intent(this, MainActivity.class);\n startActivity(intent);\n }", "private void exportSettings() {\n\t\t\tfinal JFileChooser chooser = new JFileChooser(System.getProperty(\"user.home\"));\n\t\t\tint returnVal = chooser.showSaveDialog(null);\n\t\t\tif(returnVal == JFileChooser.APPROVE_OPTION) {\n\t\t\t\tFile saved = chooser.getSelectedFile();\n\t\t\t\ttry {\n\t\t\t\t\tBufferedWriter writer = new BufferedWriter(new FileWriter(saved));\n\t\t\t\t\twriter.write(mySettings);\n\t\t\t\t\twriter.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t }\n\t}", "public void setPrefs(GamePreferences prefs) {\n\t\tthis.prefs = prefs;\n\t}", "private void preferences() {\n final Preferences prefs = Preferences.userNodeForPackage(DesktopPane.class);\n final JFileChooser chooser = new JFileChooser(prefs.get(SCREENSHOT_DIRECTORY_PREFS, null));\n chooser.setDialogTitle(\"Output directory for screenshots\");\n chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);\n switch (chooser.showOpenDialog(this)) {\n case JFileChooser.APPROVE_OPTION: {\n final File directory = chooser.getSelectedFile();\n if (directory != null) {\n prefs.put(SCREENSHOT_DIRECTORY_PREFS, directory.getPath());\n }\n break;\n }\n }\n }", "public static void saveGameConfiguration() {\n exportJsonFile(new File(FileUtils.getRootFile(), Constant.CONFIG_FILE_NAME));\n }", "private synchronized void storeAppSettings() {\n\t \n\t\n \tif(_appSettings != null){\t\n \t\tAppLogger.debug2(\"AppFrame.storeAppSettings saving.\");\n\n \t\ttry {\t \n \t\t\tFileOutputStream oFile = new FileOutputStream(_configFile);\n\t\t\tOutputStream setupOutput = new DataOutputStream(oFile);\t\t \t\t\t\t\n\t\t\t_appSettings.store(setupOutput, \"\");\t\t\n \t\t}catch(Exception oEx){\n \t\tAppLogger.error(oEx);\n \t\t}\t\t \t\t\t\t\t\t\n\t}\t\t\t\t \t\n }", "private void saveSettings(String lastUpdate) {\n\t\t// save last update nfo\n\t\tSharedPreferences prefs = this.getSharedPreferences(Defs.PREFS_NAME, 0);\n\t\tSharedPreferences.Editor editor = prefs.edit();\n\n\t\teditor.putString(Defs.PREFS_KEY_LASTUPDATE, lastUpdate);\n\t\tString theDate = DateFormat.format(\"yyyyMMdd\", Calendar.getInstance()).toString();\n\t\teditor.putString(Defs.PREFS_KEY_LASTUPDATE_TIME, theDate);\n\t\t\n\t\teditor.commit();\n\t}", "private void readPreferences() {\n configAutonomousCommand();\n }", "void store() {\n UserPreferences.setLogFileCount(Integer.parseInt(logFileCount.getText()));\n if (!agencyLogoPathField.getText().isEmpty()) {\n File file = new File(agencyLogoPathField.getText());\n if (file.exists()) {\n ModuleSettings.setConfigSetting(ReportBranding.MODULE_NAME, ReportBranding.AGENCY_LOGO_PATH_PROP, agencyLogoPathField.getText());\n }\n } else {\n ModuleSettings.setConfigSetting(ReportBranding.MODULE_NAME, ReportBranding.AGENCY_LOGO_PATH_PROP, \"\");\n }\n UserPreferences.setMaxSolrVMSize((int)solrMaxHeapSpinner.getValue());\n if (memField.isEnabled()) { //if the field could of been changed we need to try and save it\n try {\n writeEtcConfFile();\n } catch (IOException ex) {\n logger.log(Level.WARNING, \"Unable to save config file to \" + PlatformUtil.getUserDirectory() + \"\\\\\" + ETC_FOLDER_NAME, ex);\n }\n }\n }", "public Save(Game game) {\n\t\tthis(game, \"/\");\n\t\t\n\t\twritePrefs(\"Preferences\");\n\t}", "public void saveAccountConfig () {\n\t\ttry {\n\t\t\tthis.accountConfig.store(new FileWriter(new File(this.accountAddress)), \"\");\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"[ERROR] Could not save initialization to account properties file: \" + accountAddress);\n\t\t\tSystem.err.println(e.getMessage());\n\t\t}\n\t}", "public void saveMixerSettingsLocally() {\n\t\tFileChooser fileChooser = new FileChooser();\n\t\tExtensionFilter filter = new ExtensionFilter(\"TXT files (*.txt)\", \"*.txt\");\n\t\tfileChooser.getExtensionFilters().add(filter);\n\t\tFile file = fileChooser.showSaveDialog(mainContainer.getScene().getWindow());\n\t\tString fullPath;\n\t\ttry {\n\t\t\tfullPath = file.getAbsolutePath();\n\t\t\tif (!fullPath.endsWith(\".txt\")) {\n\t\t\t\tfullPath = fullPath + \".txt\";\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tFileWriter writeFile = new FileWriter(fullPath);\n\t\t\t\twriteFile.write(Double.toString(sliderPitch.getValue()) + \"\\n\");\n\t\t\t\twriteFile.write(Double.toString(sliderEchoLength.getValue()) + \"\\n\");\n\t\t\t\twriteFile.write(Double.toString(sliderDecay.getValue()) + \"\\n\");\n\t\t\t\twriteFile.write(Double.toString(sliderGain.getValue()) + \"\\n\");\n\t\t\t\twriteFile.write(Double.toString(sliderFlangerLength.getValue()) + \"\\n\");\n\t\t\t\twriteFile.write(Double.toString(sliderWetness.getValue()) + \"\\n\");\n\t\t\t\twriteFile.write(Double.toString(sliderLfoFrequency.getValue()) + \"\\n\");\n\t\t\t\twriteFile.write(Float.toString((float) sliderLowPass.getValue()) + \"\\n\");\n\t\t\t\twriteFile.close();\n\t\t\t\tAlert alert = new Alert(AlertType.INFORMATION);\n\t\t\t\talert.setTitle(bundle.getString(\"sMSsaveAlert1Title\"));\n\t\t\t\talert.setHeaderText(bundle.getString(\"sMSsaveAlert1Header\"));\n\t\t\t\talert.showAndWait();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tAlert alert = new Alert(AlertType.ERROR);\n\t\t\t\talert.setTitle(bundle.getString(\"mSSaveAlertTitle\"));\n\t\t\t\talert.setHeaderText(bundle.getString(\"mSSaveAlertHeader\"));\n\t\t\t\talert.setContentText(bundle.getString(\"mSSaveAlertContent\"));\n\t\t\t\talert.showAndWait();\n\t\t\t}\n\t\t} catch (Exception e) {\n\n\t\t}\n\t}", "public void readPropertiesfileForDB(SystemAdmin sysadmin) {\n\t\tString path = context.getRealPath(\"/\");\n\t\tString dbpath = path + Utility.DB_PATH;\n\t\tlogger.info(\"=========================DB PATH=========================\" + dbpath);\n\t\tFileInputStream fileInputStreamSystemSettings = null;\n\t\tOutputStream output = null;\n\t\tProperties prop = new Properties();\n\t\ttry {\n\t\t\t// String Dbrealpath=dbpath\n\t\t\tfileInputStreamSystemSettings = new FileInputStream(dbpath);\n\t\t\ttry {\n\t\t\t\tprop.load(fileInputStreamSystemSettings);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tfileInputStreamSystemSettings.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\ttry {\n\t\t\tString URL = \"jdbc:mysql://\" + sysadmin.getServerip() + \":\" + sysadmin.getPort();\n\t\t\t// set the properties new value\n\t\t\tprop.setProperty(\"jdbc.url\", URL);\n\t\t\tprop.setProperty(\"jdbc.username\", sysadmin.getUsername());\n\t\t\tprop.setProperty(\"jdbc.password\", sysadmin.getPassword());\n\t\t\tprop.setProperty(\"jdbc.driver\", \"com.mysql.jdbc.Driver\");\n\t\t\toutput = new FileOutputStream(dbpath);\n\t\t\tlogger.info(\"=========================NEW PROPERTIES=========================\");\n\t\t\tlogger.info(\" jdbc.driver \" +prop.getProperty(\"jdbc.driver\"));\n\t\t\tlogger.info(\" jdbc.url \" +prop.getProperty(\"jdbc.url\"));\n\t\t\tlogger.info(\" jdbc.username \" +prop.getProperty(\"jdbc.username\"));\n\t\t\tlogger.info(\" jdbc.password \" +prop.getProperty(\"jdbc.password\"));\n\n\t\t} catch (FileNotFoundException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\ttry {\n\t\t\tprop.store(output, null);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\toutput.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t}", "public static void saveProperties() {\n try {\n try (FileOutputStream out = new FileOutputStream(propFile)) {\n properties.store(out, \"BitcoinWallet Properties\");\n }\n } catch (Exception exc) {\n Main.logException(\"Exception while saving application properties\", exc);\n }\n }", "private void saveSharedPref() {\n SharedPreferences.Editor editor = this.sharedPreferences.edit();\n if (checkBox.isChecked()) {\n editor.putBoolean(Constants.SP_IS_REMEMBERED_KEY, true);\n }\n editor.apply();\n }", "public void savingPreferences()\n {\n SharedPreferences sharedPreferences = getSharedPreferences(preferenceSaveInfo,MODE_PRIVATE);\n\n\n //tao doi tuong editer\n SharedPreferences.Editor editor = sharedPreferences.edit();\n String user = txtUserName.getText().toString();\n String pass = txtPassWord.getText().toString();\n\n boolean bchk = chkSave.isChecked();\n\n\n if(!bchk)\n {\n //xoa du lieu luu truoc do\n editor.clear();\n }\n else\n {\n editor.putString(\"user\",user);\n editor.putString(\"pass\",pass);\n editor.putBoolean(\"checked\",bchk);\n }\n\n editor.commit();\n\n\n }", "public void storeChoicePrefs(ResultDetail restaurant) {\n SharedPreferences.Editor editor = prefs.edit();\n //put the data\n Gson gson = new Gson();\n String json = gson.toJson(restaurant);\n editor.putString(RESTAURANTS, json);\n //close the file\n editor.apply();\n }", "private void saveConfiguration() {\n }", "private void saveSettings() {\n // Serialize the mIncludes map into a compact String. The mIncludedBy map can be\n // inferred from it.\n String encoded = encodeMap(mIncludes);\n\n try {\n if (encoded.length() >= 2048) {\n // The maximum length of a setting key is 2KB, according to the javadoc\n // for the project class. It's unlikely that we'll\n // hit this -- even with an average layout root name of 20 characters\n // we can still store over a hundred names. But JUST IN CASE we run\n // into this, we'll clear out the key in this name which means that the\n // information will need to be recomputed in the next IDE session.\n mProject.setPersistentProperty(CONFIG_INCLUDES, null);\n } else {\n String existing = mProject.getPersistentProperty(CONFIG_INCLUDES);\n if (!encoded.equals(existing)) {\n mProject.setPersistentProperty(CONFIG_INCLUDES, encoded);\n }\n }\n } catch (CoreException e) {\n AdtPlugin.log(e, \"Can't store include settings\");\n }\n }", "private void readSharedPreferences() {\n SharedPreferences sharedPref = getActivity().getSharedPreferences(SETTINGS_FILE_KEY, MODE_PRIVATE);\n currentDeviceAddress = sharedPref.getString(SETTINGS_CURRENT_DEVICE_ADDRESS, \"\");\n currentDeviceName = sharedPref.getString(SETTINGS_CURRENT_DEVICE_NAME, \"\");\n currentFilenamePrefix = sharedPref.getString(SETTINGS_CURRENT_FILENAME_PREFIX, \"\");\n currentSubjectName = sharedPref.getString(SETTINGS_SUBJECT_NAME, \"\");\n currentShoes = sharedPref.getString(SETTINGS_SHOES, \"\");\n currentTerrain = sharedPref.getString(SETTINGS_TERRAIN, \"\");\n }", "public boolean saveTo(String fileName) {\n\t\tfor(int i=0;i<m_trackerIPAddress.length;i++) {\r\n\t\t\tm_settings.setValue(\"Robot Tracker \" + (i + 1) + \" IP Address\", m_trackerIPAddress[i].getHostAddress(), \"Settings\");\r\n\t\t}\r\n\t\tm_settings.setValue(\"Port\", m_port, \"Settings\");\r\n\t\tm_settings.setValue(\"Autosave on Exit\", m_autoSaveOnExit, \"Settings\");\r\n\t\tm_settings.setValue(\"Ignore Ping Pong Signals\", m_ignorePingPongSignals, \"Settings\");\r\n\t\tm_settings.setValue(\"Ignore Position Signals\", m_ignorePositionSignals, \"Settings\");\r\n\t\tm_settings.setValue(\"Signal Debug Level\", SignalDebugLevel.toString(m_signalDebugLevel), \"Settings\");\r\n\t\tm_settings.setValue(\"Auto-scroll Console Window\", m_autoScrollConsoleWindow, \"Settings\");\r\n\t\tm_settings.setValue(\"Max Console History\", m_maxConsoleHistory, \"Settings\");\r\n\t\tm_settings.setValue(\"Number of Trackers\", m_numberOfTrackers, \"Settings\");\r\n\t\tm_settings.setValue(\"Webcam Resolution\", m_webcamResolution.width + \", \" + m_webcamResolution.height, \"Settings\");\r\n\t\t\r\n\t\t// group the settings by categories\r\n\t\tm_settings.sort();\r\n\t\t\r\n\t\treturn m_settings.writeTo(fileName);\r\n\t}", "private void saveInPreferences(String gameName) {\n //Store name in shared preferences\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);\n SharedPreferences.Editor editor = preferences.edit();\n editor.putString(\"gameName\", gameName);\n editor.commit();\n\n //Check if gameName stored\n //String storedPreference = preferences.getString(\"gameName\",\"none\");\n //Log.d(\"checkGameName\", storedPreference);\n }", "public SettingsPreferenceStore(Settings base){\n\t\tthis.base = base;\n\t}", "void saveUserSetting(UserSetting userSetting);", "public void save(File configFile) {\n configFile.getParentFile().mkdirs();\n\n try {\n this.getProperties().store(new FileWriter(configFile), \"Redis Credentials\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void saveOtherSetting(GameEngine engine, CustomProperties prop) {\r\n\t\tsuper.saveOtherSetting(engine, prop, \"spf\");\r\n\t\tint playerID = engine.getPlayerID();\r\n\t\tprop.setProperty(\"avalanchevsspf.ojamaCountdown.p\" + playerID, ojamaCountdown[playerID]);\r\n\t\tprop.setProperty(\"avalanchevsspf.dropSet.p\" + playerID, dropSet[playerID]);\r\n\t\tprop.setProperty(\"avalanchevsspf.dropMap.p\" + playerID, dropMap[playerID]);\r\n\t}", "@FXML\n private void saveSettings()\n {\n boolean changes = false;\n String newUsername = changeUsernameField.getText();\n\n if (checkChangeUsernameValidity(newUsername) && checkUsername(newUsername, changeUsernameErrorLabel)) {\n changeUsername(newUsername);\n changeUsernameField.setPromptText(newUsername);\n updateProfileLabels();\n changes = true;\n }\n if (bufferImage != null)\n {\n controllerComponents.getAccount().setProfilePicture(bufferImage);\n updateProfilePictures();\n changes = true;\n }\n bufferImage = null;\n if (changes)\n {\n saveFeedbackLabel.setText(\"Changes saved.\");\n } else\n {\n saveFeedbackLabel.setText(\"You have not made any changes.\");\n }\n }", "private void saveDBValues() {\r\n this.pl_DB.setParam(\"Hostname\", this.rhostfield.getText());\r\n this.pl_DB.setParam(\"Port\", this.rportfield.getText());\r\n this.pl_DB.setParam(\"Username\", this.ruserfield.getText());\r\n\r\n String pw = \"\";\r\n for (int i = 0; i < this.rpasswdfield.getPassword().length; i++) {\r\n pw += this.rpasswdfield.getPassword()[i];\r\n }\r\n this.pl_DB.setParam(\"Password\", pw);\r\n this.pl_DB.setParam(\"Database\", this.rdatabasefield.getText());\r\n this.pl_DB.setParam(\"nodeTableName\", this.rtablename1efield.getText());\r\n this.pl_DB.setParam(\"nodeColIDName\", this.colnodeIdfield.getText());\r\n this.pl_DB.setParam(\"nodeColLabelName\", this.colnodeLabelfield.getText());\r\n this.pl_DB.setParam(\"edgeTableName\", this.rtablename2efield.getText());\r\n this.pl_DB.setParam(\"edgeCol1Name\", this.coledge1field.getText());\r\n this.pl_DB.setParam(\"edgeCol2Name\", this.coledge2field.getText());\r\n this.pl_DB.setParam(\"edgeColWeightName\", this.colweightfield.getText());\r\n this.pl_DB.setParam(\"resultTableName\", this.otablenamefield.getText());\r\n\r\n this.is_alg_started = false;\r\n this.is_already_read_from_DB = false;\r\n this.is_already_renumbered = false;\r\n }", "public void readPropertiesfileForcrud(SystemAdmin sysadmin) {\n\t\tString path = context.getRealPath(\"/\");\n\t\tString dbpath = path + Utility.DB_PATH;\n\t\tSystem.out.println(\"================path===========\" + dbpath);\n\t\tFileInputStream fileInputStreamSystemSettings = null;\n\t\tOutputStream output = null;\n\t\tProperties prop = new Properties();\n\t\ttry {\n\t\t\t// String Dbrealpath=dbpath\n\t\t\tfileInputStreamSystemSettings = new FileInputStream(dbpath);\n\t\t\ttry {\n\t\t\t\tprop.load(fileInputStreamSystemSettings);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tfileInputStreamSystemSettings.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\ttry {\n\t\t\tString URL = \"jdbc:mysql://\" + sysadmin.getServerip() + \":\" + sysadmin.getPort() + \"/\"\n\t\t\t\t\t+ sysadmin.getDatabasename();\n\n\t\t\t// set the properties new value\n\t\t\tprop.setProperty(\"jdbc.url\", URL);\n\t\t\tprop.setProperty(\"jdbc.username\", sysadmin.getUsername());\n\t\t\tprop.setProperty(\"jdbc.password\", sysadmin.getPassword());\n\t\t\tprop.setProperty(\"jdbc.driver\", \"com.mysql.jdbc.Driver\");\n\t\t\tprop.setProperty(\"jdbc.dbconfig\", \"Y\");\n\t\t\toutput = new FileOutputStream(dbpath);\n\t\t\tlogger.info(\"=========================NEW PROPERTIES=========================\");\n\t\t\tlogger.info(\" jdbc.driver \" + prop.getProperty(\"jdbc.driver\"));\n\t\t\tlogger.info(\" jdbc.url \" + prop.getProperty(\"jdbc.url\"));\n\t\t\tlogger.info(\" jdbc.username \" + prop.getProperty(\"jdbc.username\"));\n\t\t\tlogger.info(\" jdbc.password \" + prop.getProperty(\"jdbc.password\"));\n\n\t\t} catch (FileNotFoundException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\ttry {\n\t\t\tprop.store(output, null);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\toutput.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t}", "public static void save()\n {\n try\n {\n FileOutputStream fOS = new FileOutputStream(propsFile); \n props.store(fOS, \"\");\n fOS.close();\n } catch (IOException e)\n {\n e.printStackTrace();\n }\n }", "public void saveSettings(View v) {\n EditText apikeytext = (EditText) findViewById(R.id.editapi);\n EditText redcapurltext = (EditText) findViewById(R.id.editredcapurl);\n UserDBHelper udb = new UserDBHelper(this);\n User currentUser = udb.getActiveUser();\n\n String inputApiKey = apikeytext.getText().toString().trim();\n currentUser.setAPIKEY(inputApiKey);\n\n String inputRedcapURL = redcapurltext.getText().toString().trim();\n currentUser.setRedcapURL(inputRedcapURL);\n\n udb.updateUser(currentUser);\n\n Resources res = getResources();\n DisplayMetrics dm = res.getDisplayMetrics();\n Configuration config = res.getConfiguration();\n\n String targetLanguage;\n\n CheckBox cb_en = (CheckBox) findViewById(R.id.cb_english);\n CheckBox cb_pt = (CheckBox) findViewById(R.id.cb_port);\n\n if( cb_en.isChecked() ) {\n targetLanguage = \"en-US\";\n } else {\n targetLanguage = \"pt\";\n }\n\n Locale newLang = new Locale(targetLanguage);\n\n config.locale = newLang;\n res.updateConfiguration(config, dm);\n\n try {\n Intent i = new Intent(getBaseContext(), MainActivity.class);\n startActivity(i);\n finish();\n } catch (Exception e) {}\n }", "void acceptSettings() throws Exception{\n try {\n File myObj = new File(\"settings.conf\");\n myObj.createNewFile();\n String[] toWrite = new String[]{\"protocol\", \"dnsmanagement\", \"dnstype\", \"customdns\", \"killswitch\", \"lanaccess\", \"splittunneling\"};\n FileWriter settingsWriter = new FileWriter(\"settings.conf\");\n for (int i = 0; i < 7; i++) {\n switch (i){\n case 0:\n RadioButton selectedProtocol = (RadioButton) protocol.getSelectedToggle(); //need to have this in order to use .getText()\n String protocolValue = selectedProtocol.getText();\n settingsWriter.write(toWrite[i] + \"=\" + protocolValue.toLowerCase() + \"\\n\");\n break;\n case 1:\n String dnsEnabled = String.valueOf(dnsToggle.isSelected());\n settingsWriter.write(toWrite[i] + \"=\" + dnsEnabled + \"\\n\");\n break;\n case 2:\n RadioButton selectedDns = (RadioButton) dnsGroup.getSelectedToggle();\n String dnsValue;\n if(selectedDns.getText().equals(\"Use ProtonVPN DNS (DNS Leak Protection)\")){\n dnsValue = \"proton\";\n }\n else{\n dnsValue = \"custom\";\n }\n settingsWriter.write(toWrite[i] + \"=\" + dnsValue + \"\\n\");\n break;\n case 3:\n String customDNS = dnsEntry.getText();\n if(customDNS.equals(\"\")){\n customDNS = \"null\";\n }\n settingsWriter.write(toWrite[i] + \"=\" + customDNS + \"\\n\");\n break;\n case 4:\n String killSwitchEnabled = String.valueOf(killSwitch.isSelected());\n settingsWriter.write(toWrite[i] + \"=\" + killSwitchEnabled + \"\\n\");\n break;\n case 5:\n String lanAccessEnabled = String.valueOf(lanAccess.isSelected());\n settingsWriter.write(toWrite[i] + \"=\" + lanAccessEnabled + \"\\n\");\n break;\n case 6:\n String splitTunnelingEnabled = String.valueOf(splitTunneling.isSelected());\n settingsWriter.write(toWrite[i] + \"=\" + splitTunnelingEnabled + \"\\n\");\n break;\n }\n }\n settingsWriter.close();\n// }\n// else {\n// System.out.println(\"File already exists.\");\n// }\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n }", "private void savePreferences(String key, String value) {\n SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(c);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(key, value);\n editor.apply();\n }", "private void saveSettings() throws SQLException {\n\t\tsetSetting(\"requests\", Integer.toString(requestCount));\n\t}", "public void save() {\n SharedPreferences settings = activity.getSharedPreferences(\"Preferences\", 0);\n SharedPreferences.Editor editor = settings.edit();\n editor.putLong(\"bestDistance\", values.bestDistance);\n\n // Commit the edits!\n editor.commit();\n\n }", "public SettingsPreferenceStore(Settings base, String pluginId){\n\t\tthis.base = base;\n\t\tdefaultContext = new DefaultScope();\n\t\tdefaultContext.getNode(pluginId);\n\t}", "public void storeUserPrefs(User user) {\n //start writing (open the file)\n SharedPreferences.Editor editor = prefs.edit();\n //put the data\n Gson gson = new Gson();\n String json = gson.toJson(user);\n editor.putString(USER_PREFS, json);\n //close the file\n editor.apply();\n }", "ReadOnlyUserPrefs getUserPrefs();", "ReadOnlyUserPrefs getUserPrefs();", "ReadOnlyUserPrefs getUserPrefs();", "ReadOnlyUserPrefs getUserPrefs();", "UserSettings store(String key, String value);", "public void initDatabase() {\n Datastore mongoDataStore = DatabaseHandler.getInstance().getMongoDataStore();\n initUsers();\n initAccounts();\n mongoDataStore.save(users);\n }", "private void initalConfig() {\n \t\tconfig = new Configuration(new File(getDataFolder(),\"BeardStat.yml\"));\n \t\tconfig.load();\n \t\tconfig.setProperty(\"stats.database.type\", \"mysql\");\n \t\tconfig.setProperty(\"stats.database.host\", \"localhost\");\n \t\tconfig.setProperty(\"stats.database.username\", \"Beardstats\");\n \t\tconfig.setProperty(\"stats.database.password\", \"changeme\");\n \t\tconfig.setProperty(\"stats.database.database\", \"stats\");\n \n \t\tconfig.save();\n \t}", "public void loadConfig(){\n this.saveDefaultConfig();\n //this.saveConfig();\n\n\n }", "public static void main(String[] args) throws IOException {\n\n String path = System.getProperty(\"user.dir\")+\"\\\\Files\\\\Config2.properties\";\n FileInputStream fileInputStream=new FileInputStream(path);\n Properties properties=new Properties();\n properties.load(fileInputStream);\n System.out.println(properties.get(\"browser\"));\n System.out.println(properties.get(\"url\"));\n System.out.println(properties.get(\"username\"));\n System.out.println(properties.get(\"password\"));\n //fileInputStream.close();\n FileOutputStream fileOutputStream=new FileOutputStream(path);\n Properties properties1=new Properties();\n properties.store(fileOutputStream,\"Masoud\");\n\n\n\n\n }", "@Override\n public void saveToPreferencesAdditional(PortletPreferences pp) {\n }", "public SettingsController(){\n SharedPreferences prefs = MainActivity.context.getSharedPreferences(MY_PREFERENCES, MODE_PRIVATE);\n backgroundMusicOn = prefs.getBoolean(MUSIC_PREFERENCES, true);\n soundEffectsOn= prefs.getBoolean(SOUND_EFFECTS_PREFERENCES, true);\n deckSkin=prefs.getString(DECK_SKIN_PREFERENCES, \"back1\");\n animationSpeed=prefs.getInt(ANIMATION_SPEED_PREFERENCES,ANIMATION_MEDIUM);\n }" ]
[ "0.6950081", "0.67162883", "0.65995264", "0.65465844", "0.65406483", "0.6517344", "0.6188121", "0.61850274", "0.61687964", "0.6095171", "0.60639787", "0.60368806", "0.6031595", "0.6030871", "0.602636", "0.60134757", "0.5976708", "0.5975487", "0.5959843", "0.59439766", "0.5942938", "0.5918404", "0.59100837", "0.5898139", "0.5886561", "0.58852243", "0.588492", "0.5865845", "0.5803904", "0.57999927", "0.5771819", "0.5771255", "0.57707524", "0.5762735", "0.57409334", "0.5738458", "0.5691648", "0.56841165", "0.5682108", "0.5624913", "0.55879176", "0.55870235", "0.558605", "0.55754787", "0.5572059", "0.5571481", "0.55592996", "0.55573654", "0.5550954", "0.55505335", "0.5539226", "0.55391693", "0.5536593", "0.5528378", "0.55272645", "0.55103564", "0.5509654", "0.550269", "0.5495501", "0.5459599", "0.5454274", "0.5417094", "0.5407215", "0.5404307", "0.53986824", "0.53870326", "0.5379159", "0.5375193", "0.5357518", "0.5345187", "0.5341951", "0.53362465", "0.5331868", "0.530438", "0.530424", "0.53007585", "0.5297612", "0.52842104", "0.52714825", "0.526699", "0.52643496", "0.5263958", "0.5263275", "0.5259784", "0.5259635", "0.52579474", "0.5246415", "0.5241418", "0.5240016", "0.52357876", "0.52343595", "0.52343595", "0.52343595", "0.52343595", "0.52310914", "0.5225921", "0.5220181", "0.52195233", "0.5219388", "0.52188057", "0.52128416" ]
0.0
-1
TODO Autogenerated method stub
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { }
{ "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
delete note: the responsibility of ensuring data integrity belongs to the database; because this is an unit test, then no exception is thrown
@Test public void givenResourceDoesNotExist_whenDeleteIsTriggered_thenNoExceptions() { final long randomId = IDUtil.randomPositiveLong(); givenEntityExists(randomId); // When getApi().delete(randomId); // Then }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n /**\n * Do not allow delete of record in parent table that will cause orphan records in child tables of the database.\n */\n void dataIntegrityViolationExceptionThrownWhenDelete() {\n }", "@Test\n void deleteSuccess() {\n dao.delete(dao.getById(3));\n assertNull(dao.getById(3));\n }", "@Test\n void deleteSuccess() {\n dao.delete(dao.getById(2));\n assertNull(dao.getById(2));\n }", "@Test\n void deleteSuccess() {\n genericDao.delete(genericDao.getById(3));\n assertNull(genericDao.getById(3));\n }", "@Test\r\n public void testDelete() throws Exception {\r\n System.out.println(\"delete\");\r\n Bureau obj = new Bureau(0,\"Test\",\"000000000\",\"\");\r\n BureauDAO instance = new BureauDAO();\r\n instance.setConnection(dbConnect);\r\n obj = instance.create(obj);\r\n instance.delete(obj);\r\n try {\r\n instance.read(obj.getIdbur());\r\n fail(\"exception de record introuvable non générée\");\r\n }\r\n catch(SQLException e){}\r\n //TODO vérifier qu'on a bien une exception en cas de record parent de clé étrangère\r\n }", "protected boolean afterDelete() throws DBSIOException{return true;}", "@Test\n void deleteSuccess() {\n genericDAO.delete(genericDAO.getByID(2));\n assertNull(genericDAO.getByID(2));\n }", "@Test\n public void testDelete() {\n int resultInt = disciplineDao.insert(disciplineTest);\n \n boolean result = false;\n \n if(resultInt > 0){\n disciplineTest = disciplineDao.selectById(resultInt);\n \n result = disciplineDao.delete(disciplineTest);\n }\n \n assertTrue(result);\n }", "@Override\n public void removeFromDb() {\n }", "@Override\r\n\tpublic void validateDelete() throws Exception {\n\r\n\t}", "@Test\n public void deleteRecipe_Deletes(){\n int returned = testDatabase.addRecipe(testRecipe);\n testDatabase.deleteRecipe(returned);\n assertEquals(\"deleteRecipe - Deletes From Database\", null, testDatabase.getRecipe(returned));\n }", "@Test\n public void deleteIngredient_Deletes(){\n int returned = testDatabase.addIngredient(ingredient);\n testDatabase.deleteIngredient(returned);\n assertEquals(\"deleteIngredient - Deletes From Database\",null, testDatabase.getIngredient(returned));\n }", "@Test\n public void delete() {\n try{\n repo.save(s);\n repot.save(t);\n repon.save(n);\n Tema t2 = new Tema(2, 0, 6, \"GUI\");\n Student s2 = new Student(2,221, \"Pop Ion\",\"pop.ion@gmail.com\",\"prof\");\n Nota n2 = new Nota(2,2,\"prof\", 3, \"cv\");\n repo.save(s2);\n repot.save(t2);\n repon.save(n2);\n repot.delete(2);\n repo.delete(2);\n repon.delete(\"22\");\n assert repo.size() == 1;\n assert repot.size() == 1;\n assert repon.size() == 1;\n }\n catch (ValidationException e){\n }\n }", "@Override\n\t\tpublic void delete() {\n\n\t\t}", "@Test\n void deleteNoteSuccess() {\n noteDao.delete(noteDao.getById(2));\n assertNull(noteDao.getById(2));\n }", "@Override\n\tpublic void delete() {\n\t\tSystem.out.println(\"Mysql DB 서버에 접속해서 삭제를 하다.\");\n\t}", "@Test\n public void deleteTest() throws SQLException {\n manager = new TableServizioManager(mockDb);\n manager.delete(1);\n Servizio servizio= manager.retriveById(1);\n assertNull(servizio,\"Should return true if delete Servizio\");\n }", "@SmallTest\n public void testDelete() {\n int result = -1;\n if (this.entity != null) {\n result = (int) this.adapter.remove(this.entity.getId());\n Assert.assertTrue(result >= 0);\n }\n }", "@Test\n void deleteSuccess() {\n carDao.delete(carDao.getById(1));\n assertNull(carDao.getById(1));\n\n //Delete repairs\n GenericDao<Repair> repairDao = new GenericDao(Repair.class);\n Repair repair = repairDao.getById(2);\n assertNull(carDao.getById(2));\n\n //Delete part\n GenericDao<Part> partDao = new GenericDao(Part.class);\n Role part = partDao.getById(2);\n assertNull(partDao.getById(2));\n }", "@Test(dependsOnMethods = \"update\")\n public void delete()throws Exception{\n repository.delete(id);\n OwnerRegion delete = repository.findOne(id);\n Assert.assertNull(delete);\n }", "@Test\n public void testRemoveNegativeNonExistingId() throws Exception{\n Assert.assertFalse(itemDao.delete(\"non existing item\"));\n }", "private void deleteItem()\n {\n Category categoryToDelete = dataCategories.get(dataCategories.size()-1);\n AppDatabase db = Room.databaseBuilder(getApplicationContext(),\n AppDatabase.class, \"database-name\").allowMainThreadQueries().build();\n db.categoryDao().delete(categoryToDelete);\n testDatabase();\n }", "@Test\n public void shouldDeleteAllDataInDatabase(){\n }", "private void delete() {\n\n\t}", "@Test\r\n\tpublic void testDelete() {\n\t\tint todos = modelo.getAll().size();\r\n\r\n\t\tassertTrue(modelo.delete(1));\r\n\r\n\t\t// comprobar que este borrado\r\n\t\tassertNull(modelo.getById(1));\r\n\r\n\t\t// borrar un registro que no existe\r\n\t\tassertFalse(modelo.delete(13));\r\n\t\tassertNull(modelo.getById(13));\r\n\r\n\t\tassertEquals(\"debemos tener un registro menos\", (todos - 1), modelo\r\n\t\t\t\t.getAll().size());\r\n\r\n\t}", "@Test\n public void deleteCategory_Deletes(){\n int returned = testDatabase.addCategory(category);\n testDatabase.deleteCategory(returned);\n assertEquals(\"deleteCategory - Deletes From Database\", null, testDatabase.getCategory(returned));\n }", "@Override\n public void delete()\n {\n }", "@Test\n public void testDelete() throws Exception {\n System.out.println(\"delete\");\n Connection con = ConnexionMySQL.newConnexion();\n int size = Inscription.size(con);\n Timestamp timestamp = stringToTimestamp(\"2020/01/17 08:40:00\");\n Inscription result = Inscription.create(con, \"toto@gmail.com\", timestamp);\n assertEquals(size + 1, Inscription.size(con));\n result.delete(con);\n assertEquals(size, Inscription.size(con));\n }", "@Test\n @JUnitTemporaryDatabase // Relies on specific IDs so we need a fresh database\n public void testDelete() throws Exception {\n createAndFlushServiceTypes();\n createAndFlushCategories();\n \n //Initialize the database\n ModelImporter mi = m_importer;\n String specFile = \"/tec_dump.xml.smalltest\";\n mi.importModelFromResource(new ClassPathResource(specFile));\n \n assertEquals(10, mi.getNodeDao().countAll());\n }", "@Test(expected = DataAcessException.class)\n\t public void testDeleteEntityExcep() throws DataAcessException {\n\t\t\tUsers user = BaseData.getUsers();\n\t\t\tdoThrow(RuntimeException.class).when(entityManager).remove(entityManager.getReference(Users.class,\n\t \t \t\tuser.getLoginName()));\n\t\t\tuserDao.delete(user.getLoginName(),user);\n\t}", "@Test\n public void testRemovePositive() throws Exception{\n Item item = new Item();\n item.setName(\"item\");\n item.setType(ItemTypes.ALCOHOLIC_BEVERAGE);\n itemDao.create(item);\n\n Assert.assertTrue(itemDao.delete(item.getName()));\n Assert.assertNull(itemDao.read(item.getName()));\n }", "@Override\n\tpublic void delete() {\n\n\t}", "private void clearData() {\n em.createQuery(\"delete from ViajeroEntity\").executeUpdate();\n }", "@Override\r\n\tprotected void checkDelete(Serializable id) throws BusinessException {\n\t\t\r\n\t}", "public void delete() throws Exception\n {\n dao.delete(this);\n }", "@Override\r\n\tpublic int delete() throws Exception {\n\t\treturn 0;\r\n\t}", "@Test\r\n public void testDelete() {\r\n assertTrue(false);\r\n }", "@Test\n\t@DatabaseSetup(value = \"classpath:databaseEntries.xml\", type = DatabaseOperation.CLEAN_INSERT)\n\tpublic void testDeleteLecturer() {\n\t\t\n\t\t//Confirm table row count\n\t\tlecturerJdbcDaoSupport = (LecturerJdbcDaoSupport) autoWireContext.getBean(\"lecturerJdbcDaoSupport\");\n\t\tlecturerJdbcDaoSupport.deleteLecturer(\"L001\");\n\t\tint rowCount = lecturerJdbcDaoSupport.countRows();\n\t\tassertEquals(2, rowCount);\n\t}", "public void testDelete() {\n Random random = new Random();\n ContentValues values1 = makeServiceStateValues(random, mBaseDb);\n final long row1 = mBaseDb.insert(TBL_SERVICE_STATE, null, values1);\n ContentValues values2 = makeServiceStateValues(random, mBaseDb);\n final long row2 = mBaseDb.insert(TBL_SERVICE_STATE, null, values2);\n\n // delete row 1\n ServiceStateTable table = new ServiceStateTable();\n String whereClause = COL_ID + \" = ?\";\n String[] whereArgs = { String.valueOf(row1) };\n int deleted = table.delete(mTestContext, whereClause, whereArgs);\n assertEquals(1, deleted);\n\n // query verify using base db\n Cursor cursor = mBaseDb.query(TBL_SERVICE_STATE, null, null, null, null, null, null);\n assertValuesCursor(row2, values2, cursor);\n cursor.close();\n }", "@Test\n @DisplayName(\"Testataan tilausten poisto tietokannasta\")\n void deleteReservation() {\n TablesEntity table = new TablesEntity();\n table.setSeats(2);\n tablesDao.createTable(table);\n\n ReservationsEntity reservation = new ReservationsEntity(\"Antero\", \"10073819\", new Date(System.currentTimeMillis()), table.getId(), new Time(1000), new Time(2000));\n reservationsDao.createReservation(reservation);\n\n // Confirm that the reservation is in DB\n ReservationsEntity reservationFromDb = reservationsDao.getReservation(reservation.getId());\n assertEquals(reservation, reservationFromDb);\n\n // Delete reservation and confirm that it's not in the DB\n reservationsDao.deleteReservation(reservation);\n\n reservationFromDb = reservationsDao.getReservation(reservation.getId());\n assertEquals(null, reservationFromDb);\n\n }", "@Override\r\n\tpublic void delete() {\n\r\n\t}", "@Override\n\tpublic void delete() {\n\t\t\n\t}", "@Override\n\tpublic void delete() {\n\t\t\n\t}", "private Delete() {}", "private Delete() {}", "@Test\n public void testDelete() {\n System.out.println(\"delete\");\n Comment instance = new Comment(\"Test Komment 2\", testCommentable, testAuthor);\n instance.delete();\n \n assertFalse(testCommentable.getComments().contains(instance));\n assertFalse(testAuthor.getCreatedComments().contains(instance));\n assertTrue(instance.isMarkedForDeletion());\n assertFalse(Database.getInstance().getComments().contains(instance));\n }", "@Test(expectedExceptions = DataAccessException.class)\r\n public void testDeleteNull() {\r\n recordDao.delete(null);\r\n }", "@Test(expected = DataAcessException.class)\n\t public void testDeleteExcep() throws DataAcessException {\n\t\tUsers user = BaseData.getUsers();\n\t\tdoThrow(RuntimeException.class).when(entityManager).remove(user);\n\t\tuserDao.delete(user);\n\t}", "@Override\r\n\tprotected void tearDown() throws Exception {\n\r\n\t\tdao.insert(\"delete from system.tables where table_id='0000001' and table_name='emp0'\");\r\n\t\tdao.insert(\"delete from system.tables where table_id='0000002' and table_name='dept0'\");\r\n\t\tdao.insert(\"delete from system.tables where table_id='0000003' and table_name='emp'\");\r\n\t\tdao.insert(\"delete from system.tables where table_id='0000004' and table_name='dept'\");\r\n\t\tdao.insert(\"delete from system.databases where database_id='00001' and database_name='database1'\");\r\n\t\tdao.insert(\"delete from system.databases where database_id='00002' and database_name='database2'\");\r\n\t\tdao.insert(\"delete from system.users where user_name='scott'\");\r\n\r\n\t\tdao.insert(\"commit\");\r\n//\t\tdao.disconnect();\r\n\t}", "@Override\n\tpublic int delete(PrestationCDI obj) throws DAOException {\n\t\treturn 0;\n\t}", "@Test\n void deleteSuccess() {\n\n UserDOA userDao = new UserDOA();\n User user = userDao.getById(1);\n String orderDescription = \"February Large Test-Tshirt Delete\";\n\n Order newOrder = new Order(orderDescription, user, \"February\");\n user.addOrder(newOrder);\n\n dao.delete(newOrder);\n List<Order> orders = dao.getByPropertyLike(\"description\", \"February Large Test-Tshirt Delete\");\n assertEquals(0, orders.size());\n }", "@Test\n @Order(17)\n void TC_UTENTE_DAO_5()\n {\n UtenteDAO utenteDAO= new UtenteDAO();\n assertThrows(RuntimeException.class,()->utenteDAO.delete(null));\n }", "public void testRemove() throws SQLException, ClassNotFoundException {\r\n\t\t// create an instance to be test\r\n\t\tDate d = Date.valueOf(\"2017-01-01\");\r\n\t\tService ser = new Service(\"employee\", 1, \"variation\", \"note\", d, d, 1, 1);\r\n\t\tmodelDS.insert(ser); \r\n\t\tint id = -1;\r\n\t\tLinkedList<Service> list = modelDS.findAll();\r\n\t\tfor (Service a : list) {\r\n\t\t\tif (a.equals(ser))\r\n\t\t\t\tid = a.getId();\r\n\t\t}\r\n\t\t\r\n\t\tService service = modelDS.findByKey(id);\r\n\t\tmodelDS.remove(service.getId()); // method to test\r\n\r\n\t\t// database extrapolation\r\n\t\tPreparedStatement ps = connection.prepareStatement(\"SELECT count(*) FROM \" + TABLE_NAME + \" WHERE id = ?\");\r\n\t\tps.setInt(1, id);\r\n\t\tResultSet rs = ps.executeQuery();\r\n\t\tint expected = 0;\r\n\t\tif (rs.next())\r\n\t\t\texpected = rs.getInt(1);\r\n\t\tassertEquals(expected, 0);\r\n\t}", "@Test\n public void test5Delete() {\n \n System.out.println(\"Prueba deSpecialityDAO\");\n SpecialityFactory factory = new MysqlSpecialityDAOFactry();\n SpecialityDAO dao = factory.create();\n assertEquals(dao.delete(\"telecomunicaciones\"),1);\n }", "@Test\n public void deleteComentarioTest(){\n ComentarioEntity entity = data.get(0);\n comentarioPersistence.delete(entity.getId());\n ComentarioEntity eliminado = em.find(ComentarioEntity.class,entity.getId());\n Assert.assertNull(eliminado);\n }", "@Test\r\n\tpublic void testCascadeDelete() {\r\n\t\tSet<Student> students = studentDao.getStudentByName(\"lucy\");\r\n\t\tif(students != null) {\r\n\t\t\tfor(Student student : students) {\r\n\t\t\t\tstudentDao.delete(student);\r\n\t\t\t}\r\n\t\t}\r\n\t\tlogger.debug(confidentialDao.loadAll());\r\n\t\t\r\n\t}", "@Override\r\n\tpublic void delete() throws DeleteException {\n\t\t\r\n\t}", "@Override\n\tpublic void delete(String... args) throws SQLException {\n\t\t\n\t}", "@Test\n public void deleteQuejaTest() {\n QuejaEntity entity = data.get(0);\n quejaPersistence.delete(entity.getId());\n QuejaEntity deleted = em.find(QuejaEntity.class, entity.getId());\n Assert.assertNull(deleted);\n }", "@Override\n\tpublic boolean delete(String sql) {\n\t\treturn false;\n\t}", "@Test\n void testDeleteUser() {\n List<User> allUsers = userData.crud.getAll();\n int deleteId = allUsers.get((allUsers.size() - 1)).getId();\n userData.crud.deleteRecord(userData.crud.getById(deleteId));\n assertNull(userData.crud.getById(deleteId));\n // List<User> allUsersMinusOne = userData.crud.getAll();\n // assertNotEquals(allUsersMinusOne, allUsers);\n logger.info(\"Deleted record for ID: \" + deleteId);\n\n LocationData locationData = new LocationData();\n Location location = new Location();\n Set<Location> userLocations = location.getLocations((User) userData.crud.getById(deleteId));\n\n assertEquals(0, userLocations.size());\n\n }", "private void clearData() {\r\n em.createQuery(\"delete from MonitoriaEntity\").executeUpdate();\r\n }", "@Override\n\tpublic void delete() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "public void testDeletePaymentTerm_EmptyDatabase() throws Exception {\r\n try {\r\n new SimpleCommonManager(\"SimpleCommonManager_Error_14\").deletePaymentTerm(1);\r\n fail(\"PaymentTermDAOException is expected\");\r\n } catch (PaymentTermDAOException e) {\r\n assertTrue(e.getCause() instanceof SQLException);\r\n }\r\n }", "@Test\n @Order(17)\n void delete_client_not_in_database() {\n int sumOfIds = 0;\n HashSet<Client> allClients = service.getAllClients();\n for(Client c : allClients) {\n sumOfIds+=c.getId();\n }\n boolean isDeleted = service.deleteClientById(sumOfIds);\n Assertions.assertFalse(isDeleted);\n }", "@Test\n public void testDeleteNegativeBillIsNull() throws Exception{\n String name = null;\n itemDao.delete(name);\n }", "@Test\n public void deleteDoctor() {\n\t\tList<Doctor> doctors = drepository.findByName(\"Katri Halonen\");\n\t\tassertThat(doctors).hasSize(1);\n \tdrepository.deleteById((long) 3);\n \tdoctors = drepository.findByName(\"Katri Halonen\");\n \tassertThat(doctors).hasSize(0);\n }", "@Override\n\tprotected void doDelete(DomainObject o, PreparedStatement s)\n\t\t\tthrows SQLException {\n\n\t}", "@Test\n public void deleteIngredient_ReturnsTrue(){\n int returned = testDatabase.addIngredient(ingredient);\n assertEquals(\"deleteIngredient - Returns True\",true, testDatabase.deleteIngredient(returned));\n }", "@Override\r\n\tpublic void clearDatabase() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void delete(TQssql sql) {\n\r\n\t}", "@Test\n public void teardown() throws SQLException {\n PreparedStatement ps = con.prepareStatement(\"delete from airline.user where username = \\\"username\\\";\");\n ps.executeUpdate();\n this.con.close();\n this.con = null;\n this.userDAO = null;\n this.testUser = null;\n }", "@Test\n public void deleteRecipeIngredient_Deletes(){\n int returnedRecipe = testDatabase.addRecipe(testRecipe);\n int returnedIngredient = testDatabase.addRecipeIngredient(recipeIngredient);\n testDatabase.deleteRecipeIngredients(returnedIngredient);\n ArrayList<RecipeIngredient> allIngredients = testDatabase.getAllRecipeIngredients(returnedRecipe);\n boolean deleted = true;\n if(allIngredients != null){\n for(int i = 0; i < allIngredients.size(); i++){\n if(allIngredients.get(i).getIngredientID() == returnedIngredient){\n deleted = false;\n }\n }\n }\n assertEquals(\"deleteRecipeIngredient - Deletes From Database\", true, deleted);\n }", "@Test\r\n\tpublic void testDeleteById() {\r\n\t\tList<E> entities = dao.findAll();\r\n\t\tfor (E e : entities) {\r\n\t\t\tInteger id = supplyId(e);\r\n\t\t\tdao.deleteById(id);\r\n\t\t\tE read = dao.read(id);\r\n\t\t\tassertNull(read);\r\n\t\t}\r\n\t}", "public void delete() throws EntityPersistenceException {\n\n }", "public boolean delete(Transaction transaction) throws Exception;", "public void delete() \n\t\t\t\tthrows model.ConsistencyException, PersistenceException{\n //TODO Check delegation to abstract class and overwrite if necessary!\n this.getMyCONCMModelItem().delete();\n }", "@Test\n public void deleteRecipe_ReturnsTrue(){\n int returned = testDatabase.addRecipe(testRecipe);\n assertEquals(\"deleteRecipe - Returns True\",true, testDatabase.deleteRecipe(returned));\n\n }", "@DatabaseSetup(\"setup_SimpleTable.xml\")\n @Test(expected = InvalidDataAccessApiUsageException.class)\n public void testRemoveUnmanaged() {\n final SimpleTable st = new SimpleTable();\n st.setId(10001000l);\n\n // this must fail since the entity to delete is unmanaged\n try {\n dao.delete(st);\n } catch (Exception up) {\n LOGGER.error(up.getMessage());\n throw up;\n }\n }", "@Test\r\n public void saveUserShouldCreateNewRowInDB(){\n userDaoJDBCTemplate.delete(38);\r\n userDaoJDBCTemplate.delete(40);\r\n userDaoJDBCTemplate.deleteByName(\"admin3\");\r\n userDaoJDBCTemplate.deleteByName(\"admin4\");\r\n }", "@Test\n public void deleteIngredient_ReturnsFalse(){\n assertEquals(\"deleteIngredient - Returns False\",false, testDatabase.deleteIngredient(Integer.MAX_VALUE));\n }", "public void delete() {\n \t\t try(Connection con = DB.sql2o.open()) {\n \t\t\t String sql = \"DELETE FROM sightings where id=:id\";\n\t\t\t con.createQuery(sql)\n\t\t\t.addParameter(\"id\", this.id)\n\t\t\t.executeUpdate();\n\n \t\t }\n \t }", "@Override\n\tpublic void delete(Long primaryKey) {\n\t\t\n\t}", "@After\n public void deleteAfterwards() {\n DBhandlerTest db = null;\n try {\n db = new DBhandlerTest();\n } catch (Exception e) {\n e.printStackTrace();\n }\n db.deleteTable();\n }", "@Test\r\n public void testDelete() {\r\n System.out.println(\"delete\");\r\n String isbn = \"1222111131\";\r\n int expResult = 1;\r\n int result = TitleDao.delete(isbn);\r\n assertEquals(expResult, result);\r\n }", "@Override\n\tpublic void deleteTransaction(Transaction transaction) {\n\n\t}", "@Override\n public void delete() {\n }", "@Test\n\t public void testDelete(){\n\t\t try{\n\t\t\t Users user = BaseData.getUsers();\n\t\t\t doAnswer(new Answer() {\n\t\t\t \t public Object answer(InvocationOnMock invocation) {\n\t\t\t \t Object[] args = invocation.getArguments();\n\t\t\t \t EntityManager mock = (EntityManager) invocation.getMock();\n\t\t\t \t return null;\n\t\t\t \t }\n\t\t\t \t }).when(entityManager).remove(user);\n\t\t\t\tuserDao.delete(user);\n\t\t }catch(DataAcessException se){\n\t\t\t logger.error(\"error at service layer while testing delete:.\",se);\n\t\t }\n\t }", "public void delete() {\n\n\t}", "public void testDelete() {\n\t\ttry {\n\t\t\tServerParameterTDG.create();\n\n\t\t\t// insert\n\t\t\tServerParameterTDG.insert(\"paramName\", \"A description\", \"A value\");\n\t\t\t// delete\n\t\t\tassertEquals(1, ServerParameterTDG.delete(\"paramName\"));\n\t\t\t\t\n\t\t\tServerParameterTDG.drop();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tfail();\t\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tServerParameterTDG.drop();\n\t\t\t} catch (SQLException e) {\n\t\t\t}\n\t\t}\n\t}", "@Test\n\tpublic void testDelete(){\n\t}", "@Test\r\n\tpublic void deleteAnExistingRouteFather(){\r\n\t\tRouteFather deleted = routeFatherDAO.delete(this.routeFather);\r\n\t\tAssert.assertNotNull(\"it should returns a not null object\", deleted);\r\n\t}", "public void testDeletePaymentTerms_EmptyDatabase() throws Exception {\r\n try {\r\n new SimpleCommonManager(\"SimpleCommonManager_Error_14\").deletePaymentTerms(new long[]{1, 2});\r\n fail(\"PaymentTermDAOException is expected\");\r\n } catch (PaymentTermDAOException e) {\r\n assertTrue(e.getCause() instanceof SQLException);\r\n }\r\n }", "void removeAllData() throws DatabaseNotAccessibleException;", "@Test\r\n\tpublic void testDeleteAll() throws Exception {\n\t\tArrayList<Calificacion> calificaciones = modelo.getAll();\r\n\t\tfor (Calificacion calificacion : calificaciones) {\r\n\t\t\tassertTrue(modelo.delete(calificacion.getId()));\r\n\t\t}\r\n\t\tassertNull(modelo.getAll());\r\n\t}", "@Override\n\tpublic boolean delete(Object obj) throws SQLException {\n\t\treturn false;\n\t}", "@Test\n public void deleteCategory_ReturnsTrue(){\n int returned = testDatabase.addCategory(category);\n assertEquals(\"deleteCategory - Returns True\", true, testDatabase.deleteCategory(returned));\n }", "@Override\n public void delete() {\n\n\n }", "@Override\r\n @Test(expected = UnsupportedOperationException.class)\r\n public void testDeleteNonExisting() {\n super.testDeleteNonExisting();\r\n }", "@Test\n void testDelete_incorrectId() {\n assertThrows(NotFoundException.class, () -> propertyInfoDao.delete(\"randomString\"));\n }", "@Test\n\t public void testDeleteEntity(){\n\t\t try{\n\t\t\t Users user = BaseData.getUsers();\n\t\t\t doAnswer(new Answer() {\n\t\t\t \t public Object answer(InvocationOnMock invocation) {\n\t\t\t \t Object[] args = invocation.getArguments();\n\t\t\t \t EntityManager mock = (EntityManager) invocation.getMock();\n\t\t\t \t return null;\n\t\t\t \t }\n\t\t\t \t }).when(entityManager).remove(entityManager.getReference(Users.class,\n\t\t\t \t \t\tuser.getLoginName()));\n\t\t\t\tuserDao.delete(user.getLoginName(),user);\n\t\t }catch(DataAcessException se){\n\t\t\t logger.error(\"error at service layer while testing delete:.\",se);\n\t\t }\n\t }" ]
[ "0.7604173", "0.74246573", "0.73878056", "0.7197309", "0.71762246", "0.7148135", "0.7131582", "0.7100395", "0.70720583", "0.7064757", "0.70592785", "0.704865", "0.7043549", "0.70374054", "0.7032223", "0.7026739", "0.70144135", "0.7008486", "0.69304305", "0.6920761", "0.6906991", "0.68845326", "0.6881137", "0.6881011", "0.68577904", "0.6857576", "0.6851062", "0.68196136", "0.6813518", "0.6790929", "0.6774601", "0.67722774", "0.6771127", "0.67710465", "0.67651314", "0.6757037", "0.6733778", "0.6721038", "0.672079", "0.67172366", "0.6716305", "0.67094827", "0.67094827", "0.67031986", "0.67031986", "0.6698619", "0.66948503", "0.6694576", "0.66942286", "0.66800684", "0.66769886", "0.6676778", "0.66742706", "0.66592425", "0.66580534", "0.6656438", "0.6649966", "0.6640584", "0.66396743", "0.6631705", "0.6626602", "0.66240513", "0.6617439", "0.6612672", "0.66092914", "0.6607045", "0.6606434", "0.660598", "0.6597839", "0.6597457", "0.65926236", "0.65908676", "0.65907735", "0.6589624", "0.65830266", "0.65735036", "0.657327", "0.65689754", "0.65669775", "0.6566803", "0.6566745", "0.65522027", "0.6545651", "0.65438783", "0.6540629", "0.6540351", "0.6539666", "0.6537564", "0.6536915", "0.653211", "0.6530651", "0.65270966", "0.65202844", "0.65199584", "0.65152407", "0.6513387", "0.65127975", "0.6498458", "0.6492464", "0.6489749", "0.6488824" ]
0.0
-1
Creates and returns the instance of entity that is existing (ie ID is not null).
protected T createSimulatedExistingEntity() { final T entity = createNewEntity(); entity.setId(IDUtil.randomPositiveLong()); when(getDAO().findOne(entity.getId())).thenReturn(entity); return entity; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "E create(E entity);", "E create(E entity);", "Entity createEntity();", "ID create(T entity);", "default E create(E entity)\n throws TechnicalException, ConflictException {\n return create(entity, null);\n }", "@Override\n\t@Transactional\n\tpublic T create(T entity) {\n\t\tif (entity == null) {\n\t\t\treturn null;\n\t\t}\n\t\thibernateTemplate.save(entity);\n\t\treturn entity;\n\t}", "T createEntity();", "void create(E entity);", "E create(E entity, RequestContext context)\n throws TechnicalException, ConflictException;", "T getInstance(@Valid @NotNull @NotBlank I id) throws EntityNotFoundException;", "void create(T entity);", "@Override\n\tpublic T create(T entity) {\n\t\t//TODO al anotar un metodo como transaccional spring de encarga de la transaccion por lo que no hay que \n\t\t//abrir la transaccion ni hacer commit, se encarga spring. Es más si lo intentas da un error, no se \n\t\t//pueden crear transacciones en una transaccion conpartida\n\t\t//Not allowed to create transaction on shared EntityManager - use Spring transactions\n\t\t//em.getTransaction().begin();\n\t\t\n\t\tSystem.out.println(em.contains(entity));\n\t\tem.persist(entity);\n\t\tSystem.out.println(em.contains(entity));\n\t\t//em.getTransaction().commit();\n\t\t\n\t\t//Session session = (Session) em.getDelegate();\n\t\t//Transaction tx = session.beginTransaction();\n\t\t//session.saveOrUpdate(entity);\n\t\t//session.flush();\n\t\t//tx.commit();\n\t\treturn entity;\n\t}", "@Override\n @LogMethod\n public T create(T entity) throws InventoryException {\n \tInventoryHelper.checkNull(entity, \"entity\");\n repository.persist(entity);\n return repository.getByKey(entity.getId());\n }", "T create() throws PersistException;", "public abstract boolean create(T entity) throws ServiceException;", "void create(T entity) throws Exception;", "Entity getEntityById(Long id);", "T createOrUpdate(final T domain) throws RequiredValueException, NoEntityFoundException;", "public T create(T entity) {\n\t \tgetEntityManager().getTransaction().begin();\n\t getEntityManager().persist(entity);\n\t getEntityManager().getTransaction().commit();\n\t getEntityManager().close();\n\t return entity;\n\t }", "default T getOrCreate() {\n if(!isPresent()) {\n return create();\n }\n else {\n return get();\n }\n }", "protected abstract ENTITY createEntity();", "public Entity newEntity() { return newMyEntity(); }", "public Entity newEntity() { return newMyEntity(); }", "public abstract boolean create(T entity) throws SQLException;", "public Optional<T> create(T obj) {\n\t\tif (null == obj) {\n\t\t\treturn Optional.empty();\n\t\t}\n\n\t\t// if Object has an id\n\t\tif (null != obj.getId()) {\n\n\t\t\t// return value if key already exists, otherwise empty\n\t\t\tif (map.containsKey(obj.getId())) {\n\t\t\t\treturn Optional.of(map.get(obj.getId()));\n\t\t\t} else {\n\t\t\t\treturn Optional.empty();\n\t\t\t}\n\n\t\t}\n\n\t\t// generate id\n\t\tint aId = id.getAndIncrement();\n\n\t\tobj.setId(aId);\n\t\tmap.put(aId, obj);\n\n\t\treturn Optional.of(obj);\n\n\t}", "T makePersistent(T entity);", "Object createOrUpdate() {\n if (isNewRecord()) {\n create();\n } else {\n update();\n }\n return this;\n }", "void createOrUpdate(T entity);", "Optional<T> getEntityById(ID_TYPE id);", "@Override\n\tprotected CoreEntity createNewEntity() {\n\t\treturn null;\n\t}", "protected abstract EntityBase createEntity() throws Exception;", "ID saveWithId(T entity);", "Entity save(Entity entity);", "E save(E entity);", "public UserEntity create(String userId) throws CreateException;", "protected Object create(Object entity, Class clazz) {\r\n\r\n try {\r\n EntityTransaction transaction = entityManager.getTransaction();\r\n transaction.begin();\r\n entityManager.persist(entity);\r\n transaction.commit();\r\n return entity;\r\n } catch (Exception e) {\r\n System.err.println(\"Erro ao criar Entidade \" + e.getMessage());\r\n }\r\n return null;\r\n }", "public Object create() {\n executeCallbacks(CallbackType.BEFORE_CREATE);\n\n executeCallbacks(CallbackType.BEFORE_VALIDATION);\n executeValidations();\n executeValidationsOnCreate();\n executeCallbacks(CallbackType.AFTER_VALIDATION);\n\n if (errors.size() > 0) return this;\n\n Adapter adapter = getAdapter();\n if (getId() == null && adapter.shouldPrefetchPrimaryKey(getTableName())) {\n this.id = adapter.getNextSequenceValue(getSequenceName());\n }\n\n StringBuilder sql = new StringBuilder();\n sql.append(\"INSERT INTO \").append(getTableName()).append(\" (\");\n sql.append(quotedColumnNames(includePrimaryKey));\n sql.append(\") VALUES (\").append(quotedAttributeValues(includePrimaryKey)).append(\")\");\n\n id = adapter.insert(sql.toString(), getClass().getName() + \" Create\");\n\n readAssociations();\n readAggregations();\n\n newRecord = false;\n\n executeCallbacks(CallbackType.AFTER_CREATE);\n\n return id;\n }", "public Person create() {\n\t\treturn personRepository.create();\n\t}", "public EspecieEntity inserta(EspecieEntity entity){\r\n em.persist(entity);\r\n return entity;\r\n }", "public ClientEntity newEntity() {\r\n if (entityType == null) {\r\n entityType = getEntityType(entitySet);\r\n }\r\n return odataClient.getObjectFactory().newEntity(new FullQualifiedName(NAMESPAVE, entityType));\r\n }", "public Employee createOne(Employee employee) {\n return employeeRepository.save(employee);\n }", "void create(Student entity);", "@Transactional\n\tpublic T create(T newInstance) {\n\t\tthis.em.persist(newInstance);\n\t\treturn newInstance;\n\t}", "protected abstract T getEntityById(Long id);", "public LugarEntity create(LugarEntity p){\n em.persist(p);\n return p;\n }", "public static Book createEntity() {\n Book book = new Book()\n .idBook(DEFAULT_ID_BOOK)\n .isbn(DEFAULT_ISBN)\n .title(DEFAULT_TITLE)\n .author(DEFAULT_AUTHOR)\n .year(DEFAULT_YEAR)\n .publisher(DEFAULT_PUBLISHER)\n .url_s(DEFAULT_URL_S)\n .url_m(DEFAULT_URL_M)\n .url_l(DEFAULT_URL_L);\n return book;\n }", "protected abstract T createNewEntry(PersistentEntity persistentEntity);", "<T extends ModelEntity> T safeFindOrCreate( Class<T> clazz, String name, Long id );", "public DisponibilidadEntity create(DisponibilidadEntity entity) {\r\n\r\n em.persist(entity);\r\n\r\n return entity;\r\n }", "@Override\n\tpublic EmploieType creer(EmploieType entity) throws InvalideTogetException {\n\t\treturn emploieTypeRepository.save(entity);\n\t}", "@Test\n void createAWithExistingId() throws Exception {\n a.setId(1L);\n\n int databaseSizeBeforeCreate = aRepository.findAll().collectList().block().size();\n\n // An entity with an existing ID cannot be created, so this API call must fail\n webTestClient\n .post()\n .uri(ENTITY_API_URL)\n .contentType(MediaType.APPLICATION_JSON)\n .bodyValue(TestUtil.convertObjectToJsonBytes(a))\n .exchange()\n .expectStatus()\n .isBadRequest();\n\n // Validate the A in the database\n List<A> aList = aRepository.findAll().collectList().block();\n assertThat(aList).hasSize(databaseSizeBeforeCreate);\n }", "public Camp newEntity() { return new Camp(); }", "public T save(T entity) throws Exception{\n\t\tentity = em.merge(entity);\n\t\treturn entity;\n\t}", "protected T copy() {\n\n // Initialize.\n T copy = null;\n\n try {\n\n // Create an instance of this entity class.\n copy = this.entityClass.newInstance();\n\n // Create a copy.\n copy.setCreateTime(this.getCreateTime());\n copy.setId(this.getId());\n copy.setModifyTime(this.getModifyTime());\n }\n catch (IllegalAccessException e) {\n // Ignore.\n }\n catch (InstantiationException e) {\n // Ignore.\n }\n\n return copy;\n }", "public TEntity save(TEntity entity){\n ContentValues content = toContentValues(entity);\n TEntity oldEntity = getById(entity.getId());\n\n int newKey;\n\n if (oldEntity != null) {\n db.update(tableName, content, String.format(\"Id = %1$s\", oldEntity.getId()), null);\n newKey = oldEntity.getId();\n } else {\n newKey = (int)db.insert(tableName, null, content);\n }\n return getById(newKey);\n }", "T findByIdAndCreateIfNotExists(String tagName);", "@PostConstruct\n protected void initNewEntity() {\n setNewEntity(getService().create());\n }", "Optional<Integer> insert(T entity);", "T save(T entity) throws DataConcurrencyException, DataIntegrityViolationException;", "public EntityType getCreateEntity(DtoType dto) throws ClassNotFoundException, InstantiationException, IllegalAccessException;", "T insert(T entity) throws Exception;", "public CompradorEntity create(CompradorEntity compradorEntity) {\r\n em.persist(compradorEntity);\r\n return compradorEntity;\r\n }", "public AbstractEntity getEntity() {\n if (entityClass == null) {\n return null;\n }\n try {\n AbstractEntity ent = entityClass.newInstance();\n if (value > -1) {\n ent.setSpriteValue(value);\n }\n return ent;\n } catch (InstantiationException | IllegalAccessException ex) {\n Logger.getLogger(CursorInfo.class.getName()).log(Level.SEVERE, null, ex);\n }\n return null;\n }", "T findById(final ID id) throws RequiredValueException, NoEntityFoundException;", "public static Pocket createEntity(EntityManager em) {\n Pocket pocket = new Pocket()\n .key(DEFAULT_KEY)\n .label(DEFAULT_LABEL)\n .startDateTime(DEFAULT_START_DATE_TIME)\n .endDateTime(DEFAULT_END_DATE_TIME)\n .amount(DEFAULT_AMOUNT)\n .reserved(DEFAULT_RESERVED);\n // Add required entity\n Balance balance = BalanceResourceIntTest.createEntity(em);\n em.persist(balance);\n em.flush();\n pocket.setBalance(balance);\n return pocket;\n }", "public static A createUpdatedEntity(EntityManager em) {\n A a = new A();\n return a;\n }", "@Override\n\tpublic T getEntityById(String id) {\n\t\treturn null;\n\t}", "@Test\n void createOrderItemWithExistingId() throws Exception {\n orderItem.setId(1L);\n\n int databaseSizeBeforeCreate = orderItemRepository.findAll().collectList().block().size();\n\n // An entity with an existing ID cannot be created, so this API call must fail\n webTestClient\n .post()\n .uri(ENTITY_API_URL)\n .contentType(MediaType.APPLICATION_JSON)\n .bodyValue(TestUtil.convertObjectToJsonBytes(orderItem))\n .exchange()\n .expectStatus()\n .isBadRequest();\n\n // Validate the OrderItem in the database\n List<OrderItem> orderItemList = orderItemRepository.findAll().collectList().block();\n assertThat(orderItemList).hasSize(databaseSizeBeforeCreate);\n }", "@Test\n @Transactional\n void createEnseignerWithExistingId() throws Exception {\n enseigner.setId(1L);\n\n int databaseSizeBeforeCreate = enseignerRepository.findAll().size();\n\n // An entity with an existing ID cannot be created, so this API call must fail\n restEnseignerMockMvc\n .perform(post(ENTITY_API_URL).contentType(MediaType.APPLICATION_JSON).content(TestUtil.convertObjectToJsonBytes(enseigner)))\n .andExpect(status().isBadRequest());\n\n // Validate the Enseigner in the database\n List<Enseigner> enseignerList = enseignerRepository.findAll();\n assertThat(enseignerList).hasSize(databaseSizeBeforeCreate);\n }", "E create(Resource data);", "public TimeInformation createEmployeeTimeInformation(TimeInformation entity) {\r\n\t\tOptional<TimeInformation> employeeTime = repository.findById(entity.getEmployee_ID_Number());\r\n\r\n\t\tif(employeeTime.isPresent()) {\r\n\t\t\treturn this.updateEmployeeTimeInformation( entity);\r\n\t\t} else {\r\n\t\t\tentity = repository.save(entity);\r\n\t\t\treturn entity;\r\n\t\t}\r\n\t}", "@Test\n void getByIdSuccess () {\n TestEntity testEntity = buildEntity();\n Api2 instance = new Api2();\n Long result = instance.save(testEntity);\n System.out.println(\"Result\" + result);\n\n if (result != null) {\n Optional<TestEntity> optionalEntity = instance.getById(TestEntity.class, result);\n\n TestEntity entity = optionalEntity.orElse(null);\n\n if (entity != null) {\n Assertions.assertEquals(result, entity.getId());\n Assertions.assertNotNull(result);\n } else {\n Assertions.fail();\n }\n } else {\n Assertions.fail();\n }\n }", "public <T extends Entity> T createEntity(EntitySpec<T> spec) {\n Map<String,Entity> entitiesByEntityId = MutableMap.of();\n Map<String,EntitySpec<?>> specsByEntityId = MutableMap.of();\n \n T entity = createEntityAndDescendantsUninitialized(spec, entitiesByEntityId, specsByEntityId);\n initEntityAndDescendants(entity.getId(), entitiesByEntityId, specsByEntityId);\n return entity;\n }", "public Entity build();", "@Override\n\tpublic Entity createEntity() {\n\t\tEntity entity = new Entity(LINKS_ENTITY_KIND);\n\t\tentity.setProperty(id_property, ID);\n\t\tentity.setProperty(url_property, url);\n\t\tentity.setProperty(CategoryID_property, CategoryID);\n\t\tentity.setProperty(note_property, note);\n\t\tentity.setProperty(createdOn_property, createdOn);\n\t\tentity.setProperty(updatedOn_property, updatedOn);\t\t\t\n\t\treturn entity;\n\t}", "@Override\n\tpublic Map<String, Object> create(StoreBase entity) {\n\t\treturn null;\n\t}", "T save(T entity);", "T save(T entity);", "T save(T entity);", "public ViajeroEntity create (ViajeroEntity viajeroEntity){\n LOGGER.log(Level.INFO, \"Creando un review nuevo\");\n em.persist(viajeroEntity);\n return viajeroEntity;\n }", "CounselorBiographyTemp create(CounselorBiographyTemp entity);", "@Test\n void saveSuccess() {\n TestEntity testEntity = buildEntity();\n Api2 instance = new Api2();\n Long result = instance.save(testEntity);\n System.out.println(\"Result\" + result);\n\n if (result != null) {\n Optional<TestEntity> optionalEntity = instance.getById(TestEntity.class, result);\n\n TestEntity entity = optionalEntity.orElse(null);\n\n if (entity != null) {\n Assertions.assertEquals(result, entity.getId());\n Assertions.assertNotNull(result);\n } else {\n Assertions.fail();\n }\n } else {\n Assertions.fail();\n }\n }", "Company getOrCreateCompanyId(String companyID) throws Exception;", "public Optional<DbStudentEntity> create(\n final Id id,\n final String name,\n final String address,\n final String rollNo,\n final String collegeCode,\n final String courseCode);", "Optional<Chiquvchi> getEntityById(ID id);", "public void createNewObject(Representation entity) throws ResourceException {\r\n\t\tT entry = createObjectFromHeaders(null, entity);\r\n\t\texecuteUpdate(entity, entry, createUpdateObject(entry));\r\n\r\n\t}", "@ModelAttribute\n\tpublic Entity getEntity(@PathVariable(\"entity\") Long id) {\n\t\tEntity entity = service.findOne(id);\n\t\tif (entity == null) {\n\t\t\tthrow new NotFoundException(String.format(\"Entity with identifier '%s' not found\", id));\n\t\t}\n\t\treturn entity;\n\t}", "@Override\n\tpublic Image creer(Image entity) throws InvalideGstoreException {\n\t\treturn imageRepository.save(entity);\n\t}", "@Test\n @Transactional\n void createAcheteurWithExistingId() throws Exception {\n acheteur.setId(1L);\n AcheteurDTO acheteurDTO = acheteurMapper.toDto(acheteur);\n\n int databaseSizeBeforeCreate = acheteurRepository.findAll().size();\n\n // An entity with an existing ID cannot be created, so this API call must fail\n restAcheteurMockMvc\n .perform(post(ENTITY_API_URL).contentType(MediaType.APPLICATION_JSON).content(TestUtil.convertObjectToJsonBytes(acheteurDTO)))\n .andExpect(status().isBadRequest());\n\n // Validate the Acheteur in the database\n List<Acheteur> acheteurList = acheteurRepository.findAll();\n assertThat(acheteurList).hasSize(databaseSizeBeforeCreate);\n }", "public Entity getEntity() {\n if (entity != null) {\n return entity;\n }\n return entity = NMSUtils.getEntityById(this.entityID);\n }", "@Test\n @Transactional\n void createSkillWithExistingId() throws Exception {\n skill.setId(1L);\n SkillDTO skillDTO = skillMapper.toDto(skill);\n\n int databaseSizeBeforeCreate = skillRepository.findAll().size();\n\n // An entity with an existing ID cannot be created, so this API call must fail\n restSkillMockMvc\n .perform(post(ENTITY_API_URL).contentType(MediaType.APPLICATION_JSON).content(TestUtil.convertObjectToJsonBytes(skillDTO)))\n .andExpect(status().isBadRequest());\n\n // Validate the Skill in the database\n List<Skill> skillList = skillRepository.findAll();\n assertThat(skillList).hasSize(databaseSizeBeforeCreate);\n }", "private boolean createInstance( View view, final EntityInstanceImpl ei )\n {\n final EntityDef entityDef = ei.getEntityDef();\n\n // Try to set the FKs for this instance. It will fail (return false) if one the source EI\n // for one of the FKs hasn't been created yet. This means it doesn't have a key.\n if ( ! setForeignKeys( ei ) )\n return false;\n\n // If we get here than all the FK's were copied successfully and we can create this instance.\n // We'll retrieve the generated key from the DB after the row has been inserted.\n try\n {\n if ( entityDef.getDbCreatedTimestamp() != null )\n {\n AttributeInstanceImpl timestamp = ei.getAttribute( entityDef.getDbCreatedTimestamp() );\n if ( timestamp.isNull() )\n {\n ZonedDateTime now = ZonedDateTime.now();\n timestamp.setValue( now );\n\n if ( entityDef.getDbUpdatedTimestamp() != null )\n ei.getAttribute( entityDef.getDbUpdatedTimestamp() ).setValue( now );\n }\n }\n\n // We need to handle multiple entities being created.\n List<EntityInstance> list = new ArrayList<EntityInstance>();\n list.add( ei );\n dbHandler.insertEntity( view, list );\n\n AttributeDef genkey = entityDef.getGenKey();\n if ( genkey != null )\n {\n List<Object> keys = dbHandler.getKeysGeneratedByDb();\n if ( keys.size() != 1 )\n throw new ZeidonException(\"Unexpected number of keys found: %s\", keys );\n\n AttributeDef keyAttrib = entityDef.getKeys().get( 0 );\n ei.getAttribute( keyAttrib ).setInternalValue( keys.get( 0 ), false );\n }\n\n // Indicate that--for now--we won't need to update later because of a FK.\n ei.dbhForeignKey = false;\n\n // Set the dbhCreated flag for ei and all its linked instances. This\n // will prevent us from trying to insert it again.\n for ( EntityInstanceImpl linked : ei.getAllLinkedInstances() )\n {\n linked.dbhCreated = true;\n\n // If the linked instance is flagged as created then we need\n // to set its included flag on so that the *relationship*\n // is still created.\n if ( linked.isCreated() )\n linked.dbhNeedsInclude = true;\n }\n }\n catch ( Exception e )\n {\n throw ZeidonException.wrapException( e ).prependEntityInstance( ei );\n }\n\n return true;\n }", "private FailingEntity createFailingEntity() {\n FailingEntity entity = app.createAndManageChild(EntitySpec.create(FailingEntity.class)\n .configure(FailingEntity.FAIL_ON_START, true));\n return entity;\n }", "public synchronized Resource createUniqueResource() throws ModelException {\n\n ensureCanCreateUnique();\n\n int id = getUnusedNodeID();\n BlankResourceImpl r = new BlankResourceImpl(this, id);\n return r;\n }", "@Override\r\n\tpublic T save(T entity) throws Exception {\n\t\ttry {\r\n\t\t\tthis.getcurrentSession().save(entity);\r\n\t\t\treturn entity;\r\n\t\t} catch (DataAccessException e) {\r\n\t\t\tthrow new Exception(\"保存\" + entity.getClass().getName() + \"实例失败\", e);\r\n\t\t}\r\n\r\n\t}", "public static Entity createBuilding(String campusID, String buildingName) {\n\t\tEntity building = null;\n\t\tDatastoreService datastore = DatastoreServiceFactory.getDatastoreService();\n\t\tTransaction txn = datastore.beginTransaction();\n\t\ttry {\n\n\t\t\tEntity campus = Campus.getCampus(campusID);\n\t\t\tKey campusKey = campus.getKey();\n\n\t\t\tif (!checkName(buildingName)) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tbuilding = getBuildingWithName(campusID, buildingName);\n\t\t\tif (building != null) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tMapFigure campusFigure = Campus.getGoogleMapFigure(campus);\n\t\t\tbuilding = new Entity(ENTITY_KIND, campusKey);\n\t\t\tbuilding.setProperty(NAME_PROPERTY, buildingName);\n\t\t\tsetGoogleMapFigure(campus, campusFigure.latitude, campusFigure.longitude, campusFigure.zoom, campusFigure.latitude, campusFigure.longitude);\n\t\t\tdatastore.put(building);\n\n\t\t\ttxn.commit();\n\t\t} finally {\n\t\t\tif (txn.isActive()) {\n\t\t\t\ttxn.rollback();\n\t\t\t}\n\t\t}\n\n\t\treturn building;\n\t}", "@SuppressWarnings(\"unchecked\")\n @Override\n protected <T> T _persistOrMerge(T entity) {\n if (entity == null) {\n logger.debug(\"entity == null\");\n return null;\n }\n if (em().contains(entity)) {\n logger.debug(\"em().contains(entity), try to _merge\");\n return _merge(entity);\n }\n Serializable id = getMetadataUtil().getId(entity);\n if (id == null) {\n logger.debug(\"_persist(id == null)\");\n _persist(entity);\n return entity;\n }\n T prev = em().find((Class<T>) entity.getClass(), id);\n if (prev == null) {\n logger.debug(\"_persist(prev == null)\");\n _persist(entity);\n return entity;\n } else {\n logger.debug(\"_merge\");\n return _merge(entity);\n }\n }", "public Entity getEntity() {\n if (entity != null) {\n return entity;\n }\n return entity = NMSUtils.getEntityById(this.entityID);\n }", "public Entity getEntity() {\n if (entity != null) {\n return entity;\n }\n return entity = NMSUtils.getEntityById(this.entityID);\n }", "public Entity getEntity() {\n if (entity != null) {\n return entity;\n }\n return entity = NMSUtils.getEntityById(this.entityID);\n }" ]
[ "0.74535507", "0.74535507", "0.7045669", "0.6989432", "0.6771014", "0.6723611", "0.6719015", "0.66251314", "0.6611582", "0.6496567", "0.64907944", "0.64871603", "0.64649427", "0.6450595", "0.6441691", "0.6377176", "0.6337222", "0.63361627", "0.6296892", "0.6265789", "0.61924917", "0.61706126", "0.61706126", "0.6136073", "0.61190283", "0.60982615", "0.6072748", "0.60637313", "0.6053721", "0.60362196", "0.6006417", "0.5969251", "0.59434533", "0.5925648", "0.5905556", "0.5894443", "0.58723736", "0.58637357", "0.5838025", "0.5814571", "0.57789797", "0.5766543", "0.57616854", "0.57567817", "0.5751587", "0.5746696", "0.5742919", "0.57416975", "0.56956816", "0.56864566", "0.56787837", "0.5676523", "0.56603616", "0.5657869", "0.56324923", "0.5623627", "0.5616403", "0.5614757", "0.56108195", "0.55957204", "0.5590793", "0.5586998", "0.5577258", "0.55729306", "0.5558922", "0.55525255", "0.5548053", "0.55322367", "0.552824", "0.55186254", "0.55132383", "0.55012405", "0.54988503", "0.5498139", "0.5493149", "0.5488849", "0.5481951", "0.5481951", "0.5481951", "0.5473987", "0.54729986", "0.547165", "0.54662645", "0.5462453", "0.5461259", "0.5453641", "0.54523134", "0.54520625", "0.5451673", "0.5451151", "0.54271895", "0.54252523", "0.54235274", "0.54228723", "0.5416926", "0.54114765", "0.54080516", "0.54049015", "0.54049015", "0.54049015" ]
0.7230372
2
Gets the application event publisher mock.
protected final ApplicationEventPublisher getEventPublisher() { return eventPublisher; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public void setApplicationEventPublisher(ApplicationEventPublisher applicationEventPublisher) {\r\n this.publisher = applicationEventPublisher;\r\n }", "public void setEventPublisher(ApplicationEventPublisher eventPublisher) {\n this.eventPublisher = eventPublisher;\n }", "public void setEventPublisher(ApplicationEventPublisher eventPublisher) {\n this.eventPublisher = eventPublisher;\n }", "public static OperatingSystemEventSender getInstance() {\r\n return OperatingSystemEventSender.INSTANCE;\r\n }", "@Override\n\tpublic void setApplicationEventPublisher(ApplicationEventPublisher publisher) {\n\t\tthis.publisher = publisher;\n\t\t\n\t}", "@Override\n\tpublic void setApplicationEventPublisher(ApplicationEventPublisher applicationEventPublisher) {\n\t\tthis.applicationEventPublisher = applicationEventPublisher;\n\t}", "@Test\n public void testGetInstance() {\n assertNotNull(eventDispatcher);\n }", "public static NotificationPublisher getInstance() {\n return instance;\n }", "public static void publishMockInvocation(ApplicationContext applicationContext, Object eventSource, Service service, Response response, Long startTime) {\n // Publish an invocation event before returning.\n MockInvocationEvent event = new MockInvocationEvent(eventSource, service.getName(), service.getVersion(),\n response.getName(), new Date(startTime), startTime - System.currentTimeMillis());\n applicationContext.publishEvent(event);\n log.debug(\"Mock invocation event has been published\");\n }", "public AdminCommandEventBroker getEventBroker();", "private void configureNotificationEventPublisher() throws APIManagementException {\n\n Map<String, String> properties = new HashMap<>();\n if (ServiceReferenceHolder.getInstance().getAPIManagerConfigurationService() != null) {\n APIManagerConfiguration configuration =\n ServiceReferenceHolder.getInstance().getAPIManagerConfigurationService()\n .getAPIManagerConfiguration();\n if (configuration.getEventHubConfigurationDto().getEventHubPublisherConfiguration() != null &&\n configuration.getEventHubConfigurationDto().isEnabled()) {\n EventHubConfigurationDto eventHubConfigurationDto = configuration.getEventHubConfigurationDto();\n EventHubConfigurationDto.EventHubPublisherConfiguration eventHubPublisherConfiguration =\n eventHubConfigurationDto.getEventHubPublisherConfiguration();\n properties.put(APIConstants.RECEIVER_URL, eventHubPublisherConfiguration.getReceiverUrlGroup());\n properties.put(APIConstants.AUTHENTICATOR_URL, eventHubPublisherConfiguration.getAuthUrlGroup());\n properties.put(APIConstants.USERNAME, eventHubConfigurationDto.getUsername());\n properties.put(APIConstants.PASSWORD, eventHubConfigurationDto.getPassword());\n properties.put(APIConstants.PROTOCOL, eventHubPublisherConfiguration.getType());\n properties.put(APIConstants.PUBLISHING_MODE, APIConstants.NON_BLOCKING);\n properties.put(APIConstants.PUBLISHING_TIME_OUT, \"0\");\n for (String key : eventHubPublisherConfiguration.getProperties().keySet()) {\n properties.put(key, eventHubPublisherConfiguration.getProperties().get(key));\n }\n properties.put(APIConstants.IS_ENABLED,\n Boolean.toString(configuration.getEventHubConfigurationDto().isEnabled()));\n try {\n ServiceReferenceHolder.getInstance().getEventPublisherFactory().configure(properties);\n } catch (EventPublisherException e) {\n throw new APIManagementException(e);\n }\n } else {\n log.info(\"Wso2Event Publisher not enabled.\");\n }\n } else {\n log.info(\"api-manager.xml not loaded. Wso2Event Publisher will not be enabled.\");\n }\n }", "public EventStore getEventStore() {\n return eventStore;\n }", "public EventBus getEventSystem() {\n return system;\n }", "public Object getEvent() {\r\n return event;\r\n }", "public Object getEventSubject() {\n return eventSubject;\n }", "EventBus getEventBus();", "private static OPFPushHelper createHelperWithMockSenderPushProvider() {\n final Configuration.Builder builder = new Configuration.Builder()\n .addProviders(new MockSenderPushProvider())\n .setEventListener(new TestEventListener());\n\n final OPFPushHelper helper = OPFPushHelper.newInstance(Robolectric.application);\n helper.init(builder.build());\n return helper;\n }", "@Override\n public Object getEvent() {\n return eventObj;\n }", "public interface EventBus {\n\n public String name();\n\n /**\n * Posts an event to all registered subscribers. This method will return successfully after the\n * event has been posted to all subscribers, and regardless of any exceptions thrown by\n * subscribers.\n *\n * @param event event to post.\n */\n public void post(Object event);\n\n}", "@Override\r\n @Test(expected = UnsupportedOperationException.class)\r\n public void testPutWithEventPublisher() {\n super.testPutWithEventPublisher();\r\n }", "public EventBus build() {\n return new EventBus(this);\n }", "public String getPushEvent();", "public Application getApplication() {\n return (Application)this.getSource();\n }", "public WebDriver getDriver() {\n return eventDriver;\n }", "public static ApplicationBase getApplication()\r\n {\r\n if (instance == null)\r\n {\r\n throw new IllegalStateException(\"Micgwaf was not (yet) initialized correctly: no instance of Application is known.\");\r\n }\r\n return instance;\r\n }", "public MockAggregateEvent(Date inTimestamp,\n Instrument inInstrument)\n {\n event.setMessageId(System.nanoTime());\n event.setTimestamp(new Date());\n instrument = inInstrument;\n }", "public void testCustomEventListener() throws Exception\n {\n checkEventTypeRegistration(CUSTOM_EVENT_BUILDER, \"\");\n }", "public static EventHook getInstance() {\n\n if (instance == null) {\n instance = new EventHook();\n }\n\n return instance;\n\n }", "public AppQueue getQueue()\r\n {\r\n return event_q;\r\n }", "@Provides\n @Singleton\n EventBus providesEventBus() {\n return EventBus.getDefault();\n }", "public String getProducerApplication();", "public TApplication getApplication() {\n return window.getApplication();\n }", "private ManagedChannel emulatedPubSubChannel() {\n if (!useEmulator) {\n throw new RuntimeException(\"You shouldn't be calling this when using the real \"\n + \"(non-emulator) implementation\");\n }\n String hostport = System.getenv(\"PUBSUB_EMULATOR_HOST\");\n return ManagedChannelBuilder.forTarget(hostport).usePlaintext().build();\n }", "@Test\n public void testDispatchEvent(){\n\n final SampleClass sample = new SampleClass();\n\n assertEquals(\"\", sample.getName());\n\n eventDispatcher.addSimulatorEventListener(new SimulatorEventListener(){\n\n public void onNewMessage(Exchange exchange, Conversation conversation) {\n sample.setName(\"Modified\");\n }\n\n public void onMatchingScenario(Exchange exchange, Conversation conversation) {\n\n }\n\n public void onResponseBuilt(Exchange exchange, Conversation conversation) {\n\n }\n\n public void onResponseSent(Exchange exchange, Conversation conversation) {\n \n }\n });\n\n eventDispatcher.dispatchEvent(SimulatorEventType.NEW_MESSAGE, null, null);\n\n assertEquals(\"Modified\",sample.getName());\n }", "public static EventClient getEventClient() {\n if (EVENT_CLIENT == null) {\n EVENT_CLIENT = new NetworkEventClient(\n NetworkProvider.SERVER_URL,\n new DefaultNetworkProvider());\n }\n return EVENT_CLIENT;\n }", "public Event getEvent() {\n\t\treturn event;\n\t}", "public interface EventPublisher<T> {\r\n\r\n\t/**\r\n\t * Publish to the ring buffer. Use a Event Translator.\r\n\t * \r\n\t * @param t\r\n\t */\r\n\tvoid publish(T t);\r\n\t\r\n\t/**\r\n\t * Set the DisruptorConfig spring bean.\r\n\t * \r\n\t * @param disruptorConfig\r\n\t */\r\n\tvoid setDisruptorConfig(DisruptorConfig<T> disruptorConfig);\r\n}", "public AppSink getSinkElement() {\n return sink;\n }", "public static void testLowLevelApi() {\n StreamTask task = new StreamTask() {\n @Override\n public void process(IncomingMessageEnvelope envelope, MessageCollector collector, TaskCoordinator coordinator) throws Exception {\n }\n };\n\n TestApplication.TaskTest app = TestApplication.create(task, new MapConfig());\n app.addInputStream(\"queuing.PageViewEvent\", CollectionStream.of(ImmutableMap.of(\n \"1\", \"PageView1\",\n \"2\", \"PageView2\"\n )));\n app.addOutputStream(\"queuing.MyPageViewEvent\", CollectionStream.empty());\n\n TaskAssert.that(\"queuing.MyPageViewEvent\").contains(ImmutableMap.of(\n \"1\", \"PageView1\",\n \"2\", \"PageView2\"\n ));\n \n app.run();\n }", "public static final String getPublisherName() { return publisherName; }", "org.omg.CosEventChannelAdmin.ProxyPushSupplier obtain_push_supplier();", "public String getPublisher() {\n return this.publisher;\n }", "public String getPublisher() {\n return publisher;\n }", "public interface EventDispatcher extends EventBroker {\n\n /**\n * Take an event of type {@code T} and dispatch it to all subscribed\n * listeners.\n * Note: It is not defined whether the event is delivered synchronously or\n * asynchronously.\n *\n * @param <T> A subtype of RootApplicationEvent\n * @param event The event to deliver\n */\n <T extends RootApplicationEvent> void dispatch(T event);\n}", "public SoEvent getEvent() {\n\t\treturn (eventAction != null ? eventAction.getEvent() : null); \n\t}", "public WebEventManager getEventManager() { return _eventManager; }", "private EventProcessorBuilder baseConfig(MockEventSender es) {\n return sendEvents().eventSender(senderFactory(es));\n }", "@Test\n\tpublic void shouldSendCorrectEvent() {\n\t\tUdpSender udpSender = Mockito.spy(UdpSender.class);\n\t\tEvent event = new Event(EVENT_GENERIC);\n\t\tUdpEventSender target = new UdpEventSender();\n\t\ttarget.setUdpSender(udpSender);\n\n\t\ttarget.send(event);\n\n\t\tMockito.verify(udpSender).sendTo(EVENT_GENERIC);\n\t}", "protected Application getApplication() {\r\n\t\treturn application;\r\n\t}", "public EventManager getEventManager() {\n return eventManager;\n }", "void publish(Event event) throws PublishingException;", "public EventManager getEventManager() {\r\n return eventManager;\r\n }", "@Bean\n public ApplicationEventMulticaster applicationEventMulticaster() {\n SimpleApplicationEventMulticaster eventMulticaster = new SimpleApplicationEventMulticaster();\n eventMulticaster.setTaskExecutor(new SimpleAsyncTaskExecutor());\n return eventMulticaster;\n }", "public String getEventName();", "@Test\n public void testAddEventConvinienceMethodWithCustomEventProvider() {\n calendar.setEventProvider(new ContainerEventProvider(new com.vaadin.v7.data.util.BeanItemContainer<BasicEvent>(BasicEvent.class)));\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 MockTopicPublisher getTopicPublisher(String topicName)\n {\n List publishers = getTopicPublisherList(topicName);\n if(publishers.size() <= 0) return null;\n return (MockTopicPublisher)publishers.get(0);\n }", "public Event getEvent(){\n\t\t\treturn event;\n\t\t}", "public Event getEvent() {\n\n return null;\n }", "public Event createOneShotPublish(Address resource, String event);", "public ExtendedEventHandler getEventHandler() {\n return eventHandler;\n }", "public EventHandling getEventHandling() {\n return eventHandling;\n }", "public static FFTApp getApplication() {\n return Application.getInstance(FFTApp.class);\n }", "public MockTopicPublisher getTopicPublisher(int index)\n {\n if(topicPublisherList.size() <= index || index < 0) return null;\n return (MockTopicPublisher)topicPublisherList.get(index);\n }", "Application getApplication();", "@Override\n\tpublic EventMessage initLocalEventMessage() {\n\t\treturn getEventMessage();\n\t}", "public String getPublisher() {\n\treturn publisher;\n}", "@Test\n public void testAddEventListener() {\n List<SimulatorEventListener> eventListeners = eventDispatcher.getSimulatorEventListeners();\n assertTrue(eventListeners.size() == 0);\n SimulatorEventListener listener = new SimulatorEventListener() {\n\n\n public void onNewMessage(Exchange exchange, Conversation conversation) {\n\n }\n\n public void onMatchingScenario(Exchange exchange, Conversation conversation) {\n\n }\n\n public void onResponseBuilt(Exchange exchange, Conversation conversation) {\n\n }\n\n public void onResponseSent(Exchange exchange, Conversation conversation) {\n\n }\n };\n eventDispatcher.addSimulatorEventListener(listener);\n assertTrue(eventListeners.size() == 1);\n }", "@Test\n public void testProcessPushMessageReceiptEventWithSDK() throws Exception {\n testExtension.iterableService = Mockito.mock(IterableService.class);\n\n EventProcessingRequest eventProcessingRequest = createEventProcessingRequest();\n Map<String, String> integrationAttributes = new HashMap<>();\n integrationAttributes.put(\"Iterable.sdkVersion\", \"3.2.1\");\n eventProcessingRequest.setIntegrationAttributes(integrationAttributes);\n List<UserIdentity> userIdentities = new LinkedList<>();\n userIdentities.add(new UserIdentity(UserIdentity.Type.EMAIL, Identity.Encoding.RAW, \"mptest@mparticle.com\"));\n userIdentities.add(new UserIdentity(UserIdentity.Type.CUSTOMER, Identity.Encoding.RAW, \"123456\"));\n eventProcessingRequest.setUserIdentities(userIdentities);\n eventProcessingRequest.setRuntimeEnvironment(new AndroidRuntimeEnvironment());\n PushMessageReceiptEvent event = new PushMessageReceiptEvent();\n event.setRequest(eventProcessingRequest);\n event.setPayload(\"{\\\"google.sent_time\\\":1507657706679,\\\"body\\\":\\\"example\\\",\\\"from\\\":\\\"674988899928\\\",\\\"itbl\\\":\\\"{\\\\\\\"campaignId\\\\\\\":12345,\\\\\\\"isGhostPush\\\\\\\":false,\\\\\\\"messageId\\\\\\\":\\\\\\\"1dce4e505b11111ca1111d6fdd774fbd\\\\\\\",\\\\\\\"templateId\\\\\\\":54321}\\\",\\\"google.message_id\\\":\\\"0:1507657706689231%62399b94f9fd7ecd\\\"}\");\n\n long timeStamp = System.currentTimeMillis();\n event.setTimestamp(timeStamp);\n\n testExtension.processPushMessageReceiptEvent(event);\n\n Mockito.verify(testExtension.iterableService, never()).trackPushOpen(Mockito.any(), Mockito.any());\n }", "public MockTopicSubscriber getDurableTopicSubscriber(String name)\n {\n return (MockTopicSubscriber)topicDurableSubscriberMap.get(name);\n }", "public String getEvent() {\n return this.event;\n }", "public ServiceEvent() {\n // eventSenderID and eventSenderClass are initialized by the OperatingSystem! \n }", "@Bean(name = \"applicationEventMulticaster\")\n public ApplicationEventMulticaster simpleApplicationEventMulticaster() {\n SimpleApplicationEventMulticaster eventMulticaster\n = new SimpleApplicationEventMulticaster();\n\n eventMulticaster.setTaskExecutor(new SimpleAsyncTaskExecutor());\n return eventMulticaster;\n }", "public Publisher() {\n // This constructor is intentionally empty. Nothing special is needed here.\n }", "public interface EventBusProducer {\n void post(final Answer answer);\n}", "public ServletContextEvent getEvent() {\r\n\t\treturn (ServletContextEvent) eventHolder.get();\r\n\t}", "@Test\n void shouldReturnEventSource() {\n server.setRoute(\"/sse\", exchange -> {\n exchange.getResponseHeaders().add(\"Content-Type\", \"text/event-stream\");\n exchange.getResponseHeaders().add(\"Connection\", \"keep-alive\");\n exchange.getResponseHeaders().add(\"Cache-Control\", \"no-cache\");\n exchange.sendResponseHeaders(200, 0);\n try (OutputStreamWriter writer = new OutputStreamWriter(exchange.getResponseBody())) {\n writer.write(\"data: {\\\"foo\\\":\\\"bar\\\"}\\n\\n\");\n }\n });\n // 2. Subscribe to page request events.\n page.navigate(server.EMPTY_PAGE);\n List<Request> requests = new ArrayList<>();\n page.onRequest(request -> requests.add(request));\n // 3. Connect to EventSource in browser and return first message.\n Object result = page.evaluate(\"() => {\\n\" +\n \" const eventSource = new EventSource('/sse');\\n\" +\n \" return new Promise(resolve => {\\n\" +\n \" eventSource.onmessage = e => resolve(JSON.parse(e.data));\\n\" +\n \" });\\n\" +\n \"}\");\n assertEquals(mapOf(\"foo\", \"bar\"), result);\n assertEquals(\"eventsource\", requests.get(0).resourceType());\n }", "public Application getApp() {\n\t\treturn app;\n\t}", "EventUse createEventUse();", "@Override\n public EventServer getEventServer() {\n if (eventServer == null) {\n synchronized (lock) {\n if (eventServer == null) {\n eventServer = new EventServerHandler(serverModelFactory.getEventServerModel());\n }\n }\n }\n return eventServer;\n }", "public MauiApplication getApplication ()\n\t{\n\t\treturn application;\n\t}", "public String marketplacePublisher() {\n return this.marketplacePublisher;\n }", "public String getApplication() {\r\n return application;\r\n }", "static private CustomListener eventCustListener() {\n return new CustomListener() {\n\t @Override\n\t public void customEventReceived(CustomEvent e) {\n\t\tSystem.out.println(e.getMessage());\n\t }\n }\n}", "public interface Publisher {\n\n public void registerObserver(Observer observer);\n public void notifyAllObservers(String eventName,String message);\n\n}", "@NonNull\n public EventModel getEvent() {\n return mEvent;\n }", "public IEventLog getEventLog();", "@Override\n public void publish(final EventData data) {\n LOGGER.debug(\"async event {} published via LocalAsyncProcessor\", data.getData().ret$PQON());\n LOGGER.debug(\"(currently events are discarded in localtests)\");\n }", "void onBusEvent(Event event);", "public static BlaiseGraphicsTestApp getApplication() {\n return Application.getInstance(BlaiseGraphicsTestApp.class);\n }", "protected EventService getEventService() {\n return new EventService() {\n\n @Override\n public void removeHandler(final String eventType, final SHandler<SEvent> handler) throws HandlerUnregistrationException {\n }\n\n @Override\n public void removeAllHandlers(final SHandler<SEvent> handler) throws HandlerUnregistrationException {\n }\n\n @Override\n public Map<String, Set<SHandler<SEvent>>> getRegisteredHandlers() {\n return Collections.emptyMap();\n }\n\n @Override\n public Set<SHandler<SEvent>> getHandlers(final String eventType) {\n return null;\n }\n\n @Override\n public SEventBuilder getEventBuilder() {\n return getSEventBuilder();\n }\n\n private SEventBuilder getSEventBuilder() {\n return new SEventBuilder() {\n\n private SEvent event;\n\n @Override\n public SEventBuilder createNewInstance(final String type) {\n event = new SEvent() {\n\n @Override\n public String getType() {\n return type;\n }\n\n @Override\n public Object getObject() {\n return null;\n }\n\n @Override\n public void setObject(final Object ob) {\n }\n };\n return this;\n }\n\n @Override\n public SEvent done() {\n return event;\n }\n\n @Override\n public SEventBuilder setObject(final Object ob) {\n event.setObject(ob);\n return this;\n }\n\n @Override\n public SEventBuilder createInsertEvent(final String type) {\n return this;\n }\n\n @Override\n public SEventBuilder createDeleteEvent(final String type) {\n return this;\n }\n\n @Override\n public SEventBuilder createUpdateEvent(final String type) {\n return this;\n }\n };\n\n }\n\n @Override\n public void fireEvent(final SEvent event) throws FireEventException {\n }\n\n @Override\n public void addHandler(final String eventType, final SHandler<SEvent> handler) throws HandlerRegistrationException {\n }\n\n @Override\n public boolean hasHandlers(final String eventType, final EventActionType actionType) {\n return false;\n }\n };\n }", "public String getEventMessage() {\n return eventMessage;\n }", "public static StreamBuilder configure() {\n return new EventStreamBuilder();\n }", "private NotificationPublisher() {\n subscribers = new ArrayList<>();\n }", "@Bean\n protected ServletListenerRegistrationBean<?> httpSessionEventPublisher() {\n return new ServletListenerRegistrationBean<>(new HttpSessionEventPublisher());\n }", "public final String getPublisherId() {\n\t\treturn impl.getPublisherId();\n }", "Event getEvent();", "@Autowired\n public SseController(EventPublisher publisher) {\n this.publisher = publisher;\n }", "public String getExampleEvent() {\n return exampleEvent;\n }", "public EventBus getEventBus(boolean force);", "@Test\n public void testLocalClient()\n {\n generateEvents(\"local-client\");\n checkEvents(true, false);\n }" ]
[ "0.6275361", "0.62688226", "0.62688226", "0.6143533", "0.6037624", "0.59537154", "0.5730499", "0.5658048", "0.5654504", "0.5645257", "0.5590175", "0.55785346", "0.5546829", "0.5450572", "0.54090405", "0.54046285", "0.53700197", "0.5359892", "0.52466965", "0.52286124", "0.5225954", "0.5215066", "0.5214629", "0.5203743", "0.52017295", "0.5185638", "0.5178158", "0.51641107", "0.51421046", "0.5132544", "0.5119819", "0.5106364", "0.5090355", "0.5087773", "0.5077059", "0.50748277", "0.50542456", "0.50532687", "0.50488865", "0.5026212", "0.50256574", "0.5021649", "0.5021619", "0.50111747", "0.5006336", "0.5005467", "0.50050586", "0.50012255", "0.49927813", "0.49762434", "0.49659464", "0.49543637", "0.49446493", "0.49400845", "0.49371418", "0.4934146", "0.49315295", "0.4922803", "0.49212447", "0.48985887", "0.48925444", "0.48912105", "0.48733678", "0.48707733", "0.4870599", "0.4859196", "0.48572233", "0.4854112", "0.48393112", "0.48320594", "0.4809762", "0.4806145", "0.4803087", "0.47991005", "0.47979867", "0.47961825", "0.47827658", "0.47624874", "0.4761298", "0.475783", "0.47576568", "0.47397494", "0.47188714", "0.47165126", "0.4709989", "0.47094044", "0.4708153", "0.4702517", "0.4701718", "0.46974105", "0.46955982", "0.46943012", "0.46932268", "0.46922833", "0.46892822", "0.46796808", "0.46732885", "0.4670588", "0.46695545", "0.4669501" ]
0.7521957
0
Gets the service that is need to be tested.
protected abstract IRawService<T> getApi();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Service getService() {\n return service;\n }", "public Object getService() {\n return service;\n }", "public AbstractService getService() {\n return service;\n }", "public Service getService() {\n\t\treturn _service;\n\t}", "public String getService() {\n\t\treturn service.get();\n\t}", "public String getService() {\n return service;\n }", "public String getService() {\n return service;\n }", "public String getService() {\n return service;\n }", "public Service getService() {\n return serviceInstance;\n }", "TestpressService getService() {\n if (CommonUtils.isUserAuthenticated(activity)) {\n try {\n testpressService = serviceProvider.getService(activity);\n } catch (IOException | AccountsException e) {\n e.printStackTrace();\n }\n }\n return testpressService;\n }", "Object getService(String serviceName);", "public String getService() {\n return this.service;\n }", "public String getService() {\n return this.service;\n }", "public String getService() {\n return this.service;\n }", "public static synchronized PlatformInit getService() {\n\t\tif(theService == null || theService.initialised)\n\t\t\treturn theService;\n\t\treturn null;\n\t}", "public Object getService(String serviceName);", "ClassOfService getClassOfService();", "public Class getServiceClass() { return serviceClass; }", "private HttpService getHTTPService() {\n\t\tHttpService sobjHTTPService = null;\n\t\tServiceReference srefHTTPService = bc\n\t\t\t\t.getServiceReference(HttpService.class.getName());\n\n\t\tif (srefHTTPService != null) {\n\t\t\tsobjHTTPService = (HttpService) bc.getService(srefHTTPService);\n\t\t} else {\n\t\t\tlogger.error(\"Could not find a HTTP service\");\n\t\t\treturn null;\n\t\t}\n\n\t\tif (sobjHTTPService == null) {\n\t\t\tlogger.error(\"Could retrieve the HTTP service\");\n\t\t\treturn null;\n\t\t}\n\n\t\treturn sobjHTTPService;\n\t}", "public final ITestReqmtService getTestReqmtService() {\r\n\t\treturn testReqmtService;\r\n\t}", "public EPPService getService() {\n\t\treturn service;\n\t}", "java.lang.String getService();", "java.lang.String getService();", "java.lang.String getService();", "public String getService(){\n\t\t return service;\n\t}", "public go.micro.runtime.RuntimeOuterClass.Service getService() {\n return service_ == null ? go.micro.runtime.RuntimeOuterClass.Service.getDefaultInstance() : service_;\n }", "public go.micro.runtime.RuntimeOuterClass.Service getService() {\n return service_ == null ? go.micro.runtime.RuntimeOuterClass.Service.getDefaultInstance() : service_;\n }", "public go.micro.runtime.RuntimeOuterClass.Service getService() {\n return service_ == null ? go.micro.runtime.RuntimeOuterClass.Service.getDefaultInstance() : service_;\n }", "Object getService(String serviceName, boolean checkExistence);", "public TTSService getService() {\n return TTSService.this;\n }", "public Service getService() {\n\t\treturn this;\n\t}", "public Class getServiceClass()\n {\n return serviceClass;\n }", "public go.micro.runtime.RuntimeOuterClass.Service getService() {\n if (serviceBuilder_ == null) {\n return service_ == null ? go.micro.runtime.RuntimeOuterClass.Service.getDefaultInstance() : service_;\n } else {\n return serviceBuilder_.getMessage();\n }\n }", "public go.micro.runtime.RuntimeOuterClass.Service getService() {\n if (serviceBuilder_ == null) {\n return service_ == null ? go.micro.runtime.RuntimeOuterClass.Service.getDefaultInstance() : service_;\n } else {\n return serviceBuilder_.getMessage();\n }\n }", "public go.micro.runtime.RuntimeOuterClass.Service getService() {\n if (serviceBuilder_ == null) {\n return service_ == null ? go.micro.runtime.RuntimeOuterClass.Service.getDefaultInstance() : service_;\n } else {\n return serviceBuilder_.getMessage();\n }\n }", "public static TargetService getService() {\n FacesContext context = FacesContext.getCurrentInstance();\n return (TargetService) context.getApplication().evaluateExpressionGet(\n context, \"#{targetServiceNH}\", TargetService.class);\n }", "public Service getService()\n {\n return (Service) getSource();\n }", "@Override\n public <T> T getToolService(Class<T> serviceClass)\n {\n if (serviceClass.isAssignableFrom(getClass()))\n {\n return (T)this;\n }\n return null;\n }", "public static String getServiceName() {\n\t\treturn serviceName;\n\t}", "public static String getServiceName() {\n\t\treturn serviceName;\n\t}", "public java.lang.CharSequence getService() {\n return service;\n }", "java.lang.String getServiceName();", "java.lang.String getServiceName();", "public java.lang.CharSequence getService() {\n return service;\n }", "@Override\n\tpublic BaseServic<Banco> getService() {\n\t\treturn service;\n\t}", "public String getServiceName()\n {\n return serviceName;\n }", "MainService getService() {\n return MainService.this;\n }", "public ResourceService getResourceService() {\n return resourceService;\n }", "public java.lang.String getServiceClass() {\n return serviceClass;\n }", "String getServiceName();", "String getServiceName();", "public String getServiceName();", "public String getServiceName()\r\n {\r\n return serviceName;\r\n }", "protected ParameterService getParameterService() {\n if (this.parameterService == null) {\n this.parameterService = KraServiceLocator.getService(ParameterService.class);\n }\n return this.parameterService;\n }", "public IServerService getService() {\n return ServerService.this;\n }", "public static IStrengthenService getInstance(ApplicationContext context) {\r\n\t\treturn (IStrengthenService) context.getBean(SERVICE_BEAN_ID);\r\n\t}", "public String getServiceName() {\n return serviceName;\n }", "public boolean getUseGlobalService();", "@Override\n\tprotected BaseService getService() {\n\t\treturn null;\n\t}", "public String getServiceName() {\n return serviceName;\n }", "public Text getService() {\n return service;\n }", "MyService getService() {\n return MyService.this;\n }", "public abstract String getServiceName();", "private PolicyService getService(String targetEndPoint)\n throws Exception\n {\n log.debug(\"\") ;\n log.debug(\"----\\\"----\") ;\n log.debug(\"setUp()\") ;\n log.debug(\" Target : '\" + targetEndPoint + \"'\") ;\n\n if ((null == targetEndPoint) || (targetEndPoint.length() <= 0))\n {\n targetEndPoint = CommunityConfig.getServiceUrl() ;\n }\n log.debug(\" Target : '\" + targetEndPoint + \"'\") ;\n\n PolicyServiceService locator = null;\n PolicyService service = null;\n //\n // Create our service locator.\n locator = new PolicyServiceServiceLocator();\n\n //\n // Create our service.\n service = locator.getPolicyService(new URL(targetEndPoint));\n\n log.debug(\"----\\\"----\") ;\n log.debug(\"\") ;\n return service;\n }", "public java.lang.String getService() {\n java.lang.Object ref = service_;\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 service_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getService() {\n java.lang.Object ref = service_;\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 service_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getService() {\n java.lang.Object ref = service_;\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 service_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getService() {\n java.lang.Object ref = service_;\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 service_ = s;\n return s;\n }\n }", "public java.lang.String getService() {\n java.lang.Object ref = service_;\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 service_ = s;\n return s;\n }\n }", "public java.lang.String getService() {\n java.lang.Object ref = service_;\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 service_ = s;\n return s;\n }\n }", "private PackageService getPackageService() {\n\t\treturn packageService;\n\t}", "private static synchronized InitiatorService getInitiatorService()\n {\n if (initiatorService.get() == null) {\n initiatorService.set(new InitiatorService());\n }\n return initiatorService.get();\n }", "<T> T getService(Class<T> type);", "private RepositoryService getRepositoryService() {\n\t\tif (repositoryService == null && getServletContext() != null) {\n\t\t\tthis.repositoryService = (RepositoryService) getServletContext().getAttribute(\"repositoryService\");\n\t\t}\n\t\treturn this.repositoryService;\n\t}", "@Override\n\t\tpublic Service getService() {\n\t\t\treturn new Implementation1();\n\t\t}", "public com.sohlman.liferay.foobar.service.FooService getFooService() {\n return fooService;\n }", "public DriverService getDriverService() {\n return driverService;\n }", "public String getServiceName() {\r\n return this.serviceName;\r\n }", "public String getServiceName() {\n return this.serviceName;\n }", "protected <T> T getService(Class<T> clazz) {\n \tfinal ServiceReference<T> ref = bundleContext.getServiceReference(clazz);\n \tassertNotNull(\"getService(\" + clazz.getName() + \") must find ServiceReference\", ref);\n \tfinal T result = (bundleContext.getService(ref));\n \tassertNotNull(\"getService(\" + clazz.getName() + \") must find service\", result);\n \treturn result;\n }", "ServiceEntity getService();", "public OrdersBusinessInterface getService() {\r\n\t\treturn service;\r\n\t}", "public String getTypeOfService(){\n\t\treturn typeOfService;\n\t}", "public CommonService getCommonService()\n {\n return commonService;\n }", "public String getServiceName(){\n return serviceName;\n }", "@Override\n\tpublic BaseService<Object> getService() {\n\t\treturn analyticsService;\n\t}", "public static IWebService getService(final Context context) {\n return getClient(context).mService;\n }", "public go.micro.runtime.RuntimeOuterClass.ServiceOrBuilder getServiceOrBuilder() {\n return getService();\n }", "public go.micro.runtime.RuntimeOuterClass.ServiceOrBuilder getServiceOrBuilder() {\n return getService();\n }", "public go.micro.runtime.RuntimeOuterClass.ServiceOrBuilder getServiceOrBuilder() {\n return getService();\n }", "public String getServiceName() {\n return this.serviceName;\n }", "public String getTypeOfService(){\n\treturn typeOfService;\n}", "public GameService getGameService() {\n return gameService;\n }", "public GameService getGameService() {\n return gameService;\n }", "public ConfigurationService getConfigurationService() {\n return configurationService;\n }", "public static void loadService() {\n Optional<EconomyService> optService = Sponge.getServiceManager().provide(EconomyService.class);\n if(optService.isPresent()) {\n service = optService.get();\n isLoaded = true;\n } else {\n isLoaded = false;\n }\n }", "public go.micro.runtime.RuntimeOuterClass.ServiceOrBuilder getServiceOrBuilder() {\n if (serviceBuilder_ != null) {\n return serviceBuilder_.getMessageOrBuilder();\n } else {\n return service_ == null ?\n go.micro.runtime.RuntimeOuterClass.Service.getDefaultInstance() : service_;\n }\n }", "public go.micro.runtime.RuntimeOuterClass.ServiceOrBuilder getServiceOrBuilder() {\n if (serviceBuilder_ != null) {\n return serviceBuilder_.getMessageOrBuilder();\n } else {\n return service_ == null ?\n go.micro.runtime.RuntimeOuterClass.Service.getDefaultInstance() : service_;\n }\n }", "public go.micro.runtime.RuntimeOuterClass.ServiceOrBuilder getServiceOrBuilder() {\n if (serviceBuilder_ != null) {\n return serviceBuilder_.getMessageOrBuilder();\n } else {\n return service_ == null ?\n go.micro.runtime.RuntimeOuterClass.Service.getDefaultInstance() : service_;\n }\n }", "public Mqttservice getService() {\n return Mqttservice.this;\n }", "public UserService getUserService() {\n return userService;\n }" ]
[ "0.7513106", "0.7397413", "0.72173417", "0.714994", "0.71355087", "0.70187396", "0.70187396", "0.70187396", "0.70179987", "0.70017", "0.68628716", "0.68606025", "0.68606025", "0.68606025", "0.6755573", "0.6751876", "0.66882885", "0.66565144", "0.6656379", "0.6637551", "0.6611557", "0.65965617", "0.65965617", "0.65965617", "0.65930074", "0.6589536", "0.6589536", "0.6589536", "0.6560244", "0.6558864", "0.65276194", "0.65030885", "0.6502202", "0.6502202", "0.6502202", "0.65007704", "0.6500117", "0.64398634", "0.64153385", "0.64153385", "0.64067227", "0.6403743", "0.6403743", "0.63937765", "0.63761866", "0.63753176", "0.6372735", "0.63692105", "0.63350636", "0.6331022", "0.6331022", "0.6324362", "0.6313398", "0.63090277", "0.6294376", "0.6281985", "0.6280342", "0.62721235", "0.6250937", "0.6228257", "0.6215877", "0.62023604", "0.6200806", "0.61902636", "0.6179933", "0.6179933", "0.6179933", "0.617934", "0.617934", "0.617934", "0.61784023", "0.6173967", "0.6170268", "0.6169071", "0.61650157", "0.6153521", "0.6148256", "0.614805", "0.61471534", "0.61454594", "0.6135939", "0.613475", "0.6134735", "0.6133707", "0.6131474", "0.6121835", "0.610128", "0.60932", "0.60932", "0.60932", "0.60799503", "0.6075376", "0.6050853", "0.6050853", "0.6047922", "0.6035179", "0.60277414", "0.60277414", "0.60277414", "0.6016314", "0.60097474" ]
0.0
-1
Gets the DAO mock.
protected abstract PagingAndSortingRepository<T, Long> getDAO();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static synchronized Dao getDao() {\r\n if (dao == null) {\r\n dao = new Dao();\r\n }\r\n return dao;\r\n }", "D getDao();", "public static IDAO DAO()\n {\n Log.d(TAG, \"DAO: Attempting get instance. Instance: \" + (DAO != null));\n if (DAO == null)\n {\n DAO = new DAOFactory().getDAO();\n Log.d(TAG, \"DAO: New DAO instance.\");\n }\n Log.d(TAG, \"DAO: Returning instance.\");\n return DAO;\n }", "public IDaoClient getDao() {\n\t\treturn dao;\n\t}", "@Override\n public OrdersDAO getOrdersDAO() {\n\n if (instanceOrdersDAO == null) {\n return new MySQLOrdersDAO(connection);\n } else {\n return instanceOrdersDAO;\n }\n }", "@Override\n\tpublic BaseDAO<Meeting> getDAO() {\n\t\treturn meetingDAO;\n\t}", "@Override\n\tpublic GenericDAO<Cliente, Integer> getDao() {\n\t\treturn clienteDAO;\n\t}", "@Override\n public final IGeneralDAO<ObjectAndSecurity, Integer> getDAO() {\n return objectAndSecurityDAOImplementation;\n }", "@Override\r\n\tpublic GenericDaoImpl<Bank, Long> getDao() {\n\t\treturn bankDao;\r\n\t}", "@Override\n public CheckDBDAO getInitDBDAO() {\n if (instanceCheckDBDAO == null) {\n return new MySQLCheckDBDAO(connection);\n } else {\n return instanceCheckDBDAO;\n }\n }", "public IDaoCompte getDao() {\n\t\treturn dao;\n\t}", "public static DAOFactory getInstance() {\r\n return instance;\r\n }", "public static synchronized DAOFactory getDAOFactory() {\r\n if (daof == null) {\r\n daoType = JDBCDAO;\r\n switch (daoType) {\r\n case JDBCDAO:\r\n daof = new JDBCDAOFactory();\r\n break;\r\n case DUMMY_DAO:\r\n daof = new InMemoryDAOFactory();\r\n break;\r\n default:\r\n daof = null;\r\n }\r\n }\r\n return daof;\r\n }", "@Override\r\n\tpublic DAOInterface getDAO() {\n\t\treturn new TimeSeriesDAO(context);\r\n\t}", "@Override\n public CarsDAO getCarsDAO() {\n if (instanceCarsDAO == null) {\n return new MySQLCarsDAO(connection);\n } else {\n return instanceCarsDAO;\n }\n }", "public GenericDAO getGenericDAO() {\n\t\treturn genericDAO;\n\t}", "protected DailyPolemicDao getDao() {\n\t\treturn (DailyPolemicDao)super.getDao();\n\t}", "private static OfferDAO getOfferDAO() {\n DbConnection dbConnection = new DbConnection();\n DBI dbi = dbConnection.getDBConnection();\n OfferDAO offerDAO = dbi.onDemand(OfferDAO.class);\n return offerDAO;\n }", "protected abstract Dao getDaoIntance(Context context);", "public static FlightDAOImp getFlightDAO(){\n if(flightDataObject == null){\n flightDataObject = new FlightDAOImp();\n }\n return flightDataObject;\n }", "public ServiceDAO getServiceDAO() {\n\t\treturn serviceDAO;\n\t}", "private static AnnualLeaseDAO getDAO() throws DAOSysException {\n\t\tif (dao == null)\t{\n\t\t\tdao = (AnnualLeaseDAO) DAOFactory.getDAO(\"marina.AnnualLease\");\n\t\t}\n\n\t\treturn dao;\n\t}", "public static synchronized DAO getInstance(){\n\t if (instance == null)\n\t instance = new DAOImpl();\n\t return instance; \n\t }", "public static UserDAO getDAO() throws UserDAOSysException\r\n {\r\n UserDAO dao = null;\r\n try\r\n {\r\n dao = new UserDAOImpl();\r\n }\r\n catch (Exception se)\r\n {\r\n throw new UserDAOSysException(\"UserDAOFactory.getDAO: Exception while getting DAO type : \\n\" + se.getMessage());\r\n }\r\n\r\n return dao;\r\n }", "public Class<?> getDaoClass() {\n return daoClass;\n }", "@Override\r\n\tpublic Idao getDao() {\n\t\treturn new FilesystemIdao();\r\n\t}", "@Override\n\tprotected UserDAO getDao() {\n\t\treturn userDAO;\n\t}", "public static ChoiceDAO getDAO() throws ChoiceDAOSysException\r\n {\r\n ChoiceDAO dao = null;\r\n\r\n try\r\n {\r\n dao = new ChoiceDAOImpl();\r\n }\r\n catch (Exception se)\r\n {\r\n throw new ChoiceDAOSysException(\r\n \"ChoiceDAOFactory.getDAO: Exception while getting DAO type : \\n\" +\r\n se.getMessage());\r\n }\r\n\r\n return dao;\r\n }", "public static AccountDAOImp getAccountDAO(){\n if(accountDataObject == null){\n accountDataObject = new AccountDAOImp();\n }\n return accountDataObject;\n }", "public static UserDAOImp getUserDAO(){\n if(userDataObject == null){\n userDataObject = new UserDAOImp();\n }\n\t\t\n\treturn userDataObject;\n }", "public abstract IBaseExtenseDao<T> getDao();", "@Override\n\tpublic BaseDao<SunTempRecord, String> getDao() {\n\t\treturn SunTempRecordDao;\n\t}", "@Override\n public BrandsDAO getBrandsDAO() {\n\n if (instanceBrandsDAO == null) {\n return new MySQLBrandsDAO(connection);\n } else {\n return instanceBrandsDAO;\n }\n }", "public Dao<Locator, Integer> getLocatorDao() throws SQLException {\n\t\tif (locatorDao == null) {\n\t\t\tlocatorDao = getDao(Locator.class);\n\t\t}\n\t\treturn locatorDao;\n\t}", "public abstract BusinessDAO getBusinessDAO();", "public LdPublisherDao getMyDao() {\r\n return _dao;\r\n }", "public synchronized OrderDAO getOrderDAO() {\n\t\treturn new OrderDAO(this);\n\t}", "public synchronized RoomDAO getRoomDAO() {\n\t\treturn new RoomDAO(this);\n\t}", "protected abstract MDao<E, ID> getDao();", "@Override\n\tpublic DocumentacionDAO getDocumentacionDAO() {\n\t\treturn new MySqlDocumentacionDAO();\n\t}", "public abstract DbDAO AccessToDAO();", "public static BookingDAOImp getBookingDAO(){\n if(bookingDataObject == null){\n bookingDataObject = new BookingDAOImp();\n }\n return bookingDataObject;\n }", "public MatchDAO getMatchDAO() {\n return matchDAO;\n }", "public Dao getInstance() {\n\t\treturn INSTANCE;\n\t}", "@Override\n\tpublic BaseDAO getBaseDao() {\n\t\treturn spaceDao;\n\t}", "public abstract AccountDAO getAccountDAO();", "@Override\n\tpublic TelefonoDAO getTelefonoDAO() {\n\t\treturn new JPATelefonoDAO();\n\t}", "public DAODomande getDaoDomande() {\n return daoDomande;\n }", "public TransitionDepartureSettlementMapper getActualDao() {\n\t\treturn (TransitionDepartureSettlementMapper) getDao();\n\t}", "@Override\n\tpublic BaseDAO getBaseDao() {\n\t\treturn userDao;\n\t}", "@Override\r\n\tprotected DAO<UnidadFuncional_VO> getDao() {\n\t\treturn null;\r\n\t}", "public static DaoFactory getInstance(){\n\t\tif(daoFactory==null){\n\t\t\tdaoFactory = new DaoFactory();\n\t\t}\n\t\treturn daoFactory;\n\t}", "public ActividadDAO getActividadDAO() {\n return actividadDAO;\n }", "public RuntimeExceptionDao<Locator, Integer> getLocatorDataDao() {\n\t\tif (locatorRuntimeDao == null) {\n\t\t\tlocatorRuntimeDao = getRuntimeExceptionDao(Locator.class);\n\t\t}\n\t\treturn locatorRuntimeDao;\n\t}", "private LivreDAO getLivreDAO() {\r\n return this.livreDAO;\r\n }", "@Override\n\tpublic GenericDao<LoanEligibility, Long> getDao() {\n\t\treturn loanEligibilityRepository;\n\t}", "@Override\n\tpublic TelefonoDAO getTelefonoDAO() {\n\t\treturn new JDBCTelefonoDAO();\n\t}", "public LookupDao getLookupDao() {\n return lookupDao;\n }", "@Override\r\n public TicketDAO getTicketDAO() {\n return new MySQLTicketDAO();\r\n }", "@Override\n\tprotected IBaseDao getDao() {\n\t\treturn basicPeopleDao;\n\t}", "@Override\n public UsersDAO getUsersDAO() {\n if (instanceUsersDAO == null) {\n return new MySQLUsersDAO(connection);\n } else {\n return instanceUsersDAO;\n }\n }", "private OrderFacade(){\n\t\tAbstractDAOFactory f = new MySQLDAOFactory();\n \tthis.odao = f.getOrderDAO();\n\t}", "public DAOProvider getDaoprovider() {\r\n return daoprovider;\r\n }", "@Override\n\tpublic RegdetailsHibernateDAO getRegdetailsDAO() {\n\t\treturn (RegdetailsHibernateDAO)instantiateDAO(RegdetailsHibernateDAO.class);\n\t}", "@Override\n public ModelDAO getModelDAO() {\n return null;\n }", "@Override\n\tpublic CrudRepository<Sede, Integer> getDao() {\n\t\treturn sedeDaoAPI;\n\t}", "public PisoDAO createPisoDAO() {\n\n if (pisoDAO == null) {\n pisoDAO = new PisoDAO();\n }\n return pisoDAO;\n }", "public abstract RepoDao getRepoDao();", "public ItemTesteDao getItemTesteDao() {\r\n\t\treturn itemTesteDao;\r\n\t}", "public LdDaoWritable getDaoWritable() {\r\n return getMyDao();\r\n }", "public static EmployeeDao getInstance() {\n\n\t\treturn babyMemberDao;\n\t}", "public static DaoFactory getInstance() {\n if (daoFactory == null) {\n synchronized (DaoFactory.class) {\n if (daoFactory == null) {\n daoFactory = new JDBCDaoFactory();\n }\n }\n }\n return daoFactory;\n }", "@Override\n\tpublic IngresoDAO getIngresoDAO() {\n\t\treturn new MySqlIngresoDAO();\n\t}", "@Override\n\tpublic UsuarioDAO getUsuarioDAO() {\n\t\treturn new MySqlUsuarioDAO();\n\t}", "public BeanDAO<BEAN, KEY> getBeanDAO() {\n\t\treturn beanDAO;\n\t}", "public Dao<Lock, Integer> getLockDao() throws SQLException {\n\t\tif (lockDao == null) {\n\t\t\tlockDao = getDao(Lock.class);\n\t\t}\n\t\treturn lockDao;\n\t}", "@Override\n\tpublic OperadoraDAO getOperadoraDAO() {\n\t\treturn new JPAOperadoraDAO();\n\t}", "private MembreDAO getMembreDAO() {\r\n return this.membreDAO;\r\n }", "public LdDaoReadable getDaoReadable() {\r\n return getMyDao();\r\n }", "public OrderDAO getOdao() {\n\t\treturn this.odao;\n\t}", "@Override\n\tpublic RegisterHibernateDAO getRegisterDAO() {\n\t\treturn (RegisterHibernateDAO)instantiateDAO(RegisterHibernateDAO.class);\n\t}", "public synchronized CustomerDAO getCustomerDAO() {\n\t\treturn new CustomerDAO(this);\n\t}", "public interface DaoFactory {\r\n\r\n\t/**\r\n\t * Returns objects for access to account table.\r\n\t * \r\n\t * @return DAO for account table.\r\n\t */\r\n\tpublic GenericDao<Account> getAccountDao();\r\n\r\n\t/**\r\n\t * Returns objects for access to client table.\r\n\t * \r\n\t * @return DAO for client table.\r\n\t */\r\n\tpublic GenericDao<Client> getClientDao();\r\n\r\n\t/**\r\n\t * Returns objects for access to payment table.\r\n\t * \r\n\t * @return DAO for payment table.\r\n\t */\r\n\tpublic GenericDao<Payment> getPaymentDao();\r\n\r\n\t/**\r\n\t * Returns objects for access to credit card table.\r\n\t * \r\n\t * @return DAO for credit card table.\r\n\t */\r\n\tpublic GenericDao<CreditCard> getCreditCardDao();\r\n\r\n\t/**\r\n\t * Returns objects for access to authorization table.\r\n\t * \r\n\t * @return DAO for authorization table.\r\n\t */\r\n\tpublic GenericDao<Autorization> getAutorizationDao();\r\n\r\n\t/**\r\n\t * This method returns connection for accessing to database.\r\n\t * \r\n\t * @return\r\n\t */\r\n\tpublic Connection getConnection();\r\n\r\n}", "public static HibernateToListDAO getInstance()\r\n\t{\r\n\t\tif(_instanceDAO == null) {\r\n\t\t\t_instanceDAO = new HibernateToListDAO();\r\n\t }\r\n\t\treturn _instanceDAO;\r\n\t}", "private ReservationDAO getReservationDAO() {\r\n return this.reservationDAO;\r\n }", "public DiaryEntriesDAO getDiaryDAO() throws SQLException {\n if (diaryDao == null) {\n diaryDao = new DiaryEntriesDAO(getConnectionSource(), DiaryEntry.class);\n }\n return diaryDao;\n }", "public Dao<Place, Integer> getPlaceDAO() throws java.sql.SQLException {\n if(placeDAO == null) placeDAO = getDao(Place.class);\n return placeDAO;\n }", "public RuntimeExceptionDao<Lock, Integer> getLockDataDao() {\n\t\tif (lockRuntimeDao == null) {\n\t\t\tlockRuntimeDao = getRuntimeExceptionDao(Lock.class);\n\t\t}\n\t\treturn lockRuntimeDao;\n\t}", "public static LessonDAO getLessonDAO() {\n return new LessonDAO(entityManager, Lesson.class);\n }", "public GenericDao<Payment> getPaymentDao();", "public static DDBUserPointDAO getInstance() {\r\n\t\tif (instance == null) {\r\n\t\t\tconfig = new GeoDataManagerConfiguration(client, DynamoDBConfiguration.USER_POINT_TABLE_NAME);\r\n\t\t\tgeoDataManager = new GeoDataManager(config);\r\n\t\t\t\r\n\t\t\tmapper = new ObjectMapper();\r\n\t\t\tfactory = mapper.getJsonFactory();\r\n\t\t\tinstance = new DDBUserPointDAO();\r\n\t\t}\r\n\r\n\t\treturn instance;\r\n\t}", "@Override\n\tpublic TipoTelefonoDAO getTipoTelefonoDAO() {\n\t\treturn new JPATipoTelefonoDAO();\n\t}", "@Override\n\tpublic AttachmentHibernateDAO getAttachmentDAO() {\n\t\treturn (AttachmentHibernateDAO)instantiateDAO(AttachmentHibernateDAO.class);\n\t}", "private InFridgeDao getInFridgeDao() {\n\t\tif (inFridgeDao == null) {\n\t\t\tinFridgeDao = getDaoSession().getInFridgeDao();\n\t\t}\n\t\treturn inFridgeDao;\n\t}", "@Override\n\tpublic ColegioDAO getColegioDAO() {\n\t\treturn new MySqlColegioDAO();\n\t}", "public Dao<User, Integer> getUserDao() throws SQLException {\n\t\tif (userDao == null) {\n\t\t\tuserDao = getDao(User.class);\n\t\t}\n\t\treturn userDao;\n\t}", "public synchronized FormDAO getFormDAO() {\n\t\treturn new FormDAO(this);\n\t}", "@Override\n\tprotected IEfDeviceAlarmTargetDao getEntityDao() {\n\t\treturn dao;\n\t}", "public ISegUsuarioDAO getSegUsuarioDAO() {\r\n return new SegUsuarioDAO();\r\n }", "@Override\n\tprotected BaseDao getBaseDao() {\n\t\treturn null;\n\t}", "public EmployeesHibernateDAO getEmployeesDAO() {\n\t\treturn (EmployeesHibernateDAO)instantiateDAO(EmployeesHibernateDAO.class);\n\t}" ]
[ "0.7355213", "0.72510487", "0.72343415", "0.72298306", "0.7089849", "0.6927662", "0.6867179", "0.6834117", "0.6813391", "0.6799855", "0.6783293", "0.67625797", "0.67433167", "0.67251396", "0.66807556", "0.667493", "0.66327536", "0.66215193", "0.6619721", "0.6597695", "0.6588843", "0.6566894", "0.6526547", "0.65215296", "0.64891964", "0.6484566", "0.6477161", "0.64656574", "0.64456075", "0.64392835", "0.6425874", "0.64043826", "0.63835114", "0.6379893", "0.63783073", "0.6374378", "0.63151926", "0.6290947", "0.6280665", "0.6276471", "0.6269604", "0.6253315", "0.6246519", "0.62409323", "0.62319994", "0.6212782", "0.6200337", "0.6187232", "0.6185526", "0.6174137", "0.61648154", "0.61470467", "0.612849", "0.6125645", "0.6122632", "0.61199546", "0.61186016", "0.6105521", "0.6089163", "0.6085925", "0.6076847", "0.60691214", "0.6061279", "0.6060728", "0.60597634", "0.6052235", "0.6018917", "0.6013005", "0.60025406", "0.59993356", "0.5993321", "0.5981985", "0.5978975", "0.59787923", "0.5978494", "0.59652174", "0.5958947", "0.5953455", "0.5948048", "0.594408", "0.592907", "0.59234273", "0.5922679", "0.5917525", "0.5903838", "0.5896426", "0.588436", "0.58793354", "0.5873287", "0.5870851", "0.5867663", "0.58649766", "0.58619094", "0.5860985", "0.58604217", "0.584942", "0.58420306", "0.58348584", "0.58282936", "0.58225447", "0.5821095" ]
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { String str = "swati"; int i = 0; System.out.println(str.charAt(i)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
Number will terminate only if its prime factorization is 2^a 5^a
public static void main(String[] args) { int maxRepeats = 0, number = -1; for(int i = 1; i < 1000; i++) { if(!willTerminate(i)) { List<Integer> remainders = new ArrayList<Integer>(); int repeats = numberOfRepeats(i, remainders); if(repeats > maxRepeats) { maxRepeats = repeats; number = i; } } } System.out.println(number); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void primeNumber(int a)\n { boolean result = false;\n int i;\n if(a!=1)\n {\n for( i=2;i<a;i++)\n {\n if(a%i==0)\n {\n break;\n }\n\n }\n if(a==i)\n {\n System.out.println(i);\n result=true;\n }\n }\n }", "static boolean isPrime(long num) {\n\t\tif(num==1)\n\t\t\treturn false;\n\t\tif(num==2 || num==3)\n\t\t\treturn true;\n\t\t\n\t\tif(num%2==0 || num%3==0)\n\t\t\treturn false;\n\t\t\n\t\tfor(int value=5; value*value<=num; value+=6)\n\t\t\tif(num%value==0 || num%(value+2)==0)\n\t\t\t\treturn false;\n\t\t\n\t\treturn true;\n\t}", "private long largestPrimeFactor(long number)\n\t{\n\t\tfor(int i = 2; i<=number; i++)\n\t\t{\n\t\t\tif(number % i == 0 && number > i)\n\t\t\t{\n\t\t\t\twhile(number % i == 0)\n\t\t\t\t{\n\t\t\t\t\tnumber = number / i;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(i >= number)\n\t\t\t\treturn i;\n\t\t}\n\t\treturn 0;\n\t}", "@Override\n public boolean isPrime(int value){\n if (value == 0 || value == 1){\n return false;\n }\n // Check all numbers up to the square root of the number\n for (int i = 2; i*i < value+1; i++) {\n if (value % i == 0) {\n return false;\n }\n }\n return true;\n }", "public static boolean isPrime(BigInteger n) {\n\t\tglobalLog.stepIn(\"isPrime(\" + n.toString() + \")\");\n\t\tprimeLog.stepIn(\"isPrime(\" + n.toString() + \")\");\n\t\t// Use some other function if n is sufficiently small (n<=10^10)\n\t\tif (n.compareTo(BigInteger.valueOf(10000000000l)) <= 0) {\n\t\t\tprimeLog.log(\"The number \" + n.toString() + \" is small enough to be checked normally.\");\n\t\t\treturn isPrime(n.longValue());\n\t\t} else if (!n.testBit(0)) {\n\t\t\tprimeLog.log(\"The number \" + n.toString() + \" is even so it is composite.\");\n\t\t\treturn false;\n\t\t}\n\t\tprimeLog.log(\n\t\t\t\t\"The number \" + n.toString() + \"is too large and will be checked with Rabin Miller primality test.\");\n\n\t\t// Find values to the equation n=2^s*m where s is as large as possible\n\t\tint s = 0;\n\t\t// Find out how many times we can divide (n-1) by 2\n\t\tBigInteger nMinusOne = n.subtract(BigInteger.ONE);\n\t\twhile (!nMinusOne.testBit(s)) {\n\t\t\ts++;\n\t\t}\n\t\t// Find k by calculating n>>s\n\t\tBigInteger m = nMinusOne.shiftRight(s);\n\t\tprimeLog.log(n.toString() + \" - 1 = 2^\" + s + \" * \" + m.toString());\n\n\t\tint prime = 0;\n\t\tint composite = 0;\n\n\t\t// Check to see if n is prime using base a\n\t\tlong maxValue = n.bitLength() > 63 ? Long.MAX_VALUE : n.longValue();\n\t\tfor (int i = 0; i < PRIMALITY_CHECK_ITERATIONS; i++) {\n\t\t\tprimeLog.stepIn(\"Trial \" + i);\n\t\t\tBigInteger a = BigInteger.valueOf(randomLong(2, maxValue - 2));\n\t\t\tprimeLog.log(\"Checking if n is prime using a=\" + a.toString() + \".\");\n\t\t\t// First iteration is a^m % n\n\t\t\tBigInteger res = a.modPow(m, n);\n\t\t\tprimeLog.log(\"a^m % n = \" + res.toString());\n\t\t\t// On first iteration if |a^m mod n| = 1 then say it is prime\n\t\t\tif (res.equals(BigInteger.ONE) || res.equals(nMinusOne)) {\n\t\t\t\tprimeLog.log(\"We can declare that \" + n.toString() + \" is prime.\");\n\t\t\t\tprimeLog.stepOut();\n\t\t\t\tprime++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tboolean flag = false;\n\t\t\tfor (int j = 1; !flag && j < s; j++) {\n\t\t\t\tres = res.modPow(BigInteger.valueOf(2), n);\n\t\t\t\tprimeLog.log(\"a^(2^\" + j + \" * m) % n = \" + res.toString());\n\t\t\t\tif (res.equals(BigInteger.ONE)) {\n\t\t\t\t\t// If a^[(2^j)*m] % n = 1 then we say is is composite\n\t\t\t\t\tprimeLog.log(\"We can declare that \" + n.toString() + \" is composite.\");\n\t\t\t\t\tcomposite++;\n\t\t\t\t\tflag = true;\n\t\t\t\t} else if (res.equals(nMinusOne)) {\n\t\t\t\t\tprimeLog.log(\"We can declare that \" + n.toString() + \" is prime.\");\n\t\t\t\t\t// If a^[(2^j)*m] % n = -1 then we say is is prime\n\t\t\t\t\tprime++;\n\t\t\t\t\tflag = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!flag) {\n\t\t\t\tprimeLog.log(\"We can declare that \" + n.toString() + \" is composite.\");\n\t\t\t\tcomposite++;\n\t\t\t}\n\t\t\tprimeLog.stepOut();\n\t\t}\n\t\tprimeLog.log(\"Out of \" + (prime + composite) + \" trials, \" + prime + \" trials claimed n was prime.\");\n\t\tprimeLog.log(\"n is prime: \" + (prime > composite));\n\t\tglobalLog.appendToCurrent(\": \" + (prime > composite));\n\t\tglobalLog.stepOut();\n\t\tprimeLog.appendToCurrent(\": \" + (prime > composite));\n\t\treturn prime > composite;\n\t}", "static boolean isPrime(int a){ //isPrime function evaluates if the int is prime takes int and returns boolean\n //logic:\n //a number is prime if no other number is divisible by it other than 1 and itself.\n //algorithim: modulos every number until n to see if is divisible and modulos == 0 \n //faster way: check everynumber up until half of the the number. ( int division will cut off the decimal ) since if it is double, it will also be divisible by 2\n //not, start the loop after 1 because 1 is neither prime nor composite\n if ( a == 1){\n System.out.println(\"Error: 1 is neither prime nor composite\");\n return false;\n }//end if\n for(int i = 2; i <= (a/2); i++){\n if(a % i == 0)//if the number is divisible by any number other than itself then it is not prime.\n return false;\n }//end for\n return true; //if the number succesfully passes through the loop then it is a prime number and return true\n \n }", "public static void Prime(int number)\n\t {\n\t \tboolean isPrime=true;\n\t \tfor(int i=2;i<=number/2;i++)\n\t \t{\n\t \tint temp;\n\t \t\n\t \ttemp=number%i;\n\t \tif(temp==0) \n\t \t{\n\t \t\tisPrime=false;\n\t \t\tFactorization(number); //Calling Factorization method\n\t \t\tbreak;\n\t \t\t\n\t \t}\n\t \t\n }\n\t \tif(isPrime)\n\t \t{\n\t \t\tSystem.out.println(\"Entered number is prime number\");\n\t\t \tcheck();\t\n\t \t}\n\t}", "public boolean isPrime()\r\n\t{\r\n\t\tif (currentNumber == 2 || currentNumber == 0)\r\n\t {\r\n\t \tprocessLastDigit();\r\n\t\t\treturn true;\r\n\t }\r\n\t\telse if (currentNumber % 2 == 0)\r\n\t {\r\n\t \treturn false;\r\n\t }\r\n \r\n\t for (int factor = 3; factor <= Math.sqrt(currentNumber); factor += 2)\r\n\t {\r\n\t if(currentNumber % factor == 0)\r\n\t {\r\n\t \treturn false;\r\n\t }\r\n\t }\r\n \tprocessLastDigit();\r\n\t return true;\r\n\t}", "static boolean isPrime(long n)\n {\n // Corner cases\n if (n <= 1)\n return false;\n if (n <= 3)\n return true;\n \n // This is checked so that we can skip\n // middle five numbers in below loop\n if (n % 2 == 0 || n % 3 == 0)\n return false;\n \n for (int i = 5; i * i <= n; i = i + 6)\n if (n % i == 0 || n % (i + 2) == 0)\n return false;\n \n return true;\n }", "public static void main(String[] args) {\n int num = 1500000;\n boolean flag = false;\n for (int i = 2; i <= num / 2; ++i) {\n // condition for nonprime number\n if (num % i == 0) {\n flag = true;\n break;\n }\n }\n\n if (!flag)\n System.out.println(num + \" is a prime number.\");\n else\n System.out.println(num + \" is not a prime number.\");\n\n }", "public static boolean isPrime(int n) {\n \n if (n % 2 == 0) {\n return n == 2; //If n is divisible by 2, then it is prime only if n is 2\n }\n if (n % 3 == 0) {\n return n == 3; //If n is divisible by 3, then it is prime only if n is 3\n }\n int step = 4;\n int counter = (int)Math.sqrt(n) + 1; //The maximum number that needs to be checked is the square root of the candidate + 1\n for(int i = 5; i < counter; step = 6-step, i += step) {\n if (n % i == 0) {\n return false;\n }\n }\n \n return true;\n\n }", "public static void run(){\n //--- --- --- --- --- ---\n //first find the facter of the num\n //second check if the second is a factor of it\n\n System.out.print (\"Please Enter the Base: \");\n int f = Input.input.nextInt ();\n System.out.print (\"Please Enter the Potential Factor: \");\n int p = Input.input.nextInt ();\n\n ArrayList<Integer> primeFactors = new ArrayList<Integer> ();\n while (f % 2 == 0) {\n primeFactors.add ( 2 );\n f /= 2;\n }\n // n must be odd at this point. So we can\n // skip one element (Note i = i +2)\n for (int i = 3; i <= Math.sqrt(f); i += 2) {\n // While i divides n, print i and divide n\n while (f % i == 0) {\n primeFactors.add ( i );\n f /= i;\n }\n }\n // This condition is to handle the case whien\n // n is a prime number greater than 2\n if (f > 2)\n primeFactors.add ( f );\n\n System.out.println ( primeFactors);\n }", "@Test\n public void testFactorialValid()\n {\n driver.findElement(By.linkText(\"Factorial\")).click();\n driver.findElement(By.name(\"value\")).sendKeys(\"7\");\n WebElement submit = driver.findElement(By.cssSelector(\"input\"));\n submit.sendKeys(Keys.RETURN);\n WebElement e = driver.findElement(By.className(\"jumbotron\"));\n String s1 = e.getText();\n assertTrue(s1.contains(\"5040\"));\n //NKD: Would prefer for this to be calculated by some function, rather than a magic number\n //However, java.lang.Math doesn't have fibonacci or factorial functions AFAIK\n }", "static void checkPrime(){\n\t\tint n1=78;\r\n\t}", "public Boolean isPrime(int n) {\n if (n == 2) {\n return false;\n }\n if (n == 3) {\n return true;\n }\n if (n%2 == 0) {\n return false;\n }\n if (n%3 == 0) {\n return false;\n }\n\n int a = 5;\n int b = 2;\n\n while (a*a <= n) {\n if (n%a == 0) {\n return false;\n }\n a += b;\n b = 6 - b;\n }\n return true;\n }", "private static boolean isPrime(int number) {\n\n\t\tif (number <= NUMBER_ONE) {\n\t\t\treturn false; \n\t\t}\n\n\t\tfor (int i = NUMBER_TWO; i < number; i++) {\n\t\t\tif (number % i == NUMBER_ZERO) { \n\t\t\t\treturn false; \n\t\t\t}\n\t\t}\n\t\treturn true; \n\t}", "public static boolean isPrime(int n) \n{ \n//base case \nif (n <= 1) \nreturn false; \n//loop executes from 2 to n-1 \nfor (int i = 2; i < n; i++) \nif (n % i == 0) \n//returns false if the condition returns true \nreturn false; \n//returns true if the condition returns false \nreturn true; \n}", "public int primetest(int primenumber){ // method tests if number is prime\n\t\tfor (int j=2; j < prime.size()+2; j++){\n\t\t\tif ((primenumber % prime.get(j-2)) == 0){\n \t \t\t\treturn 0;\n \t \t\t}\n \t\t}\n \t\tprime.add(prime.size(), primenumber);\n \t\treturn 1;\n\n\t}", "private static boolean isPrimeNumber(double number) {\n\t\tif(number <= 0)\n\t\t\treturn false;\n\t\tif(number == 1)\n\t\t\treturn true;\n\t\t\t\n\t\tfor (double i = 2; i < number; i++) {\t\t\t\n\t\t\tif((number%i == 0))\n\t\t\t\treturn false;\t\t\t\t\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "private static boolean isPrime(int number){\n for(int divisor = 2; divisor <= number / 2; divisor++){\n if(number % divisor == 0){ // If true. number is not prime\n return false;\n }\n }\n return true; // Number is prime\n }", "private boolean esPrimo(int n)\r\n {\r\n for (int i = 3; i < (int) Math.sqrt(n); i+=2) {\r\n if (n%i == 0) return false;\r\n }\r\n return true;\r\n }", "public boolean isPrime(){\r\n\t\tfor (int i = 2; i<value; i++){\r\n\t\t\tif(value/i==0){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public static void main(String[] args) {\n BigDecimal i;\n BigDecimal factor = new BigDecimal(\"600851475143\");\n \t\t\t\t\t\t\t\t\t\t\t\n /* Start factoring from 2\n * Increase the divisor by 1 -- brute force!!\n * \n */\n\t\t\t\tfor(i= new BigDecimal(\"2\");i.compareTo(factor) <= 0;i=i.add(BigDecimal.ONE)){\n\t\t\t\t\t\n\t\t\t\t\t/* divide the factor by incremental value of i, if the remainder is 0, \n\t\t\t\t\t * the dividend is divisible by the value of divisor\n\t\t\t\t\t */\n\t\t\t\t\tif(factor.remainder(i).intValue()==0) {\n\t\t\t\t\t\t\n System.out.println(\"Factors: \" + i);\n \n /* update the value of factor to the new dividend\n * \n */\n factor = factor.divide(i);\t\t\t\t\t\t\n\t\t\t\t\t} \n\t\t\t\t\t\n }\n\t\t\t\t\n\t\t}", "public static boolean isPrimeIter(int n) {\n System.out.println(\"Entering isPrimeIter\");\n if (n <= 3) {\n return n > 1;\n }\n if (n % 2 == 0 || n % 3 == 0) {\n return false;\n }\n\n //check if n has a multiple between 5 and sqrt(n)\n for (int i = 5; i * i <= n; i += 6) {\n if (n % i == 0 || n % (i + 2) == 0) {\n return false;\n }\n }\n System.out.println(\"Leaving isPrimeIter\");\n return true;\n }", "private boolean isPrime(int number) {\n if (number < 2) return false;\n if (number == 2) return true;\n if (number % 2 == 0) return false;\n for (int i = 3; i * i <= number; i += 2)\n if (number % i == 0) return false;\n return true;\n }", "private boolean isprime(long i) {\n\t\t\n\t\tif(i<=2) \n\t\treturn true;\n\t\tfor(long n = 2;n< i;n++) {\n\t\t\tif(i%n ==0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public static boolean f(long n) {\r\n boolean boo1 = true;\r\n // boo = true if the number is prime, & false otherwise.\r\n if (n <= 1) { // 0 and 1 arent prime numbers.\r\n boo1 = false;\r\n } else {\r\n for (int i = 2; i < n; i++) {\r\n // the condition has to be i < n so n (especially prime) wouldn't be divided itself.\r\n if (n % i == 0)\r\n boo1 = false;\r\n }\r\n }\r\n return boo1;\r\n }", "public static boolean isPrime(int value) {\n /* counter keep track of number of modulo operation\n in prime number,the modulus returns 0 two times only\n 1.when it is devided by 1\n 2.when it is devided by it self \n */\n int counter = 0;\n // zero , one is not prime\n if (value == 0 || value == 1) {\n counter = 0;\n } else {\n // starting from 2,doing modulus operation\n for(int i = 2;i<=value;i++){\n if (value%i==0) {\n counter++;\n }\n }\n }\n // checking the counter,we done modulus starting from 2,so we don't have to consider 1st case\n // counter is one means the value is only devisible by it self(2nd case)\n if (counter==1) {\n return true;\n }\n // if the number is devisible by numbers other than one and the number it self,then it is not prime\n else{\n return false;\n } \n }", "public void setIsPrime()\n\t{\n\t\tint divisor = 2;\n\t\tdo\n\t\t{\n\t\t\tif (number % divisor == noRemainder)\n\t\t\t{\n\t\t\t\texactDivision = true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\texactDivision = false;\n\t\t\t}\n\t\t\tdivisor++;\n\t\t} while (divisor < number && exactDivision == false);\n\t}", "public static void test(){\n int[] a = {3,6,9, 12,81,72};\n int n = 648;\n boolean flag = areFactors(n, a);\n if(flag == true){\n System.out.println(n +\" is divisible by all elements of array.\");\n }\n else{\n System.out.println(n + \" fails the test.\");\n }\n }", "private static boolean isPrimeLambda(int number) {\t\t\n\t\treturn number > 1 && IntStream.range(2, number).noneMatch(index -> number % index == 0);\n\t}", "public void PrimeFacor(int numberToFactorize) {\n\n System.out.println(\"Prime factors of \" + numberToFactorize + \" are ::\");\n\n for (int i = 2; i < numberToFactorize; i++) {\n\n while (numberToFactorize % i == 0) {\n System.out.println(i + \" \");\n numberToFactorize = numberToFactorize / i;\n\n }\n }\n if (numberToFactorize > 2) {\n System.out.println(numberToFactorize);\n }\n }", "public static void primeCheck(int num){\n \n boolean divisible = false;\n for(int i = 2;i<num;i++){\n if(num%i==0&&num!=i){\n divisible = true;\n }\n }\n if(divisible==true){\n System.out.println(\"The number is not a prime.\");\n }\n else{\n System.out.println(\"The number is a prime.\");\n }\n }", "public boolean checkPerfectNumber(int num) {\n //num == 1 is special case.\n if(num == 1) return false;\n int sum = 1;\n for(int i = 2; i <= Math.sqrt(num); i++){\n if(num%i == 0){\n if(i == num/i) sum+=i;\n else sum = sum+i+num/i;\n }\n }\n return sum == num;\n }", "private boolean isPrime(int x) {\n for (int i = 2; i <= x / i; i++) {\n if (x % i == 0) {\n return false;\n }\n }\n return true;\n }", "private static boolean isPrime(long n)\r\n {\r\n //Variable that will be returned, by default true\r\n boolean prime = true;\r\n //Start at 3 and increment by 2\r\n for(int i = 3;i<n/2;i=i+2)\r\n {\r\n //If the remainder of the division of n by i is 0, return prime as false \r\n if(n%i==0)\r\n {\r\n prime = false;\r\n return prime;\r\n }\r\n }\r\n //return the default value if the program gets to here\r\n return prime;\r\n }", "public static void primeNumber() {\n\t\tboolean isprimeNumber = false;\n\t\tSystem.out.println(\"prime numbers between 1 and 1000 are\");\n\n\t\tfor (int i = 2; i <1000; i++) {\n\t\tif(calculation(i)==true)\n\t\t{\n\t\t\tSystem.out.println(i);\n\t\t\tprime++;\n\t\t}\n\t\t\n\t}\n\t\tSystem.out.println(prime+\" numbers are prime\");\n\t}", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n System.out.println(\"Enter a number to get prime numbers below that number\");\nint givenum = sc.nextInt();\nint i,number,count;\nfor(number=1;number<=givenum;number++)\n{\n\tcount=0;\n\tfor(i=2;i<=number/2;i++)\n\t{\n\t\tif(number%i==0)\n\t\t{\n\t\t\tcount++;\n\t\t\tbreak;\n\t\t}\n\t}\nif(count==0 && number !=1)\n{\n\tSystem.out.println(number);\n}\n}\n\t}", "@Test\n public void testFactorialInvalidInteger()\n {\n driver.findElement(By.linkText(\"Factorial\")).click();\n driver.findElement(By.name(\"value\")).sendKeys(\"0\");\n WebElement submit = driver.findElement(By.cssSelector(\"input\"));\n submit.sendKeys(Keys.RETURN);\n WebElement e = driver.findElement(By.className(\"jumbotron\"));\n String s1 = e.getText();\n assertTrue(s1.contains(\"1\"));\n }", "static private boolean checkPrimality(long n) {\n // first, check if even\n if (n % 2 == 0)\n return false;\n\n // now, check against odd numbers\n for (int i = 3; i < n / 2; i += 2)\n if (n % i == 0)\n return false;\n\n return true;\n }", "static boolean isPrime(int number)\n {\n // Loop through and check if it is dividable with divisors\n for(int divisor = 2; divisor <= number / 2; divisor++)\n {\n if(number % divisor == 0)\n return false; // if it can be divided return false\n }\n\n return true; // if it cannot be divided return true\n }", "public static boolean isPrime(int num){\n if(num<=1){\n return false;\n }\n for(int i=2;i<=(long)Math.sqrt(num) ; i++){\n if(num%i==0){\n return false;\n }\n }\n return true;\n }", "private static boolean isPrime(int num) {\n\t\tfor(int divisor=2;divisor<=num/2;divisor++){\n\t\t\tif(num%divisor==0) return false;\n\t\t}\n\t\treturn true;\n\t}", "private boolean isPrime(long num) {\n if (num < 2) // prime numbers are positive and above 1\n return false;\n long max = (long) sqrt(num); // get the rounded square root of the number to check for primality\n for (int j = 2; j <= max; j++) {\n if (num % j == 0) {\n return false; // not a prime number as is divisible\n }\n }\n return true; // optimus prime :-)\n }", "private static boolean checkPrime(int size){\n boolean prime = true;\n //if can divide by two then it is not prime\n if (size%2==0) prime = false;\n //if not, then just check the odds as all even numbers are divisible by 2\n for(int i = 3; i*i <= size; i += 2) {\n if(size % i == 0)\n prime = false;\n }\n return prime;\n }", "private boolean isPrime(long n) {\n return BigInteger.valueOf(n).isProbablePrime(10);\n }", "public static PerformOperation isPrime() {\n return (num) -> {\n if (num < 2) { return false; }\n if (num == 2) { return true; }\n if (num % 2 == 0) { return false; }\n if (num < 9) { return true; }\n\n int max = (int) Math.sqrt(num);\n for (int i = 3; i <= max; i+=2) {\n if (num % i == 0) { return false; };\n }\n return true;\n };\n }", "@Override\n public boolean isPrimeNumber(int number) {\n if (number < 2) return false;\n int sqrt = (int) Math.sqrt(number);\n for (int i = 2; i <= sqrt; i++) {\n if (number % i == 0) {\n return false;\n }\n }\n return true;\n }", "public boolean isAPrimeNumber(int x){\n for(int i = 1; i <= x;i++){\n\n //if the mod = 0 then it is a divisor\n if(x % i == 0) {\n\n //increment count\n count++;\n\n }\n //if count is greater than 2 we return true because prime numbers\n //Can only be divisble by 1 and itself\n if(count > 2){\n\n return false;\n }\n\n\n\n }\n\n //If the entire loop finishes then we return true\n return true;\n }", "public static void main(String[] args) {\n\t\tBigInteger number = new BigInteger(Long.MAX_VALUE + \"\");\r\n\t\tnumber = number.add(BigInteger.ONE);\r\n\t\t\r\n\t\tint count = 0;\r\n\t\twhile (count < 5){\r\n\t\t\tif (isPrime(number)){\r\n\t\t\t\tcount++;\r\n\t\t\t\tSystem.out.println(number);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//increment number by 1\r\n\t\t\tnumber = number.add(BigInteger.ONE);\r\n\t\t\t\r\n\t\t}\r\n\t}", "static boolean isFactorialPrime(long n)\n {\n \n // If n is not prime then return false\n if (!isPrime(n))\n return false;\n \n long fact = 1;\n int i = 1;\n while (fact <= n + 1) {\n \n // Calculate factorial\n fact = fact * i;\n \n // If n is a factorial prime\n if (n + 1 == fact || n - 1 == fact)\n return true;\n \n i++;\n }\n \n // n is not a factorial prime\n return false;\n }", "@Test\n // boundary\n public void testGenerateNextLikelyPrime_4() {\n NaturalNumber n = new NaturalNumber2(4);\n CryptoUtilities.generateNextLikelyPrime(n);\n assertEquals(\"5\", n.toString());\n }", "private static boolean isPrime(int x) {\n if (x<=1)\n return false;\n else\n return !isDivisible(x, 2);\n }", "@Ignore\n @Test\n public void testCheckPrimeBorder_3() {\n assertTrue(checkerNumber.checkPrime(Integer.MAX_VALUE));\n }", "public static boolean isPrime(int num)\n {\n //test for numbers less than 2 because they aren't prime\n if(num < 2)\n {\n return false;\n }\n //test to see if the number has factors\n for(int i = 2; i < num; i ++)\n {\n if(num % i == 0) \n return false;\n }\n \n return true;\n }", "private boolean isOddPrime(int t) // Not the most efficient method, but it will serve\n {\n int test = 3;\n boolean foundFactor = false;\n while(test*test < t && !foundFactor)\n {\n foundFactor = (t%test == 0); // is it divisible by test\n test += 2;\n }\n\n return !foundFactor;\n }", "public static String isPrime(int a) {\n\n /*\n * For loop that iterates starting with the number 2 and determines if the\n * modulus of int a and \"i\" is zero or not. Also checks if a number is odd or\n * even with a modulo check\n */\n for (int i = 2; i < a; i++) {\n\n // Empty string to hold Odd or Even determination message\n String message = \"\";\n\n if (a % i == 0 && a % 2 == 0) {\n message = \" But it's Even!\";\n return \"Not a prime Number...\" + message;\n } else if (a % i == 0 && a % 2 != 0) {\n message = \" and it's Odd!\";\n return \"Not a prime number...\" + message;\n }\n }\n return \"That's a prime Number!\";\n }", "boolean isPrime (int i) { //isCrossedOut()\n if(i == 2){\n return true;\n }\n if(i % 2 == 0 || i == 1){\n return false;\n }\n\n //Finn position i arrayet\n int bitIndex = (i-1) / 2;\n int arrayIndex = bitIndex / 8;\n bitIndex = bitIndex % 8;\n //System.out.println(\"isPrime(\"+ i +\")\");\n\n if((bitArr[arrayIndex] & bitMask[bitIndex]) == 0){\n return false;\n }\n return true;\n }", "public static void main(String[]args){\n Scanner scanner = new Scanner(System.in);\n System.out.print(\"n=\");\n int n = scanner.nextInt();\n boolean k = false;\n for(int i = 2; i <= Math.sqrt(n); ++i){\n if(n % i == 0){\n k = true;\n break;\n }\n }\n if(k){\n System.out.println(n + \" is not prime number\");\n }else{\n System.out.println(n + \" is prime number\");\n }\n }", "public static void main(String[] args) {\n\r\n\t\tlong ln= 6008514751431L;\r\n\t\tint max=0;\r\n\t\tfor (int i=2; i<= ln;i++)\r\n\t\t\twhile (ln % i == 0)\r\n\t\t\t{\r\n\t\t\t\tif(i>max)\r\n\t\t\t\tmax=i;\r\n\t\t\t\tln/=i;\r\n\t\t\t}\t\r\n\t\tSystem.out.println(\"the greatest prime factor of the given number is :\"+max);\r\n\t\t}", "public static boolean isPrime(MyInteger number1){\r\n\t\tfor (int i = 2; i<number1.getInt(); i++){\r\n\t\t\tif(number1.getInt()/i==0){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "static boolean isPrime(String number)\n {\n int num = Integer.valueOf(number);\n\n for(int i = 2; i * i <= num; i++)\n {\n if ((num % i) == 0)\n return false;\n }\n return num > 1 ? true : false;\n }", "private static boolean isPrimeInFunctionalApproach1(int num) {\n \n return num > 1 &&\n IntStream.range(2, num)\n .noneMatch(divisor -> num % divisor == 0);\n }", "private static boolean isPrime(long n) {\n\t\tboolean isPrime = true;\n\t\tif (n < 2) {\n\t\t\tisPrime = false;\n\t\t} else if (n == 2) {\n\t\t\tisPrime = true;\n\t\t} else if (n % 2l == 1) {\n\t\t\tisPrime = false;\n\t\t\tprimeLog.log(n + \" is divisible by 2\");\n\t\t}\n\t\t// Check n against all odd numbers greater than 2\n\t\tfor (int i = 3; isPrime && i * i <= n; i += 2) {\n\t\t\t// If n is divisible by i then n is not prime\n\t\t\tif (n % i == 0) {\n\t\t\t\tprimeLog.log(n + \" is divisible by \" + i);\n\t\t\t\tisPrime = false;\n\t\t\t}\n\t\t}\n\t\tglobalLog.appendToCurrent(\": \" + isPrime);\n\t\tglobalLog.stepOut();\n\t\tprimeLog.appendToCurrent(\": \" + isPrime);\n\t\treturn isPrime;\n\t}", "public static boolean isPrime(int number){\r\n\t\tfor (int i = 2; i<number; i++){\r\n\t\t\tif(number/i==0){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "private boolean isPrime(int n) {\r\n for (int divisor = 2; divisor < n; divisor++) {\r\n if (n % divisor == 0) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }", "public static boolean isPrime(int num) {\r\n\t\tassert num >= 2 : \"failed precondition. num must be >= 2. num: \" + num;\r\n\t\tfinal double LIMIT = Math.sqrt(num);\r\n\t\t//is Prime is set true if num is 2 or if num is odd number\r\n\t\tboolean isPrime = (num == 2) ? true : num % 2 != 0;\r\n\t\tint div = 3;\r\n\t\t//if isPrime is false ( which will happen for all even numbers ) this loop is not entered\r\n\t\t//all odd numbers greater than 2 will enter this loop and we will be in loop until \r\n\t\t//isPrime set to false because we found a factor or till we reach the LIMI i.e. sqrt and that point\r\n\t\t//we exit loop with truy and return that, if we exit before that we return with false\r\n\t\twhile(div <= LIMIT && isPrime) {\r\n\t\t\tisPrime = num % div != 0;\r\n\t\t\tdiv += 2;\r\n\t\t}\r\n\t\treturn isPrime;\r\n\t}", "static boolean isPrime(long n) {\n long sqrt = (long)Math.sqrt((double)n);\n int idx = Collections.binarySearch(SMALL_PRIMES, sqrt);\n return !IntStream.range(0, idx > 0 ? idx + 1 : (-idx - 1))\n .mapToLong(SMALL_PRIMES::get)\n .anyMatch(p -> n % p == 0L);\n }", "public static boolean isPrime(int num) {\n\n if (num <= 1) {\n return false;\n }\n\n if (num == 2) {\n return true;\n }\n\n for (int i = 3; i < num; i++) {\n\n if (num % i == 0) {\n return false;\n }\n\n }\n\n return true;\n\n }", "public static void main(String[] args) {\n long number = 6857;\n long i = 2;\n while ((number / i != 1) || (number % i != 0)) {\n if (number % i == 0) {\n number = number / i;\n } else {\n i++;\n }\n }\n System.out.println(i);\n\n }", "public static void main(String[] args) {\n\t\tboolean Prime = true;\n\t\tint n=20;\n\t\tfor (int i=1;i<n;i++) {\n\t\t\tif (n%i==0) {\n\t\t\t\tSystem.out.println(\"Factor Number is \" +i);\n\t\t\t\t//Prime=false;\n\t\t\t\t//break;\n\t\t\t}\n\t\t}\n\t\n\t\n\n\t}", "@Test(timeout = 500)\n\tpublic void testGetNthPrime() {\n\t\tAssert.fail();\n\t}", "private static boolean isPrime(int n) {\r\n if (n == 2)\r\n return true;\r\n if (n <= 1 || n % 2 == 0)\r\n return false;\r\n for (int i = 3; i <= Math.sqrt(n); i+=2) {\r\n if (n % i == 0)\r\n return false;\r\n }\r\n return true;\r\n }", "private static int lpf(int i) {\n\t\tint j = i-1;\n\t\twhile(j>=2) {\n\t\t\tif (i%j == 0 && checkifprime(j)) {\n\t\t\t\treturn j;\n\t\t\t}\n\t\t\tj--;\n\t\t}\n\t\treturn 2;\n\t}", "public static void main(String[] args) {\r\nScanner scan = new Scanner(System.in);\r\n int totalTests = scan.nextInt();\r\n\r\n for(int x = 0; x < totalTests; x++){\r\n \r\n int number = scan.nextInt();\r\n int primes=0;\r\n \r\n\r\n for(int y =2 ; y<number/2; y++){\r\n if(number%y==0)\r\n \r\n primes++;\r\n if(primes>0){\r\n break;\r\n }\r\n \r\n }\r\n\r\n if(primes>0 && number>2 || number ==1 || number ==4)\r\n System.out.println(\"Not prime\");\r\n\r\n else System.out.println(\"Prime\");\r\n \r\n \r\n }\r\n }", "private static boolean isPrimeInImperativeApproach(int num) {\n \n if (num <= 1)\n return false;\n \n for (int i = 2; i < Math.sqrt(num); i++) {\n if (num % i == 0) {\n return false;\n }\n }\n return num > 1;\n }", "public static boolean isEmirp(int n) \n{ \n//checks if the given number is prime or not \nif (isPrime(n) == false) \nreturn false; \n//variable that stores the reverse of the number \nint reverse = 0; \n//the while loop executes until the specified condition becomes false \nwhile (n != 0) \n{ \n//finds the last digit of the number (n) \nint digit = n % 10; \n//finds the reverse of the given number \nreverse = reverse * 10 + digit; \n//removes the last digit \nn = n/10; \n} \n//calling the user-defined function that checks the reverse number is prime or not \nreturn isPrime(reverse); \n}", "boolean ePrimo(int n) {\n \n if (n < 2) {\n return false;\n }\n \n \n // Guarda o numero de divisores de n. Inicialmente eh 1. Todos os numeros\n // sao divisiveis por 1\n \n int numeroDeDivisores = 1;\n \n // O primeiro candidato a divisor nao trivial eh 2.\n \n int candidatoADivisor = 2;\n \n // Testa a divisao por todos os numeros menores ou iguais a n/2 ou ate \n // encontrar o primeiro divisor.\n \n while((candidatoADivisor <= Math.sqrt(n)) && (numeroDeDivisores == 1)) {\n if (n % candidatoADivisor == 0) {\n // o resto da divisao eh zero. Logo, candidatoADivisor eh um divisor de n. \n // Por isso, que o numero de divisores eh incrementado em 1.\n numeroDeDivisores = numeroDeDivisores + 1;\n }\n candidatoADivisor = candidatoADivisor + 1;\n }\n \n if (numeroDeDivisores == 1) {\n return true;\n }\n else {\n return false;\n }\n }", "public static int nextPrime(int n) {\r\n boolean isPrime = false;\r\n int start = 2; // start at 2 and omit your if statement\r\n\r\n while (!isPrime) {\r\n // always incrememnt n at the beginning to check a new number\r\n n += 1;\r\n // redefine max boundary here\r\n int m = (int) Math.ceil(Math.sqrt(n));\r\n\r\n isPrime = true;\r\n // increment i by 1, not 2 (you're skipping numbers...)\r\n for (int i = start; i <= m; i++) {\r\n if (n % i == 0) {\r\n isPrime = false;\r\n break;\r\n }\r\n }\r\n }\r\n return n;\r\n }", "private boolean isPrime(int candidate) {\r\n\t\t\tboolean isPrime = true;\r\n\r\n\t\t\t// numbers <= 1 or even are not prime\r\n\t\t\tif ((candidate <= 1))\r\n\t\t\t\tisPrime = false;\r\n\t\t\t// 2 or 3 are prime\r\n\t\t\telse if ((candidate == 2) || (candidate == 3))\r\n\t\t\t\tisPrime = true;\r\n\t\t\t// even numbers are not prime\r\n\t\t\telse if ((candidate % 2) == 0)\r\n\t\t\t\tisPrime = false;\r\n\t\t\t// an odd integer >= 5 is prime if not evenly divisible\r\n\t\t\t// by every odd integer up to its square root\r\n\t\t\t// Source: Carrano.\r\n\t\t\telse {\r\n\t\t\t\tfor (int i = 3; i <= Math.sqrt(candidate) + 1; i += 2)\r\n\t\t\t\t\tif (candidate % i == 0) {\r\n\t\t\t\t\t\tisPrime = false;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn isPrime;\r\n\t\t}", "private boolean determinePrime(int num) {\n int temp;\n boolean isPrime = true;\n \n if(num <= 1)\n {\n isPrime = false;\n }\n else\n {\n for(int i = 2;i<=num/2; i++)\n {\n //divide the number by i, get the remainder \n temp = num % i;\n \n //if remainder is 0, the number is not prime\n if(temp == 0)\n {\n isPrime = false;\n break;\n }\n }\n }\n \n return isPrime;\n }", "public static boolean isPerfectNumber(int number)\n {\n if(number < 1)\n {\n return false;\n }\n int sum = 0;\n for(int i=1; i<number; i++)\n {\n if(number % i == 0)\n {\n sum += i;\n }\n }\n if(sum==number)\n {\n return true;\n }\n else\n {\n return false;\n }\n }", "public static boolean isPrime(int value)\n\t{\n\t\tif (value > 1)\n\t\t{\n\t\t\tint maxDivisor = (int) (Math.ceil(Math.sqrt(value)));\n\t\t\t\n\t\t\tfor (int primeInteger: findAllPrimes(maxDivisor))\n\t\t\t{\n\t\t\t\tif (primeInteger >= maxDivisor)\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse if ((primeInteger > 0) && (value % primeInteger == 0))\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "private synchronized void verifyNumbersPrime() {\n\t\tint primeIndex = 1;\n\t\tfor (int j = NUMBER_TWO; j <= Integer.MAX_VALUE && primeIndex < primes.length; j++) {\n\t\t\tif(isPrime(j)) {\n\t\t\t\tprimes[primeIndex++] = j;\n\t\t\t}\n\t\t}\n\t}", "public static boolean isPrime(int num) {\n for (int i = 2; i < num; i++) {\r\n if (num % i == 0) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }", "static void primeNumberSeries(){\n\t}", "public static void main(String[] args) {\n\t\tint i = 2;\r\n\t\tint num = 5;\r\n\t\tint temp;\r\n\t\ttemp = num % i;\r\n\t\tif (temp == 0) {\r\n\t\t\tSystem.out.println(num + \" is not a Prime Number\");\r\n\t\t} else {\r\n\t\t\tSystem.out.println(num + \" is a Prime Number\");\r\n\t\t}\r\n\r\n\t}", "@Test\n public void testFactorialInvalidNonInteger()\n {\n driver.findElement(By.linkText(\"Factorial\")).click();\n driver.findElement(By.name(\"value\")).sendKeys(\"hello\");\n try {\n WebElement submit = driver.findElement(By.cssSelector(\"input\"));\n submit.sendKeys(Keys.RETURN);\n WebElement e = driver.findElement(By.className(\"jumbotron\"));\n String s1 = e.getText();\n assertTrue(s1.contains(\"1\"));\n } catch (NoSuchElementException e) {\n fail();\n }\n }", "public void testIsPrime(){\n boolean primo = true;\n if (primo == calcula.isPrime(5)){\n estaBien = \"OK\";\n }\n else {\n estaBien = \"ERROR\";\n }\n lista.add(estaBien);\n System.out.println(\"Comprobando testIsPrime... Parametro 5... \");\n System.out.println(\"Resultado correcto: \" + primo + \" // Resultado método: \" + calcula.isPrime(5) + \" -------------> \" + estaBien);\n System.out.println(\"---------------------------------------------------------\");\n // Este ejemplo debe devolver false \n primo = false;\n if (primo == calcula.isPrime(40)){\n estaBien = \"OK\";\n }\n else {\n estaBien = \"ERROR\";\n }\n lista.add(estaBien);\n System.out.println(\"Comprobando testIsPrime... Parametro 40... \");\n System.out.println(\"Resultado correcto: \" + primo + \" // Resultado método: \" + calcula.isPrime(40) + \" -------------> \" + estaBien);\n System.out.println(\"---------------------------------------------------------\");\n // Este ejemplo debe devolver true \n primo = true;\n if (primo == calcula.isPrime(11)){\n estaBien = \"OK\";\n }\n else {\n estaBien = \"ERROR\";\n }\n lista.add(estaBien);\n System.out.println(\"Comprobando testIsPrime... Parametro 11... \");\n System.out.println(\"Resultado correcto: \" + primo + \" // Resultado método: \" + calcula.isPrime(11) + \" -------------> \" + estaBien);\n System.out.println(\"---------------------------------------------------------\");\n // Este ejemplo debe devolver false \n primo = false;\n if (primo == calcula.isPrime(25)){\n estaBien = \"OK\";\n }\n else {\n estaBien = \"ERROR\";\n }\n lista.add(estaBien);\n System.out.println(\"Comprobando testIsPrime... Parametro 25... \");\n System.out.println(\"Resultado correcto: \" + primo + \" // Resultado método: \" + calcula.isPrime(25) + \" -------------> \" + estaBien);\n System.out.println(\"---------------------------------------------------------\");\n // Este ejemplo debe devolver true \n primo = true;\n if (primo == calcula.isPrime(47)){\n estaBien = \"OK\";\n }\n else {\n estaBien = \"ERROR\";\n }\n lista.add(estaBien);\n System.out.println(\"Comprobando testIsPrime... Parametro 47... \");\n System.out.println(\"Resultado correcto: \" + primo + \" // Resultado método: \" + calcula.isPrime(47) + \" -------------> \" + estaBien);\n System.out.println(\"---------------------------------------------------------\");\n // Este ejemplo debe devolver false \n primo = false;\n if (primo == calcula.isPrime(1)){\n estaBien = \"OK\";\n }\n else {\n estaBien = \"ERROR\";\n }\n lista.add(estaBien);\n System.out.println(\"Comprobando testIsPrime... Parametro 1...\");\n System.out.println(\"Resultado correcto: \" + primo + \" // Resultado método: \" + calcula.isPrime(1) + \" -------------> \" + estaBien);\n System.out.println(\"---------------------------------------------------------\");\n // Recorremos el ArrayList para comprobar si todos son OK o hay algún ERROR\n int contador = 0;\n for (String func : lista){\n func = lista.get(contador);\n if (!func.equals(\"OK\")){\n funciona = \"NO\";\n }\n contador = contador + 1;\n }\n System.out.println(\"El método \" + funciona + \" funciona correctamente\");\n lista.clear();\n funciona = \"SI\";\n }", "static boolean checkIsPrime(int n) {\n for (int i = 2; i <= Math.sqrt(n); i++) {\n if (n % i == 0) {\n return false;\n }\n }\n return true;\n }", "public boolean isPrime()\n\t{\n\t\treturn ! exactDivision;\n\t}", "private static void primeCalc(int UI)\n\t{\n\t\tSystem.out.print(\"The Prime Numbers are: \");\n\t\tSystem.out.println();\n\t\t\n\t\tint P = 0;\n \n\t\twhile (++P <= UI) \n\t\t{\n\n \tint P2 = (int) Math.ceil(Math.sqrt(P));\n\n boolean Decision = false;\n\n while (P2 > 1) \n\t\t\t{\n\n \tif ((P != P2) && (P % P2 == 0)) \n\t\t\t\t{\n \tDecision = false;\n break;\n }\n\t\t\t\telse if (!Decision) \n\t\t\t\t{\n \tDecision = true;\n }\n\n --P2;\n\t\t\t}\n\n if (Decision) \n\t\t\t{\n \tSystem.out.println(P);\n \n }\n\n\t\n\t\t}\n\n\n\t}", "private static int findNextPrimeAfter(int n) {\n n += (n % 2 == 0) ? 1 : 2; // next odd\n foundFactor: for (;; n += 2) { //TODO labels??!!\n int sri = (int) (Math.sqrt(n));\n for (int primeIndex = 0; primeIndex < N_PRIMES; primeIndex++) {\n int p = primes[primeIndex];\n if (p > sri) {\n return n;\n }\n if (n % p == 0) {\n continue foundFactor;\n }\n }\n for (int p = primes[N_PRIMES - 1] + 2;; p += 2) {\n if (p > sri) {\n return n;\n }\n if (n % p == 0) {\n continue foundFactor;\n }\n }\n }\n }", "public static boolean isPrime(int number){\r\n\t\t//Start loop from too to exclude division by 1\r\n\t\tint i = 2;\r\n\t\twhile(i < number){\r\n\t\t\tif(number % i == 0){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public static void checkPrime(int n ) {\n int i, m = 0, flag = 0;\n m = n / 2;\n\n\n if (n == 0 || n == 1) {\n System.out.println(n + \" is not a prime number\");\n } else {\n for (i = 2; i < 100; i++) {\n if (n % i == 0) {\n System.out.println(n + \" is not prime number\");\n flag = 1;\n break;\n }\n }\n\n if (flag == 0) {\n System.out.println(n + \"is a prime number\");\n }\n }\n }", "public static void main(String[] args) {\n int product = 1;\n int[] factors = new int[max]; //The position in the array represents the actual factor, the number at that position is the number of occurrences of that factor\n\n for (int i = 2; i < max + 1; i++) { //Checking divisibility by numbers 2-20 inclusive.\n int temp = i;\n for (int j = 2; j < max; j++) { //Checking to see if the number can be represented with current factors in the factors array\n int numOfFactor = factors[j]; //Don't want to change the actual value in the array so we make a copy\n\n while (temp % j == 0 && temp >= j) { //While j, the current factor in the array, is a factor of i and i is smaller than j then divide by j and increment its occurrence in the factors array\n if (numOfFactor > 0) //If j is in the array of factors \"use it\" and decrement the counter for it\n numOfFactor--;\n else //otherwise if the factor doesn't exist in the array add it by incrementing value at the position\n factors[j]++;\n temp /= j; //No matter what, if temp had a factor, it gets smaller\n }\n if (temp < j)\n break; //Don't bother checking the rest of the array since larger numbers can't go into a smaller one...\n }\n }\n\n for (int i = 2; i < max; i++) { //Find the product of all the factors\n if (factors[i] > 0) {\n for (int j = factors[i]; j > 0; j--) { //If there are factors at position j, multiply them!\n product *= i;\n }\n }\n }\n System.out.println(product);\n\n }", "private static boolean isPrimeInFunctionalApproach2(int num) {\n \n return num > 1 &&\n IntStream.rangeClosed(2, (int) Math.sqrt(num))\n .noneMatch(divisor -> num % divisor == 0);\n }", "public static boolean isPrime(int number) {\n if (number <= 1) {\n return false;\n }\n for (int i = 2; i <=Math.sqrt(number); i++) {\n if (number % i == 0) {\n return false;\n }\n }\n return true;\n }", "public static void Factorization(int number)\n\t{\n\t\t for(int i = 2; i< number; i++)\n\t\t {\n\t while(number%i == 0) \n\t {\n\t System.out.print(i+\" \");\n\t number = number/i;\n\t\t\n\t }\n\t \n\t }\n \n if(2<=number)\n {\n System.out.println(number);\n }\n \n }", "@Override\n\tpublic long solve(Long num, boolean printResults) {\n\t\tArrayList<Long> factors = new ArrayList<Long>();\n\n\t\twhile (num > 1) {\n\t\t\tfor (long i = 3; i <= num; i += 2) {\n\t\t\t\tif (num % i == 0) {\n\t\t\t\t\tfactors.add(i);\n\t\t\t\t\tnum /= i;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tlong big = factors.get(factors.size() - 1);\n\t\tif (printResults)\n\t\t\tSystem.out.println(big + \" is the biggest prime factor of 6,008,514,751,43l\");\n\t\treturn big;\n\t}", "public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int N = scanner.nextInt();\n \n boolean[] isNotPrime = new boolean[(N - 1 - 1) / 2 + 1];\n List<Integer> list = new ArrayList<Integer>();\n HashSet<Integer> primes = new HashSet<Integer>();\n \n list.add(2);\n primes.add(2);\n long sum = 0;\n for (int i = 1; i < isNotPrime.length; i++) {\n if (isNotPrime[i]) {\n continue;\n }\n list.add(2 * i + 1);\n primes.add(2 * i + 1);\n long nextIndex = (((long) 2 * i + 1) * (2 * i + 1) - 1) / 2;\n if (nextIndex >= isNotPrime.length) {\n continue;\n }\n for (int j = ((2 * i + 1) * (2 * i + 1) - 1) / 2; j < isNotPrime.length; j += 2 * i + 1) {\n isNotPrime[j] = true;\n }\n }\n int index = 0;\n while (index < list.size()) {\n int curPrime = list.get(index);\n index++;\n if (curPrime < 10) {\n continue;\n }\n int base = 1;\n while (curPrime / base > 9) {\n base *= 10;\n }\n int leftTruncate = curPrime;\n int rightTruncate = curPrime;\n boolean isValid = true;\n while (base != 1) {\n leftTruncate = leftTruncate - leftTruncate / base * base;\n rightTruncate = rightTruncate / 10;\n base /= 10;\n if (primes.contains(leftTruncate) == false || primes.contains(rightTruncate) == false) {\n isValid = false;\n break;\n }\n }\n if (isValid) {\n sum += curPrime;\n }\n }\n System.out.println(sum);\n scanner.close();\n }" ]
[ "0.67298675", "0.65639716", "0.6548538", "0.6548124", "0.6543901", "0.6522608", "0.649809", "0.6452677", "0.6447146", "0.63295287", "0.63266593", "0.63228744", "0.6313099", "0.62889093", "0.62883806", "0.62806827", "0.6263786", "0.6218389", "0.6188821", "0.61821353", "0.61762875", "0.61750156", "0.617204", "0.6164989", "0.6161954", "0.61608607", "0.6156139", "0.61455035", "0.6140054", "0.6136455", "0.6135153", "0.6122617", "0.6106714", "0.6100658", "0.609774", "0.6094335", "0.6091549", "0.60723394", "0.6063941", "0.6059409", "0.6058896", "0.60554785", "0.6044546", "0.60262626", "0.60140926", "0.60139227", "0.6004361", "0.5999854", "0.59988767", "0.59941983", "0.59881824", "0.59807056", "0.5969474", "0.5965163", "0.59531355", "0.5951854", "0.5947996", "0.5947286", "0.59426033", "0.593427", "0.59341425", "0.59328103", "0.5927046", "0.5926669", "0.592096", "0.5913889", "0.5900238", "0.58975476", "0.5896989", "0.5884864", "0.58846205", "0.58836305", "0.5881561", "0.5871045", "0.5862364", "0.5861081", "0.58571047", "0.58504593", "0.5846393", "0.58436245", "0.5843016", "0.5839852", "0.5839366", "0.58377504", "0.58360887", "0.5830918", "0.58298004", "0.58238375", "0.58192855", "0.5814623", "0.58136374", "0.5811517", "0.58106714", "0.5808951", "0.58009005", "0.5800087", "0.5799412", "0.5792741", "0.57904243", "0.5790177", "0.57900405" ]
0.0
-1
Created by ueliton on 02/04/16.
public interface AnimalRepository { void getAnimals(LoadAnimalsCallBack loadAnimalsCallBack); void getAnimal(Long animalId, LoadAnimalCallBack caploadAnimalCallBackture); void saveAnimal(Animal animal); void refreshData(); void findById(long animalId); interface LoadAnimalsCallBack { void onAnimalsLoaded(List<Animal> animals); } interface LoadAnimalCallBack{ void onAnimalLoaded(Animal animal); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void interr() {\n\t}", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "private void poetries() {\n\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@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\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "protected boolean func_70814_o() { return true; }", "@Override\n public void init() {\n\n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "public void mo38117a() {\n }", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "private void m50366E() {\n }", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\n public int describeContents() { return 0; }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "private void kk12() {\n\n\t}", "@Override\n public void init() {\n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "private void init() {\n\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\r\n\tpublic void init() {}", "@Override\n protected void init() {\n }", "@Override\n public void init() {}", "@Override\n protected void initialize() {\n\n \n }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "private void strin() {\n\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n void init() {\n }", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tpublic void init() {\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "public void method_4270() {}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\n protected void getExras() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n public int retroceder() {\n return 0;\n }", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\t\tpublic void init() {\n\t\t}", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic void afterInit() {\n\t\t\n\t}", "@Override\n\tpublic void afterInit() {\n\t\t\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}" ]
[ "0.59347093", "0.59285253", "0.58229834", "0.57158214", "0.57158214", "0.57013893", "0.5691452", "0.5665679", "0.5645516", "0.56356835", "0.5622017", "0.56210923", "0.5617534", "0.56131965", "0.56125385", "0.55956405", "0.5593219", "0.55753314", "0.55753314", "0.55753314", "0.55753314", "0.55753314", "0.5575088", "0.5546477", "0.55397445", "0.55313754", "0.5520302", "0.55178803", "0.5513631", "0.5497076", "0.54964244", "0.5487141", "0.5486321", "0.5479127", "0.5473024", "0.5471009", "0.54648924", "0.5463768", "0.5463768", "0.5451871", "0.54360694", "0.5429297", "0.54192865", "0.5418897", "0.54025257", "0.5397832", "0.5396152", "0.5396152", "0.5396152", "0.5395767", "0.5395767", "0.5395767", "0.53911746", "0.53851783", "0.53850013", "0.5381726", "0.53791964", "0.53791964", "0.5370223", "0.5369594", "0.5369594", "0.5369594", "0.5367569", "0.5361882", "0.53555596", "0.53555596", "0.5353063", "0.5353063", "0.5353063", "0.5353063", "0.5353063", "0.5353063", "0.5347739", "0.5346956", "0.5342511", "0.5340163", "0.5334935", "0.5325305", "0.5312343", "0.53043216", "0.52978086", "0.52978086", "0.52978086", "0.52978086", "0.52978086", "0.52978086", "0.52978086", "0.5267089", "0.5260031", "0.5256188", "0.525115", "0.52398217", "0.52381444", "0.52343494", "0.52343494", "0.52277094", "0.52222043", "0.52219045", "0.52219045", "0.5219737", "0.5217161" ]
0.0
-1
TODO Autogenerated method stub
private void doProcess(HttpServletRequest request, HttpServletResponse response) throws Exception{ UserBean userbean = new UserBean(); RequestDispatcher dispatcher = null; HttpSession session = request.getSession(false); userbean.setName(request.getParameter("name")); userbean.setPassword(request.getParameter("password")); userbean.setPhoneNumber(request.getParameter("phoneNumber")); userbean.setRole(request.getParameter("role")); userbean.setUserId(request.getParameter("userId")); UpdatDao updateDao = new UpdatDao(); if("success".equals(updateDao.addUser(userbean))){ dispatcher = session.getServletContext().getRequestDispatcher("/adminHome.jsp"); dispatcher.forward(request, response); } else { dispatcher = session.getServletContext().getRequestDispatcher("/adminHome.jsp"); dispatcher.forward(request, response); } }
{ "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
Find all quote locations
@Override public Object produceValue(Annotation np, Document doc) { SortedSet<Integer> quoteLocations = new TreeSet<Integer>(); Pattern p = Pattern.compile("\"|''|``|\u201C|\u201D"); String text = doc.getText(); Matcher m = p.matcher(text); boolean inQuote = false; while (m.find()) { int start = m.start(); if (inQuote && (text.substring(start).startsWith("``") || text.substring(start).startsWith("\u201C"))) { // We have an opening quote; Make sure the previous quote is closed quoteLocations.add((start - 1)); inQuote = false; } quoteLocations.add((start)); inQuote = !inQuote; } // System.out.println("Quote locations: "+quoteLocations); // Figure out which noun corresponds to which quote AnnotationSet sent = doc.getAnnotationSet(Constants.SENT); Iterator<Integer> quoteIter = quoteLocations.iterator(); HashMap<Integer, Annotation> reporters = new HashMap<Integer, Annotation>(); HashMap<Integer, Annotation> companies = new HashMap<Integer, Annotation>(); HashMap<Integer, Annotation> sentReporter = new HashMap<Integer, Annotation>(); HashMap<Integer, Annotation> compReporter = new HashMap<Integer, Annotation>(); int counter = 1; while (quoteIter.hasNext()) { int qStart = quoteIter.next(); if (!quoteIter.hasNext()) { break; } int qEnd = quoteIter.next() + 1; AnnotationSet sentences = sent.getOverlapping(qStart, qEnd); // Three cases for the size of the sentences set Annotation match, compMatch; if (sentences.size() < 1) { System.out.println("Quote is not covered by any sentence:"); int beg = qStart - 15; beg = beg < 0 ? 0 : beg; int en = qStart + 15; en = en >= text.length() ? text.length() - 1 : en; System.out.println(Utils.getAnnotText(beg, en, text)); System.out.println("Position " + qStart); match = Annotation.getNullAnnot(); compMatch = Annotation.getNullAnnot(); // throw new RuntimeException("Quote is not covered by any sentence"); } else if (sentences.size() == 1) { Annotation s = sentences.getFirst(); // System.out.println("Sent: "+Utils.getAnnotText(s, text)); if (s.properCovers(qStart, qEnd)) { match = findReporter(qStart, qEnd, s, doc); compMatch = findCompany(qStart, qEnd, s, doc); if (match.equals(Annotation.getNullAnnot())) { match = findReportCont(sentReporter, s, doc); compMatch = findReportCont(compReporter, s, doc); } } else { match = findReportCont(sentReporter, s, doc); compMatch = findReportCont(compReporter, s, doc); } sentReporter.put(Integer.decode(s.getAttribute("sentNum")), match); compReporter.put(Integer.decode(s.getAttribute("sentNum")), compMatch); } else { // The quoted string spans more than one sentence. Annotation beg = sentences.getFirst(); // System.out.println("First sent: "+Utils.getAnnotText(beg, text)); Annotation end = sentences.getLast(); // System.out.println("Last sent: "+Utils.getAnnotText(end, text)); match = Annotation.getNullAnnot(); compMatch = Annotation.getNullAnnot(); if (beg.getStartOffset() < qStart) { match = findReporter(qStart, qEnd, beg, doc); compMatch = findCompany(qStart, qEnd, beg, doc); } if (match.equals(Annotation.getNullAnnot()) && qEnd < end.getEndOffset()) { match = findReporter(qStart, qEnd, end, doc); compMatch = findCompany(qStart, qEnd, end, doc); } if (match.equals(Annotation.getNullAnnot())) { match = findReportCont(sentReporter, beg, doc); compMatch = findCompany(qStart, qEnd, end, doc); } sentReporter.put(Integer.parseInt(beg.getAttribute("sentNum")), match); sentReporter.put(Integer.parseInt(end.getAttribute("sentNum")), match); compReporter.put(Integer.parseInt(beg.getAttribute("sentNum")), compMatch); compReporter.put(Integer.parseInt(end.getAttribute("sentNum")), compMatch); } reporters.put(counter, match); companies.put(counter, compMatch); counter += 2; // System.out.println("Quote: "+Utils.getAnnotText(qStart, qEnd, text)); // if(!match.equals(Annotation.getNullAnnot())){ // System.out.println("Match: "+Utils.getAnnotText(match, text)); // }else{ // System.out.println("no match!"); // } } int initial = quoteLocations.size(); AnnotationSet nps = doc.getAnnotationSet(Constants.NP); for (Annotation a : nps.getOrderedAnnots()) { int s = a.getStartOffset(); quoteLocations = quoteLocations.tailSet(s); int numQuotes = initial - quoteLocations.size(); // System.err.println(numQuotes); if (numQuotes % 2 == 0) { a.setProperty(this, -1); a.setProperty(Property.AUTHOR, Annotation.getNullAnnot()); a.setProperty(Property.COMP_AUTHOR, Annotation.getNullAnnot()); } else { a.setProperty(this, numQuotes); a.setProperty(Property.AUTHOR, reporters.get(numQuotes)); a.setProperty(Property.COMP_AUTHOR, companies.get(numQuotes)); // if(FeatureUtils.isPronoun(a, annotations, text)&&FeatureUtils.getPronounPerson(FeatureUtils.getText(a, // text))==1 // &&FeatureUtils.NumberEnum.SINGLE.equals(FeatureUtils.getNumber(a, annotations, text))){ // Annotation repo = reporters.get(new Integer(numQuotes)); // if(repo==null||repo.equals(Annotation.getNullAnnot())){ // Annotation thisSent = sent.getOverlapping(a).getFirst(); // System.out.println("*** No author in "+Utils.getAnnotText(thisSent, text+"***")); // } // } } } // System.out.println("End of inquote"); return np.getProperty(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<String> locations();", "@Test\n\tpublic void listLocations(){\n\t\tList<Location> lists = locationService.queryLoctionsByLat(29.8679775, 121.5450105);\n\t\t//System.out.println(lists.size()) ;\n\t\tfor(Location loc : lists){\n\t\t\tSystem.out.println(loc.getAddress_cn());\n\t\t}\n\t}", "List<Place> findUnboundLocationPlaceholders();", "public List<String> getLocationAndCity(){\n\t\treturn jtemp.queryForList(\"SELECT location_id||city FROM locations\", String.class);\n\t}", "private String getCords() {\n return current.getLocString();\n\n }", "public abstract java.util.Set getLocations();", "private void scanForLocations(Element elem) {\n \n String location = getLocation(elem);\n if (location != null) {\n locationToElement.put(location, elem);\n DOM.setInnerHTML(elem, \"\");\n } else {\n int len = DOM.getChildCount(elem);\n for (int i = 0; i < len; i++) {\n scanForLocations(DOM.getChild(elem, i));\n }\n }\n }", "public Cursor getAllLocations()\n\t{\n\t\treturn db.query(DATABASE_TABLE, new String[] {\n\t\t\t\tKEY_DATE,KEY_LAT,KEY_LNG},\n\t\t\t\tnull,null,null,null,null);\n\t}", "@Override\n public List<Location> getAll() {\n\n List<Location> locations = new ArrayList<>();\n \n Query query = new Query(\"Location\");\n PreparedQuery results = ds.prepare(query);\n\n for (Entity entity : results.asIterable()) {\n double lat = (double) entity.getProperty(\"lat\");\n double lng = (double) entity.getProperty(\"lng\");\n String title = (String) entity.getProperty(\"title\");\n String note = (String) entity.getProperty(\"note\");\n int voteCount = ((Long) entity.getProperty(\"voteCount\")).intValue();\n String keyString = KeyFactory.keyToString(entity.getKey()); \n // TODO: Handle situation when one of these properties is missing\n\n Location location = new Location(title, lat, lng, note, voteCount, keyString);\n locations.add(location);\n }\n return locations;\n }", "Set<Location> extractLocations() {\n try {\n Set<Location> extracted = CharStreams.readLines(\n gazetteer,\n new ExtractLocations(populationThreshold)\n );\n\n // Raw population stats doesn't work great in the internet as-is. Calibrate for online activity\n calibrateWeight(extracted);\n\n return extracted;\n\n } catch (IOException e) {\n throw Throwables.propagate(e);\n }\n }", "private ArrayList<Location> getCandidateLocations(Location origin)\n {\n ArrayList<Location> locs = new ArrayList<>();\n Piece p = getPiece(origin);\n if (p==null)\n return locs;\n switch (p.getType())\n {\n case QUEEN:case ROOK:case BISHOP:\n locs = getLocations();break;\n case KNIGHT:case PAWN:case KING:\n locs = getLocationsWithin(getLocation(p),2);\n }\n return locs;\n }", "public LocalQuote\t\tgetQuote();", "protected abstract void getAllUniformLocations();", "public Cursor getAllLocationsLoc(){\n if (mDB != null)\n return mDB.query(LOCNODE_TABLE, new String[] { FIELD_ROW_ID, FIELD_NAME, FIELD_ADDY, FIELD_LAT , FIELD_LNG, FIELD_TIMESVISITED }, null, null, null, null, null);\n Cursor c = null;\n return c;\n }", "public Set<Location> get_all_locations() {\n Set<Location> locations = new HashSet<Location>();\n try {\n Object obj = JsonUtil.getInstance().getParser().parse(this.text);\n JSONObject jsonObject = (JSONObject) obj;\n JSONArray array = (JSONArray) jsonObject.get(\"pictures\");\n Iterator<String> iterator = array.iterator();\n while (iterator.hasNext()) {\n locations.add(new Location(iterator.next()));\n }\n return locations;\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }", "@Test\n public void findsByKeyword() throws Exception {\n final Base base = new DyBase(\n this.dynamo.region(), new MkSttc().counters().get(\"ttt\")\n );\n final Book book = base.books().add(\n \"@book{best2014, author=\\\"Walter\\\"}\"\n );\n final Quotes quotes = base.quotes();\n quotes.add(\n book, \"never give up and never think about bad things, Bobby\",\n \"99-101, 256-257, 315\"\n );\n MatcherAssert.assertThat(\n quotes.refine(\"bobby\").iterate(),\n Matchers.<Quote>iterableWithSize(1)\n );\n MatcherAssert.assertThat(\n quotes.refine(\"another-something\").iterate(),\n Matchers.<Quote>iterableWithSize(0)\n );\n }", "@Test\n public void testGetsAroundLocationI() throws DataSourceException, InvalidIdentifierException {\n // Get all demands from one location\n //\n Location where = new Location();\n where.setPostalCode(RobotResponder.ROBOT_POSTAL_CODE);\n where.setCountryCode(RobotResponder.ROBOT_COUNTRY_CODE);\n where = new LocationOperations().createLocation(where);\n\n ProposalOperations ops = new ProposalOperations();\n\n final Long ownerKey = 45678L;\n final Long storeKey = 78901L;\n Proposal first = new Proposal();\n first.setLocationKey(where.getKey());\n first.setOwnerKey(ownerKey);\n first.setStoreKey(storeKey);\n first = ops.createProposal(first);\n\n Proposal second = new Proposal();\n second.setLocationKey(where.getKey());\n second.setOwnerKey(ownerKey);\n second.setStoreKey(storeKey);\n second = ops.createProposal(second);\n\n first = ops.getProposal(first.getKey(), null, null);\n second = ops.getProposal(second.getKey(), null, null);\n\n List<Location> places = new ArrayList<Location>();\n places.add(where);\n\n List<Proposal> selection = ops.getProposals(places, 0);\n assertNotNull(selection);\n assertEquals(2, selection.size());\n assertTrue (selection.get(0).getKey().equals(first.getKey()) && selection.get(1).getKey().equals(second.getKey()) ||\n selection.get(1).getKey().equals(first.getKey()) && selection.get(0).getKey().equals(second.getKey()));\n // assertEquals(first.getKey(), selection.get(1).getKey()); // Should be second because of ordered by descending date\n // assertEquals(second.getKey(), selection.get(0).getKey()); // but dates are so closed that sometines first is returned first...\n }", "@Test\n public void addsAndListsQuotes() throws Exception {\n final Base base = new DyBase(\n this.dynamo.region(), new MkSttc().counters().get(\"cnt\")\n );\n final String name = \"alpha2010\";\n final Book book = base.books().add(\n String.format(\"@book{%s, author=\\\"Jeffrey\\\" }\", name)\n );\n final Quotes quotes = base.quotes();\n quotes.add(book, \"hey, how are you doing there, JavaDude?\", \"58\");\n MatcherAssert.assertThat(\n quotes.refine(\"javadude\").iterate(),\n Matchers.<Quote>iterableWithSize(1)\n );\n final Quote quote = quotes.iterate().iterator().next();\n MatcherAssert.assertThat(\n quote.book().name(),\n Matchers.equalTo(name)\n );\n MatcherAssert.assertThat(\n quote.book().bibitem(),\n Matchers.notNullValue()\n );\n }", "@Override\n\tpublic List<SourceLocation> getLocations() {\n\t\treturn null;\n\t}", "public List<String> getQuotes() throws FileNotFoundException {\n\t\tList<String> quotes = new LinkedList<String>();\n\t\tScanner scan = new Scanner(file);\n\n\t\tString curLine = \"\", rq = \"\";\n\t\tboolean inQuote = false;\n\n\t\twhile (scan.hasNextLine()) {\n\t\t\tcurLine = scan.nextLine();\n\t\t\tif (inQuote)\n\t\t\t\trq += \"\\n\";\n\t\t\twhile (!curLine.isEmpty()) {\n\t\t\t\tString ch = Character.toString(curLine.charAt(0));\n\t\t\t\tcurLine = curLine.substring(1);\n\t\t\t\tif (quote.equals(ch)) {\n\t\t\t\t\tif (inQuote) {\n\t\t\t\t\t\tquotes.add(rq);\n\t\t\t\t\t\trq = \"\";\n\t\t\t\t\t}\n\t\t\t\t\tinQuote = !inQuote;\n\t\t\t\t} else if (inQuote) {\n\t\t\t\t\trq += ch;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn quotes;\n\t}", "public String[] getAllLocations() {\n // STUB: Return the list of source names\n return null;\n }", "List<Position> selectAll();", "public List<String> locations() {\n return this.locations;\n }", "Collection<L> getLocations ();", "public String getQuote();", "Collection<Point> getAllCoordinates();", "@GetMapping\n public List<QuoteInfo> quotes(){\n Iterable<QuoteRecord> records = quoteRepository.findAll();\n List<QuoteInfo> quotes = new ArrayList<>();\n for(QuoteRecord q: records){\n quotes.add(quotePresenter.present(q));\n }\n\n return quotes;\n }", "public List<LocationInfo> getAllLocation() {\n return allLocation;\n }", "public Iterable<Place> places(){\n return places;\n }", "@Override\n public Iterable<Location> listLocations() {\n return ImmutableSet.<Location>of();\n }", "public List<String> getAllBoundaries() {\n\t\treturn getFieldsOfType(PropertyLocation.class, Boundary.class);\n\t}", "public String getQuotes() {\r\n\t\treturn this.quotes;\r\n\t}", "public List<String> getPlaces() {\n\t\treturn places;\n\t}", "@Test\n public void testGetsAroundLocationII() throws InvalidIdentifierException, DataSourceException {\n // Get just one demand from one location\n //\n Location where = new Location();\n where.setPostalCode(RobotResponder.ROBOT_POSTAL_CODE);\n where.setCountryCode(RobotResponder.ROBOT_COUNTRY_CODE);\n where = new LocationOperations().createLocation(where);\n\n ProposalOperations ops = new ProposalOperations();\n\n final Long ownerKey = 45678L;\n final Long storeKey = 78901L;\n Proposal first = new Proposal();\n first.setLocationKey(where.getKey());\n first.setOwnerKey(ownerKey);\n first.setStoreKey(storeKey);\n first = ops.createProposal(first);\n\n Proposal second = new Proposal();\n second.setLocationKey(where.getKey());\n second.setOwnerKey(ownerKey);\n second.setStoreKey(storeKey);\n second = ops.createProposal(second);\n\n first = ops.getProposal(first.getKey(), null, null);\n second = ops.getProposal(second.getKey(), null, null);\n\n List<Location> places = new ArrayList<Location>();\n places.add(where);\n\n List<Proposal> selection = ops.getProposals(places, 1);\n assertNotNull(selection);\n assertEquals(1, selection.size());\n assertTrue (selection.get(0).getKey().equals(first.getKey()) ||\n selection.get(0).getKey().equals(second.getKey()));\n // assertEquals(first.getKey(), selection.get(1).getKey()); // Should be second because of ordered by descending date\n // assertEquals(second.getKey(), selection.get(0).getKey()); // but dates are so closed that sometines first is returned first...\n }", "public String[] getGeoSystem();", "@Override\n public Map<String,Map<String,Object>> getLocatedLocations() {\n Map<String,Map<String,Object>> result = new LinkedHashMap<String,Map<String,Object>>();\n Map<Location, Integer> counts = new EntityLocationUtils(mgmt()).countLeafEntitiesByLocatedLocations();\n for (Map.Entry<Location,Integer> count: counts.entrySet()) {\n Location l = count.getKey();\n Map<String,Object> m = MutableMap.<String,Object>of(\n \"id\", l.getId(),\n \"name\", l.getDisplayName(),\n \"leafEntityCount\", count.getValue(),\n \"latitude\", l.getConfig(LocationConfigKeys.LATITUDE),\n \"longitude\", l.getConfig(LocationConfigKeys.LONGITUDE)\n );\n result.put(l.getId(), m);\n }\n return result;\n }", "public Cursor getAllLocations(){\n if (mDB != null)\n return mDB.query(DATABASE_TABLE, new String[] { FIELD_ROW_ID, FIELD_LAT , FIELD_LNG, FIELD_ACC, FIELD_TIME } , null, null, null, null, null);\n Cursor c = null;\n return c;\n }", "@GetMapping(\"ElementWebService/getAllCoords\")\n\tpublic String getAllHQCoords() {\n\t\tList<Element> elementList = elementService.getAll();\n\t\tList<Coord> coordList = new ArrayList<Coord>();\n\t\tfor(Element element: elementList) {\n\t\t\tcoordList.add(element.getLocation());\n\t\t}\n\t\treturn Tools.toJsonString(coordList);\n\t}", "public List<EntityPropertyLocation> find();", "private static final String FIND_ALL() {\r\n\t\treturn \"from Shipping3VO vo \";\r\n\t}", "private void getLocations() {\n TripSave tripSave = TripHelper.tripOngoing();\n if (tripSave != null) {\n for (LocationSave locationSave : tripSave.getLocations()) {\n if (locationSave != null) {\n tripTabFragment.drawPolyLine(new LatLng(locationSave.getLatitude(), locationSave.getLongitude()));\n }\n }\n }\n }", "public String getQuote(){\n\t\tString quote = null;\n\t\ttry {\n\t\t\tcrs = qb.selectFrom(\"qotd\").all().executeQuery();\n\n\t\t\tif(crs.next()) {\n\t\t\t\tquote = crs.getString(\"qotd\");\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tcrs.close();\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn quote;\n\t}", "@Override\n\tprotected Cursor loadCursor() {\n\t\treturn DataManager.get().queryLocations();\n\t}", "@Nonnull\r\n public List<String> getQuoteIncludePath() {\r\n return quoteincludepath;\r\n }", "@Override\n\tpublic synchronized Collection<Place> getPlaces() {\n\t\treturn this.places;\n\t}", "@Transactional\n\tpublic List<Location> listAllLocation() {\n\n\t\tCriteriaBuilder builder = getSession().getCriteriaBuilder();\n\t\tCriteriaQuery<Location> criteriaQuery = builder.createQuery(Location.class);\n\t\tRoot<Location> root = criteriaQuery.from(Location.class);\n\t\tcriteriaQuery.select(root);\n\t\tQuery<Location> query = getSession().createQuery(criteriaQuery);\n\n\t\t// query.setFirstResult((page - 1) * 5);\n\t\t// query.setMaxResults(5);\n\t\treturn query.getResultList();\n\t}", "public static Set<AT> getLatAts() {\n return getAts(latAts);\n }", "@Override\n\tpublic List<Address> FindAllAddress() {\n\t\treturn ab.FindAll();\n\t}", "public List<GeoRegionInner> locations() {\n return this.locations;\n }", "public static List<String> mainReadQuotes(String[] args) throws IOException, URISyntaxException {\n ObjectMapper OBM = getObjectMapper();\n File initialFile = resolveFileFromResources(args[0]);\n List<PortfolioTrade> trades = Arrays.asList(OBM.readValue(initialFile, PortfolioTrade[].class));\n List<TotalReturnsDto> sortedByValue = mainReadQuotesHelper(args,trades);\n Collections.sort(sortedByValue, TotalReturnsDto.closingComparator);\n List<String> stocks = new ArrayList<String>();\n for(TotalReturnsDto trd: sortedByValue){\n stocks.add(trd.getSymbol());\n }\n return stocks;\n }", "private ArrayList<String> findChampions() {\n\t\tString searchContents = search.getText();\n\t\tArrayList<String> result = new ArrayList<String>();\n\t\tfor (String c : CHAMPIONLIST) {\n\t\t\tif (c.toLowerCase().contains(searchContents.toLowerCase())) {\n\t\t\t\tresult.add(c);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public List<FavoriteLocation> queryAllLocations() {\n\t\tArrayList<FavoriteLocation> fls = new ArrayList<FavoriteLocation>(); \n\t\tCursor c = queryTheCursorLocation(); \n\t\twhile(c.moveToNext()){\n\t\t\tFavoriteLocation fl = new FavoriteLocation();\n\t\t\tfl._id = c.getInt(c.getColumnIndex(\"_id\"));\n\t\t\tfl.description = c.getString(c.getColumnIndex(DBEntryContract.LocationEntry.COLUMN_NAME_DES));\n\t\t\tfl.latitude = c.getDouble(c.getColumnIndex(DBEntryContract.LocationEntry.COLUMN_NAME_GEO_LAT));\n\t\t\tfl.longitude = c.getDouble(c.getColumnIndex(DBEntryContract.LocationEntry.COLUMN_NAME_GEO_LON));\n\t\t\tfl.street_info = c.getString(c.getColumnIndex(DBEntryContract.LocationEntry.COLUMN_NAME_STREET));\n\t\t\tfl.type = c.getInt(c.getColumnIndex(DBEntryContract.LocationEntry.COLUMN_NAME_CATEGORY));\n\t\t\tbyte[] image_byte = c.getBlob(c.getColumnIndex(DBEntryContract.LocationEntry.COLUMN_NAME_PIC)); \n\t\t\tfl.image = BitmapArrayConverter.convertByteArrayToBitmap(image_byte);\n\t\t\tfl.title = c.getString(c.getColumnIndex(DBEntryContract.LocationEntry.COLUMN_NAME_TITLE));\n\t\t\tfls.add(fl);\n\t\t}\n\t\t// close the cursor\n\t\tc.close();\n\t\treturn fls;\n\t}", "public abstract Location[] retrieveLocation();", "private void loadQuotesFromFile(String quoteFilePath) throws IOException {\n\t\tBufferedReader reader = new BufferedReader(new FileReader(quoteFilePath));\r\n\t\tString quote;\r\n\t\t\r\n\t\twhile ((quote = reader.readLine()) != null) {//adds quote to a listofQuotes\r\n\t\t\tlistofQuotes.add(quote);\r\n\t\t}\r\n\t\t\r\n\t\treader.close();\r\n\t}", "private static List<Element> getXMLLocations(Model model) {\n Set<Location> locations = new TreeSet<>(Comparators.objectsById());\n locations.addAll(model.getLocations(null));\n List<Element> result = new ArrayList<>();\n for (Location curLoc : locations) {\n Element locElement = new Element(\"location\");\n locElement.setAttribute(\"id\", String.valueOf(curLoc.getId()));\n locElement.setAttribute(\"name\", curLoc.getName());\n locElement.setAttribute(\"xPosition\",\n String.valueOf(curLoc.getPosition().getX()));\n locElement.setAttribute(\"yPosition\",\n String.valueOf(curLoc.getPosition().getY()));\n locElement.setAttribute(\"zPosition\",\n String.valueOf(curLoc.getPosition().getZ()));\n locElement.setAttribute(\"type\", curLoc.getType().getName());\n for (Location.Link curLink : curLoc.getAttachedLinks()) {\n Element linkElement = new Element(\"link\");\n linkElement.setAttribute(\"point\", curLink.getPoint().getName());\n for (String operation : curLink.getAllowedOperations()) {\n Element allowedOpElement = new Element(\"allowedOperation\");\n allowedOpElement.setAttribute(\"name\", operation);\n linkElement.addContent(allowedOpElement);\n }\n locElement.addContent(linkElement);\n }\n for (Map.Entry<String, String> curEntry\n : curLoc.getProperties().entrySet()) {\n Element propertyElement = new Element(\"property\");\n propertyElement.setAttribute(\"name\", curEntry.getKey());\n propertyElement.setAttribute(\"value\", curEntry.getValue());\n locElement.addContent(propertyElement);\n }\n result.add(locElement);\n }\n return result;\n }", "@Override\n\tpublic Iterable<ComplitedOrderInfo> findAll() {\n\t\treturn null;\n\t}", "public Set<Long> allPlaceIds() {\n return new HashSet<Long>( );\n }", "private void lookThroughLocations(ArrayList<String> produced){\n int cnt = 0;\n for(int i = 0; i < locations.size(); i++){\n ArrayList<Artefacts> locationArtifacts = locations.get(i).getArtefacts();\n for(int j = 0; j < locationArtifacts.size(); j++){\n for(String k : produced){\n if(locationArtifacts.get(j).getName().equals(k)){\n currentLocation.addArtefactToCurrentLocation(locationArtifacts.get(j));\n locationArtifacts.remove(j);\n }\n }\n }\n }\n for(int i = 0; i < locations.size(); i++){\n ArrayList<Characters> locationCharacters = locations.get(i).getCharacters();\n for(int j = 0; j < locationCharacters.size(); j++){\n for(String k : produced){\n if(locationCharacters.get(j).getName().equals(k)){\n currentLocation.addCharacterToCurrentLocation(locationCharacters.get(j));\n locationCharacters.remove(j);\n }\n }\n }\n }\n }", "com.google.ads.googleads.v14.services.SuggestGeoTargetConstantsRequest.LocationNames getLocationNames();", "@Select(GET_ALL)\n @Override\n ArrayList<Position> getAll();", "public static ArrayList<Coords> getCoords() {\n System.out.println(\"aha1 \" + thing);\n ArrayList<Coords> result = new ArrayList<Coords>();\n if(thing.equals(\"Bay Ridge\")){\n result = BayRidgeData.getData();\n System.out.println(\"true\");\n }else if(thing.equals(\"BRCA Commons Area\")){\n result = CommonsData.getData();\n }else{\n result = null;\n }\n return result;\n// return BayRidgeData.getData();\n }", "String getQuoteOfTheDay();", "public static Locations getLocations(WebElement root) {\n Preconditions.checkNotNull(root, \"The element cannot be null.\");\n Point topLeft = root.getLocation();\n Dimension dimension = root.getSize();\n Point topRight = topLeft.moveBy(dimension.getWidth(), 0);\n Point bottomRight = topRight.moveBy(0, dimension.getHeight());\n Point bottomLeft = topLeft.moveBy(0, dimension.getHeight());\n return new Locations(topLeft, topRight, bottomLeft, bottomRight);\n }", "public List<String> getSurroundingLocations() {\r\n\t\tList<String> surrounding = new ArrayList<String>();\r\n\t\tif(board.getBoard().keySet().size() == 0) {\r\n\t\t\tsurrounding.add(0 + \",\" + 0);\r\n\t\t} else {\r\n\t\t\tfor(String s: board.getBoard().keySet()) {\r\n\t\t\t\tString[] cooridinates = s.split(\",\");\r\n\t\t\t\tint xCoordinate = Integer.parseInt(cooridinates[0]);\r\n\t\t\t\tint yCoordinate = Integer.parseInt(cooridinates[1]);\r\n\t\t\t\tif(!surrounding.contains(xCoordinate - 1 + \",\" + yCoordinate)) {\r\n\t\t\t\t\tsurrounding.add(xCoordinate - 1 + \",\" + yCoordinate);\r\n\t\t\t\t}\r\n\t\t\t\tif(!surrounding.contains((xCoordinate + 1) + \",\" + yCoordinate)) {\r\n\t\t\t\t\tsurrounding.add((xCoordinate + 1) + \",\" + yCoordinate);\r\n\t\t\t\t}\r\n\t\t\t\tif(!surrounding.contains(xCoordinate + \",\" + (yCoordinate - 1))) {\r\n\t\t\t\t\tsurrounding.add(xCoordinate + \",\" + (yCoordinate - 1));\r\n\t\t\t\t}\r\n\t\t\t\tif(!surrounding.contains(xCoordinate + \",\" + (yCoordinate + 1))) {\r\n\t\t\t\t\tsurrounding.add(xCoordinate + \",\" + (yCoordinate + 1));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn surrounding;\r\n\t}", "void getDrivableLocations() {\n\t\t\tSystem.out.print(\"\\nPlaces you can drive to: \");\n\t\t\tfor (int i = 0; i < places.length; i++)\n\t\t\t\tif (places[i].drivable) //looks to see if you can drive there \n\t\t\t\t\tif ((places[i] != this)) //if it's not you're current location.\n\t\t\t\t\t\tSystem.out.print(places[i].locationName + \", \");\t//prints the name of the location\t\n\t\t\tSystem.out.println(\"\\n\");\n\t\t}", "public Location[] getLocation() {\r\n return locations;\r\n }", "List<Location> getLocations(String coverageType);", "private List<ICompletionProposal> getSuggestions(ITextViewer viewer,\n \t\t\tint offset, String prefix) throws BadLocationException {\n \n \t\tProperties properties = loadProposalFile();\n \n \t\tMap<String, String> filteredSuggestions = new HashMap<String, String>();\n \n \t\tfor (Entry<Object, Object> property : properties.entrySet()) {\n \t\t\tif (((String) property.getValue()).startsWith(prefix)) {\n \t\t\t\tfilteredSuggestions.put((String) property.getKey(),\n \t\t\t\t\t\t(String) property.getValue());\n \t\t\t}\n \t\t}\n \n \t\tList<ICompletionProposal> suggestions = createProposals(viewer,\n \t\t\t\tfilteredSuggestions, offset, prefix);\n \n \t\treturn suggestions;\n \t}", "public String getReferenceBases(VariantContext variantContext);", "java.util.List<phaseI.Hdfs.DataNodeLocation> \n getLocationsList();", "public Position[] getConvientBaseBuildingLocations() {\n\t\treturn convientBaseLocations;\n\t}", "private List<BaseLocation> getExpectedBaseLocations() {\r\n final List<BaseLocation> baseLocations = new ArrayList<>();\r\n\r\n final Position position1 = new Position(3104, 3856, PIXEL);\r\n final Position center1 = new Position(3040, 3808, PIXEL);\r\n baseLocations.add(new BaseLocation(position1, center1, 13500, 5000, true, false, true));\r\n\r\n final Position position2 = new Position(2208, 3632, PIXEL);\r\n final Position center2 = new Position(2144, 3584, PIXEL);\r\n baseLocations.add(new BaseLocation(position2, center2, 9000, 5000, true, false, false));\r\n\r\n final Position position3 = new Position(640, 3280, PIXEL);\r\n final Position center3 = new Position(576, 3232, PIXEL);\r\n baseLocations.add(new BaseLocation(position3, center3, 13500, 5000, true, false, true));\r\n\r\n final Position position4 = new Position(2688, 2992, PIXEL);\r\n final Position center4 = new Position(2624, 2944, PIXEL);\r\n baseLocations.add(new BaseLocation(position4, center4, 9000, 5000, true, false, false));\r\n\r\n final Position position5 = new Position(1792, 2480, PIXEL);\r\n final Position center5 = new Position(1728, 2432, PIXEL);\r\n baseLocations.add(new BaseLocation(position5, center5, 12000, 0, true, true, false));\r\n\r\n final Position position6 = new Position(3200, 1776, PIXEL);\r\n final Position center6 = new Position(3136, 1728, PIXEL);\r\n baseLocations.add(new BaseLocation(position6, center6, 13500, 5000, true, false, true));\r\n\r\n final Position position7 = new Position(640, 1968, PIXEL);\r\n final Position center7 = new Position(576, 1920, PIXEL);\r\n baseLocations.add(new BaseLocation(position7, center7, 9000, 5000, true, false, false));\r\n\r\n final Position position8 = new Position(1792, 1808, PIXEL);\r\n final Position center8 = new Position(1728, 1760, PIXEL);\r\n baseLocations.add(new BaseLocation(position8, center8, 12000, 0, true, true, false));\r\n\r\n final Position position9 = new Position(2336, 560, PIXEL);\r\n final Position center9 = new Position(2272, 512, PIXEL);\r\n baseLocations.add(new BaseLocation(position9, center9, 13500, 5000, true, false, true));\r\n\r\n final Position position10 = new Position(3584, 720, PIXEL);\r\n final Position center10 = new Position(3520, 672, PIXEL);\r\n baseLocations.add(new BaseLocation(position10, center10, 9000, 5000, true, false, false));\r\n\r\n final Position position11 = new Position(544, 432, PIXEL);\r\n final Position center11 = new Position(480, 384, PIXEL);\r\n baseLocations.add(new BaseLocation(position11, center11, 13500, 5000, true, false, true));\r\n\r\n return baseLocations;\r\n }", "private static void writeLocations(XMLStreamWriter w, RepositoryConnection con) throws XMLStreamException {\n\t\tint nr = 0;\n\n\t\ttry (RepositoryResult<Statement> res = con.getStatements(null, RDF.TYPE, DCTERMS.LOCATION)) {\n\t\t\twhile (res.hasNext()) {\n\t\t\t\tIRI iri = (IRI) res.next().getSubject();\n\n\t\t\t\tValue bbox = null;\n\t\t\t\tRepositoryResult<Statement> bboxes = con.getStatements(iri, DCAT.BBOX, null);\n\t\t\t\twhile (bboxes.hasNext()) {\n\t\t\t\t\tValue val = bboxes.next().getObject();\n\t\t\t\t\tif (val.stringValue().startsWith(\"POLYGON\")) {\n\t\t\t\t\t\tbbox = val;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (bbox != null) {\n\t\t\t\t\tnr++;\n\t\t\t\t\tw.writeStartElement(\"dct:Location\");\n\t\t\t\t\tw.writeAttribute(\"rdf:about\", iri.toString());\n\t\t\t\t\twriteLiteral(w, \"dcat:bbox\", bbox);\n\t\t\t\t\tw.writeEndElement();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tLOG.info(\"Wrote {} locations\", nr);\n\t}", "@Override\r\n\tpublic List<String> getCities() {\n \tList<Note> notes = this.noteRepository.findAll();\r\n \tfor (Note note : notes) {\r\n\t\t\tSystem.out.println(note.getTitle());\r\n\t\t}\r\n\t\treturn hotelBookingDao.getCities();\r\n\t}", "@Override\r\n\tpublic List<Address> findAll() {\r\n\t\tDAOJDBC DAOJDBCModel = new DAOJDBC();\r\n\t\tStatement sqlStatement = null;\r\n\t\tList<Address> arrayList = new ArrayList<>();\r\n\t\t\r\n\t\tResultSet array = DAOJDBCModel.multiCallReturn(\"SELECT * FROM address;\", sqlStatement);\r\n\t\t\r\n\t\ttry {\r\n\t\t\twhile(array.next()) {\r\n\t\t\t\tarrayList.add(new Address(array.getInt(\"id\"), array.getString(\"street\"), array.getString(\"district\"),\r\n\t\t\t\t\t\tarray.getInt(\"number\"), array.getString(\"note\"))); \r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn arrayList;\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\tDB.closeStatament(sqlStatement);\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}", "Iterable<Position<E>> positions();", "@Override\n public int locations() {\n return NUM_MECH_LOCATIONS;\n }", "@AutoEscape\n\tpublic String getLocacion();", "public List<Place> getPlaces(){\n\t\tSession currentSession = sessionFactory.getCurrentSession();\r\n\t\t\t\r\n\t\tQuery<Place> theQuery = currentSession.createQuery(\"FROM Place\", Place.class);\r\n\t\t\r\n\t\tList<Place> resultList = theQuery.getResultList();\r\n\t\t\t\r\n\t\treturn resultList;\r\n\t}", "String getLocation();", "String getLocation();", "String getLocation();", "public EList<GenClass> getAllStartSymbols() {\n \t\tEList<GenClass> symbols = new BasicEList<GenClass>();\n \t\tsymbols.addAll(getStartSymbols());\n \t\t\n \t\tEList<Import> imports = getImports();\n \t\tfor (Import importedElement : imports) {\n \t\t\tfinal ConcreteSyntax importedSyntax = importedElement.getConcreteSyntax();\n \t\t\tif (importedSyntax != null) {\n \t\t\t\tsymbols.addAll(importedSyntax.getAllStartSymbols());\n \t\t\t}\n \t\t}\n \t\treturn symbols;\n \t}", "public List<LatLng> getCoordinates() {\n return getGeometryObject();\n }", "@NotNull\n @Override\n public Object[] getVariants() {\n final Set<String> alreadySeen = ContainerUtil.newHashSet();\n final List<LookupElement> results = ContainerUtil.newArrayList();\n ResolveUtil.treeWalkUp(myElement, new FrogBaseScopeProcessor() {\n @Override\n public boolean execute(@NotNull PsiElement element, ResolveState state) {\n if (element instanceof FrogNamedElement) {\n FrogNamedElement namedElement = (FrogNamedElement) element;\n String name = namedElement.getName();\n if (!alreadySeen.contains(name)) {\n alreadySeen.add(name);\n results.add(buildLookupElement(namedElement));\n }\n }\n return true;\n }\n });\n return ArrayUtil.toObjectArray(results);\n }", "ImmutableList<SchemaOrgType> getContentLocationList();", "private List<LatLng> getCoordinates() {\n\n List<LatLng> list = new ArrayList<>();\n SharedPreferences.Editor editor = walkingSharedPreferences.edit();\n int size = walkingSharedPreferences.getInt(user.getUsername(), 0);\n for(int actual = 0; actual < size; actual++) {\n String pos = walkingSharedPreferences.getString(user.getUsername() + \"_\" + actual, \"\");\n editor.remove(user.getUsername() + \"_\" + actual);\n String[] splitPos = pos.split(\" \");\n LatLng latLng = new LatLng(Double.parseDouble(splitPos[LAT]), Double.parseDouble(splitPos[LNG]));\n list.add(latLng);\n }\n editor.remove(user.getUsername());\n editor.apply();\n return list;\n\n }", "@Test\n public void testGetsAroundLocationIII() throws InvalidIdentifierException, DataSourceException {\n // Get limited number of demands from many locations\n //\n LocationOperations lOps = new LocationOperations();\n ProposalOperations sOps = new ProposalOperations();\n\n Location lFirst = new Location();\n lFirst.setPostalCode(RobotResponder.ROBOT_POSTAL_CODE);\n lFirst.setCountryCode(RobotResponder.ROBOT_COUNTRY_CODE);\n lFirst = lOps.createLocation(lFirst);\n\n final Long ownerKey = 45678L;\n final Long storeKey = 78901L;\n Proposal sFirst = new Proposal();\n sFirst.setLocationKey(lFirst.getKey());\n sFirst.setOwnerKey(ownerKey);\n sFirst.setStoreKey(storeKey);\n sFirst = sOps.createProposal(sFirst);\n\n Location lSecond = new Location();\n lSecond.setPostalCode(\"H1H1H1\");\n lSecond.setCountryCode(RobotResponder.ROBOT_COUNTRY_CODE);\n lSecond = lOps.createLocation(lSecond);\n\n Proposal sSecond = new Proposal();\n sSecond.setLocationKey(lSecond.getKey());\n sSecond.setOwnerKey(ownerKey);\n sSecond.setStoreKey(storeKey);\n sOps.createProposal(sSecond);\n\n Proposal sThird = new Proposal();\n sThird.setLocationKey(lSecond.getKey());\n sThird.setOwnerKey(ownerKey);\n sThird.setStoreKey(storeKey);\n sOps.createProposal(sThird);\n\n sFirst = sOps.getProposal(sFirst.getKey(), null, null);\n sSecond = sOps.getProposal(sSecond.getKey(), null, null);\n sThird = sOps.getProposal(sThird.getKey(), null, null);\n\n List<Location> places = new ArrayList<Location>();\n places.add(lFirst);\n places.add(lSecond);\n\n List<Proposal> selection = sOps.getProposals(places, 2); // Should cut to 2 items\n assertNotNull(selection);\n assertEquals(2, selection.size());\n assertEquals(sFirst.getKey(), selection.get(0).getKey());\n // No more test because it appears sometimes sSecond comes back, sometimes sThird comes back\n // FIXME: re-insert the test for sSecond in the returned list when we're sure the issue related ordering on inherited attribute is fixed.\n }", "@AutoEscape\n\tpublic String getLocation();", "amdocs.iam.pd.pdwebservices.GetQuoteDocument.GetQuote getGetQuote();", "public List<Place> getPlaces(String idPrefix) {\n\t\tList<Place> placesRequested = new ArrayList<Place>();\n\t\t// iteration is thread safe\n\t\tfor(Place p : placesByUri.values()){\n\t\t\tboolean prefixOk = true;\n\t\t\tif(idPrefix != null){\n\t\t\t\tprefixOk = p.getId().startsWith(idPrefix);\n\t\t\t}\n\t\t\t\n\t\t\tif(prefixOk){\n\t\t\t\tplacesRequested.add(p);\n\t\t\t}\n\t\t}\n\t\treturn placesRequested;\n\t}", "List<Building> findBuildingCoordinatesByType(String type);", "private void extractLatLongAndRelativeLocation(Buoy buoy, String value)\n {\n String regexp = \"^(.+?)or\";\n Pattern pat = Pattern.compile(regexp);\n Matcher match = pat.matcher(value);\n\n String latLong = \"\";\n String relativePos = \"\";\n\n if (match.find())\n {\n latLong = match.group(0);\n relativePos = value.substring(value.\n lastIndexOf(latLong) + latLong.length(), value.length()).trim(); \n \n latLong = latLong.replace(\"or\", \"\").trim();\n\n\n } else\n {\n latLong = \"\";\n relativePos = value;\n }\n\n buoy.setLatlong(latLong);\n buoy.setRelativeLocation(relativePos);\n }", "public ArrayList<LocationDetail> getLocations() throws LocationException;", "public Set<String> getLocations(String word) {\n\t\tif (this.invertedIndex.get(word) == null) {\n\t\t\treturn Collections.emptySet();\n\t\t} else {\n\t\t\treturn Collections.unmodifiableSet(this.invertedIndex.get(word).keySet());\n\t\t}\n\t}", "@Override\r\n\tpublic List<Spot> queryAllSpot() {\n\t\treturn spotRepository.queryAllSpot();\r\n\t}", "public Cursor getCells(String location) { \t\n \treturn db.query(DATABASE_TABLE_CELL, new String[] {KEY_CELL_ROWID, KEY_CELL_LOCATION, KEY_CELL_LAC, KEY_CELL_CELLID}, KEY_CELL_LOCATION + \"=\" + location , null, null, null, null); \n }", "@NonNull\n private static List<String> findIncludesInDocument(@NonNull Document document) {\n List<String> includes = findIncludesInDocument(document, null);\n if (includes == null) {\n includes = Collections.emptyList();\n }\n return includes;\n }", "@Override\n\tpublic Iterable<ComplitedOrderInfo> findAll(Iterable<String> arg0) {\n\t\treturn null;\n\t}", "protected String garments() {\n StringBuilder sb = new StringBuilder();\n System.out.println(\"Cuts Made:\");\n sb.append('[');\n coordinateToString(sb, 0);\n sb.deleteCharAt(sb.length() - 1);\n sb.deleteCharAt(sb.length() - 1);\n sb.append(']');\n return sb.toString();\n }" ]
[ "0.550652", "0.5427283", "0.5413275", "0.5376726", "0.53716093", "0.5258895", "0.52273893", "0.51612604", "0.515179", "0.5126077", "0.5124048", "0.5115849", "0.5106771", "0.50766283", "0.5066736", "0.50527513", "0.5031199", "0.5023736", "0.49950564", "0.49896142", "0.4947197", "0.4945356", "0.49370807", "0.4927428", "0.49261218", "0.49238732", "0.49237558", "0.4890682", "0.4867944", "0.4867915", "0.48448634", "0.48441264", "0.48377144", "0.4826131", "0.4806007", "0.4797333", "0.47956806", "0.47953743", "0.47874796", "0.47726417", "0.47722802", "0.47660333", "0.47606295", "0.47553545", "0.4754498", "0.4735458", "0.4732911", "0.47208434", "0.470496", "0.47036123", "0.46988365", "0.46847025", "0.46831554", "0.46816292", "0.4676947", "0.46740082", "0.4670415", "0.46489945", "0.46397576", "0.4631462", "0.46228105", "0.46218687", "0.4620557", "0.4617822", "0.46133256", "0.46078673", "0.45990512", "0.45939735", "0.45919266", "0.45836976", "0.4582306", "0.4577598", "0.45774874", "0.45640466", "0.45562503", "0.45543694", "0.4552703", "0.454907", "0.45474413", "0.4545123", "0.4545123", "0.4545123", "0.45427147", "0.45418227", "0.45399684", "0.45392212", "0.4531051", "0.45308965", "0.45267633", "0.4524697", "0.4523765", "0.45179862", "0.45173573", "0.45134825", "0.4511247", "0.45100957", "0.4509931", "0.45025423", "0.45022944", "0.45021912" ]
0.5656328
0
includes buttons and appropriate text
private void initializeFeatures() { int buttonLength = 2*super.getXLength()/3; int buttonHeight = super.getYLength()/6; int startX = super.getXPos() + super.getXLength()/2 - buttonLength/2; int startY = super.getYPos() + super.getYLength()/2 - buttonHeight/2; int spacingBetweenButtons = 10; start = new StartButton(parent,startX,startY,buttonLength,buttonHeight); instructions = new InstructionsButton(parent,startX,startY + spacingBetweenButtons+buttonHeight,buttonLength,buttonHeight); quit = new QuitButton(parent,startX,startY + 2*(buttonHeight + spacingBetweenButtons),buttonLength,buttonHeight); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setupButtons()\n\t{\n\t\tequals.setText(\"=\");\n\t\tequals.setBackground(Color.RED);\n\t\tequals.setForeground(Color.WHITE);\n\t\tequals.setOpaque(true);\n\t\tequals.setFont(new Font(\"Lucida Grande\", Font.PLAIN, 50));\n\t\tequals.setBorder(new CompoundBorder(new LineBorder(Color.LIGHT_GRAY, 5), new LineBorder(Color.BLACK, 3)));\n\t\tclear.setText(\"C\");\n\t\tclear.setBackground(new Color(0, 170, 100));\n\t\tclear.setForeground(Color.WHITE);\n\t\tclear.setOpaque(true);\n\t\tclear.setFont(new Font(\"Lucida Grande\", Font.PLAIN, 50));\n\t\tclear.setBorder(new CompoundBorder(new LineBorder(Color.LIGHT_GRAY, 5), new LineBorder(Color.BLACK, 3)));\n\t\tbackspace.setText(\"<--\");\n\t\tbackspace.setBackground(new Color(0, 170, 100));\n\t\tbackspace.setForeground(Color.WHITE);\n\t\tbackspace.setOpaque(true);\n\t\tbackspace.setFont(new Font(\"Lucida Grande\", Font.PLAIN, 35));\n\t\tbackspace.setBorder(new CompoundBorder(new LineBorder(Color.LIGHT_GRAY, 5), new LineBorder(Color.BLACK, 3)));\n\t\tnegative.setText(\"+/-\");\n\t\tnegative.setBackground(Color.GRAY);\n\t\tnegative.setForeground(Color.WHITE);\n\t\tnegative.setOpaque(true);\n\t\tnegative.setFont(new Font(\"Lucida Grande\", Font.PLAIN, 35));\n\t\tnegative.setBorder(new CompoundBorder(new LineBorder(Color.LIGHT_GRAY, 5), new LineBorder(Color.BLACK, 3)));\n\t}", "@Override\n protected void addButtons()\n {\n JLabel agentOptions = new JLabel(\"Client Options \", SwingConstants.CENTER);\n addComponentToGridBag(this, agentOptions, 0, 0, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.BOTH);\n\n JButton agentSendMessage = new JButton(\"Send Message\");\n addComponentToGridBag(this, agentSendMessage, 0, 2, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.BOTH);\n agentSendMessage.addActionListener((ActionEvent e) ->\n {\n String to = getTo();\n String content = getContent(to);\n sendMessage(to, content);\n });\n\n JButton agentShowPortal = new JButton(\"Show Portal\");\n addComponentToGridBag(this, agentShowPortal, 0, 3, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.BOTH);\n agentShowPortal.addActionListener((ActionEvent e) ->\n {\n displayConnections();\n });\n\n JButton agentexit = new JButton(\"Exit\");\n addComponentToGridBag(this, agentexit, 0, 5, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.BOTH);\n agentexit.addActionListener((ActionEvent e) ->\n {\n System.exit(0);\n });\n }", "public void actionButton(String text);", "public HomePageHelper writeTextOfButtons(){\n System.out.println (\"Quantity of elements: \" + languagesButtons.size());\n for(WebElement el : languagesButtons){\n System.out.println(\"Tag Name: \" + el.getTagName());\n System.out.println(\"attr: ng-click - \" + el.getAttribute(\"ng-click\"));\n }\n return this;\n }", "private JLabel createButtonDescription() {\r\n JLabel buttonDescription = new JLabel(\"Result\");\r\n buttonDescription.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n buttonDescription.setBorder(new EmptyBorder(5, 5, 5, 5));\r\n buttonDescription.setText(\"Play again?\");\r\n buttonDescription.setFont(new Font(null, Font.PLAIN, 20));\r\n return buttonDescription;\r\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}", "private void setupButtons() {\n\t\tsetupCreateCourse();\n\t\tsetupRemoveCourse();\n\t\tsetupCreateOffering();\n\t\tsetupRemoveOffering();\n\t\tsetupAddPreReq();\n\t\tsetupRemovePreReq();\n\t\tsetupBack();\n\t}", "private void createOKButtons() {\n okAddButton = addOKButton(\"Add Shape\");\n okRemoveButton = addOKButton(\"Remove Shape\");\n okAddKeyframeButton = addOKButton(\"Add Keyframe\");\n okAddKeyframeTimeButton = addOKButton(\"Add Keyframe Time\");\n okRemoveKeyframeButton = addOKButton(\"Remove Keyframe\");\n okRemoveKeyframeTimeButton = addOKButton(\"Remove Keyframe Time\");\n okEditKeyframeButton = addOKButton(\"Edit Keyframe\");\n okEditKeyframeTimeButton = addOKButton(\"Edit Keyframe Time\");\n okEditKeyframeFinalButton = addOKButton(\"Edit Keyframe Final\");\n okClearShapeButton = addOKButton(\"Clear Shape\");\n }", "private void showButtonDemo(){\n Button submitButton = new Button(\"Submit\");\n\n Button cancelButton = new Button(\"Cancel\");\n\n submitButton.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n Question2Query ans = new Question2Query();\n String val= \"Sorry, we are unable to answer\";\n try {\n val = ans.ask(text.getText());\n } catch (Exception e1) {\n e1.printStackTrace();\n }\n statusLabel.setText(\"\\n\"+val);\n }\n });\n\n cancelButton.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n statusLabel.setText(\"Cancel Button clicked.\");\n }\n });\n\n //controlPanel.add(okButton);\n controlPanel.add(submitButton);\n controlPanel.add(cancelButton);\n mainFrame.setVisible(true);\n }", "private void updateButtons() {\n\t\tsetTitle(\"Insert \" + title + \"\\t\\tPage \" + pagenum + \"/\" + MAX_PAGE);\n\t\t// update button labels\n\t\tint symbx = pageoffset;\n\t\tint stop = symbx + 9;\n\t\tint nomore = stop;\n\t\tint symsize = getSymbolSize();\n\t\tif (nomore >= symsize - 1) {\n\t\t\tnomore = symsize - 1;\n\t\t}\n\t\tfor (int buttx = 0; symbx <= stop; symbx++) {\n\t\t\t// Log.d(\"SymbolDialog - updateButtons\", \"buttx: \" + buttx +\n\t\t\t// \" symbx: \" + symbx);\n\t\t\tif (symbx > nomore) {\n\t\t\t\t((TextView) mainview.findViewById(buttons[buttx])).setText(\"\");\n\t\t\t} else {\n\t\t\t\t((TextView) mainview.findViewById(buttons[buttx]))\n\t\t\t\t\t\t.setText(String.valueOf(getSymbol(symbx)));\n\t\t\t}\n\t\t\tbuttx++;\n\t\t}\n\t}", "public void showButtonText( boolean b ) {\n if ( b ) {\n _run_btn.setText( \"Run\" );\n _trace_btn.setText( \"Trace\" );\n _edit_btn.setText( \"Edit\" );\n _props_btn.setText( \"Properties\" );\n _options_btn.setText( \"Options\" );\n _reload_btn.setText( \"Reload\" );\n }\n else {\n _run_btn.setText( \"\" );\n _trace_btn.setText( \"\" );\n _edit_btn.setText( \"\" );\n _props_btn.setText( \"\" );\n _options_btn.setText( \"\" );\n _reload_btn.setText( \"\" );\n }\n }", "public abstract String getManipulatorButtonLabel();", "private void displayHowTo(JPanel panel) {\n JButton single = new JButton();\n JButton multi = new JButton();\n single.setText(\"Single Player Rules\");\n multi.setText(\"Multiplayer Rules\");\n\n // if text is written on screen, dispose and replace with\n // requested text; window starts with nothing on it\n JLabel text = new JLabel();\n panel.add(text);\n panel.add(single);\n panel.add(multi);\n \n // if user clicks on either button, the text will change\n // based on the rules applied.\n single.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n text.setText(\"<html>TEST 1</html>\");\n helppanel.add(text);\n }\n });\n multi.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n text.setText(\"<html>TEST 2</html>\");\n helppanel.add(text);\n }\n });\n\n helppanel.add(panel);\n }", "public void instruction() {\n gui.setUp();\n JLabel header = new JLabel(\"Vocabulary Quiz\");\n header.setFont(new Font(Font.MONOSPACED, Font.PLAIN, 28));\n gui.getConstraints().gridx = 0;\n gui.getConstraints().gridy = 0;\n gui.getConstraints().insets = new Insets(10,0,100,0);\n gui.getPanel().add(header, gui.getConstraints());\n String instructionText = \"You can make sure how many vocabularies you remember \";\n instructionText += \"in your list.\\nThere are \\\"\" + VocabularyQuizList.MAX_NUMBER_QUIZ + \"\\\" questions. \";\n instructionText += \"Each question has \\\"\" + VocabularyQuiz.NUM_SELECT + \"\\\" choices.\\n\\n\";\n instructionText += \"LET'S START!!\";\n JTextArea instruction = new JTextArea(instructionText);\n instruction.setEditable(false);\n instruction.setFont(new Font(Font.MONOSPACED, Font.PLAIN, 20));\n gui.getConstraints().gridy = 1;\n gui.getPanel().add(instruction, gui.getConstraints());\n JButton b = new JButton(\"start\");\n gui.getConstraints().gridy = 2;\n startQuestionListener(b);\n gui.getConstraints().insets = new Insets(10,300,10,300);\n gui.getPanel().add(b, gui.getConstraints());\n }", "private void addViewBody() {\n\t\tJButton medicosButton = new JButton(\"Médicos\");\n\t\tmedicosButton.addActionListener((ActionEvent e) -> {\n\t\t\tRouter.getInstance().goToView(new MedicosView());\n\t\t});\n\t\tthis.add(medicosButton);\n\n\t\tJButton clientesButton = new JButton(\"Clientes\");\n\t\tclientesButton.addActionListener((ActionEvent e) -> {\n\t\t\tRouter.getInstance().goToView(new ClientesView());\n\t\t});\n\t\tthis.add(clientesButton);\n\n\t\tJButton novaConsultaButton = new JButton(\"Nova Consulta\");\n\t\tnovaConsultaButton.addActionListener((ActionEvent e) -> {\n\t\t\tRouter.getInstance().goToView(new CadastroConsultaView());\n\t\t});\n\t\tthis.add(novaConsultaButton);\n\n\t\tJButton novoTesteButton = new JButton(\"Novo Teste [EM BREVE]\");\n\t\tnovoTesteButton.setEnabled(false);\n\t\tthis.add(novoTesteButton);\n\t}", "private void updateTextButtons() {\n CrewMember crewMember = department.getCrewMember();\n repair.setText(\"Click to repair your ship for \"+getHealCost()+ \" gold!\");\n upgrade.setText(\"Click to upgrade \" + crewMember.getName() + \" for \"+crewMember.getUpgradeCost()+\" gold!\");\n }", "public void drawButtons() {\n\t\tfill(color(221, 221, 221));\n\t\tfor (int i = 0; i < NUM_BUTTONS; i++) {\n\t\t\trect(BUTTON_LEFT_OFFSET + i * (BUTTON_WIDTH + 12), BUTTON_TOP_OFFSET, BUTTON_WIDTH, BUTTON_HEIGHT);\n\t\t}\n\n\t\t// set text color on the buttons to blue\n\t\tfill(color(0, 0, 255));\n\n\t\ttext(\"Add Cards\", BUTTON_LEFT_OFFSET + 18, BUTTON_TOP_OFFSET + 22);\n\t\ttext(\" Find Set\", BUTTON_LEFT_OFFSET + 18 + BUTTON_WIDTH + 12, BUTTON_TOP_OFFSET + 22);\n\t\ttext(\"New Game\", BUTTON_LEFT_OFFSET + 18 + 2 * (BUTTON_WIDTH + 12), BUTTON_TOP_OFFSET + 22);\n\t\tif (state == State.PAUSED) {\n\t\t\ttext(\"Resume\", BUTTON_LEFT_OFFSET + 45 + 3 * (BUTTON_WIDTH + 12), BUTTON_TOP_OFFSET + 22);\n\t\t} else {\n\t\t\ttext(\"Pause\", BUTTON_LEFT_OFFSET + 54 + 3 * (BUTTON_WIDTH + 12), BUTTON_TOP_OFFSET + 22);\n\t\t}\n\t}", "private void doButtons()\n {\n if (scopes.size()>1) addButtons();\n else hideButtons();\n }", "public void addKeys() {\n\t\tbtnDot = new JButton(\".\");\n\t\tbtnDot.setBounds(42, 120, 40, 40);\n\t\tthis.add(btnDot); //Handle case\n\t\t\n\t\tbtn0 = new JButton(\"0\");\n\t\tbtn0.setBounds(81, 120, 40, 40);\n\t\tthis.add(btn0);\n\t\tnumberButtonList = new ArrayList<JButton>(10);\n\t\tnumberButtonList.add(btn0);\n\t\t\n\t\tbtnC = new JButton(\"C\");\n\t\tbtnC.setBounds(120, 120, 40, 40);\n\t\tthis.add(btnC);\n\t\t\n\t\tbtnStar = new JButton(\"*\");\n\t\tbtnStar.setBounds(159, 120, 40, 40);\n\t\tthis.add(btnStar);\n\t\toperationButtonList = new ArrayList<JButton>(10);\n\t\toperationButtonList.add(btnStar);\n\t\t\n\t\tbtnPi = new JButton(\"π\");\n\t\tbtnPi.setBounds(198, 120, 40, 40);\n\t\tthis.add(btnPi);\n\t\t//numberButtonList.add(btnPi); //Special case\n\t\tvalueButtons.add(btnPi);\n\t\t\n\t\tbtnLn = new JButton(\"ln\");\n\t\tbtnLn.setBounds(237, 120, 40, 40);\n\t\tthis.add(btnLn);\n\t\tresultOperations.add(btnLn);\n\t\t\n\t\t//Row 2\n\t\t\n\t\tbtn3 = new JButton(\"3\");\n\t\tbtn3.setBounds(42, 80, 40, 40);\n\t\tthis.add(btn3);\n\t\tnumberButtonList.add(btn3);\n\t\t\n\t\tbtn2 = new JButton(\"2\");\n\t\tbtn2.setBounds(81, 80, 40, 40);\n\t\tthis.add(btn2);\n\t\tnumberButtonList.add(btn2);\n\t\t\n\t\tbtn1 = new JButton(\"1\");\n\t\tbtn1.setBounds(120, 80, 40, 40);\n\t\tthis.add(btn1);\n\t\tnumberButtonList.add(btn1);\n\t\t\n\t\tbtnDivide = new JButton(\"/\");\n\t\tbtnDivide.setBounds(159, 80, 40, 40);\n\t\tthis.add(btnDivide);\n\t\toperationButtonList.add(btnDivide);\n\t\t\n\t\tbtnE = new JButton(\"e\");\n\t\tbtnE.setBounds(198, 80, 40, 40);\n\t\tthis.add(btnE);\n\t\tvalueButtons.add(btnE);\n\t\t//numberButtonList.add(btnE); //Special case\n\t\t\n\t\tbtnTan = new JButton(\"tan\");\n\t\tbtnTan.setBounds(237, 80, 40, 40);\n\t\tthis.add(btnTan);\n\t\tresultOperations.add(btnTan);\n\t\t\n\t\t//Row 3\n\t\t\n\t\tbtn6 = new JButton(\"6\");\n\t\tbtn6.setBounds(42, 40, 40, 40);\n\t\tthis.add(btn6);\n\t\tnumberButtonList.add(btn6);\n\t\t\n\t\tbtn5 = new JButton(\"5\");\n\t\tbtn5.setBounds(81, 40, 40, 40);\n\t\tthis.add(btn5);\n\t\tnumberButtonList.add(btn5);\n\t\t\n\t\tbtn4 = new JButton(\"4\");\n\t\tbtn4.setBounds(120, 40, 40, 40);\n\t\tthis.add(btn4);\n\t\tnumberButtonList.add(btn4);\n\t\t\n\t\tbtnMinus = new JButton(\"-\");\n\t\tbtnMinus.setBounds(159, 40, 40, 40);\n\t\tthis.add(btnMinus);\n\t\toperationButtonList.add(btnMinus);\n\t\t\n\t\tbtnSqRt = new JButton(\"√\");\n\t\tbtnSqRt.setBounds(198, 40, 40, 40);\n\t\tthis.add(btnSqRt);\n\t\tresultOperations.add(btnSqRt);\n\t\t\n\t\tbtnCos = new JButton(\"cos\");\n\t\tbtnCos.setBounds(237, 40, 40, 40);\n\t\tthis.add(btnCos);\n\t\tresultOperations.add(btnCos);\n\t\t\n\t\t//Row 4\n\t\t\n\t\tbtn9 = new JButton(\"9\");\n\t\tbtn9.setBounds(42, 0, 40, 40);\n\t\tthis.add(btn9);\n\t\tnumberButtonList.add(btn9);\n\t\t\n\t\tbtn8 = new JButton(\"8\");\n\t\tbtn8.setBounds(81, 0, 40, 40);\n\t\tthis.add(btn8);\n\t\tnumberButtonList.add(btn8);\n\t\t\n\t\tbtn7 = new JButton(\"7\");\n\t\tbtn7.setBounds(120, 0, 40, 40);\n\t\tthis.add(btn7);\n\t\tnumberButtonList.add(btn7);\n\t\t\n\t\tbtnPlus = new JButton(\"+\");\n\t\tbtnPlus.setBounds(159, 0, 40, 40);\n\t\tthis.add(btnPlus);\n\t\toperationButtonList.add(btnPlus);\n\t\t\n\t\tbtnPower = new JButton(\"^\");\n\t\tbtnPower.setBounds(198, 0, 40, 40);\n\t\tthis.add(btnPower);\n\t\toperationButtonList.add(btnPower);\n\t\t\n\t\tbtnSin = new JButton(\"sin\");\n\t\tbtnSin.setBounds(237, 0, 40, 40);\n\t\tthis.add(btnSin);\n\t\tresultOperations.add(btnSin);\n\t}", "public void createButtons() {\n\t\tescapeBackground = new GRect(200, 150, 300, 400);\n\t\tescapeBackground.setFilled(true);\n\t\tescapeBackground.setColor(Color.gray);\n\n\t\tbutton1 = new GButton(\"Return to Game\", 250, 175, 200, 50, Color.cyan);\n\t\tbutton3 = new GButton(\"Exit Level\", 250, 330, 200, 50, Color.cyan);\n\t\tbutton4 = new GButton(\"Return to Menu\", 250, 475, 200, 50, Color.cyan);\n\n\t\tescapeButtons.add(button1);\n\t\tescapeButtons.add(button3);\n\t\tescapeButtons.add(button4);\n\n\t}", "private void setButtons()\n\t{\n\t\tstartSim = new JButton(\"Start Sim\");\n\t\tstartSim.addActionListener(this);\n\t\tpauseSim = new JButton(\"Pause Sim\");\n\t\tpauseSim.addActionListener(this);\n\t\taddEat = new JButton(\"Add Eatery\");\n\t\taddEat.addActionListener(this);\n\t\tsubEat = new JButton(\"Subtract Eatery\");\n\t\tsubEat.addActionListener(this);\n\t\taddCash = new JButton(\"Add Cashier\");\n\t\taddCash.addActionListener(this);\n\t\tsubCash = new JButton(\"Subtract Cashier\");\n\t\tsubCash.addActionListener(this);\n\t}", "private static void buttonSetup() {\n \n // For all buttons except clear and equals=, update display\n for(JButton i:buttonOrder) {\n if(i.equals(clear) || i.equals(equals))\n continue;\n i.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent evt) {\n if(displayString.toString().equals(\"ERROR\")) {\n displayString.replace(0, displayString.length(), i.getText());\n numField.setText(displayString.toString());\n } else {\n displayString.append(i.getText());\n numField.setText(displayString.toString());\n }\n }\n });\n }\n \n // Clears display\n clear.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent evt) {\n displayString.delete(0, displayString.length());\n numField.setText(displayString.toString());\n }\n });\n \n // Clears display, shows result\n equals.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent evt) {\n equationParse(displayString);\n }\n });\n }", "public void drawButtons(){\r\n\t\tGuiBooleanButton showDirection = new GuiBooleanButton(1, 10, 20, 150, 20, \"Show Direction\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isShowdir(), \"showdir\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.showdir\").split(\";\"));\r\n\t\tGuiChooseStringButton dirpos = new GuiChooseStringButton(2, width/2+50, 20, 150, 20, \"Dir-Position\", GuiPositions.getPosList(), \"posdir\", ModData.InfoMod, speicher,GuiPositions.getPos(((InfoMod)speicher.getMod(ModData.InfoMod.name())).getPosDir()),LiteModMain.lconfig.getData(\"Main.choosepos\").split(\";\"));\r\n\t\t\r\n\t\tGuiBooleanButton showFPS= new GuiBooleanButton(3, 10, 45, 150, 20, \"Show FPS\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isShowfps(), \"showfps\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.showfps\").split(\";\"));\r\n\t\tGuiChooseStringButton fpspos = new GuiChooseStringButton(4, width/2+50, 45, 150, 20, \"FPS-Position\", GuiPositions.getPosList(), \"posfps\", ModData.InfoMod, speicher,GuiPositions.getPos(((InfoMod)speicher.getMod(ModData.InfoMod.name())).getPosFPS()),LiteModMain.lconfig.getData(\"Main.choosepos\").split(\";\"));\r\n\t\t\r\n\t\tGuiBooleanButton showCoor = new GuiBooleanButton(5, 10, 70, 150, 20, \"Show Coor\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isShowcoor(), \"showcoor\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.showcoor\").split(\";\"));\r\n\t\tGuiChooseStringButton coorpos = new GuiChooseStringButton(6, width/2+50, 70, 150, 20, \"Coor-Position\", GuiPositions.getPosList(), \"poscoor\", ModData.InfoMod, speicher,GuiPositions.getPos(((InfoMod)speicher.getMod(ModData.InfoMod.name())).getPosCoor()),LiteModMain.lconfig.getData(\"Main.choosepos\").split(\";\"));\r\n\t\t\r\n\t\tGuiBooleanButton showworldage = new GuiBooleanButton(7, 10, 95, 150, 20, \"Show WorldAge\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isShowWorldAge(), \"showworldage\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.showworldage\").split(\";\"));\r\n\t\tGuiChooseStringButton worldagepos = new GuiChooseStringButton(8, width/2+50, 95, 150, 20, \"WorldAge-Position\", GuiPositions.getPosList(), \"posworldage\", ModData.InfoMod, speicher,GuiPositions.getPos(((InfoMod)speicher.getMod(ModData.InfoMod.name())).getPosWorldAge()),LiteModMain.lconfig.getData(\"Main.choosepos\").split(\";\"));\r\n\t\t\r\n\t\t\r\n\t\tGuiBooleanButton showFriendly = new GuiBooleanButton(7, 10, 120, 150, 20, \"Mark friendly spawns\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isShowingFriendlySpawns(), \"showfmobspawn\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.showfriendlymobspawn\").split(\";\"));\r\n\t\tGuiBooleanButton showAggressiv = new GuiBooleanButton(7, 10, 145, 150, 20, \"Mark aggressiv spawns\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isShowingAggressivSpawns(), \"showamobspawn\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.showaggressivmobspawn\").split(\";\"));\r\n\t\t\r\n\t\tGuiBooleanButton dynamic = new GuiBooleanButton(7, width/2+50, 120, 150, 20, \"dynamic selection\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isDynamic(), \"dynamichsel\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.dynamicselection\").split(\";\"));\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tGuiButton back = new GuiButton(9, width/2-100,height-50 , \"back to game\");\r\n\t\t\r\n\t\tbuttonList.add(showworldage);\r\n\t\tbuttonList.add(worldagepos);\r\n\t\tbuttonList.add(dirpos);\r\n\t\tbuttonList.add(fpspos);\r\n\t\tbuttonList.add(coorpos);\r\n\t\tbuttonList.add(showCoor);\r\n\t\tbuttonList.add(showFPS);\r\n\t\tbuttonList.add(showDirection);\r\n\t\t\r\n\t\tbuttonList.add(showFriendly);\r\n\t\tbuttonList.add(showAggressiv);\r\n\t\tbuttonList.add(dynamic);\r\n\t\t\r\n\t\tbuttonList.add(back);\r\n\t}", "private void setComponentTexts(){\n\t\tsetTitle(translations.getRegexFileChanger());\n\t\tbuttonCopyToClipboard.setText(translations.getCopyToClipboard());\n\t\tregexTo.setToolTipText(wrapHTML(translations.getRegexToInfo()));\n\t\tregexFrom.setToolTipText(wrapHTML(translations.getRegexFromInfo()));\n\t\tregexFromLabel.setText(translations.getGiveRegexFrom());\n\t\tregexToLabel.setText(translations.getGiveRegexTo());\n\t\tgiveRegexLabel.setText(translations.getBelowGiveRegexRules());\n\t\tbuttonChooseDestinationDirectory.setText(translations.getChooseDestinationDirectory());\n\t\tbuttonSimulateChangeFileNames.setToolTipText(wrapHTML(translations.getSimulateFileChangesInfo()));\n\t\tbuttonSimulateChangeFileNames.setText(translations.getSimulateChangeNames());\n\t\tbuttonChangeFileNames.setToolTipText(wrapHTML(translations.getChangeFileNamesInfo()));\n\t\tbuttonChangeFileNames.setText(translations.getChangeNames());\n\t\tbuttonCopyToClipboard.setToolTipText(wrapHTML(translations.getCopyToClipBoardInfo()));\n\t\tbuttonCopyToClipboard.setText(translations.getCopyToClipboard());\n\t\tbuttonResetToDefaults.setToolTipText(wrapHTML(translations.getResetToDefaultsInfo()));\n\t\tbuttonResetToDefaults.setText(translations.getDeleteSettings());\n\t\tbuttonExample.setText(translations.getShowExample());\n\t\tbuttonExample.setToolTipText(translations.getButtonShowExSettings());\n\t\tcheckboxSaveStateOn.setToolTipText(wrapHTML(translations.getSaveStateCheckBoxInfo()));\n\t\tcheckboxSaveStateOn.setText(translations.getSaveStateOnExit());\n\t\tchooseLanguageLabel.setText(translations.getChooseLanguage());\n\t\tsetDirectoryInfoLabel(translations.getSeeChoosedDirPath());\n\t\tcheckboxRecursiveSearch.setText(translations.getRecursiveSearch());\n\t\tcheckboxRecursiveSearch.setToolTipText(translations.getRecursiveSearchToolTip());\n\t\tcheckboxShowFullPath.setToolTipText(translations.getShowFullPathCheckboxTooltip());\n\t\tcheckboxShowFullPath.setText(translations.getShowFullPathCheckbox());\n\t\tbuttonClear.setText(translations.getButtonClear());\n\t\tbuttonClear.setToolTipText(translations.getButtonClearTooltip());\n\t}", "void actionButton ( ) throws IOException {\n String textOfField = this.gui.wdgInputText.getText();\n this.gui.widgOutput.append(\"Button1 \" + (++this.ctKeyStroke1) + \" time, text=\" + textOfField + \"\\n\");\n }", "public abstract void showBox(String message, Node content, Button... buttons);", "private void createAboutButton(final ToolBar bar) {\r\n // image's source:\r\n // http://commons.wikimedia.org/wiki/File:Information.png\r\n createButton(bar, \"images/Information.png\", \"About\",\r\n new SelectionAdapter() {\r\n @Override\r\n public void widgetSelected(final SelectionEvent arg0) {\r\n displayInfo(\"The parity game played is a max priority parity game.\\n\"\r\n + \"Player 0 has round vertices, player 1 has square vertices.\\n\"\r\n + \"Player 0 wins even priorities and player 1 wins odd priorities.\\n\"\r\n + \"Once solved, the winning region of player 0 is displayed in green.\\n\"\r\n + \"The winning region of player 1 is displayed in blue.\");\r\n // TODO: display this in a read-only text-box such that links can easily be copied\r\n displayInfo(\"The images for loading, generating and solving arenas are public domain and were retrieved from:\\n\"\r\n + \"https://openclipart.org/detail/119905/load-cedric-bosdonnat-01-by-anonymous\\n\"\r\n + \"http://pixabay.com/de/w%C3%BCrfel-sechs-gesichter-rollen-35637/\\n\"\r\n + \"and\\n\"\r\n + \"http://pixabay.com/de/puzzle-st%C3%BCck-stichs%C3%A4ge-konzept-308908/\\n\"\r\n + \"respecitvely.\\n\"\r\n + \"The image for saving arenas is under creative commons attribution license, created by VistaICO.com and was retrieved from:\\n\"\r\n + \"https://www.iconfinder.com/icons/49256/disk_save_icon\\n\"\r\n + \"Furthermore, the libraries SWT and Zest under the EPL\\n\"\r\n + \"and the libraries Apache Commons and Google Guava under the Apache license have been used.\\n\");\r\n }\r\n });\r\n }", "private void createBottomActionButtons() {\n Composite actionControlComp = new Composite(shell, SWT.NONE);\n GridLayout gl = new GridLayout(2, false);\n GridData gd = new GridData(SWT.FILL, SWT.DEFAULT, true, false);\n actionControlComp.setLayout(gl);\n actionControlComp.setLayoutData(gd);\n\n Button okBtn = new Button(actionControlComp, SWT.PUSH);\n okBtn.setText(\" OK \");\n okBtn.addSelectionListener(new SelectionAdapter() {\n\n @Override\n public void widgetSelected(SelectionEvent e) {\n if (verifySelection()) {\n close();\n }\n }\n });\n\n Button cancelBtn = new Button(actionControlComp, SWT.PUSH);\n cancelBtn.setText(\" Cancel \");\n cancelBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n close();\n }\n });\n }", "private void addComponents() {\n\t\tthis.add(btn_pause);\n\t\tthis.add(btn_continue);\n\t\tthis.add(btn_restart);\n\t\tthis.add(btn_rank);\n\t\tif(Config.user.getUsername().equals(\"root\")) {\n\t\t\tthis.add(btn_admin);\n\t\t}\n\t\n\t\t\n\t}", "public FinalActionButtons()\n {\n eliminateButton = new JButton( \"Eliminate a Candidate\" );\n eliminateButton.setPreferredSize( new Dimension( 300, 100 ) );\n eliminateButton.addActionListener( this );\n add( eliminateButton );\n eliminateButton.setFont( new Font( \"Helvetica\", Font.PLAIN, 20 ) );\n\n doneButton = new JButton( \"Get Statistics\" );\n doneButton.setPreferredSize( new Dimension( 300, 100 ) );\n doneButton.addActionListener( this );\n add( doneButton );\n doneButton.setFont( new Font( \"Helvetica\", Font.PLAIN, 20 ) );\n }", "private void help() {\n String border = \"=====================================================================================\";\n String title = \"AILearning API:\\n\";\n String template = \"arguments: numOfControls, controls..., quantityOfEach, hasHighContrast, hasDisabled, \" +\n \"hasNoise, isUnsorted\\n\";\n String numOfCon= \"numOfControls - integer number of controls (1 - 6)\\n\";\n String contrls = \"controls... - each control is string and number of strings equals numOfControls\";\n String namesOfControls = \"Every string is define symbol:\\nB - Button, TF - TextField, RB - RadioButton\" +\n \"Sp - Spinner, Sl - Slider, CB - CheckBox\\n\";\n String quantityOfEach = \"quantityOfEach - integer number of each control (0 - 1 000 000)\\n\";\n String highContrast = \"hasHighContrast - string (true or false)\\n\";\n String disabled = \"hasDisabled - string (true of false)\\nif true - some controls will be disabled\\n\";\n String noise = \"hasNoise - string (true or false)\\n\";\n String unsorted = \"isUnsorted - string (true or false)\\nif true - controls will be in one folder\\n\";\n String example = \"Example: 3 B TF RB 100 true true true false\";\n String meaning = \"It means that app will generate 100 Buttons, 100 TextFields, 100 RadioButtons \" +\n \"with high contrast, noise,\\nsome controls will be disabled and locate in different folders\";\n\n System.out.println(String.format(\"%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\", border, title, template, numOfCon,\n contrls, namesOfControls, quantityOfEach, highContrast, disabled, noise, unsorted, example, meaning));\n }", "public void actionPerformed(ActionEvent event) { //action performed method (goes here when a button is pressed); most of the logic goes inside here because the buttons dictate the flow of execution\r\n String command = event.getActionCommand(); //storing the text of the button into a string variable\r\n \r\n if(command.equals(\"OK\")){\r\n name1 = input.getText(); //getting the name and storing it when the first button, OK, is pressed\r\n welcome.remove(okButton);\r\n welcome.remove(welcomelabel); //removing unecessary labels\r\n \r\n instructions.setText((\"<html> Hi \" + \"</br>\"+name1 + \", which mode would you like to play? </html>\")); //changing the text of the label\r\n \r\n welcome.add(pvp);\r\n welcome.add(Box.createRigidArea(new Dimension(0,75))); //adding the 2 buttons and formatting them \r\n pvp.setAlignmentX(Component.CENTER_ALIGNMENT); \r\n \r\n welcome.add(pvai); \r\n pvai.setAlignmentX(Component.CENTER_ALIGNMENT); \r\n }\r\n \r\n if(command.equals(\"Player vs Player\")){ //if pvp button was clicked\r\n instructions.setText(\"<html> You chose Player vs Player! \" +\"</br>\"+ name1 + \", which colour would you like your checker to be? </html>\"); \r\n mode =1;\r\n welcome.remove(pvp);\r\n welcome.remove(pvai); //removing the buttons from the screen and updating the user interface\r\n welcome.updateUI(); \r\n addColor();\r\n }\r\n \r\n else if(command.equals(\"Player vs AI\")){ //if pvai button was clicked\r\n instructions.setText(\"<html> You chose Player vs AI! \" + \"</br>\"+name1 + \", which colour would you like your checker to be? </html>\"); \r\n mode = 2;\r\n welcome.remove(pvp);\r\n welcome.remove(pvai); \r\n welcome.updateUI();\r\n addColor(); //calling the method which puts the color options on to the screen\r\n }\r\n \r\n \r\n //========================================================PVP BUTTONS==========================================================================\r\n //===================================================================================================================================\r\n if(command.equals(\" 1\")){ //the extra spaces are because of the formatting of the columnnumbers\r\n columnnumber=1;\r\n command = \"Enter\";\r\n }\r\n if(command.equals(\" 2\")){\r\n columnnumber=2;\r\n command = \"Enter\";\r\n }\r\n if(command.equals(\" 3\")){\r\n columnnumber=3;\r\n command = \"Enter\";\r\n }\r\n if(command.equals(\" 4\")){ //depending on which button they press, change the columnnumber. Then send it to the if statement that runs when command = entered\r\n columnnumber=4;\r\n command = \"Enter\";\r\n }\r\n if(command.equals(\" 5\")){\r\n columnnumber=5;\r\n command = \"Enter\";\r\n }\r\n if(command.equals(\" 6\")){\r\n columnnumber=6;\r\n command = \"Enter\";\r\n }\r\n if(command.equals(\" 7\")){\r\n columnnumber=7;\r\n command = \"Enter\";\r\n }\r\n \r\n \r\n //======================================when player 1 makes their choice of the pvp mode ==================================================================\r\n if(command.equals(\"Black\")&&choice == 1 &&mode ==1){ // determining which button was pressed and which player pressed it\r\n instructions.setText(\"Great choice! Now, what is Player 2's name?\"); \r\n color1 = Color.black; //for player 1\r\n removeColor();\r\n welcome.updateUI();\r\n welcome.add(okayButton);\r\n input.setText(\"\");\r\n okayButton.setAlignmentX(Component.CENTER_ALIGNMENT); //centering the component \r\n }\r\n \r\n if(command.equals(\"Red\")&&choice == 1 &&mode ==1){ //if the colour was pressed by the first player\r\n instructions.setText(\"Great choice! Player 2, what is your name?\");\r\n color1 = Color.red;\r\n removeColor(); //removing the other colors from screen //red\r\n welcome.updateUI();\r\n welcome.add(okayButton);\r\n input.setText(\"\"); //clearing the text field\r\n okayButton.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n }\r\n \r\n if(command.equals(\"Yellow\")&&choice == 1 &&mode ==1){ \r\n instructions.setText(\"Great choice! Player 2, what is your name?\");\r\n color1 = Color.yellow;\r\n removeColor(); //yellow\r\n welcome.updateUI();\r\n welcome.add(okayButton);\r\n input.setText(\"\");\r\n okayButton.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n }\r\n \r\n if(command.equals(\"Green\")&&choice == 1 &&mode ==1){ \r\n instructions.setText(\"Great choice! Player 2, what is your name?\"); //greem\r\n color1 = Color.green;\r\n removeColor(); \r\n welcome.updateUI();\r\n welcome.add(okayButton);\r\n input.setText(\"\");\r\n okayButton.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n }\r\n \r\n //======================================================================================================================================================\r\n //2nd users info in pvp mode\r\n \r\n if(command.equals(\"Okay\")){ //if they press okay --> asks for the 2nd users info\r\n name2 = input.getText();\r\n instructions.setText(\"<html>Hello \" + \"</br>\" +name2 + \", choose a colour for your checker. </html>\"); //move on to the 2nd player options\r\n welcome.remove(input); //^^using html to print out new lines if someone's name is too long\r\n welcome.updateUI();\r\n \r\n welcome.add(black);\r\n black.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n black.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));\r\n \r\n welcome.add(red);\r\n red.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n red.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));\r\n //readding all the color buttons again\r\n welcome.add(yellow);\r\n yellow.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n yellow.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));\r\n \r\n welcome.add(green);\r\n green.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n green.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));\r\n \r\n choice = 2; //showing that it is the 2nd user's turn now\r\n \r\n if(color1==Color.black){\r\n welcome.remove(okayButton);\r\n welcome.remove(black);\r\n }\r\n if(color1==Color.red){\r\n welcome.remove(okayButton);\r\n welcome.remove(red); //depending on which colour was chosen by the first player, take it out of the options for the 2nd player\r\n }\r\n if(color1==Color.yellow){\r\n welcome.remove(okayButton);\r\n welcome.remove(yellow);\r\n }\r\n if(color1==Color.green){\r\n welcome.remove(okayButton);\r\n welcome.remove(green);\r\n }\r\n } \r\n \r\n if(command.equals(\"Black\")&&choice == 2&&mode==1){ //once player 2 picks their colour\r\n instructions.setText(\"Interesting choice! Let's begin the game!\");\r\n color2 = Color.black;\r\n removeColor(); \r\n welcome.updateUI();\r\n okayButton.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n goesFirst(); //method that determines who goes first\r\n }\r\n \r\n if(command.equals(\"Red\")&&choice == 2&&mode==1){ \r\n instructions.setText(\"Interesting choice! Let's begin the game!\");\r\n color2 = Color.red;\r\n removeColor(); //removing the unneccessary colour buttons\r\n welcome.updateUI();\r\n okayButton.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n goesFirst(); \r\n }\r\n \r\n if(command.equals(\"Yellow\")&&choice == 2&&mode==1){ \r\n instructions.setText(\"Interesting choice! Let's begin the game!\");\r\n color2 = Color.yellow;\r\n removeColor(); \r\n welcome.updateUI();\r\n okayButton.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n goesFirst(); //method that determines who goes first\r\n }\r\n \r\n if(command.equals(\"Green\")&&choice == 2&&mode==1){ \r\n instructions.setText(\"Interesting choice! Let's begin the game!\");\r\n color2 = Color.green;\r\n removeColor(); \r\n welcome.updateUI();\r\n okayButton.setAlignmentX(Component.CENTER_ALIGNMENT); //aligning the buttons\r\n goesFirst(); \r\n }\r\n \r\n if(command.equals(name1)&&mode==1){ //if p1 goes first\r\n PVP(name1); //if they want name1 to go first, send it to the method with the correct parameter\r\n }\r\n \r\n else if(command.equals(name2)&&mode==1){ //if p2 goes first\r\n PVP(name2); //sending to PVP method which allows user to start game\r\n }\r\n \r\n else if(command.equals(\"Flip a coin\")&&mode==1){\r\n \r\n randomnum = (int)(r.nextInt(2));\r\n \r\n if(randomnum == 0){ //using randomnum to simulate the flipping of a coin\r\n PVP(name1);\r\n }\r\n else{ //randomly decides who goes first\r\n PVP(name2);\r\n }\r\n }\r\n \r\n \r\n //logic of the connect 4 game goes here --> when they press enter==============================================================---------============================\r\n //when they click a button\r\n if(command.equals(\"Enter\")&&whoseTurn==1&&canGo==true){ //WHEN PLAYER 1 GOES\r\n \r\n if(validInput(columnnumber)){\r\n erase = 0;\r\n changeBoard(columnnumber, whoseTurn, color1, color2); //sending the columnnumber picked to the changeBoard method, which changes the colour of things on the screen\r\n input.setText(\"\");\r\n whoseTurn=2;\r\n \r\n if(fullBoard()){\r\n whoseTurn = 0; //checking if the result of the game is a draw\r\n repeatGui(\"\"); \r\n }\r\n \r\n numTurns++; //accumulating the total amount of turns\r\n \r\n if(hasCheckingCondition(4, color1)){ //if they win the game; this is checked by sending the current state of the board to the hasCheckingCondition\r\n userWins++; //incrementing UserWin counter\r\n whoseTurn = 0; //make it no one's turn now because the game is over\r\n GameWon = true; //making it so that no one can go anymore because the game is over\r\n canGo = false;\r\n playSound(); //plays a winning tune if the user ever wins\r\n repeatGui(name1); //this method gives the user the option to restart the game\r\n }\r\n \r\n else{ //if player 1 has not won the game\r\n \r\n if(fullBoard()){ //if the board is full\r\n repeatGui(name1); //if they draw the game, ask if they want to repeat the GUI\r\n \r\n }\r\n else{\r\n if(!name2.equals(\"AI.BOT\")){ //else, then it is player 2's turn. If it isnt the ai, then outprint the below\r\n instructions.setText(\"<html>\"+name2 + \"<html>'s turn. <br><br> Please click the column number you wish to place your checker in. </html>\");\r\n }\r\n }\r\n }\r\n if(mode==2){\r\n whoseTurn=AINumber; //if the mode is 2 that means they chose, PvAI, so we make whoseTurn to AINumber, which is 3 or 4 depending on hard or easy mode\r\n }\r\n }\r\n else{\r\n instructions.setText(\"Please click a valid column number.\"); //if that column is full, they must reclick another valid column\r\n }\r\n }\r\n \r\n else if(command.equals(\"Enter\")&&whoseTurn ==2&&canGo==true){ //WHEN PLAYER 2 GOES\r\n \r\n if(validInput(columnnumber)){ //same if statements as above, just that player 2 is now playing\r\n erase = 0;\r\n changeBoard(columnnumber, whoseTurn, color1, color2); //calling the changeBoard method which changes the coour of the index based on the user and his pick\r\n input.setText(\"\");\r\n whoseTurn=1; //this will make this section and the above 'if' section alternate\r\n numTurns++; //accumulating the total amount of turns\r\n \r\n if(hasCheckingCondition(4, color2)){\r\n GameWon = true;\r\n canGo = false;\r\n whoseTurn = 0;\r\n playSound();\r\n repeatGui(name2); //repeating the GUI\r\n }\r\n else{\r\n \r\n if(fullBoard()){ //look at comments above for reference\r\n repeatGui(name2);\r\n }\r\n \r\n else{\r\n instructions.setText(\"<html>\"+name1 + \"<html>'s turn. <br><br> Please click the column number you wish to place your checker in. </html>\");\r\n }\r\n }\r\n }\r\n else{\r\n instructions.setText(\"Please click a valid column.\");\r\n }\r\n }\r\n \r\n //for the easy ai======================================================================================\r\n if(whoseTurn == 3 && command.equals(\"Enter\") &&GameWon == false){ //WHEN THE EASY AI GOES\r\n \r\n instructions.setText(\"<html>Please click the column number\"+\"</br>\"+\" you wish to place your checker in. </html>\"); //using html once again\r\n \r\n AIPlayed = false; //boolean that keeps track of if the AI has made a move or not\r\n for(int i = 1; i<=7; i++){\r\n \r\n if(fullBoard()){\r\n repeatGui(\"\"); //giving user option to play again if the result is a draw\r\n break;\r\n }\r\n \r\n if(validInput(i)){\r\n changeBoard(i, AINumber, color1, color2); //put a checker in every possible column\r\n if(hasCheckingCondition(4, color2)){ //then check if any of those checker can win the game\r\n GameWon = true;\r\n AIPlayed = true; //a tracker of if the AI has played or not\r\n whoseTurn = 0;\r\n canGo = false;\r\n repeatGui(\"AI\"); //send this to the method saying that the AI won the game. The method will then ask the user if they would like to play again\r\n break;\r\n }\r\n \r\n else if(hasCheckingCondition(4, color2)==false){ //if it cant win the game\r\n erase = i; //changing all the checkers placed back to white\r\n changeBoard(erase, AINumber, color1, color2); //this method can either add or erase checkers; in this case, erase\r\n erase = 0;\r\n \r\n if(fullBoard()){\r\n repeatGui(\"\"); //if the result of the game is a tie, break and send it to the repeatGUI method\r\n break;\r\n }\r\n \r\n continue;\r\n }\r\n }\r\n }\r\n \r\n //if the opponent(user) can win\r\n if(AIPlayed ==false){ //if the AI still hasnt made a move\r\n for(int i = 1; i<=7; i++){\r\n if(validInput(i)){\r\n erase = 0; //resetting this variable (*IMPORTANT*)\r\n changeBoard(i, 1, color1, color2); //place a checker of the opponents colour in every slot\r\n if(hasCheckingCondition(4, color1)){ //if the opponent can win, then place a checker of the AI's colour to block it\r\n erase = i;\r\n changeBoard(erase, 1, color1, color2); //change back the checker \r\n erase = 0;\r\n changeBoard(i, 3, color1, color2); //put a checker of the AI's colour to block it\r\n AIPlayed = true;\r\n numTurns++;\r\n whoseTurn = 1; //giving the turn back to the user and breaking out of the loop once it has blocked the user\r\n break;\r\n }\r\n \r\n else if(hasCheckingCondition(4, color1)==false){ //changing the colors back to what it was before\r\n erase = i;\r\n changeBoard(erase, 1, color1, color2);\r\n erase = 0;\r\n continue;\r\n }\r\n }\r\n }\r\n }\r\n \r\n erase = 0; //must keep resetting this or else the changeBoard method will think it has to erase the checker instead of placing it\r\n \r\n if(AIPlayed == false){\r\n randomnum = (int)(r.nextInt(7)+1);\r\n \r\n while(validInput(randomnum)==false){ //if the AI cant win or block the opponent, it chooses a random slot and places it there\r\n randomnum = (int)(r.nextInt(7)+1);\r\n }\r\n \r\n changeBoard(randomnum, AINumber, color1, color2); //using a randomnum as long as it is a valid column\r\n numTurns++;\r\n whoseTurn = 1;\r\n \r\n if(fullBoard()){\r\n whoseTurn = 0;\r\n repeatGui(\"\"); \r\n }\r\n \r\n }\r\n }//end of easy ai========================================================\r\n \r\n \r\n //=========================//FOR THE HARD AI============================//\r\n \r\n if(whoseTurn == 4 &&command.equals(\"Enter\")&&GameWon==false){ //start of Hard AI\r\n //need to check the same things as the EasyAI at first - if the AI can win or if the USER can win\r\n \r\n instructions.setText(\"<html>Please click the column number\"+\"</br>\"+\" you wish to place your checker in. </html>\"); //using html once again\r\n \r\n AIPlayed = false; //boolean that keeps track of if the AI has made a move or not\r\n canPlace = true; //boolean that keeps track if the AI should place a checker there\r\n \r\n for(int a = 0; a<7; a++){\r\n shouldNotPlace[a]=-1; //resetting the array each time so that it can accumulate the moves properly\r\n }\r\n \r\n //CHECKING TO SEE IF THE AI CAN WIN====================================\r\n for(int i = 1; i<=7; i++){\r\n if(fullBoard()){\r\n repeatGui(\"\"); //if the result is a draw\r\n break;\r\n }\r\n \r\n if(validInput(i)){\r\n changeBoard(i, AINumber, color1, color2); //put a checker in every possible column\r\n if(hasCheckingCondition(4, color2)){ //then check if any of those checker can win the game\r\n GameWon = true;\r\n AIPlayed = true;\r\n whoseTurn = 0;\r\n canGo = false;\r\n repeatGui(\"AI\");\r\n playSound();\r\n break;\r\n }\r\n else if(hasCheckingCondition(4, color2)==false){ //if it cant win the game\r\n erase = i; //changing all the checkers placed back to white\r\n changeBoard(erase, AINumber, color1, color2);\r\n erase = 0;\r\n continue;\r\n }\r\n }\r\n }\r\n \r\n //CHECKING IF THE USER CAN WIN THE GAME, IF SO THEN BLOCK\r\n if(AIPlayed ==false){ //if the AI still hasnt made a move\r\n for(int i = 1; i<=7; i++){\r\n if(validInput(i)){ //this must be a valid column to hypothetically place a checker in\r\n erase = 0;\r\n changeBoard(i, 1, color1, color2); //place a checker of the opponents colour in every slot\r\n if(hasCheckingCondition(4, color1)){ //if the opponent can win, then place a checker of the AI's colour to block it\r\n erase = i;\r\n changeBoard(erase, 1, color1, color2); //erasing the checker just placed that was used to see if black could win\r\n erase = 0;\r\n changeBoard(i, AINumber, color1, color2);//changing the colour of it to magenta to block the opponent\r\n AIPlayed = true;\r\n numTurns++;\r\n if(fullBoard()){\r\n whoseTurn = 0;\r\n repeatGui(\"\"); \r\n }\r\n whoseTurn = 1; //giving the turn back to the user and breaking out of the loop once it has blocked the user\r\n break;\r\n }\r\n \r\n else if(hasCheckingCondition(4, color1)==false){ //changing the colors back to what it was before\r\n erase = i;\r\n changeBoard(erase, 1, color1, color2); //removing the checker placed at the beginning to its original game state\r\n erase = 0;\r\n continue;\r\n }\r\n }\r\n }\r\n }\r\n \r\n \r\n //CHECKING IF THE USER CAN GET A DOUBLE TRAP ON THE BOTTOM ROW (hard coding it just for the bottom row)=============\r\n \r\n if(AIPlayed == false&&trapBlocked == false){ //only needs to run once\r\n if(arrayCircles[5][3].getColor()==color1){ //if they have a checker in the middle column\r\n if(arrayCircles[5][4].getColor()==color1){ //checker to the right\r\n if(arrayCircles[5][2].getColor()==Color.white){\r\n erase = 0;\r\n changeBoard(3, AINumber, color1, color2); //changing the colour of it to magenta to block the opponent from a double on the bottom\r\n AIPlayed = true;\r\n numTurns++;\r\n whoseTurn = 1; //giving the turn back to the user and breaking out of the loop once it has blocked the user\r\n trapBlocked = true;\r\n }\r\n }\r\n if(arrayCircles[5][2].getColor()==color1){ //checker to the left\r\n if(arrayCircles[5][4].getColor()==Color.white){\r\n erase = 0;\r\n changeBoard(5, AINumber, color1, color2); //changing the colour of it to magenta to block the opponent from a double on the bottom\r\n AIPlayed = true;\r\n numTurns++;\r\n whoseTurn = 1; //giving the turn back to the user and breaking out of the loop once it has blocked the user\r\n trapBlocked = true;\r\n }\r\n }\r\n }\r\n }\r\n \r\n //CHECKING WHICH MOVES THE AI SHOULD NOT PLACE THAT WOULD LEAD TO AN IMMEDIATE WIN FOR THE USER============================\r\n \r\n if(AIPlayed==false){\r\n counter = 0;\r\n for(int i = 1; i<=7; i++){\r\n if(validInput(i)){ //making sure that column is valid\r\n erase = 0;\r\n changeBoard(i, AINumber, color1, color2); //simulating every possible move of the AI\r\n for(int j = 1; j<=7; j++){\r\n if(validInput(j)){\r\n erase = 0;\r\n changeBoard(j, 1, color1, color2); //then seeing if the user can win after any one of those moves\r\n if(hasCheckingCondition(4, color1)==true){ \r\n shouldNotPlace[counter]=i; //if so, store it in the array so the AI knows to not place it there ever in the future\r\n counter++;\r\n }\r\n erase = j;\r\n changeBoard(erase, 1, color1, color2); //erasing previous moves\r\n }\r\n }\r\n erase = i;\r\n changeBoard(erase, AINumber, color1, color2); //erasing previous moves\r\n }\r\n }\r\n }\r\n \r\n //SETTING UP THE DOUBLE TRAP\r\n if(AIPlayed==false){ //this checks if the AI can make a move to double trap the user\r\n //looks ahead to the future state of the game and determines which column is best to win\r\n canPlace = true;\r\n mustPlace = -1;\r\n for(int i = 1; i<=7; i++){\r\n if(validInput(i)&&canPlace==true){ \r\n erase = 0; //adding a move\r\n changeBoard(i, AINumber, color1, color2); //simulating every possible move of the AI\r\n for(int j = 1; j<=7; j++){\r\n if(validInput(j)&&canPlace == true){\r\n erase = 0; //adding another AI move\r\n changeBoard(j, AINumber, color1, color2); //then seeing if the AI can win after any one of those moves\r\n if(hasCheckingCondition(4, color2)==true){\r\n erase = j;\r\n changeBoard(erase, AINumber, color1, color2); //erasing the magenta one for the black one\r\n erase=0;\r\n changeBoard(j, 1, color1, color2); //placing a black checker here for the future game board possibilities after this move\r\n \r\n for(int z = 1; z<=7; z++){\r\n if(validInput(z)&&canPlace==true){\r\n erase = 0;\r\n changeBoard(z, AINumber, color1, color2); //adding a move\r\n if(hasCheckingCondition(4, color2)==true){//that means they can get a double win because the user blocked one win, but the AI can still make another\r\n mustPlace = i; //the move that can win the game by setting up a double win for the AI\r\n for(int x =0; x<7; x++){\r\n if(i==shouldNotPlace[i]){ //if mustPlace equals a immediate losing move, continue the loop to find the next one which results in a valid move\r\n canPlace = true;\r\n continue;\r\n }\r\n }\r\n canPlace = false; //putting it here so that the loop doesnt run again after its found, but the current iteration finishes\r\n }\r\n erase = z;\r\n changeBoard(erase, AINumber, color1, color2); //subtracting the checkers\r\n }\r\n }\r\n erase = j; //erasing if the USER placed something\r\n changeBoard(erase, 1, color1, color2);\r\n }\r\n else if(hasCheckingCondition(4, color1)==false){\r\n erase = j;\r\n changeBoard(erase, AINumber, color1, color2); //erasing the moves just placed by the AI\r\n }\r\n }\r\n }\r\n erase = i;\r\n changeBoard(erase, AINumber, color1, color2); //erasing the moves just placed by the AI\r\n }\r\n }\r\n \r\n if(mustPlace>-1){\r\n canPlace = true;\r\n for(int i = 0; i<7; i++){\r\n if(mustPlace == shouldNotPlace[i]){ //making sure that this projected move is not gonna lead immediately to a loss\r\n canPlace = false;\r\n }\r\n }\r\n \r\n if(canPlace==true){\r\n erase=0;\r\n changeBoard(mustPlace, AINumber, color1, color2); //placing the move\r\n AIPlayed = true;\r\n numTurns++;\r\n if(fullBoard()){\r\n whoseTurn = 0;\r\n repeatGui(\"\"); \r\n }\r\n canGo = true; //making sure that it is the users turn now, and the AI cannot play anymore until the next turn\r\n whoseTurn = 1;\r\n }\r\n }\r\n }\r\n \r\n //BLOCKING A DOUBLE TRAP\r\n //it works by considering all opssible moves the opponent can make; then, it will again simulate moves that the user can make (2 moves in a row for the user)\r\n //then, if the user can win within two moves, block its second move by replacing the 2nd move with a magenta colour; now, simulate all possible moves of black\r\n //again, and see if the user can win. If so, then that means the user has a double trap potential depending on the AI's move THIS turn\r\n //at the end of this part of code, the AI should block the user from initially making the connect 4, blocking the double\r\n \r\n if(AIPlayed==false){ //this blocks the opponent from forcing the AI into making a move; essentially stops the double win before it happens\r\n //looks ahead to the future state of the game and determines which column is best to block the opponent\r\n canPlace = true;\r\n mustPlace = -1;\r\n for(int i = 1; i<=7; i++){\r\n if(validInput(i)&&canPlace==true){ \r\n erase = 0; //adding a move\r\n changeBoard(i, 1, color1, color2); //simulating every possible move of the user\r\n for(int j = 1; j<=7; j++){\r\n if(validInput(j)&&canPlace == true){\r\n erase = 0; //adding another user move\r\n changeBoard(j, 1, color1, color2); //then seeing if the user can win after any one of those moves\r\n if(hasCheckingCondition(4, color1)==true){\r\n erase = j;\r\n changeBoard(erase, 1, color1, color2); //erasing the black one for a magenta one\r\n erase=0;\r\n changeBoard(j, AINumber, color1, color2); //placing a magenta checker here for the future game board possibilities\r\n \r\n for(int z = 1; z<=7; z++){\r\n if(validInput(z)&&canPlace==true){\r\n erase = 0;\r\n changeBoard(z, 1, color1, color2); //adding\r\n if(hasCheckingCondition(4, color1)==true){//that means they can get a double win soon\r\n mustPlace = i; //the move that must be placed to block a double move is i\r\n for(int x =0; x<7; x++){\r\n if(i==shouldNotPlace[i]){ //if mustPlace equals a immediate losing move, continue the loop to find the next one which results in a valid move\r\n canPlace = true;\r\n continue;\r\n }\r\n }\r\n canPlace = false; //putting it here so that the loop doesnt run again after its found, but the current iteration finishes\r\n }\r\n erase = z;\r\n changeBoard(erase, 1, color1, color2); //subtracting the checker\r\n }\r\n }\r\n erase = j; //erasing if the AI placed something\r\n changeBoard(erase, AINumber, color1, color2);\r\n }\r\n else if(hasCheckingCondition(4, color1)==false){\r\n erase = j;\r\n changeBoard(erase, 1, color1, color2); //erasing the moves just placed\r\n }\r\n }\r\n }\r\n erase = i;\r\n changeBoard(erase, 1, color1, color2); //erasing the moves just placed\r\n }\r\n }\r\n \r\n if(mustPlace>-1){\r\n canPlace = true;\r\n for(int i = 0; i<7; i++){\r\n if(mustPlace == shouldNotPlace[i]){ //making sure that this projected move is not gonna lead immediately to a loss\r\n canPlace = false;\r\n }\r\n }\r\n \r\n if(canPlace==true){\r\n erase=0;\r\n changeBoard(mustPlace, AINumber, color1, color2);\r\n AIPlayed = true;\r\n numTurns++;\r\n if(fullBoard()){\r\n whoseTurn = 0;\r\n repeatGui(\"\"); \r\n }\r\n canGo = true; //making sure that it is the users turn now, and the AI cannot play anymore until the next turn\r\n whoseTurn = 1;\r\n }\r\n }\r\n }\r\n \r\n if(AIPlayed==false){ //if the AI still hasnt made a move because none of the above is possible, then place in the center or middle columns if possible\r\n if(validInput(4)==true){\r\n canPlace=true;\r\n for(int i = 0; i<7; i++){\r\n if(shouldNotPlace[i]==4){\r\n canPlace=false; //if column 4 ever results in a losing move, dont place it there\r\n break;\r\n }\r\n }\r\n if(canPlace==true){\r\n if(arrayCircles[1][3].getColor()==Color.white){ //the AI shouldnt place it in the top-top row in the 4th column all the time\r\n erase = 0;\r\n changeBoard(4, AINumber, color1, color2); //for the center or middle column\r\n numTurns++; \r\n if(fullBoard()){\r\n whoseTurn = 0; //checking if the result of the game is a draw\r\n repeatGui(\"\"); \r\n }\r\n whoseTurn=1;\r\n AIPlayed = true; //making sure that it is the users turn now, and the AI cannot play anymore until the next turn\r\n canGo=true;\r\n }\r\n }\r\n }\r\n }\r\n \r\n if(AIPlayed==false){ //this statement is so that the AI places a checker in the 3rd or 5th column provided that it isnt an immediate losing move\r\n outer: for(int i = 2; i<5; i++){ //if the AI still hasnt played, put it in a position at the bottom of the column\r\n for(int a = 0; a<7; a++){\r\n if(i+1==shouldNotPlace[a]){ //checking if the columnnumber equals to any part of the shouldNotPlace array\r\n canPlace = false;\r\n break outer; //breaking the outer loop for efficiency\r\n }\r\n }\r\n }\r\n if(canPlace==true&&AIPlayed == false){ // \r\n randomnum = (int)(r.nextInt(2));\r\n if(randomnum==0){\r\n if(validInput(3)){ //making all the possible moves are at least valid first\r\n erase=0;\r\n changeBoard(3, AINumber, color1, color2); //put it at the bottom of the more centered rows\r\n numTurns++; \r\n if(fullBoard()){\r\n whoseTurn = 0; //checking if the result of the game is a draw\r\n repeatGui(\"\"); \r\n }\r\n whoseTurn=1;\r\n AIPlayed = true; //making sure that it is the users turn now, and the AI cannot play anymore until the next turn\r\n canGo=true;\r\n }\r\n }\r\n else if (randomnum==1){\r\n if(validInput(5)){\r\n erase=0;\r\n changeBoard(5, AINumber, color1, color2); //put it at the bottom of the more centered rows\r\n numTurns++; \r\n if(fullBoard()){\r\n whoseTurn = 0; //checking if the result of the game is a draw\r\n repeatGui(\"\"); \r\n }\r\n whoseTurn=1;\r\n AIPlayed = true; //making sure that it is the users turn now, and the AI cannot play anymore until the next turn\r\n canGo=true;\r\n }\r\n }\r\n }\r\n }\r\n \r\n if(AIPlayed == false){ //if all of the above is not possible, then make a random choice that will not lose the game the next turn\r\n do{\r\n randomnum = (int)(r.nextInt(7)+1);\r\n \r\n timesChecked++;\r\n \r\n if(timesChecked>1000){ //if it runs 1000 times, meaning that there is only one spot to play which will result in a loss\r\n for(int i = 1; i<=7; i++){\r\n if(validInput(i)== true){\r\n randomnum = i; //setting the random number to be the only column left available\r\n }\r\n }\r\n break; //breaking out of the loop if there is no other choice for a checker\r\n }\r\n \r\n for(int i = 0; i<7; i++){\r\n if(shouldNotPlace[i]==randomnum){\r\n randomnum=100; //causing the loop to run again\r\n break;\r\n }\r\n }\r\n \r\n }while(validInput(randomnum)==false); //if the AI cant win or block the opponent, it chooses a random slot and places it there\r\n \r\n erase = 0;\r\n changeBoard(randomnum, AINumber, color1, color2); //changing the board here and the variables below then make it the users turn\r\n numTurns++;\r\n if(fullBoard()){\r\n whoseTurn = 0; //checking if the result of the game is a draw\r\n repeatGui(\"\"); \r\n }\r\n whoseTurn = 1;\r\n AIPlayed = true; //making sure that it is the users turn now, and the AI cannot play anymore until the next turn\r\n canGo=true;\r\n }\r\n \r\n }//END OF HARD AI METHOD=====================\r\n \r\n ///========================================================//////PVAI BUTTONS///////=======================================================================\r\n if(command.equals(\"Black\")&&mode==2){ \r\n instructions.setText(\"<html>Interesting choice!\"+\"</br>\" +\" Would you like to play vs the Easy AI or the Hard AI?\");\r\n color1 = Color.black; \r\n removeColor(); \r\n addAiButtons(); \r\n }\r\n \r\n if(command.equals(\"Red\")&&mode==2){ \r\n instructions.setText(\"<html>Interesting choice!\"+\"</br>\" + \" Would you like to play vs the Easy AI or the Hard AI?\");\r\n color1 = Color.red;\r\n removeColor(); \r\n addAiButtons(); //depending on which colour they press\r\n }\r\n \r\n if(command.equals(\"Yellow\")&&mode==2){ \r\n instructions.setText(\"<html>Interesting choice!\"+\"</br>\" +\" Would you like to play vs the Easy AI or the Hard AI?\");\r\n color1 = Color.yellow;\r\n removeColor(); \r\n addAiButtons(); \r\n }\r\n \r\n if(command.equals(\"Green\")&&mode==2){ \r\n instructions.setText(\"<html>Interesting choice!\"+\"</br>\" +\" Would you like to play vs the Easy AI or the Hard AI?\");\r\n color1 = Color.green;\r\n removeColor(); \r\n addAiButtons(); \r\n }\r\n \r\n if(command.equals(\"Easy AI\")){\r\n choseEasyAI = true;\r\n welcome.remove(easyAI); //sending it to the appropriate methods after they pressed the respective buttons\r\n welcome.remove(hardAI);\r\n goesFirst();\r\n }\r\n else if(command.equals(\"Hard AI\")){ //if they choose the hardAI\r\n choseEasyAI = false; \r\n welcome.remove(easyAI);\r\n welcome.remove(hardAI);\r\n goesFirst();\r\n }\r\n \r\n if(mode==2&&command.equals(name1)){\r\n PVAI(name1); //if they want name1 to go first, send it to the method with the correct parameter\r\n }\r\n \r\n else if(command.equals(name2)&&mode==2){ //if name 2 wants to go first\r\n PVAI(name2);\r\n }\r\n \r\n else if(command.equals(\"Flip a coin\")&&mode==2){ //if they desire to flip a coin to determine who goes first\r\n \r\n randomnum = (int)(r.nextInt(2));\r\n \r\n if(randomnum == 0){ //using randomnum to simulate the flipping of a coin\r\n PVAI(name1);\r\n }\r\n else{ //randomly decides who goes first\r\n PVAI(name2);\r\n }\r\n }\r\n \r\n //if they would like to play again; the buttons appear at the end\r\n if(command.equals(\"Yes\")){\r\n playAgain = true; //if they want to play again\r\n repeatGui(\"\"); //repeating the GUI method\r\n }\r\n else if(command.equals(\"No\")){\r\n this.dispose(); //getting rid of the frame; essentially closing it\r\n }\r\n }", "public void setTemplateButtons() {\r\n\t\tbtnSetBirth.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tif (e.getSource() == btnSetBirth) {\r\n\t\t\t\t\tlblTemplateBirthday.setText(\"Using Template: \" + comboEmails.getSelectedItem());\r\n\t\t\t\t\ttemplateBirthday = (String) comboEmails.getSelectedItem();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnSetAnniv.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tif (e.getSource() == btnSetAnniv) {\r\n\t\t\t\t\tlblTemplateAnniv.setText(\"Using Template: \" + comboEmails.getSelectedItem());\r\n\t\t\t\t\ttemplateAnniv = (String) comboEmails.getSelectedItem();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnSetPromo.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tif (e.getSource() == btnSetPromo) {\r\n\t\t\t\t\tlblPromoTemplate.setText(\"Using Template: \" + comboEmails.getSelectedItem());\r\n\t\t\t\t\ttemplatePromo = (String) comboEmails.getSelectedItem();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\r\n\t}", "private void renderObjetos() {\n // Agrego los botones a la barra\n this.rBotones.add(this.btnOK);\n this.rBotones.add(this.btnCancel);\n }", "private void createYourMusicContent() {\n\t\t/**Creates all images we will use for the buttons*/\n\t\tImageIcon image1 = new ImageIcon(sURLFB1);\n\t\tImageIcon image2 = new ImageIcon(sURLFB2);\n\t\tImageIcon image3 = new ImageIcon(sURLFB3);\n\t\tImageIcon image4 = new ImageIcon(sURLFBS1);\n\t\tImageIcon image5 = new ImageIcon(sURLFBS2);\n\t\tImageIcon image6 = new ImageIcon(sURLFBS3);\n\t\tImageIcon image7 = new ImageIcon(sURLFBPL1);\n\t\tImageIcon image8 = new ImageIcon(sURLFBPL2);\n\t\tImageIcon image9 = new ImageIcon(sURLFBPL3);\n\t\n\t\t/**Creates the button of Favourites and configures it*/\n\t\tjbFavorites = new JButton(\"Favorites\");\n\t\tjbFavorites.setFont(new java.awt.Font(\"Century Gothic\",0, 15));\n\t\tjbFavorites.setForeground(new Color(150,100,100));\n\t\tjbFavorites.setIcon(image1);\n\t\tjbFavorites.setHorizontalTextPosition(SwingConstants.CENTER);\n\t\tjbFavorites.setVerticalTextPosition(SwingConstants.CENTER);\n\t\tjbFavorites.setRolloverIcon(image2);\n\t\tjbFavorites.setSelectedIcon(image3);\n\t\tjbFavorites.setContentAreaFilled(false);\n\t\tjbFavorites.setFocusable(false);\n\t\tjbFavorites.setBorderPainted(false);\n\t\t\n\t\t/**Creates the button of Songs and configures it*/\n\t\tjbSongs = new JButton(\"Songs\");\n\t\tjbSongs.setFont(new java.awt.Font(\"Century Gothic\",0, 15));\n\t\tjbSongs.setForeground(new Color(150,100,100));\n\t\tjbSongs.setIcon(image4);\n\t\tjbSongs.setHorizontalTextPosition(SwingConstants.CENTER);\n\t\tjbSongs.setVerticalTextPosition(SwingConstants.CENTER);\n\t\tjbSongs.setRolloverIcon(image5);\n\t\tjbSongs.setSelectedIcon(image6);\n\t\tjbSongs.setContentAreaFilled(false);\n\t\tjbSongs.setFocusable(false);\n\t\tjbSongs.setBorderPainted(false);\n\t\t\n\t\t/**Creates the button of PartyList and configures it*/\n\t\tjbPartyList = new JButton(\"PartyList\");\n\t\tjbPartyList.setFont(new java.awt.Font(\"Century Gothic\",0, 15));\n\t\tjbPartyList.setForeground(new Color(150,100,100));\n\t\tjbPartyList.setIcon(image7);\n\t\tjbPartyList.setHorizontalTextPosition(SwingConstants.CENTER);\n\t\tjbPartyList.setVerticalTextPosition(SwingConstants.CENTER);\n\t\tjbPartyList.setRolloverIcon(image8);\n\t\tjbPartyList.setSelectedIcon(image9);\t\n\t\tjbPartyList.setContentAreaFilled(false);\n\t\tjbPartyList.setFocusable(false);\n\t\tjbPartyList.setBorderPainted(false);\n\t\t\n\t\t/**Creates the panel where we will put all buttons*/\n\t\tjpPreLists = new JPanel(new BorderLayout());\n jpPreLists.setOpaque(false);\n\t\tjpPreLists.add(jbFavorites,BorderLayout.NORTH);\n\t\tjpPreLists.add(jbSongs,BorderLayout.CENTER);\n\t\tjpPreLists.add(jbPartyList,BorderLayout.SOUTH);\n\t}", "private void addButtons() {\r\n\t\troot.getChildren().add(button); // creating the Easy button \r\n\t\tb1 = new Button(\"Easy\");\r\n\t\tb1.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent ke) {\r\n\t\t\t\tdiff = \"Easy\";\r\n\t\t\t}\r\n\t\t});\r\n\t\troot.getChildren().add(b1); // creating the Normal button\r\n\t\tb2 = new Button(\"Normal\");\r\n\t\tb2.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent ke) {\r\n\t\t\t\tdiff = \"Normal\";\r\n\t\t\t}\r\n\t\t});\r\n\t\tb2.setLayoutX(50);\r\n\t\troot.getChildren().add(b2); // creating the Hard button\r\n\t\tb3 = new Button(\"Hard\");\r\n\t\tb3.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent ke) {\r\n\t\t\t\tdiff = \"Hard\";\r\n\t\t\t}\r\n\t\t});\r\n\t\tb3.setLayoutX(115);\r\n\t\troot.getChildren().add(b3);\r\n\t}", "public void printMenu()\n {\n String menu = (\"------------- Menu -------------\\nDisplay collection\\nCheck out materials\\nQuit\\n--------------------------------\\nPlease click one of the buttons to the right\");\n jTextPane1.setText(menu);\n jButton1.enableInputMethods(true);\n jButton2.enableInputMethods(true);\n jButton3.enableInputMethods(true);\n jButton4.enableInputMethods(false);\n }", "@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tButton button = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL,\n\t\t\t\ttrue);\n\t\tbutton.addSelectionListener(new SelectionListener() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tDiagnosticChain diagnosticChain = new BasicDiagnostic();\n\t if (isValid(diagnosticChain)) {\n\t \t okFlag = true;\n\t\t okPressed();\n\t\t }else{\n\t\t \t Message messageDialog = new Message(EditTask.this.getShell());\n\t\t \t messageDialog.setMessage(Util.getErrorMessage(diagnosticChain));\n\t\t \t messageDialog.open();\n\t\t }\t\t\t\n\t\t\t}\n\t\t\t@Override\n\t\t\tpublic void widgetDefaultSelected(SelectionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t}\n\t\t});\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\n\t\t\t\tIDialogConstants.CANCEL_LABEL, false);\n\t}", "public void createButtons() {\n\n addRow = new JButton(\"Add row\");\n add(addRow);\n\n deleteRow = new JButton(\"Delete row\");\n add(deleteRow);\n }", "protected void updateButtons() {\n int currentIndex = tabbedPane.getSelectedIndex();\n if( currentIndex == 0) {\n backButton.setEnabled(false);\n forwardButton.setText(\"weiter\");\n }\n if(currentIndex > 0) {\n backButton.setEnabled(true);\n forwardButton.setText(\"weiter\");\n }\n \n if(currentIndex == 6) {\n forwardButton.setText(\"würfeln\");\n }\n \n }", "private void addMiscInventory() {\r\n \tcheckInvButton = new JButton (\"Check Inverntory\");\r\n \torderText = new JTextField (5);\r\n orderButton = new JButton (\"Print Order\");\r\n \r\n \tadd (checkInvButton);\r\n \tadd (orderText);\r\n add (orderButton);\r\n \r\n \tcheckInvButton.setBounds (625, 120, 140, 35);\r\n \torderText.setBounds (575, 185, 105, 25);\r\n orderButton.setBounds (720, 185, 100, 25);\r\n }", "private Button[] createButtonsAndLMessage() {\n\t\t\n\t\t// local buttom\n\t\tButton launchLocal = new Button(\"Launch Local Game\");\n\t\tlaunchLocal.setMaxWidth(Double.MAX_VALUE);\n\t\tlaunchLocal.setAlignment(Pos.CENTER);\n\t\tlaunchLocal.autosize();\n\t\tlaunchLocal.setOnAction(e -> {\n\t\t\t\n\t\t\ttry {\n\t\t\t\tif(checkingAllArguments()) {\n\t\t\t\t\tmenuMessage.setText(\"Game will start soon...\");\n\t\t\t\t\tlaunchLocal(new Stage());\n\t\t\t\t}\n\t\t\t } catch (Exception exception) { \n\t\t\t\t menuMessage.setText(\"Can't launch a local game : either a IP Address of a remote player is wrong or you didn't select 4 players\");\n\t\t\t } \n\t\t \n\t\t});\n\t\t\n\t\t// remote button\n\t\tButton launchRemote = new Button(\"Launch Remote Game\");\n\t\tlaunchRemote.setMaxWidth(Double.MAX_VALUE);\n\t\tlaunchRemote.setAlignment(Pos.CENTER);\n\t\tlaunchRemote.autosize();\n\t\tlaunchRemote.setOnAction(e -> { \n\t\t\t\n\t\t\ttry {\n\t\t\t\tmenuMessage.setText(\"Game will start as soon as the client is connected...\");\n\t\t\t\tlaunchRemote(new Stage());\n\t\t\t } catch (Exception exception) { \n\t\t\t\tmenuMessage.setText(\"Can't launch a remote game : Check your internet connection\");\n\t\t\t } \n\t\t}); \n\t\t\n\t\tButton[] toReturn = {launchLocal, launchRemote};\n\t\treturn toReturn;\n\t}", "@Override\n\tprotected void createCompButtons() {\n\t\tbtnExcelReport = new Button(getCompButtons(), SWT.NONE);\n\t\tbtnExcelReport.setText(\"Excel Report\");\n\t\tbtnExcelReport.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\tbtnExcelReport\n\t\t.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(\n\t\t\t\t\torg.eclipse.swt.events.SelectionEvent e) {\n\t\t\t\tcmdExcelReportWidgetSelected();\n\t\t\t}\n\t\t});\n\t}", "private void addDemoButtons(int p_73972_1_, int p_73972_2_)\r\n\t{\r\n\t\tthis.buttonList.add(new GuiButton(11, this.width / 2 - 100, p_73972_1_, I18n.format(\"menu.playdemo\")));\r\n\t\tthis.buttonResetDemo = this.addButton(new GuiButton(12, this.width / 2 - 100, p_73972_1_ + p_73972_2_ * 1, I18n.format(\"menu.resetdemo\")));\r\n\t\tISaveFormat isaveformat = this.mc.getSaveLoader();\r\n\t\tWorldInfo worldinfo = isaveformat.getWorldInfo(\"Demo_World\");\r\n\r\n\t\tif (worldinfo == null)\r\n\t\t{\r\n\t\t\tthis.buttonResetDemo.enabled = false;\r\n\t\t}\r\n\t}", "@Override\n\tprotected void titleBtnRight() {\n\t\tsuper.titleBtnRight();\n\t}", "@FXML public void handleToggleButtons() {\n\t\t\n\t\t// binarySplitButton\n\t\tif (binarySplitButton.isSelected()) {\n\t\t\tbinarySplitButton.setText(\"True\");\n\t\t} else {\n\t\t\tbinarySplitButton.setText(\"False\");\n\t\t}\n\t\t\n\t\t// collapseTreeButton\n\t\tif (collapseTreeButton.isSelected()) {\n\t\t\tcollapseTreeButton.setText(\"True\");\n\t\t} else {\n\t\t\tcollapseTreeButton.setText(\"False\");\n\t\t}\n\t\t\n\t\t// debugButton\n\t\tif (debugButton.isSelected()) {\n\t\t\tdebugButton.setText(\"True\");\n\t\t} else {\n\t\t\tdebugButton.setText(\"False\");\n\t\t}\n\t\t\n\t\t// doNotCheckCapabilitiesButton\n\t\tif (doNotCheckCapabilitiesButton.isSelected()) {\n\t\t\tdoNotCheckCapabilitiesButton.setText(\"True\");\n\t\t} else {\n\t\t\tdoNotCheckCapabilitiesButton.setText(\"False\");\n\t\t}\n\t\t\n\t\t// doNotMakeSplitPAVButton\n\t\tif (doNotMakeSplitPAVButton.isSelected()) {\n\t\t\tdoNotMakeSplitPAVButton.setText(\"True\");\n\t\t} else {\n\t\t\tdoNotMakeSplitPAVButton.setText(\"False\");\n\t\t}\n\t\t\n\t\t// reduceErrorPruningButton\n\t\tif (reduceErrorPruningButton.isSelected()) {\n\t\t\treduceErrorPruningButton.setText(\"True\");\n\t\t} else {\n\t\t\treduceErrorPruningButton.setText(\"False\");\n\t\t}\n\t\t\n\t\t// saveInstanceDataButton\n\t\tif (saveInstanceDataButton.isSelected()) {\n\t\t\tsaveInstanceDataButton.setText(\"True\");\n\t\t} else {\n\t\t\tsaveInstanceDataButton.setText(\"False\");\n\t\t}\n\t\t\n\t\t// subTreeRaisingButton\n\t\tif (subTreeRaisingButton.isSelected()) {\n\t\t\tsubTreeRaisingButton.setText(\"True\");\n\t\t} else {\n\t\t\tsubTreeRaisingButton.setText(\"False\");\n\t\t}\n\t\t\n\t\t// unprunedButton\n\t\tif (unprunedButton.isSelected()) {\n\t\t\tunprunedButton.setText(\"True\");\n\t\t} else {\n\t\t\tunprunedButton.setText(\"False\");\n\t\t}\n\t\t\n\t\t// useLaplaceButton\n\t\tif (useLaplaceButton.isSelected()) {\n\t\t\tuseLaplaceButton.setText(\"True\");\n\t\t} else {\n\t\t\tuseLaplaceButton.setText(\"False\");\n\t\t}\n\t\t\n\t\t// useMDLcorrectionButton\n\t\tif (useMDLcorrectionButton.isSelected()) {\n\t\t\tuseMDLcorrectionButton.setText(\"True\");\n\t\t} else {\n\t\t\tuseMDLcorrectionButton.setText(\"False\");\n\t\t}\n\t\t\n\t}", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(550, 400);\n\t\tshell.setText(\"Source A Antenna 1 Data\");\n\t\t\n\t\tButton btnNewButton_1 = new Button(shell, SWT.NONE);\n\t\tbtnNewButton_1.setFont(SWTResourceManager.getFont(\"Ubuntu\", 11, SWT.BOLD));\n\t\tbtnNewButton_1.setBounds(116, 10, 98, 30);\n\t\tbtnNewButton_1.setText(\"pol 1\");\n\t\t\n\t\tButton btnPol = new Button(shell, SWT.NONE);\n\t\tbtnPol.setText(\"pol 2\");\n\t\tbtnPol.setFont(SWTResourceManager.getFont(\"Ubuntu\", 11, SWT.BOLD));\n\t\tbtnPol.setBounds(220, 10, 98, 30);\n\t\t\n\t\tButton btnPol_1 = new Button(shell, SWT.NONE);\n\t\tbtnPol_1.setText(\"pol 3\");\n\t\tbtnPol_1.setFont(SWTResourceManager.getFont(\"Ubuntu\", 11, SWT.BOLD));\n\t\tbtnPol_1.setBounds(324, 10, 98, 30);\n\t\t\n\t\tButton btnPol_2 = new Button(shell, SWT.NONE);\n\t\tbtnPol_2.setText(\"pol 4\");\n\t\tbtnPol_2.setFont(SWTResourceManager.getFont(\"Ubuntu\", 11, SWT.BOLD));\n\t\tbtnPol_2.setBounds(428, 10, 98, 30);\n\t\t\n\t\tButton button_3 = new Button(shell, SWT.NONE);\n\t\tbutton_3.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\n\t\t\t\tPlot_graph nw = new Plot_graph();\n\t\t\t\tnw.GraphScreen();\n\t\t\t}\n\t\t});\n\t\tbutton_3.setBounds(116, 46, 98, 30);\n\t\t\n\t\tButton button_4 = new Button(shell, SWT.NONE);\n\t\tbutton_4.setBounds(116, 83, 98, 30);\n\t\t\n\t\tButton button_5 = new Button(shell, SWT.NONE);\n\t\tbutton_5.setBounds(116, 119, 98, 30);\n\t\t\n\t\tButton button_6 = new Button(shell, SWT.NONE);\n\t\tbutton_6.setBounds(116, 155, 98, 30);\n\t\t\n\t\tButton button_7 = new Button(shell, SWT.NONE);\n\t\tbutton_7.setBounds(220, 155, 98, 30);\n\t\t\n\t\tButton button_8 = new Button(shell, SWT.NONE);\n\t\tbutton_8.setBounds(220, 119, 98, 30);\n\t\t\n\t\tButton button_9 = new Button(shell, SWT.NONE);\n\t\tbutton_9.setBounds(220, 83, 98, 30);\n\t\t\n\t\tButton button_10 = new Button(shell, SWT.NONE);\n\t\tbutton_10.setBounds(220, 46, 98, 30);\n\t\t\n\t\tButton button_11 = new Button(shell, SWT.NONE);\n\t\tbutton_11.setBounds(428, 155, 98, 30);\n\t\t\n\t\tButton button_12 = new Button(shell, SWT.NONE);\n\t\tbutton_12.setBounds(428, 119, 98, 30);\n\t\t\n\t\tButton button_13 = new Button(shell, SWT.NONE);\n\t\tbutton_13.setBounds(428, 83, 98, 30);\n\t\t\n\t\tButton button_14 = new Button(shell, SWT.NONE);\n\t\tbutton_14.setBounds(428, 46, 98, 30);\n\t\t\n\t\tButton button_15 = new Button(shell, SWT.NONE);\n\t\tbutton_15.setBounds(324, 46, 98, 30);\n\t\t\n\t\tButton button_16 = new Button(shell, SWT.NONE);\n\t\tbutton_16.setBounds(324, 83, 98, 30);\n\t\t\n\t\tButton button_17 = new Button(shell, SWT.NONE);\n\t\tbutton_17.setBounds(324, 119, 98, 30);\n\t\t\n\t\tButton button_18 = new Button(shell, SWT.NONE);\n\t\tbutton_18.setBounds(324, 155, 98, 30);\n\n\t}", "private void initializeDisplayText() {\n // Title and field labels\n Stage stage = (Stage) titleLabel.getScene().getWindow();\n stage.setTitle(rb.getString(\"windowTitle\"));\n if (action.equals(Constants.ADD)) {\n titleLabel.setText(rb.getString(\"addTitleLabel\"));\n } else if (action.equals(Constants.UPDATE)) {\n titleLabel.setText(rb.getString(\"updateTitleLabel\"));\n }\n idLabel.setText(rb.getString(\"idLabel\"));\n nameLabel.setText(rb.getString(\"nameLabel\"));\n addressLabel.setText(rb.getString(\"addressLabel\"));\n cityLabel.setText(rb.getString(\"cityLabel\"));\n countryLabel.setText(rb.getString(\"countryLabel\"));\n divisionLabel.setText(rb.getString(\"divisionLabel\"));\n postalLabel.setText(rb.getString(\"postalLabel\"));\n phoneLabel.setText(rb.getString(\"phoneLabel\"));\n\n // Prompt text\n idField.setPromptText(rb.getString(\"idPrompt\"));\n nameField.setPromptText(rb.getString(\"namePrompt\"));\n addressField.setPromptText(rb.getString(\"addressPrompt\"));\n cityField.setPromptText(rb.getString(\"cityPrompt\"));\n countryComboBox.setPromptText(rb.getString(\"countryPrompt\"));\n divisionComboBox.setPromptText(rb.getString(\"divisionPrompt\"));\n postalField.setPromptText(rb.getString(\"postalPrompt\"));\n phoneField.setPromptText(rb.getString(\"phonePrompt\"));\n\n // Button labels\n Common.scaleButton(saveBtn, rb.getString(\"saveBtn\"));\n Common.scaleButton(cancelBtn, rb.getString(\"cancelBtn\"));\n\n // Error label; initially blank\n errorLabel.setText(\"\");\n }", "protected void createButtons(Panel panel) {\n panel.add(new Filler(24,20));\n\n Choice drawingChoice = new Choice();\n drawingChoice.addItem(fgUntitled);\n\n\t String param = getParameter(\"DRAWINGS\");\n\t if (param == null)\n\t param = \"\";\n \tStringTokenizer st = new StringTokenizer(param);\n while (st.hasMoreTokens())\n drawingChoice.addItem(st.nextToken());\n // offer choice only if more than one\n if (drawingChoice.getItemCount() > 1)\n panel.add(drawingChoice);\n else\n panel.add(new Label(fgUntitled));\n\n\t\tdrawingChoice.addItemListener(\n\t\t new ItemListener() {\n\t\t public void itemStateChanged(ItemEvent e) {\n\t\t if (e.getStateChange() == ItemEvent.SELECTED) {\n\t\t loadDrawing((String)e.getItem());\n\t\t }\n\t\t }\n\t\t }\n\t\t);\n\n panel.add(new Filler(6,20));\n\n Button button;\n button = new CommandButton(new DeleteCommand(\"Delete\", fView));\n panel.add(button);\n\n button = new CommandButton(new DuplicateCommand(\"Duplicate\", fView));\n panel.add(button);\n\n button = new CommandButton(new GroupCommand(\"Group\", fView));\n panel.add(button);\n\n button = new CommandButton(new UngroupCommand(\"Ungroup\", fView));\n panel.add(button);\n\n button = new Button(\"Help\");\n\t\tbutton.addActionListener(\n\t\t new ActionListener() {\n\t\t public void actionPerformed(ActionEvent event) {\n\t\t showHelp();\n\t\t }\n\t\t }\n\t\t);\n panel.add(button);\n\n fUpdateButton = new Button(\"Simple Update\");\n\t\tfUpdateButton.addActionListener(\n\t\t new ActionListener() {\n\t\t public void actionPerformed(ActionEvent event) {\n if (fSimpleUpdate)\n setBufferedDisplayUpdate();\n else\n setSimpleDisplayUpdate();\n\t\t }\n\t\t }\n\t\t);\n\n // panel.add(fUpdateButton); // not shown currently\n }", "private void createContents() {\n\t\tshell = new Shell(getParent(), SWT.MIN |SWT.APPLICATION_MODAL);\n\t\tshell.setImage(SWTResourceManager.getImage(WordWatermarkDialog.class, \"/com/yc/ui/1.jpg\"));\n\t\tshell.setSize(436, 321);\n\t\tshell.setText(\"设置文字水印\");\n\t\t\n\t\tLabel label_font = new Label(shell, SWT.NONE);\n\t\tlabel_font.setBounds(38, 80, 61, 17);\n\t\tlabel_font.setText(\"字体名称:\");\n\t\t\n\t\tLabel label_style = new Label(shell, SWT.NONE);\n\t\tlabel_style.setBounds(232, 77, 61, 17);\n\t\tlabel_style.setText(\"字体样式:\");\n\t\t\n\t\tLabel label_size = new Label(shell, SWT.NONE);\n\t\tlabel_size.setBounds(38, 120, 68, 17);\n\t\tlabel_size.setText(\"字体大小:\");\n\t\t\n\t\tLabel label_color = new Label(shell, SWT.NONE);\n\t\tlabel_color.setBounds(232, 120, 68, 17);\n\t\tlabel_color.setText(\"字体颜色:\");\n\t\t\n\t\tLabel label_word = new Label(shell, SWT.NONE);\n\t\tlabel_word.setBounds(38, 38, 61, 17);\n\t\tlabel_word.setText(\"水印文字:\");\n\t\t\n\t\ttext = new Text(shell, SWT.BORDER);\n\t\ttext.setBounds(115, 35, 278, 23);\n\t\t\n\t\tButton button_confirm = new Button(shell, SWT.NONE);\n\t\t\n\t\tbutton_confirm.setBounds(313, 256, 80, 27);\n\t\tbutton_confirm.setText(\"确定\");\n\t\t\n\t\tCombo combo = new Combo(shell, SWT.NONE);\n\t\tcombo.setItems(new String[] {\"宋体\", \"黑体\", \"楷体\", \"微软雅黑\", \"仿宋\"});\n\t\tcombo.setBounds(115, 77, 93, 25);\n\t\tcombo.setText(\"黑体\");\n\t\t\n\t\tCombo combo_1 = new Combo(shell, SWT.NONE);\n\t\tcombo_1.setItems(new String[] {\"粗体\", \"斜体\"});\n\t\tcombo_1.setBounds(300, 74, 93, 25);\n\t\tcombo_1.setText(\"粗体\");\n\t\t\n\t\tCombo combo_2 = new Combo(shell, SWT.NONE);\n\t\tcombo_2.setItems(new String[] {\"1\", \"3\", \"5\", \"8\", \"10\", \"12\", \"16\", \"18\", \"20\", \"24\", \"30\", \"36\", \"48\", \"56\", \"66\", \"72\"});\n\t\tcombo_2.setBounds(115, 117, 93, 25);\n\t\tcombo_2.setText(\"24\");\n\t\t\n\t\tCombo combo_3 = new Combo(shell, SWT.NONE);\n\t\tcombo_3.setItems(new String[] {\"红色\", \"绿色\", \"蓝色\"});\n\t\tcombo_3.setBounds(300, 117, 93, 25);\n\t\tcombo_3.setText(\"红色\");\n\t\t\n\t\tButton button_cancle = new Button(shell, SWT.NONE);\n\t\t\n\t\tbutton_cancle.setBounds(182, 256, 80, 27);\n\t\tbutton_cancle.setText(\"取消\");\n\t\t\n\t\tLabel label_X = new Label(shell, SWT.NONE);\n\t\tlabel_X.setBounds(31, 161, 68, 17);\n\t\tlabel_X.setText(\"X轴偏移值:\");\n\t\t\n\t\tCombo combo_4 = new Combo(shell, SWT.NONE);\n\t\tcombo_4.setItems(new String[] {\"10\", \"20\", \"30\", \"40\", \"50\", \"80\", \"100\", \"160\", \"320\", \"640\"});\n\t\tcombo_4.setBounds(115, 158, 93, 25);\n\t\tcombo_4.setText(\"50\");\n\t\t\n\t\tLabel label_Y = new Label(shell, SWT.NONE);\n\t\tlabel_Y.setText(\"Y轴偏移值:\");\n\t\tlabel_Y.setBounds(225, 161, 68, 17);\n\t\t\n\t\tCombo combo_5 = new Combo(shell, SWT.NONE);\n\t\tcombo_5.setItems(new String[] {\"10\", \"20\", \"30\", \"40\", \"50\", \"80\", \"100\", \"160\", \"320\", \"640\"});\n\t\tcombo_5.setBounds(300, 158, 93, 25);\n\t\tcombo_5.setText(\"50\");\n\t\t\n\t\tLabel label_alpha = new Label(shell, SWT.NONE);\n\t\tlabel_alpha.setBounds(46, 204, 53, 17);\n\t\tlabel_alpha.setText(\"透明度:\");\n\t\t\n\t\tCombo combo_6 = new Combo(shell, SWT.NONE);\n\t\tcombo_6.setItems(new String[] {\"0\", \"0.1\", \"0.2\", \"0.3\", \"0.4\", \"0.5\", \"0.6\", \"0.7\", \"0.8\", \"0.9\", \"1.0\"});\n\t\tcombo_6.setBounds(115, 201, 93, 25);\n\t\tcombo_6.setText(\"0.8\");\n\t\t\n\t\t//取消按钮\n\t\tbutton_cancle.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tWordWatermarkDialog.this.shell.dispose();\n\t\t\t}\n\t\t});\n\t\t\n\t\t//确认按钮\n\t\tbutton_confirm.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\n\t\t\t\tif(text.getText().trim()==null || \"\".equals(text.getText().trim())\n\t\t\t\t\t\t||combo.getText().trim()==null || \"\".equals(combo.getText().trim()) \n\t\t\t\t\t\t\t||combo_1.getText().trim()==null || \"\".equals(combo_1.getText().trim())\n\t\t\t\t\t\t\t\t|| combo_2.getText().trim()==null || \"\".equals(combo_2.getText().trim())\n\t\t\t\t\t\t\t\t\t|| combo_3.getText().trim()==null || \"\".equals(combo_3.getText().trim())\n\t\t\t\t\t\t\t\t\t\t||combo_4.getText().trim()==null || \"\".equals(combo_4.getText().trim())\n\t\t\t\t\t\t\t\t\t\t\t||combo_5.getText().trim()==null || \"\".equals(combo_5.getText().trim())\n\t\t\t\t\t\t\t\t\t\t\t\t||combo_6.getText().trim()==null || \"\".equals(combo_6.getText().trim())){\n\t\t\t\t\tMessageDialog.openError(shell, \"错误\", \"输入框不能为空或输入空值,请确认后重新输入!\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tString word=text.getText().trim();\n\t\t\t\tString wordName=getFontName(combo.getText().trim());\n\t\t\t\tint wordStyle=getFonStyle(combo_1.getText().trim());\n\t\t\t\tint wordSize=Integer.parseInt(combo_2.getText().trim());\n\t\t\t\tColor wordColor=getFontColor(combo_3.getText().trim());\n\t\t\t\tint word_X=Integer.parseInt(combo_4.getText().trim());\n\t\t\t\tint word_Y=Integer.parseInt(combo_5.getText().trim());\n\t\t\t\tfloat word_Alpha=Float.parseFloat(combo_6.getText().trim());\n\t\t\t\t\n\t\t\t\tis=MeituUtils.waterMarkWord(EditorUi.filePath,word, wordName, wordStyle, wordSize, wordColor, word_X, word_Y,word_Alpha);\n\t\t\t\tCommon.image=new Image(display,is);\n\t\t\t\tWordWatermarkDialog.this.shell.dispose();\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\tcombo.addVerifyListener(new VerifyListener() { \n\t\t\t public void verifyText(VerifyEvent e) { \n\t\t\t Pattern pattern = Pattern.compile(\"[^0-9]*\"); \n\t\t\t Matcher matcher = pattern.matcher(e.text); \n\t\t\t if (matcher.matches()) // 处理数字 \n\t\t\t \t e.doit = true; \n\t\t\t else if (e.text.length() > 0) // 有字符情况,包含中文、空格 \n\t\t\t \t e.doit = false; \n\t\t\t else \n\t\t\t \t e.doit = false; \n\t\t\t } \n\t\t });\n\n\t\tcombo_1.addVerifyListener(new VerifyListener() { \n\t\t\t public void verifyText(VerifyEvent e) { \n\t\t\t Pattern pattern = Pattern.compile(\"[^0-9]*\"); \n\t\t\t Matcher matcher = pattern.matcher(e.text); \n\t\t\t if (matcher.matches()) // 处理数字 \n\t\t\t \t e.doit = true; \n\t\t\t else if (e.text.length() > 0) // 有字符情况,包含中文、空格 \n\t\t\t \t e.doit = false; \n\t\t\t else \n\t\t\t \t e.doit = false; \n\t\t\t } \n\t\t });\n\t\t\n\t\tcombo_2.addVerifyListener(new VerifyListener() { \n\t\t\t public void verifyText(VerifyEvent e) { \n\t\t\t Pattern pattern = Pattern.compile(\"[0-9]\\\\d*\"); \n\t\t\t Matcher matcher = pattern.matcher(e.text); \n\t\t\t if (matcher.matches()) // 处理数字 \n\t\t\t \t e.doit = true; \n\t\t\t else if (e.text.length() > 0) // 有字符情况,包含中文、空格 \n\t\t\t \t e.doit = false; \n\t\t\t else \n\t\t\t \t e.doit = false; \n\t\t\t } \n\t\t });\n\t\t\n\t\tcombo_3.addVerifyListener(new VerifyListener() { \n\t\t\t public void verifyText(VerifyEvent e) { \n\t\t\t Pattern pattern = Pattern.compile(\"[^0-9]*\"); \n\t\t\t Matcher matcher = pattern.matcher(e.text); \n\t\t\t if (matcher.matches()) // 处理数字 \n\t\t\t \t e.doit = true; \n\t\t\t else if (e.text.length() > 0) // 有字符情况,包含中文、空格 \n\t\t\t \t e.doit = false; \n\t\t\t else \n\t\t\t \t e.doit = false; \n\t\t\t } \n\t\t });\n\t\t\n\t\t\n\t\t\n\t\tcombo_4.addVerifyListener(new VerifyListener() { \n\t\t\t public void verifyText(VerifyEvent e) { \n\t\t\t Pattern pattern = Pattern.compile(\"[0-9]\\\\d*\"); \n\t\t\t Matcher matcher = pattern.matcher(e.text); \n\t\t\t if (matcher.matches()) // 处理数字 \n\t\t\t \t e.doit = true; \n\t\t\t else if (e.text.length() > 0) // 有字符情况,包含中文、空格 \n\t\t\t \t e.doit = false; \n\t\t\t else \n\t\t\t \t e.doit = false; \n\t\t\t } \n\t\t });\n\t\t\n\t\tcombo_5.addVerifyListener(new VerifyListener() { \n\t\t\t public void verifyText(VerifyEvent e) { \n\t\t\t Pattern pattern = Pattern.compile(\"[0-9]\\\\d*\"); \n\t\t\t Matcher matcher = pattern.matcher(e.text); \n\t\t\t if (matcher.matches()) // 处理数字 \n\t\t\t \t e.doit = true; \n\t\t\t else if (e.text.length() > 0) // 有字符情况,包含中文、空格 \n\t\t\t \t e.doit = false; \n\t\t\t else \n\t\t\t \t e.doit = false; \n\t\t\t } \n\t\t });\n\t\t\n\t\tcombo_6.addVerifyListener(new VerifyListener() { \n\t\t\t public void verifyText(VerifyEvent e) { \n\t\t\t Pattern pattern = Pattern.compile(\".[0-9]*\"); \n\t\t\t Matcher matcher = pattern.matcher(e.text); \n\t\t\t if (matcher.matches()) // 处理数字 \n\t\t\t \t e.doit = true; \n\t\t\t else if (e.text.length() > 0) // 有字符情况,包含中文、空格 \n\t\t\t \t e.doit = false; \n\t\t\t else \n\t\t\t \t e.doit = false; \n\t\t\t } \n\t\t });\n\n\t}", "private void displayGUI()\n {\n SpringLayout springLayout = new SpringLayout();\n setLayout(springLayout);\n\n displayTextAreas(springLayout);\n displayButtons(springLayout);\n displayLabels(springLayout);\n displayTables(springLayout);\n //displaySelectedQuestion();\n }", "public abstract String getRightButtonText();", "private void initButtons() {\n HBox buttons = new HBox(50);\n yes = new Button(\"Yes!\");\n no = new Button(\"No!\");\n buttons.getChildren().addAll(yes,no);\n buttons.setAlignment(Pos.CENTER);\n root.getChildren().addAll(buttons);\n }", "private void setButtons(JPanel menuContent) {\r\n\t \t \r\n \tJButton button_start = new JButton(start);\r\n \tbutton_start.setText(\"button_start\");\r\n\t \tbutton_start.setLocation(450, 300);\r\n\t\tbutton_start.setSize(405, 50);\r\n\t\tbutton_start.setBorderPainted(false);\r\n\t\tbutton_start.setFocusPainted(false);\r\n\t\tbutton_start.setContentAreaFilled(false);\r\n\t\tbutton_start.setCursor(new Cursor(Cursor.HAND_CURSOR));\r\n\t\tbutton_start.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tbutton_press.playSound(BUTTON_PRESS);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t \t \r\n\t \tJButton button_howto = new JButton(howto);\r\n\t \tbutton_howto.setText(\"button_howto\");\r\n\t \tbutton_howto.setLocation(450, 360);\r\n\t \tbutton_howto.setSize(405, 50);\r\n\t \tbutton_howto.setBorderPainted(false);\r\n\t \tbutton_howto.setFocusPainted(false);\r\n\t \tbutton_howto.setContentAreaFilled(false);\r\n\t \tbutton_howto.setCursor(new Cursor(Cursor.HAND_CURSOR));\r\n\t \tbutton_howto.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tbutton_press.playSound(BUTTON_PRESS);\r\n\t\t\t}\r\n\t\t});\r\n\t \t\r\n\t \tJButton button_options = new JButton(options);\r\n\t \tbutton_options.setText(\"button_options\");\r\n\t \tbutton_options.setLocation(450, 420);\r\n\t \tbutton_options.setSize(405, 50);\r\n\t \tbutton_options.setBorderPainted(false);\r\n\t \tbutton_options.setFocusPainted(false);\r\n\t \tbutton_options.setContentAreaFilled(false);\r\n\t \tbutton_options.setCursor(new Cursor(Cursor.HAND_CURSOR));\r\n\t \tbutton_options.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tbutton_press.playSound(BUTTON_PRESS);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t \tJButton button_lboards = new JButton(lboards);\r\n\t \tbutton_lboards.setText(\"button_lboards\");\r\n\t \tbutton_lboards.setLocation(450, 480);\r\n\t \tbutton_lboards.setSize(405, 50);\r\n\t \tbutton_lboards.setBorderPainted(false);\r\n\t \tbutton_lboards.setFocusPainted(false);\r\n\t \tbutton_lboards.setContentAreaFilled(false);\r\n\t \tbutton_lboards.setCursor(new Cursor(Cursor.HAND_CURSOR));\r\n\t \tbutton_lboards.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tbutton_press.playSound(BUTTON_PRESS);\r\n\t\t\t}\r\n\t\t});\r\n\t \t\r\n\t \tJButton button_exit = new JButton(exit);\r\n\t \tbutton_exit.setText(\"button_exit\");\r\n\t \tbutton_exit.setLocation(450, 540);\r\n\t \tbutton_exit.setSize(405, 50);\r\n\t \tbutton_exit.setBorderPainted(false);\r\n\t \tbutton_exit.setFocusPainted(false);\r\n\t \tbutton_exit.setContentAreaFilled(false);\r\n\t \tbutton_exit.setCursor(new Cursor(Cursor.HAND_CURSOR));\r\n\t \tbutton_exit.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tbutton_press.playSound(BUTTON_PRESS);\r\n\t\t\t}\r\n\t\t});\r\n\t \t\r\n\t \t//adds the buttons to the JPanel\r\n\t menuContent.add(button_start);\r\n\t menuContent.add(button_howto);\r\n\t menuContent.add(button_options);\r\n\t menuContent.add(button_lboards);\r\n\t menuContent.add(button_exit);\r\n\t\t\r\n\t}", "public void initButtons() {\n\t\tcomponents.clear();\n\t\t\n\t\tImageButton rename = new ImageButton(width - 124, 0, 45, 45);\n\t\trename.setTexture(\"/graphics/textures/ui/Rename.png\");\n\t\trename.disabledColor = IGuiElement.gray;\n\t\trename.setClickEvent(new IGuiEvent() {\n\t\t\t@Override\n\t\t\tpublic void trigger() {\n\t\t\t\tfinal InputField name = new InputField(0, 0, 0, Game.client.getUsername(), Tr._(\"username\"));\n\t\t\t\tDialog dialog = new Dialog(Tr._(\"namechange\"), \"\", new Action(Tr._(\"cancel\"), Dialog.CLOSE_EVENT), new Action(Tr._(\"ok\"), new IGuiEvent() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void trigger() {\n\t\t\t\t\t\tnew Thread() {\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\tGame.currentGame.getActiveScene().lockScene();\n\t\t\t\t\t\t\t\tString oldUsername = Game.client.getUsername();\n\t\t\t\t\t\t\t\tGame.client.renameClient(name.getText());\n\t\t\t\t\t\t\t\twhile (Game.client.getUsername().equals(oldUsername)) {\n\t\t\t\t\t\t\t\t\tif (Game.client.isRejected()) {\n\t\t\t\t\t\t\t\t\t\tGame.currentGame.getActiveScene().unlockScene();\n\t\t\t\t\t\t\t\t\t\tGame.currentGame.addScene(new Dialog(Tr._(\"error\"), Tr._(\"mp.reject.\" + Game.client.getRejectionCause().name().toLowerCase()), new Action(Tr._(\"close\"),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDialog.CLOSE_EVENT)));\n\t\t\t\t\t\t\t\t\t\tGame.client.resetRejection();\n\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\tThread.sleep(100);\n\t\t\t\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tGame.currentGame.getActiveScene().unlockScene();\n\t\t\t\t\t\t\t\tGame.currentGame.removeActiveScene();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}.start();\n\t\t\t\t\t}\n\t\t\t\t}));\n\t\t\t\tname.setWidth(dialog.getWidth() - 50);\n\t\t\t\tdialog.addComponent(name);\n\t\t\t\tGame.currentGame.addScene(dialog);\n\t\t\t}\n\t\t});\n\t\tadd(rename);\n\t\t\n\t\tImageButton kick = new ImageButton(width - 124, 36, 45, 45);\n\t\tkick.setTexture(\"/graphics/textures/ui/Logout.png\");\n\t\tkick.disabledColor = IGuiElement.gray;\n\t\tkick.setClickEvent(new IGuiEvent() {\n\t\t\t@Override\n\t\t\tpublic void trigger() {\n\t\t\t\tDialog dialog = new Dialog(Tr._(\"kick\"), Tr._(\"kickquestion\").replace(\"%player%\", p.getUsername()), new Action(Tr._(\"cancel\"), Dialog.CLOSE_EVENT),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew Action(Tr._(\"ok\"), new IGuiEvent() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpublic void trigger() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGame.client.sendPacket(new Packet1Disconnect(p.getUsername(), \"mp.reason.kicked\"));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGame.currentGame.removeActiveScene();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\te.printStackTrace();\n\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}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}));\n\t\t\t\tGame.currentGame.addScene(dialog);\n\t\t\t}\n\t\t});\n\t\tadd(kick);\n\t\t\n\t\tint nw = 190;\n\t\tfloat ratio = TextButton.HEIGHT / (float) TextButton.WIDTH;\n\t\tfinal TextButton ready = new TextButton(width - 128 - nw / 2, 15, Tr._(\"ready\"));\n\t\tready.setWidth(nw);\n\t\tready.setHeight((int) (ratio * nw));\n\t\tready.setToggleMode(true);\n\t\tready.setClickEvent(new IGuiEvent() {\n\t\t\t@Override\n\t\t\tpublic void trigger() {\n\t\t\t\ttry {\n\t\t\t\t\tp.setReady(ready.isActive());\n\t\t\t\t\tGame.client.sendPacket(new Packet6Player(p));\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tadd(ready);\n\t\t\n\t\tColorLabel c = new ColorLabel(width - 400, 1, height - 20, p.getColor());\n\t\tc.grayOnDisable = false;\n\t\tadd(c);\n\t}", "@Override\n\tprotected void buildButton() {\n\t\t\n\t}", "private void createButtons() {\n Button helpSettingsButton = new Button(\"\",\n new Button.ClickListener() {\n private static final long serialVersionUID = -5797923866320649518L;\n\n @Override\n public void buttonClick(ClickEvent event) {\n settingsPresenter.navigateToHelp();\n }\n });\n\n// Button skillSettingsButton = new Button(\"\",\n// new Button.ClickListener() {\n// private static final long serialVersionUID = 7147554466396214893L;\n//\n// @Override\n// public void buttonClick(ClickEvent event) {\n// settingsPresenter.navigateToSkills();\n// }\n// });\n// skillSettingsButton.addStyleName(\"icon-cog\");\n\n Button medicSettingsButton = new Button(\"\",\n new Button.ClickListener() {\n private static final long serialVersionUID = 7147554466396214893L;\n\n @Override\n public void buttonClick(ClickEvent event) {\n settingsPresenter.navigateToMedic();\n }\n });\n\n\n Button logoutButton = new Button(\"\",\n new Button.ClickListener() {\n private static final long serialVersionUID = -1096188732209266611L;\n\n @Override\n public void buttonClick(ClickEvent event) {\n settingsPresenter.navigateBack();\n }\n });\n logoutButton.addStyleName(\"default\");\n\n // Adding and aligning the 3 Buttons.\n //Setting a Description for the buttons which is displayed when flying over the button\n super.verticalNavigation.addComponent(helpSettingsButton);\n super.verticalNavigation.setComponentAlignment(helpSettingsButton, Alignment.MIDDLE_CENTER);\n helpSettingsButton.setDescription(\"Set the Help options for the Patient\");\n helpSettingsButton.setIcon(new ThemeResource(\"img/contacgg.png\"), BUTTON_HELP_SETTINGS);\n helpSettingsButton.setWidth(BUTTON_WIDTH);\n helpSettingsButton.setHeight(BUTTON_HEIGHT);\n\n super.verticalNavigation.addComponent(medicSettingsButton);\n super.verticalNavigation.setComponentAlignment(medicSettingsButton, Alignment.MIDDLE_CENTER);\n medicSettingsButton.setDescription(\"Set the Medication options for the Patient\");\n medicSettingsButton.setIcon(new ThemeResource(\"img/medicine-icon-cog.png\"),BUTTON_MEDIC_SETTINGS);\n medicSettingsButton.setWidth(BUTTON_WIDTH);\n medicSettingsButton.setHeight(BUTTON_HEIGHT);\n\n// addComponent(skillSettingsButton);\n// setComponentAlignment(skillSettingsButton, Alignment.MIDDLE_CENTER);\n// skillSettingsButton.setDescription(\"Set the Skill options for the Patient\");\n// skillSettingsButton.setIcon(new ThemeResource(\"img/skill2-icon-cog.png\"), BUTTON_SKILL_SETTINGS);\n// skillSettingsButton.setWidth(BUTTON_WIDTH);\n// skillSettingsButton.setHeight(BUTTON_HEIGHT);\n\n logoutButton.setWidth(BUTTON_WIDTH);\n super.verticalNavigation.addComponent(logoutButton);\n super.verticalNavigation.setComponentAlignment(logoutButton, Alignment.MIDDLE_CENTER);\n logoutButton.setDescription(\"You will be logged out\");\n logoutButton.setIcon(new ThemeResource(\"img/logout.png\"), BUTTON_LOGOUT);\n logoutButton.setWidth(BUTTON_WIDTH);\n logoutButton.setHeight(BUTTON_HEIGHT);\n\n }", "@Override\n public void onClick(View v) {\n switch(v.getId()) {\n case R.id.button1:\n display.setText(button1.getText());\n button1.setBackgroundColor(Color.BLUE);\n reset(1);\n tuningF = getNoteFrequency(1, tuning);\n tuningIndex = 1;\n break;\n case R.id.button2:\n display.setText(button2.getText());\n button2.setBackgroundColor(Color.BLUE);\n reset(2);\n tuningF = getNoteFrequency(2, tuning);\n tuningIndex = 2;\n break;\n case R.id.button3:\n display.setText(button3.getText());\n button3.setBackgroundColor(Color.BLUE);\n reset(3);\n tuningF = getNoteFrequency(3, tuning);\n tuningIndex = 3;\n break;\n case R.id.button4:\n display.setText(button4.getText());\n button4.setBackgroundColor(Color.BLUE);\n reset(4);\n tuningF = getNoteFrequency(4, tuning);\n tuningIndex = 4;\n break;\n case R.id.button5:\n display.setText(button5.getText());\n button5.setBackgroundColor(Color.BLUE);\n reset(5);\n tuningF = getNoteFrequency(5, tuning);\n tuningIndex = 5;\n break;\n case R.id.button6:\n display.setText(button6.getText());\n button6.setBackgroundColor(Color.BLUE);\n reset(6);\n tuningF = getNoteFrequency(6, tuning);\n tuningIndex = 6;\n break;\n }\n }", "private void setupComponents() {\n\t\tframe.setLayout(null);\r\n\r\n\t\t\r\n\t\t\r\n\t\t// Add label for title ..\r\n\t\tJLabel titleField = new JLabel();\r\n\t\ttitleField.setBounds(50, 10, 300, 30);// x, y, width, height - (pixels)\r\n\t\ttitleField.setText(\"Simple Swing Application\");\r\n\t\ttitleField.setFont(new Font(\"Arial\", Font.BOLD, 24));\r\n\t\ttitleField.setForeground(Color.red);\r\n\t\ttitleField.setVisible(true);\r\n\t\tframe.add(titleField);\r\n\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t// Add label for output message ..\r\n\t\tJLabel textField = new JLabel();\r\n\t\ttextField.setBounds(50, 200, 300, 30);\r\n\t\ttextField.setVisible(true);\r\n\t\tframe.add(textField);\r\n\r\n\t\t// Add a YES button ..\r\n\t\tJButton yesButton = new JButton(\"Yes\");\r\n\t\tyesButton.setBounds(50, 150, 90, 30);\r\n\t\tyesButton.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t// When clicked, set lower label text ..\r\n\t\t\t\ttextField.setText(((JButton) e.getSource()).getText() + \" button was clicked.\");\r\n\t\t\t}\r\n\t\t});\r\n\t\tframe.add(yesButton);\r\n\r\n\t\t// Add a NO button ..\r\n\t\tJButton noButton = new JButton(\"No\");\r\n\t\tnoButton.setBounds(150, 150, 90, 30);\r\n\t\tnoButton.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t// When clicked, set lower label text ..\r\n\t\t\t\ttextField.setText(((JButton) e.getSource()).getText() + \" button was clicked.\");\r\n\t\t\t}\r\n\t\t});\r\n\t\tframe.add(noButton);\r\n\t\t\r\n\t\t\r\n\r\n\t}", "protected void createContents() {\r\n\t\tshell = new Shell();\r\n\t\tshell.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tshell.setSize(599, 779);\r\n\t\tshell.setText(\"إضافة كتاب جديد\");\r\n\r\n\t\tButton logoBtn = new Button(shell, SWT.NONE);\r\n\t\tlogoBtn.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tMainMenuKaff mm = new MainMenuKaff();\r\n\t\t\t\tshell.close();\r\n\t\t\t\tmm.open();\r\n\t\t\t}\r\n\t\t});\r\n\t\tlogoBtn.setImage(SWTResourceManager\r\n\t\t\t\t.getImage(\"C:\\\\Users\\\\al5an\\\\git\\\\KaffPlatform\\\\KaffPlatformProject\\\\img\\\\logo for header button.png\"));\r\n\t\tlogoBtn.setBounds(497, 0, 64, 50);\r\n\r\n\t\tLabel headerLabel = new Label(shell, SWT.NONE);\r\n\t\theaderLabel.setImage(SWTResourceManager\r\n\t\t\t\t.getImage(\"C:\\\\Users\\\\al5an\\\\git\\\\KaffPlatform\\\\KaffPlatformProject\\\\img\\\\KaffPlatformheader.jpg\"));\r\n\t\theaderLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\theaderLabel.setBounds(0, 0, 607, 50);\r\n\r\n\t\tLabel bookInfoLabel = new Label(shell, SWT.NONE);\r\n\t\tbookInfoLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tbookInfoLabel.setForeground(SWTResourceManager.getColor(210, 105, 30));\r\n\t\tbookInfoLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.BOLD));\r\n\t\tbookInfoLabel.setAlignment(SWT.CENTER);\r\n\t\tbookInfoLabel.setBounds(177, 130, 192, 28);\r\n\t\tbookInfoLabel.setText(\"معلومات الكتاب\");\r\n\r\n\t\tLabel bookTitleLabel = new Label(shell, SWT.NONE);\r\n\t\tbookTitleLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tbookTitleLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tbookTitleLabel.setBounds(415, 203, 119, 28);\r\n\t\tbookTitleLabel.setText(\"عنوان الكتاب\");\r\n\r\n\t\tBookTitleTxt = new Text(shell, SWT.BORDER);\r\n\t\tBookTitleTxt.setBounds(56, 206, 334, 24);\r\n\r\n\t\tLabel bookIDLabel = new Label(shell, SWT.NONE);\r\n\t\tbookIDLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tbookIDLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tbookIDLabel.setBounds(415, 170, 119, 32);\r\n\t\tbookIDLabel.setText(\"رمز الكتاب\");\r\n\r\n\t\tLabel editionLabel = new Label(shell, SWT.NONE);\r\n\t\teditionLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\teditionLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\teditionLabel.setBounds(415, 235, 119, 28);\r\n\t\teditionLabel.setText(\"إصدار الكتاب\");\r\n\r\n\t\teditionTxt = new Text(shell, SWT.BORDER);\r\n\t\teditionTxt.setBounds(271, 240, 119, 24);\r\n\r\n\t\tLabel lvlLabel = new Label(shell, SWT.NONE);\r\n\t\tlvlLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tlvlLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tlvlLabel.setText(\"المستوى\");\r\n\t\tlvlLabel.setBounds(415, 269, 119, 27);\r\n\r\n\t\tCombo lvlBookCombo = new Combo(shell, SWT.NONE);\r\n\t\tlvlBookCombo.setItems(new String[] { \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\" });\r\n\t\tlvlBookCombo.setBounds(326, 272, 64, 25);\r\n\t\tlvlBookCombo.select(0);\r\n\r\n\t\tLabel priceLabel = new Label(shell, SWT.NONE);\r\n\t\tpriceLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tpriceLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tpriceLabel.setText(\"السعر\");\r\n\t\tpriceLabel.setBounds(415, 351, 119, 28);\r\n\r\n\t\tGroup groupType = new Group(shell, SWT.NONE);\r\n\t\tgroupType.setBounds(56, 320, 334, 24);\r\n\r\n\t\tButton button = new Button(groupType, SWT.RADIO);\r\n\t\tbutton.setSelection(true);\r\n\t\tbutton.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tbutton.setBounds(21, 0, 73, 21);\r\n\t\tbutton.setText(\"مجاناً\");\r\n\r\n\t\tButton button_1 = new Button(groupType, SWT.RADIO);\r\n\t\tbutton_1.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tbutton_1.setBounds(130, 0, 73, 21);\r\n\t\tbutton_1.setText(\"إعارة\");\r\n\r\n\t\tButton button_2 = new Button(groupType, SWT.RADIO);\r\n\t\tbutton_2.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tbutton_2.setBounds(233, 0, 80, 21);\r\n\t\tbutton_2.setText(\"للبيع\");\r\n\r\n\t\tpriceTxtValue = new Text(shell, SWT.BORDER);\r\n\t\tpriceTxtValue.setBounds(326, 355, 64, 24);\r\n\r\n\t\tLabel ownerInfoLabel = new Label(shell, SWT.NONE);\r\n\t\townerInfoLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\townerInfoLabel.setForeground(SWTResourceManager.getColor(210, 105, 30));\r\n\t\townerInfoLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.BOLD));\r\n\t\townerInfoLabel.setText(\"معلومات صاحبة الكتاب\");\r\n\t\townerInfoLabel.setAlignment(SWT.CENTER);\r\n\t\townerInfoLabel.setBounds(147, 400, 242, 28);\r\n\r\n\t\tLabel ownerIDLabel = new Label(shell, SWT.NONE);\r\n\t\townerIDLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\townerIDLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\townerIDLabel.setBounds(415, 441, 119, 34);\r\n\t\townerIDLabel.setText(\"الرقم الأكاديمي\");\r\n\r\n\t\townerIDValue = new Text(shell, SWT.BORDER);\r\n\t\townerIDValue.setBounds(204, 444, 186, 24);\r\n\t\t// need to check if the owner is already in the database...\r\n\r\n\t\tLabel nameLabel = new Label(shell, SWT.NONE);\r\n\t\tnameLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tnameLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tnameLabel.setBounds(415, 481, 119, 28);\r\n\t\tnameLabel.setText(\"الاسم الثلاثي\");\r\n\r\n\t\tnameTxt = new Text(shell, SWT.BORDER);\r\n\t\tnameTxt.setBounds(56, 485, 334, 24);\r\n\r\n\t\tLabel phoneLabel = new Label(shell, SWT.NONE);\r\n\t\tphoneLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tphoneLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tphoneLabel.setText(\"رقم الجوال\");\r\n\t\tphoneLabel.setBounds(415, 515, 119, 27);\r\n\r\n\t\tphoneTxt = new Text(shell, SWT.BORDER);\r\n\t\tphoneTxt.setBounds(204, 521, 186, 24);\r\n\r\n\t\tLabel ownerLvlLabel = new Label(shell, SWT.NONE);\r\n\t\townerLvlLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\townerLvlLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\townerLvlLabel.setBounds(415, 548, 119, 31);\r\n\t\townerLvlLabel.setText(\"المستوى\");\r\n\r\n\t\tCombo owneLvlCombo = new Combo(shell, SWT.NONE);\r\n\t\towneLvlCombo.setItems(new String[] { \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\" });\r\n\t\towneLvlCombo.setBounds(326, 554, 64, 25);\r\n\t\towneLvlCombo.select(0);\r\n\r\n\t\tLabel emailLabel = new Label(shell, SWT.NONE);\r\n\t\temailLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\temailLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\temailLabel.setBounds(415, 583, 119, 38);\r\n\t\temailLabel.setText(\"البريد الإلكتروني\");\r\n\r\n\t\temailTxt = new Text(shell, SWT.BORDER);\r\n\t\temailTxt.setBounds(56, 586, 334, 24);\r\n\r\n\t\tButton addButton = new Button(shell, SWT.NONE);\r\n\t\taddButton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\r\n\t\t\t\ttry {\r\n\t\t\t\t\tString bookQuery = \"INSERT INTO kaff.BOOK(bookID, bookTitle, price, level,available, type) VALUES (?, ?, ?, ?, ?, ?, ?)\";\r\n\t\t\t\t\tString bookEdition = \"INSERT INTO kaff.bookEdition(bookID, edition, year) VALUES (?, ?, ?)\";\r\n\t\t\t\t\tString ownerQuery = \"INSERT INTO kaff.user(userID, fname, mname, lastname, phone, level, personalEmail, email) VALUES (?, ?, ?, ?, ?, ?, ?, ?)\";\r\n\r\n\t\t\t\t\tString bookID = bookIDTxt.getText();\r\n\t\t\t\t\tString bookTitle = BookTitleTxt.getText();\r\n\t\t\t\t\tint bookLevel = lvlBookCombo.getSelectionIndex();\r\n\t\t\t\t\tString type = groupType.getText();\r\n\t\t\t\t\tdouble price = Double.parseDouble(priceTxtValue.getText());\r\n\t\t\t\t\tboolean available = true;\r\n\r\n\t\t\t\t\t// must error handle\r\n\t\t\t\t\tString[] ed = editionTxt.getText().split(\" \");\r\n\t\t\t\t\tString edition = ed[0];\r\n\t\t\t\t\tString year = ed[1];\r\n\r\n\t\t\t\t\tString ownerID = ownerIDValue.getText();\r\n\r\n\t\t\t\t\t// error handle if the user enters two names or just first name\r\n\t\t\t\t\tString[] name = nameTxt.getText().split(\" \");\r\n\t\t\t\t\tString fname = \"\", mname = \"\", lname = \"\";\r\n\t\t\t\t\tSystem.out.println(\"name array\" + name);\r\n\t\t\t\t\tif (name.length > 2) {\r\n\t\t\t\t\t\tfname = name[0];\r\n\t\t\t\t\t\tmname = name[1];\r\n\t\t\t\t\t\tlname = name[2];\r\n\t\t\t\t\t}\r\n\t\t\t\t\tString phone = phoneTxt.getText();\r\n\t\t\t\t\tint userLevel = owneLvlCombo.getSelectionIndex();\r\n\t\t\t\t\tString email = emailTxt.getText();\r\n\r\n\t\t\t\t\tDatabase.openConnection();\r\n\t\t\t\t\tPreparedStatement bookStatement = Database.getConnection().prepareStatement(bookQuery);\r\n\r\n\t\t\t\t\tbookStatement.setString(1, bookID);\r\n\t\t\t\t\tbookStatement.setString(2, bookTitle);\r\n\t\t\t\t\tbookStatement.setInt(3, bookLevel);\r\n\t\t\t\t\tbookStatement.setString(4, type);\r\n\t\t\t\t\tbookStatement.setDouble(5, price);\r\n\t\t\t\t\tbookStatement.setBoolean(6, available);\r\n\r\n\t\t\t\t\tint bookre = bookStatement.executeUpdate();\r\n\r\n\t\t\t\t\tbookStatement = Database.getConnection().prepareStatement(bookEdition);\r\n\t\t\t\t\tbookStatement.setString(1, bookID);\r\n\t\t\t\t\tbookStatement.setString(2, edition);\r\n\t\t\t\t\tbookStatement.setString(3, year);\r\n\r\n\t\t\t\t\tint edResult = bookStatement.executeUpdate();\r\n\r\n\t\t\t\t\tPreparedStatement ownerStatement = Database.getConnection().prepareStatement(ownerQuery);\r\n\t\t\t\t\townerStatement.setString(1, ownerID);\r\n\t\t\t\t\townerStatement.setString(2, fname);\r\n\t\t\t\t\townerStatement.setString(3, mname);\r\n\t\t\t\t\townerStatement.setString(4, lname);\r\n\t\t\t\t\townerStatement.setString(5, phone);\r\n\t\t\t\t\townerStatement.setInt(6, userLevel);\r\n\t\t\t\t\townerStatement.setString(7, ownerID + \"iau.edu.sa\");\r\n\t\t\t\t\townerStatement.setString(8, email);\r\n\t\t\t\t\tint ownRes = ownerStatement.executeUpdate();\r\n\r\n\t\t\t\t\tSystem.out.println(\"results: \" + ownRes + \" \" + edResult + \" bookre\");\r\n\t\t\t\t\t// test result of excute Update\r\n\t\t\t\t\tif (ownRes != 0 && edResult != 0 && bookre != 0) {\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Data is updated\");\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Data is not updated\");\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tDatabase.closeConnection();\r\n\t\t\t\t} catch (SQLException sql) {\r\n\t\t\t\t\tSystem.out.println(sql);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\taddButton.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\taddButton.setBounds(54, 666, 85, 26);\r\n\t\taddButton.setText(\"إضافة\");\r\n\r\n\t\tButton backButton = new Button(shell, SWT.NONE);\r\n\t\tbackButton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tAdminMenu am = new AdminMenu();\r\n\t\t\t\tshell.close();\r\n\t\t\t\tam.open();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbackButton.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tbackButton.setBounds(150, 666, 85, 26);\r\n\t\tbackButton.setText(\"رجوع\");\r\n\r\n\t\tLabel label = new Label(shell, SWT.NONE);\r\n\t\tlabel.setBounds(177, 72, 192, 21);\r\n\t\tlabel.setText(\"إضافة كتاب جديد\");\r\n\r\n\t\tLabel label_1 = new Label(shell, SWT.NONE);\r\n\t\tlabel_1.setBounds(22, 103, 167, 21);\r\n\t\t// get user name here to display\r\n\t\tString name = getUserName();\r\n\t\tlabel_1.setText(\"مرحباً ...\" + name);\r\n\r\n\t\tbookIDTxt = new Text(shell, SWT.BORDER);\r\n\t\tbookIDTxt.setBounds(271, 170, 119, 24);\r\n\r\n\t}", "@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, \"Speichern\",\n\t\t\t\tfalse);\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\n\t\t\t\t\"Abbrechen\", false);\n\t\t\n\t}", "public void setNewButtonText(String text) {\n/*Generated! Do not modify!*/ replyDTO.getVariablesToSet().add(\"overviewSmall_newButton_propertyText\");\n/*Generated! Do not modify!*/ if (text == null) {\n/*Generated! Do not modify!*/ replyDTO.getVariableValues().remove(\"overviewSmall_newButton_propertyText\");\n/*Generated! Do not modify!*/ } else {\n/*Generated! Do not modify!*/ replyDTO.getVariableValues().put(\"overviewSmall_newButton_propertyText\", text);\n/*Generated! Do not modify!*/ }\n/*Generated! Do not modify!*/ if (recordMode){\n/*Generated! Do not modify!*/ addRecordedAction(\"setNewButtonText(\" + escapeString(text) + \");\");\n/*Generated! Do not modify!*/ }\n/*Generated! Do not modify!*/ }", "public void setContent(String title, String[] buttonStrings, String labelText, String iconLocation) {\n\t\tresult = -1;\n\t\tsetTitle(title);\n\t\tif(!this.iconLocation.equals(iconLocation)){\n\t\t\tthis.iconLocation = iconLocation;\n\t\t\tURL url = this.getClass().getResource(iconLocation);\n\t\t\tImageIcon butIcon = new ImageIcon(url);\n\t\t\tlabel.setIcon(butIcon);\n\t\t}\n\n//\t\tif(numberOfButtons != buttonStrings.length) {\n\t\t\tcontrolPane.removeAll();\n\t\t\tnumberOfButtons = buttonStrings.length;\n\t\t\tif(numberOfButtons >= 1) {\n\t\t\t\tbutton1 = new JButton(buttonStrings[0]);\n\t\t\t\tbutton1.addActionListener(buttonListener);\n\t\t\t\tcontrolPane.add(button1);\n\t\t\t}\n\t\t\tif(numberOfButtons >= 2) {\n\t\t\t\tbutton2 = new JButton(buttonStrings[1]);\n\t\t\t\tbutton2.addActionListener(buttonListener);\n\t\t\t\tcontrolPane.add(button2);\n\t\t\t}\n\t\t\tif(numberOfButtons >= 3) {\n\t\t\t\tbutton3 = new JButton(buttonStrings[2]);\n\t\t\t\tbutton3.addActionListener(buttonListener);\n\t\t\t\tcontrolPane.add(button3);\n\t\t\t}\n//\t\t}\n\t\t// size it properly\n\t\tint maxWidth = 450;\n\t\tint length = labelText.length()*12+70;\n\t\tint extraLines = length/maxWidth;\n\t\tint height = 120+extraLines*20;\n\t\tsetBounds(200,200,Math.min(length, maxWidth), height);\n\t\t// set the label text\n\t\tlabelArea.setText(labelText);\n\t\trepaint(0l);\n\t\tvalidate();\n\t\t//pack();\n\t}", "@Override\n\tprotected void createButtonsForButtonBar(Composite parent)\n\t{\n\t\tButton button_1 = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL,\n\t\t\t\ttrue);\n\t\tbutton_1.setText(\"Ja\");\n\t\tButton button = createButton(parent, IDialogConstants.CANCEL_ID,\n\t\t\t\tIDialogConstants.CANCEL_LABEL, false);\n\t\tbutton.setText(\"Nein\");\n\t}", "public void createButtons() {\n\t\tbutton1 = new JButton(\"Button1\");\n\t\tbutton2 = new JButton(\"Button2\");\n\t\tbutton3 = new JButton(\"Button3\");\n\t\tbutton4 = new JButton(\"Button4\");\n\t\tbutton5 = new JButton(\"Button5\");\n\t}", "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}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jLabel2 = new javax.swing.JLabel();\n jButton3 = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\"Library\");\n setLocationByPlatform(true);\n setResizable(false);\n\n jButton1.setFont(new java.awt.Font(\"Segoe UI\", 0, 14)); // NOI18N\n jButton1.setText(\"< Previous\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jButton2.setFont(new java.awt.Font(\"Segoe UI\", 0, 14)); // NOI18N\n jButton2.setText(\"Next >\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n jLabel2.setFont(new java.awt.Font(\"Segoe UI\", 0, 18)); // NOI18N\n jLabel2.setText(\"Preview :\");\n\n jButton3.setFont(new java.awt.Font(\"Segoe UI\", 0, 14)); // NOI18N\n jButton3.setText(\"OK\");\n jButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton3ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(0, 232, Short.MAX_VALUE)\n .addComponent(jButton1)\n .addGap(28, 28, 28)\n .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(185, 185, 185)\n .addComponent(jButton3))\n .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addGap(10, 10, 10)\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 .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 439, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton1)\n .addComponent(jButton2)\n .addComponent(jButton3))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n pack();\n }", "protected void actionPerformed(GuiButton par1GuiButton)\n {\n for (int var2 = 0; var2 < this.options.keyBindings.length; ++var2)\n {\n ((GuiButton)this.controlList.get(var2)).displayString = this.options.getOptionDisplayString(var2);\n }\n\n if (par1GuiButton.id == 200)\n {\n this.mc.displayGuiScreen(this.parentScreen);\n }\n else\n {\n this.buttonId = par1GuiButton.id;\n par1GuiButton.displayString = \"> \" + this.options.getOptionDisplayString(par1GuiButton.id) + \" <\"; // what is this even for.. it gets overwritten in drawScreen\n }\n }", "private void prepare()\n {\n Label winningMsg = new Label(\"Thank you, \\nfor saving \\none's life. \", 60);\n addObject(winningMsg,310,320);\n \n creditBtn = new instructionButton();\n addObject(creditBtn,50,470);\n }", "public void initializeButtons(){\n\t\t\tplay.setBounds(40,90,280,30);\n\t\t\tadd(play);\n\t\t\tplay.addActionListener(new PlayGame());\n\t\t\tplay.setVisible(true);\n\t\t\t\n\t\t\tenterquestion.setBounds(40,140,280,30);\n\t\t\tadd(enterquestion);\n\t\t\tenterquestion.addActionListener(new EnterQuestion());\n\t\t\tenterquestion.setVisible(true);\n\t\t\t\n\t\t\tdirections.setBounds(40,190,280,30);\n\t\t\tadd(directions);\n\t\t\tdirections.addActionListener(new Instructor());\n\t\t\tdirections.setVisible(true);\n\t\t\t\n\t\t\t\n\t\t}", "private void initControlsPage()\r\n {\n \tString keyTitleString = \"KEYBOARD\";\r\n \tkeyTitleText = new OText(25, 200, 300, keyTitleString);\r\n \tkeyTitleText.setFont(\"Courier New\", 20, 1.0, 'C', Settings.themes.textColor);\r\n \t\r\n \t//Initialize the keyboard movement text\r\n \tString keyMoveString = \"Move Optimus with the WASD keys \"\r\n \t\t\t + \" <br> \"\r\n \t\t\t + \"as if they were the arrow keys.\";\r\n \tkeyMoveText = new OText(25, 225, 300, keyMoveString);\r\n \tkeyMoveText.setFont(\"Courier New\", 14, 1.0, 'C', Settings.themes.textColor);\r\n \t\r\n \t\r\n \t//Initialize the mouse title text\r\n \tString mouseTitleString = \"MOUSE\";\r\n \tmouseTitleText = new OText(375, 200, 300, mouseTitleString);\r\n \tmouseTitleText.setFont(\"Courier New\", 20, 1.0, 'C', Settings.themes.textColor);\r\n \t\r\n \t//Initialize the mouse text\r\n \tString mouseMoveString = \"Aim by moving the mouse and shoot bullets from Optimus in the direction of the cursor using both clicks. \";\r\n \tmouseText = new OText(375, 225, 300, mouseMoveString);\r\n \tmouseText.setFont(\"Courier New\", 14, 1.0, 'C', Settings.themes.textColor);\r\n }", "private void setupActionButtons() {\n setupLikeActionButton();\n setupRepostActionButton();\n setupMoreActionButton();\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}", "private void beautifyButtons() {\n ImageIcon todayIcon = new ImageIcon(getClass().getResource(\"/images/today.png\"));\n today.setIcon(todayIcon);\n today.setFont(new Font(Font.DIALOG, Font.PLAIN, 12));\n today.setMaximumSize(mediumButton);\n today.setIconTextGap(ICON_GAP);\n today.setAlignmentX(CENTER_ALIGNMENT);\n\n //adding icon and attempting to beautify the \"<\" button\n ImageIcon leftIcon = new ImageIcon(getClass().getResource(\"/images/left.png\"));\n left.setIcon(leftIcon);\n left.setFont(new Font(Font.DIALOG, Font.PLAIN, 14));\n left.setMaximumSize(smallButton);\n\n //adding icon and attempting to beautify the \">\" button\n ImageIcon rightIcon = new ImageIcon(getClass().getResource(\"/images/right.png\"));\n right.setIcon(rightIcon);\n right.setFont(new Font(Font.DIALOG, Font.PLAIN, 14));\n right.setMaximumSize(smallButton);\n\n //adding icon and attempting to beautify the new event button\n ImageIcon newIcon = new ImageIcon(getClass().getResource(\"/images/new.jpg\"));\n newEvent.setIcon(newIcon);\n newEvent.setFont(new Font(Font.DIALOG, Font.PLAIN, 12));\n newEvent.setMaximumSize(mediumButton);\n newEvent.setIconTextGap(ICON_GAP);\n newEvent.setAlignmentX(CENTER_ALIGNMENT);\n }", "private void renderObjetos() {\n\n \t// Ver el boton de borrar\n this.rBotones.add(this.btnCancel);\n this.rBotones.add(this.btnFind);\n \n this.rBotones.setAlignment(Alignment.ALIGN_RIGHT);\n\n }", "public void initGui()\n {\n this.buttonList.clear();\n this.multilineMessage = this.fontRendererObj.listFormattedStringToWidth(this.message.getFormattedText(), this.width - 50);\n this.field_175353_i = this.multilineMessage.size() * this.fontRendererObj.FONT_HEIGHT;\n this.buttonList.add(new GuiButton(0, this.width / 2 - 100, this.height / 2 + this.field_175353_i / 2 + this.fontRendererObj.FONT_HEIGHT, I18n.format(\"gui.toMenu\", new Object[0])));\n if(!TabGUI.openTabGUI) return;\n this.buttonList.add(new GuiButton(1, this.width / 2 - 100, this.height / 2 + 20 + this.field_175353_i / 2 + this.fontRendererObj.FONT_HEIGHT, 100, 20, \"Reconnect\"));\n this.buttonList.add(new GuiButton(2, this.width / 2, this.height / 2 + 20 + this.field_175353_i / 2 + this.fontRendererObj.FONT_HEIGHT, 100, 20, \"Random Alt\"));\n }", "private void setAddButtonUI() {\n addButton = new JButton(\"Add\");\n addButton.setForeground(new Color(247, 37, 133));\n addButton.addActionListener(this);\n addButton.setContentAreaFilled(false);\n addButton.setFocusPainted(false);\n addButton.setFont(new Font(\"Nunito\", Font.PLAIN, 14));\n addButton.setAlignmentX(Component.CENTER_ALIGNMENT);\n }", "private void configureButtons() {\n\n backToMenu = new JButton(\"Menu\");\n if(isWatching){\n backToMenu.setBounds(575, 270, 100, 50);\n }\n else{\n backToMenu.setBounds(30, 800, 100, 50);\n }\n backToMenu.setFont(new Font(\"Broadway\", Font.PLAIN, 20));\n backToMenu.setBackground(Color.RED);\n backToMenu.setFocusable(false);\n backToMenu.addActionListener(this);\n add(backToMenu);\n }", "public void showInstructions() {\n \tcreateLabel(myResources.getString(\"whatgame\"), 1, 1, NORMAL_FONT);\n \tcreateLabel(myResources.getString(\"rightkey\"), 1, 2, NORMAL_FONT);\n \tcreateLabel(myResources.getString(\"esckey\"), 1, 3, NORMAL_FONT);\n \tcreateLabel(myResources.getString(\"buttons\"), 1, 4, NORMAL_FONT);\n }", "public void returnbottomText() {\n\t\trebote = this.getIntent().getStringExtra(\"buttonname\");\n\n\t\ttext.setText(rebote);\n\n\t}", "private void addControls() {\n\t\tAjaxButton button = new AjaxButton(\"submitButton\", ResourceUtils.getModel(\"button.save\")) {\n\t\t\t@Override\n protected void onSubmit(AjaxRequestTarget target, Form<?> form) {\n onSubmitAction(strWrapper, target, form);\n target.add(form);\n }\n\n\t\t\t@Override\n\t\t\tprotected void onError(AjaxRequestTarget target, Form<?> form) {\n\t\t\t\tsuper.onError(target, form);\n\t\t\t\ttarget.add(form);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tprotected void onConfigure() {\n\t\t\t\tsuper.onConfigure();\n\t\t\t\tthis.setVisible(true);\n\t\t\t}\n\t\t};\n\t\tform.add(button);\n\n\t\tbutton = new AjaxButton(\"cancelButton\", ResourceUtils.getModel(\"button.cancel\")) {\n\t\t\t@Override\n\t\t\tprotected void onSubmit(AjaxRequestTarget target, Form<?> form) {\n\t\t\t\tonCancelAction(strWrapper, target, form);\n\t\t\t\tform.clearInput();\n\t\t\t\ttarget.add(form);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tprotected void onConfigure() {\n\t\t\t\tsuper.onConfigure();\n\t\t\t\tthis.setVisible(true);\n\t\t\t}\n\t\t};\n\t\tbutton.setDefaultFormProcessing(false);\n\t\tform.add(button);\n\n\t}", "public interface Buttons {\n\n\t/**\n\t * \n\t * @param btnText - the text that will be shown when looking at the button\n\t * @param tooltip - the text that will be shown when the user is mouseover the\n\t * button\n\t * @return Button - with the text btnText and a tooltip of tooltip, the rest of\n\t * the button is very basic\n\t */\n\tpublic default Button buttons(String btnText, String tooltip) {\n\t\tButton btn = new Button(btnText);\n\t\tTooltip btnTooltip = new Tooltip(tooltip);\n\t\tbtn.setTooltip(btnTooltip);\n\t\tbtn.setMinWidth(MinWidth());\n\t\tbtn.setPrefWidth(50.0);\n\t\tbtn.setMaxWidth(50.0);\n\t\tbtn.setFont(Font.font(\"Verdana\", 20));\n\t\tEventHandler<ActionEvent> buttonHandler = new EventHandler<ActionEvent>() {\n\t\t\t@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\tactionButton(btnText);\n\t\t\t\tevent.consume();\n\t\t\t}\n\n\t\t};\n\t\tbtn.setOnAction(buttonHandler);\n\t\treturn btn;\n\n\t}\n\n\t/**\n\t * all the action that will happen when the button is pressed will be defined\n\t * here\n\t * \n\t * @param text - that is on the button. \n\t */\n\tpublic void actionButton(String text);\n\n\tpublic default double MinWidth() {\n\t\treturn 50.0;\n\t}\n}", "private void controllersUI() {\n\t\tc.setLayout(null);\n\t\tc.setBackground(whiteColor);\n\t\t\n\t\tlbPullTitle.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlbPullTitle.setOpaque(true);\n\t\tlbPullTitle.setFont(new Font(\"Helvetica Neue\", Font.PLAIN, 18));\n\t\tlbPullTitle.setBounds(0, 0, 320, 52);\n\t\t\n\t\ttxtPulls.setFont(new Font(\"Helvetica Neue\", Font.PLAIN, 12));\n\t\ttxtPulls.setBounds(0, 52, 320, 420);\n\t\t\n\t\ttxtMsg.setBounds(10, 480, 230, 35);\n\t\tbtnMsg.setBounds(250, 476, 60, 40);\n\t\t\n\t\tc.add(txtPulls);\n\t\tc.add(lbPullTitle);\n\t\tc.add(btnMsg);\n\t\tc.add(txtMsg);\n\t\t\n\t\tbtnMsg.addActionListener(this);\n\t}", "@Override\n\tprotected void on_button_pressed(String button_name) {\n\n\t}", "private void buttonInitiation() {\n submit = new JButton(\"Submit\");\n submit.setBounds(105, 250, 90, 25);\n this.add(submit);\n goBack = new JButton(\"Return to Main Menu\");\n goBack.setBounds(205, 250, 200, 25);\n this.add(goBack);\n }", "public void result() {\n JLabel header = new JLabel(\"Finish!!\");\n header.setFont(new Font(Font.MONOSPACED, Font.PLAIN, 28));\n gui.getConstraints().gridx = 0;\n gui.getConstraints().gridy = 0;\n gui.getConstraints().insets = new Insets(10,10,50,10);\n gui.getPanel().add(header, gui.getConstraints());\n\n String outcomeText = String.format(\"You answer correctly %d / %d.\",\n totalCorrect, VocabularyQuizList.MAX_NUMBER_QUIZ);\n JTextArea outcome = new JTextArea(outcomeText);\n outcome.setFont(new Font(Font.MONOSPACED, Font.PLAIN, 20));\n outcome.setEditable(false);\n gui.getConstraints().gridy = 1;\n gui.getConstraints().insets = new Insets(10,10,30,10);\n gui.getPanel().add(outcome, gui.getConstraints());\n\n JButton b = new JButton(\"home\");\n gui.getGuiAssist().homeListener(b);\n gui.getConstraints().gridy = 2;\n gui.getConstraints().insets = new Insets(10,200,10,200);\n gui.getPanel().add(b, gui.getConstraints());\n\n b = new JButton(\"start again\");\n startQuestionListener(b);\n gui.getConstraints().gridy = 3;\n gui.getPanel().add(b, gui.getConstraints());\n }", "private void configureComponents() {\n save.setStyleName(ValoTheme.BUTTON_PRIMARY);\n save.setClickShortcut(ShortcutAction.KeyCode.ENTER);\n setVisible(false);\n }", "void createButton(Button main){\n\t\tActions handler = new Actions();\r\n\t\tmain.setOnAction(handler);\r\n\t\tmain.setFont(font);\r\n\t\t//sets button preference dimensions and label \r\n\t\tmain.setPrefWidth(100);\r\n\t\tmain.setPrefHeight(60);\r\n\t\tmain.setText(\"Close\");\r\n\t}", "private void tutorial(){\n\t\tString msg = \"[Space] = Inicia e pausa o jogo depois de iniciado.\";\n\t\tmsg += \"\\n[Seta esquerda] = Move o paddle para a esquerda.\";\n\t\tmsg += \"\\n[Seta direita] = Move o paddle para a direita.\";\n\t\tmsg += \"\\n[I] = Abre a janela de informaçoes.\";\n\t\tmsg += \"\\n[R] = Reinicia o jogo.\";\n\t\tJOptionPane.showMessageDialog(null, \"\"+msg, \"Informaçoes\", JOptionPane.INFORMATION_MESSAGE);\n\t}", "private void init() {\n\t\t\n\t\t// Buttons\n\t\tendButton = new JButton(\"Spiel beenden\");\n\t\tendButton.setBackground(Color.white);\n\t\tendButton.setForeground(Color.black);\n\t\tendButton.setFont(endButton.getFont().deriveFont(20.0f));\n\t\tendButton.setBorder(BorderFactory.createStrokeBorder(new BasicStroke(1.5f), Color.black));\n\t\t\n\t\tanleitungButton = new JButton(\"Anleitung\");\n\t\tanleitungButton.setBackground(endButton.getBackground());\n\t\tanleitungButton.setForeground(endButton.getForeground());\n\t\tanleitungButton.setFont(endButton.getFont());\n\t\tanleitungButton.setBorder(endButton.getBorder());\n\t\t\n\t\tbackButton = new JButton(\"zurück\");\n\t\tbackButton.setBackground(endButton.getBackground());\n\t\tbackButton.setForeground(endButton.getForeground());\n\t\tbackButton.setFont(endButton.getFont());\n\t\tbackButton.setBorder(endButton.getBorder());\n\t\t\n\t\tbuttonPanel = new JPanel(new GridLayout(3, 1, 0, 50));\n\t\tbuttonPanel.add(endButton);\n\t\tbuttonPanel.add(anleitungButton);\n\t\tbuttonPanel.add(backButton);\n\t\tbuttonPanel.setBackground(Color.red.darker());\n\t\t\n\t\tgetContentPane().setLayout(new BorderLayout(40, 40));\n\t\tgetContentPane().add(buttonPanel, BorderLayout.CENTER);\n\t\tgetContentPane().add(new JLabel(), BorderLayout.NORTH);\n\t\tgetContentPane().add(new JLabel(), BorderLayout.SOUTH);\n\t\tgetContentPane().add(new JLabel(), BorderLayout.WEST);\n\t\tgetContentPane().add(new JLabel(), BorderLayout.EAST);\n\t\tgetContentPane().setBackground(buttonPanel.getBackground());\n\t\t\n\t\t// ACTIONLISTENER\n\t\tendButton.addActionListener(new ActionListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdispose();\n\t\t\t\tSystem.exit(0);\n\t\t\t\tcancelGameandGoBackToHome(e);\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\tanleitungButton.addActionListener(new ActionListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdispose();\n\t\t\t\topenAnleitung(e);\n\t\t\t}\n\t\t});\n\t\t\n\t\tbackButton.addActionListener(new ActionListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdispose();\n\t\t\t\tbackToGame(e);\t\t\t\t\t\n\t\t\t}\n\t\t});\n\t}", "public void updateUI()\n\t{\n\t\tif( isRunning() == false) \n\t\t{\n\t\t\tupdateButton(\"Run\");\n\t\t\tbutton.setClickable(true);\n\t\t\tupdateTextView(Feedback.getMessage(Feedback.TYPE.NEW_TEST, null));\n\t\t}else\n\t\t{\n\t\t\tbutton.setClickable(true);\n\t\t\tupdateButton( \"Stop\" );\n\t\t\tupdateTextView(\"Tests are running.\");\n\n\t\t}\n\t}", "public void createAndShowButtons() {\n\t\t// repainting images to update after player was moved\n\t\t@SuppressWarnings(\"unused\")\n\t\tGraphics g = getGraphics();\n\t\tremoveAll();\n\t\trevalidate();\n\t\trepaint();\n\n\t\tsetLayout(new GridLayout(1, 6, 100, 0));\n\t\tJButton highscoreButton = new JButton(\"Highscore\");\n\t\tadd(highscoreButton);\n\n\t\t/*\n\t\t * Inner class listening to the highscore button being pressed.\n\t\t */\n\t\thighscoreButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tJOptionPane.showMessageDialog(null, Scores.showHighscore());\n\t\t\t\tmapFrame.createAndShowGui();\n\t\t\t}\n\t\t});\n\n\t\tJLabel name = new JLabel(\n\t\t\t\t\"<html><div>Name: \" + player.getName() + \"<br> Difficulty: \" + map.getDifficulty() + \"</div></html>\");\n\t\tadd(name);\n\t\tJLabel skill = new JLabel(\n\t\t\t\t\"<html><div> Energy: \" + player.getEnergy() + \" <br> Skill: \" + player.getSkill() + \"</div></html>\");\n\t\tadd(skill);\n\t\tJLabel currentScore = new JLabel(\"<html><div> Score: \" + score.getScore() + \"<br> Key(s): \"\n\t\t\t\t+ player.getNumberOfKeys() + \"/\" + map.getNUMBER_OF_REQUIRED_KEYS() + \"</div></html>\");\n\t\tadd(currentScore);\n\t\tJLabel numberOfMoves = new JLabel(\"<html><div> Moves: \" + player.getNumberOfMoves() + \"<br> Prices: \"\n\t\t\t\t+ player.getWonPrices() + \"</div></html>\");\n\t\tadd(numberOfMoves);\n\t\tJButton quitButton = new JButton(\"Quit\");\n\t\tadd(quitButton);\n\n\t\t/*\n\t\t * Inner class listening to the Quit button being pressed.\n\t\t */\n\t\tquitButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Bye, come back soon!\");\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t});\n\t}", "protected void createContents() {\n setText(BUNDLE.getString(\"TranslationManagerShell.Application.Name\"));\n setSize(599, 505);\n\n final Composite cmpMain = new Composite(this, SWT.NONE);\n cmpMain.setLayout(new FormLayout());\n\n final Composite cmpControls = new Composite(cmpMain, SWT.NONE);\n final FormData fd_cmpControls = new FormData();\n fd_cmpControls.right = new FormAttachment(100, -5);\n fd_cmpControls.top = new FormAttachment(0, 5);\n fd_cmpControls.left = new FormAttachment(0, 5);\n cmpControls.setLayoutData(fd_cmpControls);\n cmpControls.setLayout(new FormLayout());\n\n final ToolBar modifyToolBar = new ToolBar(cmpControls, SWT.FLAT);\n\n tiSave = new ToolItem(modifyToolBar, SWT.PUSH);\n tiSave.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Save\"));\n tiSave.setEnabled(false);\n tiSave.setDisabledImage(SWTResourceManager.getImage(TranslationManagerShell.class,\n \"/images/tools16x16/d_save.gif\"));\n tiSave.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/e_save.gif\"));\n\n tiUndo = new ToolItem(modifyToolBar, SWT.PUSH);\n tiUndo.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Undo\"));\n tiUndo.setEnabled(false);\n tiUndo.setDisabledImage(SWTResourceManager.getImage(TranslationManagerShell.class,\n \"/images/tools16x16/d_reset.gif\"));\n tiUndo.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/e_reset.gif\"));\n\n tiDeleteSelected = new ToolItem(modifyToolBar, SWT.PUSH);\n tiDeleteSelected.setDisabledImage(SWTResourceManager.getImage(TranslationManagerShell.class,\n \"/images/tools16x16/d_remove.gif\"));\n tiDeleteSelected.setEnabled(false);\n tiDeleteSelected.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Delete\"));\n tiDeleteSelected.setImage(SWTResourceManager.getImage(TranslationManagerShell.class,\n \"/images/tools16x16/e_remove.gif\"));\n\n txtFilter = new LVSText(cmpControls, SWT.BORDER);\n final FormData fd_txtFilter = new FormData();\n fd_txtFilter.right = new FormAttachment(25, 0);\n fd_txtFilter.top = new FormAttachment(modifyToolBar, 0, SWT.CENTER);\n fd_txtFilter.left = new FormAttachment(modifyToolBar, 25, SWT.RIGHT);\n txtFilter.setLayoutData(fd_txtFilter);\n\n final ToolBar filterToolBar = new ToolBar(cmpControls, SWT.FLAT);\n final FormData fd_filterToolBar = new FormData();\n fd_filterToolBar.top = new FormAttachment(modifyToolBar, 0, SWT.TOP);\n fd_filterToolBar.left = new FormAttachment(txtFilter, 5, SWT.RIGHT);\n filterToolBar.setLayoutData(fd_filterToolBar);\n\n tiFilter = new ToolItem(filterToolBar, SWT.NONE);\n tiFilter.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/e_find.gif\"));\n tiFilter.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Filter\"));\n\n tiLocale = new ToolItem(filterToolBar, SWT.DROP_DOWN);\n tiLocale.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Locale\"));\n tiLocale.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/e_globe.png\"));\n\n menuLocale = new Menu(filterToolBar);\n addDropDown(tiLocale, menuLocale);\n\n lblSearchResults = new Label(cmpControls, SWT.NONE);\n lblSearchResults.setVisible(false);\n final FormData fd_lblSearchResults = new FormData();\n fd_lblSearchResults.top = new FormAttachment(filterToolBar, 0, SWT.CENTER);\n fd_lblSearchResults.left = new FormAttachment(filterToolBar, 5, SWT.RIGHT);\n lblSearchResults.setLayoutData(fd_lblSearchResults);\n lblSearchResults.setText(BUNDLE.getString(\"TranslationManagerShell.Label.Results\"));\n\n final ToolBar translateToolBar = new ToolBar(cmpControls, SWT.NONE);\n final FormData fd_translateToolBar = new FormData();\n fd_translateToolBar.top = new FormAttachment(filterToolBar, 0, SWT.TOP);\n fd_translateToolBar.right = new FormAttachment(100, 0);\n translateToolBar.setLayoutData(fd_translateToolBar);\n\n tiDebug = new ToolItem(translateToolBar, SWT.PUSH);\n tiDebug.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Debug\"));\n tiDebug.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/debug.png\"));\n\n new ToolItem(translateToolBar, SWT.SEPARATOR);\n\n tiAddBase = new ToolItem(translateToolBar, SWT.PUSH);\n tiAddBase.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.AddBase\"));\n tiAddBase.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/e_add.gif\"));\n\n tiTranslate = new ToolItem(translateToolBar, SWT.CHECK);\n tiTranslate.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Translate\"));\n tiTranslate.setImage(SWTResourceManager\n .getImage(TranslationManagerShell.class, \"/images/tools16x16/target.png\"));\n\n cmpTable = new Composite(cmpMain, SWT.NONE);\n cmpTable.setLayout(new FillLayout());\n final FormData fd_cmpTable = new FormData();\n fd_cmpTable.bottom = new FormAttachment(100, -5);\n fd_cmpTable.right = new FormAttachment(cmpControls, 0, SWT.RIGHT);\n fd_cmpTable.left = new FormAttachment(cmpControls, 0, SWT.LEFT);\n fd_cmpTable.top = new FormAttachment(cmpControls, 5, SWT.BOTTOM);\n cmpTable.setLayoutData(fd_cmpTable);\n\n final Menu menu = new Menu(this, SWT.BAR);\n setMenuBar(menu);\n\n final MenuItem menuItemFile = new MenuItem(menu, SWT.CASCADE);\n menuItemFile.setText(BUNDLE.getString(\"TranslationManagerShell.Menu.File\"));\n\n final Menu menuFile = new Menu(menuItemFile);\n menuItemFile.setMenu(menuFile);\n\n menuItemExit = new MenuItem(menuFile, SWT.NONE);\n menuItemExit.setAccelerator(SWT.ALT | SWT.F4);\n menuItemExit.setText(BUNDLE.getString(\"TranslationManagerShell.Menu.File.Exit\"));\n\n final MenuItem menuItemHelp = new MenuItem(menu, SWT.CASCADE);\n menuItemHelp.setText(BUNDLE.getString(\"TranslationManagerShell.Menu.Help\"));\n\n final Menu menuHelp = new Menu(menuItemHelp);\n menuItemHelp.setMenu(menuHelp);\n\n menuItemDebug = new MenuItem(menuHelp, SWT.NONE);\n menuItemDebug.setText(BUNDLE.getString(\"TranslationManagerShell.Menu.Help.Debug\"));\n\n new MenuItem(menuHelp, SWT.SEPARATOR);\n\n menuItemAbout = new MenuItem(menuHelp, SWT.NONE);\n menuItemAbout.setText(BUNDLE.getString(\"TranslationManagerShell.Menu.Help.About\"));\n //\n }", "@SuppressWarnings(\"unchecked\")\n\tprivate void addSingleplayerMultiplayerButtons() {\n\t\tthis.buttonList.add(new GuiButton(1, 4, 3, 60, 20, I18n.format(\"menu.singleplayer\", new Object[0])));\n\t\tthis.buttonList.add(new GuiButton(2, 70, 3, 50, 20, I18n.format(\"menu.multiplayer\", new Object[0])));\n\t\tthis.buttonList.add(new GuiButton(14, 126, 3, 60, 20, \"§bResilient§r\"));\n\n\t}", "public void makeGUI()\r\n {\n\t\t\tContainer jfrm;\r\n\t\t\tjfrm = getContentPane();\r\n jfrm.setLayout( new GridLayout( 200, 20 ) );\r\n jfrm.setLayout(null);\r\n jfrm.setBackground(new Color(144, 238, 144));\r\n //jfrm.setFont(f);\r\n //jfrm.setLayout(null);\r\n //jfrm.setSize(1250,500);\r\n //jfrm.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n \r\n txt = new JTextField(70);\r\n txt.setBounds(100,40,960,40);\r\n jfrm.add(txt);\r\n txt.setText(\"\");\t\t\r\n txt.setFont(f);\r\n int x = 100,y = 100,x1 = 60,y1 = 40,i=0;\r\n \r\n JButton btna = new JButton(\"\\u0C85\");\r\n btna.setBounds(x+x1*i++,y,x1,y1);\r\n btna.setFont(f);\r\n btna.addActionListener(this);\r\n JButton btnaa = new JButton(\"\\u0C86\");\r\n btnaa.setBounds(x+x1*i++,y,x1,y1);\r\n btnaa.setFont(f);\r\n btnaa.addActionListener(this);\r\n JButton btni = new JButton(\"\\u0C87\");\r\n btni.setBounds(x+x1*i++,y,x1,y1);\r\n btni.setFont(f);\r\n btni.addActionListener(this);\r\n JButton btnii = new JButton(\"\\u0C88\");\r\n btnii.setBounds(x+x1*i++,y,x1,y1);\r\n btnii.setFont(f);\r\n btnii.addActionListener(this);\r\n JButton btnu = new JButton(\"\\u0C89\");\r\n btnu.setBounds(x+x1*i++,y,x1,y1);\r\n btnu.addActionListener(this);\r\n btnu.setFont(f);\r\n JButton btnuu = new JButton(\"\\u0C8A\");\r\n btnuu.setBounds(x+x1*i++,y,x1,y1);\r\n btnuu.addActionListener(this);\r\n btnuu.setFont(f);\r\n JButton btnr = new JButton(\"\\u0C8B\");\r\n btnr.setBounds(x+x1*i++,y,x1,y1);\r\n btnr.setFont(f);\r\n btnr.addActionListener(this);\r\n JButton btnrr = new JButton(\"\\u0CE0\");\r\n btnrr.setBounds(x+x1*i++,y,x1,y1);\r\n btnrr.setFont(f);\r\n btnrr.addActionListener(this);\r\n JButton btne = new JButton(\"\\u0C8E\");\r\n btne.setBounds(x+x1*i++,y,x1,y1);\r\n btne.addActionListener(this);\r\n btne.setFont(f);\r\n JButton btnee = new JButton(\"\\u0C8F\");\r\n btnee.setBounds(x+x1*i++,y,x1,y1);\r\n btnee.setFont(f);\r\n btnee.addActionListener(this);\r\n JButton btnai = new JButton(\"\\u0C90\");\r\n btnai.setBounds(x+x1*i++,y,x1,y1);\r\n btnai.setFont(f);\r\n btnai.addActionListener(this);\r\n JButton btno = new JButton(\"\\u0C92\");\r\n btno.setBounds(x+x1*i++,y,x1,y1);\r\n btno.setFont(f);\r\n btno.addActionListener(this);\r\n JButton btnoo = new JButton(\"\\u0C93\");\r\n btnoo.setBounds(x+x1*i++,y,x1,y1);\r\n btnoo.setFont(f);\r\n btnoo.addActionListener(this);\r\n JButton btnou = new JButton(\"\\u0C94\");\r\n btnou.setBounds(x+x1*i++,y,x1,y1);\r\n btnou.setFont(f);\r\n btnou.addActionListener(this);\r\n JButton btnam = new JButton(\"\\u0C85\\u0C82\");\r\n btnam.setBounds((x+x1*i++),y,x1+5,y1);\r\n btnam.setFont(f);\r\n btnam.addActionListener(this);\r\n JButton btnaha = new JButton(\"\\u0C85\\u0C83\");\r\n btnaha.setBounds(x+x1*i++,y,x1,y1);\r\n btnaha.setFont(f);\r\n btnaha.addActionListener(this);\r\n \r\n x = 400;\r\n y += 50;\r\n i=0;\r\n \r\n JButton btnka = new JButton(\"\\u0C95\");\r\n btnka.setBounds(x+x1*i++,y,x1,y1);\r\n btnka.setFont(f);\r\n btnka.addActionListener(this);\r\n JButton btnkha = new JButton(\"\\u0C96\");\r\n btnkha.setBounds(x+x1*i++,y,x1,y1);\r\n btnkha.setFont(f);\r\n btnkha.addActionListener(this);\r\n JButton btnga = new JButton(\"\\u0C97\");\r\n btnga.setBounds(x+x1*i++,y,x1,y1);\r\n btnga.setFont(f);\r\n btnga.addActionListener(this);\r\n JButton btngha = new JButton(\"\\u0C98\");\r\n btngha.setBounds(x+x1*i++,y,x1,y1);\r\n btngha.setFont(f);\r\n btngha.addActionListener(this);\r\n JButton btnnga = new JButton(\"\\u0C99\");\r\n btnnga.setBounds(x+x1*i++,y,x1,y1);\r\n btnnga.setFont(f);\r\n btnnga.addActionListener(this);\r\n \r\n x = 400;\r\n y += 50;\r\n i=0;\r\n \r\n JButton btnca = new JButton(\"\\u0C9A\");\r\n btnca.setBounds(x+x1*i++,y,x1,y1);\r\n btnca.setFont(f);\r\n btnca.addActionListener(this);\r\n JButton btncha = new JButton(\"\\u0C9B\");\r\n btncha.setBounds(x+x1*i++,y,x1,y1);\r\n btncha.setFont(f);\r\n btncha.addActionListener(this);\r\n JButton btnja = new JButton(\"\\u0C9C\");\r\n btnja.setBounds(x+x1*i++,y,x1,y1);\r\n btnja.setFont(f);\r\n btnja.addActionListener(this);\r\n JButton btnjha = new JButton(\"\\u0C9D\");\r\n btnjha.setBounds(x+x1*i++,y,x1,y1);\r\n btnjha.setFont(f);\r\n btnjha.addActionListener(this);\r\n JButton btnnya = new JButton(\"\\u0C9E\");\r\n btnnya.setBounds(x+x1*i++,y,x1,y1);\r\n btnnya.setFont(f);\r\n btnnya.addActionListener(this);\r\n \r\n x = 400;\r\n y += 50;\r\n i=0;\r\n \r\n JButton btntta = new JButton(\"\\u0C9F\");\r\n btntta.setBounds(x+x1*i++,y,x1,y1);\r\n btntta.setFont(f);\r\n btntta.addActionListener(this);\r\n JButton btnttha = new JButton(\"\\u0CA0\");\r\n btnttha.setBounds(x+x1*i++,y,x1,y1);\r\n btnttha.setFont(f);\r\n btnttha.addActionListener(this);\r\n JButton btndda = new JButton(\"\\u0CA1\");\r\n btndda.setBounds(x+x1*i++,y,x1,y1);\r\n btndda.setFont(f);\r\n btndda.addActionListener(this);\r\n JButton btnddha = new JButton(\"\\u0CA2\");\r\n btnddha.setBounds(x+x1*i++,y,x1,y1);\r\n btnddha.setFont(f);\r\n btnddha.addActionListener(this);\r\n JButton btnnna = new JButton(\"\\u0CA3\");\r\n btnnna.setBounds(x+x1*i++,y,x1,y1);\r\n btnnna.setFont(f);\r\n btnnna.addActionListener(this);\r\n \r\n x = 400;\r\n y += 50;\r\n i=0;\r\n \r\n JButton btnta = new JButton(\"\\u0CA4\");\r\n btnta.setBounds(x+x1*i++,y,x1,y1);\r\n btnta.setFont(f);\r\n btnta.addActionListener(this);\r\n JButton btntha = new JButton(\"\\u0CA5\");\r\n btntha.setBounds(x+x1*i++,y,x1,y1);\r\n btntha.setFont(f);\r\n btntha.addActionListener(this);\r\n JButton btnda = new JButton(\"\\u0CA6\");\r\n btnda.setBounds(x+x1*i++,y,x1,y1);\r\n btnda.setFont(f);\r\n btnda.addActionListener(this);\r\n JButton btndha = new JButton(\"\\u0CA7\");\r\n btndha.setBounds(x+x1*i++,y,x1,y1);\r\n btndha.setFont(f);\r\n btndha.addActionListener(this);\r\n JButton btnna = new JButton(\"\\u0CA8\");\r\n btnna.setBounds(x+x1*i++,y,x1,y1);\r\n btnna.setFont(f);\r\n btnna.addActionListener(this);\r\n \r\n x = 400;\r\n y += 50;\r\n i=0;\r\n \r\n JButton btnpa = new JButton(\"\\u0CAA\");\r\n btnpa.setBounds(x+x1*i++,y,x1,y1);\r\n btnpa.setFont(f);\r\n btnpa.addActionListener(this);\r\n JButton btnpha = new JButton(\"\\u0CAB\");\r\n btnpha.setBounds(x+x1*i++,y,x1,y1);\r\n btnpha.setFont(f);\r\n btnpha.addActionListener(this);\r\n JButton btnba = new JButton(\"\\u0CAC\");\r\n btnba.setBounds(x+x1*i++,y,x1,y1);\r\n btnba.setFont(f);\r\n btnba.addActionListener(this);\r\n JButton btnbha = new JButton(\"\\u0CAD\");\r\n btnbha.setBounds(x+x1*i++,y,x1,y1);\r\n btnbha.setFont(f);\r\n btnbha.addActionListener(this);\r\n JButton btnma = new JButton(\"\\u0CAE\");\r\n btnma.setBounds(x+x1*i++,y,x1,y1);\r\n btnma.setFont(f);\r\n btnma.addActionListener(this);\r\n \r\n x = 200;\r\n y += 50;\r\n i=0;\r\n \r\n JButton btnya = new JButton(\"\\u0CAF\");\r\n btnya.setBounds(x+x1*i++,y,x1,y1);\r\n btnya.setFont(f);\r\n btnya.addActionListener(this);\r\n JButton btnra = new JButton(\"\\u0CB0\");\r\n btnra.setBounds(x+x1*i++,y,x1,y1);\r\n btnra.setFont(f);\r\n btnra.addActionListener(this);\r\n JButton btnla = new JButton(\"\\u0CB2\");\r\n btnla.setBounds(x+x1*i++,y,x1,y1);\r\n btnla.setFont(f);\r\n btnla.addActionListener(this);\r\n JButton btnva = new JButton(\"\\u0CB5\");\r\n btnva.setBounds(x+x1*i++,y,x1,y1);\r\n btnva.setFont(f);\r\n btnva.addActionListener(this);\r\n JButton btnsha = new JButton(\"\\u0CB6\");\r\n btnsha.setBounds(x+x1*i++,y,x1,y1);\r\n btnsha.setFont(f);\r\n btnsha.addActionListener(this);\r\n JButton btnssa = new JButton(\"\\u0CB7\");\r\n btnssa.setBounds(x+x1*i++,y,x1,y1);\r\n btnssa.setFont(f);\r\n btnssa.addActionListener(this);\r\n JButton btnsa = new JButton(\"\\u0CB8\");\r\n btnsa.setBounds(x+x1*i++,y,x1,y1);\r\n btnsa.setFont(f);\r\n btnsa.addActionListener(this);\r\n JButton btnha = new JButton(\"\\u0CB9\");\r\n btnha.setBounds(x+x1*i++,y,x1,y1);\r\n btnha.setFont(f);\r\n btnha.addActionListener(this);\r\n JButton btnlla = new JButton(\"\\u0CB3\");\r\n btnlla.setBounds(x+x1*i++,y,x1,y1);\r\n btnlla.setFont(f);\r\n btnlla.addActionListener(this);\r\n JButton btnksha = new JButton(\"\\u0C95\\u0CCD\\u0CB7\");\r\n btnksha.setBounds(x+x1*i++,y,x1,y1);\r\n btnksha.setFont(f);\r\n btnksha.addActionListener(this);\r\n JButton btntra = new JButton(\"\\u0CA4\\u0CCD\\u0CB0\");\r\n btntra.setBounds(x+x1*i++,y,x1,y1);\r\n btntra.setFont(f);\r\n btntra.addActionListener(this);\r\n JButton btnjna = new JButton(\"\\u0C9C\\u0CCD\\u0C9E\");\r\n btnjna.setBounds(x+x1*i++,y,x1,y1);\r\n btnjna.setFont(f);\r\n btnjna.addActionListener(this);\r\n \r\n x = 750;\r\n y = 175;\r\n i=0;\r\n \r\n JButton btnhal = new JButton(\"\\u0CCD\");\r\n btnhal.setBounds(x+x1*i++,y,x1,y1);\r\n btnhal.setFont(f);\r\n btnhal.addActionListener(this);\r\n JButton btnvaa = new JButton(\"\\u0CBE\");\r\n btnvaa.setBounds(x+x1*i++,y,x1,y1);\r\n btnvaa.setFont(f);\r\n btnvaa.addActionListener(this);\t\r\n JButton btnvi = new JButton(\"\\u0CBF\");\r\n btnvi.setBounds(x+x1*i++,y,x1,y1);\r\n btnvi.setFont(f);\r\n btnvi.addActionListener(this);\r\n JButton btnvii = new JButton(\"\\u0CC0\");\r\n btnvii.setBounds(x+x1*i++,y,x1,y1);\r\n btnvii.setFont(f);\r\n btnvii.addActionListener(this);\r\n \r\n x = 750;\r\n y += 50;\r\n i=0;\r\n \r\n JButton btnvu = new JButton(\"\\u0CC1\");\r\n btnvu.setBounds(x+x1*i++,y,x1,y1);\r\n btnvu.setFont(f);\r\n btnvu.addActionListener(this);\r\n JButton btnvuu = new JButton(\"\\u0CC2\");\r\n btnvuu.setBounds(x+x1*i++,y,x1,y1);\r\n btnvuu.setFont(f);\r\n btnvuu.addActionListener(this);\r\n JButton btnvr = new JButton(\"\\u0CC3\");\r\n btnvr.setBounds(x+x1*i++,y,x1,y1);\r\n btnvr.setFont(f);\r\n btnvr.addActionListener(this);\r\n JButton btnvrr = new JButton(\"\\u0CC4\");\r\n btnvrr.setBounds(x+x1*i++,y,x1,y1);\r\n btnvrr.setFont(f);\r\n btnvrr.addActionListener(this);\r\n \r\n x = 750;\r\n y += 50;\r\n i=0;\r\n \r\n JButton btnve = new JButton(\"\\u0CC6\");\r\n btnve.setBounds(x+x1*i++,y,x1,y1);\r\n btnve.setFont(f);\r\n btnve.addActionListener(this);\r\n JButton btnvee = new JButton(\"\\u0CC7\");\r\n btnvee.setBounds(x+x1*i++,y,x1,y1);\r\n btnvee.setFont(f);\r\n btnvee.addActionListener(this);\r\n JButton btnvai = new JButton(\"\\u0CC8\");\r\n btnvai.setBounds(x+x1*i++,y,x1,y1);\r\n btnvai.setFont(f);\r\n btnvai.addActionListener(this);\r\n JButton btnvo = new JButton(\"\\u0CCA\");\r\n btnvo.setBounds(x+x1*i++,y,x1,y1);\r\n btnvo.setFont(f);\r\n btnvo.addActionListener(this);\r\n \r\n x = 750;\r\n y += 50;\r\n i=0;\r\n \r\n JButton btnvoo = new JButton(\"\\u0CCB\");\r\n btnvoo.setBounds(x+x1*i++,y,x1,y1);\r\n btnvoo.setFont(f);\r\n btnvoo.addActionListener(this);\r\n JButton btnvou = new JButton(\"\\u0CCC\");\r\n btnvou.setBounds(x+x1*i++,y,x1,y1);\r\n btnvou.setFont(f);\r\n btnvou.addActionListener(this);\r\n JButton btnvam = new JButton(\"\\u0C82\");\r\n btnvam.setBounds(x+x1*i++,y,x1,y1);\r\n btnvam.setFont(f);\r\n btnvam.addActionListener(this);\r\n JButton btnvaha = new JButton(\"\\u0C83\");\r\n btnvaha.setBounds(x+x1*i++,y,x1,y1);\r\n btnvaha.setFont(f);\r\n btnvaha.addActionListener(this);\r\n \r\n x = 160;\r\n y = 175;\r\n i=0;\r\n \r\n JButton btn1 = new JButton(\"\\u0CE7\");\r\n btn1.setBounds(x+x1*i++,y,x1,y1);\r\n btn1.setFont(f);\r\n btn1.addActionListener(this);\r\n JButton btn2 = new JButton(\"\\u0CE8\");\r\n btn2.setBounds(x+x1*i++,y,x1,y1);\r\n btn2.setFont(f);\r\n btn2.addActionListener(this);\r\n JButton btn3 = new JButton(\"\\u0CE9\");\r\n btn3.setBounds(x+x1*i++,y,x1,y1);\r\n btn3.setFont(f);\r\n btn3.addActionListener(this);\r\n \r\n x = 160;\r\n y += 50;\r\n i=0;\r\n \r\n JButton btn4 = new JButton(\"\\u0CEA\");\r\n btn4.setBounds(x+x1*i++,y,x1,y1);\r\n btn4.setFont(f);\r\n btn4.addActionListener(this);\r\n JButton btn5 = new JButton(\"\\u0CEB\");\r\n btn5.setBounds(x+x1*i++,y,x1,y1);\r\n btn5.setFont(f);\r\n btn5.addActionListener(this);\r\n JButton btn6 = new JButton(\"\\u0CEC\");\r\n btn6.setBounds(x+x1*i++,y,x1,y1);\r\n btn6.setFont(f);\r\n btn6.addActionListener(this);\r\n \r\n x = 160;\r\n y += 50;\r\n i=0;\r\n \r\n JButton btn7 = new JButton(\"\\u0CED\");\r\n btn7.setBounds(x+x1*i++,y,x1,y1);\r\n btn7.setFont(f);\r\n btn7.addActionListener(this);\r\n JButton btn8 = new JButton(\"\\u0CEE\");\r\n btn8.setBounds(x+x1*i++,y,x1,y1);\r\n btn8.setFont(f);\r\n btn8.addActionListener(this);\r\n JButton btn9 = new JButton(\"\\u0CEF\");\r\n btn9.setBounds(x+x1*i++,y,x1,y1);\r\n btn9.setFont(f);\r\n btn9.addActionListener(this);\r\n \r\n x = 220;\r\n y += 50;\r\n \t\t\r\n JButton btn0 = new JButton(\"\\u0CE6\");\r\n btn0.setBounds(x,y,x1,y1);\r\n btn0.setFont(f);\r\n btn0.addActionListener(this);\r\n \r\n x = 1000;\r\n y = 200;\r\n \t\t\r\n JButton btnBlank = new JButton(\"\\u0C96\\u0CBE\\u0CB2\\u0CBF\");\r\n btnBlank.setBounds(x,y,90,y1);\r\n btnBlank.setFont(f);\r\n btnBlank.addActionListener(this);\r\n \r\n x = 1000;\r\n y = 250;\r\n \r\n JButton btnClear = new JButton(\"\\u0C85\\u0CB3\\u0CBF\\u0CB8\\u0CC1\");\r\n btnClear.setBounds(x,y,90,40);\r\n btnClear.setFont(f);\r\n btnClear.addActionListener(this);\r\n /*JButton btnBack = new JButton(\"\\u0008\");\r\n btnBack.setFont(f);\r\n btnBack.addActionListener(this);\r\n */\r\n \t\r\n jfrm.add(btna);\r\n jfrm.add(btnaa);\r\n jfrm.add(btni);\r\n jfrm.add(btnii);\r\n jfrm.add(btnu);\r\n jfrm.add(btnuu);\r\n jfrm.add(btnr);\r\n jfrm.add(btnrr);\r\n jfrm.add(btne);\r\n jfrm.add(btnee);\r\n jfrm.add(btnai);\r\n jfrm.add(btno);\r\n jfrm.add(btnoo);\r\n jfrm.add(btnou);\r\n jfrm.add(btnam);\r\n jfrm.add(btnaha);\r\n jfrm.add(btnka);\r\n jfrm.add(btnkha);\r\n jfrm.add(btnga);\r\n jfrm.add(btngha);\r\n jfrm.add(btnnga);\r\n jfrm.add(btnca);\r\n jfrm.add(btncha);\r\n jfrm.add(btnja);\r\n jfrm.add(btnjha);\r\n jfrm.add(btnnya);\r\n jfrm.add(btntta);\r\n jfrm.add(btnttha);\r\n jfrm.add(btndda);\r\n jfrm.add(btnddha);\r\n jfrm.add(btnnna);\r\n jfrm.add(btnta);\r\n jfrm.add(btntha);\r\n jfrm.add(btnda);\r\n jfrm.add(btndha);\r\n jfrm.add(btnna);\r\n jfrm.add(btnha);\r\n jfrm.add(btnpa);\r\n jfrm.add(btnpha);\r\n jfrm.add(btnba);\r\n jfrm.add(btnbha);\r\n jfrm.add(btnma);\r\n jfrm.add(btnya);\r\n jfrm.add(btnra);\r\n jfrm.add(btnla);\r\n jfrm.add(btnva);\r\n jfrm.add(btnsha);\r\n jfrm.add(btnssa);\r\n jfrm.add(btnsa);\r\n jfrm.add(btnha);\r\n jfrm.add(btnlla);\r\n jfrm.add(btnksha);\r\n jfrm.add(btntra);\r\n jfrm.add(btnjna);\r\n \r\n jfrm.add(btnhal);\r\n jfrm.add(btnvaa);\r\n jfrm.add(btnvi);\r\n jfrm.add(btnvii);\r\n jfrm.add(btnvu);\r\n jfrm.add(btnvuu);\r\n jfrm.add(btnvr);\r\n jfrm.add(btnvrr);\r\n jfrm.add(btnve);\r\n jfrm.add(btnvee);\r\n jfrm.add(btnvai);\r\n jfrm.add(btnvo);\r\n jfrm.add(btnvoo);\r\n jfrm.add(btnvou);\r\n jfrm.add(btnvam);\r\n jfrm.add(btnvaha);\r\n \r\n jfrm.add(btn0);\r\n jfrm.add(btn1);\r\n jfrm.add(btn2);\r\n jfrm.add(btn3);\r\n jfrm.add(btn4);\r\n jfrm.add(btn5);\r\n jfrm.add(btn6);\r\n jfrm.add(btn7);\r\n jfrm.add(btn8);\r\n jfrm.add(btn9);\r\n jfrm.add(btnBlank);\r\n jfrm.add(btnClear);\r\n //jfrm.add(btnBack);\r\n \t\t\t\t\r\n jfrm.setVisible(true);\r\n }", "private void initButtons() {\r\n\t\texitGameButton\t\t= game.screenHelper.createTextButton(BUTTON_EXIT_GAME_TEXT, BUTTON_EXIT_GAME_MOUSEOVER_TEXT, menuText);\r\n\t\tcancelExitButton\t= game.screenHelper.createTextButton(BUTTON_CANCEL_EXIT_TEXT, BUTTON_CANCEL_EXIT_MOUSEOVER_TEXT, menuText);\r\n\t\tcancelExitButton.addListener(new ChangeScreenInputListener(new MenuScreenChangeCommand()));\r\n\t\t// Event Listeners \r\n\t\t// TODO: clean up this giant piece of shitty code.\r\n\t\t\r\n\t\texitGameButton.addListener(new InputListener() {\r\n\t\t\tpublic boolean touchDown (InputEvent event, float x, float y, int pointer, int button) {\r\n\t\t\t\texitGame();\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t});\r\n\t}", "public abstract void executeBagButton();", "private void initialize() {\n\t\twindow = new JFrame();\n\t\twindow.setBounds(100, 100, 650, 300);\n\t\twindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\twindow.getContentPane().setLayout(null);\n\t\t\n\t\tJLabel chooseMemberLabel = new JLabel(\"Which crew member would you like to view the status of?\");\n\t\tchooseMemberLabel.setBounds(10, 11, 414, 14);\n\t\twindow.getContentPane().add(chooseMemberLabel);\n\t\t\n\t\tJLabel statusLabel = new JLabel(\"\");\n\t\tstatusLabel.setVerticalAlignment(SwingConstants.TOP);\n\t\tstatusLabel.setBounds(342, 36, 282, 184);\n\t\twindow.getContentPane().add(statusLabel);\n\t\t\n\t\tJButton member1Button = new JButton(environment.getCurrentCrew().getCrew().get(0).getName());\n\t\tmember1Button.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tstatusLabel.setText(\"<html>\" + environment.getCurrentCrew().getCrew().get(0).status().replaceAll(\"<\",\"&lt;\").replaceAll(\">\", \"&gt;\").replaceAll(\"\\n\", \"<br/>\") + \"</html>\");\n\t\t\t}\n\t\t});\n\t\tmember1Button.setBounds(10, 33, 150, 23);\n\t\twindow.getContentPane().add(member1Button);\n\t\t\n\t\tif (environment.getCurrentCrew().getCrew().size() > 1) {\n\t\t\tJButton member2Button = new JButton(environment.getCurrentCrew().getCrew().get(1).getName());\n\t\t\tmember2Button.addActionListener(new ActionListener() {\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tstatusLabel.setText(\"<html>\" + environment.getCurrentCrew().getCrew().get(1).status().replaceAll(\"<\",\"&lt;\").replaceAll(\">\", \"&gt;\").replaceAll(\"\\n\", \"<br/>\") + \"</html>\");\n\t\t\t\t}\n\t\t\t});\n\t\t\tmember2Button.setBounds(10, 67, 150, 23);\n\t\t\twindow.getContentPane().add(member2Button);\n\t\t}\n\t\t\n\t\tif (environment.getCurrentCrew().getCrew().size() > 2) {\n\t\t\tJButton member3Button = new JButton(environment.getCurrentCrew().getCrew().get(2).getName());\n\t\t\tmember3Button.addActionListener(new ActionListener() {\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tstatusLabel.setText(\"<html>\" + environment.getCurrentCrew().getCrew().get(2).status().replaceAll(\"<\",\"&lt;\").replaceAll(\">\", \"&gt;\").replaceAll(\"\\n\", \"<br/>\") + \"</html>\");\n\t\t\t\t}\n\t\t\t});\n\t\t\tmember3Button.setBounds(10, 101, 150, 23);\n\t\t\twindow.getContentPane().add(member3Button);\n\t\t}\n\t\t\n\t\tif (environment.getCurrentCrew().getCrew().size() > 3) {\n\t\t\tJButton member4Button = new JButton(environment.getCurrentCrew().getCrew().get(3).getName());\n\t\t\tmember4Button.addActionListener(new ActionListener() {\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tstatusLabel.setText(\"<html>\" + environment.getCurrentCrew().getCrew().get(3).status().replaceAll(\"<\",\"&lt;\").replaceAll(\">\", \"&gt;\").replaceAll(\"\\n\", \"<br/>\") + \"</html>\");\n\t\t\t\t}\n\t\t\t});\n\t\t\tmember4Button.setBounds(10, 135, 150, 23);\n\t\t\twindow.getContentPane().add(member4Button);\n\t\t}\n\t\t\n\t\tJButton finishedButton = new JButton(\"Done\");\n\t\tfinishedButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tfinishedWindow();\n\t\t\t}\n\t\t});\n\t\tfinishedButton.setBounds(535, 227, 89, 23);\n\t\twindow.getContentPane().add(finishedButton);\n\t}", "public SimulationViewButton(String words, String language) {\n myResources = ResourceBundle.getBundle(DEFAULT_RESOURCE_PACKAGE + \"English\");\n font = myResources.getString(\"FontStylePath\");\n setText(words);\n setButtonTextFont();\n setPrefHeight(BUTTON_HEIGHT);//45\n setPrefWidth(BUTTON_WIDTH);//190\n setStyle(font);\n mouseUpdateListener();\n }", "public void infoBase()\n {\n this.menu.setBackground(new java.awt.Color(179, 204, 204));\n this.menu.setOpaque(true);\n \n this.semaine.setBackground(new java.awt.Color(224, 235, 235));\n this.semaine.setOpaque(true);\n \n ImageIcon cours_icon = new ImageIcon(new ImageIcon(\"src/Icones/book.png\").getImage().getScaledInstance(20, 20, Image.SCALE_DEFAULT));\n mes_cours = new JButton(\"Cours\", cours_icon);\n this.iconFont(mes_cours);\n\n ImageIcon search_icon = new ImageIcon(new ImageIcon(\"src/Icones/search.png\").getImage().getScaledInstance(20, 20, Image.SCALE_DEFAULT));\n rechercher = new JButton(\"Rechercher\", search_icon);\n this.iconFont(rechercher);\n\n ImageIcon delete_icon = new ImageIcon(new ImageIcon(\"src/Icones/quit.png\").getImage().getScaledInstance(20, 20, Image.SCALE_DEFAULT));\n this.annule = new JButton(\"Cours annulé(s)\", delete_icon);\n this.iconFont(annule);\n\n ImageIcon report_icon = new ImageIcon(new ImageIcon(\"src/Icones/report.png\").getImage().getScaledInstance(20, 20, Image.SCALE_DEFAULT));\n this.report = new JButton(\"Reporting\", report_icon);\n this.iconFont(report);\n\n ImageIcon recap_icon = new ImageIcon(new ImageIcon(\"src/Icones/news-admin.png\").getImage().getScaledInstance(20, 20, Image.SCALE_DEFAULT));\n this.summary = new JButton(\"Récapitulatif des cours\", recap_icon);\n this.iconFont(summary);\n \n ImageIcon logout_icon = new ImageIcon(new ImageIcon(\"src/Icones/logout.png\").getImage().getScaledInstance(20, 20, Image.SCALE_DEFAULT));\n this.logout = new JButton(\"Se déconnecter\", logout_icon);\n this.iconFont(logout);\n \n ///Affiche le numéro de semaine\n Calendar cal = new GregorianCalendar();\n Date d = new Date();\n cal.setTime(d);\n\n this.num_semaine = cal.get(Calendar.WEEK_OF_YEAR); //Numéro de semaine actuel\n\n JLabel week = new JLabel(\"SEMAINE\");\n f = week.getFont();\n week.setFont(f.deriveFont(f.getStyle() | Font.BOLD));\n semaine.add(week);\n this.week_button = new ArrayList();\n \n //On ajoute les 52 boutons pour chaque numéro de semaine\n for (int i = 0; i < 52; i++) {\n week_button.add(new JButton(Integer.toString(i + 1))); //Dans la arrayList\n semaine.add(week_button.get(i)); //Dans la toolbar\n if (i == num_semaine) { //Si égal à la semaine actuelle\n week_button.get(i - 1).setBackground(Color.red);\n week_button.get(i - 1).setOpaque(true);\n }\n\n }\n JPanel toolbars = new JPanel(new GridLayout(0, 1));\n toolbars.add(menu);\n toolbars.add(semaine);\n\n this.add(toolbars, BorderLayout.NORTH);\n\n String mesInfos = \"HYPERPLANNING 2019-2020\";\n \n info = new JLabel(mesInfos, JLabel.CENTER);\n info.setPreferredSize(new Dimension(20,50));\n info.setBackground( new java.awt.Color(153, 230, 230));\n info.setOpaque(true);\n info.setFont(new Font(\"Verdana\", Font.PLAIN, 18));\n\n this.add(info, BorderLayout.SOUTH);\n\n this.add(panel);\n panel.setLayout(new OverlayLayout(panel));\n this.panel.setBackground(new java.awt.Color(112, 219, 219));\n this.panel.setOpaque(true);\n\n this.setVisible(true);\n }", "public BTextPairSettings(String button_title, String text_title){\n\t\tsuper(button_title, text_title);\n\t//\tbutton.addActionListener(this);\n\t\t\n\t}" ]
[ "0.7010331", "0.67740667", "0.67275673", "0.6699844", "0.66970253", "0.66607785", "0.6623739", "0.6605472", "0.6577003", "0.6563235", "0.6559339", "0.65225756", "0.6510105", "0.64923614", "0.6462934", "0.64521855", "0.6440667", "0.6424569", "0.6412758", "0.63961005", "0.6367029", "0.63510865", "0.6347172", "0.63442224", "0.63054115", "0.6304008", "0.629334", "0.6289022", "0.6282746", "0.62713575", "0.62579817", "0.6253856", "0.6236436", "0.623257", "0.6206863", "0.6206616", "0.61964256", "0.61903614", "0.61880666", "0.61865175", "0.6173099", "0.61658", "0.61656487", "0.6157329", "0.6156419", "0.6149797", "0.6148558", "0.6145188", "0.6135515", "0.6110281", "0.6098306", "0.60976386", "0.60951245", "0.60777414", "0.6076276", "0.60708374", "0.606759", "0.6065957", "0.605815", "0.6057918", "0.60551745", "0.6051722", "0.6048307", "0.6043082", "0.6038143", "0.60352194", "0.6030929", "0.602478", "0.6016649", "0.6013244", "0.6012707", "0.6009975", "0.60080767", "0.60052127", "0.6003625", "0.5998536", "0.59927183", "0.5983811", "0.5983513", "0.59828013", "0.59812737", "0.5977679", "0.59772265", "0.59746724", "0.5971395", "0.5969546", "0.5967651", "0.59671205", "0.59670407", "0.59593743", "0.5944507", "0.59417343", "0.59410757", "0.5940861", "0.59358674", "0.5935582", "0.5935063", "0.5934193", "0.5932507", "0.59312826", "0.5928169" ]
0.0
-1
TODO Autogenerated method stub
@Override public void arrowInput(int keyCode) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void init(FilterConfig filterConfig) throws ServletException { System.out.print("过滤初始"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void destroy() { System.out.print("过滤销毁"); }
{ "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
Create a statistic record set
private Messages.StatisticSetRecord serializeMetricData( final PeriodicData periodicData, final String metricName, final Collection<AggregatedData> data) { final Messages.StatisticSetRecord.Builder builder = Messages.StatisticSetRecord.newBuilder() .setMetric(metricName) .setPeriod(periodicData.getPeriod().toString()) .setPeriodStart(periodicData.getStart().toString()) .putAllDimensions(periodicData.getDimensions().getParameters()) .setCluster(periodicData.getDimensions().getCluster()) .setService(periodicData.getDimensions().getService()); for (final AggregatedData datum : data) { if (Objects.equals(EXPRESSION_STATISTIC, datum.getStatistic())) { continue; } final String unit; if (datum.getValue().getUnit().isPresent()) { // TODO(ville): The protocol needs to support compound units. unit = datum.getValue().getUnit().get().toString(); } else { unit = ""; } final Messages.StatisticRecord.Builder entryBuilder = builder.addStatisticsBuilder() .setStatistic(datum.getStatistic().getName()) .setValue(datum.getValue().getValue()) .setUnit(unit) .setUserSpecified(datum.isSpecified()); final ByteString supportingData = serializeSupportingData(datum); if (supportingData != null) { entryBuilder.setSupportingData(supportingData); } entryBuilder.build(); } return builder.build(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public Class<StatsSetRecord> getRecordType() {\n return StatsSetRecord.class;\n }", "SummaryRecordType createSummaryRecordType();", "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}", "public void createAnswerStatistics(int sid,int qid);", "int insert(HostSummaryByStatementType record);", "@Override\n public Class<StatsRecord> getRecordType() {\n return StatsRecord.class;\n }", "public Statistics() {}", "private RecordSet getRecordSet(String arg[]){\n RecordSet datos = new RecordSet();\n datos.addColumn(\"CODIGO\");\n\t\tdatos.addColumn(\"VALOR\"); \n\n for(int j=0;j<arg.length;j++) { \n datos.addRow(new Object[] { arg[j], arg[j] }); \n }\n return datos;\n }", "public DescriptiveStatistics generateStatistics() {\n\t\tdouble[] sentimentValues = new double[this.sentimentValues.size()];\n\t\t\n\t\t//Casts each value in the sentimentValues array list to a double for processing with StatUtils package.\n\t\tfor (int i = 0; i < sentimentValues.length; i++) {\n\t\t\tsentimentValues[i] = (double) this.sentimentValues.get(i);\n\t\t}\n\t\t\n\t\tthis.statistics = new DescriptiveStatistics(sentimentValues);\n\t\treturn this.statistics;\n\t}", "public void testStatistics(){\n Profile profile = new Profile(\"id1\");\n GeoLocation uni_loc = new GeoLocation(0.0, 0.0);\n ArrayList<Trial> trials = new ArrayList<>();\n\n for (int i=1; i<101; i++){\n TrialIntCount trial = new TrialIntCount(\"\"+i, uni_loc, profile, 0);\n if (i<40 && i%2==0){\n trial.setCount(i);\n\n trials.add(trial);\n } else if (i>= 40 && i<80 && i%3==0){\n trial.setCount(i);\n\n trials.add(trial);\n } else if ( i >= 80 && i%5==0) {\n trial.setCount(i);\n TrialIntCount trial2 = new TrialIntCount(\"1\"+i, uni_loc, profile, 0);\n trial2.setCount(i);\n\n trials.add(trial);\n trials.add(trial2);\n }\n }\n\n this.exp = new Experiment(\"foo\");\n this.exp.addTrials(trials);\n\n assertEquals(\"removeDupes does not work\", 37, this.exp.removeDupes().length);\n assertEquals(\"frequencies does not work\", 15, exp.frequencies().length);\n assertEquals(\"median does not work\", \"46.5\", exp.getMedian());\n assertEquals(\"Q1 does not work\", \"23.00\", exp.getQ1());\n assertEquals(\"Q3 does not work\", \"76.50\", exp.getQ3());\n assertEquals(\"std does not work\", \"30.39\", exp.getStd());\n assertEquals(\"mean does not work\", \"49.05\", exp.getMean());\n\n }", "public DataSet(){\r\n\t\tdocs = Lists.newArrayList();\r\n//\t\t_docs = Lists.newArrayList();\r\n\t\t\r\n\t\tnewId2trnId = HashBiMap.create();\r\n\t\t\r\n\t\tM = 0;\r\n\t\tV = 0;\r\n\t}", "private void newGroup()\n\t{\n\t\t// There is no need anymore to take care of the meta-data.\n\t\t// That is done once in DenormaliserMeta.getFields()\n\t\t//\n data.targetResult = new Object[meta.getDenormaliserTargetFields().length];\n \n for (int i=0;i<meta.getDenormaliserTargetFields().length;i++)\n {\n data.targetResult[i] = null;\n\n data.counters[i]=0L; // set to 0\n data.sum[i]=null;\n }\n\t}", "public void setDatasets(VerifiedSNP snp, String phenotype) {\r\n int overallMaxN = 0;\r\n double overallMaxSEM = 0;\r\n double overallMinSEM = -1;\r\n double overallMaxPercentile = 0;\r\n double overallMinPercentile = -1;\r\n double overallMaxMedian = 0;\r\n double overallMinMedian = -1;\r\n\r\n JsonObject snpDataObject = snp.getDataBaseEntry().getDataObject();\r\n \r\n //System.out.println(\"snpDataObject: \" + snpDataObject.toJson());\r\n \r\n Map <String, JsonObject> dataObjects = new HashMap();\r\n \r\n for (String sex : new String[] {\"female\", \"male\"}) {\r\n dataObject = Json.createObject();\r\n dataObjects.put(sex, dataObject);\r\n \r\n dataObject.put(\"sex\", sex);\r\n dataObject.put(\"SNP ID\", snp.getDataBaseEntry().getAnnotation().get(\"Id\"));\r\n dataObject.put(\"phenotype\", phenotype);\r\n \r\n for (String genotype : new String[] {\"AA\", \"AB\", \"BB\"}) { \r\n //System.out.println(\"phenotype: \" + phenotype);\r\n //System.out.println(\"phenotype: \" + phenotype + \", object: \" + snpDataObject.getObject(phenotype).getObject(sex));\r\n JsonObject genotypeObject = snpDataObject.getObject(phenotype).getObject(sex).getObject(genotype);\r\n //System.out.println(\"genotypeObject: \" + genotypeObject.toJson());\r\n if (snpDataObject.getObject(phenotype).getBoolean(\"longitudinal\")) {\r\n List <String> nData = converter.jsonArrayToList(genotypeObject.get(\"N\"));\r\n String nMin = converter.minInteger(nData);\r\n String nMax = converter.maxInteger(nData);\r\n \r\n if (genotypeObject.hasKey(\"median\")) {\r\n List <String> medianData = converter.jsonArrayToList(genotypeObject.get(\"median\"));\r\n double medianMax = Double.parseDouble(converter.maxDouble(medianData)); \r\n if (medianMax > overallMaxMedian) {\r\n overallMaxMedian = medianMax;\r\n }\r\n double medianMin = Double.parseDouble(converter.minDouble(medianData));\r\n if (medianMin < overallMinMedian || overallMinMedian < 0) {\r\n overallMinMedian = medianMin;\r\n } \r\n }\r\n \r\n if (genotypeObject.hasKey(\"upper SEM\")) {\r\n List <String> upperSEMData = converter.jsonArrayToList(genotypeObject.get(\"upper SEM\"));\r\n double semMax = Double.parseDouble(converter.maxDouble(upperSEMData));\r\n if (semMax > overallMaxSEM) {\r\n overallMaxSEM = semMax;\r\n } \r\n }\r\n if (genotypeObject.hasKey(\"lower SEM\")) {\r\n List <String> lowerSEMData = converter.jsonArrayToList(genotypeObject.get(\"lower SEM\"));\r\n double semMin = Double.parseDouble(converter.minDouble(lowerSEMData));\r\n if (semMin < overallMinSEM || overallMinSEM < 0) {\r\n overallMinSEM = semMin;\r\n }\r\n }\r\n if (genotypeObject.hasKey(\"97.5%\")) {\r\n List <String> upperPercentileData = converter.jsonArrayToList(genotypeObject.get(\"97.5%\"));\r\n double percentileMax = Double.parseDouble(converter.maxDouble(upperPercentileData));\r\n if (percentileMax > overallMaxPercentile) {\r\n overallMaxPercentile = percentileMax;\r\n }\r\n }\r\n if (genotypeObject.hasKey(\"2.5%\")) {\r\n List <String> lowerPercentileData = converter.jsonArrayToList(genotypeObject.get(\"2.5%\"));\r\n double percentileMin = Double.parseDouble(converter.minDouble(lowerPercentileData));\r\n if (percentileMin < overallMinPercentile || overallMinPercentile < 0) {\r\n overallMinPercentile = percentileMin;\r\n }\r\n }\r\n\r\n\r\n String info = \"\";\r\n\r\n if (!nMax.equals(\"<5\")) {\r\n int currMax = Integer.parseInt(nMax);\r\n if (currMax > overallMaxN) {\r\n overallMaxN = currMax; \r\n } \r\n } \r\n String separator = \"\";\r\n if (nMin.equals(\"0\") && nMax.equals(\"0\")) {\r\n info = \"(no individuals)\";\r\n separator = \" \";\r\n }\r\n else if (nMin.equals(\"<5\") && nMax.equals(\"<5\")) {\r\n info = \"(less than 5 individuals)\";\r\n separator = \" \";\r\n }\r\n else {\r\n info = \"n ∈ [\" + nMin + \", \" + nMax + \"]\";\r\n separator = \", \";\r\n }\r\n jsonHelper.put(genotypeObject, \"labels\", Arrays.asList(new String[] {genotype + separator + info}));\r\n }\r\n dataObject.put(genotype, genotypeObject); \r\n \r\n }\r\n \r\n JsonObject numberObject = Json.createObject();\r\n for (String genotype : new String[] {\"AA\", \"AB\", \"BB\"}) {\r\n numberObject.put(genotype, dataObject.getObject(genotype).getArray(\"N\"));\r\n }\r\n //numberPlot.sendData(numberObject);\r\n }\r\n \r\n // when SEM or percentile data is missing, medians might provide the extreme values\r\n if (overallMinSEM > overallMinMedian) {\r\n overallMinSEM = overallMinMedian;\r\n }\r\n if (overallMinPercentile > overallMinMedian) {\r\n overallMinPercentile = overallMinMedian;\r\n }\r\n if (overallMaxSEM < overallMaxMedian) {\r\n overallMaxSEM = overallMaxMedian;\r\n }\r\n if (overallMaxPercentile < overallMaxMedian) {\r\n overallMaxPercentile = overallMaxMedian;\r\n }\r\n \r\n //System.out.println(\"dataObjects: \" + dataObjects);\r\n \r\n // enter extreme values and send\r\n for (String sex : new String[] {\"female\", \"male\"}) {\r\n dataObjects.get(sex).put(\"SEM min\", overallMinSEM);\r\n dataObjects.get(sex).put(\"SEM max\", overallMaxSEM);\r\n dataObjects.get(sex).put(\"percentile max\", overallMaxPercentile);\r\n dataObjects.get(sex).put(\"percentile min\", overallMinPercentile);\r\n dataObjects.get(sex).put(\"n max\", overallMaxN);\r\n }\r\n femaleChart.sendData(dataObjects.get(\"female\"));\r\n maleChart.sendData(dataObjects.get(\"male\"));\r\n plotDataWindow.setTab(\"1\", dataObjects.get(\"female\").toJson(), \"female\");\r\n plotDataWindow.setTab(\"2\", dataObjects.get(\"male\").toJson(), \"male\"); \r\n }", "private DataSet constantDataSet(){\n DataSet dataSet = new DataSet();\n Task[] tasks = new Task[NUM_DISTINCT_TASKS];\n //generate taks with all 50 mills\n for(int i=0; i < NUM_DISTINCT_TASKS; i++){\n UUID uuid = UUID.randomUUID();\n tasks[i] = new Task(TARGET_MEAN, uuid);\n }\n for(int i=0; i < NUM_TASKS; i++){\n dataSet.getTasks().add(tasks[random.nextInt(NUM_DISTINCT_TASKS)]);\n }\n return dataSet;\n }", "public StatsSet() {\n this(DSL.name(\"stats_set\"), null);\n }", "public SmallStatistic() {\n\n }", "public static DataSample generateDataSampleFromProfilerRecords(String domain, Tolerance tolerance, List<ProfilerRecord> records) throws DataAccessException {\n\t\tSampleProfiler sampleProfiler = new SampleProfiler(tolerance);\n\t\trecords.forEach(record->sampleProfiler.accumulate(record));\n\t\tDataSample bean = sampleProfiler.finish();\n\t\tInterpretationEngineFacade.interpretInline(bean, domain, null);\n\t\tSampleSecondPassProfiler secondPassProfiler = new SampleSecondPassProfiler(bean);\n\t\trecords.forEach(record->secondPassProfiler.accumulate(record));\n\t\tDataSample sample = secondPassProfiler.finish();\n\t\tsample.setDsName(UUID.randomUUID().toString());\n\t\tsample.setDsGuid(sample.getDsName());\n\t\tsample.setDsLastUpdate(Timestamp.from(Instant.now()));\n\t\treturn sample;\n\t}", "int insertSelective(CostAccountingStatisticByLineDetail record);", "public ColumnStatisticsExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "void statistics();", "int insertSelective(EventsWaitsSummaryByInstance record);", "int insert(EventsWaitsSummaryByInstance record);", "private void statsTable() {\n try (Connection connection = hikari.getConnection()) {\n try (PreparedStatement statement = connection.prepareStatement(\"CREATE TABLE IF NOT EXISTS `\" + TABLE_STATS + \"` \" +\n \"(id INT NOT NULL AUTO_INCREMENT UNIQUE, \" +\n \"uuid varchar(255) PRIMARY KEY, \" +\n \"name varchar(255), \" +\n \"kitSelected varchar(255), \" +\n \"points INT, \" +\n \"kills INT, \" +\n \"deaths INT, \" +\n \"killstreaks INT, \" +\n \"currentKillStreak INT, \" +\n \"inGame BOOLEAN)\")) {\n statement.execute();\n statement.close();\n connection.close();\n }\n } catch (SQLException e) {\n LogHandler.getHandler().logException(\"TableCreator:statsTable\", e);\n }\n }", "Records_type createRecordsFor(SearchTask st,\n int[] preferredRecordSyntax,\n int start,\n int count, String recordFormatSetname)\n {\n Records_type retval = new Records_type();\n \n LOGGER.finer(\"createRecordsFor(st, \"+start+\",\"+count+\")\");\n LOGGER.finer(\"pref rec syn = \" + preferredRecordSyntax);\n LOGGER.finer(\"record setname = \" + recordFormatSetname);\n LOGGER.finer(\"search task = \" + st);\n \n // Try and do a normal present\n try\n {\n \tif ( start < 1 ) \n \t throw new PresentException(\"Start record must be > 0\",\"13\");\n \tint numRecs = st.getTaskResultSet().getFragmentCount();\n \t\n \tLOGGER.finer(\"numresults = \" + numRecs);\n \tint requestedNum = start + count - 1;\n \tif ( requestedNum > numRecs ) {\n \t count = numRecs - (start - 1);\n \t if (start + count -1 > numRecs) {\n \t\tLOGGER.finer(requestedNum + \" < \" + numRecs);\n \t\tthrow new PresentException\n \t\t (\"Start+Count-1 (\" +requestedNum + \") must be < the \" + \n \t\t \" number of items in the result set: \" +numRecs ,\"13\");\n \t }\n \t}\n \t\n \t\n \tif ( st == null )\n \t throw new PresentException(\"Unable to locate result set\",\"30\");\n \t\n \tVector v = new Vector();\n \tretval.which = Records_type.responserecords_CID;\n \tretval.o = v;\n \t\n \tOIDRegisterEntry requested_syntax = null;\n \tString requested_syntax_name = null;\n \tif ( preferredRecordSyntax != null ) {\n \t requested_syntax = reg.lookupByOID(preferredRecordSyntax);\n \t if(requested_syntax==null) { // unsupported record syntax\n \t\tStringBuffer oid=new StringBuffer();\n \t\tfor(int i=0; i<preferredRecordSyntax.length; i++) {\n \t\t if(i!=0)\n \t\t\toid.append('.');\n \t\t oid.append(preferredRecordSyntax[i]);\n \t\t}\n \t\tLOGGER.warning(\"Unsupported preferredRecordSyntax=\"\n \t\t\t +oid.toString());\n \t\t\n \t\t// Need to set up diagnostic in here\n \t\tretval.which = Records_type.nonsurrogatediagnostic_CID;\n \t\tDefaultDiagFormat_type default_diag = \n \t\t new DefaultDiagFormat_type();\n \t\tretval.o = default_diag;\n \t\t\n \t\tdefault_diag.diagnosticSetId = reg.oidByName(\"diag-1\");\n \t\tdefault_diag.condition = BigInteger.valueOf(239);\n \t\tdefault_diag.addinfo = new addinfo_inline14_type();\n \t\tdefault_diag.addinfo.which = \n \t\t addinfo_inline14_type.v2addinfo_CID;\n \t\tdefault_diag.addinfo.o = (Object)(oid.toString());\n \t\treturn retval;\n \t }\n \t LOGGER.finer(\"requested_syntax=\"+requested_syntax);\n \t requested_syntax_name = requested_syntax.getName();\n\t if(requested_syntax_name.equals(\"usmarc\")) {\n\t\t//HACK! USMARC not yet supported...\n\t\trequested_syntax_name = \"sutrs\";\n\t }\n \t LOGGER.finer(\"requested_syntax_name=\"+requested_syntax_name);\n \t}\n \telse\n {\n\t requested_syntax_name = \"sutrs\"; //REVISIT: should this be\n \t //default? We're sure to have it...\n \t requested_syntax = reg.lookupByName(requested_syntax_name);\n }\n \t\n \tst.setRequestedSyntax(requested_syntax);\n \tst.setRequestedSyntaxName(requested_syntax_name);\n \t\t\n \tInformationFragment[] raw_records;\n \tRecordFormatSpecification rfSpec = \n \t new RecordFormatSpecification\n \t\t(requested_syntax_name, null, recordFormatSetname);\n \tLOGGER.finer(\"calling getFragment(\"+(start)+\",\"+count+\")\");\n \traw_records = st.getTaskResultSet().getFragment(start, count, rfSpec);\n \t\n \tif ( raw_records == null )\n \t throw new PresentException(\"Error retrieving records\",\"30\");\n \n \tfor ( int i=0; i<raw_records.length; i++ ) {\n \t\tLOGGER.finer(\"Adding record \"+i+\" to result\");\n \t\t\n \t\tNamePlusRecord_type npr = new NamePlusRecord_type();\n \t\tnpr.name = raw_records[i].getSourceCollectionName();\n \t\tnpr.record = new record_inline13_type();\n \t\tnpr.record.which = record_inline13_type.retrievalrecord_CID;\n \t\tEXTERNAL_type rec = new EXTERNAL_type();\n \t\tnpr.record.o = rec;\n \t\t\n \t\tif ( requested_syntax_name.equals(Z3950Constants.RECSYN_HTML) \n \t\t || requested_syntax_name.equals(\"sgml\")) {\n \t\t LOGGER.finer(\"Returning OctetAligned record for \"\n \t\t\t\t +requested_syntax_name);\n rec.direct_reference = \n \t\t\treg.oidByName(requested_syntax_name);\n \t\t rec.encoding = new encoding_inline0_type();\n \t\t rec.encoding.which = \n \t\t\tencoding_inline0_type.octet_aligned_CID;\n \t\t String raw_string = (String)raw_records[i].getOriginalObject();\n \t\t rec.encoding.o = raw_string.getBytes(); \n \t\t if(raw_string.length()==0) {\n \t\t\t\n \t\t\t// can't make a html record\n \t\t\tretval.which = Records_type.nonsurrogatediagnostic_CID;\n \t\t\tDefaultDiagFormat_type default_diag =\n \t\t\t new DefaultDiagFormat_type();\n \t\t\tretval.o = default_diag;\n \t\t\t\n \t\t\tdefault_diag.diagnosticSetId = reg.oidByName(\"diag-1\");\n \t\t\tdefault_diag.condition = BigInteger.valueOf(227);\n \t\t\tdefault_diag.addinfo = new addinfo_inline14_type();\n \t\t\tdefault_diag.addinfo.which = \n \t\t\t addinfo_inline14_type.v2addinfo_CID;\n \t\t\tdefault_diag.addinfo.o = \n \t\t\t (Object)\"1.2.840.10003.5.109.3\";\n \t\t\treturn retval;\n \t\t\t\n \t\t }\n \t\t}\n \t\telse if ( requested_syntax_name.equals\n \t\t\t (Z3950Constants.RECSYN_XML) ) {\n \t\n \t\t // Since XML is our canonical internal schema, \n \t\t //all realisations of InformationFragment\n \t\t // are capable of providing an XML representation of \n \t\t //themselves, so just use the\n \t\t // Fragments getDocument method.\n \t\t LOGGER.finer(\"Returning OctetAligned XML\");\n \t\t java.io.StringWriter sw = new java.io.StringWriter();\n \t\t \n \t\t try\n \t\t\t{\n \t\t\t OutputFormat format = \n \t\t\t\tnew OutputFormat\n \t\t\t\t (raw_records[i].getDocument() );\n \t\t\t XMLSerializer serial = \n \t\t\t\tnew XMLSerializer( sw, format );\n \t\t\t serial.asDOMSerializer();\n \t\t\t serial.serialize( raw_records[i].getDocument().\n \t\t\t\t\t getDocumentElement() );\n \t\t\t}\n \t\t catch ( Exception e )\n \t\t\t{\n \t\t\t LOGGER.severe(\"Problem serializing dom tree to\" + \n \t\t\t\t\t \" result record\" + e.getMessage());\n \t\t\t}\n \t\t \n \t\t rec.direct_reference = \n \t\t\treg.oidByName(requested_syntax_name);\n \t\t rec.encoding = new encoding_inline0_type();\n \t\t rec.encoding.which = \n \t\t\tencoding_inline0_type.octet_aligned_CID;\n \t\t rec.encoding.o = sw.toString().getBytes(); \t \n\t\t} else {//if ( requested_syntax_name.equals\n\t\t // (Z3950Constants.RECSYN_SUTRS)){\n \t\t rec.direct_reference = \n \t\t\treg.oidByName(requested_syntax_name);\n \t\t rec.encoding = new encoding_inline0_type();\n \t\t rec.encoding.which = \n \t\t\tencoding_inline0_type.single_asn1_type_CID;\n \t\t rec.encoding.o = \n \t\t\t((String)(raw_records[i].getOriginalObject()));\n \t\t}\n \t\tv.add(npr);\n \t\t\n \t}\n }\n catch ( PresentException pe ) {\n \tLOGGER.warning(\"Processing present exception: \"+pe.toString());\n \t\n // Need to set up diagnostic in here\n \tretval.which = Records_type.nonsurrogatediagnostic_CID;\n DefaultDiagFormat_type default_diag = new DefaultDiagFormat_type();\n retval.o = default_diag;\n \n default_diag.diagnosticSetId = reg.oidByName(\"diag-1\");\n \n if ( pe.additional != null )\n \t default_diag.condition = \n \t BigInteger.valueOf( Long.parseLong(pe.additional.toString()) );\n else\n default_diag.condition = BigInteger.valueOf(0);\n \n default_diag.addinfo = new addinfo_inline14_type();\n default_diag.addinfo.which = addinfo_inline14_type.v2addinfo_CID;\n default_diag.addinfo.o = (Object)(pe.toString());\n } \n \n LOGGER.finer(\"retval = \" + retval);\n return retval;\n }", "public StatisticData(String statisticKey) {\n this.statisticKey = statisticKey;\n }", "@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\r\n\tpublic Data(String table) throws EmptyDatasetException, SQLException, EmptySetException, NoValueException{\r\n\t\tTableData tableData = new TableData(new DbAccess());\r\n\t\tdata = tableData.getDistinctTransazioni(table);\r\n\t\t\r\n\t\tTableSchema tableSchema = new TableSchema(new DbAccess(),table);\r\n\t\tnumberOfExamples=data.size();\r\n\t\t\r\n\t\tQUERY_TYPE min,max;\r\n\t\tmin = QUERY_TYPE.MIN;\r\n\t\tmax = QUERY_TYPE.MAX;\r\n\t\t\r\n\t\tfor (int i=0;i<tableSchema.getNumberOfAttributes();i++) {\r\n\t\t\tif(!tableSchema.getColumn(i).isNumber()) {\r\n\t\t\t\texplanatorySet.add((T) new DiscreteAttribute(tableSchema.getColumn(i).getColumnName(),i,(TreeSet)tableData.getDistinctColumnValues(table, tableSchema.getColumn(i))));\r\n\t\t\t}else {\r\n\t\t\t\texplanatorySet.add((T) new ContinuousAttribute(tableSchema.getColumn(i).getColumnName(),i,(float)tableData.getAggregateColumnValue(table,tableSchema.getColumn(i),min),(float)tableData.getAggregateColumnValue(table,tableSchema.getColumn(i),max)));\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t}\r\n\t}", "public UnivariateStatsData() {\n super();\n }", "int insert(VarRatio record);", "public MetricSchemaRecord() { }", "private DefaultCategoryDataset createDataset() {\n\t\t\n\t\tdataset.clear();\n\t\t\n\t\t// Query HIM to submit data for bar chart display \n\t\tHistoricalInfoMgr.getChartDataset(expNum);\n\n\n\t\treturn dataset; // add the data point (y-value, variable, x-value)\n\t}", "public void setMeasurementArray(){\n\t\tnResults = rt.size();\n\t\tData = new double[4][nResults];\n\t\tfor(int i =1; i<nResults; i++) {\n\t\t\tData[0][i]=i;\n\t\t\tData[1][i]=rt.getValueAsDouble(rt.getColumnIndex(\"Mean\"),i); \n\t\t\tData[2][i]=rt.getValueAsDouble(rt.getColumnIndex(\"StdDev\"),i);\n\t\t\tData[3][i]=rt.getValueAsDouble(rt.getColumnIndex(\"Max\"),i)-rt.getValueAsDouble(rt.getColumnIndex(\"Min\"),i);\n\t\t}\n\t\treturn;\n\t}", "private void createGlobalStatsTable(int threshold) \r\n\t{\r\n\t\tTableData statsTable = new TableData(9);\r\n\r\n\t\tMap<Integer,IGlobalStats> globalStatsMap = model.getGlobalStats();\r\n\r\n\t\tfor (int key:globalStatsMap.keySet()) \r\n\t\t{\r\n\t\t\t// La global de todos los nodos tiene que heredar de SimpleGlobalStats para que se muestre\r\n\t\t\tIGlobalStats aux = globalStatsMap.get(key);\r\n\r\n\t\t\tif (!(aux instanceof SimpleGlobalStats)) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tSimpleGlobalStats stats = (SimpleGlobalStats)aux;\r\n\r\n\t\t\tString obj = stats.getName(model.getMethodNames());\r\n\t\t\tif (obj==null) {\r\n\t\t\t\tint h=1;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tString nodeName = Names.getDigestedName(stats.getName(model.getMethodNames()), true);\r\n\t\t\tString nodeType = stats.getTypeName();\r\n\r\n\t\t\tfloat referenceTime = stats.getAvgTotTime();\r\n\r\n\t\t\tif (referenceTime>=threshold) {\r\n\t\t\t\t// \"Name\", \"Type\", \"Count\", \"Avg. Total Time\", \"Min. Total Time\", \"Max. Total Time\", \"Avg. Ex. Time\", \"Min. Ex. Time\", \"Max. Ex. Time\" \r\n\t\t\t\tDecimalFormat dec = new DecimalFormat();\r\n\t\t\t\tdec.setMinimumFractionDigits(2);\r\n\t\t\t\tdec.setMaximumFractionDigits(2);\r\n\r\n\t\t\t\tstatsTable.addRow(stats.getId(), nodeName, nodeType, stats.getInvCount(),stats.getAvgTotTime(), stats.getMinTotTime(), stats.getMaxTotTime(), stats.getAvgExTime(),stats.getMinExTime(), stats.getMaxExTime());\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tresultsTabbedPanel.setStatisticsData(statsTable);\r\n\t}", "int insert(ac_teacher_instrument record);", "int insert(XPsDigest95thPercentileByAvgUs record);", "int insert(UvStatDay record);", "public void record() {\n stats.record();\n }", "int insert(CustomReport record);", "private Dataset createDataSet(RecordingObject recordingObject, Group parentObject, String name) throws Exception\n\t{\n\t\t// dimension of dataset, length of array and 1 column\n\t\tlong[] dims2D = { recordingObject.getYValuesLength(), recordingObject.getXValuesLength() };\n\n\t\t// H5Datatype type = new H5Dataype(CLASS_FLOAT, 8, NATIVE, -1);\n\t\tDatatype dataType = recordingsH5File.createDatatype(recordingObject.getDataType(), recordingObject.getDataBytes(), Datatype.NATIVE, -1);\n\t\t// create 1D 32-bit float dataset\n\t\tDataset dataset = recordingsH5File.createScalarDS(name, parentObject, dataType, dims2D, null, null, 0, recordingObject.getValues());\n\n\t\t// add attributes for unit and metatype\n\t\tcreateAttributes(recordingObject.getMetaType().toString(), recordingObject.getUnit(), dataset);\n\n\t\treturn dataset;\n\t}", "private <T extends BaseRecord> T createRecord(\n String data, Stat stat, Class<T> clazz) throws IOException {\n T record = newRecord(data, clazz, false);\n record.setDateCreated(stat.getCtime());\n record.setDateModified(stat.getMtime());\n return record;\n }", "public Record() {\n this.symptoms = new LinkedHashSet<>();\n this.diagnoses = new LinkedHashSet<>();\n this.prescriptions = new LinkedHashSet<>();\n }", "public RecordSet loadAllProcessingDetail(Record inputRecord);", "public Map<Integer, Long> executeSQL10() {\n Map<Integer, Long> result = records.stream().filter(x -> x.getCustoms().equals(\"y\") && x.getExtendedSecurityCheck().equals(\"y\"))\n .collect(Collectors.groupingBy(Record::getSorter, Collectors.counting()));\n System.out.println(\"SQL 10: \" + result.toString());\n return result;\n\n }", "public TestSmallBenchmarkObjectRecord() {\n\t\tsuper(org.sfm.jooq.beans.tables.TestSmallBenchmarkObject.TEST_SMALL_BENCHMARK_OBJECT);\n\t}", "private void createTestDataSet() throws Exception {\n LOG.info(\"creating test data set...\"); \n Database db = null;\n try {\n db = this._category.getDatabase();\n db.begin();\n\n LazyEmployee person = new LazyEmployee();\n person.setFirstName(\"First\");\n person.setLastName(\"Person\");\n person.setBirthday(JDO_ORIGINAL_DATE);\n person.setStartDate(JDO_ORIGINAL_DATE);\n\n LazyAddress address1 = new LazyAddress();\n address1.setId(1);\n address1.setStreet(Integer.toString(1) + JDO_ORIGINAL_STRING);\n address1.setCity(\"First City\");\n address1.setState(\"AB\");\n address1.setZip(\"10000\");\n address1.setPerson(person);\n\n LazyAddress address2 = new LazyAddress();\n address2.setId(2);\n address2.setStreet(Integer.toString(2) + JDO_ORIGINAL_STRING);\n address2.setCity(\"Second City\");\n address2.setState(\"BC\");\n address2.setZip(\"22222\");\n address2.setPerson(person);\n\n LazyAddress address3 = new LazyAddress();\n address3.setId(3);\n address3.setStreet(Integer.toString(3) + JDO_ORIGINAL_STRING);\n address3.setCity(\"Third Ave\");\n address3.setState(\"AB\");\n address3.setZip(\"30003\");\n address3.setPerson(person);\n\n ArrayList addresslist = new ArrayList();\n addresslist.add(address1);\n addresslist.add(address2);\n addresslist.add(address3);\n\n person.setAddress(addresslist);\n\n LazyPayRoll pr1 = new LazyPayRoll();\n pr1.setId(1);\n pr1.setHoliday(15);\n pr1.setHourlyRate(25);\n pr1.setEmployee(person);\n person.setPayRoll(pr1);\n\n LazyContractCategory cc = new LazyContractCategory();\n cc.setId(101);\n cc.setName(\"Full-time slave\");\n db.create(cc);\n\n LazyContractCategory cc2 = new LazyContractCategory();\n cc2.setId(102);\n cc2.setName(\"Full-time employee\");\n db.create(cc2);\n \n ArrayList category = new ArrayList();\n category.add(cc);\n category.add(cc2);\n\n LazyContract con = new LazyContract();\n con.setPolicyNo(1001);\n con.setComment(\"80 hours a week, no pay hoilday, \"\n + \"no sick leave, arrive office at 7:30am everyday\");\n con.setContractNo(78);\n con.setEmployee(person);\n con.setCategory(category);\n person.setContract(con);\n \n db.create(person);\n \n db.commit();\n db.close();\n } catch (Exception e) {\n LOG.error(\"createTestDataSet: exception caught\", e);\n throw e;\n }\n }", "int insertSelective(XPsDigest95thPercentileByAvgUs record);", "@Override\n public TestingSet createTestingSet(int individuals) \n {\n return TestingSet.createSingleTrialForAllIndividuals(individuals);\n }", "int insert(Collect record);", "void enableSampledStatistics();", "private DataSet normalDataSet(){\n //create normal distribution with mean .05 and sd .05/3 so that 99.7% of events are < .1\n NormalDistribution normalDistribution = new NormalDistribution(TARGET_MEAN, TARGET_MEAN/3D);\n DataSet dataSet = new DataSet();\n Task[] tasks = new Task[NUM_DISTINCT_TASKS];\n //generate costs from sampling from normal distribution\n for(int i=0; i < NUM_DISTINCT_TASKS; i++){\n UUID uuid = UUID.randomUUID();\n Long cost = (long) Math.max(1, normalDistribution.sample()); //make sure no 0 cost events\n tasks[i] = new Task(cost, uuid);\n }\n //generate task multiplities from sampling from uniform distribution\n for(int i=0; i < NUM_TASKS; i++){\n dataSet.getTasks().add(tasks[random.nextInt(NUM_DISTINCT_TASKS)]);\n }\n return dataSet;\n }", "private XYDataset createDataset() {\n final XYSeriesCollection dataset = new XYSeriesCollection();\n //dataset.addSeries(totalDemand);\n dataset.addSeries(cerContent);\n //dataset.addSeries(cerDemand);\n dataset.addSeries(comContent);\n //dataset.addSeries(comDemand);\n dataset.addSeries(activation);\n dataset.addSeries(resolutionLevel);\n \n return dataset;\n }", "public java.util.List<Object> generateDataSet(java.util.List<Object> genericProperties);", "RecordSet loadAllRatingLog(PolicyHeader policyHeader, Record inputRecord);", "public StudentRecord() {\n\t\tscores = new ArrayList<>();\n\t\taverages = new double[5];\n\t}", "public OpenERPRecordSet() {\r\n\t\trecords = new Vector<OpenERPRecord>();\r\n\t}", "Report createReport();", "int insert(FinancialManagement record);", "int insert(FileSet record);", "ResponseMetric createResponseMetric();", "void populateReportInformation( Collection<ExpressionExperimentDetailsValueObject> vos );", "private void sampleOfTheGeneratedWindowedAggregate() {\n Iterator<Integer[]> iterator = null;\n\n // builder3\n Integer[] rows = iterator.next();\n\n int prevStart = -1;\n int prevEnd = -1;\n\n for ( int i = 0; i < rows.length; i++ ) {\n // builder4\n Integer row = rows[i];\n\n int start = 0;\n int end = 100;\n if ( start != prevStart || end != prevEnd ) {\n // builder5\n int actualStart = 0;\n if ( start != prevStart || end < prevEnd ) {\n // builder6\n // recompute\n actualStart = start;\n // implementReset\n } else { // must be start == prevStart && end > prevEnd\n actualStart = prevEnd + 1;\n }\n prevStart = start;\n prevEnd = end;\n\n if ( start != -1 ) {\n for ( int j = actualStart; j <= end; j++ ) {\n // builder7\n // implementAdd\n }\n }\n // implementResult\n // list.add(new Xxx(row.deptno, row.empid, sum, count));\n }\n }\n // multiMap.clear(); // allows gc\n // source = Linq4j.asEnumerable(list);\n }", "public static void _generateStatistics() {\n\t\ttry {\n\t\t\t// Setup info\n\t\t\tPrintStream stats = new PrintStream(new File (_statLogFileName + \".txt\"));\n\n\t\t\tScanner scan = new Scanner(new File(_logFileName+\".txt\"));\n\t\t\twhile (scan.hasNext(SETUP.toString())) {\n\t\t\t\t// Append setup info\n\t\t\t\tstats.append(scan.nextLine()+\"\\n\");\n\t\t\t}\n\t\t\tstats.append(\"\\n\");\n\n\t\t\twhile (scan.hasNext(DETAILS.toString()) || scan.hasNext(RUN.toString())) {\n\t\t\t\t// Throw detailed info away\n\t\t\t\tscan.nextLine();\n\t\t\t}\n\n\t\t\twhile (scan.hasNext()) {\n\t\t\t\t// Append post-run info\n\t\t\t\tstats.append(scan.nextLine()+\"\\n\");\n\t\t\t}\n\t\t\tscan.close();\n\t\t\tstats.append(\"\\n\");\n\n\t\t\t// Perf4J info\n\t\t\tReader reader = new FileReader(_logFileName+\".txt\");\n\t\t\tLogParser parser = new LogParser(reader, stats, null, 10800000, true, new GroupedTimingStatisticsTextFormatter());\n\t\t\tparser.parseLog();\n\t\t\tstats.close();\n\t\t}\n\t\tcatch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "void example7() {\n\t\t\n\t\t// allocate the data\n\t\t\n\t\tIndexedDataSource<HighPrecisionMember> data = ListDataSource.construct(G.HP, 1234);\n\t\t\n\t\t// fill the list with values\n\t\t\n\t\tHighPrecisionMember value = G.HP.construct();\n\t\t\n\t\tfor (long i = 0; i < data.size(); i++) {\n\t\t\t\n\t\t\tvalue.setV(BigDecimal.valueOf(i));\n\n\t\t\tdata.set(i, value);\n\t\t}\n\n\t\t// then calculate a result\n\n\t\tHighPrecisionMember result = G.HP.construct();\n\t\t\n\t\tStdDev.compute(G.HP, data, result);\n\t}", "private static CategoryDataset createDataset() throws SQLException, InterruptedException \n\t{ \n\t\t// creating dataset \n\t\tDefaultCategoryDataset dataset = new DefaultCategoryDataset();\n\t\t\n\t\t//setting up the connexion\n\t\tConnection con = null;\n\t\tString conUrl = \"jdbc:sqlserver://\"+Login.Host+\"; databaseName=\"+Login.databaseName+\"; user=\"+Login.user+\"; password=\"+Login.password+\";\";\n\t\ttry \n\t\t{\n\t\t\tcon = DriverManager.getConnection(conUrl);\n\t\t} \n\t\tcatch (SQLException e1) \n\t\t{\n\t\t\te1.printStackTrace();\n\t\t}\n\t\t\n\t\t//this counter will allow me to run my while loop only once\n\t\tint cnt=0;\n\t\twhile(cnt<1)\n\t\t{ \n\t\t\t//check the query number at each call to the function in order to know which procedure must me executed\n\t\t\tif (queryNumber==0){\n\t\t\t\tcnt++;\n\t\t\t\tcstmt = con.prepareCall(\"{call avgMonthly(?,?,?,?)}\");\n\t\t\t\t\n\t\t\t\t//setting the procedures parameters with the one chosen by the user\n\t\t\t\tcstmt.setInt(1, Integer.parseInt(year));\n\t\t\t\tcstmt.setInt(2, Integer.parseInt(month));\n\t\t\t\tcstmt.setString(3, featureStringH);\t\n\t\t\t\tcstmt.setString(4, actionStringH);\t\n\t\t\t\tResultSet aveTempAvg = cstmt.executeQuery();\n\t\t\t\t\n\t\t\t\t// extracting the data of my query in order to plot it\n\t\t\t\tResultSetMetaData rsmd = aveTempAvg.getMetaData();\n\t\t\t\tif(rsmd!=null) \n\t\t\t\t{\n\t\t\t\t\twhile (aveTempAvg.next()) \n\t\t\t\t\t{\n\t\t\t\t\t\tString columnValue = aveTempAvg.getString(1);//latency\n\t\t\t\t\t\tint dayAxisNum=aveTempAvg.getInt(2);//average\n\t\t\t\t\t\tif(columnValue!=null) {\n\t\t\t\t\t\t\t//Adding the result of the query to the data set and setting y value to the average latency and x to the corresponding day\n\t\t\t\t\t\t\tdataset.setValue(Double.parseDouble(columnValue),\"series\",Integer.toString(dayAxisNum));\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\tdataset.setValue(0, (\"series\" +\"\"+0), \"\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\telse if (queryNumber==1){\n\t\t\t\tcnt++;\n\t\t\t\tcstmt = con.prepareCall(\"{call avgDaily(?,?,?)}\");\t\n\t\t\t\t/*for the second query , the user will enter seperate year month and day \n\t\t\t\t so we wil have to concatenate the date into a string before setting the date value*/\n\t\t\t\tString newDate= year+\"-\"+month+\"-\"+day;\n\t\t\t\tcstmt.setString(1, newDate);\n\t\t\t\tcstmt.setString(2, featureStringH);\n\t\t\t\tcstmt.setString(3, actionStringH);\t\n\t\t\t\tResultSet aveTempAvg = cstmt.executeQuery();\n\t\t\t\t\n\t\t\t\t//extracting the data of the query\n\t\t\t\tResultSetMetaData rsmd = aveTempAvg.getMetaData();\n\t\t\t\tif(rsmd!=null) \n\t\t\t\t{\n\t\t\t\t\tint hour = 0;\n\t\t\t\t\twhile (aveTempAvg.next()) \n\t\t\t\t\t{\n\t\t\t\t\t\tString columnValue = aveTempAvg.getString(1);\n\t\t\t\t\t\tint hour2=aveTempAvg.getInt(2);\n\t\t\t\t\t\tif(columnValue!=null) {\n\t\t\t\t\t\t\t//setting y value to the average and the x is the corresponding hour\n\t\t\t\t\t\t\tdataset.setValue(Double.parseDouble(columnValue),\"series\",Integer.toString(hour2));\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\t//I will add 0 if I don't have the corresponding value of the specified Hour\n\t\t\t\t\t\t\tdataset.setValue(0, (\"series\" +\"\"+hour), \"\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (queryNumber==2){\n\t\t\t\tcnt++;\n\t\t\t\t//Thread.sleep(100);\n\t\t\t\tcstmt = con.prepareCall(\"{call avgHour(?,?,?,?)}\");\t\n\t\t\t\tString newDate2= year+\"-\"+month+\"-\"+day;\n\t\t\t\t//same as for the daily query we have to set the parameters , we add to that the hour as last parameter\n\t\t\t\tcstmt.setString(1, newDate2);\n\t\t\t\tcstmt.setString(2, featureStringH);\n\t\t\t\tcstmt.setString(3, actionStringH);\n\t\t\t\tcstmt.setInt(4,Integer.parseInt(hourString));\n\t\t\t\tResultSet aveTempAvg = cstmt.executeQuery();\n\t\t\t\t\n\t\t\t\t//extract the data from the query\n\t\t\t\tResultSetMetaData rsmd = aveTempAvg.getMetaData();\n\t\t\t\tif(rsmd!=null) \n\t\t\t\t{\n\t\t\t\t\twhile (aveTempAvg.next()) \n\t\t\t\t\t{\n\t\t\t\t\t\tString columnValue = aveTempAvg.getString(1);\n\t\t\t\t\t\tint min=aveTempAvg.getInt(2);\n\t\t\t\t\t\tif(columnValue!=null) {\n\t\t\t\t\t\t\t//setting y value to the average and the x is the corresponding minute\n\n\t\t\t\t\t\t\tdataset.setValue(Double.parseDouble(columnValue),\"series\",Integer.toString(min));\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\t//adding 0 if I don't have the corresponding minute\n\t\t\t\t\t\t\tdataset.setValue(0, (\"series\"+min),\"\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\treturn dataset; \n\t}", "int insert(Report record);", "@Override\n\tprotected Hashtable<String, AbsRecord> createHashtableRecordModel(List<AbsRecord> records)\n\t{\n\t\tHashtable<String, AbsRecord> results = null;\n\t\tStringBuilder key = null;\n\t\tGAZRecordDataModel gazRecordDataModel;\n\n\t\tif (!records.isEmpty())\n\t\t{\n\t\t\tresults = new Hashtable<String, AbsRecord>();\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn null;\n\t\t}\n\n\t\tfor (AbsRecord absRecord : records)\n\t\t{\n\t\t\tgazRecordDataModel = (GAZRecordDataModel) absRecord;\n\t\t\t// key=optionId + fieldId + pvId + type;\n\t\t\tkey = new StringBuilder(gazRecordDataModel.getOptionId());\n\t\t\tkey.append(gazRecordDataModel.getFieldId());\n\t\t\tkey.append(gazRecordDataModel.getPvId());\n\t\t\tkey.append(gazRecordDataModel.getType());\n\n\t\t\tresults.put(key.toString(), gazRecordDataModel);\n\t\t}\n\n\t\treturn results;\n\t}", "Set createSet();", "int insertSelective(BpmInstanciaHistorica record);", "MetricModel createMetricModel();", "public OpenERPRecordSet(Object[] readresult) {\r\n\t\trecords = new Vector<OpenERPRecord>();\r\n\t\tif (readresult != null) {\r\n\t\t\tfor (int i = 0; i < readresult.length; i++) {\r\n\t\t\t\trecords.add(new OpenERPRecord(readresult[i]));\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}", "int insert(SeGroup record);", "public void generateImpatedRecords ()\r\n\t{\n\t\tRequest req = table.createRequest();\r\n\t\treq.setXPathFilter(path_to_id.format()+\"='\" + id +\"'\");\r\n\t\tRequestResult res = req.execute();\r\n\t\tshow(\"got results \" + res.getSize() );\r\n\t\tAdaptation ada = res.nextAdaptation();\r\n\t\tshow (\"STARTDATE: \" + startdate + \" ENDDATE: \" + enddate);\r\n\t\tshow(\"________________________________________________\");\r\n\t\twhile (ada!=null)\r\n\t\t{ \r\n\t\t\t\r\n\t\t\tDate adaStartDate = ada.getDate(path_to_start);\r\n\t\t\tDate adaEndDate = ada.getDate(path_to_end);\r\n\t\t\t//check im not me!\r\n\t\t\tif (!(ada.getOccurrencePrimaryKey().format().equals(newRecord.getOccurrencePrimaryKey().format())))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t// the record has been updated but date has not changed\r\n\t\t\t\tif (enddate!=null&&adaEndDate!=null&&(adaStartDate.equals(startdate)&&adaEndDate.equals(enddate)))\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\tshow(\"The Record needs Spliting\");\r\n\t\t\t\t\trecordToSplit = ada;\r\n\t\t\t\t\tnewEndDate = addDays(startdate,-1);\r\n\t\t\t\t\tbeforeRecord = ada;\r\n\t\t\t\t\tnewStartDate = addDays(enddate,+1);\r\n\t\t\t\t\tafterRecord = ada;\r\n\t\t\t\t}\r\n\t\t\t\telse if (enddate!=null&&adaEndDate!=null&&(adaStartDate.before(startdate)&&adaEndDate.after(enddate)))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tshow(\"The Record needs Spliting\");\r\n\t\t\t\t\t\t\trecordToSplit = ada;\r\n\t\t\t\t\t\t\tnewEndDate = addDays(startdate,-1);\r\n\t\t\t\t\t\t\tbeforeRecord = ada;\r\n\t\t\t\t\t\t\tnewStartDate = addDays(enddate,+1);\r\n\t\t\t\t\t\t\tafterRecord = ada;\r\n\t\t\t\t\t\t}\r\n\t\t\t\telse if (adaStartDate == null && adaEndDate == null)\r\n\t\t\t\t{\r\n\t\t\t\t\tshow (\"set end date on existing record\");\r\n\t\t\t\t\tbeforeRecord= ada;\r\n\t\t\t\t\tnewEndDate = addDays (startdate, -1);\r\n\t\t\t\t}\r\n\t\t\t\t\t\telse if (adaStartDate.before(startdate)&& adaEndDate==null)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tshow (\"set end date on existing record\");\r\n\t\t\t\t\t\t\tbeforeRecord= ada;\r\n\t\t\t\t\t\t\tnewEndDate = addDays (startdate, -1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\telse if (adaStartDate.before(startdate) && adaEndDate.after(startdate))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tshow (\"need to move existing end date\");\r\n\t\t\t\t\t\t\tbeforeRecord= ada;\r\n\t\t\t\t\t\t\tnewEndDate = addDays (startdate, -1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse if (enddate!=null&&enddate==null&&adaStartDate.after(enddate))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tshow (\"need to end date new record\");\r\n\t\t\t\t\t\t\tbeforeRecord = newRecord;\r\n\t\t\t\t\t\t\tnewEndDate = addDays(adaStartDate, -1);\r\n\t\t\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\tada = res.nextAdaptation();\r\n\t}\r\n\t\r\n\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "int insert(BpmInstanciaHistorica record);", "public abstract boolean exportStatistics(String statsFileName) throws SQLException;", "static void createDataForGraph() {\n double x = 2;\n String fileName = \"./lab1part2docs/dataRec.csv\";\n createFile(fileName);\n writeToFile(\"k,halfCounter,oneCounter,x=\" + x + \"\\n\", fileName);\n for (int k = 1; k <= 10000; k++) {\n Raise.runBoth(x, k);\n writeToFile(k + \",\" + Raise.recHalfCounter + \",\" + Raise.recOneCounter + '\\n', fileName);\n Raise.recHalfCounter = 0;\n Raise.recOneCounter = 0;\n }\n System.out.println(\"Finished\");\n }", "public void test697153() {\n TaskSeries s1 = new TaskSeries(\"S1\");\n s1.add(new Task(\"Task 1\", new SimpleTimePeriod(new Date(), new Date())));\n s1.add(new Task(\"Task 2\", new SimpleTimePeriod(new Date(), new Date())));\n s1.add(new Task(\"Task 3\", new SimpleTimePeriod(new Date(), new Date())));\n TaskSeries s2 = new TaskSeries(\"S2\");\n s2.add(new Task(\"Task 2\", new SimpleTimePeriod(new Date(), new Date())));\n s2.add(new Task(\"Task 3\", new SimpleTimePeriod(new Date(), new Date())));\n s2.add(new Task(\"Task 4\", new SimpleTimePeriod(new Date(), new Date())));\n TaskSeriesCollection tsc = new TaskSeriesCollection();\n tsc.add(s1);\n tsc.add(s2);\n s1.removeAll();\n int taskCount = tsc.getColumnCount();\n }", "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}", "int insert(SPerms record);", "private void createTestData() {\n for (int i = startKey; i < startKey + numKeys; i++) {\n keys.add(i);\n }\n }", "int insert(BasCounties record);", "int insertSelective(CustomReport record);", "public CodeCoverageStatsRecord() {\n super(CodeCoverageStats.CODE_COVERAGE_STATS);\n }", "int insertSelective(TemperatureMeasureHitchEvent record);", "public void prepareObject(ResultSet rset) {\n try {\r\n int size = 0;\r\n if (rset.getType() == ResultSet.TYPE_SCROLL_INSENSITIVE) {\r\n while (rset.next()) {\r\n size++;\r\n }\r\n }\r\n ResultSetMetaData meta = rset.getMetaData();\r\n int colCount = meta.getColumnCount();\r\n cols = new String[colCount];\r\n columnTypes = new String[colCount];\r\n\r\n //added by uday\r\n columnTypesInt = new Integer[colCount];\r\n //end\r\n\r\n columnSizes = new int[colCount];\r\n grandTotals = new BigDecimal[colCount];\r\n avgTotals = new BigDecimal[colCount];\r\n max = new BigDecimal[colCount];\r\n min = new BigDecimal[colCount];\r\n\r\n columnOverAllMaximums = new TreeMap();\r\n columnOverAllMinimums = new TreeMap();\r\n columnAverages = new TreeMap();\r\n columnGrandTotals = new TreeMap();\r\n rowGrandTotals = new TreeMap();\r\n gtZeroCount = new int[colCount];\r\n columnGrandTotalsZeroCount = new TreeMap();\r\n\r\n for (int i = 0; i < colCount; i++) {\r\n if (rset.getType() == ResultSet.TYPE_SCROLL_INSENSITIVE) {\r\n if (meta.getColumnLabel(i + 1) == null || meta.getColumnName(i + 1) == meta.getColumnLabel(i + 1)) {\r\n hMap.put(meta.getColumnName(i + 1), new ArrayList(size));\r\n } else {\r\n hMap.put(meta.getColumnLabel(i + 1), new ArrayList(size));\r\n }\r\n } else if (meta.getColumnLabel(i + 1) == null || meta.getColumnName(i + 1) == meta.getColumnLabel(i + 1)) {\r\n hMap.put(meta.getColumnName(i + 1), new ArrayList());\r\n } else {\r\n hMap.put(meta.getColumnLabel(i + 1), new ArrayList());\r\n }\r\n\r\n if (meta.getColumnLabel(i + 1) == null || meta.getColumnName(i + 1) == meta.getColumnLabel(i + 1)) {\r\n cols[i] = meta.getColumnName(i + 1);\r\n } else {\r\n cols[i] = meta.getColumnLabel(i + 1);\r\n }\r\n columnTypes[i] = meta.getColumnTypeName(i + 1);\r\n\r\n //added by uday\r\n columnTypesInt[i] = meta.getColumnType(i + 1);\r\n //end\r\n\r\n columnSizes[i] = meta.getColumnDisplaySize(i + 1);\r\n// grandTotals[i] = new BigDecimal(\"0\");\r\n// avgTotals[i] = new BigDecimal(\"0\");\r\n// max[i] = new BigDecimal(\"0\");\r\n// min[i] = new BigDecimal(\"0\");\r\n grandTotals[i] = BigDecimal.ZERO;\r\n avgTotals[i] = BigDecimal.ZERO;\r\n max[i] = BigDecimal.ZERO;\r\n min[i] = BigDecimal.ZERO;\r\n gtZeroCount[i] = 0;\r\n }\r\n BigDecimal bd = new BigDecimal(\"0\");\r\n while (rset.next()) {\r\n\r\n BigDecimal RowGrandTotal = BigDecimal.ZERO;\r\n for (int i = 0; i < colCount; i++) {\r\n// int zerocount=0;\r\n if (meta.getColumnType(i + 1) == Types.BLOB) {\r\n ((ArrayList) (hMap.get(cols[i]))).add(rset.getBlob(cols[i]));\r\n } else if (meta.getColumnType(i + 1) == Types.CLOB) {\r\n ((ArrayList) (hMap.get(cols[i]))).add(rset.getClob(cols[i]));\r\n } else if (meta.getColumnType(i + 1) == Types.DATE) {\r\n ((ArrayList) (hMap.get(cols[i]))).add(rset.getTimestamp(cols[i]));\r\n } else {\r\n Object Obj = rset.getObject(cols[i]);\r\n ((ArrayList) (hMap.get(cols[i]))).add(Obj);\r\n\r\n if (processGT) {\r\n if (meta.getColumnType(i + 1) == Types.BIGINT || meta.getColumnType(i + 1) == Types.DECIMAL || meta.getColumnType(i + 1) == Types.DOUBLE || meta.getColumnType(i + 1) == Types.FLOAT || meta.getColumnType(i + 1) == Types.INTEGER || meta.getColumnType(i + 1) == Types.NUMERIC || meta.getColumnType(i + 1) == Types.REAL || meta.getColumnType(i + 1) == Types.SMALLINT || meta.getColumnType(i + 1) == Types.TINYINT) {\r\n //code to build max,min,acg and grand total of entire record set\r\n BigDecimal bdecimal = null;\r\n if (Obj != null) {\r\n bdecimal = rset.getBigDecimal(cols[i]);\r\n// int p=i;\r\n// String key=\"\";\r\n// int zerocountvalue=0;\r\n//// BigDecimal bd = new BigDecimal(\"0\");\r\n// if( bdecimal==null || bdecimal.compareTo(bd)==0){\r\n// zerocount= zerocount+1;\r\n// for(int s=0;s<cols.length;s++){\r\n// if(p==s)\r\n// key=cols[s];\r\n// }\r\n// if(zerocountmap.containsKey(key))\r\n// zerocountvalue=zerocountmap.get(key);\r\n// int zeroval;\r\n// zeroval = zerocountvalue+zerocount;\r\n// zerocountmap.put( key,zeroval);\r\n//\r\n// }\r\n } else {\r\n bdecimal = BigDecimal.ZERO;\r\n }\r\n if (rowCount == 0) {\r\n grandTotals[i] = bdecimal;\r\n max[i] = bdecimal;\r\n min[i] = bdecimal;\r\n if (bdecimal == null || bdecimal.compareTo(bd) == 0) {\r\n gtZeroCount[i] = gtZeroCount[i] + 1;\r\n }\r\n } else {\r\n grandTotals[i] = grandTotals[i].add(bdecimal);\r\n max[i] = max[i].max(bdecimal);\r\n min[i] = min[i].min(bdecimal);\r\n if (bdecimal == null || bdecimal.compareTo(bd) == 0) {\r\n gtZeroCount[i] = gtZeroCount[i] + 1;\r\n }\r\n }\r\n //code to buiold row wise grand total\r\n if (i == 0) {\r\n RowGrandTotal = bdecimal;\r\n } else {\r\n RowGrandTotal = RowGrandTotal.add(bdecimal);\r\n }\r\n bdecimal = null;\r\n }\r\n }\r\n }\r\n }\r\n if (processGT) {\r\n rowGrandTotals.put(\"RowGrandTotal_\" + rowCount, RowGrandTotal);\r\n }\r\n rowCount++;\r\n }\r\n if (rowCount != 0 && processGT) {\r\n BigDecimal dividend = new BigDecimal(String.valueOf(rowCount));\r\n\r\n for (int colIndex = 0; colIndex < colCount; colIndex++) {\r\n columnOverAllMaximums.put(cols[colIndex], max[colIndex]);\r\n columnOverAllMinimums.put(cols[colIndex], min[colIndex]);\r\n columnGrandTotals.put(cols[colIndex], grandTotals[colIndex]);\r\n avgTotals[colIndex] = grandTotals[colIndex].divide(dividend, MathContext.DECIMAL64);\r\n columnAverages.put(cols[colIndex], avgTotals[colIndex]);\r\n //written by swati purpose of finding no of zeros in gt\r\n columnGrandTotalsZeroCount.put(cols[colIndex], gtZeroCount[colIndex]);\r\n }\r\n dividend = null;\r\n }\r\n this.initializeViewSequence();\r\n\r\n } catch (SQLException ex) {\r\n\r\n logger.error(\"Exception:\", ex);;\r\n }\r\n // long endTime = System.currentTimeMillis();\r\n// \r\n }", "private CellSampler createSampler(EasyMockSupport support)\r\n {\r\n CellSampler sampler = support.createMock(CellSampler.class);\r\n sampler.getBeginningSampleCells();\r\n EasyMock.expectLastCall().andReturn(CsvTestUtils.createBasicData());\r\n\r\n return sampler;\r\n }", "public objData getTestSet(String id){\n objData objdata = new objData();\n try{\n MainClient mc = new MainClient(DBConn.getHost());\n\n String query = \"SELECT TSDB_REFID, TSDB_SET_NAME, TST_REFID FROM TEST_SET_DB WHERE TSDB_REFID = '\" + id + \"'\";\n String data[] = {};\n\n objdata.setTableData(mc.getQuery(query,data));\n }\n catch(Exception e){\n objdata.setErrorMessage(e.toString());\n objdata.setFlag(1);\n }\n return objdata;\n }", "@Test\n public void testGenerateStatistics() {\n Statistics me = new Statistics(0, numFishes, numSharks);\n Statistics prog = dataHandler.generateStatistics();\n //assertEquals(me, prog);\n if (me.getIterationStep() == prog.getIterationStep()\n && me.getFishAmount() == prog.getFishAmount()\n && me.getSharksAmount() == prog.getSharksAmount()) {\n assertTrue(true);\n } else {\n assertTrue(false);\n }\n }", "int insert(PolicyGroup record);", "private Object createDataset(final ChartConfiguration config) {\n final CategoryChart chart = (CategoryChart) config.chart;\n for (final Fields key: config.fields) {\n chart.addSeries(key.getLocalizedName(), new double[1], new double[1]);\n }\n populateDataset(config);\n return null;\n }", "public Statistics() {\n }", "public static CategoryDataset createSampleDataset() {\n \t\n \t// row keys...\n final String series1 = \"Expected\";\n final String series2 = \"Have\";\n final String series3 = \"Goal\";\n\n // column keys...\n final String type1 = \"Type 1\";\n final String type2 = \"Type 2\";\n final String type3 = \"Type 3\";\n final String type4 = \"Type 4\";\n final String type5 = \"Type 5\";\n final String type6 = \"Type 6\";\n final String type7 = \"Type 7\";\n final String type8 = \"Type 8\";\n\n // create the dataset...\n final DefaultCategoryDataset dataset = new DefaultCategoryDataset();\n\n dataset.addValue(1.0, series1, type1);\n dataset.addValue(4.0, series1, type2);\n dataset.addValue(3.0, series1, type3);\n dataset.addValue(5.0, series1, type4);\n dataset.addValue(5.0, series1, type5);\n dataset.addValue(7.0, series1, type6);\n dataset.addValue(7.0, series1, type7);\n dataset.addValue(8.0, series1, type8);\n\n dataset.addValue(5.0, series2, type1);\n dataset.addValue(7.0, series2, type2);\n dataset.addValue(6.0, series2, type3);\n dataset.addValue(8.0, series2, type4);\n dataset.addValue(4.0, series2, type5);\n dataset.addValue(4.0, series2, type6);\n dataset.addValue(2.0, series2, type7);\n dataset.addValue(1.0, series2, type8);\n\n dataset.addValue(4.0, series3, type1);\n dataset.addValue(3.0, series3, type2);\n dataset.addValue(2.0, series3, type3);\n dataset.addValue(3.0, series3, type4);\n dataset.addValue(6.0, series3, type5);\n dataset.addValue(3.0, series3, type6);\n dataset.addValue(4.0, series3, type7);\n dataset.addValue(3.0, series3, type8);\n\n return dataset;\n \n }", "SQLServerResultSetMetaData(SQLServerConnection con, SQLServerResultSet rs) \n {\n traceID = \" SQLServerResultSetMetaData:\" + nextInstanceID();\n this.con = con;\n this.rs =rs;\n assert rs !=null;\n if(logger.isLoggable(java.util.logging.Level.FINE))\n {\n logger.fine(toString() + \" created by (\" + rs.toString() + \")\");\n }\n }", "public void summarizeData() {\n\t\t//take json object and populate a POJO\n\t\t\n//\t\tfor(javaObject : x) {\n\t\t\n\t\t\t//new JobSummaryObject\n\t\t\t//\n\t}", "org.hl7.fhir.SampledData addNewValueSampledData();", "DataList createDataList();", "public Set<RecordReturn> loadRecordReturns();", "int insert(Mallscroerule record);", "public static Statistic collectStatistics(double[] x) {\n Statistic s = new Statistic();\n s.collect(x);\n return (s);\n }", "@Secured({ \"GROUP_AGENT\" })\n Collection<ExpressionExperimentDetailsValueObject> generateSummaryObjects();", "void addRecord(DistRecord record, boolean persistPoints);", "int insert(FundsPackageRatio record);" ]
[ "0.57644683", "0.5632082", "0.5507559", "0.53904694", "0.5310133", "0.53086394", "0.53055227", "0.5300003", "0.5291464", "0.52861166", "0.5281962", "0.52574974", "0.52516663", "0.52017796", "0.51922065", "0.51907676", "0.51770484", "0.51706755", "0.516127", "0.5160636", "0.5151728", "0.51484054", "0.5147822", "0.51398194", "0.5119172", "0.51081204", "0.51042134", "0.51026595", "0.5100433", "0.5098518", "0.5094739", "0.50695306", "0.5068426", "0.506246", "0.5052011", "0.5046532", "0.50450927", "0.50367665", "0.50120884", "0.5006951", "0.500494", "0.49998462", "0.49971795", "0.49965066", "0.49556005", "0.4952105", "0.4938553", "0.49310043", "0.49286908", "0.49272668", "0.49240422", "0.49236137", "0.49226895", "0.49087065", "0.4899123", "0.48970884", "0.4893985", "0.48878127", "0.48823088", "0.48805612", "0.4872958", "0.48702097", "0.4869729", "0.48695284", "0.4865964", "0.4856419", "0.48540664", "0.48509586", "0.48491868", "0.4846258", "0.48427257", "0.48402888", "0.48393887", "0.48380414", "0.48370114", "0.4832749", "0.4828879", "0.482856", "0.48244464", "0.48205146", "0.48200664", "0.48150736", "0.48139238", "0.48115095", "0.480291", "0.48004854", "0.47908872", "0.47741625", "0.47603557", "0.47556207", "0.4748036", "0.47468552", "0.47459173", "0.4738695", "0.47372186", "0.47342825", "0.4725457", "0.4719722", "0.4716805", "0.47103247" ]
0.48824283
58
Using AntRunner leaked memory. It is either kotlinc itself or its ant adapter. Now we fork a new process via a shell script.
public void testTargetDoesRunOutOfMemoryWhenRepeated() throws Exception { if (true) { System.err .println("Not running the slow testTargetDoesNotLeakMemory" + " unless temporarily enabled."); return; } @SuppressWarnings("unused") Source src = Source.underWsroot("src"); int iterationCount = 100; for (int i = 0; i < iterationCount; i++) { wsRootHasFile("src/MinimalJava.java", "class MinimalJava {}"); wsRootHasFile("src/MinimalKotlin.kt", "class MinimalKotlin {}"); Target target = new KotlinAndJavaClasses("classes", KOTLIN, Arrays.asList(src), Arrays.asList(), Arrays.asList()); target.path(ctx); assertTrue(new File(cached, "classes/MinimalJava.class").exists()); assertTrue( new File(cached, "classes/MinimalKotlin.class").exists()); Runtime rt = Runtime.getRuntime(); rt.gc(); long fm = rt.freeMemory(); System.out.println(fm); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n new GoldenCopyCreationTool().invokeAndTerminate(args);\n }", "@Override\n\t\t\t\tpublic void run()\n\t\t\t\t{\n\t\t\t\t\ttry \n\t\t\t\t\t{\n\t\t\t\t\t\tThread.sleep(30000);\n\t\t\t\t\t\tif (buildProcess.isAlive())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tbuildProcess.destroy();\n\t\t\t\t\t\t\tal.add(1);\n\t\t\t\t\t\t}\n\t\t\t\t\t} \n\t\t\t\t\tcatch (InterruptedException e) \n\t\t\t\t\t{\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}", "private int executeAsForked( final CommandlineJava commandline )\n throws TaskException\n {\n // if not set, auto-create the ClassPath from the project\n createClasspath();\n\n // not sure whether this test is needed but cost nothing to put.\n // hope it will be reviewed by anybody competent\n if( m_compileClasspath.toString().length() > 0 )\n {\n createJvmarg( commandline ).setValue( \"-classpath\" );\n createJvmarg( commandline ).setValue( m_compileClasspath.toString() );\n }\n\n if( m_outputFile != null )\n {\n // having a space between the file and its path causes commandline to add quotes \"\n // around the argument thus making JDepend not taking it into account. Thus we split it in two\n commandline.createArgument().setValue( \"-file\" );\n commandline.createArgument().setValue( m_outputFile.getPath() );\n // we have to find a cleaner way to put this output\n }\n\n final String[] elements = FileUtils.parsePath( m_sourcesPath.toString() );\n for( int i = 0; i < elements.length; i++ )\n {\n File f = new File( elements[ i ] );\n\n // not necessary as JDepend would fail, but why loose some time?\n if( !f.exists() || !f.isDirectory() )\n throw new TaskException( \"\\\"\" + f.getPath() + \"\\\" does not represent a valid directory. JDepend would fail.\" );\n commandline.createArgument().setValue( f.getPath() );\n }\n\n final Execute2 exe = new Execute2();\n setupLogger( exe );\n\n exe.setCommandline( commandline.getCommandline() );\n if( m_dir != null )\n {\n exe.setWorkingDirectory( m_dir );\n }\n\n if( m_outputFile != null )\n {\n getLogger().info( \"Output to be stored in \" + m_outputFile.getPath() );\n }\n getLogger().debug( \"Executing: \" + commandline.toString() );\n try\n {\n return exe.execute();\n }\n catch( IOException e )\n {\n throw new TaskException( \"Process fork failed.\", e );\n }\n }", "public void execute()\n throws BuildException\n {\n if (_resinHome == null)\n throw new BuildException(\"resinHome is required by jspc\");\n\n if (_rootDirectory == null)\n throw new BuildException(\"rootDirectory is required by jspc\");\n\n File resinJar = new File(_resinHome,\n \"lib\" + File.separatorChar + \"resin.jar\");\n\n if (! resinJar.exists())\n throw new BuildException(\"resinHome '\"\n + _resinHome\n + \"' does not appear to be valid\");\n\n Java java = new Java(this);\n java.setFailonerror(true);\n java.setFork(true);\n java.setJar(resinJar);\n\n List<String> args = new ArrayList<String>();\n args.add(\"jspc\");\n args.add(\"-app-dir\");\n args.add(_rootDirectory.getPath());\n\n for (String arg : args)\n java.createArg().setLine(arg);\n\n log(java.getCommandLine().toString(), _level.intValue());\n\n java.executeJava();\n }", "private int exec(UnixRuntime r, String[] argv, String[] envp) {\n for(int i=0;i<OPEN_MAX;i++) if(closeOnExec[i]) closeFD(i);\n r.fds = fds;\n r.closeOnExec = closeOnExec;\n // make sure this doesn't get messed with these since we didn't copy them\n fds = null;\n closeOnExec = null;\n \n r.gs = gs;\n r.sm = sm;\n r.cwd = cwd;\n r.pid = pid;\n r.parent = parent;\n r.start(argv,envp);\n \n state = EXECED;\n execedRuntime = r;\n \n return 0; \n }", "Process createProcess();", "public Runner() {\n this.config = ConfigUtils.getDefaultConfig();\n this.noSuchBaseDir = Files.createTempDir();\n this.noSuchBaseDir.deleteOnExit();\n }", "private void runStop() throws IOException {\n final Shell.Plain gripShell = new Shell.Plain(new Shell.Safe(details.createSSHShell()));\n gripShell.exec(deploymentCommands.getKillCommand(coreJar.getName()));\n }", "native void nativeSetJavaTmpDir(String path);", "public static void main(String[] args) throws IOException {\n\t\tProcess process = Runtime.getRuntime().exec(\"cmd /c start cmd\");\r\n\r\n\t\tBufferedWriter in = new BufferedWriter(new OutputStreamWriter(process\r\n\t\t\t\t.getOutputStream()));\r\n\t\tString line = \"2967 \";\r\n\t\tin.write(line);\r\n\t\tin.flush();\r\n\t\tin.close();\r\n\t\tInputStream out = process.getInputStream();\r\n\t\t// clean up if any output in stdout\r\n\t\tBufferedReader brCleanUp = new BufferedReader(\r\n\t\t\t\tnew InputStreamReader(out));\r\n\t\twhile ((line = brCleanUp.readLine()) != null) {\r\n\t\t\tSystem.out.println(\"[Stdout] \" + line);\r\n\t\t}\r\n\t\tbrCleanUp.close();\r\n\t\tprocess.destroy();\r\n\t}", "ProcessTaskFactory<T> runAsCommand();", "public String createUnixShellCommand(SeqAnalysisLocal seqAnalysis);", "void run() throws IOException {\n\t\tint lastSlash = savedFilePath.lastIndexOf(\"\\\\\");\n\t\tString pathDir = savedFilePath.substring(0,lastSlash);\n\t\tint dotPos = savedFilePath.lastIndexOf(\".\");\n\t\tString fileName = savedFilePath.substring(lastSlash+1,dotPos);\n\t\tString[] command = {\n\t\t\t\t\"cmd.exe\",\n\t\t\t\t\"/c\",\n\t\t\t\t\"cd\",\n\t\t\t\tpathDir,\n\t\t\t\t\"&\",\n\t\t\t\t\"Start\",\n\t\t\t\t\"cmd.exe\",\n\t\t\t\t\"/k\",\n\t\t\t\tjavaPath,\n\t\t\t\tfileName\n\t\t};\n\t\tRuntime runtime = Runtime.getRuntime();\n\t\truntime.exec(command);\n\t}", "private static SimpleProcessExecutor newSimpleProcessExecutor() {\n return new SimpleProcessExecutor(new TestProcessManagerFactory().newProcessManager());\n }", "@Override\n\t\t\t\tpublic void run()\n\t\t\t\t{\n\t\t\t\t\ttry \n\t\t\t\t\t{\n\t\t\t\t\t\tThread.sleep((long) timeout);\n\t\t\t\t\t\tif (buildProcess.isAlive())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tbuildProcess.destroy();\n\t\t\t\t\t\t\tal.add(1);\n\t\t\t\t\t\t}\n\t\t\t\t\t} \n\t\t\t\t\tcatch (InterruptedException e) \n\t\t\t\t\t{\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}", "public void exec();", "private static String runRunner(URL[] classpath, final String[] args)\n throws Exception {\n ByteArrayOutputStream replacementStream = new ByteArrayOutputStream();\n PrintStream originalStream = System.out;\n System.setOut(new PrintStream(replacementStream));\n try {\n final AtomicReference<Exception> exceptionRef = new AtomicReference<Exception>();\n Thread thread = new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n PantsRunner.main(args);\n } catch (Exception e) {\n exceptionRef.set(e);\n }\n }\n });\n thread.setContextClassLoader(new URLClassLoader(classpath));\n thread.start();\n thread.join();\n\n if (exceptionRef.get() != null) {\n throw exceptionRef.get();\n }\n } finally {\n System.setOut(originalStream);\n }\n\n return replacementStream.toString();\n }", "Subprocess createSubprocess();", "@Test\n public void testReuseforkstrue() throws Exception {\n String testName = \"reuseforkstrue\";\n EkstaziPaths.removeEkstaziDirectories(getClass(), testName);\n executeCleanTestStep(testName, 0, 1);\n }", "public static void main(String[] args)\n/* */ {\n/* 124 */ if (catalinaHome == null) {\n/* 125 */ log.error(\"Must set 'catalina.home' system property\");\n/* 126 */ System.exit(1);\n/* */ }\n/* */ \n/* */ \n/* 130 */ int index = 0;\n/* */ for (;;) {\n/* 132 */ if (index == args.length) {\n/* 133 */ usage();\n/* 134 */ System.exit(1);\n/* */ }\n/* 136 */ if (\"-ant\".equals(args[index])) {\n/* 137 */ ant = true;\n/* 138 */ } else if (\"-common\".equals(args[index])) {\n/* 139 */ common = true;\n/* 140 */ } else if (\"-server\".equals(args[index])) {\n/* 141 */ server = true;\n/* 142 */ } else { if (!\"-shared\".equals(args[index])) break;\n/* 143 */ shared = true;\n/* */ }\n/* */ \n/* 146 */ index++;\n/* */ }\n/* 148 */ if (index > args.length) {\n/* 149 */ usage();\n/* 150 */ System.exit(1);\n/* */ }\n/* */ \n/* */ \n/* 154 */ if (ant) {\n/* 155 */ System.setProperty(\"ant.home\", catalinaHome);\n/* */ }\n/* */ \n/* 158 */ ClassLoader classLoader = null;\n/* */ try {\n/* 160 */ ArrayList<File> packed = new ArrayList();\n/* 161 */ ArrayList<File> unpacked = new ArrayList();\n/* 162 */ unpacked.add(new File(catalinaHome, \"classes\"));\n/* 163 */ packed.add(new File(catalinaHome, \"lib\"));\n/* 164 */ if (common) {\n/* 165 */ unpacked.add(new File(catalinaHome, \"common\" + File.separator + \"classes\"));\n/* */ \n/* 167 */ packed.add(new File(catalinaHome, \"common\" + File.separator + \"lib\"));\n/* */ }\n/* */ \n/* 170 */ if (server) {\n/* 171 */ unpacked.add(new File(catalinaHome, \"server\" + File.separator + \"classes\"));\n/* */ \n/* 173 */ packed.add(new File(catalinaHome, \"server\" + File.separator + \"lib\"));\n/* */ }\n/* */ \n/* 176 */ if (shared) {\n/* 177 */ unpacked.add(new File(catalinaHome, \"shared\" + File.separator + \"classes\"));\n/* */ \n/* 179 */ packed.add(new File(catalinaHome, \"shared\" + File.separator + \"lib\"));\n/* */ }\n/* */ \n/* */ \n/* */ \n/* 184 */ classLoader = ClassLoaderFactory.createClassLoader((File[])unpacked.toArray(new File[0]), \n/* 185 */ (File[])packed.toArray(new File[0]), null);\n/* */ }\n/* */ catch (Throwable t) {\n/* 188 */ ExceptionUtils.handleThrowable(t);\n/* 189 */ log.error(\"Class loader creation threw exception\", t);\n/* 190 */ System.exit(1);\n/* */ }\n/* 192 */ Thread.currentThread().setContextClassLoader(classLoader);\n/* */ \n/* */ \n/* 195 */ Class<?> clazz = null;\n/* 196 */ String className = args[(index++)];\n/* */ try {\n/* 198 */ if (log.isDebugEnabled())\n/* 199 */ log.debug(\"Loading application class \" + className);\n/* 200 */ clazz = classLoader.loadClass(className);\n/* */ } catch (Throwable t) {\n/* 202 */ ExceptionUtils.handleThrowable(t);\n/* 203 */ log.error(\"Exception creating instance of \" + className, t);\n/* 204 */ System.exit(1);\n/* */ }\n/* */ \n/* 207 */ Method method = null;\n/* 208 */ String[] params = new String[args.length - index];\n/* 209 */ System.arraycopy(args, index, params, 0, params.length);\n/* */ try {\n/* 211 */ if (log.isDebugEnabled())\n/* 212 */ log.debug(\"Identifying main() method\");\n/* 213 */ String methodName = \"main\";\n/* 214 */ Class<?>[] paramTypes = new Class[1];\n/* 215 */ paramTypes[0] = params.getClass();\n/* 216 */ method = clazz.getMethod(methodName, paramTypes);\n/* */ } catch (Throwable t) {\n/* 218 */ ExceptionUtils.handleThrowable(t);\n/* 219 */ log.error(\"Exception locating main() method\", t);\n/* 220 */ System.exit(1);\n/* */ }\n/* */ \n/* */ try\n/* */ {\n/* 225 */ if (log.isDebugEnabled())\n/* 226 */ log.debug(\"Calling main() method\");\n/* 227 */ Object[] paramValues = new Object[1];\n/* 228 */ paramValues[0] = params;\n/* 229 */ method.invoke(null, paramValues);\n/* */ } catch (Throwable t) {\n/* 231 */ t = ExceptionUtils.unwrapInvocationTargetException(t);\n/* 232 */ ExceptionUtils.handleThrowable(t);\n/* 233 */ log.error(\"Exception calling main() method\", t);\n/* 234 */ System.exit(1);\n/* */ }\n/* */ }", "@Override\n protected void processRun() {\n try {\n if (helpOnly) helpOnly();\n else {\n if (hasPipedInput()) pipeVersion();\n else stdinVersion();\n }\n } catch (IOException e) {\n return; // Killed process\n }\n }", "void runCode() throws IOException, InterruptedException {\n String[] cmd = {\n \"/bin/sh\",\n \"-c\",\n \"gnome-terminal --command=\\\"bash -c \\'cd \" + currentDirectory.getPath() + \" && g++ -o \" + currentFile.getName().substring(0, currentFile.getName().lastIndexOf('.')) + \" \" + currentFile.getName() + \" && \" + \"./main; $SHELL\\'\\\"\"\n };\n Process p = new ProcessBuilder(cmd).start();\n\n StringBuilder output = new StringBuilder();\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(p.getInputStream()));\n\n String line;\n while ((line = reader.readLine()) != null) {\n output.append(line + \"\\n\");\n }\n\n int exitVal = p.waitFor();\n if (exitVal == 0) {\n System.out.println(\"Success!\");\n } else {\n System.out.println(\"Fail!\");\n }\n }", "@Override\n protected void doFullTaskAction() throws IOException {\n File srcOut = getSourceOutputDir();\n if (srcOut != null) {\n FileUtils.cleanOutputDir(srcOut);\n }\n\n @Nullable\n File resOutBaseNameFile = getPackageOutputFile();\n\n // If are in instant run mode and we have an instant run enabled manifest\n File instantRunManifest = getInstantRunManifestFile();\n File manifestFileToPackage = instantRunBuildContext.isInInstantRunMode() &&\n instantRunManifest != null && instantRunManifest.exists()\n ? instantRunManifest\n : getManifestFile();\n\n AndroidBuilder builder = getBuilder();\n MergingLog mergingLog = new MergingLog(getMergeBlameLogFolder());\n ProcessOutputHandler processOutputHandler = new ParsingProcessOutputHandler(\n new ToolOutputParser(new AaptOutputParser(), getILogger()),\n new MergingLogRewriter(mergingLog, builder.getErrorReporter()));\n\n String preferredDensity =\n getResourceConfigs().isEmpty()\n ? getPreferredDensity()\n : null; /* when resConfigs are set, we should respect it */\n try {\n Aapt aapt = AaptGradleFactory.make(\n getBuilder(),\n processOutputHandler,\n true,\n variantScope.getGlobalScope().getProject(),\n variantScope.getVariantConfiguration().getType(),\n FileUtils.mkdirs(new File(getIncrementalFolder(), \"aapt-temp\")),\n aaptOptions.getCruncherProcesses());\n\n AaptPackageConfig.Builder config =\n new AaptPackageConfig.Builder()\n .setManifestFile(manifestFileToPackage)\n .setOptions(getAaptOptions())\n .setResourceDir(getResDir())\n .setLibraries(getAndroidDependencies())\n .setCustomPackageForR(getPackageForR())\n .setSymbolOutputDir(getTextSymbolOutputDir())\n .setSourceOutputDir(srcOut)\n .setResourceOutputApk(resOutBaseNameFile)\n .setProguardOutputFile(getProguardOutputFile())\n .setMainDexListProguardOutputFile(getMainDexListProguardOutputFile())\n .setVariantType(getType())\n .setDebuggable(getDebuggable())\n .setPseudoLocalize(getPseudoLocalesEnabled())\n .setResourceConfigs(getResourceConfigs())\n .setSplits(getSplits())\n .setPreferredDensity(preferredDensity)\n .setBaseFeature(getBaseFeature())\n .setPreviousFeatures(getPreviousFeatures());\n\n builder.processResources(aapt, config, getEnforceUniquePackageName());\n\n if (resOutBaseNameFile != null && LOG.isInfoEnabled()) {\n LOG.info(\"Aapt output file {}\", resOutBaseNameFile.getAbsolutePath());\n }\n\n } catch (IOException | InterruptedException | ProcessException e) {\n throw new RuntimeException(e);\n }\n }", "@Override\r\n\t\t\tpublic void autStartProcess() {\n\t\t\t}", "public void run() throws Exception {\n if (getLog().isDebugEnabled()) {\n getLog().debug(\"Launching JVM with command line: \" + String.join(\" \", args));\n }\n process = new ProcessBuilder(args)\n .inheritIO()\n .directory(workingDir)\n .start();\n //https://github.com/quarkusio/quarkus/issues/232\n Runtime.getRuntime().addShutdownHook(new Thread(new Runnable() {\n @Override\n public void run() {\n process.destroy();\n }\n }, \"Development Mode Shutdown Hook\"));\n }", "public static void main(String[] args) {\r\n\t\tString appname=\"Miniz.apk\";\r\n\t\t\t\t\t\t\t\t\t//for creation of entrypoint providing the application and android jar\r\n\t//Options.v().setPhaseOption(\"cg.cha\",\"on\");\r\n\tSetupApplication app = new\tSetupApplication(\"android.jar\",appname);\r\n\ttry {\r\n\t \t\t app.calculateSourcesSinksEntrypoints(\"SourceAndSinks.txt\");\t\t \t\t\t\r\n\t} catch (Exception e) {\r\n\t\te.printStackTrace();\r\n }\r\n\tsoot.G.reset();\r\n\t//set soot options\r\n\tOptions.v().set_src_prec(Options.src_prec_apk);\r\n\tOptions.v().set_process_dir(Collections.singletonList(appname));\r\n\tOptions.v().set_force_android_jar(\"android.jar\");\r\n\tOptions.v().set_whole_program(true);\r\n\tOptions.v().set_allow_phantom_refs(true);\r\n\t//For Handling the Junit test cases output the result into Jimple files\r\n\tOptions.v().set_output_format(Options.output_format_J);\r\n\t//For the code execution \r\n\t//Options.v().set_output_format(Options.output_format_dex);\r\n\tOptions.v().setPhaseOption(\"cg.spark verbose:true\",\"on\");\r\n\tOptions.v().setPhaseOption(\"on-fly-cg\",\"true\");\r\n\t//Renaming dummy main method as void main(String args) for sending the cfg in VASCO\r\n\tList<Type> s = new ArrayList<Type>();\r\n\ts=Arrays.asList(new Type[]{\r\n\tsoot.ArrayType.v(soot.RefType.v(\"java.lang.String\"), 1)\r\n\t});\r\n\t//creating dummy main\r\n\tSootMethod entryPoint =app.getEntryPointCreator().createDummyMain();\r\n\tentryPoint.setName(\"main\");\r\n\tentryPoint.setParameterTypes(s);\r\n\tChain<Unit> u1=entryPoint.getActiveBody().getUnits();\r\n Unit first=u1.getFirst();\r\n //Replacing the constant intitialization of dummy main variable by randomnumber for VASCO doesnt remove any branches from dummy main\r\n Scene.v().loadClassAndSupport(\"java.lang.Math\");\r\n SootMethod sm=Scene.v().getMethod(\"<java.lang.Math: double random()>\");\r\n SootMethodRef smRef=sm.makeRef();\r\n if(first instanceof AssignStmt){\r\n \tValue lhsOp = ((AssignStmt) first).getLeftOp();\r\n Value rhsOp = ((AssignStmt) first).getRightOp();\r\n if(lhsOp instanceof Local && rhsOp instanceof Constant){\r\n \tu1.removeFirst();\r\n u1.addFirst(Jimple.v().newAssignStmt(lhsOp, Jimple.v().newStaticInvokeExpr(smRef)));\r\n }\r\n }\r\n\r\n Scene.v().loadNecessaryClasses();\r\n System.out.println(\"Class::--\"+entryPoint.getDeclaringClass()+\"\\n Dummy Main....-->\"+ entryPoint.getActiveBody());\r\n\tScene.v().setEntryPoints(Collections.singletonList(entryPoint));\r\n\tOptions.v().set_main_class(entryPoint.getDeclaringClass().getName());\r\n\tPackManager.v().runPacks();\r\n\tcg = Scene.v().getCallGraph();\r\n \t\r\n\t\r\n\t//function to get all the methods existing in the call graph\r\n\trecursive(entryPoint);\r\n\t//Printing the methods in the call graph \r\n\tfor(Entry<String, Boolean> eSet : visited.entrySet()){\r\n\t\t\tString value=eSet.getKey().toString();\r\n\t\t\tSystem.out.println(\"Methods in callg graph: \"+value);\r\n\t}\r\n\t\r\n\tList<SootMethod> unusedmethods=new ArrayList<SootMethod>();\t\r\n\tSystem.out.println(\"All::-->\");\r\n\t//Fetching all the methods in the Application and storing the unused methods in a list(unusedmethods)\r\n\tChain<SootClass> clas=Scene.v().getApplicationClasses();\r\n\tfor(SootClass abc1:clas){\r\n\t \tSootClass sClass=Scene.v().loadClassAndSupport(abc1.getName());\r\n\t \tList <SootMethod> methods=sClass.getMethods();\r\n\t\t\t \tfor(SootMethod a: methods){\r\n\t \t\tSystem.out.println( a.getSignature());\r\n\t \t\tif(visited.containsKey(a.getSignature()))\r\n\t \t\t\tcontinue;\r\n\t \t\telse{\r\n\t \t\t\t//Handling classes which extends View and the attributes are not defined in Layout.xml , Handling all init & access functions and Handler functions along with SQLiteDatabase Helper \r\n\t \t\t \t\t\tif(!(a.getSubSignature().contains(\"void <init>\") || a.getSubSignature().contains(\"void <clinit>\") || a.getSubSignature().contains(\"access$\") || a.getDeclaringClass().getSuperclass().getName().contains(\"SQLiteOpenHelper\"))){\r\n\t \t\t \t\t\t\tif(a.getDeclaringClass().getSuperclass().getName().equals(\"android.view.View\") || a.getDeclaringClass().getSuperclass().getName().contains(\"android.os.Handler\")){\r\n\t \t\t \t\t\t\t\tList<SootMethod> methodlist=a.getDeclaringClass().getSuperclass().getMethods();\r\n\t \t\t\t \t\t\t\tint flag=0;\r\n\t \t\t\t \t\t\t\tfor(SootMethod ab: methodlist){\r\n\t \t\t\t \t\t\t\t\tif(ab.getSubSignature()==a.getSubSignature()){// && !unusedmethods.contains(a))\r\n\t \t\t\t \t\t\t\t\t\tflag=1;\r\n\t \t\t\t \t\t\t\t\t\tbreak;\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(flag!=1)\r\n\t \t\t\t \t\t\t\t\tunusedmethods.add(a);\r\n\t \t\t\t \t\t\t}\r\n\t \t\t \t\t\t\telse\r\n\t \t\t\t \t\t\t\tunusedmethods.add(a);\r\n\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\r\n\t \t}\r\n\t }\r\n\t \r\n\t //Handling the functions when the class implements interface\r\n\t List<SootMethod> delm = new ArrayList<SootMethod>();\r\n\t List<SootMethod> un=unusedmethods;\r\n\t for(SootMethod m:un){\r\n\t\t \t if(m.getDeclaringClass().getInterfaceCount()>0){\r\n\t\t\t\t\t Chain<SootClass> interfaces=m.getDeclaringClass().getInterfaces();\r\n\t\t\t\t\t for(SootClass c:interfaces){\r\n\t\t\t\t\t\t List<SootMethod> smi=c.getMethods();\r\n\t\t\t\t\t\t for(SootMethod m1:smi){\r\n\t\t\t\t\t\t\t if(m1.getName().contains(m.getName())){\r\n\t\t\t\t\t\t\t\t delm.add(m);\t\t\t\t \r\n\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t }\r\n\t\t\t \r\n\t\t\t }\r\n\t }\r\n\t for(SootMethod m1:delm){\r\n\t\t unusedmethods.remove(m1);\r\n\t }\r\n\r\n\t //Handling Reflection methods\r\n\t for(SootMethod a: un){\r\n\t\t\tSootClass classWeNeedToLoad = a.getDeclaringClass();\r\n\t\t\tfor(Map.Entry<String,String> entry: Driver.runmethods.entrySet()){\r\n\t\t\t//\tif(!(entry.getKey().contains(classWeNeedToLoad.toString()) && a.getName().contains(entry.getValue())))\r\n\t\t\t\tif(entry.getValue().contains(a.getName()) && entry.getKey().contains(classWeNeedToLoad.toString())){\r\n\t\t\t\t\tunusedmethods.remove(a);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} \r\n\t \r\n\t //Remove the unused methods\t \r\n\t for(SootMethod a: unusedmethods){\r\n\t \tSootClass classWeNeedToLoad = a.getDeclaringClass();\r\n\t \tclassWeNeedToLoad.removeMethod(a);\r\n\t\t}\r\n\t\r\n\r\n\t//Calling Vasco for interprocedural analysis \r\n\tInterproceduralAnalysis ipa = new InterproceduralAnalysis(new EmptyReporter());\r\n\tipa.doAnalysis();\r\n\tprint();\r\n\t//Deleting the ifs with constant result\r\n\tdeleteifs(ifStmts);\r\n\t\r\n\t//Write the apk\r\n\tPackManager.v().writeOutput();\r\n}", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\trootExecutable.feedbackDisable();\r\n\t\t\t\tif(executable instanceof ViewGroup){recursivelyResetExecutables((ViewGroup)rootExecutable);}\r\n\t\t\t}", "private static void kill() {\n if (redirectErr != null) {\n redirectErr.close();\n redirectErr.interrupt();\n redirectErr = null;\n }\n\n if (redirectOut != null) {\n redirectOut.close();\n redirectOut.interrupt();\n redirectOut = null;\n }\n\n if (JVM != null) {\n JVM.destroy();\n JVM = null;\n }\n\n JVMrunning = false;\n\n println(\"JVM reset on \" + java.util.Calendar.getInstance().getTime().toString(), progErr);\n }", "public Channel buildChannel( TaskListener listener, JDK jdk, FilePath slaveRoot, Launcher launcher, //\n String jvmExtraArgs )\n throws Exception\n {\n\n ArgumentListBuilder args = new ArgumentListBuilder();\n if ( jdk == null )\n {\n args.add( \"java\" );\n }\n else\n {\n args.add( jdk.getHome() + \"/bin/java\" ); // use JDK.getExecutable() here ?\n }\n\n if ( DEBUG_PORT > 0 )\n {\n args.add( \"-Xrunjdwp:transport=dt_socket,server=y,address=\" + DEBUG_PORT );\n }\n\n if (jvmExtraArgs != null)\n {\n args.addTokenized( jvmExtraArgs );\n }\n\n\n String remotingJar = launcher.getChannel().call( new GetRemotingJar() );\n\n args.add( \"-cp\" );\n StringBuilder classPath = new StringBuilder( );\n\n List<Class> classes = Arrays.asList( JenkinsRemoteStarter.class, //\n QpsListenerDisplay.class, //\n RequestQueuedListenerDisplay.class, //\n Recorder.class);\n\n classes.stream().forEach( aClass -> {\n classPath.append( classPathEntry( slaveRoot, //\n aClass, //\n aClass.getName(), //\n listener ) ) //\n .append( launcher.isUnix() ? \":\" : \";\" );\n } );\n\n String cp = classPath.toString() + remotingJar;\n\n for (LoadGeneratorProcessClasspathDecorator decorator : LoadGeneratorProcessClasspathDecorator.all())\n {\n cp = decorator.decorateClasspath( cp, listener, slaveRoot, launcher );\n }\n\n\n args.add( cp );\n\n args.add( \"org.mortbay.jetty.load.generator.starter.JenkinsRemoteStarter\" );\n\n final Acceptor acceptor = launcher.getChannel().call( new SocketHandler() );\n\n InetAddress host = InetAddress.getLocalHost();\n String hostName = null;// host.getHostName();\n\n final String socket =\n hostName != null ? hostName + \":\" + acceptor.getPort() : String.valueOf( acceptor.getPort() );\n listener.getLogger().println( \"Established TCP socket on \" + socket );\n\n args.add( socket );\n\n final Proc proc = launcher.launch().cmds( args ).stdout( listener ).stderr( listener.getLogger() ).start();\n\n Connection con;\n try\n {\n con = acceptor.accept();\n }\n catch ( SocketTimeoutException e )\n {\n // failed to connect. Is the process dead?\n // if so, the error should have been provided by the launcher already.\n // so abort gracefully without a stack trace.\n if ( !proc.isAlive() )\n {\n throw new AbortException( \"Failed to launch LoadGenerator. Exit code = \" + proc.join() );\n }\n throw e;\n }\n\n Channel ch;\n try\n {\n ch = Channels.forProcess( \"Channel to LoadGenerator \" + Arrays.toString( args.toCommandArray() ), //\n Computer.threadPoolForRemoting, //\n new BufferedInputStream( con.in ), //\n new BufferedOutputStream( con.out ), //\n listener.getLogger(), //\n proc );\n\n\n return ch;\n }\n catch ( IOException e )\n {\n throw e;\n }\n\n }", "@Test\n public void testReuseforksfalse() throws Exception {\n String testName = \"reuseforksfalse\";\n EkstaziPaths.removeEkstaziDirectories(getClass(), testName);\n executeCleanTestStep(testName, 0, 1);\n }", "private Process startCreateClusterTaskForAks(ProvisionRequest provisionRequest) throws ClusterException {\n\t\tProcess process = null;\n\n\t\ttry {\n\t\t\tObjectMapper mapper = new ObjectMapper();\n\t\t\tString clusterRequestStr = mapper.writeValueAsString(provisionRequest);\n\t\t\tString provisionRequestStrWithQt = \"'\" + clusterRequestStr + \"'\";\n\t\t\tProcessBuilder builder = new ProcessBuilder(new String[0]);\n\n\t\t\tString command = \"ansible-playbook \"\n\t\t\t\t\t+ appConfig.getConfigValue(\n\t\t\t\t\t\t\t\"createClusterPlayBook\" + getPropertySuffix(provisionRequest.getCloudSrvc()))\n\t\t\t\t\t+ \" --e \" + provisionRequestStrWithQt;\n// Process p = Runtime.getRuntime().exec(ansible_run, null);\n\t\t\tlogger.info(\"Create Cluster Command:: \" + command);\n\t\t\tbuilder.command(new String[] { \"sh\", \"-c\", command });\n\t\t\tString directory = appConfig\n\t\t\t\t\t.getConfigValue(\"createClusterFolder\" + getPropertySuffix(provisionRequest.getCloudSrvc()));\n\t\t\tbuilder.directory(new File(directory));\n\n\t\t\tprocess = builder.start();\n\n\t\t\tlogger.info(\"Running create aks playbook ...\");\n\n\t\t\tStreamGobbler streamGobbler = new StreamGobbler(process.getInputStream(), System.out::println);\n\t\t\tExecutors.newSingleThreadExecutor().submit(streamGobbler);\n\t\t} catch (Exception ex) {\n\t\t\t// ex.printStackTrace();\n\t\t\tthrow new ClusterException(\"Exception occurred in startCreateClusterTaskForAks...\", ex);\n\t\t}\n\t\treturn process;\n\t}", "ProcessRunner waitFor();", "ExecRunner(ProcessBuilder builder) {\n if (builder == null) {\n throw new NullPointerException();\n }\n this.builder = builder;\n }", "public void execute() throws MojoExecutionException {\n\n // 1. Create and set up directories\n getLog().info(\"Creating and setting up the bundle directories\");\n buildDirectory.mkdirs();\n\n File bundleDir = new File(buildDirectory, bundleName + \".app\");\n bundleDir.mkdirs();\n\n File contentsDir = new File(bundleDir, \"Contents\");\n contentsDir.mkdirs();\n\n File resourcesDir = new File(contentsDir, \"Resources\");\n resourcesDir.mkdirs();\n\n File javaDirectory = new File(contentsDir, \"Java\");\n javaDirectory.mkdirs();\n\n File macOSDirectory = new File(contentsDir, \"MacOS\");\n macOSDirectory.mkdirs();\n\n // 2. Copy in the native java application stub\n getLog().info(\"Copying the native Java Application Stub\");\n File launcher = new File(macOSDirectory, javaLauncherName);\n launcher.setExecutable(true);\n\n FileOutputStream launcherStream = null;\n try {\n launcherStream = new FileOutputStream(launcher);\n } catch (FileNotFoundException ex) {\n throw new MojoExecutionException(\"Could not copy file to directory \" + launcher, ex);\n }\n\n InputStream launcherResourceStream = this.getClass().getResourceAsStream(javaLauncherName);\n try {\n IOUtil.copy(launcherResourceStream, launcherStream);\n } catch (IOException ex) {\n throw new MojoExecutionException(\"Could not copy file \" + javaLauncherName + \" to directory \" + macOSDirectory, ex);\n }\n\n // 3.Copy icon file to the bundle if specified\n if (iconFile != null) {\n File f = searchFile(iconFile, project.getBasedir());\n\n if (f != null && f.exists() && f.isFile()) {\n getLog().info(\"Copying the Icon File\");\n try {\n FileUtils.copyFileToDirectory(f, resourcesDir);\n } catch (IOException ex) {\n throw new MojoExecutionException(\"Error copying file \" + iconFile + \" to \" + resourcesDir, ex);\n }\n } else {\n throw new MojoExecutionException(String.format(\"Could not locate iconFile '%s'\", iconFile));\n }\n }\n\n // 4. Resolve and copy in all dependencies from the pom\n getLog().info(\"Copying dependencies\");\n List<String> files = copyDependencies(javaDirectory);\n if (additionalBundledClasspathResources != null && !additionalBundledClasspathResources.isEmpty()) {\n files.addAll(copyAdditionalBundledClasspathResources(javaDirectory, \"lib\", additionalBundledClasspathResources));\n }\n\n // 5. Check if JRE should be embedded. Check JRE path. Copy JRE\n if (jrePath != null) {\n File f = new File(jrePath);\n if (f.exists() && f.isDirectory()) {\n // Check if the source folder is a jdk-home\n File pluginsDirectory = new File(contentsDir, \"PlugIns/JRE/Contents/Home/jre\");\n pluginsDirectory.mkdirs();\n\n File sourceFolder = new File(jrePath, \"Contents/Home\");\n if (new File(jrePath, \"Contents/Home/jre\").exists()) {\n sourceFolder = new File(jrePath, \"Contents/Home/jre\");\n }\n\n try {\n getLog().info(\"Copying the JRE Folder from : [\" + sourceFolder + \"] to PlugIn folder: [\" + pluginsDirectory + \"]\");\n FileUtils.copyDirectoryStructure(sourceFolder, pluginsDirectory);\n File binFolder = new File(pluginsDirectory, \"bin\");\n //Setting execute permissions on executables in JRE\n for (String filename : binFolder.list()) {\n new File(binFolder, filename).setExecutable(true, false);\n }\n\n new File (pluginsDirectory, \"lib/jspawnhelper\").setExecutable(true,false);\n embeddJre = true;\n } catch (IOException ex) {\n throw new MojoExecutionException(\"Error copying folder \" + f + \" to \" + pluginsDirectory, ex);\n }\n } else {\n getLog().warn(\"JRE not found check jrePath setting in pom.xml\");\n }\n } else if (jreFullPath != null){\n getLog().info(\"JRE Full path is used [\" + jreFullPath + \"]\");\n embeddJre = true;\n }\n\n // 6. Create and write the Info.plist file\n getLog().info(\"Writing the Info.plist file\");\n File infoPlist = new File(bundleDir, \"Contents\" + File.separator + \"Info.plist\");\n this.writeInfoPlist(infoPlist, files);\n\n // 7. Copy specified additional resources into the top level directory\n getLog().info(\"Copying additional resources\");\n if (additionalResources != null && !additionalResources.isEmpty()) {\n this.copyResources(buildDirectory, additionalResources);\n }\n\n // 7. Make the stub executable\n if (!SystemUtils.IS_OS_WINDOWS) {\n getLog().info(\"Making stub executable\");\n Commandline chmod = new Commandline();\n try {\n chmod.setExecutable(\"chmod\");\n chmod.createArgument().setValue(\"755\");\n chmod.createArgument().setValue(launcher.getAbsolutePath());\n\n chmod.execute();\n } catch (CommandLineException e) {\n throw new MojoExecutionException(\"Error executing \" + chmod + \" \", e);\n }\n } else {\n getLog().warn(\"The stub was created without executable file permissions for UNIX systems\");\n }\n\n // 8. Create the DMG file\n if (generateDiskImageFile) {\n if (SystemUtils.IS_OS_MAC_OSX || SystemUtils.IS_OS_MAC) {\n getLog().info(\"Generating the Disk Image file\");\n Commandline dmg = new Commandline();\n try {\n // user wants /Applications symlink in the resulting disk image\n if (includeApplicationsSymlink) {\n createApplicationsSymlink();\n }\n dmg.setExecutable(\"hdiutil\");\n dmg.createArgument().setValue(\"create\");\n dmg.createArgument().setValue(\"-srcfolder\");\n dmg.createArgument().setValue(buildDirectory.getAbsolutePath());\n dmg.createArgument().setValue(diskImageFile.getAbsolutePath());\n\n try {\n dmg.execute().waitFor();\n } catch (InterruptedException ex) {\n throw new MojoExecutionException(\"Thread was interrupted while creating DMG \" + diskImageFile, ex);\n } finally {\n if (includeApplicationsSymlink) {\n removeApplicationsSymlink();\n }\n }\n } catch (CommandLineException ex) {\n throw new MojoExecutionException(\"Error creating disk image \" + diskImageFile, ex);\n }\n\n if (diskImageInternetEnable) {\n getLog().info(\"Enabling the Disk Image file for internet\");\n try {\n Commandline internetEnableCommand = new Commandline();\n\n internetEnableCommand.setExecutable(\"hdiutil\");\n internetEnableCommand.createArgument().setValue(\"internet-enable\");\n internetEnableCommand.createArgument().setValue(\"-yes\");\n internetEnableCommand.createArgument().setValue(diskImageFile.getAbsolutePath());\n\n internetEnableCommand.execute();\n } catch (CommandLineException ex) {\n throw new MojoExecutionException(\"Error internet enabling disk image: \" + diskImageFile, ex);\n }\n }\n projectHelper.attachArtifact(project, \"dmg\", null, diskImageFile);\n }\n if (SystemUtils.IS_OS_LINUX) {\n getLog().info(\"Generating the Disk Image file\");\n Commandline linux_dmg = new Commandline();\n try {\n linux_dmg.setExecutable(\"genisoimage\");\n linux_dmg.createArgument().setValue(\"-V\");\n linux_dmg.createArgument().setValue(bundleName);\n linux_dmg.createArgument().setValue(\"-D\");\n linux_dmg.createArgument().setValue(\"-R\");\n linux_dmg.createArgument().setValue(\"-apple\");\n linux_dmg.createArgument().setValue(\"-no-pad\");\n linux_dmg.createArgument().setValue(\"-o\");\n linux_dmg.createArgument().setValue(diskImageFile.getAbsolutePath());\n linux_dmg.createArgument().setValue(buildDirectory.getAbsolutePath());\n\n try {\n linux_dmg.execute().waitFor();\n } catch (InterruptedException ex) {\n throw new MojoExecutionException(\"Thread was interrupted while creating DMG \" + diskImageFile,\n ex);\n }\n } catch (CommandLineException ex) {\n throw new MojoExecutionException(\"Error creating disk image \" + diskImageFile + \" genisoimage probably missing\", ex);\n }\n projectHelper.attachArtifact(project, \"dmg\", null, diskImageFile);\n\n } else {\n getLog().warn(\"Disk Image file cannot be generated in non Mac OS X and Linux environments\");\n }\n }\n\n getLog().info(\"App Bundle generation finished\");\n }", "private static void doMemoryReleases() {\n\r\n OptimizedJavaRecognizer.releaseMemory();\r\n FastJavaLexer.clear();\r\n }", "@Override\n\t@Ignore\n\t@Test\n\tpublic void testLaunchThenKill() throws Throwable {\n\t}", "public CommandLineRun(File tavernaHome, File outputRoot, TavernaInput[] inputs, String inputsURI, String workflowURI) \n throws TavernaException, IOException{\n ArrayList<String> cmd = getLaunch(tavernaHome);\n runDirectory = Utils.createCalendarBasedDirectory(outputRoot);\n baclavaFile = new File (runDirectory, \"BaclavaOutput.xml\");\n cmd.add(\"-outputdoc=\" + baclavaFile.getAbsolutePath());\n File logFile = new File(runDirectory, \"TavernaLog.txt\");\n cmd.add(\"-logfile=\" + logFile.getAbsolutePath());\n if (inputs != null){\n for (TavernaInput input:inputs){\n cmd.addAll(input.getInputArguements()); \n }\n } else if (inputsURI != null){\n cmd.add(\"-inputdoc=\" + inputsURI);\n }\n cmd.add(workflowURI);\n\n String[] command = new String[0];\n command = cmd.toArray(command);\n runner = new ProcessRunner(command, tavernaHome);\n runner.start();\n }", "private int fork(String[] command) throws BuildException {\r\n Execute exe = new Execute(redirector.createHandler(), createWatchdog());\r\n setupExecutable(exe, command);\r\n\r\n try {\r\n int rc = exe.execute();\r\n redirector.complete();\r\n if (exe.killedProcess()) {\r\n throw new BuildException(TIMEOUT_MESSAGE);\r\n }\r\n return rc;\r\n }\r\n catch (IOException e) {\r\n throw new BuildException(e, getLocation());\r\n }\r\n }", "public void disass(){\n\t\tString temp = \"apktool d \" + f;\n\t\t\n\t\t//put it in the cmd\n\t\tProcessBuilder builder = new ProcessBuilder(\"cmd.exe\",\"/c\",temp);\n\t\tbuilder.redirectErrorStream(true);\n\t\t\n\t\ttry{\n\t\t\tProcess p = builder.start();\n\t\t}catch(IOException e){\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\t\n\t}", "public Shell() {\n commandNumber = 0;\n prevPID = -1;\n command = \"\";\n }", "public Ant(Task owner) {\n bindToOwner(owner);\n }", "protected void compile(String[] args) {\n String[] commandArray = null;\n File tmpFile = null;\n\n try {\n String myos = System.getProperty(\"os.name\");\n\n\n if (myos.toLowerCase().indexOf(\"windows\") >= 0 \n && args.length > 250) {\n PrintWriter out = null;\n try {\n tmpFile = new File(\"jikes\"+(new Random(System.currentTimeMillis())).nextLong());\n out = new PrintWriter(new FileWriter(tmpFile));\n for (int i = 0; i < args.length; i++) {\n out.println(args[i]);\n }\n out.flush();\n commandArray = new String[] { command, \n \"@\" + tmpFile.getAbsolutePath()};\n } catch (IOException e) {\n throw new BuildException(\"Error creating temporary file\", e);\n } finally {\n if (out != null) {\n try {out.close();} catch (Throwable t) {}\n }\n }\n } else {\n commandArray = new String[args.length+1];\n commandArray[0] = command;\n System.arraycopy(args,0,commandArray,1,args.length);\n }\n \n try {\n Execute exe = new Execute(jop);\n exe.setAntRun(project);\n exe.setWorkingDirectory(project.getBaseDir());\n exe.setCommandline(commandArray);\n exe.execute();\n } catch (IOException e) {\n throw new BuildException(\"Error running Jikes compiler\", e);\n }\n } finally {\n if (tmpFile != null) {\n tmpFile.delete();\n }\n }\n }", "public Object run() {\n \n try {\n try {\n \n String targetArch=JNITargetArch.getTargetArch();\n // System.out.println(\"TargetArch: \"+targetArch);\n JCALibrary jca=JCALibrary.getInstance();\n \n \n String libPath=jca.getProperty( \"gov.aps.jca.jni.epics.\"+targetArch+\n \".library.path\", \"\" );\n loadLibrary( libPath, \"Com\" );\n loadLibrary( libPath, \"ca\" );\n \n File caRepeaterPath=new File( jca.getProperty(\n \"gov.aps.jca.jni.epics.\"+targetArch+\".caRepeater.path\", \"\" ) );\n try {\n String caRepeater=\"caRepeater\";\n if( caRepeaterPath.exists() ) {\n caRepeater= ( new File( caRepeaterPath, \"caRepeater\" ) ).\n getAbsolutePath();\n \n }\n Runtime.getRuntime().exec( caRepeater );\n } catch( java.io.IOException ex ) {\n Runtime.getRuntime().exec( \"caRepeater\" );\n }\n } catch( Throwable ex2 ) {\n // System.out.println(ex2);\n }\n // System.out.println(\"Loading jca2\");\n System.loadLibrary( \"jca\" );\n \n return null; // nothing to return\n } catch( Exception ex1 ) {\n // System.out.println(ex1);\n return ex1;\n }\n }", "public static void main(java.lang.String[] args) throws java.lang.Exception {\n java.lang.System.out.println(\"Bootstrapping mutant\");\n java.net.URL bootstrapURL = org.apache.ant.init.ClassLocator.getClassLocationURL(org.apache.ant.bootstrap.Bootstrap.class);\n java.net.URL builderURL = new java.net.URL(bootstrapURL, \"../builder/\");\n java.net.URL toolsJarURL = org.apache.ant.init.ClassLocator.getToolsJarURL();\n java.net.URL[] urls = new java.net.URL[]{ builderURL, toolsJarURL };\n java.lang.ClassLoader builderLoader = new java.net.URLClassLoader(urls);\n // org.apache.ant.init.LoaderUtils.dumpLoader(System.out,\n // builderLoader);\n java.lang.Class builderClass = java.lang.Class.forName(\"org.apache.ant.builder.Builder\", true, builderLoader);\n final java.lang.Class[] param = new java.lang.Class[]{ java.lang.Class.forName(\"[Ljava.lang.String;\") };\n final java.lang.reflect.Method main = builderClass.getMethod(\"main\", param);\n final java.lang.Object[] argument = new java.lang.Object[]{ args };\n main.invoke(null, argument);\n }", "void instanceKilled(String pid, IKilledResult result);", "private void executeShellCommands( final File folderApp, final File targetJavaAppStub )\n throws MojoExecutionException\n {\n this.logger.info( \"Executing shell commands ...\" );\n\n assert ( targetJavaAppStub.exists() == true );\n shellExec( \"chmod 775 \" + escapeWhitespace( targetJavaAppStub.getAbsolutePath() ) );\n\n assert ( folderApp.exists() == true );\n // set attribute \"Has bundle\"\n shellExec( \"/Developer/Tools/SetFile -a B \" + escapeWhitespace( folderApp.getAbsolutePath() ) );\n }", "public void destroy(){\n runner.destroy();\n }", "@Override\n public void prepare(\n Path execRoot,\n ArtifactPathResolver pathResolver,\n @Nullable BulkDeleter bulkDeleter,\n boolean cleanupArchivedArtifacts)\n throws IOException {\n deleteOutput(volatileStatus, pathResolver);\n }", "public static void main(String[] args) {\n\tRuntime rt = Runtime.getRuntime();\n\t\n\tSystem.out.println(\"Available Free Memory: \" + rt.freeMemory());\n\t\n\tfor(int i=0; i<10000; i++ ) {\n\tGC1 x = new GC1(i);\n\t}\n\n\tSystem.out.println(\"Free Memory before call to gc(): \" +rt.freeMemory());\n\tSystem.runFinalization();\n\tSystem.gc();\n\tSystem.out.println(\" Free Memory after call to gc(): \" +\n\trt.freeMemory());\n\n\t}", "@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/lib/IR/Module.cpp\", line = 58,\n FQN=\"llvm::Module::~Module\", NM=\"_ZN4llvm6ModuleD0Ev\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/Module.cpp -nm=_ZN4llvm6ModuleD0Ev\")\n //</editor-fold>\n public void $destroy() {\n Context.removeModule(this);\n dropAllReferences();\n GlobalList.clear();\n FunctionList.clear();\n AliasList.clear();\n IFuncList.clear();\n NamedMDList.clear();\n /*delete*/Destructors.$destroy((Destructors.ClassWithDestructor)ValSymTab);\n /*delete*/Destructors.$destroy((Destructors.ClassWithDestructor)((/*static_cast*/StringMap<NamedMDNode /*P*/ > /*P*/)(NamedMDSymTab)));\n //START JDestroy\n DL.$destroy();\n TargetTriple.$destroy();\n SourceFileName.$destroy();\n ModuleID.$destroy();\n Materializer.$destroy();\n ComdatSymTab.$destroy();\n GlobalScopeAsm.$destroy();\n NamedMDList.$destroy();\n IFuncList.$destroy();\n AliasList.$destroy();\n FunctionList.$destroy();\n GlobalList.$destroy();\n //END JDestroy\n }", "public void run(){\n\t\tGlobal.printer.print(\"\\ngetting resource from \"+apkName+\" ... \");\n\t\tString cmd = \"java -jar \\\"\"+this.apktoolPath+\"\\\" d \\\"\"+this.filePath+\"\\\" -f -o \\\"\"+ this.apkPath+\"\\\"\";\n\t\t//Global.copyDir(this.tmpResPath, this.apkPath);\n\t\ttry {\n\t\t\tGlobal.sysCmd(cmd );//,Global.printer);\n\t\t\tGlobal.printer.print(\"succeed!!\");\n\t\t} catch (Exception e) {\n\t\t\tGlobal.printer.print(\"error!!\");\n\t\t\t//Global.printer.print(e.getMessage());\n\t\t}\n\t}", "public void makeStandalone() {\n mCommonProcess = this;\n }", "public void execute() {\r\n if (!Os.isFamily(Os.FAMILY_WINDOWS)) {\r\n throw new BuildException(\"CMT supported only on windows platforms.\");\r\n }\r\n validate();\r\n try {\r\n input = File.createTempFile(\"Files\", \".list\");\r\n generateFileList();\r\n runCmtCommand();\r\n if (this.htmlOutputDir != null) {\r\n runCmt2HtmlCommand();\r\n }\r\n } catch (IOException ioe) {\r\n throw new BuildException(\"Not able to generate file list for 'cmt'. \", ioe);\r\n } catch (BuildException be) {\r\n if (failOnError) {\r\n throw new BuildException(\"Exception occured while running 'cmt' tool. \", be);\r\n }\r\n log(\"Exception occured while running 'cmt' tool. \", Project.MSG_ERR);\r\n } finally {\r\n if (input != null) {\r\n input.delete();\r\n }\r\n }\r\n }", "abstract protected void createWorkEnv(File outputDir)\n throws TaskRunException;", "public int executeInVM( final CommandlineJava commandline )\n throws TaskException\n {\n jdepend.textui.JDepend jdepend;\n\n if( \"xml\".equals( m_format ) )\n {\n jdepend = new jdepend.xmlui.JDepend();\n }\n else\n {\n jdepend = new jdepend.textui.JDepend();\n }\n\n if( m_outputFile != null )\n {\n FileWriter fw;\n try\n {\n fw = new FileWriter( m_outputFile.getPath() );\n }\n catch( IOException e )\n {\n String msg = \"JDepend Failed when creating the output file: \" + e.getMessage();\n getLogger().info( msg );\n throw new TaskException( msg );\n }\n jdepend.setWriter( new PrintWriter( fw ) );\n getLogger().info( \"Output to be stored in \" + m_outputFile.getPath() );\n }\n\n final String[] elements = FileUtils.parsePath( m_sourcesPath.toString() );\n for( int i = 0; i < elements.length; i++ )\n {\n File f = new File( elements[ i ] );\n\n // not necessary as JDepend would fail, but why loose some time?\n if( !f.exists() || !f.isDirectory() )\n {\n String msg = \"\\\"\" + f.getPath() + \"\\\" does not represent a valid directory. JDepend would fail.\";\n getLogger().info( msg );\n throw new TaskException( msg );\n }\n try\n {\n jdepend.addDirectory( f.getPath() );\n }\n catch( IOException e )\n {\n String msg = \"JDepend Failed when adding a source directory: \" + e.getMessage();\n getLogger().info( msg );\n throw new TaskException( msg );\n }\n }\n jdepend.analyze();\n return SUCCESS;\n }", "public DefaultJvmLauncher()\n {\n }", "private void runAlloyCli() {\n AlloyCLIRunner alloyRunner = new AlloyCLIRunner(configuration);\n\n long timeout = configuration.getTimeoutSecs() * 1000;\n \n Thread alloyThread = new Thread(alloyRunner);\n alloyThread.start();\n \n long startTime = System.currentTimeMillis();\n \n synchronized (alloyThread) {\n try { alloyThread.wait(timeout); }\n catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n \n long endTime = System.currentTimeMillis();\n if (timeout != 0)\n configuration.setTimeoutSecs((int)((timeout - (endTime - startTime)) / 1000));\n \n if (alloyThread.isAlive()) {\n System.out.println(\"TIMEOUT WAS REACHED\");\n System.exit(0); // TODO: Add mechanisms to do some house keeping before exiting\n }\n }", "public ForkTask(RepositoryActivity activity) {\n mTarget = new WeakReference<RepositoryActivity>(activity);\n }", "@Override\n\tpublic void startHook() {\n\t\tMethod execmethod = RefInvoke.findMethodExact(\n \"java.lang.ProcessBuilder\", ClassLoader.getSystemClassLoader(),\n \"start\");\n\t\thookhelper.hookMethod(execmethod, new AbstractBehaviorHookCallBack() {\n\t\t\t@Override\n\t\t\tpublic void descParam(HookParam param) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tLogger.log_behavior(ProcessBuilderHook.class.getName(), \"Create New Process ->\");\n\t\t\t\tProcessBuilder pb = (ProcessBuilder) param.thisObject;\n\t\t\t\tList<String> cmds = pb.command();\n\t\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\t\tfor(int i=0 ;i <cmds.size(); i++){\n\t\t\t\t sb.append(\"CMD\"+i+\":\"+cmds.get(i)+\" \");\n\t\t\t\t}\n\t\t\t\tLogger.log_behavior(ProcessBuilderHook.class.getName(), \"Command\" + sb.toString());\n\t\t\t}\n\t\t});\n\t}", "void execSetupContext(ExecProcess ctx);", "MaximaProcess makeProcess() {\r\n \t\treturn new MaximaProcess(processBuilder, processConfig);\r\n \t}", "@Override\n public void execute() throws BuildException {\n if (_sourceDir == null) {\n _sourceDir = getProject().getBaseDir();\n }\n\n // Destination directory defaults to source directory\n if (_destDir == null) {\n _destDir = _sourceDir;\n }\n\n // Check the directories\n checkDir(\"Source directory\", _sourceDir, true, false);\n checkDir(\"Destination directory\", _destDir, false, true);\n\n // Create a watch dog, if there is a time-out configured\n ExecuteWatchdog watchdog = (_timeOut > 0L) ? new ExecuteWatchdog(_timeOut) : null;\n\n // Determine what command to execute\n String command = (_command == null || _command.length() < 1)\n ? DEFAULT_COMMAND\n : _command;\n\n // Check that the command is executable\n Buffer buffer = new Buffer();\n Execute execute = new Execute(buffer, watchdog);\n String[] cmdline = new String[] { command, \"-v\" };\n execute.setAntRun(getProject());\n execute.setCommandline(cmdline);\n try {\n if (execute.execute() != 0) {\n throw new BuildException(\"Unable to execute LessCSS command \" + quote(command) + \". Running '\" + command + \" -v' resulted in exit code \" + execute.getExitValue() + '.');\n }\n } catch (IOException cause) {\n throw new BuildException(\"Unable to execute LessCSS command \" + quote(command) + '.', cause);\n }\n\n // Display the command and version number\n String versionString = buffer.getOutString().trim();\n if (versionString.startsWith(command)) {\n versionString = versionString.substring(command.length()).trim();\n }\n if (versionString.startsWith(\"v\")) {\n versionString = versionString.substring(1).trim();\n }\n log(\"Using command \" + quote(command) + \", version is \" + quote(versionString) + '.', MSG_VERBOSE);\n\n // TODO: Improve this, detect kind of command\n boolean createOutputFile = command.indexOf(\"plessc\") >= 0;\n\n // Preparations done, consider each individual file for processing\n log(\"Transforming from \" + _sourceDir.getPath() + \" to \" + _destDir.getPath() + '.', MSG_VERBOSE);\n long start = System.currentTimeMillis();\n int failedCount = 0, successCount = 0, skippedCount = 0;\n for (String inFileName : getDirectoryScanner(_sourceDir).getIncludedFiles()) {\n\n // Make sure the input file exists\n File inFile = new File(_sourceDir, inFileName);\n if (! inFile.exists()) {\n continue;\n }\n\n // Determine if the file type is supported\n if (! matches(inFileName.toLowerCase(), \"\\\\.less$\")) {\n log(\"Skipping \" + quote(inFileName) + \" because the file does not end in \\\".less\\\" (case-insensitive).\", MSG_VERBOSE);\n skippedCount++;\n continue;\n }\n\n // Some preparations related to the input file and output file\n long thisStart = System.currentTimeMillis();\n String outFileName = inFile.getName().replaceFirst(\"\\\\.less$\", \".css\");\n File outFile = new File(_destDir, outFileName);\n String outFilePath = outFile.getPath();\n String inFilePath = inFile.getPath();\n\n if (! _overwrite) {\n\n // Skip this file is the output file exists and is newer\n if (outFile.exists() && (outFile.lastModified() > inFile.lastModified())) {\n log(\"Skipping \" + quote(inFileName) + \" because output file is newer.\", MSG_VERBOSE); \n skippedCount++;\n continue;\n }\n }\n\n // Prepare for the command execution\n buffer = new Buffer();\n watchdog = (_timeOut > 0L) ? new ExecuteWatchdog(_timeOut) : null;\n execute = new Execute(buffer, watchdog);\n cmdline = createOutputFile\n ? new String[] { command, inFilePath }\n : new String[] { command, inFilePath, outFilePath };\n\n execute.setAntRun(getProject());\n execute.setCommandline(cmdline);\n\n // Execute the command\n boolean failure;\n try {\n execute.execute();\n failure = execute.isFailure();\n } catch (IOException cause) {\n failure = true;\n }\n\n // Output to stderr or stdout indicates a failure\n String errorOutput = buffer.getErrString();\n errorOutput = isEmpty(errorOutput) ? buffer.getOutString() : errorOutput;\n failure = failure ? true : ! isEmpty(errorOutput);\n \n // Create the output file if the command just sent everything to\n // standard out\n if (createOutputFile) {\n try {\n buffer.writeOutTo(new FileOutputStream(outFile));\n } catch (IOException cause) {\n throw new BuildException(\"Failed to write output to file \\\"\" + outFile.getPath() + \"\\\".\", cause);\n }\n }\n\n // Log the result for this individual file\n long thisDuration = System.currentTimeMillis() - thisStart;\n if (failure) {\n String logMessage = \"Failed to transform \" + quote(inFilePath);\n if (isEmpty(errorOutput)) {\n logMessage += '.';\n } else {\n logMessage += ':' + System.getProperty(\"line.separator\") + errorOutput;\n }\n log(logMessage, MSG_ERR);\n failedCount++;\n } else {\n log(\"Transformed \" + quote(inFileName) + \" in \" + thisDuration + \" ms.\", MSG_VERBOSE);\n successCount++;\n }\n }\n\n // Log the total result\n long duration = System.currentTimeMillis() - start;\n if (failedCount > 0) {\n throw new BuildException(\"\" + failedCount + \" file(s) failed to transform, while \" + successCount + \" succeeded. Total duration is \" + duration + \" ms.\");\n } else {\n log(\"\" + successCount + \" file(s) transformed in \" + duration + \" ms; \" + skippedCount + \" file(s) skipped.\");\n }\n }", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\texecutable.feedbackExecutionProcessRunning();\r\n\t\t\t}", "public ProcessBuilder buildCommand(File scriptFile) {\n return null;\n }", "public static IATAndroid create(Activity parent, IATOptions iatOptions) throws IOException, InterpreterException {\t\n\t\tFile _ENV_AT_HOME_ = new File(iatOptions.AT_HOME_); \n\t\t\n\t\tSystem.setProperty(\"AT_HOME\", iatOptions.AT_HOME_);\n\t\tSystem.setProperty(\"AT_INIT\", iatOptions.AT_INIT_);\n\t\tSystem.setProperty(\"AT_STACK_SIZE\", Constants._ENV_AT_STACKSIZE_);\t\t\n\t\t\n\t\tString appName = parent.getApplicationInfo().packageName;\n\t\t\t\n\t\tsetupLogging(iatOptions);\n\t\tMulticastLock mclock = setupMulticast(parent);\n\t\t\n\t\t\n\t\tLinkedList<String> args = new LinkedList<String>(Arrays.asList(\t\t\n\t\t\t\tnew String[] {\n\t\t\t\t\t\"-a\", iatOptions.ipAddress_,\n\t\t\t\t\t\"-o\", getNamespaceMappings(_ENV_AT_HOME_.toString()),\n\t\t\t\t\t\"-n\", iatOptions.networkName_,\n\t\t\t\t\t\"-nojline\"\n\t\t\t\t}));\n\t\t\n\t\tif (iatOptions.startFile_ != null)\n\t\t\targs.add(iatOptions.startFile_);\n\t\t\n\t\tsynchronized (instance_lock) {\n\t\t\tinstance = new IATAndroid(args.toArray(new String[args.size()]));\n\t\t\tinstance.parent_ = parent;\n\t\t\tinstance.appName_ = appName;\n\t\t\tinstance.mclock_ = mclock;\n\t\t}\n\t\tLog.v(\"AmbientTalk\", \"IAT created\");\n\n\t\treturn instance;\n\t}", "public void Kill() {\n\tif (process != null) {\n\t process.destroy();\n\t childStdin.Kill();\n\t childStdout.Kill();\n\t childStderr.Kill();\n\t}\n\tprocess = null;\n }", "public ProcessSequence(ProcessCreator[] pcs) {\n _creators = pcs;\n _processes = new Process[_creators.length];\n for(int i=0; i<_processes.length; ++i) { _processes[i] = null; }\n _combinedInputStream = new PipedInputStream();\n try {\n _combinedStdOutStream = new PipedOutputStream(_combinedInputStream);\n _combinedInputStream.connect(_combinedStdOutStream);\n }\n catch(IOException e) { /* ignore, no output if this goes wrong */ }\n _combinedErrorStream = new PipedInputStream();\n try {\n _combinedStdErrStream = new PipedOutputStream(_combinedErrorStream);\n _combinedErrorStream.connect(_combinedStdErrStream);\n }\n catch(IOException e) { /* ignore, no output if this goes wrong */ }\n \n _deathThread = new Thread(new Runnable() {\n public void run() {\n GeneralProcessCreator.LOG.log(\"ProcessSequence._deathThread running\");\n boolean interrupted = false;\n // wait for the completion of each of the subprocesses\n while(_index<_processes.length) {\n GeneralProcessCreator.LOG.log(\"Waiting for process \"+_index);\n do {\n interrupted = false;\n try {\n _processes[_index].waitFor();\n }\n catch(InterruptedException e) { interrupted = true; }\n } while(interrupted);\n GeneralProcessCreator.LOG.log(\"Process \"+_index+\" terminated\");\n // a process has just terminated\n if (_index<_processes.length-1) {\n // increase index;\n ++_index;\n try {\n _processes[_index] = _creators[_index].start();\n GeneralProcessCreator.LOG.log(\"Process \"+_index+\" started\");\n connectProcess(_processes[_index]);\n }\n catch(IOException e) {\n // could not start the process, record error but continue\n // TODO: find a way to record the error in the ExternalProcessPanel\n// DrJavaErrorHandler.record(e);\n _processes[_index] = DUMMY_PROCESS;\n }\n }\n else {\n ++_index;\n GeneralProcessCreator.LOG.log(\"Closing StdOut and StdErr streams.\");\n try {\n stopAllRedirectors();\n _combinedStdOutStream.flush();\n _combinedStdOutStream.close();\n _combinedStdErrStream.flush();\n _combinedStdErrStream.close();\n }\n catch(IOException e) { /* ignore, just don't close the streams */ }\n }\n }\n }\n },\"Process Sequence Death Thread\");\n _index = 0;\n try {\n _processes[_index] = _creators[_index].start();\n }\n catch(IOException e) {\n // could not start the process, record error but continue\n // TODO: find a way to record the error in the ExternalProcessPanel\n _processes[_index] = DUMMY_PROCESS;\n// DrJavaErrorHandler.record(e);\n }\n connectProcess(_processes[_index]);\n _deathThread.start();\n }", "private void cleanUpRunningProcessInstances() {\n List<ProcessInstance> runningInstances = processEngine.getRuntimeService().createProcessInstanceQuery().processDefinitionKey(PROCESS_DEFINITION_KEY).list();\n runningInstances.addAll(processEngine.getRuntimeService().createProcessInstanceQuery().processDefinitionKey(INCIDENT_PROCESS_DEFINITION).list());\n for (ProcessInstance processInstance : runningInstances) {\n processEngine.getRuntimeService().deleteProcessInstance(processInstance.getId(), \"deleted to have a clean environment for Arquillian\");\n }\n }", "public void runit(String class_name, String vm_options[])\n {\n String jre_home = System.getProperty(\"java.home\");\n String sdk_home = (jre_home.endsWith(\"jre\") ?\n (jre_home + File.separator + \"..\") :\n jre_home );\n String cdir = System.getProperty(\"test.classes\", \".\");\n String os_arch = System.getProperty(\"os.arch\");\n boolean d64 = os_arch.equals(\"sparcv9\") ||\n os_arch.equals(\"amd64\");\n String isa_dir = d64?(File.separator+os_arch):\"\";\n String java = jre_home\n + File.separator + \"bin\" + isa_dir\n + File.separator + \"java\";\n String jhat = sdk_home + File.separator + \"bin\"\n + File.separator + \"jhat\";\n /* Array of strings to be passed in for exec:\n * 1. java\n * 2. -Dtest.classes=.\n * 3. -d64 (optional)\n * 4. -Xcheck:jni (Just because it finds bugs)\n * 5. -Xverify:all (Make sure verification is on full blast)\n * 6. -agent\n * vm_options\n * 7+i. classname\n */\n int nvm_options = 0;\n if ( vm_options != null ) nvm_options = vm_options.length;\n String cmd[] = new String[1 + (d64?1:0) + 7 + nvm_options];\n int i,j;\n \n i = 0;\n cmd[i++] = java;\n cmd[i++] = \"-cp\";\n cmd[i++] = cdir;\n cmd[i++] = \"-Dtest.classes=\" + cdir;\n if ( d64 ) {\n cmd[i++] = \"-d64\";\n }\n cmd[i++] = \"-Xcheck:jni\";\n cmd[i++] = \"-Xverify:all\";\n dumpfile= cdir + File.separator + class_name + \".hdump\";\n cmd[i++] = \"-agentlib:hprof=\" + all_hprof_options\n + \",format=b,file=\" + dumpfile;\n /* Add any special VM options */\n for ( j = 0; j < nvm_options; j++ ) {\n cmd[i++] = vm_options[j];\n }\n /* Add classname */\n cmd[i++] = class_name;\n \n /* Execute process */\n execute(cmd);\n \n /* Run jhat */\n String jhat_cmd[] = new String[4];\n jhat_cmd[0] = jhat;\n jhat_cmd[1] = \"-debug\";\n jhat_cmd[2] = \"2\";\n jhat_cmd[3] = dumpfile;\n \n /* Execute process */\n execute(jhat_cmd);\n \n }", "public static void main(String[] args) {\t\n\t\tlaunch(args);\n\t\tSystem.exit(0);\n\t}", "public static void main(String... a) throws Exception {\n TestBase test = TestBase.createCaller().init();\n test.config.lockTimeout = 120000;\n test.config.memory = true;\n test.test();\n }", "@Test\n\tpublic void t3() {\n\n\t\tlogger.info(\"start\");\n\n\t\ttestFinalize();\n\t\tSystem.gc();\n\n\t\tlogger.info(\"done\");\n\n\t}", "void destroy() {\n \t\ttry {\r\n \t\t\tupKeep.stopRunning();\r\n \t\t} catch (InterruptedException e) {\r\n \t\t}\r\n \r\n \t\t// Kill all running processes.\r\n \t\tfor (MaximaProcess mp : pool) {\r\n \t\t\tmp.kill();\r\n \t\t}\r\n \t\tpool.clear();\r\n \r\n \t\t// Kill all used processes.\r\n \t\tfor (MaximaProcess mp : usedPool) {\r\n \t\t\tmp.kill();\r\n \t\t}\r\n \t\tusedPool.clear();\r\n \t}", "private synchronized void startRuntimeIfNeeded() {\n if (childProcess != null) {\n return;\n }\n\n // If JSII_DEBUG is set, enable traces.\n final String jsiiDebug = System.getenv(\"JSII_DEBUG\");\n final boolean traceEnabled = jsiiDebug != null\n && !jsiiDebug.isEmpty()\n && !jsiiDebug.equalsIgnoreCase(\"false\")\n && !jsiiDebug.equalsIgnoreCase(\"0\");\n\n final List<String> jsiiRuntimeCommand = jsiiRuntimeCommand();\n if (traceEnabled) {\n System.err.println(\"jsii-runtime: \" + String.join(\" \", jsiiRuntimeCommand));\n }\n\n try {\n final ProcessBuilder pb = new ProcessBuilder()\n .command(jsiiRuntimeCommand)\n .redirectError(ProcessBuilder.Redirect.PIPE)\n .redirectOutput(ProcessBuilder.Redirect.PIPE)\n .redirectInput(ProcessBuilder.Redirect.PIPE);\n pb.environment().put(\"JSII_AGENT\", String.format(\"Java/%s\", System.getProperty(\"java.version\")));\n if (jsiiDebug != null) {\n pb.environment().put(\"JSII_DEBUG\", jsiiDebug);\n }\n\n this.childProcess = pb.start();\n\n this.stdin = new OutputStreamWriter(this.childProcess.getOutputStream(), StandardCharsets.UTF_8);\n this.stdout = new BufferedReader(new InputStreamReader(this.childProcess.getInputStream(), StandardCharsets.UTF_8));\n\n this.errorStreamSink = new ErrorStreamSink(this.childProcess.getErrorStream());\n this.errorStreamSink.start();\n } catch (final IOException ioe) {\n throw new UncheckedIOException(ioe);\n }\n\n this.shutdownHook = new Thread(this::terminate, \"Terminate jsii client\");\n Runtime.getRuntime().addShutdownHook(this.shutdownHook);\n\n handshake();\n\n this.client = new JsiiClient(this);\n }", "private Process startCreateClusterTaskAzure(CreateClusterRequest clusterRequest) throws ClusterException {\n\t\tProcess process = null;\n\n\t\ttry {\n\t\t\tObjectMapper mapper = new ObjectMapper();\n\t\t\tString clusterRequestStr = mapper.writeValueAsString(clusterRequest);\n\t\t\tString provisionRequestStrWithQt = \"'\" + clusterRequestStr + \"'\";\n\t\t\tProcessBuilder builder = new ProcessBuilder(new String[0]);\n\n\t\t\tString command = \"ansible-playbook -i \" + \"\\\"\" + getInventoryPath(clusterRequest.getClusterID()) + \"\\\" \"\n\t\t\t\t\t+ appConfig\n\t\t\t\t\t\t\t.getConfigValue(\"createClusterPlayBook\" + getPropertySuffix(clusterRequest.getCloudSrvc()))\n\t\t\t\t\t+ \" --e \" + provisionRequestStrWithQt;\n// Process p = Runtime.getRuntime().exec(ansible_run, null);\n\t\t\tlogger.info(\"Create Cluster Command:: \" + command);\n\t\t\tbuilder.command(new String[] { \"sh\", \"-c\", command });\n\t\t\tlogger.info(\"Config param for directory:\" + \"createClusterFolder\"\n\t\t\t\t\t+ getPropertySuffix(clusterRequest.getCloudSrvc()));\n\t\t\tString directory = appConfig\n\t\t\t\t\t.getConfigValue(\"createClusterFolder\" + getPropertySuffix(clusterRequest.getCloudSrvc()));\n\n\t\t\tlogger.info(\"Create cluster directory::\" + directory);\n\t\t\tbuilder.directory(new File(directory));\n\n\t\t\tprocess = builder.start();\n\n\t\t\tlogger.info(\"Running create azure cluster playbook ...\");\n\n\t\t\tStreamGobbler streamGobbler = new StreamGobbler(process.getInputStream(), System.out::println);\n\t\t\tExecutors.newSingleThreadExecutor().submit(streamGobbler);\n\t\t} catch (Exception ex) {\n\t\t\t// ex.printStackTrace();\n\t\t\tthrow new ClusterException(\"Exception occurred in startCreateClusterTaskAzure\", ex);\n\t\t}\n\t\treturn process;\n\t}", "private void runCmtCommand() {\r\n String command = null;\r\n if (!this.output.getParentFile().exists()) {\r\n this.output.getParentFile().mkdirs();\r\n }\r\n ExecTask task = getExecTask(\"cmttool\", \"cmt\", new File(\".\"));\r\n command = \"cmt\";\r\n task.createArg().setValue(\"-f\");\r\n command += \" \" + \"-f\";\r\n task.createArg().setValue(input.toString());\r\n command += \" \" + input.toString();\r\n task.createArg().setValue(\"-o\");\r\n command += \" \" + \"-o\";\r\n task.createArg().setValue(output.toString());\r\n command += \" \" + output;\r\n task.setProject(getProject());\r\n log(\"run command: \" + command);\r\n task.execute();\r\n }", "@Override\n public int execute(Parameters parameters) {\n\n final List<String> command = new ArrayList<>();\n final String b = binary.get();\n if (b == null) {\n throw new IllegalStateException(\"No binary found\");\n }\n command.add(binary.get());\n final ProcessBuilder pb = new ProcessBuilder(command);\n if (workdir != null) {\n pb.directory(workdir);\n }\n final Process p;\n try {\n if (commonArgs != null) {\n command.addAll(commonArgs.stream().map(Supplier::get).toList());\n }\n Collections.addAll(command, parameters.args);\n logger.info(toString(command));\n p = pb.start();\n parameters.onProcessCreation.accept(p);\n\n final ProcessTimeoutHandle handle;\n if (processTimeout != null) {\n handle = startProcessTimeoutMonitor(p, String.valueOf(command), processTimeout);\n } else {\n handle = null;\n }\n final Copier inputCopier = parameters.in != null ?\n copyThread(\n \"input -> process input copier\",\n parameters.in,\n p.getOutputStream(),\n (c) -> closeSilently(p.getOutputStream()),\n (e) -> {},\n p\n ) : null;\n\n final Copier copier;\n if (parameters.out != null) {\n InputStream commandOutput;\n if (useFileCache) {\n commandOutput = FileCachingInputStream\n .builder()\n .input(p.getInputStream())\n .noProgressLogging()\n .build();\n } else {\n commandOutput = p.getInputStream();\n }\n copier = copyThread(\"process output parameters out copier\",\n commandOutput,\n parameters.out,\n (c) -> closeSilently(commandOutput),\n (e) -> {\n Process process = p.destroyForcibly();\n logger.info(\"Killed {} because {}: {}\", process, e.getClass(), e.getMessage());\n }, p);\n } else {\n copier = null;\n }\n\n final Copier errorCopier = copyThread(\n \"error copier\",\n p.getErrorStream(),\n parameters.errors,\n (c) -> closeSilently(p.getErrorStream()),\n (e) -> {},\n p\n );\n if (inputCopier != null) {\n if (needsClose(p.getInputStream())) {\n inputCopier.waitForAndClose();\n } else {\n inputCopier.waitFor();\n }\n }\n\n p.waitFor();\n\n if (copier != null) {\n copier.waitForAndClose();\n }\n errorCopier.waitForAndClose();\n int result = p.exitValue();\n logger.log(exitCodeLogLevel.apply(result), \"Exit code {} for calling {}\", result, commandToString(command));\n\n if (parameters.out != null) {\n parameters.out.flush();\n }\n parameters.errors.flush();\n if (handle != null) {\n handle.cancel();\n }\n return result;\n } catch (InterruptedException e) {\n Thread.currentThread().interrupt();\n throw new RuntimeException(e);\n } catch (IOException e) {\n if (isBrokenPipe(e)) {\n logger.debug(e.getMessage());\n throw new BrokenPipe(e);\n } else {\n logger.error(e.getClass().getName() + \":\" + e.getMessage(), e);\n throw new RuntimeException(e);\n\n }\n } finally {\n this.logger.debug(\"Ready\");\n }\n }", "private void startProcess() {\r\n \t\tstartCount++;\r\n \t\tString threadName = Thread.currentThread().getName() + \"-starter-\" + startCount;\r\n \t\tThread starter = new Thread(threadName) {\r\n \t\t\t@Override\r\n \t\t\tpublic void run() {\r\n \t\t\t\tstartupThrotle.acquireUninterruptibly();\r\n \t\t\t\tlong startTime = System.currentTimeMillis();\r\n \t\t\t\tMaximaProcess mp = makeProcess();\r\n \t\t\t\tstartupTimeHistory.add(System.currentTimeMillis() - startTime);\r\n \t\t\t\tmp.deactivate();\r\n \t\t\t\tpool.add(mp);\r\n \t\t\t\tstartupThrotle.release();\r\n \t\t\t}\r\n \t\t};\r\n \t\tstarter.start();\r\n \t}", "public static FileNode newTmpFile(FileNode parent) {\n FileNode file;\n\n while (true) {\n file = parent.join(\"_tmp_\" + tmpNo);\n try {\n file.mkfile();\n file.getWorld().onShutdown().deleteAtExit(file);\n return file;\n } catch (MkfileException e) {\n // continue\n tmpNo++;\n }\n }\n }", "public void testBuildAndRun() {\n SourcePackagesNode sourcePackagesNode = new SourcePackagesNode(SAMPLE_PROJECT_NAME);\n Node sample1Node = new Node(sourcePackagesNode, SAMPLE1_PACKAGE_NAME);\n JavaNode sampleClass1Node = new JavaNode(sample1Node, SAMPLE1_FILE_NAME);\n // increase timeout to 60 seconds\n MainWindowOperator.getDefault().getTimeouts().setTimeout(\"Waiter.WaitingTime\", 60000);\n // start to track Main Window status bar\n MainWindowOperator.StatusTextTracer stt = MainWindowOperator.getDefault().getStatusTextTracer();\n stt.start();\n // call Build|Compile main menu item\n new CompileJavaAction().perform(sampleClass1Node);\n // \"SampleProject (compile-single)\"\n String compileSingleTarget = Bundle.getString(\n \"org.apache.tools.ant.module.run.Bundle\",\n \"TITLE_output_target\",\n new Object[]{SAMPLE_PROJECT_NAME, null, \"compile-single\"}); // NOI18N\n // \"Finished building SampleProject (compile-single)\"\n String finishedCompileSingleLabel = Bundle.getString(\n \"org.apache.tools.ant.module.run.Bundle\",\n \"FMT_finished_target_status\",\n new String[]{compileSingleTarget});\n // wait message \"Finished building SampleProject (compile-single)\"\n stt.waitText(finishedCompileSingleLabel); \n\n // \"Run\"\n // TODO bundle property name should be changed back to Menu/RunProject after updating bundle\n String runItem = Bundle.getStringTrimmed(\"org.netbeans.modules.project.ui.Bundle\", \"Menu/BuildProject\");\n // \"Run File\"\n String runFileItem = Bundle.getStringTrimmed(\"org.netbeans.modules.project.ui.actions.Bundle\",\n \"LBL_RunSingleAction_Name\",\n new Object[]{new Integer(1), SAMPLE1_FILE_NAME});\n // call \"Run|Run File|Run \"SampleClass1.java\"\"\n new Action(runItem + \"|\" + runFileItem, null).perform(sampleClass1Node);\n // \"SampleProject (run-single)\"\n String runSingleTarget = Bundle.getString(\n \"org.apache.tools.ant.module.run.Bundle\",\n \"TITLE_output_target\",\n new Object[]{SAMPLE_PROJECT_NAME, null, \"run-single\"}); // NOI18N\n // \"Finished building SampleProject (run-single)\"\n String finishedRunSingleLabel = Bundle.getString(\n \"org.apache.tools.ant.module.run.Bundle\",\n \"FMT_finished_target_status\",\n new String[]{runSingleTarget});\n // wait message \"Finished building SampleProject (run-single)\"\n stt.waitText(finishedRunSingleLabel); // NOI18N\n // check Hello and Good bye was printed out to the output window\n\n OutputTabOperator outputOper = new OutputTabOperator(\"run-single\"); //NOI18N\n outputOper.waitText(\"Hello\"); //NOI18N\n outputOper.waitText(\"Good bye\"); //NOI18N\n\n // \"Run\"\n String buildItem = Bundle.getStringTrimmed(\"org.netbeans.modules.project.ui.Bundle\", \"Menu/BuildProject\");\n // \"Build Main Project\"\n String buildMainProjectItem = Bundle.getStringTrimmed(\"org.netbeans.modules.project.ui.actions.Bundle\", \"LBL_BuildMainProjectAction_Name\");\n // call \"Run|Build Main Project\" main menu item\n new Action(buildItem + \"|\" + buildMainProjectItem, null).perform();\n // \"SampleProject (jar)\"\n String jarTarget = Bundle.getString(\n \"org.apache.tools.ant.module.run.Bundle\",\n \"TITLE_output_target\",\n new Object[]{SAMPLE_PROJECT_NAME, null, \"jar\"}); // NOI18N\n // \"Finished building SampleProject (jar)\"\n String finishedJarLabel = Bundle.getString(\n \"org.apache.tools.ant.module.run.Bundle\",\n \"FMT_finished_target_status\",\n new String[]{jarTarget});\n // wait message \"Finished building SampleProject (jar)\"\n stt.waitText(finishedJarLabel);\n\n // Run Main Project\n String runMainProjectItem = Bundle.getStringTrimmed(\"org.netbeans.modules.project.ui.actions.Bundle\", \"LBL_RunMainProjectAction_Name\");\n // call \"Run|Run Main Project\" main menu item\n new Action(runItem + \"|\" + runMainProjectItem, null).perform();\n // \"SampleProject (run)\"\n String runTarget = Bundle.getString(\n \"org.apache.tools.ant.module.run.Bundle\",\n \"TITLE_output_target\",\n new Object[]{SAMPLE_PROJECT_NAME, null, \"run\"}); // NOI18N\n // \"Finished building SampleProject (run)\"\n String finishedRunLabel = Bundle.getString(\n \"org.apache.tools.ant.module.run.Bundle\",\n \"FMT_finished_target_status\",\n new String[]{runTarget});\n // wait message \"Finished building SampleProject (run)\"\n stt.waitText(finishedRunLabel);\n\n stt.stop();\n }", "@Override\r\n public void executeCommand() {\r\n shell.stopRunning();\r\n }", "@Override\n\t@Ignore\n\t@Test\n\tpublic void testLaunchShowsInProcessContainer() throws Throwable {\n\t}", "void launchAsMaster();", "public ProcessBuilder buildCommand() {\n return null;\n }", "public int Init() {\n\ttry {\n\t process = Runtime.getRuntime().exec(command);\n\t} catch (Exception e) {\n\t return 0;\n\t}\n\tif (process == null) {\n\t return 0;\n\t}\n\tchildStdin = new OutputStreamWatcher(process.getOutputStream());\n\tchildStdout = new InputStreamWatcher(process.getInputStream());\n\tchildStderr = new InputStreamWatcher(process.getErrorStream());\n\tchildStdin.start();\n\tchildStdout.start();\n\tchildStderr.start();\n\treturn 1;\n }", "default void buildMainGenerateCustomRuntimeImage() {\n if (!bach().project().settings().tools().enabled(\"jlink\")) return;\n say(\"Assemble custom runtime image\");\n var image = bach().folders().workspace(\"image\");\n Paths.deleteDirectories(image);\n bach().run(buildMainJLink(image));\n }", "private void clearMemory() {\n\t\tRunningAppMgr.getInstance(this).killAll();\n\t\tsetMemory();\n\t}", "public static boolean startApplication(String execName, String args, String startDir) {\n\r\n try {\r\n ProcessBuilder pb = new ProcessBuilder(execName, startDir, args);\r\n pb.directory(new File(startDir));\r\n Process p = pb.start();\r\n\r\n int rc = p.waitFor();\r\n System.out.println(\"rc is \" + rc);\r\n\r\n return true;\r\n\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n return false;\r\n } // endtry\r\n }", "public interface ExecService {\n /**\n * Parse an XML file into a build model.\n *\n * @param xmlBuildFile\n * \t\tThe file containing the XML build description.\n * @return A Project model for the build.\n * @exception ExecutionException\n * \t\tif the build cannot be parsed\n */\n org.apache.ant.common.model.Project parseXMLBuildFile(java.io.File xmlBuildFile) throws org.apache.ant.common.util.ExecutionException;\n\n /**\n * Create a project reference.\n *\n * @param referenceName\n * \t\tthe name under which the project will be\n * \t\treferenced.\n * @param model\n * \t\tthe project model.\n * @exception ExecutionException\n * \t\tif the project cannot be referenced.\n */\n void createProjectReference(java.lang.String referenceName, org.apache.ant.common.model.Project model) throws org.apache.ant.common.util.ExecutionException;\n\n /**\n * Setup a sub-build.\n *\n * @param model\n * \t\tthe project model to be used for the build\n * @param properties\n * \t\tthe initiali properties to be used in the build\n * @return a key to the build allowing it to be executed and managed\n * @exception ExecutionException\n * \t\tif the subbuild cannot be setup\n */\n java.lang.Object setupBuild(org.apache.ant.common.model.Project model, java.util.Map properties) throws org.apache.ant.common.util.ExecutionException;\n\n /**\n * Setup a sub-build using the current frame's project model\n *\n * @param properties\n * \t\tthe initiali properties to be used in the build\n * @return a key to the build allowing it to be executed and managed\n * @exception ExecutionException\n * \t\tif the subbuild cannot be setup\n */\n java.lang.Object setupBuild(java.util.Map properties) throws org.apache.ant.common.util.ExecutionException;\n\n /**\n * Run a build which have been previously setup\n *\n * @param buildKey\n * \t\tthe buildKey returned previously when the build was\n * \t\tsetup\n * @param targets\n * \t\tA list of targets to be run\n * @exception ExecutionException\n * \t\tif the build cannot be run\n */\n void runBuild(java.lang.Object buildKey, java.util.List targets) throws org.apache.ant.common.util.ExecutionException;\n\n /**\n * execute a task. The task should have already been initialised by the\n * core\n *\n * @param task\n * \t\tthe task to be executed.\n * @exception ExecutionException\n * \t\tif there is a problem in execution.\n */\n void executeTask(org.apache.ant.common.antlib.Task task) throws org.apache.ant.common.util.ExecutionException;\n\n /**\n * get the name of the project associated with this execution.\n *\n * @return the project's name\n */\n java.lang.String getProjectName();\n\n /**\n * Get the basedir for the current execution\n *\n * @return the base directory for this execution of Ant\n */\n java.io.File getBaseDir();\n\n /**\n * Handle subbuild output.\n *\n * @param subbuildKey\n * \t\tthe core's key for managing the subbuild.\n * @param line\n * \t\tthe content produce by the current thread.\n * @param isErr\n * \t\ttrue if this content is from the thread's error stream.\n * @exception ExecutionException\n * \t\tif the subbuild cannot be found.\n */\n void handleBuildOutput(java.lang.Object subbuildKey, java.lang.String line, boolean isErr) throws org.apache.ant.common.util.ExecutionException;\n}", "public static void main(String[] src) throws UnsupportedEncodingException {\n List<String> cmd = new ArrayList<>();\n cmd.add(\"C:\\\\Program Files (x86)\\\\Mozilla Firefox\\\\firefox.exe\");\n cmd.add(\"-no-remote\");\n cmd.add(\"-P\");\n cmd.add(\"aesha2\");\n// cmd.add(\"\\\"fileName\\\"\");\n ProcessBuilder builder = new ProcessBuilder().command(cmd);\n Process process = null;\n int exitCode=-1;\n\n try {\n process = builder.start();\n final Process finalProcess = process;\n Thread t=new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n Thread.sleep(10000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n finalProcess.destroy();\n }\n });\n t.start();\n exitCode = process.waitFor();\n } catch (InterruptedException e) {\n String ed=new String(e.getMessage());\n System.out.println(ed);\n } catch (IOException e) {\n String ed=new String(e.getMessage());\n System.out.println(ed);\n }\n process.destroy();\n System.out.println(exitCode);\n }", "public static void main(String... args) {\n exKeepingAppAliveTwo();\n }", "@DSComment(\"Package priviledge\")\n @DSBan(DSCat.DEFAULT_MODIFIER)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:56:28.353 -0500\", hash_original_method = \"A99C097CFE2867999295EE26A5D88F1F\", hash_generated_method = \"A99C097CFE2867999295EE26A5D88F1F\")\n \nvoid start(long stackSize) {\n VMThread.create(thread, stackSize);\n }", "public static void main(String[] args) {\n\t\tUnsafe unsafe = getUnsafe();\r\n\t\ttry {\r\n\t\tSystem.out.println(\"分配内存\");\r\n\t\tlong base = unsafe.allocateMemory(_1GB);\r\n\t\tSystem.in.read();\r\n\t\tSystem.out.println(\"释放内存\");\r\n\t\tunsafe.freeMemory(base);\r\n\t\tSystem.in.read();\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}", "void launch();", "void launch();", "void launch();", "private <T> T run(LinkedList<String> args,JSONFactory<T> f,boolean canRerun){\r\n \t\r\n \t\tif (bwPath==null){\r\n \t\t\tif (!showedNoExeError){\r\n \t\t\t\tBuildWrapperPlugin.logError(BWText.error_noexe, null);\r\n \t\t\t\tshowedNoExeError=true;\r\n \t\t\t}\r\n \t\t\treturn null;\r\n \t\t}\r\n \t\tshowedNoExeError=false;\r\n \t\tboolean isConfigureAction=args.size()>0 && (\"synchronize\".equals(args.get(0)) || \"configure\".equals(args.get(0)) || \"build\".equals(args.get(0)));\r\n \t\targs.addFirst(bwPath);\r\n \t\targs.add(\"--tempfolder=\"+DIST_FOLDER);\r\n \t\tif (cabalImplDetails!=null){\r\n \t\t\targs.add(\"--cabalpath=\"+cabalImplDetails.getExecutable());\r\n \t\t}\r\n \t\targs.add(\"--cabalfile=\"+cabalFile);\r\n \t\targs.add(\"--cabalflags=\"+flags);\r\n \t\tfor (String s:extraOpts){\r\n \t\t\targs.add(\"--cabaloption=\"+s);\r\n \t\t}\r\n \t\tif (cabalImplDetails!=null){\r\n \t\t\tfor (String s:cabalImplDetails.getOptions()){\r\n \t\t\t\targs.add(\"--cabaloption=\"+s);\r\n \t\t\t}\r\n \t\t}\r\n \t\tProcessBuilder pb=new ProcessBuilder();\r\n \t\tpb.directory(workingDir);\r\n \t\tpb.redirectErrorStream(true);\r\n \t\tpb.command(args);\r\n \t\taddBuildWrapperPath(pb);\r\n \t\tif (ow!=null && BuildWrapperPlugin.logAnswers) {\r\n \t\t\tow.addMessage(LangUtil.join(args, \" \"));\r\n \t\t}\t\t\t\t\t\r\n \t\tT obj=null;\r\n \t\ttry {\r\n \t\t\tProcess p=pb.start();\r\n \t\t\tBufferedReader br=new BufferedReader(new InputStreamReader(p.getInputStream(),FileUtil.UTF8));\r\n \t\t\t//long t0=System.currentTimeMillis();\r\n \t\t\tString l=br.readLine();\r\n \t\t\tboolean goOn=true;\r\n \t\t\tboolean needConfigure=false;\r\n \t\t\tboolean needDelete=false;\r\n \t\t\twhile (goOn && l!=null){\r\n \t\t\t\t/*if (outStream!=null){\r\n \t\t\t\t\toutStream.write(l);\r\n \t\t\t\t\toutStream.write(PlatformUtil.NL);\r\n \t\t\t\t\toutStream.flush();\r\n \t\t\t\t}*/\r\n \t\t\t\t\r\n \t\t\t\tif (l.startsWith(prefix)){\r\n \t\t\t\t\tif (ow!=null && BuildWrapperPlugin.logAnswers) {\r\n \t\t\t\t\t\tow.addMessage(l);\r\n \t\t\t\t\t}\t\t\t\t\t\r\n \t\t\t\t\tString jsons=l.substring(prefix.length()).trim();\r\n \t\t\t\t\ttry {\r\n \t\t\t\t\t\tobj=f.fromJSON(jsons);\r\n \t\t\t\t\t} catch (JSONException je){\r\n \t\t\t\t\t\tBuildWrapperPlugin.logError(BWText.process_parse_error, je);\r\n \t\t\t\t\t}\r\n \t\t\t\t\tgoOn=false;\r\n \r\n \t\t\t\t} else {\r\n \t\t\t\t\tString ll=l.toLowerCase(Locale.ENGLISH);\r\n \t\t\t\t\tif (ll.contains(CabalMessages.RERUN_CONFIGURE) || ll.contains(CabalMessages.CANNOT_SATISFY)){\r\n \t\t\t\t\t\tif (ll.contains(CabalMessages.VERSION)){\r\n \t\t\t\t\t\t\tneedDelete=true;\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tneedConfigure=true;\r\n \t\t\t\t\t}\r\n \t\t\t\t\tif (ow!=null) {\r\n \t\t\t\t\t\tow.addMessage(l);\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t\t\tif (goOn){\r\n \t\t\t\t\tl=br.readLine();\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\tif (needConfigure && canRerun && !isConfigureAction){\r\n \t\t\t\tif (needDelete){\r\n \t\t\t\t\ttry {\r\n \t\t\t\t\t\tIFolder fldr=project.getFolder(DIST_FOLDER);\r\n \t\t\t\t\t\tif (fldr.exists()){\r\n \t\t\t\t\t\t\tfldr.delete(IResource.FORCE, new NullProgressMonitor());\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t} catch (CoreException ce){\r\n \t\t\t\t\t\tBuildWrapperPlugin.logError(BWText.process_launch_error, ce);\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t\t\tconfigure(new BuildOptions());\r\n \t\t\t\treturn run(new LinkedList<String>(args.subList(1, args.size()-4)),f,false);\r\n \t\t\t} else if (needDelete){\r\n \t\t\t\tconfigureFailures++;\r\n \t\t\t\tif (BuildWrapperPlugin.getMaxConfigureFailures()>=0 && configureFailures>=BuildWrapperPlugin.getMaxConfigureFailures()){\r\n \t\t\t\t\tBuildWrapperPlugin.logError(BWText.error_toomanyfailures, null);\r\n \t\t\t\t\tshowedNoExeError=true;\r\n \t\t\t\t\tbwPath=null;\r\n \t\t\t\t}\r\n \t\t\t// we reran and we don't need to configure after that call, we reset the count\r\n \t\t\t} else if (!canRerun && !needConfigure){\r\n \t\t\t\tconfigureFailures=0;\r\n \t\t\t}\r\n \t\t\t// maybe now the folder exists...\r\n \t\t\tif (needSetDerivedOnDistDir){\r\n \t\t\t\tsetDerived();\r\n \t\t\t}\r\n \t\t\t//long t1=System.currentTimeMillis();\r\n \t\t\t//BuildWrapperPlugin.logInfo(\"read run:\"+(t1-t0)+\"ms\");\r\n \t\t} catch (IOException ioe){\r\n \t\t\tBuildWrapperPlugin.logError(BWText.process_launch_error, ioe);\r\n \t\t}\r\n \t\treturn obj;\r\n \t}", "private void exec(String inputFile, String outputPath) {\n\t\tRuntime runtime = Runtime.getRuntime();\n\t\tString[] args = {\"java\", \"-jar\",freelingpath,freelingconf, outputPath, inputFile};\n\t\ttry {\n\t\t\tProcess p = runtime.exec(args);\n\t\t\tp.waitFor();\n\t\t\t//System.out.println(p.exitValue());\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\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 static void main(String[] args) \n {\n \t\t\t\t int pid;\n \t\t/* I create a PID object to processed */\n Pid_manager2 pm = new Pid_manager2();\n if(pm.allocate_map() != -1)\n {\n pid = pm.allocate_pid();\n if(pid!=-1){\n System.out.println(\"Process allocated with PID :\"+ pid);\n pm.release_pid(pid);\n System.out.println(\"Process with PID :\" + pid + \" released\");\n }\n else\n {\n System.out.println(\"Process cannot be allocated\");\n }\n }\n else{\n System.out.println(\"Error in allocating PID map\");\n }\n int sleep(int z){\n \t\n }\n\n }", "public static void main(String[] args) throws Exception {\n\t\tSystem.out.println(\"All processes: \");\n\t\tProcessHandle.allProcesses().filter(pa -> pa.info().command().isPresent()).forEach(pa -> System.out\n\t\t\t\t.println(pa.pid() + \": \" + pa.info().command() + \" - \" + pa.info().user().orElse(\"N/A\")));\n\n\t\t// spawn a new process and show more process infos\n\t\tProcessBuilder pb = new ProcessBuilder(\"jshell\");\n\t\tProcess p = pb.inheritIO().start();\n\t\tSystem.out.println(\"\\nProcess \" + p.pid() + \" started\");\n\t\tProcessHandle.Info info = p.info();\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(\"PID: \" + p.pid()).append(\"\\n\").append(\"Command: \").append(info.command().orElse(\"N/A\")).append(\"\\n\")\n\t\t\t\t.append(\"Start: \").append(info.startInstant().isPresent() ? info.startInstant() : \"N/A\").append(\"\\n\")\n\t\t\t\t.append(info.user().orElse(\"N/A\")).append(\"\\n\").append(\"Output: \").append(\"\\n\");\n\t\tSystem.out.println(sb.toString());\n\n\t\t// trigger an oncomplete action and kill the process, wait for demo purposes\n\t\tp.onExit().thenAccept(ps -> System.out.println(\"Process \" + ps.pid() + \" killed\"));\n\t\tThread.sleep(2000);\n\t\tSystem.out.println(\"\\nDuration: \" + info.totalCpuDuration().orElse(Duration.ofMillis(0)));\n\t\tSystem.out.println(\"Kill process \" + p.pid());\n\t\tp.destroy();\n\t\tThread.sleep(2000);\n\t}" ]
[ "0.52748245", "0.5252539", "0.52348703", "0.5185256", "0.5181709", "0.5114291", "0.5070683", "0.50496864", "0.4979312", "0.49601468", "0.49441004", "0.4930639", "0.49263927", "0.49111375", "0.48909098", "0.48754218", "0.48261616", "0.4815093", "0.48106068", "0.47674495", "0.47487065", "0.47363755", "0.471731", "0.47100314", "0.4705893", "0.4702553", "0.4695522", "0.46955085", "0.46912378", "0.46701336", "0.4670086", "0.4658038", "0.4655785", "0.4654797", "0.46338472", "0.46313134", "0.46312258", "0.4626383", "0.46262762", "0.4622773", "0.4602947", "0.45997575", "0.4586498", "0.4581155", "0.4576845", "0.45667183", "0.45656958", "0.45642397", "0.45495856", "0.45494476", "0.45479557", "0.4543957", "0.45420417", "0.45285356", "0.45256433", "0.4524935", "0.45234612", "0.4522986", "0.45191917", "0.45048475", "0.45020685", "0.44908214", "0.44763562", "0.4474579", "0.44724026", "0.44711804", "0.4470352", "0.4464171", "0.44546002", "0.44504502", "0.44500795", "0.44495603", "0.44466454", "0.4446543", "0.44433817", "0.4441785", "0.44406962", "0.4440682", "0.44387394", "0.4428599", "0.4422687", "0.44217762", "0.4419066", "0.4414891", "0.44102892", "0.44081894", "0.44032168", "0.4402812", "0.44012874", "0.4399816", "0.439374", "0.43866363", "0.43863612", "0.4378581", "0.4378581", "0.4378581", "0.43723223", "0.43687472", "0.4365402", "0.4359111" ]
0.43735573
96
TODO Autogenerated method stub
@Override public void onClick(View v) { DBCreate(); SubmitData2SQLiteDB(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void onClick(View v) { Intent intent = new Intent(MainActivity.this, EditDataActivity.class); startActivity(intent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void onClick(View v) { Intent intent = new Intent(MainActivity.this, ListViewActivity.class); startActivity(intent); }
{ "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
Created by kason_zhang on 11/16/2016.
public interface MainActivityView { void showLoading(); void hideLoading(); void toMainActivity(String data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "@Override\n public void init() {\n\n }", "@Override\n protected void initialize() {\n\n \n }", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\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\tpublic void nadar() {\n\t\t\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n public void init() {\n }", "@Override\n void init() {\n }", "@Override\n public void func_104112_b() {\n \n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "private void init() {\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 void poetries() {\n\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public void mo38117a() {\n }", "@Override\n public void init() {}", "@Override\n protected void init() {\n }", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\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\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\r\n\tpublic void init() {}", "@Override\n\tprotected void initialize() {\n\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "public void mo4359a() {\n }", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n public void initialize() { \n }", "@Override\n public int describeContents() { return 0; }", "Constructor() {\r\n\t\t \r\n\t }", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "private void kk12() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\t\tpublic void init() {\n\t\t}", "@Override\n public void initialize() {\n \n }", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "private void m50366E() {\n }", "private void init() {\n\n\n\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n public void init() {\n }", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "@Override\n\tpublic void debite() {\n\t\t\n\t}" ]
[ "0.6198659", "0.60742897", "0.5981814", "0.5976576", "0.59021735", "0.59021735", "0.5885065", "0.5833068", "0.58102", "0.5807851", "0.57973456", "0.576051", "0.575708", "0.5749562", "0.57412785", "0.57360536", "0.57360536", "0.57360536", "0.57360536", "0.57360536", "0.5733698", "0.5731824", "0.570624", "0.5701006", "0.5700653", "0.56932145", "0.5691036", "0.5691036", "0.5691036", "0.5691036", "0.5691036", "0.5691036", "0.56878316", "0.5681003", "0.5675226", "0.5664967", "0.5664967", "0.5654775", "0.56537277", "0.56481487", "0.5647314", "0.5647314", "0.5641902", "0.5632464", "0.5627753", "0.5624877", "0.5624566", "0.5622217", "0.5622217", "0.5622217", "0.56198865", "0.56198865", "0.5611387", "0.5611387", "0.5611387", "0.5605182", "0.56028956", "0.5596569", "0.55918485", "0.5590224", "0.5590224", "0.5590224", "0.5585532", "0.55812657", "0.557414", "0.5568932", "0.5555655", "0.554621", "0.55422604", "0.5537245", "0.5529405", "0.5523906", "0.5509657", "0.5506668", "0.5502051", "0.55008626", "0.54982203", "0.54927355", "0.5478998", "0.5475265", "0.5469944", "0.5457224", "0.5457224", "0.5453716", "0.54419106", "0.5437583", "0.5435808", "0.5429321", "0.54250324", "0.54250324", "0.54250324", "0.54250324", "0.54250324", "0.54250324", "0.54250324", "0.54232997", "0.5420014", "0.5416198", "0.5416198", "0.5416198", "0.54114777" ]
0.0
-1
Path: ^(([^:/?]+):)?(//([^/?]))?([^?])(\?([^]))?((.))? ________ Query: ^(([^:/?]+):)?(//([^/?]))?([^?])(\?([^]))?((.))? _______ Fragment: ^(([^:/?]+):)?(//([^/?]))?([^?])(\?([^]))?((.))? ______
public static void parseFullPath(char[] path, IUriListener listener) { UriParser parser = new UriParser(listener); parser.parseFullPath(path, 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initializePath(String p_uriSpec, int p_nStartIndex)\n throws MalformedURIException {\n if (p_uriSpec == null) {\n throw new MalformedURIException(\n \"Cannot initialize path from null string!\");\n }\n \n int index = p_nStartIndex;\n int start = p_nStartIndex;\n int end = p_uriSpec.length();\n char testChar = '\\0';\n \n // path - everything up to query string or fragment\n if (start < end) {\n // RFC 2732 only allows '[' and ']' to appear in the opaque part.\n if (getScheme() == null || p_uriSpec.charAt(start) == '/') {\n \n // Scan path.\n // abs_path = \"/\" path_segments\n // rel_path = rel_segment [ abs_path ]\n while (index < end) {\n testChar = p_uriSpec.charAt(index);\n \n // check for valid escape sequence\n if (testChar == '%') {\n if (index+2 >= end ||\n !isHex(p_uriSpec.charAt(index+1)) ||\n !isHex(p_uriSpec.charAt(index+2))) {\n throw new MalformedURIException(\n \"Path contains invalid escape sequence!\");\n }\n index += 2;\n }\n // Path segments cannot contain '[' or ']' since pchar\n // production was not changed by RFC 2732.\n else if (!isPathCharacter(testChar)) {\n if (testChar == '?' || testChar == '#') {\n break;\n }\n throw new MalformedURIException(\n \"Path contains invalid character: \" + testChar);\n }\n ++index;\n }\n }\n else {\n \n // Scan opaque part.\n // opaque_part = uric_no_slash *uric\n while (index < end) {\n testChar = p_uriSpec.charAt(index);\n \n if (testChar == '?' || testChar == '#') {\n break;\n }\n \n // check for valid escape sequence\n if (testChar == '%') {\n if (index+2 >= end ||\n !isHex(p_uriSpec.charAt(index+1)) ||\n !isHex(p_uriSpec.charAt(index+2))) {\n throw new MalformedURIException(\n \"Opaque part contains invalid escape sequence!\");\n }\n index += 2;\n }\n // If the scheme specific part is opaque, it can contain '['\n // and ']'. uric_no_slash wasn't modified by RFC 2732, which\n // I've interpreted as an error in the spec, since the \n // production should be equivalent to (uric - '/'), and uric\n // contains '[' and ']'. - mrglavas\n else if (!isURICharacter(testChar)) {\n throw new MalformedURIException(\n \"Opaque part contains invalid character: \" + testChar);\n }\n ++index;\n }\n }\n }\n m_path = p_uriSpec.substring(start, index);\n \n // query - starts with ? and up to fragment or end\n if (testChar == '?') {\n index++;\n start = index;\n while (index < end) {\n testChar = p_uriSpec.charAt(index);\n if (testChar == '#') {\n break;\n }\n if (testChar == '%') {\n if (index+2 >= end ||\n !isHex(p_uriSpec.charAt(index+1)) ||\n !isHex(p_uriSpec.charAt(index+2))) {\n throw new MalformedURIException(\n \"Query string contains invalid escape sequence!\");\n }\n index += 2;\n }\n else if (!isURICharacter(testChar)) {\n throw new MalformedURIException(\n \"Query string contains invalid character: \" + testChar);\n }\n index++;\n }\n m_queryString = p_uriSpec.substring(start, index);\n }\n \n // fragment - starts with #\n if (testChar == '#') {\n index++;\n start = index;\n while (index < end) {\n testChar = p_uriSpec.charAt(index);\n \n if (testChar == '%') {\n if (index+2 >= end ||\n !isHex(p_uriSpec.charAt(index+1)) ||\n !isHex(p_uriSpec.charAt(index+2))) {\n throw new MalformedURIException(\n \"Fragment contains invalid escape sequence!\");\n }\n index += 2;\n }\n else if (!isURICharacter(testChar)) {\n throw new MalformedURIException(\n \"Fragment contains invalid character: \"+testChar);\n }\n index++;\n }\n m_fragment = p_uriSpec.substring(start, index);\n }\n }", "public abstract String getRequestPathInfo();", "private String escapeFragment(String pathFragment) {\n\t\treturn pathFragment.replaceAll(\"~\", \"~0\").replaceAll(\"\\\\/\", \"~1\");\n\t}", "protected void parseURL(URL paramURL, String paramString, int paramInt1, int paramInt2) {\n/* 126 */ String str1 = paramURL.getProtocol();\n/* 127 */ String str2 = paramURL.getAuthority();\n/* 128 */ String str3 = paramURL.getUserInfo();\n/* 129 */ String str4 = paramURL.getHost();\n/* 130 */ int i = paramURL.getPort();\n/* 131 */ String str5 = paramURL.getPath();\n/* 132 */ String str6 = paramURL.getQuery();\n/* */ \n/* */ \n/* 135 */ String str7 = paramURL.getRef();\n/* */ \n/* 137 */ boolean bool1 = false;\n/* 138 */ boolean bool2 = false;\n/* */ \n/* */ \n/* */ \n/* 142 */ if (paramInt1 < paramInt2) {\n/* 143 */ int k = paramString.indexOf('?');\n/* 144 */ bool2 = (k == paramInt1) ? true : false;\n/* 145 */ if (k != -1 && k < paramInt2) {\n/* 146 */ str6 = paramString.substring(k + 1, paramInt2);\n/* 147 */ if (paramInt2 > k)\n/* 148 */ paramInt2 = k; \n/* 149 */ paramString = paramString.substring(0, k);\n/* */ } \n/* */ } \n/* */ \n/* 153 */ int j = 0;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 159 */ boolean bool3 = (paramInt1 <= paramInt2 - 4 && paramString.charAt(paramInt1) == '/' && paramString.charAt(paramInt1 + 1) == '/' && paramString.charAt(paramInt1 + 2) == '/' && paramString.charAt(paramInt1 + 3) == '/') ? true : false;\n/* 160 */ if (!bool3 && paramInt1 <= paramInt2 - 2 && paramString.charAt(paramInt1) == '/' && paramString\n/* 161 */ .charAt(paramInt1 + 1) == '/') {\n/* 162 */ paramInt1 += 2;\n/* 163 */ j = paramString.indexOf('/', paramInt1);\n/* 164 */ if (j < 0 || j > paramInt2) {\n/* 165 */ j = paramString.indexOf('?', paramInt1);\n/* 166 */ if (j < 0 || j > paramInt2) {\n/* 167 */ j = paramInt2;\n/* */ }\n/* */ } \n/* 170 */ str4 = str2 = paramString.substring(paramInt1, j);\n/* */ \n/* 172 */ int k = str2.indexOf('@');\n/* 173 */ if (k != -1) {\n/* 174 */ if (k != str2.lastIndexOf('@')) {\n/* */ \n/* 176 */ str3 = null;\n/* 177 */ str4 = null;\n/* */ } else {\n/* 179 */ str3 = str2.substring(0, k);\n/* 180 */ str4 = str2.substring(k + 1);\n/* */ } \n/* */ } else {\n/* 183 */ str3 = null;\n/* */ } \n/* 185 */ if (str4 != null) {\n/* */ \n/* */ \n/* 188 */ if (str4.length() > 0 && str4.charAt(0) == '[') {\n/* 189 */ if ((k = str4.indexOf(']')) > 2) {\n/* */ \n/* 191 */ String str = str4;\n/* 192 */ str4 = str.substring(0, k + 1);\n/* */ \n/* 194 */ if (!IPAddressUtil.isIPv6LiteralAddress(str4.substring(1, k))) {\n/* 195 */ throw new IllegalArgumentException(\"Invalid host: \" + str4);\n/* */ }\n/* */ \n/* */ \n/* 199 */ i = -1;\n/* 200 */ if (str.length() > k + 1) {\n/* 201 */ if (str.charAt(k + 1) == ':') {\n/* 202 */ k++;\n/* */ \n/* 204 */ if (str.length() > k + 1) {\n/* 205 */ i = Integer.parseInt(str.substring(k + 1));\n/* */ }\n/* */ } else {\n/* 208 */ throw new IllegalArgumentException(\"Invalid authority field: \" + str2);\n/* */ } \n/* */ }\n/* */ } else {\n/* */ \n/* 213 */ throw new IllegalArgumentException(\"Invalid authority field: \" + str2);\n/* */ } \n/* */ } else {\n/* */ \n/* 217 */ k = str4.indexOf(':');\n/* 218 */ i = -1;\n/* 219 */ if (k >= 0) {\n/* */ \n/* 221 */ if (str4.length() > k + 1) {\n/* 222 */ i = Integer.parseInt(str4.substring(k + 1));\n/* */ }\n/* 224 */ str4 = str4.substring(0, k);\n/* */ } \n/* */ } \n/* */ } else {\n/* 228 */ str4 = \"\";\n/* */ } \n/* 230 */ if (i < -1) {\n/* 231 */ throw new IllegalArgumentException(\"Invalid port number :\" + i);\n/* */ }\n/* 233 */ paramInt1 = j;\n/* */ \n/* */ \n/* 236 */ if (str2 != null && str2.length() > 0) {\n/* 237 */ str5 = \"\";\n/* */ }\n/* */ } \n/* 240 */ if (str4 == null) {\n/* 241 */ str4 = \"\";\n/* */ }\n/* */ \n/* */ \n/* 245 */ if (paramInt1 < paramInt2) {\n/* 246 */ if (paramString.charAt(paramInt1) == '/') {\n/* 247 */ str5 = paramString.substring(paramInt1, paramInt2);\n/* 248 */ } else if (str5 != null && str5.length() > 0) {\n/* 249 */ bool1 = true;\n/* 250 */ int k = str5.lastIndexOf('/');\n/* 251 */ String str = \"\";\n/* 252 */ if (k == -1 && str2 != null) {\n/* 253 */ str = \"/\";\n/* */ }\n/* 255 */ str5 = str5.substring(0, k + 1) + str + paramString.substring(paramInt1, paramInt2);\n/* */ } else {\n/* */ \n/* 258 */ String str = (str2 != null) ? \"/\" : \"\";\n/* 259 */ str5 = str + paramString.substring(paramInt1, paramInt2);\n/* */ } \n/* 261 */ } else if (bool2 && str5 != null) {\n/* 262 */ int k = str5.lastIndexOf('/');\n/* 263 */ if (k < 0)\n/* 264 */ k = 0; \n/* 265 */ str5 = str5.substring(0, k) + \"/\";\n/* */ } \n/* 267 */ if (str5 == null) {\n/* 268 */ str5 = \"\";\n/* */ }\n/* 270 */ if (bool1) {\n/* */ \n/* 272 */ while ((j = str5.indexOf(\"/./\")) >= 0) {\n/* 273 */ str5 = str5.substring(0, j) + str5.substring(j + 2);\n/* */ }\n/* */ \n/* 276 */ j = 0;\n/* 277 */ while ((j = str5.indexOf(\"/../\", j)) >= 0) {\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 284 */ if (j > 0 && (paramInt2 = str5.lastIndexOf('/', j - 1)) >= 0 && str5\n/* 285 */ .indexOf(\"/../\", paramInt2) != 0) {\n/* 286 */ str5 = str5.substring(0, paramInt2) + str5.substring(j + 3);\n/* 287 */ j = 0; continue;\n/* */ } \n/* 289 */ j += 3;\n/* */ } \n/* */ \n/* */ \n/* */ \n/* 294 */ j = str5.indexOf(\"/..\");\n/* 295 */ while (str5.endsWith(\"/..\") && (paramInt2 = str5.lastIndexOf('/', j - 1)) >= 0) {\n/* 296 */ str5 = str5.substring(0, paramInt2 + 1);\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* 302 */ if (str5.startsWith(\"./\") && str5.length() > 2) {\n/* 303 */ str5 = str5.substring(2);\n/* */ }\n/* */ \n/* 306 */ if (str5.endsWith(\"/.\")) {\n/* 307 */ str5 = str5.substring(0, str5.length() - 1);\n/* */ }\n/* */ } \n/* 310 */ setURL(paramURL, str1, str4, i, str2, str3, str5, str6, str7);\n/* */ }", "static Set<String> parsePathParameters(String path) {\n Matcher m = PARAM_URL_REGEX.matcher(path);\n Set<String> patterns = new LinkedHashSet<>();\n while (m.find()) {\n patterns.add(m.group(1));\n }\n return patterns;\n }", "@Override\n protected WebMap.Info getInfoFromPath(String prepath,\n\t\t\t\t\t String epath,\n\t\t\t\t\t String query,\n\t\t\t\t\t String fragment,\n\t\t\t\t\t WebMap.RequestInfo requestInfo)\n {\n\t// System.out.format(\"prepath = \\\"%s\\\"\\n\", prepath);\n\t// System.out.format(\"epath = \\\"%s\\\"\\n\", epath);\n\ttry {\n\t InputStream is = null;\n\t long length = -1;\n\t String mimeType = null;\n\t boolean compress = false;\n\t if (zipfile != null) {\n\t\tif (epath.startsWith(\"/\")) {\n\t\t epath = epath.substring(1);\n\t\t}\n\t\tif (epath.endsWith(\"/\") || epath.length() == 0) {\n\t\t // System.out.println(\"prepath = \" + prepath);\n\t\t // System.out.println(\"epath = \" + epath);\n\t\t if (getDisplayDir() == false) return null;\n\t\t return EjwsUtilities.printHtmlDir(zipfile, prepath, null,\n\t\t\t\t\t\t epath, \"UTF-8\", this);\n\t\t} else {\n\t\t ZipEntry ze = zipfile.getEntry(epath);\n\t\t if (ze == null) {\n\t\t\tfor (String ep: gzipPaths(epath)) {\n\t\t\t ze = zipfile.getEntry(ep);\n\t\t\t if (ze != null) {\n\t\t\t\tcompress = true;\n\t\t\t\tbreak;\n\t\t\t }\n\t\t\t}\n\t\t }\n\t\t if (ze == null) return null;\n\n\t\t is = zipfile.getInputStream(ze);\n\t\t length = (int)ze.getSize();\n\t\t mimeType = getMimeType(epath);\n\t\t URI uri = new URI(null, null, epath, query, fragment);\n\t\t String name =\n\t\t\t\"jar:\" + rootURI.toString() + \"!/\"\n\t\t\t+ uri.toString();\n\t\t // System.out.println(\"name = \" + name);\n\t\t // new URL(\"jar:file:\" + rootURI.toString()\n\t\t //\t + \"!/\" + epath).toString();\n\t\t WebMap.Info result =\n\t\t\tnew WebMap.Info(is, length, mimeType, name);\n\t\t if (compress) {\n\t\t\tresult.setEncoding(\"gzip\");\n\t\t }\n\t\t return result;\n\t\t}\n\t }\n\t return null;\n\t} catch (IOException e) {\n\t return null;\n\t} catch (URISyntaxException ee) {\n\t return null;\n\t} catch (NullPointerException eee) {\n\t eee.printStackTrace();\n\t System.exit(1);\n\t return null;\n\t}\n }", "String getUrlPattern();", "private static String getRequestPath(final IWebRequest request) {\n\n String requestPath = request.getPathWithinApplication();\n\n final int fragmentIndex = requestPath.indexOf(';');\n if (fragmentIndex != -1) {\n requestPath = requestPath.substring(0, fragmentIndex);\n }\n\n return requestPath;\n\n }", "public static void parseURL(PURL u, String spec, int start, int limit) {\n // These fields may receive context content if this was relative URL\n String protocol = u.getProtocol();\n String authority = u.getAuthority(); \n String userInfo = u.getUserInfo();\n String host = u.getHost();\n int port = u.getPort();\n String path = u.getPath();\n\tString query = u.getQuery();\n\n // This field has already been parsed\n String ref = u.getRef();\n\n\tboolean isRelPath = false;\n\tboolean queryOnly = false;\n\n// FIX: should not assume query if opaque\n // Strip off the query part\n\tif (start < limit) {\n int queryStart = spec.indexOf('?');\n queryOnly = queryStart == start;\n if ((queryStart != -1) && (queryStart < limit)) {\n query = spec.substring(queryStart+1, limit);\n if (limit > queryStart)\n limit = queryStart;\n spec = spec.substring(0, queryStart);\n }\n\t}\n\n\tint i = 0;\n // Parse the authority part if any\n\tif ((start <= limit - 2) && (spec.charAt(start) == '/') &&\n\t (spec.charAt(start + 1) == '/')) {\n\t start += 2;\n\t i = spec.indexOf('/', start);\n if (i < 0) {\n\t i = spec.indexOf('?', start);\n\t\tif (i < 0)\n i = limit;\n\t }\n\n host = authority = spec.substring(start, i);\n\n int ind = authority.indexOf('@');\n if (ind != -1) {\n userInfo = authority.substring(0, ind);\n host = authority.substring(ind+1);\n\t } else {\n\t\tuserInfo = null;\n\t }\n\t if (host != null) {\n\t\t// If the host is surrounded by [ and ] then its an IPv6 \n\t\t// literal address as specified in RFC2732\n\t\tif (host.length()>0 && (host.charAt(0) == '[')) {\n\t\t //PURLStreamHandler has been modified - it does not\n\t\t //handle IPV6 addresses\n\t\t //this is an ipv6 address\n\n\t\t throw new Error(\"Can't handle IPv6 addresses!\");\n\n\t\t} else {\n\t\t ind = host.indexOf(':');\n\t\t port = -1;\n\t\t if (ind >= 0) {\n\t\t\t// port can be null according to RFC2396\n\t\t\tif (host.length() > (ind + 1)) {\n\t\t\t port = Integer.parseInt(host.substring(ind + 1));\n\t\t\t}\n\t\t\thost = host.substring(0, ind);\n\t\t }\n\t\t}\n\t } else {\n\t\thost = \"\";\n\t }\n\t if (port < -1)\n\t\tthrow new IllegalArgumentException(\"Invalid port number :\" +\n\t\t\t\t\t\t port);\n\t start = i;\n\t // If the authority is defined then the path is defined by the\n // spec only; See RFC 2396 Section 5.2.4.\n if (authority != null && authority.length() > 0)\n path = \"\";\n\t} \n\n \tif (host == null) {\n \t host = \"\";\n \t}\n\n // Parse the file path if any\n\tif (start < limit) {\n\t if (spec.charAt(start) == '/') {\n\t\tpath = spec.substring(start, limit);\n\t } else if (path != null && path.length() > 0) {\n\t\tisRelPath = true;\n\t\tint ind = path.lastIndexOf('/');\n\t\tString seperator = \"\";\n\t\tif (ind == -1 && authority != null)\n\t\t seperator = \"/\";\n\t\tpath = path.substring(0, ind + 1) + seperator +\n\t\t spec.substring(start, limit);\n\t\t\t\t\t\n\t } else {\n\t\tString seperator = (authority != null) ? \"/\" : \"\";\n\t\tpath = seperator + spec.substring(start, limit);\n\t }\n\t} else if (queryOnly && path != null) {\n int ind = path.lastIndexOf('/');\n if (ind < 0)\n ind = 0;\n path = path.substring(0, ind) + \"/\";\n }\n\tif (path == null)\n\t path = \"\";\n\n\tif (isRelPath) {\n // Remove embedded /./\n while ((i = path.indexOf(\"/./\")) >= 0) {\n\t path = path.substring(0, i) + path.substring(i + 2);\n\t }\n // Remove embedded /../ if possible\n\t i = 0;\n\t while ((i = path.indexOf(\"/../\", i)) > 0) {\n\t if ((limit = path.lastIndexOf('/', i - 1)) >= 0) {\n\t\t path = path.substring(0, limit) + path.substring(i + 3);\n\t\t i = 0;\n\t } else {\n\t\t i = i + 3;\n\t\t}\n\t }\n // Remove trailing .. if possible\n while (path.endsWith(\"/..\")) {\n i = path.indexOf(\"/..\");\n\t if ((limit = path.lastIndexOf('/', i - 1)) >= 0) {\n\t\t path = path.substring(0, limit+1);\n\t } else {\n\t\t break;\n\t\t}\n\t }\n\t // Remove starting .\n if (path.startsWith(\"./\") && path.length() > 2)\n path = path.substring(2);\n\n // Remove trailing .\n if (path.endsWith(\"/.\"))\n path = path.substring(0, path.length() -1);\n\t}\n\n\tsetURL(u, protocol, host, port, authority, userInfo, path, query, ref);\n }", "private void parseUrlsPaths(String localPath) {\n String[] pathArray = localPath.split(\"/\");\n // Geometry_305_v6_fb_coupe_frontlightbulb1_a001.b3d.dflr\n this.fileName = pathArray[pathArray.length - 1];\n // /cars/mustang2015/geometry/\n this.subDirectory = localPath.replace(\"/\" + this.fileName, \"\");\n }", "private void readHttpPath(String line) {\n\t\tString[] parts = line.split(\" \");\n\t\tif (parts.length != 3) {\n\t\t\tchannel.close();\n\t\t} else {\n\t\t\trequest = new Request(parts[1].trim());\n\t\t}\n\t}", "private String getHttpPath(String httpPath) {\n if(httpPath == null || httpPath.equals(\"\")) {\n httpPath = \"/*\";\n }\n else {\n if(!httpPath.startsWith(\"/\")) {\n httpPath = \"/\" + httpPath;\n }\n if(httpPath.endsWith(\"/\")) {\n httpPath = httpPath + \"*\";\n }\n if(!httpPath.endsWith(\"/*\")) {\n httpPath = httpPath + \"/*\";\n }\n }\n return httpPath;\n }", "public static String extractPathFromPattern(final HttpServletRequest request){\r\n\r\n\t\tString path = (String) request.getAttribute(\r\n\t HandlerMapping.PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE);\r\n\t String bestMatchPattern = (String ) request.getAttribute(HandlerMapping.BEST_MATCHING_PATTERN_ATTRIBUTE);\r\n\r\n\t AntPathMatcher apm = new AntPathMatcher();\r\n\t String finalPath = apm.extractPathWithinPattern(bestMatchPattern, path);\r\n\r\n\t return finalPath;\r\n\t}", "private URI findBaseUrl0(String stringUrl) throws URISyntaxException {\n stringUrl = stringUrl.replace(\"\\\\\", \"/\");\n int qindex = stringUrl.indexOf(\"?\");\n if (qindex != -1) {\n // stuff after the ? tends to make the Java URL parser burp.\n stringUrl = stringUrl.substring(0, qindex);\n }\n URI url = new URI(stringUrl);\n URI baseUrl = new URI(url.getScheme(), url.getAuthority(), url.getPath(), null, null);\n\n String path = baseUrl.getPath().substring(1); // toss the leading /\n String[] pieces = path.split(\"/\");\n List<String> urlSlashes = new ArrayList<String>();\n // reverse\n for (String piece : pieces) {\n urlSlashes.add(piece);\n }\n List<String> cleanedSegments = new ArrayList<String>();\n String possibleType = \"\";\n boolean del;\n\n for (int i = 0; i < urlSlashes.size(); i++) {\n String segment = urlSlashes.get(i);\n\n // Split off and save anything that looks like a file type.\n if (segment.indexOf(\".\") != -1) {\n possibleType = segment.split(\"\\\\.\")[1];\n\n /*\n * If the type isn't alpha-only, it's probably not actually a file extension.\n */\n if (!possibleType.matches(\"[^a-zA-Z]\")) {\n segment = segment.split(\"\\\\.\")[0];\n }\n }\n\n /**\n * EW-CMS specific segment replacement. Ugly. Example:\n * http://www.ew.com/ew/article/0,,20313460_20369436,00.html\n **/\n if (segment.indexOf(\",00\") != -1) {\n segment = segment.replaceFirst(\",00\", \"\");\n }\n\n // If our first or second segment has anything looking like a page\n // number, remove it.\n /* Javascript code has some /i's here, we might need to fiddle */\n Matcher pnMatcher = Patterns.PAGE_NUMBER_LIKE.matcher(segment);\n if (pnMatcher.matches() && ((i == 1) || (i == 0))) {\n segment = pnMatcher.replaceAll(\"\");\n }\n\n del = false;\n\n /*\n * If this is purely a number, and it's the first or second segment, it's probably a page number.\n * Remove it.\n */\n if (i < 2 && segment.matches(\"^\\\\d{1,2}$\")) {\n del = true;\n }\n\n /* If this is the first segment and it's just \"index\", remove it. */\n if (i == 0 && segment.toLowerCase() == \"index\")\n del = true;\n\n /*\n * If our first or second segment is smaller than 3 characters, and the first segment was purely\n * alphas, remove it.\n */\n /* /i again */\n if (i < 2 && segment.length() < 3 && !urlSlashes.get(0).matches(\"[a-z]\"))\n del = true;\n\n /* If it's not marked for deletion, push it to cleanedSegments. */\n if (!del) {\n cleanedSegments.add(segment);\n }\n }\n\n String cleanedPath = \"\";\n for (String s : cleanedSegments) {\n cleanedPath = cleanedPath + s;\n cleanedPath = cleanedPath + \"/\";\n }\n URI cleaned = new URI(url.getScheme(), url.getAuthority(), \"/\"\n + cleanedPath.substring(0, cleanedPath\n .length() - 1), null, null);\n return cleaned;\n }", "private RequestNodePath() {\n }", "private Predicate<String> paths() {\n return or(\n //regex(\"/business.*\"),\n // regex(\"/some.*\"),\n // regex(\"/contacts.*\"),\n // regex(\"/pet.*\"),\n regex(\"/api.*\"),\n regex(\"/oauth2.*\"));\n }", "public PathMatcher getPathMatcher()\n/* */ {\n/* 559 */ return this.pathMatcher;\n/* */ }", "protected void setupRequestPathExp(StringBuilder sb, RomanticTransaction tx) {\n final String requestPath = tx.getRequestPath();\n if (requestPath != null) {\n sb.append(\", \").append(requestPath);\n }\n }", "@Override\n\tpublic PathMatcher getPathMatcher(String arg0) {\n\t\treturn null;\n\t}", "public URI getRequestURI();", "String getQueryRequestUrl();", "Uri decryptedPath();", "FullUriTemplateString baseUri();", "private String addQueryToPath(\n String path,\n String fullUri) {\n\n String response = path;\n int index = fullUri.indexOf(\"?\");\n if (index == -1) {\n index = fullUri.indexOf(\"&\");\n }\n if (index != -1) {\n String query = fullUri.substring(index);\n if (query.isEmpty()) {\n response = path;\n } else {\n response = path + query;\n }\n }\n return response;\n }", "private void setRequestPath(final HttpServerExchange exchange, final String encodedPath, final String charset, final boolean allowEncodedSlash, StringBuilder decodeBuffer) {\n boolean requiresDecode = false;\n for (int i = 0; i < encodedPath.length(); ++i) {\n char c = encodedPath.charAt(i);\n if (c == '?') {\n String part;\n String encodedPart = encodedPath.substring(0, i);\n if (requiresDecode) {\n part = URLUtils.decode(encodedPart, charset, allowEncodedSlash, decodeBuffer);\n } else {\n part = encodedPart;\n }\n exchange.setRequestPath(part);\n exchange.setRelativePath(part);\n exchange.setRequestURI(encodedPart);\n final String qs = encodedPath.substring(i + 1);\n exchange.setQueryString(qs);\n URLUtils.parseQueryString(qs, exchange, encoding, decode);\n return;\n } else if(c == ';') {\n String part;\n String encodedPart = encodedPath.substring(0, i);\n if (requiresDecode) {\n part = URLUtils.decode(encodedPart, charset, allowEncodedSlash, decodeBuffer);\n } else {\n part = encodedPart;\n }\n exchange.setRequestPath(part);\n exchange.setRelativePath(part);\n exchange.setRequestURI(encodedPart);\n for(int j = i; j < encodedPath.length(); ++j) {\n if (encodedPath.charAt(j) == '?') {\n String pathParams = encodedPath.substring(i + 1, j);\n URLUtils.parsePathParms(pathParams, exchange, encoding, decode);\n String qs = encodedPath.substring(j + 1);\n exchange.setQueryString(qs);\n URLUtils.parseQueryString(qs, exchange, encoding, decode);\n return;\n }\n }\n URLUtils.parsePathParms(encodedPath.substring(i + 1), exchange, encoding, decode);\n return;\n } else if(c == '%' || c == '+') {\n requiresDecode = true;\n }\n }\n\n String part;\n if (requiresDecode) {\n part = URLUtils.decode(encodedPath, charset, allowEncodedSlash, decodeBuffer);\n } else {\n part = encodedPath;\n }\n exchange.setRequestPath(part);\n exchange.setRelativePath(part);\n exchange.setRequestURI(encodedPath);\n }", "public void testExtractDetailsUsingPath() {\n\t\t\n\t\tString href = when().\n\t\t\t\t\t\tget(\"http://jsonplaceholder.typicode.com/photos/1\").\n\t\t\t\t\t then().\n\t\t\t\t\t contentType(ContentType.JSON).\n\t\t\t\t\t body(\"albumId\", equalTo(1)).\n\t\t\t\t\t extract().\n\t\t\t\t\t path(\"url\");\n\t\tSystem.out.println(\"href : \" + href);\n\t\t\n\t\twhen().get(href).then().statusCode(200);\n\t}", "@Override\n protected void parseURL(URL url, String spec, int start, int end) {\n if (end < start) {\n return;\n }\n String parseString = \"\";\n if (start < end) {\n parseString = spec.substring(start, end).replace('\\\\', '/');\n }\n super.parseURL(url, parseString, 0, parseString.length());\n }", "abstract String getUri();", "public String getSchemeSpecificPart() {\n StringBuffer schemespec = new StringBuffer();\n \n if (m_host != null || m_regAuthority != null) {\n schemespec.append(\"//\");\n \n // Server based authority.\n if (m_host != null) {\n \n if (m_userinfo != null) {\n schemespec.append(m_userinfo);\n schemespec.append('@');\n }\n \n schemespec.append(m_host);\n \n if (m_port != -1) {\n schemespec.append(':');\n schemespec.append(m_port);\n }\n }\n // Registry based authority.\n else {\n schemespec.append(m_regAuthority);\n }\n }\n \n if (m_path != null) {\n schemespec.append((m_path));\n }\n \n if (m_queryString != null) {\n schemespec.append('?');\n schemespec.append(m_queryString);\n }\n \n if (m_fragment != null) {\n schemespec.append('#');\n schemespec.append(m_fragment);\n }\n \n return schemespec.toString();\n }", "public abstract String getRequestServletPath();", "private static URIBuilder createURIBuilder(String path) {\n\t\tURIBuilder builder = new URIBuilder();\n\t\tif(path.contains(\"?\")) {\n\t\t\tString uri = path.substring(0, path.indexOf(\"?\"));\n\t\t\tString queryParamName = path.substring(path.indexOf(\"?\") + 1, path.indexOf(\"=\"));\n\t\t\tString queryParamValue = path.substring(path.indexOf(\"=\") + 1);\n\t\t\tbuilder.setScheme(\"http\").setHost(HOST).setPath(uri).setParameter(queryParamName, queryParamValue);\n\t\t}\n\t\telse {\n\t\t\tbuilder.setScheme(\"http\").setHost(HOST).setPath(path);\n\t\t}\n\t\treturn builder;\n\t}", "public String removeQueryString(String string) {\n\t\tString pathWithoutQueryString = string;\n\t\tif (string != null && string.matches(\".*\\\\?.*\")) {\n\t\t\tpathWithoutQueryString = string.split(\"\\\\?\")[0];\n\t\t}\n\t\treturn pathWithoutQueryString;\n\t}", "public void setPathMatcher(PathMatcher pathMatcher)\n/* */ {\n/* 552 */ this.pathMatcher = pathMatcher;\n/* */ }", "String getServletUrlPattern();", "private String parsingURL(String requestURL) {\n\t\tint pos = 0;\n\t\tif (requestURL.startsWith(\"http://\")) {\n\t\t\tpos = \"http://\".length();\n\t\t}\n\t\telse {\n\t\t\tpos = \"https://\".length();\n\t\t}\n\t\t\n\t\tint pos2 = requestURL.indexOf(\":\", pos);\n\t\tif (pos2 < 0) {\n\t\t\tpos2 = requestURL.length();\n\t\t}\n\t\t\n\t\tint pos3 = requestURL.indexOf(\"/\", pos);\n\t\tif (pos3 < 0) {\n\t\t\tpos3 = requestURL.length();\n\t\t}\n\t\t\n\t\tpos2 = Math.min(pos2, pos3);\n\t\t\n\t\tString host = requestURL.substring(pos, pos2);\n\t\t/**\n\t\t * parsing request url\n\t\t */\n\t\treturn host;\n\t}", "PathSegments getPath();", "public boolean useTrailingSlashMatch()\n/* */ {\n/* 574 */ return this.trailingSlashMatch;\n/* */ }", "public interface HeadUri {\n\n\tString ROOT = \"/\";\n\n\tString CONNECT = \"/connect\";\n\n\tString PUSH = \"/push\";\n\n}", "java.lang.String getUri();", "java.lang.String getUri();", "public GetRequest(String pathInfo) throws ServletException {\r\n\r\n\t\tMatcher matcher;\r\n\r\n\t\tif (pathInfo != null) {\r\n\r\n\t\t\tmatcher = regExQueuePattern.matcher(pathInfo);\r\n\t\t\tif (matcher.find()) {\r\n\t\t\t\trequestID = Integer.parseInt(matcher.group(1));\r\n\t\t\t\tisQueuePolling = true;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tmatcher = regExResponsePattern.matcher(pathInfo);\r\n\t\t\tif (matcher.find()) {\r\n\t\t\t\trequestID = Integer.parseInt(matcher.group(1));\r\n\t\t\t\tisQueuePolling = false;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(PROXY + \"Invalid URI.\");\r\n\t\tthrow new ServletException(PROXY + \"Invalid URI.\");\r\n\t}", "RestXqPath(final String path, final RestXqFunction rf) throws QueryException {\n rxf = rf;\n // get path string and check syntax of single segments\n segments = HTTPContext.toSegments(path);\n for(final String s : segments) {\n if(s.startsWith(\"{\")) rxf.checkVariable(s, AtomType.AAT);\n }\n }", "String query();", "@Override\r\n public UriBuilder getAbsolutePathBuilder() {\n return null;\r\n }", "java.lang.String getFormUri();", "public void setPath(String p_path) throws MalformedURIException {\n if (p_path == null) {\n m_path = null;\n m_queryString = null;\n m_fragment = null;\n }\n else {\n initializePath(p_path, 0);\n }\n }", "String processQuery(String query);", "String getQueryString ();", "public JsonPointer path(String fragment) {\n\t\tpathFragments.addLast(escapeFragment(fragment));\n\t\treturn this;\n\t}", "public final void mURI_PATH() throws RecognitionException {\n\t\ttry {\n\t\t\t// /Users/Sarah/Projects/ontop/obdalib-core/src/main/java/it/unibz/krdb/obda/parser/Datalog.g:457:18: ( ( ALPHANUM | UNDERSCORE | DASH | COLON | DOT | HASH | QUESTION | SLASH ) )\n\t\t\t// /Users/Sarah/Projects/ontop/obdalib-core/src/main/java/it/unibz/krdb/obda/parser/Datalog.g:\n\t\t\t{\n\t\t\tif ( input.LA(1)=='#'||(input.LA(1) >= '-' && input.LA(1) <= ':')||input.LA(1)=='?'||(input.LA(1) >= 'A' && input.LA(1) <= 'Z')||input.LA(1)=='_'||(input.LA(1) >= 'a' && input.LA(1) <= 'z') ) {\n\t\t\t\tinput.consume();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tMismatchedSetException mse = new MismatchedSetException(null,input);\n\t\t\t\trecover(mse);\n\t\t\t\tthrow mse;\n\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t}", "private static String handleUrl(String s) {\n if (s.endsWith(\"/..\")) {\n int idx = s.lastIndexOf('/');\n s = s.substring(0, idx - 1);\n idx = s.lastIndexOf('/');\n String gs = s.substring(0, idx);\n if (!gs.equals(\"smb:/\")) {\n s = gs;\n }\n }\n if (!s.endsWith(\"/\")) {\n s += \"/\";\n }\n System.out.println(\"now its \" + s);\n return s;\n }", "@Test\r\n public void testRegexp() throws Exception {\n\r\n String a = \"a/b/100/test\";\r\n\r\n Pattern pattern = Pattern.compile(\".+/(\\\\d+)/test\");\r\n\r\n System.out.println(parseIdFromUriPath(a, pattern));\r\n\r\n }", "@Override\r\n public MultivaluedMap<String, String> getPathParameters() {\n return null;\r\n }", "@Override\r\n\t\tpublic boolean accept(Path path) {\n\t\t\tboolean flag = path.toString().matches(regex);\r\n\t\t\treturn flag;\r\n\t\t}", "String getUri( );", "String getQuery();", "List<String> completeEndpointPath(String completionText);", "private String getQueryStringFromParser() {\n return (getString() == null) ? \"\" : getString();\n }", "private String getDemande(HttpServletRequest request) {\n String demande = \"\";\n demande = request.getRequestURI();\n demande = demande.substring(demande.lastIndexOf(\"/\") + 1);\n return demande;\n }", "public static void parseFullPath(String path, IUriListener listener) {\n if (path == null) {\n path = \"\";\n }\n char[] array = path.toCharArray();\n parseFullPath(array, listener);\n }", "java.lang.String getQuery();", "java.lang.String getQuery();", "public URI getURI()\r\n/* 36: */ {\r\n/* 37:64 */ return this.httpRequest.getURI();\r\n/* 38: */ }", "String getURI();", "String getURI();", "String getURI();", "String getUri();", "@Override\n public void configurePathMatch(PathMatchConfigurer configurer) {\n UrlPathHelper urlPathHelper = new UrlPathHelper();\n urlPathHelper.setRemoveSemicolonContent(false);\n configurer.setUrlPathHelper(urlPathHelper);\n }", "private boolean isPathInWhiteList(String requestPath) {\n\t\tif (requestPath.equals(HOME_PATH))\r\n\t\t\treturn true;\r\n\r\n\t\tfor (String urlPatternItem : EXCLUDED_URLS) {\r\n\t\t\tif (requestPath.contains(urlPatternItem)) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "boolean getPathPatternSupported();", "public String getFragmentPath() {\n return fragmentPath;\n }", "private void initialize(URI p_base, String p_uriSpec)\n throws MalformedURIException {\n \n String uriSpec = p_uriSpec;\n int uriSpecLen = (uriSpec != null) ? uriSpec.length() : 0;\n \n if (p_base == null && uriSpecLen == 0) {\n throw new MalformedURIException(\n \"Cannot initialize URI with empty parameters.\");\n }\n \n // just make a copy of the base if spec is empty\n if (uriSpecLen == 0) {\n initialize(p_base);\n return;\n }\n \n int index = 0;\n \n // Check for scheme, which must be before '/', '?' or '#'. Also handle\n // names with DOS drive letters ('D:'), so 1-character schemes are not\n // allowed.\n int colonIdx = uriSpec.indexOf(':');\n if (colonIdx != -1) {\n final int searchFrom = colonIdx - 1;\n // search backwards starting from character before ':'.\n int slashIdx = uriSpec.lastIndexOf('/', searchFrom);\n int queryIdx = uriSpec.lastIndexOf('?', searchFrom);\n int fragmentIdx = uriSpec.lastIndexOf('#', searchFrom);\n \n if (colonIdx < 2 || slashIdx != -1 || \n queryIdx != -1 || fragmentIdx != -1) {\n // A standalone base is a valid URI according to spec\n if (colonIdx == 0 || (p_base == null && fragmentIdx != 0)) {\n throw new MalformedURIException(\"No scheme found in URI.\");\n }\n }\n else {\n initializeScheme(uriSpec);\n index = m_scheme.length()+1;\n \n // Neither 'scheme:' or 'scheme:#fragment' are valid URIs.\n if (colonIdx == uriSpecLen - 1 || uriSpec.charAt(colonIdx+1) == '#') {\n throw new MalformedURIException(\"Scheme specific part cannot be empty.\"); \n }\n }\n }\n else if (p_base == null && uriSpec.indexOf('#') != 0) {\n throw new MalformedURIException(\"No scheme found in URI.\"); \n }\n \n // Two slashes means we may have authority, but definitely means we're either\n // matching net_path or abs_path. These two productions are ambiguous in that\n // every net_path (except those containing an IPv6Reference) is an abs_path. \n // RFC 2396 resolves this ambiguity by applying a greedy left most matching rule. \n // Try matching net_path first, and if that fails we don't have authority so \n // then attempt to match abs_path.\n //\n // net_path = \"//\" authority [ abs_path ]\n // abs_path = \"/\" path_segments\n if (((index+1) < uriSpecLen) &&\n (uriSpec.charAt(index) == '/' && uriSpec.charAt(index+1) == '/')) {\n index += 2;\n int startPos = index;\n \n // Authority will be everything up to path, query or fragment\n char testChar = '\\0';\n while (index < uriSpecLen) {\n testChar = uriSpec.charAt(index);\n if (testChar == '/' || testChar == '?' || testChar == '#') {\n break;\n }\n index++;\n }\n \n // Attempt to parse authority. If the section is an empty string\n // this is a valid server based authority, so set the host to this\n // value.\n if (index > startPos) {\n // If we didn't find authority we need to back up. Attempt to\n // match against abs_path next.\n if (!initializeAuthority(uriSpec.substring(startPos, index))) {\n index = startPos - 2;\n }\n }\n else {\n m_host = \"\";\n }\n }\n \n initializePath(uriSpec, index);\n \n // Resolve relative URI to base URI - see RFC 2396 Section 5.2\n // In some cases, it might make more sense to throw an exception\n // (when scheme is specified is the string spec and the base URI\n // is also specified, for example), but we're just following the\n // RFC specifications\n if (p_base != null) {\n \n // check to see if this is the current doc - RFC 2396 5.2 #2\n // note that this is slightly different from the RFC spec in that\n // we don't include the check for query string being null\n // - this handles cases where the urispec is just a query\n // string or a fragment (e.g. \"?y\" or \"#s\") -\n // see <http://www.ics.uci.edu/~fielding/url/test1.html> which\n // identified this as a bug in the RFC\n if (m_path.length() == 0 && m_scheme == null &&\n m_host == null && m_regAuthority == null) {\n m_scheme = p_base.getScheme();\n m_userinfo = p_base.getUserinfo();\n m_host = p_base.getHost();\n m_port = p_base.getPort();\n m_regAuthority = p_base.getRegBasedAuthority();\n m_path = p_base.getPath();\n \n if (m_queryString == null) {\n m_queryString = p_base.getQueryString();\n }\n return;\n }\n \n // check for scheme - RFC 2396 5.2 #3\n // if we found a scheme, it means absolute URI, so we're done\n if (m_scheme == null) {\n m_scheme = p_base.getScheme();\n }\n else {\n return;\n }\n \n // check for authority - RFC 2396 5.2 #4\n // if we found a host, then we've got a network path, so we're done\n if (m_host == null && m_regAuthority == null) {\n m_userinfo = p_base.getUserinfo();\n m_host = p_base.getHost();\n m_port = p_base.getPort();\n m_regAuthority = p_base.getRegBasedAuthority();\n }\n else {\n return;\n }\n \n // check for absolute path - RFC 2396 5.2 #5\n if (m_path.length() > 0 &&\n m_path.startsWith(\"/\")) {\n return;\n }\n \n // if we get to this point, we need to resolve relative path\n // RFC 2396 5.2 #6\n String path = \"\";\n String basePath = p_base.getPath();\n \n // 6a - get all but the last segment of the base URI path\n if (basePath != null && basePath.length() > 0) {\n int lastSlash = basePath.lastIndexOf('/');\n if (lastSlash != -1) {\n path = basePath.substring(0, lastSlash+1);\n }\n }\n else if (m_path.length() > 0) {\n path = \"/\";\n }\n \n // 6b - append the relative URI path\n path = path.concat(m_path);\n \n // 6c - remove all \"./\" where \".\" is a complete path segment\n index = -1;\n while ((index = path.indexOf(\"/./\")) != -1) {\n path = path.substring(0, index+1).concat(path.substring(index+3));\n }\n \n // 6d - remove \".\" if path ends with \".\" as a complete path segment\n if (path.endsWith(\"/.\")) {\n path = path.substring(0, path.length()-1);\n }\n \n // 6e - remove all \"<segment>/../\" where \"<segment>\" is a complete\n // path segment not equal to \"..\"\n index = 1;\n int segIndex = -1;\n String tempString = null;\n \n while ((index = path.indexOf(\"/../\", index)) > 0) {\n tempString = path.substring(0, path.indexOf(\"/../\"));\n segIndex = tempString.lastIndexOf('/');\n if (segIndex != -1) {\n if (!tempString.substring(segIndex).equals(\"..\")) {\n path = path.substring(0, segIndex+1).concat(path.substring(index+4));\n index = segIndex;\n }\n else\n index += 4;\n }\n else\n index += 4;\n }\n \n // 6f - remove ending \"<segment>/..\" where \"<segment>\" is a\n // complete path segment\n if (path.endsWith(\"/..\")) {\n tempString = path.substring(0, path.length()-3);\n segIndex = tempString.lastIndexOf('/');\n if (segIndex != -1) {\n path = path.substring(0, segIndex+1);\n }\n }\n m_path = path;\n }\n }", "@Override\r\n\t\tpublic boolean accept(Path path) {\n\t\t\tboolean flag = path.toString().matches(regex);\r\n\t\t\treturn !flag;\r\n\t\t}", "@Override\n public boolean isContextPathInUrl() {\n return false;\n }", "@Override\n public boolean isContextPathInUrl() {\n return false;\n }", "public String getUri();", "public static String parseRequest(String request) {\r\n String parsedSoFar = \"\";\r\n String file = \"\";\r\n int fileSize = 0;\r\n String s = null;\r\n \r\n if (request.length() < 14) {\r\n return s;\r\n }\r\n \t\r\n if (!request.substring(0, 4).equals(\"GET \")) {\r\n return s;\r\n }\r\n \r\n parsedSoFar = request.substring(4, request.length());\r\n \t\r\n int counter = 0;\r\n \r\n while (parsedSoFar.charAt(counter) != ' ') {\r\n counter++;\r\n }\r\n \r\n file = parsedSoFar.substring(0, counter);\r\n \r\n parsedSoFar = parsedSoFar.substring(file.length() + 1, parsedSoFar.length()).trim();\r\n \r\n if (!parsedSoFar.equals(\"HTTP/1.0\")) {\r\n return s;\r\n }\r\n \r\n return file;\r\n }", "public boolean isUri(String obj) {\r\n//\t\treturn obj.matches(\"(([a-zA-Z][0-9a-zA-Z+\\\\\\\\-\\\\\\\\.]*:)?/{0,2}[0-9a-zA-Z;/?:@&=+$\\\\\\\\.\\\\\\\\-_!~*'()%]+)?(#[0-9a-zA-Z;/?:@&=+$\\\\\\\\.\\\\\\\\-_!~*'()%]+)?\");\r\n\t\treturn false;\r\n\t}", "URI uri();", "@Override\r\n\t\t public boolean isResourceFiltered(Resource resource) {\n\t\t return \"pathmap\".equals(resource.getURI().scheme());\r\n\t\t }", "Uri encryptedPath();", "private Predicate<String> paths() {\r\n\t\t// Match all paths except /error\r\n\t\treturn Predicates.and(PathSelectors.regex(\"/.*\"), Predicates.not(PathSelectors.regex(\"/error.*\")));\r\n\t}", "public void buildPathPartWithServletPath(Appendable buffer) throws WebAppConfigurationException, IOException {\n buildPathPart(buffer, null, false);\n }", "private static Path speculativeFastParsePath(String path) {\n String s = ConfigImplUtil.unicodeTrim(path);\n if (s.isEmpty())\n return null;\n if (hasUnsafeChars(s))\n return null;\n if (s.startsWith(\".\") || s.endsWith(\".\") || s.contains(\"..\"))\n return null; // let the full parser throw the error\n\n PathBuilder pb = new PathBuilder();\n appendPathString(pb, s);\n return pb.result();\n }", "private String toCompletePath(String fullRequest) {\n \n///Parse request for file path\nString requestLine[] = new String[] {\" \", \" \", \" \"};\n requestLine = fullRequest.split(\" \");\nString partialPath = requestLine[1];\n \n//If requested path is just \"/\" or \"\", don't return any path\n if(partialPath.length() <= 1) {\n noFileRequested = true;\n return null;\n }\n \nString completePath;\n//If using my Windows machine, the path is different than the school Linux machines\nif (Windows)\n completePath = \"C:/Users/Michelle/eclipse-workspace/P1\" + partialPath;\nelse\n completePath = \".\" + partialPath;\n \n return completePath;\n}", "String getBaseUri();", "protected abstract String getBaseEndpointPath();", "@Override\n public DefaultUrlBuilder pathSegment(String thePath) {\n this.pathSegments.add(BaseUrl.UrlEncoder.encodePathSegment(thePath));\n return this;\n }", "private Route append(Map<QualifiedName, PathParamDescriptor> pathParamDescriptors, String path) throws MalformedRouteException\n {\n if (path.length() == 0 || path.charAt(0) != '/')\n {\n throw new MalformedRouteException();\n }\n\n //\n int pos = path.length();\n int level = 0;\n List<Integer> start = new ArrayList<Integer>();\n List<Integer> end = new ArrayList<Integer>();\n for (int i = 1;i < path.length();i++)\n {\n char c = path.charAt(i);\n if (c == '{')\n {\n if (level++ == 0)\n {\n start.add(i);\n }\n }\n else if (c == '}')\n {\n if (--level == 0)\n {\n end.add(i);\n }\n }\n else if (c == '/')\n {\n if (level == 0)\n {\n pos = i;\n break;\n }\n }\n }\n\n //\n Route next;\n if (start.isEmpty())\n {\n String segment = path.substring(1, pos);\n SegmentRoute route = new SegmentRoute(router, segment);\n add(route);\n next = route;\n }\n else\n {\n if (start.size() == end.size())\n {\n PatternBuilder builder = new PatternBuilder();\n builder.expr(\"^\").expr('/');\n List<String> chunks = new ArrayList<String>();\n List<PathParam> parameterPatterns = new ArrayList<PathParam>();\n\n //\n int previous = 1;\n for (int i = 0;i < start.size();i++)\n {\n builder.litteral(path, previous, start.get(i));\n chunks.add(path.substring(previous, start.get(i)));\n String parameterName = path.substring(start.get(i) + 1, end.get(i));\n\n //\n QualifiedName parameterQName = QualifiedName.parse(parameterName);\n\n // Now get path param metadata\n PathParamDescriptor parameterDescriptor = pathParamDescriptors.get(parameterQName);\n\n //\n PathParam param;\n if (parameterDescriptor != null)\n {\n param = PathParam.create(parameterDescriptor, router);\n }\n else\n {\n param = PathParam.create(parameterQName, router);\n }\n\n // Append routing regex to the route regex surrounded by a non capturing regex\n // to isolate routingRegex like a|b or a(.)b\n builder.expr(\"(?:\").expr(param.routingRegex).expr(\")\");\n\n // Add the path param with the rendering regex\n parameterPatterns.add(param);\n previous = end.get(i) + 1;\n }\n\n //\n builder.litteral(path, previous, pos);\n\n // We want to satisfy one of the following conditions\n // - the next char after the matched expression is '/'\n // - the expression matched until the end\n // - the match expression is the '/' expression\n builder.expr(\"(?:(?<=^/)|(?=/)|$)\");\n\n //\n chunks.add(path.substring(previous, pos));\n PatternRoute route = new PatternRoute(router, router.compile(builder.build()), parameterPatterns, chunks);\n\n // Wire\n add(route);\n\n //\n next = route;\n }\n else\n {\n throw new UnsupportedOperationException(\"Report error\");\n }\n }\n\n //\n if (pos < path.length())\n {\n return next.append(pathParamDescriptors, path.substring(pos));\n }\n else\n {\n return next;\n }\n }", "@Override \n public String getPathInfo() {\n if (pathInfo != null) {\n return pathInfo;\n }\n \n StringBuilder buffer = new StringBuilder();\n if (getRequestURIWithoutQuery().length() > 0) {\n if (getScriptName().length() > 0 && getRequestURIWithoutQuery().indexOf(getScriptName()) == 0) {\n buffer.append(getRequestURIWithoutQuery().substring(getScriptName().length()));\n } else {\n buffer.append(getRequestURIWithoutQuery());\n }\n } else {\n buffer.append(getServletPath());\n if (super.getPathInfo() != null) {\n buffer.append(super.getPathInfo());\n }\n }\n return pathInfo = buffer.toString();\n }", "@Override\r\n public MultivaluedMap<String, String> getPathParameters(boolean arg0) {\n return null;\r\n }", "public interface RequestServiceMzitu {\n\n @GET(\"{number}\")\n Observable<String> getDetialData(@Path(\"number\") String number, @Query(\"time\") long time);\n\n @GET(\"page/{pageNumber}\")\n Observable<String> getIndexMoreData(@Path(\"pageNumber\") int pageNumber, @Query(\"time\") long time);\n\n @GET(UrlPath.BaseUrlRequestServiceMzitu)\n Observable<String> getIndexData(@Query(\"time\") long time);\n\n @GET(\"/tag/{path}\")\n Observable<String> getTagData(@Path(\"path\") String path, @Query(\"time\") long time);\n\n @GET(\"/tag/{path}/page/{pageNumber}\")\n Observable<String> getTagMoreData(@Path(\"path\") String path, @Path(\"pageNumber\") int pageNumber, @Query(\"time\") long time);\n}", "private HashMap<String, String> parsePathType(String path) {\n LOG.debug(\"Path: \" + path);\n Pattern systemPattern = Pattern.compile(\"v[0-9]+/systems/?(\\\\?.*)?$\");\n Matcher systemMatcher = systemPattern.matcher(path);\n\n Pattern systemStatusPattern = Pattern.compile(\"v[0-9]+/systems/status/?(\\\\?.*)?$\");\n Matcher systemStatusMatcher = systemStatusPattern.matcher(path);\n\n Pattern systemReportsPattern = Pattern.compile(\"v[0-9]+/systems/(.*)/reports/?(\\\\?.*)?$\");\n Matcher systemReportsMatcher = systemReportsPattern.matcher(path);\n\n Pattern reportsPattern = Pattern.compile(\"v[0-9]+/reports/?(\\\\?.*)?$\");\n Matcher reportsMatcher = reportsPattern.matcher(path);\n\n Pattern acksPattern = Pattern.compile(\"v[0-9]+/acks/?(\\\\?.*)$\");\n Matcher acksMatcher = acksPattern.matcher(path);\n\n Pattern rulesPattern = Pattern.compile(\"v[0-9]+/rules/?(\\\\?.*)$\");\n Matcher rulesMatcher = rulesPattern.matcher(path);\n\n Pattern uploadsPattern = Pattern.compile(\"uploads(/.*)?(/\\\\?.*)?$\");\n Matcher uploadsMatcher = uploadsPattern.matcher(path);\n\n HashMap<String, String> response = new HashMap<String, String>();\n if (systemMatcher.matches()) {\n response.put(\"type\", Constants.SYSTEMS_PATH);\n response.put(\"index\", Integer.toString(path.indexOf(\"systems\")));\n } else if (systemReportsMatcher.matches()) {\n response.put(\"type\", Constants.SYSTEM_REPORTS_PATH);\n response.put(\"index\", Integer.toString(path.indexOf(\"reports\")));\n String id = (String) systemReportsMatcher.group(1);\n if (id != null) {\n response.put(\"id\", id);\n }\n } else if (reportsMatcher.matches()) {\n response.put(\"type\", Constants.REPORTS_PATH);\n response.put(\"index\", Integer.toString(path.indexOf(\"reports\")));\n } else if (acksMatcher.matches()) {\n response.put(\"type\", Constants.ACKS_PATH);\n response.put(\"index\", Integer.toString(path.indexOf(\"acks\")));\n } else if (rulesMatcher.matches()) {\n response.put(\"type\", Constants.RULES_PATH);\n response.put(\"index\", Integer.toString(path.indexOf(\"rules\")));\n } else if (uploadsMatcher.matches()) {\n response.put(\"type\", Constants.UPLOADS_PATH);\n response.put(\"index\", Integer.toString(path.indexOf(\"uploads\")));\n } else if (systemStatusMatcher.matches()) {\n response.put(\"type\", Constants.SYSTEMS_STATUS_PATH);\n response.put(\"index\", Integer.toString(path.indexOf(\"systems\")));\n } else {\n response.put(\"type\", \"-1\");\n response.put(\"index\", \"-1\");\n }\n return response;\n }", "private void readJaggrabPath(String line) {\n\t\tfinal String START = \"JAGGRAB \";\n\t\tif (line.startsWith(START)) {\n\t\t\trequest = new Request(line.substring(START.length()).trim());\n\t\t} else {\n\t\t\tchannel.close();\n\t\t}\n\t\tserve();\n\t}", "@Override\n protected String parseURI()\n throws IOException {\n command = parseCommand();\n\n System.out.println(\"Command parsed as: \" + command.toString());\n\n // 2. Parse the modified URI.\n switch (command) {\n case GET_ALL_BUCKETS:\n // A. If we get all buckets we need the user path\n // User path == /root/user/\n modifiedURI = s3HdfsPath.getHdfsRootUserPath();\n break;\n case LIST_PARTS:\n // B. If we get all the parts we need the root upload path\n // Upload path == /root/user/bucket/object/version/upload/\n modifiedURI = s3HdfsPath.getHdfsRootUploadPath();\n break;\n case LIST_VERSIONS:\n // B. If we get all the parts we need the root upload path\n // Upload path == /root/user/bucket/object/version/upload/\n modifiedURI = s3HdfsPath.getHdfsRootBucketPath();\n break;\n case GET_VERSIONING:\n // C. If we get versioning configuration we need bucket meta path\n // Bucket meta path == /root/user/bucket/\"bucketmeta\"\n modifiedURI = s3HdfsPath.getFullHdfsBucketMetaPath();\n break;\n case GET_BUCKET:\n // D. If we get a bucket we need the bucket path\n // Bucket path == /root/user/bucket/\n modifiedURI = s3HdfsPath.getHdfsRootBucketPath();\n break;\n case GET_OBJECT:\n // E. If we get an object we need the full path\n // Full path == /root/user/bucket/object/version/\"file\"\n modifiedURI = s3HdfsPath.getFullHdfsObjPath();\n break;\n default:\n throw new IOException(\"Unknown command: \" + command);\n }\n\n // 3. Set the modified URI.\n modifiedURI = ADD_WEBHDFS(modifiedURI);\n return modifiedURI;\n }", "public void testYourFirstPartition() {\r\n\t UrlValidator urlVal = new UrlValidator(null, null, UrlValidator.ALLOW_ALL_SCHEMES);\r\n\t System.out.println(\"1st partition with a valid scheme = true: \" + urlVal.isValid(\"http://www.google.com\")); //bug here = does not account for http://\r\n System.out.println(\"1st partition with a invalid scheme = false: \" + urlVal.isValid(\"://go.a1a:65a\")); \r\n }", "private static String decodeAndCleanUriString(HttpServletRequest request, String uri) {\n uri = decodeRequestString(request, uri);\n int semicolonIndex = uri.indexOf(';');\n return (semicolonIndex != -1 ? uri.substring(0, semicolonIndex) : uri);\n }", "private boolean initializeAuthority(String p_uriSpec) {\n \n int index = 0;\n int start = 0;\n int end = p_uriSpec.length();\n \n char testChar = '\\0';\n String userinfo = null;\n \n // userinfo is everything up to @\n if (p_uriSpec.indexOf('@', start) != -1) {\n while (index < end) {\n testChar = p_uriSpec.charAt(index);\n if (testChar == '@') {\n break;\n }\n index++;\n }\n userinfo = p_uriSpec.substring(start, index);\n index++;\n }\n \n // host is everything up to last ':', or up to \n // and including ']' if followed by ':'.\n String host = null;\n start = index;\n boolean hasPort = false;\n if (index < end) {\n if (p_uriSpec.charAt(start) == '[') {\n int bracketIndex = p_uriSpec.indexOf(']', start);\n index = (bracketIndex != -1) ? bracketIndex : end;\n if (index+1 < end && p_uriSpec.charAt(index+1) == ':') {\n ++index;\n hasPort = true;\n }\n else {\n index = end;\n }\n }\n else {\n int colonIndex = p_uriSpec.lastIndexOf(':', end);\n index = (colonIndex > start) ? colonIndex : end;\n hasPort = (index != end);\n }\n }\n host = p_uriSpec.substring(start, index);\n int port = -1;\n if (host.length() > 0) {\n // port\n if (hasPort) {\n index++;\n start = index;\n while (index < end) {\n index++;\n }\n String portStr = p_uriSpec.substring(start, index);\n if (portStr.length() > 0) {\n // REVISIT: Remove this code.\n /** for (int i = 0; i < portStr.length(); i++) {\n if (!isDigit(portStr.charAt(i))) {\n throw new MalformedURIException(\n portStr +\n \" is invalid. Port should only contain digits!\");\n }\n }**/\n // REVISIT: Remove this code.\n // Store port value as string instead of integer.\n try {\n port = Integer.parseInt(portStr);\n if (port == -1) --port;\n }\n catch (NumberFormatException nfe) {\n port = -2;\n }\n }\n }\n }\n \n if (isValidServerBasedAuthority(host, port, userinfo)) {\n m_host = host;\n m_port = port;\n m_userinfo = userinfo;\n return true;\n }\n // Note: Registry based authority is being removed from a\n // new spec for URI which would obsolete RFC 2396. If the\n // spec is added to XML errata, processing of reg_name\n // needs to be removed. - mrglavas.\n else if (isValidRegistryBasedAuthority(p_uriSpec)) {\n m_regAuthority = p_uriSpec;\n return true;\n }\n return false;\n }", "public interface ISimpleURL\n{\n /**\n * @return The protocol used. May be <code>null</code> for an unknown\n * protocol.\n */\n @Nullable\n default IURLProtocol getProtocol ()\n {\n return URLProtocolRegistry.getInstance ().getProtocol (getPath ());\n }\n\n /**\n * @return <code>true</code> if the URL has a known protocol\n */\n default boolean hasKnownProtocol ()\n {\n return URLProtocolRegistry.getInstance ().hasKnownProtocol (getPath ());\n }\n\n /**\n * @return The path part of the URL (everything before the \"?\" and the \"#\",\n * incl. the protocol). Never <code>null</code> but maybe empty (e.g.\n * for \"?x=y\").\n */\n @Nonnull\n String getPath ();\n\n /**\n * @return A map of all query string parameters. May be <code>null</code>.\n */\n @Nullable\n @ReturnsMutableObject\n URLParameterList params ();\n\n /**\n * @return The name of the anchor (everything after the \"#\") or\n * <code>null</code> if none is defined.\n */\n @Nullable\n String getAnchor ();\n\n /**\n * @return <code>true</code> if an anchor is present, <code>false</code>\n * otherwise.\n */\n default boolean hasAnchor ()\n {\n return StringHelper.hasText (getAnchor ());\n }\n\n /**\n * Check if this URL has an anchor with the passed name.\n *\n * @param sAnchor\n * The anchor name to check.\n * @return <code>true</code> if the passed anchor is present.\n */\n default boolean hasAnchor (@Nullable final String sAnchor)\n {\n return EqualsHelper.equals (sAnchor, getAnchor ());\n }\n\n /**\n * @return The final string representation of this URL not encoding the\n * request parameters.\n */\n @Nonnull\n default String getAsStringWithoutEncodedParameters ()\n {\n return URLHelper.getURLString (this, (Charset) null);\n }\n\n /**\n * @return The final string representation of this URL with encoded URL\n * parameter keys and values. Using the default URL charset as\n * determined by {@link URLHelper#CHARSET_URL_OBJ}.\n */\n @Nonnull\n default String getAsStringWithEncodedParameters ()\n {\n return URLHelper.getURLString (this, URLHelper.CHARSET_URL_OBJ);\n }\n\n /**\n * @param aCharset\n * The charset used for encoding the parameters. May not be\n * <code>null</code>.\n * @return The final string representation of this URL with encoded URL\n * parameter keys and values.\n */\n @Nonnull\n default String getAsStringWithEncodedParameters (@Nonnull final Charset aCharset)\n {\n ValueEnforcer.notNull (aCharset, \"ParameterCharset\");\n return URLHelper.getURLString (this, aCharset);\n }\n\n @Nullable\n default URL getAsURL ()\n {\n return URLHelper.getAsURL (getAsStringWithEncodedParameters ());\n }\n\n @Nullable\n default URI getAsURI ()\n {\n return URLHelper.getAsURI (getAsStringWithEncodedParameters ());\n }\n}", "@Override\n public Url splitUrl(String Url) {\n\n Url regexSplitUrl = null;\n\n try {\n Matcher matcher = SPLIT_PATTERN.matcher(Url);\n matcher.find();\n String scheme = matcher.group(2);\n String address = matcher.group(4); // host/port\n String host = address.contains(\":\") ? address.split(\":\")[0] : address; // check if the address contains a colon,\n String port = address.contains(\":\") ? address.split(\":\")[1] : \"None\"; // then define a port, otherwise \"None\".\n String path = matcher.group(5);\n String params = matcher.group(7);\n\n regexSplitUrl = new Url(scheme, host, port, path, params);\n\n } catch (Exception exc) {\n System.out.println(\"Error parsing URL, using regular expressions : \" + exc);\n }\n\n return regexSplitUrl;\n }" ]
[ "0.57589775", "0.5616885", "0.5541757", "0.5488055", "0.54692966", "0.5380574", "0.5301306", "0.5226579", "0.5215026", "0.51964533", "0.5174469", "0.5119337", "0.5118507", "0.51169664", "0.50928104", "0.508305", "0.50420606", "0.50396657", "0.5014143", "0.5003989", "0.500051", "0.49887088", "0.49763557", "0.4968805", "0.49619454", "0.49586162", "0.49557504", "0.4939813", "0.49337462", "0.4927526", "0.49245724", "0.491196", "0.489609", "0.48909524", "0.48597178", "0.48565754", "0.485324", "0.48495537", "0.48434275", "0.48434275", "0.48398122", "0.48373616", "0.48327097", "0.48271197", "0.48226035", "0.48198283", "0.48160866", "0.48157766", "0.48093733", "0.4794019", "0.47934106", "0.47899687", "0.47875643", "0.477585", "0.47726512", "0.47715417", "0.4770804", "0.47680354", "0.47648737", "0.47608212", "0.47580874", "0.47580874", "0.4755462", "0.47522855", "0.47522855", "0.47522855", "0.47456017", "0.47440726", "0.47384945", "0.4717606", "0.4717455", "0.47063082", "0.46919674", "0.46892402", "0.46892402", "0.4687506", "0.46840373", "0.46804395", "0.4679688", "0.46789", "0.46787468", "0.4673464", "0.4673291", "0.46648622", "0.46599942", "0.46364027", "0.46216285", "0.46199775", "0.4611467", "0.46062982", "0.4601065", "0.45798331", "0.45707622", "0.45452645", "0.4543598", "0.45424828", "0.45376542", "0.45373687", "0.45346147", "0.4533878" ]
0.48473814
38
Path: ^(([^:/?]+):)?(//([^/?]))?([^?])(\?([^]))?((.))? ________ Query: ^(([^:/?]+):)?(//([^/?]))?([^?])(\?([^]))?((.))? _______ Fragment: ^(([^:/?]+):)?(//([^/?]))?([^?])(\?([^]))?((.))? ______
public static void parseFullPath(String path, IUriListener listener) { if (path == null) { path = ""; } char[] array = path.toCharArray(); parseFullPath(array, listener); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initializePath(String p_uriSpec, int p_nStartIndex)\n throws MalformedURIException {\n if (p_uriSpec == null) {\n throw new MalformedURIException(\n \"Cannot initialize path from null string!\");\n }\n \n int index = p_nStartIndex;\n int start = p_nStartIndex;\n int end = p_uriSpec.length();\n char testChar = '\\0';\n \n // path - everything up to query string or fragment\n if (start < end) {\n // RFC 2732 only allows '[' and ']' to appear in the opaque part.\n if (getScheme() == null || p_uriSpec.charAt(start) == '/') {\n \n // Scan path.\n // abs_path = \"/\" path_segments\n // rel_path = rel_segment [ abs_path ]\n while (index < end) {\n testChar = p_uriSpec.charAt(index);\n \n // check for valid escape sequence\n if (testChar == '%') {\n if (index+2 >= end ||\n !isHex(p_uriSpec.charAt(index+1)) ||\n !isHex(p_uriSpec.charAt(index+2))) {\n throw new MalformedURIException(\n \"Path contains invalid escape sequence!\");\n }\n index += 2;\n }\n // Path segments cannot contain '[' or ']' since pchar\n // production was not changed by RFC 2732.\n else if (!isPathCharacter(testChar)) {\n if (testChar == '?' || testChar == '#') {\n break;\n }\n throw new MalformedURIException(\n \"Path contains invalid character: \" + testChar);\n }\n ++index;\n }\n }\n else {\n \n // Scan opaque part.\n // opaque_part = uric_no_slash *uric\n while (index < end) {\n testChar = p_uriSpec.charAt(index);\n \n if (testChar == '?' || testChar == '#') {\n break;\n }\n \n // check for valid escape sequence\n if (testChar == '%') {\n if (index+2 >= end ||\n !isHex(p_uriSpec.charAt(index+1)) ||\n !isHex(p_uriSpec.charAt(index+2))) {\n throw new MalformedURIException(\n \"Opaque part contains invalid escape sequence!\");\n }\n index += 2;\n }\n // If the scheme specific part is opaque, it can contain '['\n // and ']'. uric_no_slash wasn't modified by RFC 2732, which\n // I've interpreted as an error in the spec, since the \n // production should be equivalent to (uric - '/'), and uric\n // contains '[' and ']'. - mrglavas\n else if (!isURICharacter(testChar)) {\n throw new MalformedURIException(\n \"Opaque part contains invalid character: \" + testChar);\n }\n ++index;\n }\n }\n }\n m_path = p_uriSpec.substring(start, index);\n \n // query - starts with ? and up to fragment or end\n if (testChar == '?') {\n index++;\n start = index;\n while (index < end) {\n testChar = p_uriSpec.charAt(index);\n if (testChar == '#') {\n break;\n }\n if (testChar == '%') {\n if (index+2 >= end ||\n !isHex(p_uriSpec.charAt(index+1)) ||\n !isHex(p_uriSpec.charAt(index+2))) {\n throw new MalformedURIException(\n \"Query string contains invalid escape sequence!\");\n }\n index += 2;\n }\n else if (!isURICharacter(testChar)) {\n throw new MalformedURIException(\n \"Query string contains invalid character: \" + testChar);\n }\n index++;\n }\n m_queryString = p_uriSpec.substring(start, index);\n }\n \n // fragment - starts with #\n if (testChar == '#') {\n index++;\n start = index;\n while (index < end) {\n testChar = p_uriSpec.charAt(index);\n \n if (testChar == '%') {\n if (index+2 >= end ||\n !isHex(p_uriSpec.charAt(index+1)) ||\n !isHex(p_uriSpec.charAt(index+2))) {\n throw new MalformedURIException(\n \"Fragment contains invalid escape sequence!\");\n }\n index += 2;\n }\n else if (!isURICharacter(testChar)) {\n throw new MalformedURIException(\n \"Fragment contains invalid character: \"+testChar);\n }\n index++;\n }\n m_fragment = p_uriSpec.substring(start, index);\n }\n }", "public abstract String getRequestPathInfo();", "private String escapeFragment(String pathFragment) {\n\t\treturn pathFragment.replaceAll(\"~\", \"~0\").replaceAll(\"\\\\/\", \"~1\");\n\t}", "protected void parseURL(URL paramURL, String paramString, int paramInt1, int paramInt2) {\n/* 126 */ String str1 = paramURL.getProtocol();\n/* 127 */ String str2 = paramURL.getAuthority();\n/* 128 */ String str3 = paramURL.getUserInfo();\n/* 129 */ String str4 = paramURL.getHost();\n/* 130 */ int i = paramURL.getPort();\n/* 131 */ String str5 = paramURL.getPath();\n/* 132 */ String str6 = paramURL.getQuery();\n/* */ \n/* */ \n/* 135 */ String str7 = paramURL.getRef();\n/* */ \n/* 137 */ boolean bool1 = false;\n/* 138 */ boolean bool2 = false;\n/* */ \n/* */ \n/* */ \n/* 142 */ if (paramInt1 < paramInt2) {\n/* 143 */ int k = paramString.indexOf('?');\n/* 144 */ bool2 = (k == paramInt1) ? true : false;\n/* 145 */ if (k != -1 && k < paramInt2) {\n/* 146 */ str6 = paramString.substring(k + 1, paramInt2);\n/* 147 */ if (paramInt2 > k)\n/* 148 */ paramInt2 = k; \n/* 149 */ paramString = paramString.substring(0, k);\n/* */ } \n/* */ } \n/* */ \n/* 153 */ int j = 0;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 159 */ boolean bool3 = (paramInt1 <= paramInt2 - 4 && paramString.charAt(paramInt1) == '/' && paramString.charAt(paramInt1 + 1) == '/' && paramString.charAt(paramInt1 + 2) == '/' && paramString.charAt(paramInt1 + 3) == '/') ? true : false;\n/* 160 */ if (!bool3 && paramInt1 <= paramInt2 - 2 && paramString.charAt(paramInt1) == '/' && paramString\n/* 161 */ .charAt(paramInt1 + 1) == '/') {\n/* 162 */ paramInt1 += 2;\n/* 163 */ j = paramString.indexOf('/', paramInt1);\n/* 164 */ if (j < 0 || j > paramInt2) {\n/* 165 */ j = paramString.indexOf('?', paramInt1);\n/* 166 */ if (j < 0 || j > paramInt2) {\n/* 167 */ j = paramInt2;\n/* */ }\n/* */ } \n/* 170 */ str4 = str2 = paramString.substring(paramInt1, j);\n/* */ \n/* 172 */ int k = str2.indexOf('@');\n/* 173 */ if (k != -1) {\n/* 174 */ if (k != str2.lastIndexOf('@')) {\n/* */ \n/* 176 */ str3 = null;\n/* 177 */ str4 = null;\n/* */ } else {\n/* 179 */ str3 = str2.substring(0, k);\n/* 180 */ str4 = str2.substring(k + 1);\n/* */ } \n/* */ } else {\n/* 183 */ str3 = null;\n/* */ } \n/* 185 */ if (str4 != null) {\n/* */ \n/* */ \n/* 188 */ if (str4.length() > 0 && str4.charAt(0) == '[') {\n/* 189 */ if ((k = str4.indexOf(']')) > 2) {\n/* */ \n/* 191 */ String str = str4;\n/* 192 */ str4 = str.substring(0, k + 1);\n/* */ \n/* 194 */ if (!IPAddressUtil.isIPv6LiteralAddress(str4.substring(1, k))) {\n/* 195 */ throw new IllegalArgumentException(\"Invalid host: \" + str4);\n/* */ }\n/* */ \n/* */ \n/* 199 */ i = -1;\n/* 200 */ if (str.length() > k + 1) {\n/* 201 */ if (str.charAt(k + 1) == ':') {\n/* 202 */ k++;\n/* */ \n/* 204 */ if (str.length() > k + 1) {\n/* 205 */ i = Integer.parseInt(str.substring(k + 1));\n/* */ }\n/* */ } else {\n/* 208 */ throw new IllegalArgumentException(\"Invalid authority field: \" + str2);\n/* */ } \n/* */ }\n/* */ } else {\n/* */ \n/* 213 */ throw new IllegalArgumentException(\"Invalid authority field: \" + str2);\n/* */ } \n/* */ } else {\n/* */ \n/* 217 */ k = str4.indexOf(':');\n/* 218 */ i = -1;\n/* 219 */ if (k >= 0) {\n/* */ \n/* 221 */ if (str4.length() > k + 1) {\n/* 222 */ i = Integer.parseInt(str4.substring(k + 1));\n/* */ }\n/* 224 */ str4 = str4.substring(0, k);\n/* */ } \n/* */ } \n/* */ } else {\n/* 228 */ str4 = \"\";\n/* */ } \n/* 230 */ if (i < -1) {\n/* 231 */ throw new IllegalArgumentException(\"Invalid port number :\" + i);\n/* */ }\n/* 233 */ paramInt1 = j;\n/* */ \n/* */ \n/* 236 */ if (str2 != null && str2.length() > 0) {\n/* 237 */ str5 = \"\";\n/* */ }\n/* */ } \n/* 240 */ if (str4 == null) {\n/* 241 */ str4 = \"\";\n/* */ }\n/* */ \n/* */ \n/* 245 */ if (paramInt1 < paramInt2) {\n/* 246 */ if (paramString.charAt(paramInt1) == '/') {\n/* 247 */ str5 = paramString.substring(paramInt1, paramInt2);\n/* 248 */ } else if (str5 != null && str5.length() > 0) {\n/* 249 */ bool1 = true;\n/* 250 */ int k = str5.lastIndexOf('/');\n/* 251 */ String str = \"\";\n/* 252 */ if (k == -1 && str2 != null) {\n/* 253 */ str = \"/\";\n/* */ }\n/* 255 */ str5 = str5.substring(0, k + 1) + str + paramString.substring(paramInt1, paramInt2);\n/* */ } else {\n/* */ \n/* 258 */ String str = (str2 != null) ? \"/\" : \"\";\n/* 259 */ str5 = str + paramString.substring(paramInt1, paramInt2);\n/* */ } \n/* 261 */ } else if (bool2 && str5 != null) {\n/* 262 */ int k = str5.lastIndexOf('/');\n/* 263 */ if (k < 0)\n/* 264 */ k = 0; \n/* 265 */ str5 = str5.substring(0, k) + \"/\";\n/* */ } \n/* 267 */ if (str5 == null) {\n/* 268 */ str5 = \"\";\n/* */ }\n/* 270 */ if (bool1) {\n/* */ \n/* 272 */ while ((j = str5.indexOf(\"/./\")) >= 0) {\n/* 273 */ str5 = str5.substring(0, j) + str5.substring(j + 2);\n/* */ }\n/* */ \n/* 276 */ j = 0;\n/* 277 */ while ((j = str5.indexOf(\"/../\", j)) >= 0) {\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 284 */ if (j > 0 && (paramInt2 = str5.lastIndexOf('/', j - 1)) >= 0 && str5\n/* 285 */ .indexOf(\"/../\", paramInt2) != 0) {\n/* 286 */ str5 = str5.substring(0, paramInt2) + str5.substring(j + 3);\n/* 287 */ j = 0; continue;\n/* */ } \n/* 289 */ j += 3;\n/* */ } \n/* */ \n/* */ \n/* */ \n/* 294 */ j = str5.indexOf(\"/..\");\n/* 295 */ while (str5.endsWith(\"/..\") && (paramInt2 = str5.lastIndexOf('/', j - 1)) >= 0) {\n/* 296 */ str5 = str5.substring(0, paramInt2 + 1);\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* 302 */ if (str5.startsWith(\"./\") && str5.length() > 2) {\n/* 303 */ str5 = str5.substring(2);\n/* */ }\n/* */ \n/* 306 */ if (str5.endsWith(\"/.\")) {\n/* 307 */ str5 = str5.substring(0, str5.length() - 1);\n/* */ }\n/* */ } \n/* 310 */ setURL(paramURL, str1, str4, i, str2, str3, str5, str6, str7);\n/* */ }", "static Set<String> parsePathParameters(String path) {\n Matcher m = PARAM_URL_REGEX.matcher(path);\n Set<String> patterns = new LinkedHashSet<>();\n while (m.find()) {\n patterns.add(m.group(1));\n }\n return patterns;\n }", "@Override\n protected WebMap.Info getInfoFromPath(String prepath,\n\t\t\t\t\t String epath,\n\t\t\t\t\t String query,\n\t\t\t\t\t String fragment,\n\t\t\t\t\t WebMap.RequestInfo requestInfo)\n {\n\t// System.out.format(\"prepath = \\\"%s\\\"\\n\", prepath);\n\t// System.out.format(\"epath = \\\"%s\\\"\\n\", epath);\n\ttry {\n\t InputStream is = null;\n\t long length = -1;\n\t String mimeType = null;\n\t boolean compress = false;\n\t if (zipfile != null) {\n\t\tif (epath.startsWith(\"/\")) {\n\t\t epath = epath.substring(1);\n\t\t}\n\t\tif (epath.endsWith(\"/\") || epath.length() == 0) {\n\t\t // System.out.println(\"prepath = \" + prepath);\n\t\t // System.out.println(\"epath = \" + epath);\n\t\t if (getDisplayDir() == false) return null;\n\t\t return EjwsUtilities.printHtmlDir(zipfile, prepath, null,\n\t\t\t\t\t\t epath, \"UTF-8\", this);\n\t\t} else {\n\t\t ZipEntry ze = zipfile.getEntry(epath);\n\t\t if (ze == null) {\n\t\t\tfor (String ep: gzipPaths(epath)) {\n\t\t\t ze = zipfile.getEntry(ep);\n\t\t\t if (ze != null) {\n\t\t\t\tcompress = true;\n\t\t\t\tbreak;\n\t\t\t }\n\t\t\t}\n\t\t }\n\t\t if (ze == null) return null;\n\n\t\t is = zipfile.getInputStream(ze);\n\t\t length = (int)ze.getSize();\n\t\t mimeType = getMimeType(epath);\n\t\t URI uri = new URI(null, null, epath, query, fragment);\n\t\t String name =\n\t\t\t\"jar:\" + rootURI.toString() + \"!/\"\n\t\t\t+ uri.toString();\n\t\t // System.out.println(\"name = \" + name);\n\t\t // new URL(\"jar:file:\" + rootURI.toString()\n\t\t //\t + \"!/\" + epath).toString();\n\t\t WebMap.Info result =\n\t\t\tnew WebMap.Info(is, length, mimeType, name);\n\t\t if (compress) {\n\t\t\tresult.setEncoding(\"gzip\");\n\t\t }\n\t\t return result;\n\t\t}\n\t }\n\t return null;\n\t} catch (IOException e) {\n\t return null;\n\t} catch (URISyntaxException ee) {\n\t return null;\n\t} catch (NullPointerException eee) {\n\t eee.printStackTrace();\n\t System.exit(1);\n\t return null;\n\t}\n }", "String getUrlPattern();", "private static String getRequestPath(final IWebRequest request) {\n\n String requestPath = request.getPathWithinApplication();\n\n final int fragmentIndex = requestPath.indexOf(';');\n if (fragmentIndex != -1) {\n requestPath = requestPath.substring(0, fragmentIndex);\n }\n\n return requestPath;\n\n }", "public static void parseURL(PURL u, String spec, int start, int limit) {\n // These fields may receive context content if this was relative URL\n String protocol = u.getProtocol();\n String authority = u.getAuthority(); \n String userInfo = u.getUserInfo();\n String host = u.getHost();\n int port = u.getPort();\n String path = u.getPath();\n\tString query = u.getQuery();\n\n // This field has already been parsed\n String ref = u.getRef();\n\n\tboolean isRelPath = false;\n\tboolean queryOnly = false;\n\n// FIX: should not assume query if opaque\n // Strip off the query part\n\tif (start < limit) {\n int queryStart = spec.indexOf('?');\n queryOnly = queryStart == start;\n if ((queryStart != -1) && (queryStart < limit)) {\n query = spec.substring(queryStart+1, limit);\n if (limit > queryStart)\n limit = queryStart;\n spec = spec.substring(0, queryStart);\n }\n\t}\n\n\tint i = 0;\n // Parse the authority part if any\n\tif ((start <= limit - 2) && (spec.charAt(start) == '/') &&\n\t (spec.charAt(start + 1) == '/')) {\n\t start += 2;\n\t i = spec.indexOf('/', start);\n if (i < 0) {\n\t i = spec.indexOf('?', start);\n\t\tif (i < 0)\n i = limit;\n\t }\n\n host = authority = spec.substring(start, i);\n\n int ind = authority.indexOf('@');\n if (ind != -1) {\n userInfo = authority.substring(0, ind);\n host = authority.substring(ind+1);\n\t } else {\n\t\tuserInfo = null;\n\t }\n\t if (host != null) {\n\t\t// If the host is surrounded by [ and ] then its an IPv6 \n\t\t// literal address as specified in RFC2732\n\t\tif (host.length()>0 && (host.charAt(0) == '[')) {\n\t\t //PURLStreamHandler has been modified - it does not\n\t\t //handle IPV6 addresses\n\t\t //this is an ipv6 address\n\n\t\t throw new Error(\"Can't handle IPv6 addresses!\");\n\n\t\t} else {\n\t\t ind = host.indexOf(':');\n\t\t port = -1;\n\t\t if (ind >= 0) {\n\t\t\t// port can be null according to RFC2396\n\t\t\tif (host.length() > (ind + 1)) {\n\t\t\t port = Integer.parseInt(host.substring(ind + 1));\n\t\t\t}\n\t\t\thost = host.substring(0, ind);\n\t\t }\n\t\t}\n\t } else {\n\t\thost = \"\";\n\t }\n\t if (port < -1)\n\t\tthrow new IllegalArgumentException(\"Invalid port number :\" +\n\t\t\t\t\t\t port);\n\t start = i;\n\t // If the authority is defined then the path is defined by the\n // spec only; See RFC 2396 Section 5.2.4.\n if (authority != null && authority.length() > 0)\n path = \"\";\n\t} \n\n \tif (host == null) {\n \t host = \"\";\n \t}\n\n // Parse the file path if any\n\tif (start < limit) {\n\t if (spec.charAt(start) == '/') {\n\t\tpath = spec.substring(start, limit);\n\t } else if (path != null && path.length() > 0) {\n\t\tisRelPath = true;\n\t\tint ind = path.lastIndexOf('/');\n\t\tString seperator = \"\";\n\t\tif (ind == -1 && authority != null)\n\t\t seperator = \"/\";\n\t\tpath = path.substring(0, ind + 1) + seperator +\n\t\t spec.substring(start, limit);\n\t\t\t\t\t\n\t } else {\n\t\tString seperator = (authority != null) ? \"/\" : \"\";\n\t\tpath = seperator + spec.substring(start, limit);\n\t }\n\t} else if (queryOnly && path != null) {\n int ind = path.lastIndexOf('/');\n if (ind < 0)\n ind = 0;\n path = path.substring(0, ind) + \"/\";\n }\n\tif (path == null)\n\t path = \"\";\n\n\tif (isRelPath) {\n // Remove embedded /./\n while ((i = path.indexOf(\"/./\")) >= 0) {\n\t path = path.substring(0, i) + path.substring(i + 2);\n\t }\n // Remove embedded /../ if possible\n\t i = 0;\n\t while ((i = path.indexOf(\"/../\", i)) > 0) {\n\t if ((limit = path.lastIndexOf('/', i - 1)) >= 0) {\n\t\t path = path.substring(0, limit) + path.substring(i + 3);\n\t\t i = 0;\n\t } else {\n\t\t i = i + 3;\n\t\t}\n\t }\n // Remove trailing .. if possible\n while (path.endsWith(\"/..\")) {\n i = path.indexOf(\"/..\");\n\t if ((limit = path.lastIndexOf('/', i - 1)) >= 0) {\n\t\t path = path.substring(0, limit+1);\n\t } else {\n\t\t break;\n\t\t}\n\t }\n\t // Remove starting .\n if (path.startsWith(\"./\") && path.length() > 2)\n path = path.substring(2);\n\n // Remove trailing .\n if (path.endsWith(\"/.\"))\n path = path.substring(0, path.length() -1);\n\t}\n\n\tsetURL(u, protocol, host, port, authority, userInfo, path, query, ref);\n }", "private void parseUrlsPaths(String localPath) {\n String[] pathArray = localPath.split(\"/\");\n // Geometry_305_v6_fb_coupe_frontlightbulb1_a001.b3d.dflr\n this.fileName = pathArray[pathArray.length - 1];\n // /cars/mustang2015/geometry/\n this.subDirectory = localPath.replace(\"/\" + this.fileName, \"\");\n }", "private void readHttpPath(String line) {\n\t\tString[] parts = line.split(\" \");\n\t\tif (parts.length != 3) {\n\t\t\tchannel.close();\n\t\t} else {\n\t\t\trequest = new Request(parts[1].trim());\n\t\t}\n\t}", "private String getHttpPath(String httpPath) {\n if(httpPath == null || httpPath.equals(\"\")) {\n httpPath = \"/*\";\n }\n else {\n if(!httpPath.startsWith(\"/\")) {\n httpPath = \"/\" + httpPath;\n }\n if(httpPath.endsWith(\"/\")) {\n httpPath = httpPath + \"*\";\n }\n if(!httpPath.endsWith(\"/*\")) {\n httpPath = httpPath + \"/*\";\n }\n }\n return httpPath;\n }", "public static String extractPathFromPattern(final HttpServletRequest request){\r\n\r\n\t\tString path = (String) request.getAttribute(\r\n\t HandlerMapping.PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE);\r\n\t String bestMatchPattern = (String ) request.getAttribute(HandlerMapping.BEST_MATCHING_PATTERN_ATTRIBUTE);\r\n\r\n\t AntPathMatcher apm = new AntPathMatcher();\r\n\t String finalPath = apm.extractPathWithinPattern(bestMatchPattern, path);\r\n\r\n\t return finalPath;\r\n\t}", "private URI findBaseUrl0(String stringUrl) throws URISyntaxException {\n stringUrl = stringUrl.replace(\"\\\\\", \"/\");\n int qindex = stringUrl.indexOf(\"?\");\n if (qindex != -1) {\n // stuff after the ? tends to make the Java URL parser burp.\n stringUrl = stringUrl.substring(0, qindex);\n }\n URI url = new URI(stringUrl);\n URI baseUrl = new URI(url.getScheme(), url.getAuthority(), url.getPath(), null, null);\n\n String path = baseUrl.getPath().substring(1); // toss the leading /\n String[] pieces = path.split(\"/\");\n List<String> urlSlashes = new ArrayList<String>();\n // reverse\n for (String piece : pieces) {\n urlSlashes.add(piece);\n }\n List<String> cleanedSegments = new ArrayList<String>();\n String possibleType = \"\";\n boolean del;\n\n for (int i = 0; i < urlSlashes.size(); i++) {\n String segment = urlSlashes.get(i);\n\n // Split off and save anything that looks like a file type.\n if (segment.indexOf(\".\") != -1) {\n possibleType = segment.split(\"\\\\.\")[1];\n\n /*\n * If the type isn't alpha-only, it's probably not actually a file extension.\n */\n if (!possibleType.matches(\"[^a-zA-Z]\")) {\n segment = segment.split(\"\\\\.\")[0];\n }\n }\n\n /**\n * EW-CMS specific segment replacement. Ugly. Example:\n * http://www.ew.com/ew/article/0,,20313460_20369436,00.html\n **/\n if (segment.indexOf(\",00\") != -1) {\n segment = segment.replaceFirst(\",00\", \"\");\n }\n\n // If our first or second segment has anything looking like a page\n // number, remove it.\n /* Javascript code has some /i's here, we might need to fiddle */\n Matcher pnMatcher = Patterns.PAGE_NUMBER_LIKE.matcher(segment);\n if (pnMatcher.matches() && ((i == 1) || (i == 0))) {\n segment = pnMatcher.replaceAll(\"\");\n }\n\n del = false;\n\n /*\n * If this is purely a number, and it's the first or second segment, it's probably a page number.\n * Remove it.\n */\n if (i < 2 && segment.matches(\"^\\\\d{1,2}$\")) {\n del = true;\n }\n\n /* If this is the first segment and it's just \"index\", remove it. */\n if (i == 0 && segment.toLowerCase() == \"index\")\n del = true;\n\n /*\n * If our first or second segment is smaller than 3 characters, and the first segment was purely\n * alphas, remove it.\n */\n /* /i again */\n if (i < 2 && segment.length() < 3 && !urlSlashes.get(0).matches(\"[a-z]\"))\n del = true;\n\n /* If it's not marked for deletion, push it to cleanedSegments. */\n if (!del) {\n cleanedSegments.add(segment);\n }\n }\n\n String cleanedPath = \"\";\n for (String s : cleanedSegments) {\n cleanedPath = cleanedPath + s;\n cleanedPath = cleanedPath + \"/\";\n }\n URI cleaned = new URI(url.getScheme(), url.getAuthority(), \"/\"\n + cleanedPath.substring(0, cleanedPath\n .length() - 1), null, null);\n return cleaned;\n }", "private RequestNodePath() {\n }", "private Predicate<String> paths() {\n return or(\n //regex(\"/business.*\"),\n // regex(\"/some.*\"),\n // regex(\"/contacts.*\"),\n // regex(\"/pet.*\"),\n regex(\"/api.*\"),\n regex(\"/oauth2.*\"));\n }", "public PathMatcher getPathMatcher()\n/* */ {\n/* 559 */ return this.pathMatcher;\n/* */ }", "protected void setupRequestPathExp(StringBuilder sb, RomanticTransaction tx) {\n final String requestPath = tx.getRequestPath();\n if (requestPath != null) {\n sb.append(\", \").append(requestPath);\n }\n }", "@Override\n\tpublic PathMatcher getPathMatcher(String arg0) {\n\t\treturn null;\n\t}", "public URI getRequestURI();", "String getQueryRequestUrl();", "Uri decryptedPath();", "FullUriTemplateString baseUri();", "private String addQueryToPath(\n String path,\n String fullUri) {\n\n String response = path;\n int index = fullUri.indexOf(\"?\");\n if (index == -1) {\n index = fullUri.indexOf(\"&\");\n }\n if (index != -1) {\n String query = fullUri.substring(index);\n if (query.isEmpty()) {\n response = path;\n } else {\n response = path + query;\n }\n }\n return response;\n }", "private void setRequestPath(final HttpServerExchange exchange, final String encodedPath, final String charset, final boolean allowEncodedSlash, StringBuilder decodeBuffer) {\n boolean requiresDecode = false;\n for (int i = 0; i < encodedPath.length(); ++i) {\n char c = encodedPath.charAt(i);\n if (c == '?') {\n String part;\n String encodedPart = encodedPath.substring(0, i);\n if (requiresDecode) {\n part = URLUtils.decode(encodedPart, charset, allowEncodedSlash, decodeBuffer);\n } else {\n part = encodedPart;\n }\n exchange.setRequestPath(part);\n exchange.setRelativePath(part);\n exchange.setRequestURI(encodedPart);\n final String qs = encodedPath.substring(i + 1);\n exchange.setQueryString(qs);\n URLUtils.parseQueryString(qs, exchange, encoding, decode);\n return;\n } else if(c == ';') {\n String part;\n String encodedPart = encodedPath.substring(0, i);\n if (requiresDecode) {\n part = URLUtils.decode(encodedPart, charset, allowEncodedSlash, decodeBuffer);\n } else {\n part = encodedPart;\n }\n exchange.setRequestPath(part);\n exchange.setRelativePath(part);\n exchange.setRequestURI(encodedPart);\n for(int j = i; j < encodedPath.length(); ++j) {\n if (encodedPath.charAt(j) == '?') {\n String pathParams = encodedPath.substring(i + 1, j);\n URLUtils.parsePathParms(pathParams, exchange, encoding, decode);\n String qs = encodedPath.substring(j + 1);\n exchange.setQueryString(qs);\n URLUtils.parseQueryString(qs, exchange, encoding, decode);\n return;\n }\n }\n URLUtils.parsePathParms(encodedPath.substring(i + 1), exchange, encoding, decode);\n return;\n } else if(c == '%' || c == '+') {\n requiresDecode = true;\n }\n }\n\n String part;\n if (requiresDecode) {\n part = URLUtils.decode(encodedPath, charset, allowEncodedSlash, decodeBuffer);\n } else {\n part = encodedPath;\n }\n exchange.setRequestPath(part);\n exchange.setRelativePath(part);\n exchange.setRequestURI(encodedPath);\n }", "public void testExtractDetailsUsingPath() {\n\t\t\n\t\tString href = when().\n\t\t\t\t\t\tget(\"http://jsonplaceholder.typicode.com/photos/1\").\n\t\t\t\t\t then().\n\t\t\t\t\t contentType(ContentType.JSON).\n\t\t\t\t\t body(\"albumId\", equalTo(1)).\n\t\t\t\t\t extract().\n\t\t\t\t\t path(\"url\");\n\t\tSystem.out.println(\"href : \" + href);\n\t\t\n\t\twhen().get(href).then().statusCode(200);\n\t}", "@Override\n protected void parseURL(URL url, String spec, int start, int end) {\n if (end < start) {\n return;\n }\n String parseString = \"\";\n if (start < end) {\n parseString = spec.substring(start, end).replace('\\\\', '/');\n }\n super.parseURL(url, parseString, 0, parseString.length());\n }", "abstract String getUri();", "public String getSchemeSpecificPart() {\n StringBuffer schemespec = new StringBuffer();\n \n if (m_host != null || m_regAuthority != null) {\n schemespec.append(\"//\");\n \n // Server based authority.\n if (m_host != null) {\n \n if (m_userinfo != null) {\n schemespec.append(m_userinfo);\n schemespec.append('@');\n }\n \n schemespec.append(m_host);\n \n if (m_port != -1) {\n schemespec.append(':');\n schemespec.append(m_port);\n }\n }\n // Registry based authority.\n else {\n schemespec.append(m_regAuthority);\n }\n }\n \n if (m_path != null) {\n schemespec.append((m_path));\n }\n \n if (m_queryString != null) {\n schemespec.append('?');\n schemespec.append(m_queryString);\n }\n \n if (m_fragment != null) {\n schemespec.append('#');\n schemespec.append(m_fragment);\n }\n \n return schemespec.toString();\n }", "public abstract String getRequestServletPath();", "private static URIBuilder createURIBuilder(String path) {\n\t\tURIBuilder builder = new URIBuilder();\n\t\tif(path.contains(\"?\")) {\n\t\t\tString uri = path.substring(0, path.indexOf(\"?\"));\n\t\t\tString queryParamName = path.substring(path.indexOf(\"?\") + 1, path.indexOf(\"=\"));\n\t\t\tString queryParamValue = path.substring(path.indexOf(\"=\") + 1);\n\t\t\tbuilder.setScheme(\"http\").setHost(HOST).setPath(uri).setParameter(queryParamName, queryParamValue);\n\t\t}\n\t\telse {\n\t\t\tbuilder.setScheme(\"http\").setHost(HOST).setPath(path);\n\t\t}\n\t\treturn builder;\n\t}", "public String removeQueryString(String string) {\n\t\tString pathWithoutQueryString = string;\n\t\tif (string != null && string.matches(\".*\\\\?.*\")) {\n\t\t\tpathWithoutQueryString = string.split(\"\\\\?\")[0];\n\t\t}\n\t\treturn pathWithoutQueryString;\n\t}", "public void setPathMatcher(PathMatcher pathMatcher)\n/* */ {\n/* 552 */ this.pathMatcher = pathMatcher;\n/* */ }", "String getServletUrlPattern();", "private String parsingURL(String requestURL) {\n\t\tint pos = 0;\n\t\tif (requestURL.startsWith(\"http://\")) {\n\t\t\tpos = \"http://\".length();\n\t\t}\n\t\telse {\n\t\t\tpos = \"https://\".length();\n\t\t}\n\t\t\n\t\tint pos2 = requestURL.indexOf(\":\", pos);\n\t\tif (pos2 < 0) {\n\t\t\tpos2 = requestURL.length();\n\t\t}\n\t\t\n\t\tint pos3 = requestURL.indexOf(\"/\", pos);\n\t\tif (pos3 < 0) {\n\t\t\tpos3 = requestURL.length();\n\t\t}\n\t\t\n\t\tpos2 = Math.min(pos2, pos3);\n\t\t\n\t\tString host = requestURL.substring(pos, pos2);\n\t\t/**\n\t\t * parsing request url\n\t\t */\n\t\treturn host;\n\t}", "PathSegments getPath();", "public boolean useTrailingSlashMatch()\n/* */ {\n/* 574 */ return this.trailingSlashMatch;\n/* */ }", "public interface HeadUri {\n\n\tString ROOT = \"/\";\n\n\tString CONNECT = \"/connect\";\n\n\tString PUSH = \"/push\";\n\n}", "public static void parseFullPath(char[] path, IUriListener listener) {\n UriParser parser = new UriParser(listener);\n parser.parseFullPath(path, 0);\n }", "java.lang.String getUri();", "java.lang.String getUri();", "public GetRequest(String pathInfo) throws ServletException {\r\n\r\n\t\tMatcher matcher;\r\n\r\n\t\tif (pathInfo != null) {\r\n\r\n\t\t\tmatcher = regExQueuePattern.matcher(pathInfo);\r\n\t\t\tif (matcher.find()) {\r\n\t\t\t\trequestID = Integer.parseInt(matcher.group(1));\r\n\t\t\t\tisQueuePolling = true;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tmatcher = regExResponsePattern.matcher(pathInfo);\r\n\t\t\tif (matcher.find()) {\r\n\t\t\t\trequestID = Integer.parseInt(matcher.group(1));\r\n\t\t\t\tisQueuePolling = false;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(PROXY + \"Invalid URI.\");\r\n\t\tthrow new ServletException(PROXY + \"Invalid URI.\");\r\n\t}", "RestXqPath(final String path, final RestXqFunction rf) throws QueryException {\n rxf = rf;\n // get path string and check syntax of single segments\n segments = HTTPContext.toSegments(path);\n for(final String s : segments) {\n if(s.startsWith(\"{\")) rxf.checkVariable(s, AtomType.AAT);\n }\n }", "String query();", "@Override\r\n public UriBuilder getAbsolutePathBuilder() {\n return null;\r\n }", "java.lang.String getFormUri();", "public void setPath(String p_path) throws MalformedURIException {\n if (p_path == null) {\n m_path = null;\n m_queryString = null;\n m_fragment = null;\n }\n else {\n initializePath(p_path, 0);\n }\n }", "String processQuery(String query);", "String getQueryString ();", "public JsonPointer path(String fragment) {\n\t\tpathFragments.addLast(escapeFragment(fragment));\n\t\treturn this;\n\t}", "public final void mURI_PATH() throws RecognitionException {\n\t\ttry {\n\t\t\t// /Users/Sarah/Projects/ontop/obdalib-core/src/main/java/it/unibz/krdb/obda/parser/Datalog.g:457:18: ( ( ALPHANUM | UNDERSCORE | DASH | COLON | DOT | HASH | QUESTION | SLASH ) )\n\t\t\t// /Users/Sarah/Projects/ontop/obdalib-core/src/main/java/it/unibz/krdb/obda/parser/Datalog.g:\n\t\t\t{\n\t\t\tif ( input.LA(1)=='#'||(input.LA(1) >= '-' && input.LA(1) <= ':')||input.LA(1)=='?'||(input.LA(1) >= 'A' && input.LA(1) <= 'Z')||input.LA(1)=='_'||(input.LA(1) >= 'a' && input.LA(1) <= 'z') ) {\n\t\t\t\tinput.consume();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tMismatchedSetException mse = new MismatchedSetException(null,input);\n\t\t\t\trecover(mse);\n\t\t\t\tthrow mse;\n\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t}", "private static String handleUrl(String s) {\n if (s.endsWith(\"/..\")) {\n int idx = s.lastIndexOf('/');\n s = s.substring(0, idx - 1);\n idx = s.lastIndexOf('/');\n String gs = s.substring(0, idx);\n if (!gs.equals(\"smb:/\")) {\n s = gs;\n }\n }\n if (!s.endsWith(\"/\")) {\n s += \"/\";\n }\n System.out.println(\"now its \" + s);\n return s;\n }", "@Test\r\n public void testRegexp() throws Exception {\n\r\n String a = \"a/b/100/test\";\r\n\r\n Pattern pattern = Pattern.compile(\".+/(\\\\d+)/test\");\r\n\r\n System.out.println(parseIdFromUriPath(a, pattern));\r\n\r\n }", "@Override\r\n public MultivaluedMap<String, String> getPathParameters() {\n return null;\r\n }", "@Override\r\n\t\tpublic boolean accept(Path path) {\n\t\t\tboolean flag = path.toString().matches(regex);\r\n\t\t\treturn flag;\r\n\t\t}", "String getUri( );", "String getQuery();", "List<String> completeEndpointPath(String completionText);", "private String getQueryStringFromParser() {\n return (getString() == null) ? \"\" : getString();\n }", "private String getDemande(HttpServletRequest request) {\n String demande = \"\";\n demande = request.getRequestURI();\n demande = demande.substring(demande.lastIndexOf(\"/\") + 1);\n return demande;\n }", "java.lang.String getQuery();", "java.lang.String getQuery();", "public URI getURI()\r\n/* 36: */ {\r\n/* 37:64 */ return this.httpRequest.getURI();\r\n/* 38: */ }", "String getURI();", "String getURI();", "String getURI();", "String getUri();", "@Override\n public void configurePathMatch(PathMatchConfigurer configurer) {\n UrlPathHelper urlPathHelper = new UrlPathHelper();\n urlPathHelper.setRemoveSemicolonContent(false);\n configurer.setUrlPathHelper(urlPathHelper);\n }", "private boolean isPathInWhiteList(String requestPath) {\n\t\tif (requestPath.equals(HOME_PATH))\r\n\t\t\treturn true;\r\n\r\n\t\tfor (String urlPatternItem : EXCLUDED_URLS) {\r\n\t\t\tif (requestPath.contains(urlPatternItem)) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "boolean getPathPatternSupported();", "public String getFragmentPath() {\n return fragmentPath;\n }", "private void initialize(URI p_base, String p_uriSpec)\n throws MalformedURIException {\n \n String uriSpec = p_uriSpec;\n int uriSpecLen = (uriSpec != null) ? uriSpec.length() : 0;\n \n if (p_base == null && uriSpecLen == 0) {\n throw new MalformedURIException(\n \"Cannot initialize URI with empty parameters.\");\n }\n \n // just make a copy of the base if spec is empty\n if (uriSpecLen == 0) {\n initialize(p_base);\n return;\n }\n \n int index = 0;\n \n // Check for scheme, which must be before '/', '?' or '#'. Also handle\n // names with DOS drive letters ('D:'), so 1-character schemes are not\n // allowed.\n int colonIdx = uriSpec.indexOf(':');\n if (colonIdx != -1) {\n final int searchFrom = colonIdx - 1;\n // search backwards starting from character before ':'.\n int slashIdx = uriSpec.lastIndexOf('/', searchFrom);\n int queryIdx = uriSpec.lastIndexOf('?', searchFrom);\n int fragmentIdx = uriSpec.lastIndexOf('#', searchFrom);\n \n if (colonIdx < 2 || slashIdx != -1 || \n queryIdx != -1 || fragmentIdx != -1) {\n // A standalone base is a valid URI according to spec\n if (colonIdx == 0 || (p_base == null && fragmentIdx != 0)) {\n throw new MalformedURIException(\"No scheme found in URI.\");\n }\n }\n else {\n initializeScheme(uriSpec);\n index = m_scheme.length()+1;\n \n // Neither 'scheme:' or 'scheme:#fragment' are valid URIs.\n if (colonIdx == uriSpecLen - 1 || uriSpec.charAt(colonIdx+1) == '#') {\n throw new MalformedURIException(\"Scheme specific part cannot be empty.\"); \n }\n }\n }\n else if (p_base == null && uriSpec.indexOf('#') != 0) {\n throw new MalformedURIException(\"No scheme found in URI.\"); \n }\n \n // Two slashes means we may have authority, but definitely means we're either\n // matching net_path or abs_path. These two productions are ambiguous in that\n // every net_path (except those containing an IPv6Reference) is an abs_path. \n // RFC 2396 resolves this ambiguity by applying a greedy left most matching rule. \n // Try matching net_path first, and if that fails we don't have authority so \n // then attempt to match abs_path.\n //\n // net_path = \"//\" authority [ abs_path ]\n // abs_path = \"/\" path_segments\n if (((index+1) < uriSpecLen) &&\n (uriSpec.charAt(index) == '/' && uriSpec.charAt(index+1) == '/')) {\n index += 2;\n int startPos = index;\n \n // Authority will be everything up to path, query or fragment\n char testChar = '\\0';\n while (index < uriSpecLen) {\n testChar = uriSpec.charAt(index);\n if (testChar == '/' || testChar == '?' || testChar == '#') {\n break;\n }\n index++;\n }\n \n // Attempt to parse authority. If the section is an empty string\n // this is a valid server based authority, so set the host to this\n // value.\n if (index > startPos) {\n // If we didn't find authority we need to back up. Attempt to\n // match against abs_path next.\n if (!initializeAuthority(uriSpec.substring(startPos, index))) {\n index = startPos - 2;\n }\n }\n else {\n m_host = \"\";\n }\n }\n \n initializePath(uriSpec, index);\n \n // Resolve relative URI to base URI - see RFC 2396 Section 5.2\n // In some cases, it might make more sense to throw an exception\n // (when scheme is specified is the string spec and the base URI\n // is also specified, for example), but we're just following the\n // RFC specifications\n if (p_base != null) {\n \n // check to see if this is the current doc - RFC 2396 5.2 #2\n // note that this is slightly different from the RFC spec in that\n // we don't include the check for query string being null\n // - this handles cases where the urispec is just a query\n // string or a fragment (e.g. \"?y\" or \"#s\") -\n // see <http://www.ics.uci.edu/~fielding/url/test1.html> which\n // identified this as a bug in the RFC\n if (m_path.length() == 0 && m_scheme == null &&\n m_host == null && m_regAuthority == null) {\n m_scheme = p_base.getScheme();\n m_userinfo = p_base.getUserinfo();\n m_host = p_base.getHost();\n m_port = p_base.getPort();\n m_regAuthority = p_base.getRegBasedAuthority();\n m_path = p_base.getPath();\n \n if (m_queryString == null) {\n m_queryString = p_base.getQueryString();\n }\n return;\n }\n \n // check for scheme - RFC 2396 5.2 #3\n // if we found a scheme, it means absolute URI, so we're done\n if (m_scheme == null) {\n m_scheme = p_base.getScheme();\n }\n else {\n return;\n }\n \n // check for authority - RFC 2396 5.2 #4\n // if we found a host, then we've got a network path, so we're done\n if (m_host == null && m_regAuthority == null) {\n m_userinfo = p_base.getUserinfo();\n m_host = p_base.getHost();\n m_port = p_base.getPort();\n m_regAuthority = p_base.getRegBasedAuthority();\n }\n else {\n return;\n }\n \n // check for absolute path - RFC 2396 5.2 #5\n if (m_path.length() > 0 &&\n m_path.startsWith(\"/\")) {\n return;\n }\n \n // if we get to this point, we need to resolve relative path\n // RFC 2396 5.2 #6\n String path = \"\";\n String basePath = p_base.getPath();\n \n // 6a - get all but the last segment of the base URI path\n if (basePath != null && basePath.length() > 0) {\n int lastSlash = basePath.lastIndexOf('/');\n if (lastSlash != -1) {\n path = basePath.substring(0, lastSlash+1);\n }\n }\n else if (m_path.length() > 0) {\n path = \"/\";\n }\n \n // 6b - append the relative URI path\n path = path.concat(m_path);\n \n // 6c - remove all \"./\" where \".\" is a complete path segment\n index = -1;\n while ((index = path.indexOf(\"/./\")) != -1) {\n path = path.substring(0, index+1).concat(path.substring(index+3));\n }\n \n // 6d - remove \".\" if path ends with \".\" as a complete path segment\n if (path.endsWith(\"/.\")) {\n path = path.substring(0, path.length()-1);\n }\n \n // 6e - remove all \"<segment>/../\" where \"<segment>\" is a complete\n // path segment not equal to \"..\"\n index = 1;\n int segIndex = -1;\n String tempString = null;\n \n while ((index = path.indexOf(\"/../\", index)) > 0) {\n tempString = path.substring(0, path.indexOf(\"/../\"));\n segIndex = tempString.lastIndexOf('/');\n if (segIndex != -1) {\n if (!tempString.substring(segIndex).equals(\"..\")) {\n path = path.substring(0, segIndex+1).concat(path.substring(index+4));\n index = segIndex;\n }\n else\n index += 4;\n }\n else\n index += 4;\n }\n \n // 6f - remove ending \"<segment>/..\" where \"<segment>\" is a\n // complete path segment\n if (path.endsWith(\"/..\")) {\n tempString = path.substring(0, path.length()-3);\n segIndex = tempString.lastIndexOf('/');\n if (segIndex != -1) {\n path = path.substring(0, segIndex+1);\n }\n }\n m_path = path;\n }\n }", "@Override\r\n\t\tpublic boolean accept(Path path) {\n\t\t\tboolean flag = path.toString().matches(regex);\r\n\t\t\treturn !flag;\r\n\t\t}", "@Override\n public boolean isContextPathInUrl() {\n return false;\n }", "@Override\n public boolean isContextPathInUrl() {\n return false;\n }", "public String getUri();", "public static String parseRequest(String request) {\r\n String parsedSoFar = \"\";\r\n String file = \"\";\r\n int fileSize = 0;\r\n String s = null;\r\n \r\n if (request.length() < 14) {\r\n return s;\r\n }\r\n \t\r\n if (!request.substring(0, 4).equals(\"GET \")) {\r\n return s;\r\n }\r\n \r\n parsedSoFar = request.substring(4, request.length());\r\n \t\r\n int counter = 0;\r\n \r\n while (parsedSoFar.charAt(counter) != ' ') {\r\n counter++;\r\n }\r\n \r\n file = parsedSoFar.substring(0, counter);\r\n \r\n parsedSoFar = parsedSoFar.substring(file.length() + 1, parsedSoFar.length()).trim();\r\n \r\n if (!parsedSoFar.equals(\"HTTP/1.0\")) {\r\n return s;\r\n }\r\n \r\n return file;\r\n }", "public boolean isUri(String obj) {\r\n//\t\treturn obj.matches(\"(([a-zA-Z][0-9a-zA-Z+\\\\\\\\-\\\\\\\\.]*:)?/{0,2}[0-9a-zA-Z;/?:@&=+$\\\\\\\\.\\\\\\\\-_!~*'()%]+)?(#[0-9a-zA-Z;/?:@&=+$\\\\\\\\.\\\\\\\\-_!~*'()%]+)?\");\r\n\t\treturn false;\r\n\t}", "URI uri();", "@Override\r\n\t\t public boolean isResourceFiltered(Resource resource) {\n\t\t return \"pathmap\".equals(resource.getURI().scheme());\r\n\t\t }", "Uri encryptedPath();", "private Predicate<String> paths() {\r\n\t\t// Match all paths except /error\r\n\t\treturn Predicates.and(PathSelectors.regex(\"/.*\"), Predicates.not(PathSelectors.regex(\"/error.*\")));\r\n\t}", "public void buildPathPartWithServletPath(Appendable buffer) throws WebAppConfigurationException, IOException {\n buildPathPart(buffer, null, false);\n }", "private static Path speculativeFastParsePath(String path) {\n String s = ConfigImplUtil.unicodeTrim(path);\n if (s.isEmpty())\n return null;\n if (hasUnsafeChars(s))\n return null;\n if (s.startsWith(\".\") || s.endsWith(\".\") || s.contains(\"..\"))\n return null; // let the full parser throw the error\n\n PathBuilder pb = new PathBuilder();\n appendPathString(pb, s);\n return pb.result();\n }", "private String toCompletePath(String fullRequest) {\n \n///Parse request for file path\nString requestLine[] = new String[] {\" \", \" \", \" \"};\n requestLine = fullRequest.split(\" \");\nString partialPath = requestLine[1];\n \n//If requested path is just \"/\" or \"\", don't return any path\n if(partialPath.length() <= 1) {\n noFileRequested = true;\n return null;\n }\n \nString completePath;\n//If using my Windows machine, the path is different than the school Linux machines\nif (Windows)\n completePath = \"C:/Users/Michelle/eclipse-workspace/P1\" + partialPath;\nelse\n completePath = \".\" + partialPath;\n \n return completePath;\n}", "String getBaseUri();", "protected abstract String getBaseEndpointPath();", "@Override\n public DefaultUrlBuilder pathSegment(String thePath) {\n this.pathSegments.add(BaseUrl.UrlEncoder.encodePathSegment(thePath));\n return this;\n }", "private Route append(Map<QualifiedName, PathParamDescriptor> pathParamDescriptors, String path) throws MalformedRouteException\n {\n if (path.length() == 0 || path.charAt(0) != '/')\n {\n throw new MalformedRouteException();\n }\n\n //\n int pos = path.length();\n int level = 0;\n List<Integer> start = new ArrayList<Integer>();\n List<Integer> end = new ArrayList<Integer>();\n for (int i = 1;i < path.length();i++)\n {\n char c = path.charAt(i);\n if (c == '{')\n {\n if (level++ == 0)\n {\n start.add(i);\n }\n }\n else if (c == '}')\n {\n if (--level == 0)\n {\n end.add(i);\n }\n }\n else if (c == '/')\n {\n if (level == 0)\n {\n pos = i;\n break;\n }\n }\n }\n\n //\n Route next;\n if (start.isEmpty())\n {\n String segment = path.substring(1, pos);\n SegmentRoute route = new SegmentRoute(router, segment);\n add(route);\n next = route;\n }\n else\n {\n if (start.size() == end.size())\n {\n PatternBuilder builder = new PatternBuilder();\n builder.expr(\"^\").expr('/');\n List<String> chunks = new ArrayList<String>();\n List<PathParam> parameterPatterns = new ArrayList<PathParam>();\n\n //\n int previous = 1;\n for (int i = 0;i < start.size();i++)\n {\n builder.litteral(path, previous, start.get(i));\n chunks.add(path.substring(previous, start.get(i)));\n String parameterName = path.substring(start.get(i) + 1, end.get(i));\n\n //\n QualifiedName parameterQName = QualifiedName.parse(parameterName);\n\n // Now get path param metadata\n PathParamDescriptor parameterDescriptor = pathParamDescriptors.get(parameterQName);\n\n //\n PathParam param;\n if (parameterDescriptor != null)\n {\n param = PathParam.create(parameterDescriptor, router);\n }\n else\n {\n param = PathParam.create(parameterQName, router);\n }\n\n // Append routing regex to the route regex surrounded by a non capturing regex\n // to isolate routingRegex like a|b or a(.)b\n builder.expr(\"(?:\").expr(param.routingRegex).expr(\")\");\n\n // Add the path param with the rendering regex\n parameterPatterns.add(param);\n previous = end.get(i) + 1;\n }\n\n //\n builder.litteral(path, previous, pos);\n\n // We want to satisfy one of the following conditions\n // - the next char after the matched expression is '/'\n // - the expression matched until the end\n // - the match expression is the '/' expression\n builder.expr(\"(?:(?<=^/)|(?=/)|$)\");\n\n //\n chunks.add(path.substring(previous, pos));\n PatternRoute route = new PatternRoute(router, router.compile(builder.build()), parameterPatterns, chunks);\n\n // Wire\n add(route);\n\n //\n next = route;\n }\n else\n {\n throw new UnsupportedOperationException(\"Report error\");\n }\n }\n\n //\n if (pos < path.length())\n {\n return next.append(pathParamDescriptors, path.substring(pos));\n }\n else\n {\n return next;\n }\n }", "@Override \n public String getPathInfo() {\n if (pathInfo != null) {\n return pathInfo;\n }\n \n StringBuilder buffer = new StringBuilder();\n if (getRequestURIWithoutQuery().length() > 0) {\n if (getScriptName().length() > 0 && getRequestURIWithoutQuery().indexOf(getScriptName()) == 0) {\n buffer.append(getRequestURIWithoutQuery().substring(getScriptName().length()));\n } else {\n buffer.append(getRequestURIWithoutQuery());\n }\n } else {\n buffer.append(getServletPath());\n if (super.getPathInfo() != null) {\n buffer.append(super.getPathInfo());\n }\n }\n return pathInfo = buffer.toString();\n }", "@Override\r\n public MultivaluedMap<String, String> getPathParameters(boolean arg0) {\n return null;\r\n }", "public interface RequestServiceMzitu {\n\n @GET(\"{number}\")\n Observable<String> getDetialData(@Path(\"number\") String number, @Query(\"time\") long time);\n\n @GET(\"page/{pageNumber}\")\n Observable<String> getIndexMoreData(@Path(\"pageNumber\") int pageNumber, @Query(\"time\") long time);\n\n @GET(UrlPath.BaseUrlRequestServiceMzitu)\n Observable<String> getIndexData(@Query(\"time\") long time);\n\n @GET(\"/tag/{path}\")\n Observable<String> getTagData(@Path(\"path\") String path, @Query(\"time\") long time);\n\n @GET(\"/tag/{path}/page/{pageNumber}\")\n Observable<String> getTagMoreData(@Path(\"path\") String path, @Path(\"pageNumber\") int pageNumber, @Query(\"time\") long time);\n}", "private HashMap<String, String> parsePathType(String path) {\n LOG.debug(\"Path: \" + path);\n Pattern systemPattern = Pattern.compile(\"v[0-9]+/systems/?(\\\\?.*)?$\");\n Matcher systemMatcher = systemPattern.matcher(path);\n\n Pattern systemStatusPattern = Pattern.compile(\"v[0-9]+/systems/status/?(\\\\?.*)?$\");\n Matcher systemStatusMatcher = systemStatusPattern.matcher(path);\n\n Pattern systemReportsPattern = Pattern.compile(\"v[0-9]+/systems/(.*)/reports/?(\\\\?.*)?$\");\n Matcher systemReportsMatcher = systemReportsPattern.matcher(path);\n\n Pattern reportsPattern = Pattern.compile(\"v[0-9]+/reports/?(\\\\?.*)?$\");\n Matcher reportsMatcher = reportsPattern.matcher(path);\n\n Pattern acksPattern = Pattern.compile(\"v[0-9]+/acks/?(\\\\?.*)$\");\n Matcher acksMatcher = acksPattern.matcher(path);\n\n Pattern rulesPattern = Pattern.compile(\"v[0-9]+/rules/?(\\\\?.*)$\");\n Matcher rulesMatcher = rulesPattern.matcher(path);\n\n Pattern uploadsPattern = Pattern.compile(\"uploads(/.*)?(/\\\\?.*)?$\");\n Matcher uploadsMatcher = uploadsPattern.matcher(path);\n\n HashMap<String, String> response = new HashMap<String, String>();\n if (systemMatcher.matches()) {\n response.put(\"type\", Constants.SYSTEMS_PATH);\n response.put(\"index\", Integer.toString(path.indexOf(\"systems\")));\n } else if (systemReportsMatcher.matches()) {\n response.put(\"type\", Constants.SYSTEM_REPORTS_PATH);\n response.put(\"index\", Integer.toString(path.indexOf(\"reports\")));\n String id = (String) systemReportsMatcher.group(1);\n if (id != null) {\n response.put(\"id\", id);\n }\n } else if (reportsMatcher.matches()) {\n response.put(\"type\", Constants.REPORTS_PATH);\n response.put(\"index\", Integer.toString(path.indexOf(\"reports\")));\n } else if (acksMatcher.matches()) {\n response.put(\"type\", Constants.ACKS_PATH);\n response.put(\"index\", Integer.toString(path.indexOf(\"acks\")));\n } else if (rulesMatcher.matches()) {\n response.put(\"type\", Constants.RULES_PATH);\n response.put(\"index\", Integer.toString(path.indexOf(\"rules\")));\n } else if (uploadsMatcher.matches()) {\n response.put(\"type\", Constants.UPLOADS_PATH);\n response.put(\"index\", Integer.toString(path.indexOf(\"uploads\")));\n } else if (systemStatusMatcher.matches()) {\n response.put(\"type\", Constants.SYSTEMS_STATUS_PATH);\n response.put(\"index\", Integer.toString(path.indexOf(\"systems\")));\n } else {\n response.put(\"type\", \"-1\");\n response.put(\"index\", \"-1\");\n }\n return response;\n }", "private void readJaggrabPath(String line) {\n\t\tfinal String START = \"JAGGRAB \";\n\t\tif (line.startsWith(START)) {\n\t\t\trequest = new Request(line.substring(START.length()).trim());\n\t\t} else {\n\t\t\tchannel.close();\n\t\t}\n\t\tserve();\n\t}", "@Override\n protected String parseURI()\n throws IOException {\n command = parseCommand();\n\n System.out.println(\"Command parsed as: \" + command.toString());\n\n // 2. Parse the modified URI.\n switch (command) {\n case GET_ALL_BUCKETS:\n // A. If we get all buckets we need the user path\n // User path == /root/user/\n modifiedURI = s3HdfsPath.getHdfsRootUserPath();\n break;\n case LIST_PARTS:\n // B. If we get all the parts we need the root upload path\n // Upload path == /root/user/bucket/object/version/upload/\n modifiedURI = s3HdfsPath.getHdfsRootUploadPath();\n break;\n case LIST_VERSIONS:\n // B. If we get all the parts we need the root upload path\n // Upload path == /root/user/bucket/object/version/upload/\n modifiedURI = s3HdfsPath.getHdfsRootBucketPath();\n break;\n case GET_VERSIONING:\n // C. If we get versioning configuration we need bucket meta path\n // Bucket meta path == /root/user/bucket/\"bucketmeta\"\n modifiedURI = s3HdfsPath.getFullHdfsBucketMetaPath();\n break;\n case GET_BUCKET:\n // D. If we get a bucket we need the bucket path\n // Bucket path == /root/user/bucket/\n modifiedURI = s3HdfsPath.getHdfsRootBucketPath();\n break;\n case GET_OBJECT:\n // E. If we get an object we need the full path\n // Full path == /root/user/bucket/object/version/\"file\"\n modifiedURI = s3HdfsPath.getFullHdfsObjPath();\n break;\n default:\n throw new IOException(\"Unknown command: \" + command);\n }\n\n // 3. Set the modified URI.\n modifiedURI = ADD_WEBHDFS(modifiedURI);\n return modifiedURI;\n }", "public void testYourFirstPartition() {\r\n\t UrlValidator urlVal = new UrlValidator(null, null, UrlValidator.ALLOW_ALL_SCHEMES);\r\n\t System.out.println(\"1st partition with a valid scheme = true: \" + urlVal.isValid(\"http://www.google.com\")); //bug here = does not account for http://\r\n System.out.println(\"1st partition with a invalid scheme = false: \" + urlVal.isValid(\"://go.a1a:65a\")); \r\n }", "private static String decodeAndCleanUriString(HttpServletRequest request, String uri) {\n uri = decodeRequestString(request, uri);\n int semicolonIndex = uri.indexOf(';');\n return (semicolonIndex != -1 ? uri.substring(0, semicolonIndex) : uri);\n }", "private boolean initializeAuthority(String p_uriSpec) {\n \n int index = 0;\n int start = 0;\n int end = p_uriSpec.length();\n \n char testChar = '\\0';\n String userinfo = null;\n \n // userinfo is everything up to @\n if (p_uriSpec.indexOf('@', start) != -1) {\n while (index < end) {\n testChar = p_uriSpec.charAt(index);\n if (testChar == '@') {\n break;\n }\n index++;\n }\n userinfo = p_uriSpec.substring(start, index);\n index++;\n }\n \n // host is everything up to last ':', or up to \n // and including ']' if followed by ':'.\n String host = null;\n start = index;\n boolean hasPort = false;\n if (index < end) {\n if (p_uriSpec.charAt(start) == '[') {\n int bracketIndex = p_uriSpec.indexOf(']', start);\n index = (bracketIndex != -1) ? bracketIndex : end;\n if (index+1 < end && p_uriSpec.charAt(index+1) == ':') {\n ++index;\n hasPort = true;\n }\n else {\n index = end;\n }\n }\n else {\n int colonIndex = p_uriSpec.lastIndexOf(':', end);\n index = (colonIndex > start) ? colonIndex : end;\n hasPort = (index != end);\n }\n }\n host = p_uriSpec.substring(start, index);\n int port = -1;\n if (host.length() > 0) {\n // port\n if (hasPort) {\n index++;\n start = index;\n while (index < end) {\n index++;\n }\n String portStr = p_uriSpec.substring(start, index);\n if (portStr.length() > 0) {\n // REVISIT: Remove this code.\n /** for (int i = 0; i < portStr.length(); i++) {\n if (!isDigit(portStr.charAt(i))) {\n throw new MalformedURIException(\n portStr +\n \" is invalid. Port should only contain digits!\");\n }\n }**/\n // REVISIT: Remove this code.\n // Store port value as string instead of integer.\n try {\n port = Integer.parseInt(portStr);\n if (port == -1) --port;\n }\n catch (NumberFormatException nfe) {\n port = -2;\n }\n }\n }\n }\n \n if (isValidServerBasedAuthority(host, port, userinfo)) {\n m_host = host;\n m_port = port;\n m_userinfo = userinfo;\n return true;\n }\n // Note: Registry based authority is being removed from a\n // new spec for URI which would obsolete RFC 2396. If the\n // spec is added to XML errata, processing of reg_name\n // needs to be removed. - mrglavas.\n else if (isValidRegistryBasedAuthority(p_uriSpec)) {\n m_regAuthority = p_uriSpec;\n return true;\n }\n return false;\n }", "public interface ISimpleURL\n{\n /**\n * @return The protocol used. May be <code>null</code> for an unknown\n * protocol.\n */\n @Nullable\n default IURLProtocol getProtocol ()\n {\n return URLProtocolRegistry.getInstance ().getProtocol (getPath ());\n }\n\n /**\n * @return <code>true</code> if the URL has a known protocol\n */\n default boolean hasKnownProtocol ()\n {\n return URLProtocolRegistry.getInstance ().hasKnownProtocol (getPath ());\n }\n\n /**\n * @return The path part of the URL (everything before the \"?\" and the \"#\",\n * incl. the protocol). Never <code>null</code> but maybe empty (e.g.\n * for \"?x=y\").\n */\n @Nonnull\n String getPath ();\n\n /**\n * @return A map of all query string parameters. May be <code>null</code>.\n */\n @Nullable\n @ReturnsMutableObject\n URLParameterList params ();\n\n /**\n * @return The name of the anchor (everything after the \"#\") or\n * <code>null</code> if none is defined.\n */\n @Nullable\n String getAnchor ();\n\n /**\n * @return <code>true</code> if an anchor is present, <code>false</code>\n * otherwise.\n */\n default boolean hasAnchor ()\n {\n return StringHelper.hasText (getAnchor ());\n }\n\n /**\n * Check if this URL has an anchor with the passed name.\n *\n * @param sAnchor\n * The anchor name to check.\n * @return <code>true</code> if the passed anchor is present.\n */\n default boolean hasAnchor (@Nullable final String sAnchor)\n {\n return EqualsHelper.equals (sAnchor, getAnchor ());\n }\n\n /**\n * @return The final string representation of this URL not encoding the\n * request parameters.\n */\n @Nonnull\n default String getAsStringWithoutEncodedParameters ()\n {\n return URLHelper.getURLString (this, (Charset) null);\n }\n\n /**\n * @return The final string representation of this URL with encoded URL\n * parameter keys and values. Using the default URL charset as\n * determined by {@link URLHelper#CHARSET_URL_OBJ}.\n */\n @Nonnull\n default String getAsStringWithEncodedParameters ()\n {\n return URLHelper.getURLString (this, URLHelper.CHARSET_URL_OBJ);\n }\n\n /**\n * @param aCharset\n * The charset used for encoding the parameters. May not be\n * <code>null</code>.\n * @return The final string representation of this URL with encoded URL\n * parameter keys and values.\n */\n @Nonnull\n default String getAsStringWithEncodedParameters (@Nonnull final Charset aCharset)\n {\n ValueEnforcer.notNull (aCharset, \"ParameterCharset\");\n return URLHelper.getURLString (this, aCharset);\n }\n\n @Nullable\n default URL getAsURL ()\n {\n return URLHelper.getAsURL (getAsStringWithEncodedParameters ());\n }\n\n @Nullable\n default URI getAsURI ()\n {\n return URLHelper.getAsURI (getAsStringWithEncodedParameters ());\n }\n}", "@Override\n public Url splitUrl(String Url) {\n\n Url regexSplitUrl = null;\n\n try {\n Matcher matcher = SPLIT_PATTERN.matcher(Url);\n matcher.find();\n String scheme = matcher.group(2);\n String address = matcher.group(4); // host/port\n String host = address.contains(\":\") ? address.split(\":\")[0] : address; // check if the address contains a colon,\n String port = address.contains(\":\") ? address.split(\":\")[1] : \"None\"; // then define a port, otherwise \"None\".\n String path = matcher.group(5);\n String params = matcher.group(7);\n\n regexSplitUrl = new Url(scheme, host, port, path, params);\n\n } catch (Exception exc) {\n System.out.println(\"Error parsing URL, using regular expressions : \" + exc);\n }\n\n return regexSplitUrl;\n }" ]
[ "0.57589775", "0.5616885", "0.5541757", "0.5488055", "0.54692966", "0.5380574", "0.5301306", "0.5226579", "0.5215026", "0.51964533", "0.5174469", "0.5119337", "0.5118507", "0.51169664", "0.50928104", "0.508305", "0.50420606", "0.50396657", "0.5014143", "0.5003989", "0.500051", "0.49887088", "0.49763557", "0.4968805", "0.49619454", "0.49586162", "0.49557504", "0.4939813", "0.49337462", "0.4927526", "0.49245724", "0.491196", "0.489609", "0.48909524", "0.48597178", "0.48565754", "0.485324", "0.48495537", "0.48473814", "0.48434275", "0.48434275", "0.48398122", "0.48373616", "0.48327097", "0.48271197", "0.48226035", "0.48198283", "0.48160866", "0.48157766", "0.48093733", "0.4794019", "0.47934106", "0.47899687", "0.47875643", "0.477585", "0.47726512", "0.47715417", "0.4770804", "0.47680354", "0.47648737", "0.47580874", "0.47580874", "0.4755462", "0.47522855", "0.47522855", "0.47522855", "0.47456017", "0.47440726", "0.47384945", "0.4717606", "0.4717455", "0.47063082", "0.46919674", "0.46892402", "0.46892402", "0.4687506", "0.46840373", "0.46804395", "0.4679688", "0.46789", "0.46787468", "0.4673464", "0.4673291", "0.46648622", "0.46599942", "0.46364027", "0.46216285", "0.46199775", "0.4611467", "0.46062982", "0.4601065", "0.45798331", "0.45707622", "0.45452645", "0.4543598", "0.45424828", "0.45376542", "0.45373687", "0.45346147", "0.4533878" ]
0.47608212
60
Scheme: ^(([^:/?]+):)?(//([^/?]))?([^?])(\?([^]))?((.))? __________ Authority: ^(([^:/?]+):)?(//([^/?]))?([^?])(\?([^]))?((.))? _____________
public static void parseSchemeAndAuthority( char[] schemeAndAuthority, IUriListener listener) { UriParser parser = new UriParser(listener); parser.parseSchemeAndAuthority(schemeAndAuthority, 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean initializeAuthority(String p_uriSpec) {\n \n int index = 0;\n int start = 0;\n int end = p_uriSpec.length();\n \n char testChar = '\\0';\n String userinfo = null;\n \n // userinfo is everything up to @\n if (p_uriSpec.indexOf('@', start) != -1) {\n while (index < end) {\n testChar = p_uriSpec.charAt(index);\n if (testChar == '@') {\n break;\n }\n index++;\n }\n userinfo = p_uriSpec.substring(start, index);\n index++;\n }\n \n // host is everything up to last ':', or up to \n // and including ']' if followed by ':'.\n String host = null;\n start = index;\n boolean hasPort = false;\n if (index < end) {\n if (p_uriSpec.charAt(start) == '[') {\n int bracketIndex = p_uriSpec.indexOf(']', start);\n index = (bracketIndex != -1) ? bracketIndex : end;\n if (index+1 < end && p_uriSpec.charAt(index+1) == ':') {\n ++index;\n hasPort = true;\n }\n else {\n index = end;\n }\n }\n else {\n int colonIndex = p_uriSpec.lastIndexOf(':', end);\n index = (colonIndex > start) ? colonIndex : end;\n hasPort = (index != end);\n }\n }\n host = p_uriSpec.substring(start, index);\n int port = -1;\n if (host.length() > 0) {\n // port\n if (hasPort) {\n index++;\n start = index;\n while (index < end) {\n index++;\n }\n String portStr = p_uriSpec.substring(start, index);\n if (portStr.length() > 0) {\n // REVISIT: Remove this code.\n /** for (int i = 0; i < portStr.length(); i++) {\n if (!isDigit(portStr.charAt(i))) {\n throw new MalformedURIException(\n portStr +\n \" is invalid. Port should only contain digits!\");\n }\n }**/\n // REVISIT: Remove this code.\n // Store port value as string instead of integer.\n try {\n port = Integer.parseInt(portStr);\n if (port == -1) --port;\n }\n catch (NumberFormatException nfe) {\n port = -2;\n }\n }\n }\n }\n \n if (isValidServerBasedAuthority(host, port, userinfo)) {\n m_host = host;\n m_port = port;\n m_userinfo = userinfo;\n return true;\n }\n // Note: Registry based authority is being removed from a\n // new spec for URI which would obsolete RFC 2396. If the\n // spec is added to XML errata, processing of reg_name\n // needs to be removed. - mrglavas.\n else if (isValidRegistryBasedAuthority(p_uriSpec)) {\n m_regAuthority = p_uriSpec;\n return true;\n }\n return false;\n }", "String getScheme();", "java.lang.String getScheme();", "public String getSchemeSpecificPart() {\n StringBuffer schemespec = new StringBuffer();\n \n if (m_host != null || m_regAuthority != null) {\n schemespec.append(\"//\");\n \n // Server based authority.\n if (m_host != null) {\n \n if (m_userinfo != null) {\n schemespec.append(m_userinfo);\n schemespec.append('@');\n }\n \n schemespec.append(m_host);\n \n if (m_port != -1) {\n schemespec.append(':');\n schemespec.append(m_port);\n }\n }\n // Registry based authority.\n else {\n schemespec.append(m_regAuthority);\n }\n }\n \n if (m_path != null) {\n schemespec.append((m_path));\n }\n \n if (m_queryString != null) {\n schemespec.append('?');\n schemespec.append(m_queryString);\n }\n \n if (m_fragment != null) {\n schemespec.append('#');\n schemespec.append(m_fragment);\n }\n \n return schemespec.toString();\n }", "public String getScheme() {\n return m_scheme;\n }", "@Override\r\n public String getScheme() {\r\n return scheme;\r\n }", "@Override\n public String getScheme() {\n return this.scheme;\n }", "public String getScheme() {\n return scheme;\n }", "public String getScheme() {\n return scheme;\n }", "public String getScheme() {\n return scheme;\n }", "@Override\n\t\tpublic String getScheme() {\n\t\t\treturn null;\n\t\t}", "@Nullable\n public String getScheme ()\n {\n return m_sScheme;\n }", "public void testYourFirstPartition() {\r\n\t UrlValidator urlVal = new UrlValidator(null, null, UrlValidator.ALLOW_ALL_SCHEMES);\r\n\t System.out.println(\"1st partition with a valid scheme = true: \" + urlVal.isValid(\"http://www.google.com\")); //bug here = does not account for http://\r\n System.out.println(\"1st partition with a invalid scheme = false: \" + urlVal.isValid(\"://go.a1a:65a\")); \r\n }", "@Override\n\tpublic String getScheme() {\n\t\treturn null;\n\t}", "private static boolean hasScheme(String test) {\n return schemePattern.matcher(test).matches(); \n }", "@Test\n public void schemeTest() {\n assertEquals(\"VISA_BUSINESS\", authResponse.getScheme());\n }", "private String generateSchemeAuthorityForNode(Node node, HibBranch branch) {\n\t\tString hostname = branch.getHostname();\n\t\tif (StringUtils.isEmpty(hostname)) {\n\t\t\t// Fallback to urls without authority/scheme\n\t\t\treturn \"\";\n\t\t}\n\t\tboolean isSSL = BooleanUtils.toBoolean(branch.getSsl());\n\t\tStringBuffer buffer = new StringBuffer();\n\t\tif (isSSL) {\n\t\t\tbuffer.append(\"https://\");\n\t\t} else {\n\t\t\tbuffer.append(\"http://\");\n\t\t}\n\t\tbuffer.append(branch.getHostname());\n\t\treturn buffer.toString();\n\t}", "public static com.taobao.phenix.request.SchemeInfo parse(@androidx.annotation.NonNull java.lang.String r1) {\n /*\n com.taobao.phenix.request.SchemeInfo r0 = parseLocalFile(r1)\n if (r0 != 0) goto L_0x0024\n com.taobao.phenix.request.SchemeInfo r0 = parseAssetFile(r1)\n if (r0 != 0) goto L_0x0024\n com.taobao.phenix.request.SchemeInfo r0 = parseResFile(r1)\n if (r0 != 0) goto L_0x0024\n com.taobao.phenix.request.SchemeInfo r0 = parseBase64(r1)\n if (r0 != 0) goto L_0x0024\n com.taobao.phenix.request.SchemeInfo r0 = parseLocalExtended(r1)\n if (r0 == 0) goto L_0x001f\n goto L_0x0024\n L_0x001f:\n com.taobao.phenix.request.SchemeInfo r1 = parseHttpUrl(r1)\n return r1\n L_0x0024:\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.taobao.phenix.request.SchemeInfo.parse(java.lang.String):com.taobao.phenix.request.SchemeInfo\");\n }", "private static String m39043k(Uri uri) {\n if (uri == null) {\n return null;\n }\n return uri.getScheme();\n }", "public interface HttpAuthenticationScheme<C extends AuthenticationSchemeConfiguration> {\n\n /**\n * Called one time during initialization.\n *\n * @param config The configuration.\n */\n void initialize(C config);\n\n /**\n * Extracts the credentials from the given {@link javax.servlet.http.HttpServletRequest} and populates the\n * {@link org.picketlink.credential.DefaultLoginCredentials} with them. If the request is not an authentication attempt (as defined by the\n * implementation), then {@code creds} is not affected.\n *\n * @param request\n * The current request, to examine for authentication information.\n * @param creds\n * The credentials instance that will be populated with the credentials found in the request, if any.\n */\n void extractCredential(HttpServletRequest request, DefaultLoginCredentials creds);\n\n /**\n * Challenges the client if no credentials were supplied or the credentials were not extracted in order to continue\n * with the authentication.\n *\n * @param request\n * The current request, which may be used to obtain a {@link javax.servlet.RequestDispatcher} if needed.\n * If this method is called, the rest of the filter chain will <i>not</i> be processed, so\n * implementations are free to read the request body if they so choose.\n * @param response\n * The current response, which can be used to send HTTP error results, redirects, or for sending\n * additional challenge headers.\n */\n void challengeClient(HttpServletRequest request, HttpServletResponse response);\n\n /**\n * Performs any post-authentication logic regarding of the authentication result.\n *\n * @param request\n * The current request, which may be used to obtain a {@link javax.servlet.RequestDispatcher} if needed.\n * @param response\n * The current response, which can be used to send an HTTP response, or a redirect.\n * @return true if the processing of the filter chain should continue, false if the processing should stop\n * (typically because this filter has already sent a response).\n */\n void onPostAuthentication(HttpServletRequest request, HttpServletResponse response);\n}", "public String getScheme( ) {\n\t\treturn scheme;\n\t}", "public String getSchemeSpecific() {\n return \"\";\n }", "private void initializeScheme(String p_uriSpec)\n throws MalformedURIException {\n int uriSpecLen = p_uriSpec.length();\n int index = 0;\n String scheme = null;\n char testChar = '\\0';\n \n while (index < uriSpecLen) {\n testChar = p_uriSpec.charAt(index);\n if (testChar == ':' || testChar == '/' ||\n testChar == '?' || testChar == '#') {\n break;\n }\n index++;\n }\n scheme = p_uriSpec.substring(0, index);\n \n if (scheme.length() == 0) {\n throw new MalformedURIException(\"No scheme found in URI.\");\n }\n else {\n setScheme(scheme);\n }\n }", "public final C0313a a(f fVar, String str) {\n int i;\n int a2;\n int i2;\n String str2 = str;\n int a3 = m.a(str2, 0, str.length());\n int b2 = m.b(str2, a3, str.length());\n if (b(str2, a3, b2) != -1) {\n if (str.regionMatches(true, a3, \"https:\", 0, 6)) {\n this.f26924a = \"https\";\n a3 += 6;\n } else if (!str.regionMatches(true, a3, \"http:\", 0, 5)) {\n return C0313a.UNSUPPORTED_SCHEME;\n } else {\n this.f26924a = \"http\";\n a3 += 5;\n }\n } else if (fVar == null) {\n return C0313a.MISSING_SCHEME;\n } else {\n this.f26924a = fVar.f26918b;\n }\n int c2 = c(str2, a3, b2);\n char c3 = '#';\n if (c2 >= 2 || fVar == null || !fVar.f26918b.equals(this.f26924a)) {\n int i3 = a3 + c2;\n boolean z = false;\n boolean z2 = false;\n while (true) {\n a2 = m.a(str2, i3, b2, \"@/\\\\?#\");\n char charAt = a2 != b2 ? str2.charAt(a2) : 65535;\n if (!(charAt == 65535 || charAt == c3 || charAt == '/' || charAt == '\\\\')) {\n switch (charAt) {\n case '?':\n break;\n case '@':\n if (!z) {\n int a4 = m.a(str2, i3, a2, ':');\n int i4 = a4;\n i2 = a2;\n String a5 = f.a(str, i3, a4, \" \\\"':;<=>@[]^`{}|/\\\\?#\", true, false, false, true);\n if (z2) {\n a5 = this.f26925b + \"%40\" + a5;\n }\n this.f26925b = a5;\n if (i4 != i2) {\n this.f26926c = f.a(str, i4 + 1, i2, \" \\\"':;<=>@[]^`{}|/\\\\?#\", true, false, false, true);\n z = true;\n }\n z2 = true;\n } else {\n i2 = a2;\n this.f26926c += \"%40\" + f.a(str, i3, i2, \" \\\"':;<=>@[]^`{}|/\\\\?#\", true, false, false, true);\n }\n i3 = i2 + 1;\n c3 = '#';\n continue;\n }\n }\n }\n i = a2;\n int d2 = d(str2, i3, i);\n int i5 = d2 + 1;\n if (i5 < i) {\n this.f26927d = e(str2, i3, d2);\n this.f26928e = g(str2, i5, i);\n if (this.f26928e == -1) {\n return C0313a.INVALID_PORT;\n }\n } else {\n this.f26927d = e(str2, i3, d2);\n this.f26928e = f.a(this.f26924a);\n }\n if (this.f26927d == null) {\n return C0313a.INVALID_HOST;\n }\n } else {\n this.f26925b = fVar.b();\n this.f26926c = fVar.c();\n this.f26927d = fVar.f26921e;\n this.f26928e = fVar.f26922f;\n this.f26929f.clear();\n this.f26929f.addAll(fVar.d());\n if (a3 == b2 || str2.charAt(a3) == '#') {\n a(fVar.e());\n }\n i = a3;\n }\n int a6 = m.a(str2, i, b2, \"?#\");\n a(str2, i, a6);\n if (a6 < b2 && str2.charAt(a6) == '?') {\n int a7 = m.a(str2, a6, b2, '#');\n this.g = f.b(f.a(str, a6 + 1, a7, \" \\\"'<>#\", true, false, true, true));\n a6 = a7;\n }\n if (a6 < b2 && str2.charAt(a6) == '#') {\n this.h = f.a(str, 1 + a6, b2, \"\", true, false, false, false);\n }\n return C0313a.SUCCESS;\n }", "private AuthenticationScheme basic(String string, String string2) {\n\t\treturn null;\n\t}", "com.google.protobuf.ByteString getSchemeBytes();", "public static boolean isConformantSchemeName(String p_scheme) {\n if (p_scheme == null || p_scheme.trim().length() == 0) {\n return false;\n }\n \n if (!isAlpha(p_scheme.charAt(0))) {\n return false;\n }\n \n char testChar;\n int schemeLength = p_scheme.length();\n for (int i = 1; i < schemeLength; ++i) {\n testChar = p_scheme.charAt(i);\n if (!isSchemeCharacter(testChar)) {\n return false;\n }\n }\n \n return true;\n }", "java.lang.String getAuthority();", "public static void parseSchemeAndAuthority(\n String schemeAndAuthority,\n IUriListener listener) {\n if (schemeAndAuthority == null) {\n schemeAndAuthority = \"\";\n }\n char[] array = schemeAndAuthority.toCharArray();\n parseSchemeAndAuthority(array, listener);\n }", "@Override\n public String getAuthenticationScheme() {\n return \"OAuth2\";\n }", "public void setScheme(String p_scheme) throws MalformedURIException {\n if (p_scheme == null) {\n throw new MalformedURIException(\n \"Cannot set scheme from null string!\");\n }\n if (!isConformantSchemeName(p_scheme)) {\n throw new MalformedURIException(\"The scheme is not conformant.\");\n }\n \n m_scheme = p_scheme.toLowerCase();\n }", "public final boolean mo50006a(C18846s sVar) {\n String scheme = sVar.f50794d.getScheme();\n if (WebKitApi.SCHEME_HTTP.equals(scheme) || WebKitApi.SCHEME_HTTPS.equals(scheme)) {\n return true;\n }\n return false;\n }", "List<SecurityScheme> securitySchemes();", "String getUrlPattern();", "public java.lang.String getCodingSchemeURI() {\n return codingSchemeURI;\n }", "SecurityScheme createSecurityScheme();", "public String getSchemeName() {\n return \"basic\";\n }", "private boolean isValidRegistryBasedAuthority(String authority) {\n int index = 0;\n int end = authority.length();\n char testChar;\n \n while (index < end) {\n testChar = authority.charAt(index);\n \n // check for valid escape sequence\n if (testChar == '%') {\n if (index+2 >= end ||\n !isHex(authority.charAt(index+1)) ||\n !isHex(authority.charAt(index+2))) {\n return false;\n }\n index += 2;\n }\n // can check against path characters because the set\n // is the same except for '/' which we've already excluded.\n else if (!isPathCharacter(testChar)) {\n return false;\n }\n ++index;\n }\n return true;\n }", "private void initialize(URI p_base, String p_uriSpec)\n throws MalformedURIException {\n \n String uriSpec = p_uriSpec;\n int uriSpecLen = (uriSpec != null) ? uriSpec.length() : 0;\n \n if (p_base == null && uriSpecLen == 0) {\n throw new MalformedURIException(\n \"Cannot initialize URI with empty parameters.\");\n }\n \n // just make a copy of the base if spec is empty\n if (uriSpecLen == 0) {\n initialize(p_base);\n return;\n }\n \n int index = 0;\n \n // Check for scheme, which must be before '/', '?' or '#'. Also handle\n // names with DOS drive letters ('D:'), so 1-character schemes are not\n // allowed.\n int colonIdx = uriSpec.indexOf(':');\n if (colonIdx != -1) {\n final int searchFrom = colonIdx - 1;\n // search backwards starting from character before ':'.\n int slashIdx = uriSpec.lastIndexOf('/', searchFrom);\n int queryIdx = uriSpec.lastIndexOf('?', searchFrom);\n int fragmentIdx = uriSpec.lastIndexOf('#', searchFrom);\n \n if (colonIdx < 2 || slashIdx != -1 || \n queryIdx != -1 || fragmentIdx != -1) {\n // A standalone base is a valid URI according to spec\n if (colonIdx == 0 || (p_base == null && fragmentIdx != 0)) {\n throw new MalformedURIException(\"No scheme found in URI.\");\n }\n }\n else {\n initializeScheme(uriSpec);\n index = m_scheme.length()+1;\n \n // Neither 'scheme:' or 'scheme:#fragment' are valid URIs.\n if (colonIdx == uriSpecLen - 1 || uriSpec.charAt(colonIdx+1) == '#') {\n throw new MalformedURIException(\"Scheme specific part cannot be empty.\"); \n }\n }\n }\n else if (p_base == null && uriSpec.indexOf('#') != 0) {\n throw new MalformedURIException(\"No scheme found in URI.\"); \n }\n \n // Two slashes means we may have authority, but definitely means we're either\n // matching net_path or abs_path. These two productions are ambiguous in that\n // every net_path (except those containing an IPv6Reference) is an abs_path. \n // RFC 2396 resolves this ambiguity by applying a greedy left most matching rule. \n // Try matching net_path first, and if that fails we don't have authority so \n // then attempt to match abs_path.\n //\n // net_path = \"//\" authority [ abs_path ]\n // abs_path = \"/\" path_segments\n if (((index+1) < uriSpecLen) &&\n (uriSpec.charAt(index) == '/' && uriSpec.charAt(index+1) == '/')) {\n index += 2;\n int startPos = index;\n \n // Authority will be everything up to path, query or fragment\n char testChar = '\\0';\n while (index < uriSpecLen) {\n testChar = uriSpec.charAt(index);\n if (testChar == '/' || testChar == '?' || testChar == '#') {\n break;\n }\n index++;\n }\n \n // Attempt to parse authority. If the section is an empty string\n // this is a valid server based authority, so set the host to this\n // value.\n if (index > startPos) {\n // If we didn't find authority we need to back up. Attempt to\n // match against abs_path next.\n if (!initializeAuthority(uriSpec.substring(startPos, index))) {\n index = startPos - 2;\n }\n }\n else {\n m_host = \"\";\n }\n }\n \n initializePath(uriSpec, index);\n \n // Resolve relative URI to base URI - see RFC 2396 Section 5.2\n // In some cases, it might make more sense to throw an exception\n // (when scheme is specified is the string spec and the base URI\n // is also specified, for example), but we're just following the\n // RFC specifications\n if (p_base != null) {\n \n // check to see if this is the current doc - RFC 2396 5.2 #2\n // note that this is slightly different from the RFC spec in that\n // we don't include the check for query string being null\n // - this handles cases where the urispec is just a query\n // string or a fragment (e.g. \"?y\" or \"#s\") -\n // see <http://www.ics.uci.edu/~fielding/url/test1.html> which\n // identified this as a bug in the RFC\n if (m_path.length() == 0 && m_scheme == null &&\n m_host == null && m_regAuthority == null) {\n m_scheme = p_base.getScheme();\n m_userinfo = p_base.getUserinfo();\n m_host = p_base.getHost();\n m_port = p_base.getPort();\n m_regAuthority = p_base.getRegBasedAuthority();\n m_path = p_base.getPath();\n \n if (m_queryString == null) {\n m_queryString = p_base.getQueryString();\n }\n return;\n }\n \n // check for scheme - RFC 2396 5.2 #3\n // if we found a scheme, it means absolute URI, so we're done\n if (m_scheme == null) {\n m_scheme = p_base.getScheme();\n }\n else {\n return;\n }\n \n // check for authority - RFC 2396 5.2 #4\n // if we found a host, then we've got a network path, so we're done\n if (m_host == null && m_regAuthority == null) {\n m_userinfo = p_base.getUserinfo();\n m_host = p_base.getHost();\n m_port = p_base.getPort();\n m_regAuthority = p_base.getRegBasedAuthority();\n }\n else {\n return;\n }\n \n // check for absolute path - RFC 2396 5.2 #5\n if (m_path.length() > 0 &&\n m_path.startsWith(\"/\")) {\n return;\n }\n \n // if we get to this point, we need to resolve relative path\n // RFC 2396 5.2 #6\n String path = \"\";\n String basePath = p_base.getPath();\n \n // 6a - get all but the last segment of the base URI path\n if (basePath != null && basePath.length() > 0) {\n int lastSlash = basePath.lastIndexOf('/');\n if (lastSlash != -1) {\n path = basePath.substring(0, lastSlash+1);\n }\n }\n else if (m_path.length() > 0) {\n path = \"/\";\n }\n \n // 6b - append the relative URI path\n path = path.concat(m_path);\n \n // 6c - remove all \"./\" where \".\" is a complete path segment\n index = -1;\n while ((index = path.indexOf(\"/./\")) != -1) {\n path = path.substring(0, index+1).concat(path.substring(index+3));\n }\n \n // 6d - remove \".\" if path ends with \".\" as a complete path segment\n if (path.endsWith(\"/.\")) {\n path = path.substring(0, path.length()-1);\n }\n \n // 6e - remove all \"<segment>/../\" where \"<segment>\" is a complete\n // path segment not equal to \"..\"\n index = 1;\n int segIndex = -1;\n String tempString = null;\n \n while ((index = path.indexOf(\"/../\", index)) > 0) {\n tempString = path.substring(0, path.indexOf(\"/../\"));\n segIndex = tempString.lastIndexOf('/');\n if (segIndex != -1) {\n if (!tempString.substring(segIndex).equals(\"..\")) {\n path = path.substring(0, segIndex+1).concat(path.substring(index+4));\n index = segIndex;\n }\n else\n index += 4;\n }\n else\n index += 4;\n }\n \n // 6f - remove ending \"<segment>/..\" where \"<segment>\" is a\n // complete path segment\n if (path.endsWith(\"/..\")) {\n tempString = path.substring(0, path.length()-3);\n segIndex = tempString.lastIndexOf('/');\n if (segIndex != -1) {\n path = path.substring(0, segIndex+1);\n }\n }\n m_path = path;\n }\n }", "public java.lang.Short getUriScheme() {\r\n return uriScheme;\r\n }", "private Boolean hashttp(String s)// checks if url entered has http:// on it\n {\n return s.contains(\"http://\") || s.contains(\"https://\");\n }", "private String parsingURL(String requestURL) {\n\t\tint pos = 0;\n\t\tif (requestURL.startsWith(\"http://\")) {\n\t\t\tpos = \"http://\".length();\n\t\t}\n\t\telse {\n\t\t\tpos = \"https://\".length();\n\t\t}\n\t\t\n\t\tint pos2 = requestURL.indexOf(\":\", pos);\n\t\tif (pos2 < 0) {\n\t\t\tpos2 = requestURL.length();\n\t\t}\n\t\t\n\t\tint pos3 = requestURL.indexOf(\"/\", pos);\n\t\tif (pos3 < 0) {\n\t\t\tpos3 = requestURL.length();\n\t\t}\n\t\t\n\t\tpos2 = Math.min(pos2, pos3);\n\t\t\n\t\tString host = requestURL.substring(pos, pos2);\n\t\t/**\n\t\t * parsing request url\n\t\t */\n\t\treturn host;\n\t}", "SecuritySchemeLibrary createSecuritySchemeLibrary();", "public static boolean m18365a(String str) {\n return str != null && (str.startsWith(\"http://\") || str.startsWith(\"https://\"));\n }", "public String fixForScheme(String url) {\n\t\tStringBuffer returnUrl = new StringBuffer(url);\n\t\tif(StringUtils.contains(url, \"returnurl=\"))\n\t\t{\n\t\t\treturnUrl = new StringBuffer(StringUtils.substring(url,0, \n\t\t\t\t\tStringUtils.indexOf(url, \"returnurl=\")));\n\t\t\t\n\t\t\treturnUrl.append(\"returnurl=\");\n\t\t\tString returnurl = StringUtils.substring(url, \n\t\t\t\t\tStringUtils.indexOf(url, \"returnurl=\")+10);\n\t\t\t\n\t\t\ttry {\n\t\t\t\treturnUrl.append(URLEncoder.encode(new String(Base64.encodeBase64(returnurl.getBytes())),\"UTF-8\"));\n\t\t\t} catch (UnsupportedEncodingException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn returnUrl.toString();\n\t}", "public abstract void validateScheme(Scheme scheme);", "public com.google.protobuf.ByteString getSchemeBytes() {\n java.lang.Object ref = scheme_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);\n scheme_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public void setUriScheme(java.lang.Short uriScheme) {\r\n this.uriScheme = uriScheme;\r\n }", "private static String authorityFromHostAndPort(String host, int port) {\n try {\n return new URI(null, null, host, port, null, null, null).getAuthority();\n } catch (URISyntaxException ex) {\n throw new IllegalArgumentException(\"Invalid host or port: \" + host + \" \" + port, ex);\n }\n }", "public Builder setScheme(java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n scheme_ = value;\n bitField0_ |= 0x00000001;\n onChanged();\n return this;\n }", "protected void parseURL(URL paramURL, String paramString, int paramInt1, int paramInt2) {\n/* 126 */ String str1 = paramURL.getProtocol();\n/* 127 */ String str2 = paramURL.getAuthority();\n/* 128 */ String str3 = paramURL.getUserInfo();\n/* 129 */ String str4 = paramURL.getHost();\n/* 130 */ int i = paramURL.getPort();\n/* 131 */ String str5 = paramURL.getPath();\n/* 132 */ String str6 = paramURL.getQuery();\n/* */ \n/* */ \n/* 135 */ String str7 = paramURL.getRef();\n/* */ \n/* 137 */ boolean bool1 = false;\n/* 138 */ boolean bool2 = false;\n/* */ \n/* */ \n/* */ \n/* 142 */ if (paramInt1 < paramInt2) {\n/* 143 */ int k = paramString.indexOf('?');\n/* 144 */ bool2 = (k == paramInt1) ? true : false;\n/* 145 */ if (k != -1 && k < paramInt2) {\n/* 146 */ str6 = paramString.substring(k + 1, paramInt2);\n/* 147 */ if (paramInt2 > k)\n/* 148 */ paramInt2 = k; \n/* 149 */ paramString = paramString.substring(0, k);\n/* */ } \n/* */ } \n/* */ \n/* 153 */ int j = 0;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 159 */ boolean bool3 = (paramInt1 <= paramInt2 - 4 && paramString.charAt(paramInt1) == '/' && paramString.charAt(paramInt1 + 1) == '/' && paramString.charAt(paramInt1 + 2) == '/' && paramString.charAt(paramInt1 + 3) == '/') ? true : false;\n/* 160 */ if (!bool3 && paramInt1 <= paramInt2 - 2 && paramString.charAt(paramInt1) == '/' && paramString\n/* 161 */ .charAt(paramInt1 + 1) == '/') {\n/* 162 */ paramInt1 += 2;\n/* 163 */ j = paramString.indexOf('/', paramInt1);\n/* 164 */ if (j < 0 || j > paramInt2) {\n/* 165 */ j = paramString.indexOf('?', paramInt1);\n/* 166 */ if (j < 0 || j > paramInt2) {\n/* 167 */ j = paramInt2;\n/* */ }\n/* */ } \n/* 170 */ str4 = str2 = paramString.substring(paramInt1, j);\n/* */ \n/* 172 */ int k = str2.indexOf('@');\n/* 173 */ if (k != -1) {\n/* 174 */ if (k != str2.lastIndexOf('@')) {\n/* */ \n/* 176 */ str3 = null;\n/* 177 */ str4 = null;\n/* */ } else {\n/* 179 */ str3 = str2.substring(0, k);\n/* 180 */ str4 = str2.substring(k + 1);\n/* */ } \n/* */ } else {\n/* 183 */ str3 = null;\n/* */ } \n/* 185 */ if (str4 != null) {\n/* */ \n/* */ \n/* 188 */ if (str4.length() > 0 && str4.charAt(0) == '[') {\n/* 189 */ if ((k = str4.indexOf(']')) > 2) {\n/* */ \n/* 191 */ String str = str4;\n/* 192 */ str4 = str.substring(0, k + 1);\n/* */ \n/* 194 */ if (!IPAddressUtil.isIPv6LiteralAddress(str4.substring(1, k))) {\n/* 195 */ throw new IllegalArgumentException(\"Invalid host: \" + str4);\n/* */ }\n/* */ \n/* */ \n/* 199 */ i = -1;\n/* 200 */ if (str.length() > k + 1) {\n/* 201 */ if (str.charAt(k + 1) == ':') {\n/* 202 */ k++;\n/* */ \n/* 204 */ if (str.length() > k + 1) {\n/* 205 */ i = Integer.parseInt(str.substring(k + 1));\n/* */ }\n/* */ } else {\n/* 208 */ throw new IllegalArgumentException(\"Invalid authority field: \" + str2);\n/* */ } \n/* */ }\n/* */ } else {\n/* */ \n/* 213 */ throw new IllegalArgumentException(\"Invalid authority field: \" + str2);\n/* */ } \n/* */ } else {\n/* */ \n/* 217 */ k = str4.indexOf(':');\n/* 218 */ i = -1;\n/* 219 */ if (k >= 0) {\n/* */ \n/* 221 */ if (str4.length() > k + 1) {\n/* 222 */ i = Integer.parseInt(str4.substring(k + 1));\n/* */ }\n/* 224 */ str4 = str4.substring(0, k);\n/* */ } \n/* */ } \n/* */ } else {\n/* 228 */ str4 = \"\";\n/* */ } \n/* 230 */ if (i < -1) {\n/* 231 */ throw new IllegalArgumentException(\"Invalid port number :\" + i);\n/* */ }\n/* 233 */ paramInt1 = j;\n/* */ \n/* */ \n/* 236 */ if (str2 != null && str2.length() > 0) {\n/* 237 */ str5 = \"\";\n/* */ }\n/* */ } \n/* 240 */ if (str4 == null) {\n/* 241 */ str4 = \"\";\n/* */ }\n/* */ \n/* */ \n/* 245 */ if (paramInt1 < paramInt2) {\n/* 246 */ if (paramString.charAt(paramInt1) == '/') {\n/* 247 */ str5 = paramString.substring(paramInt1, paramInt2);\n/* 248 */ } else if (str5 != null && str5.length() > 0) {\n/* 249 */ bool1 = true;\n/* 250 */ int k = str5.lastIndexOf('/');\n/* 251 */ String str = \"\";\n/* 252 */ if (k == -1 && str2 != null) {\n/* 253 */ str = \"/\";\n/* */ }\n/* 255 */ str5 = str5.substring(0, k + 1) + str + paramString.substring(paramInt1, paramInt2);\n/* */ } else {\n/* */ \n/* 258 */ String str = (str2 != null) ? \"/\" : \"\";\n/* 259 */ str5 = str + paramString.substring(paramInt1, paramInt2);\n/* */ } \n/* 261 */ } else if (bool2 && str5 != null) {\n/* 262 */ int k = str5.lastIndexOf('/');\n/* 263 */ if (k < 0)\n/* 264 */ k = 0; \n/* 265 */ str5 = str5.substring(0, k) + \"/\";\n/* */ } \n/* 267 */ if (str5 == null) {\n/* 268 */ str5 = \"\";\n/* */ }\n/* 270 */ if (bool1) {\n/* */ \n/* 272 */ while ((j = str5.indexOf(\"/./\")) >= 0) {\n/* 273 */ str5 = str5.substring(0, j) + str5.substring(j + 2);\n/* */ }\n/* */ \n/* 276 */ j = 0;\n/* 277 */ while ((j = str5.indexOf(\"/../\", j)) >= 0) {\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 284 */ if (j > 0 && (paramInt2 = str5.lastIndexOf('/', j - 1)) >= 0 && str5\n/* 285 */ .indexOf(\"/../\", paramInt2) != 0) {\n/* 286 */ str5 = str5.substring(0, paramInt2) + str5.substring(j + 3);\n/* 287 */ j = 0; continue;\n/* */ } \n/* 289 */ j += 3;\n/* */ } \n/* */ \n/* */ \n/* */ \n/* 294 */ j = str5.indexOf(\"/..\");\n/* 295 */ while (str5.endsWith(\"/..\") && (paramInt2 = str5.lastIndexOf('/', j - 1)) >= 0) {\n/* 296 */ str5 = str5.substring(0, paramInt2 + 1);\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* 302 */ if (str5.startsWith(\"./\") && str5.length() > 2) {\n/* 303 */ str5 = str5.substring(2);\n/* */ }\n/* */ \n/* 306 */ if (str5.endsWith(\"/.\")) {\n/* 307 */ str5 = str5.substring(0, str5.length() - 1);\n/* */ }\n/* */ } \n/* 310 */ setURL(paramURL, str1, str4, i, str2, str3, str5, str6, str7);\n/* */ }", "public interface SchemesProvider {\n void requestSchemeData(String access_token, boolean language, OnSchemesRecieved onSchemesRecieved);\n}", "private boolean verifyUrlFormat( String editorUrl )\n {\n if ( null == editorUrl )\n return false;\n String normalized = editorUrl.replace('\\\\', '/');\n if ( !normalized.startsWith(CE_URL_PREFIX))\n return false;\n normalized = normalized.substring(3);\n int pos = normalized.indexOf(\"/\");\n if ( pos < 0 )\n return false;\n normalized = normalized.substring(pos+1);\n pos = normalized.indexOf(\"/\");\n if ( pos >= 0 )\n return false;\n return true;\n }", "public static boolean hasScheme(URI uri, String... schemes) {\r\n final String scheme = uri.getScheme();\r\n for (final String sch : schemes) {\r\n if (scheme == null) {\r\n if (sch == null) {\r\n return true;\r\n }\r\n } else if (scheme.equalsIgnoreCase(sch)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "private boolean m14041a() {\n return this.f12187c.startsWith(\"https://\");\n }", "public void setCodingSchemeURI(java.lang.String codingSchemeURI) {\n this.codingSchemeURI = codingSchemeURI;\n }", "ImmutableSet<Scheme> getSchemes(String type);", "private boolean isValidServerBasedAuthority(String host, int port, String userinfo) {\n \n // Check if the host is well formed.\n if (!isWellFormedAddress(host)) {\n return false;\n }\n \n // Check that port is well formed if it exists.\n // REVISIT: There's no restriction on port value ranges, but\n // perform the same check as in setPort to be consistent. Pass\n // in a string to this method instead of an integer.\n if (port < -1 || port > 65535) {\n return false;\n }\n \n // Check that userinfo is well formed if it exists.\n if (userinfo != null) {\n // Userinfo can contain alphanumerics, mark characters, escaped\n // and ';',':','&','=','+','$',','\n int index = 0;\n int end = userinfo.length();\n char testChar = '\\0';\n while (index < end) {\n testChar = userinfo.charAt(index);\n if (testChar == '%') {\n if (index+2 >= end ||\n !isHex(userinfo.charAt(index+1)) ||\n !isHex(userinfo.charAt(index+2))) {\n return false;\n }\n index += 2;\n }\n else if (!isUserinfoCharacter(testChar)) {\n return false;\n }\n ++index;\n }\n }\n return true;\n }", "public static ChallengeRequest parseRequest(String header) {\r\n ChallengeRequest result = null;\r\n \r\n if (header != null) {\r\n int space = header.indexOf(' ');\r\n \r\n if (space != -1) {\r\n String scheme = header.substring(0, space);\r\n String realm = header.substring(space + 1);\r\n int equals = realm.indexOf('=');\r\n String realmValue = realm.substring(equals + 2,\r\n realm.length() - 1);\r\n result = new ChallengeRequest(new ChallengeScheme(\"HTTP_\"\r\n + scheme, scheme), realmValue);\r\n }\r\n }\r\n \r\n return result;\r\n }", "private void parseProtocol(String protocol) {\n try (Scanner sc = new Scanner(protocol)) {\n //parse first line\n this.method = Method.valueOf(sc.next());\n this.url = sc.next();\n String httpVersion = sc.next();\n this.version = Double.parseDouble(httpVersion.substring(5));\n\n while (sc.hasNext(\".+:\")) {\n String header = sc.next();\n header = header.substring(0, header.indexOf(':'));\n String value = sc.next() + sc.nextLine();\n this.headings.put(header, value);\n }\n }\n\n }", "Uri getJurisdiction();", "@java.lang.Override\n public com.google.protobuf.ByteString getSchemeBytes() {\n java.lang.Object ref = scheme_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);\n scheme_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public void setScheme(String newValue);", "public java.lang.String getProxyScheme()\r\n {\r\n return proxyScheme;\r\n }", "List<SecuritySchemeRef> securedBy();", "Set<Scheme> getSchemes();", "public C7391aa getScheme() {\n return new C7391aa(null);\n }", "@Test\n public void testIsValidAuthorityPositiveInList() throws MalformedURLException {\n final FileMockContext context = new FileMockContext(androidx.test.platform.app.InstrumentationRegistry.getInstrumentation().getContext());\n final Discovery discovery = new Discovery(context);\n\n final URL endpointFull = new URL(\"https://login.windows.net/common/oauth2/authorize\");\n try {\n discovery.validateAuthority(endpointFull);\n } catch (final AuthenticationException e) {\n fail(\"unexpected exception. \");\n }\n\n final URL endpointInstanceRight = new URL(\"https://login.windows.net/something/something\");\n try {\n discovery.validateAuthority(endpointInstanceRight);\n } catch (final AuthenticationException e) {\n fail(\"unexpected exception.\");\n }\n\n final URL endpointInstanceOnly = new URL(\"https://login.windows.net\");\n try {\n discovery.validateAuthority(endpointInstanceOnly);\n } catch (final AuthenticationException e) {\n assertNotNull(e);\n assertTrue(e.getCode() == ADALError.DEVELOPER_AUTHORITY_IS_NOT_VALID_INSTANCE);\n }\n }", "public java.lang.String getPartyIdScheme(\n ) {\n return this._partyIdScheme;\n }", "public void testYourFirstPartition()\n {\n //instantiate the validator \n UrlValidator urlVal = new UrlValidator(null, null, UrlValidator.ALLOW_ALL_SCHEMES);\n \n //build the url to test from random valid parts\n String url = \"\";\n Random rand = new Random();\n int scheme = rand.nextInt(validScheme.length);\n int auth = rand.nextInt(validAuthority.length);\n url = validScheme[scheme] + validAuthority[auth];\n \n //1 in 4 chance of adding a port number to the string\n if(rand.nextInt(4) == 3)\n {\n int port = rand.nextInt(65536);//port number ranges 0-65535\n //url = url + \"/:\" + port;\n url = url + \":\" + port;\n }\n\n //print out the url and test if valid\n System.out.print(url + \" : \");\n\t System.out.println(urlVal.isValid(url));\n \n }", "public interface HeadUri {\n\n\tString ROOT = \"/\";\n\n\tString CONNECT = \"/connect\";\n\n\tString PUSH = \"/push\";\n\n}", "private Protocol getProtocol(String scheme) {\r\n Protocol protocol = Protocol.valueOf(scheme);\r\n if (protocol == null) {\r\n protocol = new Protocol(scheme);\r\n }\r\n return protocol;\r\n }", "public java.lang.String getScheme() {\n java.lang.Object ref = scheme_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n scheme_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public C7397ag getScheme() {\n return new C7397ag(null);\n }", "public boolean isUri(String obj) {\r\n//\t\treturn obj.matches(\"(([a-zA-Z][0-9a-zA-Z+\\\\\\\\-\\\\\\\\.]*:)?/{0,2}[0-9a-zA-Z;/?:@&=+$\\\\\\\\.\\\\\\\\-_!~*'()%]+)?(#[0-9a-zA-Z;/?:@&=+$\\\\\\\\.\\\\\\\\-_!~*'()%]+)?\");\r\n\t\treturn false;\r\n\t}", "public String getAuthority () throws java.io.IOException, com.linar.jintegra.AutomationException;", "protected static URI getAuthServiceUri() {\n if (authServiceUrl == null || authServiceUrl.toString().isEmpty() || authServiceUrl.toString()\n .equals(\"?\")) {\n Console console = System.console();\n if (console != null) {\n try {\n authServiceUrl = new URI(console.readLine(\"Anaplan Auth-Service URL:\"));\n } catch (URISyntaxException e) {\n throw new AnaplanAPIException(\"Unable to parse Auth-Service URI: \", e);\n }\n } else {\n throw new UnsupportedOperationException(\"Auth-Service URL must be specified!\");\n }\n }\n return authServiceUrl;\n }", "public boolean setHeaders(HttpURLConnection paramHttpURLConnection, HeaderParser paramHeaderParser, String paramString) {\n/* */ String str2;\n/* 296 */ this.params.setNonce(paramHeaderParser.findValue(\"nonce\"));\n/* 297 */ this.params.setOpaque(paramHeaderParser.findValue(\"opaque\"));\n/* 298 */ this.params.setQop(paramHeaderParser.findValue(\"qop\"));\n/* */ \n/* 300 */ String str1 = \"\";\n/* */ \n/* 302 */ if (this.type == 'p' && paramHttpURLConnection\n/* 303 */ .tunnelState() == HttpURLConnection.TunnelState.SETUP) {\n/* 304 */ str1 = HttpURLConnection.connectRequestURI(paramHttpURLConnection.getURL());\n/* 305 */ str2 = HttpURLConnection.HTTP_CONNECT;\n/* */ } else {\n/* */ try {\n/* 308 */ str1 = paramHttpURLConnection.getRequestURI();\n/* 309 */ } catch (IOException iOException) {}\n/* 310 */ str2 = paramHttpURLConnection.getMethod();\n/* */ } \n/* */ \n/* 313 */ if (this.params.nonce == null || this.authMethod == null || this.pw == null || this.realm == null) {\n/* 314 */ return false;\n/* */ }\n/* 316 */ if (this.authMethod.length() >= 1)\n/* */ {\n/* */ \n/* */ \n/* 320 */ this\n/* 321 */ .authMethod = Character.toUpperCase(this.authMethod.charAt(0)) + this.authMethod.substring(1).toLowerCase();\n/* */ }\n/* 323 */ String str3 = paramHeaderParser.findValue(\"algorithm\");\n/* 324 */ if (str3 == null || \"\".equals(str3)) {\n/* 325 */ str3 = \"MD5\";\n/* */ }\n/* 327 */ this.params.setAlgorithm(str3);\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 333 */ if (this.params.authQop()) {\n/* 334 */ this.params.setNewCnonce();\n/* */ }\n/* */ \n/* 337 */ String str4 = getHeaderValueImpl(str1, str2);\n/* 338 */ if (str4 != null) {\n/* 339 */ paramHttpURLConnection.setAuthenticationProperty(getHeaderName(), str4);\n/* 340 */ return true;\n/* */ } \n/* 342 */ return false;\n/* */ }", "Scheme getScheme(String id);", "private String getUrlHost(String url) {\n // httpx://host/.....\n\n int hostStart = url.indexOf(\"//\");\n if (hostStart == -1) {\n return \"\";\n }\n int hostEnd = url.indexOf(\"/\", hostStart + 2);\n if (hostEnd == -1) {\n return url.substring(hostStart + 2);\n } else {\n return url.substring(hostStart + 2, hostEnd);\n }\n\n }", "public interface Patterns {\n String LOGIN = \"[a-zA-Z0-9]+\";\n String PASSWORD = \"[a-zA-Z0-9.-]+\";\n String EMAIL = \"[a-zA-Z0-9.-@]+\";\n}", "private URI checkUri(final URI uri) {\n // non-null URI\n Utils.nonNull(uri, () -> \"null URI\");\n // non-null authority\n Utils.nonNull(uri.getAuthority(),\n () -> String.format(\"%s requires URI with authority: invalid %s\", this, uri));\n // check the scheme (sanity check)\n if (!getScheme().equalsIgnoreCase(uri.getScheme())) {\n throw new ProviderMismatchException(String.format(\"Invalid scheme for %s: %s\",\n this, uri.getScheme()));\n }\n return uri;\n }", "protected String getAuthority() {\n return \"com.activeharmony.content.ContentProvider\";\n }", "public static void parseURL(PURL u, String spec, int start, int limit) {\n // These fields may receive context content if this was relative URL\n String protocol = u.getProtocol();\n String authority = u.getAuthority(); \n String userInfo = u.getUserInfo();\n String host = u.getHost();\n int port = u.getPort();\n String path = u.getPath();\n\tString query = u.getQuery();\n\n // This field has already been parsed\n String ref = u.getRef();\n\n\tboolean isRelPath = false;\n\tboolean queryOnly = false;\n\n// FIX: should not assume query if opaque\n // Strip off the query part\n\tif (start < limit) {\n int queryStart = spec.indexOf('?');\n queryOnly = queryStart == start;\n if ((queryStart != -1) && (queryStart < limit)) {\n query = spec.substring(queryStart+1, limit);\n if (limit > queryStart)\n limit = queryStart;\n spec = spec.substring(0, queryStart);\n }\n\t}\n\n\tint i = 0;\n // Parse the authority part if any\n\tif ((start <= limit - 2) && (spec.charAt(start) == '/') &&\n\t (spec.charAt(start + 1) == '/')) {\n\t start += 2;\n\t i = spec.indexOf('/', start);\n if (i < 0) {\n\t i = spec.indexOf('?', start);\n\t\tif (i < 0)\n i = limit;\n\t }\n\n host = authority = spec.substring(start, i);\n\n int ind = authority.indexOf('@');\n if (ind != -1) {\n userInfo = authority.substring(0, ind);\n host = authority.substring(ind+1);\n\t } else {\n\t\tuserInfo = null;\n\t }\n\t if (host != null) {\n\t\t// If the host is surrounded by [ and ] then its an IPv6 \n\t\t// literal address as specified in RFC2732\n\t\tif (host.length()>0 && (host.charAt(0) == '[')) {\n\t\t //PURLStreamHandler has been modified - it does not\n\t\t //handle IPV6 addresses\n\t\t //this is an ipv6 address\n\n\t\t throw new Error(\"Can't handle IPv6 addresses!\");\n\n\t\t} else {\n\t\t ind = host.indexOf(':');\n\t\t port = -1;\n\t\t if (ind >= 0) {\n\t\t\t// port can be null according to RFC2396\n\t\t\tif (host.length() > (ind + 1)) {\n\t\t\t port = Integer.parseInt(host.substring(ind + 1));\n\t\t\t}\n\t\t\thost = host.substring(0, ind);\n\t\t }\n\t\t}\n\t } else {\n\t\thost = \"\";\n\t }\n\t if (port < -1)\n\t\tthrow new IllegalArgumentException(\"Invalid port number :\" +\n\t\t\t\t\t\t port);\n\t start = i;\n\t // If the authority is defined then the path is defined by the\n // spec only; See RFC 2396 Section 5.2.4.\n if (authority != null && authority.length() > 0)\n path = \"\";\n\t} \n\n \tif (host == null) {\n \t host = \"\";\n \t}\n\n // Parse the file path if any\n\tif (start < limit) {\n\t if (spec.charAt(start) == '/') {\n\t\tpath = spec.substring(start, limit);\n\t } else if (path != null && path.length() > 0) {\n\t\tisRelPath = true;\n\t\tint ind = path.lastIndexOf('/');\n\t\tString seperator = \"\";\n\t\tif (ind == -1 && authority != null)\n\t\t seperator = \"/\";\n\t\tpath = path.substring(0, ind + 1) + seperator +\n\t\t spec.substring(start, limit);\n\t\t\t\t\t\n\t } else {\n\t\tString seperator = (authority != null) ? \"/\" : \"\";\n\t\tpath = seperator + spec.substring(start, limit);\n\t }\n\t} else if (queryOnly && path != null) {\n int ind = path.lastIndexOf('/');\n if (ind < 0)\n ind = 0;\n path = path.substring(0, ind) + \"/\";\n }\n\tif (path == null)\n\t path = \"\";\n\n\tif (isRelPath) {\n // Remove embedded /./\n while ((i = path.indexOf(\"/./\")) >= 0) {\n\t path = path.substring(0, i) + path.substring(i + 2);\n\t }\n // Remove embedded /../ if possible\n\t i = 0;\n\t while ((i = path.indexOf(\"/../\", i)) > 0) {\n\t if ((limit = path.lastIndexOf('/', i - 1)) >= 0) {\n\t\t path = path.substring(0, limit) + path.substring(i + 3);\n\t\t i = 0;\n\t } else {\n\t\t i = i + 3;\n\t\t}\n\t }\n // Remove trailing .. if possible\n while (path.endsWith(\"/..\")) {\n i = path.indexOf(\"/..\");\n\t if ((limit = path.lastIndexOf('/', i - 1)) >= 0) {\n\t\t path = path.substring(0, limit+1);\n\t } else {\n\t\t break;\n\t\t}\n\t }\n\t // Remove starting .\n if (path.startsWith(\"./\") && path.length() > 2)\n path = path.substring(2);\n\n // Remove trailing .\n if (path.endsWith(\"/.\"))\n path = path.substring(0, path.length() -1);\n\t}\n\n\tsetURL(u, protocol, host, port, authority, userInfo, path, query, ref);\n }", "public static void main(String args[]){\n String pattern = \"/^(http(s)?(:\\\\/\\\\/))?(www\\\\.)?\\\\.(\\\\/.*)?$/\";\r\n String input = \"(http://www.archive.com/web/http://www.mrvc.indianrai.gov.in/overview)\";\r\n\r\n Matcher matcher = Pattern.compile(pattern).matcher(input);\r\n while (matcher.find()) {\r\n System.out.println(matcher.group());\r\n int start = matcher.start(1);\r\n int end = matcher.end(1);\r\n String result = input.substring(start,end).replaceFirst(\"www.\",\"\");\r\n if(result.startsWith(\"www.\") ){\r\n input.substring(start,end).replaceFirst(\"www.\",\"\");\r\n }else if(result.startsWith(\"ww2.\")){\r\n input.substring(start,end).replaceFirst(\"ww2.\",\"\");\r\n }else if(result.startsWith(\"web.\")){\r\n input.substring(start,end).replaceFirst(\"web.\",\"\");\r\n }\r\n System.out.println(result);\r\n\r\n }\r\n }", "@java.lang.Override\n public java.lang.String getScheme() {\n java.lang.Object ref = scheme_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n scheme_ = s;\n return s;\n }\n }", "private static boolean isURIString(String p_uric) {\n if (p_uric == null) {\n return false;\n }\n int end = p_uric.length();\n char testChar = '\\0';\n for (int i = 0; i < end; i++) {\n testChar = p_uric.charAt(i);\n if (testChar == '%') {\n if (i+2 >= end ||\n !isHex(p_uric.charAt(i+1)) ||\n !isHex(p_uric.charAt(i+2))) {\n return false;\n }\n else {\n i += 2;\n continue;\n }\n }\n if (isURICharacter(testChar)) {\n continue;\n }\n else {\n return false;\n }\n }\n return true;\n }", "@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 }", "public static OPDSAuthenticationPatternMapped parse(\n final URI file,\n final InputStream stream)\n throws IOException, ParseException\n {\n Objects.requireNonNull(file, \"file\");\n Objects.requireNonNull(stream, \"stream\");\n\n final List<OPDSMatchingAuthentication> patterns = new ArrayList<>(8);\n try (var reader =\n new BufferedReader(new InputStreamReader(stream, UTF_8))) {\n\n var line_number = 1;\n while (true) {\n try {\n final var line = reader.readLine();\n if (line == null) {\n return OPDSAuthenticationPatternMapped.of(patterns);\n }\n\n if (line.startsWith(\"#\")) {\n continue;\n }\n\n final var trimmed = line.trim();\n if (trimmed.isEmpty()) {\n continue;\n }\n\n final var segments = List.of(WHITESPACE.split(trimmed));\n if (segments.size() != 2) {\n throw syntaxError(\n file,\n line_number,\n \"<pattern> ( <authentication-value> | 'none' )\",\n line);\n }\n\n final var pattern =\n Pattern.compile(segments.get(0));\n final var auth =\n parseAuthentication(file, line_number, segments.get(1));\n\n patterns.add(OPDSMatchingAuthentication.of(pattern.pattern(), auth));\n } finally {\n ++line_number;\n }\n }\n }\n }", "SchemeDBO getSchemeByName(String schemeName);", "java.lang.String getQueryAuthorizations();", "public static boolean m39034b(Uri uri) {\n String k = m39043k(uri);\n if (WebKitApi.SCHEME_HTTPS.equals(k) || WebKitApi.SCHEME_HTTP.equals(k)) {\n return true;\n }\n return false;\n }", "public boolean matchesRegex(URI uri);", "private static String encodeURI(String url) {\n\t\tStringBuffer uri = new StringBuffer(url.length());\n\t\tint length = url.length();\n\t\tfor (int i = 0; i < length; i++) {\n\t\t\tchar c = url.charAt(i);\n\n\t\t\tswitch (c) {\n\t\t\t\tcase '!':\n\t\t\t\tcase '#':\n\t\t\t\tcase '$':\n\t\t\t\tcase '%':\n\t\t\t\tcase '&':\n\t\t\t\tcase '\\'':\n\t\t\t\tcase '(':\n\t\t\t\tcase ')':\n\t\t\t\tcase '*':\n\t\t\t\tcase '+':\n\t\t\t\tcase ',':\n\t\t\t\tcase '-':\n\t\t\t\tcase '.':\n\t\t\t\tcase '/':\n\t\t\t\tcase '0':\n\t\t\t\tcase '1':\n\t\t\t\tcase '2':\n\t\t\t\tcase '3':\n\t\t\t\tcase '4':\n\t\t\t\tcase '5':\n\t\t\t\tcase '6':\n\t\t\t\tcase '7':\n\t\t\t\tcase '8':\n\t\t\t\tcase '9':\n\t\t\t\tcase ':':\n\t\t\t\tcase ';':\n\t\t\t\tcase '=':\n\t\t\t\tcase '?':\n\t\t\t\tcase '@':\n\t\t\t\tcase 'A':\n\t\t\t\tcase 'B':\n\t\t\t\tcase 'C':\n\t\t\t\tcase 'D':\n\t\t\t\tcase 'E':\n\t\t\t\tcase 'F':\n\t\t\t\tcase 'G':\n\t\t\t\tcase 'H':\n\t\t\t\tcase 'I':\n\t\t\t\tcase 'J':\n\t\t\t\tcase 'K':\n\t\t\t\tcase 'L':\n\t\t\t\tcase 'M':\n\t\t\t\tcase 'N':\n\t\t\t\tcase 'O':\n\t\t\t\tcase 'P':\n\t\t\t\tcase 'Q':\n\t\t\t\tcase 'R':\n\t\t\t\tcase 'S':\n\t\t\t\tcase 'T':\n\t\t\t\tcase 'U':\n\t\t\t\tcase 'V':\n\t\t\t\tcase 'W':\n\t\t\t\tcase 'X':\n\t\t\t\tcase 'Y':\n\t\t\t\tcase 'Z':\n\t\t\t\tcase '[':\n\t\t\t\tcase ']':\n\t\t\t\tcase '_':\n\t\t\t\tcase 'a':\n\t\t\t\tcase 'b':\n\t\t\t\tcase 'c':\n\t\t\t\tcase 'd':\n\t\t\t\tcase 'e':\n\t\t\t\tcase 'f':\n\t\t\t\tcase 'g':\n\t\t\t\tcase 'h':\n\t\t\t\tcase 'i':\n\t\t\t\tcase 'j':\n\t\t\t\tcase 'k':\n\t\t\t\tcase 'l':\n\t\t\t\tcase 'm':\n\t\t\t\tcase 'n':\n\t\t\t\tcase 'o':\n\t\t\t\tcase 'p':\n\t\t\t\tcase 'q':\n\t\t\t\tcase 'r':\n\t\t\t\tcase 's':\n\t\t\t\tcase 't':\n\t\t\t\tcase 'u':\n\t\t\t\tcase 'v':\n\t\t\t\tcase 'w':\n\t\t\t\tcase 'x':\n\t\t\t\tcase 'y':\n\t\t\t\tcase 'z':\n\t\t\t\tcase '~':\n\t\t\t\t\turi.append(c);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tStringBuffer result = new StringBuffer(3);\n\t\t\t\t\tString s = String.valueOf(c);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tbyte[] data = s.getBytes(\"UTF8\");\n\t\t\t\t\t\tfor (int j = 0; j < data.length; j++) {\n\t\t\t\t\t\t\tresult.append('%');\n\t\t\t\t\t\t\tString hex = Integer.toHexString(data[j]);\n\t\t\t\t\t\t\tresult.append(hex.substring(hex.length() - 2));\n\t\t\t\t\t\t}\n\t\t\t\t\t\turi.append(result.toString());\n\t\t\t\t\t} catch (UnsupportedEncodingException ex) {\n\t\t\t\t\t\t// should never happen\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn uri.toString();\n\t}", "public static void main(String[] args) {\n UrlValidator uv = new UrlValidator();\n for (String arg : args) {\n try {\n URI uri = new URI(arg);\n uri = uri.normalize();\n System.out.println(uri);\n System.out.printf(\"URI scheme: %s%n\", uri.getScheme());\n System.out.printf(\"URI scheme specific part: %s%n\", uri.getSchemeSpecificPart());\n System.out.printf(\"URI raw scheme specific part: %s%n\", uri.getRawSchemeSpecificPart());\n System.out.printf(\"URI auth: %s%n\", uri.getAuthority());\n System.out.printf(\"URI raw auth: %s%n\", uri.getRawAuthority());\n System.out.printf(\"URI userInfo: %s%n\", uri.getUserInfo());\n System.out.printf(\"URI raw userInfo: %s%n\", uri.getRawUserInfo());\n System.out.printf(\"URI host: %s%n\", uri.getHost());\n System.out.printf(\"URI port: %s%n\", uri.getPort());\n System.out.printf(\"URI path: %s%n\", uri.getPath());\n System.out.printf(\"URI raw path: %s%n\", uri.getRawPath());\n System.out.printf(\"URI query: %s%n\", uri.getQuery());\n System.out.printf(\"URI raw query: %s%n\", uri.getRawQuery());\n System.out.printf(\"URI fragment: %s%n\", uri.getFragment());\n System.out.printf(\"URI raw fragment: %s%n\", uri.getRawFragment());\n } catch (URISyntaxException e) {\n System.out.println(e.getMessage());\n }\n System.out.printf(\"isValid: %s%n\", uv.isValid(arg));\n }\n }", "public URL standardizeURL(URL startingURL);", "private static Set<String> extractHosts(String rawContent) { \r\n\t\tString hostRegex = \"https:\\\\/\\\\/[a-zA-Z]([\\\\w\\\\.\\\\-])*\\\\.gov.br\";\r\n\t\tMatcher matcher = Pattern.compile(hostRegex).matcher(rawContent);\r\n\t\t\r\n\t\tSet<String> results = new HashSet<String>();\r\n\t\twhile(matcher.find()) {\r\n\t\t\tresults.add(matcher.group().replace(\"http://\", \"\").replace(\"https://\", \"\"));\r\n\t\t}\r\n\t\treturn results;\r\n\t\t\r\n\t}", "@Test\n public void testValidator276() {\n UrlValidator validator = new UrlValidator();\n\n assertTrue(\"http://apache.org/ should be allowed by default\",\n validator.isValid(\"http://www.apache.org/test/index.html\"));\n\n assertFalse(\"file:///c:/ shouldn't be allowed by default\",\n validator.isValid(\"file:///C:/some.file\"));\n\n assertFalse(\"file:///c:\\\\ shouldn't be allowed by default\",\n validator.isValid(\"file:///C:\\\\some.file\"));\n\n assertFalse(\"file:///etc/ shouldn't be allowed by default\",\n validator.isValid(\"file:///etc/hosts\"));\n\n assertFalse(\"file://localhost/etc/ shouldn't be allowed by default\",\n validator.isValid(\"file://localhost/etc/hosts\"));\n\n assertFalse(\"file://localhost/c:/ shouldn't be allowed by default\",\n validator.isValid(\"file://localhost/c:/some.file\"));\n\n // Turn it on, and check\n // Note - we need to enable local urls when working with file:\n validator = new UrlValidator(new String[] {\"http\", \"file\"}, UrlValidator.ALLOW_LOCAL_URLS);\n\n assertTrue(\"http://apache.org/ should be allowed by default\",\n validator.isValid(\"http://www.apache.org/test/index.html\"));\n\n assertTrue(\"file:///c:/ should now be allowed\",\n validator.isValid(\"file:///C:/some.file\"));\n\n assertFalse(\"file:///c:\\\\ should not be allowed\", // Only allow forward slashes\n validator.isValid(\"file:///C:\\\\some.file\"));\n\n assertTrue(\"file:///etc/ should now be allowed\",\n validator.isValid(\"file:///etc/hosts\"));\n\n assertTrue(\"file://localhost/etc/ should now be allowed\",\n validator.isValid(\"file://localhost/etc/hosts\"));\n\n assertTrue(\"file://localhost/c:/ should now be allowed\",\n validator.isValid(\"file://localhost/c:/some.file\"));\n\n // These are never valid\n assertFalse(\"file://c:/ shouldn't ever be allowed, needs file:///c:/\",\n validator.isValid(\"file://C:/some.file\"));\n\n assertFalse(\"file://c:\\\\ shouldn't ever be allowed, needs file:///c:/\",\n validator.isValid(\"file://C:\\\\some.file\"));\n }", "public void setRegBasedAuthority(String authority) \n throws MalformedURIException {\n \n if (authority == null) {\n m_regAuthority = null;\n return;\n }\n // reg_name = 1*( unreserved | escaped | \"$\" | \",\" | \n // \";\" | \":\" | \"@\" | \"&\" | \"=\" | \"+\" )\n else if (authority.length() < 1 ||\n !isValidRegistryBasedAuthority(authority) ||\n authority.indexOf('/') != -1) {\n throw new MalformedURIException(\"Registry based authority is not well formed.\"); \n }\n m_regAuthority = authority;\n m_host = null;\n m_userinfo = null;\n m_port = -1;\n }", "public String getProtocol()\n {\n ASPManager mgr = getASPManager();\n String protocol = mgr.getAspRequest().getScheme();\n\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[0]))\n protocol = data[0];\n }\n\n return protocol;\n }" ]
[ "0.6237749", "0.6206694", "0.62058115", "0.5914358", "0.5786256", "0.567148", "0.5660682", "0.5647068", "0.5647068", "0.5647068", "0.5538054", "0.5535162", "0.552078", "0.55026215", "0.55014724", "0.5472717", "0.5460176", "0.53937954", "0.53903866", "0.53837144", "0.5379981", "0.5368258", "0.5277546", "0.52617574", "0.52389354", "0.5207637", "0.51833874", "0.5155503", "0.50957876", "0.5061228", "0.50554734", "0.5045151", "0.50361615", "0.50347644", "0.50013", "0.4995145", "0.49943578", "0.49725184", "0.49689105", "0.4961025", "0.49589458", "0.49562007", "0.49139184", "0.4899288", "0.48919275", "0.4880545", "0.4876006", "0.48706418", "0.48512432", "0.48421547", "0.4836027", "0.48058188", "0.48046", "0.48020756", "0.47883162", "0.47833416", "0.477382", "0.47695637", "0.4764595", "0.47516966", "0.4725108", "0.4716228", "0.4710138", "0.4708218", "0.47008455", "0.46901906", "0.467875", "0.46705467", "0.46586326", "0.46500546", "0.46230793", "0.4619878", "0.46181476", "0.46181342", "0.4607256", "0.4603971", "0.4597397", "0.4595137", "0.45863765", "0.4583009", "0.45677462", "0.45675054", "0.45608252", "0.45541656", "0.45434585", "0.45405123", "0.45329592", "0.45298144", "0.45161837", "0.4507914", "0.45073122", "0.44982454", "0.4492808", "0.4485443", "0.44846845", "0.44749853", "0.44719183", "0.44705006", "0.44698226", "0.44688788" ]
0.50643
29
Scheme: ^(([^:/?]+):)?(//([^/?]))?([^?])(\?([^]))?((.))? __________ Authority: ^(([^:/?]+):)?(//([^/?]))?([^?])(\?([^]))?((.))? _____________
public static void parseSchemeAndAuthority( String schemeAndAuthority, IUriListener listener) { if (schemeAndAuthority == null) { schemeAndAuthority = ""; } char[] array = schemeAndAuthority.toCharArray(); parseSchemeAndAuthority(array, listener); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean initializeAuthority(String p_uriSpec) {\n \n int index = 0;\n int start = 0;\n int end = p_uriSpec.length();\n \n char testChar = '\\0';\n String userinfo = null;\n \n // userinfo is everything up to @\n if (p_uriSpec.indexOf('@', start) != -1) {\n while (index < end) {\n testChar = p_uriSpec.charAt(index);\n if (testChar == '@') {\n break;\n }\n index++;\n }\n userinfo = p_uriSpec.substring(start, index);\n index++;\n }\n \n // host is everything up to last ':', or up to \n // and including ']' if followed by ':'.\n String host = null;\n start = index;\n boolean hasPort = false;\n if (index < end) {\n if (p_uriSpec.charAt(start) == '[') {\n int bracketIndex = p_uriSpec.indexOf(']', start);\n index = (bracketIndex != -1) ? bracketIndex : end;\n if (index+1 < end && p_uriSpec.charAt(index+1) == ':') {\n ++index;\n hasPort = true;\n }\n else {\n index = end;\n }\n }\n else {\n int colonIndex = p_uriSpec.lastIndexOf(':', end);\n index = (colonIndex > start) ? colonIndex : end;\n hasPort = (index != end);\n }\n }\n host = p_uriSpec.substring(start, index);\n int port = -1;\n if (host.length() > 0) {\n // port\n if (hasPort) {\n index++;\n start = index;\n while (index < end) {\n index++;\n }\n String portStr = p_uriSpec.substring(start, index);\n if (portStr.length() > 0) {\n // REVISIT: Remove this code.\n /** for (int i = 0; i < portStr.length(); i++) {\n if (!isDigit(portStr.charAt(i))) {\n throw new MalformedURIException(\n portStr +\n \" is invalid. Port should only contain digits!\");\n }\n }**/\n // REVISIT: Remove this code.\n // Store port value as string instead of integer.\n try {\n port = Integer.parseInt(portStr);\n if (port == -1) --port;\n }\n catch (NumberFormatException nfe) {\n port = -2;\n }\n }\n }\n }\n \n if (isValidServerBasedAuthority(host, port, userinfo)) {\n m_host = host;\n m_port = port;\n m_userinfo = userinfo;\n return true;\n }\n // Note: Registry based authority is being removed from a\n // new spec for URI which would obsolete RFC 2396. If the\n // spec is added to XML errata, processing of reg_name\n // needs to be removed. - mrglavas.\n else if (isValidRegistryBasedAuthority(p_uriSpec)) {\n m_regAuthority = p_uriSpec;\n return true;\n }\n return false;\n }", "String getScheme();", "java.lang.String getScheme();", "public String getSchemeSpecificPart() {\n StringBuffer schemespec = new StringBuffer();\n \n if (m_host != null || m_regAuthority != null) {\n schemespec.append(\"//\");\n \n // Server based authority.\n if (m_host != null) {\n \n if (m_userinfo != null) {\n schemespec.append(m_userinfo);\n schemespec.append('@');\n }\n \n schemespec.append(m_host);\n \n if (m_port != -1) {\n schemespec.append(':');\n schemespec.append(m_port);\n }\n }\n // Registry based authority.\n else {\n schemespec.append(m_regAuthority);\n }\n }\n \n if (m_path != null) {\n schemespec.append((m_path));\n }\n \n if (m_queryString != null) {\n schemespec.append('?');\n schemespec.append(m_queryString);\n }\n \n if (m_fragment != null) {\n schemespec.append('#');\n schemespec.append(m_fragment);\n }\n \n return schemespec.toString();\n }", "public String getScheme() {\n return m_scheme;\n }", "@Override\r\n public String getScheme() {\r\n return scheme;\r\n }", "@Override\n public String getScheme() {\n return this.scheme;\n }", "public String getScheme() {\n return scheme;\n }", "public String getScheme() {\n return scheme;\n }", "public String getScheme() {\n return scheme;\n }", "@Override\n\t\tpublic String getScheme() {\n\t\t\treturn null;\n\t\t}", "@Nullable\n public String getScheme ()\n {\n return m_sScheme;\n }", "public void testYourFirstPartition() {\r\n\t UrlValidator urlVal = new UrlValidator(null, null, UrlValidator.ALLOW_ALL_SCHEMES);\r\n\t System.out.println(\"1st partition with a valid scheme = true: \" + urlVal.isValid(\"http://www.google.com\")); //bug here = does not account for http://\r\n System.out.println(\"1st partition with a invalid scheme = false: \" + urlVal.isValid(\"://go.a1a:65a\")); \r\n }", "@Override\n\tpublic String getScheme() {\n\t\treturn null;\n\t}", "private static boolean hasScheme(String test) {\n return schemePattern.matcher(test).matches(); \n }", "@Test\n public void schemeTest() {\n assertEquals(\"VISA_BUSINESS\", authResponse.getScheme());\n }", "private String generateSchemeAuthorityForNode(Node node, HibBranch branch) {\n\t\tString hostname = branch.getHostname();\n\t\tif (StringUtils.isEmpty(hostname)) {\n\t\t\t// Fallback to urls without authority/scheme\n\t\t\treturn \"\";\n\t\t}\n\t\tboolean isSSL = BooleanUtils.toBoolean(branch.getSsl());\n\t\tStringBuffer buffer = new StringBuffer();\n\t\tif (isSSL) {\n\t\t\tbuffer.append(\"https://\");\n\t\t} else {\n\t\t\tbuffer.append(\"http://\");\n\t\t}\n\t\tbuffer.append(branch.getHostname());\n\t\treturn buffer.toString();\n\t}", "public static com.taobao.phenix.request.SchemeInfo parse(@androidx.annotation.NonNull java.lang.String r1) {\n /*\n com.taobao.phenix.request.SchemeInfo r0 = parseLocalFile(r1)\n if (r0 != 0) goto L_0x0024\n com.taobao.phenix.request.SchemeInfo r0 = parseAssetFile(r1)\n if (r0 != 0) goto L_0x0024\n com.taobao.phenix.request.SchemeInfo r0 = parseResFile(r1)\n if (r0 != 0) goto L_0x0024\n com.taobao.phenix.request.SchemeInfo r0 = parseBase64(r1)\n if (r0 != 0) goto L_0x0024\n com.taobao.phenix.request.SchemeInfo r0 = parseLocalExtended(r1)\n if (r0 == 0) goto L_0x001f\n goto L_0x0024\n L_0x001f:\n com.taobao.phenix.request.SchemeInfo r1 = parseHttpUrl(r1)\n return r1\n L_0x0024:\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.taobao.phenix.request.SchemeInfo.parse(java.lang.String):com.taobao.phenix.request.SchemeInfo\");\n }", "private static String m39043k(Uri uri) {\n if (uri == null) {\n return null;\n }\n return uri.getScheme();\n }", "public interface HttpAuthenticationScheme<C extends AuthenticationSchemeConfiguration> {\n\n /**\n * Called one time during initialization.\n *\n * @param config The configuration.\n */\n void initialize(C config);\n\n /**\n * Extracts the credentials from the given {@link javax.servlet.http.HttpServletRequest} and populates the\n * {@link org.picketlink.credential.DefaultLoginCredentials} with them. If the request is not an authentication attempt (as defined by the\n * implementation), then {@code creds} is not affected.\n *\n * @param request\n * The current request, to examine for authentication information.\n * @param creds\n * The credentials instance that will be populated with the credentials found in the request, if any.\n */\n void extractCredential(HttpServletRequest request, DefaultLoginCredentials creds);\n\n /**\n * Challenges the client if no credentials were supplied or the credentials were not extracted in order to continue\n * with the authentication.\n *\n * @param request\n * The current request, which may be used to obtain a {@link javax.servlet.RequestDispatcher} if needed.\n * If this method is called, the rest of the filter chain will <i>not</i> be processed, so\n * implementations are free to read the request body if they so choose.\n * @param response\n * The current response, which can be used to send HTTP error results, redirects, or for sending\n * additional challenge headers.\n */\n void challengeClient(HttpServletRequest request, HttpServletResponse response);\n\n /**\n * Performs any post-authentication logic regarding of the authentication result.\n *\n * @param request\n * The current request, which may be used to obtain a {@link javax.servlet.RequestDispatcher} if needed.\n * @param response\n * The current response, which can be used to send an HTTP response, or a redirect.\n * @return true if the processing of the filter chain should continue, false if the processing should stop\n * (typically because this filter has already sent a response).\n */\n void onPostAuthentication(HttpServletRequest request, HttpServletResponse response);\n}", "public String getScheme( ) {\n\t\treturn scheme;\n\t}", "public String getSchemeSpecific() {\n return \"\";\n }", "private void initializeScheme(String p_uriSpec)\n throws MalformedURIException {\n int uriSpecLen = p_uriSpec.length();\n int index = 0;\n String scheme = null;\n char testChar = '\\0';\n \n while (index < uriSpecLen) {\n testChar = p_uriSpec.charAt(index);\n if (testChar == ':' || testChar == '/' ||\n testChar == '?' || testChar == '#') {\n break;\n }\n index++;\n }\n scheme = p_uriSpec.substring(0, index);\n \n if (scheme.length() == 0) {\n throw new MalformedURIException(\"No scheme found in URI.\");\n }\n else {\n setScheme(scheme);\n }\n }", "public final C0313a a(f fVar, String str) {\n int i;\n int a2;\n int i2;\n String str2 = str;\n int a3 = m.a(str2, 0, str.length());\n int b2 = m.b(str2, a3, str.length());\n if (b(str2, a3, b2) != -1) {\n if (str.regionMatches(true, a3, \"https:\", 0, 6)) {\n this.f26924a = \"https\";\n a3 += 6;\n } else if (!str.regionMatches(true, a3, \"http:\", 0, 5)) {\n return C0313a.UNSUPPORTED_SCHEME;\n } else {\n this.f26924a = \"http\";\n a3 += 5;\n }\n } else if (fVar == null) {\n return C0313a.MISSING_SCHEME;\n } else {\n this.f26924a = fVar.f26918b;\n }\n int c2 = c(str2, a3, b2);\n char c3 = '#';\n if (c2 >= 2 || fVar == null || !fVar.f26918b.equals(this.f26924a)) {\n int i3 = a3 + c2;\n boolean z = false;\n boolean z2 = false;\n while (true) {\n a2 = m.a(str2, i3, b2, \"@/\\\\?#\");\n char charAt = a2 != b2 ? str2.charAt(a2) : 65535;\n if (!(charAt == 65535 || charAt == c3 || charAt == '/' || charAt == '\\\\')) {\n switch (charAt) {\n case '?':\n break;\n case '@':\n if (!z) {\n int a4 = m.a(str2, i3, a2, ':');\n int i4 = a4;\n i2 = a2;\n String a5 = f.a(str, i3, a4, \" \\\"':;<=>@[]^`{}|/\\\\?#\", true, false, false, true);\n if (z2) {\n a5 = this.f26925b + \"%40\" + a5;\n }\n this.f26925b = a5;\n if (i4 != i2) {\n this.f26926c = f.a(str, i4 + 1, i2, \" \\\"':;<=>@[]^`{}|/\\\\?#\", true, false, false, true);\n z = true;\n }\n z2 = true;\n } else {\n i2 = a2;\n this.f26926c += \"%40\" + f.a(str, i3, i2, \" \\\"':;<=>@[]^`{}|/\\\\?#\", true, false, false, true);\n }\n i3 = i2 + 1;\n c3 = '#';\n continue;\n }\n }\n }\n i = a2;\n int d2 = d(str2, i3, i);\n int i5 = d2 + 1;\n if (i5 < i) {\n this.f26927d = e(str2, i3, d2);\n this.f26928e = g(str2, i5, i);\n if (this.f26928e == -1) {\n return C0313a.INVALID_PORT;\n }\n } else {\n this.f26927d = e(str2, i3, d2);\n this.f26928e = f.a(this.f26924a);\n }\n if (this.f26927d == null) {\n return C0313a.INVALID_HOST;\n }\n } else {\n this.f26925b = fVar.b();\n this.f26926c = fVar.c();\n this.f26927d = fVar.f26921e;\n this.f26928e = fVar.f26922f;\n this.f26929f.clear();\n this.f26929f.addAll(fVar.d());\n if (a3 == b2 || str2.charAt(a3) == '#') {\n a(fVar.e());\n }\n i = a3;\n }\n int a6 = m.a(str2, i, b2, \"?#\");\n a(str2, i, a6);\n if (a6 < b2 && str2.charAt(a6) == '?') {\n int a7 = m.a(str2, a6, b2, '#');\n this.g = f.b(f.a(str, a6 + 1, a7, \" \\\"'<>#\", true, false, true, true));\n a6 = a7;\n }\n if (a6 < b2 && str2.charAt(a6) == '#') {\n this.h = f.a(str, 1 + a6, b2, \"\", true, false, false, false);\n }\n return C0313a.SUCCESS;\n }", "private AuthenticationScheme basic(String string, String string2) {\n\t\treturn null;\n\t}", "com.google.protobuf.ByteString getSchemeBytes();", "public static boolean isConformantSchemeName(String p_scheme) {\n if (p_scheme == null || p_scheme.trim().length() == 0) {\n return false;\n }\n \n if (!isAlpha(p_scheme.charAt(0))) {\n return false;\n }\n \n char testChar;\n int schemeLength = p_scheme.length();\n for (int i = 1; i < schemeLength; ++i) {\n testChar = p_scheme.charAt(i);\n if (!isSchemeCharacter(testChar)) {\n return false;\n }\n }\n \n return true;\n }", "java.lang.String getAuthority();", "public static void parseSchemeAndAuthority(\n char[] schemeAndAuthority,\n IUriListener listener) {\n UriParser parser = new UriParser(listener);\n parser.parseSchemeAndAuthority(schemeAndAuthority, 0);\n }", "@Override\n public String getAuthenticationScheme() {\n return \"OAuth2\";\n }", "public void setScheme(String p_scheme) throws MalformedURIException {\n if (p_scheme == null) {\n throw new MalformedURIException(\n \"Cannot set scheme from null string!\");\n }\n if (!isConformantSchemeName(p_scheme)) {\n throw new MalformedURIException(\"The scheme is not conformant.\");\n }\n \n m_scheme = p_scheme.toLowerCase();\n }", "public final boolean mo50006a(C18846s sVar) {\n String scheme = sVar.f50794d.getScheme();\n if (WebKitApi.SCHEME_HTTP.equals(scheme) || WebKitApi.SCHEME_HTTPS.equals(scheme)) {\n return true;\n }\n return false;\n }", "List<SecurityScheme> securitySchemes();", "String getUrlPattern();", "public java.lang.String getCodingSchemeURI() {\n return codingSchemeURI;\n }", "SecurityScheme createSecurityScheme();", "public String getSchemeName() {\n return \"basic\";\n }", "private boolean isValidRegistryBasedAuthority(String authority) {\n int index = 0;\n int end = authority.length();\n char testChar;\n \n while (index < end) {\n testChar = authority.charAt(index);\n \n // check for valid escape sequence\n if (testChar == '%') {\n if (index+2 >= end ||\n !isHex(authority.charAt(index+1)) ||\n !isHex(authority.charAt(index+2))) {\n return false;\n }\n index += 2;\n }\n // can check against path characters because the set\n // is the same except for '/' which we've already excluded.\n else if (!isPathCharacter(testChar)) {\n return false;\n }\n ++index;\n }\n return true;\n }", "private void initialize(URI p_base, String p_uriSpec)\n throws MalformedURIException {\n \n String uriSpec = p_uriSpec;\n int uriSpecLen = (uriSpec != null) ? uriSpec.length() : 0;\n \n if (p_base == null && uriSpecLen == 0) {\n throw new MalformedURIException(\n \"Cannot initialize URI with empty parameters.\");\n }\n \n // just make a copy of the base if spec is empty\n if (uriSpecLen == 0) {\n initialize(p_base);\n return;\n }\n \n int index = 0;\n \n // Check for scheme, which must be before '/', '?' or '#'. Also handle\n // names with DOS drive letters ('D:'), so 1-character schemes are not\n // allowed.\n int colonIdx = uriSpec.indexOf(':');\n if (colonIdx != -1) {\n final int searchFrom = colonIdx - 1;\n // search backwards starting from character before ':'.\n int slashIdx = uriSpec.lastIndexOf('/', searchFrom);\n int queryIdx = uriSpec.lastIndexOf('?', searchFrom);\n int fragmentIdx = uriSpec.lastIndexOf('#', searchFrom);\n \n if (colonIdx < 2 || slashIdx != -1 || \n queryIdx != -1 || fragmentIdx != -1) {\n // A standalone base is a valid URI according to spec\n if (colonIdx == 0 || (p_base == null && fragmentIdx != 0)) {\n throw new MalformedURIException(\"No scheme found in URI.\");\n }\n }\n else {\n initializeScheme(uriSpec);\n index = m_scheme.length()+1;\n \n // Neither 'scheme:' or 'scheme:#fragment' are valid URIs.\n if (colonIdx == uriSpecLen - 1 || uriSpec.charAt(colonIdx+1) == '#') {\n throw new MalformedURIException(\"Scheme specific part cannot be empty.\"); \n }\n }\n }\n else if (p_base == null && uriSpec.indexOf('#') != 0) {\n throw new MalformedURIException(\"No scheme found in URI.\"); \n }\n \n // Two slashes means we may have authority, but definitely means we're either\n // matching net_path or abs_path. These two productions are ambiguous in that\n // every net_path (except those containing an IPv6Reference) is an abs_path. \n // RFC 2396 resolves this ambiguity by applying a greedy left most matching rule. \n // Try matching net_path first, and if that fails we don't have authority so \n // then attempt to match abs_path.\n //\n // net_path = \"//\" authority [ abs_path ]\n // abs_path = \"/\" path_segments\n if (((index+1) < uriSpecLen) &&\n (uriSpec.charAt(index) == '/' && uriSpec.charAt(index+1) == '/')) {\n index += 2;\n int startPos = index;\n \n // Authority will be everything up to path, query or fragment\n char testChar = '\\0';\n while (index < uriSpecLen) {\n testChar = uriSpec.charAt(index);\n if (testChar == '/' || testChar == '?' || testChar == '#') {\n break;\n }\n index++;\n }\n \n // Attempt to parse authority. If the section is an empty string\n // this is a valid server based authority, so set the host to this\n // value.\n if (index > startPos) {\n // If we didn't find authority we need to back up. Attempt to\n // match against abs_path next.\n if (!initializeAuthority(uriSpec.substring(startPos, index))) {\n index = startPos - 2;\n }\n }\n else {\n m_host = \"\";\n }\n }\n \n initializePath(uriSpec, index);\n \n // Resolve relative URI to base URI - see RFC 2396 Section 5.2\n // In some cases, it might make more sense to throw an exception\n // (when scheme is specified is the string spec and the base URI\n // is also specified, for example), but we're just following the\n // RFC specifications\n if (p_base != null) {\n \n // check to see if this is the current doc - RFC 2396 5.2 #2\n // note that this is slightly different from the RFC spec in that\n // we don't include the check for query string being null\n // - this handles cases where the urispec is just a query\n // string or a fragment (e.g. \"?y\" or \"#s\") -\n // see <http://www.ics.uci.edu/~fielding/url/test1.html> which\n // identified this as a bug in the RFC\n if (m_path.length() == 0 && m_scheme == null &&\n m_host == null && m_regAuthority == null) {\n m_scheme = p_base.getScheme();\n m_userinfo = p_base.getUserinfo();\n m_host = p_base.getHost();\n m_port = p_base.getPort();\n m_regAuthority = p_base.getRegBasedAuthority();\n m_path = p_base.getPath();\n \n if (m_queryString == null) {\n m_queryString = p_base.getQueryString();\n }\n return;\n }\n \n // check for scheme - RFC 2396 5.2 #3\n // if we found a scheme, it means absolute URI, so we're done\n if (m_scheme == null) {\n m_scheme = p_base.getScheme();\n }\n else {\n return;\n }\n \n // check for authority - RFC 2396 5.2 #4\n // if we found a host, then we've got a network path, so we're done\n if (m_host == null && m_regAuthority == null) {\n m_userinfo = p_base.getUserinfo();\n m_host = p_base.getHost();\n m_port = p_base.getPort();\n m_regAuthority = p_base.getRegBasedAuthority();\n }\n else {\n return;\n }\n \n // check for absolute path - RFC 2396 5.2 #5\n if (m_path.length() > 0 &&\n m_path.startsWith(\"/\")) {\n return;\n }\n \n // if we get to this point, we need to resolve relative path\n // RFC 2396 5.2 #6\n String path = \"\";\n String basePath = p_base.getPath();\n \n // 6a - get all but the last segment of the base URI path\n if (basePath != null && basePath.length() > 0) {\n int lastSlash = basePath.lastIndexOf('/');\n if (lastSlash != -1) {\n path = basePath.substring(0, lastSlash+1);\n }\n }\n else if (m_path.length() > 0) {\n path = \"/\";\n }\n \n // 6b - append the relative URI path\n path = path.concat(m_path);\n \n // 6c - remove all \"./\" where \".\" is a complete path segment\n index = -1;\n while ((index = path.indexOf(\"/./\")) != -1) {\n path = path.substring(0, index+1).concat(path.substring(index+3));\n }\n \n // 6d - remove \".\" if path ends with \".\" as a complete path segment\n if (path.endsWith(\"/.\")) {\n path = path.substring(0, path.length()-1);\n }\n \n // 6e - remove all \"<segment>/../\" where \"<segment>\" is a complete\n // path segment not equal to \"..\"\n index = 1;\n int segIndex = -1;\n String tempString = null;\n \n while ((index = path.indexOf(\"/../\", index)) > 0) {\n tempString = path.substring(0, path.indexOf(\"/../\"));\n segIndex = tempString.lastIndexOf('/');\n if (segIndex != -1) {\n if (!tempString.substring(segIndex).equals(\"..\")) {\n path = path.substring(0, segIndex+1).concat(path.substring(index+4));\n index = segIndex;\n }\n else\n index += 4;\n }\n else\n index += 4;\n }\n \n // 6f - remove ending \"<segment>/..\" where \"<segment>\" is a\n // complete path segment\n if (path.endsWith(\"/..\")) {\n tempString = path.substring(0, path.length()-3);\n segIndex = tempString.lastIndexOf('/');\n if (segIndex != -1) {\n path = path.substring(0, segIndex+1);\n }\n }\n m_path = path;\n }\n }", "public java.lang.Short getUriScheme() {\r\n return uriScheme;\r\n }", "private Boolean hashttp(String s)// checks if url entered has http:// on it\n {\n return s.contains(\"http://\") || s.contains(\"https://\");\n }", "private String parsingURL(String requestURL) {\n\t\tint pos = 0;\n\t\tif (requestURL.startsWith(\"http://\")) {\n\t\t\tpos = \"http://\".length();\n\t\t}\n\t\telse {\n\t\t\tpos = \"https://\".length();\n\t\t}\n\t\t\n\t\tint pos2 = requestURL.indexOf(\":\", pos);\n\t\tif (pos2 < 0) {\n\t\t\tpos2 = requestURL.length();\n\t\t}\n\t\t\n\t\tint pos3 = requestURL.indexOf(\"/\", pos);\n\t\tif (pos3 < 0) {\n\t\t\tpos3 = requestURL.length();\n\t\t}\n\t\t\n\t\tpos2 = Math.min(pos2, pos3);\n\t\t\n\t\tString host = requestURL.substring(pos, pos2);\n\t\t/**\n\t\t * parsing request url\n\t\t */\n\t\treturn host;\n\t}", "SecuritySchemeLibrary createSecuritySchemeLibrary();", "public static boolean m18365a(String str) {\n return str != null && (str.startsWith(\"http://\") || str.startsWith(\"https://\"));\n }", "public String fixForScheme(String url) {\n\t\tStringBuffer returnUrl = new StringBuffer(url);\n\t\tif(StringUtils.contains(url, \"returnurl=\"))\n\t\t{\n\t\t\treturnUrl = new StringBuffer(StringUtils.substring(url,0, \n\t\t\t\t\tStringUtils.indexOf(url, \"returnurl=\")));\n\t\t\t\n\t\t\treturnUrl.append(\"returnurl=\");\n\t\t\tString returnurl = StringUtils.substring(url, \n\t\t\t\t\tStringUtils.indexOf(url, \"returnurl=\")+10);\n\t\t\t\n\t\t\ttry {\n\t\t\t\treturnUrl.append(URLEncoder.encode(new String(Base64.encodeBase64(returnurl.getBytes())),\"UTF-8\"));\n\t\t\t} catch (UnsupportedEncodingException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn returnUrl.toString();\n\t}", "public abstract void validateScheme(Scheme scheme);", "public com.google.protobuf.ByteString getSchemeBytes() {\n java.lang.Object ref = scheme_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);\n scheme_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public void setUriScheme(java.lang.Short uriScheme) {\r\n this.uriScheme = uriScheme;\r\n }", "private static String authorityFromHostAndPort(String host, int port) {\n try {\n return new URI(null, null, host, port, null, null, null).getAuthority();\n } catch (URISyntaxException ex) {\n throw new IllegalArgumentException(\"Invalid host or port: \" + host + \" \" + port, ex);\n }\n }", "public Builder setScheme(java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n scheme_ = value;\n bitField0_ |= 0x00000001;\n onChanged();\n return this;\n }", "protected void parseURL(URL paramURL, String paramString, int paramInt1, int paramInt2) {\n/* 126 */ String str1 = paramURL.getProtocol();\n/* 127 */ String str2 = paramURL.getAuthority();\n/* 128 */ String str3 = paramURL.getUserInfo();\n/* 129 */ String str4 = paramURL.getHost();\n/* 130 */ int i = paramURL.getPort();\n/* 131 */ String str5 = paramURL.getPath();\n/* 132 */ String str6 = paramURL.getQuery();\n/* */ \n/* */ \n/* 135 */ String str7 = paramURL.getRef();\n/* */ \n/* 137 */ boolean bool1 = false;\n/* 138 */ boolean bool2 = false;\n/* */ \n/* */ \n/* */ \n/* 142 */ if (paramInt1 < paramInt2) {\n/* 143 */ int k = paramString.indexOf('?');\n/* 144 */ bool2 = (k == paramInt1) ? true : false;\n/* 145 */ if (k != -1 && k < paramInt2) {\n/* 146 */ str6 = paramString.substring(k + 1, paramInt2);\n/* 147 */ if (paramInt2 > k)\n/* 148 */ paramInt2 = k; \n/* 149 */ paramString = paramString.substring(0, k);\n/* */ } \n/* */ } \n/* */ \n/* 153 */ int j = 0;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 159 */ boolean bool3 = (paramInt1 <= paramInt2 - 4 && paramString.charAt(paramInt1) == '/' && paramString.charAt(paramInt1 + 1) == '/' && paramString.charAt(paramInt1 + 2) == '/' && paramString.charAt(paramInt1 + 3) == '/') ? true : false;\n/* 160 */ if (!bool3 && paramInt1 <= paramInt2 - 2 && paramString.charAt(paramInt1) == '/' && paramString\n/* 161 */ .charAt(paramInt1 + 1) == '/') {\n/* 162 */ paramInt1 += 2;\n/* 163 */ j = paramString.indexOf('/', paramInt1);\n/* 164 */ if (j < 0 || j > paramInt2) {\n/* 165 */ j = paramString.indexOf('?', paramInt1);\n/* 166 */ if (j < 0 || j > paramInt2) {\n/* 167 */ j = paramInt2;\n/* */ }\n/* */ } \n/* 170 */ str4 = str2 = paramString.substring(paramInt1, j);\n/* */ \n/* 172 */ int k = str2.indexOf('@');\n/* 173 */ if (k != -1) {\n/* 174 */ if (k != str2.lastIndexOf('@')) {\n/* */ \n/* 176 */ str3 = null;\n/* 177 */ str4 = null;\n/* */ } else {\n/* 179 */ str3 = str2.substring(0, k);\n/* 180 */ str4 = str2.substring(k + 1);\n/* */ } \n/* */ } else {\n/* 183 */ str3 = null;\n/* */ } \n/* 185 */ if (str4 != null) {\n/* */ \n/* */ \n/* 188 */ if (str4.length() > 0 && str4.charAt(0) == '[') {\n/* 189 */ if ((k = str4.indexOf(']')) > 2) {\n/* */ \n/* 191 */ String str = str4;\n/* 192 */ str4 = str.substring(0, k + 1);\n/* */ \n/* 194 */ if (!IPAddressUtil.isIPv6LiteralAddress(str4.substring(1, k))) {\n/* 195 */ throw new IllegalArgumentException(\"Invalid host: \" + str4);\n/* */ }\n/* */ \n/* */ \n/* 199 */ i = -1;\n/* 200 */ if (str.length() > k + 1) {\n/* 201 */ if (str.charAt(k + 1) == ':') {\n/* 202 */ k++;\n/* */ \n/* 204 */ if (str.length() > k + 1) {\n/* 205 */ i = Integer.parseInt(str.substring(k + 1));\n/* */ }\n/* */ } else {\n/* 208 */ throw new IllegalArgumentException(\"Invalid authority field: \" + str2);\n/* */ } \n/* */ }\n/* */ } else {\n/* */ \n/* 213 */ throw new IllegalArgumentException(\"Invalid authority field: \" + str2);\n/* */ } \n/* */ } else {\n/* */ \n/* 217 */ k = str4.indexOf(':');\n/* 218 */ i = -1;\n/* 219 */ if (k >= 0) {\n/* */ \n/* 221 */ if (str4.length() > k + 1) {\n/* 222 */ i = Integer.parseInt(str4.substring(k + 1));\n/* */ }\n/* 224 */ str4 = str4.substring(0, k);\n/* */ } \n/* */ } \n/* */ } else {\n/* 228 */ str4 = \"\";\n/* */ } \n/* 230 */ if (i < -1) {\n/* 231 */ throw new IllegalArgumentException(\"Invalid port number :\" + i);\n/* */ }\n/* 233 */ paramInt1 = j;\n/* */ \n/* */ \n/* 236 */ if (str2 != null && str2.length() > 0) {\n/* 237 */ str5 = \"\";\n/* */ }\n/* */ } \n/* 240 */ if (str4 == null) {\n/* 241 */ str4 = \"\";\n/* */ }\n/* */ \n/* */ \n/* 245 */ if (paramInt1 < paramInt2) {\n/* 246 */ if (paramString.charAt(paramInt1) == '/') {\n/* 247 */ str5 = paramString.substring(paramInt1, paramInt2);\n/* 248 */ } else if (str5 != null && str5.length() > 0) {\n/* 249 */ bool1 = true;\n/* 250 */ int k = str5.lastIndexOf('/');\n/* 251 */ String str = \"\";\n/* 252 */ if (k == -1 && str2 != null) {\n/* 253 */ str = \"/\";\n/* */ }\n/* 255 */ str5 = str5.substring(0, k + 1) + str + paramString.substring(paramInt1, paramInt2);\n/* */ } else {\n/* */ \n/* 258 */ String str = (str2 != null) ? \"/\" : \"\";\n/* 259 */ str5 = str + paramString.substring(paramInt1, paramInt2);\n/* */ } \n/* 261 */ } else if (bool2 && str5 != null) {\n/* 262 */ int k = str5.lastIndexOf('/');\n/* 263 */ if (k < 0)\n/* 264 */ k = 0; \n/* 265 */ str5 = str5.substring(0, k) + \"/\";\n/* */ } \n/* 267 */ if (str5 == null) {\n/* 268 */ str5 = \"\";\n/* */ }\n/* 270 */ if (bool1) {\n/* */ \n/* 272 */ while ((j = str5.indexOf(\"/./\")) >= 0) {\n/* 273 */ str5 = str5.substring(0, j) + str5.substring(j + 2);\n/* */ }\n/* */ \n/* 276 */ j = 0;\n/* 277 */ while ((j = str5.indexOf(\"/../\", j)) >= 0) {\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 284 */ if (j > 0 && (paramInt2 = str5.lastIndexOf('/', j - 1)) >= 0 && str5\n/* 285 */ .indexOf(\"/../\", paramInt2) != 0) {\n/* 286 */ str5 = str5.substring(0, paramInt2) + str5.substring(j + 3);\n/* 287 */ j = 0; continue;\n/* */ } \n/* 289 */ j += 3;\n/* */ } \n/* */ \n/* */ \n/* */ \n/* 294 */ j = str5.indexOf(\"/..\");\n/* 295 */ while (str5.endsWith(\"/..\") && (paramInt2 = str5.lastIndexOf('/', j - 1)) >= 0) {\n/* 296 */ str5 = str5.substring(0, paramInt2 + 1);\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* 302 */ if (str5.startsWith(\"./\") && str5.length() > 2) {\n/* 303 */ str5 = str5.substring(2);\n/* */ }\n/* */ \n/* 306 */ if (str5.endsWith(\"/.\")) {\n/* 307 */ str5 = str5.substring(0, str5.length() - 1);\n/* */ }\n/* */ } \n/* 310 */ setURL(paramURL, str1, str4, i, str2, str3, str5, str6, str7);\n/* */ }", "private boolean verifyUrlFormat( String editorUrl )\n {\n if ( null == editorUrl )\n return false;\n String normalized = editorUrl.replace('\\\\', '/');\n if ( !normalized.startsWith(CE_URL_PREFIX))\n return false;\n normalized = normalized.substring(3);\n int pos = normalized.indexOf(\"/\");\n if ( pos < 0 )\n return false;\n normalized = normalized.substring(pos+1);\n pos = normalized.indexOf(\"/\");\n if ( pos >= 0 )\n return false;\n return true;\n }", "public interface SchemesProvider {\n void requestSchemeData(String access_token, boolean language, OnSchemesRecieved onSchemesRecieved);\n}", "public static boolean hasScheme(URI uri, String... schemes) {\r\n final String scheme = uri.getScheme();\r\n for (final String sch : schemes) {\r\n if (scheme == null) {\r\n if (sch == null) {\r\n return true;\r\n }\r\n } else if (scheme.equalsIgnoreCase(sch)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "private boolean m14041a() {\n return this.f12187c.startsWith(\"https://\");\n }", "public void setCodingSchemeURI(java.lang.String codingSchemeURI) {\n this.codingSchemeURI = codingSchemeURI;\n }", "ImmutableSet<Scheme> getSchemes(String type);", "private boolean isValidServerBasedAuthority(String host, int port, String userinfo) {\n \n // Check if the host is well formed.\n if (!isWellFormedAddress(host)) {\n return false;\n }\n \n // Check that port is well formed if it exists.\n // REVISIT: There's no restriction on port value ranges, but\n // perform the same check as in setPort to be consistent. Pass\n // in a string to this method instead of an integer.\n if (port < -1 || port > 65535) {\n return false;\n }\n \n // Check that userinfo is well formed if it exists.\n if (userinfo != null) {\n // Userinfo can contain alphanumerics, mark characters, escaped\n // and ';',':','&','=','+','$',','\n int index = 0;\n int end = userinfo.length();\n char testChar = '\\0';\n while (index < end) {\n testChar = userinfo.charAt(index);\n if (testChar == '%') {\n if (index+2 >= end ||\n !isHex(userinfo.charAt(index+1)) ||\n !isHex(userinfo.charAt(index+2))) {\n return false;\n }\n index += 2;\n }\n else if (!isUserinfoCharacter(testChar)) {\n return false;\n }\n ++index;\n }\n }\n return true;\n }", "public static ChallengeRequest parseRequest(String header) {\r\n ChallengeRequest result = null;\r\n \r\n if (header != null) {\r\n int space = header.indexOf(' ');\r\n \r\n if (space != -1) {\r\n String scheme = header.substring(0, space);\r\n String realm = header.substring(space + 1);\r\n int equals = realm.indexOf('=');\r\n String realmValue = realm.substring(equals + 2,\r\n realm.length() - 1);\r\n result = new ChallengeRequest(new ChallengeScheme(\"HTTP_\"\r\n + scheme, scheme), realmValue);\r\n }\r\n }\r\n \r\n return result;\r\n }", "private void parseProtocol(String protocol) {\n try (Scanner sc = new Scanner(protocol)) {\n //parse first line\n this.method = Method.valueOf(sc.next());\n this.url = sc.next();\n String httpVersion = sc.next();\n this.version = Double.parseDouble(httpVersion.substring(5));\n\n while (sc.hasNext(\".+:\")) {\n String header = sc.next();\n header = header.substring(0, header.indexOf(':'));\n String value = sc.next() + sc.nextLine();\n this.headings.put(header, value);\n }\n }\n\n }", "Uri getJurisdiction();", "@java.lang.Override\n public com.google.protobuf.ByteString getSchemeBytes() {\n java.lang.Object ref = scheme_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);\n scheme_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public java.lang.String getProxyScheme()\r\n {\r\n return proxyScheme;\r\n }", "public void setScheme(String newValue);", "List<SecuritySchemeRef> securedBy();", "Set<Scheme> getSchemes();", "public C7391aa getScheme() {\n return new C7391aa(null);\n }", "@Test\n public void testIsValidAuthorityPositiveInList() throws MalformedURLException {\n final FileMockContext context = new FileMockContext(androidx.test.platform.app.InstrumentationRegistry.getInstrumentation().getContext());\n final Discovery discovery = new Discovery(context);\n\n final URL endpointFull = new URL(\"https://login.windows.net/common/oauth2/authorize\");\n try {\n discovery.validateAuthority(endpointFull);\n } catch (final AuthenticationException e) {\n fail(\"unexpected exception. \");\n }\n\n final URL endpointInstanceRight = new URL(\"https://login.windows.net/something/something\");\n try {\n discovery.validateAuthority(endpointInstanceRight);\n } catch (final AuthenticationException e) {\n fail(\"unexpected exception.\");\n }\n\n final URL endpointInstanceOnly = new URL(\"https://login.windows.net\");\n try {\n discovery.validateAuthority(endpointInstanceOnly);\n } catch (final AuthenticationException e) {\n assertNotNull(e);\n assertTrue(e.getCode() == ADALError.DEVELOPER_AUTHORITY_IS_NOT_VALID_INSTANCE);\n }\n }", "public java.lang.String getPartyIdScheme(\n ) {\n return this._partyIdScheme;\n }", "public void testYourFirstPartition()\n {\n //instantiate the validator \n UrlValidator urlVal = new UrlValidator(null, null, UrlValidator.ALLOW_ALL_SCHEMES);\n \n //build the url to test from random valid parts\n String url = \"\";\n Random rand = new Random();\n int scheme = rand.nextInt(validScheme.length);\n int auth = rand.nextInt(validAuthority.length);\n url = validScheme[scheme] + validAuthority[auth];\n \n //1 in 4 chance of adding a port number to the string\n if(rand.nextInt(4) == 3)\n {\n int port = rand.nextInt(65536);//port number ranges 0-65535\n //url = url + \"/:\" + port;\n url = url + \":\" + port;\n }\n\n //print out the url and test if valid\n System.out.print(url + \" : \");\n\t System.out.println(urlVal.isValid(url));\n \n }", "public interface HeadUri {\n\n\tString ROOT = \"/\";\n\n\tString CONNECT = \"/connect\";\n\n\tString PUSH = \"/push\";\n\n}", "private Protocol getProtocol(String scheme) {\r\n Protocol protocol = Protocol.valueOf(scheme);\r\n if (protocol == null) {\r\n protocol = new Protocol(scheme);\r\n }\r\n return protocol;\r\n }", "public C7397ag getScheme() {\n return new C7397ag(null);\n }", "public java.lang.String getScheme() {\n java.lang.Object ref = scheme_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n scheme_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public boolean isUri(String obj) {\r\n//\t\treturn obj.matches(\"(([a-zA-Z][0-9a-zA-Z+\\\\\\\\-\\\\\\\\.]*:)?/{0,2}[0-9a-zA-Z;/?:@&=+$\\\\\\\\.\\\\\\\\-_!~*'()%]+)?(#[0-9a-zA-Z;/?:@&=+$\\\\\\\\.\\\\\\\\-_!~*'()%]+)?\");\r\n\t\treturn false;\r\n\t}", "public String getAuthority () throws java.io.IOException, com.linar.jintegra.AutomationException;", "protected static URI getAuthServiceUri() {\n if (authServiceUrl == null || authServiceUrl.toString().isEmpty() || authServiceUrl.toString()\n .equals(\"?\")) {\n Console console = System.console();\n if (console != null) {\n try {\n authServiceUrl = new URI(console.readLine(\"Anaplan Auth-Service URL:\"));\n } catch (URISyntaxException e) {\n throw new AnaplanAPIException(\"Unable to parse Auth-Service URI: \", e);\n }\n } else {\n throw new UnsupportedOperationException(\"Auth-Service URL must be specified!\");\n }\n }\n return authServiceUrl;\n }", "public boolean setHeaders(HttpURLConnection paramHttpURLConnection, HeaderParser paramHeaderParser, String paramString) {\n/* */ String str2;\n/* 296 */ this.params.setNonce(paramHeaderParser.findValue(\"nonce\"));\n/* 297 */ this.params.setOpaque(paramHeaderParser.findValue(\"opaque\"));\n/* 298 */ this.params.setQop(paramHeaderParser.findValue(\"qop\"));\n/* */ \n/* 300 */ String str1 = \"\";\n/* */ \n/* 302 */ if (this.type == 'p' && paramHttpURLConnection\n/* 303 */ .tunnelState() == HttpURLConnection.TunnelState.SETUP) {\n/* 304 */ str1 = HttpURLConnection.connectRequestURI(paramHttpURLConnection.getURL());\n/* 305 */ str2 = HttpURLConnection.HTTP_CONNECT;\n/* */ } else {\n/* */ try {\n/* 308 */ str1 = paramHttpURLConnection.getRequestURI();\n/* 309 */ } catch (IOException iOException) {}\n/* 310 */ str2 = paramHttpURLConnection.getMethod();\n/* */ } \n/* */ \n/* 313 */ if (this.params.nonce == null || this.authMethod == null || this.pw == null || this.realm == null) {\n/* 314 */ return false;\n/* */ }\n/* 316 */ if (this.authMethod.length() >= 1)\n/* */ {\n/* */ \n/* */ \n/* 320 */ this\n/* 321 */ .authMethod = Character.toUpperCase(this.authMethod.charAt(0)) + this.authMethod.substring(1).toLowerCase();\n/* */ }\n/* 323 */ String str3 = paramHeaderParser.findValue(\"algorithm\");\n/* 324 */ if (str3 == null || \"\".equals(str3)) {\n/* 325 */ str3 = \"MD5\";\n/* */ }\n/* 327 */ this.params.setAlgorithm(str3);\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 333 */ if (this.params.authQop()) {\n/* 334 */ this.params.setNewCnonce();\n/* */ }\n/* */ \n/* 337 */ String str4 = getHeaderValueImpl(str1, str2);\n/* 338 */ if (str4 != null) {\n/* 339 */ paramHttpURLConnection.setAuthenticationProperty(getHeaderName(), str4);\n/* 340 */ return true;\n/* */ } \n/* 342 */ return false;\n/* */ }", "Scheme getScheme(String id);", "private String getUrlHost(String url) {\n // httpx://host/.....\n\n int hostStart = url.indexOf(\"//\");\n if (hostStart == -1) {\n return \"\";\n }\n int hostEnd = url.indexOf(\"/\", hostStart + 2);\n if (hostEnd == -1) {\n return url.substring(hostStart + 2);\n } else {\n return url.substring(hostStart + 2, hostEnd);\n }\n\n }", "public interface Patterns {\n String LOGIN = \"[a-zA-Z0-9]+\";\n String PASSWORD = \"[a-zA-Z0-9.-]+\";\n String EMAIL = \"[a-zA-Z0-9.-@]+\";\n}", "private URI checkUri(final URI uri) {\n // non-null URI\n Utils.nonNull(uri, () -> \"null URI\");\n // non-null authority\n Utils.nonNull(uri.getAuthority(),\n () -> String.format(\"%s requires URI with authority: invalid %s\", this, uri));\n // check the scheme (sanity check)\n if (!getScheme().equalsIgnoreCase(uri.getScheme())) {\n throw new ProviderMismatchException(String.format(\"Invalid scheme for %s: %s\",\n this, uri.getScheme()));\n }\n return uri;\n }", "protected String getAuthority() {\n return \"com.activeharmony.content.ContentProvider\";\n }", "public static void parseURL(PURL u, String spec, int start, int limit) {\n // These fields may receive context content if this was relative URL\n String protocol = u.getProtocol();\n String authority = u.getAuthority(); \n String userInfo = u.getUserInfo();\n String host = u.getHost();\n int port = u.getPort();\n String path = u.getPath();\n\tString query = u.getQuery();\n\n // This field has already been parsed\n String ref = u.getRef();\n\n\tboolean isRelPath = false;\n\tboolean queryOnly = false;\n\n// FIX: should not assume query if opaque\n // Strip off the query part\n\tif (start < limit) {\n int queryStart = spec.indexOf('?');\n queryOnly = queryStart == start;\n if ((queryStart != -1) && (queryStart < limit)) {\n query = spec.substring(queryStart+1, limit);\n if (limit > queryStart)\n limit = queryStart;\n spec = spec.substring(0, queryStart);\n }\n\t}\n\n\tint i = 0;\n // Parse the authority part if any\n\tif ((start <= limit - 2) && (spec.charAt(start) == '/') &&\n\t (spec.charAt(start + 1) == '/')) {\n\t start += 2;\n\t i = spec.indexOf('/', start);\n if (i < 0) {\n\t i = spec.indexOf('?', start);\n\t\tif (i < 0)\n i = limit;\n\t }\n\n host = authority = spec.substring(start, i);\n\n int ind = authority.indexOf('@');\n if (ind != -1) {\n userInfo = authority.substring(0, ind);\n host = authority.substring(ind+1);\n\t } else {\n\t\tuserInfo = null;\n\t }\n\t if (host != null) {\n\t\t// If the host is surrounded by [ and ] then its an IPv6 \n\t\t// literal address as specified in RFC2732\n\t\tif (host.length()>0 && (host.charAt(0) == '[')) {\n\t\t //PURLStreamHandler has been modified - it does not\n\t\t //handle IPV6 addresses\n\t\t //this is an ipv6 address\n\n\t\t throw new Error(\"Can't handle IPv6 addresses!\");\n\n\t\t} else {\n\t\t ind = host.indexOf(':');\n\t\t port = -1;\n\t\t if (ind >= 0) {\n\t\t\t// port can be null according to RFC2396\n\t\t\tif (host.length() > (ind + 1)) {\n\t\t\t port = Integer.parseInt(host.substring(ind + 1));\n\t\t\t}\n\t\t\thost = host.substring(0, ind);\n\t\t }\n\t\t}\n\t } else {\n\t\thost = \"\";\n\t }\n\t if (port < -1)\n\t\tthrow new IllegalArgumentException(\"Invalid port number :\" +\n\t\t\t\t\t\t port);\n\t start = i;\n\t // If the authority is defined then the path is defined by the\n // spec only; See RFC 2396 Section 5.2.4.\n if (authority != null && authority.length() > 0)\n path = \"\";\n\t} \n\n \tif (host == null) {\n \t host = \"\";\n \t}\n\n // Parse the file path if any\n\tif (start < limit) {\n\t if (spec.charAt(start) == '/') {\n\t\tpath = spec.substring(start, limit);\n\t } else if (path != null && path.length() > 0) {\n\t\tisRelPath = true;\n\t\tint ind = path.lastIndexOf('/');\n\t\tString seperator = \"\";\n\t\tif (ind == -1 && authority != null)\n\t\t seperator = \"/\";\n\t\tpath = path.substring(0, ind + 1) + seperator +\n\t\t spec.substring(start, limit);\n\t\t\t\t\t\n\t } else {\n\t\tString seperator = (authority != null) ? \"/\" : \"\";\n\t\tpath = seperator + spec.substring(start, limit);\n\t }\n\t} else if (queryOnly && path != null) {\n int ind = path.lastIndexOf('/');\n if (ind < 0)\n ind = 0;\n path = path.substring(0, ind) + \"/\";\n }\n\tif (path == null)\n\t path = \"\";\n\n\tif (isRelPath) {\n // Remove embedded /./\n while ((i = path.indexOf(\"/./\")) >= 0) {\n\t path = path.substring(0, i) + path.substring(i + 2);\n\t }\n // Remove embedded /../ if possible\n\t i = 0;\n\t while ((i = path.indexOf(\"/../\", i)) > 0) {\n\t if ((limit = path.lastIndexOf('/', i - 1)) >= 0) {\n\t\t path = path.substring(0, limit) + path.substring(i + 3);\n\t\t i = 0;\n\t } else {\n\t\t i = i + 3;\n\t\t}\n\t }\n // Remove trailing .. if possible\n while (path.endsWith(\"/..\")) {\n i = path.indexOf(\"/..\");\n\t if ((limit = path.lastIndexOf('/', i - 1)) >= 0) {\n\t\t path = path.substring(0, limit+1);\n\t } else {\n\t\t break;\n\t\t}\n\t }\n\t // Remove starting .\n if (path.startsWith(\"./\") && path.length() > 2)\n path = path.substring(2);\n\n // Remove trailing .\n if (path.endsWith(\"/.\"))\n path = path.substring(0, path.length() -1);\n\t}\n\n\tsetURL(u, protocol, host, port, authority, userInfo, path, query, ref);\n }", "public static void main(String args[]){\n String pattern = \"/^(http(s)?(:\\\\/\\\\/))?(www\\\\.)?\\\\.(\\\\/.*)?$/\";\r\n String input = \"(http://www.archive.com/web/http://www.mrvc.indianrai.gov.in/overview)\";\r\n\r\n Matcher matcher = Pattern.compile(pattern).matcher(input);\r\n while (matcher.find()) {\r\n System.out.println(matcher.group());\r\n int start = matcher.start(1);\r\n int end = matcher.end(1);\r\n String result = input.substring(start,end).replaceFirst(\"www.\",\"\");\r\n if(result.startsWith(\"www.\") ){\r\n input.substring(start,end).replaceFirst(\"www.\",\"\");\r\n }else if(result.startsWith(\"ww2.\")){\r\n input.substring(start,end).replaceFirst(\"ww2.\",\"\");\r\n }else if(result.startsWith(\"web.\")){\r\n input.substring(start,end).replaceFirst(\"web.\",\"\");\r\n }\r\n System.out.println(result);\r\n\r\n }\r\n }", "@java.lang.Override\n public java.lang.String getScheme() {\n java.lang.Object ref = scheme_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n scheme_ = s;\n return s;\n }\n }", "private static boolean isURIString(String p_uric) {\n if (p_uric == null) {\n return false;\n }\n int end = p_uric.length();\n char testChar = '\\0';\n for (int i = 0; i < end; i++) {\n testChar = p_uric.charAt(i);\n if (testChar == '%') {\n if (i+2 >= end ||\n !isHex(p_uric.charAt(i+1)) ||\n !isHex(p_uric.charAt(i+2))) {\n return false;\n }\n else {\n i += 2;\n continue;\n }\n }\n if (isURICharacter(testChar)) {\n continue;\n }\n else {\n return false;\n }\n }\n return true;\n }", "@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 }", "public static OPDSAuthenticationPatternMapped parse(\n final URI file,\n final InputStream stream)\n throws IOException, ParseException\n {\n Objects.requireNonNull(file, \"file\");\n Objects.requireNonNull(stream, \"stream\");\n\n final List<OPDSMatchingAuthentication> patterns = new ArrayList<>(8);\n try (var reader =\n new BufferedReader(new InputStreamReader(stream, UTF_8))) {\n\n var line_number = 1;\n while (true) {\n try {\n final var line = reader.readLine();\n if (line == null) {\n return OPDSAuthenticationPatternMapped.of(patterns);\n }\n\n if (line.startsWith(\"#\")) {\n continue;\n }\n\n final var trimmed = line.trim();\n if (trimmed.isEmpty()) {\n continue;\n }\n\n final var segments = List.of(WHITESPACE.split(trimmed));\n if (segments.size() != 2) {\n throw syntaxError(\n file,\n line_number,\n \"<pattern> ( <authentication-value> | 'none' )\",\n line);\n }\n\n final var pattern =\n Pattern.compile(segments.get(0));\n final var auth =\n parseAuthentication(file, line_number, segments.get(1));\n\n patterns.add(OPDSMatchingAuthentication.of(pattern.pattern(), auth));\n } finally {\n ++line_number;\n }\n }\n }\n }", "java.lang.String getQueryAuthorizations();", "SchemeDBO getSchemeByName(String schemeName);", "public static boolean m39034b(Uri uri) {\n String k = m39043k(uri);\n if (WebKitApi.SCHEME_HTTPS.equals(k) || WebKitApi.SCHEME_HTTP.equals(k)) {\n return true;\n }\n return false;\n }", "public boolean matchesRegex(URI uri);", "private static String encodeURI(String url) {\n\t\tStringBuffer uri = new StringBuffer(url.length());\n\t\tint length = url.length();\n\t\tfor (int i = 0; i < length; i++) {\n\t\t\tchar c = url.charAt(i);\n\n\t\t\tswitch (c) {\n\t\t\t\tcase '!':\n\t\t\t\tcase '#':\n\t\t\t\tcase '$':\n\t\t\t\tcase '%':\n\t\t\t\tcase '&':\n\t\t\t\tcase '\\'':\n\t\t\t\tcase '(':\n\t\t\t\tcase ')':\n\t\t\t\tcase '*':\n\t\t\t\tcase '+':\n\t\t\t\tcase ',':\n\t\t\t\tcase '-':\n\t\t\t\tcase '.':\n\t\t\t\tcase '/':\n\t\t\t\tcase '0':\n\t\t\t\tcase '1':\n\t\t\t\tcase '2':\n\t\t\t\tcase '3':\n\t\t\t\tcase '4':\n\t\t\t\tcase '5':\n\t\t\t\tcase '6':\n\t\t\t\tcase '7':\n\t\t\t\tcase '8':\n\t\t\t\tcase '9':\n\t\t\t\tcase ':':\n\t\t\t\tcase ';':\n\t\t\t\tcase '=':\n\t\t\t\tcase '?':\n\t\t\t\tcase '@':\n\t\t\t\tcase 'A':\n\t\t\t\tcase 'B':\n\t\t\t\tcase 'C':\n\t\t\t\tcase 'D':\n\t\t\t\tcase 'E':\n\t\t\t\tcase 'F':\n\t\t\t\tcase 'G':\n\t\t\t\tcase 'H':\n\t\t\t\tcase 'I':\n\t\t\t\tcase 'J':\n\t\t\t\tcase 'K':\n\t\t\t\tcase 'L':\n\t\t\t\tcase 'M':\n\t\t\t\tcase 'N':\n\t\t\t\tcase 'O':\n\t\t\t\tcase 'P':\n\t\t\t\tcase 'Q':\n\t\t\t\tcase 'R':\n\t\t\t\tcase 'S':\n\t\t\t\tcase 'T':\n\t\t\t\tcase 'U':\n\t\t\t\tcase 'V':\n\t\t\t\tcase 'W':\n\t\t\t\tcase 'X':\n\t\t\t\tcase 'Y':\n\t\t\t\tcase 'Z':\n\t\t\t\tcase '[':\n\t\t\t\tcase ']':\n\t\t\t\tcase '_':\n\t\t\t\tcase 'a':\n\t\t\t\tcase 'b':\n\t\t\t\tcase 'c':\n\t\t\t\tcase 'd':\n\t\t\t\tcase 'e':\n\t\t\t\tcase 'f':\n\t\t\t\tcase 'g':\n\t\t\t\tcase 'h':\n\t\t\t\tcase 'i':\n\t\t\t\tcase 'j':\n\t\t\t\tcase 'k':\n\t\t\t\tcase 'l':\n\t\t\t\tcase 'm':\n\t\t\t\tcase 'n':\n\t\t\t\tcase 'o':\n\t\t\t\tcase 'p':\n\t\t\t\tcase 'q':\n\t\t\t\tcase 'r':\n\t\t\t\tcase 's':\n\t\t\t\tcase 't':\n\t\t\t\tcase 'u':\n\t\t\t\tcase 'v':\n\t\t\t\tcase 'w':\n\t\t\t\tcase 'x':\n\t\t\t\tcase 'y':\n\t\t\t\tcase 'z':\n\t\t\t\tcase '~':\n\t\t\t\t\turi.append(c);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tStringBuffer result = new StringBuffer(3);\n\t\t\t\t\tString s = String.valueOf(c);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tbyte[] data = s.getBytes(\"UTF8\");\n\t\t\t\t\t\tfor (int j = 0; j < data.length; j++) {\n\t\t\t\t\t\t\tresult.append('%');\n\t\t\t\t\t\t\tString hex = Integer.toHexString(data[j]);\n\t\t\t\t\t\t\tresult.append(hex.substring(hex.length() - 2));\n\t\t\t\t\t\t}\n\t\t\t\t\t\turi.append(result.toString());\n\t\t\t\t\t} catch (UnsupportedEncodingException ex) {\n\t\t\t\t\t\t// should never happen\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn uri.toString();\n\t}", "public static void main(String[] args) {\n UrlValidator uv = new UrlValidator();\n for (String arg : args) {\n try {\n URI uri = new URI(arg);\n uri = uri.normalize();\n System.out.println(uri);\n System.out.printf(\"URI scheme: %s%n\", uri.getScheme());\n System.out.printf(\"URI scheme specific part: %s%n\", uri.getSchemeSpecificPart());\n System.out.printf(\"URI raw scheme specific part: %s%n\", uri.getRawSchemeSpecificPart());\n System.out.printf(\"URI auth: %s%n\", uri.getAuthority());\n System.out.printf(\"URI raw auth: %s%n\", uri.getRawAuthority());\n System.out.printf(\"URI userInfo: %s%n\", uri.getUserInfo());\n System.out.printf(\"URI raw userInfo: %s%n\", uri.getRawUserInfo());\n System.out.printf(\"URI host: %s%n\", uri.getHost());\n System.out.printf(\"URI port: %s%n\", uri.getPort());\n System.out.printf(\"URI path: %s%n\", uri.getPath());\n System.out.printf(\"URI raw path: %s%n\", uri.getRawPath());\n System.out.printf(\"URI query: %s%n\", uri.getQuery());\n System.out.printf(\"URI raw query: %s%n\", uri.getRawQuery());\n System.out.printf(\"URI fragment: %s%n\", uri.getFragment());\n System.out.printf(\"URI raw fragment: %s%n\", uri.getRawFragment());\n } catch (URISyntaxException e) {\n System.out.println(e.getMessage());\n }\n System.out.printf(\"isValid: %s%n\", uv.isValid(arg));\n }\n }", "public URL standardizeURL(URL startingURL);", "private static Set<String> extractHosts(String rawContent) { \r\n\t\tString hostRegex = \"https:\\\\/\\\\/[a-zA-Z]([\\\\w\\\\.\\\\-])*\\\\.gov.br\";\r\n\t\tMatcher matcher = Pattern.compile(hostRegex).matcher(rawContent);\r\n\t\t\r\n\t\tSet<String> results = new HashSet<String>();\r\n\t\twhile(matcher.find()) {\r\n\t\t\tresults.add(matcher.group().replace(\"http://\", \"\").replace(\"https://\", \"\"));\r\n\t\t}\r\n\t\treturn results;\r\n\t\t\r\n\t}", "@Test\n public void testValidator276() {\n UrlValidator validator = new UrlValidator();\n\n assertTrue(\"http://apache.org/ should be allowed by default\",\n validator.isValid(\"http://www.apache.org/test/index.html\"));\n\n assertFalse(\"file:///c:/ shouldn't be allowed by default\",\n validator.isValid(\"file:///C:/some.file\"));\n\n assertFalse(\"file:///c:\\\\ shouldn't be allowed by default\",\n validator.isValid(\"file:///C:\\\\some.file\"));\n\n assertFalse(\"file:///etc/ shouldn't be allowed by default\",\n validator.isValid(\"file:///etc/hosts\"));\n\n assertFalse(\"file://localhost/etc/ shouldn't be allowed by default\",\n validator.isValid(\"file://localhost/etc/hosts\"));\n\n assertFalse(\"file://localhost/c:/ shouldn't be allowed by default\",\n validator.isValid(\"file://localhost/c:/some.file\"));\n\n // Turn it on, and check\n // Note - we need to enable local urls when working with file:\n validator = new UrlValidator(new String[] {\"http\", \"file\"}, UrlValidator.ALLOW_LOCAL_URLS);\n\n assertTrue(\"http://apache.org/ should be allowed by default\",\n validator.isValid(\"http://www.apache.org/test/index.html\"));\n\n assertTrue(\"file:///c:/ should now be allowed\",\n validator.isValid(\"file:///C:/some.file\"));\n\n assertFalse(\"file:///c:\\\\ should not be allowed\", // Only allow forward slashes\n validator.isValid(\"file:///C:\\\\some.file\"));\n\n assertTrue(\"file:///etc/ should now be allowed\",\n validator.isValid(\"file:///etc/hosts\"));\n\n assertTrue(\"file://localhost/etc/ should now be allowed\",\n validator.isValid(\"file://localhost/etc/hosts\"));\n\n assertTrue(\"file://localhost/c:/ should now be allowed\",\n validator.isValid(\"file://localhost/c:/some.file\"));\n\n // These are never valid\n assertFalse(\"file://c:/ shouldn't ever be allowed, needs file:///c:/\",\n validator.isValid(\"file://C:/some.file\"));\n\n assertFalse(\"file://c:\\\\ shouldn't ever be allowed, needs file:///c:/\",\n validator.isValid(\"file://C:\\\\some.file\"));\n }", "public void setRegBasedAuthority(String authority) \n throws MalformedURIException {\n \n if (authority == null) {\n m_regAuthority = null;\n return;\n }\n // reg_name = 1*( unreserved | escaped | \"$\" | \",\" | \n // \";\" | \":\" | \"@\" | \"&\" | \"=\" | \"+\" )\n else if (authority.length() < 1 ||\n !isValidRegistryBasedAuthority(authority) ||\n authority.indexOf('/') != -1) {\n throw new MalformedURIException(\"Registry based authority is not well formed.\"); \n }\n m_regAuthority = authority;\n m_host = null;\n m_userinfo = null;\n m_port = -1;\n }", "public String getProtocol()\n {\n ASPManager mgr = getASPManager();\n String protocol = mgr.getAspRequest().getScheme();\n\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[0]))\n protocol = data[0];\n }\n\n return protocol;\n }" ]
[ "0.62384474", "0.62042797", "0.62033415", "0.59133434", "0.57844204", "0.5669879", "0.5659042", "0.564509", "0.564509", "0.564509", "0.5536734", "0.55333656", "0.5520068", "0.55012345", "0.5499655", "0.5471624", "0.5458677", "0.53922564", "0.53893363", "0.53836685", "0.5378275", "0.5366384", "0.5275601", "0.526098", "0.5239158", "0.5204783", "0.51816595", "0.5156907", "0.5064171", "0.50610125", "0.5053606", "0.5044681", "0.50349796", "0.5034877", "0.49997333", "0.49938178", "0.49926037", "0.49724483", "0.49681687", "0.49603367", "0.49589482", "0.49565762", "0.49124745", "0.48988172", "0.48918", "0.48780075", "0.48737672", "0.4869388", "0.48512405", "0.4839906", "0.4836897", "0.4804865", "0.48039484", "0.48019016", "0.4787445", "0.47814462", "0.4771729", "0.47704238", "0.47648868", "0.4751396", "0.4725262", "0.47140303", "0.47077736", "0.4707756", "0.4700461", "0.46887958", "0.4676967", "0.46705267", "0.46570393", "0.46494865", "0.4623182", "0.461804", "0.46158966", "0.46157882", "0.46074677", "0.4603985", "0.45980078", "0.45966008", "0.45837104", "0.45829707", "0.45680958", "0.45670515", "0.45615825", "0.4554058", "0.45437413", "0.45381927", "0.45323688", "0.4529944", "0.45153376", "0.45078894", "0.45047623", "0.44977114", "0.44935971", "0.44856268", "0.448468", "0.44751254", "0.44720575", "0.4471247", "0.44696522", "0.44688642" ]
0.50954753
28
Set up the base world.
@BeforeClass public static void setup() { baseWorld = new BaseWorld(1000 ,1500); GameManager.get().setWorld(new BaseWorld(1000, 1500)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract void initializeWorld();", "public OverWorld()\n { \n // Create a new world with 800x600 cells with a cell size of 1x1 pixels.\n super(1024, 600, 1, false);\n Setup();\n }", "public Main()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 600, 1); \n\n prepare();\n }", "public World()\n\t{\n\t\tinitWorld();\t\n\t}", "public RobotWorld()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(800, 600, 1); \n prepare();\n }", "public MyWorld()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(1000, 600, 1);\n planets();\n stars();\n }", "public MyWorld()\n {\n super(600, 400, 1);\n }", "public void initializeWorld() {\n checkWorldAndGameManager();\n if (this.worldDisplay == null) {\n throw new GameSetupException(\"World display has not been passed to\" +\n \" WorldDisplayManager\");\n } if (this.renderer == null) {\n throw new GameSetupException(\"Renderer is not initialized\" +\n \" for WorldDisplayManager\");\n }\n // Instantiate the helper managers\n tilesManager = new TilesManager(this.world, this.worldDisplay);\n\n // render the tiles\n tilesManager.renderInitialWorld();\n\n // Load the rendering engine\n renderer.setTilesManager(tilesManager);\n renderer.setMainEntityManager(gameManager.getMainEntityManager());\n\n }", "private void setUpGame() {\n\t\tsetUpBlocks();\n\t\tsetUpBall();\n\t\tsetUpPaddle();\n\t\taddMouseListeners();\n\t}", "public void setup()\n {\n // we use a separate ArrayList to keep track of each animal. \n // our room is 50 x 50.\n creatures = new ArrayList<Creature>();\n for (int i = 0; i < 55; i++) {\n if (i < 5) {\n creatures.add(new Fox((int)(Math.random()*48)+1, 1, (int)(Math.random()*48)+1)); \n } else {\n creatures.add(new Tux((int)(Math.random()*48)+1, 1, (int)(Math.random()*48)+1));\n }\n }\n \n env.setRoom(new Room());\n \n // Add all the animals into to the environment for display\n for (Creature c : creatures) {\n env.addObject(c);\n }\n \n // Sets up the camera\n env.setCameraXYZ(25, 50, 55);\n env.setCameraPitch(-63);\n \n // Turn off the default controls\n env.setDefaultControl(false);\n env.setShowController(false);\n \n }", "@Override\r\n protected void setUp()\r\n {\r\n island = new Island(5,5);\r\n position = new Position(island, 4,4);\r\n seed = new BirdFood(position, \"seed\", \"Crunchy Seeds\", 1.0, 2.0, 1.5);\r\n }", "public MyWorld()\n { \n super(1200, 600, 1); \n prepare();\n bienvenida();\n instrucciones();\n sonido();\n }", "@Override\n\tpublic void init() {\n\t\tworld = new World(gsm);\n\t\tworld.init();\n\t\t\n\t\tif(worldName == null){\n\t\t\tworldName = \"null\";\n\t\t\tmap_name = \"map\";\n\t\t} \n\t\tworld.generate(map_name);\n\t}", "public MyWorld()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(1078, 672, 1); \n preparePlayer1();\n preparePlayer2();\n prepareTitle();\n //playmusic();\n }", "@Override\n public void world() {\n super.world();\n }", "public void setup()\n {\n this.p = Player.getInstance();\n\n this.imageStore = new ImageStore(\n createImageColored(TILE_WIDTH, TILE_HEIGHT, DEFAULT_IMAGE_COLOR));\n this.world = new WorldModel(WORLD_ROWS, WORLD_COLS,\n createDefaultBackground(imageStore));\n this.view = new WorldView(VIEW_ROWS, VIEW_COLS, this, world,\n TILE_WIDTH, TILE_HEIGHT);\n this.scheduler = new EventScheduler(timeScale);\n\n background = loadImage(\"images\\\\farm2.jpg\");\n background.resize(VIEW_WIDTH, VIEW_HEIGHT);\n\n loadImages(IMAGE_LIST_FILE_NAME, imageStore, this);\n loadWorld(world, LOAD_FILE_NAME, imageStore);\n\n scheduleActions(world, scheduler, imageStore);\n\n next_time = System.currentTimeMillis() + TIMER_ACTION_PERIOD;\n }", "public UIMainWorld()\n { \n super(600, 400, 1); \n startScreen();\n }", "public void setupWorld()\r\n\t{\r\n\t\t//build walls\r\n\t\twall1.add(new PointD(-500, 500));\r\n\t\twall1.add(new PointD(-490, 500));\r\n\t\twall1.add(new PointD(-490, -500));\r\n\t\twall1.add(new PointD(-500, -500));\r\n\r\n\t\twall2.add(new PointD(-500, 500));\r\n\t\twall2.add(new PointD(2000, 500));\r\n\t\twall2.add(new PointD(2000, 490));\r\n\t\twall2.add(new PointD(-500, 490));\r\n\t\t\r\n\t\twall3.add(new PointD(2000, 500));\r\n\t\twall3.add(new PointD(1990, 500));\r\n\t\twall3.add(new PointD(1990, -500));\r\n\t\twall3.add(new PointD(2000, -500));\r\n\r\n\t\twall4.add(new PointD(-500, -500));\r\n\t\twall4.add(new PointD(2000, -500));\r\n\t\twall4.add(new PointD(2000, -490));\r\n\t\twall4.add(new PointD(-500, -490));\r\n\r\n\t\tobjects.add(wall1);\r\n\t\tobjects.add(wall2);\r\n\t\tobjects.add(wall3);\r\n\t\tobjects.add(wall4);\r\n\t\t\r\n\t\t\r\n\t\t//add people\r\n\t\tGameVars.people = people;\r\n\t\tGameVars.aSquare = aSquare;\r\n\t\t\r\n\t\tobjects.add(grandson.boundary);\r\n\t\tpeople.add(grandson);\r\n\t\t\r\n\t\tobjects.add(son.boundary);\r\n\t\tpeople.add(son);\r\n\t\t\r\n\t\tobjects.add(triangle.boundary);\r\n\t\tpeople.add(triangle);\r\n\r\n\t\tobjects.add(wife.boundary);\r\n\t\tpeople.add(wife);\r\n\r\n\t\tobjects.add(runaway.boundary);\r\n\t\tpeople.add(runaway);\r\n\t\t\r\n\t\t\r\n\t\t//set aSquare's position\r\n\t\taSquare.rotate(220);\r\n\t\t\r\n\t}", "public void setup() {\n this.imageStore = new ImageStore(\n createImageColored(TILE_WIDTH, TILE_HEIGHT,\n DEFAULT_IMAGE_COLOR));\n this.world = new WorldModel(WORLD_ROWS, WORLD_COLS,\n createDefaultBackground(imageStore));\n this.view = new WorldView(VIEW_ROWS, VIEW_COLS, this, world, TILE_WIDTH,\n TILE_HEIGHT);\n this.scheduler = new EventScheduler(timeScale);\n\n loadImages(IMAGE_LIST_FILE_NAME, imageStore, this);\n loadWorld(world, LOAD_FILE_NAME, imageStore);\n\n scheduleActions(world, scheduler, imageStore);\n\n nextTime = System.currentTimeMillis() + TIMER_ACTION_PERIOD;\n }", "public WiuWorld()\n { \n // Create a new world with 600x400 cells with a cell size of 1xpixels.\n super(WIDTH_WORLD, HEIGHT_WORLD, 1); \n }", "public void initializeObliqueLaunch(){\r\n world = new Environment();\r\n cannon = new Thrower();\r\n ball = new Projectile();\r\n this.setInitialValues();\r\n }", "public World (){\n\t\tpattern = new ShapePattern (PATTERN_SIZE);\n\t\tscroll = new ShapeScroll (SCROLL_SIZE);\n\t}", "public void setUpEcosystem() {\n Pool skookumchuk = setUpSkookumchuk();\n Pool rutherford = setUpRutherford();\n Pool gamelin = setUpGamelin();\n\n ecosystem.addPool(skookumchuk);\n ecosystem.addPool(rutherford);\n ecosystem.addPool(gamelin);\n\n ecosystem.addStream(new Stream(skookumchuk, rutherford));\n ecosystem.addStream(new Stream(rutherford, gamelin));\n }", "private void buildWorld() {\r\n\t\tremoveAll();\r\n\t\tintro = null;\r\n\t\tfacingEast = true;\r\n\t\t\r\n\t\taddLevels();\r\n\t\taddCharacters();\r\n\t\taddLifeDisplay();\r\n\t}", "private void setup() {\n\t\tpopulateEntitiesLists();\n\t\t// rayHandler.setCombinedMatrix(batch.getProjectionMatrix());\n\t\tambientColor = Color.CLEAR;\n\t\tsetAmbientAlpha(.3f);\n\t\tfpsLogger = new FPSLogger();\n\t\tdynamicEntities = new ArrayList<DynamicEntity>();\n\t\tfont.getData().setScale(DEBUG_FONT_SCALE);\n\t}", "public void setup(){\r\n\r\n\t\t\tlogger.info(\"begin setting up the patches\");\r\n\r\n\t\t\t//Initialize the patches in the world.\r\n\t\t\tpatches = new Patch[numOfPathes][numOfPathes];\r\n\t\t\tfor(int i = 0; i < patches.length; i ++){\r\n\t\t\t\tfor(int j = 0; j < patches[i].length; j ++){\r\n\t\t\t\t\tpatches[i][j] = new Patch(i,j);\r\n\t\t\t\t\t//logger.info(\"generated x = \" + i + \"y = \" + j);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tlogger.info(\"begin setting up the agents\");\r\n\r\n\t\t\t//Generate agents and cops.\r\n\t\t\tagents = new Agent[numOfAgents];\r\n\t\t\tfor(int k = 0; k < numOfAgents; k ++){\r\n\t\t\t\tagents[k] = generateAgent();\r\n\t\t\t}\r\n\r\n\t\t\tlogger.info(\"finished setting up the agents\");\r\n\r\n\t\t\tlogger.info(\"begin setting up the cops\");\r\n\t\t\tcops = new Cop[numOfCops];\r\n\t\t\tfor(int k = 0; k < numOfCops; k ++){\r\n\t\t\t\tcops[k] = generateCop();\r\n\t\t\t}\r\n\r\n\t\t\tlogger.info(\"finished setting up the cops\");\r\n\r\n\t\t}", "@Override\n\tprotected void setup() {\n\t\tcarImg();\n\t\tsetResolution(Resolution.MSX);\n\t\tsetFramesPerSecond(100);\n\t\t\n\t\tbola = new Bola();\n\n\t\tbotoes();\n\n\t\tcriaBlocos();\n\n\t\tpaddle = new Paddle();\n\n\t\t\n\n\t}", "protected abstract void setup();", "@Override\n public void afterWorldInit() {\n }", "abstract void setup();", "public void init() {\n try {\n java.net.URL codeBase = getCodeBase();\n codeBaseString = codeBase.toString();\n } catch (Exception e) {\n // probably running as an application, try the application\n // code base\n codeBaseString = \"file:./\";\n }\n\n if (colorMode == USE_COLOR) {\n objColor = red;\n } else {\n objColor = white;\n }\n\n Container contentPane = getContentPane();\n\n contentPane.setLayout(new BorderLayout());\n\n GraphicsConfiguration config = SimpleUniverse\n .getPreferredConfiguration();\n\n canvas = new Canvas3D(config);\n\n u = new SimpleUniverse(canvas);\n\n if (isApplication) {\n offScreenCanvas = new OffScreenCanvas3D(config, true);\n // set the size of the off-screen canvas based on a scale\n // of the on-screen size\n Screen3D sOn = canvas.getScreen3D();\n Screen3D sOff = offScreenCanvas.getScreen3D();\n Dimension dim = sOn.getSize();\n dim.width *= OFF_SCREEN_SCALE;\n dim.height *= OFF_SCREEN_SCALE;\n sOff.setSize(dim);\n sOff.setPhysicalScreenWidth(sOn.getPhysicalScreenWidth()\n * OFF_SCREEN_SCALE);\n sOff.setPhysicalScreenHeight(sOn.getPhysicalScreenHeight()\n * OFF_SCREEN_SCALE);\n\n // attach the offscreen canvas to the view\n u.getViewer().getView().addCanvas3D(offScreenCanvas);\n\n }\n contentPane.add(\"Center\", canvas);\n\n // setup the env nodes and their GUI elements\n setupLights();\n setupBackgrounds();\n setupFogs();\n setupSounds();\n\n // Create a simple scene and attach it to the virtual universe\n BranchGroup scene = createSceneGraph();\n\n // set up sound\n u.getViewer().createAudioDevice();\n\n // get the view\n view = u.getViewer().getView();\n\n // Get the viewing platform\n ViewingPlatform viewingPlatform = u.getViewingPlatform();\n\n // Move the viewing platform back to enclose the -4 -> 4 range\n double viewRadius = 4.0; // want to be able to see circle\n // of viewRadius size around origin\n // get the field of view\n double fov = u.getViewer().getView().getFieldOfView();\n\n // calc view distance to make circle view in fov\n float viewDistance = (float) (viewRadius / Math.tan(fov / 2.0));\n tmpVector.set(0.0f, 0.0f, viewDistance);// setup offset\n tmpTrans.set(tmpVector); // set trans to translate\n // move the view platform\n viewingPlatform.getViewPlatformTransform().setTransform(tmpTrans);\n\n // add an orbit behavior to move the viewing platform\n OrbitBehavior orbit = new OrbitBehavior(canvas, OrbitBehavior.STOP_ZOOM);\n orbit.setSchedulingBounds(infiniteBounds);\n viewingPlatform.setViewPlatformBehavior(orbit);\n\n u.addBranchGraph(scene);\n\n contentPane.add(\"East\", guiPanel());\n }", "@Override\r\n\tprotected final void setup() {\r\n \tsuper.setup();\r\n\r\n \tdoSetup();\r\n }", "private void configureWorlds(){\n switch (gameWorld){\n case NORMAL:\n world.setPVP(true);\n world.setKeepSpawnInMemory(false);\n world.setAutoSave(false);\n world.setStorm(false);\n world.setThundering(false);\n world.setAnimalSpawnLimit((int) (mobLimit * 0.45));\n world.setMonsterSpawnLimit((int) (mobLimit * 0.45));\n world.setWaterAnimalSpawnLimit((int) (mobLimit * 0.1));\n world.setDifficulty(Difficulty.HARD);\n break;\n case NETHER:\n world.setPVP(true);\n world.setAutoSave(false);\n world.setKeepSpawnInMemory(false);\n world.setStorm(false);\n world.setThundering(false);\n world.setMonsterSpawnLimit((int) (mobLimit * 0.45));\n world.setAnimalSpawnLimit((int) (mobLimit * 0.45));\n world.setWaterAnimalSpawnLimit((int) (mobLimit * 0.1));\n world.setDifficulty(Difficulty.HARD);\n break;\n }\n }", "protected void setup() {\n /**\n * Content manager manages the content languages and ontologies \"known\" by a given agent.\n * We register new languages that is required that our agent knows.\n * SLCodec is the codec class for the FIPA-SLn languages.\n * MobilityOntology is the class that represents the ontology used for JADE mobility.\n */\n getContentManager().registerLanguage(new SLCodec());\n getContentManager().registerOntology(MobilityOntology.getInstance());\n\n /**\n * Create containers. ProfileImpl allows us to set boot-parameters for the new containers.\n */\n homeContainer = getContainerController(); //retrieve the containercontroller that this agent lives in\n createdContainers = new AgentContainer[3]; //we require 3 containers for this scenario\n ProfileImpl curatorContainer1 = new ProfileImpl();\n curatorContainer1.setParameter(ProfileImpl.CONTAINER_NAME, \"Curator-Container-1\");\n ProfileImpl curatorContainer2 = new ProfileImpl();\n curatorContainer2.setParameter(ProfileImpl.CONTAINER_NAME, \"Curator-Container-2\");\n ProfileImpl artistManagerContainer = new ProfileImpl();\n artistManagerContainer.setParameter(ProfileImpl.CONTAINER_NAME, \"Artistmanager-Container\");\n createdContainers[0] = runtime.createAgentContainer(curatorContainer1);\n createdContainers[1] = runtime.createAgentContainer(curatorContainer2);\n createdContainers[2] = runtime.createAgentContainer(artistManagerContainer);\n doWait(2000); //wait while containers initializes\n\n /**\n * Request a list of all containers on the platform from AMS\n */\n getAllContainers();\n\n /**\n * Initialize gui\n */\n\n myGui = new ControllerAgentGUI(this, (String[]) containersOnPlatform.keySet().toArray(new String[containersOnPlatform.keySet().size()]));\n myGui.setVisible(true);\n }", "public MyWorld()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(1200, 800, 1); \n GreenfootImage bg = new GreenfootImage(\"background.jpg\");\n bg.scale(getWidth(), getHeight());\n setBackground(bg);\n initialize();\n \n }", "private void createWorld() {\n world = new World();\n world.setEventDeliverySystem(new BasicEventDeliverySystem());\n //world.setSystem(new MovementSystem());\n world.setSystem(new ResetPositionSystem());\n world.setSystem(new RenderingSystem(camera, Color.WHITE));\n\n InputSystem inputSystem = new InputSystem();\n InputMultiplexer inputMultiplexer = new InputMultiplexer();\n inputMultiplexer.addProcessor(inputSystem);\n inputMultiplexer.addProcessor(new GestureDetector(inputSystem));\n Gdx.input.setInputProcessor(inputMultiplexer);\n world.setSystem(inputSystem);\n world.setSystem(new MoveCameraSystem(camera));\n\n world.initialize();\n }", "private static void setupLocations() {\n\t\tcatanWorld = Bukkit.createWorld(new WorldCreator(\"catan\"));\n\t\tspawnWorld = Bukkit.createWorld(new WorldCreator(\"world\"));\n\t\tgameLobby = new Location(catanWorld, -84, 239, -647);\n\t\tgameSpawn = new Location(catanWorld, -83, 192, -643);\n\t\thubSpawn = new Location(spawnWorld, 8, 20, 8);\n\t\twaitingRoom = new Location(catanWorld, -159, 160, -344);\n\t}", "private void setup() {\n this.primaryStage.setTitle(Constants.APP_NAME);\n\n this.root = new VBox();\n root.setAlignment(Pos.TOP_CENTER);\n root.getChildren().addAll(getMenuBar());\n\n Scene scene = new Scene(root);\n this.primaryStage.setScene(scene);\n\n // set the default game level.\n setGameLevel(GameLevel.BEGINNER);\n\n // fix the size of the game window.\n this.primaryStage.setResizable(false);\n this.primaryStage.show();\n }", "public pr3s1()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(1280, 720, 1); \n prepare();\n }", "public WaterWorld()\r\n { \r\n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\r\n super(600, 400, 1); \r\n populateWorld();\r\n }", "public void setup()\n {\n this.imageStore = new ImageStore(\n createImageColored(TILE_WIDTH, TILE_HEIGHT, DEFAULT_IMAGE_COLOR));\n this.world = new WorldModel(WORLD_ROWS, WORLD_COLS,\n createDefaultBackground(imageStore));\n this.view = new WorldView(VIEW_ROWS, VIEW_COLS, this, world,\n TILE_WIDTH, TILE_HEIGHT);\n this.scheduler = new EventScheduler(timeScale);\n\n loadImages(IMAGE_LIST_FILE_NAME, imageStore, this);\n loadWorld(world, LOAD_FILE_NAME, imageStore);\n\n scheduleActions(world, scheduler, imageStore);\n\n next_time = System.currentTimeMillis() + TIMER_ACTION_PERIOD;\n click = false;\n }", "private void setup()\n {\n // TO STUDENTS: Add, revise, or remove methods as needed to define your own game's world\n //addLeftGround();\n //addFences();\n //addMetalPlateSteps();\n addClouds();\n addEnemy();\n addCoin();\n //addRightGround();\n // add a metal plate\n for(int i=0; i<=3; i+=1)\n {\n //location\n int x = 10 * TILE_SIZE + HALF_TILE_SIZE;\n int y = HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=3; i+=1)\n {\n //location\n int x = 11 * TILE_SIZE + HALF_TILE_SIZE;\n int y = HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=4; i+=1)\n {\n //location\n int x = 10 * TILE_SIZE + HALF_TILE_SIZE;\n int y = 10 * TILE_SIZE + HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=4; i+=1)\n {\n //location\n int x = 11 * TILE_SIZE + HALF_TILE_SIZE;\n int y = 10 * TILE_SIZE + HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=1; i+=1)\n {\n //location\n int x = 17 * TILE_SIZE + HALF_TILE_SIZE;\n int y = HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=1; i+=1)\n {\n //location\n int x = 18 * TILE_SIZE + HALF_TILE_SIZE;\n int y = HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=7; i+=1)\n {\n //location\n int x = 17 * TILE_SIZE + HALF_TILE_SIZE;\n int y = 7 * TILE_SIZE + HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=7; i+=1)\n {\n //location\n int x = 18 * TILE_SIZE + HALF_TILE_SIZE;\n int y = 7 * TILE_SIZE + HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=3; i+=1)\n {\n //location\n int x = 24 * TILE_SIZE + HALF_TILE_SIZE;\n int y = HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=3; i+=1)\n {\n //location\n int x = 25 * TILE_SIZE + HALF_TILE_SIZE;\n int y = HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=5; i+=1)\n {\n //location\n int x = 24 * TILE_SIZE + HALF_TILE_SIZE;\n int y = 10 * TILE_SIZE + HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=5; i+=1)\n {\n //location\n int x = 25 * TILE_SIZE + HALF_TILE_SIZE;\n int y = 10 * TILE_SIZE + HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=6; i+=1)\n {\n //location\n int x = 31 * TILE_SIZE + HALF_TILE_SIZE;\n int y = HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n }\n\n // add a metal plate\n for(int i=0; i<=6; i+=1)\n {\n //location\n int x = 32 * TILE_SIZE + HALF_TILE_SIZE;\n int y = HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n }\n\n // add a metal plate\n for(int i=0; i<=1; i+=1)\n {\n //location\n int x = 31 * TILE_SIZE + HALF_TILE_SIZE;\n int y = 13 * TILE_SIZE + HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=1; i+=1)\n {\n //location\n int x = 32 * TILE_SIZE + HALF_TILE_SIZE;\n int y = 13 * TILE_SIZE + HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=1; i+=1)\n {\n //location\n int x = 42 * TILE_SIZE + HALF_TILE_SIZE;\n int y = HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=1; i+=1)\n {\n //location\n int x = 43 * TILE_SIZE + HALF_TILE_SIZE;\n int y = HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=6; i+=1)\n {\n //location\n int x = 42 * TILE_SIZE + HALF_TILE_SIZE;\n int y = 8 * TILE_SIZE + HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=6; i+=1)\n {\n //location\n int x = 43 * TILE_SIZE + HALF_TILE_SIZE;\n int y = 8 * TILE_SIZE + HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=4; i+=1)\n {\n //location\n int x = 47 * TILE_SIZE + HALF_TILE_SIZE;\n int y = HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=4; i+=1)\n {\n //location\n int x = 48 * TILE_SIZE + HALF_TILE_SIZE;\n int y = HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=5; i+=1)\n {\n //location\n int x = 47 * TILE_SIZE + HALF_TILE_SIZE;\n int y = 10 * TILE_SIZE + HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=5; i+=1)\n {\n //location\n int x = 48 * TILE_SIZE + HALF_TILE_SIZE;\n int y = 10 * TILE_SIZE + HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=2; i+=1)\n {\n //location\n int x = 52 * TILE_SIZE + HALF_TILE_SIZE;\n int y = HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=2; i+=1)\n {\n //location\n int x = 53 * TILE_SIZE + HALF_TILE_SIZE;\n int y = HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=6; i+=1)\n {\n //location\n int x = 52 * TILE_SIZE + HALF_TILE_SIZE;\n int y = 8 * TILE_SIZE + HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=6; i+=1)\n {\n //location\n int x = 53 * TILE_SIZE + HALF_TILE_SIZE;\n int y = 8 * TILE_SIZE + HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n addHero();\n }", "public SideScrollingWorld()\n { \n // Create a new world with 640x480 cells with a cell size of 1x1 pixels.\n // Final argument of 'false' means that actors in the world are not restricted to the world boundary.\n // See: https://www.greenfoot.org/files/javadoc/greenfoot/World.html#World-int-int-int-boolean-\n super(VISIBLE_WIDTH, VISIBLE_HEIGHT, 1, false);\n\n // Set up the starting scene\n setup();\n\n // Game on\n isGameOver = false;\n\n }", "protected void setup() {\r\n }", "@Override\n protected void initGame() {\n getGameWorld().setEntityFactory(new PlatformerFactory());\n getGameWorld().setLevelFromMap(\"Platformergame1.json\");\n\n // Sets spawnloction of the player\n player = getGameWorld().spawn(\"player\", 50, 50);\n }", "public void initialize() {\n warpController = new WarpController(this);\n kitController = new KitController(this);\n crafting = new CraftingController(this);\n mobs = new MobController(this);\n items = new ItemController(this);\n enchanting = new EnchantingController(this);\n anvil = new AnvilController(this);\n blockController = new BlockController(this);\n hangingController = new HangingController(this);\n entityController = new EntityController(this);\n playerController = new PlayerController(this);\n inventoryController = new InventoryController(this);\n explosionController = new ExplosionController(this);\n requirementsController = new RequirementsController(this);\n worldController = new WorldController(this);\n arenaController = new ArenaController(this);\n arenaController.start();\n if (CompatibilityLib.hasStatistics() && !CompatibilityLib.hasJumpEvent()) {\n jumpController = new JumpController(this);\n }\n File examplesFolder = new File(getPlugin().getDataFolder(), \"examples\");\n examplesFolder.mkdirs();\n\n File urlMapFile = getDataFile(URL_MAPS_FILE);\n File imageCache = new File(dataFolder, \"imagemapcache\");\n imageCache.mkdirs();\n maps = new MapController(this, urlMapFile, imageCache);\n\n // Initialize EffectLib.\n if (com.elmakers.mine.bukkit.effect.EffectPlayer.initialize(plugin, getLogger())) {\n getLogger().info(\"EffectLib initialized\");\n } else {\n getLogger().warning(\"Failed to initialize EffectLib\");\n }\n\n // Pre-create schematic folder\n File magicSchematicFolder = new File(plugin.getDataFolder(), \"schematics\");\n magicSchematicFolder.mkdirs();\n\n // One-time migration of legacy configurations\n migrateConfig(\"enchanting\", \"paths\");\n migrateConfig(\"automata\", \"blocks\");\n migrateDataFile(\"automata\", \"blocks\");\n\n // Ready to load\n load();\n resourcePacks.startResourcePackChecks();\n }", "protected void setupImpl()\n {\n hint(DISABLE_DEPTH_TEST);\n font = loadFont(\"Futura-CondensedExtraBold-200.vlw\");\n textFont(font, 200);\n mode = 0;\n\n // Mode 3\n w = width * 2;\n dx = (TWO_PI / period) * xspacing;\n yvalues = new float[w/xspacing];\n\n // Mode 5\n mod = loadImage(\"mod.png\");\n modSizes = new int[scaledBandLevels.length];\n }", "public Main() {\r\n\t\tsuper();\r\n\t\tinitialize();\r\n\r\n\t}", "public World() {\n\t\tbackgroundLoader.submit(new Callable<Object>() {\n\t\t\t@Override\n\t\t\tpublic Object call() throws Exception {\n\t\t\t\tItemDefinition.load();\n\t\t\t\treturn null;\n\t\t\t}\n\t\t});\n\t\tbackgroundLoader.submit(new Callable<Object>() {\n\t\t\t@Override\n\t\t\tpublic Object call() throws Exception {\n\t\t\t\tNPCDefinition.load();\n\t\t\t\tNPCStyle.init();\n\t\t\t\treturn null;\n\t\t\t}\n\t\t});\n\t\tbackgroundLoader.submit(new Callable<Object>() {\n\t\t\t@Override\n\t\t\tpublic Object call() throws Exception {\n\t\t\t\tDegradeSystem.init();\n\t\t\t\tProjectileManager.init();\n\t\t\t\treturn null;\n\t\t\t}\n\t\t});\n\t\tbackgroundLoader.submit(new Callable<Object>() {\n\t\t\t@Override\n\t\t\tpublic Object call() throws Exception {\n\t\t\t\tShops.loadShopFile();\n\t\t\t\treturn null;\n\t\t\t}\n\t\t});\n\t}", "protected WorldController() {\n\t\tthis(new Rectangle(0,0,DEFAULT_WIDTH,DEFAULT_HEIGHT), \n\t\t\t\tnew Vector2(0,DEFAULT_GRAVITY));\n\t}", "private void initialize() {\r\n\t\tthis.setLayout(new BorderLayout());\r\n\t\tthis.setBounds(new Rectangle(0, 0, 393, 177));\r\n\t\tthis.add(getBasePanel(), BorderLayout.CENTER);\r\n\r\n\t}", "public void setUp() {\n\t\t// should create all the olives based on # in constructor\n\n\t\tthis.myOlives = addOlive(this.amountOfOlives);\n\n\t\tthis.press = new OlivePress();\n\t}", "public static void main(String args[]) {\n BallWorld world = new BallWorld();\n }", "@Override\n\tprotected void setup() {\n\t\tgetContentManager().registerLanguage(new SLCodec());\n\t\tgetContentManager().registerOntology(MobilityOntology.getInstance());\n\t\tthis.addBehaviour(new ReceiveMessage());\n\t}", "public CrabWorld()\n {\n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n musica=new GreenfootSound(\"Ufo-t-balt.mp3\");\n super(560,560, 1);\n }", "public static void main(String [] args)\n\t{\n\t\tWorld newWorld = new World();\n\n\t\t//Adding everything into the world\n\t\tnewWorld.treesShrubsToWorld();\n\t\tnewWorld.grassToWorld();\n\t\tnewWorld.caterpillarToWorld();\n\t\tnewWorld.grasshopperToWorld();\n\t\tnewWorld.deerToWorld();\n\t\tnewWorld.bluejayToWorld();\n\t\tnewWorld.squirrelToWorld();\n\t\tnewWorld.mouseToWorld();\n\t\tnewWorld.rabbitToWorld();\n\t\tnewWorld.hawkToWorld();\n\t\tnewWorld.foxToWorld();\n\t\tnewWorld.wolfToWorld();\n\n\t\t//Printing out the world onto the console\n\t\tnewWorld.printWorld();\n\t\t\n\t}", "public void loadWorld() {\n\t\tint[][] tileTypes = new int[100][100];\n\t\tfor (int x = 0; x < 100; x++) {\n\t\t\tfor (int y = 0; y < 100; y++) {\n\t\t\t\ttileTypes[x][y] = 2;\n\t\t\t\tif (x > 40 && x < 60 && y > 40 && y < 60) {\n\t\t\t\t\ttileTypes[x][y] = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tEntityList entities = new EntityList(0);\n\t\tPlayer player = new Player(Direction.SOUTH_WEST, 50, 50);\n\t\tentities.addEntity(player);\n\t\tentities.addEntity(new Tree(Direction.SOUTH_WEST,49, 49));\n\t\tworld = new World(new Map(tileTypes), player, entities);\n\t}", "private void initialize() {\n SystemManager.get(this);\n SystemManager.add(new PlayerInputSystem(this, win.getInputHandler()));\n SystemManager.add(new PhysicSystem(this, win.getDimension()));\n SystemManager.add(new RenderSystem(this));\n\n World world = new World(new Vector2D(0.0f, 98.1f));\n theCar = new Car(\"car\");\n\n theCar.setPosition(new Vector2D(win.getWidth() * 0.5f, win.getHeight() * 0.5f))\n .setSize(new Rectangle(50, 20))\n .setVelocity(new Vector2D(0.0f, 0.0f))\n .setResistance(0.90f)\n .setMass(2000.0f)\n .setWorld(world);\n\n add(theCar);\n }", "@Override\n protected void startUp() {\n }", "public World makeWorld() {\n World world = new World(1000, 1000);\n world.createEntity().addComponent(new CursorComponent());\n \n ProjectileSystem projectileSystem = new ProjectileSystem();\n world.addSystem(projectileSystem, 1);\n \n return world;\n }", "public void setup() {\r\n\t\tthis.greet(\"Hello, my name is \" + this.name + \", this message is brought to you from the AI.java file under the greet method!\");\r\n\t\t//TODO ask for name\r\n\t\t// check if setup file exists and make sure nothing is invalid\r\n\t\t/*if(!(fileManager.getFile(\"settings.cy\").exists())) { // TODO finish this\r\n\t\t\tFile settings = fileManager.createFile(\"settings\");\r\n\t\t\tint i = 0;\r\n\t\t\tfileManager.writeToFile(settings, \"color: red\", i++);\r\n\t\t\t// no other settings at the moment\r\n\t\t}*/\r\n\t}", "public Ocean()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 400, 1); \n BF bf = new BF();\n addObject(bf,500,300);\n SF sf = new SF();\n addObject(sf,100,300);\n }", "@Override\n\n //-----------------\n\n public void init() {\n //test(); // <---------------- Uncomment to TEST!\n\n // %-distribution of RED, BLUE and NONE\n double[] dist = {0.49, 0.49, 0.02};\n\n // Number of locations (places) in world (square)\n int nLocations = 950;\n\n Actor[] distArray = distribution(nLocations, dist); //Generates array with correct distribution.\n distArray = shuffle(distArray); //Shuffles array\n world = toMatrix(distArray, nLocations, world); //Generates the start world.\n // Should be last\n fixScreenSize(nLocations);\n }", "public PantallaVictoria()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(400, 600, 1); \n prepare();\n }", "public static void initialize() {\n BroadphaseInterface aabbInterface = new DbvtBroadphase(); //Checks if objects could collide\n CollisionConfiguration collisionConfiguration = new DefaultCollisionConfiguration();\n CollisionDispatcher collisionDispatcher = new CollisionDispatcher(collisionConfiguration); //Handles collisions\n ConstraintSolver constraintSolver = new SequentialImpulseConstraintSolver();\n\n world = new DiscreteDynamicsWorld(collisionDispatcher, aabbInterface, constraintSolver, collisionConfiguration);\n world.setGravity(DataTypeHelper.stringToVector3f(PreferenceHelper.getValue(\"gravity\")));\n }", "private void initialize() {\n //Asteroid Shape (8 sided)\n polygon = new Vector2f[]{new Vector2f(400, -800), new Vector2f(-400, -800), new Vector2f(-800, -400),\n new Vector2f(-800, 400), new Vector2f(-400, 800), new Vector2f(400, 800), new Vector2f(800, 400), new Vector2f(800, -400)};\n //Translation variables\n this.tx = spawnX;\n this.ty = spawnY; //Start above screen to gain momentum\n this.velocity = new Vector2f();\n\n //World initialize\n this.world = new Matrix3x3f();\n\n }", "private void initialize() {\n\t\troot = new Group();\n\t\tgetProperties();\n\t\tsetScene();\n\t\tsetStage();\n\t\tsetGUIComponents();\n\t}", "protected void initialize() {\n\t\tRobot.conveyor.Forward();\n\n\t}", "private void initialiseByHand() {\n Configuration production = new Configuration(\"api.example.com\", false, 2000);\n Configuration staging = new Configuration(\"api-staging.example.com\", false, 2000);\n Configuration debug = new Configuration(\"api-dev.example.com\", true, 1000);\n Map<String, Configuration> baseVariants = new HashMap<>();\n baseVariants.put(PRODUCTION, production);\n baseVariants.put(STAGING, staging);\n baseVariants.put(DEBUG, debug);\n Neanderthal.initialise(this, baseVariants, PRODUCTION);\n }", "@BeforeEach\n\tpublic void setup() {\n\t\tif (!initialized) {\n\t\t\tbaseURI = String.format(uri, port);\n\t\t\tinitialized = true;\n\t\t}\n\t}", "public void initBaseProductionSpace(){\n this.baseProductionPanel = new BaseProductionPanel(gui);\n\n this.add(baseProductionPanel);\n }", "public abstract World create(World world);", "public void setup() {\n\tsize(800, 600);\n\t// other stuff.\n }", "protected void setupPhysicsWorld() {\n\t\tfloat mass = 1.0f;\n\t\tfloat up[] = { 0.0f, 1.0f, 0.0f };\n\t\tdouble[] transform;\n\n\t\ttransform = toDoubleArray(dolphinNodeOne.getLocalTransform().toFloatArray());\n\t\tdolphinOnePhysicsObject = physicsEngine.addCapsuleObject(physicsEngine.nextUID(), mass, transform, 0.3f, 1.0f);\n\n\t\tdolphinOnePhysicsObject.setBounciness(0.0f);\n\t\tdolphinOnePhysicsObject.setFriction(0.0f);\n\t\tdolphinOnePhysicsObject.setDamping(0.99f, 0.99f);\n\t\tdolphinOnePhysicsObject.setSleepThresholds(0.0f, 0.0f);\n\t\tdolphinNodeOne.setPhysicsObject(dolphinOnePhysicsObject);\n\n\t\ttransform = toDoubleArray(groundNode.getLocalTransform().toFloatArray());\n\t\tgroundPlane = physicsEngine.addStaticPlaneObject(physicsEngine.nextUID(), transform, up, 0.0f);\n\n\t\tgroundPlane.setBounciness(0.0f);\n\n\t\tdouble[] planeTransform = groundPlane.getTransform();\n\t\tplaneTransform[12] = groundNode.getLocalPosition().x();\n\t\tplaneTransform[13] = groundNode.getLocalPosition().y();\n\t\tplaneTransform[14] = groundNode.getLocalPosition().z();\n\t\tgroundPlane.setTransform(planeTransform);\n\t\tgroundNode.setPhysicsObject(groundPlane);\n\n\t\tfor (int i = 0; i < npcEntity.length; i++) {\n\t\t\tdouble[] transformNPC = toDoubleArray(npcEntity[i].getNode().getLocalTransform().toFloatArray());\n\t\t\tPhysicsObject npcPhysicObject = physicsEngine.addCapsuleObject(physicsEngine.nextUID(), mass, transformNPC,\n\t\t\t\t\t0.3f, 1.0f);\n\t\t\tnpcPhysicObject.setBounciness(0.0f);\n\t\t\tnpcPhysicObject.setFriction(0.0f);\n\t\t\tnpcPhysicObject.setDamping(0.99f, 0.99f);\n\t\t\tnpcPhysicObject.setSleepThresholds(0.0f, 0.0f);\n\t\t\tnpcEntity[i].getNode().setPhysicsObject(npcPhysicObject);\n\t\t\tnpcEntity[i].setPhysicObject(npcPhysicObject);\n\t\t\tnpcPhysicsObjects[i] = npcEntity[i].getPhysicObject();\n\t\t}\n\t}", "public abstract void startup();", "public Universe()\n\t{\n\t\tthis.dimension = 3;\n\t\tthis.particles = new ArrayList<Particle>();\n\t\tthis.timebase = DEF_TIMEBASE;\n\t}", "private void initilize()\n\t{\n\t\tdimXNet = project.getNoC().getNumRotX();\n\t\tdimYNet = project.getNoC().getNumRotY();\n\t\t\n\t\taddProperties();\n\t\taddComponents();\n\t\tsetVisible(true);\n\t}", "private final void doSetup() {\r\n \tsetEnvironmentVariables();\r\n \t\r\n \tcreateAppWindows();\r\n \t\r\n \tcreateAppPages();\r\n\r\n \t//Set the default resource bundle. This necessary even for non-L10N tests, because even they\r\n \t// need to call localizeFieldLocators()\r\n\t\tsetResourceBundle(DDConstants.DEFAULT_L10N_BUNDLE);\r\n\t\t\r\n\t\t//MUST be called after super.setup!!!\r\n \t//NOTE that ddUser is the equivalent of a user that is found in the setup screen.\r\n \t// The user that logs in to the app is known as the auto user. Until we figure out\r\n \t// whether that model applies, don't call this.\r\n \t//setDDUser();\r\n }", "public Game() { \n // Create the new environment. Must be done in the same\n // method as the game loop\n env = new Env();\n \n // Sets up the camera\n env.setCameraXYZ(25, 50, 55);\n env.setCameraPitch(pitch);\n\n // Turn off the default controls\n env.setDefaultControl(false);\n\n // Make the room 50 x 50.\n env.setRoom(new Room());\n creatures = new ArrayList<Creature>();\n }", "public SaboWorld()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 400, 1);\n addObject(counter, 100, 380); //Add the scoreboard\n addObject(healthBar, 300, 370); //Add the health bar\n addObject(turret, getWidth()/2-5, getHeight()-turret.getImage().getWidth()); \n }", "@Override\n protected void setup() {\n // exception handling for invoke the main2();\n try {\n main2();\n } catch (StaleProxyException e) {\n e.printStackTrace();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n // create central agent of the application\n try {\n AgentController Main = main1.createNewAgent(\"Main\",\"test.Main\",null);\n Main.start();\n } catch (StaleProxyException e) {\n e.printStackTrace();\n }\n try {\n showResualt();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "protected void initialize() {\n \tclaw = Robot.getClaw();\n\n \tclaw.open();\n }", "public void setup(final EvolutionState state, final Parameter base) \r\n {\n }", "public void setUp() {\n burr = new Song(\"Hannibal Burress\", \"rap\", 2018, \"Morpheus Rap\");\n }", "public GameWorld(){\r\n\t\t\r\n\t}", "protected void setup() {\n\t\t\n\n\n\t\tif(PropertiesLoaderImpl.IS_MAIN_SIMULATION_NODE)addBehaviour(new HandleClockBehaviour(this, TimeRateControl));\n\t\telse addBehaviour(new SlaveNodeClockBehaviour(this, TimeRateControl));\n\t\t\n\t\tif(PropertiesLoaderImpl.DEBUG) System.out.println(this.getName() +\" alive!!!!!!!!!!\\nStarting the simulation time\");\n\t\t\n\t\n\t\t\tSimulationClock.getInstance().setSimulationStarted(true);\n\t\n\t}", "protected void setupLocal() {}", "public void buildWorld() {\n buildBoundaryWall();\n buildDiscreteWorld();\n removeBoundaryWall();\n reorganizeNote();\n connectWorld();\n buildWall();\n }", "private void commonSetup(FMLCommonSetupEvent event) {\n WorldGen.addWorldGen();\n\n // Add all messaging\n DreamEventListener.registerMessages();\n }", "public void setup() {\r\n\r\n\t}", "public BoardSetup() {\n\t\tthis.theBoard = Board.getInstance();\n\t}", "public void initAndSetWorld() {\n\t\tHashMap<String, Location> gameWorld = new HashMap<String, Location>();\r\n\t\tthis.world = gameWorld;\r\n\t\t\r\n\t\t// CREATING AND ADDING LOCATIONS, LOCATION AND ITEM HASHES ARE AUTOMATICALLY SET BY CALLING CONSTRUCTOR\r\n\t\tLocation valley = new Location(\"valley\", \"Evalon Valley. A green valley with fertile soil.\",\r\n\t\t\t\t\"You cannot go in that direction.\",true);\r\n\t\tthis.addLocation(valley);\r\n\t\tLocation plains = new Location(\"plains\", \"West Plains. A desolate plain.\",\r\n\t\t\t\t\"You cannot go in that direction. There is nothing but dust over there.\",true);\r\n\t\tthis.addLocation(plains);\r\n\t\tLocation mountain = new Location(\"mountain\", \"Northern Mountains. A labyrinth of razor sharp rocks.\",\r\n\t\t\t\t\"You cannot go in that direction. The Mountain is not so easily climbed.\",true);\r\n\t\tthis.addLocation(mountain);\r\n\t\tLocation shore = new Location(\"shore\", \"Western Shore. The water is calm.\",\r\n\t\t\t\t\"You cannot go in that direction. There might be dangerous beasts in the water.\",true);\r\n\t\tthis.addLocation(shore);\r\n\t\tLocation woods = new Location(\"woods\", \"King's Forest. A bright forest with high pines.\",\r\n\t\t\t\t\"You cannot go in that direction. Be careful not to get lost in the woods.\",true);\r\n\t\tthis.addLocation(woods);\r\n\t\tLocation hills = new Location(\"hills\", \"Evalon hills.\",\r\n\t\t\t\t\"You cannot go in that direction.\",true);\r\n\t\tthis.addLocation(hills);\r\n\t\tLocation cave = new Location(\"cave\", \"Blood Cave. Few of those who venture here ever return.\",\r\n\t\t\t\t\"The air smells foul over there, better not go in that direction.\",true);\r\n\t\tthis.addLocation(cave);\r\n\t\tLocation innercave = new Location(\"innercave\", \"Blood Cave. This path must lead somewhere.\",\r\n\t\t\t\t\"Better not go over there.\",true);\r\n\t\t\r\n\t\tLocation westhills = new Location(\"westhills\", \"Thornhills. A great many trees cover the steep hills.\",\r\n\t\t\t\t\"You cannot go in that direction. Watch out for the thorny bushes.\",true);\r\n\t\tthis.addLocation(westhills);\r\n\t\t\r\n\t\tLocation lake = new Location(\"lake\", \"Evalon Lake. A magnificent lake with a calm body of water.\",\r\n\t\t\t\t\"You cannot go in that direction, nothing but fish over there.\",true);\r\n\t\tthis.addLocation(lake);\r\n\t\t\r\n\t\tLocation laketown = new Location(\"laketown\", \"Messny village. A quiet village with wooden houses and a dirt road.\",\r\n\t\t\t\t\"You cannot go in that direction, probably nothing interesting over there.\",true);\r\n\t\t\r\n\t\tLocation inn = new Room(\"inn\", \"Messny Inn. A small but charming inn in the centre of the village.\",\r\n\t\t\t\t\"You cannot go in that direction.\",false);\r\n\t\t\r\n\t\t// CONNECTING LOCATIONS\r\n\t\t// IT DOES NOT MATTER ON WHICH LOCATION THE METHOD ADDPATHS IS CALLED\r\n\t\tvalley.addPaths(valley, \"east\", plains, \"west\");\r\n\t\tvalley.addPaths(valley, \"north\", mountain, \"south\");\r\n\t\tvalley.addPaths(valley, \"west\", shore, \"east\");\r\n\t\tvalley.addPaths(valley, \"south\", woods, \"north\");\r\n\t\twoods.addPaths(woods, \"east\", hills, \"west\");\r\n\t\thills.addPaths(hills, \"south\", westhills, \"north\");\r\n\t\twesthills.addPaths(westhills, \"west\", lake, \"east\");\r\n\t\tlake.addPaths(woods, \"south\", lake, \"north\");\r\n\t\tlake.addPaths(lake, \"west\", laketown, \"east\");\r\n\t\tmountain.addPaths(mountain, \"cave\", cave, \"exit\");\r\n\t\tlaketown.addPaths(laketown, \"inn\", inn, \"exit\");\r\n\t\t\r\n\r\n\t\t\r\n\t\t// CREATE EMPTY ARMOR SET FOR GAME START AND UNEQUIPS\r\n\t\tBodyArmor noBodyArmor = new BodyArmor(\"unarmored\", 0, 0, true, 0);\r\n\t\tthis.setDefaultBodyArmor(noBodyArmor);\r\n\t\tBoots noBoots = new Boots(\"unarmored\", 0, 0, true, 0);\r\n\t\tthis.setDefaultBoots(noBoots);\r\n\t\tHeadgear noHeadgear = new Headgear(\"unarmored\", 0, 0, true, 0);\r\n\t\tthis.setDefaultHeadgear(noHeadgear);\r\n\t\tGloves noGloves = new Gloves(\"unarmored\", 0, 0, true, 0);\r\n\t\tthis.setDefaultGloves(noGloves);\r\n\t\tWeapon noWeapon = new Weapon(\"unarmored\", 0, 0, true, 5, false);\r\n\t\tthis.setDefaultWeapon(noWeapon);\r\n\t\t\r\n\t\tthis.getPlayer().setBodyArmor(noBodyArmor);\r\n\t\tthis.getPlayer().setBoots(noBoots);\r\n\t\tthis.getPlayer().setGloves(noGloves);\r\n\t\tthis.getPlayer().setHeadgear(noHeadgear);\r\n\t\tthis.getPlayer().setWeapon(noWeapon);\r\n\t\t\r\n\t\t\r\n\t\t// CREATING AND ADDING ITEMS TO PLAYER INVENTORY \r\n\t\tItem potion = new Potion(\"potion\", 1, 100, true, 10);\r\n\t\tthis.getPlayer().addItem(potion);\r\n\t\tWeapon sword = new Weapon(\"sword\", 10, 200, true, 10, false);\r\n\t\tvalley.addItem(sword);\r\n\t\t\r\n\t\tWeapon swordEvalon = new Weapon(\"EvalonianSword\", 15, 400, true, 1, 15, false);\r\n\t\thills.addItem(swordEvalon);\r\n\t\t\r\n\t\tPotion potion2 = new Potion(\"largepotion\", 2, 200, true, 25);\r\n\t\tPotion potion3 = new Potion(\"potion\", 2, 200, true, 25);\r\n\t\tPotion potion4 = new Potion(\"potion\", 2, 200, true, 25);\r\n\t\tlake.addItem(potion3);\r\n\t\tinn.addItem(potion4);\r\n\t\t\r\n\t\tItem potion5 = new Potion(\"potion\", 1, 100, true, 10);\r\n\t\tItem potion6 = new Potion(\"potion\", 1, 100, true, 10);\r\n\t\twoods.addItem(potion6);\r\n\t\t\r\n\t\tPurse purse = new Purse(\"purse\",0,0,true,100);\r\n\t\tvalley.addItem(purse);\r\n\t\t\r\n\t\tChest chest = new Chest(\"chest\", 50, 100, false, 50);\r\n\t\tvalley.addItem(chest);\r\n\t\tchest.addItem(potion2);\r\n\t\t\r\n\t\tChest chest2 = new Chest(\"chest\", 10, 10, false, 20);\r\n\t\tinn.addItem(chest2);\r\n\t\t\r\n\t\t// ENEMY LOOT\r\n\t\tBodyArmor chestplate = new BodyArmor(\"chestplate\", 20, 200, true, 20);\r\n\t\t\r\n\t\t// ADDING NPC TO WORLD\r\n\t\tNpc innkeeper = new Npc(\"Innkeeper\", false, \"Hello, we have rooms available if you want to stay over night.\",true,1000);\r\n\t\tinn.addNpc(innkeeper);\r\n\t\t\r\n\t\tItem potion7 = new Potion(\"potion\", 1, 100, true, 10);\r\n\t\tItem potion8 = new Potion(\"potion\", 1, 100, true, 10);\r\n\t\tinnkeeper.addItem(potion7);\r\n\t\tinnkeeper.addItem(potion8);\r\n\t\t\r\n\t\tNpc villager = new Npc(\"Lumberjack\", false, \"Gotta get those logs back to the mill soon, but first a few pints at the inn!\",false,0);\r\n\t\tlaketown.addNpc(villager);\r\n\t\t\r\n\t\tEnemy enemy1 = new Enemy(\"Enemy\", true, \"Come at me!\", 50, chestplate, 200, 10);\r\n\t\tmountain.addNpc(enemy1);\r\n\t\t\r\n\t\tEnemyGuardian guardian = new EnemyGuardian(\"Guardian\", true, \"I guard this cave.\", 100, potion5, 600, 15, innercave, \"An entrance reveals itself behind the fallen Guardian.\", \"inwards\", \"entrance\");\r\n\t\tcave.addNpc(guardian);\r\n\t\t\r\n\t\t// ADDING SPAWNER TO WORLD\r\n\t\tthis.setNpcSpawner(new BanditSpawner()); \r\n\t\t\r\n\t\t// ADDING PLAYER TO THE WORLD\r\n\t\tthis.getPlayer().setLocation(valley);\r\n\t\t\r\n\t\t// QUEST\r\n\t\tQuest noquest = new Quest(\"noquest\",\"nodesc\",\"nocomp\",false,true,1000,0,0,0);\r\n\t\tthis.setCurrentQuest(noquest);\r\n\t\t\r\n\t\t\r\n\t\tQuest firstquest = new Quest(\"A New Journey\",\"Find the lost sword of Evalon.\",\"You have found the lost sword of Evalon!\",false,false,1,400,0,1);\r\n\t\t\r\n\t\tScroll scroll = new Scroll(\"Questscroll\",1,1,true,firstquest);\r\n\t\tmountain.addItem(scroll);\r\n\t\t\r\n\t\tSystem.out.println(\"All set up.\");\r\n\t}", "public void initialize() {\n // create a runner using a function\n this.createScreenBorders();\n // create a keyboard sensor.\n this.keyboard = this.runner.getGUI().getKeyboardSensor();\n //create the environment for the game (game environment and sprites collection)\n this.createEnvironment();\n // BACKGROUND CREATION //\n this.createBackground();\n // create the counters for the game.\n this.createCounters();\n // LISTENERS CREATION //\n //create a message printing listener.\n HitListener phl = new PrintingHitListener();\n //create a new block remover listener.\n HitListener blockrmv = new BlockRemover(this, blockCounter);\n //create a new ball remover listener.\n HitListener ballrmv = new BallRemover(this, ballCounter);\n //create a new score counter listener.\n HitListener scorelstn = new ScoreTrackingListener(this.scoreCounter);\n // BLOCKS CREATION //\n this.createBlocks(phl, blockrmv, scorelstn);\n // SIDE BLOCKS CREATION //\n this.createSideBlocks();\n // DEATH BLOCK CREATION //\n this.createDeathBlock(ballrmv);\n // LEVEL'S NAME //\n LevelsName name = new LevelsName(this.levelInfo.levelName());\n // add the whole-game indicators to the sprites list.\n this.sprites.addSprite(scoreIndi);\n this.sprites.addSprite(lifeIndi);\n this.sprites.addSprite(name);\n }", "public VirtualWorld(Node rootNode, AssetManager assetManager, ViewPort viewPort){\n sky = new Sky(rootNode, assetManager);\n water = new Water(rootNode, viewPort, assetManager);\n }", "public void setup() {\n }", "public static void setup(String[] args) {\n\t\tif (parametersContains(\"classpath\", args)) {\r\n\t\t\tRESOURCE_TYPE = RessourceType.CLASSPATH;\r\n\t\t\tCobra2DEngine.setupEnvironment(RESOURCE_TYPE);\r\n\t\t\tROOT_PATH_STR = \"./src/main/resources/\";\r\n\t\t} else if (parametersContains(\"currentDir\", args)) {\r\n\t\t\tRESOURCE_TYPE = RessourceType.INSTALL_DIR;\r\n\t\t\tCobra2DEngine.setupEnvironment(RESOURCE_TYPE);\r\n\t\t\tROOT_PATH_STR = \".\";\r\n\t\t} else {\r\n\t\t\tSystem.out\r\n\t\t\t\t\t.println(\"Start this runtime environment with option -classpath to load all resources from your classpath or with -currentDir to load all resources from current directory ./game-resources/.\");\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\r\n\t\tROOT_PATH = new File(ROOT_PATH_STR);\r\n\t\tRESOURCE_PATH = new File(ROOT_PATH_STR + File.separator\r\n\t\t\t\t+ RESOURCE_PATH_STR);\r\n\t\tIMAGE_RESOURCE_PATH = new File(ROOT_PATH_STR + File.separator\r\n\t\t\t\t+ RESOURCE_PATH_STR + File.separator + IMAGE_FOLDER_STR);\r\n\r\n\t\tlog.info(\"Setting up path settings for runtime.\");\r\n\t\tlog.info(\"Resource loading strategy : \" + RESOURCE_TYPE);\r\n\t\tlog.info(\"Root path (path): \" + ROOT_PATH.getPath());\r\n\t\tlog.info(\"Root path (absolute): \"\r\n\t\t\t\t+ ROOT_PATH.getAbsolutePath());\r\n\t\tlog.info(\"Resource path (path): \" + RESOURCE_PATH.getPath());\r\n\t\tlog.info(\"Resource path (absolute): \"\r\n\t\t\t\t+ RESOURCE_PATH.getAbsolutePath());\r\n\t\tlog.info(\"Image resource path (path): \"\r\n\t\t\t\t+ IMAGE_RESOURCE_PATH.getPath());\r\n\t\tlog.info(\"Image resource path (absolute): \"\r\n\t\t\t\t+ IMAGE_RESOURCE_PATH.getAbsolutePath());\r\n\t}", "@Override\n protected void setup() {\n }", "public MyWorld()\n { \n // Create a new world with 600x550 cells with a cell size of 1x1 pixels.\n super(600, 550, 1);\n // Set the order in which Actors are drawn on the screen in this World\n setPaintOrder ( Counter.class, HighScore.class, Fader.class);\n // Counter\n counter = new Counter (\"Score: \");\n addObject (counter, 50, 30);\n // Initialize the player\n player = new Player ();\n addObject (player, 300, 530); \n platforms = new Platform[10]; \n startingPlatform = new Platform();\n addObject (startingPlatform, 300, 550);\n // Loop through as many Meteors as there are on this level\n for (int i = 0; i < platforms.length; i++)\n {\n // Initialize a new Platform object for each spot in the array\n platforms[i] = new Platform ();\n // Add each platform at a random position anywhere on the X axis and at intervals of 15 on the Y axis\n addObject (platforms[i], Greenfoot.getRandomNumber(600), platformCounter);\n platformCounter = platformCounter - 55;\n }\n }", "private void setup() {\n\t\t map.setMyLocationEnabled(true);\n\t \n\t CameraPosition cameraPosition = new CameraPosition.Builder()\n\t .target(USMP_LOCATION) // Sets the center of the map to\n\t // Golden Gate Bridge\n\t .zoom(16) // Sets the zoom\n\t .bearing(90) // Sets the orientation of the camera to east\n\t .tilt(60) // Sets the tilt of the camera to 30 degrees\n\t .build(); // Creates a CameraPosition from the builder\n\t \n\t CameraUpdate cameraUpdate=CameraUpdateFactory.newCameraPosition(\n\t \t cameraPosition);\n\t\t map.animateCamera(cameraUpdate);\n\t\t \n\t map.addMarker(new MarkerOptions()\n\t .position(USMP_LOCATION)\n\t .title(\"DevFest 2013 Season 2\"));\n\t}", "private void initializeBoundary() {\n\t\tapp = new Application(model);\n\t}" ]
[ "0.72868526", "0.6739066", "0.67386353", "0.6687387", "0.652481", "0.65082127", "0.6434996", "0.6385495", "0.63833463", "0.63551706", "0.6334548", "0.63295203", "0.6328409", "0.63211757", "0.6307975", "0.6252953", "0.61901426", "0.6187943", "0.6180147", "0.6179769", "0.61751467", "0.6164969", "0.6160723", "0.61590534", "0.6149757", "0.6098711", "0.60782325", "0.6077072", "0.60667795", "0.60570747", "0.604177", "0.6032979", "0.6028329", "0.6015249", "0.6005794", "0.6004073", "0.60031897", "0.59755903", "0.59741414", "0.5949062", "0.5944925", "0.5940069", "0.59245825", "0.58924836", "0.58882457", "0.5882464", "0.5873111", "0.5872984", "0.5871958", "0.5835491", "0.5835359", "0.58280957", "0.5826268", "0.5800102", "0.5799047", "0.57941234", "0.5792451", "0.57825154", "0.57623506", "0.5757483", "0.57529235", "0.5752219", "0.5749576", "0.573596", "0.57354236", "0.57323855", "0.57293564", "0.57265824", "0.5725947", "0.5724841", "0.57173795", "0.5708035", "0.57080096", "0.57073087", "0.5699059", "0.56915987", "0.56908655", "0.568304", "0.56788826", "0.56751734", "0.5674299", "0.56701744", "0.566942", "0.5665272", "0.5664025", "0.5659322", "0.5652452", "0.56520104", "0.5648058", "0.5645763", "0.5644878", "0.564454", "0.56444156", "0.56402814", "0.5639439", "0.56328946", "0.56293184", "0.5625686", "0.5620988", "0.56187665" ]
0.7781552
0
Make new bomb items and commanders for each test.
@Before public void prepare() { bomb = new Special(SpecialType.NUKE); com = new Commander(0, 0, 0, 1); baseHP = com.getHealth(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void fillBombs()\r\n {\r\n for (int i = 0; i < gameBoard.BOMB_COUNT; i++)\r\n {\r\n Cell tempCell = new Cell(true);\r\n tempCell.makeBomb();\r\n initBombClick(tempCell);\r\n gameBoard.bombList.add(tempCell);\r\n }\r\n for (int j = gameBoard.BOMB_COUNT; j < (gameBoard.BOARD_WIDTH * gameBoard.BOARD_WIDTH); j++)\r\n {\r\n Cell tempCell = new Cell(false);\r\n initEmptyClick(tempCell);\r\n gameBoard.bombList.add(tempCell);\r\n }\r\n Collections.shuffle(gameBoard.bombList);\r\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 }", "private void placeBombs() {\n\t\tfor (int i = 0; i < NUM_BOMBS; i++) {\n\t\t\tplaceBomb();\n\t\t}\n\t}", "@Before\r\n\tpublic void setUp()\r\n\t{\r\n\t\ttestCanPlaceBombBehavior = new CanPlaceBombBehavior(3);\r\n\t}", "@Override\n public void setTestItem(){\n expectedName = \"Common lightMagicBook\";\n expectedPower = 10;\n expectedMinRange = 1;\n expectedMaxRange = 2;\n lightMagicBook = new LightMagicBook(expectedName,expectedPower,expectedMinRange,expectedMaxRange);\n animaMagicBook1 = new AnimaMagicBook(\"\",30,1,2);\n darknessMagicBook1 = new DarknessMagicBook(\"\",30,1,2);\n }", "public void createItem()\n {\n \n necklace_red = new Item (\"Red Necklace\",\"This is a strange red necklace\");\n poolroom.addItem(necklace_red);\n \n // items in dancing room // \n gramophone = new Item (\"Gramophone\",\"This is a nice gramophone but without disk\");\n candelar = new Item(\"Candelar\",\"This candelar gives light and is really beautiful\");\n dancingroom.addItem(gramophone);\n dancingroom.addItem(candelar);\n \n //items in hall //\n potion2HP = new Potion(\"Potion 2 HP\",\"This potion gives 2 HP to the player\",2);\n hall.addItem(potion2HP);\n \n //items in corridor //\n halberd = new Weapon(\"Halberd\",\"This the statut halberd. It was not a really good idea to take it\",4,60);\n corridor.addItem(halberd);\n \n // items in bathroom //\n potion6HP = new Potion(\"Potion6HP\",\"This potions gives 6 HP to the player\",6);\n bathroom.addItem(potion6HP);\n \n // items in guestbedroom //\n Exit exit_from_corridor_to_bedroom = new Exit(\"south\",corridor,false, null);\n bedroomkey = new Keys(\"Bedroom key\",\"This key opens the master bedroom door\",exit_from_corridor_to_bedroom);\n guestbedroom.addItem(bedroomkey);\n \n // items in kitchen // \n set_of_forks_and_knives = new Weapon(\"Set of forks and knives\",\"This weapon is a set of silver forks and silver knives\",2,40);\n kitchen.addItem(set_of_forks_and_knives);\n \n // items in bedroom //\n Item disk = new Item(\"Disk\",\"This disk can be used with the gramophone\");\n bedroom.addItem(disk);\n \n Potion potion3HP = new Potion (\"Potion3HP\",\"This potions gives 3 HP to the player\",3);\n bedroom.addItem(potion3HP);\n \n Item money = new Item(\"Money\",\"You find 60 pounds\");\n bedroom.addItem(money);\n \n // items in the library //\n Item book = new Item(\"Book\",\"The title book is 'The best human friend : the cat'\");\n library.addItem(book);\n \n // items in laboratory //\n Exit exit_from_corridor_to_attic = new Exit(\"up\",corridor,false, null);\n Keys attickey = new Keys(\"Attic key\",\"This key is a shaped bone from a squeletor\", exit_from_corridor_to_attic); \n laboratory.addItem(attickey);\n \n Item construction_drawing = new Item(\"Construction drawing\",\"You find construction drawings. Mr Taylor planed to dig really deeply to the east of the gardener hut\");\n laboratory.addItem(construction_drawing);\n \n //items in garden //\n Weapon fork = new Weapon(\"Fork\",\"This fork is green and brown\",3,50);\n garden.addItem(fork);\n \n Potion apple = new Potion(\"Apple\",\"This apples gives you 2 HP\",2);\n garden.addItem(apple);\n \n // items in gardenerhut //\n \n Item pliers = new Item(\"Pliers\",\"You can cut a chain with this object\");\n gardenerhut.addItem(pliers);\n \n Item ritual_cape = new Item(\"Ritual cape\",\"You find a black ritual cape. It is very strange !\");\n gardenerhut.addItem(ritual_cape);\n \n Item necklace_black_1 = new Item(\"Necklace\",\"You find a very strange necklace ! It is a black rond necklace with the same symbol than in the ritual cape\");\n gardenerhut.addItem(necklace_black_1);\n \n //items in anteroom //\n \n Potion potion4HP = new Potion(\"Potion4HP\",\"This potion gives 4 HP to the player\",4);\n anteroom.addItem(potion4HP);\n \n Weapon sword = new Weapon(\"Sword\",\"A really sharp sword\",6,70);\n anteroom.addItem(sword);\n // items in ritual room //\n \n Item red_ritual_cape = new Item(\"Red ritual cape\", \"This is a ritual cape such as in the gardener hut but this one is red. There are some blond curly hairs\");\n ritualroom.addItem(red_ritual_cape);\n \n Item black_ritual_cape_1 = new Item(\"Black ritual cape\",\"This is a black ritual cape\");\n ritualroom.addItem(black_ritual_cape_1);\n \n Item black_ritual_cape_2 = new Item (\"Black ritual cape\",\"Another black ritual cape\");\n ritualroom.addItem(black_ritual_cape_2);\n \n }", "@Test\n public void testBombCommand() {\n List<Country> l_countryList = new ArrayList();\n\n //creating a new country object\n Country l_country = new Country();\n l_country.setD_continentIndex(1);\n l_country.setD_countryIndex(1);\n l_country.setD_countryName(\"india\");\n List<String> l_neighborList = new ArrayList();\n l_neighborList.add(\"china\");\n\n //added neighbour of country \n l_country.setD_neighbourCountries(l_neighborList);\n l_countryList.add(l_country);\n d_player.setD_ownedCountries(l_countryList);\n\n d_orderProcessor.processOrder(\"boMb china\".trim(), d_gameData);\n d_gameData.getD_playerList().get(0).issue_order();\n Order l_order = d_gameData.getD_playerList().get(0).next_order();\n assertEquals(true, l_order.executeOrder());\n\n //checking number of armies after using bomb card\n for (Map.Entry<Integer, Continent> l_continent : d_gameData.getD_warMap().getD_continents().entrySet()) {\n for (Country l_countryName : l_continent.getValue().getD_countryList()) {\n if (l_countryName.getD_countryName().equals(\"china\")) {\n assertEquals(5, l_countryName.getD_noOfArmies());\n }\n }\n }\n }", "@Override\n @Test\n public void equipTest() {\n Axe axes;\n Sword sword;\n Staff staff;\n Spear spear;\n Luz luz;\n Oscuridad oscuridad;\n Anima anima;\n Bow bow;\n axes = new Axe(\"Axe\", 20, 1, 2);\n sword = new Sword(\"Sword\", 20, 1, 2);\n spear = new Spear(\"Spear\", 20, 1, 2);\n staff = new Staff(\"Staff\", 20, 1, 2);\n bow = new Bow(\"Bow\", 20, 2, 3);\n anima = new Anima(\"Anima\", 20, 1, 2);\n luz = new Luz(\"Luz\", 20, 1, 2);\n oscuridad = new Oscuridad(\"Oscuridad\", 20, 1, 2);\n sorcererAnima.addItem(axes);\n sorcererAnima.equipItem(axes);\n assertNull(sorcererAnima.getEquippedItem());\n sorcererAnima.items.remove(axes);\n sorcererAnima.addItem(sword);\n sorcererAnima.equipItem(sword);\n assertNull(sorcererAnima.getEquippedItem());\n sorcererAnima.items.remove(sword);\n sorcererAnima.addItem(spear);\n sorcererAnima.equipItem(spear);\n assertNull(sorcererAnima.getEquippedItem());\n sorcererAnima.items.remove(spear);\n sorcererAnima.addItem(staff);\n sorcererAnima.equipItem(staff);\n assertNull(sorcererAnima.getEquippedItem());\n sorcererAnima.items.remove(staff);\n sorcererAnima.addItem(bow);\n sorcererAnima.equipItem(bow);\n assertNull(sorcererAnima.getEquippedItem());\n sorcererAnima.items.remove(bow);}", "private void multi(EntityManager manager) {\r\n if (manager.getAmmo(4) == 0 && !testMode) {\r\n changeGuns(0, manager);\r\n manager.outOfAmmo();\r\n return;\r\n }\r\n\r\n float newRotationR = rotationZ - 90;\r\n float newRotationL = rotationZ + 90;\r\n float newRotationD = rotationZ + 180;\r\n\r\n float leftX = (float) Math.sin(Math.toRadians(newRotationL));\r\n float leftY = (float) -Math.cos(Math.toRadians(newRotationL));\r\n\r\n float rightX = (float) Math.sin(Math.toRadians(newRotationR));\r\n float rightY = (float) -Math.cos(Math.toRadians(newRotationR));\r\n\r\n float downX = (float) Math.sin(Math.toRadians(newRotationD));\r\n float downY = (float) -Math.cos(Math.toRadians(newRotationD));\r\n\r\n Shot leftshot = new Shot(shotTexture, getX() + forwardX, getY() + forwardY, leftX * 100, leftY * 100, 150, 1.5f, 0, 1, 0, true, 200, false);\r\n\r\n Shot rightshot = new Shot(shotTexture, getX() + forwardX, getY() + forwardY, rightX * 100, rightY * 100, 150, 1.5f, 0, 0, 1, true, 200, false);\r\n\r\n Shot upshot = new Shot(shotTexture, getX() + forwardX, getY() + forwardY, forwardX * 100, forwardY * 100, 150, 1.5f, 1, 0, 0, true, 200, false);\r\n\r\n Shot downshot = new Shot(shotTexture, getX() + forwardX, getY() + forwardY, downX * 100, downY * 100, 150, 1.5f, 1, 1, 0.82f, true, 200, false);\r\n\r\n manager.addEntity(leftshot);\r\n manager.addEntity(rightshot);\r\n manager.addEntity(upshot);\r\n manager.addEntity(downshot);\r\n if (!testMode) manager.updateAmmo(4, -1, false);\r\n manager.shotFired(4);\r\n }", "@Before\n public void setUp()\n {\n hikerClub= new ClimbingClub();\n \n hikerClub.addClimb(\"Monadnock\", 274);\n hikerClub.addClimb(\"Whiteface\", 301);\n hikerClub.addClimb(\"Algonquin\", 225);\n hikerClub.addClimb(\"Monadnock\", 344);\n \n hikerClub2= new ClimbingClub();\n hikerClub2.addClimbSorted(\"Monadnock\", 274);\n hikerClub2.addClimbSorted(\"Whiteface\", 301);\n hikerClub2.addClimbSorted(\"Algonquin\", 225);\n hikerClub2.addClimbSorted(\"Monadnock\", 344);\n }", "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 plantBomb()\n {\n if(this.getBombs() > 0)\n {\n bController.addBomb(this.getxPos(), this.getyPos(), 25);\n this.setBombs(getBombs() - 1);\n }\n }", "public void setup() {\r\n\r\n\t\tfor (int i = 0; i < 5; i++) {\r\n\t\t\tthis.bag.add(new Gem(1));\r\n\t\t}\r\n\t\tthis.bag.add(new Crash());\r\n\t}", "private void generateItemEntities(){\n\t\tfinal int NUM_POTIONS = 6;\n\t\tfinal int NUM_IRON_ARMOUR = 1;\n\t\tfinal int NUM_CHESTS = 2;\n\t\tfinal String ITEM_BOX_STYLE = \"tundra\";\n\t\t\n\n\t\tfor (int i = 0; i < NUM_POTIONS; i++) {\n\t\t\tTile tile = getTile(Item.randomItemPositionGenerator(DEFAULT_WIDTH),\n\t\t\t\t\tItem.randomItemPositionGenerator(DEFAULT_HEIGHT));\n\t\t\tif (!tile.hasParent()) {\n\t\t\t\tHealthPotion potion = new HealthPotion(tile, false,(PlayerPeon) getPlayerEntity(), ITEM_BOX_STYLE);\n\t\t\t\tentities.add(potion);\n\t\t\t\tthis.allTundraDialogues.add(potion.getDisplay());\n\t\t\t} else {\n\t\t\t\ti--;\n\t\t\t}\n\n\t\t}\n\t\tfor (int i = 0; i < NUM_IRON_ARMOUR; i++) {\n\t\t\tTile tile = getTile(Item.randomItemPositionGenerator(DEFAULT_WIDTH),\n\t\t\t\t\tItem.randomItemPositionGenerator(DEFAULT_HEIGHT));\n\t\t\tif (!tile.hasParent()) {\n\t\t\t\tIronArmour ironArmour = new IronArmour(tile, false,\n\t\t\t\t\t\t(PlayerPeon) getPlayerEntity(), ITEM_BOX_STYLE,200);\n\t\t\t\tentities.add(ironArmour);\n\t\t\t\tthis.allTundraDialogues.add(ironArmour.getDisplay());\n\t\t\t} else {\n\t\t\t\ti--;\n\t\t\t}\n\n\t\t}\n\t\tfor (int i = 0; i < NUM_CHESTS; i++) {\n\t\t\tTile tile = getTile(Item.randomItemPositionGenerator(DEFAULT_WIDTH),\n\t\t\t\t\tItem.randomItemPositionGenerator(DEFAULT_HEIGHT));\n\t\t\tif (!tile.hasParent()) {\n\t\t\t\tTreasure chest = new Treasure(tile, false,(PlayerPeon) getPlayerEntity(), ITEM_BOX_STYLE);\n\t\t\t\tentities.add(chest);\n\t\t\t\tthis.allTundraDialogues.add(chest.getDisplay());\n\t\t\t} else {\n\t\t\t\ti--;\n\t\t\t}\n\t\t}\n\n\t\tTile cooldownring = getTile(18,17);\n\t\tCooldownRing cdring = new CooldownRing(cooldownring, false,\n\t\t\t\t(PlayerPeon) this.getPlayerEntity(), ITEM_BOX_STYLE,0.5f);\n\t\tentities.add(cdring);\n\t\tthis.allTundraDialogues.add(cdring.getDisplay());\n\n\t\tTile attackAmuletTile = getTile(-19,14);\n\t\tAmulet attackAmulet = new Amulet(attackAmuletTile, false,\n\t\t\t\t(PlayerPeon) this.getPlayerEntity(), ITEM_BOX_STYLE,10);\n\t\tentities.add(attackAmulet);\n\t\tthis.allTundraDialogues.add(attackAmulet.getDisplay());\n\n\t}", "public static void createItems(){\n Registry.register(Registry.ITEM, new Identifier(nameSpace, \"breadly\"), BREADLY);\n Registry.register(Registry.ITEM, new Identifier(nameSpace, \"hard_boiled_egg\"), HARD_BOILED_EGG);\n\n\n Registry.register(Registry.ITEM, new Identifier(nameSpace, \"ender_dragon_spawn_egg\"), ENDER_DRAGON_SPAWN_EGG);\n Registry.register(Registry.ITEM, new Identifier(nameSpace, \"wither_spawn_egg\"), WITHER_SPAWN_EGG);\n Registry.register(Registry.ITEM, new Identifier(nameSpace, \"illusioner_spawn_egg\"), ILLUSIONER_SPAWN_EGG);\n Registry.register(Registry.ITEM, new Identifier(nameSpace, \"giant_spawn_egg\"), GIANT_SPAWN_EGG);\n Registry.register(Registry.ITEM, new Identifier(nameSpace, \"spawn_spawn_egg\"), SPAWN_SPAWN_EGG);\n }", "public void makeTombstone()\r\n\t\t{\r\n\t\t\tisTombstone = true;\r\n\t\t}", "@BeforeClass\n\tpublic static void generatingItems() {\n\t\tfor (Item i : allItems) {\n\t\t\tif (i.getType().equals(\"spores engine\")) {\n\t\t\t\titem4 = i;\n\t\t\t}\n\t\t}\n\t\tltsTest = new LongTermStorage();\n\t\tltsTest1 = new LongTermStorage();\n\t}", "public void bake() {\n baked = true;\n\n this.registerItemsEffective();\n\n // Remove capability constructors for capabilities that are not initialized.\n removeNullCapabilities(capabilityConstructorsTile, capabilityConstructorsTileSuper, null);\n removeNullCapabilities(capabilityConstructorsEntity, capabilityConstructorsEntitySuper, null);\n removeNullCapabilities(capabilityConstructorsItem, capabilityConstructorsItemSuper, capabilityConstructorsItemInstance);\n\n // Bake all collections\n capabilityConstructorsTileSuper = ImmutableList.copyOf(capabilityConstructorsTileSuper);\n capabilityConstructorsEntitySuper = ImmutableList.copyOf(capabilityConstructorsEntitySuper);\n capabilityConstructorsItemSuper = ImmutableList.copyOf(capabilityConstructorsItemSuper);\n\n }", "@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}", "private static void addFakeItemDataToInWorldBlocksAndCleanUpFakeData() {\n\n Map<String, Materials> MATERIALS_MAP = null;\n\n try {\n Field f = Materials.class.getDeclaredField(\"MATERIALS_MAP\");\n f.setAccessible(true);\n MATERIALS_MAP = (Map<String, Materials>) f.get(null);\n } catch (NoSuchFieldException | IllegalAccessException | ClassCastException e) {\n e.printStackTrace();\n }\n\n if (MATERIALS_MAP == null)\n throw new NullPointerException(\"MATERIALS_MAP null!\");\n\n Materials oreMat = new Materials(-1, null, 0, 0, 0, false, \"bwores\", \"bwores\", null, true, null);\n Materials smallOreMat = new Materials(-1, null, 0, 0, 0, false, \"bwsmallores\", \"bwsmallores\", null, true, null);\n Materials blockMat = new Materials(-1, null, 0, 0, 0, false, \"bwblocks\", \"bwblocks\", null, true, null);\n\n for (int i = 0; i < 16; i++) {\n GT_OreDictUnificator.addAssociation(ore, oreMat, new ItemStack(BWOres, 1, i), true);\n GT_OreDictUnificator.addAssociation(oreSmall, smallOreMat, new ItemStack(BWSmallOres, 1, i), true);\n GT_OreDictUnificator.addAssociation(block, blockMat, new ItemStack(BWBlocks, 1, i), true);\n }\n\n MATERIALS_MAP.remove(\"bwores\");\n MATERIALS_MAP.remove(\"bwsmallores\");\n MATERIALS_MAP.remove(\"bwblocks\");\n }", "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}", "public void createCharacters()\n {\n Item item_chambermaid = new Item(\"Broom\",\"The brush that she uses\");\n Item item_bob_taylor = new Item(\"Toys\",\"Bob Taylor toys\");\n Item item_mr_Cunningham = new Item(\"Black hat\",\"The nice hat of Mr Cunningham\");\n Item item_ms_Wellington = new Item(\"Ring\", \"This is the wedding ring\");\n \n // Neutral characters creation //\n mr_Taylor = new Neutral(\"Mr Taylor\",\" \", poolroom, \"..\\\\pictures\\\\Characters\\\\MrTaylor2.png\");\n ms_Taylor = new Neutral(\"Ms Taylor\",\"Oh no ! My poor husband is dead ! What am I going to do now ?!\", poolroom, \"..\\\\pictures\\\\Characters\\\\MsTaylor2.png\");\n ms_Cunningham = new Neutral(\"Ms Cunningham\",\"My husband was the best old friend of Mr Taylor\", poolroom, \"..\\\\pictures\\\\Characters\\\\MsCunningham2.png\");\n \n // Ally characters creation //\n chambermaid = new Ally(\"Chambermaid\",\"I was in the dancing room to serve the guests.I was not with the master\", poolroom, item_chambermaid, \"..\\\\pictures\\\\Characters\\\\Chambermaid.png\");\n bob_Taylor = new Ally(\"Bob Taylor\",\"What happened to my father ? \", poolroom, item_bob_taylor, \"..\\\\pictures\\\\Characters\\\\BobTaylor2.png\");\n mr_Cunningham = new Ally(\"Mr Cunningham\", \"I was in my bedroom when I heard someone screaming. So I went down stairs quickly\", poolroom, item_mr_Cunningham, \"..\\\\pictures\\\\Characters\\\\MrCunningham2.png\");\n ms_Wellington = new Ally(\"Ms Wellington\", \"I was in the dancing room with my husband. The chambermaid served us.\", poolroom, item_ms_Wellington, \"..\\\\pictures\\\\Characters\\\\MsWellington2.png\");\n \n // Enemy characters ceration //\n valet = new Enemy(\"Valet\",\"I was in the kitchen. I checked the wine delivery\", poolroom,4,80,12,\"..\\\\pictures\\\\Characters\\\\Valet2.png\"); // damage =4 accuraccy = 80, HP=12\n caretaker = new Enemy(\"Caretaker\",\"I was in my hut to repair the fork\",poolroom, 2,20,5, \"..\\\\pictures\\\\Characters\\\\Caretaker2.png\"); // damage =2 accuraccy = 20, HP=5\n mr_Wellington = new Enemy(\"Mr Wellington\",\"I was in the dancing room with my wife\", poolroom, 1,10,7, \"..\\\\pictures\\\\Characters\\\\MrWellington2.png\"); // damage =1 accuraccy = 10, HP=7\n nina_Taylor = new Enemy(\"Nina Taylor\", \"I was in the library and I read a good book\", poolroom, 2, 30, 8,\"..\\\\pictures\\\\Characters\\\\NinaTaylor2.png\"); // damage =2 accuraccy = 30, HP=8\n skeleton = new Enemy(\"Oscar the skeleton\",\"A human skeleton\", laboratory, 2, 80, 5,\"..\\\\pictures\\\\Characters\\\\skeleton.png\");\n ghost = new Enemy(\"Casper the Ghost\", \"A little green ghost\", livingroom, 1, 50, 4, \"..\\\\pictures\\\\Characters\\\\ghost.png\");\n \n listOfPNG = new ArrayList();\n listOfPNG.add(ms_Taylor);\n listOfPNG.add(ms_Cunningham);\n listOfPNG.add(chambermaid);\n listOfPNG.add(bob_Taylor);\n listOfPNG.add(mr_Cunningham);\n listOfPNG.add(ms_Wellington);\n //listOfPNG.add(valet);\n //listOfPNG.add(caretaker);\n listOfPNG.add(mr_Wellington);\n listOfPNG.add(nina_Taylor);\n \n \n }", "protected void putItems() {\n\t\tlevelSetup[0][5].putItem(new Dynamite());\n\t\tlevelSetup[6][6].putItem(new Flint());\n\t\tlevelSetup[6][3].putItem(new ManaPotion());\n\t\tlevelSetup[5][0].putItem(new ManaPotion());\n\t\tlevelSetup[2][1].putItem(new HealthPotion());\n\t\tlevelSetup[3][6].putItem(new HealthPotion());\n\t\tlevelSetup[4][2].putItem(new Spinach());\n\t}", "private void generateItemEntities(){\n final int NUM_POTIONS = 6;\n final int NUM_IRON_ARMOUR = 1;\n final int NUM_CHESTS = 2;\n final String ITEM_BOX_STYLE = \"volcano\";\n\n\n for (int i = 0; i < NUM_POTIONS; i++) {\n Tile tile = getTile(Item.randomItemPositionGenerator(DEFAULT_WIDTH),\n Item.randomItemPositionGenerator(DEFAULT_HEIGHT));\n if (Integer.parseInt(tile.getTextureName().split(\"_\")[1]) < 5\n && !tile.hasParent()) {\n HealthPotion potion = new HealthPotion(tile,false,\n (PlayerPeon) getPlayerEntity(), ITEM_BOX_STYLE);\n entities.add(potion);\n this.allVolcanoDialogues.add(potion.getDisplay());\n } else {\n i--;\n }\n }\n for (int i =0; i < NUM_IRON_ARMOUR; i++){\n Tile tile = getTile(Item.randomItemPositionGenerator(DEFAULT_WIDTH),\n Item.randomItemPositionGenerator(DEFAULT_HEIGHT));\n if (Integer.parseInt(tile.getTextureName().split(\"_\")[1]) < 5\n && !tile.hasParent()) {\n IronArmour ironArmour = new IronArmour(tile, false,\n (PlayerPeon) getPlayerEntity(),ITEM_BOX_STYLE,200);\n entities.add(ironArmour);\n this.allVolcanoDialogues.add(ironArmour.getDisplay());\n } else {\n i--;\n }\n }\n for (int i = 0; i <NUM_CHESTS; i++){\n Tile tile = getTile(Item.randomItemPositionGenerator(DEFAULT_WIDTH),\n Item.randomItemPositionGenerator(DEFAULT_HEIGHT));\n if (Integer.parseInt(tile.getTextureName().split(\"_\")[1]) < 5\n && !tile.hasParent()) {\n Treasure chest = new Treasure(tile, false,\n (PlayerPeon) getPlayerEntity(),ITEM_BOX_STYLE);\n entities.add(chest);\n this.allVolcanoDialogues.add(chest.getDisplay());\n } else {\n i--;\n }\n }\n\n Tile cooldownring = getTile(20,-7);\n CooldownRing cdring = new CooldownRing(cooldownring, false,\n (PlayerPeon) this.getPlayerEntity(), ITEM_BOX_STYLE,0.5f);\n entities.add(cdring);\n this.allVolcanoDialogues.add(cdring.getDisplay());\n\n Tile attackAmuletTile = getTile(2,14);\n Amulet attackAmulet = new Amulet(attackAmuletTile, false,\n (PlayerPeon) this.getPlayerEntity(), ITEM_BOX_STYLE,10);\n entities.add(attackAmulet);\n this.allVolcanoDialogues.add(attackAmulet.getDisplay());\n\n }", "private void makeObject() {\n\t\t\n\t\tItem I1= new Item(1,\"Cap\",10.0f,\"to protect from sun\");\n\t\tItemMap.put(1, I1);\n\t\t\n\t\tItem I2= new Item(2,\"phone\",100.0f,\"Conversation\");\n\t\tItemMap.put(2, I2);\n\t\t\n\t\tSystem.out.println(\"Objects Inserted\");\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}", "@Test\r\n\tpublic void testIncrementBomb()\r\n\t{\r\n\t\ttestCanPlaceBombBehavior.decrementBomb();\r\n\t\tassertEquals(2,testCanPlaceBombBehavior.countBomb());\r\n\t\t\r\n\t\ttestCanPlaceBombBehavior.decrementBomb();\r\n\t\tassertEquals(1,testCanPlaceBombBehavior.countBomb());\r\n\t\t\r\n\t\ttestCanPlaceBombBehavior.incrementBomb();\r\n\t\tassertEquals(2,testCanPlaceBombBehavior.countBomb());\r\n\t\t\r\n\t\ttestCanPlaceBombBehavior.incrementBomb();\r\n\t\tassertEquals(3,testCanPlaceBombBehavior.countBomb());\r\n\t}", "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 }", "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 prepare()\n {\n treespawn treespawn2 = new treespawn();\n addObject(treespawn2,30,486);\n\n hantu hantu = new hantu();\n addObject(hantu,779,359);\n \n hantu hantu2 = new hantu();\n addObject(hantu2,88,84);\n \n bergerak bergerak2 = new bergerak();\n addObject(bergerak2,745,423);\n\n bergerak bergerak3 = new bergerak();\n addObject(bergerak3,266,566);\n \n bergerak bergerak4 = new bergerak();\n addObject(bergerak4,564,566);\n\n hantu hantu3 = new hantu();\n addObject(hantu3,671,490);\n \n hantu hantu4 = new hantu();\n addObject(hantu4,371,499);\n\n bergerak bergerak = new bergerak();\n addObject(bergerak,150,148);\n\n lantai lantai = new lantai();\n addObject(lantai,561,577); \n addObject(lantai,419,579); \n\n player player = new player();\n addObject(player,882,498);\n\n lantai3 lantai3 = new lantai3();\n addObject(lantai3,120,148);\n\n flyinglantai flyinglantai = new flyinglantai();\n addObject(flyinglantai,292,148);\n\n treespawn treespawn = new treespawn();\n addObject(treespawn,30,291);\n\n lantai4 lantai4 = new lantai4();\n addObject(lantai4,235,536);\n \n lantai4 lantai42 = new lantai4();\n addObject(lantai42,275,508);\n \n lantai4 lantai43 = new lantai4();\n addObject(lantai43,323,480);\n \n lantai4 lantai44 = new lantai4();\n addObject(lantai44,369,454);\n\n lantai2 lantai2 = new lantai2();\n addObject(lantai2,680,424);\n\n \n lantai3 lantai32 = new lantai3();\n addObject(lantai32,938,146);\n \n lantai4 lantai45 = new lantai4();\n addObject(lantai45,21,370);\n\n lantai4 lantai46 = new lantai4();\n addObject(lantai46,210,180);\n \n lantai4 lantai47 = new lantai4();\n addObject(lantai47,257,201);\n \n lantai4 lantai48 = new lantai4();\n addObject(lantai48,302,229);\n \n lantai4 lantai49 = new lantai4();\n addObject(lantai49,354,255);\n \n lantai4 lantai410 = new lantai4();\n addObject(lantai410,402,281);\n \n lantai4 lantai411 = new lantai4();\n addObject(lantai411,444,302);\n \n lantai4 lantai412 = new lantai4();\n addObject(lantai412,491,334);\n \n lantai4 lantai413 = new lantai4();\n addObject(lantai413,546,364);\n \n lantai4 lantai414 = new lantai4();\n addObject(lantai414,582,397);\n \n doorlv3 doorlv3 = new doorlv3();\n addObject(doorlv3,910,45);\n\n \n }", "static void test2() {\n\n System.out.println( \"Begin test2. ===============================\\n\" );\n\n Thread init = Thread.currentThread(); // init spawns the Mogwais\n\n System.out.println( \"TODO: write a more involved test here.\" );\n //\n // Create a GremlinsBridge of capacity 3.\n // Set an OPTIONAL, test delay to stagger the start of each mogwai.\n // Create the Mogwais and store them in an array.\n // Run them by calling their start() method.\n // Now, the test must give the mogwai time to finish their crossings.\n //\n System.out.println( \"TODO: follow the pattern of the example tests.\" );\n System.out.println( \"\\n=============================== End test2.\" );\n }", "private void createWeapons()\n {\n woodSword = new Weapon(\"wood sword\", \" | does 12 damage\", 10, true); \n rustedSword = new Weapon(\"rusted sword\", \" | does 17 damage\", 15, true);\n silverSword = new Weapon(\"silver sword\", \" | does 32 damage\", 30, true);\n goldSword = new Weapon(\"gold sword\", \" | does 22 damage\", 20, true);\n titaniumSword = new Weapon(\"titanium sword\", \" | does 52 damage\", 50, true);\n silverSpear = new Weapon(\"silver spear\", \" | does 25 damage\", 23, true);\n infantryBow = new Weapon(\"infantry bow\", \" | does 30 damage\", 28, true);\n }", "private void createBasicEnemies() {\n\t\tint xTemp1 = (int) app.random(60, 500);\n\t\tint xTemp2 = (int) app.random(650, 1140);\n\t\tint yTemp = -60;\n\t\t\n\t\t//Contador para crear enemigo cada cierto tiempo\n\t\tapp.frameRate(80);\n\t\t\n\t\t//Agregar enemigos basicos\n\t\tif (app.frameCount%120 == 0) {\n\t\t\tbasicEnemies1.add(new BasicEnemy(app, xTemp1, yTemp));\n\t\t\tbasicEnemies2.add(new BasicEnemy(app, xTemp2, yTemp));\n\t\t}\n\t\t\n\t\t//Agregar enemigos que disparan\t\t\n\t\tif (app.frameCount%250 == 0) {\n\t\t\thardEnemies1.add(new HardEnemy(app, xTemp1, yTemp));\n\t\t\thardEnemies2.add(new HardEnemy(app, xTemp2, yTemp));\n\t\t}\n\t}", "private void gameCycle() {\n \t\t// The first item is the recycle bin\n \t\tRecycleBin rb = (RecycleBin) objects.get(0);\n \t\tdouble r = Math.random();\n \n \t\t// Exponential difficulty for each item collected\n \n \n \t\tif (Math.pow(1.1, -0.002 * rb.getAmountCollected()) < r) {\n \t\t\tmakeDialog();\n \t\t}\n \n \t\t// Large items should be created less often later\n \t\tif ((-2 * Math.pow(3, 0.2 * -(rb.getAmountCollected() + 20)) + 0.9) < r) {\n \n \t\t\tSysfile foo = new Sysfile(getBounds(), Sysfile.Size.L);\n \t\t\tfoo.setPosition(new Point2D.Double(\n \t\t\t\t\t(int) (Math.random() * (getWidth() - foo.getAreaRect().width)),\n \t\t\t\t\t10));\n \t\t\tsynchronized (lock) {\n \t\t\t\tobjects.add(foo);\n \t\t\t}\n \t\t}\n \n \t\t// Smaller sysfiles are created more often the more itmes are collected\n \t\tif (Math.pow(1.2, -0.002 * rb.getAmountCollected()) < r) {\n \n \t\t\tSysfile foo = new Sysfile(getBounds(), Sysfile.Size.M);\n \t\t\tfoo.setPosition(new Point2D.Double(\n \t\t\t\t\t(int) (Math.random() * (getWidth() - foo.getAreaRect().width)),\n \t\t\t\t\t10));\n \t\t\tsynchronized (lock) {\n \t\t\t\tobjects.add(foo);\n \t\t\t}\n \t\t}\n \n \t\tif (Math.pow(2.0, -0.002 * rb.getAmountCollected()) < r) {\n \n \t\t\tSysfile foo = new Sysfile(getBounds(), Sysfile.Size.S);\n \t\t\tfoo.setPosition(new Point2D.Double(\n \t\t\t\t\t(int) (Math.random() * (getWidth() - foo.getAreaRect().width)),\n \t\t\t\t\t10));\n \t\t\tsynchronized (lock) {\n \t\t\t\tobjects.add(foo);\n \t\t\t}\n \t\t}\n \n \n \n \t\t// Junk items are created regularly\n \t\tif (Math.random() < 0.005) {\n \t\t\tJunk bar = new Junk(getBounds());\n \t\t\tbar.setPosition(new Point2D.Double(\n \t\t\t\t\t(int) (Math.random() * (getWidth() - bar.getAreaRect().width)),\n \t\t\t\t\t10));\n \t\t\tsynchronized (lock) {\n \t\t\t\tobjects.add(bar);\n \t\t\t}\n \t\t}\n \t}", "@Test\r\n\tpublic void BushTest_1(){\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}catch(GameException e){\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "@Before\n public void setUp() {\n boiler1 = Boiler1.getUniqueInstance();\n boiler1.boiled = false;\n boiler1.empty = true;\n }", "public void act()\n {\n if (Greenfoot.getRandomNumber(200) < 3)\n {\n addObject(new Cabbage(), Greenfoot.getRandomNumber(600), 0);\n }\n \n if (Greenfoot.getRandomNumber(200) < 3)\n {\n addObject(new Eggplant(), Greenfoot.getRandomNumber(600), 0);\n }\n \n if (Greenfoot.getRandomNumber(200) < 3)\n {\n addObject(new Onion(), Greenfoot.getRandomNumber(600), 0);\n }\n \n if (Greenfoot.getRandomNumber(300) < 3)\n {\n addObject(new Pizza(), Greenfoot.getRandomNumber(600), 0);\n }\n \n if (Greenfoot.getRandomNumber(400) < 3)\n {\n addObject(new Cake(), Greenfoot.getRandomNumber(600), 0);\n }\n \n if (Greenfoot.getRandomNumber(400) < 3)\n {\n addObject(new Icecream(), Greenfoot.getRandomNumber(600), 0);\n }\n countTime();\n }", "public Scenario() {\n Room ninjaRoom, weaponroom, meetingRoom, zenTemple, stealthRoom, restRoom, masterRoom, ninjaTransporter;\n\n // create the rooms\n ninjaRoom = new Room(\"in the main enterence to the camp. You'll need to walk 10000 steps to get to the next room.\");\n weaponroom = new Room(\"in the Weapon's room. Normally this is where you go to grab your Nunchaku, but not today.\");\n meetingRoom = new Room(\"in the Meeting room. This is where classes are normally held. We will be here tomorrow to be sure\");\n zenTemple = new Room(\"in the Meditation room. When done for the day, this is where you clear your head.\");\n stealthRoom = new Room(\"in the Stealth training room. Ninja are made here, slow but steady will keep you alive.\");\n restRoom = new Room(\"in the Barracks. When I am done for th day, I will come back here for some rest.\");\n masterRoom = new Room(\"in the Master's room. Master is current meditating right now. Better leave him alone.\");\n ninjaTransporter = new TransporterRoom(\"in the secret Shumpo room...with this I can teleport anywhere\", this);\n\n weaponroom.addItem(new Item(\"Katana\", 3));\n weaponroom.addItem(new Item(\"Nunchaku\", 1));\n weaponroom.addItem(new Item(\"Bo\", 2));\n weaponroom.addItem(new Item(\"Sai\", 2));\n ninjaRoom.addItem(new Item(\"Master's Keys\", 1));\n meetingRoom.addItem(new Item(\"Secret Plans\", 1));\n zenTemple.addItem(new Item(\"Prayer beads\", 1));\n stealthRoom.addItem(new Item(\"Throwing Star\", 2));\n restRoom.addItem(new Item(\"Risque magazines\", 1));\n masterRoom.addItem(new Item(\"Ancient Shinobi Scroll\", 5));\n\n // initialise room exits\n ninjaRoom.setExits(\"north\", ninjaTransporter);\n\n ninjaTransporter.setExits(\"north\", weaponroom);\n ninjaTransporter.setExits(\"south\", ninjaRoom);\n\n weaponroom.setExits(\"north\", meetingRoom);\n weaponroom.setExits(\"south\", ninjaTransporter);\n\n meetingRoom.setExits(\"north\", stealthRoom);\n meetingRoom.setExits(\"east\", restRoom);\n meetingRoom.setExits(\"south\", weaponroom);\n meetingRoom.setExits(\"west\", zenTemple);\n\n zenTemple.setExits(\"east\", meetingRoom);\n\n stealthRoom.setExits(\"south\", meetingRoom);\n\n restRoom.setExits(\"east\", masterRoom);\n restRoom.setExits(\"west\", meetingRoom);\n\n masterRoom.setExits(\"west\", restRoom);\n\n // Set the start room\n startRoom = ninjaRoom; // start game @ ninjaRoom\n\n rooms = new ArrayList();\n rooms.add(ninjaRoom);\n rooms.add(weaponroom);\n rooms.add(meetingRoom);\n rooms.add(zenTemple);\n rooms.add(stealthRoom);\n rooms.add(restRoom);\n rooms.add(masterRoom);\n rooms.add(ninjaTransporter);\n\n random = new Random();\n }", "private void buildBoats() {\n\t\tboats.add(new Boat(\"red\"));\n\t\tboats.add(new Boat(\"pink\"));\n\t\tboats.add(new Boat(\"blue\"));\n\t\tboats.add(new Boat(\"yellow\"));\n\t\tboats.add(new Boat(\"orange\"));\n\t\tboats.add(new Boat(\"green\"));\n\t\tboats.add(new Boat(\"purple\"));\n\t}", "protected void createFrames() {\n createStandingRight();\n createStandingLeft();\n createWalkingRight();\n createWalkingLeft();\n createJumpingRight();\n createJumpingLeft();\n createDying();\n }", "private static void registerItems() {\r\n\t\tItems.registerItem(ItemWoodHammer);\r\n\t\tItems.registerItem(ItemStoneHammer);\r\n\t\t//Items.registerItem(ItemIronHammer);\r\n\t\t//Items.registerItem(ItemGoldHammer);\r\n\t\tItems.registerItem(ItemDiamondHammer);\r\n\t\tItems.registerItem(ItemDirtHammer);\r\n\t\tItems.registerItem(ItemGlassHammer);\r\n\t\tItems.registerItem(ItemSandHammer);\r\n\t\t//Items.registerItem(ItemCactusHammer);\r\n\t\t//Items.registerItem(ItemGravelHammer);\r\n\t\t//Items.registerItem(ItemWoolHammer_white);\r\n\t\tItems.registerItem(ItemEmeraldHammer);\r\n\t\tItems.registerItem(ItemGrassHammer);\r\n\t\t//Items.registerItem(ItemObsidianHammer);\r\n\t\t//Items.registerItem(ItemGlowstoneHammer);\r\n\t\t//Items.registerItem(ItemRedstoneHammer);\r\n\t\t//Items.registerItem(ItemLapizHammer);\r\n\t\t//Items.registerItem(ItemNetherackHammer);\r\n\t\t//Items.registerItem(ItemSoulSandHammer);\r\n\t\tItems.registerItem(ItemCoalHammer);\r\n\t\tItems.registerItem(ItemCharcoalHammer);\r\n\t\t//Items.registerItem(ItemEndstoneHammer);\r\n\t\tItems.registerItem(ItemBoneHammer);\r\n\t\t//Items.registerItem(ItemSpongeHammer);\r\n\t\t//Items.registerItem(ItemBrickHammer);\r\n\t\t//Items.registerItem(ItemSugarHammer);\r\n\t\t//Items.registerItem(ItemSlimeHammer);\r\n\t\t//Items.registerItem(ItemMelonHammer);\r\n\t\t//Items.registerItem(ItemPumpkinHammer);\r\n\t\t//Items.registerItem(ItemPotatoHammer);\r\n\t\t//Items.registerItem(ItemCarrotHammer);\r\n\t\tItems.registerItem(ItemAppleHammer);\r\n\t\t//Items.registerItem(ItemIceHammer);\r\n\t\t//Items.registerItem(ItemPackedIceHammer);\r\n\t\t//Items.registerItem(ItemSnowHammer);\r\n\t\t//Items.registerItem(ItemCakeHammer);\r\n\t\t//Items.registerItem(ItemDragonEggHammer);\r\n\t\t//Items.registerItem(ItemTntHammer);\r\n\t\t//Items.registerItem(ItemBedrockHammer);\r\n\r\n\r\n\t\t/*\r\n\t\t * Hammers Using Ores from other mods\r\n\t\t * **NOTE: REQUIRES Other mods to craft these hammers**\r\n\t\t */\r\n\t\tItems.registerItem(ItemCopperHammer);\r\n\t\tItems.registerItem(ItemBronzeHammer);\r\n\t\tItems.registerItem(ItemSilverHammer);\r\n\t\tItems.registerItem(ItemTungstenHammer);\r\n\t\tItems.registerItem(ItemRubyHammer);\r\n\t\tItems.registerItem(ItemTinHammer);\r\n\t\tItems.registerItem(ItemJadeHammer);\r\n\t\tItems.registerItem(ItemAmethystHammer);\r\n\t\tItems.registerItem(ItemGraphiteHammer);\r\n\t\tItems.registerItem(ItemCitrineHammer);\r\n\t\tItems.registerItem(ItemPierreHammer);\r\n\t\tItems.registerItem(ItemSapphireHammer);\r\n\t\tItems.registerItem(ItemOnyxHammer);\r\n\t\tItems.registerItem(ItemNikoliteHammer);\r\n\t\tItems.registerItem(ItemSilicaHammer);\r\n\t\tItems.registerItem(ItemCinnabarHammer);\r\n\t\tItems.registerItem(ItemAmberBearingStoneHammer);\r\n\t\tItems.registerItem(ItemFerrousHammer);\r\n\t\tItems.registerItem(ItemAdaminiteHammer);\r\n\t\tItems.registerItem(ItemShinyHammer);\r\n\t\tItems.registerItem(ItemXychoriumHammer);\r\n\t\tItems.registerItem(ItemUraniumHammer);\r\n\t\tItems.registerItem(ItemTitaniumHammer);\r\n\t\tItems.registerItem(ItemBloodStoneHammer);\r\n\t\tItems.registerItem(ItemRustedHammer);\r\n\t\tItems.registerItem(ItemRositeHammer);\r\n\t\tItems.registerItem(ItemLimoniteHammer);\r\n\t\tItems.registerItem(ItemMithrilHammer);\r\n\t\tItems.registerItem(ItemPrometheumHammer);\r\n\t\tItems.registerItem(ItemHepatizonHammer);\r\n\t\tItems.registerItem(ItemPoopHammer);\r\n\t\tItems.registerItem(ItemAngmallenHammer);\r\n\t\tItems.registerItem(ItemManganeseHammer);\r\n\t\tItems.registerItem(ItemSearedBrickHammer);\r\n\t\tItems.registerItem(ItemElectrumHammer);\r\n\t\tItems.registerItem(ItemPigIronHammer);\r\n\t\tItems.registerItem(ItemArditeHammer);\r\n\t\tItems.registerItem(ItemAlumiteHammer);\r\n\t\tItems.registerItem(ItemCobaltHammer);\r\n\t\tItems.registerItem(ItemManyullynHammer);\r\n\t\tItems.registerItem(ItemOureclaseHammer);\r\n\t\tItems.registerItem(ItemHaderothHammer);\r\n\t\tItems.registerItem(ItemInfuscoliumHammer);\r\n\t\tItems.registerItem(ItemRubberHammer);\r\n\t\tItems.registerItem(ItemDesichalkosHammer);\r\n\t\tItems.registerItem(ItemMeutoiteHammer);\r\n\t\tItems.registerItem(ItemEximiteHammer);\r\n\t\tItems.registerItem(ItemMidasiumHammer);\r\n\t\tItems.registerItem(ItemSanguiniteHammer);\r\n\t\tItems.registerItem(ItemInolashiteHammer);\r\n\t\tItems.registerItem(ItemVulcaniteHammer);\r\n\t\tItems.registerItem(ItemLemuriteHammer);\r\n\t\tItems.registerItem(ItemAmordrineHammer);\r\n\t\tItems.registerItem(ItemCeruclaseHammer);\r\n\t\tItems.registerItem(ItemKalendriteHammer);\r\n\t\tItems.registerItem(ItemVyroxeresHammer);\r\n\t\tItems.registerItem(ItemCarmotHammer);\r\n\t\tItems.registerItem(ItemTartariteHammer);\r\n\t\tItems.registerItem(ItemAtlarusHammer);\r\n\t\tItems.registerItem(ItemAstralHammer);\r\n\t\tItems.registerItem(ItemCelenegilHammer);\r\n\t\tItems.registerItem(ItemAredriteHammer);\r\n\t\tItems.registerItem(ItemOrichalcumHammer);\r\n\t\r\n\t\t/*\r\n\t\t * Hammers For YouTubers\r\n\t\t */\r\n\t\tItems.registerItem(ItemPatHammer);\r\n\t\tItems.registerItem(ItemJenHammer);\r\n\t\tItems.registerItem(ItemDanTDMHammer);\r\n\t\tItems.registerItem(ItemxJSQHammer);\r\n\t\tItems.registerItem(ItemSkyTheKidRSHammer);\r\n\t\tItems.registerItem(ItemThackAttack_MCHammer);\r\n\t\tItems.registerItem(Item_MrGregor_Hammer);\r\n\t\t\r\n\t\t/*\r\n\t\t * Hammers For Twitch Streamers\r\n\t\t */\r\n\t\tItems.registerItem(ItemDeeAxelJayHammer);\r\n\t\tItems.registerItem(ItemincapablegamerHammer);\r\n\t\t\r\n\t\t/*\r\n\t\t * Community Hammers\r\n\t\t */\r\n\t\tItems.registerItem(ItemCryingObsidainHammer);\r\n\t\t//Items.registerItem(ItemMythicalHammer);\r\n\t\tItems.registerItem(ItemToasterHammer);\r\n\t\t\r\n\t\t/*\r\n\t\t * Special Hammers\r\n\t\t */\r\n\t\tItems.registerItem(ItemRainbowHammer);\r\n\t\tItems.registerItem(ItemMissingTextureHammer);\r\n\t}", "private void setNewTable() {\n\n for (List<Entity> list:\n masterList) {\n for (Entity entity :\n list) {\n entity.removeFromWorld();\n }\n list.clear();\n }\n\n gameFacade.setGameTable(gameFacade.newFullPlayableTable(\"asd\",\n 6, 0.5, 2, 2));\n for (Bumper bumper :\n gameFacade.getBumpers()) {\n Entity bumperEntity = factory.newBumperEntity(bumper);\n targets.add(bumperEntity);\n getGameWorld().addEntity(bumperEntity);\n }\n\n for (Target target :\n gameFacade.getTargets()) {\n Entity targetEntity = factory.newTargetEntity(target);\n targets.add(targetEntity);\n getGameWorld().addEntity(targetEntity);\n }\n }", "public void setBombs() {\n\t\tfor (int i = 0; i < numBombs; ) {\n\t\t\tint row = (int)(Math.random() * numRows);\n\t\t\tint col = (int)(Math.random() * numCols);\n\t\t\tif (!table[row][col].isBomb()){\n\t\t\t\ttable [row][col].setAsBomb();\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t}", "public void addBomb() {\n\t\tthis.nbSpiritBombs++;\n\t}", "private void markAsZombies(List exports) {\n for (Iterator i = exports.iterator(); i.hasNext();) {\n ((ExportPkg)i.next()).zombie = true;\n }\n }", "public static void createItem() {\n //Initializing an item and putting it in a room airport\n itemLocation.addItem(airport, new PickableItem(\"Bottle\", \"This is a bottle that have been left behind by someone\", 2, false));\n itemLocation.addItem(airport, new PickableItem(\"Boardingpass\", \"This is a boardingpass to get on the plane to Hawaii: 126AB\", 1, false));\n\n //Initializing an item and putting it in a room beach\n itemLocation.addItem(beach, new PickableItem(\"Stone\", \"This is a stone, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(beach, new PickableItem(\"Fish\", \"Why are you inspecting this item, its GOD damn fish\", 1, true));\n itemLocation.addItem(beach, new PickableItem(\"Fish\", \"Why are you inspecting this item, its GOD damn fish\", 1, true));\n itemLocation.addItem(beach, new PickableItem(\"Flint\", \"This a flint, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(beach, new PickableItem(\"Rope\", \"This is some rope that has been washed up on the beach shore from the plane crash \", 2, false));\n itemLocation.addItem(beach, new PickableItem(\"Stick\", \"This is a small stick, maybe it can be used to create something more usefull\", 1, false));\n itemLocation.addItem(beach, new PickableItem(\"Stick\", \"This is a small stick, maybe it can be used to create something more usefull\", 1, false));\n //non pickable item\n itemLocation.addItem(beach, new Item(\"GiantRock\", \"The giant rock dont look like it can be moved\", 100));\n itemLocation.addItem(beach, new Item(\"GiantLog\", \"The giant log dont look like it can be moved\", 100));\n\n //Initializing an item and putting it in a room jungle\n itemLocation.addItem(jungle, new PickableItem(\"Berry\", \"this is berries, maybe its poisonous try ur luck!! \", 1, true));\n itemLocation.addItem(jungle, new PickableItem(\"Berry\", \"this is berries, maybe its poisonous try ur luck!! \", 1, true));\n itemLocation.addItem(jungle, new PickableItem(\"Lumber\", \"This is a log of tree, maybe it can be used to craft something to get away from this island \", 3, false));\n itemLocation.addItem(jungle, new PickableItem(\"Lian\", \"This is a lian from the jungle, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(jungle, new PickableItem(\"Lian\", \"This is a lian from the jungle, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(jungle, new PickableItem(\"Stone\", \"This is a stone, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(jungle, new PickableItem(\"Stick\", \"This is a small stick, maybe it can be used to create something more usefull\", 1, false));\n //non pickable item\n itemLocation.addItem(jungle, new Item(\"GiantLog\", \"The giant log dont look like it can be moved\", 100));\n\n //Initializing an item and putting it in a room mountain\n itemLocation.addItem(mountain, new PickableItem(\"Stone\", \"This is a stone, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(mountain, new PickableItem(\"Egg\", \"This is some wild eggs, maybe it can be used for food\", 1, true));\n itemLocation.addItem(mountain, new PickableItem(\"Lumber\", \"This is a log of tree, maybe it can be used to craft something to get away from this island \", 3, false));\n\n //Initializing an item and putting it in a room cave\n itemLocation.addItem(cave, new PickableItem(\"Shroom\", \"these shrooms look suspecius, but maybe the can be\", 1, true));\n itemLocation.addItem(cave, new PickableItem(\"Stone\", \"This is a stone, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(cave, new PickableItem(\"Stone\", \"This is a stone, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(cave, new PickableItem(\"Waterbottle\", \"This is freshwater found in the jungle, maybe you can drink it\", 2, true));\n itemLocation.addItem(cave, new PickableItem(\"Flint\", \"This a flint, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(cave, new Item(\"GiantRock\", \"The giant rock dont look like it can be moved\", 100));\n\n //Initializing an item and putting it in a room camp\n itemLocation.addItem(camp, new PickableItem(\"Stone\", \"This is a stone, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(camp, new PickableItem(\"Stick\", \"This is a small stick, maybe it can be used to create something more usefull\", 1, false));\n itemLocation.addItem(camp, new PickableItem(\"Egg\", \"This is some wild eggs, maybe it can be used for food\", 1, true));\n\n //Initializing an item and putting it in a room seaBottom\n itemLocation.addItem(seaBottom, new PickableItem(\"Backpack\", \"This is a backpack from the plane crash maybe you can use it to carry more items \", 0, false));\n itemLocation.addItem(seaBottom, new PickableItem(\"WaterBottle\", \"This is a water bottle from the plan crash \", 1, true));\n itemLocation.addItem(seaBottom, new PickableItem(\"Rope\", \"This is some rope that has been washed up on the beach shore from the plane crash\", 2, false));\n }", "private void generateNewCards()\n {\n // Set the card sets to be drafted from.\n setsForDraft = new ArrayList<>();\n setsForDraft.add(M19_CARD_TABLE);\n\n // Generates sealed pool and places in openedCardPool.\n drawPacksFromSets();\n\n // Initialize a selectedCardPool that is empty, for the user to move cards into when desired.\n selectedCardPool = new ArrayList<>();\n }", "@Test\n\tpublic void bakersDozenAddTest() {\n\t\tBakersDozen Test = new BakersDozen();\n\t\tPile Result = Test.getHomeCellPile(1);\n\t\tCard card = new Card(1,3);\n\t\tint size = Result.getSize();\n\t\tResult.addCard(card);\n\t\tassertEquals(Result.getSize(), size + 1);\n\t\tassertEquals(Result.topCard(), card);\n\t}", "public void act() \n {\n moveAround(); \n addBomb(); \n touchGhost(); \n }", "public void baptism() {\n for (Card targetCard : Battle.getInstance().getActiveAccount().getActiveCardsOnGround().values()) {\n if (targetCard instanceof Minion) {\n targetCard.setHolyBuff(2, 1);\n }\n }\n }", "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}", "static void test0() {\n\n System.out.println( \"Begin test0. ===============================\\n\" );\n\n Thread init = Thread.currentThread(); // init spawns the Mogwais\n\n // Create a GremlinsBridge of capacity 3.\n GremlinsBridge gremlinBridge = new GremlinsBridge( 3 );\n\n // Set an optional, test delay to stagger the start of each mogwai.\n int delay = 4000;\n\n // Create the Mogwais and store them in an array.\n Thread peds[] = {\n new Mogwai( \"Al\", 3, SIDE_ONE, gremlinBridge ),\n new Mogwai( \"Bob\", 4, SIDE_TWO, gremlinBridge ),\n };\n\n for ( int j = 0; j < peds.length; ++j ) {\n // Run them by calling their start() method.\n try {\n peds[j].start();\n init.sleep( delay );\n }\n catch ( InterruptedException e ) {\n System.err.println( \"Abort. Unexpected thread interruption.\" );\n break;\n }\n }\n // Now, the test must give the mogwai time to finish their crossings.\n for ( int j = 0; j < peds.length; ++j ) {\n try {\n peds[j].join();\n }\n catch ( InterruptedException e ) {\n System.err.println( \"Abort. Unexpected thread interruption.\" );\n break;\n }\n }\n System.out.println( \"\\n=============================== End test0.\" );\n return;\n }", "public static Item generate(){\n\n //this method lists a collection of new items. it then uses a random number generator\n //to pick one of the objects, and then returns the object so that the main method\n //can add it to the inventory.\n\n ItemType weapon = ItemType.weapon;\n Item IronSword = new Item(weapon, \"Iron Sword\", 8, 50, 10);\n Item GoldenSword = new Item(weapon, \"Golden Sword\", 10, 75, 15);\n Item AllumSword = new Item(weapon, \"Alluminum Sword\", 6, 35, 8);\n Item BowandQuiver = new Item(weapon, \"Bow & Quiver\", 4, 45, 7);\n Item BattleAxe = new Item(weapon, \"Battle Axe\", 12, 55, 13);\n\n ItemType armor = ItemType.armor;\n Item ChainChest = new Item(armor, \"Chain Mail Chestplate\", 8, 40, 30);\n Item IronChest = new Item(armor, \"Iron Chestplate\", 10, 50, 40);\n Item GoldenChest = new Item(armor, \"Golden Chestplate\", 12, 65, 50);\n Item ChainPants = new Item(armor, \"Chain Mail Pants\", 7, 40, 30);\n Item IronPants = new Item(armor, \"Iron Pants\", 9, 50, 40);\n Item GoldenPants = new Item(armor, \"Golden Pants\", 11, 65, 50);\n Item Helmet = new Item(armor, \"Helmet\", 5, 40, 20);\n\n ItemType other = ItemType.other;\n Item Bandage = new Item(other, \"Bandage\", 1, 2, 0);\n Item Wrench = new Item(other, \"Wrench\", 3, 10, 5);\n Item Bread = new Item(other, \"Bread Loaf\", 2, 4, 0);\n Item Water = new Item(other, \"Water Flask\", 3, 2, 0);\n\n Item Initializer = new Item(other, \"init\", 0, 0, 0);\n\t\tint ItemPick = RandomNum();\n Item chosen = Initializer;\n\n switch (ItemPick){\n case 1:\n chosen = IronSword;\n break;\n case 2:\n chosen = GoldenSword;\n break;\n case 3:\n chosen = AllumSword;\n break;\n case 4:\n chosen = BowandQuiver;\n break;\n case 5:\n chosen = BattleAxe;\n break;\n case 6:\n chosen = ChainChest;\n break;\n case 7:\n chosen = IronChest;\n break;\n case 8:\n chosen = GoldenChest;\n break;\n case 9:\n chosen = ChainPants;\n break;\n\t\t\t case 10:\n chosen = IronPants ;\n break;\n case 11:\n chosen = GoldenPants;\n break;\n case 12:\n chosen = Helmet;\n break;\n case 13:\n chosen = Bandage;\n break;\n case 14:\n chosen = Wrench;\n break;\n case 15:\n chosen = Bread;\n break;\n case 16:\n chosen = Water;\n break;\n }\n\n return chosen;\n }", "public void createDeckBuilding() {\n\t\tboolean stop = false;\n\t\twhile (this.deckBuilding.size() < 5 && stop == false) {\n\t\t\tCard cardBuilding;\n\t\t\tint number = random.nextInt(this.building.size() + this.machine.size());\n\t\t\tif (number < this.building.size()) {\n\t\t\t\tcardBuilding = pickOnThePioche(this.building);\n\t\t\t\tif (cardBuilding.getName().equals(\"Stop\")) {\n\t\t\t\t\tthis.deckBuilding.add((IBuilding) cardBuilding);\n\t\t\t\t\tstop = true;\n\t\t\t\t} else {\n\t\t\t\t\tthis.building.remove(cardBuilding);\n\t\t\t\t\tthis.deckBuilding.add((IBuilding) cardBuilding);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcardBuilding = pickOnThePioche(this.machine);\n\t\t\t\tif (cardBuilding.getName().equals(\"Stop\")) {\n\t\t\t\t\tthis.deckBuilding.add((IBuilding) cardBuilding);\n\t\t\t\t\tstop = true;\n\t\t\t\t} else {\n\t\t\t\t\tthis.building.remove(cardBuilding);\n\t\t\t\t\tthis.deckBuilding.add((IBuilding) cardBuilding);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void setWeaponCardsAndPieces() {\n List<WeaponCard> weaponCards = new ArrayList<>(); // empty list for the new weapon cards\n List<WeaponPiece> weaponPieces = new ArrayList<>(); // empty list for the new weapon pieces\n\n Data data = new Data(\"data.json\"); // read data from data.json\n JSONObject weaponData = (JSONObject) data.getJsonData().get(\"Weapons\"); // get the weapon data from the data\n for (int i = 0; i < 6; i++) { // for loop 0 to 5\n String weaponName = String.valueOf(weaponData.get(String.valueOf(i))); // get the weapon name\n //Make and add weaponCard and WeaponPiece to their specified lists.\n weaponCards.add(new WeaponCard(weaponName));\n weaponPieces.add(new WeaponPiece(weaponName));\n }\n //Assign the lists into their class variables\n this.weaponCards = weaponCards;\n this.weaponPieces = weaponPieces;\n }", "public void creatList()\n\t{\n\t\tbowlers.add(new Bowler(\"A\",44));\n\t\tbowlers.add(new Bowler(\"B\",25));\n\t\tbowlers.add(new Bowler(\"C\",2));\n\t\tbowlers.add(new Bowler(\"D\",10));\n\t\tbowlers.add(new Bowler(\"E\",6));\n\t}", "private void initItems() {\n\t\t// clouds\n\t\tclouds = new ArrayList<Cloud>();\n\t\tfor (int i = 0; i < CLOUDS_NUMBER; i++) {\n\t\t\tswitch (i) {\n\t\t\tcase 1:\n\t\t\t\tCloud cloud = new Cloud(20, 400);\n\t\t\t\tcloud.isRight = false;\n\t\t\t\tcloud.velocity.set(Cloud.CLOUD_MAX_VELOCITY, 0);\n\t\t\t\tclouds.add(cloud);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tcloud = new Cloud(800, 300);\n\t\t\t\tcloud.isRight = false;\n\t\t\t\tcloud.velocity.set(Cloud.CLOUD_MAX_VELOCITY, 0);\n\t\t\t\tclouds.add(cloud);\n\t\t\tcase 3:\n\t\t\t\tcloud = new Cloud(800, 200);\n\t\t\t\tcloud.isRight = true;\n\t\t\t\tcloud.velocity.set(-Cloud.CLOUD_MAX_VELOCITY / 2, 0);\n\t\t\t\tclouds.add(cloud);\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// bats\n\t\tbats = new ArrayList<Bat>();\n\t\tfor (int i = 0; i < BATS_NUMBER; i++) {\n\t\t\tswitch (i) {\n\t\t\tcase 1:\n\t\t\t\tBat bat = new Bat(410, 400, Assets.BatRegion.getRegionWidth() / 3.4f,\n\t\t\t\t\t\tAssets.BatRegion.getRegionHeight() / 3.4f);\n\t\t\t\tbat.isRight = false;\n\t\t\t\tbat.angle = 0f;\n\t\t\t\tbat.fixAngle = 0f;\n\t\t\t\tbat.interval = 16;\n\t\t\t\tbats.add(bat);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tbat = new Bat(100, 250, Assets.BatRegion.getRegionWidth() / 5.0f,\n\t\t\t\t\t\tAssets.BatRegion.getRegionHeight() / 5.0f);\n\t\t\t\tbat.isRight = false;\n\t\t\t\tbat.angle = 0f;\n\t\t\t\tbat.fixAngle = 0f;\n\t\t\t\tbat.interval = 16;\n\t\t\t\tbats.add(bat);\n\t\t\tcase 3:\n\t\t\t\tbat = new Bat(700, 140, Assets.BatRegion.getRegionWidth() / 2.4f,\n\t\t\t\t\t\tAssets.BatRegion.getRegionHeight() / 2.4f);\n\t\t\t\tbat.isRight = false;\n\t\t\t\tbat.angle = 360f - 20f;\n\t\t\t\tbat.fixAngle = 360f - 20f;\n\t\t\t\tbat.interval = 16;\n\t\t\t\tbats.add(bat);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "private void getZombie() {\r\n zombies = new Zombie[cInfectedNum + tankNum];\r\n int i = 0;\r\n\r\n // Add CommonInfected objects\r\n for (i = 0; i < cInfectedNum; i++) {\r\n zombies[i] = new CommonInfected();\r\n\t\t}\r\n\r\n // Add Tank objects\r\n for (; i < cInfectedNum + tankNum; i++) {\r\n zombies[i] = new Tank();\r\n\t\t}\r\n }", "public void tickBombs() {\r\n\t\tfor (int i = 0; i < bombs.length; i++) {\r\n\t\t\tBomb b = bombs[i];\r\n\t\t\tif (b != null) {\r\n\t\t\t\tif (b.isTicking()) {\r\n\t\t\t\t\tb.tick();\r\n\t\t\t\t} else if (b.isExploding()) {\r\n\t\t\t\t\tif (b.getExplosionTicks() == b.getMaxExplosionTicks()) {\r\n\t\t\t\t\t\texplodeBomb(b);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tb.tick();\r\n\t\t\t\t} else if (b.hasFinished()) {\r\n\t\t\t\t\tclearExplosions(b);\r\n\t\t\t\t\tbombs[i] = null;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void fakeCards(){\n this.drawPile = new ArrayList<>();\n drawPile.add(new RemoveActionCard(\"Fernsprechgerät\", (float) 0.5, 4, new SpecialActions(0,0,1) ));\n drawPile.add(new MovingCard(\"Millionärin\", 4, 5, 4, 99, new COLOR[]{COLOR.SAND}));\n drawPile.add(new RemoveMoveSellCard(\"Propellerflugzeug\", 4, 4, 4, 99, new COLOR[]{COLOR.SAND, COLOR.RIVER, COLOR.JUNGLE,COLOR.ENDFIELDJUNGLE,COLOR.ENDFIELDRIVER}));\n drawPile.add(new MovingCard(\"Ureinwohner\", (float) 0.5, 5, 99, 1, new COLOR[]{COLOR.BASECAMP, COLOR.RUBBLE, COLOR.JUNGLE, COLOR.SAND, COLOR.RIVER,COLOR.ENDFIELDJUNGLE,COLOR.ENDFIELDRIVER}));\n drawPile.add(new ActionCard(\"Wissenschaftlerin\", (float) 0.5, 4, new SpecialActions(1,1,0)));\n drawPile.add(new MovingCard(\"Pionier\", (float) 0.5, 5, 5, 99, new COLOR[]{COLOR.JUNGLE,COLOR.ENDFIELDJUNGLE}));\n drawPile.add(new ActionCard(\"Kartograph\", (float) 0.5, 4, new SpecialActions(2,0,0)));\n drawPile.add(new ActionCard(\"Kartograph\", (float) 0.5, 4, new SpecialActions(2,0,0)));\n Collections.shuffle(drawPile);\n }", "protected void putMonsters() {\n\t\tRandom rand = new Random();\n\t\tfor (int monsterCount = 0; monsterCount < 4; monsterCount++){\n\t\t\tint x, y;\n\t\t\tdo {\n\t\t\t\tx = rand.nextInt(xSize);\n\t\t\t\ty = rand.nextInt(ySize);\n\t\t\t} while((levelSetup[x][y] instanceof SimpleRoom) && (x == 0 & y == 0) && !levelSetup[x][y].hasItem());\n\t\t\tlevelSetup[x][y].putMonster(new BasicMonster());\n\t\t}\n\t}", "private void giveBirthToRabbits() {\n\t\tfor (int i = (rabbitList.size() - 1); i >= 0; i--) {\n\t\t\tRabbitsGrassSimulationAgent rabbit = rabbitList.get(i);\n\t\t\tif (rabbit.isReproducing()) {\n\t\t\t\taddNewRabbit();\n\t\t\t}\n\t\t}\n\t}", "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 }", "private void registerCommands() {\n CommandSpec showBanpoints = CommandSpec.builder().permission(\"dtpunishment.banpoints.show\")\r\n .description(Text.of(\"Show how many Banpoints the specified player has \"))\r\n .arguments(GenericArguments.onlyOne(GenericArguments.user(Text.of(\"player\"))))\r\n .executor(childInjector.getInstance(CommandBanpointsShow.class)).build();\r\n\r\n CommandSpec addBanpoints = CommandSpec.builder().permission(\"dtpunishment.banpoints.add\")\r\n .description(Text.of(\"Add a specified amount of Banpoints to a player \"))\r\n .arguments(GenericArguments.onlyOne(GenericArguments.user(Text.of(\"player\"))),\r\n GenericArguments.onlyOne(GenericArguments.integer(Text.of(\"amount\"))))\r\n .executor(childInjector.getInstance(CommandBanpointsAdd.class)).build();\r\n\r\n CommandSpec removeBanpoints = CommandSpec.builder().permission(\"dtpunishment.banpoints.remove\")\r\n .description(Text.of(\"Remove a specified amount of Banpoints to a player \"))\r\n .arguments(GenericArguments.onlyOne(GenericArguments.user(Text.of(\"player\"))),\r\n GenericArguments.onlyOne(GenericArguments.integer(Text.of(\"amount\"))))\r\n .executor(childInjector.getInstance(CommandBanpointsRemove.class)).build();\r\n\r\n CommandSpec banpoints = CommandSpec.builder().permission(\"dtpunishment.banpoints\")\r\n .description(Text.of(\"Show the Banpoints help menu\")).arguments(GenericArguments.none())\r\n .child(showBanpoints, \"show\").child(addBanpoints, \"add\").child(removeBanpoints, \"remove\").build();\r\n\r\n Sponge.getCommandManager().register(this, banpoints, \"banpoints\", \"bp\");\r\n\r\n CommandSpec showMutepoints = CommandSpec.builder().permission(\"dtpunishment.mutepoints.show\")\r\n .description(Text.of(\"Show how many Mutepoints the specified player has \"))\r\n .arguments(GenericArguments.onlyOne(GenericArguments.user(Text.of(\"player\"))))\r\n .executor(childInjector.getInstance(CommandMutepointsShow.class)).build();\r\n\r\n CommandSpec addMutepoints = CommandSpec.builder().permission(\"dtpunishment.mutepoints.add\")\r\n .description(Text.of(\"Add a specified amount of Mutepoints to a player \"))\r\n .arguments(GenericArguments.onlyOne(GenericArguments.user(Text.of(\"player\"))),\r\n GenericArguments.onlyOne(GenericArguments.integer(Text.of(\"amount\"))))\r\n .executor(childInjector.getInstance(CommandMutepointsAdd.class)).build();\r\n\r\n CommandSpec removeMutepoints = CommandSpec.builder().permission(\"dtpunishment.mutepoints.add\")\r\n .description(Text.of(\"Add a specified amount of Mutepoints to a player \"))\r\n .arguments(GenericArguments.onlyOne(GenericArguments.user(Text.of(\"player\"))),\r\n GenericArguments.onlyOne(GenericArguments.integer(Text.of(\"amount\"))))\r\n .executor(childInjector.getInstance(CommandMutepointsRemove.class)).build();\r\n\r\n CommandSpec mutepoints = CommandSpec.builder().permission(\"dtpunishment.mutepoints\")\r\n .description(Text.of(\"Show the Mutepoints help menu\")).arguments(GenericArguments.none())\r\n .child(showMutepoints, \"show\").child(addMutepoints, \"add\").child(removeMutepoints, \"remove\").build();\r\n\r\n Sponge.getCommandManager().register(this, mutepoints, \"mutepoints\", \"mp\");\r\n\r\n CommandSpec playerInfo = CommandSpec.builder().permission(\"dtpunishment.playerinfo\")\r\n .description(Text.of(\"Show your info \"))\r\n .arguments(GenericArguments.onlyOne(GenericArguments.optionalWeak(GenericArguments.requiringPermission(\r\n GenericArguments.user(Text.of(\"player\")), \"dtpunishment.playerinfo.others\"))))\r\n .executor(childInjector.getInstance(CommandPlayerInfo.class)).build();\r\n\r\n Sponge.getCommandManager().register(this, playerInfo, \"pinfo\", \"playerinfo\");\r\n\r\n CommandSpec addWord = CommandSpec.builder().permission(\"dtpunishment.word.add\")\r\n .description(Text.of(\"Add a word to the list of banned ones \"))\r\n .arguments(GenericArguments.onlyOne(GenericArguments.string(Text.of(\"word\"))))\r\n .executor(childInjector.getInstance(CommandWordAdd.class)).build();\r\n\r\n Sponge.getCommandManager().register(this, addWord, \"addword\");\r\n\r\n CommandSpec unmute = CommandSpec.builder().permission(\"dtpunishment.mutepoints.add\")\r\n .description(Text.of(\"Unmute a player immediately (removing all mutepoints)\"))\r\n .arguments(GenericArguments.onlyOne(GenericArguments.user(Text.of(\"player\"))))\r\n .executor(childInjector.getInstance(CommandUnmute.class)).build();\r\n\r\n CommandSpec reloadConfig = CommandSpec.builder().permission(\"dtpunishment.admin.reload\")\r\n .description(Text.of(\"Reload configuration from disk\"))\r\n .executor(childInjector.getInstance(CommandReloadConfig.class)).build();\r\n\r\n CommandSpec adminCmd = CommandSpec.builder().permission(\"dtpunishment.admin\")\r\n .description(Text.of(\"Admin commands for DTPunishment\")).child(reloadConfig, \"reload\")\r\n .child(unmute, \"unmute\").build();\r\n\r\n Sponge.getCommandManager().register(this, adminCmd, \"dtp\", \"dtpunish\");\r\n }", "@Override\r\n \tprotected void startProcess() {\n \t\tfor(int i = 0; i < inventoryStacks.length - 1; i++) {\r\n \t\t\tif(inventoryStacks[i] != null) {\r\n \t\t\t\tticksToProcess = (int)(TileEntityFurnace.getItemBurnTime(inventoryStacks[i]) * GENERATOR_TO_FURNACE_TICK_RATIO);\r\n \t\t\t\tdecrStackSize(i, 1);\r\n \t\t\t\tburning = true;\r\n \t\t\t}\r\n \t\t}\r\n \t}", "private void initialiseBags() {\r\n\t\t//Player one bag\r\n\t\taddToBag1(GridSquare.Type.a, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag1(GridSquare.Type.b, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag1(GridSquare.Type.c, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD);\r\n\t\taddToBag1(GridSquare.Type.d, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY);\r\n\t\taddToBag1(GridSquare.Type.e, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY);\r\n\t\taddToBag1(GridSquare.Type.f, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag1(GridSquare.Type.g, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.HORIZONTAL_SWORD, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag1(GridSquare.Type.h, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD);\r\n\t\taddToBag1(GridSquare.Type.i, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY);\r\n\t\taddToBag1(GridSquare.Type.j, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD);\r\n\t\taddToBag1(GridSquare.Type.k, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag1(GridSquare.Type.l, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY);\r\n\t\taddToBag1(GridSquare.Type.m, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY);\r\n\t\taddToBag1(GridSquare.Type.n, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY);\r\n\t\taddToBag1(GridSquare.Type.o, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD);\r\n\t\taddToBag1(GridSquare.Type.p, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag1(GridSquare.Type.q, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD);\r\n\t\taddToBag1(GridSquare.Type.r, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD);\r\n\t\taddToBag1(GridSquare.Type.s, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD);\r\n\t\taddToBag1(GridSquare.Type.t, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY);\r\n\t\taddToBag1(GridSquare.Type.u, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag1(GridSquare.Type.v, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY);\r\n\t\taddToBag1(GridSquare.Type.w, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD);\r\n\t\taddToBag1(GridSquare.Type.x, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD);\r\n\t\t\r\n\t\t//Player two bag\r\n\t\taddToBag2(GridSquare.Type.A, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag2(GridSquare.Type.B, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag2(GridSquare.Type.C, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD);\r\n\t\taddToBag2(GridSquare.Type.D, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY);\r\n\t\taddToBag2(GridSquare.Type.E, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY);\r\n\t\taddToBag2(GridSquare.Type.F, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag2(GridSquare.Type.G, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.HORIZONTAL_SWORD, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag2(GridSquare.Type.H, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD);\r\n\t\taddToBag2(GridSquare.Type.I, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY);\r\n\t\taddToBag2(GridSquare.Type.J, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD);\r\n\t\taddToBag2(GridSquare.Type.K, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag2(GridSquare.Type.L, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY);\r\n\t\taddToBag2(GridSquare.Type.M, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY);\r\n\t\taddToBag2(GridSquare.Type.N, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY);\r\n\t\taddToBag2(GridSquare.Type.O, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD);\r\n\t\taddToBag2(GridSquare.Type.P, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag2(GridSquare.Type.Q, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD);\r\n\t\taddToBag2(GridSquare.Type.R, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD);\r\n\t\taddToBag2(GridSquare.Type.S, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD);\r\n\t\taddToBag2(GridSquare.Type.T, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY);\r\n\t\taddToBag2(GridSquare.Type.U, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag2(GridSquare.Type.V, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY);\r\n\t\taddToBag2(GridSquare.Type.W, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD);\r\n\t\taddToBag2(GridSquare.Type.X, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD);\r\n\t}", "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 allocateWeapons() {\n Collections.shuffle(this.getWeaponPieces());\n List<Room> rooms = this.board.getRooms();\n Collections.shuffle(rooms);\n int roomIndex = 0;\n for (WeaponPiece weapon : this.getWeaponPieces()) {\n Room room = rooms.get(roomIndex);\n if (room.getWeaponPiece() == null) {\n room.setWeaponPiece(weapon);\n roomIndex += 1;\n }\n }\n }", "public void addGameObjects() {\n\t\tint baseObject = 4 + random.nextInt(5);\n\t\tint energyDroneObject = 2+ random.nextInt(5);\n\t\t\n\t\tfor (int i = 1; i < baseObject; i++) {\n\t\t\tgameObjects.add(new Bases(i));\n\t\t\t baseCount++;\n\t\t}\n\t\tfor (int i = 0; i < energyDroneObject; i++) {\n\t\t\tgameObjects.add(new EnergyStation());\n\t\t\tenergyStationCount++;\n\t\t}\n\t\tfor (int i = 0; i < energyDroneObject ; i++) {\n\t\t\tgameObjects.add(new Drone());\n\t\t\tdroneCount++;\n\t\t}\n\t\tgameObjects.add(new Cyborg());\n\t\tcyborgCount++;\n\t}", "public static void LoadItems() {\r\n\t\t\r\n\t\t/*\r\n\t\t * Basic Minecraft Hammers (Ex. Vannila Ores)\r\n\t\t */\r\n\t\r\n\t\tItemWoodHammer = new ItemWoodHammer(HammerModMain.MODID + \":ItemWoodHammer\", \"HammerMod-DZ_res/items/ItemWoodHammer.png\");\r\n\t\tItemStoneHammer = new ItemStoneHammer(HammerModMain.MODID + \":ItemStoneHammer\", \"HammerMod-DZ_res/items/ItemStoneHammer.png\");\r\n\t\t//ItemIronHammer = new ItemIronHammer(HammerModMain.MODID + \":ItemIronHammer\", \"HammerMod-DZ_res/items/ItemIronHammer.png\");\r\n\t\t//ItemGoldHammer = new ItemGoldHammer(HammerModMain.MODID + \":ItemGoldHammer\", \"HammerMod-DZ_res/items/ItemGoldHammer.png\");\r\n\t\tItemDiamondHammer = new ItemDiamondHammer(HammerModMain.MODID + \":ItemDiamondHammer\", \"HammerMod-DZ_res/items/ItemDiamondHammer.png\");\r\n\t\tItemDirtHammer = new ItemDirtHammer(HammerModMain.MODID + \":ItemDirtHammer\", \"HammerMod-DZ_res/items/ItemDirtHammer.png\");\r\n\t\tItemGlassHammer = new ItemGlassHammer(HammerModMain.MODID + \":ItemGlassHammer\", \"HammerMod-DZ_res/items/ItemGlassHammer.png\");\r\n\t\tItemSandHammer = new ItemSandHammer(HammerModMain.MODID + \":ItemSandHammer\", \"HammerMod-DZ_res/items/ItemSandHammer.png\");\r\n\t\t//ItemCactusHammer = new ItemCactusHammer(HammerModMain.MODID + \":ItemCactusHammer\", \"HammerMod-DZ_res/items/ItemCactusHammer.png\");\r\n\t\t//ItemGravelHammer = new ItemGravelHammer(HammerModMain.MODID + \":ItemGravelHammer\", \"HammerMod-DZ_res/items/ItemGravelHammer.png\");\r\n\t\t//ItemWoolHammer_white = new ItemWoolHammer_white(HammerModMain.MODID + \":ItemWoolHammer_white\", \"HammerMod-DZ_res/items/ItemWoolHammer_white.png\");\r\n\t\tItemEmeraldHammer = new ItemEmeraldHammer(HammerModMain.MODID + \":ItemEmeraldHammer\", \"HammerMod-DZ_res/items/ItemEmeraldHammer.png\");\r\n\t\tItemGrassHammer = new ItemGrassHammer(HammerModMain.MODID + \":ItemGrassHammer\", \"HammerMod-DZ_res/items/ItemGrassHammer.png\");\r\n\t\t//ItemObsidianHammer = new ItemObsidianHammer(HammerModMain.MODID + \":ItemObsidianHammer\", \"HammerMod-DZ_res/items/ItemObsidianHammer.png\");\r\n\t\t//ItemGlowstoneHammer = new ItemGlowstoneHammer(HammerModMain.MODID + \":ItemGlowstoneHammer\", \"HammerMod-DZ_res/items/ItemGlowstoneHammer.png\");\r\n\t\t//ItemRedstoneHammer = new ItemRedstoneHammer(HammerModMain.MODID + \":ItemRedstoneHammer\", \"HammerMod-DZ_res/items/ItemRedstoneHammer.png\");\r\n\t\t//ItemLapizHammer = new ItemLapizHammer(HammerModMain.MODID + \":ItemLapizHammer\", \"HammerMod-DZ_res/items/ItemLapizHammer.png\");\r\n\t\t//ItemNetherackHammer = new ItemNetherackHammer(HammerModMain.MODID + \":ItemNetherackHammer\", \"HammerMod-DZ_res/items/ItemNetherackHammer.png\");\r\n\t\t//ItemSoulSandHammer = new ItemSoulSandHammer(HammerModMain.MODID + \":ItemSoulSandHammer\", \"HammerMod-DZ_res/items/ItemSoulSandHammer.png\");\r\n\t\tItemCoalHammer = new ItemCoalHammer(HammerModMain.MODID + \":ItemCoalHammer\", \"HammerMod-DZ_res/items/ItemCoalHammer.png\");\r\n\t\tItemCharcoalHammer = new ItemCharcoalHammer(HammerModMain.MODID + \":ItemCharcoalHammer\", \"HammerMod-DZ_res/items/ItemCharcoalHammer.png\");\r\n\t\t//ItemEndstoneHammer = new ItemEndstoneHammer(HammerModMain.MODID + \":ItemEndstoneHammer\", \"HammerMod-DZ_res/items/ItemEndstoneHammer.png\");\r\n\t\tItemBoneHammer = new ItemBoneHammer(HammerModMain.MODID + \":ItemBoneHammer\", \"HammerMod-DZ_res/items/ItemBoneHammer.png\");\r\n\t\t//ItemSpongeHammer = new ItemSpongeHammer(HammerModMain.MODID + \":ItemSpongeHammer\", \"HammerMod-DZ_res/items/ItemSpongeHammer.png\");\r\n\t\t//ItemBrickHammer = new ItemBrickHammer(HammerModMain.MODID + \":ItemBrickHammer\", \"HammerMod-DZ_res/items/ItemBrickHammer.png\");\r\n\t\t//ItemSugarHammer = new ItemSugarHammer(HammerModMain.MODID + \":ItemSugarHammer\", \"HammerMod-DZ_res/items/ItemSugarHammer.png\");\r\n\t\t//ItemSlimeHammer = new ItemSlimeHammer(HammerModMain.MODID + \":ItemSlimeHammer\", \"HammerMod-DZ_res/items/ItemSlimeHammer.png\");\r\n\t\t//ItemMelonHammer = new ItemMelonHammer(HammerModMain.MODID + \":ItemMelonHammer\", \"HammerMod-DZ_res/items/ItemMelonHammer.png\");\r\n\t\t//ItemPumpkinHammer = new ItemPumpkinHammer(HammerModMain.MODID + \":ItemPumpkinHammer\", \"HammerMod-DZ_res/items/ItemPumpkinHammer.png\");\r\n\t\t//ItemPotatoHammer = new ItemPotatoHammer(HammerModMain.MODID + \":ItemPotatoHammer\", \"HammerMod-DZ_res/items/ItemPotatoHammer.png\");\r\n\t\t//ItemCarrotHammer = new ItemCarrotHammer(HammerModMain.MODID + \":ItemCarrotHammer\", \"HammerMod-DZ_res/items/ItemCarrotHammer.png\");\r\n\t\tItemAppleHammer = new ItemAppleHammer(HammerModMain.MODID + \":ItemAppleHammer\", \"HammerMod-DZ_res/items/ItemAppleHammer.png\");\r\n\t\t//ItemIceHammer = new ItemIceHammer(HammerModMain.MODID + \":ItemIceHammer\", \"HammerMod-DZ_res/items/ItemIceHammer.png\");\r\n\t\t//ItemPackedIceHammer = new ItemPackedIceHammer(HammerModMain.MODID + \":ItemPackedIceHammer\", \"HammerMod-DZ_res/items/ItemPackedIceHammer.png\");\r\n\t\t//ItemSnowHammer = new ItemSnowHammer(HammerModMain.MODID + \":ItemSnowHammer\", \"HammerMod-DZ_res/items/ItemSnowHammer.png\");\r\n\t\t//ItemCakeHammer = new ItemCakeHammer(HammerModMain.MODID + \":ItemCakeHammer\", \"HammerMod-DZ_res/items/ItemCakeHammer.png\");\r\n\t\t//ItemDragonEggHammer = new ItemDragonEggHammer(HammerModMain.MODID + \":ItemDragonEggHammer\", \"HammerMod-DZ_res/items/ItemDragonEggHammer.png\");\r\n\t\t//ItemTntHammer = new ItemTntHammer(HammerModMain.MODID + \":ItemTntHammer\", \"HammerMod-DZ_res/items/ItemTntHammer.png\");\r\n\t\t//ItemBedrockHammer = new ItemBedrockHammer(HammerModMain.MODID + \":ItemBedrockHammer\", \"HammerMod-DZ_res/items/ItemBedrockHammer.png\");\r\n\r\n\t\t/*\r\n\t\t * Mob Hammers\r\n\t\t */\r\n\t\t//ItemCreeperHammer = new ItemCreeperHammer(CREEPER).setUnlocalizedName(\"ItemCreeperHammer\").setTextureName(\"hammermod:ItemCreeperHammer\").setCreativeTab(HammerMod.HammerMod);\r\n\t\t//ItemPigHammer = new ItemPigHammer(PIG).setUnlocalizedName(\"ItemPigHammer\").setTextureName(\"hammermod:ItemPigHammer\").setCreativeTab(HammerMod.HammerMod);\r\n\t\t//ItemCowHammer = new ItemCowHammer(COW).setUnlocalizedName(\"ItemCowHammer\").setTextureName(\"hammermod:ItemCowHammer\").setCreativeTab(HammerMod.HammerMod);\r\n\t\t\r\n\r\n\t\t/*\r\n\t\t * Hammers Using Ores from other mods\r\n\t\t * **NOTE: REQUIRES Other mods to craft these hammers**\r\n\t\t */\r\n\t\tItemCopperHammer = new ItemCopperHammer(HammerModMain.MODID + \":ItemCopperHammer\", \"HammerMod-DZ_res/items/ItemCopperHammer.png\");\r\n\t\tItemBronzeHammer = new ItemBronzeHammer(HammerModMain.MODID + \":ItemBronzeHammer\", \"HammerMod-DZ_res/items/ItemBronzeHammer.png\");\r\n\t\tItemSilverHammer = new ItemSilverHammer(HammerModMain.MODID + \":ItemSilverHammer\", \"HammerMod-DZ_res/items/ItemSilverHammer.png\");\r\n\t\tItemTungstenHammer = new ItemTungstenHammer(HammerModMain.MODID + \":ItemTungstenHammer\", \"HammerMod-DZ_res/items/ItemTungstenHammer.png\");\r\n\t\tItemRubyHammer = new ItemRubyHammer(HammerModMain.MODID + \":ItemRubyHammer\", \"HammerMod-DZ_res/items/ItemRubyHammer.png\");\r\n\t\tItemTinHammer = new ItemTinHammer(HammerModMain.MODID + \":ItemTinHammer\", \"HammerMod-DZ_res/items/ItemTinHammer.png\");\r\n\t\tItemJadeHammer = new ItemJadeHammer(HammerModMain.MODID + \":ItemJadeHammer\", \"HammerMod-DZ_res/items/ItemJadeHammer.png\");\r\n\t\tItemAmethystHammer = new ItemAmethystHammer(HammerModMain.MODID + \":ItemAmethystHammer\", \"HammerMod-DZ_res/items/ItemAmethystHammer.png\");\r\n\t\tItemGraphiteHammer = new ItemGraphiteHammer(HammerModMain.MODID + \":ItemGraphiteHammer\", \"HammerMod-DZ_res/items/ItemGraphiteHammer.png\");\r\n\t\tItemCitrineHammer = new ItemCitrineHammer(HammerModMain.MODID + \":ItemCitrineHammer\", \"HammerMod-DZ_res/items/ItemCitrineHammer.png\");\r\n\t\tItemPierreHammer = new ItemPierreHammer(HammerModMain.MODID + \":ItemPierreHammer\", \"HammerMod-DZ_res/items/ItemPierreHammer.png\");\r\n\t\tItemSapphireHammer = new ItemSapphireHammer(HammerModMain.MODID + \":ItemSapphireHammer\", \"HammerMod-DZ_res/items/ItemSapphireHammer.png\");\r\n\t\tItemOnyxHammer = new ItemOnyxHammer(HammerModMain.MODID + \":ItemOnyxHammer\", \"HammerMod-DZ_res/items/ItemOnyxHammer.png\");\r\n\t\tItemNikoliteHammer = new ItemNikoliteHammer(HammerModMain.MODID + \":ItemNikoliteHammer\", \"HammerMod-DZ_res/items/ItemNikoliteHammer.png\");\r\n\t\tItemSilicaHammer = new ItemSilicaHammer(HammerModMain.MODID + \":ItemSilicaHammer\", \"HammerMod-DZ_res/items/ItemSilicaHammer.png\");\r\n\t\tItemCinnabarHammer = new ItemCinnabarHammer(HammerModMain.MODID + \":ItemCinnabarHammer\", \"HammerMod-DZ_res/items/ItemCinnabarHammer.png\");\r\n\t\tItemAmberBearingStoneHammer = new ItemAmberBearingStoneHammer(HammerModMain.MODID + \":ItemAmberBearingStoneHammer\", \"HammerMod-DZ_res/items/ItemAmberBearingStoneHammer.png\");\r\n\t\tItemFerrousHammer = new ItemFerrousHammer(HammerModMain.MODID + \":ItemFerrousHammer\", \"HammerMod-DZ_res/items/ItemFerrousHammer.png\");\r\n\t\tItemAdaminiteHammer = new ItemAdaminiteHammer(HammerModMain.MODID + \":ItemAdaminiteHammer\", \"HammerMod-DZ_res/items/ItemAdaminiteHammer.png\");\r\n\t\tItemShinyHammer = new ItemShinyHammer(HammerModMain.MODID + \":ItemShinyHammer\", \"HammerMod-DZ_res/items/ItemShinyHammer.png\");\r\n\t\tItemXychoriumHammer = new ItemXychoriumHammer(HammerModMain.MODID + \":ItemXychoriumHammer\", \"HammerMod-DZ_res/items/ItemXychoriumHammer.png\");\r\n\t\tItemUraniumHammer = new ItemUraniumHammer(HammerModMain.MODID + \":ItemUraniumHammer\", \"HammerMod-DZ_res/items/ItemUraniumHammer.png\");\r\n\t\tItemTitaniumHammer = new ItemTitaniumHammer(HammerModMain.MODID + \":ItemTitaniumHammer\", \"HammerMod-DZ_res/items/ItemTitaniumHammer.png\");\r\n\t\tItemBloodStoneHammer = new ItemBloodStoneHammer(HammerModMain.MODID + \":ItemBloodStoneHammer\", \"HammerMod-DZ_res/items/ItemBloodStoneHammer.png\");\r\n\t\tItemRustedHammer = new ItemRustedHammer(HammerModMain.MODID + \":ItemRustedHammer\", \"HammerMod-DZ_res/items/ItemRustedHammer.png\");\r\n\t\tItemRositeHammer = new ItemRositeHammer(HammerModMain.MODID + \":ItemRositeHammer\", \"HammerMod-DZ_res/items/ItemRositeHammer.png\");\r\n\t\tItemLimoniteHammer = new ItemLimoniteHammer(HammerModMain.MODID + \":ItemLimoniteHammer\", \"HammerMod-DZ_res/items/ItemLimoniteHammer.png\");\r\n\t\tItemMithrilHammer = new ItemMithrilHammer(HammerModMain.MODID + \":ItemMithrilHammer\", \"HammerMod-DZ_res/items/ItemMithrilHammer.png\");\r\n\t\tItemPrometheumHammer = new ItemPrometheumHammer(HammerModMain.MODID + \":ItemPrometheumHammer\", \"HammerMod-DZ_res/items/ItemPrometheumHammer.png\");\r\n\t\tItemHepatizonHammer = new ItemHepatizonHammer(HammerModMain.MODID + \":ItemHepatizonHammer\", \"HammerMod-DZ_res/items/ItemHepatizonHammer.png\");\r\n\t\tItemPoopHammer = new ItemPoopHammer(HammerModMain.MODID + \":ItemPoopHammer\", \"HammerMod-DZ_res/items/ItemPoopHammer.png\");\r\n\t\tItemAngmallenHammer = new ItemAngmallenHammer(HammerModMain.MODID + \":ItemAngmallenHammer\", \"HammerMod-DZ_res/items/ItemAngmallenHammer.png\");\r\n\t\tItemManganeseHammer = new ItemManganeseHammer(HammerModMain.MODID + \":ItemManganeseHammer\", \"HammerMod-DZ_res/items/ItemManganeseHammer.png\");\r\n\t\tItemSearedBrickHammer = new ItemSearedBrickHammer(HammerModMain.MODID + \":ItemSearedBrickHammer\", \"HammerMod-DZ_res/items/ItemSearedBrickHammer.png\");\r\n\t\tItemElectrumHammer = new ItemElectrumHammer(HammerModMain.MODID + \":ItemElectrumHammer\", \"HammerMod-DZ_res/items/ItemElectrumHammer.png\");\r\n\t\tItemPigIronHammer = new ItemPigIronHammer(HammerModMain.MODID + \":ItemPigIronHammer\", \"HammerMod-DZ_res/items/ItemPigIronHammer.png\");\r\n\t\tItemArditeHammer = new ItemArditeHammer(HammerModMain.MODID + \":ItemArditeHammer\", \"HammerMod-DZ_res/items/ItemArditeHammer.png\");\r\n\t\tItemAlumiteHammer = new ItemAlumiteHammer(HammerModMain.MODID + \":ItemAlumiteHammer\", \"HammerMod-DZ_res/items/ItemAlumiteHammer.png\");\r\n\t\tItemCobaltHammer = new ItemCobaltHammer(HammerModMain.MODID + \":ItemCobaltHammer\", \"HammerMod-DZ_res/items/ItemCobaltHammer.png\");\r\n\t\tItemManyullynHammer = new ItemManyullynHammer(HammerModMain.MODID + \":ItemManyullynHammer\", \"HammerMod-DZ_res/items/ItemManyullynHammer.png\");\r\n\t\tItemOureclaseHammer = new ItemOureclaseHammer(HammerModMain.MODID + \":ItemOureclaseHammer\", \"HammerMod-DZ_res/items/ItemOureclaseHammer.png\");\r\n\t\tItemHaderothHammer = new ItemHaderothHammer(HammerModMain.MODID + \":ItemHaderothHammer\", \"HammerMod-DZ_res/items/ItemHaderothHammer.png\");\r\n\t\tItemInfuscoliumHammer = new ItemInfuscoliumHammer(HammerModMain.MODID + \":ItemInfuscoliumHammer\", \"HammerMod-DZ_res/items/ItemInfuscoliumHammer.png\");\r\n\t\tItemRubberHammer = new ItemRubberHammer(HammerModMain.MODID + \":ItemRubberHammer\", \"HammerMod-DZ_res/items/ItemRubberHammer.png\");\r\n\t\tItemDesichalkosHammer = new ItemDesichalkosHammer(HammerModMain.MODID + \":ItemDesichalkosHammer\", \"HammerMod-DZ_res/items/ItemDesichalkosHammer.png\");\r\n\t\tItemMeutoiteHammer = new ItemMeutoiteHammer(HammerModMain.MODID + \":ItemMeutoiteHammer\", \"HammerMod-DZ_res/items/ItemMeutoiteHammer.png\");\r\n\t\tItemEximiteHammer = new ItemEximiteHammer(HammerModMain.MODID + \":ItemEximiteHammer\", \"HammerMod-DZ_res/items/ItemEximiteHammer.png\");\r\n\t\tItemMidasiumHammer = new ItemMidasiumHammer(HammerModMain.MODID + \":ItemMidasiumHammer\", \"HammerMod-DZ_res/items/ItemMidasiumHammer.png\");\r\n\t\tItemSanguiniteHammer = new ItemSanguiniteHammer(HammerModMain.MODID + \":ItemSanguiniteHammer\", \"HammerMod-DZ_res/items/ItemSanguiniteHammer.png\");\r\n\t\tItemInolashiteHammer = new ItemInolashiteHammer(HammerModMain.MODID + \":ItemInolashiteHammer\", \"HammerMod-DZ_res/items/ItemInolashiteHammer.png\");\r\n\t\tItemVulcaniteHammer = new ItemVulcaniteHammer(HammerModMain.MODID + \":ItemVulcaniteHammer\", \"HammerMod-DZ_res/items/ItemVulcaniteHammer.png\");\r\n\t\tItemLemuriteHammer = new ItemLemuriteHammer(HammerModMain.MODID + \":ItemLemuriteHammer\", \"HammerMod-DZ_res/items/ItemLemuriteHammer.png\");\r\n\t\tItemAmordrineHammer = new ItemAmordrineHammer(HammerModMain.MODID + \":ItemAmordrineHammer\", \"HammerMod-DZ_res/items/ItemAmordrineHammer.png\");\r\n\t\tItemCeruclaseHammer = new ItemCeruclaseHammer(HammerModMain.MODID + \":ItemCeruclaseHammer\", \"HammerMod-DZ_res/items/ItemCeruclaseHammer.png\");\r\n\t\tItemKalendriteHammer = new ItemKalendriteHammer(HammerModMain.MODID + \":ItemKalendriteHammer\", \"HammerMod-DZ_res/items/ItemKalendriteHammer.png\");\r\n\t\tItemVyroxeresHammer = new ItemVyroxeresHammer(HammerModMain.MODID + \":ItemVyroxeresHammer\", \"HammerMod-DZ_res/items/ItemVyroxeresHammer.png\");\r\n\t\tItemCarmotHammer = new ItemCarmotHammer(HammerModMain.MODID + \":ItemCarmotHammer\", \"HammerMod-DZ_res/items/ItemCarmotHammer.png\");\r\n\t\tItemTartariteHammer = new ItemTartariteHammer(HammerModMain.MODID + \":ItemTartariteHammer\", \"HammerMod-DZ_res/items/ItemTartariteHammer.png\");\r\n\t\tItemAtlarusHammer = new ItemAtlarusHammer(HammerModMain.MODID + \":ItemAtlarusHammer\", \"HammerMod-DZ_res/items/ItemAtlarusHammer.png\");\r\n\t\tItemAstralHammer = new ItemAstralHammer(HammerModMain.MODID + \":ItemAstralHammer\", \"HammerMod-DZ_res/items/ItemAstralHammer.png\");\r\n\t\tItemCelenegilHammer = new ItemCelenegilHammer(HammerModMain.MODID + \":ItemCelenegilHammer\", \"HammerMod-DZ_res/items/ItemCelenegilHammer.png\");\r\n\t\tItemAredriteHammer = new ItemAredriteHammer(HammerModMain.MODID + \":ItemAredriteHammer\", \"HammerMod-DZ_res/items/ItemAredriteHammer.png\");\r\n\t\tItemOrichalcumHammer = new ItemOrichalcumHammer(HammerModMain.MODID + \":ItemOrichalcumHammer\", \"HammerMod-DZ_res/items/ItemOrichalcumHammer.png\");\r\n\t\t\r\n\t\t/*\r\n\t\t * Hammers For YouTubers\r\n\t\t */\r\n\t\tItemPatHammer = new ItemPatHammer(HammerModMain.MODID + \":ItemPatHammer\", \"HammerMod-DZ_res/items/ItemPatHammer.png\");\r\n\t\tItemJenHammer = new ItemJenHammer(HammerModMain.MODID + \":ItemJenHammer\", \"HammerMod-DZ_res/items/ItemJenHammer.png\");\r\n\t\tItemDanTDMHammer = new ItemDanTDMHammer(HammerModMain.MODID + \":ItemDanTDMHammer\", \"HammerMod-DZ_res/items/ItemDanTDMHammer.png\");\r\n\t\tItemxJSQHammer = new ItemxJSQHammer(HammerModMain.MODID + \":ItemxJSQHammer\", \"HammerMod-DZ_res/items/ItemxJSQHammer.png\");\r\n\t\tItemSkyTheKidRSHammer = new ItemSkyTheKidRSHammer(HammerModMain.MODID + \":ItemSkyTheKidRSHammer\", \"HammerMod-DZ_res/items/ItemSkyTheKidRSHammer.png\");\r\n\t\tItemThackAttack_MCHammer = new ItemThackAttack_MCHammer(HammerModMain.MODID + \":ItemThackAttack_MCHammer\", \"HammerMod-DZ_res/items/ItemThackAttack_MCHammer.png\");\r\n\t\tItem_MrGregor_Hammer = new Item_MrGregor_Hammer(HammerModMain.MODID + \":Item_MrGregor_Hammer\", \"HammerMod-DZ_res/items/Item_MrGregor_Hammer.png\");\r\n\t\t\r\n\t\t/*\r\n\t\t * Hammers For Twitch Streamers\r\n\t\t */\r\n\t\tItemDeeAxelJayHammer = new ItemDeeAxelJayHammer(HammerModMain.MODID + \":ItemDeeAxelJayHammer\", \"HammerMod-DZ_res/items/ItemDeeAxelJayHammer.png\");\r\n\t\tItemincapablegamerHammer = new ItemincapablegamerHammer(HammerModMain.MODID + \":ItemincapablegamerHammer\", \"HammerMod-DZ_res/items/ItemincapablegamerHammer.png\");\r\n\t\t\r\n\t\t/*\r\n\t\t * Community Hammers\r\n\t\t */\r\n\t\tItemCryingObsidainHammer = new ItemCryingObsidainHammer(HammerModMain.MODID + \":ItemCryingObsidainHammer\", \"HammerMod-DZ_res/items/ItemCryingObsidainHammer.png\");\r\n\t\tItemMythicalHammer = new ItemMythicalHammer(HammerModMain.MODID + \":ItemMythicalHammer\", \"HammerMod-DZ_res/items/ItemMythicalHammer.png\");\r\n\t\tItemToasterHammer = new ItemToasterHammer(HammerModMain.MODID + \":ItemToasterHammer\", \"HammerMod-DZ_res/items/ItemToasterHammer.png\");\r\n\t\t\r\n\t\t/*\r\n\t\t * Special Hammers\r\n\t\t */\r\n\t\tItemRainbowHammer = new ItemRainbowHammer(HammerModMain.MODID + \":ItemRainbowHammer\", \"HammerMod-DZ_res/items/ItemRainbowHammer.png\");\r\n\t\tItemMissingTextureHammer = new ItemMissingTextureHammer(HammerModMain.MODID + \":ItemMissingTextureHammer\", \"HammerMod-DZ_res/items/ItemMissingTextureHammer.png\");\r\n\r\n\t\tregisterItems();\r\n\t}", "@Before\n\tpublic void testEachSetup() {\n\t\ttestGrid = new Grid(50,50);\n\t\tundoRedo_TestStack = new UndoRedo();\n\t\tSystem.out.println(\"Setting up test...\");\n\t}", "public static void initializeBronzeItems(Player player) {\n\t\tplayer.getActionSender().sendUpdateItems(SMITHING_INTERFACE, 146, 93,\n\t\t\t\tBRONZE_ITEMS[0]);\n\t\tplayer.getActionSender().sendUpdateItems(SMITHING_INTERFACE, 147, 93,\n\t\t\t\tBRONZE_ITEMS[1]);\n\t\tplayer.getActionSender().sendUpdateItems(SMITHING_INTERFACE, 148, 93,\n\t\t\t\tBRONZE_ITEMS[2]);\n\t\tplayer.getActionSender().sendUpdateItems(SMITHING_INTERFACE, 149, 93,\n\t\t\t\tBRONZE_ITEMS[3]);\n\t\tplayer.getActionSender().sendUpdateItems(SMITHING_INTERFACE, 150, 93,\n\t\t\t\tBRONZE_ITEMS[4]);\n\t\tplayer.getActionSender().sendUpdateItems(SMITHING_INTERFACE, 151, 93,\n\t\t\t\tBRONZE_ITEMS[5]);\n\t}", "@Override\n protected void generateMonsters()\n {\n generateWeakEnemies(2);\n generateStrongEnemies(12);\n generateElites(10);\n }", "@Test\n\tvoid test() {\n\t\tTable[] myTables = new Table[5];\n\t\tfor(int i = 0; i < myTables.length; i++) {\n\t\t\tmyTables[i] = new Table(i);\n\t\t}\n\t\tBusBoy busBoy = new BusBoy(myTables);\n\t\tSystem.out.println(myTables[0]);\n\t\tassert(myTables[0].toString().equals(\"ReadyTable\"));\n\t\tmyTables[0].nextState();\n\t\tassert(myTables[0].toString().equals(\"InUseTable\"));\n\t\tmyTables[0].nextState();\n\t\tSystem.out.println(busBoy.tablesToClean.peek());\n\t\tSystem.out.println(myTables[0]);\n\t\tassertEquals(busBoy.tablesToClean.peek(), myTables[0]);\n\t\tmyTables[0].nextState();\n\t\tassert(myTables[0].toString().equals(\"BeingCleanedTable\"));\n\t}", "private void prepare()\n {\n Block block = new Block(10);\n addObject(block,372,150);\n Wall wall = new Wall();\n addObject(wall,52,167);\n Wall wall2 = new Wall();\n addObject(wall2,160,167);\n Wall wall3 = new Wall();\n addObject(wall3,550,167);\n Wall wall4 = new Wall();\n addObject(wall4,650,167);\n Wall wall5 = new Wall();\n addObject(wall5,750,167);\n block.setLocation(306,171);\n Robot robot = new Robot();\n addObject(robot,48,51);\n Pizza pizza = new Pizza();\n addObject(pizza,550,60);\n Pizza pizza2 = new Pizza();\n addObject(pizza2,727,53);\n Pizza pizza3 = new Pizza();\n addObject(pizza3,364,303);\n Pizza pizza4 = new Pizza();\n addObject(pizza4,224,400);\n Pizza pizza5 = new Pizza();\n addObject(pizza5,622,395);\n ScorePanel scorePanel = new ScorePanel();\n addObject(scorePanel,106,525);\n Home home = new Home();\n addObject(home,717,521);\n\n block.setLocation(344,173);\n pizza3.setLocation(394,297);\n Pizza pizza6 = new Pizza();\n addObject(pizza6,711,265);\n Pizza pizza7 = new Pizza();\n addObject(pizza7,68,276);\n\n }", "@Test\n void doEffectmachinegun() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"machine gun\");\n Weapon w14 = new Weapon(\"machine gun\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n wd.addWeapon(w14);\n p.setPlayerPosition(Board.getSquare(6));\n p.getPh().drawWeapon(wd, w14.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(7));\n RealPlayer victim2 = new RealPlayer('v', \"ciccia1\");\n victim2.setPlayerPosition(Board.getSquare(10));\n RealPlayer victim3 = new RealPlayer('g', \"ciccia2\");\n victim3.setPlayerPosition(Board.getSpawnpoint('y'));\n ArrayList<Player> players = new ArrayList<>();\n players.add(victim);\n players.add(victim2);\n players.add(victim);\n try {\n p.getPh().getWeaponDeck().getWeapon(w14.getName()).doEffect(\"base\", \"opt1\", null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) {\n System.out.println(\"ERROR\");\n }\n\n assertTrue(victim.getPb().countDamages() == 2 && victim2.getPb().countDamages() == 1);\n\n players.clear();\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(7));\n victim2 = new RealPlayer('v', \"ciccia\");\n victim2.setPlayerPosition(Board.getSquare(10));\n victim3 = new RealPlayer('g', \"ciccia\");\n victim3.setPlayerPosition(Board.getSpawnpoint('y'));\n players.add(victim);\n players.add(victim2);\n players.add(victim);\n players.add(victim3);\n try {\n p.getPh().getWeaponDeck().getWeapon(w14.getName()).doEffect(\"base\", \"opt1\", \"opt2\", p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 2 && victim2.getPb().countDamages() == 1 && victim3.getPb().countDamages() == 1);\n }", "private void createAllGames() {\n\t\t// Create a melee game for each melee arena\n\t\tmeleeArenaManager.loadArenas();\n\t\tmeleeArenaManager.getArenas().forEach(meleeArena -> {\n\t\t\tMeleeGame game = new MeleeGame(meleeArena);\n\t\t\tmeleeGameManager.addGame(meleeArena.getName(), game, new PerMapLegacyLobby(game, PlayerProfile::restore, Melee.MELEE_CHAT_PREFIX));\n\t\t});\n\t\t\n\t\t// Create a rabbit game for each rabbit arena\n\t\trabbitArenaManager.loadArenas();\n\t\trabbitArenaManager.getArenas().forEach(rabbitArena -> {\n\t\t\tRabbitGame game = new RabbitGame(rabbitArena);\n\t\t\trabbitGameManager.addGame(rabbitArena.getName(), game, new PerMapLegacyLobby(game, PlayerProfile::restore, Melee.RABBIT_CHAT_PREFIX));\n\t\t});\n\t\t\n\t\t// Log out what games were created\n\t\tString meleeGamesList = meleeGameManager.getGamesList().stream()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t .map(game -> game.getArena().getName())\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t .collect(Collectors.joining(\", \"));\n\t\tgetLogger().info(\"Created Melee Games for arenas : \" + meleeGamesList);\n\n\t\tString rabbitGamesList = rabbitGameManager.getGamesList().stream()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t .map(game -> game.getArena().getName())\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t .collect(Collectors.joining(\", \"));\n\t\tgetLogger().info(\"Created Rabbit Games for arenas : \" + rabbitGamesList);\n\t}", "@Test\n @DisplayName(\"Action Marker Production Blue Test\")\n public void ActionMarkerProductionBlueTest() throws IOException, InterruptedException {\n ActionMarkerProductionBlue actionMarker = new ActionMarkerProductionBlue();\n Server server= new Server();\n ClientHandler clientHandler= new ClientHandler(server);\n ClientController clientController= new ClientController(server,clientHandler) ;\n VirtualView virtualView = new VirtualView(clientController);\n\n GameSolitaire game = new GameSolitaire(\"Ali\",true,clientController);\n\n assertEquals(\"ActionMarkerProductionBlue\", actionMarker.getType());\n\n assertEquals(4, game.productionDeckSize(0));\n assertEquals(4, game.productionDeckSize(1));\n assertEquals(4, game.productionDeckSize(2));\n\n game.activateActionMarker(actionMarker);\n\n assertEquals(2, game.productionDeckSize(0));\n assertEquals(4, game.productionDeckSize(1));\n assertEquals(4, game.productionDeckSize(2));\n\n game.activateActionMarker(actionMarker);\n\n assertEquals(0, game.productionDeckSize(0));\n assertEquals(4, game.productionDeckSize(1));\n assertEquals(4, game.productionDeckSize(2));\n\n game.activateActionMarker(actionMarker);\n\n assertEquals(0, game.productionDeckSize(0));\n assertEquals(2, game.productionDeckSize(1));\n assertEquals(4, game.productionDeckSize(2));\n\n game.activateActionMarker(actionMarker);\n\n assertEquals(0, game.productionDeckSize(0));\n assertEquals(0, game.productionDeckSize(1));\n assertEquals(4, game.productionDeckSize(2));\n\n game.activateActionMarker(actionMarker);\n\n assertEquals(0, game.productionDeckSize(0));\n assertEquals(0, game.productionDeckSize(1));\n assertEquals(2, game.productionDeckSize(2));\n\n game.activateActionMarker(actionMarker);\n\n assertEquals(0, game.productionDeckSize(0));\n assertEquals(0, game.productionDeckSize(1));\n assertEquals(0, game.productionDeckSize(2));\n\n FileClass.FileDestroyer();\n\n }", "public void createRooms()\n {\n Room outside,bedroom, bathroom, hallway1, hallway2, spareroom, kitchen, fridge;\n\n // create the rooms\n bedroom = new Room(\"Bedroom\", \"your bedroom. A simple room with a little bit too much lego\");\n bathroom = new Room(\"Bathroom\", \"the bathroom where you take your business calls. Also plenty of toilet paper\");\n hallway1 = new Room(\"Hallway1\", \"the hallway outside your room, there is a dog here blocking your path. Youll need to USE something to distract him\");\n hallway2 = new Room(\"Hallway2\", \"the same hallway? This part leads to the spare room and kitchen\");\n spareroom = new Room(\"Spare room\", \"the spare room. This is for guests\");\n kitchen = new Room(\"Kitchen\", \"your kitchen. There is a bowl with cereal in it waiting for you,But its still missing some things\");\n fridge = new Room (\"Walk in Fridge\", \"a walkin fridge. Have you ever seen Ratatouille? Its like that\");\n outside = new Room(\"Outside\", \"the outside world, breathe it in\");\n \n \n Item toiletPaper, milk, spoon, poison;// creates the items and sets their room\n \n toiletPaper = new Item(\"Toilet-Paper\", hallway1);\n toiletPaper.setDescription(\"Just your standard bog roll. Dont let your dog get a hold of it\");\n bathroom.setItems(\"Toilet-Paper\",toiletPaper);\n \n milk = new Item(\"Milk\", kitchen);\n milk.setDescription(\"white and creamy, just like mama used to make\");\n fridge.setItems(\"Milk\", milk);\n \n spoon = new Item(\"Spoon\", kitchen);\n spoon.setDescription(\"Like a fork but for liquids\");\n spareroom.setItems(\"Spoon\", spoon);\n \n poison = new Item(\"Poison\", outside);\n poison.setDescription(\"This will probably drain all of your energy, dont USE it\");\n outside.setItems(\"Poison\", poison);\n \n // initialise room exits\n bedroom.setExit(\"east\", bathroom);\n bedroom.setExit(\"north\", hallway1);\n \n bathroom.setExit(\"west\", bedroom);\n \n hallway1.setExit(\"south\", bedroom);\n hallway1.setExit(\"north\", hallway2);\n \n hallway2.setExit(\"south\", hallway1);\n hallway2.setExit(\"west\", spareroom);\n hallway2.setExit(\"north\", kitchen);\n \n spareroom.setExit(\"east\", hallway2);\n \n kitchen.setExit(\"east\", outside);\n kitchen.setExit(\"west\", fridge);\n \n fridge.setExit(\"east\", kitchen);\n \n \n outside.setExit(\"west\", kitchen);\n \n\n this.currentRoom = bedroom; // start game in bedroom\n \n }", "public Tiles() {\n basketWeave();\n med1();\n med2();\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 createGame(String[] items){\r\n\t\t\r\n\t\tString name = items[1];\r\n\t\tint[] settings = new int[5];\t\t\r\n\t\tboolean ok = true;\r\n\t\t\r\n\t\tfor(int i=2; i<items.length; i++){\r\n\t\t\tif(isInteger(items[i]))\r\n\t\t\t\tsettings[i-2] = Integer.parseInt(items[i]);\t\t\t\r\n\t\t\telse{\r\n\t\t\t\tok = false;\r\n\t\t\t\tbreak;\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\t\tif(ok == true )\r\n\t\t\tlobby.createGame(name, settings);\t\t\r\n\t}", "public void packBags() {\r\n GroceryBag[] packedBags = new GroceryBag[numItems];\r\n int bagCount = 0;\r\n\r\n GroceryBag currentBag = new GroceryBag();\r\n for (int i=0; i<numItems; i++) {\r\n GroceryItem item = (GroceryItem) cart[i];\r\n if (item.getWeight() <= GroceryBag.MAX_WEIGHT) {\r\n if (!currentBag.canHold(item)) {\r\n packedBags[bagCount++] = currentBag;\r\n currentBag = new GroceryBag();\r\n }\r\n currentBag.addItem(item);\r\n removeItem(item);\r\n i--;\r\n }\r\n }\r\n // Check this in case there were no bagged items\r\n if (currentBag.getWeight() > 0)\r\n packedBags[bagCount++] = currentBag;\r\n\r\n // Now create a new bag array which is just the right size\r\n pBags = new GroceryBag[bagCount];\r\n for (int i=0; i<bagCount; i++) {\r\n pBags[i] = packedBags[i];\r\n }\r\n\r\n // Add all grocery bags bag into cart\r\n for (int i = 0; i < bagCount; i++) {\r\n addItem(pBags[i]);\r\n }\r\n }", "public static void craft()\r\n\t{\r\n\t\tList<IRecipe> recipeList = CraftingManager.getInstance().getRecipeList();\r\n\t\tIterator<IRecipe> recipe = recipeList.iterator();\r\n\r\n\t\twhile (recipe.hasNext())\r\n\t\t{\r\n\t\t\tItemStack stack = recipe.next().getRecipeOutput();\r\n\r\n\t\t\tif (stack != null && stack.areItemsEqual(stack, new ItemStack(Blocks.STONEBRICK, 1, 0)))\r\n\t\t\t{\r\n\t\t\t\trecipe.remove();\r\n\t\t\t} else if (stack != null && stack.areItemsEqual(stack, new ItemStack(Blocks.END_BRICKS, 1, 0)))\r\n\t\t\t{\r\n\t\t\t\trecipe.remove();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * Adds all the 2 by 2 crafting Recipes\r\n\t\t */\r\n\t\tcraft2by2(new ItemStack(Blocks.STONE, 1, 2), new ItemStack(BBBlocks.moreStones, 4, 1));\r\n\t\tcraft2by2(new ItemStack(Blocks.STONE, 1, 4), new ItemStack(BBBlocks.moreStones, 4, 3));\r\n\t\tcraft2by2(new ItemStack(Blocks.STONE, 1, 6), new ItemStack(BBBlocks.moreStones, 4, 5));\r\n\t\tcraft2by2(new ItemStack(BBBlocks.moreStones, 1, 6), new ItemStack(BBBlocks.moreStones, 4, 9));\r\n\t\tcraft2by2(new ItemStack(BBBlocks.moreStones, 1, 9), new ItemStack(BBBlocks.moreStones, 4, 8));\r\n\t\tcraft2by2(new ItemStack(BBBlocks.moreStones, 1, 10), new ItemStack(BBBlocks.moreStones, 4, 13));\r\n\t\tcraft2by2(new ItemStack(BBBlocks.moreStones, 1, 13), new ItemStack(BBBlocks.moreStones, 4, 12));\r\n\t\tcraft2by2(new ItemStack(Blocks.SANDSTONE, 1, 2), new ItemStack(BBBlocks.moreStones, 4, 14));\r\n\t\tcraft2by2(new ItemStack(BBBlocks.moreStones, 1, 8), new ItemStack(BBBlocks.cotswoldBricks, 4));\r\n\t\tcraft2by2(new ItemStack(Blocks.BRICK_BLOCK, 1), new ItemStack(BBBlocks.agedBricks, 4));\r\n\t\tcraft2by2(new ItemStack(BBBlocks.moreStones2, 1, 2), new ItemStack(BBBlocks.moreStones2, 4, 5));\r\n\t\tcraft2by2(new ItemStack(BBBlocks.moreStones2, 1, 5), new ItemStack(BBBlocks.moreStones2, 4, 4));\r\n\t\tcraft2by2(new ItemStack(BBBlocks.moreStones2, 1, 1), new ItemStack(BBBlocks.moreStones2, 4, 0));\r\n\t\tcraft2by2(new ItemStack(BBBlocks.moreStones, 1, 14), new ItemStack(BBBlocks.moreStones2, 4, 1));\r\n\t\tcraft2by2(new ItemStack(Blocks.RED_SANDSTONE, 1, 2), new ItemStack(BBBlocks.moreStones2, 4, 6));\r\n\t\tcraft2by2(new ItemStack(BBBlocks.moreStones2, 1, 6), new ItemStack(BBBlocks.moreStones2, 4, 9));\r\n\t\tcraft2by2(new ItemStack(BBBlocks.moreStones2, 1, 9), new ItemStack(BBBlocks.moreStones2, 4, 8));\r\n\t\tcraft2by2(new ItemStack(Blocks.NETHERRACK, 1), new ItemStack(BBBlocks.moreStones2, 4, 11));\r\n\t\tcraft2by2(new ItemStack(BBBlocks.moreStones2, 1, 11), new ItemStack(BBBlocks.moreStones2, 4, 10));\r\n\t\tcraft2by2(new ItemStack(Blocks.STONE), new ItemStack(BBBlocks.moreStones2, 4, 12));\r\n\t\tcraft2by2(new ItemStack(Blocks.END_STONE), new ItemStack(BBBlocks.moreStones2, 4, 13));\r\n\t\tcraft2by2(new ItemStack(BBBlocks.moreStones2, 1, 12), new ItemStack(Blocks.STONEBRICK, 4, 0));\r\n\t\tcraft2by2(new ItemStack(BBBlocks.moreStones2, 1, 13), new ItemStack(Blocks.END_BRICKS, 4, 0));\r\n\t\tcraft2by2(new ItemStack(BBBlocks.moreStones3, 1, 0), new ItemStack(BBBlocks.moreStones3, 4, 2));\r\n\t\tcraft2by2(new ItemStack(BBBlocks.moreStones3, 1, 2), new ItemStack(BBBlocks.moreStones3, 4, 1));\r\n\r\n\r\n\t\t/**\r\n\t\t * Adds all the stair Recipes\r\n\t\t */\r\n\t\tcraftStair(new ItemStack(BBBlocks.moreStones, 1, 0), new ItemStack(BBBlocks.cobbleGraniteStair, 4));\r\n\t\tcraftStair(new ItemStack(BBBlocks.moreStones, 1, 2), new ItemStack(BBBlocks.cobbleDioriteStair, 4));\r\n\t\tcraftStair(new ItemStack(BBBlocks.moreStones, 1, 4), new ItemStack(BBBlocks.cobbleAndesiteStair, 4));\r\n\t\tcraftStair(new ItemStack(BBBlocks.moreStones, 1, 7), new ItemStack(BBBlocks.cobbleLimestoneStair, 4));\r\n\t\tcraftStair(new ItemStack(BBBlocks.moreStones, 1, 11), new ItemStack(BBBlocks.cobbleMarbleStair, 4));\r\n\t\tcraftStair(new ItemStack(BBBlocks.moreStones, 1, 15), new ItemStack(BBBlocks.cobbleSandstoneStair, 4));\r\n\t\tcraftStair(new ItemStack(BBBlocks.moreStones2, 1, 3), new ItemStack(BBBlocks.cobbleBasaltStair, 4));\r\n\t\tcraftStair(new ItemStack(BBBlocks.moreStones2, 1, 7), new ItemStack(BBBlocks.cobbleRedsandstoneStair, 4));\r\n\t\tcraftStair(new ItemStack(BBBlocks.moreStones, 1, 1), new ItemStack(BBBlocks.brickGraniteStair, 4));\r\n\t\tcraftStair(new ItemStack(BBBlocks.moreStones, 1, 3), new ItemStack(BBBlocks.brickDioriteStair, 4));\r\n\t\tcraftStair(new ItemStack(BBBlocks.moreStones, 1, 5), new ItemStack(BBBlocks.brickAndesiteStair, 4));\r\n\t\tcraftStair(new ItemStack(BBBlocks.moreStones, 1, 8), new ItemStack(BBBlocks.brickLimestoneStair, 4));\r\n\t\tcraftStair(new ItemStack(BBBlocks.moreStones, 1, 12), new ItemStack(BBBlocks.brickMarbleStair, 4));\r\n\t\tcraftStair(new ItemStack(BBBlocks.moreStones2, 1, 0), new ItemStack(BBBlocks.brickSandstoneStair, 4));\r\n\t\tcraftStair(new ItemStack(BBBlocks.moreStones2, 1, 4), new ItemStack(BBBlocks.brickBasaltStair, 4));\r\n\t\tcraftStair(new ItemStack(BBBlocks.moreStones2, 1, 8), new ItemStack(BBBlocks.brickRedsandstoneStair, 4));\r\n\t\tcraftStair(new ItemStack(BBBlocks.moreStones2, 1, 10), new ItemStack(BBBlocks.brickNetherrackStair, 4));\r\n\t\tcraftStair(new ItemStack(BBBlocks.cotswoldBricks, 1), new ItemStack(BBBlocks.brickCotswoldStair, 4));\r\n\t\tcraftStair(new ItemStack(BBBlocks.agedBricks, 1), new ItemStack(BBBlocks.brickAgedbrickStair, 4));\r\n\t\tcraftStair(new ItemStack(Blocks.END_BRICKS, 1), new ItemStack(BBBlocks.brickEndstoneStair, 4));\r\n\t\tcraftStair(new ItemStack(Blocks.RED_NETHER_BRICK, 1), new ItemStack(BBBlocks.brickRednetherStair, 4));\r\n\t\tcraftStair(new ItemStack(BBBlocks.moreStones3, 1, 1), new ItemStack(BBBlocks.brickAcheriteStair, 4));\r\n\r\n\t\t/**\r\n\t\t * Adds all the slab Recipes\r\n\t\t */\r\n\t\tcraftSlab(BBBlocks.cobbleAndesiteSlab);\r\n\t\tcraftSlab(BBBlocks.cobbleGraniteSlab);\r\n\t\tcraftSlab(BBBlocks.cobbleDioriteSlab);\r\n\t\tcraftSlab(BBBlocks.cobbleMarbleSlab);\r\n\t\tcraftSlab(BBBlocks.cobbleLimestoneSlab);\r\n\t\tcraftSlab(BBBlocks.cobbleSandstoneSlab);\r\n\t\tcraftSlab(BBBlocks.cobbleBasaltSlab);\r\n\t\tcraftSlab(BBBlocks.cobbleRedsandstoneSlab);\r\n\t\tcraftSlab(BBBlocks.brickAndesiteSlab);\r\n\t\tcraftSlab(BBBlocks.brickGraniteSlab);\r\n\t\tcraftSlab(BBBlocks.brickDioriteSlab);\r\n\t\tcraftSlab(BBBlocks.brickMarbleSlab);\r\n\t\tcraftSlab(BBBlocks.brickLimestoneSlab);\r\n\t\tcraftSlab(BBBlocks.brickSandstoneSlab);\r\n\t\tcraftSlab(BBBlocks.brickBasaltSlab);\r\n\t\tcraftSlab(BBBlocks.brickRedsandstoneSlab);\r\n\t\tcraftSlab(BBBlocks.brickRednetherSlab);\r\n\t\tcraftSlab(BBBlocks.brickEndstoneSlab);\r\n\t\tcraftSlab(BBBlocks.brickNetherrackSlab);\r\n\t\tcraftSlab(BBBlocks.brickCotswoldSlab);\r\n\t\tcraftSlab(BBBlocks.brickAgedbrickSlab);\r\n\t\tcraftSlab(BBBlocks.brickAcheriteSlab);\r\n\t\t\r\n\t\t/**\r\n\t\t * Other Crafting Recipes\r\n\t\t */\r\n\t\tGameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(BBBlocks.moreStones2, 16, 14), new Object[] { Blocks.CLAY, \"sand\", Blocks.GRAVEL, Items.WATER_BUCKET}));\r\n\t\tNBTTagCompound concreteTag = new NBTTagCompound();\r\n\t\tconcreteTag.setInteger(\"color\", 16777215);\r\n\t\tItemStack concreteStack = new ItemStack(BBBlocks.concreteDyeable, 8, 0);\r\n\t\tconcreteStack.setTagCompound(concreteTag);\r\n\t\tGameRegistry.addRecipe(concreteStack, new Object[] { \"###\", \"#O#\", \"###\", '#', new ItemStack(BBBlocks.moreStones2, 1, 15), 'O', Items.PAPER });\r\n\t\tGameRegistry.addRecipe(new RecipesConcreteDyeable());\r\n\t\tGameRegistry.addRecipe(new RecipesConcreteTiles());\r\n\t\tGameRegistry.addRecipe(new RecipesConcreteDyeable.RecipeDuplicateConcrete());\r\n\t\tGameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(BBBlocks.overgrowth, 8),new Object[] { \"treeLeaves\", \"treeLeaves\"}));\r\n\r\n\t\t/**\r\n\t\t * Adds all the smelting Recipes\r\n\t\t */\r\n\t\tsmelt(new ItemStack(BBBlocks.moreStones, 1, 0), new ItemStack(Blocks.STONE, 1, 1));\r\n\t\tsmelt(new ItemStack(BBBlocks.moreStones, 1, 2), new ItemStack(Blocks.STONE, 1, 3));\r\n\t\tsmelt(new ItemStack(BBBlocks.moreStones, 1, 4), new ItemStack(Blocks.STONE, 1, 5));\r\n\t\tsmelt(new ItemStack(BBBlocks.moreStones, 1, 7), new ItemStack(BBBlocks.moreStones, 1, 6));\r\n\t\tsmelt(new ItemStack(BBBlocks.moreStones, 1, 11), new ItemStack(BBBlocks.moreStones, 1, 10));\r\n\t\tsmelt(new ItemStack(BBBlocks.moreStones, 1, 15), new ItemStack(BBBlocks.moreStones, 1, 14));\r\n\t\tsmelt(new ItemStack(BBBlocks.moreStones2, 1, 3), new ItemStack(BBBlocks.moreStones2, 1, 2));\r\n\t\tsmelt(new ItemStack(BBBlocks.moreStones2, 1, 7), new ItemStack(BBBlocks.moreStones2, 1, 6));\r\n\t\tsmelt(new ItemStack(BBBlocks.moreStones2, 1, 14), new ItemStack(BBBlocks.moreStones2, 1, 15));\r\n\r\n\t}", "public Chamber() {\n this.treasures = new ArrayList<Treasure>();\n this.monsters = new ArrayList<Monster>();\n this.doors = new ArrayList<Door>();\n myContents = new ChamberContents();\n d20 = new D20();\n makeShape(mySize);\n d100 = new Percentile();\n stairs = null;\n trap = null;\n //choosing contents randomly\n myContents.chooseContents(d20.roll());\n //checking descriptions and creating contents accordingly\n makeContents();\n //calls setExits to set all exits of a chamber\n setExits();\n\n }", "@Test\n @DisplayName(\"Action Marker Production Blue And Buy Test\")\n public void ActionMarkerProductionBlueAndBuyTest() throws IOException, InterruptedException {\n ActionMarkerProductionBlue actionMarker = new ActionMarkerProductionBlue();\n Server server= new Server();\n ClientHandler clientHandler= new ClientHandler(server);\n ClientController clientController= new ClientController(server,clientHandler) ;\n VirtualView virtualView = new VirtualView(clientController);\n\n GameSolitaire game = new GameSolitaire(\"Ali\",true,clientController);\n\n assertEquals(4, game.productionDeckSize(0));\n assertEquals(4, game.productionDeckSize(1));\n assertEquals(4, game.productionDeckSize(2));\n\n game.activateActionMarker(actionMarker);\n\n assertEquals(2, game.productionDeckSize(0));\n assertEquals(4, game.productionDeckSize(1));\n assertEquals(4, game.productionDeckSize(2));\n\n try {\n game.deckFromDeckNumber(10).removeOneCard();\n } catch (EmptyException | EndOfSolitaireGame ignored) {\n }\n\n assertEquals(1, game.productionDeckSize(0));\n assertEquals(4, game.productionDeckSize(1));\n assertEquals(4, game.productionDeckSize(2));\n\n game.activateActionMarker(actionMarker);\n\n assertEquals(0, game.productionDeckSize(0));\n assertEquals(3, game.productionDeckSize(1));\n assertEquals(4, game.productionDeckSize(2));\n\n try {\n game.deckFromDeckNumber(2).removeOneCard();\n } catch (EmptyException | EndOfSolitaireGame ignored) {\n }\n\n assertEquals(0, game.productionDeckSize(0));\n assertEquals(3, game.productionDeckSize(1));\n assertEquals(3, game.productionDeckSize(2));\n\n game.activateActionMarker(actionMarker);\n\n assertEquals(0, game.productionDeckSize(0));\n assertEquals(1, game.productionDeckSize(1));\n assertEquals(3, game.productionDeckSize(2));\n\n game.activateActionMarker(actionMarker);\n\n assertEquals(0, game.productionDeckSize(0));\n assertEquals(0, game.productionDeckSize(1));\n assertEquals(2, game.productionDeckSize(2));\n\n game.activateActionMarker(actionMarker);\n\n assertEquals(0, game.productionDeckSize(0));\n assertEquals(0, game.productionDeckSize(1));\n assertEquals(0, game.productionDeckSize(2));\n\n FileClass.FileDestroyer();\n\n }", "public void setUp() {\n\t\t// should create all the olives based on # in constructor\n\n\t\tthis.myOlives = addOlive(this.amountOfOlives);\n\n\t\tthis.press = new OlivePress();\n\t}", "private void createCommands()\n{\n exitCommand = new Command(\"Exit\", Command.EXIT, 0);\n helpCommand=new Command(\"Help\",Command.HELP, 1);\n backCommand = new Command(\"Back\",Command.BACK, 1);\n}", "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}", "public static void main (String args[]){\n\t\n\tCargoContainer test1 = new CargoContainer(\"Austin\", 800, 8000);\n\tCargoContainer test2 = new CargoContainer(\"Swathi\", 10000, 10000000);\n\tCargoItem item1 = new CargoItem(\"Toys\", 200, 10, 20, 10); //Volume= 2000\n\tCargoItem item2 = new CargoItem(\"Pens\", 50, 50, 20, 5); //Volume= 5000\n\tCargoItem item3 = new CargoItem(\"Trucks\", 5000, 500, 500, 10); //Volume= 2500000\n\t\n\tSystem.out.println(test1);\n\ttest1.addItem(item1);\n\tSystem.out.println(test1);\n\ttest1.addItem(item2);\n\tSystem.out.println(test1);\n\ttest1.addItem(item3);\n\ttest2.addItem(item3);\n\tSystem.out.println(test2);\n\ttest1.removeItem(item1);\n\tSystem.out.println(test1);\n}", "@Test\n void grab() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n\n Square s = new Square(0, 4, false, true, false, true, false, 'b');\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n p.setPlayerPosition(s);\n p.getPh().getPowerupDeck().getPowerups().clear();\n p.setTurn(true);\n AmmoTile a = new AmmoTile();\n PowerupDeck pud = new PowerupDeck();\n int[] cubes = new int[3];\n cubes[0] = 2;\n cubes[2] = 1;\n char[] c1 = {'b', 'b', 'b'};\n char[] c2 = {'r', 'r', 'r'};\n char[] c3 = {'y', 'y', 'y'};\n p.getPb().payAmmo(c1);\n p.getPb().payAmmo(c2);\n p.getPb().payAmmo(c3);\n a.setCubes(cubes);\n a.setPowerup(false);\n s.setAmmo(a);\n try{\n p.grab(p.getPlayerPosition(), pud);\n }catch (WrongSquareException e){}\n }", "private void putCommands() {\r\n ShellCommand charset = new CharsetCommand();\r\n commands.put(charset.getCommandName(), charset);\r\n ShellCommand symbol = new SymbolCommand();\r\n commands.put(symbol.getCommandName(), symbol);\r\n ShellCommand exit = new ExitCommand();\r\n commands.put(exit.getCommandName(), exit);\r\n ShellCommand cat = new CatCommand();\r\n commands.put(cat.getCommandName(), cat);\r\n ShellCommand copy = new CopyCommand();\r\n commands.put(copy.getCommandName(), copy);\r\n ShellCommand ls = new LsCommand();\r\n commands.put(ls.getCommandName(), ls);\r\n ShellCommand mkdir = new MkdirCommand();\r\n commands.put(mkdir.getCommandName(), mkdir);\r\n ShellCommand hexdump = new HexdumpCommand();\r\n commands.put(hexdump.getCommandName(), hexdump);\r\n ShellCommand tree = new TreeCommand();\r\n commands.put(tree.getCommandName(), tree);\r\n ShellCommand help = new HelpCommand();\r\n commands.put(help.getCommandName(), help);\r\n ShellCommand pwd = new PwdCommand();\r\n commands.put(pwd.getCommandName(), pwd);\r\n ShellCommand cd = new CdCommand();\r\n commands.put(cd.getCommandName(), cd);\r\n ShellCommand pushd = new PushdCommand();\r\n commands.put(pushd.getCommandName(), pushd);\r\n ShellCommand popd = new PopdCommand();\r\n commands.put(popd.getCommandName(), popd);\r\n ShellCommand listd = new ListdCommand();\r\n commands.put(listd.getCommandName(), listd);\r\n ShellCommand dropd = new DropdCommand();\r\n commands.put(dropd.getCommandName(), dropd);\r\n ShellCommand rmtree = new RmtreeCommand();\r\n commands.put(rmtree.getCommandName(), rmtree);\r\n ShellCommand cptree = new CptreeCommand();\r\n commands.put(cptree.getCommandName(), cptree);\r\n ShellCommand massrename = new MassrenameCommand();\r\n commands.put(massrename.getCommandName(), massrename);\r\n }", "public void enemyCreator() { // Creates enemies\n \tif(createFrame >= createTime) {\n \t\tfor(int i = 0; i < enemies.length; i++) {\n \t\t\tif(!enemies[i].isAlive) { // If the enemy is no longer alive\n \t\t\t\tenemies[i].Create(0); // Create a new one\n \t\t\t\tbreak;\n \t\t\t} \t\t\t\t\n \t\t}\n \t\tcreateFrame = 0;\n \t}\n \telse\n \t\tcreateFrame += 1;\n \t\n \tif(killCount == 10){ // Every ten enemies\n \t\tkillCount = 0;\n \t\tif(createTime > 700)\n \t\t\tcreateTime -= 275; // Increase spawn rate\n \t\t\n \t\tif(Enemy.moveSpeed > 8)\t\n \t\t\t\tEnemy.moveSpeed -= 2; // Increase enemy movement speed\n \t\tif(killed > 100)\n \t\t\tBlock.healthTime += 25; // Increase enemy health\n \t\telse if(killed > 200)\n \t\t\tBlock.healthTime += 30;\n \t\telse\n \t\t\tBlock.healthTime += 20;\n \t}\n }", "@Test\n\tpublic void should_weapon_with_two_different_attributes_and_start_one_by_one(){\n\t\twhen(random.nextInt(ATTRIBUTE_RANGE))\n\t\t.thenReturn(0)\n\t\t.thenReturn(2)\n\t\t.thenReturn(3)\n\t\t.thenReturn(1)\n\t\t.thenReturn(2)\n\t\t.thenReturn(3)\n\t\t.thenReturn(4);\n\t\tAttribute freeze = new Freeze(\"冰冻\", 2);\n\t\tAttribute fire = new Fire(\"烧伤\", 3);\n\t\tWeapon firePlusFreezeWeapon = new Weapon(\"烈焰寒冰剑\", 5, fire, random);\n\t\tfirePlusFreezeWeapon.addAttribute(freeze);\n\t\tSoldier playerA = new Soldier(\"李四\",5,100,firePlusFreezeWeapon,10);\n\t\tPlayer playerB = new Player(\"张三\", 20, 100);\n\t\tGame game = new Game(playerA, playerB, out);\n\t\tgame.start();\n\t\t\n\t\tinorder.verify(out).println(\"战士李四用烈焰寒冰剑攻击了普通人张三,张三受到10点伤害,张三烧伤了,张三剩余生命:90\");\n\t\tinorder.verify(out).println(\"张三受到2点烧伤伤害,张三剩余生命:88\");\n\t\tinorder.verify(out).println(\"普通人张三攻击了战士李四,李四受到10点伤害,李四剩余生命:90\");\n\t\t\n\t\tinorder.verify(out).println(\"战士李四用烈焰寒冰剑攻击了普通人张三,张三受到10点伤害,张三剩余生命:78\");\n\t\tinorder.verify(out).println(\"张三受到2点烧伤伤害,张三剩余生命:76\");\n\t\tinorder.verify(out).println(\"普通人张三攻击了战士李四,李四受到10点伤害,李四剩余生命:80\");\n\t\t\n\t\tinorder.verify(out).println(\"战士李四用烈焰寒冰剑攻击了普通人张三,张三受到10点伤害,张三剩余生命:66\");\t\t\n\t\tinorder.verify(out).println(\"张三受到2点烧伤伤害,张三剩余生命:64\");\n\t\tinorder.verify(out).println(\"普通人张三攻击了战士李四,李四受到10点伤害,李四剩余生命:70\");\n\t\t\n\t\tinorder.verify(out).println(\"战士李四用烈焰寒冰剑攻击了普通人张三,张三受到10点伤害,张三冻僵了,张三剩余生命:54\");\n\t\tinorder.verify(out).println(\"普通人张三攻击了战士李四,李四受到10点伤害,李四剩余生命:60\");\n\t\t\n\t\tinorder.verify(out).println(\"战士李四用烈焰寒冰剑攻击了普通人张三,张三受到10点伤害,张三剩余生命:44\");\n\t\tinorder.verify(out).println(\"普通人张三攻击了战士李四,李四受到10点伤害,李四剩余生命:50\");\t\t\n\t\t\n\t\tinorder.verify(out).println(\"战士李四用烈焰寒冰剑攻击了普通人张三,张三受到10点伤害,张三剩余生命:34\");\t\t\n\t\tinorder.verify(out).println(\"张三冻得直哆嗦,没有击中李四\");\t\t\n\t\t\n\t\tinorder.verify(out).println(\"战士李四用烈焰寒冰剑攻击了普通人张三,张三受到10点伤害,张三剩余生命:24\");\n\t\tinorder.verify(out).println(\"普通人张三攻击了战士李四,李四受到10点伤害,李四剩余生命:40\");\n\t\t\n\t\tinorder.verify(out).println(\"战士李四用烈焰寒冰剑攻击了普通人张三,张三受到10点伤害,张三剩余生命:14\");\n\t\tinorder.verify(out).println(\"普通人张三攻击了战士李四,李四受到10点伤害,李四剩余生命:30\");\n\t\t\n\t\tinorder.verify(out).println(\"战士李四用烈焰寒冰剑攻击了普通人张三,张三受到10点伤害,张三剩余生命:4\");\n\t\tinorder.verify(out).println(\"普通人张三攻击了战士李四,李四受到10点伤害,李四剩余生命:20\");\n\t\t\n\t\tinorder.verify(out).println(\"战士李四用烈焰寒冰剑攻击了普通人张三,张三受到10点伤害,张三剩余生命:-6\");\n\t\tinorder.verify(out).println(\"张三被打败了\");\n\t}", "private static void crearMuebles(Mueble[] muebles, Almacen[] almacenes) {\n\t\tfor (int i = 0; i < 15; i++) {\n\t\t\tmuebles[i] = new Mueble(\"mueble \"+ (i + 1) , 3, 3, 3);\n\t\t\t//hacemos aqui la asignacion de almacenes con random\n\t\t\tif(muebles[i].getAsignado()==false){\n\t\t\t\talmacenes[(int)(Math.random()*4)].guardarMueble(muebles[i]);\n\t\t\t\tmuebles[i].setAsignado(true);\n\t\t\t}\n\t\t}\n\t}", "@Override\n @Test\n public void equipAnimaTest() {\n assertNull(sorcererAnima.getEquippedItem());\n sorcererAnima.equipItem(anima);\n assertFalse(sorcererAnima.getItems().contains(anima));\n assertNull(sorcererAnima.getEquippedItem());\n sorcererAnima.addItem(anima);\n sorcererAnima.equipItem(anima);\n assertEquals(anima,sorcererAnima.getEquippedItem());\n }", "private void buildSchedule() {\n\t\tclass RabbitsGrassSimulationStep extends BasicAction {\n\t\t\tpublic void execute() {\n\t\t\t\tSimUtilities.shuffle(rabbitList);\n\t\t\t\tfor (int i = 0; i < rabbitList.size(); i++) {\n\t\t\t\t\tRabbitsGrassSimulationAgent rabbit = rabbitList.get(i);\n\t\t\t\t\trabbit.step();\n\t\t\t\t}\n\n\t\t\t\treapDeadRabbits();\n\t\t\t\tgiveBirthToRabbits();\n\n\t\t\t\trabbitSpace.spreadGrass(growthRateGrass);\n\n\t\t\t\tdisplaySurf.updateDisplay();\n\t\t\t}\n\t\t}\n\n\t\tschedule.scheduleActionBeginning(0, new RabbitsGrassSimulationStep());\n\n\t\tclass UpdateNumberOfRabbitsInSpace extends BasicAction {\n\t\t\tpublic void execute() {\n\t\t\t\trabbitsAndGrassInSpace.step();\n\t\t\t}\n\t\t}\n\n\t\tschedule.scheduleActionAtInterval(1, new UpdateNumberOfRabbitsInSpace());\n\n\t}", "@Before\n\tpublic void setUp(){\n\t\tnames =new ArrayList<String>();\n\t\tnames.add(\"Chao\");\n\t\tnames.add(\"Shuchang\");\n\t\tnames.add(\"Xiangyu\");\n\t\tnames.add(\"Siyu\");\n\t\tgame = new ScrabbleGame(names);\n\t\t\n\t}", "private void initialSetup() {\n\t\tplaceNewPiece('a', 1, new Rook(board, Color.WHITE));\n placeNewPiece('b', 1, new Knight(board, Color.WHITE));\n placeNewPiece('c', 1, new Bishop(board, Color.WHITE));\n placeNewPiece('d', 1, new Queen(board, Color.WHITE));\n placeNewPiece('e', 1, new King(board, Color.WHITE, this)); // 'this' refere-se a esta jogada\n placeNewPiece('f', 1, new Bishop(board, Color.WHITE));\n placeNewPiece('g', 1, new Knight(board, Color.WHITE));\n placeNewPiece('h', 1, new Rook(board, Color.WHITE));\n placeNewPiece('a', 2, new Pawn(board, Color.WHITE, this));\n placeNewPiece('b', 2, new Pawn(board, Color.WHITE, this));\n placeNewPiece('c', 2, new Pawn(board, Color.WHITE, this));\n placeNewPiece('d', 2, new Pawn(board, Color.WHITE, this));\n placeNewPiece('e', 2, new Pawn(board, Color.WHITE, this));\n placeNewPiece('f', 2, new Pawn(board, Color.WHITE, this));\n placeNewPiece('g', 2, new Pawn(board, Color.WHITE, this));\n placeNewPiece('h', 2, new Pawn(board, Color.WHITE, this));\n\n placeNewPiece('a', 8, new Rook(board, Color.BLACK));\n placeNewPiece('b', 8, new Knight(board, Color.BLACK));\n placeNewPiece('c', 8, new Bishop(board, Color.BLACK));\n placeNewPiece('d', 8, new Queen(board, Color.BLACK));\n placeNewPiece('e', 8, new King(board, Color.BLACK, this));\n placeNewPiece('f', 8, new Bishop(board, Color.BLACK));\n placeNewPiece('g', 8, new Knight(board, Color.BLACK));\n placeNewPiece('h', 8, new Rook(board, Color.BLACK));\n placeNewPiece('a', 7, new Pawn(board, Color.BLACK, this));\n placeNewPiece('b', 7, new Pawn(board, Color.BLACK, this));\n placeNewPiece('c', 7, new Pawn(board, Color.BLACK, this));\n placeNewPiece('d', 7, new Pawn(board, Color.BLACK, this));\n placeNewPiece('e', 7, new Pawn(board, Color.BLACK, this));\n placeNewPiece('f', 7, new Pawn(board, Color.BLACK, this));\n placeNewPiece('g', 7, new Pawn(board, Color.BLACK, this));\n placeNewPiece('h', 7, new Pawn(board, Color.BLACK, this));\n\t}", "public static void main(String[] args) {\n Hero aventurier = new Hero(200, 100);\n Equipement epee = new Equipement(\"epee\", 0);\n Monsters sorciere = new Monsters(\"witch\", 180, 0);\n Monsters barbare = new Monsters(\"olaf\", 160, 0);//Degat et point attaque sont à 0 car ils prendront les valeurs du random\n\n\n System.out.println(\"Bienvenue dans le dongeon\");\n System.out.println(\"Vous avez \" + aventurier.getPointDeVie() + \" Point de vie, \" + aventurier.getFlasqueDeau() + \" flasques pour combatre vos ennemies et une \");\n\n // i=room ;si pointdevie > room-->room+1 sinon game over(pas besoin de creer une classe)\n int i = 1;\n do {\n\n if (aventurier.getPointDeVie() > 0) ;\n {\n System.out.println(\"Room\" + i);\n\n Monsters enemieActuel = barbare;\n//nbr aleatoire entre sorcier et monster\n Random random = new Random();\n int nbrAl = random.nextInt(2 );\n//si nbr=0 = sorcier sinon barbare\n if (nbrAl == 0) {\n enemieActuel = sorciere;\n //sinon barbare\n } else {\n enemieActuel = barbare;\n }\n\n\n //Si barbare faire le do while\n\n if (enemieActuel == barbare) {\n\n do { //Faire des degats aleatoire grace au random à l'aide de l'epee\n epee.setDegat((int) (5 + (Math.random() * 30)));//comme .set dega=0 on lui donne la valeur de math.random\n int degat = epee.getDegat(); //.get renvoi la valeur au int nommer degat\n barbare.setPointDeVie(barbare.getPointDeVie() - degat);//vie - degat\n System.out.println(\"Il reste au barbare \" + barbare.getPointDeVie());//nouvelle valeur de point de vie\n\n\n //idem avec l'aventurier\n barbare.setPointAttaque((int) (5 + (Math.random() * 30)));\n int pointDattaque = barbare.getPointAttaque();\n aventurier.setPointDeVie(aventurier.getPointDeVie() - pointDattaque);\n System.out.println(\"il vous reste \" + aventurier.getPointDeVie());\n\n // tant que les Pvie de l'aventurier >= 0 et idem barbare continuer le combat\n } while (aventurier.getPointDeVie() >= 0 && barbare.getPointDeVie() >= 0);\n //à la fin du combat si pvie de l'aventurier sont >0 et que i (room) egale 5 \"gagné\"\n if (aventurier.getPointDeVie() > 0 && i==5) {\n System.out.println(\"Bravo vous avez gagné ! =)\");\n\n //Si juste pvie de l'aventurier > 0 --->room suivante\n }else if (aventurier.getPointDeVie() > 0 ){\n System.out.println(\"Bravo tu passes à la pièce suivante\");\n //on redonne les valeurs de depart pdeVie pour la nouvelle room\n aventurier.setPointDeVie(200);\n barbare.setPointDeVie(180);\n i+=1;\n }\n\n // sinon room = 6 pour envoyer le sout \"game over\"\n else {\n System.out.println(\"Game Over\");\n i = 6;\n }\n\n\n\n }\n\n //IDEM avec sorciere\n else {\n do {\n\n\n aventurier.setFlasqueDeau((int) (5 + (Math.random() * 30)));\n int degat = aventurier.getFlasqueDeau();\n sorciere.setPointDeVie(sorciere.getPointDeVie() - degat);\n System.out.println(\"Il reste à la sorciere \" + sorciere.getPointDeVie());\n\n sorciere.setPointAttaque((int) (5 + (Math.random() * 30)));\n int pointDattaque = sorciere.getPointAttaque();\n aventurier.setPointDeVie(aventurier.getPointDeVie() - pointDattaque);\n System.out.println(\"il vous reste \" + aventurier.getPointDeVie());\n\n } while (aventurier.getPointDeVie() >= 0 && sorciere.getPointDeVie() >= 0);\n if (aventurier.getPointDeVie() > 0 && i==5) {\n System.out.println(\"Bravo vous avez gagné ! =)\");\n }else if (aventurier.getPointDeVie() > 0 ){\n System.out.println(\"Bravo tu passes à la pièce suivante\");\n aventurier.setPointDeVie(200);\n sorciere.setPointDeVie(160);\n i+=1;\n }\n else {\n System.out.println(\"Game Over\");\n i = 6;\n }\n }\n } } while (i <= 5 && aventurier.getPointDeVie() > 0);\n\n\n }" ]
[ "0.6350881", "0.61439943", "0.6006647", "0.5991045", "0.5805268", "0.5804196", "0.58009547", "0.5786688", "0.57234454", "0.5707926", "0.5704304", "0.570426", "0.56546277", "0.56345093", "0.56329286", "0.5621958", "0.5619991", "0.5590482", "0.5588162", "0.5558468", "0.55457383", "0.5541326", "0.55411845", "0.55373967", "0.5529558", "0.5510949", "0.5486305", "0.548024", "0.54799515", "0.5463406", "0.54301274", "0.5427641", "0.5421017", "0.54176253", "0.5383597", "0.53815925", "0.53708506", "0.53603834", "0.53522176", "0.5338734", "0.5338102", "0.5336433", "0.5324065", "0.5322712", "0.5320187", "0.53175575", "0.530457", "0.5296736", "0.5286228", "0.5285754", "0.5281464", "0.52770853", "0.52726513", "0.5272135", "0.5269948", "0.5263195", "0.52465534", "0.5235349", "0.5217427", "0.5214058", "0.5211832", "0.52065825", "0.5203733", "0.52014536", "0.5192469", "0.5175713", "0.5169238", "0.51627445", "0.51603717", "0.5155876", "0.5152615", "0.5151468", "0.5139104", "0.5138338", "0.5135188", "0.5133738", "0.51309097", "0.51293755", "0.5128744", "0.51143384", "0.5113592", "0.5112979", "0.51126564", "0.5107889", "0.51055944", "0.5104104", "0.5102911", "0.5100589", "0.50996566", "0.50957394", "0.50873137", "0.50851846", "0.508382", "0.5077072", "0.5076683", "0.5075211", "0.50733036", "0.5063267", "0.50520027", "0.50498736" ]
0.5694319
12
test the get method for determining the last use of the item for both when the item is up to it's last use and when it isn't
@Test public void getUse () { Assert.assertEquals(false, bomb.useItem()); Special aoeHeal = new Special(SpecialType.HEALTHSHOT); Assert.assertEquals(true, aoeHeal.useItem()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Item getLast();", "public String getLastItem();", "public Item getLast() {\n return items[size - 1];\n }", "public boolean offerLast(E item);", "void checkLastItem() {\n if (!mItems.isEmpty() && !mItems.get(mItems.size() - 1).equals(ADD_NEW_ENTRY)) {\n // add last item again if missing\n mItems.add(ADD_NEW_ENTRY);\n // need to manually call, since this item is not in Db and hence ignored by DiffUtil\n notifyItemInserted(mItems.size() - 1);\n }\n }", "public abstract int getLastItemSlot();", "public TypeHere getLast() {\n return items[size - 1];\n }", "@Override\r\n\r\n\tpublic boolean offerLast(Object item) {\n\t\treturn offer(item);\r\n\t}", "@Override\n public Item getBack() {\n int lastActualItemIndex = size - 1;\n return items[lastActualItemIndex];\n }", "int getLastItemOnPage();", "public String getLast()\n {\n return lastItem;\n }", "public Object last()throws ListExeption;", "@Override\r\n\tpublic Object last(){\r\n\t\tcheck();\r\n\t\treturn tail.value;\r\n\t}", "public Object getLast() throws ListException {\r\n\t\tif (size() >= 1) {\r\n\t\t\tDoublyNode lastNode = head.getPrev();\r\n\t\t\treturn lastNode.getItem();\r\n\t\t} else {\r\n\t\t\tthrow new ListException(\"getLast on an empty list\");\r\n\t\t}\r\n\t}", "public E last() {\n\r\n if(tail == null) {\r\n return null;\r\n } else {\r\n return tail.getItem();\r\n\r\n }\r\n }", "public Object getLastObject()\n {\n\tcurrentObject = lastObject;\n\n if (lastObject == null)\n \treturn null;\n else\n \treturn AL.get(AL.size()-1);\n }", "E last() throws NoSuchElementException;", "@Override\n\tpublic void findLastOverData() {\n\t\t\n\t}", "public T getNextItem();", "default V get() {\n V item = orElseNull();\n if ( item == null )\n throw new IllegalArgumentException(\"No item at the targeted position!\");\n return item;\n }", "public E pollLast() {\r\n\t\tif (isEmpty()) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tE ret = (E) data.get(data.size() - 1);\r\n\t\tdata.remove(data.size() - 1);\r\n\t\treturn ret;\r\n\t}", "@Test\r\n\tpublic void testLastIndexOf() {\r\n\t\tAssert.assertTrue(list.lastIndexOf(null) == -1);\r\n\t\tAssert.assertEquals(2, list.lastIndexOf(new Munitions(2, 3, \"iron\")));\r\n\t\tlist.add(new Munitions(2, 3, \"iron\"));\r\n\t\tAssert.assertEquals(15, list.lastIndexOf(new Munitions(2, 3, \"iron\")));\r\n\t}", "private static <T> T lastItemOfList(List<T> list) {\n if (list == null || list.size() == 0) {\n return null;\n }\n return list.get(list.size() - 1);\n }", "private Item chooseValidItem()\n {\n\n // Sets the intial random value.\n int numberRandom = random.nextInt(items.size());\n\n while (trackItems.contains(items.get(numberRandom).getName())){\n numberRandom = random.nextInt(items.size());\n }\n\n // Loops until a unused value is assigned to numberRandom,\n // within the array list size.\n \n trackItems.push(items.get(numberRandom).getName());\n\n return items.get(numberRandom);\n }", "public Object peek() {return collection.get(collection.size() - 1);}", "public int getLast() {\n\treturn _last;\n }", "@Override\n public E getLast() {\n if (isEmpty()) {\n throw new NoSuchElementException(\"No elements in dequeue\");\n }\n return dequeue[tail];\n }", "public T getLast(){\n\treturn _end.getCargo();\n }", "@Override\r\n\tpublic E getLast() {\n\t\treturn null;\r\n\t}", "public Item get(int i) {\n return items[i - 1];\n }", "public U getLast(){\r\n\t \tif (getArraySize()==0)\r\n\t \t\tthrow new IndexOutOfBoundsException();\r\n\t \t//calls get\r\n\t \treturn get(numElems-1);\r\n\t }", "@Test\r\n\tvoid testLast() {\r\n\t\tSimpleList test = new SimpleList();\r\n\t\ttest.add(3);\r\n\t\ttest.add(7);\r\n\t\ttest.add(10);\r\n\t\tint output = test.last();\r\n\t\tassertEquals(3, output);\r\n\t}", "@Override\n\tpublic boolean isLastUse(IIntermediate by) {\n\t\treturn heldObj.isLastUse(by);\n\t}", "public Item getItemBack(Player character) {\n itemPlacedRoom = false;\n Item item = character.items.get(character.getItemOwned2().getName());\n if(item != null) {\n if(canReceiveItem(character) == true) {\n items.put(item.getName(), item);\n } else {\n currentRoom.addItem(item);\n itemPlacedRoom = true;\n }\n character.setItemOwned2(null);\n }\n return item;\n }", "@Test\r\n\tpublic void testGetLast() {\n\t}", "@Test\r\n\tvoid testLast2() {\r\n\t\tSimpleList test = new SimpleList();\r\n\t\tint output = test.last();\r\n\t\tassertEquals(-1, output);\r\n\t}", "@Override\n\t\t\tpublic void onLastItemVisible() {\n\t\t\t\t\n\t\t\t}", "public void addLast(E item){\r\n }", "public T getLast()\n\t//POST: FCTVAL == last element of the list\n\t{\n\t\tNode<T> tmp = start;\n\t\twhile(tmp.next != start) //traverse the list to end\n\t\t{\n\t\t\ttmp = tmp.next;\n\t\t}\n\t\treturn tmp.value;\t//return end element\n\t}", "public E getLast() {\r\n\r\n\t\treturn (E) data.get(data.size() - 1);\r\n\t}", "public E pollLast();", "@Override\r\n\tpublic E pollLast() {\n\t\treturn null;\r\n\t}", "public Room getLastRoom(){return this.aLastRooms.pop();}", "public Item setBack (Item item) {\n if(isEmpty()) throw new NoSuchElementException(\"Failed to setBack, because DList is empty!\") ;\n // update the value of the last actual node (the last node itself is a sentinel node)\n Item oldValue = last.prev.data; \n last.prev.data = item;\n return oldValue;\n }", "public T getLast();", "public T getLast();", "@Override\n\t\tpublic Item next() {\n\t\t\treturn items[--i];\n\t\t}", "public void addLast(Item x);", "public T getNext() {\n\n // Create a new item to return\n T nextElement = getInstance();\n\n // Check if there are any more items from the list\n if (cursor <= arrayLimit) {\n nextElement = collection.get(cursor);\n cursor++;\n } else {\n // There are no more items - set to null\n nextElement = null;\n }\n\n // Return the derived item (will be null if not found)\n return nextElement;\n }", "public Item getLast() {\n Node nextToLast = findNode(size-1);\n Node removed = nextToLast.next;\n nextToLast.next = head;\n removed.next = null;\n size--;\n return removed.item;\n }", "@Override\n\t\tpublic boolean hasNext() {\n\t\t\treturn _current < (_items.length -1);\n\t\t}", "public T last() throws EmptyCollectionException{\n if (rear == null){\n throw new EmptyCollectionException(\"list\");\n }\n return rear.getElement();\n }", "public int getLast() {\n\t\treturn last;\n\t}", "@Override\r\n\tpublic boolean offerLast(E e) {\n\t\treturn false;\r\n\t}", "@Override\r\n\tprotected void doLast() {\n\t\t\r\n\t}", "public T last() throws EmptyCollectionException;", "@Override\n\tpublic T peek() {\n\t\treturn last.getValue();\n\t}", "public Item removeLast(){\n return this.doublyLinkedList.removeLast();\n }", "@Override\n public synchronized WebHistoryItem getCurrentItem() {\n return getItemAtIndex(mCurrentIndex);\n }", "public process get_last() {\n\t\treturn queue.getLast();\n\t}", "@Override\n public boolean callCheck() {\n return last == null;\n }", "private int lastNotNull() {\n\t\treturn (!this.checkEmpty()) ? findLast() : 0;\n\t}", "@Override\n\t@TimeComplexity(\"O(1)\")\n\tpublic Entry<K, V> lastEntry() {\n\t/* TCJ\n\t * Continuous operation: 1\n\t */\n\t\treturn safeEntry(map.size() - 1);\n\t}", "public Item removeLast();", "public Object last() {\r\n\t\treturn elements.get(size() - 1);\r\n\t}", "@Override\n public Wrapper getAfterLast()\n {\n return null;\n }", "@Nonnull\n public Optional<ENTITY> previous()\n {\n currentItem = Optional.of(items.get(--index));\n update();\n return currentItem;\n }", "public Item removeLastItem() {\n\t\tint lastItemIndex = this.purchaseList.getCurrentPurchases().size() - 1;\n\t\treturn this.removeItem(lastItemIndex);\n\t}", "public Object getNext() {\n\t\tif (current != null) {\n\t\t\tcurrent = current.next; // Get the reference to the next item\n\t\t}\n\t\treturn current == null ? null : current.item;\n\t}", "public T getLast() {\n return this.getHelper(this.indexCorrespondingToTheLatestElement).data;\n }", "public E getLast();", "public Item pop(Item item){\n\nif(isEmpty()) throw new NoSuchElementException(\"Stack undervflow\"); \n Item item =top.item;\n top = top.next;\n N--;\n return item;\n}", "public Object lastElement();", "public E getLast()// you finish (part of HW#4)\n\t{\n\t\t// If the tree is empty, return null\n\t\t// FIND THE RIGHT-MOST RIGHT CHILD\n\t\t// WHEN you can't go RIGHT anymore, return the node's data to last Item\n\t\tif (root == null)\n\t\t\treturn null;\n\t\tBinaryNode<E> iteratorNode = root;\n\t\twhile (iteratorNode.hasRightChild())\n\t\t\titeratorNode = iteratorNode.getRightChild();\n\t\treturn iteratorNode.getData();\n\t}", "public Item get(int i);", "boolean nextItem();", "public boolean last(String key) {\n last();\n previous(key);\n return next();\n }", "@Then(\"^I get the same item back$\")\n\tpublic void i_get_the_same_item_back() throws Throwable {\n\t throw new PendingException();\n\t}", "public Object getLast() {\r\n if (size == 0)\r\n throw new NoSuchElementException();\r\n\r\n return header.previous.element;\r\n }", "public void addLast(E item);", "void selectLastAccessedItem(String itemId);", "private Item getCurrentItem(Iterator entriesIterator){\r\n\t\tMap.Entry mapping = (Map.Entry) entriesIterator.next();\r\n\t\treturn (Item) mapping.getValue();\r\n\t}", "@Test\r\n\tpublic void itemRetTest() {\r\n\t\tItem item = new Item();\r\n\t\ttry {\r\n\t\t\tint k = 0;\r\n\t\t\tk = item.getNumberOfItems(SELLER);\r\n\t\t\tassertNotSame(k, 0);\r\n\t\t\tItem tempSet[] = item.getAllForUser(SELLER);\r\n\t\t\tassertEquals(tempSet.length, k);\t\t\t// Retrieves correct number of items\r\n\t\t} catch (SQLException e) {\r\n\t\t\tfail(\"Failed to get number of items for seller id \" + SELLER + \": SQLException\");\r\n\t\t\t//e.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\ttry {\r\n\t\t\tint k = 0;\r\n\t\t\tk = item.getNumberOfItemsInOrder(ORDER);\r\n\t\t\tassertNotSame(k, 0);\r\n\t\t\tItem tempSet[] = item.getAllByOrder(ORDER);\r\n\t\t\tassertEquals(tempSet.length, k);\t\t\t// Retrieves correct number of items\r\n\t\t} catch (SQLException e) {\r\n\t\t\tfail(\"Failed to get number of items for order id \" + ORDER + \": SQLException\");\r\n\t\t\t//e.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\ttry {\r\n\t\t\tItem tempSet[] = item.getAllByOrder(ORDER);\r\n\t\t\tfor (int i = 0; i < tempSet.length; i++) {\r\n\t\t\t\tassertNotNull(tempSet[i]);\r\n\t\t\t\tassertNotNull(tempSet[i].getId());\r\n\t\t\t\tassertNotSame(tempSet[i].getId(), 0);\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tfail(\"Failed to load items for order id \" + ORDER + \": SQLException\");\r\n\t\t\t//e.printStackTrace();\r\n\t\t}\r\n\t}", "public Object peek() {\n\t\tcheckIfStackIsEmpty();\n\t\tint indexOfLastElement = collection.size() - 1;\n\t\tObject lastElement = collection.get(indexOfLastElement);\n\t\t\n\t\treturn lastElement;\n\t}", "public int lastElement() {\r\n\r\n\t\treturn (usedSize - 1);\r\n\r\n\t}", "public long getLastUse() {\n\t\treturn _lastused;\n\t}", "public E getLast() {\r\n\t\tif (tail == null) {\r\n\t\t\tthrow new NoSuchElementException();\r\n\t\t} else {\r\n\t\t\treturn indices.get(size - 1).data;\t\r\n\t\t}\r\n\t}", "public T getItem() {\r\n return item;\r\n }", "private void getNextReady() {\n if (!iter.hasNext())\n nextItem = null;\n else {\n Map.Entry<T, Counter> entry = iter.next();\n nextItem = entry.getKey();\n remainingItemCount = entry.getValue();\n }\n }", "public Object peek() {\r\n\t\treturn al.getElementAt(al.listSize - 1);\r\n\t}", "public node getLast() {\n\t\tif(head == null) {\n\t\t\treturn null;\n\t\t}\n\t\tnode tmp = head;\n\t\twhile(tmp.next !=null) {\n\t\t\ttmp = tmp.next;\n\t\t}\n\t\treturn tmp;\n\n\t\t//OR\n\t\t//getAt(size()-1);\n\t}", "public T getItem() {\n return item;\n }", "public Item removeLast() {\r\n if (isEmpty()) {\r\n throw new NoSuchElementException();\r\n }\r\n Item result = items[--lastCursor];\r\n items[lastCursor] = null;\r\n return result;\r\n }", "@Override\r\n public K lastKey() {\n return null;\r\n }", "public Room getLastRoom() // from my understanding this pops the last entry and replaces it with the one before\n { // might need a if test to prevent a null return and say there are no rooms previous.\n Room room = roomHistory.pop();\n return room;\n }", "public O last()\r\n {\r\n if (isEmpty()) return null;\r\n return last.getObject();\r\n }", "@Override\n public Item removeLast() {\n nextLast = moveBack(nextLast, 1);\n Item output = items[nextLast];\n items[nextLast] = null;\n size -= 1;\n return output;\n }", "@Override\r\n public Entry<K, V> lastEntry() {\n return null;\r\n }", "private int getCurrentItemOfWrapper() {\n return super.getCurrentItem();\n }", "T butLast();", "Object getAfterMiss(ThreadLocal<?> key) {\n Object[] table = this.table;\n int index = key.hash & mask;\n\n // If the first slot is empty, the search is over.\n if (table[index] == null) {\n Object value = key.initialValue();\n\n // If the table is still the same and the slot is still empty...\n if (this.table == table && table[index] == null) {\n table[index] = key.reference;\n table[index + 1] = value;\n size++;\n\n cleanUp();\n return value;\n }\n\n // The table changed during initialValue().\n put(key, value);\n return value;\n }\n\n // Keep track of first tombstone. That's where we want to go back\n // and add an entry if necessary.\n int firstTombstone = -1;\n\n // Continue search.\n for (index = next(index);; index = next(index)) {\n Object reference = table[index];\n if (reference == key.reference) {\n return table[index + 1];\n }\n\n // If no entry was found...\n if (reference == null) {\n Object value = key.initialValue();\n\n // If the table is still the same...\n if (this.table == table) {\n // If we passed a tombstone and that slot still\n // contains a tombstone...\n if (firstTombstone > -1\n && table[firstTombstone] == TOMBSTONE) {\n table[firstTombstone] = key.reference;\n table[firstTombstone + 1] = value;\n tombstones--;\n size++;\n\n // No need to clean up here. We aren't filling\n // in a null slot.\n return value;\n }\n\n // If this slot is still empty...\n if (table[index] == null) {\n table[index] = key.reference;\n table[index + 1] = value;\n size++;\n\n cleanUp();\n return value;\n }\n }\n\n // The table changed during initialValue().\n put(key, value);\n return value;\n }\n\n if (firstTombstone == -1 && reference == TOMBSTONE) {\n // Keep track of this tombstone so we can overwrite it.\n firstTombstone = index;\n }\n }\n }" ]
[ "0.7186948", "0.6706217", "0.6664841", "0.66495603", "0.66239643", "0.6603744", "0.65696156", "0.65234876", "0.6522305", "0.6455093", "0.6357199", "0.6336601", "0.6280581", "0.61730033", "0.60598916", "0.60093886", "0.59913754", "0.59568727", "0.59401226", "0.5917391", "0.5906279", "0.59001976", "0.589704", "0.5894859", "0.58921444", "0.5882484", "0.5861823", "0.5859797", "0.585628", "0.58497614", "0.58301574", "0.58165467", "0.5814635", "0.5807234", "0.5803108", "0.58020025", "0.5793943", "0.5778874", "0.5776319", "0.5769127", "0.57555264", "0.5753419", "0.5740668", "0.5738071", "0.57370776", "0.57370776", "0.57128036", "0.5701871", "0.5699714", "0.5692779", "0.56925184", "0.567694", "0.5670138", "0.56638837", "0.56428415", "0.56272084", "0.5627091", "0.56261355", "0.56225365", "0.5620199", "0.5619028", "0.5616684", "0.5615245", "0.56129885", "0.56088203", "0.5605025", "0.55974865", "0.5596144", "0.5596023", "0.558668", "0.55821836", "0.5575071", "0.55716383", "0.55703896", "0.5566788", "0.55645233", "0.553416", "0.55163497", "0.5514876", "0.5509119", "0.5502817", "0.55015516", "0.54848045", "0.5469944", "0.54670423", "0.5463797", "0.5453206", "0.54502", "0.5442748", "0.54328334", "0.5430689", "0.5427645", "0.5427193", "0.54247636", "0.5423944", "0.5423364", "0.542217", "0.54190725", "0.5417448", "0.5416618", "0.5415302" ]
0.0
-1
test the get method for the Item type enumerate value of the item (not the one to make it).
@Test public void getItemType () { Assert.assertEquals("SPECIAL", bomb.getItemType().name()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Item get(int i);", "@Override\n public int getItemType() {\n return ITEM_TYPE;\n }", "public int getITEM() {\r\n return item;\r\n }", "public abstract Object getValue(Object itemInstance) throws\n InvocationTargetException, IllegalAccessException;", "default V get() {\n V item = orElseNull();\n if ( item == null )\n throw new IllegalArgumentException(\"No item at the targeted position!\");\n return item;\n }", "@Override\n\tprotected DataTypes getDataType() {\n\t\treturn DataTypes.ITEM;\n\t}", "public TypeHere get(int i) {\n return items[i];\n }", "@VTID(8)\r\n @DefaultMethod\r\n office.DocumentProperty getItem(\r\n @MarshalAs(NativeType.VARIANT) java.lang.Object index,\r\n @LCID int lcid);", "@Test\r\n\tpublic void gettersSettersTest() {\r\n\t\tItem item = new Item();\r\n\t\titem.setCount(NUMBER);\r\n\t\tassertEquals(item.getCount(), NUMBER);\r\n\t\titem.setDescription(\"word\");\r\n\t\tassertEquals(item.getDescription(), \"word\");\r\n\t\titem.setId(NUMBER);\r\n\t\tassertEquals(item.getId(), NUMBER);\r\n\t\titem.setName(\"word\");\r\n\t\tassertEquals(item.getName(), \"word\");\r\n\t\titem.setPicture(\"picture\");\r\n\t\tassertEquals(item.getPicture(), \"picture\");\r\n\t\titem.setPrice(FLOATNUMBER);\r\n\t\tassertEquals(item.getPrice(), FLOATNUMBER, 0);\r\n\t\titem.setType(\"word\");\r\n\t\tassertEquals(item.getType(), \"word\");\r\n\t\titem.setSellerId(NUMBER);\r\n\t\tassertEquals(item.getSellerId(), NUMBER);\r\n\t\titem.setDeleted(false);\r\n\t\tassertEquals(item.isDeleted(), false);\r\n\t\titem.setDeleted(true);\r\n\t\tassertEquals(item.isDeleted(), true);\t\t\r\n\t}", "public T item() throws IOException, NoSuchElementException;", "default V item( int i ) { return getDataAt( indexOfIndex( i ) ); }", "public item getI() {\n return i;\n }", "@VTID(11)\n @UseDefaultValues(paramIndexMapping = {0, 4}, optParamIndex = {1, 2, 3}, javaType = {java.lang.Object.class, java.lang.Object.class, int.class}, nativeType = {NativeType.VARIANT, NativeType.VARIANT, NativeType.Int32}, variantType = {Variant.Type.VT_ERROR, Variant.Type.VT_ERROR, Variant.Type.VT_I4}, literal = {\"80020004\", \"80020004\", \"1033\"})\n @ReturnValue(index=4)\n com.exceljava.com4j.excel.Name item(\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object index);", "public void setITEM(int value) {\r\n this.item = value;\r\n }", "public interface IItemDataEnum extends IStringSerializable{\n\t/**\n\t * This should return the unlocalized name of the sub item/block, without the mod ID or the item ID this is a sub item/block of\n\t * \n\t * @return\n\t */\n\tString getUnlocalizedName();\n\t\n\t/**\n\t * This should return the full unlocalized name for use in texture registry\n\t * \n\t * @return\n\t */\n\tString getTextureName();\n\t\n\t/**\n\t * Returns the meta value of the sub item/block\n\t * \n\t * @return\n\t */\n\tint getMeta();\n}", "CodeableConcept getItem();", "public Object get(String itemName);", "public XSSimpleType getItemType() {\n // This method could not be decompiled.\n // \n // Original Bytecode:\n // \n // 0: laload \n // 1: aastore \n // 2: dadd \n // 3: imul \n // 4: lsub \n // 5: ldiv \n // 6: ladd \n // 7: aastore \n // 8: lsub \n // 9: ineg \n // LocalVariableTable:\n // Start Length Slot Name Signature\n // ----- ------ ---- ---- ------------------------------------------\n // 0 10 0 this Lcom/sun/xml/xsom/impl/ListSimpleTypeImpl;\n // \n // The error that occurred was:\n // \n // java.lang.ArrayIndexOutOfBoundsException\n // \n throw new IllegalStateException(\"An error occurred while decompiling this method.\");\n }", "@Override\n public T getItemVO() {\n return this.itemVO;\n }", "public ItemType getItemType(){return null;}", "public abstract String getListItem (Object obj, int i, String itemProp) \n throws SAFSException;", "ICpItem getCpItem();", "InventoryItem getInventoryItem();", "protected Item func_146068_u() { return Item.func_150899_d(0); }", "public Item get(int i) {\n return items[i];\n }", "public int getIntegerValue() {\n throw new OurBadException(\" Item '\" + this.serialize() + \"' is not an integer.\");\n }", "public Type get(int index);", "@Override // see item.java\n\tpublic void useItem() {\n\n\t}", "@VTID(11)\n @UseDefaultValues(paramIndexMapping = {0, 1, 4}, optParamIndex = {2, 3}, javaType = {java.lang.Object.class, int.class}, nativeType = {NativeType.VARIANT, NativeType.Int32}, variantType = {Variant.Type.VT_ERROR, Variant.Type.VT_I4}, literal = {\"80020004\", \"1033\"})\n @ReturnValue(index=4)\n com.exceljava.com4j.excel.Name item(\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object index,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object indexLocal);", "public Item(E val) {\n value = val;\n }", "ItemType(String itemCode) {\n code = itemCode;\n }", "private void testGet() {\n System.out.println(\"------ TESTING: get(int index) ------\");\n System.out.println(\"Expected: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 \");\n System.out.print(\"Returned: \");\n try{\n for(int i = 0; i < iSize; i++) {\n if (iTestList.get(i) != i)\n throw new RuntimeException(\"FAILED -> get value is not working correctly\");\n else\n System.out.print(iTestList.get(i) + \" \");\n }\n // test to see if we can get values out of bounds\n iTestList.get(-9);\n iTestList.get(iSize+10);\n }catch (RuntimeException e){\n System.out.print(e.getMessage());\n }\n System.out.print(\"\\n\");\n }", "abstract public Object getValue(int index);", "public T getItem() {\r\n return item;\r\n }", "@Test\r\n\tpublic void testIdItem() {\r\n\r\n\t\ttry {\r\n\t\t\tItem itemDes = new Item(idItem, \"elixir de Destreza\", 0, 0, 0, 0, 0, 0, null, null);\r\n\r\n\t\t\tAssert.assertEquals(12321, itemDes.getIdItem());\r\n\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\t\t\r\n\r\n\t}", "public T getItem() {\n return item;\n }", "@Override\n\t\tpublic Object getItem(int p1)\n\t\t\t{\n\t\t\t\treturn is.get(p1);\n\t\t\t}", "public T get(int i)\n {\n throw new IllegalStateException();\n }", "public T get(int i)\n {\n throw new IllegalStateException();\n }", "@DISPID(0) //= 0x0. The runtime will prefer the VTID if present\r\n @VTID(9)\r\n @DefaultMethod\r\n visiotool.IVStyle item(\r\n @MarshalAs(NativeType.VARIANT) java.lang.Object nameOrIndex);", "@VTID(11)\n @UseDefaultValues(paramIndexMapping = {0, 1, 2, 4}, optParamIndex = {3}, javaType = {int.class}, nativeType = {NativeType.Int32}, variantType = {Variant.Type.VT_I4}, literal = {\"1033\"})\n @ReturnValue(index=4)\n com.exceljava.com4j.excel.Name item(\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object index,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object indexLocal,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object refersTo);", "public Object get(int propID, int i) throws SL_Exception\n {\n switch(propID)\n {\n default:\n return super.get(propID, i);\n }\n }", "public CPRIMITIVEALTERNATIVES getItem()\n {\n return item;\n }", "io.opencannabis.schema.commerce.OrderItem.Item getItem(int index);", "ItemType(String code) {\n this.code = code;\n }", "ItemType(String code) {\n this.code = code;\n }", "public T getItem() {\n\t\treturn item;\n\t}", "public T getItem() {\n\t\treturn item;\n\t}", "public interface ListItemType {\n int TYPE_UNKNOWN = -1;\n int TYPE_DUOBAO_LABEL = 0;\n int TYPE_DUOBAO = 1;\n int TYPE_JIFEN_LABEL = 2;\n int TYPE_JIFEN = 3;\n}", "public abstract Object get(int pos) throws IndexOutOfBoundsException;", "E get(int i) throws IndexOutOfBoundsException;", "@Test\n public void testGetItem() throws Exception {\n System.out.println(\"getItem\");\n Integer orcamentoItemId = null;\n EJBContainer container = javax.ejb.embeddable.EJBContainer.createEJBContainer();\n OrcamentoService instance = (OrcamentoService)container.getContext().lookup(\"java:global/classes/OrcamentoService\");\n Orcamentoitem expResult = null;\n Orcamentoitem result = instance.getItem(orcamentoItemId);\n assertEquals(expResult, result);\n container.close();\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public Item getItemByKey(String key) {\n throw new OurBadException(\" Item '\" + this.serialize() + \"' is not an object.\");\n }", "public int getItemIntValue(){\n return itemIntValue;\n }", "@Test\r\n\tpublic void itemRetTest() {\r\n\t\tItem item = new Item();\r\n\t\ttry {\r\n\t\t\tint k = 0;\r\n\t\t\tk = item.getNumberOfItems(SELLER);\r\n\t\t\tassertNotSame(k, 0);\r\n\t\t\tItem tempSet[] = item.getAllForUser(SELLER);\r\n\t\t\tassertEquals(tempSet.length, k);\t\t\t// Retrieves correct number of items\r\n\t\t} catch (SQLException e) {\r\n\t\t\tfail(\"Failed to get number of items for seller id \" + SELLER + \": SQLException\");\r\n\t\t\t//e.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\ttry {\r\n\t\t\tint k = 0;\r\n\t\t\tk = item.getNumberOfItemsInOrder(ORDER);\r\n\t\t\tassertNotSame(k, 0);\r\n\t\t\tItem tempSet[] = item.getAllByOrder(ORDER);\r\n\t\t\tassertEquals(tempSet.length, k);\t\t\t// Retrieves correct number of items\r\n\t\t} catch (SQLException e) {\r\n\t\t\tfail(\"Failed to get number of items for order id \" + ORDER + \": SQLException\");\r\n\t\t\t//e.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\ttry {\r\n\t\t\tItem tempSet[] = item.getAllByOrder(ORDER);\r\n\t\t\tfor (int i = 0; i < tempSet.length; i++) {\r\n\t\t\t\tassertNotNull(tempSet[i]);\r\n\t\t\t\tassertNotNull(tempSet[i].getId());\r\n\t\t\t\tassertNotSame(tempSet[i].getId(), 0);\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tfail(\"Failed to load items for order id \" + ORDER + \": SQLException\");\r\n\t\t\t//e.printStackTrace();\r\n\t\t}\r\n\t}", "public List<Item> getValues() {\n throw new OurBadException(\" Item '\" + this.serialize() + \"' is not an object.\");\n }", "public Object get (int i)\r\n {\r\n }", "@Override\n public Item get(long idItem) throws EntityNotFound;", "public int get(int i) {\n // YOUR CODE HERE\n return 1;\n }", "public Item getData()\r\n\t{\r\n\t\treturn theItem;\r\n\t}", "abstract int get(int index);", "protected Object doGetValue() {\n\t\treturn value;\n\t}", "public Item getItem() { \n return myItem;\n }", "private void valivate(Item item) {\n if(item == null)\n throw new IllegalArgumentException(\"the item is null\");\n }", "@Test\r\n\tpublic void testBonusInteligencia() {\r\n\t\t\r\n\t\ttry {\r\n\t\t\tItem itemDes = new Item(idItem, \"elixir de Destreza\", 0, 0, 0, 0, 0, bonusInteligencia, null, null);\r\n\t\t\t\r\n\t\t\tAssert.assertEquals(30, itemDes.getBonusInteligencia());\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}\t\t\r\n\t}", "@Override\n\t\t\tpublic int getItemType(int realPosition) {\n\n\t\t\t\treturn realPosition % 5;\n\t\t\t}", "@SuppressWarnings(\"unused\")\n public Item item(final QueryContext qc) throws QueryException, IOException {\n return super.item(qc, null);\n }", "public void setItem(ItemType item) {\n\t this.item = item;\n\t}", "public void setItem(ItemType item) {\n\t this.item = item;\n\t}", "public RTWValue getAsValue(int i);", "public Item getItem ()\n\t{\n\t\treturn item;\n\t}", "@DISPID(13) //= 0xd. The runtime will prefer the VTID if present\r\n @VTID(20)\r\n visiotool.IVStyle itemU(\r\n @MarshalAs(NativeType.VARIANT) java.lang.Object nameOrIndex);", "public interface MultiItemInterface {\n int getItemType();\n int getSpanSize();\n}", "public abstract E get(int index);", "@Override\n public E get(int i) throws IndexOutOfBoundsException {\n validIndex(i);\n return data[i];\n }", "public ItemStack get(int paramInt)\r\n/* 26: */ {\r\n/* 27: 41 */ return this.a[paramInt];\r\n/* 28: */ }", "@Test\r\n\tpublic void testGet() {\r\n\t\tAssert.assertTrue(list.get(2).equals(new Munitions(2, 3, \"iron\")));\r\n\t}", "public ItemType getType()\n {\n\treturn type;\n }", "@Test\n public void testItemService() {\n Item i = itemService.getItem(1);\n System.out.println(i.toString());\n Assert.assertSame(i, item);\n }", "public void setItemNo(int value) {\n this.itemNo = value;\n }", "@Override\n public E get(int index) {\n this.rangeCheck(index);\n return (E) this.values[index];\n }", "public Item convertToItem(Object value, XQItemType type) throws XQException;", "public interface Item extends org.apache.xmlbeans.XmlAnySimpleType\n {\n java.lang.Object getObjectValue();\n void setObjectValue(java.lang.Object val);\n /** @deprecated */\n java.lang.Object objectValue();\n /** @deprecated */\n void objectSet(java.lang.Object val);\n org.apache.xmlbeans.SchemaType instanceType();\n public static final org.apache.xmlbeans.SchemaType type = (org.apache.xmlbeans.SchemaType)\n org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(Item.class.getClassLoader(), \"schemaorg_apache_xmlbeans.system.sXMLSCHEMA\").resolveHandle(\"anon16cetype\");\n \n /**\n * An anonymous inner XML type.\n *\n * This is an atomic type that is a restriction of org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList$Member2$Item$Member.\n */\n public interface Member extends org.apache.xmlbeans.XmlToken\n {\n public static final org.apache.xmlbeans.SchemaType type = (org.apache.xmlbeans.SchemaType)\n org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(Member.class.getClassLoader(), \"schemaorg_apache_xmlbeans.system.sXMLSCHEMA\").resolveHandle(\"anon0c73type\");\n \n org.apache.xmlbeans.StringEnumAbstractBase enumValue();\n void set(org.apache.xmlbeans.StringEnumAbstractBase e);\n \n static final Enum TARGET_NAMESPACE = Enum.forString(\"##targetNamespace\");\n static final Enum LOCAL = Enum.forString(\"##local\");\n \n static final int INT_TARGET_NAMESPACE = Enum.INT_TARGET_NAMESPACE;\n static final int INT_LOCAL = Enum.INT_LOCAL;\n \n /**\n * Enumeration value class for org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList$Member2$Item$Member.\n * These enum values can be used as follows:\n * <pre>\n * enum.toString(); // returns the string value of the enum\n * enum.intValue(); // returns an int value, useful for switches\n * // e.g., case Enum.INT_TARGET_NAMESPACE\n * Enum.forString(s); // returns the enum value for a string\n * Enum.forInt(i); // returns the enum value for an int\n * </pre>\n * Enumeration objects are immutable singleton objects that\n * can be compared using == object equality. They have no\n * public constructor. See the constants defined within this\n * class for all the valid values.\n */\n static final class Enum extends org.apache.xmlbeans.StringEnumAbstractBase\n {\n /**\n * Returns the enum value for a string, or null if none.\n */\n public static Enum forString(java.lang.String s)\n { return (Enum)table.forString(s); }\n /**\n * Returns the enum value corresponding to an int, or null if none.\n */\n public static Enum forInt(int i)\n { return (Enum)table.forInt(i); }\n \n private Enum(java.lang.String s, int i)\n { super(s, i); }\n \n static final int INT_TARGET_NAMESPACE = 1;\n static final int INT_LOCAL = 2;\n \n public static final org.apache.xmlbeans.StringEnumAbstractBase.Table table =\n new org.apache.xmlbeans.StringEnumAbstractBase.Table\n (\n new Enum[]\n {\n new Enum(\"##targetNamespace\", INT_TARGET_NAMESPACE),\n new Enum(\"##local\", INT_LOCAL),\n }\n );\n private static final long serialVersionUID = 1L;\n private java.lang.Object readResolve() { return forInt(intValue()); } \n }\n \n /**\n * A factory class with static methods for creating instances\n * of this type.\n */\n \n public static final class Factory\n {\n public static org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2.Item.Member newValue(java.lang.Object obj) {\n return (org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2.Item.Member) type.newValue( obj ); }\n \n public static org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2.Item.Member newInstance() {\n return (org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2.Item.Member) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, null ); }\n \n public static org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2.Item.Member newInstance(org.apache.xmlbeans.XmlOptions options) {\n return (org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2.Item.Member) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, options ); }\n \n private Factory() { } // No instance of this class allowed\n }\n }\n \n /**\n * A factory class with static methods for creating instances\n * of this type.\n */\n \n public static final class Factory\n {\n public static org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2.Item newValue(java.lang.Object obj) {\n return (org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2.Item) type.newValue( obj ); }\n \n public static org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2.Item newInstance() {\n return (org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2.Item) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, null ); }\n \n public static org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2.Item newInstance(org.apache.xmlbeans.XmlOptions options) {\n return (org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2.Item) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, options ); }\n \n private Factory() { } // No instance of this class allowed\n }\n }", "public Object get(int index)\n {\n return items[index];\n }", "public Integer getAsInteger(String itemName, Integer defaultValue);", "public Object getValue(int index);", "boolean hasItemIndex();", "boolean hasItemIndex();", "boolean hasItemIndex();", "public abstract T get(int index);", "@Test\n public void testSetItem() throws Exception {\n System.out.println(\"setItem\");\n Orcamentoitem orcItem = null;\n EJBContainer container = javax.ejb.embeddable.EJBContainer.createEJBContainer();\n OrcamentoService instance = (OrcamentoService)container.getContext().lookup(\"java:global/classes/OrcamentoService\");\n Orcamentoitem expResult = null;\n Orcamentoitem result = instance.setItem(orcItem);\n assertEquals(expResult, result);\n container.close();\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public CollectionItemInfo getCollectionItemInfo() {\n/* 1114 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Test\n public void getUse () {\n Assert.assertEquals(false, bomb.useItem());\n Special aoeHeal = new Special(SpecialType.HEALTHSHOT);\n Assert.assertEquals(true, aoeHeal.useItem());\n }", "@Override\r\n\t\t\tpublic Object getItem(int i) {\n\t\t\t\treturn i;\r\n\t\t\t}", "protected E value(Position<Item<E>> p) {\n return p.getElement().getValue();\n }", "@Test\n public void getItem() {\n Item item = new Item();\n item.setName(\"Drill\");\n item.setDescription(\"Power Tool\");\n item.setDaily_rate(new BigDecimal(\"24.99\"));\n item = service.saveItem(item);\n\n // Copy the Item added to the mock database using the Item API method\n Item itemCopy = service.findItem(item.getItem_id());\n\n // Test the getItem() API method\n verify(itemDao, times(1)).getItem(item.getItem_id());\n TestCase.assertEquals(itemCopy, item);\n }", "public Item getItem(final String pItem){return this.aItemsList.getItem(pItem);}", "public boolean isValidItem() {\n return validItem;\n }", "public String getValue(int i) {\n/* 151 */ return ((Attr)this.m_attrs.item(i)).getValue();\n/* */ }", "public ItemType getItem() {\n\t return this.item;\n\t}" ]
[ "0.6448048", "0.6129159", "0.6122468", "0.60888934", "0.6042461", "0.6026661", "0.6017157", "0.59492624", "0.59138346", "0.587297", "0.5859362", "0.5851473", "0.5843201", "0.58372265", "0.5832532", "0.5827308", "0.57987165", "0.5777783", "0.57692844", "0.5763631", "0.5760122", "0.5757586", "0.57518893", "0.57489514", "0.5729903", "0.5713375", "0.5699094", "0.56918585", "0.56909937", "0.5673442", "0.5663293", "0.5656127", "0.5652811", "0.56418216", "0.5634648", "0.5630265", "0.5593564", "0.55929244", "0.55929244", "0.55814797", "0.5554723", "0.55439323", "0.55394554", "0.5539018", "0.552293", "0.552293", "0.5521761", "0.5521761", "0.5504504", "0.54991984", "0.5492779", "0.5492573", "0.5489929", "0.54887676", "0.54756916", "0.54748344", "0.5458899", "0.5453027", "0.54372394", "0.5434806", "0.5426528", "0.54243433", "0.5421497", "0.5420212", "0.54152757", "0.5413286", "0.5412114", "0.54089177", "0.54089177", "0.5408123", "0.5404838", "0.5400014", "0.5398042", "0.53956187", "0.5393237", "0.53857875", "0.5375618", "0.53752184", "0.53721315", "0.53610486", "0.5360272", "0.5359714", "0.5354891", "0.5352012", "0.533017", "0.53242624", "0.53226805", "0.53226805", "0.53226805", "0.53173536", "0.53149444", "0.53143084", "0.531319", "0.531132", "0.5309027", "0.5300153", "0.5299418", "0.5297737", "0.529545", "0.5289514" ]
0.6154513
1
test the get method for the description of the bomb
@Test public void getDescription () { String testString = "Nuke\n" + "Damage: 700\n"; Assert.assertEquals(testString, bomb.getDescription()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\r\n public void testGetDescription() {\r\n System.out.println(\"getDescription\");\r\n \r\n String expResult = \"\";\r\n String result = instance.getDescription();\r\n assertEquals(expResult, result);\r\n \r\n \r\n }", "@Test\n public void testGetDescription() {\n System.out.println(\"getDescription\");\n assertEquals(\"Dumb abstract building\", building.getDescription());\n }", "@Test\n void getAndSetDescription() {\n }", "public synchronized TestDescription getDescription()\n throws Fault {\n if (desc == null) {\n // reconstitute description (probably from file)\n reload();\n }\n return desc;\n }", "@Test\n public void testGetDescription() {\n System.out.println(\"getDescription\");\n \n String expResult = \"Description\";\n instance.setDescription(expResult);\n String result = instance.getDescription();\n assertEquals(\"Description not as expected\", expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n // fail(\"The test case is a prototype.\");\n }", "@Test\n public void getDescription() {\n cleanEntity0();\n\n ReflectionTestUtils.setField(entity0, \"description\", descriptionS);\n assertEquals(entity0.getDescription(), descriptionS);\n }", "String getDesc();", "String getDescripcion();", "String getDescripcion();", "@Test\n public void testGetDescription() {\n VirusAttribute virusAttribute = new VirusAttribute(\"att\", \"desc\", 30);\n String result = virusAttribute.getDescription();\n assertEquals(\"desc\", result);\n }", "@Test\n public void getItemType () {\n Assert.assertEquals(\"SPECIAL\", bomb.getItemType().name());\n }", "java.lang.String getDesc();", "String getDescribe();", "String getDescribe();", "public String getBomb() {\n\t\treturn bomb;\n\t}", "public String getDescription()\n/* */ {\n/* 74 */ return this.description;\n/* */ }", "@Test\n public void setDescription() {\n cleanEntity0();\n\n entity0.setDescription(descriptionS);\n assertEquals(descriptionS, ReflectionTestUtils.getField(entity0, \"description\"));\n }", "@Override//sobrescribir metodo\n public String getDescripcion(){\n return hamburguesa.getDescripcion()+\" + lechuga\";//retorna descripcion del oobj hamburguesa y le agrega +lechuga\n }", "public String describeContent(){\n String description;\n if (content != null){\n description = content.getDescription();\n } else {\n description = \"This chest is empty\";\n }\n return description;\n }", "public String getDescripcion()\r\n/* 163: */ {\r\n/* 164:299 */ return this.descripcion;\r\n/* 165: */ }", "@Test\n\tpublic void testaGetMensagem() {\n\t\tAssert.assertEquals(\n\t\t\t\t\"Erro no getMensagem()\",\n\t\t\t\t\"Disciplina 1 eh avaliada com 5 minitestes, eliminando 1 dos mais baixos.\",\n\t\t\t\tminitElimBai_1.getMensagem());\n\t\tAssert.assertEquals(\n\t\t\t\t\"Erro no getMensagem()\",\n\t\t\t\t\"Disciplina 2 eh avaliada com 10 minitestes, eliminando 2 dos mais baixos.\",\n\t\t\t\tminitElimBai_2.getMensagem());\n\t}", "@Test\n public void binDescriptionTest() {\n assertEquals(\"bin_desc\", authResponse.getBinDescription());\n }", "java.lang.String getDescribe();", "@Test\n\t\tpublic void testGet() {\n\t\t\tChObject cho = repoTest.get(\"68268301\");\n\t\t\tassertEquals(\"68268301\", cho.getId());\n\t\t\tassertEquals(\"Gift of Vlisco\", cho.getCreditline());\n\t\t\tassertEquals(\"2011\", cho.getDate());\n\t\t\tassertEquals(\"Women's high-heeled shoes. Printed in indigo, emerald green, lime green, and yellow on a white ground.\", cho.getDescription());\n\t\t\tassertEquals(null, cho.getGallery_text());\n\t\t\t//assertEquals(\"Medium: 100% cotton Technique: wax-resist printed on plain weave\", cho.getMedium());\n\t\t\tassertEquals(\"cotton\",cho.getMedium());\n\t\t\tassertEquals(\"Textile (Netherlands), 2011\", cho.getTitle());\n\t\t}", "@Test\n public void getUse () {\n Assert.assertEquals(false, bomb.useItem());\n Special aoeHeal = new Special(SpecialType.HEALTHSHOT);\n Assert.assertEquals(true, aoeHeal.useItem());\n }", "@Override\r\n\tpublic String getdesc() {\n\t\treturn b1.getdesc() + \", Milk\";\r\n\t}", "@Test\n\tvoid descriptionTest() {\n\t\tfor(MedicalItem item: itemList) {\n\t\t\tString expected = \"Name: \" + item.toString() + \"\\nHeal Amount: \" + item.getHealAmount() +\n\t\t\t\t\t\"\\nCures Plague: \" + item.getCure() +\"\\nOutpost Cost: $\" + item.getPrice();\n\t\t\tassertEquals(item.itemDescription(), expected);\n\t\t}\n\t}", "public String getDesc()\r\n {\r\n return description;\r\n }", "@Test\n public void getBills() throws Exception {\n int id = 1;\n\n Bills rm = bl.getBills(id);\n logger.info(rm);\n assertTrue(rm.getBill_name().length() > 0);\n\n }", "public String getDescription(){return description;}", "public String getDescription(){return description;}", "public String getDescription(){ return description; }", "@Test\r\n\tpublic void testRelease() {\n\t\tBomb bomb = new Bomb(100, 200, 300, 10, null, 0, 0, 0);\r\n\t\tBomb.Coordinates coor = bomb.getReleaseCoordinates();\r\n\t\t\r\n\t\t//making sure that X, Y, Release Alt, and Descent Speed are correct.\r\n\t\tassertEquals(coor.getX(), 100);\r\n\t\tassertEquals(coor.getY(), 200);\r\n\t\tassertEquals(bomb.getReleaseAltitude(), 300);\r\n\t\tassertEquals(bomb.getDescentSpeed(), 10);\r\n\t\t\r\n\t}", "@Test\n public void testGetDescription()\n {\n assertThat(m_SUT.getDescription(), is(\"test description\"));\n }", "public void testGetDescription() throws Exception {\n System.out.println(\"getDescription\");\n Properties properties = new Properties();\n properties.put(OntologyConstants.ONTOLOGY_MANAGER_CLASS,\n \"com.rift.coad.rdf.semantic.ontology.jena.JenaOntologyManager\");\n File testFile = new File(\"./base.xml\");\n FileInputStream in = new FileInputStream(testFile);\n byte[] buffer = new byte[(int)testFile.length()];\n in.read(buffer);\n in.close();\n properties.put(OntologyConstants.ONTOLOGY_CONTENTS, new String(buffer));\n JenaOntologyManager instance =\n (JenaOntologyManager)OntologyManagerFactory.init(properties);\n String expResult = \"The jena ontology manager\";\n String result = instance.getDescription();\n assertEquals(expResult, result);\n }", "@Test \n\tpublic void get() \n\t{\n\t\tassertTrue(true);\n\t}", "@Override\n\tpublic String getdescription() {\n\t\treturn this.description.getDesc();\n\t}", "@Test\r\n public void testGetMovieInfo() throws MovieDbException {\r\n LOG.info(\"getMovieInfo\");\r\n String language = \"en\";\r\n MovieDb result = tmdb.getMovieInfo(ID_MOVIE_BLADE_RUNNER, language);\r\n assertEquals(\"Incorrect movie information\", \"Blade Runner\", result.getOriginalTitle());\r\n }", "@Test\n public void testBombCommand() {\n List<Country> l_countryList = new ArrayList();\n\n //creating a new country object\n Country l_country = new Country();\n l_country.setD_continentIndex(1);\n l_country.setD_countryIndex(1);\n l_country.setD_countryName(\"india\");\n List<String> l_neighborList = new ArrayList();\n l_neighborList.add(\"china\");\n\n //added neighbour of country \n l_country.setD_neighbourCountries(l_neighborList);\n l_countryList.add(l_country);\n d_player.setD_ownedCountries(l_countryList);\n\n d_orderProcessor.processOrder(\"boMb china\".trim(), d_gameData);\n d_gameData.getD_playerList().get(0).issue_order();\n Order l_order = d_gameData.getD_playerList().get(0).next_order();\n assertEquals(true, l_order.executeOrder());\n\n //checking number of armies after using bomb card\n for (Map.Entry<Integer, Continent> l_continent : d_gameData.getD_warMap().getD_continents().entrySet()) {\n for (Country l_countryName : l_continent.getValue().getD_countryList()) {\n if (l_countryName.getD_countryName().equals(\"china\")) {\n assertEquals(5, l_countryName.getD_noOfArmies());\n }\n }\n }\n }", "@Test\r\n public void testSetDescription() {\r\n System.out.println(\"setDescription\");\r\n String description = \"\";\r\n \r\n instance.setDescription(description);\r\n assertEquals(description, instance.getDescription());\r\n \r\n }", "public String getDesc() {\n return desc;\n }", "public String getDesc() {\n return desc;\n }", "public String getDesc() {\n return desc;\n }", "public String getDesc() {\n return desc;\n }", "public String getDesc() {\n return desc;\n }", "public String getDescription()\r\n {\r\n\treturn desc;\r\n }", "public String getDescription(){\r\n \tString retVal = this.description;\r\n return retVal;\r\n }", "@Test\n\tpublic void testGet() {\n\t\tWellRegistryKey well = new WellRegistryKey(\"USGS\", \"402734087033401\"); // was 007\n\t\tWellDataType type = WellDataType.WATERLEVEL;\n\t\tCacheMetaData cmd = dao.get(well, type);\n\t\t\n\t\tassertNotNull(\"expected some meta data\",cmd);\n\t\tSystem.out.printf(\"Got successCt=%d, failCt=%d, last attempt=%s\\n\", cmd.getSuccessCt(), cmd.getFailCt(), cmd.getMostRecentAttemptDt());\n\t\tassertEquals(\"Agency code\", \"USGS\", cmd.getAgencyCd());\n\t\tassertEquals(\"Site no\", \"402734087033401\", cmd.getSiteNo());\n\t\tassertTrue(\"non-negative fail count\", cmd.getFailCt() >= 0);\n\t\tassertTrue(\"non-negative success count\", cmd.getSuccessCt() >= 0);\n\t\t\n\t}", "public abstract String getDescription ( );", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "public void testGetSetDesc() {\n exp = new Experiment(\"10\");\n exp.setDesc(\"test\");\n assertEquals(\"get/setDesc does not work\", \"test\", exp.getDesc());\n }", "public String getDesc(){\r\n\t\treturn this.desc;\r\n\t}", "@Test\r\n public void testGetPersonInfo() throws MovieDbException {\r\n LOG.info(\"getPersonInfo\");\r\n Person result = tmdb.getPersonInfo(ID_PERSON_BRUCE_WILLIS);\r\n assertTrue(\"Wrong actor returned\", result.getId() == ID_PERSON_BRUCE_WILLIS);\r\n }", "@Test\r\n\tpublic void testCountBomb()\r\n\t{\r\n\t\tassertEquals(3,testCanPlaceBombBehavior.countBomb());\r\n\t}" ]
[ "0.66539913", "0.65471715", "0.64321566", "0.6411464", "0.63992673", "0.624645", "0.6235541", "0.6220218", "0.6220218", "0.6219781", "0.6216259", "0.61132777", "0.6110823", "0.6110823", "0.6109485", "0.6090124", "0.60465604", "0.60257715", "0.60222214", "0.5995462", "0.5980921", "0.5979221", "0.59656215", "0.59616774", "0.5940175", "0.5920646", "0.5893487", "0.589252", "0.5891118", "0.58788276", "0.58788276", "0.58587646", "0.581995", "0.5813179", "0.5806857", "0.5792101", "0.5756748", "0.5756651", "0.5746949", "0.57445186", "0.57411945", "0.57411945", "0.57411945", "0.57411945", "0.57411945", "0.57347393", "0.57341975", "0.5732143", "0.5720063", "0.57000995", "0.57000995", "0.57000995", "0.57000995", "0.57000995", "0.57000995", "0.57000995", "0.57000995", "0.57000995", "0.57000995", "0.57000995", "0.57000995", "0.57000995", "0.57000995", "0.57000995", "0.57000995", "0.57000995", "0.57000995", "0.57000995", "0.57000995", "0.57000995", "0.57000995", "0.57000995", "0.57000995", "0.57000995", "0.57000995", "0.57000995", "0.57000995", "0.57000995", "0.57000995", "0.57000995", "0.57000995", "0.57000995", "0.57000995", "0.57000995", "0.57000995", "0.57000995", "0.57000995", "0.56997013", "0.56997013", "0.56997013", "0.56997013", "0.56997013", "0.56997013", "0.56997013", "0.56997013", "0.56997013", "0.5690973", "0.56893927", "0.5684424", "0.56754124" ]
0.7211205
0
Tests whether HealthEffect can change the Commander's health when used. Also checks the typical damage case and the over heal (heal more than max HP) case.
@Test public void useEffect() { //should normally run useItem method, but for testing it is not needed here. HealthEffect bombEff = (HealthEffect) bomb.getEffect().get(0); bombEff.applyEffect(com); Assert.assertTrue(com.getHealth() == baseHP - 700); Special heal = new Special(SpecialType.HEALTHBLESS); heal.getEffect().get(0).applyEffect(com); Assert.assertTrue(com.getHealth() == baseHP); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void testChangeHealth() {\n\t\tnpc.setLevel(1);\n\t\tnpc.setHealth(23);\n\t\tint tempHealth = npc.getHealth();\n\t\tnpc.changeHealth(10);\n\t\tassertTrue(npc.getHealth() == tempHealth + 10);\n\t\tnpc.changeHealth(100);\n\t\tassertTrue(npc.getHealth() == npc.getMaxHealth());\n\t\tnpc.changeHealth(-999);\n\t\tassertTrue(npc.isDead());\n\t}", "@Test\n\tpublic void testCalHealth() {\n\t\tnpc.setLevel(1);\n\t\tnpc.setHealth(55);\n\t\tassertFalse(npc.getHealth() == npc.getMaxHealth());\n\t\tnpc.calHealth();\n\t\tassertTrue(npc.getHealth() == npc.getMaxHealth());\n\t}", "boolean hasDamage();", "boolean hasDamage();", "boolean hasDamage();", "boolean hasDamage();", "boolean hasDamage();", "@Test\n\tpublic void testSetHealth() {\n\t\tnpc.setLevel(1);\n\t\tnpc.setHealth(10);\n\t\tassertTrue(npc.getBaseHealth() == 10);\n\t\tnpc.setHealth(35);\n\t\tassertFalse(npc.getBaseHealth() == 10);\n\t\tassertTrue(npc.getBaseHealth() == 35);\n\t}", "private void checkIfHungry(){\r\n\t\tif (myRC.getEnergonLevel() * 2.5 < myRC.getMaxEnergonLevel()) {\r\n\t\t\tmission = Mission.HUNGRY;\r\n\t\t}\r\n\t}", "public void checkHealth() {\n if (health == 0) {\n this.texture = new Texture (\"soggy-\" + tex + \".png\");\n }\n }", "boolean takeDamage(DamageCount damage);", "protected void takeDamage(int damage)\n {\n health = health - damage;\n \n }", "boolean takeDamage(int dmg);", "public static void checkStats(Champion ch) {\n\t\tif (ch.getEffectiveCritChance() > 100) {\n\t\t\tch.setEffectiveCritChance(100);\n\t\t}\n\t\t// maximum speed is set to 300\n\t\tif (ch.getEffectiveSpeed() > 300) {\n\t\t\tch.setEffectiveSpeed(300);\n\n\t\t}\n\t\t// always do after the speed check, so the minimum amount should be 10\n\t\tcalcSpeedPoints(ch);\n\n\t}", "private void takeDamage(int damage){ health -= damage;}", "public void specialEffect() {\n if (getDefense() > 0) {\n setDefense(0);\n setCurrentHealth(currentHealth + 50);\n }\n\n }", "public static void damageStep () {\r\n // rough plan:\r\n // #1: flip defending monster, if face down -> see flipMonster(...);\r\n // #2: Ask CPU and player for possible effect negation! (For an attack negation it is too late!) -> see below in this method\r\n // #3: calculate damage, kill monsters, if needed\r\n // (consider also banishing and immunity, also copied passive effect of (Holy) Lance)\r\n // -> see makeDamageCalculation(...);\r\n // #4: decrease life points, if needed -> see isDealingBattleDamageAndContinuingGame(...);\r\n // #5: consider passive (also copied) trap monster effects -> see possibleSuicideEffect(...);\r\n // #6: display Win/Lose dialog and end match, if needed -> see Game.over(...);\r\n // #7: finally end the attack (consider the effects that happen afterwards), thus allowing the next attack -> endDamageStep(...);\r\n \r\n // about #1:\r\n if (Game.ActiveGuardingMonster.isFaceDown) {flipMonster(Game.ActiveGuardingMonster);}\r\n // about #2:\r\n if (Game.ActiveAttackingMonster.canBeNegated() || Game.ActiveGuardingMonster.canBeNegated()) {\r\n AIinterrupts.cpuIsUsingEffectNegateDuringBattlePhase(); // ask CPU to negate effects first\r\n // ask player to negate effect here\r\n boolean isCanceling = false;\r\n boolean hasEffectNegateHandTrap = Hand.lookForEffectNegateOnHand(true);\r\n boolean hasEffectNegateOnField = Hand.lookForEffectNegateOnField(true);\r\n if (hasEffectNegateHandTrap || hasEffectNegateOnField) {\r\n if (hasEffectNegateHandTrap && !hasEffectNegateOnField) {\r\n isCanceling = PlayerInterrupts.playerMayNegateEffect(Game.ActiveAttackingMonster, Game.ActiveGuardingMonster, true);\r\n }\r\n else if (!hasEffectNegateHandTrap && hasEffectNegateOnField) {\r\n isCanceling = PlayerInterrupts.playerMayNegateEffect(Game.ActiveAttackingMonster, Game.ActiveGuardingMonster, false);\r\n }\r\n else {\r\n int intDialogResult = YuGiOhJi.multipleChoiceDialog(\"Do you want to negate effects on the field?\", \"You can negate passive effects.\", new String[]{\"yes, by discarding Neutraliser\", \"yes, by paying the cost worth 1 card\", \"no (default)\"}, \"no (default)\");\r\n if (intDialogResult==0) {\r\n isCanceling = PlayerInterrupts.playerMayNegateEffect(Game.ActiveAttackingMonster, Game.ActiveGuardingMonster, true);\r\n }\r\n else if (intDialogResult==1) {\r\n isCanceling = PlayerInterrupts.playerMayNegateEffect(Game.ActiveAttackingMonster, Game.ActiveGuardingMonster, false);\r\n }\r\n }\r\n }\r\n if (!isCanceling) {\r\n makeDamageCalculation(Game.ActiveAttackingMonster, Game.ActiveGuardingMonster); // whole rest of battle\r\n }\r\n }\r\n else {\r\n makeDamageCalculation(Game.ActiveAttackingMonster, Game.ActiveGuardingMonster); // whole rest of battle\r\n }\r\n \r\n }", "public void setHealth(double h){\n health = h;\n }", "@Test\n public void testDiesByDamage() {\n addCard(Zone.BATTLEFIELD, playerA, \"Mountain\", 1);\n addCard(Zone.HAND, playerA, \"Lightning Bolt\");\n addCard(Zone.BATTLEFIELD, playerB, \"Dryad Militant\");\n\n\n castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, \"Lightning Bolt\", \"Dryad Militant\");\n setStopAt(1, PhaseStep.BEGIN_COMBAT);\n execute();\n \n assertLife(playerB, 20);\n \n assertExileCount(\"Lightning Bolt\", 1);\n }", "public abstract void setHealth(int health);", "public void checkHealth()\n {\n if(player.getHealth() <= 0)\n {\n System.out.println(\"\\n\" + \"You are dead :(\" + \"\\n\");\n alive = false;\n }\n }", "@EventHandler(priority = EventPriority.MONITOR)\n\tvoid onPlayerInteract(PlayerInteractEntityEvent event)\n\t{\n\t\tPlayer player = event.getPlayer();\n\t\tisHealingOther = true;\n\t\t\n\t\t//Check that the player right-clicked on another player.\n\t\tif (!(event.getRightClicked() instanceof Player))\n\t\t\treturn;\n\n \t//Check if the item in hand fits any of the items specified in the configuration file.\t\t\n \tSet <String> items;\n \ttry { items = config.getConfigurationSection(\"healing.\").getKeys(false); }\n \tcatch (NullPointerException e)\n \t{ return; }\n \t\n \tString item = null;\n \tfor (String i: items)\n \t\tif (player.getItemInHand().getType().toString().equalsIgnoreCase(i))\n \t\t\titem = i;\n \t\n \t//If the item isn't found, it's not a healing item.\n \tif (item == null)\n \t\treturn;\n \t\n\t\t//Check if the amount to heal is in the config\n \tSet<String> professionsRequired;\n \ttry { professionsRequired = config.getConfigurationSection(\"healing.\" + item).getKeys(false); }\n \tcatch (NullPointerException e)\n \t{ return; }\n \t\n \tfor (String p: professionsRequired)\n \t{\n \t\tProfessionStats prof = new ProfessionStats(perms, data, config, player.getUniqueId());\n \t\t\n \t\tif (p == null)\n \t\t\tcontinue;\n \t\t\n \tProfessionHandler profHandler = new ProfessionHandler(perms, data, config);\n \t\n \tdouble amountToHeal = config.getInt(\"healing.\" + item + \".\" + p + \".\"\n\t\t\t\t\t+ profHandler.getTierName(prof.getTier(p)));\n \tif (amountToHeal == 0)\n \t{\n \t\tplayer.sendMessage(ChatColor.RED + \"You do not have the skill required to do this!\");\n \t\treturn;\n \t}\n \t\n \t//Check that the recipient has missing health.\n \t\tPlayer recipient = (Player) event.getRightClicked();\n \t\tif (recipient.getHealth() >= 20)\n \t\t{\n \t\t\tplayer.sendMessage(ChatColor.YELLOW + recipient.getName() + \" does not need bandaging!\");\n \t\t\treturn;\n \t\t} \n \t\t\n \t//Check that it won't take you over the maximum amount of health.\n \tif (recipient.getHealth() + amountToHeal > 20)\n \t\tamountToHeal = 20 - recipient.getHealth();\n \t\t\n \t\tplayer.sendMessage(ChatColor.YELLOW + \"Bandaging...\");\n \t\tString name = player.getCustomName();\n \t\tif (name == null)\n \t\t\tname = player.getName();\n \t\trecipient.sendMessage(ChatColor.YELLOW + name + \" is bandaging you...\");\n \t\t\n \t\t//Schedule the task in one second.\n \t\tmakeDelayedTask(player, recipient, amountToHeal, item, p, player.getLocation(), recipient.getLocation());\n \t}\n\t}", "public void suffer(int hits)\r\n {\r\n health = health - hits;\r\n if (health < 0)\r\n health = 0;\r\n if (hits == 0)\r\n say(\"Hahaha! I defened myself with \" + armor.getName() + \" and still have \" + health + \" left!\");\r\n else\r\n say(\"Ouch! \" + hits + \" hits is more than I want! I only have \" + health + \" left!\");\r\n if (health <= 0)\r\n die();\r\n }", "@EventHandler(priority = EventPriority.HIGHEST)\n public void onEntityDamage(EntityDamageEvent event) {\n if (event instanceof EntityDamageByEntityEvent) {\n EntityDamageByEntityEvent edbeEvent = (EntityDamageByEntityEvent) event;\n Entity damager = edbeEvent.getDamager();\n if (damager instanceof Player) {\n //Player attacked some entity\n //Show info about players attack tool\n p = (Player) damager;\n\n if (p != null\n && this.plugin.commandEnabledForPlayers.contains(p.getName())\n && this.f.getBoolean(\"durability_warning_enabled\")) {\n durability(p, event);\n }\n } else if (edbeEvent.getEntity() != null && edbeEvent.getEntity() instanceof Player) {\n //Entity attacked player\n //Check if durability of armor is gone\n //Then check if armor is below critial level and output a warning message\n p = (Player) edbeEvent.getEntity();\n\n if (-0.0 != edbeEvent.getDamage(EntityDamageEvent.DamageModifier.ARMOR)\n && this.plugin.commandEnabledForPlayers.contains(p.getName())\n && this.f.getBoolean(\"durability_warning_enabled\")) {\n //The armor took damage\n durability(p, event, true);\n }\n }\n\n }\n\n }", "@Override\n protected int strengthViability(Creature c){\n int baseViability = super.strengthViability(c);\n if (Elements.elementDamageMultiplier(c,bossFormation.getFrontCreature().getElement()) > 1){\n baseViability = (int)(baseViability * (double)Elements.DAMAGE_BOOST * 3);\n }\n if (Elements.elementDamageMultiplier(bossFormation.getFrontCreature(),c.getElement()) > 1){\n baseViability = (int)(baseViability * (double)Elements.DAMAGE_BOOST / 3);\n }\n return baseViability;\n }", "@Override\n protected void doCheckEffect ()\n {\n List<LivingEntity> entities = getLivingEntities(1.5);\n if (entities.size() > 0)\n {\n for (LivingEntity entity : entities)\n {\n if (entity.getUniqueId() == player.getUniqueId())\n continue;\n\n entity.damage(usesModifier * 2, player);\n\n kill();\n return;\n }\n }\n\n // if the spell has hit a solid block, the projectile is stopped and wont go further so kill the spell\n if (hasHitTarget())\n kill();\n }", "@Test\n\tpublic void testGetHealth() {\n\t\tassertEquals(alive.getHealth(), PeaShooter.INITIAL_HEALTH);\n\t\t\n\t\t// Test for broken code\n\t\tassertNotEquals(alive.getHealth(), -1);\n\t}", "public boolean getDamage(){\n\t\tdie();\n\t\treturn false;\n\t}", "public void updateHealth(String target, Integer amount, boolean isAttack){\n\n if(target == \"player\"){\n if(isAttack){\n //To make defence/armour a bit weaker, round up on the damage.\n playerShipHealth+= (int) (amount - Math.ceil(amount*playerShipDefence));\n } else{\n playerShipHealth+=amount;\n\n }\n if (playerShipHealth > playerShipHealthMax){\n playerShipHealth = playerShipHealthMax;}\n else if (playerShipHealth <= 0){\n //PlayerDied\n\n playerShipDead = true;\n playerShip.setIsDead();\n }\n\n } else if (target == \"enemy\"){\n if(isAttack){\n enemyShipHealth+= (int) (amount - Math.ceil(amount*enemyShipDefence));\n } else{\n enemyShipHealth+=amount;\n }\n if (enemyShipHealth > enemyShipHealthMax){\n enemyShipHealth = enemyShipHealthMax;}\n else if (enemyShipHealth <= 0){\n //Enemy Died\n enemyShipDead = true;\n enemyShip.setIsDead();\n }\n }\n }", "public void updateCreatureHealth(Entity entity) {\n HealthAspect aspect = entity.getAspect(HealthAspect.class);\n if (aspect == null) {\n Logger.UNITS.logError(\"Trying to update health of creature \" + entity + \" with no HealthAspect\");\n return;\n }\n changeParameter((Unit) entity, HealthParameterEnum.FATIGUE, 0.01f);\n changeParameter((Unit) entity, HealthParameterEnum.HUNGER, 0.01f);\n }", "@SuppressWarnings(\"deprecated\")\n protected void durability(Player p, EntityDamageEvent event, Boolean armorDamage) {\n this.p = p;\n //foreach players armor\n //if any armor is below N durability, output warning message\n int x = 0;\n\n for (ItemStack armorItem : p.getInventory().getArmorContents()) {\n if (armorItem == null) continue;\n if (armorItem.getDurability() == 0) continue; //this armor piece took no damage\n if (armorItem.getDurability() > 0\n && f.getInt(\"minimum-durability\") >= armorItem.getType().getMaxDurability() - armorItem.getDurability()) {\n String s = String.format(ChatColor.RED + \"[WARNING]: %s has too little duration left!\\nDuration left: %d\\n\", WordUtils.capitalize(armorItem.getType().toString().toLowerCase().replace(\"_\", \" \")), calcLeftDurability(armorItem));\n p.sendMessage(s);\n }\n }\n }", "public void setHealth(int health)\r\n {\r\n this.health = health;\r\n }", "@Override\n\tpublic void setHealth(double health) {\n\n\t}", "public boolean health(){\n return health;\n }", "@Override\n public String performSpecialEffect() {\n this.health += HEALTH_STEAL_AMOUNT;\n return \"The vampire stole a bit of health after it attacked.\";\n }", "int getHealth();", "public boolean isFireDamage();", "public void setHealth(double Health){\r\n health = Health;\r\n }", "public void reduceHealth(int damage){\n health -= damage;\n }", "public void SetHealth(int h)\n{\n\thealth=h;\n}", "private static void doEffect(Thing caster, Thing spell, Thing target) {\r\n \t\tint magicSkill=Spell.calcMagicSkill(caster,spell);\r\n \t\tint magicDefence=Spell.calcAntiMagic(target);\r\n \t\tint magicPower=Spell.calcMagicPower(caster,spell);\r\n \t\t\r\n \t\t// work out whether spell is effective\r\n \t\tboolean effective=true;\r\n \t\tboolean visible=target.isVisible(Game.hero());\r\n \t\tif ((magicDefence>0)&&spell.getStat(\"SpellUsage\")==Spell.SPELL_OFFENCE) {\r\n \t\t\tmagicSkill+=magicPower/5;\r\n \t\t\tGame.warn(\"Magic test: \"+magicSkill+\" vs. \"+magicDefence);\r\n \t\t\t\r\n \t\t\teffective=magicSkill>=(magicDefence*RPG.luckRandom(caster,target));\r\n \t\t}\r\n \t\t\r\n \t\tif ((caster!=null)&&target.getFlag(\"IsBeing\")&&(spell.getStat(\"SpellUsage\")==Spell.SPELL_OFFENCE)) {\r\n \t\t\tAI.notifyAttack(target,caster);\r\n \t\t}\r\n \t\t\r\n \t\tString hitname=spell.getString(\"HitName\");\r\n \t\tif (effective){\r\n \t\t\tif (hitname!=null) target.message(\"You are hit by the \"+hitname);\r\n \t\t\tEvent e=new Event(\"Effect\");\r\n \t\t\te.set(\"Strength\",magicPower);\r\n \t\t\te.set(\"Caster\",caster);\r\n \t\t\te.set(\"Target\",target);\r\n \t\t\tspell.handle(e);\r\n \t\t} else {\r\n \t\t\tif (visible) Game.message(target.getTheName()+\" \"+target.verb(\"resist\")+\" the \"+hitname);\r\n \t\t}\r\n \t}", "public interface Health\n{\n\tpublic boolean isAlive();\n\tpublic void normalDamage( double d );\n\tpublic void energyDamage( double d );\n\tpublic void radiationDamage( double d );\n\tpublic void kill();\n\tpublic void update( double dT );\n}", "public void setHealth(int health) {\n this.health = health;\n }", "@Test\n\tpublic void TestCalculateDamage() \n\t{\n\t\tWeapon gun = new Gun();\n\t\t// 0<=distance between the range<=30\n\t\tgun.calculateDamage(10);\n\t\tassertEquals(15,gun.getDamage());\n\t\tassertEquals(3,((Gun) gun).gettRateofFire(),.1);\n\t\tassertEquals(39,((Gun) gun).getActualAmmo(),.1);\n\t\t//distance out of the range\n\t\tgun.calculateDamage(50);\n\t\tassertEquals(15,gun.getDamage());\n\t\tassertEquals(2,((Gun) gun).gettRateofFire(),.1);\n\t\tassertEquals(38,((Gun) gun).getActualAmmo(),.1);\n\t\t //reload when actual ammo is 0\n\t\t((Gun) gun).setActualAmmo(0);\n\t ((Gun) gun).reload();\n\t\tassertEquals(40,((Gun) gun).getActualAmmo(),.1);\n\t\t\n\t}", "public int giveDamage();", "public void heal(int healAmount){\r\n health+= healAmount;\r\n }", "public static void makeDamageCalculation (SummonedMonster AttackingMonster, SummonedMonster GuardingMonster) {\r\n AttackingMonster.canStillAttackThisTurn = false; // Just in case this might be missed somewhere, erase its one attack per turn, because now there is no turning back.\r\n AttMonster.rememberPropertiesOfMonster(AttackingMonster);\r\n GuardMonster.rememberPropertiesOfMonster(GuardingMonster);\r\n // get the 2 relevant values for the attack calculation\r\n int relevantAttValue = AttackingMonster.att;\r\n int releventGuardingValue = GuardingMonster.relevantValue();\r\n // get some relevant properties of the involved monsters\r\n boolean attackingMonsterIndestructible = AttackingMonster.isIndestructibleByBattle();\r\n boolean attackingMonsterImmuneWhileWinning = AttackingMonster.isImmuneWhileWinning();\r\n boolean attackingMonsterImmune = AttackingMonster.isImmune();\r\n boolean attackingMonsterBanishes = AttackingMonster.isBanishingOpposingMonster(GuardingMonster);\r\n boolean attackingMonsterBanishesBoth = AttackingMonster.isBanishingBothMonsters(GuardingMonster);\r\n \r\n boolean guardingMonsterIndestructible = GuardingMonster.isIndestructibleByBattle();\r\n boolean guardingMonsterImmuneWhileWinning = GuardingMonster.isImmuneWhileWinning();\r\n boolean guardingMonsterImmune = GuardingMonster.isImmune();\r\n boolean guardingMonsterBanishes = GuardingMonster.isBanishingOpposingMonster(AttackingMonster);\r\n boolean guardingMonsterBanishesBoth = GuardingMonster.isBanishingBothMonsters(AttackingMonster);\r\n // let monsters clash here\r\n if (relevantAttValue == releventGuardingValue) {\r\n if (relevantAttValue==0) {\r\n YuGiOhJi.informationDialog(\"Nothing happens, because of zero attack.\", \"\");\r\n endAttack(false);\r\n }\r\n else {\r\n if (GuardingMonster.isInAttackMode) { // usually both monsters kill each other\r\n if (attackingMonsterBanishesBoth) {\r\n banishingDialogBanisher(AttackingMonster);\r\n getNthSummonedMonster(AttackingMonster.sumMonsterNumber, AttackingMonster.isPlayersMonster).banishMonster();\r\n if (!guardingMonsterImmuneWhileWinning && !guardingMonsterImmune) {\r\n banishingDialogBanisher(GuardingMonster);\r\n getNthSummonedMonster(GuardingMonster.sumMonsterNumber, GuardingMonster.isPlayersMonster).banishMonster();\r\n }\r\n else {\r\n getNthSummonedMonster(GuardingMonster.sumMonsterNumber, GuardingMonster.isPlayersMonster).killMonster();\r\n }\r\n }\r\n else if (guardingMonsterBanishesBoth) {\r\n banishingDialogBanisher(GuardingMonster);\r\n getNthSummonedMonster(GuardingMonster.sumMonsterNumber, GuardingMonster.isPlayersMonster).banishMonster();\r\n if (!attackingMonsterImmuneWhileWinning && !attackingMonsterImmune) {\r\n banishingDialogBanisher(AttackingMonster);\r\n getNthSummonedMonster(AttackingMonster.sumMonsterNumber, AttackingMonster.isPlayersMonster).banishMonster();\r\n }\r\n else {\r\n getNthSummonedMonster(AttackingMonster.sumMonsterNumber, AttackingMonster.isPlayersMonster).killMonster();\r\n }\r\n }\r\n else {\r\n if (!guardingMonsterIndestructible) {\r\n if (attackingMonsterBanishes && !guardingMonsterImmuneWhileWinning && !guardingMonsterImmune) {\r\n banishingDialogBigBanisher(GuardingMonster);\r\n getNthSummonedMonster(GuardingMonster.sumMonsterNumber, GuardingMonster.isPlayersMonster).banishMonster();\r\n }\r\n else {\r\n getNthSummonedMonster(GuardingMonster.sumMonsterNumber, GuardingMonster.isPlayersMonster).killMonster();\r\n }\r\n }\r\n if (!attackingMonsterIndestructible) {\r\n if (guardingMonsterBanishes && !attackingMonsterImmuneWhileWinning && !attackingMonsterImmune) {\r\n banishingDialogBigBanisher(AttackingMonster);\r\n getNthSummonedMonster(AttackingMonster.sumMonsterNumber, AttackingMonster.isPlayersMonster).banishMonster();\r\n }\r\n else {\r\n getNthSummonedMonster(AttackingMonster.sumMonsterNumber, AttackingMonster.isPlayersMonster).killMonster();\r\n }\r\n }\r\n }\r\n if (!guardingMonsterIndestructible && attackingMonsterIndestructible) {\r\n possibleSuicideEffect(false, false);\r\n }\r\n else if (guardingMonsterIndestructible && !attackingMonsterIndestructible) {\r\n possibleSuicideEffect(true, false); // suicide effect of attacking monster\r\n }\r\n else if (!guardingMonsterIndestructible && !attackingMonsterIndestructible) {\r\n possibleSuicideEffect(false, true); // double kill here\r\n }\r\n else { // if both are indestructible, none of them has a suicide effect\r\n endDamageStep(false); // here both survive\r\n }\r\n } // else nothing happens\r\n }\r\n }\r\n else if (relevantAttValue > releventGuardingValue) { // here the attacking monster usually kills the guarding one\r\n // look if attacking monster is either piercing by itself or copies Lance or Holy Lance\r\n boolean isEffectivelyPiercing = (AttackingMonster.hasPiercingDamageAbility() && !guardingMonsterImmune);\r\n boolean isContinuingGame = true;\r\n if (GuardingMonster.isInAttackMode || isEffectivelyPiercing) {\r\n isContinuingGame = isDealingBattleDamageAndContinuingGame(false, relevantAttValue-releventGuardingValue, GuardingMonster.isPlayersMonster);\r\n } // else no damage\r\n if (isContinuingGame) {\r\n if (guardingMonsterBanishesBoth) { // definitely banishes itself\r\n banishingDialogBanisher(GuardingMonster);\r\n getNthSummonedMonster(GuardingMonster.sumMonsterNumber, GuardingMonster.isPlayersMonster).banishMonster();\r\n if (!attackingMonsterImmuneWhileWinning && !attackingMonsterImmune) { // banishes opponent only, if it not immune against it\r\n banishingDialogBanisher(AttackingMonster);\r\n getNthSummonedMonster(AttackingMonster.sumMonsterNumber, AttackingMonster.isPlayersMonster).banishMonster();\r\n }\r\n }\r\n else if (!guardingMonsterIndestructible) {\r\n if (attackingMonsterBanishes && !guardingMonsterImmune) {\r\n banishingDialogBigBanisher(GuardingMonster);\r\n getNthSummonedMonster(GuardingMonster.sumMonsterNumber, GuardingMonster.isPlayersMonster).banishMonster();\r\n }\r\n else {\r\n getNthSummonedMonster(GuardingMonster.sumMonsterNumber, GuardingMonster.isPlayersMonster).killMonster();\r\n }\r\n possibleSuicideEffect(false, false);\r\n }\r\n else {\r\n endDamageStep(false);\r\n }\r\n }\r\n }\r\n else { // here: relevantAttValue < releventGuardingValue\r\n // rare case in which attacker gets the damage\r\n boolean isContinuingGame = isDealingBattleDamageAndContinuingGame(false, releventGuardingValue-relevantAttValue, AttackingMonster.isPlayersMonster);\r\n if (isContinuingGame) {\r\n if (GuardingMonster.isInAttackMode) {\r\n if (attackingMonsterBanishesBoth) {\r\n banishingDialogBanisher(AttackingMonster);\r\n getNthSummonedMonster(AttackingMonster.sumMonsterNumber, AttackingMonster.isPlayersMonster).banishMonster();\r\n if (!guardingMonsterImmuneWhileWinning && !guardingMonsterImmune) {\r\n banishingDialogBanisher(GuardingMonster);\r\n getNthSummonedMonster(GuardingMonster.sumMonsterNumber, GuardingMonster.isPlayersMonster).banishMonster();\r\n }\r\n }\r\n else if (!attackingMonsterIndestructible) {\r\n if (guardingMonsterBanishes && !attackingMonsterImmune) {\r\n banishingDialogBigBanisher(AttackingMonster);\r\n getNthSummonedMonster(AttackingMonster.sumMonsterNumber, AttackingMonster.isPlayersMonster).banishMonster();\r\n }\r\n else {\r\n getNthSummonedMonster(AttackingMonster.sumMonsterNumber, AttackingMonster.isPlayersMonster).killMonster();\r\n }\r\n }\r\n possibleSuicideEffect(true, false);\r\n }\r\n else {\r\n endDamageStep(false);\r\n }\r\n }\r\n }\r\n \r\n }", "void decreaseHealth(Float damage);", "private void calculateDamage() {\n this.baseDamage = this.actualBaseDamage;\n this.applyPowers();\n this.baseDamage = Math.max(this.baseDamage - ((this.baseDamage * this.otherCardsPlayed) / this.magicNumber), 0);\n }", "public void heal(float health) {\r\n \t\tthis.health += health;\r\n \t\tif(health > maxHealth) {\r\n \t\t\thealth = maxHealth;\r\n \t\t}\r\n \t}", "@Override\n public boolean shouldHeal(ActivePokemon p) {\n return p.hasStatus();\n }", "@Override\n public boolean shouldHeal(ActivePokemon p) {\n return p.hasStatus();\n }", "@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)\r\n public void onPlayerDamagedByPlayer(final EntityDamageByEntityEvent event) {\n if (!(event.getEntity() instanceof Player)) {\r\n return;\r\n }\r\n if (!(event.getDamager() instanceof Player)) {\r\n return;\r\n }\r\n \r\n final Player target = (Player)event.getEntity();\r\n final Player attacker = (Player)event.getDamager();\r\n final ItemStack is = attacker.getItemInHand();\r\n \r\n if (is != null){\r\n switch (is.getType()){\r\n case EMERALD:\r\n attacker.setItemInHand(ItemUtil.decrementItem(is, 1));\r\n \r\n // 体力・空腹回復、燃えてたら消化\r\n target.setHealth(target.getMaxHealth());\r\n target.setFoodLevel(20);\r\n target.setFireTicks(0);\r\n \r\n // ポーション効果付与\r\n target.addPotionEffect(new PotionEffect(PotionEffectType.REGENERATION, 45 * 20, 0)); // 45 secs\r\n target.addPotionEffect(new PotionEffect(PotionEffectType.FIRE_RESISTANCE, 7 * 60 * 20, 0)); // 7 mins\r\n target.addPotionEffect(new PotionEffect(PotionEffectType.INCREASE_DAMAGE, 9 * 60 * 20, 1)); // 9 mins\r\n target.addPotionEffect(new PotionEffect(PotionEffectType.SPEED, 9 * 60 * 20, 0)); // 9 mins\r\n target.addPotionEffect(new PotionEffect(PotionEffectType.FAST_DIGGING, 5 * 60 * 20, 1)); // 5 mins\r\n target.addPotionEffect(new PotionEffect(PotionEffectType.NIGHT_VISION, 3 * 60 * 20, 0)); // 3 mins\r\n \r\n // effect, messaging\r\n target.getWorld().playEffect(target.getLocation(), Effect.ENDER_SIGNAL, 0, 10);\r\n Util.message(target, PlayerManager.getPlayer(attacker).getName() + \" &aから特殊効果を与えられました!\");\r\n Util.message(attacker, PlayerManager.getPlayer(target).getName() + \" &aに特殊効果を与えました!\");\r\n \r\n event.setCancelled(true);\r\n event.setDamage(0);\r\n break;\r\n default: break;\r\n }\r\n }\r\n }", "public boolean processCommand(Command command) \n {\n wantToQuit = false;\n String commandWord = command.getCommandWord();\n String commandWord2 = command.getSecondWord();\n \n \n if(enemyPresent == true)\n {\n sewers.removeItem(rope); \n if(command.isUnknown()) {\n System.out.println(\"Now is not the time. How would you like to attack, with weapon, laser, fire or shrink?\");\n return false;\n } \n else if(commandWord.equals(\"fire\")){\n int enemyHealth;\n setRand(); \n int damage;\n \n damage = player.useFire();\n currentRoom.setEnemyHealth(damage);\n \n int damageDone = damage;\n \n if(currentRoom.getEnemyHealth() < 0){\n enemyHealth = 0; \n }\n else {\n enemyHealth = currentRoom.getEnemyHealth(); \n }\n \n System.out.println(\"\\n\" + damageDone + \" damage done to enemy with fire spell! Fire level increased!\");\n \n System.out.println(\"Enemy health at \" + enemyHealth + \"!\");\n \n if(currentRoom.getEnemyHealth() > 0)\n {\n int playerHealth;\n player.setHealth(currentRoom.getEnemyDamage());\n \n checkHealth();\n \n if(player.getHealth() < 0)\n {\n playerHealth = 0;\n }\n else{\n playerHealth = player.getHealth();\n }\n \n System.out.println(currentRoom.getEnemyDamage() + \" damage taken! \" + \"Health at \" + playerHealth + \"!\" + \"\\n\");\n \n }\n }\n \n else if(commandWord.equals(\"freeze\")){\n int enemyHealth;\n setRand(); \n int damage;\n \n damage = player.useFreeze();\n currentRoom.setEnemyHealth(damage);\n \n int damageDone = damage;\n \n if(currentRoom.getEnemyHealth() < 0){\n enemyHealth = 0; \n }\n else {\n enemyHealth = currentRoom.getEnemyHealth(); \n }\n \n System.out.println(\"\\n\" + damageDone + \" damage done to enemy with fire spell! Freeze level increased!\" + \"\\n\");\n \n System.out.println(\"Enemy health at \" + enemyHealth + \"!\");\n \n if(currentRoom.getEnemyHealth() > 0)\n {\n int playerHealth;\n player.setHealth(currentRoom.getEnemyDamage());\n \n checkHealth();\n \n if(player.getHealth() < 0)\n {\n playerHealth = 0;\n }\n else{\n playerHealth = player.getHealth();\n }\n \n System.out.println(currentRoom.getEnemyDamage() + \" damage taken! \" + \"Health at \" + playerHealth + \"!\" + \"\\n\");\n \n }\n } \n \n else if(commandWord.equals(\"laser\")){\n int enemyHealth;\n setRand(); \n int damage;\n \n damage = player.useLaser();\n currentRoom.setEnemyHealth(damage);\n \n int damageDone = damage;\n \n if(currentRoom.getEnemyHealth() < 0){\n enemyHealth = 0; \n }\n else {\n enemyHealth = currentRoom.getEnemyHealth(); \n }\n \n System.out.println(\"\\n\" + damageDone + \" damage done to enemy with fire spell! Laser level increased!\" + \"\\n\");\n \n System.out.println(\"Enemy health at \" + enemyHealth + \"!\");\n \n if(currentRoom.getEnemyHealth() > 0)\n {\n int playerHealth;\n player.setHealth(currentRoom.getEnemyDamage());\n \n checkHealth();\n \n if(player.getHealth() < 0)\n {\n playerHealth = 0;\n }\n \n else\n {\n playerHealth = player.getHealth();\n }\n \n System.out.println(currentRoom.getEnemyDamage() + \" damage taken! \" + \"Health at \" + playerHealth + \"!\" + \"\\n\");\n \n }\n }\n \n \n else if(commandWord.equals(\"weapon\")){\n \n \n int enemyHealth;\n setRand();\n \n currentRoom.setEnemyHealth(player.getAttackDamage());\n \n int damageDone = player.getAttackDamage();\n \n if(currentRoom.getEnemyHealth() < 0){\n enemyHealth = 0; \n }\n else {\n enemyHealth = currentRoom.getEnemyHealth(); \n }\n \n System.out.println(\"\\n\" + damageDone + \" damage done to enemy with \" + player.getWeaponName() + \"!\");\n \n System.out.println(\"Enemy health at \" + enemyHealth + \"!\");\n \n if(currentRoom.getEnemyHealth() > 0)\n {\n int playerHealth;\n player.setHealth(currentRoom.getEnemyDamage());\n \n checkHealth();\n \n if(player.getHealth() < 0)\n {\n playerHealth = 0;\n }\n else{\n playerHealth = player.getHealth();\n }\n \n System.out.println(currentRoom.getEnemyDamage() + \" damage taken! \" + \"Health at \" + playerHealth + \"!\" + \"\\n\");\n \n }\n }\n\n else if(commandWord.equals(\"ai\")){\n \n\n if (commandWord2.equals(\"one\"))\n {\n startAi(1);\n }\n else if (commandWord2.equals(\"two\"))\n {\n startAi(2);\n }\n else if (commandWord2.equals(\"three\"))\n {\n startAi(3);\n }\n else if (commandWord2.equals(\"four\"))\n {\n startAi(4);\n }\n else if (commandWord2.equals(\"five\"))\n {\n startAi(5);\n }\n else if (commandWord2.equals(\"six\"))\n {\n startAi(6);\n }\n else if (commandWord2.equals(\"seven\"))\n {\n startAi(7);\n }\n else if (commandWord2.equals(\"eight\"))\n {\n startAi(8);\n }\n else if (commandWord2.equals(\"nine\"))\n {\n startAi(9);\n }\n else if (commandWord2.equals(\"ten\"))\n {\n startAi(10);\n }\n else if (commandWord2.equals(\"eleven\"))\n {\n startAi(11);\n }\n else if(commandWord2.equals(\"all\"))\n {\n startAi(12);\n }\n else\n {\n System.out.println(\"I don't know what you mean...\");\n return false; \n }\n \n }\n else if(commandWord.equals(\"flee\")){\n setRand();\n if(rand <= 8)\n {\n System.out.println(\"Pity, you've been snatched by the monster and killed.\" + \"\\n\");\n alive = false;\n }\n else{\n System.out.println(\"You got away!\");\n enemyPresent = false;\n currentRoom.removeEnemy(); \n }\n }\n \n else if (commandWord.equals(\"use\")){\n useItem(command); \n }\n \n else{\n System.out.println(\"Now is not the time. How would you like to attack, with weapon, laser, fire, shrink, or flee?\"); \n }\n \n if(currentRoom.getEnemyHealth() <= 0)\n {\n System.out.println(\"Enemy vanquished!\" + \"\\n\");\n enemyPresent = false;\n currentRoom.removeEnemy();\n }\n \n \n }\n \n else\n {\n if(command.isUnknown()) {\n System.out.println(\"I don't know what you mean...\");\n return false;\n }\n if (commandWord.equals(\"help\")) {\n printHelp();\n }\n else if(commandWord.equals(\"ai\")){\n \n\n if (commandWord2.equals(\"one\"))\n {\n startAi(1);\n }\n else if (commandWord2.equals(\"two\"))\n {\n startAi(2);\n }\n else if (commandWord2.equals(\"three\"))\n {\n startAi(3);\n }\n else if (commandWord2.equals(\"four\"))\n {\n startAi(4);\n }\n else if (commandWord2.equals(\"five\"))\n {\n startAi(5);\n }\n else if (commandWord2.equals(\"six\"))\n {\n startAi(6);\n }\n else if (commandWord2.equals(\"seven\"))\n {\n startAi(7);\n }\n else if (commandWord2.equals(\"eight\"))\n {\n startAi(8);\n }\n else if (commandWord2.equals(\"nine\"))\n {\n startAi(9);\n }\n else if (commandWord2.equals(\"ten\"))\n {\n startAi(10);\n }\n else if (commandWord2.equals(\"eleven\"))\n {\n startAi(11);\n }\n else if(commandWord2.equals(\"all\"))\n {\n startAi(12);\n }\n else\n {\n System.out.println(\"I don't know what you mean...\");\n return false; \n }\n \n }\n else if (commandWord.equals(\"go\")) {\n goRoom(command);\n }\n \n else if (commandWord.equals(\"take\")){\n player.pickUpWeapon(command);\n player.pickUpItem(command);\n }\n else if(commandWord.equals(\"health\")){\n System.out.println(\"Health is at: \" + player.getHealth());\n }\n else if(commandWord.equals(\"drop\"))\n {\n player.dropWeapon(command);\n }\n else if(commandWord.equals(\"boss\"))\n {\n currentRoom = throneRoomEntrance; \n }\n else if (commandWord.equals(\"use\")){\n useItem(command); \n }\n else if (commandWord.equals(\"open\")){\n openChest(command);\n }\n else if (commandWord.equals(\"quit\")) {\n wantToQuit = quit(command);\n }\n else if (commandWord.equals(\"inventory\")){\n player.printInventory();\n }\n else if (commandWord.equals(\"name\")){\n Scanner reader = new Scanner(System.in);\n System.out.println(\"Enter a name: \");\n name = reader.next();\n player.setName(name);\n reader.close();\n System.out.println(\"New name is: \" + name);\n player.getName();\n \n }\n }\n \n return wantToQuit;\n }", "Float getHealth();", "public void onUpdate()\n {\n super.onUpdate();\n\n if (!this.worldObj.isRemote && this.getBossHP() != this.health)\n {\n this.setBossHP();\n }\n }", "@Override\r\n\tprotected void setHealth( double newHealth ) \r\n\t{\r\n\t\tthis._health = this._health - newHealth;\r\n\t}", "@Override\n public int damage() {\n int newDamage=criticalStrike();\n return newDamage;\n }", "public final boolean doAreaDamage(Creature aCreature) {\n/* 1079 */ boolean dead = false;\n/* 1080 */ if (!aCreature.isInvulnerable() && !aCreature.isGhost() && !aCreature.isUnique()) {\n/* */ \n/* 1082 */ AreaSpellEffect aes = getAreaEffect();\n/* */ \n/* 1084 */ if (aes != null) {\n/* */ \n/* 1086 */ System.out.println(\"AREA DAMAGE \" + aCreature.getName());\n/* */ \n/* 1088 */ if (aes.getFloorLevel() != aCreature.getFloorLevel()) {\n/* */ \n/* 1090 */ int heightOffset = aes.getHeightOffset();\n/* 1091 */ if (heightOffset != 0) {\n/* */ \n/* 1093 */ int pz = aCreature.getPosZDirts();\n/* 1094 */ if (Math.abs(pz - heightOffset) > 10) {\n/* */ \n/* 1096 */ System.out.println(\"AREA DAMAGE FAILED\");\n/* 1097 */ return false;\n/* */ } \n/* */ } \n/* */ } \n/* */ \n/* */ \n/* */ \n/* 1104 */ byte type = getAreaEffect().getType();\n/* 1105 */ Creature caster = null;\n/* */ \n/* */ try {\n/* 1108 */ caster = Server.getInstance().getCreature(aes.getCreator());\n/* */ }\n/* 1110 */ catch (NoSuchCreatureException noSuchCreatureException) {\n/* */ \n/* */ \n/* */ }\n/* 1114 */ catch (NoSuchPlayerException noSuchPlayerException) {}\n/* */ \n/* */ \n/* */ \n/* 1118 */ if (caster != null) {\n/* */ \n/* */ try {\n/* */ \n/* 1122 */ if (aCreature.getAttitude(caster) == 2 || (caster\n/* 1123 */ .getCitizenVillage() != null && caster.getCitizenVillage().isEnemy(aCreature)))\n/* */ {\n/* 1125 */ boolean ok = true;\n/* 1126 */ if (!caster.isOnPvPServer() || !aCreature.isOnPvPServer()) {\n/* */ \n/* 1128 */ Village v = aCreature.getCurrentVillage();\n/* 1129 */ if (v != null && !v.mayAttack(caster, aCreature))\n/* */ {\n/* 1131 */ ok = false;\n/* */ }\n/* */ } \n/* 1134 */ if (ok)\n/* */ {\n/* 1136 */ aCreature.addAttacker(caster);\n/* 1137 */ if (type == 36 || type == 53)\n/* */ {\n/* 1139 */ byte pos = aCreature.getBody().getRandomWoundPos();\n/* 1140 */ sendAttachCreatureEffect(aCreature, (byte)6, (byte)0, (byte)0, (byte)0, (byte)0);\n/* */ \n/* */ \n/* */ \n/* 1144 */ double damage = getAreaEffect().getPower() * 4.0D;\n/* 1145 */ damage += 150.0D;\n/* 1146 */ double resistance = SpellResist.getSpellResistance(aCreature, 414);\n/* 1147 */ damage *= resistance;\n/* */ \n/* 1149 */ SpellResist.addSpellResistance(aCreature, 414, damage);\n/* */ \n/* 1151 */ damage = Spell.modifyDamage(aCreature, damage);\n/* */ \n/* 1153 */ dead = CombatEngine.addWound(caster, aCreature, (byte)8, pos, damage, 1.0F, \"\", null, 0.0F, 0.0F, false, false, true, true);\n/* */ \n/* */ \n/* */ \n/* */ }\n/* 1158 */ else if (type == 35 || type == 51)\n/* */ {\n/* 1160 */ byte pos = aCreature.getBody().getRandomWoundPos();\n/* */ \n/* 1162 */ double damage = getAreaEffect().getPower() * 2.75D;\n/* 1163 */ damage += 300.0D;\n/* 1164 */ double resistance = SpellResist.getSpellResistance(aCreature, 420);\n/* 1165 */ damage *= resistance;\n/* */ \n/* 1167 */ SpellResist.addSpellResistance(aCreature, 420, damage);\n/* */ \n/* 1169 */ damage = Spell.modifyDamage(aCreature, damage);\n/* 1170 */ dead = CombatEngine.addWound(caster, aCreature, (byte)4, pos, damage, 1.0F, \"\", null, 0.0F, 0.0F, false, false, true, true);\n/* */ \n/* */ \n/* */ \n/* */ }\n/* 1175 */ else if (type == 34)\n/* */ {\n/* 1177 */ byte pos = aCreature.getBody().getRandomWoundPos();\n/* */ \n/* 1179 */ double damage = getAreaEffect().getPower() * 1.0D;\n/* 1180 */ damage += 400.0D;\n/* 1181 */ double resistance = SpellResist.getSpellResistance(aCreature, 418);\n/* 1182 */ damage *= resistance;\n/* */ \n/* 1184 */ SpellResist.addSpellResistance(aCreature, 418, damage);\n/* */ \n/* 1186 */ damage = Spell.modifyDamage(aCreature, damage);\n/* */ \n/* 1188 */ dead = CombatEngine.addWound(caster, aCreature, (byte)0, pos, damage, 1.0F, \"\", null, 1.0F, 0.0F, false, false, true, true);\n/* */ \n/* */ \n/* */ \n/* */ }\n/* 1193 */ else if (type == 37)\n/* */ {\n/* 1195 */ sendAttachCreatureEffect(aCreature, (byte)7, (byte)0, (byte)0, (byte)0, (byte)0);\n/* */ \n/* */ \n/* 1198 */ byte pos = aCreature.getBody().getRandomWoundPos();\n/* */ \n/* */ \n/* 1201 */ double damage = getAreaEffect().getPower() * 2.0D;\n/* 1202 */ damage += 350.0D;\n/* 1203 */ double resistance = SpellResist.getSpellResistance(aCreature, 433);\n/* 1204 */ damage *= resistance;\n/* */ \n/* 1206 */ SpellResist.addSpellResistance(aCreature, 433, damage);\n/* */ \n/* 1208 */ damage = Spell.modifyDamage(aCreature, damage);\n/* */ \n/* 1210 */ dead = CombatEngine.addWound(caster, aCreature, (byte)5, pos, damage, 1.0F, \"\", null, 0.0F, 3.0F, false, false, true, true);\n/* */ }\n/* */ \n/* */ }\n/* */ \n/* */ }\n/* */ \n/* 1217 */ } catch (Exception exe) {\n/* */ \n/* 1219 */ logger.log(Level.WARNING, exe.getMessage(), exe);\n/* */ } \n/* */ }\n/* */ } \n/* */ } \n/* 1224 */ return dead;\n/* */ }", "@Override\n public int doDamage() {\n if (difficulty <5)\n return damage;\n else \n return damage*2;\n }", "@Test\n\tpublic void testTHealthIncrease1() {\n\t\ttank.damage(proj);\n\t\ttank.increaseHealth();\n\t\tassertEquals(3, tank.getHealth());\n\t}", "@Override\n public boolean canCharge() {\n return super.canCharge() && !(game.getOptions().booleanOption(\"no_clan_physical\") && isClan());\n }", "@Test\n\tpublic void testHealthIncrease2() {\n\t\ttank.damage(proj);\n\t\ttank.damage(proj);\n\t\ttank.increaseHealth();\n\t\tassertEquals(2, tank.getHealth());\n\t}", "public void heal(){\n\t\thp += potion.getHpBoost();\n\t\tif(hp > max_hp)hp = max_hp;\n\t}", "static void healing_challenge3() { //this is where the player will be able to heal himself/herself in boss challenge\n System.out.println(\" You open up the bag to check your inventory...\");\n enter = next.nextLine();\n if(potions <= zero) {\n System.out.println(username + \" feels something in the bag...\");\n System.out.println(\"\\n\");\n System.out.println(\"There is a large object inside, but turns out to be your spell book\");\n enter = next.nextLine();\n System.out.println(\"UH! OH! You ran out of potions. GUESS YOUR ON YOUR OWN!!!\");\n System.out.println(\"\\n\");\n }else if(potions > zero && playerhealth != 3500) { //this makes sure their aren't any loop holes in the game for cheats\n System.out.println(username + \" found a potion in the bag.\");\n System.out.println(username + \" takes the new blue potion and consumes it entirely...\");\n System.out.println(username + \" gained 300 HP points.\");\n playerhealth = playerhealth + 300; //player's health is healed\n potions--;//put it like this, not potions = potions--; This would break the game...\n if(playerhealth > 3500){ //in case that player heals and adds 300 and health goes higher than maixmum\n playerhealth = 3500;\n }\n //in case if player tries to cheat with the maximum health\n }else if (playerhealth == 3500) {\n System.out.println(\"You are at your maximum health...You can't raise it any higher than that...\");\n System.out.println(\"NICE TRY!\");\n } \n }", "public void checkHealth(){\n if (this.getHealth() < this.initialHealth/2){\n this.setImgSrc(\"/students/footballstudent1.png\");\n this.getTile().setImage(\"/students/footballstudent1.png\");\n }\n }", "public void autosimulateCombat() {\n\n int monstersRemainingHealth = monster.getHealth() - player.getPower();\n int playersRemainingHealth = player.getHealth() - monster.getPower();\n\n while (player.getHealth() > 0 && monster.getHealth() > 0) {\n\n monster.setHealth(monstersRemainingHealth);\n monstersRemainingHealth = monster.getHealth() - player.getPower();\n\n\n player.setHealth(playersRemainingHealth);\n playersRemainingHealth = player.getHealth() - monster.getPower();\n\n }\n isPlayerDefeated();\n return;\n }", "public void reduceHealth() {\n\t}", "public void repair(){\n if(health < 9) {\n this.health++;\n }\n }", "public int getHealth();", "public void setHealth(float health) {\r\n \t\tthis.health = health;\r\n \t}", "public boolean takeDamage(int[] damage){\n int damageTaken = 0;\n\n if(damage[0] == 1){\n damageTaken = damage[1] - endurance;\n if(damageTaken < 0) damageTaken = 0;\n System.out.println(type + \" took \" + damageTaken + \" damage\\n\");\n }else if(damage[0] == 2){\n damageTaken = damage[1] - willpower;\n if(damageTaken < 0) damageTaken = 0;\n System.out.println(type + \" took \" + damageTaken + \" damage\\n\");\n }\n healthPoints -= damageTaken;\n return healthPoints > 0;\n }", "float getPercentHealth();", "private void damage(){\n\n LevelMap.getLevel().damage(dmg);\n //System.out.println(\"died\");\n setDie();\n }", "public void buyHealth() {\n this.healthMod++;\n heathMax += 70 * healthMod;\n }", "public void setHealth(double health) {\r\n\t\tthis.health = health;\r\n\t}", "@Test\n\tpublic void testIsDead() {\n\t\tnpc.setLevel(1);\n\t\tnpc.setHealth(23);\n\t\tnpc.calHealth();\n\t\tassertFalse(npc.isDead());\n\t\tnpc.changeHealth(-23);\n\t\tassertTrue(npc.isDead());\n\t\tnpc.changeHealth(-100);\n\t\tassertTrue(npc.isDead());\n\t}", "AbilityDamage getAbilityDamage();", "private int calculateHeroDamageDone(Hero h, GenericMonster m){\n\t\t// Take into account armor, magic resist, thoughness, that kind of thing..\n\t\thDmg = h.getWeapon().calculateDamageDelt();\n\t\tcalcDef = new CalculateDefence(h.getWeapon(), m);\n\t\tint def = calcDef.getMonsterDefense();\n\t\t// Getting the defense value and type\n\t\tmResistance = calcDef.getMonsterDefType();\n\t\tmResistanceValue = calcDef.getMonsterDefValue();\n\t\treturn (hDmg - def);\n\t}", "public void heal3()\r\n {\r\n this.health = 1200;\r\n Story.healText3();\r\n }", "@Test\n\tpublic void testHealthIncrease3() {\n\t\ttank.setHealth(1);\n\t\ttank.increaseHealth();\n\t\tassertEquals(2, tank.getHealth());\n\t}", "public void takeDamage(int damage) {\n Random rand = new Random();\n int game = rand.nextInt(51) + 75;\n double game2 = (double) game;\n double percDamage = game2/100.0;\n double realSomething = (double) damage;\n double actualDamageNotReal = realSomething * percDamage;\n int actualDamage = (int) actualDamageNotReal;\n int actualDmg = actualDamage - this.armour;\n if (actualDmg <= 0){\n actualDmg = 0;\n }\n this.health -= actualDmg;\n slowDisplay(String.format(\"%s takes %s damage, now at %s\\n\",this.name,actualDmg,this.health));\n\n }", "public int doDamage(Actor attacker, int damage){\n if( iframes==0 ){\n health -= damage;\n healthbar.setHealth(health);\n iframes = 20;\n MuteControl.playSound(attackSound);\n if (health>0) return damage;\n die();\n return damage;\n }else return 0;\n }", "private void updateHealth() {\n float percentage = (float) game.getPlayerComponent().getHealth() / (float) game.getPlayerComponent().getMaxHealth(); //Possible placed in controller\n healthBar.setWidth(healthBarMaxWidth * percentage);\n }", "@SuppressWarnings(\"deprecated\")\n protected void durability(Player p, EntityDamageEvent event) {\n this.p = p;\n ItemStack heldItem = p.getInventory().getItemInMainHand();\n //No need to check here, its always ok\n canRun = true;\n //TODO ignore when hitting the same target multiple times (but how, xyz changes all the time?)\n //TODO sometimes(?) it shows 15 durability, when in fact its 14 (maybe bc of multiple mob hits?)\n if (canRun) {\n checkDurability(heldItem, \"\");\n }\n }", "private void checkVictory()\n {\n if(throne.getEnemyHealth() <= 0)\n {\n System.out.println(\"Congrats! The land is now free from all chaos and destruction. You are now very rich and wealthy. Yay\");\n alive = false;\n }\n }", "private double calculateDamage(Weapon weapon, double motionValue, Monster target, MonsterParts part, int weaknessExploitLevel, \n int critBoostLevel, boolean critElement, int samples) throws InvalidWeaponException, InvalidPartException {\n \n if (weapon == null) {\n throw new InvalidWeaponException(\"No weapon provided.\");\n }\n \n rawDamage = 0;\n critDamage = 0;\n elementalDamage = 0;\n elementalCritDamage = 0;\n criticalElement = critElement;\n \n if (weaknessExploitLevel == 0) {\n weaknessExploit = 0;\n } else if (weaknessExploitLevel == 1) {\n weaknessExploit = 15;\n } else if (weaknessExploitLevel == 2) {\n weaknessExploit = 30;\n } else if (weaknessExploitLevel == 3) {\n weaknessExploit = 50;\n } else {\n throw new IllegalArgumentException(\"Weakness Exploit must be level 0, 1, 2, or 3\");\n }\n \n if (critBoostLevel == 0) {\n critBoost = 0;\n } else if (critBoostLevel == 1) {\n critBoost = 5;\n } else if (critBoostLevel == 2) {\n critBoost = 10;\n } else if (critBoostLevel == 3) {\n critBoost = 15;\n } else {\n throw new IllegalArgumentException(\"Critical Boost must be level 0, 1, 2, or 3\");\n }\n \n for (int i = 0; i < samples; i++) {\n rawDamage += weapon.getAttack()/weapon.getInflation() * weapon.getRawSharpness() * target.getPartMultiplierRaw(part, weapon) * motionValue;\n elementalDamage += weapon.getElementStatusDmg()/10 * weapon.getElementalSharpness() * target.getPartMultiplierElemental(part, weapon);\n calculateCrit(target, part, weapon, motionValue);\n }\n \n return (rawDamage + critDamage + elementalDamage + elementalCritDamage)/samples;\n \n }", "public short getHandThrowDamage();", "public void heal1()\r\n {\r\n this.health = 700;\r\n Story.healText1();\r\n }", "@Override\n\tpublic void reduceCurrentHp(final double damage, final L2Character attacker, final boolean awake)\n\t{\n\t\t/*\n\t\t * if ((this instanceof L2SiegeGuardInstance) && (attacker instanceof L2SiegeGuardInstance)) //if((this.getEffect(L2Effect.EffectType.CONFUSION)!=null) && (attacker.getEffect(L2Effect.EffectType.CONFUSION)!=null)) return; if ((this instanceof L2MonsterInstance)&&(attacker instanceof\n\t\t * L2MonsterInstance)) if((this.getEffect(L2Effect.EffectType.CONFUSION)!=null) && (attacker.getEffect(L2Effect.EffectType.CONFUSION)!=null)) return;\n\t\t */\n\t\t\n\t\tif (isRaid() && attacker != null && attacker.getParty() != null && attacker.getParty().isInCommandChannel() && attacker.getParty().getCommandChannel().meetRaidWarCondition(this))\n\t\t{\n\t\t\tif (firstCommandChannelAttacked == null) // looting right isn't set\n\t\t\t{\n\t\t\t\tsynchronized (this)\n\t\t\t\t{\n\t\t\t\t\tif (firstCommandChannelAttacked == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tfirstCommandChannelAttacked = attacker.getParty().getCommandChannel();\n\t\t\t\t\t\tif (firstCommandChannelAttacked != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcommandChannelTimer = new CommandChannelTimer(this);\n\t\t\t\t\t\t\tcommandChannelLastAttack = System.currentTimeMillis();\n\t\t\t\t\t\t\tThreadPoolManager.getInstance().scheduleGeneral(commandChannelTimer, 10000); // check for last attack\n\t\t\t\t\t\t\tfirstCommandChannelAttacked.broadcastToChannelMembers(new CreatureSay(0, Say2.PARTYROOM_ALL, \"\", \"You have looting rights!\")); // TODO: retail msg\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (attacker.getParty().getCommandChannel().equals(firstCommandChannelAttacked)) // is in same channel\n\t\t\t{\n\t\t\t\tcommandChannelLastAttack = System.currentTimeMillis(); // update last attack time\n\t\t\t}\n\t\t}\n\t\t/*\n\t\t * // CommandChannel if(commandChannelTimer == null && isRaid() && attacker != null) { if(attacker.isInParty() && attacker.getParty().isInCommandChannel() && attacker.getParty().getCommandChannel().meetRaidWarCondition(this)) { firstCommandChannelAttacked = attacker.getParty().getCommandChannel();\n\t\t * commandChannelTimer = new CommandChannelTimer(this, attacker.getParty().getCommandChannel()); ThreadPoolManager.getInstance().scheduleGeneral(_commandChannelTimer, 300000); // 5 min firstCommandChannelAttacked.broadcastToChannelMembers(new CreatureSay(0, Say2.PARTYROOM_ALL, \"\",\n\t\t * \"You have looting rights!\")); } }\n\t\t */\n\t\tif (isEventMob)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// Add damage and hate to the attacker AggroInfo of the L2Attackable aggroList\n\t\tif (attacker != null)\n\t\t{\n\t\t\taddDamage(attacker, (int) damage);\n\t\t}\n\t\t\n\t\t// If this L2Attackable is a L2MonsterInstance and it has spawned minions, call its minions to battle\n\t\tif (this instanceof L2MonsterInstance)\n\t\t{\n\t\t\tL2MonsterInstance master = (L2MonsterInstance) this;\n\t\t\t\n\t\t\tif (this instanceof L2MinionInstance)\n\t\t\t{\n\t\t\t\tmaster = ((L2MinionInstance) this).getLeader();\n\t\t\t\t\n\t\t\t\tif (!master.isInCombat() && !master.isDead())\n\t\t\t\t{\n\t\t\t\t\tmaster.addDamage(attacker, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (master.hasMinions())\n\t\t\t{\n\t\t\t\tmaster.callMinionsToAssist(attacker);\n\t\t\t}\n\t\t\t\n\t\t\tmaster = null;\n\t\t}\n\t\t\n\t\t// Reduce the current HP of the L2Attackable and launch the doDie Task if necessary\n\t\tsuper.reduceCurrentHp(damage, attacker, awake);\n\t}", "public int getHealth() { return this.health; }", "public void dealDamage(int damage) {\r\n\t\thealth -= damage;\r\n\t\tif (health <= 0)\r\n\t\t\tdeath = true;\r\n\t\t_checkInvariant();\r\n\t}", "public StarAbilityHeal() {\n\t\t\n\t\tthis.setMaxLevel(4);\n\t\tthis.setEffectable(Effectable.Heal);\n\t\t\n\t}", "public void setHealth(float health)\n {\n if ( health > getMaxHealth() )\n {\n this.health = getMaxHealth();\n }\n else if (health < 0)\n {\n this.health = 0.0f;\n }\n else\n {\n this.health = health;\n }\n\n }", "public void gotDamaged() {\n \tif(!dead) {\n\t\t\tdamaged = true;\n\t\t\tgettingHitParticleEffect.reset();\n\t\t\tcolorValue = 0;\n\t\t}\n\n }", "private boolean shouldBecomeCombatEngineer() {\r\n\t\tdouble machineUnitsCount = this.getNumberOfMachineUnits();\r\n\t\tdouble combatEngineers = this.informationStorage.getWorkerConfig().getTotalCombatEngineerCount();\r\n\r\n\t\treturn combatEngineers / machineUnitsCount <= this.combatEngineerTriggerPercentageEnroll;\r\n\t}", "public boolean canHit() {\n\t\treturn this.hand.countValue().first() < 17;\n\t}", "private void setHealth(Player p, int health)\n {\n int current = p.getHealth();\n \n // If the health is 20, just leave it at that no matter what.\n int regain = health == 20 ? 20 : health - current;\n \n // Set the health, and fire off the event.\n p.setHealth(health);\n EntityRegainHealthEvent event = new EntityRegainHealthEvent(p, regain, RegainReason.CUSTOM);\n Bukkit.getPluginManager().callEvent(event);\n }", "public void setHealth(int h) {\n setStat(h, health);\n }", "private void selfHeal() {\n\t\t\n\t\t//IF the Droid is carrying an item...\n\t\tif (this.getItemCarried() != null){\n\t\t\t\n\t\t\t//If the item is an oil can...\n\t\t\tif (this.getItemCarried().getShortDescription() == \"an oil can\" ) {\n\t\t\t\n\t\t\t\t//If the Droids health is LOWER than half...\n\t\t\t\tif((this.getInitialHP()/2) > this.getHitpoints()) {\n\t\t\t\t\tsay(this.getShortDescription() + \" is at or below half HP. \"\n\t\t\t\t\t\t\t+ \" Healing itself...\");\n\t\t\t\t\t\n\t\t\t\t\t//Implementing a new HealDroid method (Droid heals on itself)\n\t\t\t\t\t//public HealDroid(SWEntityInterface theTarget, MessageRenderer m) {\n\t\t\t\t\tHealDroid droidHeal = new HealDroid(this, messageRenderer);\n\t\t\t\t\t\n\t\t\t\t\tscheduler.schedule(droidHeal, this, 1);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\t\n\t}" ]
[ "0.6445385", "0.64428484", "0.61715436", "0.61715436", "0.61715436", "0.61715436", "0.61715436", "0.6017997", "0.5926405", "0.5862035", "0.58595425", "0.58236265", "0.58129907", "0.5803556", "0.57771885", "0.57677454", "0.57364833", "0.57312053", "0.57234055", "0.5711078", "0.5696264", "0.56888425", "0.5655541", "0.56547284", "0.56437767", "0.5634696", "0.56301194", "0.56262165", "0.5624199", "0.56218576", "0.56213796", "0.5619657", "0.561018", "0.5587227", "0.5578889", "0.5559501", "0.5555375", "0.5546721", "0.5543501", "0.5537731", "0.5534617", "0.55306536", "0.5527567", "0.5524715", "0.5518399", "0.55165625", "0.55142015", "0.5511537", "0.5509659", "0.55054635", "0.55004007", "0.55004007", "0.5492371", "0.54881454", "0.54874766", "0.54759336", "0.54758734", "0.54755163", "0.54707175", "0.54690635", "0.54672986", "0.5463822", "0.5453738", "0.5442805", "0.54408866", "0.5439382", "0.54290247", "0.5425168", "0.54221135", "0.54199064", "0.5416191", "0.5413345", "0.5412579", "0.5411161", "0.5409318", "0.5397227", "0.53953886", "0.53888744", "0.5380513", "0.53773755", "0.5367408", "0.5360011", "0.5354491", "0.5343516", "0.5342638", "0.53325653", "0.53320235", "0.5331906", "0.5327943", "0.53253144", "0.5324952", "0.5324033", "0.5322924", "0.5318989", "0.5316891", "0.53167796", "0.5308469", "0.53057945", "0.5300946", "0.52994365" ]
0.5693733
21
Test some aspects of the SpecialType that is been left over by other test cases
@Test public void specialTypeTest() { // check radius and duration SpecialType special = SpecialType.NUKE; Assert.assertEquals(0, special.getRadius()); Assert.assertEquals(0, special.getDuration()); //check cost int[] cost = special.getCost(); Assert.assertTrue(cost[0]==200 && cost[1] == 100 && cost[2] == 200); //check texture Assert.assertEquals(special.getTextureString(), "nuke"); // check cost string String test = "Rock: 200\n" + "Crystal: 100\n" + "Biomass: 200\n"; Assert.assertEquals(test, special.getCostString()); //check description test = "Name: Nuke\n" + "Type: Special\n" + "Damage: 700\n" + "Target: ENEMY TEAM"; Assert.assertEquals(test, special.getDescription()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testType() {\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(6))).oclIsTypeOf(tInteger).isTrue() );\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(6))).oclIsTypeOf(tReal).not().isTrue() ); //differs\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(p1))).oclIsTypeOf(tPersonFQ).isTrue() );\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(\"foo\"))).oclIsTypeOf(tOclString).isTrue() );\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(true))).oclIsTypeOf(tBoolean).isTrue() );\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(6.0))).oclIsTypeOf(tReal).isTrue() );\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(6.0))).oclIsTypeOf(tInteger).not().isTrue() );\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(p2))).oclIsTypeOf(tCompany).not().isTrue() );\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(false))).oclIsTypeOf(tAny).not().isTrue() ); //differs\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(0.0))).oclIsTypeOf(tAny).not().isTrue() ); // differs\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(0))).oclIsTypeOf(tAny).not().isTrue() ); // differs\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(p1))).oclIsTypeOf(tObject).not().isTrue() ); // differs\n }", "@Test\n\tpublic void testTypeExtension() {\n\t}", "public boolean isSpecial()\r\n\t{\r\n\t\t\r\n\t\treturn special;\r\n\t}", "public abstract boolean isTypeCorrect();", "@Test\n public void getUse () {\n Assert.assertEquals(false, bomb.useItem());\n Special aoeHeal = new Special(SpecialType.HEALTHSHOT);\n Assert.assertEquals(true, aoeHeal.useItem());\n }", "@Test\n\tpublic void testInternalTypes() {\n\t\tlogger.info(\"Run testInternalTypes\");\n\t\tfinal IntrospectionResult introspection = getIntrospection();\n\n\t\t// OrderByDirectionOutputType\n\t\tfinal IntrospectionFullType orderByDirectionOutputType = getFullType(introspection,\n\t\t\t\tgetOrderByDirectionOutputTypeName());\n\t\tAssert.assertEquals(2, orderByDirectionOutputType.getEnumValues().size());\n\t\tassertEnum(orderByDirectionOutputType, GQLOrderByDirectionEnum.ASC.toString(), false);\n\t\tassertEnum(orderByDirectionOutputType, GQLOrderByDirectionEnum.DESC.toString(), false);\n\n\t\t// OrderByInputType\n\t\tfinal IntrospectionFullType orderByInputType = getFullType(introspection, getOrderByInputTypeName());\n\t\tAssert.assertEquals(2, orderByInputType.getInputFields().size());\n\t\tassertInputField(orderByInputType, \"field\", IntrospectionTypeKindEnum.NON_NULL,\n\t\t\t\tIntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLString.getName());\n\t\tassertInputField(orderByInputType, \"direction\", IntrospectionTypeKindEnum.ENUM,\n\t\t\t\tgetOrderByDirectionOutputTypeName());\n\n\t\t// OrderByOutputType\n\t\tfinal IntrospectionFullType orderByOutputType = getFullType(introspection, getOrderByOutputTypeName());\n\t\tAssert.assertEquals(2, orderByOutputType.getFields().size());\n\t\tassertField(orderByOutputType, \"field\", IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLString.getName());\n\t\tassertField(orderByOutputType, \"direction\", IntrospectionTypeKindEnum.ENUM,\n\t\t\t\tgetOrderByDirectionOutputTypeName());\n\n\t\t// PagingInputType\n\t\tfinal IntrospectionFullType pagingInputType = getFullType(introspection, getPagingInputTypeName());\n\t\tAssert.assertEquals(2, pagingInputType.getInputFields().size());\n\t\tassertInputField(pagingInputType, \"offset\", IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLInt.getName());\n\t\tassertInputField(pagingInputType, \"limit\", IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLInt.getName());\n\n\t\t// PagingOutputType\n\t\tfinal IntrospectionFullType pagingOutputType = getFullType(introspection, getPagingOutputTypeName());\n\t\tAssert.assertEquals(3, pagingOutputType.getFields().size());\n\t\tassertField(pagingOutputType, \"offset\", IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLInt.getName());\n\t\tassertField(pagingOutputType, \"limit\", IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLInt.getName());\n\t\tassertField(pagingOutputType, \"totalLength\", IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLLong.getName());\n\t}", "@Test\n public void typeTest() {\n assertTrue(red_piece.getType() == Piece.Type.SINGLE);\n red_piece.king();\n assertTrue(red_piece.getType() == Piece.Type.KING);\n assertTrue(white_piece.getType() == Piece.Type.SINGLE);\n }", "default boolean isSpecial() { return false; }", "@Test\n public void typeTest() {\n // TODO: test type\n }", "@Test\n public void typeTest() {\n // TODO: test type\n }", "@Test\n public void typeTest() {\n // TODO: test type\n }", "@Override public abstract boolean test(T t);", "public void testEventAdditionalTypes() throws Exception\n {\n checkEventTypeRegistration(EVENT_TYPE_BUILDER,\n \"testTree -> MOUSE, testTree -> CHANGE\");\n }", "@Override\n\tpublic void test(Object t) {\n\t\t\n\t}", "@Override\n\tpublic void test(Object t) {\n\t\t\n\t}", "@Test\n public void atTypeTest() {\n // TODO: test atType\n }", "public void testGetTagType_1_accuracy() {\n instance.setTagType(\"tagtype\");\n assertEquals(\"The type is not set properly.\", \"tagtype\", instance.getTagType());\n }", "public boolean testsSubtypeSensitiveVars()\n/* */ {\n/* 100 */ return (this.runtimeTest != null) && \n/* 101 */ (new SubtypeSensitiveVarTypeTestVisitor(null).testsSubtypeSensitiveVars(this.runtimeTest));\n/* */ }", "@Test\n public void atBaseTypeTest() {\n // TODO: test atBaseType\n }", "@Test\n\tpublic void testAll() {\n\n\t\tassertEquals(\"Not specified\", getAtonType(0));\n\t\tassertEquals(\"unknown code 100\", getAtonType(100));\n\t\tassertEquals(\"Fixed - Light, without sectors\", getAtonType(5));\n\t\tassertEquals(\"Fixed - Beacon, Cardinal E\", getAtonType(10));\n\t\tassertEquals(\"Floating - Light Vessel, LANBY, Rigs\", getAtonType(31));\n\t\tassertEquals(\"Fixed - Beacon, Isolated danger\", getAtonType(17));\n\t\tassertEquals(\"Fixed - Beacon, Special mark\", getAtonType(19));\n\t\tassertEquals(\"Floating - Cardinal Mark N\", getAtonType(20));\n\t\tassertEquals(\"Floating - Cardinal Mark E\", getAtonType(21));\n\n\t}", "@RepeatedTest(20)\n void subTest(){\n assertEquals(f.sub(f), new Float(decimal-decimal));\n assertEquals(f.sub(g), new Float(decimal-random));\n assertEquals(f.sub(i), new Float(decimal-seed));\n assertEquals(f.sub(bi), new Float(decimal-bi.toInt(bi.getBinary())));\n assertEquals(i.sub(f), new Float(seed-decimal));\n assertEquals(i.sub(i), new Int(seed-seed));\n assertEquals(i.sub(bi), new Int(seed-bi.toInt(bi.getBinary())));\n\n //nulls\n //Bool - ITypes\n assertEquals(bot.sub(st),Null);\n assertEquals(bof.sub(st),Null);\n assertEquals(bot.sub(bot),Null);\n assertEquals(bof.sub(bot), Null);\n assertEquals(bot.sub(f), Null);\n assertEquals(bof.sub(i), Null);\n assertEquals(bot.sub(bi), Null);\n //Float - ITypes \\ {Numbers}\n assertEquals(f.sub(st), Null);\n assertEquals(f.sub(bot), Null);\n assertEquals(f.sub(bof), Null);\n //Int - ITypes \\ {Numbers}\n assertEquals(i.sub(st), Null);\n assertEquals(i.sub(bot),Null);\n assertEquals(i.sub(bof), Null);\n //Binary - ITypes \\ {Int, Binary}\n assertEquals(bi.sub(st), Null);\n assertEquals(bi.sub(bot), Null);\n assertEquals(bi.sub(f), Null);\n //NullType subtractions\n assertEquals(Null.sub(st), Null);\n assertEquals(Null.sub(bof), Null);\n assertEquals(Null.sub(f), Null);\n assertEquals(Null.sub(i), Null);\n assertEquals(Null.sub(bi), Null);\n assertEquals(Null.sub(Null), Null);\n assertEquals(st.sub(Null), Null);\n assertEquals(bot.sub(Null), Null);\n assertEquals(f.sub(Null), Null);\n assertEquals(i.sub(Null), Null);\n assertEquals(bi.sub(Null), Null);\n }", "@Test\n\tpublic void testInternalEntityRelatedTypes() {\n\t\tlogger.info(\"Run testInternalEntityRelatedTypes\");\n\t\tfinal IntrospectionResult introspection = getIntrospection();\n\n\t\t// Entity1InputType\n\t\tfinal IntrospectionFullType entity1InputType = getFullType(introspection,\n\t\t\t\tEntity1.class.getSimpleName() + schemaConfig.getInputTypeNameSuffix());\n\t\tAssert.assertEquals(27, entity1InputType.getInputFields().size());\n\n\t\tassertInputField(entity1InputType, \"id\", IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLID.getName());\n\t\tassertInputField(entity1InputType, \"intAttr\", IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLInt.getName());\n\t\tassertInputField(entity1InputType, \"longAttr\", IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLLong.getName());\n\t\tassertInputField(entity1InputType, \"doubleAttr\", IntrospectionTypeKindEnum.SCALAR,\n\t\t\t\tScalars.GraphQLFloat.getName());\n\t\tassertInputField(entity1InputType, \"stringAttr\", IntrospectionTypeKindEnum.SCALAR,\n\t\t\t\tScalars.GraphQLString.getName());\n\t\tassertInputField(entity1InputType, \"booleanAttr\", IntrospectionTypeKindEnum.SCALAR,\n\t\t\t\tScalars.GraphQLBoolean.getName());\n\t\tassertInputField(entity1InputType, \"bigIntAttr\", IntrospectionTypeKindEnum.SCALAR,\n\t\t\t\tScalars.GraphQLBigInteger.getName());\n\t\tassertInputField(entity1InputType, \"bigDecimalAttr\", IntrospectionTypeKindEnum.SCALAR,\n\t\t\t\tScalars.GraphQLBigDecimal.getName());\n\t\tassertInputField(entity1InputType, \"bytesAttr\", IntrospectionTypeKindEnum.SCALAR,\n\t\t\t\tScalars.GraphQLByte.getName());\n\t\tassertInputField(entity1InputType, \"shortAttr\", IntrospectionTypeKindEnum.SCALAR,\n\t\t\t\tScalars.GraphQLShort.getName());\n\t\tassertInputField(entity1InputType, \"charAttr\", IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLChar.getName());\n\t\tassertInputField(entity1InputType, \"dateAttr\", IntrospectionTypeKindEnum.SCALAR,\n\t\t\t\tGQLJavaScalars.GraphQLDate.getName());\n\t\tassertInputField(entity1InputType, \"fileAttr\", IntrospectionTypeKindEnum.SCALAR,\n\t\t\t\tGQLJavaScalars.GraphQLFile.getName());\n\t\tassertInputField(entity1InputType, \"localDateAttr\", IntrospectionTypeKindEnum.SCALAR,\n\t\t\t\tGQLJavaScalars.GraphQLLocalDate.getName());\n\t\tassertInputField(entity1InputType, \"localDateTimeAttr\", IntrospectionTypeKindEnum.SCALAR,\n\t\t\t\tGQLJavaScalars.GraphQLLocalDateTime.getName());\n\t\tassertInputField(entity1InputType, \"instantAttr\", IntrospectionTypeKindEnum.SCALAR,\n\t\t\t\tGQLJavaScalars.GraphQLInstant.getName());\n\n\t\tassertInputField(entity1InputType, \"stringList\", IntrospectionTypeKindEnum.LIST,\n\t\t\t\tIntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLString.getName());\n\t\tassertInputField(entity1InputType, \"stringSet\", IntrospectionTypeKindEnum.LIST,\n\t\t\t\tIntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLString.getName());\n\n\t\tassertInputField(entity1InputType, \"stringList\", IntrospectionTypeKindEnum.LIST,\n\t\t\t\tIntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLString.getName());\n\t\tassertInputField(entity1InputType, \"stringSet\", IntrospectionTypeKindEnum.LIST,\n\t\t\t\tIntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLString.getName());\n\n\t\tassertInputField(entity1InputType, \"enumAttr\", IntrospectionTypeKindEnum.ENUM, Enum1.class.getSimpleName());\n\n\t\tassertInputField(entity1InputType, \"enumList\", IntrospectionTypeKindEnum.LIST, IntrospectionTypeKindEnum.ENUM,\n\t\t\t\tEnum1.class);\n\t\tassertInputField(entity1InputType, \"enumSet\", IntrospectionTypeKindEnum.LIST, IntrospectionTypeKindEnum.ENUM,\n\t\t\t\tEnum1.class);\n\n\t\tassertInputField(entity1InputType, \"entity2\" + schemaConfig.getAttributeIdSuffix(),\n\t\t\t\tIntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLID.getName());\n\t\tassertInputField(entity1InputType, \"entity3\" + schemaConfig.getAttributeIdPluralSuffix(),\n\t\t\t\tIntrospectionTypeKindEnum.LIST, IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLID.getName());\n\t\tassertInputField(entity1InputType, \"entity4\" + schemaConfig.getAttributeIdPluralSuffix(),\n\t\t\t\tIntrospectionTypeKindEnum.LIST, IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLID.getName());\n\n\t\tassertInputField(entity1InputType, \"embeddedData1\", IntrospectionTypeKindEnum.INPUT_OBJECT,\n\t\t\t\tEmbeddedData1.class.getSimpleName() + schemaConfig.getInputTypeNameSuffix());\n\t\tassertInputField(entity1InputType, \"embeddedData1s\", IntrospectionTypeKindEnum.LIST,\n\t\t\t\tIntrospectionTypeKindEnum.INPUT_OBJECT,\n\t\t\t\tEmbeddedData1.class.getSimpleName() + schemaConfig.getInputTypeNameSuffix());\n\n\t\t// Entity1LoadResult\n\t\tfinal IntrospectionFullType entity1LoadResult = getFullType(introspection,\n\t\t\t\tEntity1.class.getSimpleName() + schemaConfig.getQueryGetListOutputTypeNameSuffix());\n\t\tAssert.assertEquals(3, entity1LoadResult.getFields().size());\n\n\t\tassertField(entity1LoadResult, \"data\", IntrospectionTypeKindEnum.LIST, IntrospectionTypeKindEnum.OBJECT,\n\t\t\t\tEntity1.class.getSimpleName());\n\t\tassertField(entity1LoadResult, \"orderBy\", IntrospectionTypeKindEnum.LIST, IntrospectionTypeKindEnum.OBJECT,\n\t\t\t\tgetOrderByOutputTypeName());\n\t\tassertField(entity1LoadResult, \"paging\", IntrospectionTypeKindEnum.OBJECT, getPagingOutputTypeName());\n\n\t\t// Entity2InputType\n\t\tfinal IntrospectionFullType entity2InputType = getFullType(introspection,\n\t\t\t\tEntity2.class.getSimpleName() + schemaConfig.getInputTypeNameSuffix());\n\t\tAssert.assertEquals(2, entity2InputType.getInputFields().size());\n\n\t\tassertInputField(entity2InputType, \"id\", IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLID.getName());\n\t\tassertInputField(entity2InputType, \"entity1\" + schemaConfig.getAttributeIdPluralSuffix(),\n\t\t\t\tIntrospectionTypeKindEnum.LIST, IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLID.getName());\n\n\t\t// Entity2LoadResult\n\t\tfinal IntrospectionFullType entity2LoadResult = getFullType(introspection,\n\t\t\t\tEntity2.class.getSimpleName() + schemaConfig.getQueryGetListOutputTypeNameSuffix());\n\t\tAssert.assertEquals(3, entity2LoadResult.getFields().size());\n\n\t\tassertField(entity2LoadResult, \"data\", IntrospectionTypeKindEnum.LIST, IntrospectionTypeKindEnum.OBJECT,\n\t\t\t\tEntity2.class.getSimpleName());\n\t\tassertField(entity2LoadResult, \"orderBy\", IntrospectionTypeKindEnum.LIST, IntrospectionTypeKindEnum.OBJECT,\n\t\t\t\tgetOrderByOutputTypeName());\n\t\tassertField(entity2LoadResult, \"paging\", IntrospectionTypeKindEnum.OBJECT, getPagingOutputTypeName());\n\n\t\t// Entity3InputType\n\t\tfinal IntrospectionFullType entity3InputType = getFullType(introspection,\n\t\t\t\tEntity3.class.getSimpleName() + schemaConfig.getInputTypeNameSuffix());\n\t\tAssert.assertEquals(2, entity3InputType.getInputFields().size());\n\n\t\tassertInputField(entity3InputType, \"id\", IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLID.getName());\n\t\tassertInputField(entity3InputType, \"entity1\" + schemaConfig.getAttributeIdSuffix(),\n\t\t\t\tIntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLID.getName());\n\n\t\t// Entity4InputType\n\t\tfinal IntrospectionFullType entity4InputType = getFullType(introspection,\n\t\t\t\tEntity4.class.getSimpleName() + schemaConfig.getInputTypeNameSuffix());\n\t\tAssert.assertEquals(2, entity4InputType.getInputFields().size());\n\n\t\tassertInputField(entity4InputType, \"id\", IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLID.getName());\n\t\tassertInputField(entity4InputType, \"entity1\" + schemaConfig.getAttributeIdPluralSuffix(),\n\t\t\t\tIntrospectionTypeKindEnum.LIST, IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLID.getName());\n\t}", "@Test\n public void testAssertObjectChangedPropertyWithIgnoredType() {\n // setup\n final TierTwoTypeWithIgnoreProperty tierTwoTypeWithIgnoreProperty = new TierTwoTypeWithIgnoreProperty(\n new IgnoredType());\n final ChangedProperty<IgnoredType> jokerProperty = Property.change(TierTwoTypeWithIgnoreProperty.IGNORED_TYPE,\n new IgnoredType());\n\n // method\n assertObject(EMPTY_STRING, tierTwoTypeWithIgnoreProperty, jokerProperty);\n }", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "@Test\n public void comeTypeTest() {\n // TODO: test comeType\n }", "@Test\n\tpublic void testPropertyIntegralType() {\n\t\tfinal Base base = context.mock(Base.class);\n\t\tcontext.checking(new PropertyEnabledExpectations() {\n\t\t\t{\n\t\t\t\tallowingProperty(base).isValid();\n\t\t\t\twill(returnValue(true));\n\t\t\t}\n\t\t});\n\n\t\tassertTrue(\"Initial value was not set\", base.isValid());\n\t\tbase.setValid(false);\n\t\tassertFalse(\"Value didn't change\", base.isValid());\n\t}", "@Test\n public void effectTypeTest() {\n // TODO: test effectType\n }", "public void testInvalidNoType() { assertInvalid(\"a\"); }", "protected abstract boolean isSupportedTestType(Properties prop);", "public boolean isTest() {\n\t\treturn this.operation instanceof MagicCriterion;\n\t}", "@Test\n public void testIsKindOf() throws ValueDoesNotMatchTypeException {\n testTypeKindOf(AnyType.IS_KIND_OF);\n }", "@Test\n void shouldReturnPrimitiveTypeOnly() {\n assertThat(TypeVisitor.gatherAllTypes(int.class), contains(int.class));\n assertThat(TypeVisitor.gatherAllTypes(double.class), contains(double.class));\n assertThat(TypeVisitor.gatherAllTypes(char.class), contains(char.class));\n }", "@org.junit.Test(timeout = 10000)\n public void annotatedWildcardTypeNameWithSuper_cf36451_failAssert29() {\n // AssertGenerator generate try/catch block with fail statement\n try {\n java.lang.String expected = (\"? super @\" + (com.squareup.javapoet.AmplAnnotatedTypeNameTest.NN)) + \" java.lang.String\";\n com.squareup.javapoet.TypeName type = com.squareup.javapoet.TypeName.get(java.lang.String.class).annotated(NEVER_NULL);\n java.lang.String actual = com.squareup.javapoet.WildcardTypeName.supertypeOf(type).toString();\n // StatementAdderMethod cloned existing statement\n type.unbox();\n org.junit.Assert.fail(\"annotatedWildcardTypeNameWithSuper_cf36451 should have thrown UnsupportedOperationException\");\n } catch (java.lang.UnsupportedOperationException eee) {\n }\n }", "public void test_containsTypedValue_accuracy() {\n instance.addTypedValue(typedValue);\n assertTrue(\"The TypedValue is not added properly.\", instance.containsTypedValue(typedValue));\n }", "@Test\n public void testClaimOthPhysFlag() {\n new ClaimFieldTester()\n .verifyEnumFieldStringValueExtractedCorrectly(\n FissClaim.Builder::setOthPhysFlagEnum,\n RdaFissClaim::getOthPhysFlag,\n FissPhysicianFlag.PHYSICIAN_FLAG_NO,\n \"N\")\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissClaim.Builder::setOthPhysFlagUnrecognized,\n RdaFissClaim::getOthPhysFlag,\n RdaFissClaim.Fields.othPhysFlag,\n 1);\n }", "static boolean test(Type t0)\r\n {\r\n String s0 = Types.stringFor(t0);\r\n TypeParser typeParser = TypeParsers.create();\r\n typeParser.addTypeVariableName(\"E\");\r\n Type t1 = null;\r\n try\r\n {\r\n t1 = typeParser.parse(s0);\r\n } \r\n catch (ClassNotFoundException e)\r\n {\r\n fail(e.getMessage());\r\n }\r\n \r\n String message = \"\";\r\n message += \"Input \" + s0 + \"\\n\";\r\n message += \"should be \" + t0 + \"\\n\";\r\n message += \"was parsed to \" + t1 + \"\\n\";\r\n \r\n boolean passed = TypesEquivalent.areEquivalent(t0, t1);\r\n if (!passed || DEBUG)\r\n {\r\n PrintStream ps = System.out;\r\n if (!passed)\r\n {\r\n ps = System.err;\r\n }\r\n String detailedMessage = \"\";\r\n detailedMessage += \"Input \" + s0 + \"\\n\";\r\n detailedMessage += \"should be \" + t0 + \" \" \r\n + \"(Detailed: \" + Types.debugStringFor(t0) + \")\" + \"\\n\";\r\n detailedMessage += \"was parsed to \" + t1 + \" \" \r\n + \"(Detailed: \" + Types.debugStringFor(t1) + \")\" + \"\\n\";\r\n ps.print(detailedMessage);\r\n }\r\n assertTrue(message, passed);\r\n return passed;\r\n }", "@Test\n\tpublic void testIfKingIsNotOnSpecialSquare()\n\t{\n\t\tData d = new Data();\n\t\tassertFalse(d.isKingOnSpecialSquare(61));\n\t\tassertFalse(d.isKingOnSpecialSquare(2));\n\t}", "public void test_getType() {\n assertEquals(\"'type' value should be properly retrieved.\", type, instance.getType());\n }", "@Override\r\n public void ontTest( OntModel m ) throws Exception {\r\n Profile prof = m.getProfile();\r\n OntClass A = m.createClass( NS + \"A\" );\r\n Individual x = m.createIndividual( A );\r\n Individual y = m.createIndividual( A );\r\n Individual z = m.createIndividual( A );\r\n\r\n x.addSameAs( y );\r\n assertEquals( \"Cardinality should be 1\", 1, x.getCardinality( prof.SAME_AS() ) );\r\n assertEquals( \"x should be the same as y\", y, x.getSameAs() );\r\n assertTrue( \"x should be the same as y\", x.isSameAs( y ) );\r\n\r\n x.addSameAs( z );\r\n assertEquals( \"Cardinality should be 2\", 2, x.getCardinality( prof.SAME_AS() ) );\r\n iteratorTest( x.listSameAs(), new Object[] {z,y} );\r\n\r\n x.setSameAs( z );\r\n assertEquals( \"Cardinality should be 1\", 1, x.getCardinality( prof.SAME_AS() ) );\r\n assertEquals( \"x should be same indiv. as z\", z, x.getSameAs() );\r\n\r\n x.removeSameAs( y );\r\n assertEquals( \"Cardinality should be 1\", 1, x.getCardinality( prof.SAME_AS() ) );\r\n x.removeSameAs( z );\r\n assertEquals( \"Cardinality should be 0\", 0, x.getCardinality( prof.SAME_AS() ) );\r\n }", "abstract public boolean isTyped();", "@org.junit.Test(timeout = 10000)\n public void annotatedWildcardTypeNameWithSuper_cf36424_failAssert23_literalMutation37781_cf43041_failAssert11() {\n // AssertGenerator generate try/catch block with fail statement\n try {\n // AssertGenerator generate try/catch block with fail statement\n try {\n java.lang.String expected = (\"\" + (com.squareup.javapoet.AmplAnnotatedTypeNameTest.NN)) + \" java.lang.String\";\n // MethodAssertGenerator build local variable\n Object o_4_0 = expected;\n com.squareup.javapoet.TypeName type = com.squareup.javapoet.TypeName.get(java.lang.String.class).annotated(NEVER_NULL);\n java.lang.String actual = com.squareup.javapoet.WildcardTypeName.supertypeOf(type).toString();\n // StatementAdderOnAssert create null value\n java.util.Map<java.lang.reflect.Type, com.squareup.javapoet.TypeVariableName> vc_16166 = (java.util.Map)null;\n // MethodAssertGenerator build local variable\n Object o_14_0 = vc_16166;\n // StatementAdderOnAssert create null value\n java.lang.reflect.Type vc_16164 = (java.lang.reflect.Type)null;\n // StatementAdderOnAssert create null value\n java.util.Map<javax.lang.model.element.TypeParameterElement, com.squareup.javapoet.TypeVariableName> vc_19200 = (java.util.Map)null;\n // StatementAdderOnAssert create null value\n javax.lang.model.type.TypeMirror vc_19198 = (javax.lang.model.type.TypeMirror)null;\n // StatementAdderMethod cloned existing statement\n type.get(vc_19198, vc_19200);\n // MethodAssertGenerator build local variable\n Object o_24_0 = vc_16164;\n // StatementAdderMethod cloned existing statement\n type.get(vc_16164, vc_16166);\n org.junit.Assert.fail(\"annotatedWildcardTypeNameWithSuper_cf36424 should have thrown IllegalArgumentException\");\n } catch (java.lang.IllegalArgumentException eee) {\n }\n org.junit.Assert.fail(\"annotatedWildcardTypeNameWithSuper_cf36424_failAssert23_literalMutation37781_cf43041 should have thrown NullPointerException\");\n } catch (java.lang.NullPointerException eee) {\n }\n }", "public void test_addTypedValue_accuracy() {\n instance.addTypedValue(typedValue);\n assertTrue(\"The TypedValue is not added properly.\", instance.containsTypedValue(typedValue));\n }", "@org.junit.Test(timeout = 10000)\n public void annotatedWildcardTypeNameWithExtends_cf28045_failAssert31_literalMutation29460_cf33137_failAssert3() {\n // AssertGenerator generate try/catch block with fail statement\n try {\n // AssertGenerator generate try/catch block with fail statement\n try {\n java.lang.String expected = (\"? extens @\" + (com.squareup.javapoet.AmplAnnotatedTypeNameTest.NN)) + \" java.lang.String\";\n // MethodAssertGenerator build local variable\n Object o_4_0 = expected;\n com.squareup.javapoet.TypeName type = com.squareup.javapoet.TypeName.get(java.lang.String.class).annotated(NEVER_NULL);\n java.lang.String actual = com.squareup.javapoet.WildcardTypeName.subtypeOf(type).toString();\n // StatementAdderOnAssert create null value\n com.squareup.javapoet.TypeName vc_12438 = (com.squareup.javapoet.TypeName)null;\n // StatementAdderOnAssert create null value\n java.util.Map<java.lang.reflect.Type, com.squareup.javapoet.TypeVariableName> vc_14798 = (java.util.Map)null;\n // StatementAdderOnAssert create null value\n java.lang.reflect.Type vc_14796 = (java.lang.reflect.Type)null;\n // StatementAdderOnAssert create null value\n com.squareup.javapoet.TypeName vc_14794 = (com.squareup.javapoet.TypeName)null;\n // StatementAdderMethod cloned existing statement\n vc_14794.get(vc_14796, vc_14798);\n // MethodAssertGenerator build local variable\n Object o_22_0 = vc_12438;\n // StatementAdderMethod cloned existing statement\n vc_12438.hashCode();\n org.junit.Assert.fail(\"annotatedWildcardTypeNameWithExtends_cf28045 should have thrown NullPointerException\");\n } catch (java.lang.NullPointerException eee) {\n }\n org.junit.Assert.fail(\"annotatedWildcardTypeNameWithExtends_cf28045_failAssert31_literalMutation29460_cf33137 should have thrown IllegalArgumentException\");\n } catch (java.lang.IllegalArgumentException eee) {\n }\n }", "@Test(timeout = 10000)\n public void genericType_sd822_failAssert2() throws Exception {\n // AssertGenerator generate try/catch block with fail statement\n try {\n Method recursiveEnum = getClass().getDeclaredMethod(\"generic\", Enum[].class);\n TypeName.get(recursiveEnum.getReturnType());\n // StatementAdd: generate variable from return value\n TypeName __DSPOT_invoc_6 = TypeName.get(recursiveEnum.getGenericReturnType());\n TypeName genericTypeName = TypeName.get(recursiveEnum.getParameterTypes()[0]);\n TypeName.get(recursiveEnum.getGenericParameterTypes()[0]);\n // StatementAdd: add invocation of a method\n __DSPOT_invoc_6.unbox();\n org.junit.Assert.fail(\"genericType_sd822 should have thrown UnsupportedOperationException\");\n } catch (UnsupportedOperationException eee) {\n }\n }", "@Test(timeout = 10000)\n public void genericType_sd810_failAssert1() throws Exception {\n // AssertGenerator generate try/catch block with fail statement\n try {\n Method recursiveEnum = getClass().getDeclaredMethod(\"generic\", Enum[].class);\n // StatementAdd: generate variable from return value\n TypeName __DSPOT_invoc_4 = TypeName.get(recursiveEnum.getReturnType());\n TypeName.get(recursiveEnum.getGenericReturnType());\n TypeName genericTypeName = TypeName.get(recursiveEnum.getParameterTypes()[0]);\n TypeName.get(recursiveEnum.getGenericParameterTypes()[0]);\n // StatementAdd: add invocation of a method\n __DSPOT_invoc_4.unbox();\n org.junit.Assert.fail(\"genericType_sd810 should have thrown UnsupportedOperationException\");\n } catch (UnsupportedOperationException eee) {\n }\n }", "@Test\n\tpublic void testQuestionType() {\n\t\tquestions.setAuditType(\"Internal\");\n\t\tassertEquals(\"Internal\",questions.getAuditType());\n\t}", "@Test public void testPositive() {\n\t\tassertEquals(expected, new AtMostOne(data).process(getClass()));\n\t}", "@org.junit.Test(timeout = 10000)\n public void annotatedWildcardTypeNameWithExtends_cf28040_failAssert29() {\n // AssertGenerator generate try/catch block with fail statement\n try {\n java.lang.String expected = (\"? extends @\" + (com.squareup.javapoet.AmplAnnotatedTypeNameTest.NN)) + \" java.lang.String\";\n com.squareup.javapoet.TypeName type = com.squareup.javapoet.TypeName.get(java.lang.String.class).annotated(NEVER_NULL);\n java.lang.String actual = com.squareup.javapoet.WildcardTypeName.subtypeOf(type).toString();\n // StatementAdderMethod cloned existing statement\n type.unbox();\n org.junit.Assert.fail(\"annotatedWildcardTypeNameWithExtends_cf28040 should have thrown UnsupportedOperationException\");\n } catch (java.lang.UnsupportedOperationException eee) {\n }\n }", "@org.junit.Test(timeout = 10000)\n public void annotatedWildcardTypeNameWithExtends_cf28013_failAssert23_literalMutation29375_cf35869_failAssert9() {\n // AssertGenerator generate try/catch block with fail statement\n try {\n // AssertGenerator generate try/catch block with fail statement\n try {\n java.lang.String expected = (\"? extends @\" + (com.squareup.javapoet.AmplAnnotatedTypeNameTest.NN)) + \"\";\n // MethodAssertGenerator build local variable\n Object o_4_0 = expected;\n com.squareup.javapoet.TypeName type = com.squareup.javapoet.TypeName.get(java.lang.String.class).annotated(NEVER_NULL);\n java.lang.String actual = com.squareup.javapoet.WildcardTypeName.subtypeOf(type).toString();\n // StatementAdderOnAssert create null value\n java.util.Map<java.lang.reflect.Type, com.squareup.javapoet.TypeVariableName> vc_12422 = (java.util.Map)null;\n // MethodAssertGenerator build local variable\n Object o_14_0 = vc_12422;\n // StatementAdderOnAssert create null value\n java.lang.reflect.Type vc_12420 = (java.lang.reflect.Type)null;\n // StatementAdderOnAssert create null value\n java.util.Map<javax.lang.model.element.TypeParameterElement, com.squareup.javapoet.TypeVariableName> vc_16032 = (java.util.Map)null;\n // StatementAdderOnAssert create null value\n javax.lang.model.type.TypeMirror vc_16030 = (javax.lang.model.type.TypeMirror)null;\n // StatementAdderOnAssert create null value\n com.squareup.javapoet.TypeName vc_16028 = (com.squareup.javapoet.TypeName)null;\n // StatementAdderMethod cloned existing statement\n vc_16028.get(vc_16030, vc_16032);\n // MethodAssertGenerator build local variable\n Object o_26_0 = vc_12420;\n // StatementAdderMethod cloned existing statement\n type.get(vc_12420, vc_12422);\n org.junit.Assert.fail(\"annotatedWildcardTypeNameWithExtends_cf28013 should have thrown IllegalArgumentException\");\n } catch (java.lang.IllegalArgumentException eee) {\n }\n org.junit.Assert.fail(\"annotatedWildcardTypeNameWithExtends_cf28013_failAssert23_literalMutation29375_cf35869 should have thrown NullPointerException\");\n } catch (java.lang.NullPointerException eee) {\n }\n }", "@Test\n public void testAssertObjectIgnoreType() {\n // setup\n final IgnoredType ignoredType = new IgnoredType();\n\n // method\n assertObject(EMPTY_STRING, ignoredType);\n }", "public boolean testModelordraughting(EIfcfillareastyle type) throws SdaiException;", "public void testSetGetSpecialityInvalid() {\r\n\t\tDoctor doctor = new Doctor();\r\n\t\tdoctor.setSpeciality(specialityInvalid);\r\n\t\tassertEquals(specialityInvalid, doctor.getSpeciality());\r\n\t}", "@org.junit.Test(timeout = 10000)\n public void annotatedWildcardTypeNameWithSuper_cf36451_failAssert29_literalMutation37853_cf39954_failAssert14() {\n // AssertGenerator generate try/catch block with fail statement\n try {\n // AssertGenerator generate try/catch block with fail statement\n try {\n java.lang.String expected = (\"? super @\" + (com.squareup.javapoet.AmplAnnotatedTypeNameTest.NN)) + \" java.lang.Sring\";\n // StatementAdderOnAssert create null value\n java.lang.reflect.Type vc_17672 = (java.lang.reflect.Type)null;\n // StatementAdderOnAssert create null value\n com.squareup.javapoet.TypeName vc_17670 = (com.squareup.javapoet.TypeName)null;\n // StatementAdderMethod cloned existing statement\n vc_17670.get(vc_17672);\n // MethodAssertGenerator build local variable\n Object o_10_0 = expected;\n com.squareup.javapoet.TypeName type = com.squareup.javapoet.TypeName.get(java.lang.String.class).annotated(NEVER_NULL);\n java.lang.String actual = com.squareup.javapoet.WildcardTypeName.supertypeOf(type).toString();\n // StatementAdderMethod cloned existing statement\n type.unbox();\n org.junit.Assert.fail(\"annotatedWildcardTypeNameWithSuper_cf36451 should have thrown UnsupportedOperationException\");\n } catch (java.lang.UnsupportedOperationException eee) {\n }\n org.junit.Assert.fail(\"annotatedWildcardTypeNameWithSuper_cf36451_failAssert29_literalMutation37853_cf39954 should have thrown IllegalArgumentException\");\n } catch (java.lang.IllegalArgumentException eee) {\n }\n }", "@Test\n public void testClaimOperPhysFlag() {\n new ClaimFieldTester()\n .verifyEnumFieldStringValueExtractedCorrectly(\n FissClaim.Builder::setOperPhysFlagEnum,\n RdaFissClaim::getOperPhysFlag,\n FissPhysicianFlag.PHYSICIAN_FLAG_NO,\n \"N\")\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissClaim.Builder::setOperPhysFlagUnrecognized,\n RdaFissClaim::getOperPhysFlag,\n RdaFissClaim.Fields.operPhysFlag,\n 1);\n }", "@Override\r\n public OntTestCase[] getTests() {\r\n return new OntTestCase[] {\r\n new OntTestCase( \"Individual.sameAs\", true, false, true, false ) {\r\n /** Note: 6/Nov/2003 - updated to use sameAs not sameIndividualAs, following changes to OWL spec */\r\n @Override\r\n public void ontTest( OntModel m ) throws Exception {\r\n Profile prof = m.getProfile();\r\n OntClass A = m.createClass( NS + \"A\" );\r\n Individual x = m.createIndividual( A );\r\n Individual y = m.createIndividual( A );\r\n Individual z = m.createIndividual( A );\r\n\r\n x.addSameAs( y );\r\n assertEquals( \"Cardinality should be 1\", 1, x.getCardinality( prof.SAME_AS() ) );\r\n assertEquals( \"x should be the same as y\", y, x.getSameAs() );\r\n assertTrue( \"x should be the same as y\", x.isSameAs( y ) );\r\n\r\n x.addSameAs( z );\r\n assertEquals( \"Cardinality should be 2\", 2, x.getCardinality( prof.SAME_AS() ) );\r\n iteratorTest( x.listSameAs(), new Object[] {z,y} );\r\n\r\n x.setSameAs( z );\r\n assertEquals( \"Cardinality should be 1\", 1, x.getCardinality( prof.SAME_AS() ) );\r\n assertEquals( \"x should be same indiv. as z\", z, x.getSameAs() );\r\n\r\n x.removeSameAs( y );\r\n assertEquals( \"Cardinality should be 1\", 1, x.getCardinality( prof.SAME_AS() ) );\r\n x.removeSameAs( z );\r\n assertEquals( \"Cardinality should be 0\", 0, x.getCardinality( prof.SAME_AS() ) );\r\n }\r\n },\r\n\r\n new OntTestCase( \"Individual.hasOntClass\", true, true, true, true ) {\r\n @Override\r\n protected void ontTest( OntModel m ) throws Exception {\r\n OntClass A = m.createClass( NS + \"A\" );\r\n OntClass B = m.createClass( NS + \"B\" );\r\n Individual x = m.createIndividual( A );\r\n\r\n assertTrue( x.hasOntClass( A ) );\r\n assertFalse( x.hasOntClass( B ) );\r\n }\r\n },\r\n\r\n new OntTestCase( \"Individual.hasOntClass direct\", true, true, true, true ) {\r\n @Override\r\n protected void ontTest( OntModel m ) throws Exception {\r\n OntClass A = m.createClass( NS + \"A\" );\r\n OntClass B = m.createClass( NS + \"B\" );\r\n A.addSubClass( B );\r\n\r\n Individual x = m.createIndividual( A );\r\n x.addRDFType( B );\r\n\r\n assertTrue( x.hasOntClass( A, false ) );\r\n assertTrue( x.hasOntClass( B, false ) );\r\n\r\n assertTrue( x.hasOntClass( A, false ) );\r\n assertTrue( x.hasOntClass( B, true ) );\r\n\r\n }\r\n },\r\n\r\n new OntTestCase( \"Individual.hasOntClass string\", true, true, true, true ) {\r\n @Override\r\n protected void ontTest( OntModel m ) throws Exception {\r\n OntClass A = m.createClass( NS + \"A\" );\r\n\r\n Individual x = m.createIndividual( A );\r\n\r\n assertTrue( x.hasOntClass( NS + \"A\" ) );\r\n }\r\n },\r\n\r\n new OntTestCase( \"Individual.getOntClass\", true, true, true, true ) {\r\n @Override\r\n protected void ontTest( OntModel m ) throws Exception {\r\n OntClass A = m.createClass( NS + \"A\" );\r\n Individual x = m.createIndividual( A );\r\n\r\n assertEquals( A, x.getOntClass() );\r\n }\r\n },\r\n\r\n new OntTestCase( \"Individual.getOntClass direct\", true, true, true, true ) {\r\n @Override\r\n protected void ontTest( OntModel m ) throws Exception {\r\n OntClass A = m.createClass( NS + \"A\" );\r\n OntClass B = m.createClass( NS + \"B\" );\r\n A.addSubClass( B );\r\n\r\n Individual x = m.createIndividual( A );\r\n x.addRDFType( B );\r\n\r\n // should never get A since it's not a direct class\r\n assertEquals( B, x.getOntClass( true ) );\r\n }\r\n },\r\n\r\n new OntTestCase( \"Individual.listOntClasses\", true, true, true, true ) {\r\n @Override\r\n protected void ontTest( OntModel m ) throws Exception {\r\n OntClass A = m.createClass( NS + \"A\" );\r\n OntClass B = m.createClass( NS + \"B\" );\r\n A.addSubClass( B );\r\n\r\n Individual x = m.createIndividual( A );\r\n x.addRDFType( B );\r\n\r\n iteratorTest( x.listOntClasses( false ), new Object[] {A,B} );\r\n\r\n // now check the return types\r\n for (Iterator<OntClass> i = x.listOntClasses( false ) ; i.hasNext(); ) {\r\n assertNotNull( i.next() );\r\n }\r\n }\r\n },\r\n\r\n new OntTestCase( \"Individual.listOntClasses direct\", true, true, true, true ) {\r\n @Override\r\n protected void ontTest( OntModel m ) throws Exception {\r\n OntClass A = m.createClass( NS + \"A\" );\r\n OntClass B = m.createClass( NS + \"B\" );\r\n A.addSubClass( B );\r\n\r\n Individual x = m.createIndividual( A );\r\n x.addRDFType( B );\r\n\r\n iteratorTest( x.listOntClasses( true ), new Object[] {B} );\r\n\r\n // now check the return types\r\n for (Iterator<OntClass> i = x.listOntClasses( true ) ; i.hasNext(); ) {\r\n assertNotNull( i.next() );\r\n }\r\n }\r\n },\r\n\r\n new OntTestCase( \"Individual.addOntClass\", true, true, true, true ) {\r\n @Override\r\n protected void ontTest( OntModel m ) throws Exception {\r\n OntClass A = m.createClass( NS + \"A\" );\r\n OntClass B = m.createClass( NS + \"B\" );\r\n A.addSubClass( B );\r\n\r\n Individual x = m.createIndividual( A );\r\n\r\n iteratorTest( x.listOntClasses( false ), new Object[] {A} );\r\n\r\n // add a class\r\n x.addOntClass( B );\r\n\r\n // test again\r\n iteratorTest( x.listOntClasses( false ), new Object[] {A,B} );\r\n for (Iterator<OntClass> i = x.listOntClasses( false ) ; i.hasNext(); ) {\r\n assertNotNull( i.next() );\r\n }\r\n }\r\n },\r\n\r\n new OntTestCase( \"Individual.setOntClass\", true, true, true, true ) {\r\n @Override\r\n protected void ontTest( OntModel m ) throws Exception {\r\n OntClass A = m.createClass( NS + \"A\" );\r\n OntClass B = m.createClass( NS + \"B\" );\r\n A.addSubClass( B );\r\n\r\n Individual x = m.createIndividual( A );\r\n\r\n iteratorTest( x.listOntClasses( false ), new Object[] {A} );\r\n\r\n // replace the class\r\n x.setOntClass( B );\r\n\r\n // test again\r\n iteratorTest( x.listOntClasses( false ), new Object[] {B} );\r\n for (Iterator<OntClass> i = x.listOntClasses( false ) ; i.hasNext(); ) {\r\n assertNotNull( i.next() );\r\n }\r\n }\r\n },\r\n\r\n new OntTestCase( \"Individual.removeOntClass\", true, true, true, true ) {\r\n @Override\r\n protected void ontTest( OntModel m ) throws Exception {\r\n OntClass A = m.createClass( NS + \"A\" );\r\n OntClass B = m.createClass( NS + \"B\" );\r\n\r\n Individual x = m.createIndividual( A );\r\n x.addOntClass( B );\r\n\r\n iteratorTest( x.listOntClasses( false ), new Object[] {A,B} );\r\n\r\n x.removeOntClass( A );\r\n iteratorTest( x.listOntClasses( false ), new Object[] {B} );\r\n\r\n x.removeOntClass( A );\r\n iteratorTest( x.listOntClasses( false ), new Object[] {B} );\r\n\r\n x.removeOntClass( B );\r\n iteratorTest( x.listOntClasses( false ), new Object[] {} );\r\n }\r\n },\r\n };\r\n }", "@Test\n void cannotInferType() {\n }", "@Test\n public void testSetTypeOccupiedSquare()\n {\n try\n {\n Square s = new Square();\n\n s.setTile(Tile.T);\n s.setType(Square.squareType.DB_WORD);\n\n fail(\"An occupied square should not have a special type.\");\n }\n catch(Exception ex)\n {\n assertEquals(\"A Square cannot have a tile on it and have a special type.\", ex.getMessage());\n }\n }", "@Override\n\tpublic boolean isObjectTypeExpected() {\n\t\treturn false;\n\t}", "public void test_getTypedValues_accuracy() {\n instance.addTypedValue(typedValue);\n assertEquals(\"TypedValue got incorrectly\", 1, instance.getTypedValues().size());\n }", "private void usual() {\n try {\n //testing toString\n assertTrue(\"toString0\",\n f0.toString().equals(\"{...(0 elements)...}\"));\n assertTrue(\"toString1\",\n f1.toString().equals(\"{...(1 elements)...}\"));\n assertTrue(\"toString7\",\n f7.toString().equals(\"{...(2 elements)...}\"));\n\n //testing equals\n\n assertTrue(\"equals00\", f0.equals(f0));\n assertTrue(\"equals33\", f3.equals(f3));\n assertTrue(\"equals55\", f5.equals(f5));\n assertTrue(\"equals46\", f4.equals(f6));\n assertTrue(\"equals64\", f6.equals(f4));\n assertTrue(\"equals27\", f2.equals(f7));\n assertTrue(\"equals72\", f7.equals(f2));\n\n assertFalse(\"equals01\", f0.equals(f1));\n assertFalse(\"equals02\", f0.equals(f2));\n assertFalse(\"equals10\", f1.equals(f0));\n assertFalse(\"equals12\", f1.equals(f2));\n assertFalse(\"equals21\", f2.equals(f1));\n assertFalse(\"equals23\", f2.equals(f3));\n assertFalse(\"equals35\", f3.equals(f5));\n\n assertFalse(\"equals0string\", f0.equals(\"just a string\"));\n assertFalse(\"equals4string\", f4.equals(\"just a string\"));\n\n assertFalse(\"equals0null\", f0.equals(null));\n assertFalse(\"equals1null\", f1.equals(null));\n\n //testing hashCode\n assertTrue(\"hashCode00\", f0.hashCode() == f0.hashCode());\n assertTrue(\"hashCode44\", f4.hashCode() == f4.hashCode());\n assertTrue(\"hashCode46\", f4.hashCode() == f6.hashCode());\n assertTrue(\"hashCode27\", f2.hashCode() == f7.hashCode());\n }\n catch(Exception e) {\n System.out.println(\"Exception thrown during usual tests:\");\n System.out.println(e);\n assertTrue(\"usual\", false);\n }\n }", "@Test(timeout = 10000)\n public void genericType_sd798_failAssert0() throws Exception {\n // AssertGenerator generate try/catch block with fail statement\n try {\n Method recursiveEnum = getClass().getDeclaredMethod(\"generic\", Enum[].class);\n TypeName.get(recursiveEnum.getReturnType());\n TypeName.get(recursiveEnum.getGenericReturnType());\n TypeName genericTypeName = TypeName.get(recursiveEnum.getParameterTypes()[0]);\n TypeName.get(recursiveEnum.getGenericParameterTypes()[0]);\n // StatementAdd: add invocation of a method\n genericTypeName.unbox();\n org.junit.Assert.fail(\"genericType_sd798 should have thrown UnsupportedOperationException\");\n } catch (UnsupportedOperationException eee) {\n }\n }", "abstract protected boolean checkType(String myType);", "@Test\n public void getItemType () {\n Assert.assertEquals(\"SPECIAL\", bomb.getItemType().name());\n }", "@Test(timeout = 10000)\n public void genericType_sd834_failAssert3() throws Exception {\n // AssertGenerator generate try/catch block with fail statement\n try {\n Method recursiveEnum = getClass().getDeclaredMethod(\"generic\", Enum[].class);\n TypeName.get(recursiveEnum.getReturnType());\n TypeName.get(recursiveEnum.getGenericReturnType());\n TypeName genericTypeName = TypeName.get(recursiveEnum.getParameterTypes()[0]);\n // StatementAdd: generate variable from return value\n TypeName __DSPOT_invoc_11 = TypeName.get(recursiveEnum.getGenericParameterTypes()[0]);\n // StatementAdd: add invocation of a method\n __DSPOT_invoc_11.unbox();\n org.junit.Assert.fail(\"genericType_sd834 should have thrown UnsupportedOperationException\");\n } catch (UnsupportedOperationException eee) {\n }\n }", "public boolean getSpecial() {\n return isSpecial;\n }", "@Override\n\tpublic boolean test() {\n\t\treturn false;\n\t}", "@Ignore\n @Test\n public void discoverSeveralTypes() throws Exception {\n }", "@Test\n public void testAdd_GenericType_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n instance.add(1);\n instance.add(2);\n\n boolean expResult = true;\n boolean result = instance.add(3);\n assertEquals(expResult, result);\n }", "boolean replacementfor(Type o);", "@Test(description = \"positive test to change from all types to multiple types\")\n public void positiveTestChangeFromTypeAll()\n throws Exception\n {\n new RelationshipData(this, \"Test\")\n .from().defDataAll(\"type\")\n .create();\n\n new RelationshipData(this, \"Test\")\n .from().defData(\"type\", new TypeData(this, \"Test1\"))\n .from().defData(\"type\", new TypeData(this, \"Test2\"))\n .createDependings()\n .update(\"\")\n .checkExport();\n }", "@Override public byte isBitShape(Type t) { throw AA.unimpl(); }", "@Override\n\tpublic void test(T1 t) {\n\t\t\n\t}", "@Test\n public void shouldNotBeAbleToInputSpecialCharactersInAmountOwedOnTradeField() {\n }", "@Test(description = \"negative test if the kind is changed back to basic\")\n public void t22b_negativeTestChangeKindBackToBasic()\n throws Exception\n {\n this.createNewData(\"Test\")\n .setFlag(\"preventduplicates\", true)\n .from().defSingle(\"cardinality\", \"one\")\n .from().defFlag(\"propagateconnection\", false)\n .to().defSingle(\"clone\", \"replicate\")\n .to().defSingle(\"revision\", \"replicate\")\n .to().defFlag(\"propagateconnection\", false)\n .create();\n this.createNewData(\"Test\")\n .setFlag(\"preventduplicates\", true)\n .from().defSingle(\"cardinality\", \"one\")\n .from().defFlag(\"propagateconnection\", false)\n .to().defSingle(\"clone\", \"replicate\")\n .to().defSingle(\"revision\", \"replicate\")\n .to().defFlag(\"propagateconnection\", false)\n .setSingle(\"kind\", \"compositional\")\n .update(\"\")\n .checkExport();\n this.createNewData(\"Test\")\n .setFlag(\"preventduplicates\", true)\n .from().defSingle(\"cardinality\", \"one\")\n .from().defFlag(\"propagateconnection\", false)\n .to().defSingle(\"clone\", \"replicate\")\n .to().defSingle(\"revision\", \"replicate\")\n .to().defFlag(\"propagateconnection\", false)\n .setSingle(\"kind\", \"basic\")\n .failureUpdate(ErrorKey.DM_RELATION_NOT_BASIC_KIND);\n this.createNewData(\"Test\")\n .setFlag(\"preventduplicates\", true)\n .from().defSingle(\"cardinality\", \"one\")\n .from().defFlag(\"propagateconnection\", false)\n .to().defSingle(\"clone\", \"replicate\")\n .to().defSingle(\"revision\", \"replicate\")\n .to().defFlag(\"propagateconnection\", false)\n .setSingle(\"kind\", \"compositional\")\n .checkExport();\n }", "@Test\n public void reqTypeTest() {\n // TODO: test reqType\n }", "@Override\n @Test\n public void testQuery_invalidAdvancedRankingWithChildrenRankingSignals() throws Exception { }", "@org.junit.Test(timeout = 10000)\n public void annotatedWildcardTypeNameWithExtends_cf28009_failAssert22() {\n // AssertGenerator generate try/catch block with fail statement\n try {\n java.lang.String expected = (\"? extends @\" + (com.squareup.javapoet.AmplAnnotatedTypeNameTest.NN)) + \" java.lang.String\";\n com.squareup.javapoet.TypeName type = com.squareup.javapoet.TypeName.get(java.lang.String.class).annotated(NEVER_NULL);\n java.lang.String actual = com.squareup.javapoet.WildcardTypeName.subtypeOf(type).toString();\n // StatementAdderOnAssert create null value\n java.util.Map<java.lang.reflect.Type, com.squareup.javapoet.TypeVariableName> vc_12422 = (java.util.Map)null;\n // StatementAdderOnAssert create null value\n java.lang.reflect.Type vc_12420 = (java.lang.reflect.Type)null;\n // StatementAdderOnAssert create null value\n com.squareup.javapoet.TypeName vc_12418 = (com.squareup.javapoet.TypeName)null;\n // StatementAdderMethod cloned existing statement\n vc_12418.get(vc_12420, vc_12422);\n org.junit.Assert.fail(\"annotatedWildcardTypeNameWithExtends_cf28009 should have thrown IllegalArgumentException\");\n } catch (java.lang.IllegalArgumentException eee) {\n }\n }", "public void testNormalInheritance()\r\n throws Exception\r\n {\r\n try\r\n {\r\n SCOMapTests.checkValueInheritance(pmf,\r\n HashMap1.class,\r\n ContainerItem.class,\r\n ContainerItemChild.class);\r\n }\r\n finally\r\n {\r\n clean(HashMap1.class);\r\n clean(ContainerItem.class);\r\n }\r\n }", "@Test\n public void testSupertypeOutputTypes() throws Exception {\n // InterfaceContract source = new MockContract(\"FooContract\");\n // DataType sourceOutputType = new DataTypeImpl<Type>(Object.class,\n // Object.class);\n // Operation opSource1 = newOperationImpl(\"op1\", null,\n // sourceOutputType, null, false, null);\n // Map<String, Operation> sourceOperations = new HashMap<String,\n // Operation>();\n // sourceOperations.put(\"op1\", opSource1);\n // source.getInterface().getOperations().addAll(sourceOperations.values());\n //\n // InterfaceContract target = new MockContract(\"FooContract\");\n // DataType targetOutputType = new DataTypeImpl<Type>(String.class,\n // String.class);\n // Operation opTarget = newOperationImpl(\"op1\", null, targetOutputType,\n // null, false, null);\n // Map<String, Operation> targetOperations = new HashMap<String,\n // Operation>();\n // targetOperations.put(\"op1\", opTarget);\n // target.getInterface().getOperations().addAll(targetOperations.values());\n // wireService.checkCompatibility(source, target, false);\n }", "public void checkNotPolymorphicOrUnknown() {\n if (isPolymorphic())\n throw new AnalysisException(\"Unexpected polymorphic value!\");\n if (isUnknown())\n throw new AnalysisException(\"Unexpected 'unknown' value!\");\n }", "@Test\n public void testGetType() {\n// CarType expected = CarType.SUV;\n \n }", "@Test(description = \"positive test to change from multiple types to all types\")\n public void positiveTestChangeToTypeAll()\n throws Exception\n {\n new RelationshipData(this, \"Test\")\n .from().defData(\"type\", new TypeData(this, \"Test1\"))\n .from().defData(\"type\", new TypeData(this, \"Test2\"))\n .create();\n\n new RelationshipData(this, \"Test\")\n .from().defDataAll(\"type\")\n .update(\"\")\n .checkExport();\n }", "@Test\n public void testProgramElementsType() {\n // TODO: test ProgramElementsType\n }", "@org.junit.Test(timeout = 10000)\n public void annotatedWildcardTypeNameWithExtends_cf28027_failAssert26_literalMutation29405() {\n // AssertGenerator generate try/catch block with fail statement\n try {\n java.lang.String expected = (\"? e{xtends @\" + (com.squareup.javapoet.AmplAnnotatedTypeNameTest.NN)) + \" java.lang.String\";\n // AssertGenerator add assertion\n org.junit.Assert.assertEquals(expected, \"? e{xtends @com.squareup.javapoet.AmplAnnotatedTypeNameTest.NeverNull java.lang.String\");\n com.squareup.javapoet.TypeName type = com.squareup.javapoet.TypeName.get(java.lang.String.class).annotated(NEVER_NULL);\n java.lang.String actual = com.squareup.javapoet.WildcardTypeName.subtypeOf(type).toString();\n // StatementAdderOnAssert create null value\n java.util.Map<javax.lang.model.element.TypeParameterElement, com.squareup.javapoet.TypeVariableName> vc_12432 = (java.util.Map)null;\n // AssertGenerator add assertion\n org.junit.Assert.assertNull(vc_12432);\n // StatementAdderOnAssert create null value\n javax.lang.model.type.TypeMirror vc_12430 = (javax.lang.model.type.TypeMirror)null;\n // AssertGenerator add assertion\n org.junit.Assert.assertNull(vc_12430);\n // StatementAdderOnAssert create null value\n com.squareup.javapoet.TypeName vc_12428 = (com.squareup.javapoet.TypeName)null;\n // AssertGenerator add assertion\n org.junit.Assert.assertNull(vc_12428);\n // StatementAdderMethod cloned existing statement\n vc_12428.get(vc_12430, vc_12432);\n org.junit.Assert.fail(\"annotatedWildcardTypeNameWithExtends_cf28027 should have thrown NullPointerException\");\n } catch (java.lang.NullPointerException eee) {\n }\n }", "public void test_clearTypedValues_accuracy() {\n instance.addTypedValue(typedValue);\n assertTrue(\"The TypedValue is not added properly.\", instance.containsTypedValue(typedValue));\n\n instance.clearTypedValues();\n assertFalse(\"The TypedValue is not removed properly.\", instance.containsTypedValue(typedValue));\n }", "public interface MagicType extends Type {\n\n\t/**\n\t * Given that we are a type specified in a replacement rule (e.g. a Var or\n\t * Atom), can we consume a submatch of the given type in the match?\n\t *\n\t * Alternatively, we could have overriden .equals().\n\t */\n\tboolean replacementfor(Type o);\n}", "@Test\n\tpublic void testPrimitives() throws Exception {\n\t\ttestWith(TestClassWithPrimitives.getInstance());\n\t}", "@Test\n public void testAllScalarTypes() throws Exception {\n runTestAndValidate(TestParquetWriter.allTypesSelection, \"*\", allTypesTable, \"donuts_json\");\n try {\n // read all of the types with the complex reader\n BaseTestQuery.alterSession(PARQUET_NEW_RECORD_READER, true);\n runTestAndValidate(TestParquetWriter.allTypesSelection, \"*\", allTypesTable, \"donuts_json\");\n } finally {\n BaseTestQuery.resetSessionOption(PARQUET_NEW_RECORD_READER);\n }\n }", "public void testMisc()\n throws XMLStreamException\n {\n WstxInputProperties fooin = new WstxInputProperties();\n WstxOutputProperties fooout = new WstxOutputProperties();\n \n // These just to keep compilers/FindBugs etc happy\n assertNotNull(fooin);\n assertNotNull(fooout);\n }", "@Test(timeout = 10000)\n public void equalsAndHashCodeTypeVariableName_sd7_sd119_failAssert0() {\n // AssertGenerator generate try/catch block with fail statement\n try {\n TypeVariableName.get(Object.class);\n TypeVariableName.get(Object.class);\n TypeVariableName typeVar1 = TypeVariableName.get(\"T\", Comparator.class, Serializable.class);\n TypeVariableName typeVar2 = TypeVariableName.get(\"T\", Comparator.class, Serializable.class);\n // StatementAdd: generate variable from return value\n TypeName __DSPOT_invoc_9 = // StatementAdd: add invocation of a method\n typeVar1.withoutAnnotations();\n // StatementAdd: add invocation of a method\n __DSPOT_invoc_9.unbox();\n org.junit.Assert.fail(\"equalsAndHashCodeTypeVariableName_sd7_sd119 should have thrown UnsupportedOperationException\");\n } catch (UnsupportedOperationException eee) {\n }\n }", "@Test\n public void testOpenGraphAlternateObjectTypes() throws IOException, ExtractionException, RepositoryException {\n assertExtract(\"/html/rdfa/opengraph-music-song-object-type.html\");\n logger.debug(dumpHumanReadableTriples());\n\n Assert.assertEquals(9, getStatementsSize(null, null, null));\n final OGPMusic vOGPMusic = OGPMusic.getInstance();\n assertContains(baseIRI, vOGPMusic.musicDuration, RDFUtils.literal(\"447\"));\n assertContains(baseIRI, vOGPMusic.musicMusician,\n RDFUtils.literal(\"Jono Grant / Tony McGuinness / Ashley Tomberlin\"));\n assertContains(baseIRI, vOGPMusic.musicAlbum, RDFUtils.literal(\"Tri-State\"));\n }", "@Test\n public void testGetType()\n {\n when(m_AttributeModel.getType()).thenReturn(AttributeDefinition.STRING);\n m_SUT = new ConfigPropModelImpl(m_AttributeModel);\n assertThat(m_SUT.getType(), is((Object)String.class));\n \n when(m_AttributeModel.getType()).thenReturn(AttributeDefinition.LONG);\n m_SUT = new ConfigPropModelImpl(m_AttributeModel);\n assertThat(m_SUT.getType(), is((Object)Long.class));\n \n when(m_AttributeModel.getType()).thenReturn(AttributeDefinition.INTEGER);\n m_SUT = new ConfigPropModelImpl(m_AttributeModel);\n assertThat(m_SUT.getType(), is((Object)Integer.class));\n \n when(m_AttributeModel.getType()).thenReturn(AttributeDefinition.SHORT);\n m_SUT = new ConfigPropModelImpl(m_AttributeModel);\n assertThat(m_SUT.getType(), is((Object)Short.class));\n \n when(m_AttributeModel.getType()).thenReturn(AttributeDefinition.CHARACTER);\n m_SUT = new ConfigPropModelImpl(m_AttributeModel);\n assertThat(m_SUT.getType(), is((Object)Character.class));\n \n when(m_AttributeModel.getType()).thenReturn(AttributeDefinition.BYTE);\n m_SUT = new ConfigPropModelImpl(m_AttributeModel);\n assertThat(m_SUT.getType(), is((Object)Byte.class));\n \n when(m_AttributeModel.getType()).thenReturn(AttributeDefinition.DOUBLE);\n m_SUT = new ConfigPropModelImpl(m_AttributeModel);\n assertThat(m_SUT.getType(), is((Object)Double.class));\n \n when(m_AttributeModel.getType()).thenReturn(AttributeDefinition.FLOAT);\n m_SUT = new ConfigPropModelImpl(m_AttributeModel);\n assertThat(m_SUT.getType(), is((Object)Float.class));\n \n when(m_AttributeModel.getType()).thenReturn(AttributeDefinition.BOOLEAN);\n m_SUT = new ConfigPropModelImpl(m_AttributeModel);\n assertThat(m_SUT.getType(), is((Object)Boolean.class));\n }", "@Test\n public void recordTypeTest() {\n // TODO: test recordType\n }", "boolean isValidAndHandleSpecial(String title) {\n\t\tif (skipReportElement) {\n\t\t\tskipReportElement = false;\n\t\t\treturn false;\n\t\t}\n\n\t\tswitch (elementData) {\n\t\tcase NONE:\n\t\t\tbreak;\n\t\tcase CLASS_DOC:\n\t\t\ttest.addProperty(\"Class Documentation\", title);\n\t\t\ttest.setDescription(title);\n\t\t\telementData = NONE;\n\t\t\treturn false;\n\t\tcase TEST_DOC:\n\t\t\ttest.addProperty(\"Test Documentation\", title);\n\t\t\ttest.setDescription(title);\n\t\t\telementData = NONE;\n\t\t\treturn false;\n\t\tcase USER_DOC:\n\t\t\ttest.addProperty(\"User Documentation\", title);\n\t\t\ttest.setDescription(title);\n\t\t\telementData = NONE;\n\t\t\treturn false;\n\t\tcase TEST_BREADCUMBS:\n\t\t\ttest.addProperty(\"Breadcrumb\", title.replace(\"</span>\", \"\"));\n\t\t\telementData = NONE;\n\t\t\t// This also closes the span\n\t\t\tspanTrace--;\n\t\t\treturn false;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\tif (StringUtils.isEmpty(title)) {\n\t\t\treturn false;\n\t\t}\n\t\tif (title.contains(SPAN_OPEN_TAG)) {\n\t\t\t// ITAI: This is a ugly hack, When we execute from the IDE there\n\t\t\t// is a missing span close tag, so we\n\t\t\t// Never increase the number of the span trace above one.\n\t\t\tif (!(JSystemProperties.getInstance().isExecutedFromIDE() && spanTrace == 1)) {\n\t\t\t\tspanTrace++;\n\t\t\t}\n\t\t}\n\t\tif (spanTrace > 0) {\n\t\t\t// In span, let's search for that special elements\n\t\t\tswitch (title) {\n\t\t\tcase SPAN_OPEN_CLASS_DOC_TAG:\n\t\t\t\telementData = CLASS_DOC;\n\t\t\t\tskipReportElement = true;\n\t\t\t\tbreak;\n\t\t\tcase SPAN_OPEN_TEST_DOC_TAG:\n\t\t\t\telementData = TEST_DOC;\n\t\t\t\tskipReportElement = true;\n\t\t\t\tbreak;\n\t\t\tcase SPAN_OPEN_USER_DOC_TAG:\n\t\t\t\telementData = USER_DOC;\n\t\t\t\tskipReportElement = true;\n\t\t\t\tbreak;\n\t\t\tcase SPAN_OPEN_BREADCRUMBS_TAG:\n\t\t\t\telementData = TEST_BREADCUMBS;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (title.contains(SPAN_CLOSE_TAG)) {\n\t\t\tspanTrace--;\n\t\t\treturn false;\n\t\t}\n\n\t\t// ITAI: When running from the IDE, there are missing span closing\n\t\t// tags, so we do not increase the span trace after level one. The\n\t\t// result is that the span trace may have a negative value\n\t\treturn spanTrace <= 0;\n\t}", "@Override\r\n\tpublic void specialAbility() {\n\t}", "public final boolean isSpecialForm ()\r\n {\r\n return _value.isSpecialForm();\r\n }", "@Test\n public void categoryFitsTypeTest() {\n final Category cardio = Category.CARDIO;\n final Type endurance = Type.ENDURANCE;\n final Type strength = Type.STRENGTH;\n\n assertEquals(\"Cardio category of Endurance Type\", cardio.getType(), endurance);\n assertNotEquals(\"Cardio category is not of Strength Type\", cardio.getType(), strength);\n }", "@Test(timeout = 4000)\n public void test04() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n TechnicalInformation technicalInformation0 = lovinsStemmer0.getTechnicalInformation();\n assertFalse(technicalInformation0.hasAdditional());\n }", "@Test\n public void test_cast() {\n \n\n }", "@Test\n public void Test13_1() {\n component = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 3, 40);\n DamageEffectComponent another = new DamageEffectComponent(EffectEnum.DAMAGE_DEBUFF, 3, -40);\n // Then test the method\n assertFalse(component.equals(another));\n }" ]
[ "0.6192956", "0.6081988", "0.60334617", "0.59919035", "0.5951531", "0.5910116", "0.58766496", "0.5836601", "0.574167", "0.574167", "0.574167", "0.57410717", "0.5739497", "0.5711926", "0.5711926", "0.5668679", "0.56559736", "0.5655488", "0.56434935", "0.5629942", "0.56105125", "0.56056285", "0.5595015", "0.5583399", "0.5579763", "0.5542631", "0.5540374", "0.5506077", "0.54774284", "0.54774165", "0.5476689", "0.54742944", "0.54502773", "0.54499465", "0.543236", "0.54273605", "0.5422868", "0.5414753", "0.5414054", "0.5413768", "0.53955746", "0.53953344", "0.5394932", "0.5394236", "0.5389879", "0.53830945", "0.538179", "0.53722554", "0.5360799", "0.5360728", "0.534518", "0.5316492", "0.5313659", "0.531365", "0.53038067", "0.5303446", "0.53013957", "0.5300395", "0.52990884", "0.5296398", "0.52940977", "0.52931106", "0.52905136", "0.52880275", "0.52852976", "0.5281029", "0.52755845", "0.52700216", "0.52664304", "0.5264572", "0.52616876", "0.52611274", "0.52590734", "0.5251167", "0.52459717", "0.5244491", "0.5242342", "0.5236235", "0.52319205", "0.52300656", "0.5220899", "0.5219163", "0.5217923", "0.5216203", "0.520815", "0.52038795", "0.52031887", "0.51998246", "0.51972187", "0.5196532", "0.519256", "0.5186496", "0.51818824", "0.5178808", "0.5178651", "0.5177931", "0.5177374", "0.51771694", "0.5175286", "0.5168371" ]
0.7325777
0
Stack s2 = new Stack();
void enqueue(int value) { s1.push(value); size++; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public MinStack2() {\n stack1 = new Stack<>();\n stack2 = new Stack<>();\n }", "public MinStack1() {\r\n stack = new Stack<>();\r\n }", "public MyStack() {\n\n }", "public MinStack() {\r\n stk = new Stack<>();\r\n stk1 = new Stack<>();\r\n }", "public MinStack2() {\n stack = new Stack<>();\n minStack = new Stack<>();\n }", "public Stack() {}", "public Solution_155() {\n stack = new Stack();\n minStack = new Stack();\n }", "public Stack() { \ntop = null; \n//A constructor to initialize top \n//The answer to (iii)\n}", "MyStack(){\r\n\t\tsuper();\r\n\t}", "public Stack() {\n stack = new LinkedList();\n }", "public MinStack() {\n st = new Stack<>();\n }", "public MyStack(){\n\ta = new String[10];\n\ttop = -1;\n }", "public MinStack2() {\r\n\t\t\tdata = new Stack<>();\r\n\t\t\thelper = new Stack<>();\r\n\t\t}", "public Stack()\n {\n first = null;\n }", "public MyStack() {\n\n }", "@Test\n public void testPrintStack() {\n System.out.println(\"printStack\");\n Stack2 instance = new Stack2();\n instance.push(2);\n instance.push(4);\n instance.push(5);\n int temp = instance.pop();\n instance.printStack();\n }", "public MyQueue() {\n s1 = new Stack<>();\n s2 = new Stack<>();\n }", "public MyStack() {\r\n stack = new LinkedList<>();\r\n }", "public MyStack() {\n One = new LinkedList<>();\n Two = new LinkedList<>();\n }", "public OpStack() {\n opStack = new Stack();\n }", "public MyStack() {\n q1 = new LinkedList();\n q2 = new LinkedList();\n }", "public MinStack2() {\n\n }", "public MyStack() {\n list = new LinkedList<>();\n list2 = new LinkedList<>();\n }", "public MyQueue() {\n s1 = new Stack<Integer>();\n s2 = new Stack<Integer>();\n }", "public MinValueStack(){\r\n stack1 = new Stack<T>();\r\n stack2 = new Stack<T>();\r\n size = 0;\r\n }", "public MyStack2() {\n q1 = new ArrayDeque<>();\n q2 = new ArrayDeque<>();\n }", "public Stack() {\r\n first = null;\r\n N = 0;\r\n }", "public MinStack() {\n\n }", "public MinStack() {\n\n }", "public SolutionStack()\n {\n stack = new ArrayList<ILocation>(0);\n top = 0;\n }", "public MyStack() {\n q1= new LinkedList();\n q2= new LinkedList();\n }", "public Stack() {\n stack = new Object[1];\n minStackSize = 1;\n top = -1;\n }", "public Stack() {\n \tstack = new ArrayList<T>();\n }", "public Stack() {\n\t\t \n\t\ttop = null;\n\t}", "public MyStack2() {\n queue = new LinkedList<Integer>();\n }", "public Stacked(){\n count = 0;\n stackArray = (E[]) new Object[START_CAP];\n }", "public MinStack() {\n }", "public Solution67() {\n stack = new Stack<>();\n min_stack = new Stack<>();\n }", "public MyStack() {\n queue1=new LinkedList();\n queue2=new LinkedList();\n }", "public QueueUsingTwoStacks() \n {\n stack1 = new Stack<Item>();\n stack2 = new Stack<Item>();\n }", "public StackImpl() {\r\n\t\t\r\n\t}", "public MinStack1() {\n\n }", "public ArrayStack(){\r\n\t\tstack= new Object[DEFAULT_SIZE];\r\n\t\t}", "public MinStack() {\n mainstack = new Stack<Integer>();\n secondaryminstack = new Stack<Integer>();\n }", "public MyStack() {\n objects = new LinkedList<>();\n helper = new LinkedList<>();\n }", "public DSAStack()\n {\n stack = new DSALinkedList<E>();\n }", "public Leetcode232() {\n mStack1 = new LinkedList<>();\n mStack2 = new LinkedList<>();\n }", "public StackPushSingle()\n {\n super(\"PushStackSingle\");\n }", "public Stack(Stack stk){\n this(stk.getStack());\n }", "public StackClass() {\n \tsize=0;\n\t}", "public MinStack() {\n sort = new Stack<>();\n stack = new Stack<>();\n }", "public MyQueue() { //使用两个栈\n temp1 = new Stack<>();\n temp2 = new Stack<>();\n }", "public MyQueue1() {\n storeStack = new Stack<>();\n }", "public MinStack() {\n stack = new Stack<>();\n minStack = new Stack<>();\n }", "public MinStack() {\n stack = new Stack<Integer>();\n minStack = new Stack<Integer>();\n }", "public MyQueue2() {\n storeStack = new Stack<>();\n }", "public Stack()\n {\n ll = new LinkedList<>();\n }", "public TwoStaImpQue() {\n this.stack1 = new Stack<>();\n this.stack2 = new Stack<>();\n }", "public MyStack() {\n\t q=new LinkedList<Integer>();\n\t }", "public LinkedStack() {\n top = null;\n }", "public MyStack() {\n this.queue=new LinkedList<Integer>();\n }", "public MinStack() {\r\n\t\t}", "public MyStack() {\n \tlist = new ArrayList<Integer>();\n }", "public static void main(String[] args) {\r\n\t\tStack <Integer> s=new Stack<>();//Stack s=new Stack();\r\n\t\ts.push(12);\r\n\t\ts.push(32);\r\n\t\ts.push(62);\r\n\t\ts.push(72);\r\n\t\tSystem.out.println(s.pop());\r\n\t\tSystem.out.println(s.pop());\r\n\t\tSystem.out.println(s.pop());\r\n\t\t\r\n\t\tStack <String> s2=new Stack<>();\r\n\t\ts2.push(\"h\");\r\n\t\ts2.push(\"o\");\r\n\t\ts2.push(\"l\");\r\n\t\ts2.push(\"a\");\r\n\t\tSystem.out.println(s2.pop());\r\n\t\tSystem.out.println(s2.pop());\r\n\t\tSystem.out.println(s2.pop());\r\n\r\n\t\t\r\n\t}", "public Stack()\n\t{\n\t\tlist = new LinkedList<T>();\n\t}", "public MinStack() {\n sdata = new Stack<Integer>();\n smin = new Stack<Integer>();\n }", "public StringStack()\n\t{\n\t\ttop = null;\n\t}", "@SubL(source = \"cycl/stacks.lisp\", position = 1818) \n public static final SubLObject create_stack() {\n return clear_stack(make_stack(UNPROVIDED));\n }", "public LinkedStack() {\n first = null;\n n = 0;\n }", "@Test\n public void testSingleStack() {\n ProgramStack ps = new ProgramStack();\n\n ps.push(1);\n\n Assert.assertEquals(\"[1]\", ps.toString());\n }", "ArrayStack() {\r\n\t\tstack = new int[10];\r\n\t\ttop = 0;\r\n\t}", "public MyStack() {\n queue = new LinkedList<>();\n }", "public MinStack() {\r\n list = new LinkedList();\r\n }", "public Stack() {\n /*\n * Constructor\n * This function is an initializer for this class.\n */\n top = null;\n sz = 0;\n }", "public LC155_MinStack2() {\n\t\tdata = new Stack<Long>();\n\t}", "public Stack() {\r\n this(20);\r\n }", "public MyQueue() {\n stk1 = new Stack<>();\n stk2 = new Stack<>();\n }", "public void pushStack(int newStack){\n // creates a new object\n GenericStack temp = new GenericStack(newStack);\n temp.next = top;\n top = temp;\n }", "public MinStack() {\r\n stack=new Stack<>();\r\n minstack=new Stack<>();\r\n map=new HashMap<>();\r\n }", "public MyStack() {\n root=new ListNode(0);\n p =root;\n }", "public MinStack() {\n data = new Stack();\n min = new Stack();\n }", "public GetMinStack() {\n stackData = new Stack<>();\n stackMin = new Stack<>();\n }", "public MinStack() {\n dataStack=new Stack<>();\n minStack=new Stack<>();\n }", "public static void main(String[] args) {\n// System.out.println(\"as.getSize() == \" + as.getSize());\n// as.pop();\n// System.out.println(\"as.pop() == \" + as);\n// System.out.println(\"as.peek() == \" + as.peek());\n// as.push(\"17\");\n// System.out.println(as);\n\n LinkedListStack<Integer> stack = new LinkedListStack<>();\n\n for(int i = 0 ; i < 5 ; i ++){\n stack.push(i);\n System.out.println(stack);\n }\n\n stack.pop();\n System.out.println(stack);\n\n }", "public MinStack() {\n stack = new Stack<IntMinPair>();\n }", "@Test\n public void testTop() {\n System.out.println(\"top\");\n Stack2 instance = new Stack2();\n int expResult = 7;\n instance.push(7);\n int result = instance.top();\n assertEquals(expResult, result);\n }", "public MyStack() {\n queue = new LinkedList<>();\n forReverse = new LinkedList<>();\n }", "public static void main(String[] args) {\n\r\n\r\n\r\n\t\tPerson p1 = new Person(\"1\", \"Nishant\");\r\n\t\tPerson p2 = new Person(\"2\", \"Nikhil\");\r\n\t\t\r\n\t\tPersonStack ps = new PersonStack();\r\n\t\t\r\n\t\tps.push(p1);\r\n\t\tps.push(p2);\r\n\t\t\r\n\t\tSystem.out.println(ps.pop().toString());\r\n\t\tSystem.out.println(ps.pop().toString());\r\n\t\t\r\n\r\n\t}", "public MyStack() {\n @SuppressWarnings(\"unchecked\")\n T[] newStack = (T[]) new Object[DEFAULT_STACK_SIZE];\n stackArray = newStack;\n stackSize = 0;\n }", "Stack_Using_Arrays(){\n\t\ttop=-1;\n\t}", "public MinStack() {\n s1 = new ArrayDeque<>();\n s2 = new ArrayDeque<>();\n min = Integer.MAX_VALUE;\n }", "public MinStack() {\n minList = new LinkedList<>();\n numStack = new Stack<>();\n }", "@Test\n public void testPush() {\n System.out.println(\"push\");\n int number = 5;\n Stack2 instance = new Stack2();\n instance.push(number);\n assertEquals(instance.array[0], number);\n }", "public MyStack() {\n this.q = new LinkedList<>();\n }", "@Test\n public void testPop() {\n System.out.println(\"pop\");\n Stack2 instance = new Stack2();\n int expResult = 3;\n instance.push(1);\n instance.push(2);\n instance.push(expResult);\n int result = instance.pop();\n assertEquals(expResult, result);\n }", "public LinkStack() {\n size = 0;\n top = null;\n }", "public StackInterface Stack() { return mStack; }", "public LinkedStack() {\r\n\t\ttopNode = null;\r\n\t}", "public void testMyStack() {\n\t\tMyStack<String> s = new MyStack<String>();\n\t\ts.push(\"1\");\n\t\ts.push(\"2\");\n\t\ts.push(\"3\");\n\t\ts.pop();\n\t\ts.push(\"4\");\n\t\ts.toString();\n\t\tSystem.out.println(\"MyStack size is: \" + s.size());\n\t}", "public ArrayStack()\r\n {\r\n top = 0;\r\n stack = (T[])(new Object[DEFAULT_CAPACITY]);\r\n }", "public MyStack() {\n queue = new LinkedList<>();\n }" ]
[ "0.778653", "0.77526724", "0.7601972", "0.7577269", "0.75679594", "0.74565184", "0.7345272", "0.7277355", "0.7244482", "0.718336", "0.71824276", "0.71822536", "0.7153798", "0.7132682", "0.71097404", "0.7109675", "0.7098451", "0.7086401", "0.70259255", "0.70230013", "0.7018671", "0.70143205", "0.6990317", "0.6983104", "0.69758594", "0.6975435", "0.697383", "0.69639075", "0.69639075", "0.69612336", "0.692582", "0.6910254", "0.6894362", "0.6885909", "0.68584913", "0.6839306", "0.6832991", "0.6820391", "0.68192494", "0.68191314", "0.68102056", "0.68064916", "0.6802169", "0.68015206", "0.6757237", "0.67548126", "0.6753006", "0.67475617", "0.6729236", "0.6725348", "0.6691828", "0.6672948", "0.6663481", "0.6653967", "0.66535074", "0.6650664", "0.66482174", "0.6644219", "0.66269875", "0.66203713", "0.6613691", "0.66088396", "0.6605378", "0.66007143", "0.65960693", "0.659072", "0.6584117", "0.65805465", "0.6576908", "0.656716", "0.65619916", "0.654268", "0.65293354", "0.6517047", "0.65149975", "0.6510653", "0.65028507", "0.6496821", "0.6489547", "0.64676434", "0.6463733", "0.6460742", "0.6460424", "0.6458617", "0.6453797", "0.64425683", "0.6439398", "0.6434831", "0.6429672", "0.6427944", "0.6424742", "0.6424435", "0.6407693", "0.6400327", "0.63785744", "0.63738877", "0.63721055", "0.6365279", "0.6363868", "0.6350421", "0.63496155" ]
0.0
-1
Find by primary key.
public final E find(final K id) { return getJpaTemplate().find(getEntityClass(), id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "T findById(long pk);", "public String ejbFindByPrimaryKey(String primaryKey) \n throws FinderException {\n\n // Precondition\n if ( primaryKey == null ) {\n throw new FinderException( \"null primaryKey\" );\n }\n\n Connection conn = null;\n PreparedStatement stmt = null;\n ResultSet rs = null;\n boolean retVal = false;\n try {\n conn = DBConfiguration.getConnection();\n stmt = conn.prepareStatement(Configuration.SQL_01);\n\n stmt.setString( 1, primaryKey );\n\n rs = stmt.executeQuery();\n retVal = rs.next();\n if ( theLog.isDebugEnabled() ) {\n theLog.debug( \"selectByPrimaryKey: retVal == \" + retVal );\n }\n\n } catch (Exception ex) {\n theLog.debug(\"Exception in ejbFindByPrimaryKey: \" + ex);\n }\n finally {\n DBConfiguration.closeSQLResultSet( rs );\n DBConfiguration.closeSQLStatement( stmt );\n DBConfiguration.closeSQLConnection( conn );\n rs = null;\n stmt = null;\n conn = null;\n }\n\n if (!retVal) {\n String msg = \"Row for id \" + primaryKey + \" not found.\";\n throw new ObjectNotFoundException( msg );\n }\n\n return primaryKey;\n }", "public Entry findByPrimaryKey(EntryPK pk) throws FinderException, RemoteException;", "Key getPrimaryKey();", "public com.vh.locker.ejb.Contact findByPrimaryKey(java.lang.Long primaryKey) throws javax.ejb.FinderException;", "public E findById(Serializable pk) ;", "PrimaryKey getPrimaryKey();", "PrhFree selectByPrimaryKey(Integer id);", "public Ruta findByPrimaryKey(RutaPk pk) throws RutaDaoException;", "Procdef selectByPrimaryKey(String id);", "E findById(K id);", "public E findByPK(Serializable pk) {\n Session session = DAOUtils.getSession();\n Transaction trans = session.beginTransaction();\n\n E entity = session.get(genericType, pk);\n\n trans.commit();\n return entity;\n }", "PrimaryKey getPrimarykey();", "SysId selectByPrimaryKey(String id);", "T getById(PK id);", "public Integer ejbFindByPrimaryKey(final Integer id)\n throws FinderException\n {\n PreparedStatement ps = null;\n try \n {\n ps = getConnection().prepareStatement(\"SELECT ID FROM CCBMPACCOUNT WHERE ID = ?\");\n ps.setInt(1, id.intValue());\n ResultSet rs = ps.executeQuery();\n if (!rs.next()) \n {\n throw new ObjectNotFoundException(\"No such account: \" + id);\n } // end of if ()\n rs.close();\n\n }\n catch (Exception e)\n {\n Category.getInstance(getClass().getName()).info(\"Exception in findByPK\", e);\n throw new EJBException(\"Problem in findByPrimaryKey: \" + e);\n } // end of try-catch\n finally\n {\n try \n {\n if (ps != null) {ps.close();}\n }\n catch (Exception e)\n {\n Category.getInstance(getClass().getName()).info(\"Exception closing ps: \" + e);\n } // end of try-catch\n } // end of finally\n return id;\n }", "public Tipo findByPrimaryKey(TipoPk pk) throws TipoDaoException;", "public Cliente findByPrimaryKey(ClientePk pk) throws ClienteDaoException;", "public PrimaryKey getPrimaryKey();", "SysCode selectByPrimaryKey(String id);", "T getByPk(int key) throws PersistException;", "IceApp selectByPrimaryKey(Long id);", "Clazz selectByPrimaryKey(Integer id);", "Owner selectByPrimaryKey(String id);", "Book selectByPrimaryKey(String id);", "ApplicationDO selectByPrimaryKey(ApplicationDOKey key);", "User selectByPrimaryKey(String id);", "@Override\n\tpublic ImageEntity find(Object primarykey) {\n\t\treturn (ImageEntity) DatabaseContext.find(ImageEntity.class, primarykey);\n\t}", "RecordLike selectByPrimaryKey(String id);", "T get(PK id);", "PmKeyDbObj selectByPrimaryKey(Integer pmKeyId);", "Account selectByPrimaryKey(String id);", "Online selectByPrimaryKey(String hash);", "HpItemParamItem selectByPrimaryKey(Long id);", "public abstract T findOne(int id);", "Yqbd selectByPrimaryKey(Integer id);", "@SuppressWarnings(\"unchecked\")\r\n public DomainObject getRecordByPrimaryKey(KeyType id) {\r\n Session session = getSession();\r\n try {\r\n return (DomainObject) session.get(getPersistentClass(), id);\r\n } catch (HibernateException e) {\r\n LOG.error(MODULE + \"Exception in getRecordByPrimaryKey Method:\" + e, e);\r\n throw e;\r\n } finally {\r\n if (session.isOpen()) {\r\n session.close();\r\n }\r\n }\r\n }", "Caiwu selectByPrimaryKey(Integer id);", "public SgfensBanco findByPrimaryKey(SgfensBancoPk pk) throws SgfensBancoDaoException;", "Dormitory selectByPrimaryKey(Integer id);", "CptDataStore selectByPrimaryKey(String id);", "Computer selectByPrimaryKey(Long id);", "public com.hps.july.persistence.CfgDocument findByPrimaryKey(\n\t\tcom.hps.july.persistence.DocumentKey primaryKey)\n\t\tthrows javax.ejb.FinderException, java.rmi.RemoteException;", "Prueba selectByPrimaryKey(Integer id);", "public DatiBancari findByPrimaryKey(DatiBancariPk pk) throws DatiBancariDaoException;", "T findById(ID id) ;", "Kaiwa selectByPrimaryKey(String maht);", "BaseReturn selectByPrimaryKey(String guid);", "PaasCustomAutomationRecord selectByPrimaryKey(Integer id);", "ProEmployee selectByPrimaryKey(String id);", "public Faq findByPrimaryKey(FaqPk pk) throws FaqDaoException;", "Employee selectByPrimaryKey(String id);", "public NominaPuesto findByPrimaryKey(NominaPuestoPk pk) throws NominaPuestoDaoException;", "SwipersDO selectByPrimaryKey(Integer id);", "Abum selectByPrimaryKey(String id);", "Thing selectByPrimaryKey(String thingid);", "public E findOne(ID primaryKey) {\n if ((primaryKey != null) && getDao().existsById(primaryKey)) {\n return getOne(primaryKey);\n }\n\n return null;\n }", "AccessModelEntity selectByPrimaryKey(String id);", "PageFunc selectByPrimaryKey(Integer id);", "Disease selectByPrimaryKey(Integer id);", "public Object findByPK(Object object) throws DAOException {\r\n\t\tString sqlStmt = DAOConstants.PROJ_FIND_BYPK;\r\n\t\tProjectInfo projectReturn = null;\r\n\r\n\t\tif (!(object instanceof String))\r\n\t\t\tthrow new DAOException (\"invalid.object.projdao\",\r\n\t\t\t\t\tnull, DAOException.ERROR, true);\r\n\t\t\t\t\t\r\n\t\tString pk = (String) object;\t\t\t\t\r\n\t\tConnection conn = null;\r\n\r\n\t\t\ttry{\r\n\t\t\t\tlog.debug(\"finding pk ProjectInfo entry\");\r\n\t\t\t\tconn = dbAccess.getConnection();\r\n\t\t\t\tPreparedStatement stmt = conn.prepareStatement(sqlStmt);\r\n\t\t\t\tstmt.setString(1, pk);\r\n\t\t\t\tResultSet rs = stmt.executeQuery();\r\n\t\t\t\t\r\n\t\t\t\tif (rs.next()) {\r\n\t\t\t\t\tprojectReturn = ProjectAssembler.getInfo(rs);\r\n\t\t\t\t}\r\n\t\t\t\tstmt.close();\r\n\t\t\t\trs.close();\r\n\t\t\t\tlog.debug(\"found by pk ProjectInfo entry\");\r\n\t\t\t} catch (DBAccessException e) {\r\n\t\t\t\tthrow new DAOException(e.getMessageKey(), e, DAOException.ERROR,\r\n\t\t\t\t\t\ttrue);\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\tthrow new DAOException(\"sql.findpk.exception.projdao\", e,\r\n\t\t\t\t\t\tDAOException.ERROR, true);\r\n\t\t\t}\r\n\r\n\t\t\tcatch (Exception ex) {\r\n\t\t\t\tSystem.err.println(\"error3: \" + ex.getMessage());\r\n\t\t\t} finally {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tdbAccess.closeConnection(conn);\r\n\t\t\t\t} catch (DBAccessException e1) {\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\treturn projectReturn;\t\r\n\t}", "@Override\n\tpublic Person select(PersonKey key) throws KeyNotFoundException {\n\t\t\n\t\ttry {\n\t\t\tPerson person = repo.findById(key).get();\n\t\t\treturn person;\n\t\t\t}\n\t\tcatch(Exception ex) {\n\t\t\tthrow new KeyNotFoundException();\n\t\t}\n\t\t\n\t}", "Object getPrimaryKey(Object metadataID);", "Card selectByPrimaryKey(String card);", "Appraise selectByPrimaryKey(Integer id);", "User selectByPrimaryKey(Long id);", "@Override\n\tpublic <T> T find(Class<T> entityClass, Object primaryKey) {\n\t\treturn null;\n\t}", "public void findbyid() throws Exception {\n try {\n Con_contadorDAO con_contadorDAO = getCon_contadorDAO();\n List<Con_contadorT> listTemp = con_contadorDAO.getByPK( con_contadorT);\n\n con_contadorT= listTemp.size()>0?listTemp.get(0):new Con_contadorT();\n \n } catch (Exception e) {\n e.printStackTrace();\n setMsg(\"Falha ao realizar consulta!\");\t\n } finally {\n\tclose();\n }\n }", "User selectByPrimaryKey(Integer id);", "User selectByPrimaryKey(Integer id);", "User selectByPrimaryKey(Integer id);", "User selectByPrimaryKey(Integer id);", "User selectByPrimaryKey(Integer id);", "public Data findById(Object id);", "T findById(Integer id);", "public Items findByPrimaryKey(ItemsPk pk) throws ItemsDaoException;", "TCpySpouse selectByPrimaryKey(Integer id);", "public String fetchPrimaryKey(){\n\t\treturn primaryKey;\n\t}", "LoginRecordDO selectByPrimaryKey(Long id);", "T load(PK id);", "ProSchoolWare selectByPrimaryKey(String id);", "EtpBase selectByPrimaryKey(String id);", "Product selectByPrimaryKey(Long id);", "Object getPrimaryKey() throws IllegalStateException;", "DBPublicResources selectByPrimaryKey(Integer id);", "@Override\n public T findById(ID id) throws SQLException {\n\n return this.dao.queryForId(id);\n\n }", "Ltsprojectpo selectByPrimaryKey(Long id);", "@Override\n public Message findOne(Integer key) throws SQLException {\n //Ei toteutettu\n return null;\n }", "Optional<T> findOne(K id);", "E find(Id id) throws RepositoryException;", "@Override\r\n\tpublic void find(Integer id) {\n\r\n\t}", "@Override\r\n\tpublic Customer findByKey(int id) throws SQLException {\r\n\t\tString selectSql = \"SELECT * FROM \" + tableName + \" WHERE (id = ?)\";\r\n\t\tCustomer customer = null;\r\n\t\ttry {\r\n\t\t\t//connection = ds.getConnection();\r\n\t\t\tpreparedStatement = connection.prepareStatement(selectSql);\r\n\t\t\tpreparedStatement.setInt(1, id);\r\n\t\t\tResultSet rs = preparedStatement.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tcustomer = new Customer();\r\n\t\t\t\tcustomer.setId(rs.getInt(\"id\"));\r\n\t\t\t\tcustomer.setName(rs.getString(\"name\"));\r\n\t\t\t\tcustomer.setSurname(rs.getString(\"surname\"));\r\n\t\t\t\tcustomer.setBirthdate(rs.getDate(\"birth_date\"));\r\n\t\t\t\tcustomer.setBirthplace(rs.getString(\"birth_place\"));\r\n\t\t\t\tcustomer.setAddress(rs.getString(\"address\"));\r\n\t\t\t\tcustomer.setCity(rs.getString(\"city\"));\r\n\t\t\t\tcustomer.setProvince(rs.getString(\"province\"));\r\n\t\t\t\tcustomer.setCap(rs.getInt(\"cap\"));\r\n\t\t\t\tcustomer.setPhoneNumber(rs.getString(\"phone_number\"));\r\n\t\t\t\tcustomer.setNewsletter(rs.getInt(\"newsletter\"));\r\n\t\t\t\tcustomer.setEmail(rs.getString(\"email\"));\r\n\t\t\t}\r\n\t\t\tconnection.commit();\r\n\t\t} catch (SQLException e) {\r\n\t\t}\r\n\t\treturn customer;\r\n\t}", "mailIdentify selectByPrimaryKey(Integer id);", "HuoDong selectByPrimaryKey(Integer id);", "@Override\n\tpublic User findByKey(Integer id) {\n\t\treturn null;\n\t}", "protected void checkFindByPrimaryKey(DetailAST aAST)\n {\n if (!Utils.hasPublicMethod(aAST, \"findByPrimaryKey\", false, 1))\n {\n final DetailAST nameAST = aAST.findFirstToken(TokenTypes.IDENT);\n log(\n aAST.getLineNo(),\n nameAST.getColumnNo(),\n \"missingmethod.bean\",\n new Object[] {\"Home interface\", \"findByPrimaryKey\"});\n }\n }", "QuestionOne selectByPrimaryKey(Integer id);", "O obtener(PK id) throws DAOException;", "Book selectByPrimaryKey(String bid);", "Account selectByPrimaryKey(Long accountid);", "Article selectByPrimaryKey(String id);" ]
[ "0.7731156", "0.74453217", "0.7396883", "0.73116523", "0.72844857", "0.72724295", "0.72485024", "0.7240206", "0.71692514", "0.71664584", "0.70926106", "0.7062917", "0.70583224", "0.7052086", "0.70340735", "0.6958666", "0.6917018", "0.6884657", "0.6881207", "0.68705624", "0.68583524", "0.6851605", "0.68507105", "0.68328124", "0.68087196", "0.6804521", "0.6802777", "0.6802374", "0.6800582", "0.6796153", "0.6783522", "0.677334", "0.67515403", "0.67448235", "0.67394376", "0.67048156", "0.6697905", "0.6686259", "0.6682023", "0.6671445", "0.6660917", "0.6658813", "0.6657492", "0.665307", "0.66391367", "0.663171", "0.6627079", "0.660957", "0.660234", "0.65976495", "0.6593884", "0.65930283", "0.65902567", "0.65880364", "0.65810776", "0.65803945", "0.65702665", "0.65700155", "0.6564064", "0.65565884", "0.6540685", "0.6535421", "0.65303373", "0.6522998", "0.652096", "0.65127766", "0.6510576", "0.6509501", "0.6509154", "0.6509154", "0.6509154", "0.6509154", "0.6509154", "0.65084004", "0.6505941", "0.6504993", "0.64947706", "0.6489782", "0.647442", "0.64724314", "0.6469746", "0.6466123", "0.6462421", "0.64591324", "0.6449228", "0.6444725", "0.64428085", "0.64373523", "0.6435986", "0.64330035", "0.64285207", "0.6422259", "0.64028984", "0.64013964", "0.63914526", "0.6382977", "0.63792944", "0.6378811", "0.6378005", "0.637744", "0.63738924" ]
0.0
-1
Check if the instance belongs to the current persistence context.
public final boolean contains(final E entity) { return getJpaTemplate().contains(entity); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isPersistenceContext();", "public boolean isManaged(T instance) {\r\n\t\tif (instance != null) {\r\n\t\t\tif (instance.getId() > 0) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t} \r\n\t\treturn false;\r\n\t}", "public boolean isStreamCurrentContextThreadCurrentContext() {\n return contexts.get(currentContext)\n .equals(TransactionalContext.getCurrentContext());\n }", "boolean hasContext();", "boolean hasContext();", "public boolean isPersisted() {\n return systemId!=NOT_PERSISTED;\n }", "public static boolean isRunning()\n {\n synchronized( Lifecycle.class ) {\n return context != null;\n }\n }", "public boolean isStreamForThisThread() {\n return contexts.get(0)\n .equals(TransactionalContext.getRootContext());\n }", "public boolean isCatalogEntity() {\n return getCatalogId() != null;\n }", "public static boolean hasInstance() {\n return instance != null;\n }", "@Override\n public boolean isAlreadyInDb () {\n try {\n load( idDevice );\n } catch ( EntityNotFoundException e ) {\n return false;\n }\n return true;\n }", "boolean hasPersistent();", "private boolean isInSession()\n {\n return EngagementActivityManager.getInstance().getCurrentActivityAlias() != null;\n }", "public abstract boolean isDatabaseSet();", "boolean hasApplicationProcessInstance();", "boolean hasInstance();", "public boolean isSetDatabase() {\r\n return this.database != null;\r\n }", "public boolean isSetDatabase() {\r\n return this.database != null;\r\n }", "public boolean isSetDatabase() {\r\n return this.database != null;\r\n }", "public boolean isSetDatabase() {\r\n return this.database != null;\r\n }", "public boolean isSetDatabase() {\r\n return this.database != null;\r\n }", "public static boolean hasInstance()\n\t{\n \tif(wdba == null)\n \t\treturn false;\n \telse\n \t\treturn true;\n\t}", "private boolean inDatabase() {\r\n \t\treturn inDatabase(0, null);\r\n \t}", "public boolean isInEnv()\n {\n return environment().objectAt(location()) == this;\n }", "public abstract boolean isPersistent();", "@Override\n public boolean isTransActionAlive() {\n Transaction transaction = getTransaction();\n return transaction != null && transaction.isActive();\n }", "private static boolean isOpenJPAPersistenceProvider(PersistenceUnitInfo pinfo, ClassLoader loader) {\n String provider = pinfo.getPersistenceProviderClassName();\n if (StringUtil.isEmpty(provider) || PersistenceProviderImpl.class.getName().equals(provider))\n return true;\n\n if (loader == null)\n loader = AccessController.doPrivileged(J2DoPrivHelper.getContextClassLoaderAction());\n try {\n if (PersistenceProviderImpl.class.isAssignableFrom(Class.forName(provider, false, loader)))\n return true;\n } catch (Throwable t) {\n log(_loc.get(\"unloadable-provider\", provider, t).getMessage());\n return false;\n }\n return false;\n }", "public boolean isSetDb()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(DB$2) != 0;\r\n }\r\n }", "public boolean inAnySession() {\n\t\treturn getSession(player).isPresent();\n\t}", "public void containsACustomer() {\r\n\t\tSystem.out.println(\"\\nChecking if a customer object is in persistent context\");\r\n\r\n\t\tEntityManager em = emf.createEntityManager();\r\n//\t\tEntityTransaction tx = em.getTransaction();\r\n//\t\ttx.begin();\r\n\t\tCustomer2 customerRetrieved = em.find(Customer2.class, (long)10);\r\n\t\tSystem.out.println(customerRetrieved);\r\n\t\tCustomer2 newCustomer = new Customer2(customerRetrieved.getCustId(), \r\n\t\t\t\t\t\t\t\t\t\t\t customerRetrieved.getFirstName(), \r\n\t\t\t\t\t\t\t\t\t\t\t customerRetrieved.getLastName());\r\n\t\tSystem.out.println(newCustomer);\r\n\t\tSystem.out.println(\"Does persistent context have newCustomer? \" + em.contains(newCustomer));\r\n\t\tSystem.out.println(\"Does persistent context have customerRetrieved? \" + em.contains(customerRetrieved));\r\n\t\tem.remove(customerRetrieved);\r\n\t\tSystem.out.println(\"Does persistent context have customerRetrieved? \" + em.contains(customerRetrieved));\r\n//\t\ttx.commit();\r\n\t\tem.close();\r\n\t}", "public Boolean hasEntity() {\n \n return hasEntity_;\n \n }", "public boolean isPersistenceCapableClass(String classPath)\n throws EnhancerMetaDataUserException, EnhancerMetaDataFatalError\n {\n final JDOClass clazz = getJDOClass(classPath);\n return (clazz != null);\n }", "public boolean isSetEntity() {\r\n return this.entity != null;\r\n }", "public boolean exists() {\n return exists(Datastore.fetchDefaultService());\n }", "public boolean isPersistenceCapable(Object object)\n{\n\treturn true;\n}", "public boolean isStoredInObject() {\r\n return lockValueStored == IN_OBJECT;\r\n }", "@Override\n\tpublic boolean isPersistent() {\n\t\treturn id != -1;\n\t}", "boolean hasEntity();", "boolean hasEntity();", "public boolean isLive()\n\t{\n\t\tString id = this.getId();\n\t\tif (id == null) return false;\n\t\t\n\t\tEntityContainer<E> container = this.getContainer();\n\t\tif (container == null) return false;\n\t\t\n\t\tif (!container.isLive()) return false;\n\t\t\n\t\treturn true;\n\t}", "boolean hasCurrentDocument();", "private static PersistenceSession getPersistenceSession() {\n return NakedObjectsContext.getPersistenceSession();\n }", "public default void checkPersisted(Object entity) {\n\t\tif (!getEntityManager().contains(entity)) {\n\t\t\tthrow new ProgrammingException(\"Method requires a persisted entity, transient passed\");\n\t\t}\n\t}", "public boolean isValid() {\n return instance != null;\n }", "public boolean isManaged() {\n return managed;\n }", "public boolean isManagedBy(Account account) {\n\t\treturn this.getManagers().contains(account);\n\t}", "public boolean isSingleton() {\n return (ejbDesc.getType().equals(EjbSessionDescriptor.TYPE) &&\n ((EjbSessionDescriptor) ejbDesc).isSingleton());\n }", "public boolean isProfileEntity() {\n return getProfileId() != null;\n }", "public final boolean isActive() {\n synchronized (this.lifecycleMonitor) {\n return this.active;\n }\n }", "private boolean isNewHazelcastMQContextHolder() {\n return newHazelcastMQContextHolder;\n }", "public boolean checkIfThisGAZRecordIsInTheDB()\n\t{\n\t\treturn checkIfThisRecordIsInTheDB(getWhereConditionBaseOnIdRecord());\n\t}", "public boolean isLocalTransaction()\n {\n if (_connectionConfig.isReadOnly())\n return false;\n else if (_driverList.size() > 0) {\n DriverConfig driver = _driverList.get(0);\n \n return driver.isLocalTransaction();\n }\n else\n return false;\n }", "public boolean existsInstance(String name)\r\n\t{\r\n\t\treturn obtainOntResource(name) != null;\r\n\t}", "public boolean checkIfThisHBRecordIsInTheDB()\n\t{\n\t\treturn checkIfThisRecordIsInTheDB(getWhereConditionBaseOnIdRecord());\n\t}", "public boolean isSetPktable_db() {\n return this.pktable_db != null;\n }", "public Boolean getPersistida() {\n return persistida.get();\n }", "public boolean needContext() {\n\t\treturn false;\n\t}", "@Override\n public final boolean isAlive() {\n return safetyHelper.isAlive();\n }", "boolean propagateSession() {\n if (committed && !isDirty()) {\n return true;\n }\n if (getRepositoryBackedSession(false) == null) {\n setPropagateOnCreate(true);\n return false;\n }\n return doPropagateAndStoreIfFirstWrapper();\n }", "@Override\n\tpublic boolean isLocal() {\n\t\treturn heldObj.isLocal();\n\t}", "@Override\n public boolean isSessionAlive() {\n return sessionFactory.getCurrentSession() != null && sessionFactory.getCurrentSession().isOpen();\n }", "public boolean isStore() { return _store; }", "public final boolean isOwner() {\n return currentOwner == this;\n }", "protected boolean atGlobalScope() {\n return !currentScope.hasParent();\n }", "boolean hasResMineInstanceID();", "protected boolean isPersisted(Resource resource) {\r\n\t\tboolean result = false;\r\n\t\ttry {\r\n\t\t\tInputStream stream = editingDomain.getResourceSet()\r\n\t\t\t\t\t.getURIConverter().createInputStream(resource.getURI());\r\n\t\t\tif (stream != null) {\r\n\t\t\t\tresult = true;\r\n\t\t\t\tstream.close();\r\n\t\t\t}\r\n\t\t} catch (IOException e) {\r\n\t\t\t// Ignore\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "private boolean isPersistent (String className)\n\t{\n\t\treturn getModel().isPersistent(className, getClassLoader());\n\t}", "public boolean hasSystemID()\n {\n \treturn getSiteID() != null;\n }", "public static <T extends Entidad> boolean isPersistent(Entidad entity) {\r\n\t\treturn (entity != null && entity.getId() != null);\r\n\t}", "protected Boolean exists() {\n return nonNull(getModified()) && nonNull(getInteractionModel());\n }", "@Override\n public boolean isScoped() {\n \treturn getScope() != null && !getScope().isEmpty();\n }", "public boolean isNotPersisted() {\n return notPersisted;\n }", "public Boolean persistent();", "public boolean hasContextId() {\n return fieldSetFlags()[0];\n }", "public boolean hasUser() {\n return instance.hasUser();\n }", "boolean isActive() {\n assert this.isHeldByCurrentThread();\n return isActive;\n }", "public boolean isLoaded() {\n return _id != null;\n }", "@Override\n\tpublic boolean isLocallyLoaded(String instanceId)\n\t{\n\t\treturn m_models.isLocal(instanceId);\n\t}", "public boolean isSetFktable_db() {\n return this.fktable_db != null;\n }", "public boolean isSession() {\n\t\treturn config.getBoolean(QuestConfigurationField.SESSION.getKey(), \n\t\t\t\t(boolean) QuestConfigurationField.SESSION.getDefault());\n\t}", "boolean hasDatabase();", "@Override\n public boolean getAsBoolean() {\n return this.persistenceCheck.getAsBoolean();\n }", "boolean isParentInitialized();", "public boolean exists() {\n Entity e = root;\n if (e == null) {\n if (parent != null) {\n e = parent.get(ContentType.EntityType, null);\n }\n }\n if (e == null) {\n return false;\n }\n \n if (isIndexSelector()) {\n return e instanceof EntityList;\n }\n \n if (e.getEntity().getEntityType().isDynamic()) {\n return true;\n }\n Property prop = property;\n if (prop == null) {\n prop = e.getEntity().getEntityType().findProperty(tags);\n }\n return prop != null;\n }", "public boolean checkIfDatabaseExists() {\r\n return database.exists();\r\n }", "boolean hasAsyncPersistRequest();", "private boolean isInstanceLocationSet() {\n \t\tActivator activator = Activator.getDefault();\n \t\tif (activator == null)\n \t\t\treturn false;\n \t\tLocation service = activator.getInstanceLocation();\n \t\tif (service == null)\n \t\t\treturn false;\n \t\treturn service.isSet();\n \t}", "public boolean hasObjUser() {\n return instance.hasObjUser();\n }", "public boolean isRunning(){\r\n try{\r\n List<String> dbNames = mongo.getDatabaseNames();\r\n if(!dbNames.isEmpty()){\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n } catch (MongoException e){\r\n// e.printStackTrace();\r\n return false;\r\n }\r\n }", "@Override\n public boolean isLocked() {\n Preconditions.checkState(connection != null);\n try {\n if (super.isLocked() && locked) {\n DbLockRecord record = checkExpiry(fetch(session, false, false));\n return (record.isLocked() && instanceId().compareTo(record.getInstanceId()) == 0);\n }\n return false;\n } catch (Exception ex) {\n throw new LockException(ex);\n }\n }", "boolean hasDatastoreOptions();", "public boolean isStoreIBEligibilityInd() {\n return storeIBEligibilityInd;\n }", "public boolean isLocal();", "public boolean isTransactionRunning();", "public boolean isActive() { return true; }", "boolean isScope();", "public boolean isSetEntityId() {\n return this.entityId != null;\n }", "@Override\r\n\t\tpublic boolean isCurrent()\r\n\t\t{\n\t\t\treturn true;\r\n\t\t}", "public boolean isSetEntityId() {\n return this.entityId != null;\n }", "public boolean isSetEntityId() {\n return this.entityId != null;\n }", "boolean hasUserManaged();" ]
[ "0.7830638", "0.6521113", "0.6488935", "0.63718975", "0.63718975", "0.636616", "0.6349441", "0.60631526", "0.59518653", "0.5942086", "0.58385265", "0.58215225", "0.58099747", "0.57713634", "0.57598794", "0.5744828", "0.57271117", "0.57271117", "0.57271117", "0.57271117", "0.57271117", "0.5656086", "0.5644588", "0.56387776", "0.56268007", "0.5623434", "0.5617053", "0.5608697", "0.55661803", "0.55651224", "0.555257", "0.5544011", "0.55198884", "0.55044734", "0.55003005", "0.5499621", "0.54858965", "0.5463264", "0.5463264", "0.5460695", "0.5454315", "0.54508114", "0.5441007", "0.5429915", "0.5412105", "0.5405603", "0.5388144", "0.5386972", "0.5381259", "0.53501153", "0.53372306", "0.5331838", "0.533132", "0.5323585", "0.53104925", "0.53096783", "0.530584", "0.53057384", "0.529223", "0.5265148", "0.52609044", "0.5259214", "0.5258949", "0.5256317", "0.52460384", "0.52354217", "0.5234152", "0.52332675", "0.5231739", "0.52281344", "0.5223654", "0.52077", "0.52009475", "0.5200521", "0.5198548", "0.5170881", "0.5160194", "0.5156427", "0.51542556", "0.51537496", "0.51492864", "0.514763", "0.51425636", "0.5141196", "0.51218325", "0.51205635", "0.51193553", "0.51169354", "0.5109037", "0.5107068", "0.5106472", "0.5104155", "0.5100998", "0.50972694", "0.50967944", "0.50738424", "0.50702906", "0.5067852", "0.5061978", "0.5061978", "0.5057759" ]
0.0
-1
Make an entity instance managed and persistent.
public final void persist(final E entity) { getJpaTemplate().persist(entity); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "T makePersistent(T entity);", "Entity createEntity();", "public T create(T entity) {\n\t \tgetEntityManager().getTransaction().begin();\n\t getEntityManager().persist(entity);\n\t getEntityManager().getTransaction().commit();\n\t getEntityManager().close();\n\t return entity;\n\t }", "E create(E entity);", "E create(E entity);", "T createEntity();", "Entity save(Entity entity);", "protected abstract ENTITY createEntity();", "public static Prestamo createEntity(EntityManager em) {\n Prestamo prestamo = new Prestamo().observaciones(DEFAULT_OBSERVACIONES).fechaFin(DEFAULT_FECHA_FIN);\n // Add required entity\n Libro libro;\n if (TestUtil.findAll(em, Libro.class).isEmpty()) {\n libro = LibroResourceIT.createEntity(em);\n em.persist(libro);\n em.flush();\n } else {\n libro = TestUtil.findAll(em, Libro.class).get(0);\n }\n prestamo.setLibro(libro);\n // Add required entity\n Persona persona;\n if (TestUtil.findAll(em, Persona.class).isEmpty()) {\n persona = PersonaResourceIT.createEntity(em);\n em.persist(persona);\n em.flush();\n } else {\n persona = TestUtil.findAll(em, Persona.class).get(0);\n }\n prestamo.setPersona(persona);\n // Add required entity\n User user = UserResourceIT.createEntity(em);\n em.persist(user);\n em.flush();\n prestamo.setUser(user);\n return prestamo;\n }", "@PostConstruct\n protected void initNewEntity() {\n setNewEntity(getService().create());\n }", "@Override\r\n\tpublic void save(T instance) {\r\n\t\tif (isManaged(instance)) {\r\n\t\t\tgetEntityManager().merge(instance);\r\n\t\t} else {\r\n\t\t\tgetEntityManager().persist(instance);\r\n\t\t}\r\n\t}", "void create(T entity);", "T create() throws PersistException;", "public Entity newEntity() { return newMyEntity(); }", "public Entity newEntity() { return newMyEntity(); }", "void create(E entity);", "void makeTransient(T entity);", "E save(E entity);", "public static Pocket createEntity(EntityManager em) {\n Pocket pocket = new Pocket()\n .key(DEFAULT_KEY)\n .label(DEFAULT_LABEL)\n .startDateTime(DEFAULT_START_DATE_TIME)\n .endDateTime(DEFAULT_END_DATE_TIME)\n .amount(DEFAULT_AMOUNT)\n .reserved(DEFAULT_RESERVED);\n // Add required entity\n Balance balance = BalanceResourceIntTest.createEntity(em);\n em.persist(balance);\n em.flush();\n pocket.setBalance(balance);\n return pocket;\n }", "@Override\n\tpublic void persist(Object entity) {\n\t\t\n\t}", "public static House createEntity(EntityManager em) {\n House house = new House()\n .houseName(DEFAULT_HOUSE_NAME)\n .houseNo(DEFAULT_HOUSE_NO)\n .address(DEFAULT_ADDRESS)\n .houseToFloorNo(DEFAULT_HOUSE_TO_FLOOR_NO)\n .ownToFloorNo(DEFAULT_OWN_TO_FLOOR_NO)\n .lat(DEFAULT_LAT)\n .lon(DEFAULT_LON)\n .createdate(DEFAULT_CREATEDATE)\n .createBy(DEFAULT_CREATE_BY)\n .updateDate(DEFAULT_UPDATE_DATE)\n .updateBy(DEFAULT_UPDATE_BY)\n .image(DEFAULT_IMAGE)\n .imageContentType(DEFAULT_IMAGE_CONTENT_TYPE);\n // Add required entity\n Country country = CountryResourceIntTest.createEntity(em);\n em.persist(country);\n em.flush();\n house.setCountry(country);\n // Add required entity\n State state = StateResourceIntTest.createEntity(em);\n em.persist(state);\n em.flush();\n house.setState(state);\n // Add required entity\n City city = CityResourceIntTest.createEntity(em);\n em.persist(city);\n em.flush();\n house.setCity(city);\n // Add required entity\n Profile profile = ProfileResourceIntTest.createEntity(em);\n em.persist(profile);\n em.flush();\n house.setProfile(profile);\n // Add required entity\n User user = UserResourceIntTest.createEntity(em);\n em.persist(user);\n em.flush();\n house.setUser(user);\n return house;\n }", "protected abstract EntityBase createEntity() throws Exception;", "public static Prestamo createUpdatedEntity(EntityManager em) {\n Prestamo prestamo = new Prestamo().observaciones(UPDATED_OBSERVACIONES).fechaFin(UPDATED_FECHA_FIN);\n // Add required entity\n Libro libro;\n if (TestUtil.findAll(em, Libro.class).isEmpty()) {\n libro = LibroResourceIT.createUpdatedEntity(em);\n em.persist(libro);\n em.flush();\n } else {\n libro = TestUtil.findAll(em, Libro.class).get(0);\n }\n prestamo.setLibro(libro);\n // Add required entity\n Persona persona;\n if (TestUtil.findAll(em, Persona.class).isEmpty()) {\n persona = PersonaResourceIT.createUpdatedEntity(em);\n em.persist(persona);\n em.flush();\n } else {\n persona = TestUtil.findAll(em, Persona.class).get(0);\n }\n prestamo.setPersona(persona);\n // Add required entity\n User user = UserResourceIT.createEntity(em);\n em.persist(user);\n em.flush();\n prestamo.setUser(user);\n return prestamo;\n }", "protected Object create(Object entity, Class clazz) {\r\n\r\n try {\r\n EntityTransaction transaction = entityManager.getTransaction();\r\n transaction.begin();\r\n entityManager.persist(entity);\r\n transaction.commit();\r\n return entity;\r\n } catch (Exception e) {\r\n System.err.println(\"Erro ao criar Entidade \" + e.getMessage());\r\n }\r\n return null;\r\n }", "void create(T entity) throws Exception;", "ID create(T entity);", "public static EmployeeCars createEntity(EntityManager em) {\n EmployeeCars employeeCars = new EmployeeCars()\n .previousReading(DEFAULT_PREVIOUS_READING)\n .currentReading(DEFAULT_CURRENT_READING)\n .workingDays(DEFAULT_WORKING_DAYS)\n .updateDate(DEFAULT_UPDATE_DATE);\n // Add required entity\n Employee employee = EmployeeResourceIT.createEntity(em);\n em.persist(employee);\n em.flush();\n employeeCars.setEmployee(employee);\n // Add required entity\n Car car = CarResourceIT.createEntity(em);\n em.persist(car);\n em.flush();\n employeeCars.setCar(car);\n return employeeCars;\n }", "@Override\n\t@Transactional\n\tpublic T create(T entity) {\n\t\tif (entity == null) {\n\t\t\treturn null;\n\t\t}\n\t\thibernateTemplate.save(entity);\n\t\treturn entity;\n\t}", "@Override\n\tpublic T create(T entity) {\n\t\t//TODO al anotar un metodo como transaccional spring de encarga de la transaccion por lo que no hay que \n\t\t//abrir la transaccion ni hacer commit, se encarga spring. Es más si lo intentas da un error, no se \n\t\t//pueden crear transacciones en una transaccion conpartida\n\t\t//Not allowed to create transaction on shared EntityManager - use Spring transactions\n\t\t//em.getTransaction().begin();\n\t\t\n\t\tSystem.out.println(em.contains(entity));\n\t\tem.persist(entity);\n\t\tSystem.out.println(em.contains(entity));\n\t\t//em.getTransaction().commit();\n\t\t\n\t\t//Session session = (Session) em.getDelegate();\n\t\t//Transaction tx = session.beginTransaction();\n\t\t//session.saveOrUpdate(entity);\n\t\t//session.flush();\n\t\t//tx.commit();\n\t\treturn entity;\n\t}", "public void save(E entity){\n transaction.begin();\n entityManager.persist(entity);\n transaction.commit();\n }", "T save(T entity);", "T save(T entity);", "T save(T entity);", "public ClientEntity newEntity() {\r\n if (entityType == null) {\r\n entityType = getEntityType(entitySet);\r\n }\r\n return odataClient.getObjectFactory().newEntity(new FullQualifiedName(NAMESPAVE, entityType));\r\n }", "public static A createEntity(EntityManager em) {\n A a = new A();\n return a;\n }", "@Transactional\n public void create(TaskInstanceEntity taskInstanceEntity) {\n entityManagerProvider.get().persist(taskInstanceEntity);\n }", "public Entity build();", "public LugarEntity create(LugarEntity p){\n em.persist(p);\n return p;\n }", "protected abstract T createNewEntry(PersistentEntity persistentEntity);", "public static TranshipTube createEntity(EntityManager em) {\n TranshipTube transhipTube = new TranshipTube()\n .status(DEFAULT_STATUS)\n .memo(DEFAULT_MEMO)\n .columnsInTube(DEFAULT_COLUMNS_IN_TUBE)\n .rowsInTube(DEFAULT_ROWS_IN_TUBE);\n // Add required entity\n TranshipBox transhipBox = TranshipBoxResourceIntTest.createEntity(em);\n em.persist(transhipBox);\n em.flush();\n transhipTube.setTranshipBox(transhipBox);\n // Add required entity\n FrozenTube frozenTube = FrozenTubeResourceIntTest.createEntity(em);\n em.persist(frozenTube);\n em.flush();\n transhipTube.setFrozenTube(frozenTube);\n return transhipTube;\n }", "private AdminEntity() {\n \tsuper();\n\n this.emf = Persistence.createEntityManagerFactory(\"entityManager\");\n\tthis.em = this.emf.createEntityManager();\n\tthis.tx = this.em.getTransaction();\n }", "@Override\n\tpublic void persist(Recipe entity) {\n\t\t\n\t}", "public static A createUpdatedEntity(EntityManager em) {\n A a = new A();\n return a;\n }", "public static Paiement createEntity(EntityManager em) {\n Paiement paiement = new Paiement()\n .dateTransation(DEFAULT_DATE_TRANSATION)\n .montantTTC(DEFAULT_MONTANT_TTC);\n return paiement;\n }", "public void toEntity(){\n\n }", "public static Emprunt createEntity(EntityManager em) {\n Emprunt emprunt = new Emprunt()\n .dateEmprunt(DEFAULT_DATE_EMPRUNT)\n .dateRetour(DEFAULT_DATE_RETOUR);\n // Add required entity\n Usager usager = UsagerResourceIntTest.createEntity(em);\n em.persist(usager);\n em.flush();\n emprunt.setUsager(usager);\n // Add required entity\n Exemplaire exemplaire = ExemplaireResourceIntTest.createEntity(em);\n em.persist(exemplaire);\n em.flush();\n emprunt.setExemplaire(exemplaire);\n return emprunt;\n }", "void persist() throws PersistenceException;", "T persist(T obj) throws PersistException;", "void save(Object entity);", "public abstract P toEntity();", "Object toDomain(Object entity, Settings settings);", "EntityType getEntity();", "@Transactional\n\tpublic T create(T newInstance) {\n\t\tthis.em.persist(newInstance);\n\t\treturn newInstance;\n\t}", "public void save() throws EntityPersistenceException {\n\n }", "public static StoreMap createEntity(EntityManager em) {\n StoreMap storeMap = new StoreMap()\n .validityStart(DEFAULT_VALIDITY_START)\n .validityEnd(DEFAULT_VALIDITY_END)\n .url(DEFAULT_URL)\n .wallMap(DEFAULT_WALL_MAP)\n .pathMap(DEFAULT_PATH_MAP)\n .dimensionX(DEFAULT_DIMENSION_X)\n .dimensionY(DEFAULT_DIMENSION_Y)\n .scale(DEFAULT_SCALE);\n // Add required entity\n Store store = StoreResourceIntTest.createEntity(em);\n em.persist(store);\n em.flush();\n storeMap.setStore(store);\n return storeMap;\n }", "void save(E entity);", "public static TestEntity createEntity(EntityManager em) {\n TestEntity testEntity = new TestEntity();\n // Add required entity\n User user = UserResourceIntTest.createEntity(em);\n em.persist(user);\n em.flush();\n testEntity.setUserOneToMany(user);\n return testEntity;\n }", "public static Ordenador createEntity(EntityManager em) {\n Ordenador ordenador = new Ordenador()\n .observaciones(DEFAULT_OBSERVACIONES)\n .precio(DEFAULT_PRECIO);\n return ordenador;\n }", "public static ProcessExecution createEntity(EntityManager em) {\n ProcessExecution processExecution = new ProcessExecution()\n .execution(DEFAULT_EXECUTION);\n return processExecution;\n }", "private MetaEntityImpl createMetaEntity(Class<?> entityType) {\n String className = entityType.getSimpleName();\n MetaEntityImpl managedEntity = new MetaEntityImpl();\n managedEntity.setEntityType(entityType);\n managedEntity.setName(className);\n ((MetaTableImpl) managedEntity.getTable()).setName(className);\n ((MetaTableImpl) managedEntity.getTable()).setKeySpace(environment.getConfiguration().getKeySpace());\n return managedEntity;\n }", "@Override\n @LogMethod\n public T create(T entity) throws InventoryException {\n \tInventoryHelper.checkNull(entity, \"entity\");\n repository.persist(entity);\n return repository.getByKey(entity.getId());\n }", "public static TipoLocal createEntity(EntityManager em) {\n TipoLocal tipoLocal = new TipoLocal()\n .tipo(DEFAULT_TIPO);\n return tipoLocal;\n }", "public static Partida createEntity(EntityManager em) {\n Partida partida = new Partida()\n .dataPartida(DEFAULT_DATA_PARTIDA);\n return partida;\n }", "public static Provinces createEntity(EntityManager em) {\n Provinces provinces = new Provinces()\n .provinceName(DEFAULT_PROVINCE_NAME);\n // Add required entity\n Countries countryName = CountriesResourceIntTest.createEntity(em);\n em.persist(countryName);\n em.flush();\n provinces.setCountryName(countryName);\n return provinces;\n }", "public static Poen createEntity(EntityManager em) {\n Poen poen = new Poen()\n .tip(DEFAULT_TIP);\n return poen;\n }", "@Override\r\n public void createNewEntity(String entityName) {\n\r\n }", "void save(T entity);", "protected Object create(Object object) {\n EntityManager em = getEntityManager();\n em.getTransaction().begin();\n try {\n em.persist(object);\n em.getTransaction().commit();\n LOG.debug(\"Persisted \" + object);\n } catch (Exception e) {\n LOG.error(\"Could not persist Object\", e);\n em.getTransaction().rollback();\n } finally {\n em.close();\n }\n return object;\n }", "<T> void toEntity(T entity, int type);", "@Override\n public void persist() {\n }", "public <T> T save(T entity);", "public static Pribori createEntity(EntityManager em) {\n Pribori pribori = new Pribori()\n .naziv(DEFAULT_NAZIV)\n .vrsta(DEFAULT_VRSTA)\n .jedMere(DEFAULT_JED_MERE)\n .namena(DEFAULT_NAMENA)\n .cena(DEFAULT_CENA)\n .trajanje(DEFAULT_TRAJANJE);\n return pribori;\n }", "void save(Cartera entity);", "@Override\r\n\tpublic Plate persist(Plate entity) {\n\t\treturn null;\r\n\t}", "T save(T entity) throws DataConcurrencyException, DataIntegrityViolationException;", "public static SitAndGo createEntity(EntityManager em) {\n SitAndGo sitAndGo = new SitAndGo()\n .format(DEFAULT_FORMAT)\n .buyIn(DEFAULT_BUY_IN)\n .ranking(DEFAULT_RANKING)\n .profit(DEFAULT_PROFIT)\n .bounty(DEFAULT_BOUNTY);\n return sitAndGo;\n }", "@Override\n\tprotected CoreEntity createNewEntity() {\n\t\treturn null;\n\t}", "public DisponibilidadEntity create(DisponibilidadEntity entity) {\r\n\r\n em.persist(entity);\r\n\r\n return entity;\r\n }", "public static MotherBed createEntity(EntityManager em) {\n MotherBed motherBed = new MotherBed()\n .value(DEFAULT_VALUE)\n .status(DEFAULT_STATUS);\n // Add required entity\n Nursery nursery = NurseryResourceIntTest.createEntity(em);\n em.persist(nursery);\n em.flush();\n motherBed.setNursery(nursery);\n return motherBed;\n }", "public static Posicion createEntity(EntityManager em) {\n Posicion posicion = new Posicion()\n .titulo(DEFAULT_TITULO)\n .descripcion(DEFAULT_DESCRIPCION)\n .numeroPuestos(DEFAULT_NUMERO_PUESTOS)\n .salarioMinimo(DEFAULT_SALARIO_MINIMO)\n .salarioMaximo(DEFAULT_SALARIO_MAXIMO)\n .fechaAlta(DEFAULT_FECHA_ALTA)\n .fechaNecesidad(DEFAULT_FECHA_NECESIDAD);\n return posicion;\n }", "@Override\r\n\tpublic void persist() {\n\t}", "public static MyOrders createEntity(EntityManager em) {\n MyOrders myOrders = new MyOrders();\n return myOrders;\n }", "protected T getEntity() {\r\n\t\treturn entity;\r\n\t}", "public T save(T entity) throws Exception{\n\t\tentity = em.merge(entity);\n\t\treturn entity;\n\t}", "protected abstract Serializable getEntity();", "public <T> T initialize(T entity);", "public static Foto createEntity(EntityManager em) {\n Foto foto = new Foto()\n .coordenadaa(DEFAULT_COORDENADAA)\n .coordenadae(DEFAULT_COORDENADAE)\n .coordenadan(DEFAULT_COORDENADAN)\n .data(DEFAULT_DATA)\n .descricaoString(DEFAULT_DESCRICAO_STRING)\n .foto(DEFAULT_FOTO)\n .lado(DEFAULT_LADO)\n .link(DEFAULT_LINK)\n .numero(DEFAULT_NUMERO)\n .picasaId(DEFAULT_PICASA_ID)\n .ponto(DEFAULT_PONTO)\n .thumb(DEFAULT_THUMB);\n return foto;\n }", "public static NoteMaster createEntity(EntityManager em) {\n NoteMaster noteMaster = new NoteMaster()\n .semestre(DEFAULT_SEMESTRE)\n .noteCC1(DEFAULT_NOTE_CC_1)\n .noteCC2(DEFAULT_NOTE_CC_2)\n .noteFinal(DEFAULT_NOTE_FINAL)\n .date(DEFAULT_DATE);\n return noteMaster;\n }", "protected T createSimulatedExistingEntity() {\n final T entity = createNewEntity();\n entity.setId(IDUtil.randomPositiveLong());\n\n when(getDAO().findOne(entity.getId())).thenReturn(entity);\n return entity;\n }", "public static Mentor createEntity(EntityManager em) {\n Mentor mentor = new Mentor()\n .firstName(DEFAULT_FIRST_NAME)\n .lastName(DEFAULT_LAST_NAME)\n .patronymic(DEFAULT_PATRONYMIC)\n .phone(DEFAULT_PHONE)\n .email(DEFAULT_EMAIL)\n .skype(DEFAULT_SKYPE)\n .country(DEFAULT_COUNTRY)\n .city(DEFAULT_CITY)\n .maxStudents(DEFAULT_MAX_STUDENTS);\n return mentor;\n }", "void create(Student entity);", "Entity getEntityById(Long id);", "public void persist(Book entity)\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tbookdao.openCurrentSessionwithTransation();\r\n\t\t\tbookdao.persist(entity);\r\n\t\t\tbookdao.closeSessionwithTransaction();\r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "void save(T entity, boolean editMode) throws PersistenceException;", "public static Pessoa createEntity(EntityManager em) {\n Pessoa pessoa = new Pessoa()\n .nome(DEFAULT_NOME)\n .email(DEFAULT_EMAIL)\n .telefone(DEFAULT_TELEFONE)\n .dataNascimento(DEFAULT_DATA_NASCIMENTO)\n .cadastro(DEFAULT_CADASTRO);\n return pessoa;\n }", "public static Produit createEntity(EntityManager em) {\n Produit produit = new Produit()\n .designation(DEFAULT_DESIGNATION)\n .soldeInit(DEFAULT_SOLDE_INIT)\n .prixAchat(DEFAULT_PRIX_ACHAT)\n .prixVente(DEFAULT_PRIX_VENTE)\n .quantiteDispo(DEFAULT_QUANTITE_DISPO)\n .quantiteInit(DEFAULT_QUANTITE_INIT)\n .seuilReaprov(DEFAULT_SEUIL_REAPROV)\n .reference(DEFAULT_REFERENCE);\n return produit;\n }", "public T doSave(T entity)\n {\n preDoSave(entity);\n session.saveOrUpdate(entity);\n postDoSave(entity);\n\n return entity;\n }", "public static PostponeRecord createEntity(EntityManager em) {\n PostponeRecord postponeRecord = new PostponeRecord()\n .driverId(DEFAULT_DRIVER_ID)\n .vehicleId(DEFAULT_VEHICLE_ID)\n .companyId(DEFAULT_COMPANY_ID)\n .receiptNumber(DEFAULT_RECEIPT_NUMBER)\n .operationTime(DEFAULT_OPERATION_TIME)\n .plateNumber(DEFAULT_PLATE_NUMBER)\n .driverName(DEFAULT_DRIVER_NAME)\n .postponeData(DEFAULT_POSTPONE_DATA)\n .remark(DEFAULT_REMARK);\n return postponeRecord;\n }", "<S extends T> S save(S entity);", "<S extends T> S save(S entity);", "public void save(PtJJdwcy entity);" ]
[ "0.789201", "0.75035375", "0.6925754", "0.690005", "0.690005", "0.68777305", "0.6798418", "0.67613685", "0.6696762", "0.667674", "0.66039085", "0.65937454", "0.65680057", "0.656142", "0.656142", "0.65604943", "0.64648026", "0.64399785", "0.64131135", "0.64071125", "0.63934636", "0.63324475", "0.6297339", "0.6257356", "0.62485695", "0.62170506", "0.62088317", "0.61919695", "0.6167947", "0.61490685", "0.6147975", "0.6147975", "0.6147975", "0.61420727", "0.6138886", "0.61300325", "0.6128024", "0.61232394", "0.6117276", "0.6107769", "0.61053014", "0.6078848", "0.6069128", "0.6059647", "0.6054133", "0.604744", "0.6044933", "0.6042108", "0.60375094", "0.60248536", "0.5982641", "0.5951759", "0.59311014", "0.59232163", "0.592175", "0.5920316", "0.5919335", "0.59151644", "0.5911742", "0.58996814", "0.58940035", "0.587489", "0.58652824", "0.58532983", "0.58506227", "0.5850515", "0.58447677", "0.58383834", "0.58289874", "0.5823521", "0.5822185", "0.5821624", "0.58199733", "0.5819585", "0.580865", "0.58054775", "0.5801105", "0.5800139", "0.57942295", "0.57846737", "0.57836545", "0.57802147", "0.5778048", "0.5776265", "0.5769427", "0.57648414", "0.57609016", "0.5759611", "0.575522", "0.57503664", "0.5749229", "0.57475585", "0.57431084", "0.5740301", "0.5737506", "0.5726931", "0.5725571", "0.57205516", "0.57160974", "0.57160974", "0.5711542" ]
0.0
-1
Refresh the state of the instance from the database, overwriting changes made to the entity, if any.
public final void refresh(final E entity) { getJpaTemplate().refresh(entity); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void reload () {\n\t\tentity = uuidManager.get(uuid);\n\t\treloadAccessors();\n\t\tcheckAccessors();\n\t}", "@Override\n protected void forceRefresh() {\n if (getEntity() != null) {\n super.forceRefresh();\n }\n }", "@Override\n\tpublic void refresh(Object entity) {\n\t\t\n\t}", "@Transactional\n public void refresh(TaskInstanceEntity taskInstanceEntity) {\n entityManagerProvider.get().refresh(taskInstanceEntity);\n }", "public T doRefresh(T entity)\n {\n session.refresh(entity);\n return entity;\n }", "@Override\n\tpublic void refresh(Object entity, LockModeType lockMode) {\n\t\t\n\t}", "@Override\n\tpublic void refresh(Object entity, LockModeType lockMode, Map<String, Object> properties) {\n\t\t\n\t}", "@Override\n\tpublic void refresh(Object entity, Map<String, Object> properties) {\n\t\t\n\t}", "public void reloadEntity(Entity entity) throws RepositoryException {\n\t\tDatanucleusCRUDUtils.refreshObject(entity);\n\t\t\n\t}", "public void updateEntity();", "public void flushEntityCache() {\n super.flushEntityCache();\n }", "@Override\n public E update(E entity) {\n LOG.info(\"[update] Start: entity = \" + entity.getClass().getSimpleName());\n entityManager.merge(entity);\n LOG.info(\"[update] End\");\n return entity;\n }", "public void update() {\n\t\tSession session = DBManager.getSession();\n\t\tsession.beginTransaction();\n\t\tsession.update(this);\n\t\tsession.getTransaction().commit();\n\t}", "Snapshot refresh();", "public void reload() {\n log.debug(\"Reloading bicycles after update to table\");\n try{\n bicycles.clear();\n bicycles.addAll(bicycleManager.findAllBicycles());\n checkAvail();\n fireTableDataChanged();\n }catch(ServiceFailureException ex){\n log.error(\"SFE reloading bicycles after update\");\n throw new ServiceFailureException(ex);\n }catch(IllegalArgumentException ex){\n log.error(\"IAE reloading bicycles\");\n }\n }", "public void update(){\r\n\t\tthis.loadRecords();\r\n\t}", "<T> void refresh(T persistentObject);", "@Override\n\tpublic ImageEntity update(Object entity) {\n\t\tDatabaseContext.merge(entity);\n\t\treturn (ImageEntity) entity;\n\t}", "public void refresh() {\n\n realm.refresh();\n }", "public void refresh() {\n\n realm.refresh();\n }", "public void refreshData() {\n\n if (!mUpdatingData) {\n new RefreshStateDataTask().execute((Void) null);\n }\n }", "@Override\r\n\t\t\tpublic void onPersistSuccess(EntityUpdatedEvent event) {\n\t\t\t\tglobalApplicationState.refreshPage();\r\n\t\t\t}", "public void update() {\n manager.update();\n }", "@Transactional(readOnly = true)\n\tpublic void refresh() {\n\t\tswitch (actualView) {\n\t\tcase LIST:\n\t\t\trefreshList();\n\t\t\tbreak;\n\t\tcase EDIT:\n\t\t\t// refreshForm(); // TODO\n\t\t\tbreak;\n\t\t}\n\t}", "public void refresh()\n {\n LOG.trace(\"Refreshing DietTreatment\");\n DietTreatmentDAO dao = DAOFactory.getInstance().getDietTreatmentDAO();\n dao.refresh(_dietTreatment.getModel());\n reloadTreatmentData();\n }", "public void reloadData() {\n\t\tinitializeStormData();\n\t\tsuper.reloadData();\n\t}", "public void reloadData() {\n log.debug(\"Getting value from method {}\", method.getName());\n T fetchedValue = (T) executeMethod(instance, method, null);\n setData(fetchedValue);\n }", "@Override\r\n\tpublic void refresh(boolean keepChanges) throws RepositoryException {\n\t\t\r\n\t}", "@Override\n\tpublic void doReload() throws BusinessException, Exception {\n\t\t\n\t}", "public void refreshData(){ \n \t\tif(!mIsFirstRun){\n \t if(mDb == null) mDb = new Sqlite(this.getContext());\n \t if(!mDb.isOpen()) mDb.openRead();\n \t \n \t\t\tgetLoaderManager().restartLoader(0,null,this);\n \t\t}else mIsFirstRun = false;\n \t}", "public void reload()\r\n\t{\r\n\t\tmEntities.clear();\r\n\t\tmParticles.clear();\r\n\t\tStats.instance().setBananaLevel();\r\n\t\tloadBlocks();\r\n\t}", "public entity.KeyableBean refresh() {\n return ((com.guidewire.pl.domain.persistence.core.KeyableBeanPublicMethods)__getDelegateManager().getImplementation(\"com.guidewire.pl.domain.persistence.core.KeyableBeanPublicMethods\")).refresh();\n }", "public entity.KeyableBean refresh() {\n return ((com.guidewire.pl.domain.persistence.core.KeyableBeanPublicMethods)__getDelegateManager().getImplementation(\"com.guidewire.pl.domain.persistence.core.KeyableBeanPublicMethods\")).refresh();\n }", "public entity.KeyableBean refresh() {\n return ((com.guidewire.pl.domain.persistence.core.KeyableBeanPublicMethods)__getDelegateManager().getImplementation(\"com.guidewire.pl.domain.persistence.core.KeyableBeanPublicMethods\")).refresh();\n }", "public void refreshData() {\r\n\t\tfireTableDataChanged();\r\n\t\tgetTable().tableChanged(new TableModelEvent(this));\r\n\t}", "E update(E entity);", "E update(E entity);", "public void refreshState() {\n if (this.currentPost != null) {\n postId = this.currentPost.getId();\n this.currentPost = ctrl.getPost(postId);\n }\n if (this.currentUser != null) {\n username = this.currentUser.getUsername();\n this.currentUser = ctrl.getSystemUser(username);\n }\n this.postList = ctrl.getPostList();\n this.userList = ctrl.getUserList();\n\n inputTextNumber = 0;\n //ctrl.refreshState();\n }", "public entity.KeyableBean refresh() {\n return ((com.guidewire.pl.domain.persistence.core.KeyableBeanPublicMethods)__getDelegateManager().getImplementation(\"com.guidewire.pl.domain.persistence.core.KeyableBeanPublicMethods\")).refresh();\n }", "public entity.KeyableBean refresh() {\n return ((com.guidewire.pl.domain.persistence.core.KeyableBeanPublicMethods)__getDelegateManager().getImplementation(\"com.guidewire.pl.domain.persistence.core.KeyableBeanPublicMethods\")).refresh();\n }", "public entity.KeyableBean refresh() {\n return ((com.guidewire.pl.domain.persistence.core.KeyableBeanPublicMethods)__getDelegateManager().getImplementation(\"com.guidewire.pl.domain.persistence.core.KeyableBeanPublicMethods\")).refresh();\n }", "public void update()\n {\n modifier = coral.getCurrentSubject();\n modified = new Date();\n try\n {\n persistence.save(this);\n }\n catch(SQLException e)\n {\n throw new BackendException(\"failed to update resource's persitent image\", e);\n }\n try\n {\n Resource impl = coral.getStore().getResource(getId());\n coralEventHub.getGlobal().fireResourceChangeEvent(impl, modifier);\n }\n catch(EntityDoesNotExistException e)\n {\n throw new BackendException(\"inconsistent data\", e);\n }\n }", "public void run() {\n\n if (cancelUpdate(persistentEntity, entityAccess)) {\n return;\n }\n\n updateEntry(persistentEntity, updateId, e);\n firePostUpdateEvent(persistentEntity, entityAccess);\n }", "public void refresh()\n {\n refresh( null );\n }", "@Override\n\t@Transactional\n\tpublic T update(T entity) {\n\t\tif (entity == null) {\n\t\t\treturn null;\n\t\t}\n\t\thibernateTemplate.update(entity);\n\t\thibernateTemplate.getSessionFactory().getCurrentSession().flush();\n\t\thibernateTemplate.getSessionFactory().getCurrentSession().clear();\n\t\treturn getById(entity.getId());\n\t}", "@Override\n\tpublic void queryUpdate() {\n\t\tneedToUpdate = true;\n\t}", "void update(CE entity);", "public void reload() {\n reload(true);\n reload(false);\n }", "@Override\n public void refresh() {\n }", "public void flush() {\n entityManager.flush();\n }", "public void revertChanges()\n {\n // TODO: Find a good way to revert changes\n // reload patient\n HibernateUtil.currentSession().evict(_dietTreatment.getModel());\n PatientDAO dao = DAOFactory.getInstance().getPatientDAO();\n _patient.setModel(dao.findById(_patient.getPatientId(), false));\n }", "public void update(E entity);", "@Override\n\tpublic T update(T entity) {\n\t\treturn entity;\n\t}", "protected void updated() {\n if (state.isSynced()) {\n this.state.setState(ENodeState.Updated);\n }\n }", "private void refreshItem() {\n\t\tboundSwagForm.getField(\"isFetchOnly\").setValue(true);\r\n\t\tboundSwagForm.saveData(new DSCallback() {\r\n\t\t\t//reselect selected tile (call to saveData de-selects it)\r\n\t\t\tpublic void execute(DSResponse response,\r\n\t\t\t\t\tObject rawData, DSRequest request) {\r\n\t\t\t\t//get updated record\r\n\t\t\t\tfinal TileRecord rec = new TileRecord(request.getData());\r\n\t\t\t\t//Note: selectRecord seems to only work on the tile index\r\n\t\t\t\titemsTileGrid.selectRecord(itemsTileGrid.getRecordIndex(rec));\r\n\t\t\t\t//saveData adds tileRecord to the end.\r\n\t\t\t\t//make sure sort order is preserved\r\n\t\t\t\tdoSort();\r\n\t\t\t}});\r\n\t}", "protected void refresh(T item) {\n\t\tSession session = null;\n\t\ttry {\n\t\t\tsession = mDbHelper.beginTransaction();\n\t\t\tsession.refresh(item);\n\t\t\tmDbHelper.endTransaction(session);\n\t\t} catch (Exception e) {\n\t\t\tmDbHelper.cancelTransaction(session);\n\t\t\tAppLogger.error(e, \"Failed to execute refresh\");\n\t\t}\n\t}", "public static void save() {\n if (instance != null) {\n // -> SyncedDatabases.syncAll();\n instance.markDirty();\n }\n }", "public void refresh() {\n\n odp.refresh();\n\n\n }", "public void refresh() {\r\n\t\tinit();\r\n\t}", "@Override\n\tpublic void updateEntity()\n\t{\n\t\tif (structureComplete() && checkCountdown >= CHECK_MAX)\n\t\t{\n\t\t\tcheckCountdown = 0;\n\t\t\t\n\t\t\t// Refresh the core structure.\n\t\t\tupdateStructure();\n\t\t}\n\t\telse checkCountdown++;\n\t}", "@Override\n public void update(EntityModel model) {\n super.update(model);\n\n }", "private void refreshState() {\n exposureNotificationViewModel.refreshState();\n exposureNotificationViewModel.refreshNotificationsEnabledState(this);\n }", "@Override\n\tpublic void refresh() {\n\n\t}", "public void refresh(final IDfSession session) throws DfException {\n\t\tobject = session.getObject(object.getObjectId());\n\t}", "@Override\n public void entityRPClassUpdate(RPObject entity) {\n }", "public void refresh() {\n }", "Snapshot refresh(Context context);", "@PostPersist\n\t@PostUpdate\n\tprivate void storeChangesToDw() {\n\t}", "protected void refresh() {\n\t}", "@Override\r\n\tpublic void update(T t) {\n\t\tsuper.getSessionFactory().getCurrentSession().update(t);\r\n\t\tsuper.getSessionFactory().getCurrentSession().flush();\r\n\t}", "@Override\n\tpublic void refresh() {\n\t\t\n\t}", "@Override\n\tpublic void refresh() {\n\t\t\n\t}", "@Override\r\n\tpublic T update(T entity) throws Exception {\n\t\ttry {\r\n\t\t\tthis.getcurrentSession().update(entity);\r\n\t\t\treturn entity;\r\n\t\t}catch (NonUniqueObjectException e) {\r\n\t\t\tthis.getcurrentSession().merge(entity);\r\n\t\t\treturn entity;\r\n\t\t} catch (DataAccessException e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\tthrow new Exception(\"更新\" + entity.getClass().getName() + \"实例失败\", e);\r\n\t\t}\r\n\t}", "public void reload(){\n populateList();\n }", "public void flush() {\n\t\tthis.getCurrentSession().flush();\r\n\t}", "protected void refreshFromRepository() {\n\t\t\r\n\t\tObject[] elements = new Object[]{};\r\n\t\tmodelObject.eContainer();\r\n\t\t\r\n\t\tif (fFilteredList != null) {\r\n\t\t\t\r\n\t\t\tfFilteredList.setAllowDuplicates(showDuplicates);\r\n\t\t\tfFilteredList.setElements(elements);\r\n\t\t\tfFilteredList.setEnabled(true);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tif (fTreeViewer != null) {\r\n\t\t\tfTreeViewer.setInput(null);\r\n\t\t}\t\t\r\n\t}", "public void refresh()\n {\n PropertyManager.getInstance().refresh();\n init(this.path);\n }", "@Override\n @Transactional\n public D refreshDto(D dto, E entity) throws MedragServiceException {\n try {\n E refreshed = entityDao.refreshEntity((E) new ModelMapper().map(dto, entity.getClass()));\n return (D) new ModelMapper().map(refreshed, dto.getClass());\n } catch (MedragRepositoryException e) {\n throw new MedragServiceException(e);\n }\n }", "public T update(final T entity)\n\t{\n\t\treturn em.merge(entity);\n\t}", "public void update() {\r\n\t\tCampLeaseDAO leaseDao = (CampLeaseDAO) getApplicationContext().getBean(\"leaseDaoBean\", CampLeaseDAO.class);\r\n\t\tleaseDao.update(this); // routine now uses leaseDao to get CampLease class\r\n\t}", "void refreshEntities(Collection<Entity> entities);", "@Override\n\tpublic void updateEntity(T t) {\n\t\tgetSession().update(t);\n\t}", "@Override\n public void updateDatabase() {\n }", "public void refresh() {\n getIndexOperations().refresh();\n }", "public void saveState() {\n\t\tsuper.saveState();\n\t}", "@Override\n\tpublic Map<String, Object> update(StoreBase entity) {\n\t\treturn null;\n\t}", "public void update(T entity) {\n\t\tsessionFactory.getCurrentSession().update(entity);\n\t}", "private void updateDB() {\n }", "@Override\n\tpublic void update(T entity) {\n\t\tbaseDaoImpl.update(entity);\n\t}", "public synchronized boolean refresh() {\n\t\treturn this.refresh(false);\n\t}", "@Transactional \n\tpublic void updateAll() {\n\t\t\n\t\tIterator<Pharmacy> newList = pharmacyRepository1.getAllEntity().iterator();\n\t\twhile (newList.hasNext()) {\n\t\t\tPharmacy pharmacy = newList.next();\n\t\t\tlistStockInPharmacy(pharmacy);\n\t\t\t}\n\t\t\n\t}", "protected void refreshAll() {\n refreshProperties();\n\t}", "public synchronized boolean refresh() \n {\n return refresh(false);\n }", "void update(T entity);", "void update(T entity);", "T update(T entity);", "T update(T entity);", "Account refresh();", "@Override\n\tpublic void update(EntityManagerFactory emf, Stop entity) {\n\t\t\n\t}", "public void load() {\n updater.load(-1); // -1 because Guest ID doesn't matter.\n }" ]
[ "0.70595884", "0.69267017", "0.6909046", "0.6786049", "0.6622186", "0.6612364", "0.64432144", "0.6301075", "0.62957823", "0.62241316", "0.6206904", "0.6191928", "0.617765", "0.6101399", "0.60744387", "0.606067", "0.6055199", "0.6037372", "0.6029605", "0.6029605", "0.5998459", "0.5983571", "0.5977748", "0.5906864", "0.58442706", "0.58440745", "0.58416146", "0.58116597", "0.58076656", "0.57895315", "0.57669514", "0.572056", "0.572056", "0.572056", "0.5718337", "0.57116747", "0.57116747", "0.5711092", "0.5692325", "0.5692325", "0.5692325", "0.5687464", "0.56872404", "0.5674084", "0.5662377", "0.56595457", "0.56496215", "0.56349623", "0.560463", "0.55969614", "0.5586235", "0.55816054", "0.5577669", "0.5575109", "0.55646217", "0.5547768", "0.55389386", "0.55243933", "0.55213004", "0.5505112", "0.54965746", "0.54959685", "0.5491423", "0.54840666", "0.5473151", "0.54643345", "0.5460672", "0.54568183", "0.54484993", "0.5446311", "0.5437519", "0.5437519", "0.5417498", "0.5408759", "0.5402131", "0.54014236", "0.53843355", "0.5383286", "0.5379165", "0.5375603", "0.5373583", "0.53725487", "0.5370143", "0.5363044", "0.53523684", "0.5344663", "0.5333901", "0.5330786", "0.5330055", "0.53264034", "0.532232", "0.53217655", "0.5318077", "0.5310247", "0.5310247", "0.5307541", "0.5307541", "0.5299417", "0.52963126", "0.5291033" ]
0.65288126
6
Remove the entity instance.
public final void remove(final E entity) { getJpaTemplate().remove(entity); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void remove(Object entity) {\n\t\t\n\t}", "@Override\r\n\tpublic void delete(T instance) {\r\n\t\tif (isManaged(instance)) {\r\n\t\t\tinstance = loadInstance(instance.getId());\r\n\t\t\tgetEntityManager().remove(getEntityManager().merge(instance));\r\n\t\t}\r\n\t}", "public void removeEntity(Entity entity){\n entityList.remove(entity);\n }", "@Override\n\tpublic void removeEntity(T t) {\n\t\tgetSession().delete(t);\n\t}", "@Override\n\tpublic void remove(Post entity) {\n\t\t\n\t}", "public void entityRemoved() {}", "void removeEntity(IViewEntity entity);", "@Override\n public E delete(final E entity) {\n LOG.info(\"[delete] Start: entity = \" + entity.getClass().getSimpleName());\n entityManager.remove(entity);\n LOG.info(\"[delete] End\");\n return entity;\n }", "abstract protected void removeEntity(Entity entity);", "public abstract void remove(Class<?> entity, Object paramObject);", "@Observable\n public AbstractBatchAction<T> removeFromRemoveEntities(final T entity) {\n this.removeEntities.remove(entity);\n return this;\n }", "public void delete(T entity) throws Exception{\n\t\tem.remove(entity);\n\t}", "void remove(T instance);", "@Override\n\tpublic void remove(EmpType entity) {\n\t\t\n\t}", "public final void delete() {\n\t\tOllie.delete(this);\n\t\tOllie.removeEntity(this);\n\t\tnotifyChange();\n\t\tid = null;\n\t}", "@Test\n\tpublic void testRemoval() {\n\t\tLong id = RedisQuery.nextUniqueId();\n\t\tEntityTest et = new EntityTest(id, \"EntityTestToRemove\");\n\t\tif (RedisQuery.save(et, id)) {\n\t\t\t// Remove the entity\n\t\t\tRedisQuery.remove(et, id);\n\t\t} else {\n\t\t\tthrow new AssertionError(\"Unable to create entity to remove\");\n\t\t}\n\t}", "protected void delete(Object entity) {\r\n try {\r\n entityManager.getTransaction().begin();\r\n entityManager.remove(entity);\r\n entityManager.getTransaction().commit();\r\n } catch (Exception e) {\r\n System.err.println(\"Erro ao remover Entidade \" + e.getMessage());\r\n }\r\n }", "boolean removeInstance(Instance instance);", "void remove(Student entity);", "public void remove() {\n\t\tSession session = DBManager.getSession();\n\t\tsession.beginTransaction();\n\t\tsession.delete(this);\n\t\tsession.getTransaction().commit();\n\t}", "public void remove(E e) {\n\t\tentities.remove(e);\n\t}", "@DELETE\n public void delete() {\n PersistenceService persistenceSvc = PersistenceService.getInstance();\n try {\n persistenceSvc.beginTx();\n deleteEntity(getEntity());\n persistenceSvc.commitTx();\n } finally {\n persistenceSvc.close();\n }\n }", "public void remove() {\n removed = true;\n if (room == null)\n return;\n room.removeEntity(this);\n }", "@Observable\n public AbstractBatchAction<T> removeFromSaveEntities(final T entity) {\n this.saveEntities.remove(entity);\n return this;\n }", "@Override\n\tpublic ImageEntity delete(Object entity) {\n\t\tDatabaseContext.delete(entity);\n\t\treturn (ImageEntity) entity;\n\t}", "void delete(E entity);", "void delete(E entity);", "public void remove(T entity) throws DataAccessException;", "void entityDestroyed(Entity entity);", "void remove(ReferenceData instance) throws DataException;", "public void remove(Order entity) {\n\t\tsuper.internalRemove(entity);\n\t}", "public void remove(final Employee persistentInstance) {\n LOG.debug(\"removing Employee instance\");\n try {\n entityManager.remove(persistentInstance);\n LOG.debug(\"remove successful\");\n } catch (RuntimeException re) {\n LOG.error(\"remove failed\", re);\n throw re;\n }\n }", "private void remove() {\n disableButtons();\n clientgui.getClient().sendDeleteEntity(cen);\n cen = Entity.NONE;\n }", "private void removeEntity(int index)\n\t{\n\t\tthis.entities.get(index).onDespawn();\n\t\tthis.spatialHashGrid.remove(this.entities.get(index).getSpatialHashGridHandle());\n\t\t\n\t\tthis.entities.set(index, this.entities.get(this.entities.size() - 1));\n\t\tthis.entities.remove(this.entities.size() - 1);\n\t}", "public void instanceRemoved(Contextual<?> bean, CreationalContext<?> context, Object instance);", "public void delete(Book entity) {\n\t\tentityManager.remove(entityManager.contains(entity) ? entity : entityManager.merge(entity));\n\t}", "@Override\r\n\tpublic void delete(T entity) throws Exception {\n\t\ttry {\r\n\t\t\tthis.getcurrentSession().delete(entity);\r\n\t\t} catch (DataAccessException e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\tthrow new Exception(\"删除\" + entity.getClass().getName() + \"实例失败\", e);\r\n\t\t}\r\n\t}", "public void deleteInstance(){\n //cancels the runnable\n shouldCancelRunnable = true;\n //remove the chest from the map to avoid confusion\n this.location.getBlock().setType(Material.AIR);\n //unregister from all events, we're done!\n HandlerList.unregisterAll(this);\n }", "public E remove();", "public E remove();", "@Override\n\tpublic void removechild(EndpointEntity entity) {\n\t\t\n\t}", "public void deletePhysical(final T entity)\n\t{\n\t\tem.remove(entity);\n\t}", "public void remove() {\n\n }", "@Override\n public void removeFromDb() {\n }", "void removeConstraintEntity(IViewEntity entity);", "E remove(Id id);", "void delete(Entity entity);", "void deleteEntityById(Long id);", "void removeFutureInstance();", "@Override\n\tpublic void delete(EntityManagerFactory emf, Stop entity) {\n\t\t\n\t}", "public void delete(E entity){\n Object idEntity = HibernateUtil.getIdEntity(entity);\n EntityTransaction entityTransaction = entityManager.getTransaction();\n entityTransaction.begin();\n entityManager.createNativeQuery(\"delete from \" + entity.getClass().getSimpleName().toLowerCase() +\n \" where id = \" + idEntity).executeUpdate();\n entityTransaction.commit();\n }", "public void delete() throws EntityPersistenceException {\n\n }", "@Override\n\tpublic int deleteObject(Evaluate entity) {\n\t\treturn evaluateMapper.deleteObject(entity);\n\t}", "public int removeEntity(Entity e) {\n Entity removed = this.entity_list_.remove(e.name_);\n if (removed != null) {\n System.out.println(removed.name_ + \" has been removed from the map\");\n } else {\n System.err.println(\"The entity to be removed does not exist in the list of entities\");\n }\n if (this.map_grid_[e.getMapRelation().getMyYCoordinate()][e.getMapRelation().getMyXCoordinate()].getEntity() == e) {\n this.map_grid_[e.getMapRelation().getMyYCoordinate()][e.getMapRelation().getMyXCoordinate()].removeEntity();\n //e.setMapRelation(null);\n //System.gc();\n return 0;\n } else {\n System.err.println(\"The avatar to be removed cannot be found on the map.\");\n System.exit(-88);\n return -1;\n }\n }", "public void delete(T entity) {\n\t\tsessionFactory.getCurrentSession().delete(entity);\n\t}", "public void deactivate() {\n\t\tentity.deactivateInstance(this);\n\t}", "@Override\n\tpublic PersonelContract Delete(PersonelContract entity) {\n\t\treturn null;\n\t}", "public void destroy(@Entity int entity) {\n nDestroy(mNativeObject, entity);\n }", "@Override\n public void remove() {\n }", "public void preRemove(T entity) {\n }", "public E remove() {\n\t\t// your code here\n\t\treturn null;\n\t}", "public void remove() {\n super.remove();\n }", "public void remove() {\n super.remove();\n }", "public void remove() {\n super.remove();\n }", "public void remove() {\n super.remove();\n }", "public void remove() {\n super.remove();\n }", "public void remove() {\n super.remove();\n }", "public void remove() {\n super.remove();\n }", "void delete(T entity);", "void delete(T entity);", "public void delete(HrJBorrowcontract entity);", "public void remove()\n {\n domain.removeParticipant(participant);\n }", "public <T> boolean delete(T entity);", "public void saveAndClear(E instance);", "@Override\n public void remove() {\n }", "@Override\n\t@Transactional\n\tpublic T delete(T entity) {\n\t\tif (entity == null) {\n\t\t\treturn null;\n\t\t}\n\t\thibernateTemplate.delete(entity);\n\t\treturn entity;\n\t}", "@Override\r\n\tpublic void delete(Empregado entity) throws Exception {\n\t\tentity.setAtivo(false);\r\n\t\tem.unwrap(Session.class).update(entity);\r\n\t}", "public void delete(ShoppingCartLine entity) {\n \t\t\t\tLogUtil.log(\"deleting ShoppingCartLine instance\", Level.INFO, null);\n\t try {\n \tentity = entityManager.getReference(ShoppingCartLine.class, entity.getId());\n entityManager.remove(entity);\n \t\t\tLogUtil.log(\"delete successful\", Level.INFO, null);\n\t } catch (RuntimeException re) {\n \t\t\t\tLogUtil.log(\"delete failed\", Level.SEVERE, re);\n\t throw re;\n }\n }", "@Override\n\t\tpublic void remove() {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void remove() {\n\t\t\t\n\t\t}", "void delete(Object entity);", "@Override\n public void remove() {\n deleteFromModel();\n deleteEdgeEndpoints();\n\n setDeleted(true);\n if (!isCached()) {\n HBaseEdge cachedEdge = (HBaseEdge) graph.findEdge(id, false);\n if (cachedEdge != null) cachedEdge.setDeleted(true);\n }\n }", "@Override\r\n\tpublic E remove() {\n\t\treturn null;\r\n\t}", "public void eliminar(Long Id){\r\n EspecieEntity productoEliminar=em.find(EspecieEntity.class, Id);\r\n em.remove(productoEliminar);\r\n }", "@Override\n\t\t\t\tpublic void remove() {\n\t\t\t\t\t\n\t\t\t\t}", "public void remove() {\r\n super.remove();\r\n }", "@Override\n\tpublic void remover(Parcela entidade) {\n\n\t}", "@DeleteMapping(name = \"delete\")\n\tpublic ResponseEntity<?> delete(@ModelAttribute Entity entity) {\n\t\tgetService().delete(entity);\n\t\treturn ResponseEntity.ok().build();\n\t}", "@Override\n public void removed(Entity e) {\n AI ai = AIm.get(e);\n if (ai.active) {\n ai.active = false;\n startMove = startAction = true;\n groupAiDone= false;\n screen.processTurn();\n // Future note: This transition comes quite abruptly.\n // It would be nice to somehow delay it, but because\n // the entity has just been removed, it won't be\n // processed any more. Perhaps give processTurn()\n // a boolean argument which will pause for a second\n // or so before selecting the new entity and moving\n // the camera on.\n\n }\n }", "public void remove(IBasicEntity ent) throws CachingException {\n this.remove(ent.getEntityIdentifier());\n }", "public void remove();", "public void remove();", "public void remove();", "public void remove();", "public void remove();", "@Override\n\tpublic E remove() {\n\t\treturn null;\n\t}", "Boolean delete(T entity);", "@Override\n\tpublic void delete(T entity) {\n\t}", "@Override\n\tpublic void delete(Translator entity) {\n\t\t\n\t}", "public void delete(final T entity)\n\t{\n\t\tentity.setDeleted(true);\n\t\t em.merge(entity);\n\t}" ]
[ "0.71894", "0.7170637", "0.70335084", "0.69903755", "0.69825506", "0.6966224", "0.69654053", "0.6927933", "0.68814", "0.6676353", "0.66739595", "0.6671698", "0.6663473", "0.66045403", "0.6593228", "0.65373874", "0.64947873", "0.64819187", "0.6429435", "0.6426916", "0.64080113", "0.6396543", "0.63514125", "0.63392836", "0.63217247", "0.6284563", "0.6284563", "0.6282895", "0.6282307", "0.62756944", "0.62743706", "0.62551343", "0.62503606", "0.623464", "0.622936", "0.6204823", "0.6132477", "0.6126103", "0.61165774", "0.61165774", "0.6092571", "0.6054055", "0.6033843", "0.60313153", "0.6018271", "0.6012293", "0.6005185", "0.6000474", "0.5997811", "0.5976471", "0.5976084", "0.5967938", "0.5965983", "0.59638363", "0.59571826", "0.59546435", "0.5950488", "0.5930918", "0.5929686", "0.5923197", "0.59213424", "0.59094405", "0.59094405", "0.59094405", "0.59094405", "0.59094405", "0.59094405", "0.59094405", "0.5907145", "0.5907145", "0.59069765", "0.59049886", "0.590096", "0.58955026", "0.58908814", "0.5887578", "0.5882491", "0.58800626", "0.5879958", "0.5879958", "0.58795404", "0.58748037", "0.58738977", "0.58726585", "0.58709466", "0.58675545", "0.5858867", "0.58540416", "0.58479357", "0.5844428", "0.58364683", "0.58364683", "0.58364683", "0.58364683", "0.58364683", "0.58327454", "0.5823942", "0.58224714", "0.581311", "0.58069754" ]
0.71653515
2
O cartao premium numa compra acumula a parte inteira de 30% do total gasto, alem disso, o cartao soma mais 10 pontos a cada R$100,00.
public int addPontos(double gastos) { double pontos = gastos * BONUS_PREMIUM; int totalPontos = (int) pontos; if (gastos > 100) { double adicional = gastos / 100; totalPontos += (int) adicional * 10; } return totalPontos; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double calcular_costo() {\n\t\t return 1.3*peso+30 ;\n\t}", "public int getProteksi(){\n\t\treturn (getTotal() - getPromo()) * protectionCost / 100;\n\t}", "public BigDecimal getPercentageProfitPLimit();", "public int precioFinal(){\r\n int monto=super.PrecioFinal();\r\n\t \t \r\n\t if (pulgadas>40){\r\n\t monto+=precioBase*0.3;\r\n\t }\r\n\t if (sintonizador){\r\n\t monto+=50;\r\n\t }\r\n\t \r\n\t return monto;\r\n\t }", "public void calcular()\r\n/* 530: */ {\r\n/* 531:556 */ this.facturaProveedorSRI.setMontoIva(this.facturaProveedorSRI.getBaseImponibleDiferenteCero().multiply(\r\n/* 532:557 */ ParametrosSistema.getPorcentajeIva().divide(BigDecimal.valueOf(100L))));\r\n/* 533: */ }", "private void peso(){\r\n if(getPeso()>80){\r\n precioBase+=100;\r\n }\r\n else if ((getPeso()<=79)&&(getPeso()>=50)){\r\n precioBase+=80;\r\n }\r\n else if ((getPeso()<=49)&&(getPeso()>=20)){\r\n precioBase+=50;\r\n }\r\n else if ((getPeso()<=19)&&(getPeso()>=0)){\r\n precioBase+=10;\r\n }\r\n }", "public void calculoPersonal(){\n ayudantes = getAyudantesNecesarios();\n responsables = getResponsablesNecesarios();\n \n //Calculo atencion al cliente (30% total trabajadores) y RRPP (10% total trabajadores):\n \n int total = ayudantes + responsables;\n \n atencion_al_cliente = (total * 30) / 100;\n \n RRPP = (total * 10) / 100;\n \n //Creamos los trabajadores\n \n gestor_trabajadores.crearTrabajadores(RRPP, ayudantes,responsables,atencion_al_cliente);\n \n }", "public float carga(){\n return (this.capacidade/this.tamanho);\n }", "public void precio4e(){\n precioHabitaciones = precioHabitaciones + (cantidadHabitaciones * numeroCamas);\n\n //Restaurante\n if(capacidadRestaurant < 30){\n precioHabitaciones = precioHabitaciones + 10;\n } else if (capacidadRestaurant > 29 && capacidadRestaurant < 51){\n precioHabitaciones = precioHabitaciones + 30;\n } else if (capacidadRestaurant > 50){\n precioHabitaciones = precioHabitaciones + 50;\n }\n\n //Gimnasio\n switch (gimnasio){\n case \"A\":\n precioHabitaciones = precioHabitaciones + 50;\n break;\n case \"B\":\n precioHabitaciones = precioHabitaciones + 30;\n break;\n }\n\n }", "@Override public double getCosto(){\n double d = 190.00;\n return d;\n }", "public double calculoCuotaEspecialOrdinario() {\n\tdouble resultado =0;\n\tresultado = (getMontoCredito()+(getMontoCredito()*getInteres()/100))/getPlazo(); \n\treturn resultado;\n}", "public BigDecimal premiacaoAberturaProduto(Produto p) {\n\t\tfor (PoliticaVendaConsignacaoTipoVendedorProduto politica : tipoVendedor.getPoliticasVCTVP()) {\n\t\t\tif (p.equals(politica.getProduto())) {\n\t\t\t\treturn politica.getAberturaPremiacao();\n\t\t\t}\n\t\t}\n\t\treturn BigDecimal.ZERO;\n\t}", "@Override\n public void calcularIntGanado() {\n intGanado = saldo;\n for(int i = 0; i < plazoInv; i++){\n intGanado += inve * 12;\n intGanado += intGanado * (intAnual / 100);\n }\n intGanado = intGanado - (inve + saldo);\n }", "@Override\n\tpublic int Prix() {\n\t\treturn voiture.Prix() +250;\n\t}", "public double getMargeParProduit(Produit p) {\n\t\tdouble m;\n\t\tif (p.getNomProduit()==\"50%\") {\n\t\t\tm = 0.1;\t\n\t\t}\n\t\telse {\n\t\t\tif (p.getNomProduit()==\"60%\") {\n\t\t\t\tm = 0.05;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tm = 0.2;\n\t\t\t}\n\t\t} return m;\n\t}", "@Test\r\n\tpublic void testPrix() {\r\n\t\tassertEquals(4.50, plat.getPrix(), 0.001);\r\n\t}", "public BigDecimal getPercentageProfitPStd();", "private int calcularPrecio(Repuesto repuesto, boolean formateo, boolean limpieza) {\n int precio = 0;\n if (repuesto != null) {\n precio += repuesto.getPrecio();\n }\n \n if (formateo) {\n precio += 10000;\n }\n \n if (limpieza) {\n precio += 7500;\n }\n return precio;\n }", "public Premium() {\r\n\t\titemName = \"Premium\";\r\n\t\titemPrice = 100;\r\n\t\tcount = 10;\r\n\t}", "public int getPromo() {\n\t\tif (getDistance() <= N*1000) {\n\t\t\treturn 0;\n\t\t} else if (getDistance() > (promoKm + N) * 1000){\n\t\t\treturn promoKm * costPerKm * promo / 100;\n\t\t} else {\n\t\t\treturn getTotal() * promo / 100;\n\t\t}\n\t}", "double getTotalProfit();", "@Override\n public float calculaPreu(PreuTipusHabitacio p) {\n return p.getPreu() * this.perc;\n }", "public void calculateCommission(){\r\n commission = (sales) * 0.15;\r\n //A sales Person makes 15% commission on sales\r\n }", "public double getPreco(){\n return pagamento.getPreco();\n }", "public static void main(String[] args) {\n\n double valorTotal = 36000;\n\n for (int parcela = (int) valorTotal; parcela >= 1; parcela--) {\n double valorParcela = valorTotal / parcela;\n if (valorParcela >= 1000) {\n System.out.println(parcela + \" parcelas de \" + valorParcela + \"R$\");\n }\n }\n }", "public void calculoSalarioBruto(){\n salarioBruto = hrTrabalhada * valorHr;\n }", "public BigDecimal getBSCA_ProfitPriceLimitEntered();", "public double precioFinal(){\r\n \r\n double plus = 0;\r\n \r\n switch(consumoElectrico){\r\n case 'A':\r\n plus +=100;\r\n break;\r\n case 'B':\r\n plus += 80;\r\n break;\r\n case 'C':\r\n plus +=60;\r\n break;\r\n case 'D':\r\n plus +=50;\r\n break;\r\n case 'E':\r\n plus+=30;\r\n break;\r\n case 'F':\r\n plus+=10;\r\n break;\r\n \r\n }\r\n \r\n \r\n if(peso>=0 && peso<=19){\r\n plus+=10;\r\n }else if(peso >=20 && peso<= 49){\r\n plus+=50;\r\n }else if(peso >= 50 && peso<=79){\r\n plus+=80;\r\n }else if(peso>=80){\r\n plus+=100;\r\n }\r\n return precioBase+plus;\r\n }", "public void percentualGordura(){\n\n s0 = 4.95 / denscorp;\n s1 = s0 - 4.50;\n percentgord = s1 * 100;\n\n }", "public BigDecimal premiacaoAberturaTipoProduto(TipoProdutoQuantidade t) {\n\t\tfor (PoliticaAberturaTipoVendedorTipoProduto politica : tipoVendedor.getListaPoliticasATVTP()) {\n\t\t\tif (t.getTipo().equals(politica.getTipoProduto())) {\n\t\t\t\treturn politica.premiacao(t.getQuantidade());\n\t\t\t}\n\t\t}\n\t\treturn BigDecimal.ZERO;\n\t}", "public double obtenerPorcentajeGarantia(double precioProducto) {\r\n\r\n double porcentajeGarantia = AppConfig.porcentajeGarantiaA;\r\n if (precioProducto > AppConfig.montoMaxGarantiaA) {\r\n porcentajeGarantia = AppConfig.porcentajeGarantiaB;\r\n }\r\n return porcentajeGarantia;\r\n\r\n }", "public BigDecimal getBSCA_ProfitPriceLimit();", "public double promedioAlum(){\n setProm((getC1() + getC2() + getC3() + getC4()) / 4);\n return getProm();\n }", "public double precioFinal() {\r\n double aumento = 0;\r\n switch (consumoEnergetico) {\r\n case 'A':\r\n aumento = 100;\r\n break;\r\n case 'B':\r\n aumento = 80;\r\n break;\r\n case 'C':\r\n aumento = 60;\r\n break;\r\n case 'D':\r\n aumento = 50;\r\n break;\r\n case 'E':\r\n aumento = 30;\r\n break;\r\n case 'F':\r\n aumento = 10; \r\n break;\r\n }\r\n if (peso >= 0 && peso <= 19) {\r\n aumento += 10;\r\n }else if ( peso >= 20 && peso <= 49) {\r\n aumento += 50;\r\n }else if ( peso >= 50 && peso <=79 ) {\r\n aumento += 80;\r\n }else if ( peso >= 80 ){\r\n aumento += 100;\r\n }\r\n \r\n double precioFinal = aumento + this.precioBase;\r\n return precioFinal;\r\n }", "public double getStockFinal(long pv) {\n float entree = 0 ;\n float sortie = 0 ;\n\n ArrayList<Produit> produits = null ;\n if (pv==0) produits = produitDAO.getAll();\n else produits = produitDAO.getAllByPv(pv) ;\n\n ArrayList<Mouvement> mouvements = null;\n\n double valeur = 0 ;\n double total = 0 ;\n double quantite = 0 ;\n double cmpu = 0 ;\n double restant = 0 ;\n double qsortie = 0 ;\n double qentree = 0 ;\n // Vente par produit\n Mouvement mouvement = null ;\n Operation operation = null ;\n\n for (int i = 0; i < produits.size(); i++) {\n try {\n mouvements = mouvementDAO.getManyByProductInterval(produits.get(i).getId_externe(),DAOBase.formatter2.parse(datedebut),DAOBase.formatter2.parse(datefin)) ;\n } catch (ParseException e) {\n e.printStackTrace();\n }\n\n if (mouvements != null){\n valeur = 0 ;\n quantite = 0 ;\n restant = 0 ;\n qentree = 0 ;\n cmpu = 0 ;\n qsortie = 0 ;\n\n for (int j = 0; j < mouvements.size(); j++) {\n mouvement = mouvements.get(j) ;\n operation = operationDAO.getOne(mouvement.getOperation_id()) ;\n if (operation==null || (operation.getAnnuler()==1 && operation.getDateannulation().before(new Date())) || operation.getTypeOperation_id().startsWith(OperationDAO.CMD)) continue;\n\n //if (pv!=0 && caisseDAO.getOne(operation.getCaisse_id()).getPointVente_id()!=pv) continue;\n if (j==0)\n if (mouvement.getRestant()==mouvement.getQuantite() && mouvement.getEntree()==0){\n restant = 0 ;\n }\n else restant = mouvement.getRestant() ;\n\n if (mouvement.getEntree()==0) {\n valeur -= mouvement.getPrixA() * mouvement.getQuantite() ;\n qentree += mouvement.getQuantite() ;\n cmpu = mouvement.getPrixA() ;\n }\n else {\n valeur += mouvement.getCmup() * mouvement.getQuantite() ;\n qsortie += mouvement.getQuantite() ;\n }\n /*\n if (restant!=0) cmpu = valeur / restant ;\n else cmpu = mouvement.getCmup() ;\n */\n }\n\n quantite = restant + qentree - qsortie ;\n total+=Math.abs(valeur) ;\n }\n }\n\n return total;\n }", "public void Cobrar() throws InterruptedException{\n System.out.println(\"Por favor indique la cantidad de litros que solicito\");\r\n int litros = sc.nextInt();\r\n String tipo = null;\r\n double costo;\r\n double costoTotal;\r\n do{\r\n System.out.println(\"¿Que tipo de gasolina?, indique magna o premium\");\r\n tipo = sc.nextLine();\r\n }while((!tipo.equalsIgnoreCase(\"magna\"))&&(!tipo.equalsIgnoreCase(\"premium\")));\r\n \r\n if (tipo.equalsIgnoreCase(\"magna\")) {\r\n costo = 19.42;\r\n }else costo = 20.71;\r\n System.out.println(\"Muy bien\");\r\n costoTotal = (litros*costo);\r\n Thread.sleep(2000);\r\n System.out.println(\"El total a pagar es de \"+costoTotal+\" pesos\");\r\n }", "@Override\r\n\tpublic float chekearDatos(){\r\n\t\t\r\n\t\tfloat monto = 0f;\r\n\t\tfloat montoPorMes = creditoSolicitado/plazoEnMeses;\r\n\t\tdouble porcentajeDeSusIngesosMensuales = (cliente.getIngresosMensuales()*0.7);\r\n\t\t\r\n\t\tif(cliente.getIngresoAnual()>=15000f && montoPorMes<=porcentajeDeSusIngesosMensuales){\r\n\t\t\t\r\n\t\t\tmonto = this.creditoSolicitado;\r\n\t\t\tsetEstadoDeSolicitud(true);\r\n\t\t}\t\r\n\t\t\r\n\t\t\r\n\t\treturn monto;\r\n\t}", "@Override\n\tpublic void acelerar() {\n\t\t// TODO Auto-generated method stub\n\t\t\t\tvelocidadActual += 40;\n\t\t\t\tif(velocidadActual>250) {\n\t\t\t\t\tvelocidadActual = 250;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tdepositoActual -= 10;\n\t\t\t\tSystem.out.println(\"Velocidad del ferrari: \"+velocidadActual);\n\t}", "public Double retornaSubTotal(Double totalGeral,Double desconto){\n return totalGeral - (totalGeral*(desconto/100));\n}", "public double getPreco();", "public double getPreco();", "public void ApplyPremiums() {\r\n\r\n\t\tdouble GrossPremium;\r\n\t\tdouble NetPremium;\r\n\r\n\t\tfor ( Premium p : _Premiums ) {\r\n\r\n\t\t\tGrossPremium = p.getPremium() * _InvestPerCent;\r\n\r\n\t\t\tNetPremium = p.Apply() * _InvestPerCent * _BidOfferSpread.getBidOfferSpread();\r\n\r\n\t\t\tsuper.UpdateFundPremiumSchedule( GrossPremium );\r\n\r\n\t\t\t//IRR is based on the premium paid by the customer not allocated to fund.\r\n\t\t\tCashflows.Instance().AddCashflow( _Tick, GrossPremium );\r\n\r\n\t\t\t_FundValue = _FundValue + NetPremium;\r\n\r\n\t\t\tSystem.out.println( \"\\t\\t\\t\\tNet \" + p.getName() + \" Premium Amount : \" + NetPremium + \" in \" + _Name);\r\n\t\t}\r\n\t}", "@Override\n\tpublic double CalcularFuel() {\n\t\tdouble consumo=this.getCargaActual()*30+2*numEje;\n\t\treturn consumo;\n\t}", "public void carroPulando() {\n\t\tpulos++;\n\t\tpulo = (int) (PULO_MAXIMO/10);\n\t\tdistanciaCorrida += pulo;\n\t\tif (distanciaCorrida > distanciaTotalCorrida) {\n\t\t\tdistanciaCorrida = distanciaTotalCorrida;\n\t\t}\n\t}", "public void calcPrecioTotal() {\n try {\n float result = precioUnidad * Float.parseFloat(unidades.getText().toString());\n prTotal.setText(String.valueOf(result) + \"€\");\n }catch (Exception e){\n prTotal.setText(\"0.0€\");\n }\n }", "@Override\n public double salario() {\n return 2600 * 1.10;\n }", "public void setPrixDeVente(Produit p){\n\t\tif (p.getNomProduit() == \"50%\") {\n\t\t\tthis.prixDeVente.set(0, this.getPrixDeVenteParProduit(p));\n\t\t}\n\t\telse {\n\t\t\tif (p.getNomProduit() == \"60%\") {\n\t\t\t\tthis.prixDeVente.set(1, this.getPrixDeVenteParProduit(p));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.prixDeVente.set(2, this.getPrixDeVenteParProduit(p));\n\t\t\t}\n\t\t}\n\t}", "public void setPrezzoTotale(float prezzoTotale) {\n this.prezzoTotale = prezzoTotale;\n }", "public BigDecimal getPercentageProfitPList();", "public BigDecimal getTotalPremAmt() {\n\t\treturn totalPremAmt;\n\t}", "private double prixTotal() \r\n\t{\r\n\t\tdouble pt = getPrix() ; \r\n\t\t\r\n\t\tfor(Option o : option) \r\n\t\t\tpt += o.getPrix();\t\r\n\t\treturn pt;\r\n\t}", "public double generarPrecioGarantia(double precioProducto) {\r\n\r\n return (precioProducto * (obtenerPorcentajeGarantia(precioProducto)/ Constants.CIEN));\r\n\r\n }", "public void calcularSalario(){\n // 1% do lucro mensal\n double percentagemLucro = 0.01 * lucroMensal;\n // valor fixo igual ao dobro do dos empregados sem especialização, acrescido\n //de um prémio que corresponde a 1% do lucro mensal nas lojas da região.\n setSalario(1600 + percentagemLucro);\n\n }", "public Double calcularPrecio() {\n double adicion = 0.0;\n\n switch (tipoAlimento) {\n case 'N':\n // Producto Natural\n adicion += 40;\n break;\n\n case 'C':\n // Producto con Conservantes\n adicion += 20;\n break;\n\n default:\n break;\n }\n\n // El peso tambien afecta el precio final del producto\n if (peso >= 0 && peso <= 9) {\n adicion += 6;\n }\n if (peso > 9 && peso <= 16) {\n adicion += 8;\n }\n if (peso > 16) {\n adicion += 20;\n }\n\n return precioBase + adicion;\n }", "@Override\n\tpublic Double calcular(Produto produto) {\n\t\treturn (produto.getValorUnitario()) - (produto.getValorUnitario() * 0.25);\n\t}", "public double getProfit(){\n return getPrice() * PROFIT_IN_PERCENTS / 100;\n }", "public static void main(String[] args) {\n\t\t\t\t\n\t\t\t\tdouble valorR, precoProduto, reajuste = 9, precoFinal;\n\t\t\t\t\n\t\t\t\tScanner ler = new Scanner(System.in);\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"Qual valor devera ser reajustado? \");\n\t\t\t\tprecoProduto = ler.nextDouble();\n\t\t\t\t\n\t\t\t\tvalorR = (precoProduto * reajuste) / 100;\n\t\t\t\t\n\t\t\t\tprecoFinal = precoProduto - valorR;\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"O valor com reajuste é: \" + valorR+\"R$\");\n\t\t\t\tSystem.out.println(\"Valor Total: \" + precoFinal+\"R$\");\n\t\t}", "void calculate() {\n if (price <= 1000)\n price = price - (price * 2 / 100);\n else if (price > 1000 && price <= 3000)\n price = price - (price * 10 / 100);\n else\n price = price - (price * 15 / 100);\n }", "@Test\n\tvoid calcularSalarioSinVentasPagoPositivoTest() {\n\t\tEmpleadoPorComision empleadoPorComision = new EmpleadoPorComision(\"Hiromu Arakawa\", \"p24\", 400000, 0);\n\t\tdouble salarioEsperado = 400000;\n\t\tdouble salarioEmpleadoPorComision = empleadoPorComision.calcularSalario();\n\t\tassertEquals(salarioEsperado, salarioEmpleadoPorComision);\n\n\t}", "public float getPrezzoTotale() {\n return prezzoTotale;\n }", "public void precioFinal(){\r\n if(getConsumoEnergetico() == Letra.A){\r\n precioBase = 100+precioBase;\r\n }\r\n else if((getConsumoEnergetico() == Letra.B)){\r\n precioBase = 80+precioBase;\r\n }\r\n else if(getConsumoEnergetico() == Letra.C){\r\n precioBase = 60+precioBase;\r\n }\r\n else if((getConsumoEnergetico() == Letra.D)){\r\n precioBase = 50+precioBase;\r\n }\r\n else if(getConsumoEnergetico() == Letra.E){\r\n precioBase = 30+precioBase;\r\n }\r\n else if((getConsumoEnergetico() == Letra.F)){\r\n precioBase = 10+precioBase;\r\n }\r\n else{\r\n aux=1;\r\n System.out.println(\"...No existe...\");\r\n }\r\n if (aux==0){\r\n peso();\r\n }\r\n \r\n }", "@Override\n public int computeProfit() {\n return getVehiclePerformance() / getVehiclePrice();\n }", "private void funcaoTotalPedido() {\n\n ClassSale.paymentCoupon(codeCoupon);\n BigDecimal smallCash = PaymentCoupon.getSmallCash();\n\n jTextValueTotalCoupon.setText(v.format(PaymentCoupon.getTotalCoupon()));\n \n jTextSmallCash.setText(v.format(smallCash.setScale(2, BigDecimal.ROUND_HALF_UP)));\n //jTextValueTotalDiscontCoupon.setText(v.format(PagamentoPedido.getDesconto_pagamento()));\n\n if (smallCash.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue() < 0) {\n valor_devido = smallCash.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();\n jTextCash.setText(\"0,00\");\n jTextValueDiscontCoupon.setText(\"0,00\");\n jTextCash.requestFocus(true);\n } else {\n\n if (last_cod_tipo_pagamento != null && smallCash.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue() > 0) {\n\n if (JOptionPane.showConfirmDialog(this, \"Não é permitido troco para pagamento com cartão.\\nDeseja emitir um contra vale?\", \"Mensagem\", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, icon) == 0) {\n\n JOptionPane.showMessageDialog(this, \"Emitindo contra vale...\");\n\n fechouVenda = true;\n //BeanConsulta.setVenda_fechada(fechouVenda);\n this.dispose();\n\n } else {\n\n funcaoLimpaPag();\n }\n } else {\n \n \n valor_devido = smallCash.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue(); \n jButtonFinalizaCalculoPagameto.setEnabled(true);\n jButtonFinalizaCalculoPagameto.requestFocus(true);\n\n }\n }\n\n }", "@Override\n\tpublic double computeMonthlyPremium(double salary) {\n\t\treturn salary*0.08;\n\t}", "public int calculateCost() {\n int premium = surety.calculatePremium(insuredValue);\n SuretyType suretyType = surety.getSuretyType();\n int commission = (int) Math.round(premium * vehicle.getCommission(suretyType));\n return premium + commission;\n }", "public double getPercentRem(){\n return ((double)freeSpace / (double)totalSpace) * 100d;\n }", "public void printTotalRentProfit () {\n System.out.println(\"The total rent profit is currently: \" + totalRent + \" US Dollars.\");\n }", "@Test\n\tvoid calcularSalarioConMasCuarentaHorasPagoPositivoTest() {\n\t\tEmpleadoPorComision empleadoPorComision = new EmpleadoPorComision(\"Eiichiro oda\", \"p33\", 400000, 500000);\n\t\tdouble salarioEsperado = 425000;\n\t\tdouble salarioEmpleadoPorComision = empleadoPorComision.calcularSalario();\n\t\tassertEquals(salarioEsperado, salarioEmpleadoPorComision);\n\n\t}", "@Override\n\tpublic double calculateServiceCharge() {\n\t\treturn 10.19;\n\t}", "public double getPrecoTotal() {\n\t\treturn this.precoTotal;\n\t}", "long getQuantite();", "@Override\r\n\tpublic int getPayCheque() {\n\t\treturn profit+annuelSalary;\r\n\t\t\r\n\t}", "public int prIce_Per_GUeSt(int NO_OF_PEOPLE){\r\n if (NO_OF_PEOPLE>50){\r\n price_per_guest=lower_price_per_guest;\r\n System.out.println(\"PER_PERSON_PRICE = \"+lower_price_per_guest);\r\n int total_price = price_per_guest* NO_OF_PEOPLE;\r\n return total_price;\r\n }\r\n else\r\n {price_per_guest=Highest_price_per_guest;\r\n int total_price = price_per_guest* NO_OF_PEOPLE;\r\n System.out.println(\"PER_PERSON_PRICE = \"+Highest_price_per_guest);\r\n return total_price;}\r\n }", "public void calcular(View view) {\n int quilos = Integer.valueOf(editTextQuantidade.getText().toString());\n int total = (quilos *1000)/500;\n \n String message = \"Com \" + quilos + \"kg de chocolate da para fazer \" + total + \" ovos de 500g.\";\n textViewTotal.setText(message);\n }", "public static Float getPrixTva() {\n return PRIX_TVA;\n }", "@Test\n public void amountGreatherThanItemsPrice() {\n Coupon coupon = couponService.calculateCoupon(Arrays.asList(MLA1),PRICE_MLA1+PRICE_MLA2);\n assertEquals(1, coupon.itemsIds().size());\n assertEquals(MLA1, coupon.itemsIds().get(0));\n assertEquals(PRICE_MLA1, coupon.total());\n }", "public static void main(String[] args) {\n\t\t\n\t\tint quantidade_macas;\n\t\tdouble total_compra1;\n\t\tdouble total_compra2;\n\t\t\n\t\tScanner leitor = new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"QUANTAS MAÇÃS FORAM COMPRADAS? \");\n\t\tquantidade_macas = leitor.nextInt();\n\t\t\n\t\tif (quantidade_macas < 12) {\n\t\t\ttotal_compra1 = (quantidade_macas * 0.30);\n\t\t\tSystem.out.printf(\"O VALOR DA COMPRA SERÁ = R$ %.2f \", total_compra1);\t\t\t\n\t\t}else {\n\t\t\ttotal_compra2 = (quantidade_macas * 0.25);\n\t\t\tSystem.out.printf(\"O VALOR DA COMPRA SERÁ = R$ %.2f \", total_compra2);\t\t\n\t\t\n\n\t}\n\n}", "@Override\n\tpublic int getProfit() {\n\t\treturn 0;\n\t}", "public static void main(String[] args){\n double precio_producto = 150;\n double iva = 0.13;\n double total = 0;\n \n total= precio_producto * iva;\n System.out.println(\"El iva del producto: $ \"+total);\n \n \n \n }", "@Override\r\n\tpublic Double precio() {\n\t\treturn this.combo.precio() + 50;\r\n\t}", "private List<ObligacionCoactivoDTO> calcularCostasProcesales(List<ObligacionCoactivoDTO> obligaciones,\n BigDecimal valorAbsoluto, BigDecimal porcentaje) throws CirculemosNegocioException {\n // No aplica costas\n if (valorAbsoluto == null && porcentaje == null) {\n return obligaciones;\n } else if (valorAbsoluto != null) {\n // Aplica valor absoluto\n if (obligaciones.size() == 1) {\n obligaciones.get(0).setValorCostasProcesales(valorAbsoluto);\n return obligaciones;\n } else {\n BigDecimal porcentajeDeuda;\n BigDecimal totalDeuda = new BigDecimal(0);\n\n // Calculo de deuda\n for (ObligacionCoactivoDTO obligacion : obligaciones) {\n totalDeuda = totalDeuda\n .add(obligacion.getValorObligacion().add(obligacion.getValorInteresMoratorios()));\n\n }\n\n // Calculo de porcentaje y valor\n for (ObligacionCoactivoDTO obligacion : obligaciones) {\n porcentajeDeuda = ((obligacion.getValorCostasProcesales()\n .add(obligacion.getValorInteresMoratorios())).multiply(new BigDecimal(100)))\n .divide(totalDeuda);\n\n obligacion\n .setValorCostasProcesales(totalDeuda.multiply(porcentajeDeuda).divide(new BigDecimal(100)));\n\n }\n return obligaciones;\n\n }\n } else if (porcentaje != null) {\n // Aplica porcentaje de la deuda\n for (ObligacionCoactivoDTO obligacion : obligaciones) {\n obligacion.setValorCostasProcesales(\n (obligacion.getValorObligacion().add(obligacion.getValorInteresMoratorios()))\n .multiply(porcentaje).divide(new BigDecimal(100)).setScale(2,\n BigDecimal.ROUND_HALF_UP));\n\n }\n return obligaciones;\n } else {\n throw new CirculemosNegocioException(ErrorCoactivo.GenerarCoactivo.COAC_002005);\n }\n }", "public void calculeReduction(Produit p) {\r\n\t\tdouble res=0;\r\n\t\tres=p.getPrix()*taux;\r\n\t\tp.ajoutReduction(res);\r\n\t}", "public void setPercentageProfitPLimit (BigDecimal PercentageProfitPLimit);", "public float valorTotalItem()\r\n {\r\n float total = (produto.getValor() - (produto.getValor() * desconto)) * quantidade;\r\n return total;\r\n }", "public double getCost() {\n double price = 0;\n price += this.numPizzas * this.pizzaType.getCost();\n if(this.numPizzas >= 20) // Discount if >=20 pizzas\n return price * 0.9;\n else if(this.numPizzas >= 10) // Discount if between 10 and 20 pizzas\n return price * 0.95;\n return price; // No discount\n }", "public void precioFinal(Cliente cliente){\n\t\n\tString tipo=cliente.getStrTipo();\n\t\n\tdblPrecioFinal=dblPrecioVen;\n\t\n\tif (dblPrecioFinal>dblPrecioCom)\n\t{\n\t if (tipo.equalsIgnoreCase(\"vip\"))\n\t {\n\t\tdblPrecioFinal=dblPrecioVen*0.80;\n\t }\n\t \n\t \n\t if (tipo.equalsIgnoreCase(\"normal\"))\n\t {\n\t\tdblPrecioFinal=dblPrecioVen*0.90;\n\t }\n\t \n\t \n\t if (tipo.equalsIgnoreCase(\"ocasional\"))\n\t {\n\t\tdblPrecioFinal=dblPrecioVen*0.95;\n\t }\n\t \n\t \n\t}\n\t\n\tif (dblPrecioFinal<=dblPrecioCom)\n\t{\n\t if (tipo.equalsIgnoreCase(\"vip\"))\n\t {\n\t\tdblPrecioFinal=dblPrecioVen*1.05;\n\t }\n\t \n\t \n\t if (tipo.equalsIgnoreCase(\"normal\"))\n\t {\n\t\tdblPrecioFinal=dblPrecioVen*1.10;\n\t }\n\t \n\t \n\t if (tipo.equalsIgnoreCase(\"ocasional\"))\n\t {\n\t\tdblPrecioFinal=dblPrecioVen*1.20;\n\t }\n\t \n\t \n\t}\n\t\n\t\n\t\n }", "public void aggiungiPiatto(String nome_piatto, double prezzo_piatto, int porzioni) {\n\t\tPiatto nuovo_piatto= new Piatto(nome_piatto,prezzo_piatto, porzioni);\n\t\tquantita.add(nuovo_piatto);\n\t\tquantita.sort();\n\t}", "@Override\n\tvoid get_cost_per_sqarefeet() {\n\t\tcost=1800;\n\t}", "double getPerimetro(){\n return 2 * 3.14 * raggio;\n }", "@Override\r\n\tpublic int precioTotal() {\n\t\treturn this.precio;\r\n\t}", "@Override\n\tpublic float getPrecio() {\n\t\treturn 60.2f;\n\t}", "public void adjustPay(double percentage){\r\n this.commission = getCommission() + getCommission() * percentage;\r\n }", "public double getParidadCosto() {\r\n return paridadCosto;\r\n }", "@Override\r\n\tpublic double porcentajeDelComercio() {\n\t\treturn 0.25;\r\n\t}", "public void prepararPago(){\n pago = (float) 0.00;\n nuevoSaldo = (float) 0.00;\n intereses = (float) 0.00;\n mora = (float) 0.00;\n pagoValido = false;\n }", "int getQuantite();", "int getQuantite();", "private int getQuantiCoperti(int codMenu) {\n /* variabili e costanti locali di lavoro */\n int totCoperti = 0;\n Number numero;\n Modulo modRMT = RMTModulo.get();\n Filtro filtro;\n\n try { // prova ad eseguire il codice\n filtro = FiltroFactory.crea(modRMT.getCampo(RMT.Cam.menu), codMenu);\n numero = modRMT.query().somma(modRMT.getCampo(RMT.Cam.coperti), filtro);\n totCoperti = Libreria.getInt(numero);\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n } // fine del blocco try-catch\n\n /* valore di ritorno */\n return totCoperti;\n }", "public float calcularPrecioMinimo(Rodamiento rodamiento, String metodoPago) {\n\t\treturn -1;\r\n\t}", "public void setPremAmt(BigDecimal premAmt) {\n\t\tthis.premAmt = premAmt;\n\t}", "public double getCustoAluguel(){\n return 2 * cilindradas;\n }" ]
[ "0.6734216", "0.6647547", "0.6596072", "0.6425782", "0.64048797", "0.6360407", "0.63489693", "0.62348443", "0.623014", "0.6222435", "0.6194356", "0.61716586", "0.61624026", "0.61466306", "0.610277", "0.60980856", "0.6095878", "0.6077283", "0.60591555", "0.60583276", "0.6050593", "0.6029874", "0.60058194", "0.60020256", "0.59944284", "0.5992093", "0.59879154", "0.59859", "0.5985386", "0.59853625", "0.59706634", "0.59695977", "0.5954583", "0.5949883", "0.594119", "0.59246933", "0.5916146", "0.5909366", "0.5905633", "0.59040046", "0.59040046", "0.5895789", "0.58943135", "0.5892972", "0.5886962", "0.5876426", "0.5874771", "0.5874704", "0.58674407", "0.5866002", "0.58637524", "0.58541185", "0.58429724", "0.58415717", "0.58406425", "0.58403623", "0.58226067", "0.5811737", "0.5800962", "0.57978064", "0.5796881", "0.57886475", "0.578691", "0.5786358", "0.5780505", "0.57742256", "0.5769191", "0.5763192", "0.5759316", "0.5755826", "0.5752099", "0.5745443", "0.57442087", "0.57421035", "0.5738092", "0.5737733", "0.57234526", "0.5715764", "0.571394", "0.5713912", "0.57113063", "0.5705773", "0.56976616", "0.5695305", "0.5693463", "0.5691228", "0.5688582", "0.56884086", "0.5686033", "0.5673137", "0.5671692", "0.56714267", "0.5662283", "0.5655891", "0.5655368", "0.5646631", "0.5646631", "0.5646618", "0.5646298", "0.56379163", "0.5636986" ]
0.0
-1
Created by user on 20160216.
public interface ContentRepository { List<Content> findContentList(int bbsId, int pageNum, int perPage, int searchMode, String searchContent); long findContentCount(int bbsId, int searchMode, String searchContent); void saveContent(Content content); Content findContentById(int contentId); void updateContent(Content content); void deleteContent(int contentId, String userid); List<Content> getBbsNoticeThumnailList(int bbsId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "public final void mo51373a() {\n }", "private stendhal() {\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "public void mo38117a() {\n }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "protected boolean func_70814_o() { return true; }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "private void m50366E() {\n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n public int describeContents() { return 0; }", "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 entrenar() {\n\t\t\n\t}", "@Override\n public void init() {\n }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\r\n\tpublic void init() {}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n void init() {\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\n public void init() {}", "private static void cajas() {\n\t\t\n\t}", "@Override\n protected void init() {\n }", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}", "@Override\n public int retroceder() {\n return 0;\n }", "@Override\n protected void initialize() {\n\n \n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\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\tprotected void interr() {\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\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 Pitonyak_09_02() {\r\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "private void init() {\n\n\t}", "public void mo6081a() {\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 poetries() {\n\n\t}", "public void mo12628c() {\n }", "@Override\n public int getSize() {\n return 1;\n }", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "public void gored() {\n\t\t\n\t}", "private void kk12() {\n\n\t}", "private Rekenhulp()\n\t{\n\t}", "public void mo12930a() {\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "protected void mo6255a() {\n }", "@Override\n\tpublic void init() {\n\t}", "public void mo21877s() {\n }", "public void mo55254a() {\n }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void init() {\n\t\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "public void method_4270() {}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "protected MetadataUGWD() {/* intentionally empty block */}", "Constructor() {\r\n\t\t \r\n\t }", "public void m23075a() {\n }", "@Override public int describeContents() { return 0; }", "public final void mo91715d() {\n }" ]
[ "0.5996911", "0.596167", "0.5879825", "0.5794506", "0.57663155", "0.5756412", "0.5756412", "0.57510024", "0.5749749", "0.573238", "0.57276464", "0.56827736", "0.56720126", "0.56348795", "0.56234384", "0.56112516", "0.5607861", "0.5603846", "0.5603846", "0.5603846", "0.5603846", "0.5603846", "0.56021917", "0.5600161", "0.5593216", "0.5557997", "0.5557997", "0.5557997", "0.5557997", "0.5557997", "0.5557997", "0.5557997", "0.55482286", "0.5543712", "0.5534536", "0.55202204", "0.55157167", "0.5508692", "0.5508649", "0.5504235", "0.5504235", "0.5504235", "0.5501579", "0.55014634", "0.54989797", "0.5498832", "0.54842716", "0.5480065", "0.54730976", "0.5472969", "0.5472942", "0.5472942", "0.5472942", "0.5471694", "0.547157", "0.5466095", "0.5466095", "0.54627854", "0.54627854", "0.54627854", "0.5461215", "0.5459365", "0.54485", "0.54485", "0.54478586", "0.5445359", "0.54383755", "0.54383755", "0.54383755", "0.54383755", "0.54383755", "0.54383755", "0.54240483", "0.54234046", "0.54205567", "0.54175", "0.54154336", "0.5415013", "0.54145896", "0.5400579", "0.53986466", "0.5398489", "0.5395247", "0.5393968", "0.5393854", "0.5393132", "0.5391171", "0.5389494", "0.53889024", "0.53889024", "0.5384896", "0.5379289", "0.53774077", "0.5376725", "0.5376013", "0.53754455", "0.5370941", "0.536955", "0.53601193", "0.53598005", "0.5348189" ]
0.0
-1
Class Override An action that interrupts, cancels, or changes the current action or status.
public interface IOverride extends IMeasurement_descriptor{ public IRI iri(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void setAction() {\n\t}", "@Override\r\n\t\tpublic void action()\r\n\t\t{\r\n// throw new UnsupportedOperationException(\"Not supported yet.\");\r\n\t\t}", "public void undoAction(){}", "private void act() {\n\t\tmyAction.embodiment();\n\t}", "public synchronized void applyAction(int action) {\n\n }", "@Override\n public void action() {\n }", "@Override\n public void action() {\n }", "@Override\n public void action() {\n }", "@Override\n\tpublic void doAction(String action) {\n\t\tthis.action = action;\n\t\t\n\t\tthis.gameController.pause();\n\t}", "@Override\r\n\tpublic void action() {\n\t\t\r\n\t}", "public void setAction(int value) {\n this.action = value;\n }", "abstract public void performAction();", "public void actionPerformed( ActionEvent evt )\n\t{\n\t\tif( ignoreActions )\n\t\t\treturn ;\n\n\t\tObject w = evt.getSource() ;\n\t\tSpObs spObs = ( SpObs )_spItem ;\n\n\t\tif( w instanceof JComboBox )\n\t\t\tspObs.setPriority( ( Integer )_w.jComboBox1.getSelectedItem() ) ;\n\t\telse if( ( w instanceof AbstractButton ) && !(( AbstractButton )w).isSelected() )\n\t\t\treturn ;\n\n\t\tif( w == _w.unSuspendCB )\n\t\t{\n\t\t\tString message = \"This is an Irreversible Operation\" + \"\\n\" + \"Are you sure you want to proceed?\" ;\n\t\t\tint option = JOptionPane.showConfirmDialog( _w , message , \"Irreversible Operation\" , JOptionPane.YES_NO_OPTION , JOptionPane.WARNING_MESSAGE ) ;\n\t\t\tif( option == JOptionPane.NO_OPTION )\n\t\t\t\treturn ;\n\n\t\t\tspObs.unSuspend() ;\n\t\t\t_w.unSuspendCB.setVisible( false ) ;\n\t\t}\n\t}", "@Override\n\tpublic void action() {\n\t\tSystem.out.println(\"action now!\");\n\t}", "@Override\n protected void doAct() {\n }", "public void doAction(){}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t\tObject[] options = { \"YES\", \"NO\" };\n\t\t\t\tint response = JOptionPane.showOptionDialog(null,\n\t\t\t\t\t\t\" Do you want to interrupt speakers ?\", \"Confirm\",\n\t\t\t\t\t\tJOptionPane.YES_NO_OPTION, JOptionPane.PLAIN_MESSAGE,\n\t\t\t\t\t\tnull, options, options[0]);\n\n\t\t\t\tif (response == JOptionPane.YES_OPTION) {\n\t\t\t\t\ttalkingName.setText(\"\");\n\t\t\t\t\tif (iname != -1) {\n\t\t\t\t\t\tb[iname].setBackground(Color.BLUE);\n\t\t\t\t\t\tstatus = false;\n\t\t\t\t\t\tSystem.out.print(\"stop!\");\n\t\t\t\t\t\tsendStop();\n\t\t\t\t\t\t//notifyAll();\n\t\t\t\t\t\tstatusPanel.repaint();\n\t\t\t\t\t\tre();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}", "public abstract void onAction();", "@Override\n\tpublic void action() {\n\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tcancel();\n\t\t\t}", "@Override\n\tpublic void newAction() {\n\t\t\n\t}", "public void act(){\n super.act();\n }", "@objid (\"26d79ec6-186f-11e2-bc4e-002564c97630\")\n @Override\n public void performCancel() {\n }", "public void dispatchCancel(Action action) {\n this.handler.sendMessage(this.handler.obtainMessage(2, action));\n }", "public void action() {\n action.action();\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tACTION_B_DISABLE(arg0);\r\n\t\t\t}", "public abstract void setTriggerOrAction();", "CancelAction getCancelAction();", "public void setAction(String action);", "public abstract void interrupt();", "@Action\n public void acCancel() {\n setChangeObj(false);\n }", "@Action\n public void acCancel() {\n setChangeObj(false);\n }", "public void performAction();", "@Override\n public void act() {\n }", "public void setChangeStateAction(int c)\r\n \t{\r\n \t\tm_iChangeStateBy = c;\r\n \t}", "@Override\n\tpublic void HandleEvent(int action) {\n\t\tsetActiveAction(action);\n\t\tSystem.out.println(\"action is :\" + action);\n\t\t\n\t}", "public void vetoableAction(PermissibleActionEvent evt) {\n\t}", "@Override\n public void setStatus(int arg0) {\n\n }", "public void act() \r\n {\r\n // Add your action code here.\r\n }", "public void act() \r\n {\r\n // Add your action code here.\r\n }", "public void setCancelAction(ActionListener action) {\n\t\t\n\t}", "@Override\r\n\tpublic Message doAction() {\n\t\treturn null;\r\n\t}", "public abstract void action();", "public abstract void action();", "public abstract void action();", "public abstract void action();", "@Override\n\t\t\tpublic void dealWithCustomAction(Context context, UMessage msg)\n\t\t\t{\n\t\t\t}", "public void redoAction() {\n executeAction();\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "@Override\r\n\tpublic void novo(ActionEvent actionEvent) {\n\t\t\r\n\t}", "public void setAction(String action) { this.action = action; }", "private void setAction(String action)\r\n/* 46: */ {\r\n/* 47: 48 */ this.action = action;\r\n/* 48: */ }", "public void undo() {\n // only check the action can be undo or not\n if (!this.canUndo()) {\n throw new CannotUndoException();\n }\n }", "void actionChanged( final ActionAdapter action );", "public void resetTimeLimitAction();", "protected void cancel() {\n abort();\n if(cancelAction != null) {\n cancelAction.accept(getObject());\n }\n }", "@Override\r\n\tpublic void act() {\n\t\tausgeben();\r\n\t}", "@Override\r\n protected void doActionDelegate(int actionId)\r\n {\n \r\n }", "@Override\n protected void swimAction(long timer){}", "private Action(){\r\n\t\tthis(-1);\r\n\t}", "@Override\n\tpublic void updateAction(Client input) {\n\t\t\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n if (runButton_.isSelected()) {\n runButton_.setText(\"Abort Acquisition\");\n runAcquisition();\n } else {\n runButton_.setText(\"Run Acquisition\");\n }\n }", "@Override\r\n\tprotected ActionListener updateBtnAction() {\n\t\treturn null;\r\n\t}", "private void handleActionBaz() {\n Notifier.cancelTimer(this);\n }", "@Override\n public void act() {\n sleepCheck();\n if (!isAwake()) return;\n while (getActionTime() > 0f) {\n UAction action = nextAction();\n if (action == null) {\n this.setActionTime(0f);\n return;\n }\n if (area().closed) return;\n doAction(action);\n }\n }", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tsuper.actionPerformed(e);\n\t}", "public void performAction() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "@Override\n public void actionPerformed( final ActionEvent e ) {\n // NO OPERATION\n }", "public void action() {\n }", "public void act() \n {\n super.checkClick();\n active(isActive);\n }", "private UtilitiesAction(int value) { this.value = value; }", "protected void takeAction() {\n lastAction = System.currentTimeMillis();\n }", "private final void setAction(Action a){\n\t\tthis.a = a;\n\t}", "public abstract boolean cancel();", "public void buttonChangeStatus(ActionEvent actionEvent) {\n }", "public void cancelToolAction()\n {\n getActiveTool().endAction();\n m_bActionCancelled = true;\n }", "@Override\r\n public void actionPerformed( ActionEvent e )\r\n {\n }", "@Override\n\tpublic void onActionStart(int action) {\n\t\t\n\t}", "public void doAction(int action){\n this.hp -= action;\n }", "protected abstract void sendCancel(Status reason);", "public interface NegativeAction {\n void negativeAction();\n}", "void undoPreviousAction() throws NothingToUndoException;", "public abstract Action getAction();", "@Override\n public void onAction(RPObject player, RPAction action) {\n }", "public void setAction(Action action) {\n this.action = action;\n }", "@Override\n\t\t\t\t\t\t\t\t\tpublic void cancel() {\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}", "@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tstate = !state;\n\t\t\tRequestController controller = new RequestController();\n\t\t\tcontroller.flipTile(index, state);\n\t\t}", "protected abstract void action(Object obj);", "protected void finalAction(){\n Robot.stop();\n requestOpModeStop();\n }", "protected PMBaseAction() {\r\n super();\r\n }", "@Override\r\n\tpublic void performAction(Client client, RentUnit rentUnit) {\n\t\tSystem.err.println(\"Program was not implemented\");\r\n\t}", "public void a_Action(){}", "public void setAction(State s, Action a) {\r\n\t\tif(s.isTerminated())\r\n\t\t\treturn ;\r\n\t\t\r\n\t\ts.action = a;\r\n\t}", "@Override\n\tpublic void handleAction(Action action, Object sender, Object target) {\n\t\t\n\t}" ]
[ "0.6599565", "0.65471596", "0.6533579", "0.6445072", "0.63685495", "0.6352724", "0.6352724", "0.6352724", "0.6292451", "0.6280283", "0.62782854", "0.6221949", "0.6197299", "0.6195498", "0.61882097", "0.61550677", "0.61478776", "0.6135389", "0.6126778", "0.6090016", "0.60757357", "0.607464", "0.6038383", "0.6030368", "0.60229695", "0.60133904", "0.60105675", "0.6008804", "0.60047686", "0.59846056", "0.5983251", "0.5983251", "0.5976227", "0.5966958", "0.5948735", "0.59387445", "0.5938401", "0.59255975", "0.59216815", "0.59216815", "0.5915998", "0.59110886", "0.5910546", "0.5910546", "0.5910546", "0.5910546", "0.59094554", "0.59055555", "0.58937556", "0.58937556", "0.58937556", "0.58937556", "0.58937556", "0.58937556", "0.58937556", "0.58937556", "0.5892117", "0.58903086", "0.5888891", "0.58721846", "0.58696085", "0.58641255", "0.5857892", "0.58498645", "0.58471674", "0.58447856", "0.5844128", "0.58396053", "0.583887", "0.58333373", "0.58082825", "0.57783556", "0.5777732", "0.5772188", "0.576058", "0.5749537", "0.57493204", "0.5746456", "0.574426", "0.5737045", "0.5733279", "0.5733152", "0.5728584", "0.57196915", "0.5719333", "0.5718173", "0.5717127", "0.5715191", "0.57122666", "0.57083535", "0.57074356", "0.570264", "0.5701268", "0.568332", "0.56819665", "0.5677543", "0.5668444", "0.5662339", "0.5659641", "0.56579876", "0.5657163" ]
0.0
-1
constructor to ask firstname and lastname
public Email(String firstname,String lastname) { this.firstname=firstname; this.lastname=lastname; //System.out.println("EMAIL CREATED:"+this.firstname+this.lastname); //create a method asking for department this.department=setDepartment(); //System.out.println("Deaprtment:"+this.department); //call a method to create default password this.password=setRandompassword(defaultpasswordlength); //System.out.println("Your Password is:"+this.password); email=firstname.toLowerCase()+"."+lastname+"@"+"."+department+".com"; //System.out.println("Your emailid is: "+email); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public NameInfo(String inFirst, String inLast)\n\t{\n\t\t//Set instance data.\n\t\tfirstName = inFirst;\n\t\tlastName = inLast;\n\n\t}", "public Person(String first, String last) {\n // Set instance var firstname to what is called from constructor\n this.firstName = first; \n // Set instance var lastname to what is called from constructor\n this.lastName = last;\n }", "public FirstName(String entryString){\n super(entryString);\n }", "public Name (String firstName, String lastName) {\r\n\t\tthis.firstName = firstName;\r\n\t\tthis.lastName = lastName;\t\r\n\t}", "public NameInfo(String inFirst, String inMiddle, String inLast)\n\t{\n\t\t//Set instance data.\n\t\tfirstName = inFirst;\n\t\tmiddleName = inMiddle;\n\t\tlastName = inLast;\n\n\t}", "public Person(String first, String middle, String last) {\n this.firstNames = first+ \" \" +middle;\n this.lastName = last;\n }", "public NameInfo(String inFirst)\n\t{\n\t\t//Set instance data.\n\t\tfirstName = inFirst;\n\n\t}", "public Person(String firstName, String lastName) {\n this.lastName = lastName;\n this.firstName = firstName;\n }", "public Person(String firstName, String lastName) {\n this.firstName = firstName;\n this.lastName = lastName;\n }", "public Name(String firstName, String lastName) {\n this.firstName = firstName;\n this.lastName = lastName;\n }", "public Eleve(String firstname, String lastname) {\r\n\t\tsuper();\r\n\t\tthis.firstname = firstname;\r\n\t\tthis.lastname = lastname;\r\n\t}", "public Name(String firstName, String middleName, String lastName){\t\t\n\t\tthis.firstName = firstName;\n\t if(this.firstName == null)\n\t \tthrow new NullPointerException(\"First Name\");\n\t this.middleName = middleName;\n\t this.lastName = lastName;\n\t}", "public Entry(String firstName, String lastName) {\r\n this.firstName = firstName;\r\n this.lastName = lastName;\r\n this.phone = \"N/A\";\r\n this.email = \"N/A\";\r\n }", "public Name(String firstName, String lastName) {\n if (firstName == null || lastName == null)\n throw new NullPointerException();//et nimekomponendid oleksid kindlasti olemas\n this.firstName = firstName;\n this.lastName = lastName;\n }", "public Person (String firstName, String lastName, String address) {\n this.firstName = firstName;\n this.lastName = lastName;\n this.address = address;\n\n }", "Name(String fName, String lName) {\n if (fName.length() == 0 || lName.length() == 0) {\n throw new IllegalArgumentException(\"first \" +\n \"and/or last name cannot be empty\");\n }\n this.firstName = Utilities.capitalizeString(fName);\n this.lastName = Utilities.capitalizeString(lName);\n this.initials = createInitials(getFirstName(), getLastName());\n }", "public User(String names, String lastnames, int age){\n this.names = names;\n this.lastnames = lastnames;\n this.age = age;\n }", "public FirstName() {\n super();\n }", "public Patient(String myLast, String myFirst, int age) {\n this.lastname = myLast;\n this.firstname = myFirst;\n this.age = age;\n }", "public void getFirstAndLastName( String name ){//\r\n String nameNew = name.trim();\r\n String[] arr = nameNew.split(\"\\\\s\");\r\n firstName = arr[0];\r\n lastName = arr[1];\r\n }", "public NameInfo(String inPrefix, String inFirst, String inMiddle, String inLast)\n\t{\n\t\t//Set instance data.\n\t\tprefix = inPrefix;\n\t\tfirstName = inFirst;\n\t middleName = inMiddle;\n\t\tlastName = inLast;\n\n\t}", "public void inputFirstLastName(String firstName, String lastName) {\n txbFirstName.type(firstName);\n txbLastName.type(lastName);\n }", "public Employee(String firstName, String lastName, String SSN){\r\n this.firstName=firstName;\r\n this.lastName=lastName;\r\n this.SSN=SSN;\r\n }", "public Employee(String firstName, String lastName) {\n\t\tsuper();\n\t\tthis.firstName = firstName;\n\t\tthis.lastName = lastName;\n\t}", "public Person (String inName, String inFirstName, LocalDate inDateOfBirth) {\n super(inName);\n this.dateOfBirth = inDateOfBirth;\n this.firstName = inFirstName;\n }", "@Override\r\n\tpublic void setFistName(String fname) {\n\t\tif (fname == null) {\r\n\t\t\tthrow new IllegalArgumentException(\"Null argument is not allowed\");\r\n\t\t}\r\n\t\tif (fname.equals(\"\")) {\r\n\t\t\tthrow new IllegalArgumentException(\"Empty argument is not allowed\");\r\n\t\t}\r\n\t\tthis.first_name = fname;\r\n\t}", "public void setName(String firstName, String lastName){\r\n this.firstname = firstName;\r\n this.lastname = lastName;\r\n }", "public Entry(String firstName, String lastName, String email) {\r\n this.firstName = firstName;\r\n this.lastName = lastName;\r\n this.phone = \"N/A\";\r\n this.email = email;\r\n }", "public User (String username, String password, String fname, String lname) {\n\t\tthis.username = username;\n\t\tthis.password = password;\n\t\tthis.FirstName = fname;\n\t\tthis.LastName = lname;\n\t}", "public ShelterPerson(String fName, String lName){\n\t\tthis();\n\t\tthis.firstName = fName;\n\t\tthis.lastName = lName;\n\t}", "public void promptFirstName(String firstName)\n {\n this.firstName = firstName;\n }", "public Name() {\r\n\t\tfirstName = \"\";\r\n\t\tlastName = \"\";\r\n\t}", "public Person( String emailAddress, String first, String last, \r\n String password, String currency, String creditCard )\r\n {\r\n setEmail( emailAddress );\r\n setFirstName( first );\r\n setLastName( last );\r\n setPassword( password );\r\n setCurrency( currency );\r\n setCreditCard( creditCard );\r\n }", "public Student(String firstName, String lastName, String email) {\r\n\t\tthis.firstName = firstName;\r\n\t\tthis.lastName = lastName;\r\n\t\tthis.email = email;\r\n\t}", "public Passenger(String foreName, String lastName, String emailAddress)\n {\n this.foreName = foreName;\n this.lastName = lastName;\n this.emailAddress = emailAddress;\n }", "java.lang.String getFirstName();", "java.lang.String getFirstName();", "public Person(String first, String last) {\n\t\tthis(first, last, -1);\n\t}", "public Person(String vorname, String nachname) {\n\n\t}", "public Person(String name, String surname) {\n this.name = name;\n this.surname = surname;\n }", "public static void main (String[] args){\n System.out.println(\"What is your name?\");\n Scanner console = new Scanner(System.in);\n String first = console.next();\n String subfirst = first.substring(1);\n String last = console.next();\n String sublast = last.substring(1);\n\n name(first, subfirst);\n name(last, sublast);\n\n\n }", "public Entry(String firstName, String lastName, String phone, String email) {\r\n this.firstName = firstName;\r\n this.lastName = lastName;\r\n this.phone = phone;\r\n this.email = email;\r\n }", "public void setFirstName( String first )\r\n {\r\n firstName = first;\r\n }", "public void setFirstName(String fName){\n\t\t//If the user hits cancel a null is sent. Error message to let the user know they must enter a first name. \n\t\tif(fName == null){\n\t\t\tthrow new IllegalArgumentException(\"Sorry, but a first name must be entered.\");\n\t\t}\n\t\t\n\t\t//If the name is blank then an exception is thrown to inform the user.\n\t\tif(fName.trim().equals(\"\")){\n\t\t\tthrow new IllegalArgumentException(\"The first name cannot be blank\");\n\t\t}\n\t\t//If the name is not blank then the name is stored and a true is return.\n\t\telse{\n\t\t\t//Loop to check that all characters are letters and there are no digits.\n\t\t\tfor(int x = 0; x < fName.length(); x++){\n\t\t\t\tif(Character.isDigit(fName.charAt(x))){\n\t\t\t\t\tthrow new IllegalArgumentException(\"No digits are allowed in the name.\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.firstName = fName;\n\t\t}\n\t}", "public Student (String first, String last, String id)\r\n\t{\r\n\t\tthis.firstName = first;\r\n\t\tthis.lastName = last;\r\n\t\tthis.studentId = id;\r\n\t}", "public ShelterPerson(){\n\t\tthis.firstName = \"\";\n\t\tthis.lastName = \"\";\n\t}", "public void name(String first, String last) {\r\n String display = first + \" \" + last;\r\n textName.setText(display);\r\n }", "void setFirstName(String firstName);", "public void setFirstName(java.lang.CharSequence value) {\n this.first_name = value;\n }", "public void setLast_name(String last_name);", "public Professor(String surname, String firstName, double salary)\n\t{\n\t\t//stuff, but with params\n\t\tthis.setSurname(surname);\n\t\tthis.setFirstName(firstName);\n\t\tthis.setSalary(salary);\n\t}", "public User(String email, String password, String firstName, String lastName) {\n this.email = email;\n this.password = password;\n this.firstName = firstName;\n this.lastName = lastName;\n }", "public void setFirstName(String firstName);", "public Professor(String surname, String firstName)\n\t{\n\t\t//stuff, but with params\n\t\tthis.setSurname(surname);\n\t\tthis.setFirstName(firstName);\n\t\tthis.setSalary(this.minAnnualSalary); //this probably doesn't make sense, at least did i not really understand\n\t\t\t\t//the use-case for this task.\n\t\t\t\t//Why the hell would i assign the value of a member of the class, inside a constructor?\n\t\t\t\t//minAnnualSalary can in no case contain a valid value?\n\t\t\t\t//maybe minAnnualSalary should rather be a static member for all Professors?\n\t\t\t\t//or maybe just a plain hardcoded default value? \n\t}", "protected void setFirstName(String first)\n {\n firstName = first;\n }", "public void setFirst_name(String first_name);", "public void setFirstname(String firstname) {\n this.firstname = firstname;\n }", "public void setFirstname(String firstname) {\n this.firstname = firstname;\n }", "public Person(Name nameInput, String phoneInput) {\r\n\t\tthis.name = nameInput;\r\n\t\tthis.phone = phoneInput;\r\n\t\tthis.email = this.name.getFirstName() + this.name.getMiddleName() + this.name.getLastName() + \"@gmail.com\";\r\n\t}", "public SalesPerson(String firstName, String lastName, String ppsNumber){\r\n //pulls the constructor with parameters from the superclass SalesEmployee\r\n super(firstName, lastName, ppsNumber);\r\n }", "public void setLastname(String lastname);", "public void setFirstName(String fname){ firstName.set(fname); }", "@Test\n\tpublic void testProfessorConstructor2params(){\n\t\tString firstname = \"Steven\";\n\t\tString lastName = \"Beaty\";\n\t\tProfessor testProfessor = new Professor(firstname, lastName);\n\t\tAssert.assertEquals(\"Steven\", testProfessor.getFirstName());\n\t\tAssert.assertEquals(\"Beaty\", testProfessor.getLastName());\n\t}", "public User(String firstName, String lastName, String userName, String email, String password) {\n this();\n this.firstName = firstName;\n this.lastName = lastName;\n this.userName = userName;\n this.email = email;\n this.password = password;\n }", "String getFirstName();", "String getFirstName();", "String getFirstName();", "public void setFirstName(String firstName) {\n if (firstName.length() >= 3 && firstName.length() <= 20)\n this.firstName = firstName;\n }", "@Test (dataProvider = \"userData\")\n\tpublic void canInputFirstAndLastName(userData John) {\n\t\tboolean expected = true;\n\t\t\n\t\tboolean actual = new AutomationPracticeFormPageObject(driver, baseUrl) \n\t\t.openAutomationWebPage()\n\t\t.inputFirstName(John.getFirstName())\n\t\t.inputLastName(John.getLastName())\n\t\t.isFirstNameAndLastNameFilled();\n\t\t\n\t\tAssert.assertEquals(actual, expected);\n\t}", "public Name(String firstName, String lastName, String von, String jr) {\n this.firstName = firstName;\n this.lastName = lastName;\n this.von = von;\n this.jr = jr;\n }", "public void setFirstName(String firstName)\r\n {\r\n this.firstName = firstName;\r\n }", "public void setFirstname(String firstname) {\r\n\t\tthis.firstname = firstname;\r\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tScanner input = new Scanner(System.in);\n\t\tSystem.out.println(\"Enter fullname:\");\n\t\tString name = input.nextLine();\n\t\tinput.close();\n\t\t\n\t\t//find the index of the space between first and last names\n\t\tint spaceIndex = name.indexOf(\" \");\n\t\t//Gives the value from index 0 until spaceIndex \n\t\tString firstName = name.substring(0, spaceIndex);\n\t\t//Gives the value from spaceIndex + 1 until the last index of lastName\n\t\tString lastName = name.substring(spaceIndex + 1);\n\t\t\n\t\t\n\t\ttheNameSong(firstName);\n\t\ttheNameSong(lastName);\n\t}", "public Student (String first, String last)\n {\n firstName = first;\n lastName = last;\n testScore1 = 0;\n testScore2 = 0;\n testScore3 = 0;\n }", "public User(int aId, String aFirstName, String aLastName){\r\n this.id = aId;\r\n this.firstName = aFirstName;\r\n this.lastName = aLastName;\r\n }", "public Eleve(String firstname, String lastname, List<Resultat> resultats) {\r\n\t\tsuper();\r\n\t\tthis.firstname = firstname;\r\n\t\tthis.lastname = lastname;\r\n\t\tthis.resultats = resultats;\r\n\t}", "public void promptLastName(String lastName)\n {\n this.lastName = lastName;\n }", "public Customer(String username, String firstname, String lastname, String password) {\n this.username = username;\n this.firstname = firstname;\n this.lastname = lastname;\n this.password = password;\n }", "public void setFirstName(String firstName) {\n this.firstName = firstName;\n }", "public Person(String name, String address, String phoneNumber, String emailAddress)\n {\n this.name = name;\n this.address = address;\n this.phoneNumber = phoneNumber;\n this.emailAddress = emailAddress;\n }", "public void setFirstName(String fn)\n\t{\n\t\tfirstName = fn;\n\t}", "PassengerPersonalInfo(String First_Name, String Last_Name, int Age, Date dob, \n String Address, String Nationality, long Number, String eID) { \n this.firstName = First_Name;\n this.lastName = Last_Name;\n this.age = Age;\n this.dateOfBirth = dob;\n this.address = Address;\n this.nationality = Nationality;\n this.contact = Number;\n this.email = eID;\n }", "public Person2(String fname, String lname) {\n this.fname = fname;\n this.lname = lname;\n }", "public void setFirstName(String firstName) {\r\n this.firstName = firstName;\r\n }", "public Employee(String firstName, String lastName, Date birthDate, \n Date hireDate, Address Address) {\n this.firstName = firstName;\n this.lastName = lastName;\n this.birthDate = birthDate;\n this.hireDate = hireDate;\n this.Address = Address;\n }", "Employee setFirstname(String firstname);", "public Person(String inName)\n {\n name = inName;\n }", "@Override\n\tpublic void FirstName(String firstName) {\n\t\t\n\t}", "public void setFirstName(String firstName) {\n this.firstName = firstName;\n }", "public void setFirstName(String firstName) {\n this.firstName = firstName;\n }", "public void setFirstName(String firstName) {\n this.firstName = firstName;\n }", "public void setFirstName(String firstName) {\n this.firstName = firstName;\n }", "public void setFirstName(String firstName) {\n this.firstName = firstName;\n }", "public void setFirstName(String firstName) {\n this.firstName = firstName;\n }", "public void setFirstName(String firstName) {\n this.firstName = firstName;\n }", "public void setFirstName(String firstName) {\n this.firstName = firstName;\n }", "public void setFirstName(String firstName) {\n this.firstName = firstName;\n }", "public void setFirstName(String firstName) {\n this.firstName = firstName;\n }", "public void setFirstName(String firstName) {\n this.firstName = firstName;\n }", "public void setFirstName(String firstName){\r\n\t\tthis.firstName = firstName;\r\n\t}", "public Person(String username, String email) {\n this.username = username;\n this.email = email;\n }" ]
[ "0.77380174", "0.7540777", "0.73858505", "0.73557425", "0.7294955", "0.72631824", "0.71913385", "0.7184382", "0.7108635", "0.70962226", "0.7069822", "0.7043991", "0.70338374", "0.703238", "0.70251864", "0.7010493", "0.69220686", "0.6877892", "0.67953867", "0.6754509", "0.67189634", "0.6697327", "0.66668874", "0.6610617", "0.66084903", "0.6593794", "0.6589162", "0.6579593", "0.65740436", "0.6569577", "0.6553367", "0.6551976", "0.6544033", "0.6535072", "0.6509716", "0.64967936", "0.64967936", "0.6475778", "0.64616984", "0.6447558", "0.6413891", "0.64027655", "0.6386286", "0.6375973", "0.63704574", "0.6363583", "0.6338359", "0.6338106", "0.6332235", "0.63310885", "0.63053566", "0.62876284", "0.6282898", "0.6278836", "0.62729096", "0.62699145", "0.6260812", "0.6260812", "0.6253486", "0.6249729", "0.62336415", "0.623143", "0.6229271", "0.62253016", "0.62207353", "0.62207353", "0.62207353", "0.62167245", "0.62119955", "0.62007755", "0.61963683", "0.6189155", "0.6173283", "0.61697865", "0.6151846", "0.6148727", "0.6145066", "0.6143579", "0.61383706", "0.613714", "0.6136208", "0.61361325", "0.6125716", "0.61228395", "0.61206293", "0.61206126", "0.6119594", "0.61004937", "0.6095575", "0.6095575", "0.6095575", "0.6095575", "0.6095575", "0.6095575", "0.6095575", "0.6095575", "0.6095575", "0.6095575", "0.6095575", "0.6090274", "0.60862154" ]
0.0
-1
Created by Administrator on 2016/11/7.
public interface Waiter { void greetTo(String name); void serverTo(String name); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\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 dormir() {\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 public void inizializza() {\n\n super.inizializza();\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\tprotected void getExras() {\n\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "private static void cajas() {\n\t\t\n\t}", "public void mo38117a() {\n }", "public void mo4359a() {\n }", "public final void mo51373a() {\n }", "@Override\n public void settings() {\n // TODO Auto-generated method stub\n \n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n protected void initialize() {\n\n \n }", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\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 }", "public void verarbeite() {\n\t\t\r\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "public contrustor(){\r\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\n public void init() {\n\n }", "public void gored() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n protected void getExras() {\n }", "@Override\n protected void initialize() \n {\n \n }", "public void autoDetails() {\n\t\t\r\n\t}", "public void mo55254a() {\n }", "public void mo6081a() {\n }", "Petunia() {\r\n\t\t}", "public Pitonyak_09_02() {\r\n }", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n\tpublic void create () {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "private TMCourse() {\n\t}", "@Override\n\tpublic void create() {\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}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "private void init() {\n\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "public void mo12930a() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n\tpublic void afterInit() {\n\t\t\n\t}", "@Override\n\tpublic void afterInit() {\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 public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tpublic void onCreate() {\n\n\t}", "@Override\n void init() {\n }", "public void create() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\n\tprotected void onCreate() {\n\t}", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void init() {\n }", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "protected MetadataUGWD() {/* intentionally empty block */}" ]
[ "0.6211543", "0.61630076", "0.6075793", "0.6045084", "0.59776986", "0.5972942", "0.59028673", "0.5899255", "0.58770233", "0.5875514", "0.5875514", "0.5852147", "0.58392143", "0.58392143", "0.5833993", "0.5830946", "0.58201", "0.5817547", "0.5783824", "0.5760226", "0.57521766", "0.57310545", "0.5717113", "0.5697999", "0.5691517", "0.5679974", "0.5652939", "0.5647593", "0.56278646", "0.56278646", "0.56278646", "0.56278646", "0.56278646", "0.56278646", "0.56278646", "0.5626119", "0.5625621", "0.5608418", "0.5605196", "0.5589612", "0.5576379", "0.55709565", "0.5567664", "0.555938", "0.5556279", "0.55541724", "0.55538344", "0.55519736", "0.55477655", "0.5542236", "0.5527061", "0.5526523", "0.55131274", "0.5508383", "0.5506705", "0.5506537", "0.5497472", "0.5494884", "0.54896027", "0.5487129", "0.5487129", "0.5487129", "0.5487129", "0.5487129", "0.5466478", "0.54649025", "0.54649025", "0.54608124", "0.54561394", "0.5450707", "0.5450707", "0.5450707", "0.54452056", "0.54428476", "0.5441178", "0.5441178", "0.5441178", "0.5441178", "0.5441178", "0.5441178", "0.5438735", "0.5422247", "0.5422247", "0.5421472", "0.5421472", "0.5421472", "0.54190254", "0.54190254", "0.5416166", "0.54154634", "0.5414618", "0.541193", "0.5411073", "0.5409018", "0.54007256", "0.5400648", "0.53915757", "0.53915757", "0.53915757", "0.53868115", "0.5384723" ]
0.0
-1
Adapting for BB viewing
public void addMessage( String buddyId, String buddyNick, String text, int type ) { text = "[p]".concat( text ).concat( "[/p]" ); /** Checking for type in settings **/ switch ( type ) { case TYPE_STATUS_CHANGE: { if ( !MidletMain.statusChange ) { return; } break; } case TYPE_XSTATUS_READ: { if ( !MidletMain.xStatusRead ) { return; } break; } case TYPE_MSTATUS_READ: { if ( !MidletMain.mStatusRead ) { return; } break; } case TYPE_FILETRANSFER: { if ( !MidletMain.fileTransfer ) { return; } break; } } /** Appending message **/ ChatItem item = new ChatItem( MidletMain.serviceMessagesFrame.pane, buddyId, buddyNick, TimeUtil.getTimeString( TimeUtil.getCurrentTimeGMT(), true ), type == TYPE_FILETRANSFER ? ChatItem.TYPE_FILE_TRANSFER : ChatItem.TYPE_INFO_MSG, text ); messages.push( item ); if ( messages.size() > messagesCount ) { messages.removeElementAt( 0 ); } /** Checking for screen exist **/ if ( MidletMain.serviceMessagesFrame.pane.items.equals( messages ) && MidletMain.screen.activeWindow.equals( MidletMain.serviceMessagesFrame ) ) { MidletMain.serviceMessagesFrame.updateItemsLocation( true ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void previewBb() {\n try {\n populateBillboard();\n billboard.previewBillboard();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "@Override\n\tpublic void bbb() {\n\t\t\n\t}", "protected abstract MS_LineBuilder prepareContent(MS_LineBuilder lb);", "@Override\r\n public void run() {\n basicEditor.createEdge(); // replaced Bibianas method with Moritz Roidl, Orthodoxos Kipouridis\r\n }", "private void actionViewBoundingBox ()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tint tableSize = DataController.getTable().getTableSize();\r\n\r\n\t\t\tif (tableSize != 0)\r\n\t\t\t{\r\n\t\t\t\tint imagIndex = mainFormLink.getComponentPanelLeft().getComponentComboboxFileName().getSelectedIndex();\r\n\r\n\t\t\t\t//---- Get the image with colored cells, convert it to buffered image instead of opencv Mat.\r\n\t\t\t\tBufferedImage imageCC = OpencvConverter.convertMatToBImage(ImageDraw.drawImageBoundingBox(DataController.getTable().getElement(imagIndex)));\r\n\r\n\t\t\t\t//---- Display image at the image viewer panel\r\n\t\t\t\tmainFormLink.getComponentPanelCenter().getComponentPanelImageView().loadImage(imageCC);\r\n\r\n\t\t\t\t//---- Change button icon\r\n\t\t\t\tImageIcon iconButton = FormUtils.getIconResource(FormStyle.RESOURCE_PATH_ICO_CELL_IMAGE);\r\n\r\n\t\t\t\tmainFormLink.getComponentToolbar().getComponentButtonViewImage().setIcon(iconButton);\r\n\t\t\t\tmainFormLink.getComponentToolbar().getComponentButtonViewImage().setActionCommand(FormMainHandlerCommands.AC_VIEW_IMAGE);\r\n\t\t\t\tmainFormLink.getComponentToolbar().getComponentButtonViewImage().setToolTipText(\"View cells\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (ExceptionMessage exception)\r\n\t\t{\r\n\t\t\tExceptionHandler.processException(exception);\r\n\t\t}\r\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn \"BB[\" + origin.getX0() + \",\" + origin.getY0() + \",\"\n\t\t\t\t+ this.width + \",\" + this.height + \"]\";\n\t}", "@Override\n protected void renderInlineAreaBackAndBorders(final InlineArea area) {\n final float borderPaddingStart = area.getBorderAndPaddingWidthStart() / 1000f;\n final float borderPaddingEnd = area.getBorderAndPaddingWidthEnd() / 1000f;\n final float borderPaddingBefore = area.getBorderAndPaddingWidthBefore() / 1000f;\n final float borderPaddingAfter = area.getBorderAndPaddingWidthAfter() / 1000f;\n final float bpwidth = borderPaddingStart + borderPaddingEnd;\n final float bpheight = borderPaddingBefore + borderPaddingAfter;\n\n final float height = area.getBPD() / 1000f;\n if (height != 0.0f || bpheight != 0.0f && bpwidth != 0.0f) {\n final float x = this.currentIPPosition / 1000f;\n final float y = (this.currentBPPosition + area\n .getBlockProgressionOffset()) / 1000f;\n final float width = area.getIPD() / 1000f;\n drawBackAndBorders(area, x, y - borderPaddingBefore, width\n + bpwidth, height + bpheight);\n }\n }", "public void createBlueBanHighlight() {\n\t\tblueBanHighlight = new JLabel() {\n \t\tprotected void paintComponent(Graphics g) {\n\t \t g.setColor(getBackground());\n \t \tg.fillRect(0, 0, getWidth(), getHeight());\n \t\t\tsuper.paintComponent(g);\n\t\t }\n\t\t};\n\t\tblueBanHighlight.setBackground(new Color(255, 217, 0, 120));\n\t\tbottomPanel.add(blueBanHighlight, new Integer(1));\n\t\tblueBanHighlight.setBounds(23, 29, 245, 135);\n\t}", "private void readAndEditFrame()\n\t{\n\t\tmirror();\n\t\tinvert();\n\t\tgreenScreen();\n\t\tbackgroundSubtraction();\n\t}", "public abstract void mo2152a(View view);", "public abstract View mo2155b();", "@Override // com.beloo.widget.chipslayoutmanager.p295d.AbstractLayouter\n /* renamed from: b */\n public Rect mo21673b(View view) {\n Rect rect = new Rect(this.f10947d - mo21696x(), this.f10945b - mo21697y(), this.f10947d, this.f10945b);\n this.f10947d = rect.left;\n return rect;\n }", "private void changeToPhotoBurstView(Boolean bl) {\n this.changeLayoutTo(DefaultLayoutPattern.BURST_SHOOTING);\n if (!this.isHeadUpDesplayReady()) {\n return;\n }\n super.setSceneNotificationIndicatorsInvisible(false);\n if (bl == false) return;\n this.startCaptureFeedbackAnimation();\n }", "public Boards getView(Long bno);", "@Override\n\tpublic void view() {\n\t\t\n\t}", "@Override\n\t\tpublic void layout (final int l, final int t, final int r, final int b) {\n\t\t}", "public face2(){\r\n\tsuper(\"library\");\r\n\tface1.any1();\r\n\t//y=new GridLayout(face1.b,0);\r\n\tsetLayout(new BorderLayout());\r\n\tString s=\"\";\r\n\t//d=new JLabel[face1.b];\r\n\t\r\n\tfor(int i=0;i<face1.b;i++)\r\n\t{//d[i]=new JLabel(face1.a[i]);\r\n\t//add (d[i]);\r\n\ts=s+face1.a[i]+\"\\n\";\r\n\t}\r\n\tJTextArea f=new JTextArea(s,5,5);\r\n\t\t\tf.setEditable(false);\r\n\t\t\tadd(new JScrollPane(f), BorderLayout.CENTER);\r\n\t\t\r\n\t}", "public anywheresoftware.b4a.objects.PanelWrapper _asview() throws Exception{\nif (true) return _wholescreen;\n //BA.debugLineNum = 37;BA.debugLine=\"End Sub\";\nreturn null;\n}", "public static BB transformbBB(Transform t, BB bb) {\n\t\tVector2f center = bb.getCenter();\n\t\tfloat hw = (bb.r - bb.l) * 0.5f;\n\t\tfloat hh = (bb.t - bb.b) * 0.5f;\n\n\t\tfloat a = t.a * hw, b = t.c * hh, d = t.b * hw, e = t.d * hh;\n\t\tfloat hw_max = cpfmax(cpfabs(a + b), cpfabs(a - b));\n\t\tfloat hh_max = cpfmax(cpfabs(d + e), cpfabs(d - e));\n\t\treturn BB.forExtents(t.transformPoint(center), hw_max, hh_max);\n\t}", "private void DrawBSide(Graphics g){\r\n\t\tupdate();\r\n\t\tif(enable == true){\r\n\t\t\treturn; \r\n\t\t}\r\n\t\tint topH = (int) (ConstantData.CARD_HEIGHT * percent);\r\n\t\tg.drawImage(imageB, x,y, x+ConstantData.CARD_WIDTH, y+ConstantData.CARD_HEIGHT-topH, \r\n\t\t\t0, 0, ConstantData.CARD_WIDTH, ConstantData.CARD_HEIGHT-topH, null);\r\n\t}", "@Override\n protected void handleBlockTraits(final Block block) {\n final float borderPaddingStart = block.getBorderAndPaddingWidthStart() / 1000f;\n final float borderPaddingEnd = block.getBorderAndPaddingWidthEnd() / 1000f;\n final float borderPaddingBefore = block\n .getBorderAndPaddingWidthBefore() / 1000f;\n final float borderPaddingAfter = block.getBorderAndPaddingWidthAfter() / 1000f;\n\n float startx = this.currentIPPosition / 1000f;\n final float starty = this.currentBPPosition / 1000f;\n float width = block.getIPD() / 1000f;\n float height = block.getBPD() / 1000f;\n\n final int level = block.getBidiLevel();\n if (level == -1 || (level & 1) == 0) {\n startx += block.getStartIndent() / 1000f;\n startx -= borderPaddingStart;\n } else {\n startx += block.getEndIndent() / 1000f;\n startx -= borderPaddingEnd;\n }\n\n width += borderPaddingStart;\n width += borderPaddingEnd;\n height += borderPaddingBefore;\n height += borderPaddingAfter;\n\n drawBackAndBorders(block, startx, starty, width, height);\n }", "private void CreatingBeautyContentTopK() {\n\t\t\tConstraintsPlacement objConstraints= new ConstraintsPlacement(this);\r\n\t\t\t//Creating array with states\r\n\t\t\tArrayList<BlockNode> states = new ArrayList<BlockNode>();\r\n\t\t\t//Building the graph in a deph way\r\n\t \tGraphBuilder objGrapB= new GraphBuilder(1);\r\n\t \tint numElements=objElem.getNumberObjects();\r\n\t \tint numEnemies=objElem.getNumberObjectsEnemies();\r\n\t \tint globalControlSearch=0;\r\n\t \t//Beststates=objGrapB.basicDepthSearch(mediumStraight,height,numElements,numElements,states,objConstraints, objElem.getFinalList(),objElem);\r\n\t \tbestBranches=objGrapB.relativePositionDepthSearchTopK(mediumStraight,height,numElements-numEnemies,numElements-numEnemies,states,objConstraints, objElem.getFinalList(),objElem,-mediumStraight+1,mediumStraight-1,floorTileHeight,0,0,maxScreens,numEnemies,random,globalControlSearch);\r\n\t \t//Beststates=objGrapB.relativeTransPositionDepthSearch(mediumStraight,height,numElements,numElements,states,objConstraints, objElem.getFinalList(),objElem,-mediumStraight+1,mediumStraight-1,floorTileHeight,0,0,currentState,hTable);\r\n\t \r\n\t \tBranch objBranch=new Branch();\r\n\t \t//bestBranches=objBranch.sortBranches(bestBranches);\r\n\t \t\r\n\t \t//System.out.print( \"CounterStates\"+objGrapB.getCounterIDs() );\r\n\t \r\n\t //imprimiendo los estados visitados\r\n\t /*\r\n\t Iterator<BlockNode> nombreIterator = states.iterator();\r\n\t while(nombreIterator.hasNext()){\r\n\t \tBlockNode elemento = nombreIterator.next();\r\n\t \tSystem.out.print(elemento.getID()+\" / \");\r\n\t }*/\r\n\t \r\n\t //here we are painting as the best branches foundeded\r\n\t \r\n\t Iterator<Branch> nombreIterator = bestBranches.iterator();\r\n\t while(nombreIterator.hasNext()){\r\n\t \tBranch elemento = nombreIterator.next();\r\n\t \t//System.out.print(elemento.getHeuristicValue()+ \" / \");\r\n\t }\r\n\t \r\n\t \r\n\t //Here we will put the elements on the tile\r\n\t \t//Just here to implement the n screens!\r\n\t for(int i=0;i<maxScreens;i++)\r\n\t {//block from Lelis and Reis (>class GeradorDeFasses)\r\n/*\t \ttry {\r\n\t \t\tLevel levelScreen=PaintElements(((Branch)bestBranches.get(i)).getStates(),this.clone());\t\t\t\t\t\r\n\t\t\t\t\tScreen objScreen=new Screen();\r\n\t\t\t\t\tobjScreen.SaveScreen(levelScreen,odds,objElem);\r\n\t \t\tInformacoesTelas info = new InformacoesTelas();\r\n\t\t\t CopiaArquivos copiador = new CopiaArquivos();\r\n\t\t\t \r\n\t\t\t info = info.carregaInfoTela(\"infoTela\");\r\n\t\t\t\t\tinfo.setOutrasVariaveis(0, 0); // Salva outras informacoes da Tela\r\n\t\t\t\t\tinfo.salvaInfoTela(\"infoTela\", info);\t\t\t\t\t\r\n\t\t\t\t\tcopiador.copy(\"\" + i, \"Screens/\");\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (CloneNotSupportedException 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} catch (ClassNotFoundException 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} catch (IOException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}*/\r\n\t }\r\n\t \r\n\t\t\t\r\n\t\t}", "private void setUpBlocks() {\n\t\tdouble xStart=0;\n\t\tdouble midPoint = getWidth()/2;\n\t\tint yStart = BRICK_Y_OFFSET;\t\n\t\t\n\t\tfor(int i = 0; i < NBRICK_ROWS; i++) {\n\t\t\t\n\t\t\txStart = midPoint - (NBRICKS_PER_ROW/2 * BRICK_WIDTH) - BRICK_WIDTH/2;\n\t\t\tlayRowOfBricks(xStart, yStart, i);\n\t\t\tyStart += BRICK_HEIGHT + BRICK_SEP;\n\t\t}\t\n\t}", "public static void testNewBBFArchitecture(){\n\t\t\n\t\tString outputDir = \"E:\\\\testing\\\\Java Backbone Fitting\\\\test orientation fix\\\\\";\n\t\tString inputFileName = outputDir+\"Berlin@Berlin_2NDs_B_Square_SW_96-160_201411201541.prejav\";\n\t\t\t\n\t\tExperiment ex = new Experiment(inputFileName);\n\t\t\n\t\t\n\t\tBackboneFitter bbf = new BackboneFitter(ex.getTrackFromInd(50));\n\t\tbbf.fitTrack();\n\t\t\n\t\tBackboneFitter bbfOld = new BackboneFitter();\n\t\t///method no longer exists\n\t\t//bbfOld.fitTrack(ex.getTrackFromInd(50));\n\t\t///\n\t\t\n\t\tSystem.out.println(\"Done\");\n\t}", "@TargetApi(Build.VERSION_CODES.LOLLIPOP)\n private void prepare(){\n mPaint = new Paint();\n mMatrix = new Matrix();\n //Only Android.LOLLIPOP and upper level device can use this builder\n if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n mAnchorInfoBuilder = new CursorAnchorInfo.Builder();\n }\n mPaint.setAntiAlias(true);\n setTextSize(DEFAULT_TEXT_SIZE);\n mColors = new ColorScheme(this);\n mEventHandler = new EventHandler(this);\n mBasicDetector = new GestureDetector(getContext(), mEventHandler);\n mBasicDetector.setOnDoubleTapListener(mEventHandler);\n mScaleDetector = new ScaleGestureDetector(getContext(), mEventHandler);\n mViewRect = new Rect(0, 0, 0, 0);\n mRect = new RectF();\n mInsertHandle = new RectF();\n mLeftHandle = new RectF();\n mRightHandle = new RectF();\n mVerticalScrollBar = new RectF();\n mHorizontalScrollBar = new RectF();\n mDividerMargin = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 2, Resources.getSystem().getDisplayMetrics());\n mDividerWidth = mDividerMargin;\n mUnderlineWidth = mDividerMargin;\n mInsertSelWidth = mDividerWidth / 2;\n mDpUnit = mInsertSelWidth;\n mLineNumberAlign = Paint.Align.RIGHT;\n mTypefaceLineNumber = Typeface.MONOSPACE;\n mTypefaceText = Typeface.DEFAULT;\n mChars = new char[256];\n mEditable = true;\n mScale = true;\n mDrag = false;\n mWait = false;\n mPaintLabel = true;\n mDisplayLnPanel = true;\n mBlockLineWidth = 2;\n mInputMethodManager = (InputMethodManager) getContext().getSystemService(Context.INPUT_METHOD_SERVICE);\n mClipboardManager = Clipboard.getClipboard(getContext());\n setUndoEnabled(true);\n mTabWidth = 4;\n mAutoIndent = true;\n mCursorPosition = -1;\n mHighlightCurrentBlock = true;\n setFocusable(true);\n setFocusableInTouchMode(true);\n mConnection = new RoseEditorInputConnection(this);\n mACPanel = new AutoCompletePanel(this);\n mTextActionPanel = new TextComposePanel(this);\n mTextActionPanel.setHeight((int)(mDpUnit * 60));\n mTextActionPanel.setWidth((int)(mDpUnit * 230));\n setEditorLanguage(null);\n setText(null);\n }", "public void setup()\n{\n BMLWriter bl = new BMLWriter(this, 41);\n bl.showGrid(true);\n \n \n bl.setAuthor(\"Robin Senior\");\n bl.setTitle(\"Crappy Circles\");\n bl.setEmail(\"senior@gmail.com\");\n bl.setURL(\"www.robinsenior.com\"); \n\n size(960,320);\n frameRate(30);\n colorMode(RGB,255);\n smooth();\n noStroke();\n\n //bl.startWriting(\"circle.bml\");\n}", "@Override\n\t\t\t\tpublic void displayB() {\n\t\t\t\t\tSystem.out.println(\"DisplayB class Y\");\n\n\t\t\t\t}", "private void toZB() {\n if (zhiBoFragment == null) {\n zhiBoFragment = new ZhiBoFragment();\n fragmenttransaction.add(R.id.frame_content, zhiBoFragment);\n } else {\n fragmenttransaction.show(zhiBoFragment);\n }\n }", "private void buildDisplay() {\n\t\tColorMap map = new ColorMap();\n\n\t\tfor (int i = 1; i < MAX_COLORS; i++) {\n\t\t\tmap.mapColor(i, new Color(0, (int) (i + 127), 0));\n\t\t}\n\n\t\t// When noting, it is white\n\t\tmap.mapColor(0, Color.WHITE);\n\n\t\tValue2DDisplay displayGrass = new Value2DDisplay(rabbitSpace.getGrassSpace(), map);\n\n\t\tObject2DDisplay displayRabbits = new Object2DDisplay(rabbitSpace.getRabbitSpace());\n\t\tdisplayRabbits.setObjectList(rabbitList);\n\n\t\tdisplaySurf.addDisplayable(displayGrass, \"Grass\");\n\t\tdisplaySurf.addDisplayable(displayRabbits, \"Rabbits\");\n\n\t\trabbitsAndGrassInSpace.addSequence(\"Number of Rabbits in Space\", new RabbitsInSpace());\n\t\trabbitsAndGrassInSpace.addSequence(\"Amount of Grass\", new GrassInSpace());\n\t}", "JTextArea getDisplay();", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "public void bilan_zone() {\n\n JLabel lbl_Bilan = new JLabel(\"BILAN :\");\n lbl_Bilan.setBounds(40, 170, 119, 16);\n add(lbl_Bilan);\n\n bilan_content = new JTextArea();\n bilan_content.setBounds(100, 170, 200, 150);\n bilan_content.setText(rapport_visite.elementAt(DAO_Rapport.indice)[3]);\n bilan_content.setLineWrap(true);\n bilan_content.setWrapStyleWord(true);\n bilan_content.setEditable(false);\n add(bilan_content);\n\n\n }", "public EditorBarajasGUI() {\n\t\t//dibujamos el cursor\n\t\tImageIcon cursor = new ImageIcon(\"../imagenes/cursores/puntero.gif\");\n\t\tImage image = cursor.getImage();\n\t\tCursor puntero = Toolkit.getDefaultToolkit().createCustomCursor(image, new Point(0, 0), \"img\");\n\t\tthis.setCursor(puntero);\n\n\t\ttry {\n\t\t\tjbInit();\n\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void createDisplayEditOverlay() {\n\t}", "private void setUpReference() {\n txt_source = (TextView) findViewById(R.id.txt_source);\n txt_author = (TextView) findViewById(R.id.txt_author);\n txt_title = (TextView) findViewById(R.id.txt_title);\n txt_content = (TextView) findViewById(R.id.txt_content);\n txt_data_author = (TextView) findViewById(R.id.txt_data_author);\n txt_data_title = (TextView) findViewById(R.id.txt_data_title);\n txt_data_content = (TextView) findViewById(R.id.txt_data_content);\n imageView = (ImageView) findViewById(R.id.detsBandImage);\n\n Util.setFont(txt_source, this, 0);\n Util.setFont(txt_content, this, 0);\n Util.setFont(txt_title, this, 0);\n Util.setFont(txt_author, this, 0);\n Util.setFont(txt_data_author, this, 0);\n Util.setFont(txt_data_title, this, 0);\n Util.setFont(txt_data_content, this, 0);\n\n }", "private void buildBalanceSheetPane() // buildBalanceSheetPane method start\n\t{\n\t\t// creating object\n\t\tBSOutput = new JTextArea();\n\t\t\n\t\t// object settings\n\t\tBSOutput.setText(log.balanceSheet());\n\t\tBSOutput.setEditable(false);\n\t\tBSOutput.setFont(font);\n\t\tBSOutput.setRows(20);\n\t\t\n\t\t// adding object and scroll bar to panel\n\t\tbalanceSheetPane.add(BSOutput);\n\t\tbalanceSheetPane.add(new JScrollPane(BSOutput));\n\t}", "public void setAppearanceStream(Rectangle bbox) {\r\n\r\n matrix = new AffineTransform();\r\n this.bbox = new Rectangle();\r\n this.bbox.setRect(bbox);\r\n if (shapes == null) {\r\n shapes = new Shapes();\r\n }\r\n\r\n // remove any previous text\r\n this.shapes.getShapes().clear();\r\n\r\n // setup the space for the AP content stream.\r\n AffineTransform af = new AffineTransform();\r\n af.scale(1, -1);\r\n af.translate(-this.bbox.getMinX(),\r\n -this.bbox.getMaxY());\r\n\r\n shapes.add(new TransformDrawCmd(af));\r\n\r\n // create the new font to draw with\r\n Font awtFont = new Font(fontName, fontStyle, fontSize);\r\n OFont font = new OFont(awtFont);\r\n // init font's metrics\r\n font.echarAdvance(' ');\r\n TextSprite textSprites =\r\n new TextSprite(font,\r\n content.length(),\r\n new AffineTransform(new AffineTransform()));\r\n textSprites.setRMode(TextState.MODE_FILL);\r\n textSprites.setStrokeColor(fontColor);\r\n\r\n // iterate over each line of text painting the strings.\r\n String[] lines = content.split(\"[\\\\r\\\\n]+\");\r\n\r\n float padding = 10; // border padding of the component\r\n float lineHeight = (float) font.getDescent() +\r\n (float) (font.getAscent());\r\n\r\n float advanceX = (float) bbox.getMinX() + padding;\r\n float advanceY = (float) bbox.getMinY() + padding;\r\n\r\n float currentX;\r\n float currentY = advanceY + lineHeight;\r\n\r\n float lastx = 0;\r\n\r\n for (String line : lines) {\r\n char currentChar;\r\n // glyph placement params\r\n float newAdvanceX;\r\n GlyphText glyphText = null;\r\n for (int i = 0; i < line.length(); i++) {\r\n currentChar = line.charAt(i);\r\n\r\n newAdvanceX = (float) font.echarAdvance(currentChar).getX();\r\n currentX = advanceX + lastx;\r\n lastx += newAdvanceX;\r\n\r\n // get normalized from from text sprite\r\n glyphText = textSprites.addText(\r\n String.valueOf(currentChar), // cid\r\n String.valueOf(currentChar), // unicode value\r\n currentX, currentY, newAdvanceX);\r\n }\r\n\r\n if (glyphText != null) {\r\n currentY += lineHeight;\r\n advanceX = (float) bbox.getMinX() + padding;\r\n lastx = 0;\r\n }\r\n }\r\n BasicStroke stroke;\r\n if (borderStyle.isStyleDashed()) {\r\n stroke = new BasicStroke(\r\n borderStyle.getStrokeWidth(), BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER,\r\n 10.0f, borderStyle.getDashArray(), 0.0f);\r\n } else {\r\n stroke = new BasicStroke(borderStyle.getStrokeWidth());\r\n }\r\n\r\n // background colour\r\n shapes.add(new ShapeDrawCmd(bbox));\r\n if (fillType) {\r\n shapes.add(new ColorDrawCmd(fillColor));\r\n shapes.add(new FillDrawCmd());\r\n }\r\n // border\r\n if (strokeType) {\r\n shapes.add(new StrokeDrawCmd(stroke));\r\n shapes.add(new ColorDrawCmd(color));\r\n shapes.add(new DrawDrawCmd());\r\n }\r\n // actual font.\r\n shapes.add(new ColorDrawCmd(fontColor));\r\n shapes.add(new TextSpriteDrawCmd(textSprites));\r\n }", "public abstract ModuleJiffyBoxes jiffyBoxes();", "public void applyBrake() {\n\t\t\r\n\t}", "public void run(BeliefNetwork bn, VisualizationController VC)\r\n\t{\r\n\t\tCacheManager.getInstance().reset();\r\n\t\tVC.beginTransaction();\r\n\t\tVC.pushAndApplyOperator(new Annotation(\"LS : Pre Processing\"));\r\n\t\tVC.pushAndApplyOperator(new Delay(\"delay_ls_introduction\", 500));\r\n\t\tCliqueTree CT = new CliqueTree(bn, VC);\r\n\t\tVC.pushAndApplyOperator(new Annotation(\"Organizing\"));\r\n\t\tVC.pushAndApplyOperator(new Delay(\"delay_organize\", 50));\r\n\t\tVC.pushAndApplyOperator(new CallForLayoutPolyTree());\r\n\t\tVC.pushAndApplyOperator(new CodePageSelect(-1));\r\n\t\tVC.pushAndApplyOperator(new Annotation(\"LS : Lambda & Pi Message Passing\"));\r\n\t\tVC.pushAndApplyOperator(new CodePageSelect(6));\r\n\t\tVC.pushAndApplyOperator(new NewColorLegend());\r\n\t\tVC.pushAndApplyOperator(new ColorLegendMap(0,\"No activity\"));\r\n\t\tVC.pushAndApplyOperator(new ColorLegendMap(14,\"lambdaprop\"));\r\n\t\tVC.pushAndApplyOperator(new ColorLegendMap(15,\"setlambdamessage\"));\r\n\t\tVC.pushAndApplyOperator(new ColorLegendMap(16,\"pipropigation\"));\r\n\t\tVC.pushAndApplyOperator(new ColorLegendMap(17,\"setpimessage\"));\r\n\t\tVC.pushAndApplyOperator(new Delay(\"delay_ls_lambdapi\", 500));\r\n\t\tCT.begin();\r\n\t\tVC.pushAndApplyOperator(new CodePageSelect(-1));\r\n\t\tVC.pushAndApplyOperator(new Annotation(\"LS : Marginalization\"));\r\n\t\tVC.pushAndApplyOperator(new NewColorLegend());\r\n\t\tVC.pushAndApplyOperator(new ColorLegendMap(18,\"marginalizing\"));\r\n\t\tVC.pushAndApplyOperator(new ColorLegendMap(19,\"done\"));\r\n\t\tVC.pushAndApplyOperator(new Delay(\"delay_ls_marginalization\", 500));\r\n\t\tmarginals = CT.Marginalize();\r\n\t\tbeliefnodes = CT.getNodes();\r\n\t\tVC.pushAndApplyOperator(new NewColorLegend());\r\n\t\tVC.pushAndApplyOperator(new Annotation(\"LS : Done\"));\r\n\t\tVC.commitTransaction();\r\n\t}", "private void createBody(Composite parent) {\r\n\t\tcomposite = new Composite(parent, SWT.NONE);\r\n\t\tcomposite.setBackground(Display.getCurrent().getSystemColor(\r\n\t\t\t\tSWT.COLOR_WHITE));\r\n\t\tcomposite.setLayout(null);\r\n\t\tcomposite.setBounds(new Rectangle(0, 0, 360, 207));\r\n\r\n\r\n\t\tLabel msLogo = new Label(composite, SWT.NO_BACKGROUND);\r\n\t\tlogo = new Image(shell.getDisplay(),IMAGE_PATH + \"logo_up.gif\");\r\n\t\tmsLogo.setImage(logo);\r\n\t\tmsLogo.setBounds(new Rectangle(20, 55, 96, 96));\r\n\t\t\r\n\t\t/*labelLogo = new Label(composite, SWT.NO_BACKGROUND);\r\n\t\tlogo = new Image(shell.getDisplay(),IMAGE_PATH+ \"logo_down.png\");\r\n\t\tlabelLogo.setImage(logo);\r\n\t\tlabelLogo.setBounds(new Rectangle(5, 5 + 96 + 5, 96, 96));\r\n*/\r\n\r\n\r\n\t\tlabelHeader = new Label(composite, SWT.NONE);\r\n\t\tlabelHeader.setForeground(SWTResourceManager.getColor(255, 128, 128));\r\n\t\tlabelHeader.setBounds(new Rectangle(130, 15, 168, 30));\r\n\t\tlabelHeader.setFont(new Font(Display.getDefault(), \"Tahoma\", 14,SWT.NORMAL));\r\n\t\tlabelHeader.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));\r\n\t\tlabelHeader.setText(\"关于CTC仿真系统\");\r\n\r\n\t\tlinkWeb = new Link(composite, SWT.NONE);\r\n\t\tlinkWeb.setBounds(new Rectangle(175, 140, 63, 18));\r\n\t\tlinkWeb.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));\r\n\t\tlinkWeb.setText(\"<a>详细信息</a>\");\r\n\t\tlinkWeb.addSelectionListener(new SelectionAdapter() {\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tProgram.launch(\"http://www.bjtu.edu.cn/\");\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\t\r\n\t\temailLink = new Link(composite, SWT.NONE);\r\n\t\temailLink.setBounds(new Rectangle(145, 180, 153, 18));\r\n\t\temailLink.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));\r\n\t\temailLink.setText(\"<a>版权所有© CTC开发小组</a>\");\r\n\t\temailLink.addSelectionListener(new SelectionAdapter() {\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tProgram.launch(\"mailto:bmxu@bjtu.edu.cn\");\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tlabelHeader_1 = new Label(composite, SWT.NONE);\r\n\t\tlabelHeader_1.setBounds(130, 55, 113, 30);\r\n\t\tlabelHeader_1.setFont(SWTResourceManager.getFont(\"Tahoma\", 14, SWT.NONE));\r\n\t\tlabelHeader_1.setBackground(SWTResourceManager.getColor(255, 255, 255));\r\n\t\tlabelHeader_1.setText(\"版本:V1.0\");\r\n\r\n\t\tlabelHeader_2 = new Label(composite, SWT.NONE);\r\n\t\tlabelHeader_2.setBounds(130, 100, 208, 30);\r\n\t\tlabelHeader_2.setFont(SWTResourceManager.getFont(\"Tahoma\", 14, SWT.NONE));\r\n\t\tlabelHeader_2.setBackground(SWTResourceManager.getColor(255, 255, 255));\r\n\t\tlabelHeader_2.setText(\"开发者:CTC开发小组\");\r\n\t}", "void dynamicRendering(String startBlipId);", "private void DrawBraid(GL gl, float x, float y, float size,\n\t\t\tfloat r, float g, float b) {\n\n float reflected_x=0, reflected_y=0;\n float reflected_vector_angle=0, reflected_image_angle=0, reflected_rotate=0;\n\n // Degeneracy = do not want\n\t\tif (m_length == 0.0f || m_width == 0.0f) {\n\t\t\treturn;\n\t\t}\n\n\t\t////int mct = (int) (1 / this.GetPEngine().m_uniscale);\n\t\t////mct = (mct / 2) / 100 * 100;\n\n //Do the reflection\n if(m_x_reflection==0 && m_y_reflection==0)\n {\n reflected_x=x;\n reflected_y=y;\n reflected_image_angle=m_slope;\n reflected_vector_angle=m_slope;\n reflected_rotate= m_rotate;\n }\n else if(m_x_reflection==1 && m_y_reflection==0)\n {\n reflected_x=x;\n reflected_y=-y;\n reflected_image_angle=90-m_slope;\n reflected_vector_angle=-m_slope;\n reflected_rotate= -m_rotate;\n }\n else if(m_x_reflection==0 && m_y_reflection==1)\n {\n reflected_x=-x;\n reflected_y=y;\n reflected_image_angle=-90-m_slope;\n reflected_vector_angle=180-m_slope;\n reflected_rotate= -m_rotate;\n }\n else if(m_x_reflection==1 && m_y_reflection==1)\n {\n reflected_x=-x;\n reflected_y=-y;\n reflected_image_angle=m_slope-180;\n reflected_vector_angle=m_slope+180;\n reflected_rotate= m_rotate;\n }\n\n\t\tfloat start_image_theta = (float) Math.toRadians(reflected_image_angle);\n \t\tfloat start_vector_theta = (float) Math.toRadians(reflected_vector_angle);\n\t\tfloat rotate_theta = (float) Math.toRadians(reflected_rotate);\n\t\tfloat cur_image_theta = 0f, cur_vector_theta = 0f;\n\t\tdouble image_costheta = 0, vector_costheta = 0;\n\t\tdouble image_sintheta = 0, vector_sintheta = 0;\n\t\tfloat xP = 0f;\n\t\tfloat yP = 0f;\n\t\tfloat xO = 0f, nextXO = 0f;\n\t\tfloat yO = 0f, nextYO = 0f;\n\n\t\t//if (txt == null) {\n\t\t//\ttxt = load(\"img/plaitWhite.png\");\n\t\t//}\n\t\tTextureCoords tc = m_txt.getImageTexCoords();\n\t\txO = nextXO = reflected_x;\n\t\tyO = nextYO = reflected_y;\n xP = m_cx * m_starting_dilation;\n\t\tyP = m_cy * m_starting_dilation;\n //vector\n\t\tcur_vector_theta = start_vector_theta;\n vector_costheta = Math.cos(cur_vector_theta);\n\t\tvector_sintheta = Math.sin(cur_vector_theta);\n //image\n cur_image_theta = start_image_theta;\n\t\timage_costheta = Math.cos(cur_image_theta);\n\t\timage_sintheta = Math.sin(cur_image_theta);\n\t\t\n\t\tfor (int i = 0; i < Iteration; i++) {\t\t\t\n DrawPlait(gl, xO, yO, xP / 2, yP / 2, image_costheta, image_sintheta, tc);\n\t\t\t//vector\n cur_vector_theta += rotate_theta;\n\t\t\tvector_costheta = Math.cos(cur_vector_theta);\n\t\t\tvector_sintheta = Math.sin(cur_vector_theta);\n //image\n\t\t\tcur_image_theta += rotate_theta;\n\t\t\timage_costheta = Math.cos(cur_image_theta);\n\t\t\timage_sintheta = Math.sin(cur_image_theta);\n //next centor position\n\t\t\tnextXO = xO + (float) (xP * m_translate * vector_costheta);\n\t\t\tnextYO = yO + (float) (yP * m_translate * vector_sintheta);\n\t\t\tif (m_vector) {\n\t\t\t\tDrawVector(gl, xO, yO, nextXO, nextYO, xP, cur_vector_theta);\n\t\t\t}\n\t\t\txO = nextXO;\n\t\t\tyO = nextYO;\n\t\t\txP *= m_dilate;\n\t\t\tyP *= m_dilate;\n\t\t}\n\t}", "public void buildFrame();", "void updateView () {\n updateScore();\n board.clearTemp();\n drawGhostToBoard();\n drawCurrentToTemp();\n view.setBlocks(board.getCombined());\n view.repaint();\n }", "abstract void snapshotLayout();", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void createContents(Composite viewArea, Map<String, Image> imageMap) {\n\t\tgraph = new Graph(viewArea, SWT.None);\r\n\t\tnodes = new LinkedList<GraphNode>();\r\n\t\tconnections = new LinkedList<GraphConnection>();\r\n\r\n\t\tString[] name = { \"Core\", \"Outline\", \"Package Explorer\", \"JUnit\",\r\n\t\t\t\t\"JavaDoc\", \"Debug\" };\r\n\t\tfor (int i = 0; i < name.length; i++) {\r\n\t\t\tnodes.add(new GraphNode(graph, SWT.None, name[i]));\r\n\t\t}\r\n\r\n\t\tconnections.add(CreateConnection(\"Core\", \"Outline\"));\r\n\t\tgraph.setLayoutAlgorithm(new SpringLayoutAlgorithm(\r\n\t\t\t\tLayoutStyles.NO_LAYOUT_NODE_RESIZING), true);\r\n\t\tgraph.addSelectionListener(new SelectionListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\r\n\t\t\t\tSystem.out.println(arg0);\r\n\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetDefaultSelected(SelectionEvent arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t}", "private void createViewerArea(Composite top) {\n Group viewerComp = new Group(top, SWT.SHADOW_IN);\n viewerComp.setText(\"PSH Viewer\");\n GridLayout viewerLayout = new GridLayout(1, false);\n viewerLayout.marginWidth = 15;\n viewerLayout.marginTop = 15;\n viewerLayout.marginBottom = 16;\n viewerComp.setLayout(viewerLayout);\n viewerComp.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));\n\n previewText = new Text(viewerComp,\n SWT.MULTI | SWT.BORDER | SWT.V_SCROLL);\n GridData textData = new GridData(SWT.FILL, SWT.FILL, true, true);\n\n textData.widthHint = PshUtil.getProductWidth(previewText, productFont);\n\n previewText.setLayoutData(textData);\n previewText.setEditable(false);\n previewText.setBackground(\n top.getDisplay().getSystemColor(SWT.COLOR_DARK_GRAY));\n previewText.setForeground(\n top.getDisplay().getSystemColor(SWT.COLOR_WHITE));\n previewText.setFont(productFont);\n textData.heightHint = previewText.getLineHeight() * 30;\n previewText.setText(previewProduct);\n }", "public final void mo3708b() {\n TextView textView = this.f7241c;\n boolean z = true;\n m5628a(textView, textView.length() != 0);\n TextView textView2 = this.f7242d;\n m5628a(textView2, textView2.length() != 0);\n TextView textView3 = this.f7243e;\n m5628a(textView3, textView3.length() != 0);\n ImageView imageView = this.f7244f;\n if (imageView.getDrawable() == null) {\n z = false;\n }\n m5628a(imageView, z);\n }", "private void displayGUI()\n {\n SpringLayout springLayout = new SpringLayout();\n setLayout(springLayout);\n\n displayTextAreas(springLayout);\n displayButtons(springLayout);\n displayLabels(springLayout);\n displayTables(springLayout);\n //displaySelectedQuestion();\n }", "public void print(BiPhrase bp, Alignement al){\n\t\tSystem.out.println(\"######################################\");\n\t\tfor ( String src : bp.getArraysrc()){\n\t\t\tSystem.out.print(src+\" \");\n\t\t}\n\t\tSystem.out.println();\n\t\tfor ( int align : al.getAlign()){\n\t\t\tSystem.out.print(align+\" \");\n\t\t}\t\t\n\t\tSystem.out.println();\n\t\tfor ( String dest : bp.getArraydest()){\n\t\t\tSystem.out.print(dest+\" \");\n\t\t}\t\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"######################################\");\t\t\n\t}", "public void displayBankBranch() {\n\t\t if(getBankVisibility()) {\n\t\t\t setRenderBankBranch(true);\n\t\t }else{\n\t\t\tsetRenderBankBranch(false); \n\t\t }\n\t\t \n\t }", "private void viewConfiguration(String table) {\n if (view != null) {\n frame.getContentPane().remove(view);\n }\n if (scrollPane != null) {\n frame.getContentPane().remove(scrollPane);\n }\n\n int imageWidth, imageHeight;\n\n // render image\n if (config.useBlankImage()) {\n imageWidth = config.getImageWidth();\n imageHeight = config.getImageHeight();\n canvas = new ZImageCanvas(imageWidth, imageHeight);\n }\n else {\n ImageIcon icon = new ImageIcon(config.getImageName(), config.getImageName());\n Image base = icon.getImage();\n imageHeight = base.getHeight(null);\n imageWidth = base.getWidth(null);\n canvas = new ZImageCanvas(base);\n }\n\n // render surrounding rectangle\n ZLayerGroup layer = canvas.getLayer();\n ZLine line = new ZLine(config.getMinimumPixelX(), config.getMinimumPixelY(), \n config.getMaximumPixelX(), config.getMinimumPixelY());\n ZVisualLeaf leaf = new ZVisualLeaf(line);\n layer.addChild(leaf);\n line = new ZLine(config.getMinimumPixelX(), config.getMinimumPixelY(), \n config.getMinimumPixelX(), config.getMaximumPixelY());\n leaf = new ZVisualLeaf(line);\n layer.addChild(leaf);\n line = new ZLine(config.getMaximumPixelX(), config.getMinimumPixelY(), \n config.getMaximumPixelX(), config.getMaximumPixelY());\n leaf = new ZVisualLeaf(line);\n layer.addChild(leaf);\n line = new ZLine(config.getMinimumPixelX(), config.getMaximumPixelY(), \n config.getMaximumPixelX(), config.getMaximumPixelY());\n leaf = new ZVisualLeaf(line);\n layer.addChild(leaf);\n\n // render the static motes\n for (Enumeration e=motes.elements(); e.hasMoreElements(); ) {\n leaf = new ZVisualLeaf((Mote)e.nextElement());\n layer.addChild(leaf);\n }\n\n JPanel main = new JPanel(new BorderLayout());\n\n // add scroll pane\n int x=0, y = 0;\n if (imageWidth > SCROLL_WIDTH) {\n x = SCROLL_WIDTH;\n }\n else {\n x = imageWidth;\n }\n\n if (imageHeight > SCROLL_HEIGHT) {\n y = SCROLL_HEIGHT;\n }\n else {\n y = imageHeight;\n }\n\n scrollPane = new ZScrollPane(canvas);\n\n scrollPane.setPreferredSize(new Dimension(x+20, y+20));\n frame.getContentPane().add(scrollPane, BorderLayout.CENTER);\n\n view = new JPanel(new GridLayout(0,3));\n view.add(new JLabel(\" X Position \"));\n view.add(new JLabel(\" Y Position \"));\n view.add(new JLabel(\" Mote ID \"));\n xpos = new JLabel (\" 0.0 \");\n ypos = new JLabel (\" 0.0 \");\n moteId = new JLabel(\" ID \");\n view.add(xpos);\n view.add(ypos);\n view.add(moteId);\n frame.getContentPane().add(view, BorderLayout.EAST);\n\n frame.pack();\n\n formatter = new DecimalFormat(\"###.##\");\n\n // create all the event handlers\n panEventHandler = new ZPanEventHandler(canvas.getCameraNode());\n zoomEventHandler = new ZoomEventHandler(canvas.getCameraNode());\n addEventHandler = new AddEventHandler(canvas, this, this, imageWidth, imageHeight, motes, frame);\n moveEventHandler = new MoveEventHandler(canvas, this, imageWidth, imageHeight, true);\n removeEventHandler = new RemoveEventHandler(canvas, canvas.getLayer(), motes, this);\n autoEventHandler = new AutoEventHandler(canvas, motes, imageWidth, imageHeight);\n \n // set the zoom and move event handlers to active\n zoomEventHandler.setActive(true);\n moveEventHandler.setActive(true);\n\n setMode(ADD_MODE);\n/*\n imageWithGrid = new BufferedImage(imageWidth, imageHeight, BufferedImage.TYPE_INT_RGB);\n Graphics g = imageWithGrid.createGraphics();\n g.drawImage(base, 0, 0, null);\n g.setColor(Color.black);\n \n double xdist = Math.abs(config.getMaximumRealX() - config.getMinimumRealX());\n double pxdist = (double)Math.abs((config.getMaximumPixelX() - config.getMinimumPixelX()));\n double xRatio = pxdist/xdist;\n double minX = (double)Math.min(config.getMinimumPixelX(), config.getMaximumPixelX());\n double maxX = (double)Math.max(config.getMinimumPixelX(), config.getMaximumPixelX());\n for (double i=minX; i<=maxX; i+=(xRatio*GRID_DISTANCE)) {\n g.drawLine((int)i,config.getMinimumPixelY(),(int)i,config.getMaximumPixelY());\n }\n g.drawLine(config.getMaximumPixelX(), config.getMinimumPixelY(), config.getMaximumPixelX(), config.getMaximumPixelY());\n\n double ydist = Math.abs(config.getMaximumRealY() - config.getMinimumRealY());\n double pydist = (double)Math.abs((config.getMaximumPixelY() - config.getMinimumPixelY()));\n double yRatio = pydist/ydist;\n double minY = (double)Math.min(config.getMinimumPixelY(), config.getMaximumPixelY());\n double maxY = (double)Math.max(config.getMinimumPixelY(), config.getMaximumPixelY());\n for (double i=minY; i<=maxY; i+=(yRatio*GRID_DISTANCE)) {\n g.drawLine(config.getMinimumPixelX(),(int)i,config.getMaximumPixelX(),(int)i);\n }\n g.drawLine(config.getMinimumPixelX(), config.getMaximumPixelY(), config.getMaximumPixelX(), config.getMaximumPixelY());\n*/\n }", "private View createDarkCell(){\n return LayoutInflater.from(this.context).inflate(R.layout.back, this.tableRoot, false);\n }", "public void display() {\n\t\ttree.resize(30,50);\n\t\tfor(int i = 650; i > 0; i -= 100) {\t\n\t\t\tt.image(tree,25,i);\n\t\t}\n\t\tfor(int i = 650; i > 0; i -= 100) {\t\n\t\t\tt.image(tree, 575, i);\n\t\t}\n\t}", "public final void onBindView(View view) {\n AppMethodBeat.m2504i(107165);\n super.onBindView(view);\n ImageView imageView = (ImageView) view.findViewById(2131822184);\n if (imageView != null) {\n if (this.drawable != null) {\n imageView.setImageDrawable(this.drawable);\n imageView.setVisibility(0);\n } else if (this.f4433ZV != 0) {\n imageView.setImageResource(this.f4433ZV);\n imageView.setVisibility(0);\n } else {\n imageView.setVisibility(8);\n }\n }\n LinearLayout linearLayout = (LinearLayout) view.findViewById(2131822347);\n if (this.height != -1) {\n linearLayout.setMinimumHeight(this.height);\n }\n TextView textView = (TextView) view.findViewById(2131822348);\n if (textView != null) {\n textView.setVisibility(this.qlf);\n textView.setText(this.pnJ);\n if (this.qle != -1) {\n textView.setBackgroundDrawable(C1338a.m2864g(this.context, this.qle));\n }\n }\n this.yBG = (ImageView) view.findViewById(2131822349);\n this.yBG.setVisibility(this.yBD);\n this.yBH = (ViewGroup) view.findViewById(2131822351);\n this.yBH.setVisibility(this.yBE);\n this.yBI = (TextView) view.findViewById(16908310);\n textView = (TextView) view.findViewById(2131826062);\n if (C5046bo.isNullOrNil(this.yBJ)) {\n textView.setVisibility(8);\n AppMethodBeat.m2505o(107165);\n return;\n }\n textView.setVisibility(0);\n textView.setText(this.yBJ);\n AppMethodBeat.m2505o(107165);\n }", "@Override\n public JSLFrame editPatch(Patch p) {\n return new FCB1010Editor(p);\n }", "public void arreglarBoton()\r\n\t{\r\n\t\tthis.setBorder(BorderFactory.createLineBorder(Color.white, 4));\r\n\t\tthis.setFont(new Font(\"Arial\", Font.BOLD, 17));\r\n\t}", "void dynamicRendering(ConversationBlip startBlip);", "private void buildUpGUI() {\n\t\tsetLayout( new BorderLayout() );\n\t\tadd(new JScrollPane( summaryEditorPane) );\n\t}", "private void drawBox(Graphics window, int hsBtoRGB, int x, int y) {\n\t\t\n\t}", "public String _designercreateview(Object _base,anywheresoftware.b4a.objects.LabelWrapper _lbl,anywheresoftware.b4a.objects.collections.Map _props) throws Exception{\n_mbase = (anywheresoftware.b4a.objects.B4XViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.B4XViewWrapper(), (java.lang.Object)(_base));\n //BA.debugLineNum = 35;BA.debugLine=\"Tag = mBase.Tag : mBase.Tag = Me\";\n_tag = _mbase.getTag();\n //BA.debugLineNum = 35;BA.debugLine=\"Tag = mBase.Tag : mBase.Tag = Me\";\n_mbase.setTag(this);\n //BA.debugLineNum = 36;BA.debugLine=\"cvs.Initialize(mBase)\";\n_cvs.Initialize(_mbase);\n //BA.debugLineNum = 37;BA.debugLine=\"mMin = Props.Get(\\\"Min\\\")\";\n_mmin = (int)(BA.ObjectToNumber(_props.Get((Object)(\"Min\"))));\n //BA.debugLineNum = 38;BA.debugLine=\"mMax = Props.Get(\\\"Max\\\")\";\n_mmax = (int)(BA.ObjectToNumber(_props.Get((Object)(\"Max\"))));\n //BA.debugLineNum = 39;BA.debugLine=\"pnl = xui.CreatePanel(\\\"pnl\\\")\";\n_pnl = _xui.CreatePanel(ba,\"pnl\");\n //BA.debugLineNum = 40;BA.debugLine=\"xlbl = Lbl\";\n_xlbl = (anywheresoftware.b4a.objects.B4XViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.B4XViewWrapper(), (java.lang.Object)(_lbl.getObject()));\n //BA.debugLineNum = 41;BA.debugLine=\"mBase.AddView(xlbl, 0, 0, 0, 0)\";\n_mbase.AddView((android.view.View)(_xlbl.getObject()),(int) (0),(int) (0),(int) (0),(int) (0));\n //BA.debugLineNum = 42;BA.debugLine=\"mBase.AddView(pnl, 0, 0, 0, 0)\";\n_mbase.AddView((android.view.View)(_pnl.getObject()),(int) (0),(int) (0),(int) (0),(int) (0));\n //BA.debugLineNum = 43;BA.debugLine=\"ValueColor = xui.PaintOrColorToColor(Props.Get(\\\"V\";\n_valuecolor = _xui.PaintOrColorToColor(_props.Get((Object)(\"ValueColor\")));\n //BA.debugLineNum = 44;BA.debugLine=\"If xui.IsB4A Or xui.IsB4i Then\";\nif (_xui.getIsB4A() || _xui.getIsB4i()) { \n //BA.debugLineNum = 45;BA.debugLine=\"stroke = 8dip\";\n_stroke = __c.DipToCurrent((int) (8));\n }else if(_xui.getIsB4J()) { \n //BA.debugLineNum = 47;BA.debugLine=\"stroke = 6dip\";\n_stroke = __c.DipToCurrent((int) (6));\n };\n //BA.debugLineNum = 49;BA.debugLine=\"Base_Resize(mBase.Width, mBase.Height)\";\n_base_resize(_mbase.getWidth(),_mbase.getHeight());\n //BA.debugLineNum = 50;BA.debugLine=\"End Sub\";\nreturn \"\";\n}", "public void displayBmi () {\n\t\t\tSystem.out.println (\"Underweight =< 18.5\\nNormal weight = 18.5-24.9\\nOverweight = 25 - 29.9\\nObese = 30 or higher\");\n\t\t}", "@Override\n \tprotected void controlRender(RenderManager rm, ViewPort vp) {\n \n \t}", "public void buildEditFrame() {\n\n\tframe.addWindowListener(new WindowAdapter() {\n\t public void windowClosing(WindowEvent e) {\n\t\t//System.exit(0);\n\t }\n\t});\n\n\t// show the frame\n frame.setSize(Width, Height);\n\tframe.setLocation(screenSize.width/2 - Width/2,\n\t\t\t screenSize.height/2 - Height/2);\n\tframe.getContentPane().setLayout(new BorderLayout());\n\tframe.getContentPane().add(jp, BorderLayout.CENTER);\n\n\tframe.pack();\n//\t((CDFEdit)getFrame()).getDialog().setVisible(false);\n\tframe.setVisible(true);\n\n\t// Deprecated API - jp.requestDefaultFocus(); \n\tjp.requestFocus();\n\tframe.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));\n }", "private void buildRTF() {\n\t\n}", "public void configureGallery(T aView)\n {\n aView.setFont(Font.Arial10); aView.setBorder(new Border.BevelBorder(0));\n Label label0 = new Label(\"Split\"); label0.setPadding(10,20,10,20); label0.setTextFill(Color.GRAY);\n Label label1 = new Label(\"View\"); label1.setPadding(10,20,10,20); label1.setTextFill(Color.GRAY);\n aView.setItems(label0,label1);\n }", "@Override\n\t\tpublic float getBoldOffset() {\n\t\t\treturn 0.5F;\n\t\t}", "@Override\r\n\t\t\t\tpublic void render(TwoDimensionBone object, Appendable appendable) throws IOException {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\n protected void onLayout(boolean changed, int l, int t, int r, int b) {\n view_top.layout((int) mDrange + dip2px(getContext(), 20) - view_top.getMeasuredWidth() / 2, t, (int) mDrange + view_top.getMeasuredWidth() / 2 + dip2px(getContext(), 20), view_top.getMeasuredHeight());\n view_mid.layout((int) mDrange + dip2px(getContext(), 20) - view_mid.getMeasuredWidth() / 2, view_top.getMeasuredHeight(), (int) mDrange + view_mid.getMeasuredWidth() / 2 + dip2px(getContext(), 20), view_top.getMeasuredHeight() + view_mid.getMeasuredHeight());\n pb.layout(dip2px(getContext(), 20) + l, view_top.getMeasuredHeight() + view_mid.getMeasuredHeight(), r - dip2px(getContext(), 20), view_top.getMeasuredHeight() + view_mid.getMeasuredHeight() + pb.getMeasuredHeight());\n }", "@Override\r\n\tprotected void initView() {\n\t\tsetSingleLine(true);\r\n\t\tsetWillNotDraw(false);\r\n\t}", "Board createLayout();", "@Override\n\tprotected void initView() {\n\t\t\n\t}", "@Override\n\tprotected void initView() {\n\t\t\n\t}", "public static String formatAsAVLBody(AVLBody body) {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(\"BODY\").append(\"\\n\");\n\t\tsb.append(body.getDescription()).append(\"\\n\");\n\t\n\t\t// wing main data\n\t\tsb.append(String.format(Locale.ROOT, \"%1$-11s %2$-11s\", \n\t\t\t\t\"#Nbody\", \"Bspace\")\n\t\t\t\t).append(\"\\n\");\n\t\tsb.append(\n\t\t\tString.format(Locale.ROOT, \"%1$-11d %2$-11.5g\", \n\t\t\t\tbody.getNBody(), body.getBSpace())\n\t\t\t\t).append(\"\\n\");\n\n\t\tif (body.isDuplicated()) {\n\t\t\tsb.append(\"YDUPLICATE\\n\");\n\t\t\tsb.append(body.getYDupl()).append(\"\\n\");\n\t\t}\n\n\t\tsb.append(\"#\\n\")\n\t\t .append(\"# x,y,z scale factors for whole body\\n\")\n\t\t .append(\"SCALE\\n\");\n\t\tsb.append(\n\t\t\t\tString.format(Locale.ROOT, \"%1$-11.5g %2$-11.5g %3$-11.5g\", \n\t\t\t\t\tbody.getScale()[0], body.getScale()[1], body.getScale()[2])\n\t\t\t\t\t).append(\"\\n\");\n\t\t\n\t\tsb.append(\"#\\n\")\n\t\t .append(\"# x,y,z bias for whole body\\n\")\n\t\t .append(\"TRANSLATE\\n\");\n\t\tsb.append(\n\t\t\t\tString.format(Locale.ROOT, \"%1$-11.5g %2$-11.5g %3$-11.5g\", \n\t\t\t\t\tbody.getOrigin()[0], body.getOrigin()[1], body.getOrigin()[2])\n\t\t\t\t\t).append(\"\\n\");\n\n\t\t// in case a body-section file is given\n\t\tif (body.getBodyCoordFile().isPresent()) {\n\t\t\tsb.append(\"BFIL\").append(\"\\n\");\n\t\t\tsb.append(body.getBodyCoordFile().get().getName()).append(\"\\n\");\t\t\t\n\t\t} \n\n\t\t// in case a body-section is given inline\n\t\tif (body.getBodySectionInline().isPresent()) {\n\t\t\tsb.append(\"AIRFOIL\").append(\"\\n\");\n\t\t\tArrays.asList(body.getBodySectionInline().get().getData()).stream()\n\t\t\t\t.forEach(pair -> \n\t\t\t\t\tsb.append(\n\t\t\t\t\t\tString.format(Locale.ROOT, \"%1$-11.5g %2$-11.5g\", pair[0], pair[1])\n\t\t\t\t\t).append(\"\\n\")\n\t\t\t\t);\n\t\t} \n\t\t\n\t\tsb.append(\"#\\n\")\n\t\t .append(\"#==============================================================\\n\")\n\t\t .append(\"#\\n\");\n\t\t\n\t\treturn sb.toString();\n\t}", "public Bout()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 400, 1); \n CreaBoutique();\n\n }", "void find_it () {\n xt = 210; yt = 105; fact = 50.0;\n if (viewflg != VIEW_FORCES) zoom_slider_pos_y = 50;\n current_part.spanfac = (int)(2.0*fact*current_part.aspect_rat*.3535);\n xt1 = xt + current_part.spanfac;\n yt1 = yt - current_part.spanfac;\n xt2 = xt - current_part.spanfac;\n yt2 = yt + current_part.spanfac;\n \n }", "private void refreshDisplay(){\n // The ArrayList bricks gets all the bricks currently on the board.\n bricks.addAll(board.getBoardBricks());\n bricks.addAll(board.getCurrentBlock().getBricks());\n g.clearRect(0, 0, BRICK_SIZE*(Board.BOUNDARY_RIGHT+7), BRICK_SIZE*(Board.BOUNDARY_BOTTOM+1));\n\n setupGhostBoard();\n for (Brick brick : ghostBoard.getCurrentBlock().getBricks()){\n g.setFill(Color.rgb(61, 61, 61));\n g.fillRect(brick.getX() * BRICK_SIZE, brick.getY() * BRICK_SIZE, BRICK_SIZE, BRICK_SIZE);\n g.setStroke(Color.WHITE);\n g.setLineWidth(2.0);\n g.strokeRect(brick.getX() * BRICK_SIZE, brick.getY() * BRICK_SIZE, BRICK_SIZE, BRICK_SIZE);\n }\n\n for (Brick brick : bricks) {\n g.setFill(getBrickColour(brick.getColour()));\n g.fillRect(brick.getX() * BRICK_SIZE + 2, brick.getY() * BRICK_SIZE + 2, BRICK_SIZE - 4, BRICK_SIZE - 4);\n }\n\n if(board.getHeldBlock() != null){\n for(Brick brick : board.getHeldBlock().getBricks()){\n g.setFill(getBrickColour(brick.getColour()));\n g.fillRect(brick.getX() * BRICK_SIZE + 259, brick.getY() * BRICK_SIZE + 44, BRICK_SIZE - 4, BRICK_SIZE - 4);\n }\n }\n\n for(Brick brick : board.getBlockQueue().get(0).getBricks()){\n g.setFill(getBrickColour(brick.getColour()));\n g.fillRect(brick.getX() * BRICK_SIZE + 259, brick.getY() * BRICK_SIZE + 184, BRICK_SIZE - 4, BRICK_SIZE - 4);\n }\n\n score.setText(\"\" + board.getScore());\n highScore.setText(\"\" + Math.max(FileHandler.readHighScore(), board.getScore()));\n level.setText(\"\" + board.getLevel());\n lines.setText(\"\" + board.getTotalLinesCleared());\n // All the elements of bricks must be removed, otherwise they stack up.\n bricks.removeAll(bricks);\n\n if(board.isGameOver()){\n g.setFill(Color.rgb(31, 31, 31, 0.5));\n g.fillRect(0, 0, BRICK_SIZE*(Board.BOUNDARY_RIGHT+1), BRICK_SIZE*(Board.BOUNDARY_BOTTOM+1));\n g.setTextAlign(TextAlignment.CENTER);\n g.setTextBaseline(VPos.CENTER);\n g.setFill(Color.WHITE);\n g.setFont(new Font(\"Impact\", 50));\n g.fillText(\n \"GAME OVER\",\n 160, 352\n );\n g.setFill(Color.rgb(190, 190, 190));\n g.setFont(new Font(\"Impact\", 20));\n g.fillText(\n \"Press 'Esc' to exit.\",\n 160, 392\n );\n\n int oldHighScore = FileHandler.readHighScore(), newHighScore = board.getScore();\n if(oldHighScore < newHighScore){\n highScoreSurpassed = true;\n }\n if(highScoreSurpassed){\n g.setFill(Color.WHITESMOKE);\n g.setFont(new Font(\"Impact\", 24));\n g.fillText(\n \"New High Score: \" + newHighScore + \"!\\nOld High Score: \" + oldHighScore + \".\",\n 160, 502\n );\n }\n }\n }", "public void buildTileOfQuadrupleView(Context context,FakeSuiteBean sb) {\n\t\tpartitionView = new QuadrupleView(context);\n\t\tpartitionView.setContent(sb.resId);\n\t\ttile = new TileView(context);\n\t\ttile.setContent(partitionView);\n\t\ttile.setTitle(sb.tilte);\n\t\ttileViewList.add(tile);\n\t}", "public Shape modelToView(int pos, Shape a, Position.Bias b) throws BadLocationException {\n int index = getViewIndex(pos, b);\n if (index >= 0) {\n Shape ca = getChildAllocation(index, a);\n\n // forward to the child view\n ViewLayoutState child = getChild(index);\n View cv = child.getView();\n return cv.modelToView(pos, ca, b);\n } else {\n Document doc = getDocument();\n int docLen = (doc != null) ? doc.getLength() : -1;\n throw new BadLocationException(\"Offset \" + pos + \" with bias \" + b + \" is outside of the view\" //NOI18N\n + \", children = \" + getViewCount() //NOI18N\n + (getViewCount() > 0 ? \" covering offsets <\" + //NOI18N\n getView(0).getStartOffset() + \", \" + //NOI18N\n getView(getViewCount() - 1).getEndOffset() + \">\" : \"\") + //NOI18N\n \", docLen=\" + docLen\n , pos);\n }\n }", "private final void m110459at() {\n float b = ((float) C23482j.m77098b(mo75261ab())) / ((float) C23486n.m77122a(375.0d));\n if (mo86957ao()) {\n this.f89205aX = (LinearLayout) this.itemView.findViewById(R.id.e_w);\n this.f89206aY = (LinearLayout) this.itemView.findViewById(R.id.e_u);\n this.f89216bj = (DmtTextView) this.itemView.findViewById(R.id.cl);\n this.f89207aZ = (AdRatingView) this.itemView.findViewById(R.id.d5);\n this.f89209ba = this.itemView.findViewById(R.id.ce);\n this.f89210bb = (DmtTextView) this.itemView.findViewById(R.id.b_);\n this.f89217bk = (LinearLayout) this.itemView.findViewById(R.id.ch);\n this.f89218bl = (DescTextView) this.itemView.findViewById(R.id.bo);\n this.f89219bm = (RemoteImageView) this.itemView.findViewById(R.id.c5);\n this.f89211bc = (DmtTextView) this.itemView.findViewById(R.id.aj6);\n this.f89220bn = (DmtTextView) this.itemView.findViewById(R.id.aj_);\n LinearLayout linearLayout = this.f89206aY;\n if (linearLayout != null) {\n LayoutParams layoutParams = linearLayout.getLayoutParams();\n if (layoutParams != null) {\n layoutParams.width = (int) (((float) C23486n.m77122a(183.0d)) * b);\n }\n }\n DmtTextView dmtTextView = this.f89220bn;\n if (dmtTextView != null) {\n LayoutParams layoutParams2 = dmtTextView.getLayoutParams();\n if (layoutParams2 != null) {\n layoutParams2.width = (int) (((float) C23486n.m77122a(86.5d)) * b);\n }\n }\n DmtTextView dmtTextView2 = this.f89211bc;\n if (dmtTextView2 != null) {\n LayoutParams layoutParams3 = dmtTextView2.getLayoutParams();\n if (layoutParams3 != null) {\n layoutParams3.width = (int) (((float) C23486n.m77122a(86.5d)) * b);\n if (layoutParams3 != null) {\n if (layoutParams3 != null) {\n ((MarginLayoutParams) layoutParams3).setMarginStart((int) (((float) C23486n.m77122a(10.0d)) * b));\n } else {\n throw new TypeCastException(\"null cannot be cast to non-null type android.view.ViewGroup.MarginLayoutParams\");\n }\n }\n }\n }\n } else {\n this.f89205aX = (LinearLayout) this.itemView.findViewById(R.id.aw_);\n this.f89206aY = (LinearLayout) this.itemView.findViewById(R.id.aw8);\n this.f89216bj = (DmtTextView) this.itemView.findViewById(R.id.ck);\n this.f89207aZ = (AdRatingView) this.itemView.findViewById(R.id.d4);\n this.f89209ba = this.itemView.findViewById(R.id.cd);\n this.f89210bb = (DmtTextView) this.itemView.findViewById(R.id.b9);\n this.f89217bk = (LinearLayout) this.itemView.findViewById(R.id.cg);\n this.f89218bl = (DescTextView) this.itemView.findViewById(R.id.bn);\n this.f89219bm = (RemoteImageView) this.itemView.findViewById(R.id.c4);\n this.f89211bc = (DmtTextView) this.itemView.findViewById(R.id.aj5);\n this.f89220bn = (DmtTextView) this.itemView.findViewById(R.id.aj9);\n LinearLayout linearLayout2 = this.f89206aY;\n if (linearLayout2 != null) {\n LayoutParams layoutParams4 = linearLayout2.getLayoutParams();\n if (layoutParams4 != null) {\n layoutParams4.width = (int) (((float) C23486n.m77122a(223.0d)) * b);\n }\n }\n DmtTextView dmtTextView3 = this.f89220bn;\n if (dmtTextView3 != null) {\n LayoutParams layoutParams5 = dmtTextView3.getLayoutParams();\n if (layoutParams5 != null) {\n layoutParams5.width = (int) (((float) C23486n.m77122a(106.5d)) * b);\n }\n }\n DmtTextView dmtTextView4 = this.f89211bc;\n if (dmtTextView4 != null) {\n LayoutParams layoutParams6 = dmtTextView4.getLayoutParams();\n if (layoutParams6 != null) {\n layoutParams6.width = (int) (((float) C23486n.m77122a(106.5d)) * b);\n if (layoutParams6 != null) {\n if (layoutParams6 != null) {\n ((MarginLayoutParams) layoutParams6).setMarginStart((int) (((float) C23486n.m77122a(10.0d)) * b));\n } else {\n throw new TypeCastException(\"null cannot be cast to non-null type android.view.ViewGroup.MarginLayoutParams\");\n }\n }\n }\n }\n }\n DescTextView descTextView = this.f89218bl;\n if (descTextView != null) {\n descTextView.setDescLightDrawable(R.drawable.z2);\n }\n DescTextView descTextView2 = this.f89218bl;\n if (descTextView2 != null) {\n descTextView2.mo1061a();\n }\n LinearLayout linearLayout3 = this.f89205aX;\n if (linearLayout3 != null) {\n linearLayout3.setOnClickListener(new C34215i(this));\n }\n DmtTextView dmtTextView5 = this.f89216bj;\n if (dmtTextView5 != null) {\n dmtTextView5.setOnClickListener(new C34207c(this));\n }\n LinearLayout linearLayout4 = this.f89217bk;\n if (linearLayout4 != null) {\n linearLayout4.setOnClickListener(new C34208d(this));\n }\n DescTextView descTextView3 = this.f89218bl;\n if (descTextView3 != null) {\n descTextView3.setOnClickListener(new C34209e(this));\n }\n RemoteImageView remoteImageView = this.f89219bm;\n if (remoteImageView != null) {\n remoteImageView.setOnClickListener(new C34210f(this));\n }\n DmtTextView dmtTextView6 = this.f89211bc;\n if (dmtTextView6 != null) {\n dmtTextView6.setOnClickListener(new C34211g(this));\n }\n DmtTextView dmtTextView7 = this.f89220bn;\n if (dmtTextView7 != null) {\n dmtTextView7.setOnClickListener(new C34214h(this));\n }\n C43081e.m136671a((View) this.f89211bc, 0.75f);\n C43081e.m136670a(this.f89220bn);\n C43081e.m136671a((View) this.f89218bl, 0.75f);\n C43081e.m136671a((View) this.f89219bm, 0.75f);\n C43081e.m136671a((View) this.f89217bk, 0.75f);\n C43081e.m136671a((View) this.f89216bj, 0.75f);\n if (C25352e.m83221d(this.f77546j)) {\n DmtTextView dmtTextView8 = this.f89211bc;\n if (dmtTextView8 != null) {\n dmtTextView8.setText(C25384x.m83526a(mo75261ab(), this.f77546j, true));\n }\n float a = (float) C23486n.m77122a(2.0d);\n Context ab = mo75261ab();\n C7573i.m23582a((Object) ab, \"context\");\n Drawable bVar = new C24510b(a, ab.getResources().getColor(R.color.w0));\n if (C25352e.m83199A(this.f77546j)) {\n bVar = C43081e.m136669a(bVar.mutate(), C0683b.m2912c(mo75261ab(), R.color.a5q));\n C7573i.m23582a((Object) bVar, \"AdAnimationUtils.tintDra…or(context, R.color.s14))\");\n }\n DmtTextView dmtTextView9 = this.f89211bc;\n if (dmtTextView9 != null) {\n dmtTextView9.setBackground(bVar);\n }\n }\n if (SymphonyAdManager.m82664a().mo65651b(mo75261ab(), this.f77546j) || SymphonyAdManager.m82664a().mo65654c(mo75261ab(), this.f77546j)) {\n int i = 0;\n if (C25352e.m83221d(this.f77546j)) {\n Aweme aweme = this.f77546j;\n C7573i.m23582a((Object) aweme, \"mAweme\");\n AwemeRawAd awemeRawAd = aweme.getAwemeRawAd();\n if (awemeRawAd == null) {\n C7573i.m23580a();\n }\n C7573i.m23582a((Object) awemeRawAd, \"mAweme.awemeRawAd!!\");\n i = awemeRawAd.getNativeCardType();\n }\n switch (i) {\n case 1:\n m110460au();\n return;\n case 2:\n m110461av();\n return;\n default:\n m110460au();\n break;\n }\n }\n }", "@Override\n\t\tpublic void displayB() {\n\t\t\tSystem.out.println(\"Display B class X\");\n\t\t}", "protected abstract void bindingView();", "BR createBR();", "@Override\n public int getRenderType()\n {\n return 22;\n }", "private void buildControls() {\n\t\tsetLayout(new FillLayout());\n\t\tSashForm child = new SashForm(this, SWT.VERTICAL);\n\t\ttable = new Table(child, SWT.FULL_SELECTION | SWT.MULTI | SWT.BORDER );\n\t\ttable.addSelectionListener(createSelctionListener());\n\t\tviewer = buildAndLayoutTable(table);\n\t\taddDNDSupport(viewer);\n\t\tattachContentProvider(viewer);\n\t\tattachLabelProvider(viewer);\n\t\tsingleRating = new RatingTable(child, null, SWT.HORIZONTAL, model);\n\t\t//Zum Debuggen ist das Textfeld sehr nützlich\n\t\t//Text target = new Text(child, SWT.NONE);\n\t\t//initDropTest(target);\n\t\t//child.setWeights(new int[] {2, 1, 1});\n\t\tchild.setWeights(new int[]{2, 1});\n\t\taddFilter(viewer);\n\t\tviewer.setInput(webtrace);\n\t}", "private void inflateThumbnailLayout(View row, BeadInfo beadInfo) {\n\t\tTextView colorCodeTV = (TextView) row.findViewById(R.id.colorNumber);\n\t\tif (colorCodeTV != null){\n\t\t\tString colorCode = beadInfo.getColorCode();\n\t\t\tif (colorCode != null){\n\t\t\t\tcolorCodeTV.setText(colorCode);\n\t\t\t\timageInserter = new BitmapInserter();\n\t\t\t\timageInserter.setLocation((ImageView) row.findViewById(R.id.beadIconColumn));\n\t\t\t\timageInserter.setStorage(new File(APPFOLDER, IMAGEFOLDER));\n\t\t\t\timageInserter.execute(colorCode);\n\t\t\t}\n\t\t}\n\t}", "private void createContents() {\n // シェル\n super.createContents(this.parent, SWT.CLOSE | SWT.TITLE, false);\n this.getShell().setText(\"つぶやく\");\n this.shell = this.getShell();\n\n // レイアウト\n GridLayout glShell = new GridLayout(3, false);\n // glShell.horizontalSpacing = 1;\n glShell.marginHeight = 10;\n glShell.marginWidth = 10;\n // glShell.verticalSpacing = 1;\n this.shell.setLayout(glShell);\n\n Label thumnail = new Label(this.shell, SWT.NONE);\n GridData gdThumnail = new GridData(SWT.CENTER, SWT.CENTER, false, false, 3, 1);\n thumnail.setLayoutData(gdThumnail);\n try {\n Image orig = SwtUtils.makeImage(this.imageFile);\n thumnail.setImage(SwtUtils.scaleToFit(orig, 400, 300));\n orig.dispose();\n } catch (IOException e2) {\n SwtUtils.errorDialog(e2, TweetDialog.this.shell);\n }\n\n final Text text = new Text(this.shell, SWT.MULTI | SWT.BORDER | SWT.WRAP);\n GridData gdText = new GridData(SWT.FILL, SWT.FILL, true, true, 3, 1);\n gdText.widthHint = SwtUtils.DPIAwareWidth(300);\n gdText.heightHint = SwtUtils.DPIAwareHeight(80);\n text.setLayoutData(gdText);\n\n Label userName = new Label(this.shell, SWT.NONE);\n userName.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\n try {\n userName.setText(TwitterClient.getInstance().getUser().getScreenName());\n } catch (TwitterException e1) {\n SwtUtils.errorDialog(e1, TweetDialog.this.shell);\n }\n\n final Label remainChars = new Label(this.shell, SWT.NONE);\n remainChars.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));\n text.addModifyListener(new ModifyListener() {\n\n @Override\n public void modifyText(ModifyEvent e) {\n int remain = 117 - text.getText().length();\n remainChars.setText(String.valueOf(remain));\n }\n });\n text.setText(\"\");\n\n Button tweet = new Button(this.shell, SWT.NONE);\n GridData gdTweet = new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1);\n gdTweet.widthHint = SwtUtils.DPIAwareWidth(100);\n tweet.setLayoutData(gdTweet);\n tweet.setText(\"つぶやく\");\n tweet.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n try {\n TwitterClient.getInstance().tweet(\n TweetDialog.this, text.getText(), TweetDialog.this.imageFile);\n TweetDialog.this.shell.close();\n ApplicationMain.logPrint(\"つぶやきました\");\n } catch (TwitterException e1) {\n SwtUtils.errorDialog(e1, TweetDialog.this.shell);\n }\n }\n });\n\n this.shell.pack();\n }", "public Arbol_BB() {\r\n raiz = \"\";\r\n subABizq = null;\r\n subABder = null;\r\n }", "protected abstract void showBottomFace();", "Composite createBlockContent( Composite parent, FormToolkit toolkit );", "private void handle_mode_display() {\n\t\t\t\n\t\t}", "void buildLayout(){\n\t\tsetText(\"Score: \" + GameModel.instance().getPoints());\n\t\tsetX(10);\n\t\tsetY(10);\n\t\tsetFont(Font.font(\"verdana\", FontWeight.BOLD, FontPosture.REGULAR, 20));\n\t\t\n\t}", "public void i() {\n float f2;\n float f3 = 0.0f;\n RectF b2 = b(getDisplayMatrix());\n q.a(this.e, \"checkMatrixBounds cur rect: \" + b2.toString() + \" width: \" + b2.width() + \" height: \" + b2.height());\n if (b2 != null && getDrawable() != null) {\n float height = b2.height();\n float width = b2.width();\n int i2 = this.j;\n if (height <= ((float) i2)) {\n q.a(this.e, \"+1111111111111+: height<=cropperHeight\");\n switch (n.a[this.L.ordinal()]) {\n case 1:\n f2 = -b2.top;\n break;\n case 2:\n f2 = (((float) i2) - height) - b2.top;\n break;\n default:\n f2 = (((((float) i2) - height) / 2.0f) - b2.top) + ((float) getTopBottomGap());\n break;\n }\n } else if (b2.top > ((float) getTopBottomGap())) {\n f2 = (-b2.top) + ((float) getTopBottomGap());\n q.a(this.e, \"+2222222222222+: \" + b2.top + \" \" + getTopBottomGap());\n } else if (b2.bottom < ((float) (getTopBottomGap() + i2))) {\n f2 = ((float) (getTopBottomGap() + i2)) - b2.bottom;\n q.a(this.e, \"+333333333333333+: \" + i2 + \" \" + getTopBottomGap() + \" \" + b2.bottom);\n } else {\n f2 = 0.0f;\n }\n int i3 = this.i;\n if (width <= ((float) i3)) {\n switch (n.a[this.L.ordinal()]) {\n case 1:\n f3 = -b2.left;\n break;\n case 2:\n f3 = (((float) i3) - width) - b2.left;\n break;\n default:\n f3 = (((((float) i3) - width) / 2.0f) - b2.left) + ((float) getLeftRightGap());\n break;\n }\n } else if (b2.left > ((float) getLeftRightGap())) {\n f3 = (-b2.left) + ((float) getLeftRightGap());\n } else if (b2.right < ((float) (getLeftRightGap() + i3))) {\n f3 = ((float) (getLeftRightGap() + i3)) - b2.right;\n }\n q.a(this.e, \"correct: \" + f3 + Token.SEPARATOR + f2);\n this.x.postTranslate(f3, f2);\n }\n }", "public Container doMakeContents() {\n\n positionAtClickCbx = new JCheckBox(\"Position at click\", false);\n positionLabel = new JLabel(\" \", JLabel.LEFT);\n\n // make entry boxes for range ring center location; \n // preload with current position.\n boolean set = false;\n if (Double.isNaN(lat)) {\n lat = rangeRings.getCenterLatitude();\n } else {\n set = true;\n }\n if (Double.isNaN(lon)) {\n lon = rangeRings.getCenterLongitude();\n } else {\n set = true;\n }\n if (set) {\n try {\n rangeRings.setCenterPoint(lat, lon);\n rescaleLabels();\n } catch (Exception exc) {\n logException(\"setting center point\", exc);\n }\n }\n\n latField = new JTextField(getDisplayConventions().formatLatLon(lat),\n 7);\n latField.addActionListener(this);\n latField.setActionCommand(CMD_CENTER_LAT);\n\n lonField = new JTextField(getDisplayConventions().formatLatLon(lon),\n 7);\n lonField.addActionListener(this);\n lonField.setActionCommand(CMD_CENTER_LON);\n\n\n double[] stretchy = {\n 0, 0.0, 1.0, 1.0, 1.0, 0.0, 1.0\n };\n distanceUnitLabels = new ArrayList<JLabel>();\n String distUnitText = \" (\"+getDisplayUnit()+\") \";\n for (int i = 0; i < 3; i++) {\n distanceUnitLabels.add(new JLabel(distUnitText));\n }\n \n // Create the link button for Color and Line Width\n linkColorAndLineWidthButton =\n GuiUtils.getToggleImageButton(\"/auxdata/ui/icons/link_break.png\",\n \"/auxdata/ui/icons/link.png\", 0, 0,\n true);\n linkColorAndLineWidthButton.setContentAreaFilled(false);\n // Initialize link state as true (linked)\n linkColorAndLineWidthButton.setSelected(true);\n linkColorAndLineWidthButton.setToolTipText(\n \"If linked, Color and Line Width changes apply to Range Rings, Radials, and Labels.\");\n \n rrColorSwatch = (ColorSwatchComponent) makeColorBox(CMD_RR_COLOR, rrColor);\n rrColorSwatch.setPreferredSize(Constants.DEFAULT_COLOR_PICKER_SIZE);\n JPanel rrColPanel = new JPanel(new FlowLayout());\n rrColPanel.add(rrColorSwatch);\n\n radColorSwatch = (ColorSwatchComponent) makeColorBox(CMD_RAD_COLOR, radColor);\n radColorSwatch.setPreferredSize(Constants.DEFAULT_COLOR_PICKER_SIZE);\n JPanel radColPanel = new JPanel(new FlowLayout());\n radColPanel.add(radColorSwatch);\n\n lblColorSwatch = (ColorSwatchComponent) makeColorBox(CMD_LBL_COLOR, lblColor);\n lblColorSwatch.setPreferredSize(Constants.DEFAULT_COLOR_PICKER_SIZE);\n JPanel lblColPanel = new JPanel(new FlowLayout());\n lblColPanel.add(lblColorSwatch);\n \n rrComboBox = makeLineWidthBox(CMD_RR_WIDTH, rrWidth);\n radComboBox = makeLineWidthBox(CMD_RAD_WIDTH, radWidth);\n lblComboBox = makeLineWidthBox(CMD_LBL_WIDTH, lblWidth);\n \n Component[] comps = new Component[] {\n \n // Header\n GuiUtils.filler(), \n GuiUtils.cLabel(\"Visible\"),\n GuiUtils.cLabel(\" Spacing \"), \n GuiUtils.cLabel(\" Unit \"),\n GuiUtils.cLabel(\" Color \"), \n GuiUtils.filler(),\n GuiUtils.cLabel(\" Line Width \"), \n \n // Row 1\n GuiUtils.rLabel(\"Range Rings: \"),\n GuiUtils.hbox(new JLabel(\" \"),\n makeCbx(\"\", CMD_RR_VIS, rrVisible)),\n makeSpacingBox(rrSpacingList, CMD_RR_SPACING, rrSpacing),\n distanceUnitLabels.get(0), \n rrColPanel,\n GuiUtils.filler(), rrComboBox,\n \n // Row 2\n GuiUtils.rLabel(\"Radials: \"),\n GuiUtils.hbox(new JLabel(\" \"),\n makeCbx(\"\", CMD_RAD_VIS, radVisible)),\n makeSpacingBox(radSpacingList, CMD_RAD_SPACING, radSpacing),\n new JLabel(\" (deg) \"), \n radColPanel,\n GuiUtils.filler(), radComboBox,\n \n // Row 3\n GuiUtils.rLabel(\"Labels: \"),\n GuiUtils.hbox(new JLabel(\" \"),\n makeCbx(\"\", CMD_LBL_VIS, lblVisible)),\n makeSpacingBox(lblSpacingList, CMD_LBL_SPACING, lblSpacing),\n distanceUnitLabels.get(1), \n lblColPanel,\n GuiUtils.filler(), lblComboBox,\n \n // Final row\n GuiUtils.rLabel(\" \"), new JLabel(\"Max. Radius: \"),\n makeSpacingBox(rrMaxRadiusList, CMD_RR_RADIUS, rrMaxRadius),\n distanceUnitLabels.get(2), GuiUtils.filler(),\n linkColorAndLineWidthButton\n };\n\n GuiUtils.tmpInsets = new Insets(5, 5, 5, 5);\n JPanel topInner = GuiUtils.doLayout(comps, 7, stretchy, GuiUtils.WT_N);\n JPanel topOuter = new JPanel(new FlowLayout(FlowLayout.LEADING));\n topOuter.add(topInner);\n \n List bottomComps = new ArrayList();\n\n stationCbx = new JComboBox();\n stationCbx.setFont(Font.decode(\"monospaced\"));\n\n setStations();\n stationCbx.setSelectedIndex(stationIdx);\n stationCbx.addActionListener(this);\n stationCbx.setActionCommand(CMD_STATIONNAMES);\n bottomComps.add(GuiUtils.rLabel(\"Location: \"));\n bottomComps.add(GuiUtils.left(GuiUtils.wrap(stationCbx)));\n\n bottomComps.add(GuiUtils.rLabel(\"Center:\"));\n bottomComps.add(\n GuiUtils.left(\n GuiUtils.hflow(\n Misc.newList(\n new JLabel(\" Latitude: \"), latField,\n new JLabel(\" Longitude: \"), lonField))));\n bottomComps.add(GuiUtils.rLabel(\" \"));\n bottomComps.add(GuiUtils.left(positionAtClickCbx));\n\n bottomComps.add(GuiUtils.rLabel(\"Vertical Position:\"));\n bottomComps.add(GuiUtils.hgrid(doMakeZPositionSlider(),\n GuiUtils.filler()));\n\n GuiUtils.tmpInsets = new Insets(5, 5, 5, 5);\n JPanel bottom = GuiUtils.doLayout(bottomComps, 2, GuiUtils.WT_NY,\n GuiUtils.WT_N);\n\n JTabbedPane tabbedPane = new JTabbedPane();\n tabbedPane.add(\"Location\", GuiUtils.top(GuiUtils.inset(bottom, 5)));\n tabbedPane.add(\"Settings\", GuiUtils.top(GuiUtils.inset(topOuter, 5)));\n return tabbedPane;\n }", "private static void createAndShowGUI() {\r\n //Disable boldface controls.\r\n UIManager.put(\"swing.boldMetal\", Boolean.FALSE); \r\n\r\n //Create and set up the window.\r\n JFrame frame = new JFrame(\"Exertion Scripting\");\r\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\r\n //Create and set up the content pane.\r\n NetletEditor newContentPane = new NetletEditor(null);\r\n newContentPane.setOpaque(true); //content panes must be opaque\r\n frame.setContentPane(newContentPane);\r\n\r\n //Display the window.\r\n frame.pack();\r\n frame.setVisible(true);\r\n }", "public InsertBlockHTMLExecutable(RichTextArea rta)\n {\n super(rta);\n }", "public void renderFlanges(int cons, int tex)\r\n/* 108: */ {\r\n/* 109:106 */ this.context.setTex(tex);\r\n/* 110:108 */ if ((cons & 0x1) > 0)\r\n/* 111: */ {\r\n/* 112:109 */ this.context.setTexFlags(0);\r\n/* 113:110 */ this.context.renderBox(63, 0.25D, 0.0D, 0.25D, 0.75D, 0.125D, 0.75D);\r\n/* 114: */ }\r\n/* 115:112 */ if ((cons & 0x2) > 0)\r\n/* 116: */ {\r\n/* 117:113 */ this.context.setTexFlags(112320);\r\n/* 118:114 */ this.context.renderBox(63, 0.25D, 0.875D, 0.25D, 0.75D, 1.0D, 0.75D);\r\n/* 119: */ }\r\n/* 120:116 */ if ((cons & 0x4) > 0)\r\n/* 121: */ {\r\n/* 122:117 */ this.context.setTexFlags(217134);\r\n/* 123:118 */ this.context.renderBox(63, 0.25D, 0.25D, 0.0D, 0.75D, 0.75D, 0.125D);\r\n/* 124: */ }\r\n/* 125:120 */ if ((cons & 0x8) > 0)\r\n/* 126: */ {\r\n/* 127:121 */ this.context.setTexFlags(188469);\r\n/* 128:122 */ this.context.renderBox(63, 0.25D, 0.25D, 0.875D, 0.75D, 0.75D, 1.0D);\r\n/* 129: */ }\r\n/* 130:124 */ if ((cons & 0x10) > 0)\r\n/* 131: */ {\r\n/* 132:125 */ this.context.setTexFlags(2944);\r\n/* 133:126 */ this.context.renderBox(63, 0.0D, 0.25D, 0.25D, 0.125D, 0.75D, 0.75D);\r\n/* 134: */ }\r\n/* 135:128 */ if ((cons & 0x20) > 0)\r\n/* 136: */ {\r\n/* 137:129 */ this.context.setTexFlags(3419);\r\n/* 138:130 */ this.context.renderBox(63, 0.875D, 0.25D, 0.25D, 1.0D, 0.75D, 0.75D);\r\n/* 139: */ }\r\n/* 140: */ }", "@Override\n\tpublic void updateCodeCanvas() {\n\n\t}" ]
[ "0.6526536", "0.5670378", "0.5572882", "0.5567596", "0.5564735", "0.55618364", "0.55000633", "0.54729575", "0.54190135", "0.5406607", "0.5396429", "0.5365877", "0.53524196", "0.5333702", "0.532778", "0.52877164", "0.5279487", "0.52712643", "0.5264509", "0.52568287", "0.52341247", "0.5227049", "0.5208484", "0.5189454", "0.51692915", "0.51681054", "0.5161131", "0.5156178", "0.51380765", "0.5135573", "0.51273847", "0.51273847", "0.51219445", "0.51190567", "0.5101447", "0.5095606", "0.50926566", "0.5092439", "0.5085867", "0.50829315", "0.5081807", "0.5076917", "0.5070815", "0.50555545", "0.5049164", "0.50403607", "0.5032675", "0.5032349", "0.50159836", "0.5003681", "0.4997118", "0.49936435", "0.4993367", "0.49851048", "0.49844608", "0.49794647", "0.49767512", "0.49669832", "0.4956225", "0.4956209", "0.4956194", "0.49556842", "0.49546608", "0.4944131", "0.4942933", "0.4942333", "0.49362445", "0.49187875", "0.4918148", "0.49177226", "0.49171695", "0.49156284", "0.49040848", "0.4901682", "0.49014628", "0.49014628", "0.49014312", "0.49013713", "0.4900526", "0.48995155", "0.48918802", "0.48869485", "0.48857465", "0.4878748", "0.4869237", "0.48667103", "0.48642337", "0.4860764", "0.4859552", "0.4857399", "0.48509184", "0.48492306", "0.48487502", "0.4847722", "0.4847662", "0.4846543", "0.4842803", "0.48314264", "0.4829461", "0.48261777", "0.48232153" ]
0.0
-1
This method queries for specific users based on user entered search criteria, returning all if the criteria is empty
public List<User> getSpecificUsers(String searchQuery) { logger.info("Currently in method 'getSpecificUsers()'."); Database database = Database.getInstance(); Connection connection = null; List<User> specificUsers = new ArrayList<User>(); String sql = "SELECT * FROM users WHERE id LIKE '%" + searchQuery + "%' OR first_name LIKE '%" + searchQuery + "%' or last_name LIKE '%" + searchQuery + "%' or date_of_birth LIKE '%" + searchQuery + "%'"; try { database.connect(); connection = database.getConnection(); Statement selectStatement = connection.createStatement(); ResultSet results = selectStatement.executeQuery(sql); while (results.next()) { User employee = createUserFromResults(results); specificUsers.add(employee); } database.disconnect(); } catch (SQLException e) { logger.error("Encountered an SQLException: ", e); } catch (Exception e) { logger.error("Encountered an Exception: ", e); } return specificUsers; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic ArrayList<User> searchUsers() {\n\t\treturn userDao.searchUsers();\n\t}", "public static void search() {\n int userSelected = selectFromList(crudParamOptions);\n switch (userSelected){\n case 1:\n searchFirstName();\n break;\n case 2:\n searchLastName();\n break;\n case 3:\n searchPhone();\n break;\n case 4:\n searchEmail();\n break;\n default:\n break;\n }\n }", "public List<User> searchUser(String searchValue);", "public UserRow[] searchUsers(UserRow userModel, boolean isAnd)\n throws AdminPersistenceException {\n boolean concatAndOr = false;\n String andOr;\n StringBuffer theQuery = new StringBuffer(SELECT_SEARCH_USERS);\n Vector<Integer> ids = new Vector<Integer>();\n Vector<String> params = new Vector<String>();\n \n if (isAnd) {\n andOr = \") AND (\";\n } else {\n andOr = \") OR (\";\n }\n concatAndOr = addIdToQuery(ids, theQuery, userModel.id, \"id\", concatAndOr,\n andOr);\n concatAndOr = addIdToQuery(ids, theQuery, userModel.domainId, \"domainId\",\n concatAndOr, andOr);\n concatAndOr = addParamToQuery(params, theQuery, userModel.specificId,\n \"specificId\", concatAndOr, andOr);\n concatAndOr = addParamToQuery(params, theQuery, userModel.login, \"login\",\n concatAndOr, andOr);\n concatAndOr = addParamToQuery(params, theQuery, userModel.firstName,\n \"firstName\", concatAndOr, andOr);\n concatAndOr = addParamToQuery(params, theQuery, userModel.lastName,\n \"lastName\", concatAndOr, andOr);\n concatAndOr = addParamToQuery(params, theQuery, userModel.eMail, \"email\",\n concatAndOr, andOr);\n concatAndOr = addParamToQuery(params, theQuery, userModel.accessLevel,\n \"accessLevel\", concatAndOr, andOr);\n concatAndOr =\n addParamToQuery(params, theQuery, userModel.loginQuestion, \"loginQuestion\", concatAndOr,\n andOr);\n concatAndOr =\n addParamToQuery(params, theQuery, userModel.loginAnswer, \"loginAnswer\", concatAndOr, andOr);\n if (concatAndOr) {\n theQuery.append(\") AND (accessLevel <> 'R')\");\n } else {\n theQuery.append(\" WHERE (accessLevel <> 'R')\");\n }\n theQuery.append(\" order by UPPER(lastName)\");\n \n int[] idsArray = new int[ids.size()];\n for (int i = 0; i < ids.size(); i++) {\n idsArray[i] = ids.get(i).intValue();\n }\n \n return getRows(theQuery.toString(), idsArray, params.toArray(new String[0])).toArray(\n new UserRow[0]);\n }", "List<User> searchUsers(String searchTerm) {\n return null;\n }", "@Override\n public List<User> searchUserByParams(Map<String, String> parametersSearch) throws ServiceException {\n List<User> users;\n String searchType = parametersSearch.get(USER_SEARCH_TYPE_PARAMETER_NAME);\n if (searchType == null) {\n return Collections.emptyList();\n }\n try {\n manager.beginTransaction(userDao);\n users = searchUsers(searchType, parametersSearch);\n manager.endTransaction();\n } catch (DaoException exception) {\n try {\n manager.rollback();\n } catch (DaoException rollbackException) {\n logger.error(rollbackException);\n }\n throw new ServiceException(exception);\n }\n return users;\n }", "@Override\r\n\tpublic List<User> search(String name) {\n\t\treturn null;\r\n\t}", "@PreAuthorize(\"hasAnyAuthority(T(rs.acs.uns.sw.sct.util.AuthorityRoles).ADMIN, T(rs.acs.uns.sw.sct.util.AuthorityRoles).ADVERTISER, T(rs.acs.uns.sw.sct.util.AuthorityRoles).VERIFIER)\")\n @GetMapping(\"/users/search\")\n public ResponseEntity<List<UserDTO>> search(@RequestParam(value = \"username\", required = false) String username,\n @RequestParam(value = \"email\", required = false) String email,\n @RequestParam(value = \"firstName\", required = false) String firstName,\n @RequestParam(value = \"lastName\", required = false) String lastName,\n @RequestParam(value = \"phoneNumber\", required = false) String phoneNumber,\n @RequestParam(value = \"companyName\", required = false) String companyName,\n Pageable pageable) {\n\n List<UserDTO> list = userService.findBySearchTerm(username, email, firstName, lastName, phoneNumber, companyName, pageable)\n .stream().map(user -> user.convertToDTO()).collect(Collectors.toList());\n\n return new ResponseEntity<>(list, HttpStatus.OK);\n }", "private void queryUsers(final String searchTerm) {\n allUsers.clear();\n ParseQuery<ParseUser> query = ParseUser.getQuery();\n query.findInBackground(new FindCallback<ParseUser>() {\n public void done(List<ParseUser> users, ParseException e) {\n if (e != null) {\n Log.e(TAG, \"issue loading users from parse\" + e.getMessage());\n return;\n }\n\n allUsers.addAll(filterUsers(users, searchTerm));\n adapter.notifyDataSetChanged();\n }\n });\n }", "List<ResultDTO> searchUser(String query);", "Data<User> getUserSearch(String user, String fields);", "public List<User> searchUsers(String arg) {\n\n\t\tMUser mu = new MUser();\n\t\tList<User> searchUsers = mu.searchUsers(arg);\n\t\tif (searchUsers == null) {\n\t\t\terrorMsg = mu.errorMsg;\n\t\t\treturn null;\n\t\t}\n\t\treturn searchUsers;\n\n\t}", "private List<User> searchUsers(String searchType, Map<String, String> parametersSearch) throws DaoException, ServiceException {\n List<User> result;\n switch (searchType) {\n case USER_ID_PARAMETER_NAME:\n result = new ArrayList<>();\n String parameterId = parametersSearch.get(USER_ID_PARAMETER_NAME);\n long userId = (parameterId != null) ? Long.parseLong(parameterId) : 0;\n Optional<User> optionalUser = userDao.findEntity(userId);\n optionalUser.ifPresent(result::add);\n break;\n case USERNAME_PARAMETER_NAME:\n result = userDao.findByPartOfUsername(parametersSearch.get(USERNAME_PARAMETER_NAME));\n break;\n case INIT_DATE_PARAMETER_NAME:\n String date = parametersSearch.get(INIT_DATE_PARAMETER_NAME);\n DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DATE_TIME_FORMAT);\n LocalDate initDate = date != null ? LocalDate.parse(date, formatter) : LocalDate.now();\n result = userDao.findByInitDate(initDate);\n break;\n default:\n throw new ServiceException(\"Impossible state - unsupported command when search User\");\n }\n return result;\n }", "public List<User> searchUser() {\n String idUserQuery = (id == null) ? \"'%'\" : Integer.toString(id);\n String firstNameQuery = (\"\".equals(firstName) || \" \".equals(firstName)) ? \"'%'\" : \"'%\" + firstName + \"%'\";\n String lastNameQuery = (\"\".equals(lastName) || \" \".equals(lastName)) ? \"'%'\" : \"'%\" + lastName + \"%'\";\n String emailQuery = (\"\".equals(email) || \" \".equals(email)) ? \"'%'\" : \"'%\" + email + \"%'\";\n String idCityQuery = Integer.toString(idCity);\n Connection conn = null;\n try {\n conn = DriverManager.getConnection(db.DB.connectionString, db.DB.user, db.DB.password);\n Statement stmt = conn.createStatement();\n String query = \"select * from users where id_user like \" + idUserQuery;\n query += \" and first_name like \" + firstNameQuery;\n query += \" and last_name like \" + lastNameQuery;\n query += \" and email like \" + emailQuery;\n query += \" and id_city=\" + idCityQuery;\n ResultSet rs = stmt.executeQuery(query);\n allUsers = new ArrayList<User>();\n while (rs.next()) {\n User user = new User();\n user.setId(rs.getInt(\"id_user\"));\n user.setFirstName(rs.getString(\"first_name\"));\n user.setLastName(rs.getString(\"last_name\"));\n user.setPhoneNumber(rs.getString(\"phone_number\"));\n user.setEmail(rs.getString(\"email\"));\n user.setAddress(rs.getString(\"address\"));\n user.setIdCity(rs.getInt(\"id_city\"));\n allUsers.add(user);\n renderUserTable = true;\n }\n if (allUsers.size() == 0) {\n FacesContext context = FacesContext.getCurrentInstance();\n context.getExternalContext().getFlash().setKeepMessages(true);\n FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_INFO, \"User not found\", null);\n FacesContext.getCurrentInstance().addMessage(null, msg);\n }\n } catch (SQLException ex) {\n Logger.getLogger(UserController.class.getName()).log(Level.SEVERE, null, ex);\n } finally {\n clear();\n try {\n conn.close();\n } catch (Exception e) {\n /* ignored */ }\n }\n return null;\n }", "public List<User> listSearch(String search);", "List<User> searchUsersByUsername(String username);", "@Override\n\tpublic List<User> searchByUser(String userName) {\n\t\tlog.info(\"Search by username!\");\n\t\treturn userRepository.findByFirstNameRegex(userName+\".*\");\n\t}", "Data<User> getUserSearch(String user);", "@Override\n protected Collection<User> doInBackground(Void... params) {\n if(name.equals(\"\"))\n return new ArrayList<User>();\n return client.searchUsers(name, isPro, -1);\n }", "@SuppressWarnings(\"unused\")\n\t@Override\n\tpublic ArrayList<Object> searchUserByName(String search) {\n\t\t\n\t\tSystem.out.println(\"i am in service search looking for users\" + search.length());\n\t\t\n\t\tif(search == null){\n\t\t\t\n\t\t\tSystem.out.println(\"nothing can be find\");\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tSystem.out.println(\"its not 0000000000\");\n\t\t\n\t\tArrayList<Object> list = userRepository.findUserByName(search);\n\t\t\n\t\t//System.out.println(Arrays.toString(list));\n\t\treturn list;\n\t}", "public User search_userinfo(String user_name);", "@Override\n public List<UserInfo> findList(UserListFilterDto dto) {\n CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();\n CriteriaQuery<UserInfo> criteriaQuery = criteriaBuilder.createQuery(UserInfo.class);\n Root<UserInfo> root = criteriaQuery.from(UserInfo.class);\n Predicate predicate1\n = criteriaBuilder.equal(root.get(\"office\").get(\"id\"), dto.getOfficeId());\n Predicate finalPredicate = criteriaBuilder.and(predicate1);\n if (dto.getFirstName() != null) {\n Predicate predicate2\n = criteriaBuilder.equal(root.get(\"firstName\"), dto.getFirstName());\n finalPredicate = criteriaBuilder.and(finalPredicate, predicate2);\n }\n if (dto.getSecondName() != null) {\n Predicate predicate3\n = criteriaBuilder.equal(root.get(\"secondName\"), dto.getSecondName());\n finalPredicate = criteriaBuilder.and(finalPredicate, predicate3);\n }\n if (dto.getMiddleName() != null) {\n Predicate predicate4\n = criteriaBuilder.equal(root.get(\"middleName\"), dto.getMiddleName());\n finalPredicate = criteriaBuilder.and(finalPredicate, predicate4);\n }\n if (dto.getPosition() != null) {\n Predicate predicate5\n = criteriaBuilder.equal(root.get(\"position\"), dto.getPosition());\n finalPredicate = criteriaBuilder.and(finalPredicate, predicate5);\n }\n if (dto.getDocCode() != null) {\n Predicate predicate6\n = criteriaBuilder.equal(root.get(\"userDoc\").get(\"doc\").get(\"code\"), dto.getDocCode());\n finalPredicate = criteriaBuilder.and(finalPredicate, predicate6);\n }\n if (dto.getCitizenshipCode() != null) {\n Predicate predicate7\n = criteriaBuilder.equal(root.get(\"country\").get(\"code\"), dto.getCitizenshipCode());\n finalPredicate = criteriaBuilder.and(finalPredicate, predicate7);\n }\n criteriaQuery.select(root).where(finalPredicate);\n return entityManager.createQuery(criteriaQuery).getResultList();\n }", "@Override\n\tpublic List<User> findUserByCondition(UserQuery query) throws Exception {\n\t\treturn userDao.findUserByCondition(query);\n\t}", "public void findUsers() {\n if (txtSearch.getText().isEmpty()) {\n JOptionPane.showMessageDialog(null, \"Enter then name of the person you want to Search\");\n } else {\n ArrayList<Users> users = ListUsers(txtSearch.getText());\n DefaultTableModel model = new DefaultTableModel();\n model.setColumnIdentifiers(new Object[]{\"User id\", \"Username\", \"Name\", \"Email\"});\n Object[] row = new Object[4];\n\n for (int i = 0; i < users.size(); i++) {\n row[0] = users.get(i).user_id;\n row[1] = users.get(i).username;\n row[2] = ((users.get(i).firstname) + \" \" + (users.get(i).middlename) + \" \" + (users.get(i).lastname));\n row[3] = users.get(i).email;\n\n model.addRow(row);\n }\n tblUser.setModel(model);\n jScrollPane1.setViewportView(tblUser);\n tblUser.setEnabled(false);\n }\n }", "List<UserRepresentation> searchUserAccount(final String username);", "public ArrayList<Users> ListUsers(String ValToSearch) {\n ArrayList<Users> usersList = new ArrayList<Users>();\n\n Statement st;\n ResultSet rs;\n\n try {\n Connection con = getConnection();\n st = con.createStatement();\n String searchQuery = \"SELECT * FROM `tbl_registered` WHERE CONCAT(`user_id`,'username', `firstname`,`middlename`, `lastname`, `email`)LIKE '%\" + ValToSearch + \"%'\";\n rs = st.executeQuery(searchQuery);\n\n Users user;\n\n while (rs.next()) {\n user = new Users(\n rs.getString(\"username\"),\n rs.getString(\"firstname\"),\n rs.getString(\"middlename\"),\n rs.getString(\"lastname\"),\n rs.getString(\"email\"),\n rs.getInt(\"user_id\"));\n\n usersList.add(user);\n }\n\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(null, ex.getMessage());\n }\n\n return usersList;\n }", "@Override\n public ArrayList<User> findAll(Map<String, Object> params) {\n\n return null;\n }", "@Override\r\n\tpublic List<User> queryAllUsers() {\n\t\tList<User> users = userMapper.queryAllUsers();\r\n\t\treturn users;\r\n\t}", "@Override\n @Transactional(readOnly = true)\n public List<UserDashboardDTO> search(String query) {\n log.debug(\"Request to search UserDashboards for query {}\", query);\n return StreamSupport\n .stream(userDashboardSearchRepository.search(queryStringQuery(query)).spliterator(), false)\n .map(userDashboardMapper::toDto)\n .collect(Collectors.toList());\n }", "List<Card> search(String searchString, long userId) throws PersistenceCoreException;", "@Override\n public List<MtUser> getUsersByClause(Map clause) {\n return null;\n }", "public static ArrayList<User> findAllUsers() {\n\n User targetUser = new User();\n IdentityMap<User> userIdentityMap = IdentityMap.getInstance(targetUser);\n\n String findAllUsers = \"SELECT * FROM public.member where type = 0\";\n PreparedStatement stmt = DBConnection.prepare(findAllUsers);\n ArrayList<User> userList = new ArrayList<User>();\n\n try {\n ResultSet rs = stmt.executeQuery();\n\n while(rs.next()) {\n User user = load(rs);\n\n targetUser = userIdentityMap.get(user.getId());\n if (targetUser == null) {\n userList.add(user);\n userIdentityMap.put(user.getId(), user);\n } else {\n userList.add(targetUser);\n }\n }\n DBConnection.close(stmt);\n rs.close();\n\n } catch (SQLException e) {\n System.out.println(\"Exception!\");\n e.printStackTrace();\n }\n return userList;\n }", "public void search() {\n try {\n String searchKey = txt_SearchKey.getText();\n Search s = new Search();\n con = dc.connect();\n stmt1 = con.createStatement();\n\n\n String sql = s.getSQLQuery(\"tblUsers\", searchKey);\n\n vtdata_user = new Vector();\n ResultSet rsUser = stmt1.executeQuery(sql);\n while (rsUser.next()) {\n\n Vector temp = new Vector();\n\n temp.add(rsUser.getString(\"UserName\"));\n temp.add(rsUser.getString(\"U_Name\"));\n temp.add(rsUser.getString(\"Email\"));\n // temp.add(rsUser.getDate(\"BirthDate\"));\n\n temp.add(formatDate.format(rsUser.getDate(\"BirthDate\")));\n boolean gender = rsUser.getBoolean(\"Gender\");\n\n\n if (gender == true) {\n temp.add(\"Male\");\n }\n\n if (gender == false) {\n temp.add(\"Female\");\n }\n temp.add(rsUser.getString(\"Phone\"));\n vtdata_user.add(temp);\n }\n\n user_model = new DefaultTableModel(vtdata_user, vtcolumn_user) {\n\n @Override\n public boolean isCellEditable(int row, int column) {\n return false;\n }\n };\n\n tb_User.setModel(user_model);\n if (vtdata_user.size() == 0) {\n\n JOptionPane.showMessageDialog(this, \"No Search User! \");\n }\n dc.disconnect(rsUser);\n dc.disconnect(stmt1);\n dc.disconnect(con);\n } catch (SQLException ex) {\n Logger.getLogger(UserManagement.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "@Override\r\n\tpublic List<UserDTO> queryList(UserQO qo) {\n\t\treturn null;\r\n\t}", "@JsonView(JSONView.ParentObject.class)\n\t@RequestMapping(value = \"/users\", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.GET)\n\tpublic List<MMDHUser> findAll(@RequestParam(value = \"searchByOperator\", required = false) String searchByOperator,\n\t\t\t@RequestParam(value = \"firstName\", required = false) String firstName,\n\t\t\t@RequestParam(value = \"lastName\", required = false) String lastName) {\n\n\t\tif (StringUtils.hasLength(searchByOperator) && StringUtils.hasLength(firstName)\n\t\t\t\t&& StringUtils.hasLength(lastName)) {\n\t\t\tif (searchByOperator.equals(\"AND\"))\n\t\t\t\treturn userRepo.findByFirstNameAndLastName(firstName, lastName);\n\t\t\telse if (searchByOperator.equals(\"OR\"))\n\t\t\t\treturn userRepo.findByFirstNameOrLastName(firstName, lastName);\n\t\t} else if (StringUtils.hasLength(firstName) && !StringUtils.hasLength(lastName)) {\n\t\t\tif (StringUtils.hasLength(searchByOperator) && searchByOperator.equals(\"LIKE\"))\n\t\t\t\treturn userRepo.findByFirstNameLike(firstName + \"%\");\n\t\t\treturn userRepo.findByFirstName(firstName);\n\t\t} else if (!StringUtils.hasLength(firstName) && StringUtils.hasLength(lastName)) {\n\t\t\tif (StringUtils.hasLength(searchByOperator) && searchByOperator.equals(\"LIKE\"))\n\t\t\t\treturn userRepo.findByLastNameLike(lastName + \"%\");\n\t\t\treturn userRepo.findByLastName(lastName);\n\t\t}\n\t\treturn userRepo.findAll();\n\t}", "@Override\n public boolean onQueryTextSubmit(String s) {\n if(!TextUtils.isEmpty(s.trim()))\n {\n //search text contains text, search it\n searchUsers(s);\n } else {\n // search text empty, get all users\n getAllUsers();\n }\n\n return false;\n }", "@GetMapping(\"/search\")\n\tpublic String searchUsers(@RequestParam(\"theSearchName\") String theSearchName, Model theModel) {\n\t\tList<User> theUsers = userService.searchUsers(theSearchName);\n\n\t\t// add the customers to the model\n\t\ttheModel.addAttribute(\"users\", theUsers);\n\t\treturn \"list-users\";\n\t}", "Customer search(String login);", "@Override\n public boolean onQueryTextChange(String s) {\n if(!TextUtils.isEmpty(s.trim()))\n {\n //search text contains text, search it\n searchUsers(s);\n } else {\n // search text empty, get all users\n getAllUsers();\n }\n return false;\n }", "@Override\r\n\tpublic List<User> query(int userId) {\n\t\treturn null;\r\n\t}", "public void testFindUsersByQuery() throws Exception\r\n {\r\n createUser(\"tolik\");\r\n uHandler.authenticate(\"tolik\", \"pwdADDSomeSaltToBeCompliantWithSomeIS00\");\r\n\r\n Query query = new Query();\r\n query.setEmail(\"email@test\");\r\n\r\n // try to find user by email\r\n assertSizeEquals(1, uHandler.findUsersByQuery(query), UserStatus.ENABLED);\r\n assertSizeEquals(1, uHandler.findUsersByQuery(query, UserStatus.ENABLED), UserStatus.ENABLED);\r\n assertSizeEquals(1, uHandler.findUsersByQuery(query, UserStatus.BOTH), UserStatus.BOTH);\r\n\r\n // try to find user by name with mask\r\n query = new Query();\r\n query.setUserName(\"*tolik*\");\r\n assertSizeEquals(1, uHandler.findUsersByQuery(query));\r\n\r\n // try to find user by name with mask\r\n query = new Query();\r\n query.setUserName(\"tol*\");\r\n assertSizeEquals(1, uHandler.findUsersByQuery(query));\r\n\r\n // try to find user by name with mask\r\n query = new Query();\r\n query.setUserName(\"*lik\");\r\n assertSizeEquals(1, uHandler.findUsersByQuery(query));\r\n\r\n // try to find user by name explicitly\r\n query = new Query();\r\n query.setUserName(\"tolik\");\r\n assertSizeEquals(1, uHandler.findUsersByQuery(query));\r\n\r\n // try to find user by part of name without mask\r\n query = new Query();\r\n query.setUserName(\"tol\");\r\n assertSizeEquals(1, uHandler.findUsersByQuery(query));\r\n\r\n // try to find user by fist and last names\r\n query = new Query();\r\n query.setFirstName(\"first\");\r\n query.setLastName(\"last\");\r\n assertSizeEquals(1, uHandler.findUsersByQuery(query));\r\n\r\n String skipCISearchTests = System.getProperty(\"orgservice.test.configuration.skipCISearchTests\");\r\n if (!\"true\".equals(skipCISearchTests))\r\n {\r\n // try to find user by name explicitly, case insensitive search\r\n query = new Query();\r\n query.setUserName(\"Tolik\");\r\n assertSizeEquals(1, uHandler.findUsersByQuery(query));\r\n\r\n // try to find user by fist and last names, case insensitive search\r\n query = new Query();\r\n query.setFirstName(\"fiRst\");\r\n query.setLastName(\"lasT\");\r\n assertSizeEquals(1, uHandler.findUsersByQuery(query));\r\n }\r\n\r\n String skipDateTests = System.getProperty(\"orgservice.test.configuration.skipDateTests\");\r\n if (!\"true\".equals(skipDateTests))\r\n {\r\n // try to find user by login date\r\n Calendar calc = Calendar.getInstance();\r\n calc.set(Calendar.YEAR, calc.get(Calendar.YEAR) - 1);\r\n\r\n query = new Query();\r\n query.setFromLoginDate(calc.getTime());\r\n query.setUserName(\"tolik\");\r\n assertSizeEquals(1, uHandler.findUsersByQuery(query));\r\n\r\n calc = Calendar.getInstance();\r\n calc.set(Calendar.YEAR, calc.get(Calendar.YEAR) + 1);\r\n\r\n query = new Query();\r\n query.setFromLoginDate(calc.getTime());\r\n assertSizeEquals(0, uHandler.findUsersByQuery(query));\r\n\r\n calc = Calendar.getInstance();\r\n calc.set(Calendar.YEAR, calc.get(Calendar.YEAR) - 1);\r\n\r\n query = new Query();\r\n query.setToLoginDate(calc.getTime());\r\n assertSizeEquals(0, uHandler.findUsersByQuery(query));\r\n\r\n calc = Calendar.getInstance();\r\n calc.set(Calendar.YEAR, calc.get(Calendar.YEAR) + 1);\r\n\r\n query = new Query();\r\n query.setToLoginDate(calc.getTime());\r\n query.setUserName(\"tolik\");\r\n assertSizeEquals(1, uHandler.findUsersByQuery(query));\r\n }\r\n\r\n createUser(\"rolik\");\r\n createUser(\"bolik\");\r\n createUser(\"volik\");\r\n\r\n query = new Query();\r\n query.setUserName(\"olik\");\r\n\r\n ListAccess<User> users = uHandler.findUsersByQuery(query);\r\n\r\n assertSizeEquals(4, users, UserStatus.ENABLED);\r\n assertSizeEquals(4, uHandler.findUsersByQuery(query, UserStatus.ENABLED), UserStatus.ENABLED);\r\n assertSizeEquals(4, uHandler.findUsersByQuery(query, UserStatus.BOTH), UserStatus.BOTH);\r\n\r\n User[] allPage = users.load(0, 4);\r\n User[] page1 = users.load(0, 2);\r\n User[] page2 = users.load(2, 2);\r\n\r\n assertEquals(allPage[0].getUserName(), page1[0].getUserName());\r\n assertEquals(allPage[1].getUserName(), page1[1].getUserName());\r\n assertEquals(allPage[2].getUserName(), page2[0].getUserName());\r\n assertEquals(allPage[3].getUserName(), page2[1].getUserName());\r\n\r\n try\r\n {\r\n users.load(0, 0);\r\n }\r\n catch (Exception e)\r\n {\r\n fail(\"Exception is not expected\");\r\n }\r\n\r\n // try to load more than exist\r\n try\r\n {\r\n users.load(0, 5);\r\n fail(\"Exception is expected\");\r\n }\r\n catch (Exception e)\r\n {\r\n }\r\n\r\n // try to load more than exist\r\n try\r\n {\r\n users.load(1, 4);\r\n fail(\"Exception is expected\");\r\n }\r\n catch (Exception e)\r\n {\r\n }\r\n\r\n boolean unsupportedOperation = false;\r\n try\r\n {\r\n // Disable the user tolik\r\n uHandler.setEnabled(\"tolik\", false, true);\r\n\r\n assertSizeEquals(3, uHandler.findUsersByQuery(query), UserStatus.ENABLED);\r\n assertSizeEquals(3, uHandler.findUsersByQuery(query, UserStatus.ENABLED), UserStatus.ENABLED);\r\n assertSizeEquals(1, uHandler.findUsersByQuery(query, UserStatus.DISABLED), UserStatus.DISABLED);\r\n assertSizeEquals(4, uHandler.findUsersByQuery(query, UserStatus.BOTH), UserStatus.BOTH);\r\n\r\n // Enable the user tolik\r\n uHandler.setEnabled(\"tolik\", true, true);\r\n\r\n assertSizeEquals(4, uHandler.findUsersByQuery(query), UserStatus.ENABLED);\r\n assertSizeEquals(4, uHandler.findUsersByQuery(query, UserStatus.ENABLED), UserStatus.ENABLED);\r\n assertSizeEquals(0, uHandler.findUsersByQuery(query, UserStatus.DISABLED), UserStatus.DISABLED);\r\n assertSizeEquals(4, uHandler.findUsersByQuery(query, UserStatus.BOTH), UserStatus.BOTH);\r\n }\r\n catch (UnsupportedOperationException e)\r\n {\r\n // This operation can be unsupported\r\n unsupportedOperation = true;\r\n }\r\n\r\n // Remove the user tolik\r\n uHandler.removeUser(\"tolik\", true);\r\n\r\n assertSizeEquals(3, uHandler.findUsersByQuery(query), UserStatus.ENABLED);\r\n assertSizeEquals(3, uHandler.findUsersByQuery(query, UserStatus.ENABLED), UserStatus.ENABLED);\r\n assertSizeEquals(3, uHandler.findUsersByQuery(query, UserStatus.BOTH), UserStatus.BOTH);\r\n\r\n\r\n // Check the listener's counters\r\n assertEquals(4, listener.preSaveNew);\r\n assertEquals(4, listener.postSaveNew);\r\n assertEquals(0, listener.preSave);\r\n assertEquals(0, listener.postSave);\r\n assertEquals(unsupportedOperation ? 0 : 2, listener.preSetEnabled);\r\n assertEquals(unsupportedOperation ? 0 : 2, listener.postSetEnabled);\r\n assertEquals(1, listener.preDelete);\r\n assertEquals(1, listener.postDelete);\r\n }", "Page<User> getAll(Pageable pageable, String search);", "private void filterUsers(FilterParameters f) {\n // query users to find appropriate matches and send them a chat request\n Database.getInstance()\n .sendRequestsToMatches(f.getKind(), f.getGender(), f.getReligion(), f.getLanguages()\n , f.getLower_bound(), f.getUpper_bound() /*, possibles_list, adapter*/);\n\n //sent messages to all - now we wait for response\n new Timer().schedule(new StaffSearch(), 30000); //send the staff a request in 30 seconds\n new Timer().schedule(new AbortSearch(), 60000); //abort the search in 60 seconds\n }", "public void onSearch(){\n usernames = getNames();\n ArrayAdapter<String> adapter = new ArrayAdapter<>(getContext(),\n android.R.layout.simple_list_item_1, usernames);\n tvAuto.setAdapter(adapter);\n\n users.clear();\n profileAdapter.notifyDataSetChanged();\n rvResults.setAdapter(profileAdapter);\n rvResults.setLayoutManager(new LinearLayoutManager(getContext()));\n\n btnSearch.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n userName = tvAuto.getText().toString();\n if(userName.equals(ParseUser.getCurrentUser().getUsername())){\n Toast.makeText(getContext(),\"Search for another user!\",Toast.LENGTH_SHORT).show();\n return;\n }else{\n Log.i(TAG,\"search for user!\");\n ParseQuery<ParseUser> query = ParseUser.getQuery();\n //want to get the user's info\n query.include(User.USERNAME_KEY);\n query.whereEqualTo(User.USERNAME_KEY,userName);\n query.findInBackground(new FindCallback<ParseUser>() {\n @Override\n public void done(List<ParseUser> objects, ParseException e) {\n ParseUser user = objects.get(0);\n Log.i(TAG,\"User: \" + user.getUsername());\n Log.i(TAG,\"objects size: \" + objects.size());\n users.add(user);\n profileAdapter.notifyDataSetChanged();\n }\n });\n }\n }\n });\n }", "private void readUsers(String filter) {\n Filter userFilter = Filter.createORFilter(\n Filter.createSubAnyFilter(\"cn\", filter),\n Filter.createSubAnyFilter(\"sn\", filter),\n Filter.createSubAnyFilter(\"givenname\", filter)\n );\n\n SearchResult searchResult = OpenLDAP.searchUser(userFilter);\n for (int i = 0; i < searchResult.getEntryCount(); i++) {\n SearchResultEntry entry = searchResult.getSearchEntries().get(i);\n User user = new User();\n user.setDistinguishedName(entry.getDN());\n user.setUsername(entry.getAttributeValue(\"cn\"));\n user.setFirstname(entry.getAttributeValue(\"givenname\"));\n user.setLastname(entry.getAttributeValue(\"sn\"));\n user.setEmail(entry.getAttributeValue(\"mail\"));\n user.setMobile(entry.getAttributeValue(\"mobile\"));\n getUsers().put(user.getUsername(), user);\n }\n }", "@Override\n\tpublic ArrayList<User> queryUserByCondition(User u) {\n\t\treturn userDao.queryUserByCondition(u);\n\t}", "public int search_userid(String user_name);", "@SuppressWarnings(\"unchecked\")\n @Override\n public final List<CustomerUser> findAll(\n\t final DataTablePredicate predicate) {\n\treturn (List<CustomerUser>) getEntityManager()\n\t\t.createQuery(\"select customer from \"\n\t\t\t+ searchQuery)\n\t\t.setParameter(\"search\", predicate.getSearch() + \"%\")\n\t\t.setFirstResult(predicate.getStart())\n\t\t.setMaxResults(predicate.getLength())\n\t\t.getResultList();\n }", "@Override\r\n\tpublic List<SysUser> getByConditionPage(SysUserQueryModel sysUserQueryModel) {\n\t\treturn sysUserMapper.getByConditionPage(sysUserQueryModel);\r\n\t}", "private String searchForUser() {\n String userId = \"\";\n String response = given().\n get(\"/users\").then().extract().asString();\n List usernameId = from(response).getList(\"findAll { it.username.equals(\\\"Samantha\\\") }.id\");\n if (!usernameId.isEmpty()) {\n userId = usernameId.get(0).toString();\n }\n return userId;\n }", "public ArrayList<User> searchUsers(String fragment){\n \t\t\t// execute query\n\t\t\tString query = \"SELECT * FROM users WHERE id LIKE '%\" + fragment + \"%'\";\n \t\t\tSystem.out.println(query);\n \t\t\tResultSet rs = getResult(query);\n \t\t\t\n \t\t\tArrayList<User> matches = new ArrayList<User>();\n \t\t\ttry {\n \t\t\t\twhile(rs.next()){\n \t\t\t\t\t// add user to list\n \t\t\t\t\tString id = null;\t\t\t\t\t\n \t\t\t\t\ttry {\n \t\t\t\t\t\tid = rs.getString(\"id\");\n \t\t\t\t\t} catch (SQLException e) {e.printStackTrace();}\n \t\t\t\t\t\n \t\t\t\t\tString hash = null;\t\t\t\t\t\n \t\t\t\t\ttry {\n \t\t\t\t\t\thash = rs.getString(\"hash\");\n \t\t\t\t\t} catch (SQLException e) {e.printStackTrace();}\n \t\t\t\t\t\n \t\t\t\t\tboolean isAdmin = false;\n \t\t\t\t\ttry {\n \t\t\t\t\t\tisAdmin = rs.getBoolean(\"isAdmin\");\n \t\t\t\t\t} catch (SQLException e) {e.printStackTrace();}\n \t\t\t\t\t\n \t\t\t\t\tString image = null;\n \t\t\t\t\ttry {\n \t\t\t\t\t\timage = rs.getString(\"image_url\");\n \t\t\t\t\t} catch (SQLException e) {e.printStackTrace();}\n \t\t\t\t\t\n \t\t\t\t\tmatches.add(new User(id, hash, isAdmin, this, image));\n \t\t\t\t}\n \t\t\t}catch (SQLException e) {e.printStackTrace();}\t\t\t\n \t\t\t\n \t\t\treturn matches;\t\t\n \t\t}", "private List<User> simulateSearchResult(String firstName)\n\t{\n\n\t\tArrayList<User> user=(ArrayList<User>) userService.getAllUsers();\n\t\tArrayList<User> result = new ArrayList<User>();\n\t\tfor (User u : user) {\n\t\t\tif (u.getFirstName().contains(firstName)) {\n\t\t\t\tresult.add(u);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}", "@Override\n public List<LdapUser> getAllLdapUsersBySearchString(final String searchString)\n throws NamingException {\n\n LOGGER\n .info(\"Getting all Ldap Users by search string Service implementation\");\n List<LdapUser> userList = this.getAllLdapUsers();\n List<LdapUser> filteredUserList = new ArrayList<>();\n for (LdapUser object : userList) {\n if (object.getFirstName().toLowerCase()\n .startsWith(searchString.toLowerCase())) {\n filteredUserList.add(object);\n }\n }\n if (filteredUserList.isEmpty()) {\n throw new NoContentException(\n RestApiMessageConstants.LDAP_USER_NOT_EXISTS);\n }\n return filteredUserList;\n }", "@Override\n public List<LdapUser> getAllLdapUsersBySearchString(final String searchString)\n throws NamingException {\n\n LOGGER\n .info(\"Getting all Ldap Users by search string Service implementation\");\n List<LdapUser> userList = this.getAllLdapUsers();\n List<LdapUser> filteredUserList = new ArrayList<>();\n for (LdapUser object : userList) {\n if (object.getFirstName().toLowerCase()\n .startsWith(searchString.toLowerCase())) {\n filteredUserList.add(object);\n }\n }\n if (filteredUserList.isEmpty()) {\n throw new NoContentException(\n RestApiMessageConstants.LDAP_USER_NOT_EXISTS);\n }\n return filteredUserList;\n }", "@Override\n\tpublic List<User> showUserList(Search search) {\n\t\treturn userDao.showUserList(search);\n\t}", "private SearchResult<ProviderProfile> getAllResults(HealthCareFacilitySearchCriteria criteria,\n String providerCatagory) throws URISyntaxException, IOException, ServiceException {\n DefaultHttpClient client = new DefaultHttpClient();\n client.setRedirectStrategy(new LaxRedirectStrategy());\n\n // we need to get a token from the start page, this will be stored in the client\n HttpGet getFrontPage = new HttpGet(new URIBuilder(getSearchURL()).build());\n HttpResponse response = client.execute(getFrontPage);\n verifyAndAuditCall(getSearchURL(), response);\n EntityUtils.consume(response.getEntity()); // releases the connection\n\n // our client is now valid, pass the criteria to the search page\n String postSearchURL = Util.replaceLastURLPart(getSearchURL(), \"showprovideroutput.cfm\");\n HttpPost searchPage = new HttpPost(new URIBuilder(postSearchURL).build());\n String whichArea = \"\", selectCounty = \"0\", cityToFind = \"\", providerToFind = \"\";\n if (\"county\".equals(criteria.getCriteria())) {\n whichArea = \"County\";\n selectCounty = criteria.getValue();\n } else if (\"city\".equals(criteria.getCriteria())) {\n whichArea = \"City\";\n cityToFind = criteria.getValue();\n } else if (\"provider\".equals(criteria.getCriteria())) {\n whichArea = \"Name\";\n providerToFind = criteria.getValue();\n }\n HttpEntity entity = postForm(postSearchURL, client, searchPage, new String[][] {\n { \"ProviderCatagory\", providerCatagory }, { \"WhichArea\", whichArea }, { \"Submit\", \"Submit\" },\n { \"SelectCounty\", selectCounty }, { \"CityToFind\", cityToFind },\n { \"ProviderToFind\", providerToFind } }, true);\n\n List<ProviderProfile> allProviders = new ArrayList<ProviderProfile>();\n // this now holds the search results, parse every row\n Document page = Jsoup.parse(EntityUtils.toString(entity));\n Elements rows = page.select(\"div#body table tbody tr:gt(0)\");\n for (Element row : rows) {\n ProviderProfile profile = parseProfile(row.children());\n if (profile != null) {\n allProviders.add(profile);\n }\n }\n\n SearchResult<ProviderProfile> results = new SearchResult<ProviderProfile>();\n results.setItems(allProviders);\n return results;\n }", "private final List<Object> searchForResults(@Nullable String query)\n {\n ArrayList<Object> results = new ArrayList<>();\n try {\n results.addAll(crDao.getRecordsLike(query));\n } catch (Exception e) {\n Logger.error(\"Failed to search the cr dao for results.\", e);\n }\n\n try {\n results.addAll(customMonsterDao.getRecordsLike(query));\n } catch (Exception e) {\n Logger.error(\"Failed to search the custom monster dao for results.\", e);\n }\n\n try {\n results.addAll(monsterDao.getRecordsLike(query));\n } catch (Exception e) {\n Logger.error(\"Failed to search the standard monster dao for results.\", e);\n }\n\n return results;\n }", "private List<ParseUser> filterUsers(List<ParseUser> pUsers, String searchTerm) {\n List<ParseUser> filteredUsers = new ArrayList<>();\n for (ParseUser pU : pUsers) {\n User u = new User(pU);\n if (u.getName().toLowerCase().contains(searchTerm.toLowerCase())) {\n filteredUsers.add(pU);\n }\n }\n return filteredUsers;\n }", "List<AdminUser> selectByExample(AdminUserCriteria example);", "List<AdminUser> selectByExample(AdminUserCriteria example);", "private String searchAllUserAccountSQL(){\n\t\tString sql = (\"SELECT username, type From user\");\n\t\tString addsql;\n\t\tif(!accountNameViewTextField.getText().equals(\"\")){\n\t\t\taddsql = \" WHERE username = \\'\" + accountNameViewTextField.getText() + \"\\'\";\n\t\t\tsql = sql + addsql;\n\t\t}\n\t\tSystem.out.println(sql);\n\t\treturn sql;\n\t}", "public List getAllUsers();", "public static List<user> getAll() throws SQLException {\n\t\ttry {\n\t\t\tuserExample example = new userExample();\n\t\t\tList<Integer> values = new ArrayList<Integer>();\n\t\t\tvalues.add(0);\n\t\t\tvalues.add(1);\n\t\t\texample.or().andStatusIn(values);\n\n\t\t\treturn mapper.selectByExample(example);\n\n\t\t} finally {\n\t\t\tsqlSession.close();\n\t\t}\n\t}", "public void findUsers(String query)\n { \n if(searchtf.getText()!= null){\n ArrayList<StockOutBean> users = ListUsers(query);\n model = new DefaultTableModel() {\n @Override\n public boolean isCellEditable(int rowIndex, int mColIndex) {\n return false;\n }\n };\n \n model.setColumnIdentifiers(new Object[]{\"Invoice No.\", \"ProductId\", \"Barcode\", \"Product Name\", \n \"Product Description\", \"Category\", \"Quantity\", \"SellPrice\", \n \"Total\", \"Date\"});\n \n Object[] row = new Object[11];\n \n for(int i = 0; i < users.size(); i++)\n { \n row[0] = users.get(i).getInvoice();\n row[1] = users.get(i).getProductId();\n row[2] = users.get(i).getBarcode();\n row[3] = users.get(i).getPname();\n row[4] = users.get(i).getPdesc();\n row[5] = users.get(i).getCat();\n row[6] = users.get(i).getQty();\n row[7] = users.get(i).getSellPrice(); \n row[8] = users.get(i).getTotal();\n row[9] = users.get(i).getDate();\n \n model.addRow(row);\n }\n stable.setModel(model);\n \n }\n total.setText(\"TOTAL: \" + model.getRowCount());\n }", "Page<ParaUserDTO> search(String query, Pageable pageable);", "public ArrayList<UserDetail> gettingAllAvailableUsers() throws Exception;", "public org.eclipse.stardust.engine.api.query.Users\n getAllUsers(org.eclipse.stardust.engine.api.query.UserQuery query)\n throws org.eclipse.stardust.common.error.WorkflowException;", "@Override\n\tpublic List<User> getAllUser() {\n\t\tList<User> users = dao.searchAllUser();\n\t\treturn users;\n\t}", "@Test\n public void userSearchUsersTest() {\n String q = null;\n InlineResponse2003 response = api.userSearchUsers(q);\n\n // TODO: test validations\n }", "private Map<Object, User> getSimpleUsers(NotesSession notesSession,\n Connection connection, Collection<?> userNames) {\n PreparedStatement exactMatchStmt = null;\n PreparedStatement commonNameStmt = null;\n Map<Object, User> users = new HashMap<Object, User>();\n try {\n exactMatchStmt = connection.prepareStatement(\"select * from \"\n + userTableName + \" where notesname = ?\",\n ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\n commonNameStmt = connection.prepareStatement(\"select * from \"\n + userTableName + \" where notesname like ?\",\n ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\n for (Object userObj : userNames) {\n if (userObj == null) {\n continue;\n }\n String userName = userObj.toString();\n try {\n // Try an exact match.\n String lookupString = userName;\n User user = getSimpleUser(connection, exactMatchStmt, lookupString);\n if (user != null) {\n users.put(userObj, user);\n continue;\n }\n LOGGER.log(Level.FINEST, \"User not found using: {0}\", lookupString);\n // Try converting to canonical format.\n NotesName notesName = notesSession.createName(userName);\n if (notesName != null) {\n lookupString = notesName.getCanonical();\n user = getSimpleUser(connection, exactMatchStmt, lookupString);\n if (user != null) {\n users.put(userObj, user);\n continue;\n }\n LOGGER.log(Level.FINEST, \"User not found using: {0}\", lookupString);\n }\n // If an exact match failed, see if we have a common name.\n if (!userName.toLowerCase().startsWith(\"cn=\")) {\n lookupString = \"cn=\" + userName + \"/%\";\n user = getSimpleUser(connection, commonNameStmt, lookupString);\n if (user != null) {\n users.put(userObj, user);\n continue;\n }\n LOGGER.log(Level.FINEST, \"User not found using: {0}\", lookupString);\n }\n LOGGER.log(Level.FINEST, \"No record found for user: {0}\", userName);\n } catch (Exception e) {\n LOGGER.log(Level.SEVERE, \"Failed to lookup user: \" + userName, e);\n }\n }\n } catch (Exception e) {\n LOGGER.log(Level.SEVERE,\n \"Failed to complete user lookup: \" + userNames, e);\n }\n return users;\n }", "void addUserSearchEntry(UserSearchEntry searchCriteria);", "@Override\r\n\tpublic Users queryUsers(String account) {\n\t\treturn rp.queryUsers(account);\r\n\t}", "private List<String> queryForAll() {\n // query for all of the data objects in the database\n List<Contact> list = dao.queryForAll();\n List<String> creadentials = new ArrayList<String>();\n for (Contact contact : list) {\n creadentials.add(contact.email);\n creadentials.add(contact.password);\n }\n return creadentials;\n }", "@Override\n public void onClick(View view){\n String username = search.getText().toString();\n String userid = \"\";\n if (users != null) {\n for (String id : users.keySet()) {\n if (users.get(id).getUserName().equals(username)){\n userid = id;\n break;\n }\n }\n if (userid.equals(\"\")){\n Toast.makeText(getContext(), \"No Such User\", Toast.LENGTH_LONG).show();\n } else {\n readUserInfo(userid, username);\n Toast.makeText(getContext(), \"Loading User\", Toast.LENGTH_SHORT).show();\n }\n } else {\n Toast.makeText(getContext(), \"Loading User List\", Toast.LENGTH_SHORT).show();\n }\n }", "@Transactional(readOnly=true)\n public List<RowResult> search(RowSearchObject rowSearchObect, TdarUser authenticatedUser) {\n return null;\n }", "private void queryStoriesFromUser() {\n ParseQuery<Story> query = ParseQuery.getQuery(Story.class);\n // include objects related to a story\n query.include(Story.KEY_AUTHOR);\n query.include(Story.KEY_ITEM);\n query.include(Story.KEY_LIST);\n query.include(Story.KEY_CATEGORY);\n // where author is current user and order by time created\n query.whereEqualTo(Story.KEY_AUTHOR, user);\n query.orderByDescending(Story.KEY_CREATED_AT);\n query.findInBackground((stories, e) -> {\n mUserStories.clear();\n for (int i = 0; i < stories.size(); i++) {\n Story story = stories.get(i);\n Item item = (Item) story.getItem();\n mUserStories.add(story);\n queryPhotosInStory(story, item);\n }\n\n if (stories.size() == 0) {\n emptyLayout.setVisibility(View.VISIBLE);\n } else {\n emptyLayout.setVisibility(View.GONE);\n }\n });\n }", "public static UserEntity search(String email) {\n\t\tDatastoreService datastore = DatastoreServiceFactory\n\t\t\t\t.getDatastoreService();\n\n\t\tQuery gaeQuery = new Query(\"users\");\n\t\tPreparedQuery pq = datastore.prepare(gaeQuery);\n\t\t\n\t\tfor (Entity entity : pq.asIterable()) {\n\t\t\t \n\t\t\tif (entity.getProperty(\"email\").toString().equals(email)) {\n\t\t\t\tUserEntity returnedUser = new UserEntity(entity.getProperty(\n\t\t\t\t\t\t\"name\").toString(), entity.getProperty(\"email\")\n\t\t\t\t\t\t.toString());\n\t\t\t\treturnedUser.setId(entity.getKey().getId());\n\t\t\t\treturn returnedUser;\n\t\t\t }\nelse{\n\t\t\t\t\n }\n\t\t}\n\n\t\treturn null;\n\t}", "@GET(\"users\")\n Call<PageResourceUserBaseResource> getUsers(\n @retrofit2.http.Query(\"filter_displayname\") String filterDisplayname, @retrofit2.http.Query(\"filter_email\") String filterEmail, @retrofit2.http.Query(\"filter_firstname\") String filterFirstname, @retrofit2.http.Query(\"filter_fullname\") String filterFullname, @retrofit2.http.Query(\"filter_lastname\") String filterLastname, @retrofit2.http.Query(\"filter_username\") String filterUsername, @retrofit2.http.Query(\"filter_tag\") String filterTag, @retrofit2.http.Query(\"filter_group\") String filterGroup, @retrofit2.http.Query(\"filter_role\") String filterRole, @retrofit2.http.Query(\"filter_last_activity\") String filterLastActivity, @retrofit2.http.Query(\"filter_id_list\") String filterIdList, @retrofit2.http.Query(\"filter_search\") String filterSearch, @retrofit2.http.Query(\"size\") Integer size, @retrofit2.http.Query(\"page\") Integer page, @retrofit2.http.Query(\"order\") String order\n );", "Page<ServiceUserDTO> search(String query, Pageable pageable);", "@Override\r\n\tpublic List<UserType> finds() {\n\t\tMyBatisCriteria example = new MyBatisCriteria();\r\n\t\ttry {\r\n\t\t\treturn this.userTypeMapper.selectByExample(example);\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\te.printStackTrace();\r\n\t\t\tthrow new DatabaseException(e);\r\n\t\t}\r\n\t}", "public Users findAll() {\n\tthis.createConnection();\n try {\n Connection con = this.getCon();\n PreparedStatement stmnt = con.prepareStatement(this.getAllQuery());\n ResultSet rs = stmnt.executeQuery();\n return get(rs);\n } catch (SQLException e) {\n System.out.println(\"SQL Exception\" + e.getErrorCode() + e.getMessage());\n e.getStackTrace();\n return new Users();\n }\n }", "public String searchUserWithKeyword(){\r\n\t\tlog.info(\"Starting to search user(s) with keyword = \"+ searchkeyword);\r\n\t\tthis.clearErrorsAndMessages();\r\n\t\tusersList = new ArrayList<Users>();\r\n\t\tusersList.clear();\t\t\r\n\t\ttry {\t\t\r\n\t\t\tusersList = userService.findUsersWithNameLike(searchkeyword);\r\n\t\t\tmessage = usersList.size() + \" users found .\";\t\r\n\t\t\tlog.info(message);\t\r\n\t\t} catch (Exception e) {\r\n\t\t\tmessage = \"Error in finding users for keyword [\" +searchkeyword+\"]. \"+ e.getMessage();\r\n\t\t\tthis.addActionError(message);\r\n\t\t\tlog.error(message, e);\r\n\t\t}\t\r\n\t\t// reset the keyword\r\n\t\tsearchkeyword = \"\";\r\n\t\treturn SUCCESS;\r\n\t}", "@Override\r\n\tpublic List findAll() {\n\t\treturn usermaindao.findAll();\r\n\t}", "private void getSpecificUpdates(DataSnapshot dataSnapshot, String text) {\n String formattedText = text.trim().toLowerCase();\n\n if(userList == null)\n userList = new ArrayList<>();\n else\n userList.clear();\n\n for(DataSnapshot ds: dataSnapshot.getChildren()) {\n User user = ds.getValue(User.class);\n if(user != null) {\n user.setKey(ds.getKey());\n if(user.getName().toLowerCase().contains(formattedText) || user.getEmail().toLowerCase().contains(formattedText))\n userList.add(user);\n }\n }\n\n if(lwAccounts == null)\n lwAccounts = (ListView) view.findViewById(R.id.lwAccounts);\n\n userAdapter = new LoanToFragment.UserAdapter(getActivity(), userList);\n lwAccounts.setAdapter(userAdapter);\n\n if(userList.size() == 0) {\n Toast.makeText(getContext(), \"No account found matching this criteria.\", Toast.LENGTH_SHORT).show();\n }\n }", "public List<User> findEmployees(String companyShortName, int start, int rows, String sortBy, String sortHow);", "@Query(\n \"Select t FROM Ticket t WHERE t.user.id = :userId \"\n + \"AND (t.isOpen = :isOpen) \"\n + \"AND (LOWER(t.title) LIKE LOWER(CONCAT('%', :searchTerm, '%')) \"\n + \"OR LOWER(t.id) LIKE LOWER(CONCAT('%', :searchTerm, '%')) \"\n + \"OR LOWER(t.client.name) LIKE LOWER(CONCAT('%', :searchTerm, '%')) \"\n + \"OR LOWER(t.user.name) LIKE LOWER(CONCAT('%', :searchTerm, '%')) \"\n + \"OR LOWER(t.category.name) LIKE LOWER(CONCAT('%', :searchTerm, '%')) \"\n + \"OR DATE_FORMAT(t.lastInteration, '%d/%m/%Y') LIKE CONCAT('%', :searchTerm, '%')) \"\n )\n public Page<Ticket> searchType5(@Param(\"userId\") Long userId, @Param(\"isOpen\") Boolean isOpen, @Param(\"searchTerm\") String searchTerm,Pageable pageable);", "private void fetchPropertiesAccordingToUserInput() {\n String query = \"SELECT * FROM Property WHERE mId > 0\";\n if (!TextUtils.isEmpty(mBinding.fragmentSearchZipcodeTxt.getText()))\n query += \" AND mZipCode = \" + mZipcodeInput;\n if (!TextUtils.isEmpty(mBinding.fragmentSearchCityTxt.getText()))\n query += \" AND Property.mCity LIKE \" + \"'%\" + mCityInput + \"%'\";\n if (!TextUtils.isEmpty(mBinding.fragmentSearchMinSurfaceTxt.getText()))\n query += \" AND Property.mSurface >= \" + mMinSurfaceInput;\n if (!TextUtils.isEmpty(mBinding.fragmentSearchMaxSurfaceTxt.getText()))\n query += \" AND Property.mSurface <= \" + mMaxSurfaceInput;\n if (!TextUtils.isEmpty(mBinding.fragmentSearchMinPriceTxt.getText()))\n query += \" AND Property.mPrice >= \" + mMinPriceInput;\n if (!TextUtils.isEmpty(mBinding.fragmentSearchMaxPriceTxt.getText()))\n query += \" AND Property.mPrice <= \" + mMaxPriceInput;\n if (!TextUtils.isEmpty(mBinding.fragmentSearchMinFloorsTxt.getText()))\n query += \" AND Property.mFloors >= \" + mFloorsInput;\n if (!mTypeInput.equals(\"()\"))\n query += \" AND Property.mTypeProperty IN \" + mTypeInput;\n if (mAmenitiesInput.contains(\"School\"))\n query += \" AND Property.mAmenities LIKE '%School%'\";\n if (mAmenitiesInput.contains(\"Shops\"))\n query += \" AND Property.mAmenities LIKE '%Shops%'\";\n if (mAmenitiesInput.contains(\"Public transport\"))\n query += \" AND Property.mAmenities LIKE '%Public transport%'\";\n if (mAmenitiesInput.contains(\"Garden\"))\n query += \" AND Property.mAmenities LIKE '%Garden%'\";\n if (mChipRoomsInput != 0)\n query += \" AND Property.mNbRooms >= \" + mChipRoomsInput;\n if (mChipBedroomsInput != 0)\n query += \" AND Property.mNbBedrooms >= \" + mChipBedroomsInput;\n if (mChipBathroomsInput != 0)\n query += \" AND Property.mNbBathrooms >= \" + mChipBathroomsInput;\n if (mChipCoownerInput != 10)\n query += \" AND Property.mCoOwnership = \" + mChipCoownerInput;\n if (mChipIsSoldInput != 10)\n query += \" AND Property.mSold = \" + mChipIsSoldInput;\n if (mForSaleDate != 0)\n query += \" AND Property.mInitialSale >= \" + mForSaleDate;\n if (mSoldDate != 0)\n query += \" AND Property.mFinalSale <= \" + mSoldDate;\n if (mChipPhotoInput != 0)\n query += \" AND Property.mNbPictures >= \" + mChipPhotoInput;\n query += \" ;\";\n\n fetchPropertiesAccordingToCriteria(query);\n }", "@RequestMapping(value = \"/listWithCriteria\", method = RequestMethod.POST)\n\tpublic ResponseEntity<?> listWithCriteria(@RequestBody SearchCriteria searchCriteria) {\n\t\tList<User> users = userService.listWithCritera(searchCriteria);\n\t\t// return.\n\t\treturn new ResponseEntity<List<User>>(users, HttpStatus.OK);\n\t}", "List<SearchResult> search(SearchQuery searchQuery);", "public List<com.ims.dataAccess.tables.pojos.User> fetchByStreetname(String... values) {\n return fetch(User.USER.STREETNAME, values);\n }", "private void filter(String text) {\n List<UserModel> filterdNames = new ArrayList<>();\n\n //looping through existing elements\n for (UserModel item : userModels) {\n //if the existing elements contains the search input\n if (item.getFirstName().toLowerCase().contains(text.toLowerCase())||item.getId().toLowerCase().contains(text.toLowerCase())||item.getEmail().toLowerCase().contains(text.toLowerCase())){\n //adding the element to filtered list\n filterdNames.add(item);\n }\n }\n userAdapter.filterList(filterdNames);\n }", "List<Userinfo> selectAll();", "@Override\n public List<User> getAllUser() {\n// SQLParameter sqlParameter = DSL.select()\n// .from(TableOperand.table(User.class))\n// .build();\n// return executor.selectList(sqlParameter);\n return null;\n }", "public List<User> getUsersStartingWith(String startsWith, Boolean enabled, int offset, int length) throws UserManagementException;", "@Override\n\tpublic List<User> selectAllUser() {\n\t\tList<User> users = null;\n\t\ttry {\n\t\t\tusers = client.queryForList(\"selectAllUser\");\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn users;\n\n\t}", "List<UserRole> searchUserRole(UserRole userRole);", "@Override\n\tpublic List<User> selectAllUser() {\n\t\treturn null;\n\t}", "public void research() throws Exception\r\n\t{\r\n\t\tresult = ((CLibraryManager)AUser.getInstance()).searchUser(jTextField_UserName.getText(),jTextField_UserID.getText(),jTextField_FirstName.getText(),jTextField_LastName.getText());\r\n\t}", "List<User> selectAll();", "List<User> selectAll();" ]
[ "0.7062874", "0.7039598", "0.6974941", "0.69492215", "0.69188344", "0.67994195", "0.6754062", "0.6729259", "0.6669741", "0.66071177", "0.6600906", "0.65638655", "0.6561883", "0.65511703", "0.65028393", "0.65014285", "0.6489321", "0.6429506", "0.6413964", "0.63721037", "0.6333614", "0.6326083", "0.6262193", "0.6251192", "0.6229766", "0.6229263", "0.61862713", "0.6169047", "0.61202747", "0.610986", "0.6107296", "0.6059463", "0.6049441", "0.60299397", "0.6028009", "0.5999834", "0.5988677", "0.5985457", "0.59821457", "0.598027", "0.59765655", "0.5947647", "0.5945786", "0.59441537", "0.593333", "0.592423", "0.59197205", "0.59115386", "0.58978117", "0.5883628", "0.587782", "0.5869551", "0.5847119", "0.5847119", "0.58315134", "0.58293056", "0.58229315", "0.58114094", "0.58110464", "0.58110464", "0.5804343", "0.5801841", "0.5790289", "0.5783645", "0.5783332", "0.57727134", "0.57657254", "0.5763072", "0.5758996", "0.57458055", "0.57200974", "0.5716445", "0.5714785", "0.57132334", "0.57079256", "0.5698553", "0.569537", "0.5688076", "0.56825364", "0.5669316", "0.56604886", "0.5658295", "0.5644922", "0.5643339", "0.5641868", "0.5640189", "0.56397206", "0.5638473", "0.5635054", "0.5634911", "0.5633175", "0.56324214", "0.56316197", "0.56209046", "0.5620834", "0.56197107", "0.56103677", "0.56070065", "0.5605695", "0.5605695" ]
0.70777094
0
This method creates users from results sets
private User createUserFromResults(ResultSet results) throws SQLException { User user = new User(); user.setLastName(results.getString("last_name")); user.setFirstName(results.getString("first_name")); user.setUserid(results.getString("id")); user.setDateOfBirth(results.getDate("date_of_birth")); // TODO map the remaining fields return user; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createUsers() {\n\n\t\tList<User> UserList = Arrays.asList(new User(\"Kiran\", \"kumar\", \"kiran@gmail.com\", 20),\n\t\t\t\tnew User(\"Ram\", \"kumar\", \"ram@gmail.com\", 22), new User(\"RamKiran\", \"LaxmiKiran\", \"sita@gmail.com\", 30),\n\t\t\t\tnew User(\"Lakshamn\", \"Seth\", \"seth@gmail.com\", 50), new User(\"Sita\", \"Kumar\", \"lakshman@gmail.com\", 50),\n\t\t\t\tnew User(\"Ganesh\", \"Kumar\", \"ganesh@gmail.com\", 50),\n\t\t\t\tnew User(\"KiranKiran\", \"kumar\", \"kiran@gmail.com\", 20),\n\t\t\t\tnew User(\"RamRam\", \"kumar\", \"ram@gmail.com\", 22),\n\t\t\t\tnew User(\"RamKiranRamKiran\", \"LaxmiKiran\", \"sita@gmail.com\", 30),\n\t\t\t\tnew User(\"RamKiranRamKiran\", \"Seth\", \"seth@gmail.com\", 50),\n\t\t\t\tnew User(\"SitaSita\", \"Kumar\", \"lakshman@gmail.com\", 50),\n\t\t\t\tnew User(\"GaneshSita\", \"Kumar\", \"ganesh@gmail.com\", 50));\n\n\t\tIterable<User> list = userService.saveAllUsers(UserList);\n\t\tfor (User User : list) {\n\t\t\tSystem.out.println(\"User Object\" + User.toString());\n\n\t\t}\n\n\t}", "public ArrayList<SimUser> generateUsers(){\n simUserFact = new SimUserFactory();\r\n simUserStateFact = new SimUserStateFactory();\r\n \r\n ArrayList<SimUser> su = new ArrayList<SimUser>();\r\n\r\n // Generate a set amount of each type of user with their state set to shopping\r\n for(int x =0; x < COMPANYUSERS; x++)\r\n su.add(simUserFact.createUser(\"Company\", simUserStateFact.getUserState(\"Shopping\"), simUserStateFact));\r\n \r\n for(int x = 0; x < INDIVIDUALUSERS; x++)\r\n su.add(simUserFact.createUser(\"Person\", simUserStateFact.getUserState(\"Shopping\"), simUserStateFact));\r\n \r\n return su;\r\n }", "public UserList createUsers(Set<User> usersToCreate);", "private List<User> createUserList() {\n for (int i = 1; i<=5; i++) {\n User u = new User();\n u.setId(i);\n u.setEmail(\"user\"+i+\"@mail.com\");\n u.setPassword(\"pwd\"+i);\n userList.add(u);\n }\n return userList;\n }", "public void initUsers() {\n User user1 = new User(\"Alicja\", \"Grzyb\", \"111111\", \"grzyb\");\n User user2 = new User(\"Krzysztof\", \"Kowalski\", \"222222\", \"kowalski\");\n User user3 = new User(\"Karolina\", \"Nowak\", \"333333\", \"nowak\");\n User user4 = new User(\"Zbigniew\", \"Stonoga \", \"444444\", \"stonoga\");\n User user5 = new User(\"Olek\", \"Michnik\", \"555555\", \"michnik\");\n users.add(user1);\n users.add(user2);\n users.add(user3);\n users.add(user4);\n users.add(user5);\n }", "private static Set<User> createUsers() {\n\t\tfinal Set<User> users = new HashSet<>();\n\t\tusers.add(new User(\"Max\", \"password\"));\n\t\treturn users;\n\t}", "private void createAllUsersList(){\n\t\tunassignedUsersList.clear();\n\t\tlistedUsersAvailList.clear();\n\t\tArrayList<User> users = jdbc.get_users();\n\t\tfor (int i = 0; i < users.size(); i++) {\n\t\t\tunassignedUsersList.addElement(String.format(\"%s, %s\", users.get(i).get_lastname(), users.get(i).get_firstname()));\n\t\t\tlistedUsersAvailList.addElement(String.format(\"%s, %s\", users.get(i).get_lastname(), users.get(i).get_firstname()));\n\t\t}\n\t}", "public void fillUsers(int totalEntries) {\n\n StoreAPI storeOperations = new StoreAPIMongoImpl();\n for (int i = 0; i < totalEntries; i++) {\n storeOperations.createAccount(\"user_\" + i, \"password_\" + i, Fairy.create().person().getFirstName(), Fairy.create().person().getLastName());\n }\n }", "private void createUserList() {\n\t\tif (!userList.isEmpty() && !listUsers.isSelectionEmpty()) {\n\t\t\tlistUsers.clearSelection();\n\t\t}\t\t\n\t\tif (!archivedUserList.isEmpty() && !listArchivedUsers.isSelectionEmpty()) {\n\t\t\tlistArchivedUsers.clearSelection();\n\t\t}\t\t\n\t\tarchivedUserList.clear();\n\t\tuserList.clear();\n\t\tArrayList<User> users = jdbc.get_users();\n\t\tfor (int i = 0; i < users.size(); i++) {\n\t\t\tif (users.get(i).active()) {\n\t\t\t\tuserList.addElement(String.format(\"%s, %s [%s]\", users.get(i).get_lastname(), users.get(i).get_firstname(), users.get(i).get_username()));\n\t\t\t} else {\n\t\t\t\tarchivedUserList.addElement(String.format(\"%s, %s [%s]\", users.get(i).get_lastname(), users.get(i).get_firstname(), users.get(i).get_username()));\n\t\t\t}\t\t\n\t\t}\n\t}", "User createUser(ResultSet resultSet, User user) throws SQLException;", "protected Set createUserSet(XMLLogHelper logHelper) throws CruiseControlException {\n \n Set users = skipUsers ? new HashSet() : logHelper.getBuildParticipants();\n \n //add always addresses\n for (int i = 0; i < alwaysAddresses.length; i++) {\n users.add(alwaysAddresses[i].getAddress());\n }\n \n //if build failed, add failure addresses\n if (!logHelper.isBuildSuccessful()) {\n for (int i = 0; i < failureAddresses.length; i++) {\n users.add(failureAddresses[i].getAddress());\n }\n }\n \n //If build fixed, add failure addresses that want to know about the fix\n if (logHelper.isBuildFix()) {\n for (int i = 0; i < failureAddresses.length; i++) {\n if (failureAddresses[i].shouldReportWhenFixed()) {\n users.add(failureAddresses[i].getAddress());\n }\n }\n }\n \n //if build succeeded, add success addresses\n if (logHelper.isBuildSuccessful()) {\n for (int i = 0; i < successAddresses.length; i++) {\n users.add(successAddresses[i].getAddress());\n }\n }\n \n Set emails = new TreeSet();\n mapperHelper.mapUsers(this, users, emails);\n return emails;\n }", "public void generateData(){\n\n users.add(new User(\"Knollwood\", \"Will\", \"password1\", \"312 Worthington Road\", 23, new ArrayList<Challenge>()));\n users.add(new User(\"Knollwood\", \"Chesapeake\", \"bae\", \"647 Contees Wharf Rd\", 215, new ArrayList<Challenge>()));\n users.add(new User(\"Knollwood\", \"Josh\", \"password2\", \"7405 Cliffbourne Court\", 24, new ArrayList<Challenge>()));\n users.add(new User(\"Knollwood\", \"Jameson\", \"password3\", \"315 Weatherbee Road\", 3, new ArrayList<Challenge>()));\n users.add(new User(\"Knollwood\", \"Franklin\", \"password4\", \"316 Murdock Road\", 9, new ArrayList<Challenge>()));\n users.add(new User(\"Knollwood\", \"Arietta\", \"password5\", \"401 Stevenson Lane\", 34, new ArrayList<Challenge>()));\n users.add(new User(\"Knollwood\", \"Joaquin\", \"pass\", \"7405 cliffborne ct\", 41, new ArrayList<Challenge>()));\n users.add(new User(\"Knollwood\", \"Beyonce\", \"\", \"7405 cliffborne ct\", 19, new ArrayList<Challenge>()));\n users.add(new User(\"Knollwood\", \"Testudo\", \"\", \"7405 cliffborne ct\", 63, new ArrayList<Challenge>()));\n users.add(new User(\"Knollwood\", \"Brick Tamland\", \"\", \"7405 cliffborne ct\", 0, new ArrayList<Challenge>()));\n\n\n\n challenges.add(new Challenge(\"FLY WITH AN E-TICKET\", Challenge.NOT_STARTED, \"The cost of processing a paper ticket is approximately $10, while processing \" +\n \"an e-ticket costs only $1. In the near future, e-tickets will be the only option, saving the airline industry $3 billion a year. In addition to financial \" +\n \"savings, the sheer amount of paper eliminated by this process is commendable.\"));\n challenges.add(new Challenge(\"GREENER LAWN CARE\", Challenge.NOT_STARTED, \"If you must water your lawn, do it early in the morning before any moisture is lost to evaporation. \" +\n \"Have a few weeds? Spot treat them with vinegar. Not sure if you should rake? Normal \" +\n \"clippings act as a natural fertilizer, let them be. If you've waited too long, rake by hand — it's excellent exercise.\"));\n challenges.add(new Challenge(\"TELECOMMUTE\", Challenge.NOT_STARTED, \"See if you can work out an arrangement with your employer that you work from home for some portion of the week.\" +\n \" Not only will you save money and gasoline, and you get to work in your pajamas!\"));\n challenges.add(new Challenge(\"GIVE IT AWAY\", Challenge.NOT_STARTED, \"Before you throw something away, think about if someone else might need it. Either donate to a charitable organization or \" +\n \"post it on a web site designed to connect people and things, such as Freecycle.org.\"));\n challenges.add(new Challenge(\"GO TO A CAR WASH\", Challenge.NOT_STARTED, \"Professional car washes are often more efficient with water consumption. If everyone in the U.S. who washes their\" +\n \" car themselves took just one visit to the car wash we could save nearly 8.7 billion gallons of water.\"));\n challenges.add(new Challenge(\"USE RECHARGABLE BATTERIES\", Challenge.NOT_STARTED, \"Each year 15 billion batteries produced and sold and most of them are disposable alkaline batteries. \" +\n \"Only a fraction of those are recycled. Buy a charger and a few sets of rechargeable batteries. Although it requires an upfront investment, it is one that should pay off in no time. \" +\n \"And on Christmas morning when all the stores are closed? You'll be fully stocked.\"));\n challenges.add(new Challenge(\"CHANGE YOUR LIGHT\", Challenge.NOT_STARTED, \"If every household in the United State replaced one regular lightbulb with one of those new compact fluorescent\" +\n \" bulbs, the pollution reduction would be equivalent to removing one million cars from the road.\\n\" +\n \"\\n\" +\n \"Don't like the color of light? Use these bulbs for closets, laundry rooms and other places where it won't irk you as much.\"));\n challenges.add(new Challenge(\"PLANT A TREE\", Challenge.NOT_STARTED, \"It's good for the air, the land, can shade your house and save on cooling (plant on the west side of your home), and they can \" +\n \"also improve the value of your property.\\n\" +\n \"\\n\" +\n \"Make it meaningful for the whole family and plant a tree every year for each member.\"));\n\n challenges.add(new Challenge(\"BAN BATHTIME!\", Challenge.NOT_STARTED, \"Have a no-bath week, and take showers instead. Baths require almost twice as much water. Not only will you reduce water \" +\n \"consumption, but the energy costs associated with heating the water.\"));\n\n challenges.add(new Challenge(\"GO VEGETARIAN ONCE A WEEK\", Challenge.NOT_STARTED, \"One less meat-based meal a week helps the planet and your diet. For example: It requires 2,500 gallons \" +\n \"of water to produce one pound of beef. You will also also save some trees. For each hamburger that originated from animals raised on rainforest land, approximately 55 square feet of forest have been destroyed.\"));\n\n// challenges.add(new Challenge(\"\", Challenge.NOT_STARTED, \"\"));\n\n users.get(0).returnChallenges().add(challenges.get(0).clone());\n users.get(0).returnChallenges().add(challenges.get(3).clone());\n users.get(1).returnChallenges().add(challenges.get(4).clone());\n users.get(1).returnChallenges().add(challenges.get(0).clone());\n users.get(2).returnChallenges().add(challenges.get(3).clone());\n users.get(2).returnChallenges().add(challenges.get(0).clone());\n users.get(3).returnChallenges().add(challenges.get(0).clone());\n users.get(3).returnChallenges().add(challenges.get(4).clone());\n users.get(4).returnChallenges().add(challenges.get(3).clone());\n users.get(4).returnChallenges().add(challenges.get(4).clone());\n users.get(5).returnChallenges().add(challenges.get(3).clone());\n users.get(5).returnChallenges().add(challenges.get(4).clone());\n\n Tree knollwood = new Tree(\"Knollwood\");\n// Tree stoneleigh = new Tree(\"StoneLeigh\");\n for(int i = 0; i < users.size(); i ++){\n knollwood.addUsers(users.get(i).clone());\n\n }\n// stoneleigh.addUsers(users.get(3).clone());\n// stoneleigh.addUsers(users.get(4).clone());\n\n\n// trees.add(stoneleigh);\n trees.add(knollwood);\n\n }", "public void loadUsers() {\n CustomUser userOne = new CustomUser();\n userOne.setUsername(SpringJPABootstrap.MWESTON);\n userOne.setPassword(SpringJPABootstrap.PASSWORD);\n\n CustomUser userTwo = new CustomUser();\n userTwo.setUsername(SpringJPABootstrap.TEST_ACCOUNT_USER_NAME);\n userTwo.setPassword(SpringJPABootstrap.TEST_ACCOUNT_PASSWORD);\n\n String firstUserName = userOne.getUsername();\n\n /*\n * for now I am not checking for a second user because there is no delete method being\n * used so if the first user is created the second user is expected to be created. this\n * could cause a bug later on but I will add in more logic if that is the case in a\n * future build.\n */\n if(userService.isUserNameTaken(firstUserName)) {\n log.debug(firstUserName + \" is already taken\");\n return ;\n }\n userService.save(userOne);\n userService.save(userTwo);\n\n log.debug(\"Test user accounts have been loaded!\");\n }", "private void readUsers(String filter) {\n Filter userFilter = Filter.createORFilter(\n Filter.createSubAnyFilter(\"cn\", filter),\n Filter.createSubAnyFilter(\"sn\", filter),\n Filter.createSubAnyFilter(\"givenname\", filter)\n );\n\n SearchResult searchResult = OpenLDAP.searchUser(userFilter);\n for (int i = 0; i < searchResult.getEntryCount(); i++) {\n SearchResultEntry entry = searchResult.getSearchEntries().get(i);\n User user = new User();\n user.setDistinguishedName(entry.getDN());\n user.setUsername(entry.getAttributeValue(\"cn\"));\n user.setFirstname(entry.getAttributeValue(\"givenname\"));\n user.setLastname(entry.getAttributeValue(\"sn\"));\n user.setEmail(entry.getAttributeValue(\"mail\"));\n user.setMobile(entry.getAttributeValue(\"mobile\"));\n getUsers().put(user.getUsername(), user);\n }\n }", "private void createUserListQual() {\n\t\tuserListAvailQual.clear();\n\t\tArrayList<User> users = jdbc.get_users();\n\t\tfor (int i = 0; i < users.size(); i++) {\n\t\t\tuserListAvailQual.addElement(String.format(\"%s, %s [%s]\", users.get(i).get_lastname(), users.get(i).get_firstname(), users.get(i).get_username()));\n\t\t}\n\t}", "private static void initUsers() {\n\t\tusers = new ArrayList<User>();\n\n\t\tusers.add(new User(\"Majo\", \"abc\", true));\n\t\tusers.add(new User(\"Alvaro\", \"def\", false));\n\t\tusers.add(new User(\"Luis\", \"ghi\", true));\n\t\tusers.add(new User(\"David\", \"jkl\", false));\n\t\tusers.add(new User(\"Juan\", \"mno\", true));\n\t\tusers.add(new User(\"Javi\", \"pqr\", false));\n\t}", "private void createAllUsersList(String s){\n\t\tunassignedUsersList.clear();\n\t\tlistedUsersAddList.clear();\n\t\tArrayList<User> users = jdbc.getUsersWithQual(s);\n\t\tfor (int i = 0; i < users.size(); i++) {\n\t\t\tunassignedUsersList.addElement(String.format(\"%s, %s\", users.get(i).get_lastname(), users.get(i).get_firstname()));\n\t\t\tlistedUsersAvailList.addElement(String.format(\"%s, %s\", users.get(i).get_lastname(), users.get(i).get_firstname()));\n\t\t}\n\t}", "public void setUserMap() {\n ResultSet rs = Business.getInstance().getData().getAllUsers();\n try {\n while (rs.next()) {\n userMap.put(rs.getString(\"username\"), new User(rs.getInt(\"id\"),\n rs.getString(\"name\"),\n rs.getString(\"username\"),\n rs.getString(\"password\"),\n rs.getBoolean(\"log\"),\n rs.getBoolean(\"medicine\"),\n rs.getBoolean(\"appointment\"),\n rs.getBoolean(\"caseAccess\")));\n\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "@Override\n public void initializeUsersForImportation() {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"initializeUsersForImportation\");\n }\n clearAddPanels();\n setRenderImportUserPanel(true);\n\n List<User> users;\n\n usersForImportation = new ArrayList<Pair<Boolean, User>>();\n\n if (Role.isLoggedUserAdmin() || Role.isLoggedUserProjectManager()) {\n choosenInstitutionForAdmin = (Institution) Component.getInstance(CHOOSEN_INSTITUTION_FOR_ADMIN);\n\n if (choosenInstitutionForAdmin != null) {\n users = User.listUsersForCompany(choosenInstitutionForAdmin);\n } else {\n users = User.listAllUsers();\n }\n } else {\n users = User.listUsersForCompany(Institution.getLoggedInInstitution());\n }\n boolean emailAlreadyExists;\n for (User user : users) {\n emailAlreadyExists = false;\n\n for (ConnectathonParticipant cp : connectathonParticipantsDataModel().getAllItems(FacesContext.getCurrentInstance())) {\n\n if (user.getEmail().equals(cp.getEmail())) {\n emailAlreadyExists = true;\n }\n }\n\n if (!emailAlreadyExists) {\n usersForImportation.add(new Pair<Boolean, User>(false, user));\n }\n }\n }", "public static void populateUsers() throws Exception {\n FrameworkUtil.setKeyStoreProperties();\n if (executionEnvironment.equals(Platforms.product.name())) {\n productGroupName = InitialContextPublisher.getContext().getPlatformContext().\n getFirstProductGroup().getGroupName();\n List<Instance> instanceList = InitialContextPublisher.getContext().getPlatformContext().\n getFirstProductGroup().getAllStandaloneInstances();\n for (Instance instance : instanceList) {\n instanceName = instance.getName();\n sessionCookie = InitialContextPublisher.\n getAdminUserSessionCookie(productGroupName, instanceName);\n backendURL = InitialContextPublisher.\n getSuperTenantEnvironmentContext(productGroupName, instanceName).\n getEnvironmentConfigurations().getBackEndUrl();\n userPopulator = new UserPopulator(sessionCookie, backendURL, multiTenantEnabled);\n log.info(\"Populating users for \" + productGroupName + \" product group: \" +\n instanceName + \" instance\");\n userPopulator.populateUsers(productGroupName, instanceName);\n }\n }\n //here we go through every product group and populate users for those\n else if (executionEnvironment.equals(Platforms.platform.name())) {\n List<ProductGroup> productGroupList = InitialContextPublisher.getContext().\n getPlatformContext().getAllProductGroups();\n for (ProductGroup productGroup : productGroupList) {\n productGroupName = productGroup.getGroupName();\n if (! productGroup.isClusteringEnabled()) {\n instanceName = productGroup.getAllStandaloneInstances().get(0).getName();\n } else {\n if (productGroup.getAllLBWorkerManagerInstances().size() > 0) {\n LBWorkerManagerInstance lbWorkerManagerInstance = productGroup.\n getAllLBWorkerManagerInstances().get(0);\n lbWorkerManagerInstance.setHost(lbWorkerManagerInstance.getManagerHost());\n instanceName = lbWorkerManagerInstance.getName();\n } else if (productGroup.getAllLBManagerInstances().size() > 0) {\n instanceName = productGroup.getAllLBManagerInstances().get(0).getName();\n } else if (productGroup.getAllManagerInstances().size() > 0) {\n instanceName = productGroup.getAllManagerInstances().get(0).getName();\n }\n }\n sessionCookie = InitialContextPublisher.\n getAdminUserSessionCookie(productGroupName, instanceName);\n backendURL = InitialContextPublisher.\n getSuperTenantEnvironmentContext(productGroupName, instanceName).\n getEnvironmentConfigurations().getBackEndUrl();\n userPopulator = new UserPopulator(sessionCookie, backendURL, multiTenantEnabled);\n log.info(\"Populating users for \" + productGroupName + \" product group: \" +\n instanceName + \" instance\");\n userPopulator.populateUsers(productGroupName, instanceName);\n }\n }\n }", "private static void multipleUsersExample()\t{\n\t}", "private void setupUsersInRoomDB() {\n Log.d(TAG, \"setupUsersInRoomDB: start to setup list of 200 user\");\n userList = new ArrayList<>();\n int j = 0;\n for (int i = 0; i < 200; i++) {\n switch (j) {\n case 0:\n Log.d(TAG, \"setupUsersInRoomDB: case 0 set the user with image one\");\n userList.add(new User(\"user\" + i, getImageOne()));\n j++;\n break;\n case 1:\n userList.add(new User(\"user\" + i, getImageTwo()));\n j++;\n break;\n case 2:\n userList.add(new User(\"user\" + i, getImageThree()));\n j = 0;\n break;\n }\n }\n\n db.userDao().insertListOfUser(userList);\n Log.d(TAG, \"setupUsersInRoomDB: insert list of users in room database\");\n Shared.sharedSave(MainActivity.this, \"usersdb\", USERS_EXIST);\n Toast.makeText(getApplicationContext(), \"finish set database\", Toast.LENGTH_LONG).show();\n }", "public void buildUsers() {\n try (PreparedStatement prep = Database.getConnection().prepareStatement(\n \"CREATE TABLE IF NOT EXISTS users (id TEXT, name TEXT,\"\n + \" cell TEXT, password INT, stripe_id TEXT, url TEXT,\"\n + \" PRIMARY KEY (id));\")) {\n prep.executeUpdate();\n } catch (final SQLException exc) {\n exc.printStackTrace();\n }\n }", "@Override\n public void importUsers() {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"importUsers\");\n }\n\n for (int i = 0; i < usersForImportation.size(); i++) {\n\n if (usersForImportation.get(i).getObject1()) {\n ConnectathonParticipant cp = new ConnectathonParticipant();\n ConnectathonParticipantQuery query = new ConnectathonParticipantQuery();\n query.testingSession().eq(TestingSession.getSelectedTestingSession());\n query.email().eq(usersForImportation.get(i).getObject2().getEmail());\n\n if (query.getCount() == 0) {\n\n try {\n\n cp.setEmail(usersForImportation.get(i).getObject2().getEmail());\n cp.setFirstname(usersForImportation.get(i).getObject2().getFirstname());\n cp.setLastname(usersForImportation.get(i).getObject2().getLastname());\n cp.setMondayMeal(true);\n cp.setTuesdayMeal(true);\n cp.setWednesdayMeal(true);\n cp.setThursdayMeal(true);\n cp.setFridayMeal(true);\n cp.setVegetarianMeal(false);\n cp.setSocialEvent(false);\n cp.setTestingSession(TestingSession.getSelectedTestingSession());\n cp.setInstitution(usersForImportation.get(i).getObject2().getInstitution());\n cp.setInstitutionName(usersForImportation.get(i).getObject2().getInstitution().getName());\n\n if (Role.isUserMonitor(usersForImportation.get(i).getObject2())) {\n cp.setConnectathonParticipantStatus(ConnectathonParticipantStatus.getMonitorStatus());\n\n } else if (Role.isUserVendorAdmin(usersForImportation.get(i).getObject2())\n || Role.isUserVendorUser(usersForImportation.get(i).getObject2())) {\n cp.setConnectathonParticipantStatus(ConnectathonParticipantStatus.getVendorStatus());\n\n } else {\n cp.setConnectathonParticipantStatus(ConnectathonParticipantStatus.getVisitorStatus());\n }\n\n entityManager.clear();\n entityManager.persist(cp);\n entityManager.flush();\n\n FacesMessages.instance().add(StatusMessage.Severity.INFO, USER + usersForImportation.get(i).getObject2().getLastname() + \" \" +\n \"\" + usersForImportation.get(i).getObject2().getEmail()\n + \" is imported\");\n renderAddPanel = false;\n getAllConnectathonParticipants();\n\n } catch (Exception e) {\n LOG.warn(USER + usersForImportation.get(i).getObject2().getEmail()\n + \" is already added - This case case should not occur...\");\n StatusMessages.instance().addFromResourceBundle(StatusMessage.Severity.ERROR,\n \"gazelle.users.connectaton.participants.CannotImportParticipant\", cp.getFirstname(),\n cp.getLastname(), cp.getEmail());\n\n }\n FinancialCalc.updateInvoiceIfPossible(cp.getInstitution(), cp.getTestingSession(), entityManager);\n } else {\n LOG.warn(USER + usersForImportation.get(i).getObject2().getEmail()\n + \" is already added - This case case should not occur...\");\n StatusMessages.instance().addFromResourceBundle(StatusMessage.Severity.ERROR,\n \"gazelle.users.connectaton.participants.CannotImportParticipant\",\n usersForImportation.get(i).getObject2().getFirstname(),\n usersForImportation.get(i).getObject2().getLastname(),\n usersForImportation.get(i).getObject2().getEmail());\n }\n }\n\n }\n }", "public static ArrayList<User> findAllUsers() {\n\n User targetUser = new User();\n IdentityMap<User> userIdentityMap = IdentityMap.getInstance(targetUser);\n\n String findAllUsers = \"SELECT * FROM public.member where type = 0\";\n PreparedStatement stmt = DBConnection.prepare(findAllUsers);\n ArrayList<User> userList = new ArrayList<User>();\n\n try {\n ResultSet rs = stmt.executeQuery();\n\n while(rs.next()) {\n User user = load(rs);\n\n targetUser = userIdentityMap.get(user.getId());\n if (targetUser == null) {\n userList.add(user);\n userIdentityMap.put(user.getId(), user);\n } else {\n userList.add(targetUser);\n }\n }\n DBConnection.close(stmt);\n rs.close();\n\n } catch (SQLException e) {\n System.out.println(\"Exception!\");\n e.printStackTrace();\n }\n return userList;\n }", "private void populateUserTable() {\n DefaultTableModel model = (DefaultTableModel)userJTable.getModel();\n model.setRowCount(0);\n \n for(Network nw : system.getNetworkList()){\n for(Enterprise ep : nw.getEnterpriseDirectory().getEnterpriseList()){\n if(ep instanceof SupplierEnterpise){\n for (Organization org : ep.getOrganazDirectory().getOrganizationList()) {\n for (UserAccount ua : org.getUserAccountDirectory().getUserAccountList()) {\n Object[] row = new Object[3];\n row[0] = ep.getName();\n row[1] = nw.getName();\n row[2] = ua.getUsername();\n\n model.addRow(row);\n }\n } \n }else{\n for (UserAccount ua : ep.getUserAccountDirectory().getUserAccountList()) {\n Object[] row = new Object[3];\n row[0] = ep.getName();\n row[1] = nw.getName();\n row[2] = ua.getUsername();\n\n model.addRow(row);\n }\n }\n }\n }\n }", "void createUserAccounts(Set<Role> roles, User u);", "@Override\n public Users getUsers() throws UserException {\n Users users = new Users();\n log.debug(\"getUsers\");\n User user = null;\n ResultSet result;\n Connection conn = null;\n PreparedStatement stm = null;\n try {\n conn = provider.getConnection();\n\n stm = conn.prepareStatement(GET_ALL_USERS);\n result = stm.executeQuery();\n\n while (result.next()) {\n user = buildUserFromResult(result);\n log.debug(\"User found {}\", user);\n users.add((DataUser) user);\n }\n\n } catch (SQLException e) {\n e.printStackTrace();\n throw new UserException(e.getMessage());\n\n } finally {\n try {\n stm.close();\n conn.close();\n } catch (Exception e) {\n\n e.printStackTrace();\n }\n }\n return users;\n }", "private static ArrayList<User> loadInitialData(){\n\t\tArrayList<User> users = new ArrayList<User>();\n\t\t// From the users list get all the user names\n\t\tfor (String username:Utils.FileUtils.getFileLines(Global.Constants.LIST_OF_USERS)){ // refers \"users\" file\n\t\t\tArrayList<Directory> directories = new ArrayList<Directory>();\n\t\t\t// For a user name, read the names of directories registered\n\t\t\t// Note: All directory names are provided in the file bearing user name\n\t\t\tif (Utils.FileUtils.exists(Global.Constants.DIRECTORY_LOCATION + username)) { // refers to a specific user file \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t // that has directories\n\t\t\t\tfor (String dir:Utils.FileUtils.getFileLines(Global.Constants.DIRECTORY_LOCATION + username)) {\n\t\t\t\t\tArrayList<String> documents = new ArrayList<String>();\n\t\t\t\t\t// For each directory, read names of files saved\n\t\t\t\t\t// Note: All file names are provided in the file bearing username$dirname\n\t\t\t\t\tif (Utils.FileUtils.exists(Global.Constants.DIRECTORY_LOCATION, username + \"$\" + dir)) {\n\t\t\t\t\t\tfor (String doc:Utils.FileUtils.getFileLines(Global.Constants.DIRECTORY_LOCATION + username + \"$\" + dir)) {\n\t\t\t\t\t\t\tdocuments.add(doc);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tdirectories.add(new Directory(dir, documents));\n\t\t\t\t}\n\t\t\t}\n\t\t\tusers.add(new User(username, directories));\n\t\t}\n\t\treturn users;\n\t}", "protected void getUserList() {\n\t\tmyDatabaseHandler db = new myDatabaseHandler();\n\t\tStatement statement = db.getStatement();\n\t\t// db.createUserTable(statement);\n\t\tuserList = new ArrayList();\n\t\tsearchedUserList = new ArrayList();\n\t\tsearchedUserList = db.getUserList(statement);\n\t\tuserList = db.getUserList(statement);\n\t\tusers.removeAllElements();\n\t\tfor (User u : userList) {\n\t\t\tusers.addElement(u.getName());\n\t\t}\n\t}", "@Test\n public void testAddUser_User04() {\n System.out.println(\"addUser\");\n\n User user = new User(\"test\", \"test@email.com\");\n\n Set<User> expResult = new HashSet<>();\n expResult.add(new User(\"nick0\", \"mail_0_@sapo.pt\"));\n expResult.add(new User(\"nick1\", \"mail_1_@sapo.pt\"));\n expResult.add(new User(\"nick2\", \"mail_2_@sapo.pt\"));\n expResult.add(new User(\"nick3\", \"mail_3_@sapo.pt\"));\n expResult.add(new User(\"nick4\", \"mail_4_@sapo.pt\"));\n expResult.add(new User(\"nick5\", \"mail_5_@sapo.pt\"));\n expResult.add(new User(\"nick6\", \"mail_6_@sapo.pt\"));\n expResult.add(new User(\"nick7\", \"mail_7_@sapo.pt\"));\n expResult.add(new User(\"nick8\", \"mail_8_@sapo.pt\"));\n expResult.add(new User(\"nick9\", \"mail_9_@sapo.pt\"));\n expResult.add(user);\n\n sn10.addUser(user);\n Set<User> result = sn10.getUsersList();\n assertEquals(expResult, result);\n }", "@Test\n public void testAddUser_Nickname_Email04() {\n System.out.println(\"addUser\");\n String nickname = \"test1\";\n String email = \"test_1_@sapo.pt\";\n\n Set<User> expResult = new HashSet<>();\n expResult.add(new User(\"nick0\", \"mail_0_@sapo.pt\"));\n expResult.add(new User(\"nick1\", \"mail_1_@sapo.pt\"));\n expResult.add(new User(\"nick2\", \"mail_2_@sapo.pt\"));\n expResult.add(new User(\"nick3\", \"mail_3_@sapo.pt\"));\n expResult.add(new User(\"nick4\", \"mail_4_@sapo.pt\"));\n expResult.add(new User(\"nick5\", \"mail_5_@sapo.pt\"));\n expResult.add(new User(\"nick6\", \"mail_6_@sapo.pt\"));\n expResult.add(new User(\"nick7\", \"mail_7_@sapo.pt\"));\n expResult.add(new User(\"nick8\", \"mail_8_@sapo.pt\"));\n expResult.add(new User(\"nick9\", \"mail_9_@sapo.pt\"));\n expResult.add(new User(nickname, email));\n\n sn10.addUser(nickname, email);\n Set<User> result = sn10.getUsersList();\n assertEquals(expResult, result);\n }", "private void getAllUsers(){\n\t\t\n\t\tSystem.out.println(\"Retrieving Social Graph Data from tibbr...\"); \n\t\tDefaultHttpClient httpClient = new DefaultHttpClient();\n\n\t\tString params = \"?sort=firstNameAsc&fields=name,jive.username,-resources&count=5000&startIndex=0\"; \n\t\tHttpGet getRequest = new HttpGet(urlBase+\"/api/core/v3/people/@all\"+params);\n\t\t\n\n\t\t\t \n\t\tgetRequest.setHeader(\"Authorization\", \"Basic \" + this.auth);\n\t\t\n\t\t\t\n\t\ttry {\n\t\t\tHttpResponse response = httpClient.execute(getRequest);\n\t\t\tString jsonOut = readStream(response.getEntity().getContent());\n\t\t // Remove throwline if present\n\t\t\tjsonOut = removeThrowLine(jsonOut);\n\t\t getAllUserElements(jsonOut);\n\t\t \n\t \n\t\t} catch (ClientProtocolException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t}", "private ExportUsers() {}", "private List<Organization> extractOrganizationsFromResult(ResultSet resultSet) throws SQLException {\n\t\tList<Organization> result = new ArrayList<Organization>();\n\t\n\t\t// process the extractions - there will only be one user\n\t\t//\n\t\twhile (resultSet.next()) {\n\t\t\tOrganization organization = new Organization();\n\t\t\t\n\t\t\t// extract the data\n\t\t\tlong id = resultSet.getLong(\"id\");\n String name = resultSet.getString(\"name\");\n String description = resultSet.getString(\"description\");\n \n // populate the User entity\n organization.setName(name);\n organization.setId(id);\n organization.setDescription(description);\n \n // add the user to the list\n result.add(organization);\n }\n\t\treturn result;\n\t}", "protected static Map<String, User> createUsers( Element elem )\n throws XMLParsingException {\n Map<String, User> users = new HashMap<String, User>();\n List<Element> list = XMLTools.getElements( elem, StringTools.concat( 100, \"./\", dotPrefix, \"User\" ), cnxt );\n for ( Element child : list ) {\n String username = XMLTools.getRequiredNodeAsString( child, StringTools.concat( 100, \"./\", dotPrefix,\n \"UserName\" ), cnxt );\n String password = XMLTools.getRequiredNodeAsString( child, StringTools.concat( 100, \"./\", dotPrefix,\n \"Password\" ), cnxt );\n String firstName = XMLTools.getRequiredNodeAsString( child, StringTools.concat( 100, \"./\", dotPrefix,\n \"FirstName\" ), cnxt );\n String lastName = XMLTools.getRequiredNodeAsString( child, StringTools.concat( 100, \"./\", dotPrefix,\n \"LastName\" ), cnxt );\n String email = XMLTools.getRequiredNodeAsString( child,\n StringTools.concat( 100, \"./\", dotPrefix, \"Email\" ), cnxt );\n String rolesValue = XMLTools.getRequiredNodeAsString( child, StringTools.concat( 100, \"./\", dotPrefix,\n \"Roles\" ), cnxt );\n List<String> roles = Arrays.asList( rolesValue.split( \",\" ) );\n User user = new User( username, password, firstName, lastName, email, roles );\n users.put( username, user );\n }\n return users;\n }", "private void managePreCreatedUsers() {\n int numberRequestedGuests = CarProperties.number_pre_created_guests().orElse(0);\r\n int numberRequestedUsers = CarProperties.number_pre_created_users().orElse(0);\r\n Slog.i(TAG, \"managePreCreatedUsers(): OEM asked for \" + numberRequestedGuests\r\n + \" guests and \" + numberRequestedUsers + \" users\");\r\n if (numberRequestedGuests < 0 || numberRequestedUsers < 0) {\r\n Slog.w(TAG, \"preCreateUsers(): invalid values provided by OEM; \"\r\n + \"number_pre_created_guests=\" + numberRequestedGuests\r\n + \", number_pre_created_users=\" + numberRequestedUsers);\r\n return;\r\n }\r\n\r\n if (numberRequestedGuests == 0 && numberRequestedUsers == 0) {\r\n Slog.i(TAG, \"managePreCreatedUsers(): not defined by OEM\");\r\n return;\r\n }\r\n\r\n // Then checks how many exist already\r\n List<UserInfo> allUsers = mUserManager.getUsers(/* excludePartial= */ true,\r\n /* excludeDying= */ true, /* excludePreCreated= */ false);\r\n\r\n int allUsersSize = allUsers.size();\r\n if (DBG) Slog.d(TAG, \"preCreateUsers: total users size is \" + allUsersSize);\r\n\r\n int numberExistingGuests = 0;\r\n int numberExistingUsers = 0;\r\n\r\n // List of pre-created users that were not properly initialized. Typically happens when\r\n // the system crashed / rebooted before they were fully started.\r\n SparseBooleanArray invalidUsers = new SparseBooleanArray();\r\n\r\n for (int i = 0; i < allUsersSize; i++) {\r\n UserInfo user = allUsers.get(i);\r\n if (!user.preCreated) continue;\r\n if (!user.isInitialized()) {\r\n Slog.w(TAG, \"Found invalid pre-created user that needs to be removed: \"\r\n + user.toFullString());\r\n invalidUsers.append(user.id, /* notUsed=*/ true);\r\n continue;\r\n }\r\n if (user.isGuest()) {\r\n numberExistingGuests++;\r\n } else {\r\n numberExistingUsers++;\r\n }\r\n }\r\n if (DBG) {\r\n Slog.i(TAG, \"managePreCreatedUsers(): system already has \" + numberExistingGuests\r\n + \" pre-created guests,\" + numberExistingUsers + \" pre-created users, and these\"\r\n + \" invalid users: \" + invalidUsers );\r\n }\r\n\r\n int numberGuests = numberRequestedGuests - numberExistingGuests;\r\n int numberUsers = numberRequestedUsers - numberExistingUsers;\r\n int numberInvalidUsers = invalidUsers.size();\r\n\r\n if (numberGuests <= 0 && numberUsers <= 0 && numberInvalidUsers == 0) {\r\n Slog.i(TAG, \"managePreCreatedUsers(): all pre-created and no invalid ones\");\r\n return;\r\n }\r\n\r\n // Finally, manage them....\r\n\r\n // In theory, we could submit multiple user pre-creations in parallel, but we're\r\n // submitting just 1 task, for 2 reasons:\r\n // 1.To minimize it's effect on other system server initialization tasks.\r\n // 2.The pre-created users will be unlocked in parallel anyways.\r\n new Thread( () -> {\r\n TimingsTraceLog t = new TimingsTraceLog(TAG, Trace.TRACE_TAG_SYSTEM_SERVER);\r\n\r\n t.traceBegin(\"preCreateUsers\");\r\n if (numberUsers > 0) {\r\n preCreateUsers(t, numberUsers, /* isGuest= */ false);\r\n }\r\n if (numberGuests > 0) {\r\n preCreateUsers(t, numberGuests, /* isGuest= */ true);\r\n }\r\n t.traceEnd();\r\n\r\n if (numberInvalidUsers > 0) {\r\n t.traceBegin(\"removeInvalidPreCreatedUsers\");\r\n for (int i = 0; i < numberInvalidUsers; i++) {\r\n int userId = invalidUsers.keyAt(i);\r\n Slog.i(TAG, \"removing invalid pre-created user \" + userId);\r\n mUserManager.removeUser(userId);\r\n }\r\n t.traceEnd();\r\n }\r\n }, \"CarServiceHelperManagePreCreatedUsers\").start();\r\n }", "public void dummyUsersToDB(){\n\t\tUser nick = new User(db,\"Nick\",9);\n\t\tUser lin = new User(db,\"Lin\",10);\n\t\tUser evan = new User(db,\"Evan\",8);\n\t\tUser karthik = new User(db,\"Karthik\",10);\n\t\tUser bernadette = new User(db,\"Bernadette\",8);\n\t\tUser james = new User(db,\"James\",7);\n\t}", "public static ArrayList<User> selectUsers() {\n \n ArrayList<User> users = new ArrayList<>();\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n ResultSet rs = null;\n\n String query = \"SELECT * FROM users \";\n \n try {\n ps = connection.prepareStatement(query);\n rs = ps.executeQuery();\n ResultSetMetaData mD = rs.getMetaData();\n int colCount = mD.getColumnCount();\n User user = null;\n \n for (int i = 0; i < colCount; i++) {\n if (rs.next()) {\n user = new User();\n user.setUserID(rs.getInt(\"userID\"));\n user.setFirstName(rs.getString(\"firstName\"));\n user.setLastName(rs.getString(\"lastName\"));\n user.setEmail(rs.getString(\"email\"));\n user.setAddr1(rs.getString(\"addr1\"));\n user.setAddr2(rs.getString(\"addr2\"));\n user.setCity(rs.getString(\"city\"));\n user.setStateRegion(rs.getString(\"state\"));\n user.setZipcode(rs.getInt(\"zip\"));\n user.setCountry(rs.getString(\"country\"));\n user.setRoleName(rs.getString(\"roleName\"));\n System.out.println(user.getFirstName());\n users.add(user);\n }\n }\n return users;\n } catch (SQLException e) {\n System.out.println(e);\n return null;\n } finally {\n DBUtil.closeResultSet(rs);\n DBUtil.closePreparedStatement(ps);\n pool.freeConnection(connection);\n }\n }", "@Override\r\n\tprotected final void objectDataMapping() throws BillingSystemException{\r\n\t\tString[][] data=getDataAsArray(USER_DATA_FILE);\r\n\t\tif(validateData(data,\"Authorised User\",COL_LENGTH)){\r\n\t\tList<User> listUser=new ArrayList<User>();\r\n\t\t\r\n\t\tfor(int i=0;i<data.length;i++){\r\n\t \t\r\n\t \tUser usr=new User();\r\n\t \t\t\r\n\t \tusr.setUsername(data[i][0]);\r\n\t \tusr.setPassword(data[i][1]);\r\n\t \tusr.setRole(getRoleByCode(data[i][2]));\r\n\t \t\r\n\t \tlistUser.add(usr);\t\r\n\t }\r\n\r\n\t\t\r\n\t\tthis.listUser=listUser;\r\n\t\t}\r\n\t}", "private static User resultSetToUser( ResultSet resultSet ){\r\n\t\t\r\n\t\tString userID, userName, password, email;\r\n\t\tDate lastLoginDate, registeredDate;\r\n\t\tfloat height, weight, userRating;\r\n\t\tchar gender, publicEventNotify;\r\n\t\t\r\n\t\ttry {\r\n\t\t\tuserID = resultSet.getString(\"userID\");\r\n\t\t\tuserName = resultSet.getString(\"userName\");\r\n\t\t\tpassword = resultSet.getString(\"password\");\r\n\t\t\temail = resultSet.getString(\"email\");\r\n\t\t\t\r\n\t\t\theight = resultSet.getFloat(\"height\");\r\n\t\t\tweight = resultSet.getFloat(\"weight\");\r\n\t\t\tgender = resultSet.getString(\"gender\").charAt(0);\r\n\t\t\tuserRating = resultSet.getFloat(\"userRating\");\r\n\t\t\tpublicEventNotify = resultSet.getString(\"publicEventNotify\").charAt(0);\r\n\r\n\t\t\tlastLoginDate = resultSet.getDate(\"lastLoginDate\");\r\n\t\t\tregisteredDate = resultSet.getDate(\"registeredDate\");\r\n\t\t\t\r\n\t\t\treturn new User( userID, userName, password, email, height, weight, gender,\r\n\t\t\t\t\t\t\t publicEventNotify, userRating, lastLoginDate, registeredDate);\r\n\t\t\t\t\r\n\t\t} \r\n\t\tcatch (SQLException e) {\r\n\t\t\tSystem.out.println(\"DBFunctionUtil.resultSetToUser() : Error getting user\");\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}", "private void populateUserList() {\n UserAdapter userAdapter = new UserAdapter(this, users.toArray((Map<String, String>[]) new Map[users.size()]));\n lstUsers.setAdapter(userAdapter);\n }", "public void generateResultsList(){\n int win = 0, loss = 0, tie = 0;\n int selectedUserID = userAccounts.get(nameBox.getSelectedIndex()).getUserID();\n rankedResults = new ArrayList<RankedItem>();\n\n //for each item generate results\n for (TestItem testItem : testItems) {\n //for each test session check user id\n for(TestSession testSession: testSessions) {\n //if the session belongs to the user selected, then continue\n if (testSession.getUserID() == selectedUserID){\n //parse each object in the results list for data\n for (TestResult testResult : testResults) {\n //if the result belongs to the session in the current iteration, and the result is for the item in the current iteration, then count the result\n if (testItem.getItemID() == testResult.getItemID() && testSession.getSessionID() == testResult.getSessionID()) {\n switch (testResult.getResult()) {\n case 1:\n win++;\n break;\n case 0:\n tie++;\n break;\n case -1:\n loss++;\n break;\n }\n }\n }\n }\n }\n\n //write the data to the ranked items list after parsing\n rankedResults.add(new RankedItem(testItem, win, loss, tie));\n //reset counters\n win = 0;\n loss = 0;\n tie = 0;\n }\n }", "public void initAccounts() {\n Datastore mongoDataStore = DatabaseHandler.getInstance().getMongoDataStore();\n\n User user = users.get(0);\n\n Account account1 = new Account(\"Account1\", 500);\n Account account2 = new Account(\"Account2\", 100);\n Account account3 = new Account(\"Account3\", 200);\n ArrayList<Account> accounts = new ArrayList<>();\n accounts.add(account1);\n accounts.add(account2);\n accounts.add(account3);\n mongoDataStore.save(accounts);\n user.setAccounts(accounts);\n\n user = users.get(1);\n account1 = new Account(\"Account4\", 100);\n account2 = new Account(\"Account5\", 200);\n accounts = new ArrayList<>();\n accounts.add(account1);\n accounts.add(account2);\n mongoDataStore.save(accounts);\n user.setAccounts(accounts);\n\n user = users.get(2);\n account1 = new Account(\"Account6\", 300);\n accounts = new ArrayList<>();\n accounts.add(account1);\n mongoDataStore.save(accounts);\n user.setAccounts(accounts);\n\n user = users.get(3);\n account1 = new Account(\"Account7\", 400);\n account2 = new Account(\"Account8\", 500);\n account3 = new Account(\"Account9\", 100);\n Account account4 = new Account(\"Account10\", 200);\n accounts = new ArrayList<>();\n accounts.add(account1);\n accounts.add(account2);\n accounts.add(account3);\n accounts.add(account4);\n mongoDataStore.save(accounts);\n user.setAccounts(accounts);\n\n user = users.get(4);\n account1 = new Account(\"Account11\", 300);\n accounts = new ArrayList<>();\n accounts.add(account1);\n mongoDataStore.save(accounts);\n user.setAccounts(accounts);\n }", "public static List<User> createUserList() {\r\n\t\tList<User> users = new ArrayList<User>();\r\n\t\t\r\n\t\tusers.add(createUser(1, \"Isha\", \"Khandelwal\", \"isha.khandelwal@gmail.com\", \"ishaa\", \"ThinkHR\"));\r\n\t\tusers.add(createUser(2, \"Sharmila\", \"Tagore\", \"stagore@gmail.com\", \"stagore\", \"ASI\"));\r\n\t\tusers.add(createUser(3, \"Surabhi\", \"Bhawsar\", \"sbhawsar@gmail.com\", \"sbhawsar\", \"Pepcus\"));\r\n\t\tusers.add(createUser(4, \"Shubham\", \"Solanki\", \"ssolanki@gmail.com\", \"ssolanki\", \"Pepcus\"));\r\n\t\tusers.add(createUser(5, \"Ajay\", \"Jain\", \"ajain@gmail.com\", \"ajain\", \"TCS\"));\r\n\t\tusers.add(createUser(6, \"Sandeep\", \"Vishwakarma\", \"svishwakarma@gmail.com\", \"svishwakarma\", \"CIS\"));\r\n\t\tusers.add(createUser(7, \"Sushil\", \"Mahajan\", \"smahajan@gmail.com\", \"smahajan\", \"ASI\"));\r\n\t\tusers.add(createUser(8, \"Sumedha\", \"Wani\", \"swani@gmail.com\", \"swani\", \"InfoBeans\"));\r\n\t\tusers.add(createUser(9, \"Mohit\", \"Jain\", \"mjain@gmail.com\", \"mjain\", \"Pepcus\"));\r\n\t\tusers.add(createUser(10, \"Avi\", \"Jain\", \"ajain@gmail.com\", \"ajain\", \"Pepcus\"));\r\n\t\t\r\n\t\treturn users;\r\n\t}", "com.heroiclabs.nakama.api.User getUsers(int index);", "@SuppressWarnings(\"unchecked\")\n\tprivate static void createTestData() {\n\t\t\n\t\tusers.put(\"User0\", objectHandler.createUser(25.0));\n\t\tusers.put(\"User1\", objectHandler.createUser(1.0));\n\t\t\n\t\tdocuments.put(\"Doc0\", objectHandler.createDocument(\"mydoc\", 25, '4', 'C'));\n\t\tdocuments.put(\"Doc1\", objectHandler.createDocument(\"another\", 15, '3', 'B'));\n\t\t\n\t\tusers.get(\"User0\").addDocument(documents.get(\"Doc0\"));\n\t\tusers.get(\"User1\").addDocument(documents.get(\"Doc1\"));\n\t\t\n\t\tPrinterCapability capability1 = objectHandler.createPrinterCapability(true, false, true, true);\n\t\tPrinterCapability capability2 = objectHandler.createPrinterCapability(false, true, true, false);\n\t\tPrinterCapability capability3 = objectHandler.createPrinterCapability(false, true, true, false);\n\t\t\n\t\tPrinterPricing pricing = objectHandler.createPrinterPricing(0.03, 0.14, 0.06, 0.24);\n\t\t\n\t\tPrinterCapacity capacity1 = objectHandler.createPrinterCapacity(25, 0, 10, 30);\n\t\tPrinterCapacity capacity2 = objectHandler.createPrinterCapacity(0, 10, 15, 0);\n\t\tPrinterCapacity capacity3 = objectHandler.createPrinterCapacity(0, 10, 15, 0);\n\t\t\n\t\tprinters.put(\"Printer0\", objectHandler.createPrinter(\"A4All\", capability1, pricing, capacity1, objectHandler.createPrinterStatus()));\n\t\tprinters.put(\"Printer1\", objectHandler.createPrinter(\"A3B\", capability2, pricing, capacity2, objectHandler.createPrinterStatus()));\n\t\tprinters.put(\"Printer2\", objectHandler.createPrinter(\"A3B-rip\", capability3, pricing, capacity3, objectHandler.createPrinterStatus()));\n\t\t\n\t\tVDMSet status = new VDMSet();\n\t\tstatus.add(\"needFixing\");\n\t\tprinters.get(\"Printer2\").break_(status);\n\t}", "void buildDataTable(SearchResults<ManageUsersSearchModel.Result> results);", "public void createUser(List<User> list) {\n\n Gson gson = new Gson();\n FileService writerService = new FileService();\n for (User user : list) {\n String userData = gson.toJson(user);\n writerService.writeToUserData(userData);\n }\n\n }", "private UserData[] getEnvoyUsers(){\n UserData sofort = setUserData(\"DE\", \"EUR\");\n //Set custom regexp validation rule, set more short random valid email\n emailValidationRule.setRegexp(\"[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-]{1,6}[.]{0,1}[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]{0,6}[.]{0,1}[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]{1,8}[@]{1,1}[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]{1,21}[.]{0,1}[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]{0,30}[.]{1,1}[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]{2,4}\");\n sofort.setEmail(emailValidationRule.generateValidString());\n// UserData ibanq = setUserData(\"JP\", \"USD\");\n// UserData moneta = setUserData(\"RU\", \"USD\");\n// UserData poli = setUserData(\"AU\", \"AUD\");\n return new UserData[]{\n// ideal, //0\n// prezelwy, //1\n// eKonto, //2\n// euteller, //3\n// ewire, //4\n sofort, //5\n// ibanq, //6\n// moneta, //7\n// poli //8\n };\n }", "@Test\n public void testGetUsersList() {\n System.out.println(\"getUsersList\");\n\n Set<User> expResult = new HashSet<>();\n expResult.add(new User(\"nick0\", \"mail_0_@sapo.pt\"));\n expResult.add(new User(\"nick1\", \"mail_1_@sapo.pt\"));\n expResult.add(new User(\"nick2\", \"mail_2_@sapo.pt\"));\n expResult.add(new User(\"nick3\", \"mail_3_@sapo.pt\"));\n expResult.add(new User(\"nick4\", \"mail_4_@sapo.pt\"));\n expResult.add(new User(\"nick5\", \"mail_5_@sapo.pt\"));\n expResult.add(new User(\"nick6\", \"mail_6_@sapo.pt\"));\n expResult.add(new User(\"nick7\", \"mail_7_@sapo.pt\"));\n expResult.add(new User(\"nick8\", \"mail_8_@sapo.pt\"));\n expResult.add(new User(\"nick9\", \"mail_9_@sapo.pt\"));\n\n Set<User> result = sn10.getUsersList();\n assertEquals(expResult, result);\n }", "private UserDao() {\n\t\tusersList = new HashMap<String, User>();\n\t\tusersDetails = JsonFilehandling.read();\n\t\tfor (JSONObject obj : usersDetails) {\n\t\t\tusersList.put(obj.get(\"id\").toString(), new User(obj.get(\"id\").toString(),obj.get(\"name\").toString(), obj.get(\"profession\").toString()));\n\t\t}\n\t}", "public AllUsers(int datacenterId) {\r\n this.datacenterId = datacenterId;\r\n users= new ArrayList<>();\r\n }", "public static HashMap<Long, User> userMapInit() {\n HashMap<Long, User> userMap = new HashMap<Long, User>();\n\n\n User user = UserFactory.getNewUser(\"firstName\", \"secondName\");\n user.addPhone(PhoneService.getPhoneFactory().getNewPhone(\"firstN1\", \"secondN1\", \"88005553535\"));\n user.addPhone(PhoneService.getPhoneFactory().getNewPhone(\"first2\", \"second2\", \"890006662525\"));\n user.addPhone(PhoneService.getPhoneFactory().getNewPhone(\"fir3\", \"sec3\", \"72563698562\"));\n userMap.put(user.getId(), user);\n\n user = UserFactory.getNewUser(\"firstN1\", \"secondN1\");\n user.addPhone(PhoneService.getPhoneFactory().getNewPhone(\"sfg\", \"gdsfg\", \"88005693599\"));\n user.addPhone(PhoneService.getPhoneFactory().getNewPhone(\"asdfdsf\", \"secovbnd2\", \"890006662577\"));\n user.addPhone(PhoneService.getPhoneFactory().getNewPhone(\"bbbbb\", \"nbvnbn\", \"72563698588\"));\n userMap.put(user.getId(), user);\n\n user = UserFactory.getNewUser(\"first2\", \"second2\");\n user.addPhone(PhoneService.getPhoneFactory().getNewPhone(\"sfg\", \"gdsfg\", \"88005693599\"));\n user.addPhone(PhoneService.getPhoneFactory().getNewPhone(\"asdfdsf\", \"secovbnd2\", \"890006662577\"));\n user.addPhone(PhoneService.getPhoneFactory().getNewPhone(\"bb\", \"nb\", \"72563698588\"));\n userMap.put(user.getId(), user);\n\n user = UserFactory.getNewUser(\"fir3\", \"sec3\");\n user.addPhone(PhoneService.getPhoneFactory().getNewPhone(\"asdfdsf\", \"secovbnd2\", \"890006662577\"));\n user.addPhone(PhoneService.getPhoneFactory().getNewPhone(\"firstN1\", \"secondN1\", \"88005553535\"));\n user.addPhone(PhoneService.getPhoneFactory().getNewPhone(\"sfg\", \"gdsfg\", \"88005693599\"));\n userMap.put(user.getId(), user);\n\n return userMap;\n }", "private ArrayList selectUsersFromDB(String query) {\n ArrayList aUserCollection = new ArrayList();\n Connection DBConn = null;\n try {\n DBHelper.loadDriver(\"org.apache.derby.jdbc.ClientDriver\");\n String myDB = \"jdbc:derby://localhost:1527/SilentAuction\";\n DBConn = DBHelper.connect2DB(myDB, \"itkstu\", \"student\");\n\n Statement stmt = DBConn.createStatement();\n ResultSet rs = stmt.executeQuery(query);\n String first_name, last_name, username,\n password, email, question, answer,\n street, city, state, zip,\n homePhone, cellPhone, permission;\n UserBean silentAuctionBean;\n while (rs.next()) {\n first_name = rs.getString(\"First_Name\");\n last_name = rs.getString(\"Last_Name\");\n username = rs.getString(\"Username\");\n password = rs.getString(\"Password\");\n email = rs.getString(\"Email\");\n street = rs.getString(\"Street\");\n city = rs.getString(\"City\");\n state = rs.getString(\"State\");\n zip = rs.getString(\"Zip\");\n homePhone = rs.getString(\"Home_Phone\");\n cellPhone = rs.getString(\"Cell_Phone\");\n question = rs.getString(\"Question\");\n answer = rs.getString(\"Answer\");\n permission = rs.getString(\"Permission_Level\");\n\n silentAuctionBean = new UserBean(first_name, last_name, username, street, city, state, zip,\n homePhone, cellPhone, email, password, question, answer, permission);\n \n // add the newly created object to the collection\n aUserCollection.add(silentAuctionBean);\n }\n rs.close();\n stmt.close();\n } catch (Exception e) {\n System.err.println(\"ERROR: Problems with SQL select\");\n e.printStackTrace();\n }\n try {\n DBConn.close();\n } catch (SQLException e) {\n System.err.println(e.getMessage());\n }\n return aUserCollection;\n }", "public UsersDataSet() {}", "@Test\n public void testGetInfluentialUsers01() {\n System.out.println(\"getInfluentialUsers\");\n\n Set<User> expResult = new HashSet<>();\n expResult.add(new User(\"nick3\", \"mail_3_@sapo.pt\"));\n expResult.add(new User(\"nick5\", \"mail_5_@sapo.pt\"));\n expResult.add(new User(\"nick8\", \"mail_8_@sapo.pt\"));\n\n Set<User> result = sn10.getInfluentialUsers();\n assertEquals(expResult, result);\n }", "public List createUserList()\r\n{\r\n\tUser madhu=new User(\"mekala.madhu@gmail.com\", \"madhu\");\r\n\tUser krishna=new User(\"Krishna.avva@gmail.com\", \"krishna\");\t\r\n\r\n\tList listOfUsers = new ArrayList();\r\n\tlistOfUsers.add(madhu);\r\n\tlistOfUsers.add(krshna);\r\n\treturn listOfUsers;\r\n}", "public org.eclipse.stardust.engine.api.query.Users\n getAllUsers(org.eclipse.stardust.engine.api.query.UserQuery query)\n throws org.eclipse.stardust.common.error.WorkflowException;", "private static Map<String, User> getUsers() {\n Map<String, User> users = new HashMap<String, User>();\n\n User userOne = new User(\"one\",\"1\");\n User userTwo = new User(\"two\",\"2\");\n\n users.put(userOne.getName(), userOne);\n users.put(userTwo.getName(), userTwo);\n\n return users;\n }", "public void populateUserDetails() {\n\n this.enterprise = system.getOpRegionDirectory().getOperationalRegionList()\n .stream().filter(op -> op.getRegionId() == user.getNetworkId())\n .findFirst()\n .get()\n .getBuDir()\n .getBusinessUnitList()\n .stream()\n .filter(bu -> bu.getUnitType() == BusinessUnitType.CHEMICAL)\n .map(unit -> (ChemicalManufacturingBusiness) unit)\n .filter(chemBusiness -> chemBusiness.getEnterpriseId() == user.getEnterpriseId())\n .findFirst()\n .get();\n\n this.organization = (ChemicalManufacturer) enterprise\n .getOrganizationList().stream()\n .filter(o -> o.getOrgId() == user.getOrganizationId())\n .findFirst()\n .get();\n\n }", "com.rpg.framework.database.Protocol.User getUsers(int index);", "com.rpg.framework.database.Protocol.User getUsers(int index);", "@Test\n public void testReadAllUsers() throws InvalidUserException {\n //Arrange user 1\n User user = new User();\n user.setEmail(\"user@email.com\");\n user.setFirstName(\"first\");\n user.setLastName(\"last\");\n user.setPassword(\"pass\");\n user.setRole(\"admin\");\n User createdUser = userService.createUser(user); \n\n //Arrange user 2 \n User user2 = new User();\n user2.setEmail(\"user2@email.com\");\n user2.setFirstName(\"second\");\n user2.setLastName(\"second last\");\n user2.setPassword(\"pass\");\n user2.setRole(\"admin\");\n User createUser2 = userService.createUser(user2); \n \n //Act\n List<User> listUser = userService.readAllUsers();\n \n //Assert\n assertEquals(listUser.size(),2);\n assertEquals(createdUser.getFirstName(), \"first\");\n assertEquals(createdUser.getUserId(), listUser.get(0).getUserId());\n }", "@SelectProvider(type = UserProviders.class, method = \"getAllUsersProvider\")\n @Results({\n @Result(column = \"created_at\", property = \"createdAt\")\n })\n List<User> getAllUsers();", "public void newUserDirectory() {\n\t\tusers = new LinkedAbstractList<User>(100);\n\t}", "public void getAllUsers() {\n\t\t\n\t}", "protected String createUserList(XMLLogHelper logHelper) throws CruiseControlException {\n \n Set emails = createUserSet(logHelper);\n return createEmailString(emails); \n }", "@Override\n public Future<Seq<TUser>> getUsers() {\n return futurePool.apply(new BlockingUserRetriever(\"user1\", false))\n .join(futurePool.apply(new BlockingUserRetriever(\"user2\", false)))\n .transformedBy(\n new FutureTransformer<Tuple2<User, User>, List<TUser>>() {\n @Override\n public List<TUser> map(Tuple2<User, User> value) {\n List<TUser> list = new ArrayList<TUser>(2);\n list.add(value._1().toTObject());\n list.add(value._2().toTObject());\n return list;\n }\n\n // if we call BlockingUserRetriever with useRandom=true then\n // one of the users of maybe both can fail because don't exist so\n // we catch the exception and return an empty list instead\n @Override\n public List<TUser> handle(Throwable throwable) {\n return new ArrayList<TUser>();\n }\n }\n ).transformedBy(\n new FutureTransformer<List<TUser>, Seq<TUser>>() {\n @Override\n public Seq<TUser> map(List<TUser> value) {\n return ScalaSupport.toScalaSeq(value);\n }\n }\n );\n }", "public void userListStart() {\n\t\tfor (int i = 0; i < userServices.getAllUsers().length; i++) {\n\t\t\tuserList.add(userServices.getAllUsers()[i]);\n\t\t}\n\t}", "public void getUsers(String[] tokens) {\n\n }", "public /*User*/ void createUser (String username) throws TwitterException, JAXBException{\n\t\t\n \tSystem.out.println(\"STEP 1 - \" + username);\n \ttwitter4j.User user1 = twitter.showUser(username);\n \ttwCount ++;\n \t\n \tList<Status> status = twitter.getHomeTimeline();\n \ttwCount ++;\n \t\n \tString name = user1.getName();\n \tString location = user1.getLocation();\n \tString description = user1.getDescription();\n \t\n \tArrayList<Integer> follower = new ArrayList<Integer>();\n \tArrayList<Integer> following = new ArrayList<Integer>();\n \tArrayList<Integer> friend = new ArrayList<Integer>();\n \t\n \tString tweets = getTweets((int)user1.getId(), 200);\n \tArrayList<String> tweetsFollowing = new ArrayList<String>();\n \tArrayList<String> tweetsFriends = new ArrayList<String>();\n \t\n\n\t\t\n\t\t\n \t\n\t\tIDs ids, ids2;\n\t\tids = twitter.getFollowersIDs(username, -1); // follower\n\t\ttwCount ++;\n\t\tids2 = twitter.getFriendsIDs(username, -1); // following\n\t\ttwCount ++;\n\t\t\n\n\t\t\n\t \tSystem.out.println(\"STEP 2 - \" + username);\n\t\t\n\n\t\t/*Follower*/ /*MAX 5000*/\n for (long id : ids.getIDs()) { \n\t \tfollower.add((int) id);\n\n\n }\n \n \n /**Following**/ /*MAX 5000*/\n for (long id : ids2.getIDs()) { \n \tfollowing.add((int) id);\n \n }\n \n\n \n /*Friends*/\n \n \t/*showFriendship(int sourceId,int targetId) throws TwitterException\n\t\tGets the detailed relationship status between a source user and a target user\n\t\tThis method calls http://api.twitter.com/1/friendships/show.json */\n \n Relationship r = null;\n int z = 0;\n for (long id : ids2.getIDs()){\n \t r = twitter.showFriendship(user1.getId(),id);\n \t if (r.isSourceFollowedByTarget()){\n \t\t z += 1;\n \t\t// System.out.println(id + \",number \"+ i );\n \t\t friend.add((int)id);\n \t }\n \t \n \t if (z >= 20){\n \t\t break;\n \t }\n \t\n }\n \n \n \n \n \n \n // \tSystem.out.println(\"\\n hddjkdsakjsadkjsdkj \" + friend.size() + \" \" + following.size());\n \n \n \n \tSystem.out.println(\"STEP 3 - \" + username);\n \t\n \t\n \t\n \t\n String u = \"\";\n \n \n int count = 0;\n /*tweetsFollowing*/\n for (int j : following){\n //\tSystem.out.println(\"\\n\\n\\n prints following: \" + j );\n \tu = getTweets(j, 10);\n // \tSystem.out.println(\"u.size \" + u.length() );\n \tif( u.length() > 0){\n \t\ttweetsFollowing.add(u);\n \t\tcount ++;\n \t}\n if (count >= 10){\n \tbreak;\n }\n \t\n }\n \n \n \n /*tweetsFriends*/\n\t\tcount = 0;\n if (friend.size() >= 10){\n\t for (int i : friend){\n\t // \tSystem.out.println(\"\\n there is some friends: \" + friend.size() );\n\t \tu = getTweets(i, 10);\n\t //\tSystem.out.println(\"\\n U.LENGHT \" + u.length() );\n\t \tif (u.length() > 0){\n\t \t\ttweetsFriends.add(u);\n\t \t\tcount ++;\n\t \t}\n\t \t\n\t if (count >= 10){\n\t \tbreak;\n\t }\n\t }\n\t \n }else if (following.size() > 21){ // no friends, I consider the following (not in tweetsFollowing) like friends \n //\tSystem.out.println(\"There is not a friend - > considers some following like friends\");\n \tfor (int i = 11; i < following.size(); i++){ // considers some following like friends\n\t \t//System.out.println(\"\\n\\n\\n prints follower: \" + i );\n\t \tu = getTweets(i, 10);\n\t // \tSystem.out.println(\"u.size friend\" + u.length() );\n\t \tif (u.length() > 0){\n\t \t\ttweetsFriends.add(u);\n\t \t\tcount ++;\n\t \t}\n\t \t\n\t if (count >= 10){\n\t \tbreak;\n\t }\n\t }\n \t\n }else{// I consider the following like friends\n \ttweetsFriends = tweetsFollowing;\n }\n \n \n//\t\t\n\n \n \n //System.out.println(tweetsFriends.size() + \"siiixx\");\n \n \ttwitter.User user = new twitter.User(username, name, location, friend, following, tweets, tweetsFriends, tweetsFollowing, description);\n //\tSystem.out.println(user.getTweetsFriends().size() + \"siiixx\");\n \t\n \tFile file = new File(\"otherFile/users/\"+username+\".xml\");\n\t\tJAXBContext jaxbContext = JAXBContext.newInstance(twitter.User.class);\n\t\tMarshaller jaxbMarshaller = jaxbContext.createMarshaller();\n\n\t\t// output pretty printed\n\t\tjaxbMarshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);\n\n\t\tjaxbMarshaller.marshal(user, file);\n\t\tjaxbMarshaller.marshal(user, System.out);\n\n \n }", "public List<TestUser> getAllUsers(){\n\t\tSystem.out.println(\"getting list of users..\");\n\t\tList<TestUser> user=new ArrayList<TestUser>();\n\t\tuserRepositary.findAll().forEach(user::add);\n\t\t//System.out.println(\"data: \"+userRepositary.FindById(\"ff80818163731aea0163731b190c0000\"));\n\t\treturn user;\n\t}", "public List<User> getUsers(Boolean enabled, Date startDate, Date endDate, int offset, int length) throws UserManagementException;", "@SuppressWarnings(\"static-access\")\r\n\t@Test\r\n\tpublic void crearUsersTest() {\r\n\r\n\t\tpd.crearUsers();\r\n\t\tpd.pm.deletePersistent(pd.user1);\r\n\r\n\t}", "@Test\n\tpublic void it_can_find_all_records_created_by_a_user() {\n\t\tUUID jackUUID = UUID.randomUUID();\n\t\tUUID janeUUID = UUID.randomUUID();\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\tRecord record = new Record();\n\t\t\trecord.setCreatorID(jackUUID);\n\t\t\trepository.save(record);\n\t\t}\n\n\t\t// and 2 records created by Jane\n\t\tfor (int i = 0; i < 2; i++) {\n\t\t\tRecord record = new Record();\n\t\t\trecord.setCreatorID(janeUUID);\n\t\t\trepository.save(record);\n\t\t}\n\n\t\t// Jack has 3 records\n\t\tassertThat(repository.findByCreatorID(jackUUID)).hasSize(3);\n\n\t\t// Jane has 2 records\n\t\tassertThat(repository.findByCreatorID(janeUUID)).hasSize(2);\n\t}", "public List<User> getSpecificUsers(String searchQuery) {\n logger.info(\"Currently in method 'getSpecificUsers()'.\");\n Database database = Database.getInstance();\n Connection connection = null;\n List<User> specificUsers = new ArrayList<User>();\n String sql = \"SELECT * FROM users WHERE id LIKE '%\" + searchQuery +\n \"%' OR first_name LIKE '%\" + searchQuery +\n \"%' or last_name LIKE '%\" + searchQuery +\n \"%' or date_of_birth LIKE '%\" + searchQuery + \"%'\";\n\n try {\n database.connect();\n connection = database.getConnection();\n Statement selectStatement = connection.createStatement();\n ResultSet results = selectStatement.executeQuery(sql);\n while (results.next()) {\n User employee = createUserFromResults(results);\n specificUsers.add(employee);\n }\n database.disconnect();\n } catch (SQLException e) {\n logger.error(\"Encountered an SQLException: \", e);\n } catch (Exception e) {\n logger.error(\"Encountered an Exception: \", e);\n }\n return specificUsers;\n }", "@Override\n\tpublic List<Object> getAllUsers() {\n\t\tList<Object> usersList = new ArrayList<Object>();\n\t\tList<TestUser> users = dao.getAll();\n\t\tSystem.out.println(dao.exists(5));\n\t\tfor(TestUser user : users){\n\t\t\tMap<String,Object> m = new HashMap<String,Object>();\n\t\t\tm.put(\"id\", user.getId());\n\t\t\tm.put(\"name\", user.getUsername());\n\t\t\tm.put(\"pwd\", user.getPassword());\n\t\t\tJSONObject j = new JSONObject(m);\n\t\t\tusersList.add(j);\n\t\t}\n\t\treturn usersList;\n\t}", "public static void initializeUserList() {\r\n\t\tUser newUser1 = new User(1, \"Elijah Hickey\", \"snhuEhick\", \"4255\", \"Admin\");\r\n\t\tuserList.add(newUser1);\r\n\t\t\r\n\t\tUser newUser2 = new User(2, \"Bob Ross\", \"HappyClouds\", \"200\", \"Employee\");\r\n\t\tuserList.add(newUser2);\r\n\t\t\r\n\t\tUser newUser3 = new User(3, \"Jane Doe\", \"unknown person\", \"0\", \"Intern\");\r\n\t\tuserList.add(newUser3);\r\n\t}", "public final void getUsersList() throws ServiceException {\r\n\t\tList<Bems> usersList = testReqmtService.getUsersList();\r\n\t\tList<SelectItem> userDetails= new ArrayList<SelectItem>();\r\n\t\t\r\n\t\tfor(Bems user:usersList) {\r\n\t\t\tStringBuilder name=new StringBuilder();\r\n\t\t\t name.append(user.getLastName().trim());\r\n\t\t\t name.append(\",\"+\" \");\r\n\t\t\t name.append(user.getFirstName().trim());\r\n\t\t\tif(CommonUtils.isStringNotEmpty(user.getMiddleName())){\r\n\t\t\t\tname.append(\" \");\r\n\t\t\t\tname.append(user.getMiddleName());\r\n\t\t\t}\r\n\t\t\tuserDetails.add(new SelectItem(user.getBemsID(), name.toString()));\r\n\t\t \r\n\t\t}\r\n\t\tuiTestReqEditModel.setUserList(userDetails);\r\n\t}", "@GET\n @Path(\"/users\")\n @Produces(\"application/json\")\n public Response getUsersBatch() throws JsonProcessingException {\n LOG.info(\"Batch of users requested.\");\n @NotNull final List<UserEntity> loginUserList = DatabaseAccessLayer.getLoginUserList();\n return Response.ok(new UserBatchHolder(loginUserList).writeJson()).build();\n }", "public List<Utilizator> listUsers();", "@Override\n\tpublic List<User> extractData(ResultSet rs) throws SQLException, DataAccessException {\n\t\tList<User> list = new ArrayList<User>();\n\t\twhile (rs.next()) {\n\t\t\tUser user = new User();\n\t\t\tuser.setUserId(rs.getInt(\"user_id\"));\n\t\t\tuser.setUserName(rs.getString(\"user_name\"));\n\t\t\tlist.add(user);\n\n\t\t}\n\t\treturn list;\n\t}", "List<User> fetchAllUSers();", "List<UserResponse> toUserResponses(List<User> users);", "private final void initializeCache() {\r\n try {\r\n UserIndex index = makeUserIndex(this.dbManager.getUserIndex());\r\n for (UserRef ref : index.getUserRef()) {\r\n String email = ref.getEmail();\r\n String userString = this.dbManager.getUser(email);\r\n User user = makeUser(userString);\r\n this.updateCache(user);\r\n }\r\n }\r\n catch (Exception e) {\r\n server.getLogger().warning(\"Failed to initialize users \" + StackTrace.toString(e));\r\n }\r\n }", "Map<Date, Set<String>> getFullUsers(Step step) throws SQLException;", "private void createPlayers() {\n\t\t//Randomize roles\n\t\tArrayList<AdventurerEnum> randomisedRoles = getRandomisedRoles();\n\t\tfor(int i=0; i<numPlayers; i++) \n\t\t\tcreateOnePlayer(randomisedRoles.get(i), i+1);\n\t}", "private void populateUserView()\n\t{\n\t\t/* create dummy user properties, throw away later */\n\t\tPlayerViewModel userViewModel = new PlayerViewModel(currentUser.getString(\"facebookId\"), \n\t\t\t\t\t\t\t\t\t\tcurrentUser.getString(\"profilePicUrl\")+\"?type=large\", \n\t\t\t\t\t\t\t\t\t\tlocalCountMap.get(currentUser.getString(\"facebookId\")), \n\t\t\t\t\t\t\t\t\t\ttrue,\n\t\t\t\t\t\t\t\t\t\tfalse);\n\t\t\n\t\t/* create adapter for user view */\n\t\tuserCheeseTextView = (TextView) findViewById(R.id.cheeseCountTextView);\n\t\t//userProfileImageView = (ImageView) findViewById(R.id.userProfileImageView);\n\t\tuserProfileImageView = (CircularImageView) findViewById(R.id.userProfileImageView);\n\t\tuserViewAdapter = new UserViewAdapter(this, userCheeseTextView, userProfileImageView);\n\t\t\n\t\t/* set display values via adapter */\n\t\tuserViewAdapter.setUser(userViewModel);\t\t\n\t}", "List<User> getRandomUsers(List<User> uList, int num);", "private void populateUser() {\n // After user is authenticated, grab their data from the net\n // TODO This will ping the net on every resume (which is probably frequent).\n userListener = saplynService.viewUser();\n\n userListener.subscribeOn(Schedulers.newThread())\n .observeOn(AndroidSchedulers.mainThread())\n .subscribe(\n\n // We got a valid user from the web. Populate our local object and spawn\n // the dashboard.\n user -> {\n this.user = user;\n FragmentTransaction ft = fm.beginTransaction();\n ft.add(R.id.main_fragment_container_home, new DashboardFragment());\n ft.commit();\n },\n throwable -> {\n if(throwable instanceof HttpException) {\n ResponseBody body = ((HttpException) throwable).response().errorBody();\n Log.e(TAG, \"onErrorFromPopulateUser: \"\n + body.toString());\n }\n }\n );\n }", "@Test\n public void testGetUSerHomeViewModel() throws Exception{\n for(User currentUser: userServiceLayer.getAllUsers(Integer.MAX_VALUE, 0)){\n userServiceLayer.deleteUser(currentUser.getId());\n }\n \n List<User> users = createTestUsers(15);\n \n UserHomeViewModel userHomeViewModel = userWebServices.getUSerHomeViewModel(5, 0, 5);\n \n assert userHomeViewModel.getUsers().size()==5;\n assert userHomeViewModel.getPageNumber() == 1;\n \n assert userHomeViewModel.getPageNumbers().size() == 5;\n \n assert userHomeViewModel.getPageNumbers().get(1) == 2;\n assert userHomeViewModel.getPageNumbers().get(4) == 5;\n \n int count = 0;\n for(UserViewModel userViewModel: userHomeViewModel.getUsers()){\n assert(\"Tephon\"+count).equals(userViewModel.getUsername());\n assert(\"password\"+count).equals(userViewModel.getPassword()); \n \n User sameUser = users.get(count);\n User user = userServiceLayer.getUser(sameUser.getId());\n \n assert user.getId() == userViewModel.getId();\n assert user.getUsername().equals(userViewModel.getUsername());\n assert user.getPassword().equals(userViewModel.getPassword());\n\n count++; \n }\n }", "private void populateUserMap(List<User> list) {\n\t\tfor (User user : list) {\n\t\t\tuserMap.put(user.getUserName(), user);\n\t\t}\n\n\t}", "public void populateUserInformation()\n {\n ViewInformationUser viewInformationUser = new ViewFXInformationUser();\n\n viewInformationUser.buildViewProfileInformation(clientToRegisteredClient((Client) user), nameLabel, surnameLabel, phoneLabel, emailLabel, addressVbox);\n }", "@Override\n public void run() {\n try {\n stringOrganizationIds.remove(defaultOrg);\n List<Integer> organizationIds = FluentIterable.from(stringOrganizationIds)\n .transform(Ints.stringConverter()).toList();\n\n newUser.setActive(false);\n UserProfileStruct savedUser = createAccountInternal(conn, newUser, password, resetQuestion,\n resetAnswer, givenName, surname, organizationId);\n for (Integer orgId : organizationIds) {\n Profile profile = new Profile();\n profile.setGivenName(givenName);\n profile.setSurname(surname);\n profile.setOrganizationId(orgId);\n profile.setUserId(savedUser.credentialedUser.getId());\n profile = profilePersister.createProfile(profile, conn);\n\n authService.grantAtLeast(profile.getId(), ROLE_READER, orgId);\n authService.grantAtLeast(orgId, ROLE_ADMIN, profile.getId());\n }\n\n User user = savedUser.credentialedUser.getUser();\n user.setActive(true);\n persistenceService.process(conn, new UserPersister.UpdateUserFunc(user));\n conn.commit();\n } catch (Exception e) {\n closeConnection(conn);\n }\n }", "public ArrayList<IndividualUser> listAllUsers() {\n try {\n PreparedStatement s = sql.prepareStatement(\"SELECT id, userName, firstName, lastName FROM Users \");\n s.execute();\n ResultSet results = s.getResultSet();\n ArrayList<IndividualUser> users = new ArrayList<>();\n if (!results.isBeforeFirst()) {\n results.close();\n s.close();\n return users;\n }\n\n while (!results.isLast()) {\n results.next();\n IndividualUser u = new IndividualUser(results.getInt(1), results.getString(2), results.getString(3), results.getString(4));\n\n users.add(u);\n\n }\n\n results.close();\n s.close();\n\n return users;\n } catch (SQLException e) {\n sqlException(e);\n return null;\n }\n }", "@Override\n public List<User> selectAllUsers() {\n\n List<User> userList = new ArrayList<>();\n\n try (Connection connection = DriverManager.getConnection(URL, USERNAME, PASSWORD)) {\n\n String sql = \"SELECT * FROM ers_users\";\n\n PreparedStatement ps = connection.prepareStatement(sql);\n\n ResultSet rs = ps.executeQuery();\n\n while (rs.next()) {\n\n userList.add(\n new User(\n rs.getInt(1)\n , rs.getString(2)\n , rs.getString(3)\n , rs.getString(4)\n , rs.getString(5)\n , rs.getString(6)\n , rs.getInt(7)\n )\n );\n }\n }\n\n catch (SQLException e) {\n\n e.printStackTrace();\n }\n\n return userList;\n }", "public void createUser(String chosen)\n {\n String role = chosen;\n boolean valid = false;\n String name = \"\";\n String username = \"\";\n String email = \"\";\n String gender = \"\";\n String password = \"\";\n ArrayList<String> skillsets = new ArrayList<String>();\n \n Scanner answer = new Scanner(System.in);\n while(!valid)\n {\n System.out.println();\n System.out.print(\"\\t\\t >> Please insert your name : \");\n name = answer.nextLine().trim();\n valid = validation.checkNoBlank(name);\n }\n valid = false;\n while(!valid)\n {\n System.out.print(\"\\t\\t >> Please insert your username : \");\n username = answer.nextLine().trim();\n valid = validation.checkNoBlank(username);\n boolean existance = validation.checkUserNameExistance(username, userList);\n if (existance == true)\n {\n valid = false;\n System.out.println();\n System.out.println(\"\\t\\t !! This username is already exist, please choose another one\");\n System.out.println();\n }\n }\n valid = false;\n while(!valid)\n {\n System.out.print(\"\\t\\t >> Please insert your gender(male/female) : \");\n gender = answer.nextLine().trim();\n valid = validation.checkGenderAnswer(gender);\n }\n valid = false;\n while(!valid)\n {\n System.out.print(\"\\t\\t >> Please insert your email : \");\n email = answer.nextLine().trim();\n valid = validation.checkNoBlank(email);\n }\n \n valid = false;\n while(!valid)\n {\n System.out.print(\"\\t\\t >> Please set your password : \");\n password = answer.nextLine().trim();\n valid = validation.checkNoBlank(password);\n }\n \n if(role.equals(\"2\"))\n {\n String decision = \"y\";\n String tmpSkill = \"\";\n while(decision.equals(\"y\"))\n {\n valid = false;\n while(!valid)\n {\n System.out.print(\"\\t\\t >> Please set your skillsets: \");\n tmpSkill = answer.nextLine().trim();\n valid = validation.checkNoBlank(tmpSkill);\n valid = validation.checkNoSkill(tmpSkill, skillsets);\n }\n skillsets.add(tmpSkill);\n System.out.print(\"\\t\\t >> Would you like to input another skill?(y/n)\");\n decision = answer.nextLine().trim();\n decision = decision.substring(0, 1);\n while(!decision.equals(\"n\") && !decision.equals(\"y\"))\n {\n System.out.print(\"\\t\\t >> Input wrong! Please input y for yes or n for no: \");;\n decision = answer.nextLine().trim();\n decision = decision.substring(0,1);\n }\n }\n createJobSeeker(name,username,gender,email,password,skillsets);\n }\n else\n if (role.equals(\"1\"))\n {\n System.out.println(\"\\t\\t >> Please input your company name:\");\n String companyName = answer.nextLine();\n System.out.println(\"\\t\\t >> Please input your location:\");\n String location = answer.nextLine();\n createJobRecruiter(name, username, gender, email, password, companyName, location);\n }\n \n }", "private User convert(ResultSet rs) throws SQLException, NoSuchAlgorithmException {\n User user = new User(\n rs.getLong(1),\n rs.getString(2),\n new HashedString(rs.getString(3), true),\n new Email(rs.getString(4)));\n return user;\n }", "@Create\n public void create()\n {\n \n log.debug(\"Creating users and mailboxes\");\n //MailboxService ms = MMJMXUtil.getMBean(\"meldware.mail:type=MailboxManager,name=MailboxManager\", MailboxService.class);\n AdminTool at = MMJMXUtil.getMBean(\"meldware.mail:type=MailServices,name=AdminTool\", AdminTool.class);\n \n for (MeldwareUser meldwareUser : getUsers())\n {\n at.createUser(meldwareUser.getUsername(), meldwareUser.getPassword(), meldwareUser.getRoles());\n // TODO This won't work on AS 4.2\n /*Mailbox mbox = ms.createMailbox(meldwareUser.getUsername());\n for (String alias : meldwareUser.getAliases())\n {\n ms.createAlias(mbox.getId(), alias);\n }*/\n log.debug(\"Created #0 #1 #2\", meldwareUser.isAdministrator() ? \"administrator\" : \"user\", meldwareUser.getUsername(), meldwareUser.getAliases() == null || meldwareUser.getAliases().size() == 0 ? \"\" : \"with aliases \" + meldwareUser.getAliases());\n }\n }" ]
[ "0.69333434", "0.69264853", "0.67359906", "0.6586409", "0.6513758", "0.6511363", "0.6500566", "0.64192975", "0.6280297", "0.6241587", "0.62148094", "0.6213002", "0.61756444", "0.6172899", "0.61499786", "0.6102366", "0.6098259", "0.60943323", "0.60839725", "0.6055771", "0.60556364", "0.6050461", "0.6026645", "0.60153735", "0.5950533", "0.59450096", "0.5941348", "0.5930635", "0.5929831", "0.5919409", "0.5900245", "0.5893038", "0.58788854", "0.5876332", "0.5870238", "0.5869165", "0.58525306", "0.58395314", "0.5828365", "0.5819242", "0.58158386", "0.5809153", "0.5806801", "0.5805707", "0.57926583", "0.5781433", "0.57714397", "0.5763292", "0.57612354", "0.575198", "0.5751486", "0.5743452", "0.5743184", "0.5739369", "0.5738332", "0.5725758", "0.57074404", "0.5705139", "0.5690351", "0.56822926", "0.5679488", "0.5677039", "0.5676536", "0.56732863", "0.56719136", "0.5671397", "0.56565464", "0.56476885", "0.5643875", "0.5642792", "0.5631487", "0.56214535", "0.5619982", "0.5597892", "0.55978334", "0.55937874", "0.5592263", "0.5590102", "0.5573917", "0.5572741", "0.5568459", "0.555292", "0.5538489", "0.55367553", "0.5533625", "0.55276054", "0.552576", "0.55236226", "0.55235803", "0.55234575", "0.5523142", "0.55150056", "0.55083036", "0.5507917", "0.5497305", "0.5489639", "0.5479148", "0.54783475", "0.5474633", "0.5473806" ]
0.6963085
0
TODO Autogenerated method stub
public static void main(String[] args) { make(); setWidth(); setHeight(); printAll(); }
{ "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
1 represents X 1 represents O 0 represents empty space (move yet to be made)
@Test public void testCheckVert() throws Exception { int[][] game = { {1, 1, -1}, {-1, 1, 0}, {0, 1, -1} }; this.currentGame = new TicTac(game, 0, 1); System.out.println("Game 1: X has won"); assertEquals("X has won", currentGame.verifyGame()); // X has won (middle column, vertically) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean isSpaceFree(Move move) {\n int moveX = move.getMoveX(); \n int moveY = move.getMoveY(); \n if (boardState[moveX][moveY] == 'X' || boardState[moveX][moveY] == 'O') {\n return false; \n }\n return true; \n }", "public void undoMove(Move move) {\n b[move.from.row][move.from.column] = true;\r\n\r\n // Set 'to' space to free\r\n b[move.to.row][move.to.column] = false;\r\n\r\n // Set 'step' space to occupied\r\n b[(move.from.row + move.to.row)/2][(move.from.column + move.to.column)/2] = true;\r\n\r\n // Increment number of pegs left on the board\r\n pegsLeft++;\r\n }", "static void move_1 (int[] nums) {\n\t\t\n\t\tint j = 0;\n\t\t\n\t\t// Copy all non 0 numbs to start of arry \n\t\t// j will keep count of nums of zeros \n\t\tfor(int i=0; i< nums.length; i++) {\n\t\t\t\n\t\t\tif(nums[i] != 0) {\n\t\t\t\tnums[j] = nums[i];\n\t\t\t\tj++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// add j number of zeros to end of array\n\t\tfor(int i=j ; i<nums.length; i++) {\n\t\t\t\n\t\t\tnums[i] = 0;\n\t\t}\n\t\t\n\t}", "private boolean isFirstMove(int numberGeneratedSoFarLength) {\n\t\treturn numberGeneratedSoFarLength == 1;\n\t}", "public void move() {\r\n\t\tmoveCount++;\r\n\t}", "boolean isValidMove(int move)\n\t{\n\t\treturn move >= 0 && move <= state.size() - 1 && state.get(move) == 0;\n\t}", "private void incr() {\n Move tempMove = null;\n Piece t1, t2;\n while (_r <= M) {\n t1 = Board.this._turn;\n t2 = Board.this.get(_c, _r);\n if (t1 == t2) {\n break;\n } else {\n nextPiece();\n }\n }\n if (_r > M) {\n _move = null;\n return;\n }\n int c1, r1, count3;\n Piece temp1, temp2;\n Board tempBoard;\n _dir = _dir.succ();\n while (_dir != null) {\n count3 = pieceCountAlong(_c, _r, _dir);\n c1 = _c + _dir.dc * count3;\n r1 = _r + _dir.dr * count3;\n tempMove = Move.create(_c, _r, c1, r1, Board.this);\n if (tempMove == null) {\n _dir = _dir.succ();\n continue;\n }\n if (isLegal(tempMove)) {\n _move = tempMove;\n break;\n }\n _dir = _dir.succ();\n }\n if (_dir == null) {\n _dir = NOWHERE;\n nextPiece();\n incr();\n }\n }", "public Point findSpace(){\r\n Point toReturn = new Point(-1, -1);\r\n for (int i = 0; i<puzzleSize; i++){\r\n for (int j = 0; j<puzzleSize; j++){\r\n if (this.state[i][j] == 0)\r\n toReturn.setLocation(i,j);\r\n }\r\n }\r\n return toReturn;\r\n }", "public void makeComplete() { \n\t\tthis.size = 0;\n\t\tint index = 1;\n\t\tfor(int i=1; i<this.heap.length; i++) {\n\t\t\tif(this.heap[i] != -1) {\n\t\t\t\tint temp = this.heap[index];\n\t\t\t\tthis.heap[index] = this.heap[i];\n\t\t\t\tthis.heap[i] = temp;\n\t\t\t\tindex++;\n\t\t\t\tthis.size++;\n\t\t\t}\n\t\t}\n\t\tthis.heap[0] = this.size;\n\t}", "int incCapacity()\r\n\t{\r\n\t\tint i,j;\r\n\t\tfor (i=0; i<=state; ++i)\r\n\t\t\tfor (j=0; j<=symbol; ++j)\r\n\t\t\t\tg[i][j][state]=g[state][j][i]=false;\r\n\t\treturn (state++);\r\n\t}", "@Override\r\n\tpublic int operar() {\n\t\treturn 0;\r\n\t}", "public int emptyPit() {\r\n\t\t\r\n\t\tint temp = stones;\r\n\t\tstones = 0;\r\n\t\treturn temp;\r\n\t\t\r\n\t}", "private int move(int position) {\n\t\tremoveQueue(queues[position]);\n\t\tint angriness = queues[position].queue.poll();\n\t\tallQueues.add(queues[position]);\n\t\tif (queues[position].queue.size() > 0) {\n\t\t\tallHeads.add(queues[position]);\n\t\t}\n\t\treturn insert(angriness);\n\t}", "@Test\n\tpublic void moveToOccupiedSpace() throws Exception {\n\t\tKing obstruction1 = new King(PieceColor.WHITE, 1, 5);\n\t\tKing obstruction2 = new King(PieceColor.BLACK, 5, 1);\n\t\tRook obstruction3 = new Rook(PieceColor.WHITE, 1, 1);\n\t\tQueen obstruction4 = new Queen(PieceColor.BLACK, 6, 5);\n\t\tgame.board.addPiece(obstruction1);\n\t\tgame.board.addPiece(obstruction2);\n\t\tgame.board.addPiece(obstruction3);\n\t\tgame.board.addPiece(obstruction4);\n\t\t\n\t\tgame.board.movePiece(knightCorner1White, 1, 5);\n\t\tgame.board.movePiece(knightCorner2Black, 5, 1);\n\t\tgame.board.movePiece(knightSide1White, 1, 1);\n\t\tgame.board.movePiece(knightSide2Black, 6, 5);\n\t\tassertEquals(knightCorner1White, game.board.getPiece(0, 7));\n\t\tassertEquals(knightCorner2Black, game.board.getPiece(7, 0));\n\t\tassertEquals(knightSide1White, game.board.getPiece(3, 0));\n\t\tassertEquals(knightSide2Black, game.board.getPiece(7, 3));\n\t}", "public static void nomovecheck(){\n\t\tnomovecount=0;\n\t\tboardcheck(\"x\");\n\t\tboardcheck(\"o\");\n\t}", "void setEmpty() {\n this.lo = 1;\n this.hi = 0;\n }", "public boolean moveToFirst() {\r\n\t\t\tpointer = 0;\r\n\t\t\treturn !pointerOut();\r\n\t\t}", "public int move(int num) {\n\t\treturn 0;\n\n\t}", "Object NullMove ();", "public void InvalidMove();", "boolean prepareToMove();", "@Override\r\n\tpublic void moveLeft() {\n\t\tswitch(state) {\r\n\t\tcase 0: case 2:\r\n\t\t\t{\r\n\t\t\t\tboolean ok = true;\r\n\t\t\t\tfor(Case c: cases) {\r\n\t\t\t\t\tif(!grille.isEmpty(c.getX()+x-1, c.getY()+y))\r\n\t\t\t\t\t\tok = false;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(ok)\r\n\t\t\t\t\t--x;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\tcase 1:\r\n\t\t{\r\n\t\t\tint x3 = cases.get(3).getX()-1, y3 = cases.get(3).getY();\r\n\t\t\tif(grille.isEmpty(x+x3, y+y3))\r\n\t\t\t\t--x;\r\n\t\t\t\r\n\t\t}\r\n\t\tbreak;\r\n\t\t\r\n\t\tcase 3:\r\n\t\t{\r\n\t\t\tint x0 = cases.get(0).getX()-1, y0 = cases.get(0).getY();\r\n\t\t\tif(grille.isEmpty(x+x0, y+y0))\r\n\t\t\t\t--x;\r\n\t\t}\r\n\t\tbreak;\r\n\t\t\r\n\t\tdefault : \r\n\t\t\treturn;\r\n\t\t}\r\n\t}", "private void nextPiece() {\n if (_c == M && _r <= M) {\n _c = 1;\n _r++;\n } else if (_r > M) {\n _move = null;\n } else {\n _c++;\n }\n }", "@Override\r\n\tpublic int hanoi(int n) {\n\t\treturn 0;\r\n\t}", "@Override\n public void move() {\n _location.x++;\n }", "private Board moveTo(int direction) {\n Board newBoard = new Board(this.state);\n int oZ = this.zero;\n int nZ = oZ;\n switch (direction) {\n case Board.LEFT: nZ = oZ - 1; break;\n case Board.RIGHT: nZ = oZ + 1; break;\n case Board.UP: nZ = oZ - Board.dim; break;\n case Board.DOWN: nZ = oZ + Board.dim; break;\n default: return null;\n }\n newBoard.state[oZ] = state[nZ];\n newBoard.state[nZ] = 0;\n newBoard.zero = nZ;\n\n // update heuristic iteratively except for MAN\n switch(Board.heuristic) {\n case HAM:\n if (state[nZ] == oZ) newBoard.dist = this.dist - 1;\n else if (state[nZ] == nZ) newBoard.dist = this.dist + 1;\n else newBoard.dist = this.dist;\n break;\n case INT: // iterative update the interference\n // this is the most logically complicated code I have\n // done in a while\n int moved = state[nZ];\n int oC;\n newBoard.inter = inter;\n switch (direction) {\n case Board.LEFT:\n case Board.RIGHT: // LEFT AND RIGHT\n if (Board.colOf[state[nZ]] == Board.colOf[nZ]) {\n // we've replaced a piece on its col with a zero\n // interference can only decrease since we know\n // the piece didn't belong to its old column\n //System.out.println(\"Took \" + state[nZ] + \" out of its col\");\n for (int i = Board.colOf[nZ]; i < nZ; i+=Board.dim)\n if (Board.colOf[state[i]] == Board.colOf[nZ] &&\n state[i] > state[nZ])\n newBoard.inter--;\n for (int i = nZ + Board.dim; i < state.length; i+=Board.dim)\n if (Board.colOf[state[i]] == Board.colOf[nZ] &&\n state[i] < state[nZ])\n newBoard.inter--;\n \n } else if (Board.colOf[state[nZ]] == Board.colOf[oZ]) {\n // we've put a piece on its col that was a zero\n // interference can only increase since we know\n // the piece didn't below to its old column\n //System.out.println(\"Put \" + state[nZ] + \" into its col\");\n for (int i = Board.colOf[oZ]; i < oZ; i+=Board.dim)\n if (Board.colOf[state[i]] == Board.colOf[oZ] &&\n state[i] > state[nZ])\n newBoard.inter++;\n for (int i = oZ + Board.dim; i < state.length; i+=Board.dim)\n if (Board.colOf[state[i]] == Board.colOf[oZ] &&\n state[i] < state[nZ])\n newBoard.inter++;\n }\n break;\n default: // UP AND DOWN\n if (Board.rowOf[state[nZ]] == Board.rowOf[nZ]) {\n // we've replaced a piece on its row with a zero\n // interference can only decrease since we know\n // the piece didn't belong to its old row\n //System.out.println(\"Took \" + state[nZ] + \" out of its row\");\n for (int i = Board.dim*Board.rowOf[nZ]; i < nZ; i++)\n if (Board.rowOf[state[i]] == Board.rowOf[nZ] &&\n state[i] > state[nZ])\n newBoard.inter--;\n for (int i = nZ+1; i < Board.dim*(Board.rowOf[nZ]+1); i++)\n if (Board.rowOf[state[i]] == Board.rowOf[nZ] &&\n state[i] < state[nZ])\n newBoard.inter--;\n } else if (Board.rowOf[state[nZ]] == Board.rowOf[oZ]) {\n // we've put a piece on its row that was a zero\n // interference can only increase since we know\n // the piece didn't belong to its old row\n //System.out.println(\"Put \" + state[nZ] + \" into its row\");\n for (int i = Board.dim*Board.rowOf[oZ]; i < oZ; i++)\n if (Board.rowOf[state[i]] == Board.rowOf[oZ] &&\n state[i] > state[nZ])\n newBoard.inter++;\n for (int i = oZ+1; i < Board.dim*(Board.rowOf[oZ]+1); i++)\n if (Board.rowOf[state[i]] == Board.rowOf[oZ] &&\n state[i] < state[nZ])\n newBoard.inter++;\n }\n } \n default: // update the manhattan distance\n newBoard.dist = this.dist - \n Board.manhattanTable[state[nZ]][nZ] +\n Board.manhattanTable[state[nZ]][oZ];\n }\n return newBoard;\n }", "public void move() {\n\t\tx+= -1;\n\t\tif (x < 0) {\n\t\t\tx = (processing.width - 1);\n\t\t}\n\t\ty+= 1;\n\t\tif (y > processing.height-1)\n\t\t\ty=0;\n\t}", "void check(){\n if(!data.up.isEmpty()){\r\n if(data.floor == data.up.get(0)){\r\n data.up.remove(0);\r\n data.state = 0;\r\n data.statePrv = 1;\r\n data.isMoving = false;\r\n }\r\n }\r\n if(!data.down.isEmpty()){\r\n if(data.floor == data.down.get(0)){\r\n data.down.remove(0);\r\n data.state = 0;\r\n data.statePrv = -1;\r\n data.isMoving = false;\r\n }\r\n }\r\n }", "public void checkBlankSpace() {\n\t\tif (xOffset < 0) {\n\t\t\txOffset = 0;\n\t\t} else if (xOffset > handler.getWorld().getWidth() * Tile.TILEWIDTH - handler.getWidth()) {\n\t\t\txOffset = handler.getWorld().getWidth() * Tile.TILEWIDTH - handler.getWidth();\n\t\t}\n\t\t\n\t\tif (yOffset < 0) {\n\t\t\tyOffset = 0;\n\t\t} else if (yOffset > handler.getWorld().getHeight() * Tile.TILEHEIGHT - handler.getHeight()) {\n\t\t\tyOffset = handler.getWorld().getHeight() * Tile.TILEWIDTH - handler.getHeight();\n\t\t}\n\t}", "private int Rand_Move() {\n\t\tRandom r = new Random();\n\t\tint move = NO_MOVE;\n\t\tdo{\n\t\t\tmove = r.nextInt(9);\n\t\t}while(square_empty[move] == false);\n\t\treturn move;\n\t}", "public boolean move(Case from, Case to)\n {\n if (to.getValue() == 0 && from.getValue() != 0)\n {\n to.setValue(to.getValue()+from.getValue());\n from.setValue(0);\n return true;\n }\n return false;\n }", "private void actionPhase() {\n field.generateRandomFood( 100 );\n List<Blob> k = new ArrayList<>( this );\n Iterator<Blob> kIter;\n Blob currentBlob;\n\n while (!k.isEmpty()) {\n for (kIter = k.iterator(); kIter.hasNext(); ) {\n currentBlob = kIter.next();\n if ( currentBlob.getEnergy() > 0 && !currentBlob.isAtHome() ) {\n currentBlob.move();\n } else {\n kIter.remove();\n }\n }\n }\n }", "private boolean isThereValidMove() {\n\t\treturn true;\n\t}", "public void resetMoveCount() {\r\n\t\tmoveCount = 0;\r\n\t}", "@Override\n public boolean move() {\n return this.decrementX();\n }", "private State swapEmptyCell(Direct direct, State state) {\n State newState = state.clone();\n Index emptyCellIndex = newState.getBoardModel().getEmptyCellIndex();\n Integer[][] boardRepresentation = newState.getBoardModel().getBoardRepresentation();\n Index oldEmptyCellIndex = emptyCellIndex.clone();\n recalculateEmptyCellIndex(direct, newState);\n boardRepresentation[oldEmptyCellIndex.getCol()][oldEmptyCellIndex.getRow()] = boardRepresentation[emptyCellIndex.getCol()][emptyCellIndex.getRow()];\n boardRepresentation[emptyCellIndex.getCol()][emptyCellIndex.getRow()] = 0;\n return newState;\n }", "public void makeEmpty();", "public void makeEmpty();", "private void moveRemainingMhos() {\n\t\t\n\t\t//Iterate through every mho's X and Y values\n\t\tfor(int i = 0; i < mhoLocations.size()/2; i++) {\n\t\t\t\n\t\t\t//Assign mhoX and mhoY to the X and Y values of the mho that is currently being tested\n\t\t\tint mhoX = mhoLocations.get(i*2);\n\t\t\tint mhoY = mhoLocations.get(i*2+1);\n\t\t\t\n\t\t\t//Check if there is a fence 1 block away from the mho\n\t\t\tif(newMap[mhoX][mhoY+1] instanceof Fence || newMap[mhoX][mhoY-1] instanceof Fence || newMap[mhoX-1][mhoY] instanceof Fence || newMap[mhoX-1][mhoY+1] instanceof Fence || newMap[mhoX-1][mhoY-1] instanceof Fence || newMap[mhoX+1][mhoY] instanceof Fence || newMap[mhoX+1][mhoY+1] instanceof Fence || newMap[mhoX+1][mhoY-1] instanceof Fence) {\n\t\t\t\t\n\t\t\t\t//Assign the new map location as a Mho\n\t\t\t\tnewMap[mhoX][mhoY] = new BlankSpace(mhoX, mhoY, board);\n\t\t\t\t\n\t\t\t\t//Set the mho's move in the moveList\n\t\t\t\tmoveList[mhoX][mhoY] = Legend.SHRINK;\n\t\t\t\t\n\t\t\t\t//remove each X and Y from mhoLocations\n\t\t\t\tmhoLocations.remove(i*2+1);\n\t\t\t\tmhoLocations.remove(i*2);\n\t\t\t\t\n\t\t\t\t//Call moveRemainingMhos again, because the list failed to be checked through completely\n\t\t\t\tmoveRemainingMhos();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}", "public void makeMove() {\n\t\tif (CheckForVictory(this)) {\n\t\t\t// System.out.println(\"VICTORY\");\n\t\t\tInterface.goalReached = true;\n\t\t\tfor (int i = 0; i < tmpStrings.length; i++) {\n\t\t\t\tif (moveOrder[i] == 0)\n\t\t\t\t\ttmpStrings[i] = \"turn left\";\n\t\t\t\telse if (moveOrder[i] == 1)\n\t\t\t\t\ttmpStrings[i] = \"turn right\";\n\t\t\t\telse\n\t\t\t\t\ttmpStrings[i] = \"go forward\";\n\n\t\t\t\tInterface.info.setText(\"Generation: \" + Parallel.generationNo + 1 + \" and closest distance to goal: \" + 0);\n\t\t\t}\n\t\t} else {\n\t\t\tmoveOrder[this.movesMade] = moves.remove();\n\t\t\tswitch (moveOrder[this.movesMade]) {\n\t\t\tcase (0):\n\t\t\t\tthis.movesMade++;\n\t\t\t\tif (face == 0)\n\t\t\t\t\tface = 3;\n\t\t\t\telse\n\t\t\t\t\tface--;\n\t\t\t\tbreak;\n\t\t\tcase (1):\n\t\t\t\tthis.movesMade++;\n\t\t\t\tif (face == 3)\n\t\t\t\t\tface = 0;\n\t\t\t\telse\n\t\t\t\t\tface++;\n\t\t\t\tbreak;\n\t\t\tcase (2):\n\t\t\t\tthis.movesMade++;\n\t\t\t\tif (face == 0 && Y - 1 >= 0)\n\t\t\t\t\tY--;\n\t\t\t\telse if (face == 1 && X + 1 <= map[0].length - 1)\n\t\t\t\t\tX++;\n\t\t\t\telse if (face == 2 && Y + 1 <= map.length - 1)\n\t\t\t\t\tY++;\n\t\t\t\telse if (face == 3 && X - 1 >= 0)\n\t\t\t\t\tX--;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tSystem.out.println(\"Error making move :(\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "int move(int pileSize) ;", "public boolean move(final Direction direction) {\n\n if (analyser.canMove(this.matrix, this.emptyTileIndex, direction)) {\n\n this.matrix = analyser.move(this.matrix, this.emptyTileIndex, direction);\n this.emptyTileIndex += direction.getIndexMod();\n\n return true;\n\n }\n\n return false;\n }", "public void moveZeroes(int[] nums) {\n int current = 0, last = 0;\n int temp = 0;\n while(current < nums.length){\n if(nums[current] != 0){\n if(nums[last] != 0){\n last++;\n }\n else{\n if(current != last){\n nums[last] = nums[current];\n nums[current] = 0;\n last++;\n }\n }\n }\n current++;\n }\n}", "@Test\r\n public void callingMovePossibleOnTakingAPieceWhenYouAlreadyHaveAZeroShouldReturnFalse() {\n player1.movePiece(12, 11, board);\r\n\r\n // moving piece to zero\r\n player2.movePiece(13, 25, board);\r\n // give 2 move\r\n player2.movesLeft.moves.add(2);\r\n\r\n // Then\r\n assertFalse(player2.isMovePossible(13, 11, board));\r\n }", "private void makeMove(int n) {\n int rowIndex = partialSol[n];\n List<Integer> row = sparseInput.get(rowIndex);\n for (int i = 0; i < row.size(); i++) {\n if (includedElements[row.get(i)] == 0) {\n includedCount++;\n boolIncluded[row.get(i)] = true;\n }\n includedElements[row.get(i)]++;\n }\n }", "public abstract void makeEmpty();", "public boolean isEmpty()\r\n { return N == 0; }", "void doMove() {\n\t\t// we saved the moves in a queue to avoid recursing.\n\t\tint[] move;\n\t\twhile(!moveQueue.isEmpty()) {\n\t\t\tmove = moveQueue.remove(); \n\t\t\tif (board[move[0]][move[1]] == 0) {\n\t\t\t\tinsertNumber(move[0], move[1], move[2]);\n\t\t\t}\n\t\t}\n\t\tgoOverLines();\n\t}", "private int goalEntry1d(int ind) {\n if (ind == L - 1) return 0;\n else return ind + 1;\n }", "public int getTakeSpace() {\n return 0;\n }", "public void incrementMoves()\n {\n moves ++;\n }", "public boolean leftDistributive( Operator op){\n\t return false;\n }", "@Test\n void RookMoveOutOfBound() {\n Board board = new Board(8, 8);\n Piece rook = new Rook(board, 1, 5, 1);\n board.getBoard()[1][5] = rook;\n board.movePiece(rook, -1, 5);\n }", "@Override\n public int compareTo(Space o) {\n if(_square < o.getSquare())return -1;\n if(_square > o.getSquare())return 1;\n return 0;\n }", "public void moveFirst() {\n\t\tcurrentElement = 0;\n\t}", "private static int runStateOf(int c) { return c & ~CAPACITY; }", "private boolean legalMove() {\n\n\t\t// empty landing spot\n\t\tif (tilePath.size() == 0) {\n\t\t\tdebug(\"illegal, empty landing spot\");\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!mBoard.tileIsEmpty(tilePath.get(tilePath.size() - 1))) {\n\t\t\tdebug(\"illegal, tile not empty\");\n\t\t\treturn false;\n\t\t}\n\n\t\t// start doesn't equal end\n\t\tif (tilePath.get(0).equals(tilePath.get(tilePath.size() - 1))) {\n\t\t\tdebug(\"illegal, start doesn't equal end\");\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "public boolean isEmpty(){\n return myHeap.getLength() == 0;\n }", "public void clear() {\n\t\tn1 = n0 = 0L;\n\t}", "public void AIMakeMove() {\n\t\t\n\t\tRandom randomizer = new Random();\n\t\tint index = randomizer.nextInt(AIPossibleMoves.size());\n\t\tMove move = AIPossibleMoves.get(index);\n\t\tChecker checker = model.findChecker(move.getxOrigin(), move.getyOrigin());\n\t\tint xChange = (move.getxOrigin() - move.getxMove());\n\t\tint yChange = (move.getyOrigin() - move.getyMove());\n\t\t\n\t\tint xMoveNew = 0;\n\t\tint yMoveNew = 0;\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tif(board.getBoard()[move.getyMove()][move.getxMove()] == 0) {\n\t\t\t//do nothing\n\t\t} else {\n\t\t\t//moving down\n\t\t\tif(yChange < 0) {\n\t\t\t\t//moving right\n\t\t\t\tif(xChange < 0) {\n\t\t\t\t\tremoveTakenPiece(move.getxMove(), move.getyMove());\n\t\t\t\t\txMoveNew = move.getxMove() + 1;\n\t\t\t\t\tyMoveNew = move.getyMove() + 1;\n\t\t\t\t\tmove.setxMove(xMoveNew);\n\t\t\t\t\tmove.setyMove(yMoveNew);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t\t//moving left\n\t\t\t\t\t\n\t\t\t\t\tremoveTakenPiece(move.getxMove(), move.getyMove());\n\t\t\t\t\txMoveNew = move.getxMove() - 1;\n\t\t\t\t\tyMoveNew = move.getyMove() + 1;\n\t\t\t\t\tmove.setxMove(xMoveNew);\n\t\t\t\t\tmove.setyMove(yMoveNew);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t//moving up\n\t\t\t\tif(xChange < 0) {\n\t\t\t\t\t//moving right\n\t\t\t\t\tremoveTakenPiece(move.getxMove(), move.getyMove());\n\t\t\t\t\txMoveNew = move.getxMove() + 1;\n\t\t\t\t\tyMoveNew = move.getyMove() - 1;\n\t\t\t\t\tmove.setxMove(xMoveNew);\n\t\t\t\t\tmove.setyMove(yMoveNew);\n\t\t\t\t} else {\n\t\t\t\t\t//moving left \n\t\t\t\t\tremoveTakenPiece(move.getxMove(), move.getyMove());\n\t\t\t\t\txMoveNew = move.getxMove() - 1;\n\t\t\t\t\tyMoveNew = move.getyMove() - 1;\n\t\t\t\t\tmove.setxMove(xMoveNew);\n\t\t\t\t\tmove.setyMove(yMoveNew);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t//System.out.println(\"New Move is: \" + xMoveNew + \",\" + yMoveNew);\n\t\tif(canBeKing(checker, move)) {\n\t\t\tchecker = convertToKing(checker, move);\n\t\t\tmodel.updateChecker(move, checker, 2);\n\t\t\t\n\t\t\tprintBoard();\n\t\t\tmodel.moves.add(move);\n\t\t\treturn;\n\t\t}\n\t\tmodel.updateChecker(move, checker, 2);\n\t//\tSystem.out.println(\"AI - DEBUGGING\");\n\t//\tSystem.out.println(\"Origin Piece: \" + move.getxOrigin() + \",\" + move.getyOrigin());\n\t//\tSystem.out.println(\"Move Position: \" + move.getxMove() + \",\" + move.getyMove());\n\t\tupdateBoard(move);\n\t\tmodel.moves.add(move);\n\t\tprintBoard();\n\t\t\n\t}", "private ArrayList<Move> whiteKing(){\n // obtain current co-ordinates\n int x = this.getX();\n int y = this.getY();\n\n // otherwise create a new vector to store legal whiteMoves\n ArrayList<Move> whiteMoves = new ArrayList<Move>();\n\n // set up m to refer to a Move object\n Move theMove = null;\n\n // first legal move is to go from x,y to x,y+1\n if (validNormalMove(x, y + 1)) {\n theMove = new Move(this, x, y, x, y + 1, false);\n if(takeOverCheck(x, y+1)){\n theMove.setOccupied(true);\n }\n whiteMoves.add(theMove);\n }\n\n\n // legal move is to go from x,y to x,y-1 if x,y-1 is unoccupied (bottom)\n if (validNormalMove(x, y - 1)) {\n theMove = new Move(this, x, y, x, y - 1, false);\n if(takeOverCheck(x, y-1)){\n theMove.setOccupied(true);\n }\n whiteMoves.add(theMove);\n }\n\n //left\n // legal move to go left from x,y to x-1, y if x-1,y is unoccupied (left)\n\n if (validNormalMove(x-1, y)) {\n theMove = new Move(this, x, y, x-1, y, false);\n if(takeOverCheck(x-1, y)){\n theMove.setOccupied(true);\n }\n whiteMoves.add(theMove);\n }\n\n //right\n // legal move to go right from x,y to x+1, y if x+1,y is unoccupied (right)\n\n if (validNormalMove(x+1, y)) {\n theMove = new Move(this, x, y, x+1, y, false);\n\n if(takeOverCheck(x+1, y)){\n theMove.setOccupied(true);\n }\n whiteMoves.add(theMove);\n }\n\n\n\n // legal move to diagonal top right for white king\n if (validNormalMove(x+1, y + 1)) {\n theMove = new Move(this, x, y, x+1, y + 1, false);\n if(takeOverCheck(x+1, y+1)){\n theMove.setOccupied(true);\n }\n whiteMoves.add(theMove);\n }\n\n // legal move to diagonal bottom right\n\n if (validNormalMove(x+1, y -1)) {\n theMove = new Move(this, x, y, x+1, y - 1, false);\n if(takeOverCheck(x+1, y-1)){\n theMove.setOccupied(true);\n }\n whiteMoves.add(theMove);\n }\n\n // legal move to diagonal bottom left\n if (validNormalMove(x-1, y -1)) {\n theMove = new Move(this, x, y, x-1, y - 1, false);\n if(takeOverCheck(x-1, y-1)){\n theMove.setOccupied(true);\n }\n whiteMoves.add(theMove);\n }\n\n // legal move to diagonal top left\n if (validNormalMove(x-1, y+1)) {\n theMove = new Move(this, x, y, x-1, y + 1, false);\n if(takeOverCheck(x-1, y+1)){\n theMove.setOccupied(true);\n }\n whiteMoves.add(theMove);\n }\n\n\n\n if (whiteMoves.isEmpty())\n return null;\n return whiteMoves;\n }", "private boolean hasPossibleMove()\n {\n for(int i=0; i<FieldSize; ++i)\n {\n for(int j=1; j<FieldSize; ++j)\n {\n if(field[i][j] == field[i][j-1])\n return true;\n }\n }\n for(int j=0; j<FieldSize; ++j)\n {\n for(int i=1; i<FieldSize; ++i)\n {\n if(field[i][j] == field[i-1][j])\n return true;\n }\n }\n return false;\n }", "public void resetMove() {\n pointer = 0;\n }", "public boolean moveFirst(\n )\n {moveStart(); return moveNext();}", "private boolean isOpenSpace(int posX, int posY) {\r\n return Game.getGameBoard()[posX][posY] == Constants.EMPTY;\r\n }", "void undo() {\r\n if (_moveCount > 0) {\r\n undoPosition();\r\n }\r\n }", "public void paradiseMove(){\n if (!getCurrentMainCellCoordinates().equals(new DiscreteCoordinates(11, 9))) {\n move(30);\n }\n }", "private String easyMove() {\n int randomHole = evaluate();\n while (!isValidMove(randomHole)) {\n randomHole = evaluate();\n }\n\n return super.makeAMove(randomHole);\n }", "public boolean moveOn() {\n\t\t\n\t}", "@Test\n\tpublic void testIfForbriddenSelfKillAdvanced(){\n\t\tboard.commitMove(new Point(2,1), 1);\n\t\tboard.commitMove(new Point(3,1), 1);\n\t\tboard.commitMove(new Point(4,2), 1);\n\t\tboard.commitMove(new Point(3,3), 1);\n\t\tboard.commitMove(new Point(3,4), 1);\n\t\tboard.commitMove(new Point(2,5), 1);\n\t\tboard.commitMove(new Point(1,4), 1);\n\t\tboard.commitMove(new Point(1,3), 1);\n\t\tboard.commitMove(new Point(1,2), 1);\n\t\t\n\t\tboard.commitMove(new Point(2,4), 0);\n\t\tboard.commitMove(new Point(2,3), 0);\n\t\tassertEquals(0, board.commitMove(new Point(2,2), 0));\n\t\tassertNotEquals(0,board.commitMove(new Point(3,2), 0));\n//\t\tboard.printBoard();\n\t}", "public void moveLeft() {\r\n\t\tif (x > 0) x--; \r\n\t}", "public boolean addMove(Table table) {\r\n\t\tif (table.getMovingNum() == 0) {\r\n\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public void move(){\n\t\t\n\t}", "private boolean isEmpty(Point pos){\r\n Cells aux = model.getValueAt(pos);\r\n return (aux == Cells.BLACK_FLOOR);\r\n }", "private static boolean move(int k) {\n\t\tSystem.out.println(sn.arr.size());\n\t\tint nr = sn.arr.getLast().r + dx[k];\n\t\tint nc = sn.arr.getLast().c + dy[k];\n\t\tif(nr<0||nr>=map.length||nc<0||nc>=map.length)\n\t\t\treturn false;\n\t\t\n\t\tif (map[nr][nc] == 1) {\n\t\t\tappleCnt--;\n\t\t\tsn.arr.add(new node(nr, nc));\n\t\t\tsn.size++;\n\t\t\tmap[nr][nc] = 2;\n\t\t} else if (map[nr][nc] == 0) {\n\t\t\tsn.arr.add(new node(nr, nc));\n\t\t\tmap[nr][nc]=2;\n\t\t\tmap[sn.arr.getFirst().r][sn.arr.getFirst().c] = 0;\n\t\t\tsn.arr.removeFirst();\n\t\t\t\n\t\t}else {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "boolean makeMove();", "private static boolean toAllocateOrDeallocate() {\n return random.nextInt() % 2 == 0;\n\n }", "boolean isUnblockedMove(Square from, Square to) {\r\n int dir = from.direction(to);\r\n SqList rook = ROOK_SQUARES[from.index()][dir];\r\n int indexTo = rook.indexOf(to);\r\n for (int i = indexTo; i >= 0; i--) {\r\n if (map.get(rook.get(i)) != EMPTY) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }", "public boolean empty() \n { \n\treturn(top==-1);\n \n }", "private void shift(){\n if (queue.length < 1){\n throw new Error(\"Table self destruction!\");\n }\n if (size <= 0){\n return;\n }\n\n if (queue[0] == null){\n E best = null;\n int bestAT = -1;\n for (int x = 0 ; x < queue.length; x++){\n E cur = (E)queue[x];\n if (cur == null){\n continue;\n }\n if (best == null || cur.compareTo(best) > 0){\n best = cur;\n bestAT = x;\n }\n }\n // Not put best at front;\n queue[bestAT] = null;\n queue[0] = best;\n }\n\n }", "public boolean isFull() {\n return size == k;\n}", "public void moveZeroes(int[] nums) {\n\n if (nums == null || nums.length == 0 || nums.length == 1) {\n return;\n }\n\n int pos = 0;\n\n int i = 0;\n while (i < nums.length) {\n if (nums[i] != 0) {\n nums[pos] = nums[i];\n if (pos != i) {\n nums[i] = 0;\n }\n pos++;\n }\n i++;\n }\n\n\n }", "public void moveZeroes2(int[] nums) {\n int zeroCount = 0;\n int lastZeroIndex = 0;\n for(int i = 0; i < nums.length; i++) {\n if( nums[i] != 0 && zeroCount > 0) {\n nums[lastZeroIndex++] = nums[i];\n nums[i] = 0; //lazy swap, just making it 0\n zeroCount--;\n }\n if( nums[i] == 0 ) {\n if(zeroCount == 0)\n lastZeroIndex = i;\n zeroCount++;\n }\n }\n }", "@Override\n\tpublic boolean hasMoved() {\n\t\treturn false;\n\t}", "@Test\n\tpublic void testIfKingIsCaptureBySpecialSquareHoriz()\n\t{\n\t\tData d=new Data();\n\t\td.set(0,10);\n\t\td.set(17,9);\n\t\tArrayList<Coordinate> test_arr=d.pieceLost(9);\n\t\tassertEquals(test_arr.size(),0);\n\t}", "private int movesLeft() {\n\t\treturn movesLeft.size() - 1; // don't count quit\n\t}", "public boolean moveLEFT() {\r\n\t\tint i,j,k;\r\n\t\tboolean flag = false;\r\n\t\t\r\n\t\tfor(i = (rows_size-1) ; i >= 0 ; i--) {\r\n\t\t\tfor( j = 0; j < columns_size; j++) {\r\n\t\t\t\tif( !isEmpty(i,j) ) {\r\n\t\t\t\t\tfor(k = j; k >= 0 && isEmpty(i,k-1); k--);\r\n\t\t\t\t\t\tif(k == 0) {\t\r\n\t\t\t\t\t\t\tif( k != j) {\r\n\t\t\t\t\t\t\tgame[i][k] = new Cell2048(game[i][j]);\r\n\t\t\t\t\t\t\tgame[i][j].setValue(0);\r\n\t\t\t\t\t\t\tflag = true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tif(game[i][j].isEqual(game[i][k-1]) && game[i][k-1].getFlag() == false) {\r\n\t\t\t\t\t\t\t\tgame[i][k-1].setValue(game[i][k-1].getValue()*2);\r\n\t\t\t\t\t\t\t\tgame[i][k-1].setFlag(true);\r\n\t\t\t\t\t\t\t\tgame[i][j].setValue(0);\r\n\t\t\t\t\t\t\t\tscore += game[i][k-1].getValue();\r\n\t\t\t\t\t\t\t\t--takenCells;\r\n\t\t\t\t\t\t\t\t++freeCells;\r\n\t\t\t\t\t\t\t\tflag = true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\tif( k != j) {\r\n\t\t\t\t\t\t\t\tgame[i][k] = new Cell2048(game[i][j]);\r\n\t\t\t\t\t\t\t\tgame[i][j].setValue(0);\r\n\t\t\t\t\t\t\t\tflag = true;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t}\t\t\r\n\t}\r\n\tFalseFlag();\t\r\n\treturn flag;\r\n\t}", "@Test\n\tpublic void testMoveZeroes() {\n\t\tAssert.assertEquals(Arrays.toString(Problem_02.moveZeroes(new int[]{1, 0, 0, 3, 5, 0})), \"[1, 3, 5, 0, 0, 0]\");\n\t\tAssert.assertEquals(Arrays.toString(Problem_02.moveZeroes(new int[]{0, 0, 0})), \"[0, 0, 0]\");\n\t\tAssert.assertEquals(Arrays.toString(Problem_02.moveZeroes(new int[]{1, 2, 3})), \"[1, 2, 3]\");\n\t}", "public static int[] exe1(int[] arr){ // Solution O(n) in time and constant in Memory\n int nzeros=0;\n\n for (int i=0; i<arr.length; i++) {\n arr[i-nzeros] = arr[i];\n if (arr[i] == 0) {\n nzeros++;\n }\n }\n for (int i=arr.length-1; i>arr.length-nzeros-1; i--) {\n arr[i] = 0;\n }\n\n return arr;\n }", "void move() {\r\n\t\tif (x + xa < 0){\r\n\t\t\txa = mov;\r\n\t\t\tgame.puntuacion++;\r\n\t\t}\r\n\t\telse if (x + xa > game.getWidth() - diameter){\r\n\t\t\txa = -mov;\r\n\t\t\tgame.puntuacion++;\r\n\t\t}\r\n\t\tif (y + ya < 0){\r\n\t\t\tya = mov;\r\n\t\t\tgame.puntuacion++;\r\n\t\t}\r\n\t\telse if (y + ya > game.getHeight() - diameter){\r\n\t\t\tgame.gameOver();\r\n\t\t\tgame.puntuacion++;\r\n\t\t}\r\n\t\tif (colisionPalas()){\r\n\t\t\tya = -mov;\r\n\t\t}\r\n\t\telse if(colisionEstorbos()){\r\n\t\t\tgame.puntuacion+=2;\r\n\t\t}\r\n\t\t\r\n\t\tx = x + xa;\r\n\t\ty = y + ya;\r\n\t}", "public boolean isEmpty() {//check if empty\n return N == 0;\n }", "public Builder clearMove1() {\n \n move1_ = 0;\n onChanged();\n return this;\n }", "public State hillClimbing(){\r\n\t\tState currentState = start;\r\n\t\t\r\n\t\twhile(true){\r\n\t\t\tArrayList<State> successors = currentState.generateNeighbours(currentState);\r\n\t\t\tStatesGenerated= StatesGenerated + successors.size();\r\n\t\t\t\r\n\t\t\tState nextState = null;\r\n\t\t\t\r\n\t\t\tfor(int i=0; i<successors.size(); i++){\r\n\t\t\t\tif(successors.get(i).compareTo(currentState) < 0){\r\n\t\t\t\t\tnextState = successors.get(i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(nextState==null)\r\n\t\t\t\treturn currentState;\r\n\t\t\t\r\n\t\t\tcurrentState = nextState;\r\n\t\t}\r\n\t}", "public void moveZeroes(int[] nums) {\n if (nums == null || nums.length == 0) {\n return;\n }\n\n int point = 0;\n for (int i = 0; i < nums.length; i++) {\n if (nums[i] != 0) {\n nums[point++] = nums[i];\n }\n }\n\n while (point < nums.length) {\n nums[point++] = 0;\n }\n }", "public void move() {\n\r\n\t}", "public void moveZeroes(int[] nums) {\n for(int i=0; i<nums.length-1; i++) {\n if(nums[i] == 0) {\n int j=i+1;\n while(j < nums.length) {\n if(nums[j] != 0) {\n break;\n }\n j++;\n }\n //switch\n if(j < nums.length) {\n nums[i] = nums[j];\n nums[j] = 0;\n \n }\n }\n }\n }", "public void resetMove() {\n\t\tthis.moveMade = false;\n\t}", "private int addShift( int x ) { x += _nxx; int sz = H2O.CLOUD.size(); return x < sz ? x : x-sz; }", "public boolean legalMoveLeft(Dominos domino){\n if(this.isEmpty()){\n return true;\n }\n Dominos hold;\n hold = this.getFirst();\n if(domino.getRightSide() ==0|| domino.getLeftSide() == 0\n || hold.getLeftSide() == 0){\n return true;\n }\n\n if(domino.getRightSide() == hold.getLeftSide()\n || domino.getLeftSide() == hold.getLeftSide()){\n return true;\n }\n return false;\n }", "public boolean move();", "public void oneTurn(){\n Integer[] previousTurn = Arrays.copyOf(this.board, this.board.length);\n\n // itero su previousTurn per costruire il board successivo\n for (int i=0;i<previousTurn.length;i++){\n\n // mi salvo la situazione della casella sx, se i==0 prendo l'ultima\n int left = previousTurn[previousTurn.length-1];\n if (i!=0)\n left = previousTurn[i-1];\n\n // mi salvo la situazione della casella dx, se i==ultima prendo zero\n int right = previousTurn[0];\n if (i!=previousTurn.length-1)\n right = previousTurn[i+1];\n \n // se a sx e dx c'è 0, metto 0\n // caso fine sottopopolazione (010->000)\n if (left == 0 && right == 0){\n this.board[i] = 0;\n \n // se a sx e dx c'è 1, metto 1 se c'era 0 e viceversa\n // caso nascita (101->111) e fine sovrappopolazione (111->101)\n } else if (left == 1 && right == 1)\n if (this.board[i] == 1)\n this.board[i] = 0;\n else\n this.board[i] = 1;\n \n // tutte le altre casistiche, lascio invariata la situazione\n \n }\n\n this.turn += 1;\n }" ]
[ "0.6260748", "0.60440123", "0.60022765", "0.58971226", "0.5818304", "0.57217133", "0.5709798", "0.5704585", "0.5657202", "0.56566745", "0.56444323", "0.56042445", "0.5589277", "0.5579552", "0.55786693", "0.5563575", "0.55487764", "0.553039", "0.5527383", "0.5519527", "0.55140907", "0.5506395", "0.54895586", "0.5483324", "0.5477716", "0.5475627", "0.547021", "0.5469096", "0.54646075", "0.54531133", "0.54401696", "0.5432153", "0.5425303", "0.5417586", "0.5415965", "0.54002494", "0.53973526", "0.53973526", "0.53890777", "0.53863114", "0.53808534", "0.53734964", "0.5373096", "0.53625757", "0.5361622", "0.53477794", "0.5333385", "0.5329561", "0.53244513", "0.5322216", "0.5320292", "0.53184813", "0.5316773", "0.5314249", "0.5304213", "0.5300258", "0.5298933", "0.5298118", "0.529584", "0.528939", "0.5287366", "0.5287018", "0.5281109", "0.52791464", "0.52756", "0.52674866", "0.5265383", "0.52600074", "0.5256979", "0.52546686", "0.52500874", "0.52359635", "0.5230079", "0.5224276", "0.5213815", "0.5210389", "0.5207736", "0.5207065", "0.5206122", "0.52034974", "0.52026474", "0.5199048", "0.51925224", "0.51925", "0.5183677", "0.51787", "0.51778746", "0.5174359", "0.51743585", "0.51727635", "0.51722217", "0.51701987", "0.5168107", "0.51629037", "0.51623154", "0.5159475", "0.5158959", "0.5157121", "0.51558316", "0.5149864", "0.51489425" ]
0.0
-1
To use this class referencing, simple extend this class with your own and plugin your own values. NOTE: Class is mostly provided as a framework for this type of localized management.
protected LibReference() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void localizationChaneged();", "public interface LocalizationService {\n\n /**\n *\n * @param locale - the languge that we like to present\n * @return\n */\n Map<String, String> getAllLocalizationStrings(Locale locale);\n\n /**\n * @param prefix - show all strings which start with thr prefix\n * @param locale - the languge that we like to present\n * @return\n */\n// Map<String, String> getAllLocalizationStringsByPrefix(String prefix, Locale locale);\n\n\n /**\n * @param key - the specific key\n * @param locale - the language that we like to present\n * @return\n */\n String getLocalizationStringByKey(String key, Locale locale);\n\n /**\n * Get the default system locale\n * @return\n */\n Locale getDefaultLocale();\n\n /**\n * Get evidence name\n * @param evidence\n * @return\n */\n String getIndicatorName(Evidence evidence);\n\n\n String getAlertName(Alert alert);\n\n Map<String,Map<String, String>> getMessagesToAllLanguages();\n}", "String getLocalization();", "private LocalizationProvider() {\r\n\t\tthis.language = DEFAULT_LANGUAGE;\r\n\t\tthis.bundle = ResourceBundle.getBundle(\"hr.fer.zemris.java.hw11.jnotepadapp.local.languages\",\r\n\t\t\t\tLocale.forLanguageTag(language));\r\n\t}", "public interface I18nConstants {\n // Common\n String userName();\n\n String email();\n\n String confirmEmail();\n\n String password();\n\n String confirmPassword();\n\n String skip();\n\n String close();\n\n String tooltipCloseDialog();\n\n String tooltipMinimize();\n\n String tooltipMaximize();\n\n String highScore();\n\n String limitation();\n\n String houseSpace();\n\n String noMoney();\n\n String notEnoughMoney();\n\n String tooManyItems();\n\n String spaceLimitExceeded();\n\n String unregisteredUser();\n\n String unnamedUser();\n\n String yes();\n\n String no();\n\n String newBase();\n\n String startOver();\n\n String stop();\n\n String mission();\n\n String refresh();\n\n String player();\n\n String planet();\n\n String filter();\n\n String activate();\n\n String cancel();\n\n String start();\n\n String description();\n\n String abort();\n\n String date();\n\n String time();\n\n String event();\n\n String save();\n\n String dismiss();\n\n String nameToShort();\n\n String nameAlreadyUsed();\n\n String unknownErrorReceived();\n\n String name();\n\n String send();\n\n String noSuchUser(String userName);\n\n String change();\n\n String message();\n\n String featureNextRelease();\n\n String featureComingSoon();\n\n String loading();\n\n String serverError();\n\n String connectWithFacebook();\n\n String availableCrystals(String text);\n\n // Login logout\n String login();\n\n String loginFailed();\n\n String loginFailedText();\n\n String loginFailedNotVerifiedText();\n\n String logout();\n\n String logoutQuestion();\n\n String logoutTextFacebook(String name);\n\n String tooltipNotRegistered();\n\n String tooltipNotVerified(String userName);\n\n String tooltipLoggedIn(String userName);\n\n String forgotPassword();\n\n // Radar\n String tooltipRadar();\n\n String tooltipZoomIn();\n\n String tooltipZoomOut();\n\n String tooltipZoomHome();\n\n String tooltipZoomAttack();\n\n String tooltipRadarPageLeft();\n\n String tooltipRadarPageRight();\n\n String tooltipRadarPageUp();\n\n String tooltipRadarPageDown();\n\n String radarNoPower();\n\n String radarNoRadarBuilding();\n\n // Dialogs\n String messageDialog();\n\n String inventory();\n\n String inventoryNotAvailableMission();\n\n String inventoryNotAvailableBase();\n\n String startTutorialFinished();\n\n String questPassed();\n\n String boxPicked();\n\n // Connection\n String connectionFailed();\n\n String connectionLost();\n\n String connectionAnotherExits();\n\n String connectionNone();\n\n String connectionNoneLoggedOut();\n\n String wrongBase();\n\n String notYourBase();\n\n // Sell\n String sellConfirmationTitle();\n\n String sellConfirmation();\n\n String tooltipSell();\n\n // Register dialog\n String unregistered();\n\n String unnamed();\n\n String chatUnregistered();\n\n String chatUnnamed();\n\n String registerFacebookNickname();\n\n String registerThanks();\n\n String registerThanksLong();\n\n String registerConfirmationEmailSent(String email);\n\n String register();\n\n String registerDirect();\n\n String registerFacebook();\n\n String registrationFailed();\n\n String registrationFilled();\n\n String registrationMatch();\n\n String registrationEmailNotValid();\n\n String registrationEmailMatch();\n\n String registrationEmail();\n\n String registrationUser();\n\n String setName();\n\n String registrationPasswordNotValid();\n\n String setNameFailedNotVerifiedText();\n\n // Side Cockpit\n String tooltipEnergy();\n\n String tooltipMute();\n\n String tooltipHighScore();\n\n String tooltipFacebookCommunity();\n\n String tooltipFacebookInvite();\n\n String singlePlayer();\n\n String tooltipAbortMission();\n\n String multiplayer();\n\n // Quests\n String questBotBasesText(String botBases);\n\n String nextPlanet();\n\n String tooltipNextPlanet();\n\n String questDialog();\n\n String tooltipQuestDialog();\n\n String questVisualisation();\n\n String tooltipQuestVisualisation();\n\n String pressButtonWhenReady();\n\n String tooltipStartMission();\n\n String reward();\n\n String xpReward(int xp);\n\n String razarionReward(int razarion);\n\n String crystalReward(int crystals);\n\n String activeQuest();\n\n String activeQuestAbort();\n\n String questOverview(int questsDone, int totalQuests);\n\n String missionOverview(int missionsDone, int totalMissions);\n\n String youPassedQuest(String questTitle);\n\n String noMoreQuests();\n\n String noActiveQuest();\n\n String questBasesKilled();\n\n String questBoxesPicked();\n\n String questCrystalsIncreased();\n\n String questArtifactItemAdded();\n\n String questResourcesCollected();\n\n String questTimeRemaining();\n\n String questTimeNotFulfilled();\n\n String questBuilt();\n\n String questUnitStructuresBuilt();\n\n String questArtifactItemAddedActionWord();\n\n String questDestroyed();\n\n String questUnitStructuresDestroyed();\n\n String questMinutesPast();\n\n String startMission();\n\n String competeMission();\n\n String go();\n\n String questEnumPvp();\n\n String questEnumPve();\n\n String questEnumBossPve();\n\n String questEnumMission();\n\n String questEnumGather();\n\n String questEnumMoney();\n\n String questEnumBuildup();\n\n String questEnumHoldTheBase();\n\n String questType();\n\n String abortMission();\n\n String reallyAbortMission();\n\n String placeStartItemTitle();\n\n String placeStartItemDescription();\n\n // Dead-end and new base\n String reachedDeadEnd();\n\n String reachedDeadEndItem();\n\n String reachedDeadEndMoney();\n\n String startNewBase();\n\n String baseLostTitle();\n\n String baseLost();\n\n // Item cockpit\n String guildMembershipRequestItemCockpit();\n\n String tooltipLaunchMissile();\n\n String tooltipUpgrade();\n\n String tooltipBuild(String itemName);\n\n String tooltipNoBuildLevel(String itemName);\n\n String tooltipNoBuildLimit(String itemName);\n\n String tooltipNoBuildHouseSpace(String itemName);\n\n String tooltipNoBuildMoney(String itemName);\n\n String botEnemy();\n\n String botNpc();\n\n String playerEnemy();\n\n String playerFriend();\n\n String itemCockpitGuildMember();\n\n String tooltipSelect(String itemName);\n\n String notPlaceHere();\n\n String notPlaceOver();\n\n String containingNoUnits();\n\n String containing1Unit();\n\n String containingXUnits(int count);\n\n String unloadButton();\n\n String unloadButtonTooltip();\n\n // Highscore\n String findMe();\n\n String rank();\n\n String killed();\n\n String killedPve();\n\n String killedPvp();\n\n String basesKilled();\n\n String basesLost();\n\n String created();\n\n String create();\n\n // Inventory\n String useItem();\n\n String workshop();\n\n String dealer();\n\n String funds();\n\n String artifacts();\n\n String buy();\n\n String tooltipAssemble();\n\n String assemble();\n\n String tooltipArtifact(String artifactName);\n\n String youOwn(int ownCount);\n\n String useItemLimit(String itemName);\n\n String useItemHouseSpace();\n\n String useItemMoney();\n\n String enemyTooNear();\n\n String crystalAmount(int crystals);\n\n String cost(int crystalCost);\n\n String leaveBaseNextPlanet();\n\n String goNextPlanet();\n\n String getInventoryItemTitle();\n\n String getInventoryItemNotEnough(String inventoryItemName);\n\n String getArtifactItemTitle();\n\n String getInventoryArtifactNotEnough(String inventoryArtifactName);\n\n // Startup\n String startupClearGame();\n\n String startupLoadRealGameInfo();\n\n String startupDeltaStartRealGame();\n\n String startupLoadUnits();\n\n String startupInitUnits();\n\n String startupRunRealGame();\n\n String startupCheckCompatibility();\n\n String startupLoadJavaScript();\n\n String startupInitGui();\n\n String startupInitRealGame();\n\n String startupPreloadImageSpriteMaps();\n\n String startupLoadSimulationGameInfo();\n\n String startupInitSimulatedGame();\n\n String startupRunSimulatedGame();\n\n String startupDeltaStartSimulatedGame();\n\n // Unlock dialogs\n String unlockDialogTitle();\n\n String unlockDialogText();\n\n String nothingToUnlockDialogText();\n\n String unlockCrystalCost(int crystals);\n\n String unlockFailed();\n\n String unlockNotEnoughCrystals();\n\n // ???\n String createBase();\n\n String createBaseInBotFailed();\n\n String chooseYourStartPoint();\n\n // Menu\n String tooltipMenuNewBaseSimulated();\n\n String tooltipMenuNewBaseRealGame();\n\n String menuNews();\n\n String menuHistory();\n\n String menuTooltipRegisterLogin();\n\n String menuTooltipNews();\n\n String menuTooltipHistory();\n\n String menuTooltipHistoryOnlyRegistered();\n\n String menuTooltipHistoryOnlyRealGame();\n\n String menuTooltipHistoryOnlyRegisteredVerified();\n\n String menuTooltipGuildsMission();\n\n String guildsOnlyRegisteredVerified();\n\n String guildsOnlyRegistered();\n\n String menuTooltipMyGuild();\n\n String menuTooltipGuilds();\n\n String menuMyGuild();\n\n String menuGuilds();\n\n String menuSearchGuilds();\n\n String menuCreateGuild();\n\n String menuGuildInvitations();\n\n String menuInviteFriends();\n\n String menuInviteFriendsTooltip();\n\n String menuGetCrystals();\n\n String menuTooltipGetCrystals();\n\n String menuBuyPaypal();\n\n String menuBuyFacebook();\n\n String menuOverviewGetCrystals();\n\n String menuStarMap();\n\n String menuStarMapTooltip();\n\n String menuStarMapTooltipMission();\n\n // News Dialog\n String newsDialogTitle();\n\n // History Dialog\n String historyDialogTitle();\n\n // Guild dialogs\n String createGuildDialogTitle();\n\n String createGuildDialog();\n\n String myGuildDialogTitle();\n\n String searchGuildDialogTitle();\n\n String member();\n\n String guildRank();\n\n String kick();\n\n String guildKickMember();\n\n String guildKickMemberMessage(String name);\n\n String guildPresident();\n\n String guildManagement();\n\n String guildMember();\n\n String changeRank();\n\n String gildMemberInvited();\n\n String gildMemberInvitedMessage(String userName);\n\n String inviteMember();\n\n String createGuildInsufficientCrystals();\n\n String createGuildCrystalCost(int cost);\n\n String guildText();\n\n String guildMembers();\n\n String guildMembershipRequestTitle();\n\n String guildMembershipRequest();\n\n String guildMembershipRequestSent(String name);\n\n String joinGuild();\n\n String joinGuildMessage(String name);\n\n String dismissGuildMessage(String name);\n\n String guildTab();\n\n String guildMemberTab();\n\n String guildRecruitingTab();\n\n String guildInviteMessage();\n\n String guildMembershipRequestText();\n\n String leaveGuild();\n\n String closeGuild();\n\n String leaveGuildMessage();\n\n String closeGuildMessage();\n\n String guildNameFilter();\n\n String guildInvitations();\n\n String guildInvitationsMessage();\n\n String changeRankText(String name);\n\n String noGuildRequests();\n\n String noGuildInvitations();\n\n String noGuilds();\n\n String guildToSendRequest();\n\n String guildTextShort();\n\n String guildInvitationNotification();\n\n String openGuildInvitation();\n\n String guildMembershipRequestNotification();\n\n String openGuildMembershipRequest();\n\n String guildInvitationNotRegistered(String playerName);\n\n String guildInvitationBaseAbandoned(String playerName);\n\n String userIsAlreadyAGuildMember(String userName);\n\n String guildLostTitle();\n\n String guildLostMessage();\n\n // Chat\n String tooltipChatMenu();\n\n String globalChat();\n\n String guildChat();\n\n String chatMessageFilter();\n\n String chatMessageFilterNoGuild();\n\n // Invite friends\n String inviteFriends();\n\n String inviteFriendsOnlyRegisteredVerified();\n\n String inviteFriendsOnlyRegistered();\n\n String inviteFriendsDescription();\n\n String inviteFriendsViaFacebook();\n\n String inviteFriendsViaMail();\n\n String inviteFriendsViaUrl();\n\n String inviteUrlDescription();\n\n String tabInvite();\n\n String tabComplete();\n\n String sendButton();\n\n String generateButton();\n\n String invitationCrystalBonus();\n\n String crystalBonus();\n\n String fbInviteTitle();\n\n String fbInviteMessage();\n\n String inviteFriendsEmailNotValid();\n\n String invitationEmailSent(String address);\n\n String invitationFacebookSent();\n\n String noFriendInvited();\n\n // Crystal helper\n String buyDialogCost(int crystalCost);\n\n String buyDialogbalance(int crystalBalance);\n\n String invite();\n\n String howToGetCrystals();\n\n String buyCrystalsViaPayPal();\n\n String buyCrystalsViaFacebook();\n\n String invitationFriendsAndGetCrystals();\n\n String collectBoxesAndGetCrystals();\n\n // Buy crystals dialog\n String buyCrystalsPaypal();\n\n String buyCrystalsPaypal1();\n\n String buyCrystalsPaypal2();\n\n String buyCrystalsPaypa3();\n\n String buyCrystalsPaypal4();\n\n String buyCrystalsPaypal5();\n\n String buyCrystalsPaypalOnlyRegistered();\n\n String buyCrystalsPaypalOnlyRegisteredVerified();\n\n String buyCrystalsPaypalDialogTitle();\n\n String buyCrystalsFacebookDialogTitle();\n\n String buyCrystalsFacebook();\n\n String buyCrystalsFacebook1();\n\n String buyCrystalsFacebook2();\n\n String buyCrystalsFacebook3();\n\n String buyCrystalsFacebook4();\n\n String buyCrystalsFacebook5();\n\n String buyCrystalsFacebookButton(int crystals);\n\n String buyCrystalsFacebookOnlyRegisteredVerified();\n\n String buyCrystalsFacebookOnlyRegistered();\n\n String tanksCrystalBoughtDialogTitle();\n\n String tanksCrystalBoughtDialog(int delta, int value);\n\n // Star map\n String starMapDialogTitle();\n\n String minLevel();\n\n String planetSize();\n\n String allowedUnits();\n\n String bases();\n\n String bots();\n\n String units();\n\n String land();\n\n String wrongLevelForLand();\n\n String tooltipShowUnitsOnPlanet();\n\n String tooltipLandOnPlanet();\n\n String youAreAlreadyOnThisPlanet();\n\n String moveToPlanetTitle();\n\n String moveToPlanet(String name);\n\n String leaveBaseMoveToPlanet(String name);\n\n // Training\n String trainingTipScroll();\n\n String trainingTipSelectItem(String itemTypeName);\n\n String trainingTipClickItem();\n\n String trainingTipSendBuildCommand(String itemTypeName);\n\n String trainingTipSendBuildFinalizeCommand(String itemTypeName);\n\n String trainingTipFactorizeCommand(String itemTypeName);\n\n String trainingTipSendCollectCommand(String itemTypeName);\n\n String trainingTipToBeBuiltPlacer(String itemTypeName);\n\n String trainingTipWatchQuestDialog();\n\n String trainingTipClickContainerItem(String itemTypeName);\n\n String trainingTipClickMove();\n\n String trainingTipClickUnload();\n\n String trainingTipClickUnloadMode();\n\n String apply();\n\n String ok();\n\n // Level up dialog\n String levelUpDialogTitle();\n\n String youReachedLevel(int level);\n\n // User account dialog\n String userAccountDialogTitle();\n\n // System\n String serverRebootTitle();\n\n String serverRebootMissionNotSaved();\n\n String serverRebootNotRegistered();\n\n String planetRestartTitle();\n\n String planetRestartMessage();\n\n String serverRestartTitle();\n\n String serverShuttingDown();\n\n String serverStarting();\n\n String serverRunning();\n\n String unknown();\n}", "@DefaultLocale(\"fr\")\n@Generate(format={\"com.google.gwt.i18n.rebind.format.PropertiesFormat\"},locales={\"en\"})\npublic interface I18nConsts extends Constants {\n\t@DefaultStringArrayValue({\"France\",\"Espagne\",\"Belgique\"})\n\tString[] countries();\n}", "public void initialize()\n {\n Locale locale = Locale.getDefault();\n var rb = ResourceBundle.getBundle(\"translation\",locale);\n\n customerPerCountryLabel.setText(rb.getString(\"CustomersPerCountry\"));\n backButton.setText(rb.getString(\"Back\"));\n\n\n }", "public SrvI18n() {\n try { //to fix Android Java\n messages = ResourceBundle.getBundle(\"MessagesBundle\");\n } catch (Exception e) {\n Locale locale = new Locale(\"en\", \"US\");\n messages = ResourceBundle.getBundle(\"MessagesBundle\", locale);\n }\n }", "public GoogleTranslateMeta() {\n\n // add a cool description\n addDescription(\"used as a general template\");\n\n // add dependencies if necessary\n // addDependency(\"com.twelvemonkeys.common\", \"common-lang\", \"3.1.1\");\n\n setAvailable(false);\n setCloudService(true);\n\n addCategory(\"translation\", \"programming\");\n \n addDependency(\"com.google.cloud\", \"google-cloud-translate\", \"2.2.0\");\n addDependency(\"com.google.auth\", \"google-auth-library-credentials\", \"1.3.0\");\n\n }", "public interface Translator\n{\n Locale SWEDISH = Locale.forLanguageTag(\"sv\");\n\n List<Locale> supportedLanguages();\n Map<Locale, List<Locale>> supportedDirections();\n Translation translate(Translation message);\n String pageTranslationURL(String sourceURL, Translation message);\n}", "public interface LocaleContext {\n Locale getLocale();\n}", "public interface ResourceConfig {\n\n public ResourceBundle config = ResourceBundle.getBundle(\"resource-config\");\n\n public String DEFAULT_LOCALE = config.getString(\"defaultLocale\");\n\n public String EXCEPTION_MESSAGE_PREFIX = config.getString(\"exception_message_prefix\");\n\n public boolean VALUE_NEED_ENCODE = new Boolean(config.getString(\"stringEncode\")).booleanValue();\n\n public String SOURCE_ENCODE = config.getString(\"sourceEncode\");\n\n public String TARGET_ENCODE = config.getString(\"targetEncode\");\n\n public String LOCALE_LIST = config.getString(\"localeList\");\n\n public String RESOURCEBOX_FILES = config.getString(\"resourcebox_files\");\n\n public String CONSTANTS_FILES = config.getString(\"constants_files\");\n\n}", "public interface ResourceManager {\r\n\r\n\t/**\r\n\t * Adds a resource bundle to be managed by the resource manager.\r\n\t * \r\n\t * @param bundleBaseName - the base name of the bundle to add.\r\n\t * @param locales - an array with the locales to consider for the bundle to add \r\n\t */\r\n\tvoid addBundle(String bundleBaseName, Locale... locales);\r\n\t\r\n\t/**\r\n\t * Gets the localized text for the specified bundle key, and for the resource manager default locale\r\n\t * \r\n\t * @param bundleKey\t- the key of the requested text in the resource bundle\r\n\t * @return the requested localized text\r\n\t */\r\n\tString getString(String bundleKey);\r\n\r\n\t/**\r\n\t * Gets the localized text for the specified bundle key and for the specified locale.\r\n\t * \r\n\t * @param bundleKey\t- the key of the requested text in the resource bundle\r\n\t * @param locale\t- the locale of the resource bundle\r\n\t * @return the requested localized text\r\n\t */\r\n\tString getString(String bundleKey, Locale locale);\r\n\r\n\t/**\r\n\t * Gets the localized text for the specified bundle key,\r\n\t * in the resource bundle with the given base name, and for the resource manager default locale\r\n\t * \r\n\t * @param bundleKey\t\t - the key of the requested text in the resource bundle\r\n\t * @param bundleBaseName - the name of the bundle where the localized text should be found\r\n\t * @return the requested localized text\r\n\t */\r\n\tString getString(String bundleKey, String bundleBaseName);\r\n\r\n\t/**\r\n\t * Gets the localized text for the specified bundle key,\r\n\t * from the resource bundle with the given base name, and for the specified locale.\r\n\t * \r\n\t * @param bundleKey\t\t - the key of the requested text in the resource bundle\r\n\t * @param bundleBaseName - the name of the bundle where the localized text should be found\r\n\t * @param locale \t\t - the locale of the resource bundle\r\n\t * @return the requested localized text\r\n\t */\r\n\tString getString(String bundleKey, String bundleBaseName, Locale locale);\r\n\r\n\t/**\r\n\t * Gets the localized text message for the specified bundle key, and for the resource manager default locale.<br/>\r\n\t * If the requested message contains place holders, they will be substituted by the given arguments\r\n\t * \r\n\t * @param bundleKey - the key of the requested message in the resource bundle\r\n\t * @param args \t\t- an object array with substitution parameters for the message\r\n\t * @return the requested localized text message\r\n\t */\r\n\tString getMessage(String bundleKey, Object... args);\r\n\r\n\t/**\r\n\t * Gets the localized text message for the specified bundle key, and for the specified locale.<br/>\r\n\t * If the requested message contains place holders, they will be substituted by the given arguments\r\n\t * \r\n\t * @param bundleKey - the key of the requested message in the resource bundle\r\n\t * @param args \t\t- an object array with substitution parameters for the message\r\n\t * @return the requested localized text message\r\n\t */\r\n\tString getMessage(String bundleKey, Locale locale, Object... args);\r\n\r\n\t/**\r\n\t * Gets the localized text message for the specified bundle key, and for the resource manager default locale.<br/>\r\n\t * If the requested message contains place holders, they will be substituted by the given arguments\r\n\t * \r\n\t * @param bundleKey \t - the key of the requested message in the resource bundle\r\n\t * @param bundleBaseName - the name of the bundle where the value should be found\r\n\t * @param locale\t\t - the locale of the resource bundle\r\n\t * @param args \t\t\t - an object array with substitution parameters for the message\r\n\t * @return the requested localized text message\r\n\t */\r\n\tString getMessage(String bundleKey, String bundleBaseName, Object... args);\r\n\r\n\t/**\r\n\t * Gets the localized text message for the specified bundle key,\r\n\t * from the resource bundle with the given base name, and for the specified locale.<br/>\r\n\t * If the requested message contains place holders, they will be substituted by the given arguments\r\n\t * \r\n\t * @param bundleKey \t - the key of the requested message in the resource bundle\r\n\t * @param bundleBaseName - the name of the bundle where the localized text message should be found\r\n\t * @param locale\t\t - the locale of the resource bundle\r\n\t * @param args \t\t\t - the array with substitution parameters for the message\r\n\t * @return the requested localized text message\r\n\t */\r\n\tString getMessage(String bundleKey, String bundleName, Locale locale, Object... args);\r\n\t\r\n\t/**\r\n\t * Gets the localized object for the specified bundle key, and for the resource manager default locale<br/>\r\n\t * This method should be used only if resources are stored in a subclass of {@link ResourceBundle}\r\n\t * \r\n\t * @param bundleKey - the key of the requested localized object in the resource bundle\r\n\t * @return the requested localized object\r\n\t */\r\n\tObject getObject(String bundleKey);\r\n\t\r\n\t/**\r\n\t * Gets the localized object for the specified bundle key, and for specified locale<br/>\r\n\t * This method should be used only if resources are stored in a subclass of {@link ResourceBundle}\r\n\t * \r\n\t * @param bundleKey - the key of the requested localized object in the resource bundle\r\n\t * @param locale\t- the locale of the resource bundle\r\n\t * @return the requested localized object\r\n\t */\r\n\tObject getObject(String bundleKey, Locale locale);\r\n\t\r\n\t/**\r\n\t * Gets the localized object for the specified bundle key,\r\n\t * from the resource bundle with the given name, and for the resource manager default locale<br/>\r\n\t * This method should be used only if resources are stored in a subclass of {@link ResourceBundle}\r\n\t * \r\n\t * @param bundleKey \t - the key of the requested localized object in the resource bundle\r\n\t * @param bundleBaseName - the name of the bundle where the localized object should be found\r\n\t * @return the requested localized object\r\n\t */\r\n\tObject getObject(String bundleKey, String bundleBaseName);\r\n\t\r\n\t/**\r\n\t * Gets the localized object for the specified bundle key,\r\n\t * from the resource bundle with the given name, and for specified locale<br/>\r\n\t * This method should be used only if resources are stored in a subclass of {@link ResourceBundle}\r\n\t * \r\n\t * @param bundleKey \t - the key of the requested localized object in the resource bundle\r\n\t * @param bundleBaseName - the name of the bundle where the localized object should be found\r\n\t * @param locale\t \t - the locale of the resource bundle\r\n\t * @return the requested localized object\r\n\t */\r\n\tObject getObject(String bundleKey, String bundleBaseName, Locale locale);\r\n\t\r\n\t/**\r\n\t * Indicates if the resource manager has to return <code>null</code> if a resource is missing\r\n\t * @return <code>true</code> if the resource manager has to return <code>null</code> for missing\r\n\t * resources, <code>false</code> otherwise\r\n\t */\r\n\tboolean isNullable();\r\n\t\r\n\t/**\r\n\t * Indicates if the resource manager has to return <code>null</code> if a resource is missing\r\n\t * @param nullable - <code>true</code> if the resource manager has to return <code>null</code>\r\n\t * \t\t\t\t\t for missing resource, <code>false</code> otherwise\r\n\t */\r\n\tvoid setNullable(boolean nullable);\r\n\r\n\t/**\r\n\t * Gets a set with the locales managed by the resource manager\r\n\t * @return a set of the locales managed by the resource manager\r\n\t */\r\n\tSet<Locale> getManagedLocales();\r\n\r\n\t/**\r\n\t * Gets the locale currently used as default by the resource manager\r\n\t * @return the locale currently used as default by the resource manager\r\n\t */\r\n\tLocale getDefaultLocale();\r\n}", "public interface LocaleProvider {\n\tLocale getLocale();\n}", "public abstract String getLocalizationKey();", "void localizationChanged();", "void localizationChanged();", "void localizationChanged();", "public AbstractLocalizationProvider() {\r\n\t\tsuper();\r\n\t\tthis.listeners = new ArrayList<>();\r\n\t}", "public interface Locale {\n public String getStringById(int stringId);\n}", "int getLocalizedText();", "private void addTranslations() {\n addTranslation(\"org.argouml.uml.diagram.ui.FigNote\",\n \"org.argouml.uml.diagram.static_structure.ui.FigComment\");\n addTranslation(\"org.argouml.uml.diagram.static_structure.ui.FigNote\",\n \"org.argouml.uml.diagram.static_structure.ui.FigComment\");\n addTranslation(\"org.argouml.uml.diagram.state.ui.FigState\",\n \"org.argouml.uml.diagram.state.ui.FigSimpleState\");\n addTranslation(\"org.argouml.uml.diagram.ui.FigCommentPort\",\n \"org.argouml.uml.diagram.ui.FigEdgePort\");\n addTranslation(\"org.tigris.gef.presentation.FigText\",\n \"org.argouml.uml.diagram.ui.ArgoFigText\");\n addTranslation(\"org.tigris.gef.presentation.FigLine\",\n \"org.argouml.gefext.ArgoFigLine\");\n addTranslation(\"org.tigris.gef.presentation.FigPoly\",\n \"org.argouml.gefext.ArgoFigPoly\");\n addTranslation(\"org.tigris.gef.presentation.FigCircle\",\n \"org.argouml.gefext.ArgoFigCircle\");\n addTranslation(\"org.tigris.gef.presentation.FigRect\",\n \"org.argouml.gefext.ArgoFigRect\");\n addTranslation(\"org.tigris.gef.presentation.FigRRect\",\n \"org.argouml.gefext.ArgoFigRRect\");\n addTranslation(\n \"org.argouml.uml.diagram.deployment.ui.FigMNodeInstance\",\n \"org.argouml.uml.diagram.deployment.ui.FigNodeInstance\");\n addTranslation(\"org.argouml.uml.diagram.ui.FigRealization\",\n \"org.argouml.uml.diagram.ui.FigAbstraction\");\n }", "public Localizer() {\n processor = new ComponentProcessor();\n }", "abstract java.lang.String getLocalizedMessage();", "public AbstractLocalisationBasePurString() {\t\t\r\n\t\tthis(null, null, null, null);\t\t\r\n\t}", "@Override\n public void setLocale(Locale arg0) {\n\n }", "private void init() {\n\t\t\n\t\tPropertiesManager propertiesManager = PropertiesManager.getInstance();\n\t\tFile localeDirectory = new File(propertiesManager.getProperty(\"locale.directory\", LOCALE_DIRECTORY));\n\n\t\tlocales = new ArrayList<Locale>();\n\n\t\ttry {\n\t\t\t\n\t\t\tClassUtils.addClassPathFile(localeDirectory);\n\t\t\t\n\t\t\t// Находим все доступные локали\n\t\t\tlocales = findAvailableLocales(localeDirectory);\n\n\t\t} catch(Exception ignore) {}\n\n\t\tfallbackLocale = Locale.ENGLISH;\n\t\tcontrol = new Control();\n\n\t\tif(!locales.contains(Locale.ENGLISH)) {\n\t\t\tlocales.add(0, fallbackLocale);\n\t\t}\n\n\t\tdefaultLocale = locales.get(locales.indexOf(Locale.ENGLISH));\n\t\t\n\t\tString language = propertiesManager.getProperty(\"locale.language\", \"\");\n\t\tString country = propertiesManager.getProperty(\"locale.country\", \"\");\n\t\tString variant = propertiesManager.getProperty(\"locale.variant\", \"\");\n\t\t\n\t\tLocale locale = new Locale(language, country, variant);\n\t\t\n\t\tif(locales.contains(locale)) {\n\t\t\tlocale = locales.get(locales.indexOf(locale));\n\t\t} else {\n\t\t\tlocale = defaultLocale;\n\t\t}\n\n\t\tsetLocale(locale);\n\t\t\n\t\tif(FontEditor.DEBUG) {\n\t\t\t\n\t\t\tfor(Locale l : locales) {\n\t\t\t\tSystem.out.println(\"locale found -> \" + l.getDisplayLanguage(Locale.ENGLISH));\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"Total locale(s) found: \" + locales.size());\n\t\t\tSystem.out.println();\n\t\t}\n//System.out.println(\">>> \" + getValue(\"shitd\"));\n\t}", "public void applyI18n(){\n if (lastLocale != null && \n lastLocale == I18n.getCurrentLocale()) {\n return;\n }\n lastLocale = I18n.getCurrentLocale();\n \n strHelpLabel= I18n.getString(\"label.help1\")+ version;\n strHelpLabel+=I18n.getString(\"label.help2\");\n strHelpLabel+=I18n.getString(\"label.help3\");\n strHelpLabel+=I18n.getString(\"label.help4\");\n strHelpLabel+=I18n.getString(\"label.help5\");\n strHelpLabel+=I18n.getString(\"label.help6\");\n strHelpLabel+=I18n.getString(\"label.help7\");\n strHelpLabel+=I18n.getString(\"label.help8\");\n helpLabel.setText(strHelpLabel);\n }", "@Override\n protected void attachBaseContext(Context base) {\n super.attachBaseContext(Application.Companion.getLocaleManager().setLocale(base));\n }", "private void translate()\r\n\t{\r\n\t\tLocale locale = Locale.getDefault();\r\n\t\t\r\n\t\tString language = locale.getLanguage();\r\n\t\t\r\n\t\ttranslate(language);\r\n\t}", "@Test\n\t@PerfTest(invocations = 10)\n\tpublic void defLang() {\n\t\tl.setLocale(l.getLocale().getDefault());\n\t\tassertEquals(\"Register\", Internationalization.resourceBundle.getString(\"btnRegister\"));\n\t}", "public ILoLoString translate() {\n return new MtLoLoString(); \n }", "public Lab2_InternationalizedWarehouse() {\n enLocale = new Locale(\"en\", \"US\");\n plLocale = new Locale(\"pl\", \"PL\");\n initComponents();\n initStorage();\n itemsList = new ItemsList();\n plLangRadioButton.doClick();\n loadButton.doClick();\n langButtonGroup.add(plLangRadioButton);\n langButtonGroup.add(enLangRadioButton);\n\n }", "@Override\n\tpublic void setLocale(Locale loc) {\n\t}", "String getLocalizedString(Locale locale);", "Culture createCulture();", "public void updateLocale() {\r\n\t\tsuper.updateLocale();\r\n\t}", "public LocalizationHelper(String modId) {\n\n this.modId = modId.toLowerCase();\n }", "public void setLang() {\n new LanguageManager() {\n @Override\n public void engLanguage() {\n mFirstCurrencyTitle = getString(R.string.converter_main_currency_eng);\n mSaleTitle = getString(R.string.converter_sale_eng);\n mPurchaseTitle = getString(R.string.converter_purchase_eng);\n mCountTitle = getString(R.string.converter_count_of_currencies_eng);\n eTTitle.setText(getResources().getString(R.string.drawer_item_converter_eng));\n tVChosenCurrency.setText(mMainListForActions.get(mPositionOfCurInList)\n .getCurrency().getTitleEng().toUpperCase());\n tVChosenOrganizationTitle.setText(mMainListForActions.get(mPositionOfCurInList)\n .getOrganizations().get(mPositionOfOrgInList).getTitleEng());\n tVSecondCurrency.setText(mMainListForActions.get(mPositionOfCurInList)\n .getCurrency().getTitleEng().toUpperCase().concat(\" (\").concat(mCurrencyShortForm).concat(\")\"));\n mCurrencyDialogTitle = getString(R.string.drawer_item_currencies_eng);\n mOrganizationDialogTitle = getString(R.string.drawer_item_organizations_eng);\n mActionDialogTitle = getString(R.string.converter_dialog_action_title_eng);\n mToastFailure = getString(R.string.converter_toast_failure_eng);\n mTitle = getResources().getString(R.string.drawer_item_converter_eng);\n mMessage = getString(R.string.dialog_template_text_eng);\n mTitleButtonOne = getString(R.string.dialog_template_edit_eng);\n mTitleButtonTwo = getString(R.string.dialog_template_create_eng);\n mToastEdited = getString(R.string.converter_toast_template_edit_eng);\n mToastCreated = getString(R.string.converter_toast_template_create_eng);\n mMessageFinal = getString(R.string.converter_final_dialog_text_eng);\n mTitleButtonOneFinal = getString(R.string.converter_final_dialog_yes_eng);\n mTitleButtonTwoFinal = getString(R.string.converter_final_dialog_no_eng);\n }\n\n @Override\n public void ukrLanguage() {\n mFirstCurrencyTitle = getString(R.string.converter_main_currency_ukr);\n mSaleTitle = getString(R.string.converter_sale_ukr);\n mPurchaseTitle = getString(R.string.converter_purchase_ukr);\n mCountTitle = getString(R.string.converter_count_of_currencies_ukr);\n eTTitle.setText(getResources().getString(R.string.drawer_item_converter_ukr));\n tVChosenCurrency.setText(mMainListForActions.get(mPositionOfCurInList)\n .getCurrency().getTitleUkr().toUpperCase());\n tVChosenOrganizationTitle.setText(mMainListForActions.get(mPositionOfCurInList)\n .getOrganizations().get(mPositionOfOrgInList).getTitleUkr());\n tVSecondCurrency.setText(mMainListForActions.get(mPositionOfCurInList)\n .getCurrency().getTitleUkr().toUpperCase().concat(\" (\").concat(mCurrencyShortForm).concat(\")\"));\n mCurrencyDialogTitle = getString(R.string.drawer_item_currencies_ukr);\n mOrganizationDialogTitle = getString(R.string.drawer_item_organizations_ukr);\n mActionDialogTitle = getString(R.string.converter_dialog_action_title_ukr);\n mToastFailure = getString(R.string.converter_toast_failure_ukr);\n mTitle = getResources().getString(R.string.drawer_item_converter_ukr);\n mMessage = getString(R.string.dialog_template_text_ukr);\n mTitleButtonOne = getString(R.string.dialog_template_edit_ukr);\n mTitleButtonTwo = getString(R.string.dialog_template_create_ukr);\n mToastEdited = getString(R.string.converter_toast_template_edit_ukr);\n mToastCreated = getString(R.string.converter_toast_template_create_ukr);\n mMessageFinal = getString(R.string.converter_final_dialog_text_ukr);\n mTitleButtonOneFinal = getString(R.string.converter_final_dialog_yes_ukr);\n mTitleButtonTwoFinal = getString(R.string.converter_final_dialog_no_ukr);\n }\n\n @Override\n public void rusLanguage() {\n mFirstCurrencyTitle = getString(R.string.converter_main_currency_rus);\n mSaleTitle = getString(R.string.converter_sale_rus);\n mPurchaseTitle = getString(R.string.converter_purchase_rus);\n mCountTitle = getString(R.string.converter_count_of_currencies_rus);\n eTTitle.setText(getResources().getString(R.string.drawer_item_converter_rus));\n tVChosenCurrency.setText(mMainListForActions.get(mPositionOfCurInList)\n .getCurrency().getTitleRus().toUpperCase());\n tVChosenOrganizationTitle.setText(mMainListForActions.get(mPositionOfCurInList)\n .getOrganizations().get(mPositionOfOrgInList).getTitleRus());\n tVSecondCurrency.setText(mMainListForActions.get(mPositionOfCurInList)\n .getCurrency().getTitleRus().toUpperCase().concat(\" (\").concat(mCurrencyShortForm).concat(\")\"));\n mCurrencyDialogTitle = getString(R.string.drawer_item_currencies_rus);\n mOrganizationDialogTitle = getString(R.string.drawer_item_organizations_rus);\n mActionDialogTitle = getString(R.string.converter_dialog_action_title_rus);\n mToastFailure = getString(R.string.converter_toast_failure_rus);\n mTitle = getResources().getString(R.string.drawer_item_converter_rus);\n mMessage = getString(R.string.dialog_template_text_rus);\n mTitleButtonOne = getString(R.string.dialog_template_edit_rus);\n mTitleButtonTwo = getString(R.string.dialog_template_create_rus);\n mToastEdited = getString(R.string.converter_toast_template_edit_rus);\n mToastCreated = getString(R.string.converter_toast_template_create_rus);\n mMessageFinal = getString(R.string.converter_final_dialog_text_rus);\n mTitleButtonOneFinal = getString(R.string.converter_final_dialog_yes_rus);\n mTitleButtonTwoFinal = getString(R.string.converter_final_dialog_no_rus);\n }\n };\n getDataForActionDialog();\n setData();\n }", "@SuppressWarnings(\"deprecation\")\n public String getLocalizedString(String key, Object... parameters) {\n\n // On server, use deprecated I18n.\n if (FMLCommonHandler.instance().getSide() == Side.SERVER)\n return net.minecraft.util.text.translation.I18n.translateToLocalFormatted(key, parameters);\n\n // On client, use the new client-side I18n.\n String str = I18n.format(key, parameters).trim();\n\n if (replacesAmpersandWithSectionSign)\n str = str.replaceAll(\"&\", \"\\u00a7\");\n if (hideFormatErrors)\n str = str.replaceFirst(\"Format error: \", \"\");\n\n return str;\n }", "public static void setLocale(Locale locale) {\n// Recarga las entradas de la tabla con la nueva localizacion \n RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME, locale);\n}", "protected ICUResourceBundle(){}", "int getI18();", "protected String localize(Map<String, String> labels, String s) {\n return labels.containsKey(s) ? labels.get(s) : (\"Untranslated:\" + s);\n }", "private void ini_Translations()\r\n\t{\r\n\t\tLogger.DEBUG(\"ini_Translations\");\r\n\t\tnew Translation(\"data\", FileType.Internal);\r\n\t\ttry\r\n\t\t{\r\n\t\t\tTranslation.LoadTranslation(\"data/lang/en-GB/strings.ini\");\r\n\t\t}\r\n\t\tcatch (IOException e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "Language(Locale locale) {\n this.locale = locale;\n }", "private javax.swing.JLabel getLblOSLocale() {\n\tif (ivjLblOSLocale == null) {\n\t\ttry {\n\t\t\tivjLblOSLocale = new javax.swing.JLabel();\n\t\t\tivjLblOSLocale.setName(\"LblOSLocale\");\n\t\t\tivjLblOSLocale.setText(\"Locale:\");\n\t\t\tivjLblOSLocale.setBounds(10, 94, 140, 14);\n\t\t\t// user code begin {1}\n ivjLblOSLocale.setText(ResourceManager.getResource(PlatformInfoPanel.class, \"LblOSLocale_text\"));\n\t\t\t// user code end\n\t\t} catch (java.lang.Throwable ivjExc) {\n\t\t\t// user code begin {2}\n\t\t\t// user code end\n\t\t\thandleException(ivjExc);\n\t\t}\n\t}\n\treturn ivjLblOSLocale;\n}", "private LangUtilities() {\n }", "public interface Localizable extends Serializable {\r\n /**\r\n * Gets the source (non-localized) string.\r\n *\r\n * @return the source string.\r\n */\r\n String getSourceString();\r\n\r\n /**\r\n * Gets the localized string.\r\n *\r\n * @param locale locale into which to get the string.\r\n * @return the localized string or the source string if no\r\n * localized version is available.\r\n */\r\n String getLocalizedString(Locale locale);\r\n}", "private I18nHelper() {\n\t\tfinal String langCode = Locale.getDefault().getISO3Language();\n\t\tthis.androidLang = SupportedLanguage\n\t\t\t\t.getSupportedLanguageFromIso3Code(langCode);\n\t}", "public LocaleAieon( String name ) \r\n\t{\r\n\t\tsuper( name, S_LOCALE );\r\n\t\tLocale locale = Locale.getDefault();\r\n\t\tsuper.set( S_LOCALE, locale.getLanguage() );\r\n\t\tsuper.set( Attributes.COUNTRY.name(), locale.getCountry() );\r\n\t\tsuper.set( Attributes.VARIANT.name(), locale.getVariant() );\r\n\t}", "public interface Messages extends com.google.gwt.i18n.client.Messages {\n\n\t@DefaultMessage(\"''{0}'' is not a valid symbol.\")\n\tString invalidSymbol(String symbol);\n\n\t@DefaultMessage(\"Last update: {0,date,medium} {0,time,medium}\")\n\tString lastUpdate(Date timestamp);\n\n}", "public interface ILocalizedLogger {\n /**\n * Gets logger configuration.\n * @return logger configuration.\n */\n ILoggerConfiguration getConfiguration();\n\n /**\n * Logs localized message for action with INFO level which is applied for element, for example, click, send keys etc.\n * @param elementType Type of the element.\n * @param elementName Name of the element.\n * @param messageKey Key in resource file.\n * @param args Arguments, which will be provided to template of localized message.\n */\n void infoElementAction(String elementType, String elementName, String messageKey, Object... args);\n\n /**\n * Logs localized message with INFO level.\n * @param messageKey Key in resource file.\n * @param args Arguments, which will be provided to template of localized message.\n */\n void info(String messageKey, Object... args);\n\n /**\n * Logs localized message with DEBUG level.\n * @param messageKey Key in resource file.\n * @param args Arguments, which will be provided to template of localized message.\n */\n void debug(String messageKey, Object... args);\n\n /**\n * Logs localized message with DEBUG level.\n * @param messageKey Key in resource file.\n * @param throwable Throwable to log.\n * @param args Arguments, which will be provided to template of localized message.\n */\n void debug(String messageKey, Throwable throwable, Object... args);\n\n /**\n * Logs localized message with WARN level.\n * @param messageKey Key in resource file.\n * @param args Arguments, which will be provided to template of localized message.\n */\n void warn(String messageKey, Object... args);\n\n /**\n * Logs localized message with ERROR level.\n * @param messageKey Key in resource file.\n * @param args Arguments, which will be provided to template of localized message.\n */\n void error(String messageKey, Object... args);\n\n /**\n * Logs localized message with FATAL level.\n * @param messageKey Key in resource file.\n * @param throwable Throwable to log.\n * @param args Arguments, which will be provided to template of localized message.\n */\n void fatal(String messageKey, Throwable throwable, Object... args);\n}", "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}", "InternationalString createInternationalString(Map<Locale,String> strings);", "@Override\n public String getDisplayName() {\n return \"Zanata Localization Sync\";\n }", "public void localize(){\n String file=System.getProperty(\"user.home\")+ File.separator + \"rex.properties\";\n Properties rexProp = new Properties();\n try{\n\n rexProp.load(new FileInputStream(new File(file)));\n \n }catch(Exception e){\n S.out(\"Error reading rex.properties file\"); \n }\n strLanguage= rexProp.getProperty(\"Language\");\n \n if (strLanguage!=\"\"){\n Locale oLang= new Locale(strLanguage);\n I18n.setCurrentLocale(oLang);\n }\n else{\n I18n.setCurrentLocale(Locale.getDefault()); //set default locale\n }\n\n }", "public LocaleFormatter() {\r\n super(2);\r\n }", "@Override\r\n public String toString() {\n return (this.value + \" \" + (this.lang.length()>0? \"(lang: \"+this.lang+\")\":\"\") ).trim();\r\n }", "public AppTranslationRecord() {\n super(AppTranslation.APP_TRANSLATION);\n }", "public clTranslation(String resource) {\n this.resource = resource;\n locale = Locale.getDefault();\n loadResource();\n }", "private UnitsErrorStrings() {\n }", "private LocaleManager() {\n\t\t\n\t\tinit();\n\t}", "private LanguagesettingsPackage() {}", "@SuppressWarnings({ \"static-method\", \"nls\" })\n @Test\n public final void testRetrieveKeyI18NPropertyOtherLocale()\n {\n Locale.setDefault(Locale.ITALIAN);\n\n // Property value is injected at object construction time! So it's important to change the locale before the\n // object is created.\n TestEasyPropertiesObject object = new TestEasyPropertiesObject();\n Assert.assertEquals(getExpectedYellowColorName(), object.getColorName());\n }", "public interface LocalizedException {\r\n\tpublic String getLocalizedMessage();\r\n}", "public void setLocale(Locale l) {\n if (!initialized)\n super.setLocale(l);\n else {\n locale = l;\n initNames();\n }\n }", "public void attachBaseContext(Context context) {\n super.attachBaseContext(LocaleHelper.setLocale(context));\n }", "public TranslationInformation(String pluginName, List<ITranslationResource> resources){\n\t\tthis.pluginName = pluginName;\n\t\tthis.resources = resources;\n\t}", "public Object applyLocaleSettings(IApplicationContext context, Map<String, Object> parameters) throws Exception;", "@Override\n public void setTranslation(String translation) {\n }", "private BuildTranslations () {\n\t\tthrow new UnsupportedOperationException();\n\t}", "public Locale getLocale() { return this.locale; }", "public String getLocalString() {\r\n return localizedString;\r\n }", "public String getServerLocale(){\n return this.serverLocale;\n }", "private LocalizationContext(Builder builder){\n super(builder);\n this.id = builder.id;\n this.targetType = builder.targetType;\n }", "public AbstractLocalisationLineaire() {\r\n\t\t\r\n\t\tthis(null, null, null, null, null, null, null);\r\n\t\t\t\t\r\n\t}", "@PostConstruct\n public void init()\n throws RedbackServiceException\n {\n getI18nProperties( \"en\" );\n getI18nProperties( \"fr\" );\n }", "public static void localize(String text) {\n }", "public abstract Builder setDisplayNamesLocale(String value);", "public void setLocalisation(final Room pLocalisation){this.aLocalisation = pLocalisation;}", "@Override\r\npublic void initialize(URL arg0, ResourceBundle arg1) {\n\t\r\n}", "public MultilingualString(String s, String languageCode) {\n }", "@SuppressWarnings({ \"static-method\", \"nls\" })\n @Test\n public final void testRetrieveKeyI18NPropertyCurrentLocale()\n {\n TestEasyPropertiesObject object = new TestEasyPropertiesObject();\n Assert.assertEquals(getExpectedYellowColorName(), object.getColorName());\n }", "static private void setLanguage(String strL) {\r\n\r\n\t\tstrLanguage = strL;\r\n\r\n\t\t// need to reload it again!\r\n\t\tloadBundle();\r\n\t}", "public EmployeeLanguage(Language name, LanguageLevel level) {\n this.name=name;\n this.level=level;\n }", "private void loadLocale() {\n\t\tSharedPreferences sharedpreferences = this.getSharedPreferences(\"CommonPrefs\", Context.MODE_PRIVATE);\n\t\tString lang = sharedpreferences.getString(\"Language\", \"en\");\n\t\tSystem.out.println(\"Default lang: \"+lang);\n\t\tif(lang.equalsIgnoreCase(\"ar\"))\n\t\t{\n\t\t\tmyLocale = new Locale(lang);\n\t\t\tsaveLocale(lang);\n\t\t\tLocale.setDefault(myLocale);\n\t\t\tandroid.content.res.Configuration config = new android.content.res.Configuration();\n\t\t\tconfig.locale = myLocale;\n\t\t\tthis.getBaseContext().getResources().updateConfiguration(config, this.getBaseContext().getResources().getDisplayMetrics());\n\t\t\tCommonFunctions.lang = \"ar\";\n\t\t}\n\t\telse{\n\t\t\tmyLocale = new Locale(lang);\n\t\t\tsaveLocale(lang);\n\t\t\tLocale.setDefault(myLocale);\n\t\t\tandroid.content.res.Configuration config = new android.content.res.Configuration();\n\t\t\tconfig.locale = myLocale;\n\t\t\tthis.getBaseContext().getResources().updateConfiguration(config, this.getBaseContext().getResources().getDisplayMetrics());\n\t\t\tCommonFunctions.lang = \"en\";\n\t\t}\n\t}", "private String getLocalizedString(String key) {\n\t\treturn new StringResourceModel(key, null).getObject();\n\t}", "protected LocaleAieon( String name, Locale locale )\r\n\t{\r\n\t\tsuper( name, S_LOCALE);\r\n\t\tsuper.set( S_LOCALE, locale.getLanguage() );\r\n\t\tsuper.set( S_LOCALE, locale.getLanguage() );\r\n\t\tsuper.set( Attributes.COUNTRY.name(), locale.getCountry() );\r\n\t\tsuper.set( Attributes.VARIANT.name(), locale.getVariant() );\r\n\t}", "public void setLocalizedString(String newString) {\r\n localizedString = newString;\r\n }", "@Override\n public String getLocalizedDescription()\n {\n return null;\n }", "public String getLocalizedString( String name ) {\n\t\tString outString = \"\";\r\n\t\tint id = getResources().getIdentifier( name, \"string\", getPackageName() );\r\n\t\tif ( id == 0 )\r\n\t\t{\r\n\t\t\t// 0 is not a valid resource id\r\n\t\t\tLog.v(\"VrLocale\", name + \" is not a valid resource id!!\" );\r\n\t\t\treturn outString;\r\n\t\t} \r\n\t\tif ( id != 0 ) \r\n\t\t{\r\n\t\t\toutString = getResources().getText( id ).toString();\r\n\t\t\t//Log.v(\"VrLocale\", \"getLocalizedString resolved \" + name + \" to \" + outString);\r\n\t\t}\r\n\t\treturn outString;\r\n\t}", "public interface BelphegorDisplayStrings extends Messages {\n @Key(\"addCategoryPrompt\")\n String addCategoryPrompt();\n\n @DefaultMessage(\"Successfully added {0} to the following Categories: {1,list}.\")\n @AlternateMessage({\"=1\", \"Successfully added {0} to the following Category: {1,list}.\"})\n @Key(\"appCategorizeSuccess\")\n String appCategorizeSuccess(String name, @PluralCount List<String> groupNames);\n\n @Key(\"appDescription\")\n String appDescription();\n\n String appDocumentationLabel();\n\n @Key(\"avgUserRatingColumnLabel\")\n String avgUserRatingColumnLabel();\n\n @Key(\"categorize\")\n String categorize();\n\n @Key(\"clearSelection\")\n String clearSelection();\n\n @Key(\"confirmDeleteAppCategory\")\n String confirmDeleteAppCategory(String name);\n\n @Key(\"confirmDeleteAppTitle\")\n String confirmDeleteAppTitle();\n\n @Key(\"deleteApp\")\n String deleteApp();\n\n @Key(\"deleteCategory\")\n String deleteCategory();\n\n String docHelpHtml();\n\n @Key(\"editApp\")\n String editApp();\n\n @Key(\"moveCategory\")\n String moveCategory();\n\n @Key(\"referenceGenomes\")\n String referenceGenomes();\n\n @Key(\"renamePrompt\")\n String renamePrompt();\n\n @Key(\"restoreApp\")\n String restoreApp();\n\n @Key(\"restoreAppSuccessMsg\")\n String restoreAppSuccessMsg(String name, String s);\n\n @Key(\"restoreAppSuccessMsgTitle\")\n String restoreAppSuccessMsgTitle();\n\n @Key(\"selectCategories\")\n String selectCategories(String name);\n\n @Key(\"systemMessages\")\n String systemMessages();\n\n @Key(\"tempDisable\")\n String tempDisable();\n\n String templateLinkPopupHeading();\n\n String templateLinkTitle();\n\n @Key(\"toolRequests\")\n String toolRequests();\n\n @Key(\"toolAdmin\")\n String toolAdmin();\n\n String updateDocumentationSuccess();\n}", "public UserLangRecord() {\n super(UserLang.USER_LANG);\n }", "public Messages(String lang) {\n \t\tif (lang != null) {\n \t\t\tStringTokenizer lanTok = new StringTokenizer(lang, \",\");\n \t\t\tint maxTok = lanTok.countTokens();\n \n \t\t\tString slang[] = new String[maxTok];\n \t\t\tfloat qlang[] = new float[maxTok];\n \n \t\t\t// quick and dirty, it would be better to use Jigsaw's classes\n \t\t\twhile (lanTok.hasMoreTokens()) {\n \t\t\t\tString l = lanTok.nextToken().trim().toLowerCase();\n \t\t\t\tint qualsep = l.indexOf(';');\n \t\t\t\tfloat qval = 1;\n \t\t\t\tif (qualsep != -1) {\n \t\t\t\t\tString p = l.substring(qualsep + 1);\n \t\t\t\t\tl = l.substring(0, qualsep);\n \t\t\t\t\tif (p.startsWith(\"q=\")) {\n \t\t\t\t\t\tqval = Float.parseFloat(p.substring(2));\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\tfor (int i = 0; i < maxTok; i++) {\n \t\t\t\t\tif (slang[i] == null) {\n \t\t\t\t\t\tslang[i] = l;\n \t\t\t\t\t\tqlang[i] = qval;\n \t\t\t\t\t\tbreak;\n \t\t\t\t\t} else if (qval > qlang[i]) {\n \t\t\t\t\t\tSystem.arraycopy(slang, i, slang, i + 1, (maxTok - i - 1));\n \t\t\t\t\t\tSystem.arraycopy(qlang, i, qlang, i + 1, (maxTok - i - 1));\n \t\t\t\t\t\tslang[i] = l;\n \t\t\t\t\t\tqlang[i] = qval;\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\tfor (int i = 0; i < maxTok; i++) {\n \t\t\t\tString l = slang[i];\n \t\t\t\tproperties = (Utf8Properties) languages.get(l);\n \t\t\t\tif (properties != null) {\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t\tint minusIndex = l.indexOf('-');\n \t\t\t\tif (minusIndex != -1) {\n \t\t\t\t\t// suppressed -cn in zh-cn (example)\n \t\t\t\t\tl = l.substring(0, minusIndex);\n \t\t\t\t\tproperties = (Utf8Properties) languages.get(l);\n \t\t\t\t}\n \t\t\t\tif (properties != null) {\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\tif (properties == null) {\n \t\t\tproperties = (Utf8Properties) languages.get(\"en\");\n \t\t}\n \t}", "@Override\r\n\t\tpublic String getLang()\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}", "public Language() {\r\n\t}", "@DISPID(-2147413103)\n @PropGet\n java.lang.String lang();", "Builder addInLanguage(Text value);", "public TranslationInformation(String pluginName){\n\t\tthis.pluginName = pluginName;\n\t\tthis.resources = new ArrayList<ITranslationResource>();\n\t}", "@Override\r\n public void initialize(URL url, ResourceBundle rb) {\r\n // TODO\r\n UnaryOperator<TextFormatter.Change> filter = new UnaryOperator<TextFormatter.Change>() {\r\n\r\n @Override\r\n public TextFormatter.Change apply(TextFormatter.Change t) {\r\n\r\n if (t.isReplaced()) \r\n if(t.getText().matches(\"[^0-9]\"))\r\n t.setText(t.getControlText().substring(t.getRangeStart(), t.getRangeEnd()));\r\n \r\n\r\n if (t.isAdded()) {\r\n if (t.getControlText().contains(\".\")) {\r\n if (t.getText().matches(\"[^0-9]\")) {\r\n t.setText(\"\");\r\n }\r\n } else if (t.getText().matches(\"[^0-9.]\")) {\r\n t.setText(\"\");\r\n }\r\n }\r\n\r\n return t;\r\n }\r\n };\r\n remis.setTextFormatter(new TextFormatter<>(filter));\r\n }" ]
[ "0.6880177", "0.6834008", "0.6673064", "0.6470955", "0.6445001", "0.63305986", "0.62912816", "0.627491", "0.62676084", "0.62613994", "0.6225523", "0.62032175", "0.6189833", "0.61897314", "0.6156861", "0.6138863", "0.6138863", "0.6138863", "0.61079156", "0.6048611", "0.6046876", "0.60411656", "0.5980805", "0.5965791", "0.59563965", "0.59446394", "0.5940101", "0.59239346", "0.58845353", "0.58797306", "0.58599746", "0.5858181", "0.585328", "0.5850901", "0.58416885", "0.5840417", "0.58370435", "0.58221817", "0.5814618", "0.5812779", "0.581276", "0.5811085", "0.5779356", "0.57691", "0.57436883", "0.5738032", "0.57332116", "0.5726905", "0.57222086", "0.57162386", "0.5691946", "0.56862104", "0.56766", "0.5662758", "0.5647035", "0.56370187", "0.56309205", "0.5622667", "0.56181777", "0.558775", "0.558574", "0.557952", "0.5538327", "0.55315673", "0.5525224", "0.55238837", "0.5515465", "0.55143356", "0.5510925", "0.5490137", "0.54799443", "0.54764223", "0.54719234", "0.5468165", "0.54637", "0.5462699", "0.5449144", "0.54425424", "0.5439455", "0.54366004", "0.5431671", "0.5417311", "0.54152685", "0.5409444", "0.5405253", "0.540385", "0.54030085", "0.5387497", "0.5386903", "0.5383997", "0.53782654", "0.537241", "0.53605956", "0.53497154", "0.53370273", "0.53304034", "0.53269285", "0.5319638", "0.5312405", "0.5307986", "0.53050053" ]
0.0
-1
bazov interface za vsichki "filtyr" elementi
public interface EditableFilterElement { public String getTextValue(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface Filtrado extends ItemFiltro {\n\t/**\n\t * A exemplo da interface Serializable, mas nao necessariamente pelo menos\n\t * motivo, esta interface nao define nenhum metodo.\n\t */\n\t\n\t/**\n\t* Deseja-se ter um elo entre Filtrado e registro,\n\t* visto que o que se deseja eh armazenadar os\n\t* filtrados no output.txt para uso posterior.\n\t* @return Registro Registro \n\t* */\n\tpublic Registro getRegistro();\n\n}", "public interface Visitable {\n // toate obiectele ce implementeaza Visitable, trebuie sa aiba metoda\n // accept\n void accept(Visitor visitor, BufferedImage im);\n // metoda citire, care citeste si initializeaza campurile fiecarei\n // figuri ce o suprascrie(ce implementeaza clasa Visitable)\n void citire(FileReader f);\n}", "public interface CambioImagenPerfil{\n\n void opcionEscogida(String app);\n }", "@Override\r\n public List<Filme> getListaFilmes(){\r\n return listaFilme;\r\n }", "public interface FileFilter {\n\t\n\t/**\n\t * Metoda provjerava zadovoljava li file zadani implementirani filter, ovisno o razredu.\n\t * \n\t * @param f file nad kojim se provjerava \n\t * @return true ili false, ovisno o uspjesnosti provjere\n\t */\n\tpublic boolean accepts(File f);\n\n}", "public interface FenleiView {\n void getFenlei(List<Fenlei.DataBean> data);\n void onFaliure(Call call, IOException e);\n\n}", "public String getAnoFilmagem();", "public interface FilmeDetalheContract {\n\n interface View {\n void loadFilme(Bitmap bitmap, Filme filme);\n }\n\n interface Presenter {\n void loadFilme(Intent intent);\n }\n}", "public interface Pasticcere {\r\n //No attributes\r\n public void accendiForno();\r\n}", "void setFoil (Foil foil) {\n current_part.foil = foil;\n }", "public interface FileView {\n\n /**\n * 设置标题\n * @param preText 前标题\n * @param nowText 现标题\n */\n void setTitle(String preText, String nowText);\n\n /**\n * 给列表设置适配器\n * @param adapter 适配器\n */\n void setAdapter(DocumentFileAdapter adapter);\n\n /**\n * 获取适配器\n * @return 适配器\n */\n DocumentFileAdapter getAdapter();\n\n /**\n * 设置刷新条\n * @param b 设置控制\n */\n void setRefreshing(boolean b);\n\n /**\n * 显示密码框\n */\n void showPasswordView();\n\n /**\n * u盘插入的操作\n * @param intent\n */\n void onUDiskInsert(Intent intent);\n\n /**\n * u盘移除的操作\n * @param intent\n */\n void onUDiskRemove(Intent intent);\n}", "public void modifierFiche( Fiche fiche) ;", "public interface Bookshelf extends Element {\n\n\t/**\n\t * Zwraca unikalna nazwe polki\n\t * @return nazwa\n\t */\n\tpublic String getName();\n\n\t/**\n\t * Zwraca tutoly ksiazek jakie sie znajduja na tej polce\n\t * @return\n\t */\n\tpublic Set<Title> getValidTitles();\n\n\t/**\n\t * Metoda okresla czy podany tytul jest poprawny dla tej polki\n\t * @param title tytul\n\t * @return\n\t */\n\tpublic boolean isValidTitle(Title title);\n\n\t/**\n\t * Metoda zwraca polozenie miejsca gdzie powinien znajdowac sie robot,\n\t * aby mogl korzystac z polki\n\t * @return\n\t */\n\tpublic Position getRobotPadPosition();\n\n\t/**\n\t * Metoda zwraca kierunek w jakim powinien byc zwrocony robot,\n\t * aby mogl korzystac z polki\n\t * @return\n\t */\n\tpublic Direction getCorrectRobotDirection();\n}", "public Part getFotoPerfil(){\n return fotoPerfil;\n }", "public interface SpectralFile_ScansLvlGt1Partial_FileContents_Root_IF {\n\n}", "public interface IRasterFile{\r\n\t/**\r\n\t * Obtiene el Tamaño de cada fichero de que consta el raster en bytes. \r\n\t * @return long que representa el tamaño\r\n\t */\r\n\tpublic long[] getFileSize();\r\n\t/**\r\n\t * Obtiene el nombre de de cada fichero de que consta el raster. En caso de estar en disco\r\n\t * debe ofrecerse con la ruta completa.\r\n\t * @return Cadena con el nombre del fichero.\r\n\t */\r\n\tpublic String[] getFileName();\r\n\t/**\r\n\t * Obtiene el número de ficheros de que consta el raster.\r\n\t * @return Número de ficheros.\r\n\t */\r\n\tpublic int getFileCount();\r\n\t/**\r\n\t * Formato del fichero raster. Puede devolver la extensión correspondiente al\r\n\t * fichero\r\n\t * @return String que representa el formato\r\n\t */\r\n\tpublic String getFileFormat();\r\n}", "@Override\n\tpublic void obavesti(KruznaFigura figura) {\n\t\t\n\t}", "private Films() {\n\t\tsuper(\"films\");\n\t}", "public int getFileno() {\n return internalFileno;\n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public interface FlightDetails\n{\n\n double getPrice();\n\n boolean getFlightType(String name);\n/**\n boolean isVisible();\n\n void setVisibility(boolean isVisible);*/\n\n}", "void setFoil (String name) {\n current_part.foil = (Foil)foils.get(name);\n }", "public interface CamAPI {\n\n\n public String getPath();\n\n public String up();\n\n public String left();\n\n public String right();\n\n public String down();\n\n public String center();\n\n public String img();\n\n\n}", "private void lesFil()\n\t{\n\t\tDATAFIL = datafil(false);\n\n\t\ttry ( ObjectInputStream innfil = new ObjectInputStream( new FileInputStream( DATAFIL ) ) )\n\t\t{\n\t\t\tbr = (Boligregister) innfil.readObject();\n\t\t\tvisMelding( \"Data er hentet fra fil.\" );\n\t\t}\n\t\tcatch(ClassNotFoundException cnfe)\n\t\t{\n\t\t\tvisMelding( \"<html>Feil:<br><br>\" + cnfe.getMessage() + \"<br><br>Oppretter tom datafil. Tar vare p&aring; gammel datafil.</html>\" );\n\t\t\ttomtRegister();\n\t\t\tDATAFIL = datafil(true);\n\t\t\tskrivTilFil(false);\n\t\t}\n\t\tcatch(FileNotFoundException fne)\n\t\t{\n\t\t\tvisMelding( \"Ingen datafil funnet. Oppretter tom datafil.\" );\n\t\t\ttomtRegister();\n\t\t\tskrivTilFil(false);\n\t\t}\n\t\tcatch(IOException ioe)\n\t\t{\n\t\t\tvisMelding( \"<html>Innlesingsfeil. Oppretter tom datafil. Tar vare p&aring; gammel datafil.</html>\" );\n\t\t\ttomtRegister();\n\t\t\tDATAFIL = datafil(true);\n\t\t\tskrivTilFil(false);\n\t\t}\n\t}", "public interface Najpopulaniji {\n\n public void najpop(Film f);\n\n public void download(ArrayList<Film> lista);\n\n public void downloadPrethodnihFilmova(ArrayList<Film> lista);\n\n}", "public interface IDetailView {\n public void setImage(String url);\n\n // mètodes per assignar el nom i cognom\n public void setNom(String text);\n public void setDivisio(String text);\n public void setNivell(String text);\n public void setObjPref(String text);\n public void setTipusAtac(String text);\n /*public void setUrlImatge(String text) ;*/\n}", "public interface SelectNotFolio {\n\n void callsetFoliolist(NotThere mModel);\n\n void selectednotFolio(TrailerFolios obj);\n\n}", "public static void main(String[] args) {\n Ator a = new Ator(\"Alberto\");\r\n Ator b = new Ator(\"Vagner moura\");\r\n Ator c = new Ator(\"Ator 1\");\r\n\r\n Filme f= new Filme(\"Tropa de elite\", 2011);\r\n\r\n f.addPapel(a,\"papel 1\", false);\r\n f.addPapel(b,\"papel 2\", true);\r\n f.addPapel(c,\"papel 3\", true);\r\n\r\n\r\n System.out.println(a.getFilmes());\r\n /*System.out.println(f.getProtagonista());\r\n System.out.println(f);\r\n System.out.println(a);\r\n System.out.println(b);\r\n System.out.println(c);*/\r\n\r\n\r\n }", "public interface TElement extends HasID, THasPropertyChange, PropertyChangeListener, Serializable {\n\n /**\n * Used if a requested attribute is not a member of the TElement derived\n * Class.\n */\n public final Object NOT_DEFINED = \"ATT_NOT_DEFINED\";\n\n /**\n * return the attribute value or teal.sim.TElement.NOT_DEFINED\n **/\n public Object getProperty(String attName);\n\n /**\n * set the attribute value return value is success\n **/\n public boolean setProperty(String attName, Object value);\n\n public void addRoute(Route r);\n \n /** \n * Establish a route from this object's source attribute and the targeted \n * attribute of another TElement. \n **/\n public void addRoute(String attribute, TElement listener, String targetName);\n \n \n /** \n * Remove a route from this object's source attribute and the target's output attribute. \n **/\n public void removeRoute(String attribute, TElement listener, String targetName);\n}", "public interface LazElement {\n Element getElement(Element actorTabSliderElement);\n\n String getBeanName(Object data);\n}", "public void setAnoFilmagem(String anoFilmagem);", "@Override\r\n public void adicionarFilme(Filme filme) {\r\n listaFilme.add(filme);\r\n }", "public interface Element_itf {\n\n// Gestion de la position\n\t/** Obtenir la position\n\t * @return position la position\n\t */\n\tpublic Position getPosition();\n\n// Méthode estDestructible\n\t/** Renvoie vrai si l'élément est destructible a la position\n\t * @param position la position depuis laquelle on tente de détruire l'élément\n\t * @return true si on peut le detruire, false sinon\n\t */\n\tpublic boolean estDestructible (Position position);\n\n// Affichage du niveau\n\t/** afficher tous les détails de l'element\n\t * @return string détail de l'element\n\t */\n\tpublic String toString();\n\n}", "public String getPerfilDescripcion();", "public interface ITier {\n\n\tpublic String getName();\n\tpublic void setName(String name);\n\tpublic Zoo getZoo();\n\tpublic void setZoo(Zoo zoo);\n\t\n\tpublic void fuettere(Personal personal); //implemented. Gibt aus, dass tier von personal gefüttert wird.\n\tpublic void lebtIn(/*String gehege, Gehege neuesGehege, */Gehege gehege); //implemented\n\t\t\n}", "Filmes(String nome,String genero){\n\t\tthis.nome = nome;\n\t\tthis.genero = genero;\n\t}", "public interface ITire {\n\n /**\n * 轮胎\n */\n void tire();\n}", "@Override\n\tpublic void acomodaVista() {\n\n\t}", "public interface FileSelectInfo\n{\n /**\n * Returns the base folder of the traversal.\n * @return FileObject representing the base folder.\n */\n FileObject getBaseFolder();\n\n /**\n * Returns the file (or folder) to be considered.\n * @return The FileObject.\n */\n FileObject getFile();\n\n /**\n * Returns the depth of the file relative to the base folder.\n * @return The depth of the file relative to the base folder.\n */\n int getDepth();\n}", "public RepositorioAvioes() {\n avioes = new ArrayList<Aviao>();\n }", "public interface FileDisplayInterface {\n\t void writeToFile();\n}", "Objet getObjetAlloue();", "public ImageIcon getFoto(){\r\n return (ImageIcon)beneficiario[5];\r\n }", "public interface FilterView {\n\n void addHairColor(List<String> color);\n void addProfession(List<String> profession);\n\n List<String> getProfessions();\n List<String> getHairColor();\n String getName();\n String getMinAge();\n String getMaxAge();\n String getMinHeight();\n String getMaxHeight();\n String getMinWeight();\n String getMaxWeight();\n\n}", "public IFile getIFile ();", "java.lang.String getFmla();", "public interface IPerfilFragmentPresenter {\n public void obtenerMascotasBD();\n public void mostrarMascotasRV();\n //obtener informacion de webservices\n public void obtenerID();\n public void obtenerMediosRecientes(MascotaPerfil fichaUsuario);\n\n}", "public interface IFrameProcessor\n{\n /**\n * @param rawFrame Das Rohdatenframe\n * @return Das verarbeitete Frame\n */\n Bitmap processFrame(Bitmap rawFrame);\n}", "public interface CropperedModel {\r\n\r\n\r\n\r\n}", "public interface fl {\n void a(ListIterator<fe> listIterator);\n}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "fotos(){}", "private static void grabarYleerMedico() {\r\n\r\n\t\tMedico medico = new Medico(\"Manolo\", \"Garcia\", \"62\", \"casa\", \"2\", null);\r\n\t\tDTO<Medico> dtoMedico = new DTO<>(\"src/Almacen/medico.dat\");\r\n\t\tif (dtoMedico.grabar(medico) == true) {\r\n\t\t\tSystem.out.println(medico.getNombre());\r\n\t\t\tSystem.out.println(medico.getDireccion());\r\n\t\t\tSystem.out.println(\"Medico grabado\");\r\n\t\t}\r\n\t\t;\r\n\t\tMedico medicoLeer = dtoMedico.leer();\r\n\t\tSystem.out.println(medicoLeer);\r\n\t\tSystem.out.println(medicoLeer.getNombre());\r\n\t}", "public interface FaceInterface {\n List<PointF> getFacePoints();\n\n List<PointF> getLeftEyePoints();\n\n List<PointF> getRightEyePoints();\n\n public List<PointF> transformPoints(DrawingViewConfig config, boolean mirrorPoints);\n\n public RectF getEyesRect();\n public Emotions getEmotions();\n Emojis getEmojis();\n Appearance getAppearance();\n}", "public interface IFRestaurant4FindFrgView\n{\n void requestNetErrorCallback(String interfaceName, Throwable e);\n\n void getIndexRecommendSuccess(String type, FRestaurannt4FindBean restaurannt4FindBean);\n\n void getCarouselResSuccess(ArrayList<FPromotionBean> pBeenLst);\n}", "public FI_() {\n }", "public interface CasaItf {\n\n /**\n * Pega a posição que está no eixo X (abcissa)\n *\n * @return posição atual no eixo X\n */\n int getPosicaoX();\n\n /**\n * Pega a posição que está no eixo Y (ordenada)\n *\n * @return posição atual no eixo Y\n */\n int getPosicaoY();\n\n\n /**\n * Modifica a cor da casa\n *\n * @param cor Nova cor da casa\n */\n void setCor(Color cor);\n\n /**\n * Pega a cor da casa\n *\n * @return Cor da casa\n */\n Color getCor();\n\n /**\n * Insere uma peça na casa\n *\n * @param peca Peça que irá ocupar a casa\n */\n void setPeca(Peca peca);\n\n /**\n * Remove a peça da casa\n */\n void removePeca();\n\n /**\n * Pega a peça que está ocupando a casa\n *\n * @return Peça que está na casa\n */\n Peca getPeca();\n\n /**\n * Verifica se a casa tem alguma peça\n *\n * @return <code>true</code> se tiver alguma peça e <code>false</code> caso contrario\n */\n boolean temPeca();\n\n /**\n * Verifica se a casa tem alguma peça de uma determinada cor\n *\n * @return <code>true</code> se tiver alguma peça da cor desejada e <code>false</code> caso contrario\n */\n boolean temPeca(Color cor);\n\n /**\n * Verifica se a casa é igual.\n *\n * @param casa Casa a ser comparada\n * @return <code>true</code> se as casas forem iguais e <code>false</code> caso contrario\n */\n boolean verificaCasaIgual(CasaItf casa);\n\n /**\n * Verifica se a casa faz parte do passante.\n *\n * @return <code>true</code> se fizer parte do movimento passante e <code>false</code> caso contrario\n */\n boolean getMovimentoPassante();\n\n /**\n * Seta essa casa como passante.\n *\n * @param passante <code>true</code> se for passante e <code>false</code> caso contrario\n */\n void setMovimentoPassante(boolean passante);\n\n}", "public interface Poulet {\n /*DEFINIT le nombre de like effectué par ce poulet */\n public void setnombreLike(int nombre_like);\n\n /*DEFINIT le nombre de match de ce poulet */\n public void setnombreMatch(int nombre_match);\n\n}", "@Override\n\tpublic void tipoMovimento() {\n\t\tSystem.out.println(super.getNome() + \" anda com 4 patas.\");\n\t}", "public interface ViewChiTietBenh {\n void LayChiTietBenhThanhCong(BenhModel benh, Uri uri);\n void LayChiTietBenhThatBai();\n\n}", "interface ImageItemLF extends ItemLF {\n /**\n * Notifies L&F of an image change in the corresponding ImageItem.\n * @param img - the new image set in the ImageItem\n */\n void lSetImage(Image img);\n\n /**\n * Notifies L&F of an alternative text change \n * in the corresponding ImageItem.\n * @param altText - the new alternative text set in the ImageItem\n */\n void lSetAltText(String altText);\n}", "public interface Tigari {\npublic void printDetalii();\n}", "@Override\n\tpublic void visitarObjeto(Objeto o) {\n\t\t\n\t}", "public void brisiFilmoveSaGlumcem(String ime) {\n\t\t\n\t\tif (prviFilm != null) {\n\t\t\t\n\t\t\tFilm tekuciFilm = prviFilm;\n\t\t\t\n\t\t\twhile (tekuciFilm != null) {\n\t\t\t\t\n\t\t\t\tif (uFilmuGlumi(tekuciFilm.naziv, ime))\n\t\t\t\t\tobrisiFilm(tekuciFilm.naziv);\n\t\t\t\t\n\t\t\t\ttekuciFilm = tekuciFilm.veza;\n\t\t\t}\n\t\t\t\n\t\t} else {\n\t\t\tSystem.out.println(\"Spisak filmova je prazan.\");\n\t\t}\n\t\t\n\t}", "@Override\r\n\tprotected I_FX getFX_Modificar(UnidadFuncional_VO vo, String usr) {\n\t\treturn null;\r\n\t}", "public interface IFood {\n double printFood(); // visa hur många gram mat\n String foodsType(); // visa vilken sorts mat\n}", "interface AdministratorMakhlukHidup {\n /**\n * put in a MakhlukHidup in the monitored list\n * \n * @param n MakhlukHidup\n */\n public void fillDaftar(MakhlukHidup n);\n /**\n * put out a MakhlukHidup in the monitored list with certain value\n * \n * @param n MakhlukHidup\n */\n public void pluck(MakhlukHidup n);\n /**\n * put out a MakhlukHidup in the monitored list with certain index\n * \n * @param i integer index of the MakhlukHidup\n */\n public void pluck(int i);\n /**\n * create a thread to monitor each pair of MakhlukHidup\n */\n public void sinyal();\n /**\n * Get size of the daftar attribute\n * @return integer size, member of AdministratorMakhlukHidup\n */\n public int get_size();\n /**\n * Get the sum of MakhlukHidup in daftar attribute\n * @return integer count, number of MakhlukHidup inside daftar\n */\n public int get_count();\n /**\n * Get the daftar attribute that is represented by Vector\n * @return Vector of MakhlukHidup\n */\n public Vector<MakhlukHidup> get_daftar();\n /**\n * Get the contains of daftar attribute within certain index\n * @param i integer of index MakhlukHidup is placed\n * @return MakhlukHidup that wanted to be extracted from daftar attribute\n */\n public MakhlukHidup get_daftar(int i);\n /**\n * Set the size attribute\n * @param s integer size\n */\n public void set_size(int s);\n /**\n * Set the count attribute\n * @param c integer count\n */\n public void set_count(int c);\n}", "public FiltroMicrorregiao() {\r\n }", "public void leerPlanesDietas();", "public interface C2277a {\n String getNameType();\n\n @DrawableRes\n int getStatusIcon();\n\n @Nullable\n String getTagName();\n}", "public static interface FileFilter extends Serializable {\n\n /**\n * Tells whether the file shall be accepted, i.e. not filtered out.\n *\n * @param fileStatus describes the file of interest\n * @return whether the file shall pass the filter\n */\n boolean accept(FileStatus fileStatus);\n\n }", "@Override\r\n\tpublic void updateFilm(Film film) {\n\r\n\t}", "public interface TilinsiirtoValittaja {\n\n boolean tilisiirto(String nimi, int viitenumero, String tililta, String tilille, int summa);\n\n}", "private interface FilterFunction\n\t{\n\t\tpublic Boolean filter(Review review);\n\t}", "@Override\n\tpublic void compareFichierTo(Fichier f) {\n\t\t\n\t}", "void visitObjectField(FieldAttributes f, Type typeOfF, Object obj);", "public static interface FilterInfo\n/* */ {\n/* */ Class<?> serialClass();\n/* */ \n/* */ \n/* */ \n/* */ long arrayLength();\n/* */ \n/* */ \n/* */ long depth();\n/* */ \n/* */ \n/* */ long references();\n/* */ \n/* */ \n/* */ long streamBytes();\n/* */ }", "public interface IViewPicture {\n void setData(List<Picture> pics);\n void showData();\n}", "public void parler() {\n\t System.out.println(this.formulerMonNom()); // appel d'une méthode de l'objet\n\t System.out.println(\"Je suis un animal et j'ai \" + this.nombreDePatte + \" pattes\");\n\t }", "public void setFils(LinkedList<Noeud> l) {\n\t\t\tthis.fils = l;\n\t\t}", "public interface ContentModelFilter {\n\n\n boolean isAttributeDatastream(String dsid, List<String> types);\n\n\n boolean isChildRel(String predicate, List<String> types);\n}", "@Override\n public void memoria() {\n \n }", "public interface DataAccessor extends Comparable {\r\n\t\r\n /**\r\n * Reads binary <i>ScecVideo</i> object data from a file.\r\n * \r\n * @return whether operation was successful\r\n */\r\n public boolean readDataFile();\r\n \r\n /**\r\n * Writes binary <i>ScecVideo</i> object data to object library.\r\n * \r\n * @return whether operation was successful\r\n */\r\n public boolean writeDataFile();\r\n \r\n /**\r\n * Reads <i>ScecVideo</i> object attribute data from a file.\r\n * \r\n * @param file to read from\r\n * @return whether operation was successful\r\n */\r\n public boolean readAttributeFile(File file);\r\n \r\n /**\r\n * Writes <i>ScecVideo</i> object attribute data to a file.\r\n * \r\n * @return whether operation was successful\r\n */\r\n public boolean writeAttributeFile();\r\n\r\n /**\r\n * Specifies if a <i>ScecVideo</i> object's data arrays and Java3D graphic\r\n * representations should be filled or cleared.\r\n * \r\n * @param load whether to load or clear data arrays\r\n */\r\n public void setInMemory(boolean load);\r\n \r\n /**\r\n * Returns whether a <i>ScecVideo</i> object's data arrays and Java3D graphic\r\n * representations are loaded or not.\r\n * \r\n * @return whether data loaded or not\r\n */\r\n public boolean isInMemory();\r\n \r\n /**\r\n * Specifies whether a <i>ScecVideo</i> object should be visible or not.\r\n * \r\n * @param show whether to show or hide an object\r\n */\r\n public void setDisplayed(boolean show);\r\n \r\n /**\r\n * Returns if this <i>ScecVideo</i> object is displayed\r\n * \r\n * @return whether visible or hidden\r\n */\r\n public boolean isDisplayed();\r\n \r\n /**\r\n * Returns the display name (not actual file name, although the two may be\r\n * similar) of a <i>ScecVideo</i> object.\r\n * \r\n * @return the object's name\r\n */\r\n public String getDisplayName();\r\n\r\n /**\r\n * Sets the name of this <i>ScecVideo</i> object as it will be displayed in any GUIs.\r\n * \r\n * @param name to set\r\n */\r\n public void setDisplayName(String name);\r\n \r\n /**\r\n * Returns a reference to a <i>ScecVideo</i> object's attribute file. An object's\r\n * attribute file is unique and can be used to test for equality of two objects.\r\n * \r\n * @return attribute file reference\r\n */\r\n public File getAttributeFile();\r\n \r\n /**\r\n * Returns a library-relative path to an object's attribute file.\r\n * \r\n * @return attribute file path\r\n */\r\n public String getAttributeFileLibPath();\r\n \r\n /**\r\n * Returns a reference to a <i>ScecVideo</i> object's data file.\r\n * \r\n * @return data file reference\r\n */\r\n public File getDataFile();\r\n\r\n /**\r\n * Returns the citation-style reference for this <i>ScecVideo</i> object.\r\n * \r\n * @return the object's citation\r\n */\r\n public String getCitation();\r\n \r\n /**\r\n * Sets the citation-style reference of this <i>ScecVideo</i> object.\r\n * \r\n * @param citation to set\r\n */\r\n public void setCitation(String citation);\r\n \r\n /**\r\n * Returns the full reference of this <i>ScecVideo</i> object.\r\n * \r\n * @return the object's reference\r\n */\r\n public String getReference();\r\n\r\n /**\r\n * Sets the full reference of this <i>ScecVideo</i> object.\r\n * \r\n * @param reference to set\r\n */\r\n public void setReference(String reference);\r\n \r\n /**\r\n * Returns any additional notes or comments about this <i>ScecVideo</i> object.\r\n * \r\n * @return the object's notes\r\n */\r\n public String getNotes();\r\n \r\n /**\r\n * Sets any additional notes or comments about this <i>ScecVideo</i> object.\r\n * \r\n * @param notes to set\r\n */\r\n public void setNotes(String notes);\r\n\r\n /**\r\n * Returns whether this object is equivalent to another. Implementors should\r\n * be able to compare <i>ScecVideo</i> data objects as well as files.\r\n * \r\n * @param object\r\n * @return whether objects are equal (have same source)\r\n */\r\n public boolean equals(Object object);\r\n}", "public interface MovimientoConFlete extends MovimientoCosteable{\t\r\n\t\r\n\tpublic String getRemision() ;\r\n\t\r\n\tpublic Producto getProducto();\r\n\t\r\n\tpublic Sucursal getSucursal();\r\n\t\r\n\tpublic Long getDocumento();\r\n\t\r\n\tpublic Date getFecha();\r\n\t\r\n\tpublic double getKilosCalculados();\r\n\t\r\n\tpublic double getCantidad();\r\n\t\r\n\tpublic double getFactor();\r\n\t\r\n\tpublic String getTipoDocto();\r\n\t\r\n\tpublic BigDecimal getCostoFlete();\t\r\n\r\n\tpublic void setCostoFlete(BigDecimal costoFlete);\r\n\t\r\n\tpublic BigDecimal getImporteDelFlete();\r\n\r\n\tpublic AnalisisDeFlete getAnalisisFlete();\r\n\r\n\tpublic void setAnalisisFlete(AnalisisDeFlete analisisFlete);\r\n\t\r\n\tpublic void actualizarCosto();\r\n\r\n}", "public interface FileType {\n\tString name();\n}", "public void omniDrive() {\r\n \r\n }", "Input getObjetivo();", "private static void alimenterAttributs() {\r\n\t\t\r\n\t\t/* alimente 'properties' avec la valeur \r\n\t\t * fournie par le gestionnaireProperties. */\r\n\t\tproperties = gestionnaireProperties.getProperties();\r\n\t\t\r\n\t\t/* alimente 'pathAbsoluFichierProperties' \r\n\t\t * avec la valeur fournie par le gestionnaireProperties. */\r\n\t\tpathAbsoluFichierProperties \r\n\t\t\t= gestionnaireProperties.getPathAbsoluFichierProperties();\r\n\t\t\r\n\t}", "void citire(FileReader f);", "public void filtrarOfertas() {\n\n List<OfertaDisciplina> ofertas;\n \n ofertas = ofertaDisciplinaFacade.filtrarEixoCursoTurnoCampusQuad(getFiltrosSelecEixos(), getFiltrosSelecCursos(), turno, campus, quadrimestre);\n\n dataModel = new OfertaDisciplinaDataModel(ofertas);\n \n //Após filtrar volta os parametros para os valores default\n setFiltrosSelecEixos(null);\n setFiltrosSelecCursos(null);\n turno = \"\";\n quadrimestre = 0;\n campus = \"\";\n }", "private static void ucitajVaspitace(Vrtic v, String fn)\n {\n if(!Svetovid.testIn(fn))\n return;\n\n System.out.println(\"Ucitavam vaspitace...\");\n\n while(Svetovid.in(fn).hasMore())\n v.dodaj(Svetovid.in(fn).readLine());\n\n Svetovid.in(fn).close();\n }", "public interface Interfaz_Icon {\n //interfaz de comunicacion entre fragment y activity\n public void select_details(int icon, String text);\n}", "public HTMLSelectElement getElementFciclo() { return this.$element_Fciclo; }", "public void furyo ()\t{\n }", "public interface IWrfResource extends IAdaptableObject {\r\n\r\n /**\r\n * Returns the path of this resource\r\n * \r\n * @return the path of this resource\r\n */\r\n Path getPath();\r\n\r\n /**\r\n * Returns the provider managing this resource node\r\n * \r\n * @return the provider managing this resource node\r\n */\r\n IWrfResourceProvider getProvider();\r\n\r\n /**\r\n * This method is used to notify all registered/loaded adapters of this\r\n * resource.\r\n * \r\n * @param event the event used to notify adapters.\r\n * @see IWrfResourceAdapter#handleEvent(Object)\r\n */\r\n void notifyAdapters(Object event);\r\n\r\n /**\r\n * Removes this resource from the storage.\r\n */\r\n void remove();\r\n\r\n}", "public interface VCFIterator extends Iterator<VCFVariant> {\n\n\tpublic VCFHeaders getHeaders();\n\n}", "public interface IWlanElement {\n\n\t/**\n\t * retrieve element id\n\t * \n\t * @return\n\t */\n\tpublic byte getElementId();\n\t\n\t/**\n\t * data \n\t * @return\n\t */\n\tpublic byte[] getData();\n\t\n}", "public void afficheInfos() {\n int i;\n Polygone p;\n for(i=0;i<this.list.size();i++){\n p = (Polygone) this.list.get(i);\n System.out.println(\"–––––––––––––––––––––\");\n System.out.println(\"Type : \" + p.toString());\n System.out.println(\"Sommet :\");\n System.out.print(p.texteSommets());\n System.out.println(\"Perimetre : \" + p.perimetre());\n System.out.println(\"Surface : \" + p.surface());\n System.out.println(\"–––––––––––––––––––––\");\n } \n }", "public interface ModeloProdutoProduto extends DCIObjetoDominio , ModeloProdutoProdutoAgregadoI , ModeloProdutoProdutoDerivadaI\n{\n\n\t\n\tpublic long getIdModeloProdutoProduto();\n\tpublic void setIdModeloProdutoProduto(long valor);\n\t\n\t\n\tpublic long getIdModeloProdutoRa();\n\tpublic void setIdModeloProdutoRa(long valor);\n\t\n\t\n\tpublic long getIdProdutoRa();\n\tpublic void setIdProdutoRa(long valor);\n\t\n\t\n}", "interface C0556a {\n void m2185a(Canvas canvas, RectF rectF, float f, Paint paint);\n }" ]
[ "0.61972064", "0.60425186", "0.5609985", "0.55285925", "0.55202967", "0.5469125", "0.54391396", "0.53909177", "0.53561556", "0.53393894", "0.5318971", "0.5300625", "0.5210988", "0.51526845", "0.51507956", "0.51319385", "0.51008344", "0.5097736", "0.5090746", "0.5066917", "0.5055219", "0.50507456", "0.5049636", "0.5034656", "0.50301075", "0.50170356", "0.5011478", "0.50088364", "0.50066495", "0.4991958", "0.49829814", "0.4964324", "0.49520034", "0.4948757", "0.4937625", "0.49314335", "0.48996928", "0.48955375", "0.48736754", "0.48589137", "0.4857195", "0.48562604", "0.4851578", "0.48502707", "0.48438898", "0.48317736", "0.48111194", "0.48069364", "0.48048782", "0.47969034", "0.4793761", "0.4792359", "0.47913587", "0.47862697", "0.47636294", "0.47622406", "0.47613224", "0.47610423", "0.4740597", "0.4737003", "0.4735458", "0.47306624", "0.4730274", "0.4728977", "0.47281897", "0.47275263", "0.4727183", "0.47245646", "0.47234648", "0.47201577", "0.47198036", "0.471117", "0.471028", "0.47077543", "0.4705977", "0.4705697", "0.47027695", "0.46963835", "0.46939942", "0.4692735", "0.46889916", "0.46886623", "0.46861592", "0.4678762", "0.46761465", "0.46689767", "0.46611792", "0.46600738", "0.46553162", "0.4649292", "0.46446526", "0.46430624", "0.4642738", "0.46415338", "0.46313187", "0.46306813", "0.46283996", "0.46239755", "0.4623481", "0.4622037" ]
0.47736937
54
TODO Autogenerated method stub
@Override public Org getOrgByType(String number) { Map<String,Object> param=new HashMap<String, Object>(); param.put("orgType", number); List<Org> olist=this.orgDao.getOrgByType(param); Org org=null; if(null != olist && olist.size()>0){ for(int i=0;i<olist.size();i++){ Org o=olist.get(i); if(i == 0){ org=o; }else{ if(o.getLevel()<org.getLevel()){ org=o; } } } } return org; }
{ "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
Selecting One Way option and providing the departure location
@Test public void testThatResultsAppearForAOneWayJourney() { operation.clickOnObject(OR.oneWayRadioButton); operation.setText(OR.fromTextBox, "Bangalore"); // wait for the auto complete options to appear for the origin wait.until(ExpectedConditions .visibilityOfAllElements(driver.findElement(By.id("ui-id-1")).findElements(By.tagName("li")))); List<WebElement> originOptions = driver.findElement(By.id("ui-id-1")).findElements(By.tagName("li")); operation.clickOnObject(originOptions.get(0)); // Providing the Arrival location operation.setText(OR.toTextBox, "Delhi"); // wait for the auto complete options to appear for the destination wait.until(ExpectedConditions .visibilityOfAllElements(driver.findElement(By.id("ui-id-2")).findElements(By.tagName("li")))); // select the first item from the destination auto complete list List<WebElement> destinationOptions = driver.findElement(By.id("ui-id-2")).findElements(By.tagName("li")); operation.clickOnObject(destinationOptions.get(0)); // Selecting the date of departure operation.clickOnObject(OR.datePickerLink); // all fields filled in. Now click on search operation.clickOnObject(OR.searchFlightsButton); wait.until(ExpectedConditions.presenceOfElementLocated(By.className("searchSummary"))); // verify that result appears for the provided journey search Assert.assertTrue(operation.isElementPresent(By.className("searchSummary"))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getDepartureLocation();", "private void setDropOffLocation(){\n \t\t// Defines the AutoCompleteTextView with the dropoff address\n \t\tacDropoff = (AutoCompleteTextView)findViewById(R.id.dropoffText);\n \t\t//Controls if the user has entered an address\n \t\tif(!acDropoff.getText().toString().equals(\"\")){\n \t\t\t// Gets the GeoPoint of the given address\n \t\t\tGeoPoint dropoffGeo = GeoHelper.getGeoPoint(acDropoff.getText().toString());\n \t\t\t// Gets the MapLocation from the given GeoPoint\n \t\t\tMapLocation mapLocation = (MapLocation) GeoHelper.getLocation(dropoffGeo);\n \t\t\t// Finds the dropoff location on the route closest to the given address\n \t\t\tLocation temp = findClosestLocationOnRoute(mapLocation);\n \t\t\t\n \t\t\t// Controls if the user has entered a NEW address\n \t\t\tif(dropoffPoint != temp){\n \t\t\t\t// Removes old pickup point (thumb)\n \t\t\t\tif(overlayDropoffThumb != null){\n \t\t\t\t\tmapView.getOverlays().remove(overlayDropoffThumb);\n \t\t\t\t\toverlayDropoffThumb = null;\n \t\t\t\t}\n \t\t\t\tmapView.invalidate();\n \t\t\t\t\n \t\t\t\t// If no pickup point is specified, we add the dropoff point to the map.\n \t\t\t\tif(pickupPoint == null){\n \t\t\t\t\tdropoffPoint = temp;\n \t\t\t\t\toverlayDropoffThumb = drawThumb(dropoffPoint, false);\n \t\t\t\t}else{ // If a pickup point is specified:\n \t\t\t\t\tList<Location> l = getApp().getSelectedJourney().getRoute().getRouteData();\n \t\t\t\t\t// Checks to make sure the dropoff point is after the pickup point.\n \t\t\t\t\tif(l.indexOf(temp) > l.indexOf(pickupPoint)){\n \t\t\t\t\t\t//makeToast(\"The droppoff point has to be after the pickup point\");\n \t\t\t\t\t\tAlertDialog.Builder ad = new AlertDialog.Builder(MapActivityAddPickupAndDropoff.this); \n \t\t\t\t\t\tad.setMessage(\"The droppoff point has to be after the pickup point\");\n \t\t\t\t\t\tad.setTitle(\"Unable to send request\");\n \t\t\t\t\t\tad.setPositiveButton(\"Ok\",new DialogInterface.OnClickListener() {\n \t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,int id) {\n \t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t });\n \t\t\t\t\t\tad.show();\n \t\t\t\t\t}else{\n \t\t\t\t\t\t// Adds the dropoff point to the map by drawing a cross\n \t\t\t\t\t\tdropoffPoint = temp;\n \t\t\t\t\t\toverlayDropoffThumb = drawThumb(dropoffPoint, false);\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t}else{\n \t\t\t//makeToast(\"Please add a dropoff address\");\n \t\t\tAlertDialog.Builder ad = new AlertDialog.Builder(MapActivityAddPickupAndDropoff.this); \n \t\t\tad.setMessage(\"Please add a dropoff address\");\n \t\t\tad.setTitle(\"Unable to send request\");\n \t\t\tad.setPositiveButton(\"Ok\",new DialogInterface.OnClickListener() {\n \t\t\t\tpublic void onClick(DialogInterface dialog,int id) {\n \t\t\t\t\t\n \t\t\t\t}\n \t\t\t });\n \t\t\tad.show();\n \t\t}\n \t}", "public void selectRouteChoice()\n\t{\n\t\tRoutePlanner planner = new RoutePlanner();\n\t\tthis.sequence = ap.listSequences.get(numTrips);\n\t\t// only minimisation\n\t\tif (ap.routeChoice.equals(\"DS\")) newPath = planner.roadDistance(originNode, destinationNode, ap);\n\t\telse if (ap.routeChoice.equals(\"AC\")) newPath = planner.angularChangeBased(originNode, destinationNode, ap);\n\t\telse if (ap.routeChoice.equals(\"TS\")) newPath = planner.angularChangeBased(originNode, destinationNode, ap);\n\t\t// minimisation plus only global landmarks\n\t\telse if (ap.routeChoice.equals(\"DG\")) newPath = planner.roadDistance(originNode, destinationNode, ap);\n\t\telse if (ap.routeChoice.equals(\"AG\")) newPath = planner.angularChangeBased(originNode, destinationNode, ap);\n\t\t// minimisation plus local and (optionally) global landmarks\n\t\telse if (ap.routeChoice.contains(\"D\") && ap.routeChoice.contains(\"L\")) newPath = planner.roadDistanceSequence(sequence, ap);\n\t\telse if (ap.routeChoice.contains(\"A\") && ap.routeChoice.contains(\"L\")) newPath = planner.angularChangeBasedSequence(sequence, ap);\n\t\t// anything with regions and/or barriers, or just barriers\n\t\telse if (ap.routeChoice.contains(\"R\")) newPath = planner.regionBarrierBasedPath(originNode, destinationNode, ap);\n\t\telse if (ap.routeChoice.contains(\"B\")) newPath = planner.barrierBasedPath(originNode, destinationNode, ap);\n\t}", "public void clickOnDepartureRadioButton()\n\t{\n\t\tif(departureRadioButton.isDisplayed())\n\t\t{\n\t\t\twaitForSeconds(10);\n\t\t\tUserdefinedFunctions.scrollusingCordinate();\n\t\t\twaitForSeconds(10);\n\t\t\tdepartureRadioButton.click();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"Consider the first selected depature flight\");\n\t\t}\n\t}", "public void chooseLocation(View v) {\n InternetConnectionChecker checker = new InternetConnectionChecker();\n Context context = getApplicationContext();\n final boolean isOnline = checker.isOnline(context);\n\n if (isOnline) {\n if (currentLocationCheckbox.isChecked()) {\n Toast.makeText(getApplicationContext(), \"Sorry, You have already chosen CURRENT LOCATION.\", Toast.LENGTH_LONG).show();\n } else {\n Intent child = new Intent(getApplicationContext(), ChooseLocationOnMapActivity.class);\n startActivityForResult(child, REQ_CODE_CHILD);\n }\n } else {\n Toast.makeText(getApplicationContext(), \"Map is not available when this device is offline.\", Toast.LENGTH_LONG).show();\n }\n }", "@Override\n public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {\n _too = String.valueOf(too.getSelectedItemId());\n Log.d(\"From City:%n %s\", _from);\n\n app.set_Twoway_Travel_too(_too);\n }", "public void selectNonstopForDeparture() {\n\t\tif (!nonStopButtonForDepartureTrip.isSelected()) {\n\t\t\tnonStopButtonForDepartureTrip.click();\n\t\t}\n\t}", "private void setPickupLocation(){\n \t\t// Defines the AutoCompleteTextView pickupText\n \t\tacPickup = (AutoCompleteTextView)findViewById(R.id.pickupText);\n \t\t// Controls if the user has entered an address\n \t\tif(!acPickup.getText().toString().equals(\"\")){\n \t\t\t// Gets the GeoPoint of the written address\n \t\t\tGeoPoint pickupGeo = GeoHelper.getGeoPoint(acPickup.getText().toString());\n \t\t\t// Gets the MapLocation of the GeoPoint\n \t\t\tMapLocation mapLocation = (MapLocation) GeoHelper.getLocation(pickupGeo);\n \t\t\t// Finds the pickup location on the route closest to the given address\n \t\t\tLocation temp = findClosestLocationOnRoute(mapLocation);\n \t\t\n \t\t\t//Controls if the user has entered a NEW address\n \t\t\tif(pickupPoint != temp){\n \t\t\t\t// Removes old pickup point (thumb)\n \t\t\t\tif(overlayPickupThumb != null){\n \t\t\t\t\tmapView.getOverlays().remove(overlayPickupThumb);\n \t\t\t\t\toverlayPickupThumb = null;\n \t\t\t\t}\n \t\t\t\tmapView.invalidate();\n \t\t\t\t\n \t\t\t\t// If no dropoff point is specified, we add the pickup point to the map.\n \t\t\t\tif(dropoffPoint == null){\n \t\t\t\t\tpickupPoint = temp;\n \t\t\t\t\toverlayPickupThumb = drawThumb(pickupPoint, true);\n \t\t\t\t}else{ // If a dropoff point is specified:\n \t\t\t\t\tList<Location> l = getApp().getSelectedJourney().getRoute().getRouteData();\n \t\t\t\t\t// Checks to make sure the pickup point is before the dropoff point.\n \t\t\t\t\tif(l.indexOf(temp) < l.indexOf(dropoffPoint)){\n \t\t\t\t\t\t//makeToast(\"The pickup point has to be before the dropoff point\");\n \t\t\t\t\t\tAlertDialog.Builder ad = new AlertDialog.Builder(MapActivityAddPickupAndDropoff.this); \n \t\t\t\t\t\tad.setMessage(\"The pickup point has to be before the dropoff point\");\n \t\t\t\t\t\tad.setTitle(\"Unable to send request\");\n \t\t\t\t\t\tad.setPositiveButton(\"Ok\",new DialogInterface.OnClickListener() {\n \t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,int id) {\n \t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t });\n \t\t\t\t\t\tad.show();\n \t\t\t\t\t}else{\n \t\t\t\t\t\t// Adds the pickup point to the map by drawing a cross\n \t\t\t\t\t\tpickupPoint = temp;\n \t\t\t\t\t\toverlayPickupThumb = drawThumb(pickupPoint, true);\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t}else{\n \t\t\t//makeToast(\"Please add a pickup address\");\n \t\t\tAlertDialog.Builder ad = new AlertDialog.Builder(MapActivityAddPickupAndDropoff.this); \n \t\t\tad.setMessage(\"Please add a pickup address\");\n \t\t\tad.setTitle(\"Unable to send request\");\n \t\t\tad.setPositiveButton(\"Ok\",new DialogInterface.OnClickListener() {\n \t\t\t\tpublic void onClick(DialogInterface dialog,int id) {\n \t\t\t\t\t\n \t\t\t\t}\n \t\t\t });\n \t\t\tad.show();\n \t\t}\n \t}", "private String getPickUpLocation() {\n return priceDetailsModule.findElement(By.className(\"seleniumPickupLocation\")).getText();\n }", "public String selectReturnPlace(String dest) throws InterruptedException {\n\n destination.clear();\n destination.sendKeys(dest);\n Thread.sleep(5000);\n destionationAirport= destionationTmenu.findElement(By.xpath(\"//span[contains(text(),'NYC')]\"));\n wait.until(ExpectedConditions.visibilityOf(destionationAirport));\n action.moveToElement(destionationAirport).click();\n System.out.println(\"Kolkata Airport is selected\");\n return destionationAirport.getText();\n }", "public void showLiaisonByClick()\t{\r\n \tSystem.out.print(\"Cliquez votre route: \");\r\n \tif (dessin.waitClick()) {\r\n \t float lon = dessin.getClickLon() ;\r\n \t float lat = dessin.getClickLat() ;\r\n \t \r\n \t float minDist = Float.MAX_VALUE ;\r\n \t Liaison chosen = null;\r\n \t \r\n \t for(Liaison liaison: this.routes)\t{\r\n \t \tfloat londiff = liaison.getLongitude() - lon;\r\n \t \tfloat latdiff = liaison.getLatitude() - lat;\r\n \t \tfloat dist = londiff*londiff + latdiff*latdiff ;\r\n \t \tif(dist < minDist)\t{\r\n \t \t\tchosen = liaison;\r\n \t \t\tminDist = dist;\r\n \t \t}\r\n \t }\r\n \t \r\n\t \tchosen.dessiner(dessin, this.numzone, Color.red);\r\n\t \tthis.dessin.putText(chosen.getLongitude(), chosen.getLatitude(), chosen.toString());\r\n\t \tSystem.out.println(chosen);\r\n\r\n \t}\r\n }", "@Override\n public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {\n _from = String.valueOf(from.getSelectedItemId());\n Log.d(\"From City:%n %s\", _from);\n\n app.set_Twoway_Travel_from(_from);\n }", "private void getLocation() {\n fields = Arrays.asList(Place.Field.ID, Place.Field.NAME, Place.Field.LAT_LNG);\n\n // Start the autocomplete intent.\n Intent intent = new Autocomplete.IntentBuilder(\n AutocompleteActivityMode.FULLSCREEN, fields)\n .build(this);\n startActivityForResult(intent, AUTOCOMPLETE_REQUEST_CODE);\n }", "@Override\n public void selectedUser(App app) {\n Point point = Point.fromLngLat(app.getLongitude(),app.getLatitude());\n LatLng latLng = new LatLng(point.latitude(), point.longitude());\n Point destinationPoint = Point.fromLngLat(latLng.getLongitude(), latLng.getLatitude());\n\n Point originPoint = Point.fromLngLat(locationComponent.getLastKnownLocation().getLongitude(),\n locationComponent.getLastKnownLocation().getLatitude());\n\n GeoJsonSource source = mapboxMap.getStyle().getSourceAs(\"destination-source-id\");\n if (source != null) {\n source.setGeoJson(Feature.fromGeometry(destinationPoint));\n }\n getRoute(originPoint, destinationPoint);\n CameraPosition position = new CameraPosition.Builder()\n .target(new LatLng(latLng.getLatitude(),latLng.getLongitude())) // Sets the new camera position\n .zoom(13)\n .bearing(180) // Rotate the camera\n .tilt(30) // Set the camera tilt\n .build(); // Creates a CameraPosition from the builder\n mapboxMap.animateCamera(CameraUpdateFactory.newCameraPosition(position),7000);\n directionbutton.show();\n\n }", "public void searchHotel(String destination, String locationType, String option) {\r\n\r\n\t\toriginInput.click();\r\n\t\toriginInput.sendKeys(destination);\r\n\t\twaitForHotelSuboption();\r\n\t\tselectHotelSubmenuOption(locationType, option);\r\n\r\n\t}", "String getArrivalLocation();", "void avengersTower() {\n location = \"avengersTower\";\n System.out.print(\"______________________________________________________________\\n\");\n System.out.println(\"\\n////// AVENGERS TOWER //////\");\n System.out.println(\"\\nYou are back at the Avengers Tower!\");\n System.out.println(\"You can see for miles around. This is you base and your location!\");\n\n System.out.print(\"\\nTry 'north', 'south', 'east', 'west'\\n\");\n String compassSelection = input.nextLine();\n\n //If statement to determine the location that the user will go to\n if (compassSelection.equals(\"north\")) {\n financialDistrict();\n } else if (compassSelection.equals(\"east\")) {\n timeSquare();\n } else if (compassSelection.equals(\"south\")) {\n centralPark();\n } else if (compassSelection.equals(\"west\")) {\n hellsKitchen();\n } else {\n System.out.println(\"Please enter a valid direction!\\n\");\n avengersTower();\n }\n }", "@Override\n public void onMapClick(LatLng arg0) {\n try {\n Geocoder geo = new Geocoder(MapsActivity.this, Locale.getDefault());\n List<Address> add = geo.getFromLocation(arg0.latitude, arg0.longitude, 1);\n String selectedCountry;\n if (add.size() > 0) {\n selectedCountry = add.get(0).getCountryName();\n selectedStateOrCountry = selectedCountry;\n\n //Log.d(\"country\", selectedCountry);\n //For usa go with states . All other countries - it gives the capital\n if (selectedCountry.equalsIgnoreCase(\"United States\") ||\n selectedCountry.equalsIgnoreCase(\"US\")) {\n selectedStateOrCountry = add.get(0).getAdminArea();\n }\n //Log.d(\"state\", selectedStateOrCountry);\n ConvertTextToSpeech();\n }\n } catch (Exception e) {\n //Log.e(TAG, \"Failed to initialize map\", e);\n }\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif (end == null) {\n\t\t\t\t\tToast.makeText(getApplicationContext(), \"无终点\",\n\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tMKPlanNode mStart = new MKPlanNode();\n\t\t\t\tMKPlanNode mEnd = new MKPlanNode();\n\t\t\t\tmStart.pt = start;\n\t\t\t\tmEnd.pt = end;\n\t\t\t\tif (transitOverlay != null) {\n\t\t\t\t\tmMapView.getOverlays().remove(transitOverlay);\n\t\t\t\t}\n\t\t\t\tmSearch.transitSearch(\"厦门\", mStart, mEnd);\n\t\t\t}", "static int[] chooseDestination(List<int[]> possibleDestinations){\n System.out.println(\"Choose destination: \");\n List<String> options = new ArrayList<>();\n for(int i=0; i < possibleDestinations.size(); i++){\n int optionNr = i + 1;\n options.add(Integer.toString(optionNr));\n System.out.print(optionNr + \": \");\n printCoordinatesForUser(possibleDestinations.get(i));\n System.out.print(\"\\n\");\n\n }\n System.out.print(\"Type the chosen option(the number at left, not the coordinates): \");\n String userChoice = readUserChoice(options, false);\n if(userChoice != null){//timer not expired\n int posInList = Integer.parseInt(userChoice) - 1;\n return possibleDestinations.get(posInList);\n }\n else{\n return null;\n }\n }", "private void pickLocation() {\n // By default the location picker will enable all the included buttons like\n // Satellite view and position me\n Intent locationPicker = new LocationPickerActivity.Builder().build(this.getContext());\n startActivityForResult(locationPicker, LOCATION_REQUEST_CODE);\n }", "Continent getSelectedContinent();", "public void selectVenue() {\n\t\t\r\n\t}", "java.lang.String getDepartureAirport();", "public String getDepartureAirport();", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif (end == null) {\n\t\t\t\t\tToast.makeText(getApplicationContext(), \"无终点\",\n\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tMKPlanNode mStart = new MKPlanNode();\n\t\t\t\tMKPlanNode mEnd = new MKPlanNode();\n\t\t\t\tmStart.pt = start;\n\t\t\t\tmEnd.pt = end;\n\t\t\t\tif (routeOverlay != null) {\n\t\t\t\t\tmMapView.getOverlays().remove(routeOverlay);\n\t\t\t\t}\n\t\t\t\tmSearch.drivingSearch(null, mStart, null, mEnd);\n\t\t\t}", "private boolean setLocationInformation() {\n try {\n this.mPostModel.setLocationPost(mAutoCompleteTextView.getText().toString());\n\n if (StringEmptyUtil.isEmptyString(this.mPostModel.getLocationPost())) {\n Toast.makeText(getApplicationContext(), \"Please Select Location\", Toast.LENGTH_LONG).show();\n return false;\n }\n\n this.drop_location.setVisibility(View.VISIBLE);\n this.location_view.setVisibility(View.VISIBLE);\n this.current_location.setVisibility(View.VISIBLE);\n this.current_location.setText(this.mPostModel.getLocationPost());\n return true;\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n Toast.makeText(getApplicationContext(), \"Please Select Location\", Toast.LENGTH_LONG).show();\n\n return false;\n }", "Location selectMoveLocation(ArrayList<Location> locs);", "String getLocation(boolean detail);", "public void getOption(View view) {\n Spinner spinner = (Spinner) findViewById(R.id.country_spinner);\n SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(this);\n if (spinner != null) {\n user_choice = String.valueOf(spinner.getSelectedItem());\n }\n Set<String> selections = settings.getStringSet(\"list_option_key\", null);\n if (selections != null) {\n if (selections.isEmpty()) {\n //User must select options for the graph to display.\n displayToast(\"No options selected, please try again.\");\n return;\n } else {\n //User has selected options we we get the country data associated with user options\n boolean use_local = settings.getBoolean(\"use_file_key\", true);\n processData(use_local, selections);\n }\n } else {\n //No options have been selected and this is the first time user is using the app so display message\n displayToast(\"No options selected, please try again.\");\n return;\n }\n }", "@Override\n public void onItemSelected(AdapterView<?> parentView, View selectedItemView, int position, long id) {\n spnDistrict.setAdapter(C.getArrayAdapter(\"select ZIlLAID||'-'||ZILLANAMEENG DistName from Zilla where DIVID='\" + Global.Left(spnDiv.getSelectedItem().toString(), 2) + \"'\"));// Global.Left(spnDiv.getSelectedItem().toString(),2)\n spnDistrict.setSelection(DivzillaSelect(\"zilla\"));\n\n\n }", "@Override\n public void onPlaceSelected(Place place) {\n destination = place.getName().toString();\n destinationLatLng = place.getLatLng();\n }", "@When(\"^Dante choose the (.*)$\")\n\tpublic void danteChooseTheFlight(String flightoption) throws Exception {\n\t\tdante.attemptsTo(TicketSelection.in(flightoption));\n\t}", "@Then(\"^selects the journey type$\")\n\tpublic void select_flightTypes() throws InterruptedException, IOException {\n\t\tdriver.findElement(By.xpath(\"//input[@class='checkbox__input js-one-way control__one-way']\")).click();\n\t}", "@Override\n public void onNothingSelected(AdapterView<?> arg0) {\n\n Toast.makeText(SignUpOrganisationActivity.this, \"Please Select Province\", Toast.LENGTH_SHORT).show();\n }", "public String selectOriginPlace(String Origin) throws InterruptedException {\n\n wait.until(ExpectedConditions.elementToBeClickable(allresults));\n origin.clear();\n origin.sendKeys(Origin);\n originAirport= originTmenu.findElement(By.xpath(\"//span[contains(text(),'NYC')]\"));\n wait.until(ExpectedConditions.visibilityOf(originAirport));\n action.moveToElement(originAirport).click();\n System.out.println(\"Origin Airport is selected\");\n return originAirport.getText();\n\n }", "@When(\"^the user enters the departure and arrival destinations$\")\n\tpublic void enter_departure_arrival_dates() throws InterruptedException {\n\t\tdriver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\n\t\tdriver.findElement(By.name(\"Departure airport\")).sendKeys(\"DXB\");\n\t\tdriver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\n\t\tdriver.findElement(By.name(\"Arrival airport\")).sendKeys(\"LHR\");\n\t\tdriver.findElement(By.linkText(\"Continue\")).click();\n\t}", "@Override\n\tpublic List<Flight> selectDeparture() {\n\t\treturn flightMapper.selectDeparture();\n\t}", "public Builder setDepartureAirport(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n departureAirport_ = value;\n onChanged();\n return this;\n }", "public void selectLocation(String location) {\n selectedLocation = location;\n }", "public void selectFirstFlight() {\n getDriver().manage().timeouts().implicitlyWait(2, TimeUnit.SECONDS);\n firstFlight.selectFirstFlight();\n }", "@Then(\"^choose mumbai location$\")\r\n\tpublic void choose_mumbai_location() throws Exception {\n\t\t\t\t\tWebElement location_bms = wait.until(ExpectedConditions.visibilityOfElementLocated(uimap.getLocator(\"Select_location\")));\r\n\t\t\t\t\tlocation_bms.click();\r\n\t\t\t// Click on the No Thanks \r\n\t\t\t\t\t\r\n\t\t\t\t\tWebElement alert_btn = wait.until(ExpectedConditions.visibilityOfElementLocated(uimap.getLocator(\"Alert_Btn\")));\r\n\t\t\t\t\talert_btn.click();\r\n\t\t\t// Click on the Movies \r\n\t\t\t\t\tWebElement movies_link = driver.findElement(uimap.getLocator(\"Movies_Link\"));\r\n\t\t\t\t\tmovies_link.click();\r\n\t}", "private void setUpDirectionIntegration() {\n mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n @Override\n public void onMapClick(final LatLng latLng) {\n new AlertDialog.Builder(ScavengerHunt.this)\n .setTitle(\"Open Google Maps?\")\n .setMessage(\"Get directions to your selected location.\")\n .setPositiveButton(\"Continue\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n String uri = \"http://maps.google.com/maps?daddr=\" + latLng.latitude + \",\" + latLng.longitude + \" (\" + \"Where the party is at\" + \")\";\n Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(uri));\n intent.setPackage(\"com.google.android.apps.maps\");\n startActivity(intent);\n }\n })\n .setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n // Do nothing\n }\n })\n .show();\n\n Log.i(\"MAP\", latLng.latitude + \", \" + latLng.longitude);\n }\n });\n }", "private void showAddLocationPointPopup(final String point) {\n\n AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(getActivity());\n\n LinearLayout layout = new LinearLayout(getActivity());\n LinearLayout.LayoutParams parms = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);\n layout.setOrientation(LinearLayout.VERTICAL);\n layout.setLayoutParams(parms);\n\n layout.setGravity(Gravity.CLIP_VERTICAL);\n layout.setPadding(20, 20, 20, 20);\n\n final EditText etPoint = new EditText(getActivity());\n etPoint.setHint(\"Enter \"+(point.equals(\"loading\")?\"Loading\":\"Destination\")+ \" Point\");\n\n AutoSearchAdapter adapter ;\n final CustomAutoCompleteTextView spinnerCountryList = new CustomAutoCompleteTextView(getActivity());\n final CustomAutoCompleteTextView spinnerCityList = new CustomAutoCompleteTextView(getActivity());\n spinnerCountryList.setHint(\"Select \"+(point.equals(\"loading\")?\"Loading\":\"Destination\")+ \" Country\");\n spinnerCityList.setHint(\"Select \"+(point.equals(\"loading\")?\"Loading\":\"Destination\")+ \" City\");\n spinnerCityList.setThreshold(1);\n spinnerCountryList.setThreshold(1);\n\n spinnerCountryList.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {\n loadCities(((CountryModel)adapterView.getAdapter().getItem(i)).id);\n }\n\n private void loadCities(String id) {\n String url = Constants.BASE_URL + \"city\";\n HashMap<String,String> hmap= new HashMap<>();//{\"country_id\":\"101\"}\n hmap.put(\"country_id\", id);\n HttpPostRequest.doPost(getActivity(), url,new Gson().toJson(hmap), new HttpRequestCallback() {\n @Override\n public void response(String errorMessage, String responseData) {\n //Utils.hideLoadingPopup();\n try {\n listCity.clear();\n CountryModel countryModel;\n\n JSONObject jobj = new JSONObject(responseData);\n Boolean status = jobj.getBoolean(\"status\");\n if (status) {\n JSONArray jsonArray = jobj.getJSONArray(\"city_list\");\n for (int i = 0; i < jsonArray.length(); i++) {\n JSONObject jobject = jsonArray.getJSONObject(i);\n countryModel = new CountryModel();\n countryModel.id = jobject.getString(\"id\");\n countryModel.name = jobject.getString(\"name\");\n //countryModel.sortname = jobject.getString(\"sortname\");\n listCity.add(countryModel);\n }\n\n AutoSearchAdapter adapter = new AutoSearchAdapter(getActivity(), listCity);\n spinnerCityList.setAdapter(adapter);\n adapter.notifyDataSetChanged();\n\n\n } else {\n Toast.makeText(getActivity(), jobj.getString(\"msg\"), Toast.LENGTH_SHORT).show();\n }\n\n }\n catch (Exception ex){ex.getMessage();}\n }\n\n @Override\n public void onError(String errorMessage) {\n\n }\n });\n }\n\n });\n\n\n listCountry= new ArrayList<>();\n adapter= new AutoSearchAdapter(getActivity(), listCountry);\n spinnerCountryList.setAdapter(adapter);\n adapter.notifyDataSetChanged();\n\n\n listCity= new ArrayList<>();\n adapter = new AutoSearchAdapter(getActivity(), listCity);\n spinnerCityList.setAdapter(adapter);\n adapter.notifyDataSetChanged();\n if(Utils.isNetworkConnected(getActivity(),false)) {\n loadCountry(spinnerCountryList);\n }\n layout.addView(etPoint);\n layout.addView(spinnerCountryList);\n layout.addView(spinnerCityList);\n\n alertDialogBuilder.setView(layout);\n alertDialogBuilder.setTitle((point.equals(\"loading\")?\"Loading\":\"Destination\")+ \" Location\");\n\n alertDialogBuilder.setCancelable(false);\n\n // Setting Negative \"Cancel\" Button\n alertDialogBuilder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int whichButton) {\n dialog.cancel();\n }\n });\n\n // Setting Positive \"OK\" Button\n alertDialogBuilder.setPositiveButton(\"Add\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n String lPoint = etPoint.getText().toString().trim();\n String countryName = spinnerCountryList.getText().toString().trim() ;\n String cityName = spinnerCityList.getText().toString().trim();\n if(!lPoint.isEmpty() && !cityName.isEmpty() && !countryName.isEmpty() ) {\n String lCity = cityName ;\n String lCountry = countryName;\n requestAddLocationPoint(point, lPoint, lCity, lCountry);\n }\n else\n Toast.makeText(getActivity(), \"All fields are required!\", Toast.LENGTH_SHORT).show();\n }\n\n\n });\n\n AlertDialog alertDialog = alertDialogBuilder.create();\n\n try {\n alertDialog.show();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif (end == null) {\n\t\t\t\t\tToast.makeText(getApplicationContext(), \"无终点\",\n\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tMKPlanNode mStart = new MKPlanNode();\n\t\t\t\tMKPlanNode mEnd = new MKPlanNode();\n\t\t\t\tmStart.pt = start;\n\t\t\t\tmEnd.pt = end;\n\t\t\t\tif (routeOverlay != null) {\n\t\t\t\t\tmMapView.getOverlays().remove(routeOverlay);\n\t\t\t\t}\n\t\t\t\tmSearch.walkingSearch(null, mStart, null, mEnd);\n\t\t\t}", "@Override\r\n public void onPlaceSelected(Place place) {\n Log.i(TAG, \"Place: \" + place.getName());\r\n city1=place.getName().toString();\r\n Log.i(TAG,place.getAddress().toString());\r\n String a[]=place.getAddress().toString().split(\",\");\r\n int len=a.length;\r\n String h=city1;\r\n if(len>=3) {\r\n h = a[len - 3];\r\n }\r\n city1=h;\r\n\r\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == 1) {\n if (resultCode == RESULT_OK) {\n // retrive the data by using getPlace() method.\n Place place = PlaceAutocomplete.getPlace(this, data);\n String latlang = \"\" + place.getLatLng();\n Log.e(\"Tag\", \"Place: \" + place.getAddress() + place.getPhoneNumber());\n Log.d(\"LatLang\", latlang);\n\n dLat = Double.valueOf(getLattitude(latlang));\n dLang = Double.valueOf(getLangitude(latlang));\n Log.d(\"Lat\", \"\" + dLat);\n Log.d(\"Lang\", \"\" + dLang);\n\n destination.setText(place.getName());\n clearDest.setVisibility(View.VISIBLE);\n //selDest.setVisibility(View.GONE);\n recyclerView.setVisibility(View.VISIBLE);\n\n //Make call to Async\n //new GetRides().execute();\n fetchingRides();\n } else if (resultCode == PlaceAutocomplete.RESULT_ERROR) {\n Status status = PlaceAutocomplete.getStatus(this, data);\n // TODO: Handle the error.\n Log.e(\"Tag\", status.getStatusMessage());\n } else if (resultCode == RESULT_CANCELED) {\n // The user canceled the operation.\n }\n }\n\n else if (requestCode == 2) {\n if (resultCode == RESULT_OK) {\n // retrive the data by using getPlace() method.\n Place place = PlaceAutocomplete.getPlace(this, data);\n String latlang = \"\" + place.getLatLng();\n Log.e(\"Tag\", \"Place: \" + place.getAddress() + place.getPhoneNumber());\n Log.d(\"LatLang\", latlang);\n\n sLat = Double.valueOf(getLattitude(latlang));\n sLang = Double.valueOf(getLangitude(latlang));\n Log.d(\"Lat\", \"\" + sLat);\n Log.d(\"Lang\", \"\" + sLang);\n\n\n\n source.setText(place.getName());\n\n // selDest.setVisibility(View.GONE);\n recyclerView.setVisibility(View.VISIBLE);\n\n //Make call to Async\n //new GetRides().execute();\n fetchingRides();\n } else if (resultCode == PlaceAutocomplete.RESULT_ERROR) {\n Status status = PlaceAutocomplete.getStatus(this, data);\n // TODO: Handle the error.\n Log.e(\"Tag\", status.getStatusMessage());\n } else if (resultCode == RESULT_CANCELED) {\n // The user canceled the operation.\n }\n }\n }", "@Override\r\n public void onPlaceSelected(Place place) {\n Log.i(\"city\",place.toString());\r\n Log.i(TAG, \"Place: \" + place.getName());\r\n city2=place.getName().toString();\r\n String a[]=place.getAddress().toString().split(\",\");\r\n int len=a.length;\r\n String h=city2;\r\n if(len>=3) {\r\n h = a[len - 3];\r\n }\r\n city2=h;\r\n\r\n }", "@Override\n public void onClick(View view) {\n Uri gmmIntentUri = Uri.parse(\"geo:0,0?q=\" + selected_location);\n Intent mapIntent = new Intent(Intent.ACTION_VIEW, gmmIntentUri);\n mapIntent.setPackage(\"com.google.android.apps.maps\");\n if (mapIntent.resolveActivity(getActivity().getPackageManager()) != null) {\n startActivity(mapIntent);\n }\n }", "public static int choicedialog() {\r\n List<String> choices = new ArrayList<>();\r\n choices.add(\"1a\");\r\n choices.add(\"1b\");\r\n choices.add(\"2\");\r\n choices.add(\"2u\");\r\n choices.add(\"3\");\r\n choices.add(\"3u\");\r\n choices.add(\"4\");\r\n choices.add(\"5\");\r\n\r\n ChoiceDialog<String> dialog = new ChoiceDialog<>(\"SET ZONE HERE\", choices);\r\n dialog.setTitle(\"Zone Selector\");\r\n dialog.setHeaderText(null);\r\n dialog.setContentText(\"Select Zone:\");\r\n \r\n Optional<String> result = dialog.showAndWait();\r\n if (result.isPresent()){\r\n if(result.get() == \"1a\") return 1;\r\n else if (result.get() == \"1b\") return 2;\r\n else if (result.get() == \"2\") return 3;\r\n else if (result.get() == \"2u\") return 4;\r\n else if (result.get() == \"3\") return 5;\r\n else if (result.get() == \"3u\") return 6;\r\n else if (result.get() == \"4\") return 7;\r\n else if (result.get() == \"5\") return 8;\r\n else return 0;\r\n } else return 0;\r\n }", "java.lang.String getDepartureAirportCity();", "@Override\n public void onClick(DialogInterface paramDialogInterface, int paramInt) {\n Intent myIntent = new Intent( Settings.ACTION_LOCATION_SOURCE_SETTINGS);\n context.startActivity(myIntent);\n //get gps\n }", "private void pickCurrentPlace() {\n if (mMap == null) {\n return;\n }\n\n if (mLocationPermissionGranted) {\n getDeviceLocation();\n } else {\n getLocationPermission();\n }\n }", "private void getLocation() {\n\n }", "@Override\n\t\tpublic void onGetDrivingRouteResult(DrivingRouteResult drivingrouteresult) {\n\t\t\tnearby_baidumap.clear();// 清除图层覆盖物\n\t\t\tN_showdatainfotv.setText(\"\");\n\t\t\tSB.delete(0, SB.length());\n\t\t\tif (drivingrouteresult == null || drivingrouteresult.error != SearchResult.ERRORNO.NO_ERROR) {\n\t\t\t\tToastUtil.CreateToastShow(navigation, null, \"温馨提示\", \"没有找到合适的路线\");\n\t\t\t}\n\t\t\tif (drivingrouteresult.error == SearchResult.ERRORNO.AMBIGUOUS_ROURE_ADDR) {\n\t\t\t\t// 起终点或途经点地址有岐义,通过以下接口获取建议查询信息\n\t\t\t\t// result.getSuggestAddrInfo()\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (drivingrouteresult.error == SearchResult.ERRORNO.NO_ERROR) {\n\t\t\t\tN_routeline = drivingrouteresult.getRouteLines().get(0);// 第一方案\n\t\t\t\tSB.append(\"起点\\t\\t\" + N_currentaddress).append(\"\\t\\t\\t----\\t\\t\\t\").append(\"终点\\t\\t\" + N_targetaddress)\n\t\t\t\t\t\t.append(\"\\n\\n\");\n\t\t\t\tfor (int i = 0; i < N_routeline.getAllStep().size(); i++) {\n\n\t\t\t\t\tDrivingRouteLine.DrivingStep step = (DrivingStep) N_routeline.getAllStep().get(i);\n\n\t\t\t\t\tSB.append(i + \"\\t在\\t:\" + step.getEntranceInstructions() + \"\\t\\t\\t\")\n\t\t\t\t\t\t\t.append(i + \"\\t在\\t:\" + step.getExitInstructions() + \"\\t\\t\\t\");\n\t\t\t\t}\n\t\t\t\tN_showdatainfotv.setText(SB);\n\t\t\t\tDrivingOverlayUtil drivingoverlayutil = new DrivingOverlayUtil(nearby_baidumap, navigation);\n\t\t\t\tdrivingoverlayutil.setData(drivingrouteresult.getRouteLines().get(0));\n\t\t\t\tdrivingoverlayutil.addToMap();\n\t\t\t\tdrivingoverlayutil.zoomToSpan();\n\n\t\t\t}\n\n\t\t}", "public void selectProvince(String Province){\r\n\r\n\t\tString Province1 = getValue(Province);\r\n\t\tString countrygroup_province =\"Italy\";\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+Province1);\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:-\"+Province1+\" link should be selected\");\r\n\t\ttry{\r\n\t\t\tif((countrygroup_province).contains(countries.get(countrycount))){\r\n\t\t\t\twaitforElementVisible(locator_split(\"checkoutProvince\"));\r\n\t\t\t\tselectList(locator_split(\"checkoutProvince\"),Province1);\r\n\t\t\t\twaitForPageToLoad(20);\r\n\t\t\t\tsleep(1000);\r\n\t\t\t\tThread.sleep(2000);\r\n\t\t\t\tSystem.out.println(locator_split(\"checkoutProvince\")+\" link selected\");\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:-\"+Province1+\" is entered \");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:- Province is not applicable to this country \");\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- \"+Province1+\" unable to enter\");\r\n\r\n\t\t}\r\n\t}", "public void flightFinder(WebDriver driver){\n\tdriver.findElement(By.xpath(FlightFinderObjects.link_Flights)).click();\r\n\tdriver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);\r\n\t\r\n\t//Flight Finder\r\n\t//driver.findElement(By.xpath(FlightFinder.radiobutton_FlightTypeOneway)).click();\r\n\tdriver.findElement(By.xpath(FlightFinderObjects.radiobutton_FlightTypeRoundtrip)).click();\r\n\r\n\tSelect sel1 = new Select(driver.findElement(By.xpath(FlightFinderObjects.dropdown_Passengers)));\r\n\tsel1.selectByVisibleText(\"2\");\r\n\t\r\n\tSelect sel2 = new Select(driver.findElement(By.xpath(FlightFinderObjects.dropdown_DepartFrom)));\r\n\tsel2.selectByVisibleText(\"New York\");\r\n\t\r\n\tSelect sel3 = new Select(driver.findElement(By.xpath(FlightFinderObjects.dropdown_OnMonth)));\r\n\tsel3.selectByVisibleText(\"November\");\r\n\t\r\n\tSelect sel4 = new Select(driver.findElement(By.xpath(FlightFinderObjects.dropdown_OnDay)));\r\n\tsel4.selectByValue(\"25\");\r\n\t\r\n\tSelect sel5 = new Select(driver.findElement(By.xpath(FlightFinderObjects.dropdown_ArrivingIn)));\r\n\tsel5.selectByVisibleText(\"Paris\");\r\n\t\r\n// Preferences\r\n\t\r\n\tdriver.findElement(By.xpath(FlightFinderObjects.radiobutton_ServiceClassFirstClass)).click();\r\n\t\r\n\tdriver.findElement(By.xpath(FlightFinderObjects.button_Continue)).click();\r\n\t\r\n}", "private void setupLocationSpinner() {\n selectLocation = findViewById(R.id.spinnerLocation);\n ArrayAdapter<String> adapter =\n new ArrayAdapter(this, android.R.layout.simple_spinner_item, locations);\n adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n selectLocation.setAdapter(adapter);\n selectLocation.setOnItemSelectedListener(\n new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(\n AdapterView<?> adapterView, View view, int position, long id) {\n if (position >= 0 && position < options.length) {\n locationSelection = position;\n View recyclerView = findViewById(R.id.donations_list);\n assert recyclerView != null;\n setupRecyclerView((RecyclerView) recyclerView);\n } else {\n Toast.makeText(\n DonationsListActivity.this,\n \"Selected Category DNE\",\n Toast.LENGTH_SHORT)\n .show();\n }\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> parent) {}\n });\n }", "@Override\n public void onClick(DialogInterface paramDialogInterface, int paramInt) {\n paramDialogInterface.dismiss();\n\n Intent myIntent = new Intent( Settings.ACTION_LOCATION_SOURCE_SETTINGS);\n startActivity(myIntent);\n //get gps\n }", "private void setStart()\n {\n for(int i = 0; i < cities.size(); i++)\n System.out.println(\"Location: \"+i+\" \"+cities.get(i).getSourceName());\n \n System.out.println(\"Which city would you like to start at? Enter the location number\"); \n computePaths(cities.get(input.nextInt()));\n printMenu(); \n }", "public void clickZone()\n\t{\n\t\tString t=driver.findElement(By.xpath(\"//label[text()='Zones']/following-sibling::div//div/button\")).getAttribute(\"title\");\n\t\tif(t.contains(\"Select Zone(s)\"))\n\t\t{\n\t\t\tWebElement r =\tdriver.findElement(By.xpath(\"//label[text()='Zones']/following-sibling::div//div/button\"));\n\t\t\twaitForElement(driver,r,50);\n\t\t\tJavascriptExecutor exe = (JavascriptExecutor)driver;\n\t\t\texe.executeScript(\"arguments[0].click()\", r);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tWebElement r =driver.findElement(By.xpath(\"//label[text()='Zones']/following-sibling::div//div/button\"));\n\t\t\twaitForElement(driver,r,50);\n\t\t\tJavascriptExecutor exe = (JavascriptExecutor)driver;\n\t\t\texe.executeScript(\"arguments[0].click()\", r);\n\t\t}\n\t}", "public void searchOneWayFlight(String from, String to, ExtentTest log) {\n\t\t\n\t\t\n\t\tlog.info(\"Searching for One Way Tab\");\n\t\tdriver.findElement(By.xpath(\"//li[@class='border-lft flig-show click-one bg-color']\")).click();\n\n\t\tlog.info(\"Selecting Origin City\");\n\t\tWebElement city1 = driver.findElement(By.xpath(\"//input[@id='FromSector_show']\"));\n\t\tcity1.click();\n\t\tif (from != \"\") {\n\t\t\tcity1.sendKeys(from);\n\t\t\tdriver.findElement(By.xpath(\"//ul[@id='ui-id-1']/li/div/span[contains(text(),'\" + from + \"')]\")).click();\n\t\t} else {\n\t\t\tdriver.findElement(By.xpath(\"//div[@class='mobile-wi1 flig-show1']//input[@class='src_btn']\")).click();\n\t\t\tAlert alert = driver.switchTo().alert();\n\t\t\tnew WebDriverWait(driver, 20).until(ExpectedConditions.alertIsPresent());\n\t\t\tlog.info(alert.getText());\n\t\t\talert.accept();\n\t\t\tthrow new AssertionError(\"Flight Searching Test Failed\");\n\t\t}\n\n\t\tlog.info(\"Selecting Destination City\");\n\t\tWebElement city2 = driver.findElement(By.xpath(\"//input[@id='Editbox13_show']\"));\n\t\tcity2.click();\n\t\tif (to != \"\") {\n\t\t\tcity2.sendKeys(to);\n\t\t\tdriver.findElement(By.xpath(\"//ul[@id='ui-id-2']/li/div/span[contains(text(),'\" + to + \"')]\")).click();\n\t\t} else {\n\t\t\tdriver.findElement(By.xpath(\"//div[@class='mobile-wi1 flig-show1']//input[@class='src_btn']\")).click();\n\t\t\tAlert alert = driver.switchTo().alert();\n\t\t\tnew WebDriverWait(driver, 20).until(ExpectedConditions.alertIsPresent());\n\t\t\tlog.info(alert.getText());\n\t\t\talert.accept();\n\t\t\tthrow new AssertionError(\"Flight Searching Test Failed\");\n\t\t}\n\t}", "@Override\n\tpublic List<Flight> selectDestintion() {\n\t\treturn flightMapper.selectDestintion();\n\t}", "void switchToMapSelectActivity();", "String askForCity();", "@When(\"^I select earliest departure for both days$\")\n\tpublic void i_select_earliest_departure_for_both_days() throws Throwable {\n\t\tfs = pgm.getFlightPage();\n\t\tfs.showAllFlights();\n\t\tfs.selectEarliestDeparture();\n\t\t\n\t}", "public void calculateRoute(View view){\r\n int tripTime;\r\n try{\r\n String endString = ((Spinner)findViewById(R.id.trip_time)).getSelectedItem().toString();\r\n tripTime = Integer.parseInt(endString.split(\":\")[0]) * 60 + Integer.parseInt(endString.split(\":\")[1]);\r\n }catch(Exception ex){\r\n Toast.makeText(getApplicationContext(), getApplicationContext().getString(R.string.exception_trip_time_format), Toast.LENGTH_LONG).show();\r\n return;\r\n }\r\n\r\n Category c = (Category)((Spinner) findViewById(R.id.focus)).getSelectedItem();\r\n\r\n TripConfigurations tc = TripConfigurations.getDefaultTripConfigurations(c, tripTime, manager.getAnySight(), manager.getAnySight());\r\n\r\n tc.setStartSight((Sight)((Spinner)findViewById(R.id.arrival_place)).getSelectedItem());\r\n tc.setEndSight((Sight)((Spinner)findViewById(R.id.departure_place)).getSelectedItem());\r\n\r\n try{\r\n this.pathChanger.setTripCofigurations(tc);\r\n this.pathChanger.calculateRoute(manager);\r\n findViewById(R.id.view_route_on_map).setEnabled(true);\r\n }catch(Exception e){\r\n changeToErrorActivity(e);\r\n }\r\n }", "private void pickCurrentPlace() {\n if (mMap == null) {\n return;\n }\n\n if (mLocationPermissionGranted) {\n getDeviceLocation();\n } else {\n // The user has not granted permission.\n Log.i(TAG, \"The user did not grant location permission.\");\n\n // Add a default marker, because the user hasn't selected a place.\n mMap.addMarker(new MarkerOptions()\n .title(getString(R.string.default_info_title))\n .position(mDefaultLocation)\n .snippet(getString(R.string.default_info_snippet)));\n\n // Prompt the user for permission.\n getLocationPermission();\n }\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n\n String latitude = mTrip.getLatLngString2().split(\"_\")[0]; //the lat of destination\n String longitude = mTrip.getLatLngString2().split(\"_\")[1]; //long of destination\n\n Log.i(TAG, \"StartTripActivity >> onClick: lat >> \" + latitude + \" -- log >> \" + longitude);\n Uri intentUri = Uri.parse(\"google.navigation:q=\" + latitude + \",\" + longitude);\n Intent mapIntent = new Intent(Intent.ACTION_VIEW, intentUri);\n mapIntent.setPackage(\"com.google.android.apps.maps\");\n Intent intentToService = new Intent(getApplicationContext(),\n FloatingService.class);\n\n intentToService.putExtra(KEY_PASS_TRIP, mTrip);\n\n Log.i(TAG, \"StartTripActivity >> onClick: \" + mTrip.getName());\n\n try {\n if (mapIntent.resolveActivity(getPackageManager()) != null) {\n startActivity(mapIntent);\n }\n\n } catch (NullPointerException e) {\n Log.e(\"MAP\", \"map error !! \");\n// Toast.makeText(getApplicationContext(),\n// \"Couldn't open map!! \", Toast.LENGTH_LONG).show();\n }\n if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {\n startService(intentToService);\n finish();\n } else if (Settings.canDrawOverlays(StartTripActivity.this)) {\n startService(intentToService);\n finish();\n } else {\n askPermission();\n// Toast.makeText(getApplicationContext(),\n// \"we Need permission to display your notes in floating view\", Toast.LENGTH_SHORT).show();\n }\n }", "public void getDirections (View view){\n Intent directionsIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(\"http://maps.google.com/maps?saddr=\" + intent.getDoubleExtra(\"engineerLatitude\", 0) + \",\" + intent.getDoubleExtra(\"engineerLongitude\", 0) + \"&daddr=\" + intent.getDoubleExtra(\"reportLatitude\", 0) + \",\" + intent.getDoubleExtra(\"reportLongitude\", 0)));\n\n startActivity(directionsIntent);\n\n }", "public void selectOptionInDepartment(String department, String optionsLinkText) {\r\n\t\tint departmentCode;\r\n\t\tint optionsListCode;\r\n\t\tswitch (department) {\r\n\t\tcase \"Amazon Prime\":\r\n\t\t\tdepartmentCode = 1;\r\n\t\t\toptionsListCode = 1;\r\n\t\t\tbreak;\r\n\t\tcase \"Amazon Prime Video\":\r\n\t\t\tdepartmentCode = 2;\r\n\t\t\toptionsListCode = 2;\r\n\t\t\tbreak;\r\n\t\tcase \"Prime Music\":\r\n\t\t\tdepartmentCode = 3;\r\n\t\t\toptionsListCode = 3;\r\n\t\t\tbreak;\r\n\t\tcase \"Savings Programs\":\r\n\t\t\tdepartmentCode = 4;\r\n\t\t\toptionsListCode = 4;\r\n\t\t\tbreak;\r\n\t\tcase \"Appstore for Android\":\r\n\t\t\tdepartmentCode = 5;\r\n\t\t\toptionsListCode = 5;\r\n\t\t\tbreak;\r\n\t\tcase \"Echo & Alexa\":\r\n\t\t\tdepartmentCode = 7;\r\n\t\t\toptionsListCode = 6;\r\n\t\t\tbreak;\r\n\t\tcase \"Fire Tablets & Fire TV\":\r\n\t\t\tdepartmentCode = 8;\r\n\t\t\toptionsListCode = 7;\r\n\t\t\tbreak;\r\n\t\tcase \"Kindle\":\r\n\t\t\tdepartmentCode = 9;\r\n\t\t\toptionsListCode = 8;\r\n\t\t\tbreak;\r\n\t\tcase \"Books & Audible\":\r\n\t\t\tdepartmentCode = 11;\r\n\t\t\toptionsListCode = 9;\r\n\t\t\tbreak;\r\n\t\tcase \"Video Games & Twitch Prime\":\r\n\t\t\tdepartmentCode = 12;\r\n\t\t\toptionsListCode = 10;\r\n\t\t\tbreak;\r\n\t\tcase \"Music, Movies & TV Shows\":\r\n\t\t\tdepartmentCode = 13;\r\n\t\t\toptionsListCode = 11;\r\n\t\t\tbreak;\r\n\t\tcase \"Electronics\":\r\n\t\t\tdepartmentCode = 14;\r\n\t\t\toptionsListCode = 12;\r\n\t\t\tbreak;\r\n\t\tcase \"Home, Garden, Pets & Tools\":\r\n\t\t\tdepartmentCode = 15;\r\n\t\t\toptionsListCode = 13;\r\n\t\t\tbreak;\r\n\t\tcase \"Grocery & Whole Foods Market\":\r\n\t\t\tdepartmentCode = 16;\r\n\t\t\toptionsListCode = 14;\r\n\t\t\tbreak;\r\n\t\tcase \"Health & Beauty\":\r\n\t\t\tdepartmentCode = 17;\r\n\t\t\toptionsListCode = 15;\r\n\t\t\tbreak;\r\n\t\tcase \"Toys, Kids, Baby & STEM\":\r\n\t\t\tdepartmentCode = 18;\r\n\t\t\toptionsListCode = 16;\r\n\t\t\tbreak;\r\n\t\tcase \"Clothing, Shoes & Jewelry\":\r\n\t\t\tdepartmentCode = 19;\r\n\t\t\toptionsListCode = 17;\r\n\t\t\tbreak;\r\n\t\tcase \"Handmade\":\r\n\t\t\tdepartmentCode = 20;\r\n\t\t\toptionsListCode = 18;\r\n\t\t\tbreak;\r\n\t\tcase \"Sports & Outdoors\":\r\n\t\t\tdepartmentCode = 21;\r\n\t\t\toptionsListCode = 19;\r\n\t\t\tbreak;\r\n\t\tcase \"Automotive & Industrial\":\r\n\t\t\tdepartmentCode = 22;\r\n\t\t\toptionsListCode = 20;\r\n\t\t\tbreak;\r\n\t\tcase \"Boutiques Francophones\":\r\n\t\t\tdepartmentCode = 23;\r\n\t\t\toptionsListCode = 21;\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tdepartmentCode = 1;\r\n\t\t\toptionsListCode = 1;\r\n\t\t\tLog.info(\" The given Department Name: \" + department\r\n\t\t\t\t\t+ \" is either incorrect or is not defined in the method: selectDepartmentByHoveringMouse\"\r\n\t\t\t\t\t+ \" of NavBarAmazonHomePage.class,Please Check.\");\r\n\t\t}\r\n\r\n\t\tWebElement desiredDepartment = driver.findElement(By.cssSelector(\r\n\t\t\t\t\"#nav-flyout-shopAll > div.nav-template.nav-flyout-content.nav-tpl-itemList > span:nth-child(\"\r\n\t\t\t\t\t\t+ departmentCode + \")\"));\r\n\t\tseHoverOnElement(NavBarAmazonHomePage.get().btnNavbarShopByDepartment, \"btnNavbarShopByDepartment\");\r\n\t\tseWaitForClickableWebElement(driver, desiredDepartment, 20);\r\n\t\tseHoverOnElement(desiredDepartment, department);\r\n\t\tselectOptionByLinkText(optionsListCode, optionsLinkText);\r\n\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tIntent intent = new Intent(MainActivity.this, MapActivity.class);\n\t\t\t\tintent.putExtra(\"Choice\", 2);\n\t\t\t\tintent.putExtra(\"latc\", 13.0827);\n\t\t\t\tintent.putExtra(\"lngc\", 80.2707);\n\t\t\t\tstartActivity(intent);\n\n\t\t\t}", "private void inputLocation() {\n// boolean googleMapExist= (ConnectionResult.SUCCESS==GooglePlayServicesUtil.isGooglePlayServicesAvailable(mContext));\n//\n// if(googleMapExist) {\n// org.wowtalk.Log.w(\"google map exist\");\n// Intent mapIntent = new Intent(mContext, PickLocActivity.class);\n// mapIntent.putExtra(\"auto_loc\", true);\n// mContext.startActivityForResult(mapIntent, REQ_INPUT_LOC);\n// } else {\n //org.wowtalk.Log.w(\"google map not exist\");\n Intent mapIntent = new Intent(mContext, PickLocActivityWithAMap.class);\n mapIntent.putExtra(\"auto_loc\", true);\n mContext.startActivityForResult(mapIntent, REQ_INPUT_LOC);\n //}\n }", "public void managePlayOptions() {\n\n Object mySavedGameState = GameStateFileStore.ReadObjectFromFile(\"GameState.ser\");\n GameState castedGameState = GameState.class.cast(mySavedGameState);\n currentLocation = castedGameState.getSavedPlayerLocation();\n LocationData[][] storedGameStateMap = castedGameState.getMapState();\n descriptionText = storedGameStateMap[currentLocation.x][currentLocation.y].getDescriptionText();\n System.out.println(descriptionText);\n\n AvailableMovements myMoveSet = new AvailableMovements(currentLocation, storedGameStateMap);\n myMoveSet.printStringDirections();\n availableDirections = myMoveSet.getDirectionalMap();\n choice = sc.nextLine();\n if (availableDirections.containsKey(choice)) {\n currentLocation = availableDirections.get(choice); //refactor this into walkToNewLocation\n castedGameState.setSavedPlayerLocation(currentLocation);\n GameStateFileStore.WriteObjectToFile(castedGameState);\n managePlayOptions();\n } else {\n System.out.println(\"Invalid option\");\n managePlayOptions();\n }\n\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n if (parent.getItemAtPosition(position).equals(\"Choose Your Workout\")) {\n // do nothing\n }\n else {\n //get the workout chosen by the user\n chosenWorkout = parent.getItemAtPosition(position).toString();\n Intent intent = new Intent(WorkoutActivity.this, DropDownActivity.class);\n startActivity(intent);\n }\n\n }", "public void chooseDestination() {\n Log.i(\"Message\", \"Great success\");\n }", "public void onClick(DialogInterface dialog,int id) {\n LatLng newlatlng = getLatLngFromAddress(userInput.getText().toString());\n if (newlatlng != null) {\n startLocation = newlatlng;\n MarkerOptions marker = new MarkerOptions()\n .position(startLocation)\n .title(\"Start\")\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_BLUE));\n markers.add(marker);\n mMap.addMarker(marker);\n zoomMap();\n getEndLocation();\n } else\n {\n TextView alertTxtView = findViewById(R.id.alertTxtView);\n alertTxtView.setText(\"Could not find address\");\n }\n }", "@Override\n public void onClick(DialogInterface paramDialogInterface, int paramInt) {\n Intent myIntent = new Intent( Settings.ACTION_LOCATION_SOURCE_SETTINGS);\n myIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n getApplicationContext().startActivity(myIntent);\n //get gps\n }", "@Override\r\n public void onClick(View v)\r\n {\n \r\n DJIDrone.getDjiMainController().setGohomeAltitude(50, new DJIExecuteBooleanResultCallback() {\r\n \r\n @Override\r\n public void onResult(boolean result)\r\n {\r\n // TODO Auto-generated method stub\r\n if (result) {\r\n handler.sendMessage(handler.obtainMessage(SHOWTOAST, \"Set Successfully\"));\r\n } else {\r\n handler.sendMessage(handler.obtainMessage(SHOWTOAST, \"Set Fail\"));\r\n }\r\n }\r\n });\r\n }", "@Test\r\n\t\t@Parameters(\"url\")\r\n\t\tpublic void newtours18(String url) throws InterruptedException {\r\n\t\t\tint count = 0;\r\n\t\t\tGuru99Pages newtours = new Guru99Pages(driver);\r\n\r\n\t\t\tdriver.get(url);\r\n\r\n\t\t\t// Check if 'India' is present or not in the Departing from list box.\r\n\r\n\t\t\tnewtours.getFlight().click();\r\n\r\n\t\t\tList<WebElement> items = newtours.getDeparture().getOptions();\r\n\t\t\tfor (WebElement present : items) {\r\n\t\t\t\tString dropdownOptionValue = present.getText();\r\n\t\t\t\tif (dropdownOptionValue.equals(\"India\")) {\r\n\t\t\t\t\tSystem.out.println(\"India is present in the dropdown list\");\r\n\t\t\t\t\tcount++;\r\n\t\t\t\t\tThread.sleep(100);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (count == 0)\r\n\t\t\t\tSystem.out.println(\"India is not present in the dropdown list\");\r\n\t\t\t Reporter.log(\"India is not present in the dropdown list\");\r\n\r\n\t\t}", "@Override\n public void onClick(DialogInterface paramDialogInterface, int paramInt) {\n Intent myIntent = new Intent( Settings.ACTION_LOCATION_SOURCE_SETTINGS);\n HomeActivity.this.startActivity(myIntent);\n //get gps\n }", "private void setEnd()\n {\n for(int i = 0; i < cities.size(); i++)\n System.out.println(\"Location: \"+i+\" \"+cities.get(i).getSourceName());\n \n System.out.println(\"Which city would you like to end at? Enter the location number\"); \n cities = getShortestPathTo(cities.get(input.nextInt())); \n }", "private Department selectDepartment()\n {\n Department selectedDepartment = null;\n if(listViewSelectedHospital != null){\n listViewSelectedHospital = listViewSelectedHospital.trim();\n String hospitalName = listViewSelectedHospital.split(\" \")[0];\n selectedDepartment = getDepartment(hospitalName);\n }\n return selectedDepartment;\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n String item = parent.getItemAtPosition(position).toString();\n\n switch (item){\n\n case \"Alabama\":\n url = \"https://driving-tests.org/alabama/al-dmv-drivers-handbook-manual/\";\n break;\n\n case \"Alaska\":\n url = \"https://driving-tests.org/alaska/ak-dmv-drivers-handbook-manual/\";\n break;\n\n case \"Arizona\":\n url = \"https://driving-tests.org/arizona/az-dmv-drivers-handbook-manual/\";\n break;\n\n case \"Arkansas\":\n url = \"https://driving-tests.org/arkansas/ar-dmv-drivers-handbook-manual/\";\n break;\n\n case \"California\":\n url = \"https://driving-tests.org/california/ca-dmv-drivers-handbook-manual/\";\n break;\n\n case \"Colorado\":\n url = \"https://driving-tests.org/colorado/co-dmv-drivers-handbook-manual/\";\n break;\n\n case \"Connecticut\":\n url = \"https://driving-tests.org/connecticut/ct-dmv-drivers-handbook-manual/\";\n break;\n\n case \"Delaware\":\n url = \"https://driving-tests.org/delaware/de-dmv-drivers-handbook-manual/\";\n break;\n\n case \"District of Columbia\":\n url = \"https://driving-tests.org/district-columbia/dc-dmv-drivers-handbook-manual/\";\n break;\n\n case \"Florida\":\n url = \"https://driving-tests.org/florida/fl-dmv-drivers-handbook-manual/\";\n break;\n\n case \"Georgia\":\n url = \"https://driving-tests.org/georgia/ga-dds-drivers-handbook-manual/\";\n break;\n\n case \"Hawaii\":\n url = \"https://driving-tests.org/hawaii/hi-dmv-drivers-handbook-manual/\";\n break;\n\n case \"Idaho\":\n url = \"https://driving-tests.org/idaho/id-dmv-drivers-handbook-manual/\";\n break;\n\n case \"Illinois\":\n url = \"https://driving-tests.org/illinois/il-dmv-drivers-handbook-manual/\";\n break;\n\n case \"Indiana\":\n url = \"https://driving-tests.org/indiana/in-bmv-drivers-handbook-manual/\";\n break;\n\n case \"Iowa\":\n url = \"https://driving-tests.org/iowa/ia-dmv-drivers-handbook-manual/\";\n break;\n\n case \"Kansas\":\n url = \"https://driving-tests.org/kansas/ks-dmv-drivers-handbook-manual/\";\n break;\n\n case \"Kentucky\":\n url = \"https://driving-tests.org/kentucky/ky-dmv-drivers-handbook-manual/\";\n break;\n\n case \"Louisiana\":\n url = \"https://driving-tests.org/louisiana/la-dmv-drivers-handbook-manual/\";\n break;\n\n case \"Maine\":\n url = \"https://driving-tests.org/maine/me-dmv-drivers-handbook-manual/\";\n break;\n\n case \"Maryland\":\n url = \"https://driving-tests.org/maryland/md-mva-drivers-handbook-manual/\";\n break;\n\n case \"Massachusetts\":\n url = \"https://driving-tests.org/massachusetts/ma-rmv-drivers-handbook-manual/\";\n break;\n\n case \"Michigan\":\n url = \"https://driving-tests.org/michigan/mi-dmv-drivers-handbook-manual/\";\n break;\n\n case \"Minnesota\":\n url = \"https://driving-tests.org/minnesota/mn-dmv-drivers-handbook-manual/\";\n break;\n\n case \"Mississippi\":\n url = \"https://driving-tests.org/mississippi/ms-dmv-drivers-handbook-manual/\";\n break;\n\n case \"Missouri\":\n url = \"https://driving-tests.org/missouri/mo-dor-drivers-handbook-manual/\";\n break;\n\n case \"Montana\":\n url = \"https://driving-tests.org/montana/mt-dmv-drivers-handbook-manual/\";\n break;\n\n case \"Nebraska\":\n url = \"https://driving-tests.org/nebraska/ne-dmv-drivers-handbook-manual/\";\n break;\n\n case \"Nevada\":\n url = \"https://driving-tests.org/nevada/nv-dmv-drivers-handbook-manual/\";\n break;\n\n case \"New Hampshire\":\n url = \"https://driving-tests.org/new-hampshire/nh-dmv-drivers-handbook-manual/\";\n break;\n\n case \"New Jersey\":\n url = \"https://driving-tests.org/new-jersey/nj-mvc-drivers-handbook-manual/\";\n break;\n\n case \"New Mexico\":\n url = \"https://driving-tests.org/new-mexico/nm-mvd-drivers-handbook-manual/\";\n break;\n\n case \"New York\":\n url = \"https://driving-tests.org/new-york/ny-dmv-drivers-handbook-manual/\";\n break;\n\n case \"North Carolina\":\n url = \"https://driving-tests.org/north-carolina/nc-dmv-drivers-handbook-manual/\";\n break;\n\n case \"North Dakota\":\n url = \"https://driving-tests.org/north-dakota/nd-dmv-drivers-handbook-manual/\";\n break;\n\n case \"Ohio\":\n url = \"https://driving-tests.org/ohio/oh-bmv-drivers-handbook-manual/\";\n break;\n\n case \"Oklahoma\":\n url = \"https://driving-tests.org/oklahoma/ok-dmv-drivers-handbook-manual/\";\n break;\n\n case \"Oregon\":\n url = \"https://driving-tests.org/oregon/or-dmv-drivers-handbook-manual/\";\n break;\n\n case \"Pennsylvania\":\n url = \"https://driving-tests.org/pennsylvania/pa-dot-drivers-handbook-manual/\";\n break;\n\n case \"Rhode Island\":\n url = \"https://driving-tests.org/rhode-island/ri-dmv-drivers-handbook-manual/\";\n break;\n\n case \"South Carolina\":\n url = \"https://driving-tests.org/south-carolina/sc-dmv-drivers-handbook-manual/\";\n break;\n\n case \"South Dakota\":\n url = \"https://driving-tests.org/south-dakota/sd-dmv-drivers-handbook-manual/\";\n break;\n\n case \"Tennessee\":\n url = \"https://driving-tests.org/tennessee/tn-dmv-drivers-handbook-manual/\";\n break;\n\n case \"Texas\":\n url = \"https://driving-tests.org/texas/tx-dmv-drivers-handbook-manual/\";\n break;\n\n case \"Utah\":\n url = \"https://driving-tests.org/utah/ut-dmv-drivers-handbook-manual/\";\n break;\n\n case \"Vermont\":\n url = \"https://driving-tests.org/vermont/vt-dmv-drivers-handbook-manual/\";\n break;\n\n case \"Virginia\":\n url = \"https://driving-tests.org/virginia/va-dmv-drivers-handbook-manual/\";\n break;\n\n case \"Washington\":\n url = \"https://driving-tests.org/washington/wa-dol-drivers-handbook-manual/\";\n break;\n\n case \"West Virginia\":\n url = \"https://driving-tests.org/west-virginia/wv-dmv-drivers-handbook-manual/\";\n break;\n\n case \"Wisconsin\":\n url = \"https://driving-tests.org/wisconsin/wi-dmv-drivers-handbook-manual/\";\n break;\n\n case \"Wyoming\":\n url = \"https://driving-tests.org/wyoming/wy-dmv-drivers-handbook-manual/\";\n break;\n\n default:\n break;\n\n }\n\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif(la.size() <= 1){\n\t\t\t\t\tToast toast = Toast.makeText(MainActivity.this, \"Pls select destination\", Toast.LENGTH_SHORT);\n\t\t\t\t\ttoast.show();\n\t\t\t\t}else{\n\t\t\t\t\tstartActivity(intent);\n\t\t\t\t}\n\t\t\t}", "public void selectEndpointOne() {\n\t\tChangeListener<String> changeListener = new ChangeListener<String>() {\n\n\t\t\t@Override\n\t\t\tpublic void changed(ObservableValue<? extends String> observable, String oldValue, String newValue) {\n\t\t\t\tif (Endpoint_1.getValue() != null) {\n\t\t\t\t\tif (endpointOneChanges && !endpointValues.get(\"Endpoint1\").equals(Endpoint_1.getValue())) {\n\t\t\t\t\t\tDialog<ButtonType> dialog = new Dialog<>();\n\t\t\t\t\t\tdialog.setTitle(\"Warning\");\n\t\t\t\t\t\tdialog.setResizable(true);\n\t\t\t\t\t\tdialog.setContentText(\"Data entered in Endpoint 1 - \" + oldValue\n\t\t\t\t\t\t\t\t+ \" tab will be lost. Do you want continue?\");\n\t\t\t\t\t\tButtonType buttonTypeOk = new ButtonType(\"Ok\", ButtonData.OK_DONE);\n\t\t\t\t\t\tdialog.getDialogPane().getButtonTypes().add(buttonTypeOk);\n\t\t\t\t\t\tButtonType buttonCancel = new ButtonType(\"Cancel\", ButtonData.CANCEL_CLOSE);\n\t\t\t\t\t\tdialog.getDialogPane().getButtonTypes().add(buttonCancel);\n\t\t\t\t\t\tOptional<ButtonType> showAndWait = dialog.showAndWait();\n\t\t\t\t\t\tif (showAndWait.get() == buttonTypeOk) {\n\t\t\t\t\t\t\tloadNewEndPoint1(newValue);\n\t\t\t\t\t\t\tendpointOneChanges = false;\n\t\t\t\t\t\t\tif (Endpoint_1.getValue().equals(\"OUT\")) {\n\t\t\t\t\t\t\t\tEndpoint_2.setValue(\"Not Enabled\");\n\t\t\t\t\t\t\t\tEndpoint_2.getItems().removeAll(\"OUT\");\n//\t\t\t\t\t\t\t\tif (Endpoint_2.getValue() != null && Endpoint_2.getValue().equals(\"IN\")) {\n//\t\t\t\t\t\t\t\t\tEndpoint_2.setValue(\"Not Enabled\");\n//\t\t\t\t\t\t\t\t\tEndpoint_2.getItems().remove(\"IN\");\n//\t\t\t\t\t\t\t\t} else {\n//\t\t\t\t\t\t\t\t\tEndpoint_2.getItems().remove(\"IN\");\n//\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if(Endpoint_1.getValue().equals(\"IN\")) {\n\t\t\t\t\t\t\t\t\tEndpoint_2.setValue(\"Not Enabled\");\n\t\t\t\t\t\t\t\t\tif(!Endpoint_2.getItems().contains(\"OUT\")) {\n\t\t\t\t\t\t\t\t\t\tEndpoint_2.getItems().add(\"OUT\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\telse if (Endpoint_2.getValue() != null && Endpoint_1.getValue().equals(\"IN\")\n//\t\t\t\t\t\t\t\t\t&& Endpoint_2.getValue().equals(\"Not Enabled\")) {\n//\t\t\t\t\t\t\t\tif (!Endpoint_2.getItems().contains(\"IN\")) {\n//\t\t\t\t\t\t\t\t\tEndpoint_2.getItems().addAll(\"IN\");\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\tEndpoint_2.setValue(\"Not Enabled\");\n//\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (Endpoint_1.getValue().equals(\"UAC\")) {\n\t\t\t\t\t\t\t\tif (Endpoint_2.getValue() != null && Endpoint_2.getValue().equals(\"UAC\")) {\n\t\t\t\t\t\t\t\t\tEndpoint_2.setValue(\"Not Enabled\");\n\t\t\t\t\t\t\t\t\tEndpoint_2.getItems().remove(\"UAC\");\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tEndpoint_2.getItems().remove(\"UAC\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if (Endpoint_2.getValue() != null && Endpoint_1.getValue().equals(\"UVC\")\n\t\t\t\t\t\t\t\t\t&& Endpoint_2.getValue().equals(\"Not Enabled\")) {\n\t\t\t\t\t\t\t\tif (!Endpoint_2.getItems().contains(\"UAC\")) {\n\t\t\t\t\t\t\t\t\tEndpoint_2.getItems().addAll(\"UAC\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tEndpoint_2.setValue(\"Not Enabled\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (showAndWait.get() == buttonCancel) {\n\t\t\t\t\t\t\tdialog.close();\n\t\t\t\t\t\t\tendpointOneActionPerformed = true;\n\t\t\t\t\t\t\tEndpoint_1.setValue(oldValue);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (!endpointOneActionPerformed) {\n\t\t\t\t\t\t\tif (!performLoadAction && Endpoint_1.getValue() != null\n\t\t\t\t\t\t\t\t\t&& Endpoint_1.getValue().equals(\"OUT\")) {\n\t\t\t\t\t\t\t\tEndpoint_2.setValue(\"Not Enabled\");\n\t\t\t\t\t\t\t\tEndpoint_2.getItems().removeAll(\"OUT\");\n//\t\t\t\t\t\t\t\tif (Endpoint_2.getValue() != null && Endpoint_2.getValue().equals(\"IN\")) {\n//\t\t\t\t\t\t\t\t\tEndpoint_2.setValue(\"Not Enabled\");\n//\t\t\t\t\t\t\t\t\tEndpoint_2.getItems().remove(\"IN\");\n//\t\t\t\t\t\t\t\t} else {\n//\t\t\t\t\t\t\t\t\tEndpoint_2.getItems().remove(\"IN\");\n//\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if (!performLoadAction && Endpoint_1.getValue() != null\n\t\t\t\t\t\t\t\t\t&& Endpoint_1.getValue().equals(\"IN\")) {\n//\t\t\t\t\t\t\t\tif (!Endpoint_2.getItems().contains(\"IN\")) {\n//\t\t\t\t\t\t\t\t\tEndpoint_2.getItems().addAll(\"IN\");\n//\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tEndpoint_2.setValue(\"Not Enabled\");\n\t\t\t\t\t\t\t\tif(!Endpoint_2.getItems().contains(\"OUT\")) {\n\t\t\t\t\t\t\t\t\tEndpoint_2.getItems().add(\"OUT\");\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 (!performLoadAction && Endpoint_1.getValue() != null\n\t\t\t\t\t\t\t\t\t&& Endpoint_1.getValue().equals(\"UAC\")) {\n\t\t\t\t\t\t\t\tif (Endpoint_2.getValue() != null && Endpoint_2.getValue().equals(\"UAC\")) {\n\t\t\t\t\t\t\t\t\tEndpoint_2.setValue(\"Not Enabled\");\n\t\t\t\t\t\t\t\t\tEndpoint_2.getItems().remove(\"UAC\");\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tEndpoint_2.getItems().remove(\"UAC\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if (!performLoadAction && Endpoint_1.getValue() != null\n\t\t\t\t\t\t\t\t\t&& Endpoint_1.getValue().equals(\"UVC\") && Endpoint_2.getValue() != null\n\t\t\t\t\t\t\t\t\t&& Endpoint_2.getValue().equals(\"Not Enabled\")) {\n\t\t\t\t\t\t\t\tif (!Endpoint_2.getItems().contains(\"UAC\")) {\n\t\t\t\t\t\t\t\t\tEndpoint_2.getItems().addAll(\"UAC\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tEndpoint_2.setValue(\"Not Enabled\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tloadNewEndPoint1(newValue);\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\tEndpoint_1.getSelectionModel().selectedItemProperty().addListener(changeListener);\n\t}", "public abstract String getSelectedAddressType();", "private void landOrTakeoff(String land_or_takeoff) {\n\t\ttry {\n\t\tthis.baggage = Integer.valueOf(land_or_takeoff);\n\t\tthis.isLanding = true;\n\t\t}catch(NumberFormatException e) {\n\t\t\tthis.isLanding = false;\n\t\t\tthis.destination = land_or_takeoff;\n\t\t}//catch\n\t}", "@Override\n public void onClick(View v) {\n if(Constants.haveConfirmed){\n Constants.haveConfirmed = false;\n setResult(Activity.RESULT_OK);\n finish();\n }else{\n Toast.makeText(MapChoosePointActivity.this,\"请先选择农田地址\",Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n\t\t\tpublic void onMapClick(LatLng arg0) {\n\t\t\t\tfinal LatLng location = arg0;\n \tAlertDialog builder = new AlertDialog.Builder(MainActivity.this)\n\t .setMessage(\"Do you want to add your location here?\")\n\t .setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n\t public void onClick(DialogInterface dialog, int id) {\n\t \t setFlag = true;\n\t \t myLocation = location;\n\t \t //use this flag to indicate that we want to see the path from current location or a set point\n\t \t Log.d(\"my location:\", \"\"+myLocation.latitude + myLocation.longitude);\n\t \t if(setFlag == true){\n\t \t\t if(myMarker != null){\n\t\t \t\t myMarker.remove();\n\t\t \t }\n\t\t \t myMarker = mMap.addMarker(new MarkerOptions().position(myLocation).title(\"myLocation\").draggable(true)\n\t\t \t\t\t\t\t\t.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_BLUE)));\n\t\t \t\t\t\t landmarks.addMarker(\"myLocation\", myMarker);\n\t \t } \n\t }\n\t })\n\t .setNegativeButton(\"Not now\", new DialogInterface.OnClickListener() {\n\t public void onClick(DialogInterface dialog, int id) {\n\t // User cancelled the dialog\n\t }\n\t }).create();\n \tbuilder.show();\n\t\t\t}", "@Override\r\n\t\t\tpublic void onItemSelected(AdapterView<?> parent, View view,\r\n\t\t\t\t\tint position, long id) {\n\r\n\t\t\t\t_locationItems.clear();\r\n\r\n\t\t\t\tcity_id = _cityAdapter.getItem(position).getStrId();\r\n\r\n\t\t\t\tif (!city_id.equals(\"0\")) {\r\n\r\n\t\t\t\t\tDropDownItem _selectlocation = new DropDownItem();\r\n\t\t\t\t\t_selectlocation.setStrId(\"0\");\r\n\t\t\t\t\t_selectlocation.setName(\"Select Location\");\r\n\t\t\t\t\t_locationItems.add(_selectlocation);\r\n\r\n\t\t\t\t\t_locationAdapter.notifyDataSetChanged();\r\n\r\n\t\t\t\t\tnew LocationAsync().execute(\"\");\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\telse {\r\n\r\n\t\t\t\t\tDropDownItem _selectlocation = new DropDownItem();\r\n\t\t\t\t\t_selectlocation.setStrId(\"0\");\r\n\t\t\t\t\t_selectlocation.setName(\"Select Location\");\r\n\t\t\t\t\t_locationItems.add(_selectlocation);\r\n\r\n\t\t\t\t\t_locationAdapter.notifyDataSetChanged();\r\n\t\t\t\t}\r\n\r\n\t\t\t}", "@Test\n public void readyToTravel()\n {\n Position p = country1.readyToTravel(cityA, cityB);\n assertEquals(p.getFrom(), cityA);\n assertEquals(p.getTo(), cityB);\n assertEquals(p.getDistance(),4);\n assertEquals(p.getTotal(),4);\n //From.equals(To)\n p = country1.readyToTravel(cityA, cityA);\n assertEquals(p.getFrom(), cityA);\n assertEquals(p.getTo(), cityA);\n assertEquals(p.getDistance(),0);\n assertEquals(p.getTotal(),0);\n //No direct path from from to to.\n p = country1.readyToTravel(cityB, cityC);\n assertEquals(p.getFrom(), cityB);\n assertEquals(p.getTo(), cityB);\n assertEquals(p.getDistance(),0);\n assertEquals(p.getTotal(),0);\n //From not in the country.\n p = country1.readyToTravel(cityG, cityA);\n assertEquals(p.getFrom(), cityG);\n assertEquals(p.getTo(), cityG);\n assertEquals(p.getDistance(),0);\n assertEquals(p.getTotal(),0);\n \n //To is in another country\n p = country1.readyToTravel(cityD, cityF);\n assertEquals(p.getFrom(), cityD);\n assertEquals(p.getTo(), cityF);\n assertEquals(p.getDistance(),3);\n assertEquals(p.getTotal(),3);\n }", "public void onClick(View v) {\n\t\tswitch (v.getId()) {\n\t\tcase (R.id.btn_set_view):\n\t\t\tGeoLocation loc = new GeoLocation(\n\t\t\t\t\t(ParseGeoPoint) destination.get(\"location\"));\n\t\t\tGPS.getInstance().setDestination(loc);\n\t\t\tPreferences.setDestination(destination);\n\t\t\tIntent returnIntent = new Intent();\n\t\t\treturnIntent.putExtra(\"result\", 1);\n\t\t\tsetResult(RESULT_OK, returnIntent);\n\t\t\tfinish();\n\t\t\tbreak;\n\t\t}\n\t}", "public void suggestTourPlan(Tour alternativeRoute) throws JSONException, ParseException {\n String tourId = alternativeRoute.getTourName(); //get this from session\n Tour tourDetails = new TourDAOs().getTour(alternativeRoute.getTourName());\n System.out.println(\"Tour Details :\" + tourDetails.getStartDate() + \" \" + tourDetails.getEndDate());\n \n String start = tourDetails.getStartDate().substring(8);\n String end = tourDetails.getEndDate().substring(8);\n int tourDuration = Integer.parseInt(end) - Integer.parseInt(start);\n System.out.println(\"REAL DATE :\" + start + \" \" + end + \" \" + tourDuration);\n\n //get premium route details\n List<Route> routeDetails = new LocationRouteDAO().getDefaultRoute(tourId);\n //to print the locations of default route\n for (Route route : routeDetails) {\n System.out.println(\"Default Route list :\" + route.getLocationId());\n //System.out.println(location.getPoints());\n }\n\n int position = 0;\n int i = 0;\n ArrayList<Route> finalRoutes = new ArrayList<Route>();\n Route r = new Route();\n\n Route hotel = new Route();\n hotel.setDestinationPlaceName(routeDetails.get(0).getSourcePlaceName());\n hotel.setDestinationLatitude(routeDetails.get(0).getSourceLatitude());\n hotel.setDestinationLongitude(routeDetails.get(0).getSourceLongitude());\n finalRoutes.add(hotel);\n\n System.out.println(\"before proceeding with the loop :\" + finalRoutes.get(0).getDestinationPlaceName());\n\n //new code starts here\n for (Route route : routeDetails) {\n\n //get the location name of each location of the premium route\n String locName = route.getDestinationPlaceName();\n\n //find the category of the locName\n String locNameCategory = new LocationDAOs().getCategoryLocName(locName);\n\n //get all the locations that belongs to that category\n List<Location> categoryLocList = new ArrayList();\n categoryLocList = new LocationDAOs().getAllLocationsCategory(locNameCategory);\n\n //the location array that sends to the route generator algorithm\n ArrayList<Location> locations_details_ontology = new ArrayList();\n\n //to add the accommodation location as the first to the ontology array\n i++;\n\n Location loc1 = new Location();\n loc1.setLocationName(finalRoutes.get(finalRoutes.size() - 1).getDestinationPlaceName());\n loc1.setLatitude(finalRoutes.get(finalRoutes.size() - 1).getDestinationLatitude());\n loc1.setLongitude(finalRoutes.get(finalRoutes.size() - 1).getDestinationLongitude());\n locations_details_ontology.add(loc1);\n \n \n for (Location loc : categoryLocList) {\n\n if (!locations_details_ontology.get(0).getLocationName().equals(loc.getLocationName())) {\n Location l = new Location();\n l.setLocationName(loc.getLocationName());\n l.setLatitude(loc.getLatitude());\n l.setLongitude(loc.getLongitude());\n locations_details_ontology.add(l);\n }\n }\n \n //to print locations_details_ontology\n for (Location location : locations_details_ontology) {\n System.out.println(location.getLocationName() + \"----\"\n + location.getLatitude() + \"----\" + location.getLongitude());\n //System.out.println(location.getPoints());\n }\n\n //call the lagorithm to find out nearest locations to the first location in ontology array\n ArrayList<Route> routes = new RouteGenerator().RouteFinder(locations_details_ontology);\n\n // Loop all the routes to take the minimum distance of route.\n double min = 0;\n for (int k = 0; k < routes.size(); k++) {\n\n System.out.println(routes.get(k).getDistance());\n min = routes.get(0).getDistance();\n if (min >= routes.get(k).getDistance()) {\n min = routes.get(k).getDistance();\n r = routes.get(k);\n }\n }\n position++;\n r.setPosition(Integer.toString(position));\n\n boolean res = false;\n for (Route avail : finalRoutes) {\n\n if (r.getDestinationPlaceName().equals(avail.getDestinationPlaceName())) {\n res = true;\n }\n\n }\n if (res == false) {\n finalRoutes.add(r);\n }\n \n //to print final routes array\n for (Route fr : finalRoutes) {\n System.out.println(\"FINAL ROUTES ARRAY SANDUNI :\" + fr.getDestinationPlaceName());\n }\n\n }\n\n //get all location list from the database\n List<Location> allLocationList = new LocationDAOs().getAllLocationsList();\n // finalRoutes = new CustomizeRoute().DayPlanner(finalRoutes, allLocationList);\n\n //int m=0;\n //for (int es = 0; es <= m; es++) {\n for (int es = 0; es <= 4; es++) {\n finalRoutes = new CustomizeRoute().DayPlanner(finalRoutes, allLocationList);\n\n int estimatedDuration = Integer.parseInt(finalRoutes.get(finalRoutes.size() - 1).getDate());\n\n if (tourDuration < estimatedDuration) {\n finalRoutes.remove(finalRoutes.size() - 1);\n //m++;\n\n }\n }\n\n //print final routes array after customizing routes\n for (Route fr : finalRoutes) {\n System.out.println(\"FINAL ROUTES ARRAY ACCORDING TO DA PLAN :\" + fr.getDestinationPlaceName() + \" \" + fr.getDate());\n }\n\n //add alternative route to db\n int res = new LocationRouteDAO().addAlternativeRoute(finalRoutes, alternativeRoute.getTourName());\n\n if (res == 1) {\n System.out.println(\"SUCCESS!\");\n } else {\n System.out.println(\"FAILED!\");\n }\n\n }", "@Override\n public void onClick(View v) {\n try {\n PlacePicker.IntentBuilder intentBuilder = new PlacePicker.IntentBuilder();\n Intent intent = intentBuilder.build(DiscoverActivity.this);\n // Start the Intent by requesting a result, identified by a request code.\n startActivityForResult(intent, PLACE_PICKER_REQUEST); // Result should be placename and coordinates\n // Hide the pick option in the UI to prevent users from starting the picker\n // multiple times.\n //showPickAction(false);\n\n } catch (GooglePlayServicesRepairableException e) {\n GooglePlayServicesUtil\n .getErrorDialog(e.getConnectionStatusCode(), DiscoverActivity.this, 0);\n } catch (GooglePlayServicesNotAvailableException e) {\n Toast.makeText(DiscoverActivity.this, \"Google Play Services is not available.\",\n Toast.LENGTH_LONG)\n .show();\n }\n\n }", "public void chooseFlights()\r\n\t{\n\t\tdriver.findElement(By.xpath(trObj.CHOOSEFLISGHTS)).click();\r\n\r\n\t}", "public String getArrivalAirport();", "@Override\n public void onPlaceSelected(Place place) {\n\n Log.i(\"place_autocomplete\", \"Place: \" + place.getName() + \", \" + place.getId() + \", \" + place.getLatLng());\n LatLng latLng = place.getLatLng();\n setLocationWork(latLng.latitude, latLng.longitude);\n }", "public void switchToCountry()\n {\n questionLabel.setText(currentQuestion.getQuestion());\n d.setVisible(true);\n atQuestionStage=true;\n mapImageLabel.setVisible(false);\n a.setText(\"A\");\n b.setText(\"B\");\n c.setText(\"C\");\n a.setBounds(380,220,a.getPreferredSize().height+20,30);\n b.setBounds(500,220,b.getPreferredSize().height+20,30);\n c.setBounds(380,320,c.getPreferredSize().height+20,30);\n d.setBounds(500,320,d.getPreferredSize().height+20,30);\n questionLabel.setBounds(380,100,600,100);\n revalidate();\n }", "java.lang.String getArrivalAirport();" ]
[ "0.6377842", "0.6153841", "0.579063", "0.5762099", "0.5732456", "0.56932044", "0.5688835", "0.56668955", "0.5537937", "0.5519508", "0.55070895", "0.5506048", "0.5489198", "0.5486877", "0.5481312", "0.547823", "0.5462372", "0.5441668", "0.5432795", "0.5421901", "0.54133344", "0.5397133", "0.537603", "0.5362013", "0.5333039", "0.5327937", "0.53022295", "0.5273595", "0.52687824", "0.52591616", "0.5243107", "0.52347267", "0.52334523", "0.5225668", "0.5215225", "0.5195836", "0.51916057", "0.51883066", "0.5179989", "0.5179734", "0.51756096", "0.517166", "0.5154195", "0.514708", "0.5145301", "0.51380515", "0.5132713", "0.51320785", "0.5125818", "0.5124082", "0.51184815", "0.5111571", "0.51107824", "0.51084596", "0.51020676", "0.50993496", "0.50987655", "0.5091417", "0.5088189", "0.5083344", "0.5077389", "0.50737417", "0.5067661", "0.5066499", "0.5049024", "0.50459856", "0.5035769", "0.5033337", "0.5025178", "0.5018963", "0.5013457", "0.50005645", "0.49922243", "0.49821982", "0.4979041", "0.49782425", "0.49759758", "0.49684536", "0.49642044", "0.4959951", "0.49585778", "0.49518108", "0.4947656", "0.49448615", "0.49437943", "0.4939644", "0.4937776", "0.49355608", "0.49331066", "0.49293783", "0.49282447", "0.49273154", "0.49265018", "0.49225405", "0.49205476", "0.4919438", "0.49190566", "0.49177223", "0.49134552", "0.49130288" ]
0.55970424
8
Encode and print barcode
public void printBarcode(String code, int type, int h, int w, int font, int pos) throws IOException { // need to test for errors in length of code // also control for input type=0-6 // GS H = HRI position writer.write(0x1D); writer.write("H"); writer.write(pos); // 0=no print, 1=above, 2=below, 3=above & below // GS f = set barcode characters writer.write(0x1D); writer.write("f"); writer.write(font); // GS h = sets barcode height writer.write(0x1D); writer.write("h"); writer.write(h); // GS w = sets barcode width writer.write(0x1D); writer.write("w"); writer.write(w);// module = 1-6 // GS k writer.write(0x1D); // GS writer.write("k"); // k writer.write(type);// m = barcode type 0-6 writer.write(code.length()); // length of encoded string writer.write(code);// d1-dk writer.write(0);// print barcode writer.flush(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void barcodeCaptured(String barcodeString);", "public static void encode() {\n char[] symbols = initializeSymbols();\n int position;\n while (!BinaryStdIn.isEmpty()) {\n char symbol = BinaryStdIn.readChar();\n position = 0;\n while (symbols[position] != symbol) {\n position++;\n }\n BinaryStdOut.write(position, BITS_PER_BYTE);\n System.arraycopy(symbols, 0, symbols, 1, position);\n symbols[0] = symbol;\n }\n BinaryStdOut.close();\n }", "public static void encode() {\r\n int[] index = new int[R + 1];\r\n char[] charAtIndex = new char[R + 1];\r\n for (int i = 0; i < R + 1; i++) { \r\n index[i] = i; \r\n charAtIndex[i] = (char) i;\r\n }\r\n while (!BinaryStdIn.isEmpty()) {\r\n char c = BinaryStdIn.readChar();\r\n BinaryStdOut.write((char)index[c]);\r\n for (int i = index[c] - 1; i >= 0; i--) {\r\n char temp = charAtIndex[i];\r\n int tempIndex = ++index[temp];\r\n charAtIndex[tempIndex] = temp;\r\n }\r\n charAtIndex[0] = c;\r\n index[c] = 0;\r\n }\r\n BinaryStdOut.close();\r\n }", "public static void encode() {\n char[] seq = new char[R];\n\n for (int i = 0; i < R; i++)\n seq[i] = (char) i;\n\n while (!BinaryStdIn.isEmpty()) {\n char c = BinaryStdIn.readChar();\n char t = seq[0];\n int i;\n for (i = 0; i < R - 1; i++) {\n char tmp;\n if (t == c) break;\n tmp = t;\n t = seq[i + 1];\n seq[i + 1] = tmp;\n }\n seq[0] = t;\n BinaryStdOut.write((char) i);\n }\n BinaryStdOut.close();\n }", "public java.lang.String getBarcode() {\n return barcode;\n }", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException, Exception {\n response.setContentType(\"text/html;charset=UTF-8\");\n PrintWriter out=response.getWriter();\n Connection con = DBConnection1.getDBConnection();\n Statement stmt;\n stmt = con.createStatement();\n Code128 barcode = new Code128();\n String acc[]=request.getParameterValues(\"accession_no[]\");\n String title[]=request.getParameterValues(\"title[]\");\n System.out.println(acc.length+\" \"+acc[0]);\n String x=\"\";\n for(int i=0;i<acc.length;i++)\n {\n x+=\"('\"+acc[i]+\"','D://barcode//\"+acc[i]+\".gif','\"+title[i]+\"'),\";\n System.out.println(x);\n }\n \n x=x.substring(0,x.length()-1);\n String query=\"insert into lib_barcode(access_no,path,title) values \"+x;\n PreparedStatement pst=con.prepareStatement(query);\n int result = pst.executeUpdate();\n for(int i=0;i<acc.length;i++)\n {\n out.print(acc[i]);\n barcode.setData(acc[i]);\n barcode.setX(2);\n barcode.setShowText(false);\n barcode.drawBarcode(\"D://barcode//\"+acc[i]+\".gif\");\n }\n }", "private String getBarcode()\n {\n Scanner scanner = new Scanner(System.in);\n System.out.println(\"\");\n System.out.print(\"Indtast stregkode: \");\n return scanner.nextLine();\n }", "public String getlbr_Barcode2();", "public static void encode()\n {\n \n String s = BinaryStdIn.readString();\n //String s = \"ABRACADABRA!\";\n int len = s.length();\n int key = 0;\n \n // generating rotating string table\n String[] table = new String[len];\n for (int i = 0 ; i < len; i++)\n {\n table[i] = rotate(s, i, len);\n }\n \n // sort the table\n String[] sorted = new String[len];\n for(int i = 0 ; i < len; i++)\n {\n sorted[i] = table[i];\n }\n sort(sorted, len);\n \n //generating encoded string\n StringBuilder result = new StringBuilder();\n for(int i = 0 ; i < len; i++)\n result.append(sorted[i].charAt(len-1));\n \n //find the key index \n for(int i = 0 ; i < table.length; i++)\n {\n if(sorted[i].equals(s))\n {\n key = i;\n break;\n }\n }\n \n // output part\n \n BinaryStdOut.write(key);\n \n for(int i = 0 ; i < len; i++)\n BinaryStdOut.write(result.charAt(i)); // generate the output character by character\n \n BinaryStdOut.close();\n \n }", "public void setBarcode(java.lang.String barcode) {\n this.barcode = barcode;\n }", "@Override\r\n\tpublic String getBarcode() {\n\t\treturn null;\r\n\t}", "private void printEncodedMessage() {\n System.out.print(\"\\nPrinting the encoded message\");\n System.out.print(\"\\n\" + encodedMessage + \"\\n\");\n System.out.println();\n }", "public void generateBarcode(String text, BarcodeGeneratorListener listener,\n int imageId){\n MultiFormatWriter multiFormatWriter = new MultiFormatWriter();\n try {\n BitMatrix bitMatrix = multiFormatWriter.encode(text, BarcodeFormat.CODE_128, 600, 200);\n BarcodeEncoder barcodeEncoder = new BarcodeEncoder();\n Bitmap bitmap = barcodeEncoder.createBitmap(bitMatrix);\n listener.onBarcodeGenerated(bitmap, imageId);\n } catch (WriterException e) {\n e.printStackTrace();\n }\n }", "public String generateBarCode(String barCodeStr, String receiptName) {\n\t\tString path = getFileServerPath(barCodeStr+\".jpg\");\r\n\t\t\r\n\t\tif(new File(path).exists()) return path;\r\n\t\t\r\n\t\tFileOutputStream fos = null;\r\n\t\tByteArrayOutputStream bytesOut = null;\r\n\t\t\r\n\t\ttry {\r\n\t\t\tBarcode128 code128 = new Barcode128();\r\n\t\t\tcode128.setCodeType(Barcode128.CODE128);\r\n\t\t\tcode128.setCode(barCodeStr);\r\n\t\t\tjava.awt.Image img = code128.createAwtImage(Color.BLACK, Color.WHITE);\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\tBufferedImage outImage = new BufferedImage(img.getWidth(null),\r\n\t\t\t\timg.getHeight(null), BufferedImage.TYPE_INT_RGB);\r\n\t\t\toutImage.getGraphics().drawImage(img, 0, 0, null);\r\n\t\t\tbytesOut = new ByteArrayOutputStream();\r\n\t\t\r\n\t\t\tImageIO.write(outImage, \"jpg\", bytesOut);\r\n\t\t\t\r\n\t\t\tbyte[] pngImageData = bytesOut.toByteArray();\r\n\t\t\t\r\n\t\t\tfos = new FileOutputStream(new File(path));\r\n\t\t\tfos.write(pngImageData);\r\n\t\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} finally {\r\n\t\t\t\r\n\t\t\tif (bytesOut != null) {\r\n\t\t\t\ttry {\t\t\t\t\t\r\n\t\t\t\t\tbytesOut.flush();\r\n\t\t\t\t\tbytesOut.close();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (fos != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos.flush();\r\n\t\t\t\t\tfos.close();\t\t\t\t\t\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//System.out.println(\"================================ \"+path +\" \"+ new File(path).exists());\r\n\t\t\t//logger.error(\"================================ \"+path +\" \"+ new File(path).exists());\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn path;\r\n\t}", "@Override\n\tpublic String getBarcode() {\n\t\treturn product.getBarcode();\n\t}", "public abstract String visualize(byte input);", "public String encode(String text) {\n\t\t// TODO fill this in.\n\n\t\tString encodedText = \"\";\n\t\tSystem.out.println(\"text.length(): \" + text.length());\n\t\tfor (int i = 0; i < text.length(); i++) {\n\t\t\tString characterCode = encodingTable.get(text.charAt(i));\n\t\t\tSystem.out.println(text.charAt(i));\n\t\t\tencodedText = encodedText.concat(characterCode);\n\t\t}\n\t\tSystem.out.println(\"THISHERE: \\n\" + encodedText + \"\\nTHISEND\");\n\n\t\treturn encodedText;\n\t}", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tsetContentView(R.layout.activity_print_barcode);\r\n\t\t\r\n\t\tiv = (ImageView) findViewById(R.id.iv_test);\r\n\t\tet_input=(EditText)findViewById(R.id.et_input);\r\n\t\tbt_bar = (Button) findViewById(R.id.bt_bar);\r\n\t\tbt_bar.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\tif (PrintActivity.pl.getState() != PrinterClass.STATE_CONNECTED) {\r\n\t\t\t\t\tToast.makeText(\r\n\t\t\t\t\t\t\tPrintBarCodeActivity.this,\r\n\t\t\t\t\t\t\tPrintBarCodeActivity.this.getResources().getString(\r\n\t\t\t\t\t\t\t\t\tR.string.str_unconnected), 2000).show();\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tString message = et_input.getText().toString();\r\n\r\n\t\t\t\tif (message.getBytes().length > message.length()) {\r\n\t\t\t\t\tToast.makeText(\r\n\t\t\t\t\t\t\tPrintBarCodeActivity.this,\r\n\t\t\t\t\t\t\tPrintBarCodeActivity.this.getResources().getString(\r\n\t\t\t\t\t\t\t\t\tR.string.str_cannotcreatebar), 2000).show();\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tif (message.length() > 0) {\r\n\r\n\t\t\t\t\tbtMap = BarcodeCreater.creatBarcode(PrintBarCodeActivity.this,\r\n\t\t\t\t\t\t\tmessage, PrintService.imageWidth*8, 100, true, 1);\r\n\t\t\t\t\tiv.setImageBitmap(btMap);\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\r\n\t\tbt_image = (Button) findViewById(R.id.bt_image);\r\n\t\tbt_image.setOnClickListener(new OnClickListener() {\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\tif (btMap != null) {\r\n\t\t\t\t\tPrintActivity.pl.printImage(btMap);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tbtMap = BarcodeCreater.creatBarcode(PrintBarCodeActivity.this,\r\n\t\t\t\t\"9787111291954\", PrintService.imageWidth*8, 100, true, 1);\r\n\t\tiv.setImageBitmap(btMap);\r\n\t}", "protected boolean encode()\n {\n\t\tfor(int i=0;i<256;i++)\n {\n\t\t\tstr[i] = String.valueOf((char)i);\n\t\t}\n str[13] = \"\";\n\t\tstr[10] = \"\\n\";\n str[65] = \" \".concat(this.A);\n\t\tstr[67] = \" \".concat(this.C);\n str[71] = \" \".concat(this.G);\n\t\tstr[84] = \" \".concat(this.T);\n try\n\t\t{\n \treader = new FileReader(in);\n writer = new FileWriter(out);\n\n\t\t\t/*******************************************************************************\n\t\t\t *\tThis loop traverse to the dna sequence and maps each character to\n\t\t\t *\tpredefined graphical value character by character\n\t\t\t *******************************************************************************/\n\t\t\twhile(true)\n {\n\t\t\t\ttemp = reader.read();\n if(temp == -1)\n\t\t\t\t\tbreak;\n\t\t\t\t\tif(temp>=97 && temp<=122)\n\t\t\t\t\t\ttemp=temp-32;\n\t\t\t\tif(temp==65 || temp==67 || temp==71 || temp==84)\n \tspace_flag = 1;\n\t\t\t\telse\n\t\t\t\t{\n \tif(space_flag == 1)\n {\n\t\t\t\t\t\tt_str = \" \".concat(str[temp]);\n writer.write(t_str);\n\t\t\t\t\t\tspace_flag = 0;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n space_flag = 0;\n\t\t\t\t}\n if(temp == 59 || temp == 62)\n\t\t\t\t{\n \tt_str = \"\";\n while(temp != 10)\n\t\t\t\t\t{\n \tt_str = t_str.concat(String.valueOf((char)temp));\n temp = reader.read();\n\t\t\t\t\t}\n t_str = t_str.concat(\"(Mapping: A>\"+this.A+\" C>\"+this.C+\" G>\"+this.G+\" T>\"+this.T+\")\");\n t_str = t_str.concat(\"\\n\");\n\t\t\t\t\twriter.write(t_str);\n\t\t\t\t}\n else\n\t\t\t\t\twriter.write(str[temp]);\n\t\t\t}\n writer.close();\n\t\t\treader.close();\n\t\t}\n catch (IOException e)\n\t\t{\n e.printStackTrace (System.out);\n JOptionPane.showMessageDialog(null,\"Exception occurred :( \");\n return false;\n\t\t}\n\t\treturn true;\n\t}", "public static void encode()\n {\n String s = BinaryStdIn.readString();\n CircularSuffixArray myCsa = new CircularSuffixArray(s);\n int first = 0;\n while (first < myCsa.length() && myCsa.index(first) != 0) {\n first++;\n }\n BinaryStdOut.write(first);\n int i = 0;\n while (i < myCsa.length()) {\n BinaryStdOut.write(s.charAt((myCsa.index(i) + s.length() - 1) % s.length()));\n i++;\n }\n BinaryStdOut.close();\n }", "public ScanBarcode() {\n initComponents();\n \n \n }", "public java.lang.String getNewBarcode() {\n return newBarcode;\n }", "public String encode() {\n\t\tString coded = \"\";\n\t\tfor (Character c: this.input.toCharArray()) {\n\t\t\tcoded += this.mapping.get(c);\n\t\t}\n\t\treturn coded;\n\t}", "private void displayBarcodeAnimation(String barcode) {\n\n\t\t// barcode image\n\t\tBitmap bitmap = null;\n\t\t// show original barcode animation\n\t\ttry {\n\t\t\tint barcodeWidth = (screenWidth * 3) / 4;\n\t\t\tint barcodeHeight = barcodeWidth / 2;\n\t\t\tbitmap = encodeAsBitmap(barcode, BarcodeFormat.CODE_128,\n\t\t\t\t\tbarcodeWidth, barcodeHeight);\n\t\t} catch (WriterException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tcaptureImageView.setImageBitmap(bitmap);\n\t\tcapturedBarcodeTextView.setText(barcode);\n\n\t\tbitmap = null;\n\t\tanimationGroup.clearAnimation();\n\t\tanimationGroup.setVisibility(View.VISIBLE);\n\t\tanimationGroup.startAnimation(captureMoveAnimation);\n\n\t}", "private Bitmap encodeToQrCode(String text) throws WriterException {\n BitMatrix bitMatrix;\n try {\n bitMatrix = new MultiFormatWriter().encode(\n text,\n BarcodeFormat.DATA_MATRIX.QR_CODE,\n QR_CODE_WIDTH, QR_CODE_WIDTH, null\n );\n\n } catch (IllegalArgumentException Illegalargumentexception) {\n return null;\n }\n int bitMatrixWidth = bitMatrix.getWidth();\n int bitMatrixHeight = bitMatrix.getHeight();\n int[] pixels = new int[bitMatrixWidth * bitMatrixHeight];\n\n for (int y = 0; y < bitMatrixHeight; y++) {\n int offset = y * bitMatrixWidth;\n for (int x = 0; x < bitMatrixWidth; x++) {\n pixels[offset + x] = bitMatrix.get(x, y) ?\n context.getResources().getColor(R.color.qrCodeBlack):context.getResources().getColor(R.color.qrCodeWhite);\n }\n }\n Bitmap bitmap = Bitmap.createBitmap(bitMatrixWidth, bitMatrixHeight, Bitmap.Config.ARGB_4444);\n bitmap.setPixels(pixels, 0, QR_CODE_WIDTH, 0, 0, bitMatrixWidth, bitMatrixHeight);\n return bitmap;\n }", "private void registerBarcode(View view) {\n if (getResult() != null) {\n Intent codeScannerIntent = new Intent(this, CodeScannerActivity.class);\n startActivityForResult(codeScannerIntent, CodeScannerActivity.SCAN_CODE_REQUEST);\n } else {\n Toast.makeText(this, \"Trial result is invalid, cannot register bar code\", Toast.LENGTH_SHORT).show();\n }\n }", "public String generateQRCode(String barCodeStr, String receiptName,String qrCodeText) {\n\t\tlogger.error(\"Start of generateQRCode\"+barCodeStr+\"\"+qrCodeText);\r\n\t\tString path = getFileServerPath(barCodeStr+\"QR\"+\".jpg\");\r\n\t\t\r\n\t\tif(new File(path).exists()) return path;\r\n\t\t\r\n\t\tFileOutputStream fos = null;\r\n\t\tByteArrayOutputStream bytesOut = null;\r\n\t\t\r\n\t\ttry {\r\n\t\t\tint size = 125;\r\n\t\t\tString fileType = \"jpg\";\r\n\t\t\t/*\r\n\t\t\t * Barcode128 code128 = new Barcode128();\r\n\t\t\t * code128.setCodeType(Barcode128.CODE128); code128.setCode(barCodeStr);\r\n\t\t\t * java.awt.Image img = code128.createAwtImage(Color.BLACK, Color.WHITE);\r\n\t\t\t * \r\n\t\t\t * BufferedImage outImage = new BufferedImage(img.getWidth(null),\r\n\t\t\t * img.getHeight(null), BufferedImage.TYPE_INT_RGB);\r\n\t\t\t * outImage.getGraphics().drawImage(img, 0, 0, null); bytesOut = new\r\n\t\t\t * ByteArrayOutputStream();\r\n\t\t\t * \r\n\t\t\t * ImageIO.write(outImage, \"jpg\", bytesOut);\r\n\t\t\t */\r\n\t\t\t\r\n\t\t\t// Create the ByteMatrix for the QR-Code that encodes the given String\r\n\t\t\tHashtable<EncodeHintType, ErrorCorrectionLevel> hintMap = new Hashtable();\r\n\t\t\thintMap.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.L);\r\n\t\t\tQRCodeWriter qrCodeWriter = new QRCodeWriter();\r\n\t\t\tBitMatrix byteMatrix = qrCodeWriter.encode(qrCodeText, BarcodeFormat.QR_CODE, size, size, hintMap);\r\n\t\t\t// Make the BufferedImage that are to hold the QRCode\r\n\t\t\tint matrixWidth = byteMatrix.getWidth();\r\n\t\t\tBufferedImage image = new BufferedImage(matrixWidth, matrixWidth, BufferedImage.TYPE_INT_RGB);\r\n\t\t\timage.createGraphics();\r\n\r\n\t\t\tGraphics2D graphics = (Graphics2D) image.getGraphics();\r\n\t\t\tgraphics.setColor(Color.WHITE);\r\n\t\t\tgraphics.fillRect(0, 0, matrixWidth, matrixWidth);\r\n\t\t\t// Paint and save the image using the ByteMatrix\r\n\t\t\tgraphics.setColor(Color.BLACK);\r\n\r\n\t\t\tfor (int i = 0; i < matrixWidth; i++) {\r\n\t\t\t\tfor (int j = 0; j < matrixWidth; j++) {\r\n\t\t\t\t\tif (byteMatrix.get(i, j)) {\r\n\t\t\t\t\t\tgraphics.fillRect(i, j, 1, 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbytesOut= new ByteArrayOutputStream();\r\n\t\t\tImageIO.write(image, fileType, bytesOut);\r\n\t\t\t\r\n\t\t\tbyte[] pngImageData = bytesOut.toByteArray();\r\n\t\t\t\r\n\t\t\tfos = new FileOutputStream(new File(path));\r\n\t\t\tfos.write(pngImageData);\r\n\t\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} catch (WriterException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\t\r\n\t\t\tif (bytesOut != null) {\r\n\t\t\t\ttry {\t\t\t\t\t\r\n\t\t\t\t\tbytesOut.flush();\r\n\t\t\t\t\tbytesOut.close();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (fos != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos.flush();\r\n\t\t\t\t\tfos.close();\t\t\t\t\t\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//System.out.println(\"================================ \"+path +\" \"+ new File(path).exists());\r\n\t\t\t//logger.error(\"================================ \"+path +\" \"+ new File(path).exists());\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn path;\r\n\t}", "@Override\n public void onBarcodeDetected(Barcode barcode) {\n Log.d(TAG,\"Barcode detected\");\n }", "@Override\n\tpublic boolean saveBarCode(int kodPoint, String readedCod) {\n\t\treturn false;\n\t}", "public java.lang.String getOrigBarcode() {\n return origBarcode;\n }", "public String barcode(String UID){\n\t\ttry {\n\t\t\tString res=dorequest(strbaseUrlTas + \"?id=\" + UID);\n\t\t\treturn res;\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n//TODO valid error reply\t\t\n\t\treturn \"error-request failed\";\n\t}", "private void generateQRCode(String data) {\n com.google.zxing.Writer writer = new QRCodeWriter();\n String finaldata = Uri.encode(data, \"ISO-8859-1\");\n try {\n BitMatrix bm = writer.encode(finaldata, BarcodeFormat.QR_CODE, 350, 350);\n qrBitmap = Bitmap.createBitmap(350, 350, Bitmap.Config.ARGB_8888);\n for (int i = 0; i < 350; i++) {\n for (int j = 0; j < 350; j++) {\n qrBitmap.setPixel(i, j, bm.get(i, j) ? Color.BLACK : Color.WHITE);\n }\n }\n } catch (WriterException e) {\n e.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n if (qrBitmap != null) {\n qrCodeImg.setImageBitmap(qrBitmap);\n\n }\n }", "public String encode(String text) {\n\t\t// TODO fill this in.\n\t\tString binaryCode = \"\";\n\n\t\tchar[] array = text.toCharArray();\n\n\t\tfor(char c : chars.keySet()){\n\t\t\tString code = findPath(c, root, \"\");\n\t\t\tcodeMap.put(c, code);\n\t\t\tSystem.out.println(c + \" \" + code);\t\t\t\t\t\t\t// print char codes\n\t\t}\n\n\t\tfor(char t : array){\n\t\t\tString charCode = codeMap.get(t);\n\t\t\tbinaryCode = binaryCode + charCode;\n\t\t}\n\n\t\treturn binaryCode;\n\t}", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif (PrintActivity.pl.getState() != PrinterClass.STATE_CONNECTED) {\r\n\t\t\t\t\tToast.makeText(\r\n\t\t\t\t\t\t\tPrintBarCodeActivity.this,\r\n\t\t\t\t\t\t\tPrintBarCodeActivity.this.getResources().getString(\r\n\t\t\t\t\t\t\t\t\tR.string.str_unconnected), 2000).show();\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tString message = et_input.getText().toString();\r\n\r\n\t\t\t\tif (message.getBytes().length > message.length()) {\r\n\t\t\t\t\tToast.makeText(\r\n\t\t\t\t\t\t\tPrintBarCodeActivity.this,\r\n\t\t\t\t\t\t\tPrintBarCodeActivity.this.getResources().getString(\r\n\t\t\t\t\t\t\t\t\tR.string.str_cannotcreatebar), 2000).show();\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tif (message.length() > 0) {\r\n\r\n\t\t\t\t\tbtMap = BarcodeCreater.creatBarcode(PrintBarCodeActivity.this,\r\n\t\t\t\t\t\t\tmessage, PrintService.imageWidth*8, 100, true, 1);\r\n\t\t\t\t\tiv.setImageBitmap(btMap);\r\n\t\t\t\t}\r\n\r\n\t\t\t}", "private void outHex(){\n\t\tSystem.out.println(binary);\n\t\tpw.println(binary);\n\t\t\n\t}", "public void encodeData() {\n frequencyTable = new FrequencyTableBuilder(inputPath).buildFrequencyTable();\n huffmanTree = new Tree(new HuffmanTreeBuilder(new FrequencyTableBuilder(inputPath).buildFrequencyTable()).buildTree());\n codeTable = new CodeTableBuilder(huffmanTree).buildCodeTable();\n encodeMessage();\n print();\n }", "@Test\n public void fieldBarcode() throws Exception {\n Document doc = new Document();\n DocumentBuilder builder = new DocumentBuilder(doc);\n\n builder.writeln();\n\n // Below are two ways of using BARCODE fields to display custom values as barcodes.\n // 1 - Store the value that the barcode will display in the PostalAddress property:\n FieldBarcode field = (FieldBarcode) builder.insertField(FieldType.FIELD_BARCODE, true);\n\n // This value needs to be a valid ZIP code.\n field.setPostalAddress(\"96801\");\n field.isUSPostalAddress(true);\n field.setFacingIdentificationMark(\"C\");\n\n Assert.assertEquals(\" BARCODE 96801 \\\\u \\\\f C\", field.getFieldCode());\n\n builder.insertBreak(BreakType.LINE_BREAK);\n\n // 2 - Reference a bookmark that stores the value that this barcode will display:\n field = (FieldBarcode) builder.insertField(FieldType.FIELD_BARCODE, true);\n field.setPostalAddress(\"BarcodeBookmark\");\n field.isBookmark(true);\n\n Assert.assertEquals(\" BARCODE BarcodeBookmark \\\\b\", field.getFieldCode());\n\n // The bookmark that the BARCODE field references in its PostalAddress property\n // need to contain nothing besides the valid ZIP code.\n builder.insertBreak(BreakType.PAGE_BREAK);\n builder.startBookmark(\"BarcodeBookmark\");\n builder.writeln(\"968877\");\n builder.endBookmark(\"BarcodeBookmark\");\n\n doc.save(getArtifactsDir() + \"Field.BARCODE.docx\");\n //ExEnd\n\n doc = new Document(getArtifactsDir() + \"Field.BARCODE.docx\");\n\n Assert.assertEquals(0, doc.getChildNodes(NodeType.SHAPE, true).getCount());\n\n field = (FieldBarcode) doc.getRange().getFields().get(0);\n\n TestUtil.verifyField(FieldType.FIELD_BARCODE, \" BARCODE 96801 \\\\u \\\\f C\", \"\", field);\n Assert.assertEquals(\"C\", field.getFacingIdentificationMark());\n Assert.assertEquals(\"96801\", field.getPostalAddress());\n Assert.assertTrue(field.isUSPostalAddress());\n\n field = (FieldBarcode) doc.getRange().getFields().get(1);\n\n TestUtil.verifyField(FieldType.FIELD_BARCODE, \" BARCODE BarcodeBookmark \\\\b\", \"\", field);\n Assert.assertEquals(\"BarcodeBookmark\", field.getPostalAddress());\n Assert.assertTrue(field.isBookmark());\n }", "public void run() {\n barcodeInfo.setText( // Update the TextView\n barcodes.valueAt(0).displayValue\n );\n }", "private void print() {\n printInputMessage();\n printFrequencyTable();\n printCodeTable();\n printEncodedMessage();\n }", "public void KTesteCompleto() throws RemoteException {\n\n // Alinhamento\n kPrinterPresenter.printStyleBold(false);\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_CENTER);\n kPrinterPresenter.text(\"Alinhamento\\n\");\n kPrinterPresenter.text(\"--------------------------------\\n\");\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_LEFT);\n kPrinterPresenter.text(\"TecToy Automação\\n\");\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_CENTER);\n kPrinterPresenter.text(\"TecToy Automação\\n\");\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_RIGTH);\n kPrinterPresenter.text(\"TecToy Automação\\n\");\n kPrinterPresenter.print3Line();\n\n // Formas de impressão\n\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_CENTER);\n kPrinterPresenter.text(\"Formas de Impressão\\n\");\n kPrinterPresenter.text(\"--------------------------------\\n\");\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_LEFT);\n kPrinterPresenter.printStyleBold(true);\n kPrinterPresenter.text(\"TecToy Automação\\n\");\n\n\n // Barcode\n\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_CENTER);\n kPrinterPresenter.text(\"BarCode\\n\");\n kPrinterPresenter.text(\"--------------------------------\\n\");\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_LEFT);\n kPrinterPresenter.printBarcode(\"7891098010575\", 2, 162, 2, 0);\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_CENTER);\n kPrinterPresenter.printBarcode(\"7891098010575\", 2, 162, 2, 2);\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_RIGTH);\n kPrinterPresenter.printBarcode(\"7891098010575\", 2, 162, 2, 1);\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_CENTER);\n kPrinterPresenter.printBarcode(\"7891098010575\", 2, 162, 2, 3);\n kPrinterPresenter.print3Line();\n // QrCode\n\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_CENTER);\n kPrinterPresenter.text(\"QrCode\\n\");\n kPrinterPresenter.text(\"--------------------------------\\n\");\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_CENTER);\n kPrinterPresenter.printQr(\"www.tectoyautomacao.com.br\", 8, 0);\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_LEFT);\n kPrinterPresenter.printQr(\"www.tectoyautomacao.com.br\", 8, 0);\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_RIGTH);\n kPrinterPresenter.printQr(\"www.tectoyautomacao.com.br\", 8, 0);\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_LEFT);\n kPrinterPresenter.printDoubleQRCode(\"www.tectoyautomacao.com.br\",\"tectoy\", 7, 1);\n // Imagem\n\n\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_CENTER);\n kPrinterPresenter.text(\"Imagem\\n\");\n kPrinterPresenter.text(\"--------------------------------\\n\");\n BitmapFactory.Options options = new BitmapFactory.Options();\n options.inTargetDensity = 160;\n options.inDensity = 160;\n Bitmap bitmap1 = null;\n if (bitmap1 == null) {\n bitmap1 = BitmapFactory.decodeResource(getResources(), test1, options);\n bitmap1 = scaleImage(bitmap1);\n }\n kPrinterPresenter.printBitmap(bitmap1, 0);\n kPrinterPresenter.setAlign(0);\n kPrinterPresenter.printBitmap(bitmap1, 0);\n kPrinterPresenter.setAlign(2);\n kPrinterPresenter.printBitmap(bitmap1, 0);\n // Tabelas\n\n\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_CENTER);\n kPrinterPresenter.text(\"Tabelas\\n\");\n kPrinterPresenter.text(\"--------------------------------\\n\");\n String[] prod = new String[3];\n int[] width = new int[3];\n int[] align = new int[3];\n\n width[0] = 100;\n width[1] = 50;\n width[2] = 50;\n\n align[0] = kPrinterPresenter.Alignment_LEFT;\n align[1] = kPrinterPresenter.Alignment_CENTER;\n align[2] = kPrinterPresenter.Alignment_RIGTH;\n\n prod[0] = \"Produto 001\";\n prod[1] = \"10 und\";\n prod[2] = \"3,98\";\n kPrinterPresenter.printTable(prod, width, align);\n\n prod[0] = \"Produto 002\";\n prod[1] = \"10 und\";\n prod[2] = \"3,98\";\n kPrinterPresenter.printTable(prod, width, align);\n\n\n prod[0] = \"Produto 003\";\n prod[1] = \"10 und\";\n prod[2] = \"3,98\";\n kPrinterPresenter.printTable(prod, width, align);\n\n\n prod[0] = \"Produto 004\";\n prod[1] = \"10 und\";\n prod[2] = \"3,98\";\n kPrinterPresenter.printTable(prod, width, align);\n\n\n prod[0] = \"Produto 005\";\n prod[1] = \"10 und\";\n prod[2] = \"3,98\";\n kPrinterPresenter.printTable(prod, width, align);\n\n prod[0] = \"Produto 006\";\n prod[1] = \"10 und\";\n prod[2] = \"3,98\";\n kPrinterPresenter.printTable(prod, width, align);\n\n\n kPrinterPresenter.print3Line();\n kPrinterPresenter.cutpaper(KTectoySunmiPrinter.HALF_CUTTING, 10);\n\n }", "public Decoded decode(String barcode){\n Decoded decoded = new Decoded();\n this.barcode = barcode;\n\n decoded.barcode = barcode;\n\n if(barcode == null || barcode.isEmpty()){\n decoded.error = Error.EMPTY_BARCODE;\n return decoded;\n }\n\n // remove leading * and check\n if(barcode.startsWith(\"*\")){\n barcode = barcode.substring(1);\n if(barcode.isEmpty()){\n decoded.error = Error.EMPTY_BARCODE;\n return decoded;\n }\n }\n\n // remove trailing * and check\n if(barcode.endsWith(\"*\")){\n barcode = barcode.substring(0, barcode.length() - 1);\n if(barcode.isEmpty()){\n decoded.error = Error.EMPTY_BARCODE;\n return decoded;\n }\n }\n\n // check for + character\n if(barcode.charAt(0) != '+'){\n decoded.error = Error.BARCODE_NOT_HIBC;\n return decoded;\n } else {\n barcode = barcode.substring(1);\n }\n\n // check minimum barcode length\n if(barcode.length() < 4){\n decoded.error = Error.INVALID_BARCODE;\n return decoded;\n }\n\n String potentialCheckAndLinkCharacters = barcode.substring(barcode.length() - 2);\n barcode = barcode.substring(0, barcode.length() - 2);\n\n String[] lines = barcode.split(\"[\\\\/]\");\n\n if(lines.length == 1){\n if(Character.isLetter(lines[0].charAt(0))){\n decoded = processLine1(decoded, Type.LINE_1, lines[0] + potentialCheckAndLinkCharacters);\n } else {\n decoded = processLine2(decoded, Type.LINE_2, lines[0] + potentialCheckAndLinkCharacters);\n }\n return decoded;\n\n }else if(lines.length == 2){\n decoded = processLine1(decoded, Type.CONCATENATED, lines[0]);\n decoded = assign(decoded, processLine2(new Decoded(), Type.CONCATENATED, lines[1] + potentialCheckAndLinkCharacters));\n } else {\n decoded.error = Error.INVALID_BARCODE;\n return decoded;\n }\n\n return decoded;\n\n }", "public void printEncodedTable(File encodedFile){\n clearFile(encodedFile);\n try{\n BufferedWriter output = new BufferedWriter(new FileWriter(encodedFile,true));\n for(Map.Entry<Character,String> entry : encodedTable.entrySet()){\n Character c = entry.getKey();\n if(c >= 32 && c < 127)\n output.write(entry.getKey()+\": \"+entry.getValue());\n else\n output.write(\" [0x\" + Integer.toOctalString(c) + \"]\"+\": \"+entry.getValue());\n output.write(\"\\n\");\n }\n output.close();\n }catch(IOException e){\n System.out.println(\"IOException\");\n }\n }", "public void setlbr_Barcode2 (String lbr_Barcode2);", "public void print() {\n // char letter = (char)\n // (this.registers.get(this.registerPointer).intValue());\n char letter = (char) this.registers[this.registerPointer];\n this.intOutput.add(this.registers[this.registerPointer]);\n // System.out.println(\"print: \" + this.registers[this.registerPointer]);\n this.output.add(Character.toString(letter));\n }", "public void printCode(PrintStream out, String code, BinaryTree<HuffData> tree) {\n HuffData theData = tree.getData(); //Get the data of the tree\n if (theData.symbol != null) { //If the data's symbol is not null (as in a symbol and not a sum)\n if(theData.symbol.equals(\" \")) { //If the symbol is a space print out \"space: \"\n out.println(\"space: \" + code);\n } else { //Otherwise print out the symbol and the code\n out.println(theData.symbol + \" \" + code);\n //Then add the symbol and code to the EncodeData table\n this.encodings[encodingsTop++] = new EncodeData(code, theData.symbol);\n }\n } else {\n //If the data's symbol is null, that means it is a sum node\n //and so it needs to go farther down the tree\n \n //Go down the left tree and add a 0\n printCode(out, code + \"0\", tree.getLeftSubtree());\n //Go down the right tree and add a 1\n printCode(out, code + \"1\", tree.getRightSubtree());\n }\n }", "static void MichelMethod() {\n String CSI = \"\\u001B[\";\n System.out.print(CSI + \"32\" + \"m\");\n\n System.out.println(\"This is the group U calculator.\");\n System.out.println(\"Thanks for your preference!\");\n System.out.println(CSI + \"m\");\n\n }", "public static void decode() {\n char[] symbols = initializeSymbols();\n int position;\n while (!BinaryStdIn.isEmpty()) {\n position = BinaryStdIn.readChar();\n char symbol = symbols[position];\n BinaryStdOut.write(symbol, BITS_PER_BYTE);\n System.arraycopy(symbols, 0, symbols, 1, position);\n symbols[0] = symbol;\n }\n BinaryStdOut.close();\n }", "public void handleBarcodeScanned(ScenarioController scenarioController, String barcode);", "private void writeChar(byte[] bytes) {\n // let terminal do auto wrap around. \n term.writeChar(bytes);\n\n // update cursor \n //int x=term.getCursorX(); \n //int y=term.getCursorY();\n //term.putChar(bytes, x, y);\n // increment: let terminal do auto wrap around. \n //term.moveCursor(1,0); \n\n }", "Barcode getBarcode() {\n Barcode barcode = null;\n List<BarcodeGraphic> barcodeList = mGraphicOverlay.getGraphics();\n\n if (!barcodeList.isEmpty()) {\n Log.d(TAG, \"Barcode list is not empty\");\n barcode = barcodeList.get(0).getBarcode();\n }\n\n return barcode;\n }", "@Override\n\tpublic void show() {\n\t\tSystem.out.println(\"´ó¿ãñÃ\");\n\t}", "public static void printEncoding(String[] encodings, int[] freqNums){\n int saveSpace = 0;\n //loops through all characters to print encodings and calculate savings\n for(int i = 0; i < encodings.length; i++) {\n if (freqNums[i] != 0) {\n System.out.println(\"'\" + (char)(i+32) + \"'\" + \": \" + freqNums[i] + \": \" + encodings[i]);\n saveSpace = saveSpace + (8 - encodings[i].length())*freqNums[i];\n }\n }\n System.out.println();\n System.out.println(\"You will save \" + saveSpace + \" bits with the Huffman Compressor\");\n }", "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 }", "public static void decode() {\r\n int[] index = new int[R + 1];\r\n char[] charAtIndex = new char[R + 1];\r\n for (int i = 0; i < R + 1; i++) { \r\n index[i] = i; \r\n charAtIndex[i] = (char) i;\r\n }\r\n while (!BinaryStdIn.isEmpty()) {\r\n int c = BinaryStdIn.readChar();\r\n char t = charAtIndex[c];\r\n BinaryStdOut.write(t);\r\n for (int i = c - 1; i >= 0; i--) {\r\n char temp = charAtIndex[i];\r\n int tempIndex = ++index[temp];\r\n charAtIndex[tempIndex] = temp;\r\n }\r\n charAtIndex[0] = t;\r\n index[t] = 0;\r\n }\r\n BinaryStdOut.close(); \r\n }", "private String encodeCode11() {\n if (!checkNumericOnly(getRawData().replace(\"-\", \"\"))) {\n error(\"EC11-1: Numeric data and '-' Only\");\n }\n\n //calculate the checksums\n int weight = 1;\n int CTotal = 0;\n String dataToEncodeWithChecksums = getRawData();\n\n //figure the C checksum\n for (int i = getRawData().length() - 1; i >= 0; i--) {\n //C checksum weights go 1-10\n if (weight == 10) {\n weight = 1;\n }\n\n if (getRawData().charAt(i) != '-') {\n CTotal += Integer.parseInt(String.valueOf(getRawData().charAt(i))) * weight++;\n } else {\n CTotal += 10 * weight++;\n }\n }\n\n int checksumC = CTotal % 11;\n\n dataToEncodeWithChecksums += String.valueOf(checksumC);\n\n //K checksums are recommended on any message length greater than or equal to 10\n if (getRawData().length() >= 10) {\n weight = 1;\n int KTotal = 0;\n\n //calculate K checksum\n for (int i = dataToEncodeWithChecksums.length() - 1; i >= 0; i--) {\n //K checksum weights go 1-9\n if (weight == 9) {\n weight = 1;\n }\n\n if (dataToEncodeWithChecksums.charAt(i) != '-') {\n KTotal += Integer.parseInt(String.valueOf(dataToEncodeWithChecksums.charAt(i))) * weight++;\n } else {\n KTotal += 10 * weight++;\n }\n }\n\n int checksumK = KTotal % 9;\n dataToEncodeWithChecksums += checksumK;\n }\n\n //encode data\n String space = \"0\";\n StringBuilder builder = new StringBuilder();\n builder.append(C11_Code[11]);//start-stop char\n builder.append(space); //interchar space\n\n for (char c : dataToEncodeWithChecksums.toCharArray()) {\n int index = (c == '-' ? 10 : Integer.parseInt(String.valueOf(c)));\n builder.append(C11_Code[index]);\n\n //inter-character space\n builder.append(space);\n }//foreach\n\n //stop bars\n builder.append(C11_Code[11]);\n\n return builder.toString();\n }", "public void printByteArray(byte[] text){\n for (int j = 0; j < text.length; ++ j)\n System.out.printf (\"%02x\", text[j]);\n System.out.println();\n }", "public static void main(String[] args) {\n\tSystem.out.println(CodeMap.getInstance().encode(\"0123456\"));\r\n\tSystem.out.println(CodeMap.getInstance().encode(\"01234567\"));\r\n\tSystem.out.println(CodeMap.getInstance().encode(\"012345678\"));\r\n\tSystem.out.println(CodeMap.getInstance().encode(\"0123456789\"));\r\n\tSystem.out.println(CodeMap.getInstance().encode(\"01234567890\"));\r\n\r\n//\tSystem.out.println(CodeMap.getInstance().decode(\"UCYF\\nALXLAT\\nSAZUF\\nCYFALT\\nXLASAU\\nYCXH\"));\r\n//\tSystem.out.println(CodeMap.getInstance().decode(\"UHTL\\nYTHCFC\\nJJZUU\\nHTLYTX\\nHCFJJT\\nAFTY\"));\r\n\t}", "public static void printIRCode(){\n\t\tfor (int i=0; i < ircode.size(); i++){\n\t\t\tSystem.out.println(\";\"+ircode.get(i).printCode());\n\t\t}\n\t}", "public static void decode() {\n char[] seq = new char[R];\n\n for (int i = 0; i < R; i++)\n seq[i] = (char) i;\n\n while (!BinaryStdIn.isEmpty()) {\n int index = BinaryStdIn.readChar();\n char c = seq[index];\n BinaryStdOut.write(seq[index]);\n\n for (int i = index; i > 0; i--)\n seq[i] = seq[i - 1];\n seq[0] = c;\n }\n BinaryStdOut.close();\n }", "public static void applicaBarcode() throws InvalidPasswordException, IOException, DocumentException, SAXException, ParserConfigurationException {\n\t\tboolean processato = false;\t\t\t\t//per capire se ci sono file\r\n\t\tpath = new File(\"C:\\\\Users\\\\tommolini\\\\Desktop\\\\PROVABARCODEESTERI\\\\\");\r\n\t\tString nomePath = path.toString();\t\t\t\t\t//converto in stringa il path ottenuto in precedenza per darlo in pasto al get seguente\t\t\t\t\t//scelta cartella\r\n\t\t\t\t\r\n\t\tnew File(path + \"/Barcode\").mkdir();\t//creo la cartella per mettere i file con i barcode\r\n\t\tFile [] files = path.listFiles();\t\t//elenco tutti i file della cartella del percorso path\r\n\t\t//System.out.println(\"files: \" + files);\r\n\t\tString nomeFileSenzaEstensione;\r\n\t\tString nomeDaBarcode=\"\";\t\t\t\t\t//stringa in cui filtro il codice da mettere (prime 9 cifre del nome)\r\n\t\tint posizioneUnderscore;\r\n\t\t//System.out.println(\"files.lenght: \" + files.length);\r\n\t\t\r\n\t\tint lunghezzaListaFile= files.length;\r\n\t\t\r\n\t\tfor (int i = 0; i < files.length; i++){\t//ciclo tutti i file nella cartella\r\n\t\t\t\r\n\t\t\t//anche se ci sono dei file nella cartella con estensione diversa da .pdf non vengono considerati grazie al filtro\r\n\t\t\tif (files[i].isFile() & files[i].getName().endsWith((\".pdf\")) & !files[i].getName().contains(\"_A\")){ \t//finchè c'è un file (CON FILTRO .PDF)\r\n\t\t\t\tprocessato=true;\r\n\r\n\t\t\t\t//ripulisco il file dalla sua estensione (mi serve per sapere cosa scrivere come barcode)\r\n\t\t\t\tnomeFileSenzaEstensione = files[i].getName().replaceFirst(\"[.][^.]+$\", \"\");\t//prendo solo il nome file escludendo l'estenzione\r\n\t\t\t\t//System.out.println(\"nomeFileSenzaEstensione \" + nomeFileSenzaEstensione);\r\n\t\t\r\n\t\t\t\t\r\n\t\t\t\tposizioneUnderscore = nomeFileSenzaEstensione.indexOf(\"_\"); //trova la posizione del carattere _ fin dove devo arrivare per estrarre il barcode \r\n\t\t\t\tif (posizioneUnderscore != -1) {\t//se _ non è in posizione -1\r\n\t\t\t\t nomeDaBarcode= nomeFileSenzaEstensione.substring(0 , posizioneUnderscore); //estraggo i primi caratteri prima del primo _\r\n\t\t\t\t \r\n\t\t\t\t \r\n\t\t\t\t System.out.println(\"nomeFileSenzaEstensione: \" + nomeFileSenzaEstensione + \" . Barcode estratto: \" + nomeDaBarcode);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//System.out.print(path + \"/\" + files[i].getName() + \"\\n\");\r\n\t \tPdfReader reader = new PdfReader(path + \"\\\\\" + files[i].getName());\t\t//creo flusso di lettura verso il file\r\n\t \tSystem.out.println(path + \"\\\\\" + files[i].getName());\r\n\t \tPdfStamper stamper = new PdfStamper(reader, new FileOutputStream(path + \"/Barcode/\" + files[i].getName() ));\t//creo il flusso di scrittura verso un nuovo file all'interno della cartella barcode\r\n\t\t\t \t\r\n\t \tRectangle pageSize = reader.getPageSize(1);\t\t\t\t\t\t//il parametro \"1\" si riferisce alla prima pagina\r\n\t \tPdfContentByte over = stamper.getOverContent(1);\t\t\t\t//overlay sulla prima pagina\r\n\t\t\t \r\n \tBarcode128 code128 = new Barcode128();\r\n code128.setBaseline(-1);\t\t\t\t\t\t\t\t\t\t//posizione della scritta del barcode\r\n code128.setSize(7);\t\t\t\t\t\t\t\t\t\t\t\t//dimensione della scritta del barcode\r\n code128.setCode(nomeDaBarcode);\t\t\t\t\t\t\t\t\t//codice del barcode da mostrare\r\n code128.setCodeType(Barcode128.CODE128);\t\t\t\t\t\t//codifica del barcode\r\n Image code128Image = code128.createImageWithBarcode(over, BaseColor.BLACK, BaseColor.BLACK);\t//colori del barcode\r\n code128Image.scalePercent(100, 70);\t\t\t\t\t\t\t//scala del barcode\r\n \r\n \r\n //System.out.println(\"code128Image.getWidth() \"+code128Image.getWidth());\r\n //System.out.println(\"code128Image.getHeight() \"+code128Image.getHeight());\r\n float x = pageSize.getRight() - code128Image.getWidth() - 110;\t//posizionamento del barcode rispetto alle dimensioni della pagina\r\n float y = pageSize.getTop() - code128Image.getHeight() - 10;\t//posizionamento del barcode rispetto alle dimensioni della pagina\r\n float w = pageSize.getRight() - 10;\t\t\t\t\t\t\t\t//posizionamento del barcode rispetto alle dimensioni della pagina\r\n float h = pageSize.getTop() - 10;\t\t\t\t\t\t\t\t//posizionamento del barcode rispetto alle dimensioni della pagina\r\n \r\n over.saveState();\r\n over.setColorFill(BaseColor.WHITE);\t\t\t\t\t\t\t\t//riempio lo sfondo dell'immagine col colore bianco\r\n over.rectangle(x-10, y-10, code128Image.getScaledWidth()+14, code128Image.getScaledHeight()+14);\t\t\t\t\t\t\t//imposto le dimensioni del rettangolo bianco che fa da sfondo al barcode\t\t\t\t\t\r\n over.fill();\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n over.restoreState();\r\n code128Image.setAbsolutePosition(x-10, y-10);\t\t\t\t\t//imposto la posizione in termini di riferimento assoluti dell'immagine che vado ad aggiungere\r\n over.addImage(code128Image); \t\t\t\t\t\t\t\t//aggiungo l'immagine al pdf\t \t\r\n \r\n\r\n \r\n\t \tstamper.close();\t\t\t\t\t\t\t\t\t\t\t\t//chiudo la scrittura\r\n\t reader.close();\t\t\t\t\t\t\t\t\t\t\t\t\t//chiudo la lettura\r\n\t \r\n\t //System.out.println(\"ifffff \");\r\n\t //elimino i file nella cartella in cui li ho scaricati\r\n\t //files[i].delete();\r\n\r\n\t\t\t} \r\n\t\t}\t\r\n\t}", "public void print() {\n btprint(c);\n }", "public AsciiDataEncoder() {\n\t}", "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 }", "public void generateCode() {\n\t\tthis.setCharacter();\n\t}", "public byte[] encode(byte[] pArray) {\n return encodeQuotedPrintable(PRINTABLE_CHARS, pArray);\n }", "private static BufferedImage getMagnifiedBarcode(Symbol symbol, int magnification, int BORDER_SIZE){\n BufferedImage image = new BufferedImage((symbol.getWidth() * magnification) + (2 * BORDER_SIZE),\n (symbol.getHeight() * magnification) + (2 * BORDER_SIZE), \n BufferedImage.TYPE_INT_RGB);\n Graphics2D g2d = image.createGraphics();\n g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n g2d.setColor(Color.WHITE);\n g2d.fillRect(0, 0, (symbol.getWidth() * magnification) + (2 * BORDER_SIZE),\n (symbol.getHeight() * magnification) + (2 * BORDER_SIZE));\n Java2DRenderer renderer = new Java2DRenderer(g2d, magnification, Color.WHITE, Color.BLACK);\n renderer.render(symbol);\n \n return image;\n }", "public void setOrigBarcode(java.lang.String origBarcode) {\n this.origBarcode = origBarcode;\n }", "public void printCode( String value )\r\n\t{\r\n\t\tSystem.out.println(\"A suitable number for this : \");\r\n\t\tSystem.out.println(value);\r\n\t}", "@Override\n public void brew() {\n System.out.println(\"用沸水浸泡茶叶\");\n }", "private Bitmap generateQR() {\n //save information of reservation into string\n StringBuilder infoB = new StringBuilder(film.getTitle() + \" \" + time + \"\\n Places: \");\n for (int i : listPlaces) {\n infoB = infoB.append(i + 1);\n infoB = infoB.append(\", \");\n }\n //delete last comma\n infoB.deleteCharAt(infoB.length() - 2);\n String info = infoB.toString();\n System.out.println(info);\n\n //generate bitmap with QR generated\n Bitmap bitmap = null;\n MultiFormatWriter multiFormatWriter = new MultiFormatWriter();\n try {\n BitMatrix bitMatrix = multiFormatWriter.encode(info, BarcodeFormat.QR_CODE, 200, 200);\n BarcodeEncoder barcodeEncoder = new BarcodeEncoder();\n bitmap = barcodeEncoder.createBitmap(bitMatrix);\n } catch (WriterException e) {\n e.printStackTrace();\n }\n\n return bitmap;\n }", "public void printASCIIArt(String string) {\n\t\tint width = 500;\n int height = 30;\n\n BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);\n java.awt.Graphics g = image.getGraphics();\n g.setFont(new Font(\"SansSerif\", Font.CENTER_BASELINE, 16));\n\n Graphics2D graphics = (Graphics2D) g;\n graphics.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,\n RenderingHints.VALUE_TEXT_ANTIALIAS_ON);\n graphics.drawString(string, 10, 20);\n\n //save this image\n //ImageIO.write(image, \"png\", new File(\"/users/mkyong/ascii-art.png\"));\n\n for (int y = 0; y < height; y++) {\n StringBuilder sb = new StringBuilder();\n for (int x = 0; x < width; x++) {\n\n sb.append(image.getRGB(x, y) == -16777216 ? \" \" : \"$\");\n\n }\n\n if (sb.toString().trim().isEmpty()) {\n continue;\n }\n\n System.out.println(sb);\n }\n\t}", "private void draw (String printable, StringBuffer canvas) {\r\n \t\t\tcanvas.append(\"| \");\r\n \t\t\t\r\n \t\t\tcanvas.append(printable);\r\n \t\t\tfor (int i=printable.length(); i<width-4; i++) //Fill in the spaces.\r\n \t\t\t{\r\n \t\t\t\tcanvas.append(' ');\r\n \t\t\t}\r\n \t\t\tcanvas.append(\" |\\n\");\r\n \t\t}", "private void printKAT(String banner,\n\t\tMakwa mpub, Makwa mpriv)\n\t\tthrows IOException\n\t{\n\t\tbyte[] input = new byte[150];\n\t\tfor (int i = 0; i < input.length; i ++) {\n\t\t\tinput[i] = (byte)(17 + 73 * i);\n\t\t}\n\t\tprintKAT(banner, mpub, mpriv, input);\n\n\t\t/*\n\t\t * Some 13-byte inputs, rotating over the 256 possible bytes.\n\t\t * One of them has an embedded 0.\n\t\t */\n\t\tinput = new byte[13];\n\t\tfor (int i = 0; i < 22; i ++) {\n\t\t\tfor (int j = 0; j < 13; j ++) {\n\t\t\t\tinput[j] = (byte)(13 * i + j + 8);\n\t\t\t}\n\t\t\tprintKAT(banner, mpub, mpriv, input);\n\t\t}\n\t}", "public String encode() throws IOException {\n try (FastStringWriter fsw = new FastStringWriter()) {\n fsw.write(\"{\");\n\n boolean hasComma = false;\n if (LangUtils.isNotBlank(this.fontColor)) {\n ChartUtils.writeDataValue(fsw, \"color\", this.fontColor, hasComma);\n hasComma = true;\n }\n\n getFont().write(fsw, \"font\", hasComma);\n\n fsw.write(\"}\");\n\n return fsw.toString();\n }\n }", "public void setNewBarcode(java.lang.String newBarcode) {\n this.newBarcode = newBarcode;\n }", "private void printCodeTable() {\n System.out.println(\"\\nPrinting the code table:\");\n for(int i = 0; i < codeTable.length; i++) {\n if(codeTable[i] != null) {\n if(i == 10) {\n System.out.println(\"\\\\n \" + codeTable[i]);\n } else {\n System.out.println(((char) i) + \" \" + codeTable[i]);\n }\n }\n }\n }", "public static void decode()\n {\n \n \n int a = BinaryStdIn.readInt();\n String t = BinaryStdIn.readString();\n int len = t.length();\n \n //variables for generating next[] array\n int[] next = new int[len];\n char[] original = t.toCharArray();\n char[] temp = t.toCharArray();\n boolean[] flag = new boolean[len];\n for(int i = 0 ; i < len; i++)\n {\n flag[i] = true;\n }\n \n //sort the encoded string\n decodeSort(temp);\n \n //generating next[] array\n for(int i = 0 ; i < len; i++)\n {\n for(int j = 0 ; j < len; j++)\n {\n if(flag[j])\n { \n if(original[j]==temp[i])\n {\n next[i] = j;\n flag[j]=false;\n break;\n }\n }\n }\n \n }\n \n // decode procedure\n int key = a;\n for (int count = 0; count < len; count++) {\n key = next[key];\n BinaryStdOut.write(t.charAt(key));\n }\n BinaryStdOut.close();\n }", "@Override\n public String toString() {\n return \"Printer{\" +\n \"barCode=\" + barCode +\n \", description='\" + description + '\\'' +\n \", categoryName='\" + categoryName + '\\'' +\n \", locationName='\" + locationName + '\\'' +\n \", serialNumber='\" + serialNumber + '\\'' +\n \", manufacturerName='\" + manufacturerName + '\\'' +\n \", division='\" + division + '\\'' +\n \", department='\" + department + '\\'' +\n \", status='\" + status + '\\'' +\n \"}\\n\";\n }", "public static void main(String[] args) throws IOException {\n char[][] key = new char[8][8];\n\n String[] lines = new String[8];\n\n File fileCardan = new File(\"cardan.txt\");\n\n Scanner fileScanner = new Scanner(fileCardan);\n\n for (int i = 0; i < 8; i++) {\n lines[i] = fileScanner.nextLine();\n }\n\n for (int i = 0; i < 8; i++) {\n for (int j = 0; j < 8; j++) {\n key[i][j] = lines[i].charAt(j);\n }\n\n }\n\n // reading text from input.txt file and getting count of 64 char blocks\n String text = new String(Files.readAllBytes(Paths.get(\"input.txt\")));\n\n int blocksCount = text.length() / 64 + 1;\n\n FileWriter fw = new FileWriter(\"encode.txt\");\n\n // encoding all 64 char blocks\n for (int i = 0; i < blocksCount; i++) {\n\n char[][] res;\n if(64+i*64 > text.length())\n res = encode(key, text.substring(i*64));\n else\n res = encode(key, text.substring(i*64,64+i*64));\n fileWrite(res,fw);\n\n }\n\n fw.close();\n\n text = new String(Files.readAllBytes(Paths.get(\"encode.txt\")));\n\n fw = new FileWriter(\"decode.txt\");\n\n for (int i = 0; i < blocksCount; i++) {\n\n fw.write(decode(text.substring(i*64,i*64+64),key));\n\n }\n\n fw.close();\n\n\n\n }", "public void setQrcodeDecodeRect(int x, int y, int w, int h);", "private void printCodeProcedure(String code, BinaryTreeInterface<HuffmanData> tree) {\n\t\t\t\tif (tree == null) {\n\n\t\t\t\t} else {\n\t\t\t\t\tprintCodeProcedure(code + \"0\", tree.getLeftSubtree());\n\t\t\t\t\tprintCodeProcedure(code + \"1\", tree.getRightSubtree());\n\t\t\t\t\tif (tree.getRootData().getSymbol() != '\\u0000') {\n\t\t\t\t\t\tSystem.out.println(tree.getRootData().getSymbol() + \": \" + code);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t}", "public char encode(char inputChar) {\n // Only encode the character if it is between A and Z.\n if (inputChar >= 'A' && inputChar <= 'Z') {\n // Step the rotors.\n doStep();\n\n // Pass through the plugboard from right to left.\n inputChar = plugboard.encode(inputChar);\n\n // Pass through the stator from right to left.\n inputChar = stator.encode(inputChar, SignalDirection.RIGHT_TO_LEFT);\n\n // Pass through the rotor array from right to left.\n for (Rotor rotor : rotors)\n inputChar = rotor.encode(inputChar, SignalDirection.RIGHT_TO_LEFT);\n\n // Pass through the reflector from right to \"left\". (The reflector simply reflects the\n // signal back to the rotor array, causing it to go from left to right.)\n inputChar = reflector.encode(inputChar, SignalDirection.RIGHT_TO_LEFT);\n\n // Pass through the rotor array from left to right.\n for (int index = numberOfRotors - 1; index >= 0; index--)\n inputChar = rotors[index].encode(inputChar, SignalDirection.LEFT_TO_RIGHT);\n\n // Pass through the stator from left to right.\n inputChar = stator.encode(inputChar, SignalDirection.LEFT_TO_RIGHT);\n\n // Pass through the plugboard from left to right.\n inputChar = plugboard.encode(inputChar);\n\n // Return the encoded character.\n return inputChar;\n } else\n return '\\0';\n\n }", "private synchronized void print4() {\n try {\n int jNum = 0;\n\n byte[] printText22 = new byte[10240];\n\n byte[] oldText = setAlignCenter('0');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setInternationalCharcters('3');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setWH('4');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = getGbk(\"FoodCiti\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setWH('4');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = getGbk(\"\\nOrder No : \" + order.getOrderNo());\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"\\n-----------------------\\n\");\n oldText = getGbk(\"\\n........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(SessionManager.get(getActivity()).getRestaurantName() + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n String location = SessionManager.get(getActivity()).getRestaurantLocation();\n int spacecount = commacount(location);\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n if (spacecount >= 1) {\n oldText = getGbk(location.substring(0, location.indexOf(',')) + \"\\n\" + location.substring(location.indexOf(',') + 1) + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n } else {\n oldText = getGbk(location + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n }\n\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = getGbk(SessionManager.get(getActivity()).getRestaurantPostalCode() + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"Tel:\" + SessionManager.get(getActivity()).getRestaurantPhonenumber());\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"\\n-----------------------\\n\");\n oldText = getGbk(\"\\n........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n if (order.getOrderSpecialInstruction() != null) {\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(order.getOrderSpecialInstruction());\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"\\n-----------------------\\n\");\n oldText = getGbk(\"\\n........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n }\n\n oldText = setAlignCenter('0');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setWH('5');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setCusorPosition(390);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\" \" + \"GBP\" + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n // Toast.makeText(getContext(),\"Size \"+order.getOrderedItemList().size(),Toast.LENGTH_LONG).show();\n\n for (int i = 0; i < order.getOrderedItemList().size(); i++) {\n\n OrderedItem orderedItem = order.getOrderedItemList().get(i);\n\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('5');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// int qntity = Integer.parseInt(orderedItem.getQuantity());\n oldText = getGbk(\" \" + orderedItem.getQuantity() + \" x \" + orderedItem.getItemData().getItemName());\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setCusorPosition(390);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n Double total_price = Double.valueOf(orderedItem.getTotalPrice()) * Double.valueOf(orderedItem.getQuantity());\n\n oldText = getGbk(\" \" + String.format(Locale.getDefault(), \"%.2f\", total_price) + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n for (int j = 0; j < orderedItem.getSubItemList().size(); j++) {\n\n oldText = setWH('5');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setCusorPosition(35);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n SubItem subItem = orderedItem.getSubItemList().get(j);\n\n String subitemname = subItem.getItemName();\n int subItemOrderQty = Integer.parseInt(subItem.getOrderedQuantity());\n\n if (subItemOrderQty > 1) {\n oldText = getGbk(\" \" + subItem.getOrderedQuantity() + \" x \" + subitemname + \"\\n\");\n } else {\n oldText = getGbk(\" \" + subitemname + \"\\n\");\n }\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n // By Ravi\n// oldText = getGbk(\"........................\\n\");\n// System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n// jNum += oldText.length;\n//////////////////////////////////////////////////////////////////////////////////////////////////////////\n /** TODO\n * change here for print suboptions text\n * **/\n //print text for suboptions items\n if (subItem.getSubOptions() != null && subItem.getSubOptions().size() > 0) {\n List<SubOptions> subOptions = subItem.getSubOptions();\n for (int k = 0; k < subOptions.size(); k++) {\n SubOptions options = subOptions.get(k);\n oldText = getGbk(\" - \" + options.getName() + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n }\n }\n\n }\n\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n /*oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;*/\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"-----------------------\\n\");\n oldText = getGbk(\"........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n }\n\n oldText = setAlignCenter('0');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('5');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"Subtotal : \");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setCusorPosition(390);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = getGbk(\" \" + String.format(\" %.2f\", Double.valueOf(order.getOrderSubtotal())) + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n if (Double.valueOf(order.getDiscount()) > 0) {\n oldText = setAlignCenter('0');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('5');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"Discount : \");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setCusorPosition(390);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = getGbk(\" \" + String.format(\" %.2f\", Double.valueOf(order.getDiscount())) + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n }\n\n\n if (Double.valueOf(order.getTax()) > 0) {\n oldText = setAlignCenter('0');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('5');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"Service Charge : \");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setCusorPosition(390);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n if (order.getTax() != null) {\n oldText = getGbk(\" \" + String.format(\" %.2f\", Double.valueOf(order.getTax())) + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n } else {\n oldText = getGbk(\" \" + \"0.00\" + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n }\n }\n\n if (!order.getOrderDelivery().equals(Consts.PICK_UP) && Double.valueOf(order.getDeliveryCharges()) > 0) {\n oldText = setAlignCenter('0');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('5');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"Delivery Charges : \");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setCusorPosition(390);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = getGbk(\" \" + String.format(\" %.2f\", Double.valueOf(order.getDeliveryCharges())) + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n }\n\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"\\n-----------------------\\n\");\n oldText = getGbk(\"........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('0');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"TOTAL Price: \");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setCusorPosition(370);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n //Toast.makeText(getActivity(),String.valueOf(order.getOrderTotal()),Toast.LENGTH_LONG).show();\n\n oldText = getGbk(\" \" + String.format(\" %.2f\", Double.valueOf(order.getOrderTotal())));\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"\\n-----------------------\\n\");\n oldText = getGbk(\"\\n........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n if (order.getFreenDrinkText() != null && !TextUtils.isEmpty(order.getFreenDrinkText())) {\n oldText = setAlignCenter('0');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n String freeTxt = \"Free \" + order.getFreenDrinkText();\n oldText = getGbk(freeTxt);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n }\n\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"\\n-----------------------\\n\");\n oldText = getGbk(\"\\n........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('4');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n /** TODO\n * change here to print payment method text\n * **/\n //print text for payment method\n if (order.getOrderPaid().equalsIgnoreCase(\"paypal\") || order.getOrderPaid().equalsIgnoreCase(\"worldpay\")) {\n oldText = getGbk(order.getOrderPaid() + \" PAID \" + \"\\n\");\n } else {\n oldText = getGbk(order.getOrderPaid() + \" NOT PAID \" + \"\\n\");\n }\n// oldText = getGbk(\"ORDER BY \" + order.getOrderPaid() + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setWH('4');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n if (order.getOrderDelivery().equals(Consts.PICK_UP)) {\n oldText = getGbk(\"COLLECTION\" + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n } else {\n oldText = getGbk(\"DELIVERY\" + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n }\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n // String strTmp2 = new SimpleDateFormat(\"dd-MM-yyyy hh:mm a\", Locale.UK).format(new Date());\n oldText = getGbk(getDate(order.getOrderTime()));\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"\\n-----------------------\\n\");\n oldText = getGbk(\"\\n........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('0');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('4');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"Customer Details: \" + \"\\n\" +\n order.getUser().getUserName().toUpperCase() + \"\\n\" +\n order.getUser().getAddress().toUpperCase() + \"\\n\" +\n order.getUser().getCity().toUpperCase() + \"\\n\" +\n order.getUser().getPostalCode().toUpperCase() + \"\\n\" +\n order.getUser().getPhNo().toUpperCase()\n );\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"\\n-----------------------\\n\");\n oldText = getGbk(\"\\n........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('5');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"Ref:\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = getGbk(order.getOrderId());\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"\\n-----------------------\\n\");\n oldText = getGbk(\"\\n........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = getGbk(\"www.foodciti.co.uk\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"\\n\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n /*String s = new String(printText22);\n Toast.makeText(getActivity(),s,Toast.LENGTH_LONG).show();*/\n\n oldText = CutPaper();\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n Intent intent = new Intent(PrintUtils.ACTION_PRINT_REQUEST);\n intent.putExtra(PrintUtils.PRINT_DATA, printText22);\n localBroadcastManager.sendBroadcast(intent);\n\n// mOutputStream.write(printText22);\n\n } catch (Exception ex) {\n Exlogger exlogger = new Exlogger();\n exlogger.setErrorType(\"Print Error\");\n exlogger.setErrorMessage(ex.getMessage());\n exlogger.setScreenName(\"OrderInfo->>print4() function\");\n logger.addException(exlogger);\n Toast.makeText(getActivity(), ex.getMessage(), Toast.LENGTH_LONG).show();\n\n\n }\n }", "public static void main(String[] args) throws IOException, NotFoundException\r\n\t{\n\t\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"E:\\\\Praveen_Automation\\\\Launching_Browsers\\\\Launching_Browsers_Latest\\\\New folder\\\\chromedriver.exe\");\r\n\t\tWebDriver driver=new ChromeDriver();\r\n\t\tdriver.manage().window().maximize();\r\n\t\tdriver.manage().deleteAllCookies();\r\n\t\tdriver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\r\n\t\tdriver.manage().timeouts().pageLoadTimeout(50, TimeUnit.SECONDS);\r\n\t\t\r\n\t\t\r\n\t\tdriver.get(\"https://testautomationpractice.blogspot.com/\");\r\n\t\tAssert.assertEquals(driver.getTitle(), \"Automation Testing Practice\");\r\n\t \r\n\t\t//First Barcode\r\n\t\t//String barcodeURL = driver.findElement(By.xpath(\"//img[@src='https://3.bp.blogspot.com/-xaeByLfXiFk/XCxZ33hrgKI/AAAAAAAAPPI/5d4O-mf27lEQKtSiiBjx3UgtxSV0yJUpwCLcBGAs/s1600/barcode.gif']\")).getAttribute(\"src\");\r\n\t\t//System.out.println(barcodeURL);\r\n\t\t\r\n\t\t\r\n\t\t//Second Barcode\r\n\t\tString barcodeURL = driver.findElement(By.xpath(\"//img[@src='https://4.bp.blogspot.com/-_Bz0eHUicUY/XCxnkToPvQI/AAAAAAAAPPU/055m3a6VabUzUlwlzwwipQA-MImBuxq_wCLcBGAs/s1600/barcode2.gif']\")).getAttribute(\"src\");\r\n\t\t\r\n\t \r\n\t URL url = new URL(barcodeURL);\r\n\t BufferedImage bufferedimage=ImageIO.read(url);\r\n\t \r\n\t LuminanceSource luminancesource = new BufferedImageLuminanceSource(bufferedimage);\r\n\t \r\n\t BinaryBitmap binarybitmap = new BinaryBitmap(new HybridBinarizer(luminancesource));\r\n\t \r\n\t Result result = new MultiFormatReader().decode(binarybitmap);\r\n\t System.out.println(result.getText());\r\n\t \r\n\t driver.close();\r\n\t \r\n\t //Sample Barcode URL \r\n\t //https://barcode.tec-it.com/en\r\n\t}", "public void printQR(String str, int errCorrect, int moduleSize)\n throws IOException {\n\n // save data function 80\n alignQr(1, moduleSize);\n writer.write(0x1D);// init\n writer.write(\"(k\");// adjust height of barcode\n writer.write(str.length() + 3); // pl\n writer.write(0); // ph\n writer.write(49); // cn\n writer.write(80); // fn\n writer.write(48); //\n writer.write(str);\n\n // error correction function 69\n writer.write(0x1D);\n writer.write(\"(k\");\n writer.write(3); // pl\n writer.write(0); // ph\n writer.write(49); // cn\n writer.write(69); // fn\n writer.write(errCorrect); // 48<= n <= 51\n\n // size function 67\n writer.write(0x1D);\n writer.write(\"(k\");\n writer.write(3);\n writer.write(0);\n writer.write(49);\n writer.write(67);\n writer.write(moduleSize);// 1<= n <= 16\n\n // print function 81\n writer.write(0x1D);\n writer.write(\"(k\");\n writer.write(3); // pl\n writer.write(0); // ph\n writer.write(49); // cn\n writer.write(81); // fn\n writer.write(48); // m\n\n writer.flush();\n }", "@Override\n\tpublic String print(CliPrinter printer) {\n\t\treturn printer.printTProductCards(this);\n\t}", "@Override\n\t\tpublic char[] getPrintChars() {\n\t\t\tif(this.color == RedBlackTree.BLACK){\n\t\t\t\tString intString = data.toString()+\"(B)\";\n\t\t\t\treturn intString.toCharArray();\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tString intString = data.toString()+\"(R)\";\n\t\t\t\treturn intString.toCharArray();\n\t\t\t}\n\t\t\t\n\t\t}", "@Override\n public String toString() {\n return \"code: \" + this.paintCode + \"secCode: \" + this.secCode + \", image: \" + this.image;\n }", "public abstract int encodeUtf8(CharSequence charSequence, byte[] bArr, int i, int i2);", "private void onBarcodeDetected(Barcode barcode) {\n Log.d(TAG, \"Detected barcode with value: \" + barcode.displayValue);\n\n Intent returnIntent = new Intent();\n returnIntent.putExtra(INTENT_EXTRA_BARCODE_VALUE, barcode.displayValue);\n setResult(RESULT_OK, returnIntent);\n finish();\n }", "private static void encodeString(String in){\n\n\t\tString officalEncodedTxt = officallyEncrypt(in);\n\t\tSystem.out.println(\"Encoded message: \" + officalEncodedTxt);\n\t}", "private void printScreen(byte[] screen, int width)\n\t{\n int w = width / 8;\n int ctr = 0;\n \n for (int i=0; i<screen.length; i++)\n {\n for (int j=0; j<8; j++)\n {\n if ((screen[i] & 1<<j) != 0)\n System.out.print(\"1\");\n else\n System.out.print(\"0\");\n }\n \n System.out.print(\",\");\n ctr++;\n \n if (ctr == w)\n {\n System.out.println();\n \tctr = 0;\n }\n }\n }", "private void Print_Test(){\n String lang = getString(R.string.strLang);\n if((lang.compareTo(\"en\")) == 0){\n\n //cetak gambar logo dulu\n Print_BMP();\n\n //cetak string struk\n String data = struk;\n SendDataByte(PrinterCommand.POS_Print_Text(data, CHINESE, 0, 0, 0, 0));\n SendDataByte(PrinterCommand.POS_Set_Cut(1));\n SendDataByte(PrinterCommand.POS_Set_PrtInit());\n }else if((lang.compareTo(\"cn\")) == 0){\n String msg = \"恭喜您!\\n\\n\";\n String data = \"您已经成功的连接上了我们的便携式蓝牙打印机!\\n我们公司是一家专业从事研发,生产,销售商用票据打印机和条码扫描设备于一体的高科技企业.\\n\\n\\n\\n\\n\\n\\n\";\n SendDataByte(PrinterCommand.POS_Print_Text(msg, CHINESE, 0, 1, 1, 0));\n SendDataByte(PrinterCommand.POS_Print_Text(data, CHINESE, 0, 0, 0, 0));\n SendDataByte(PrinterCommand.POS_Set_Cut(1));\n SendDataByte(PrinterCommand.POS_Set_PrtInit());\n }else if((lang.compareTo(\"hk\")) == 0 ){\n String msg = \"恭喜您!\\n\";\n String data = \"您已經成功的連接上了我們的便攜式藍牙打印機! \\n我們公司是一家專業從事研發,生產,銷售商用票據打印機和條碼掃描設備於一體的高科技企業.\\n\\n\\n\\n\\n\\n\\n\";\n SendDataByte(PrinterCommand.POS_Print_Text(msg, BIG5, 0, 1, 1, 0));\n SendDataByte(PrinterCommand.POS_Print_Text(data, BIG5, 0, 0, 0, 0));\n SendDataByte(PrinterCommand.POS_Set_Cut(1));\n SendDataByte(PrinterCommand.POS_Set_PrtInit());\n }else if((lang.compareTo(\"kor\")) == 0){\n String msg = \"축하 해요!\\n\";\n String data = \"성공적으로 우리의 휴대용 블루투스 프린터에 연결 한! \\n우리는 하이테크 기업 중 하나에서 개발, 생산 및 상업 영수증 프린터와 바코드 스캐닝 장비 판매 전문 회사입니다.\\n\\n\\n\\n\\n\\n\\n\";\n SendDataByte(PrinterCommand.POS_Print_Text(msg, KOREAN, 0, 1, 1, 0));\n SendDataByte(PrinterCommand.POS_Print_Text(data, KOREAN, 0, 0, 0, 0));\n SendDataByte(PrinterCommand.POS_Set_Cut(1));\n SendDataByte(PrinterCommand.POS_Set_PrtInit());\n }else if((lang.compareTo(\"thai\")) == 0){\n String msg = \"ขอแสดงความยินดี!\\n\";\n String data = \"คุณได้เชื่อมต่อกับบลูทู ธ เครื่องพิมพ์แบบพกพาของเรา! \\n เราเป็น บริษัท ที่มีความเชี่ยวชาญในการพัฒนา, การผลิตและการขายของเครื่องพิมพ์ใบเสร็จรับเงินและการสแกนบาร์โค้ดอุปกรณ์เชิงพาณิชย์ในหนึ่งในองค์กรที่มีเทคโนโลยีสูง.\\n\\n\\n\\n\\n\\n\\n\";\n SendDataByte(PrinterCommand.POS_Print_Text(msg, THAI, 255, 1, 1, 0));\n SendDataByte(PrinterCommand.POS_Print_Text(data, THAI, 255, 0, 0, 0));\n SendDataByte(PrinterCommand.POS_Set_Cut(1));\n SendDataByte(PrinterCommand.POS_Set_PrtInit());\n }\n }", "@Override\r\n public void onClick(View v) {\r\n product_add.btn_barcode_add.setText(txt_barcoding.getText().toString());\r\n onBackPressed();\r\n }", "@Override\n\tpublic void print() {\n\t\tsuper.print();\n\t\tSystem.out.println(\"ÎÒÊÇÒ»Ö»\"+this.getStrain()+\"È®.\");\n\t}", "public static void main(String[] args) {\n System.out.println(\"din => \"+encode(\"din\"));\n System.out.println(\"recede => \"+encode(\"recede\"));\n System.out.println(\"Success => \"+encode(\"Success\"));\n System.out.println(\"(( @ => \"+encode(\"(( @\"));\n }", "@Override\n public void run() {\n String scanNumText = result.getText();\n Toast.makeText(ItemScan.this, scanNumText, Toast.LENGTH_SHORT).show();\n Intent intent = getIntent();\n intent.putExtra(\"Barcode\", scanNumText);\n setResult(Activity.RESULT_OK, getIntent());\n finish();\n }", "@Override\n public String encode() throws IOException {\n FastStringWriter fsw = new FastStringWriter();\n\n try {\n fsw.write(\"{\");\n\n ChartUtils.writeDataValue(fsw, \"type\", \"polarArea\", false);\n ChartUtils.writeDataValue(fsw, \"data\", this.data, true);\n ChartUtils.writeDataValue(fsw, \"backgroundColor\", this.backgroundColor, true);\n ChartUtils.writeDataValue(fsw, \"borderColor\", this.borderColor, true);\n ChartUtils.writeDataValue(fsw, \"borderWidth\", this.borderWidth, true);\n ChartUtils.writeDataValue(fsw, \"hoverBackgroundColor\", this.hoverBackgroundColor, true);\n ChartUtils.writeDataValue(fsw, \"hoverBorderColor\", this.hoverBorderColor, true);\n ChartUtils.writeDataValue(fsw, \"hoverBorderWidth\", this.hoverBorderWidth, true);\n\n fsw.write(\"}\");\n }\n finally {\n fsw.close();\n }\n\n return fsw.toString();\n }", "@Override\n public void printable()\n {\n\tfor (int i = 0; i < width; i++)\n\t{\n\t for (int k = 0; k < length; k++)\n\t {\n\t\tif (k == 0 || k == length - 1)\n\t\t System.out.print(\"O \");\n\t\telse if (i == 0 || i == width - 1)\n\t\t System.out.print(\"O \");\n\t\telse\n\t\t System.out.print(\" \");\n\t }\n\n\t System.out.println();\n\t}\n }", "public void drawResultBitmap(Bitmap barcode) {\n resultBitmap = barcode;\n invalidate();\n }" ]
[ "0.69932884", "0.6638906", "0.6388641", "0.63772583", "0.62620974", "0.6239827", "0.62253386", "0.6170803", "0.61270416", "0.6095305", "0.60524315", "0.5908855", "0.59031016", "0.5869565", "0.58613807", "0.58575326", "0.58061147", "0.57799613", "0.5775112", "0.57287115", "0.56852704", "0.5676816", "0.5667296", "0.563923", "0.56268436", "0.56101185", "0.55844563", "0.5569389", "0.55393857", "0.5494584", "0.5474065", "0.54625815", "0.5457201", "0.54323274", "0.54282737", "0.5403855", "0.5401353", "0.53663415", "0.53617144", "0.53601664", "0.53555095", "0.53469867", "0.533396", "0.5327123", "0.53165114", "0.5313769", "0.52847904", "0.52589154", "0.52501655", "0.52386516", "0.5236196", "0.52254677", "0.5223089", "0.52038336", "0.51898366", "0.51790464", "0.5175079", "0.5156369", "0.5136897", "0.513215", "0.51283306", "0.5125521", "0.5121912", "0.5104609", "0.50915474", "0.50897", "0.50888795", "0.50830853", "0.5076605", "0.5074507", "0.50577337", "0.5056549", "0.5054739", "0.50540406", "0.5052015", "0.50376284", "0.5037567", "0.5036349", "0.5033304", "0.5024412", "0.50216866", "0.50123394", "0.5002216", "0.4997176", "0.49907097", "0.49773028", "0.49762246", "0.4969576", "0.49693033", "0.49635598", "0.49526697", "0.4951062", "0.49400926", "0.49336243", "0.49325043", "0.49315456", "0.49227747", "0.49221605", "0.49189124", "0.49124545" ]
0.66867286
1
resets all writer settings to default
public void resetToDefault() throws IOException { setInverse(false); setBold(false); setFontDefault(); setUnderline(0); setJustification(0); writer.flush(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void resetWriter() {\n\t\tinit();\n\t}", "public void resetSettings()\n {\n PrintWriter writer;\n try\n {\n writer = new PrintWriter(new File(\"settings.txt\"));\n int[] r = {0,2,0,0};\n for(int x:r)\n writer.println(x);\n writer.close();\n }\n catch(IOException e)\n {}\n }", "@Override\r\n protected void clearSettings() {\r\n \r\n mfile = null;\r\n rmode = null;\r\n cmap = null;\r\n cmapMin = 0.0f;\r\n cmapMax = 0.0f;\r\n super.clearSettings();\r\n \r\n }", "public void flushSettings() {\n prefs.putBoolean(\"noWalls\", noWalls);\n prefs.putBoolean(\"noGrid\", noGrid);\n\n prefs.flush();\n }", "public static void reset() {\n prefs().edit()\n .remove(PREFKEY_USER_ID)\n .remove(PREFKEY_READER_TAG)\n .remove(PREFKEY_READER_RECOMMENDED_OFFSET)\n .remove(PREFKEY_READER_SUBS_PAGE_TITLE)\n .commit();\n }", "public synchronized void reset() {\n java.util.Arrays.fill(buffer, (byte) 0);\n writeHead = 0;\n cumulativeWritten = 0;\n synchronized (allReaders) {\n for (Reader reader : allReaders) {\n reader.reset();\n }\n }\n }", "public void reset() {\n\t\t// set any default values\n\t\t// setDefaultController() ???\n\t}", "private void resetAll() {\n resetResources();\n resetStory();\n refresh();\n }", "protected void reset() {\n\t\t}", "public void reset() {\r\n properties.clear();\r\n }", "public void reset() {\n\t\t\t\t\r\n\t\t\t}", "public void reset () {\n lastSave = count;\n count = 0;\n }", "public void reset() {\n super.reset();\n }", "public void reset() {\n\t\t//set everything back to normal\n\t\tHashMap<String, Component> components = gui.getConversionSettingsComponents();\n\t\tfor (String key: components.keySet()) {\n\t\t\tComponent component = components.get(key);\n\t\t\tcomponent.setEnabled(true);\n\t\t}\n\t}", "public void reset() {\r\n\r\n\t\tmySpreadsheet = new SpreadSheet();\r\n\t\tmySpreadsheet.reset();\r\n\t}", "public void reset() {\n\n\t}", "protected void reset() {\n writer.flush();\n stack.clear();\n context = new JsonContext(JsonContext.Mode.VALUE);\n }", "public void reset() {\n clearMappings();\n if (converters != null) {\n converters.clear();\n }\n }", "public void reset() {\n\t}", "public void reset() {\n\t}", "public void reset() {\n\t}", "public void reset() {\n\t}", "public void clearAllPreference() {\n editor.clear();\n editor.apply();\n }", "public void reset() {\n\r\n\t}", "public synchronized final void reset() {\r\n f_index = getDefaultIndex();\r\n f_userSetWidth = -1;\r\n // by default the first column is sorted the others unsorted\r\n f_sort = getDefaultSort();\r\n }", "public void reset() {\n started = false;\n flushing = false;\n moreText = true;\n headerCount = 0;\n actualLen = 0;\n }", "public void reset() {\n noIndex= false;\n noFollow= false;\n noCache= false;\n baseHref= null;\n }", "private void reset() {\n\t\tfiles = new HashMap<>();\n\t\tparams = new HashMap<>();\n\t}", "public void reset() {\n this.inhibited = false;\n this.forced = false;\n }", "public void resetAll() {\n reset(getAll());\n }", "private void reset() {\n }", "public DefaultOutputWriter() {\n\t\tpublications = null;\n\t\tauthors = null;\n\t\ttopics = null;\n\t}", "public void reset()\n\t{\n\t}", "public void reset()\n\t{\n\t}", "public void reset() {\n _styles.clear();\n _styles.add(TextStyle.DEFAULT);\n }", "public void reset() {\n this.displayHasContent = false;\n this.obscured = false;\n this.syswin = false;\n this.preferredRefreshRate = 0.0f;\n this.preferredModeId = 0;\n }", "private void resetAll() {\n\t\trightHandNavPanel.clear();\n\t\tmainFlowPanel.clear();\n\t\tparameterNameTxtArea.setText(\"\");\n\t\tdefineNameTxtArea.setText(\"\");\n\t\tfuncNameTxtArea.setText(\"\");\n\t\t\n\t\tdefineAceEditor.setText(\"\");\n\t\tparameterAceEditor.setText(\"\");\n\t\tSystem.out.println(\" in resetAll doing setText\");\n\t\tcqlAceEditor.setText(\"\");\n\t\tfunctionBodyAceEditor.setText(\"\");\n\t\t\n\t\tviewParameterList.clear();\n\t\tviewDefinitions.clear();\n\t\tviewFunctions.clear();\n\t\t\n\t\tif (paramCollapse != null) {\n\t\t\tparamCollapse.clear();\n\t\t}\n\t\tif (defineCollapse != null) {\n\t\t\tdefineCollapse.clear();\n\t\t}\n\t\tif (functionCollapse != null) {\n\t\t\tfunctionCollapse.clear();\n\t\t}\n\t\t\n\t\tsetIsPageDirty(false);\n\t\tresetMessageDisplay();\n\t}", "@Override\n public void resetAllValues() {\n }", "@Override\n public void reset() {\n super.reset();\n }", "public void reset() {\n }", "public void reset() {\n }", "public void reset() {\n }", "public void reset() {\n }", "public void resetProperties ()\n\t{\n\t\tproperties.clear();\n\t}", "public void reset() {\n\t\treset(ModSettings.currentContext);\n\t}", "public void resetAll() {\n triggered = false;\n classBlacklist.clear();\n policies.clear();\n protectedFiles.clear();\n System.setSecurityManager(defaultSecurityManager);\n }", "public static void resetAllEditorsToDefaultState() {\n ApplicationManager.getApplication().assertIsDispatchThread();\n for (Editor editor : ClientEditorManager.getCurrentInstance().editors().toList()) {\n DocRenderItemManager.getInstance().resetToDefaultState(editor);\n DocRenderPassFactory.forceRefreshOnNextPass(editor);\n }\n for (Project project : ProjectManager.getInstance().getOpenProjects()) {\n DaemonCodeAnalyzer.getInstance(project).restart();\n }\n }", "@Override\r\n\tpublic void reset()\r\n\t{\r\n\t}", "public void resetWorkspace() {\n //clear all pages and their drawers\n //clear all drawers and their content\n //clear all block and renderable block instances\n workspace.reset();\n //clear procedure output information\n ProcedureOutputManager.reset();\t//*****\n\n }", "@Override\n\t\tprotected void reset()\n\t\t{\n\t\t}", "@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}", "public void reset(){\r\n \tdefaultFlag = false;\r\n }", "@Override\n public void reset()\n {\n super.reset();\n }", "public void reset() {\n logger.debug(\"Resetting {}\", this);\n for (final Source source : watchers.keySet()) {\n reset(source);\n }\n }", "public void reset() {\n if (exporterContainer != null) {\n exporterContainer.close();\n }\n\n if (applicationContainer != null) {\n applicationContainer.close();\n }\n\n applicationContainer(null);\n exporterContainer(null);\n httpClient(null);\n }", "@Override\n public void reset() throws IOException {\n lemmaListIndex = 0;\n lemmaList = Collections.emptyList();\n tagsList.clear();\n super.reset();\n }", "public void resetAndTruncate()\n {\n rowIndexFile.resetAndTruncate(riMark);\n partitionIndexFile.resetAndTruncate(piMark);\n }", "public void reset() {\n\tthis.contents = \"\";\n\tthis.isLegalMove = false;\n }", "public void reset () {}", "@Override\r\n\t\t\tpublic void reset() {\n\t\t\t\t\r\n\t\t\t}", "public synchronized void reset() {\n }", "@Override\r\n\tpublic void reset() {\n\t}", "public void reset() {\n initEntries();\n }", "void reset()\n {\n reset(values);\n }", "public void reset()\n {\n current = 0;\n highWaterMark = 0;\n lowWaterMark = 0;\n super.reset();\n }", "public void reset(){\n\t\tBashCmdUtil.bashCmdNoOutput(\"rm -r data/games_module\");\n\t\tBashCmdUtil.bashCmdNoOutput(\"sed -i \\\"1s/.*/ \"+\"0\"+\" /\\\" data/winnings\");\n\t\tBashCmdUtil.bashCmdNoOutput(\"sed -i \\\"1s/.*/ \"+\"175\"+\" /\\\" data/tts_speed\");\n\t\tBashCmdUtil.bashCmdNoOutput(\"rm data/answered_questions\");\n\t\tBashCmdUtil.bashCmdNoOutput(\"rm data/five_random_categories\");\n\t\tBashCmdUtil.bashCmdNoOutput(\"rm data/current_player\");\n\t\t_currentPlayer = null;\n\t\t_internationalUnlocked = false;\n\t\t_gamesData.clear();\n\t\t_fiveRandomCategories.clear();\n\t\tfor (int i= 0; i<5;i++) {\n\t\t\t_answeredQuestions[i]=0;\n\t\t}\n\t\tBashCmdUtil.bashCmdNoOutput(\"touch data/answered_questions\");\n\t\tinitialiseCategories();\n\t\ttry {\n\t\t\treadCategories();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tsetFiveRandomCategories();\n\t}", "void reset() {\n errors.clear();\n variables.clear();\n }", "private void resetFields(){\n\t\tsetDirectoryInfoLabel(\"\");\n\t\tregexFrom.setText(\"\");\n\t\tregexTo.setText(\"\");\n\t\ttextArea.setText(\"\");\n\t\tlastChoosedDirectory = null;\n\t\tcheckboxSaveStateOn.setEnabled(false);\n\t\tsetMessage(translations.getFieldsHasBeenReset());\n\t}", "public void setDefaultSettings()\n {\n this.IndexerEffort = 0;\n this.indexZIPFiles = true;\n this.thumbnailsMatrix = \"64\";\n this.SaveThumbnails = false;\n }", "private void reset()\n {\n myCellReferences = new ArrayList<>();\n mySheetName = null;\n myCellReference = null;\n myDefaultValue = null;\n amIInsideSingleQuotes = false;\n amIExpectingADefaultValue = false;\n }", "public void reset() {\n\n }", "public void unReset () {\n count = lastSave;\n }", "public void reset() {\n\t\ttry {\n\t\ttr.reset();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Exception when reset the table reader\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n\tpublic void reset() {\n\t}", "public void reset() {\n counters = null;\n counterMap = null;\n counterValueMap = null;\n }", "private void reset() throws IOException {\n }", "private void resetAll() // resetAll method start\n\t{\n\t\theader.reset();\n\t\tdebit.reset();\n\t\tcredit.reset();\n\t}", "private void reset() {\n\t\tdata.clear();\n\t}", "public void reset(){\n this.context.msr.setReadyForInput(false);\n emptyAllInputBuffers();\n emptyAllOutputBuffers();\n emptyEngineersConsoleBuffer();\n }", "protected void resetIO()\r\n {\r\n // Clear out all the stream history stuff\r\n tcIn = null;\r\n tcOut = null;\r\n tcInBuf = null;\r\n\r\n // Make sure these are history-wrapped\r\n SystemIOUtilities.out().clearHistory();\r\n SystemIOUtilities.err().clearHistory();\r\n SystemIOUtilities.restoreSystemIn();\r\n }", "@Override\n\tpublic void reset() {\n\n\t}", "public void removeAllOriginalTextWriter() {\r\n\t\tBase.removeAll(this.model, this.getResource(), ORIGINALTEXTWRITER);\r\n\t}", "public synchronized void resetStyle() {\n \t\tstyleInitialized = false;\n \t}", "@Override\r\n\tpublic void reset() {\n\r\n\t}", "@Override\r\n\tpublic void reset() {\n\r\n\t}", "@Override\n public void reset() {\n }", "protected void clear() {\r\n setValue(getDefault());\r\n }", "protected void setToDefault(){\n\n\t}", "@Override\n public void reset() \n {\n\n }", "public void reset()\n {\n pages.clear();\n ePortfolioTitle = \"\";\n selectedPage = null;\n }", "public void reset() {\n\t\tinit(0, 0, 1, false);\n\t}", "public static void overwrite() {\n\t\tdefaultOverwriteMode = OVERWRITE;\n\t}", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();" ]
[ "0.7912645", "0.7357175", "0.6831173", "0.66146845", "0.6584338", "0.6530086", "0.6529537", "0.6508569", "0.64571685", "0.6422394", "0.6328514", "0.62813306", "0.6251684", "0.62485385", "0.61995685", "0.6193393", "0.6176755", "0.6173689", "0.6159127", "0.6159127", "0.6159127", "0.6159127", "0.6152452", "0.6143766", "0.6133526", "0.61261773", "0.6124048", "0.6121945", "0.6111283", "0.6092869", "0.60830474", "0.6078815", "0.60714084", "0.60714084", "0.60579306", "0.6055393", "0.60427976", "0.6034088", "0.602008", "0.60124844", "0.60124844", "0.60124844", "0.60124844", "0.6010119", "0.6003499", "0.6002027", "0.600122", "0.59972775", "0.5995064", "0.5990374", "0.5984513", "0.5984513", "0.5984513", "0.5984513", "0.59757274", "0.59697956", "0.5962631", "0.5961971", "0.59612244", "0.59519", "0.59504354", "0.5946998", "0.59446615", "0.59414136", "0.5928501", "0.5911507", "0.5900641", "0.58980364", "0.5897278", "0.5885164", "0.5883178", "0.58650976", "0.5862724", "0.5861749", "0.58548635", "0.5852411", "0.5847712", "0.5843064", "0.5841752", "0.58380276", "0.58347523", "0.5834439", "0.5831312", "0.5822332", "0.5819316", "0.5819248", "0.5816298", "0.5816298", "0.58138907", "0.58095276", "0.57941496", "0.57936776", "0.57922447", "0.5789913", "0.5788331", "0.5786123", "0.5786123", "0.5786123", "0.5786123", "0.5786123" ]
0.7327236
2
Sets white on black printing
public void setInverse(Boolean bool) throws IOException { writer.write(0x1D); writer.write("B"); writer.write((int) (bool ? 1 : 0)); writer.flush(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void makeWhite() {\n\t\t// make all the lines white\n\t\tfor (int i = 0; i < NUM_LINES; i++) {\n\t\t\toutLine[i].setColor(Color.white);\n\t\t}\n\t}", "public void setToWhite();", "public void setBlackAndWhite()\n {\n if (wall != null) // only if it's painted already...\n {\n wall.changeColor(\"black\");\n window.changeColor(\"white\");\n roof.changeColor(\"black\");\n sun.changeColor(\"black\");\n }\n }", "public void setBlackAndWhite()\n {\n if(wall != null) // only if it's painted already...\n {\n wall.changeColor(\"black\");\n window.changeColor(\"white\");\n roof.changeColor(\"black\");\n sun.changeColor(\"black\");\n }\n }", "public void setBlackAndWhite()\n {\n if(wall != null) // only if it's painted already...\n {\n wall.changeColor(\"black\");\n window.changeColor(\"white\");\n roof.changeColor(\"black\");\n sun.changeColor(\"black\");\n }\n }", "public void setBlackAndWhite()\n {\n if(eyeL != null) // only if it's painted already...\n {\n eyeL.changeColor(\"black\");\n eyeR.changeColor(\"black\");\n nose.changeColor(\"black\");\n mouthM.changeColor(\"black\");\n mouthL.changeColor(\"black\");\n mouthR.changeColor(\"black\");\n }\n }", "@Override\n\tpublic void draw() {\n\t\tif (isWhite){\n\t\t\tSystem.out.print(\"\\u2656\");\n\t\t}\n\t\telse{\n\t\t\tSystem.out.print(\"\\u265C\");\n\t\t}\t\t\n\t}", "private void white(){\n\t\tthis.arretes_fW();\n\t\tthis.coins_fW();\n\t\tthis.coins_a1W();\n\t\tthis.coins_a2W();\n\t\tthis.aretes_aW();\n\t\tthis.cube[4] = \"W\";\n\t}", "public void black() {\n g2.setPaint(Color.black);\r\n }", "public void setWhiteCounter(int num){\n this.whiteCounter = num;\n }", "@Override\r\n\tpublic String getColor() {\n\t\treturn \"white\";\r\n\t}", "public void switchColor(){\r\n System.out.println(color);\r\n if(color==\"W\"){\r\n color=\"B\";\r\n System.out.println(color);\r\n }else{ \r\n color=\"W\";\r\n } \r\n }", "public SVGBuilder setWhiteMode() {\n this.fillColorFilter = new PorterDuffColorFilter(Color.WHITE, PorterDuff.Mode.SRC_IN);\n return this;\n }", "public static void makeBackgroundGray(){\r\n\t\tStdDraw.clear(StdDraw.LIGHT_GRAY);\r\n\t}", "void setPenColourOff() {\n currentPenColour = Color.BLACK;\n writeFile.writePenOff();\n }", "void setNoColor(boolean mono);", "private void drawWhite() throws IOException, ReversiException {\n playSound(PLAY_SOUND);\n // get the list of stones need to be changed\n String list = fromServer.readUTF();\n // draw white the list of stones\n boardComponent.drawWhite(list);\n setScoreText();\n\n // followed by the TURN command\n responseToServer();\n }", "public static String white(String text){\n return ANSI_WHITE + text + ANSI_WHITE;\n }", "@Override \n\tpublic void setNormalColor(){\n\t\tthis.setColor(Color.PINK);\n\t}", "public void printBackground() {\n\t\tthis.gc.setFill(Color.BLACK);\n\t\tthis.gc.fillRect(0, 0, canvas.getWidth(), canvas.getHeight());\n\t}", "public void applyColor() {\n\t\tSystem.out.println(\"Yellow\");\n\n\t}", "public void setColor( boolean black ){\n\t\tif(black)\r\n\t\t\tthis.setBackground(Color.BLACK);\r\n\t\telse\r\n\t\t\tthis.setBackground(Color.WHITE);\r\n\t}", "public final void mo39711K() {\n setBackgroundColor(0);\n }", "public void setCarColor(){\n\t\tthis.carColor = \"white\";\n\t}", "public static void setNoColor(DrawingPanel panel) {\n pen = panel.getGraphics();\n pen.setColor(Color.WHITE);\n }", "public void makeFontwhite(JLabel a) {a.setForeground(Color.WHITE);}", "protected void setPlayerBackground() { Console.setBackground(Console.YELLOW); }", "public void blackScreen() {\n boolean var5 = field_759;\n int var1 = this.field_723 * this.field_724;\n int var2;\n if(this.interlace) {\n var2 = 0;\n int var3 = -this.field_724;\n if(var5 || var3 < 0) {\n do {\n int var4 = -this.field_723;\n if(var5) {\n this.pixels[var2++] = 0;\n ++var4;\n }\n\n while(var4 < 0) {\n this.pixels[var2++] = 0;\n ++var4;\n }\n\n var2 += this.field_723;\n var3 += 2;\n } while(var3 < 0);\n\n }\n } else {\n var2 = 0;\n if(var5 || var2 < var1) {\n do {\n this.pixels[var2] = 0;\n ++var2;\n } while(var2 < var1);\n\n }\n }\n }", "protected void setLightBoxBackground() { Console.setBackground(Console.BLUE); }", "public void Color() {\n\t\t\r\n\t}", "protected void doDark() {\r\n\t\talpha = 0.5f;\r\n\t\tsetAlphaOnTiles();\r\n\t\trepaint();\r\n\t}", "private void setWhitePlayer(Player player) {\r\n\t\tthis.whitePlayer = player;\r\n\t}", "void setColor(){\n this.objectColour = new Color(rValue,gValue,bValue,timeToLive).brighter();\n }", "public void setColor( int c ){//1 means black, 0 means white\r\n\t\tif(c==1)\r\n\t\t\tthis.setBackground(Color.BLACK);\r\n\t\telse\r\n\t\t\tthis.setBackground(Color.WHITE);\r\n\t}", "public void setBlackCounter(int num){\n this.blackCounter = num;\n }", "public void Back_To_White(View view) {\r\n lL.setBackgroundColor(Color.WHITE);\r\n }", "public void changePrintingAll()\n {\n printingAll = !printingAll;\n }", "private void colorSetup(){\n Color color2 = Color.GRAY;\n Color color = Color.LIGHT_GRAY;\n this.setBackground(color);\n this.mainPanel.setBackground(color);\n this.leftPanel.setBackground(color);\n this.rightPanel.setBackground(color);\n this.rightCenPanel.setBackground(color);\n this.rightLowPanel.setBackground(color);\n this.rightTopPanel.setBackground(color);\n this.inputPanel.setBackground(color);\n this.controlPanel.setBackground(color);\n this.setupPanel.setBackground(color);\n this.cameraPanel.setBackground(color);\n this.jPanel4.setBackground(color);\n this.sensSlider.setBackground(color); \n }", "private void setTurn() {\n if (turn == black) {\n turn = white;\n } else {\n turn = black;\n }\n }", "public void changeToStandard(){\n drawAttributeManager.toggleStandardView();\n getContentPane().setBackground(DrawAttribute.whiteblue);\n canvas.repaint();\n }", "public void setBlack(RBNode<T> node) {\n if(node != null) {\r\n node.color = BLACK;\r\n }\r\n }", "private void drawBlack() throws IOException, ReversiException {\n playSound(PLAY_SOUND);\n // get the list of stones need to be changed\n String list = fromServer.readUTF();\n // draw black the list of stones\n boardComponent.drawBlack(list);\n\n setScoreText();\n\n // followed by the TURN command\n responseToServer();\n }", "public IconBuilder autoTextColorPreferWhite() {\n\t\tthis.textColor = AUTO_TEXT_COLOR_WHITE;\n\t\treturn this;\n\t}", "public boolean isBlack () { return (this == PlayColour.BLACK);}", "public void resetShortColors(){\n\t\t\tfor(int i = 0; i < 10; i++){\n\t\t\t\tshortColors[i] = Color.white;\n\t\t\t}\n\t\t\tfor(int i = 0; i < 20; i++){\n\t\t\t\tshortColors[i] = Color.black;\n\t\t\t}\n\t\t}", "public void setWhiteText(JButton jb, Object _readIn) {\r\n WhiteCard wc = (WhiteCard)_readIn;\r\n playerNum = wc.getPlayerNumber();\r\n String wcMsg = wc.getMessage();\r\n wcMsg = toHtml(wcMsg, 18);\r\n System.out.println(wcMsg);\r\n jb.setText(\"<html><center>\" + wcMsg + \"</center></html>\"); \r\n }", "public String blackText(String word) {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tString colorWord = sb.append(ConsoleColour.BLACK).append(word).append(ConsoleColour.RESET).toString();\n\t\treturn colorWord;\n\t}", "public void erase() {\n g2.setPaint(Color.white);\r\n }", "void setStatusColour(Color colour);", "protected boolean isBlack() {\n return this.black;\n }", "void q(String white,String black,String gray);", "private void setIncognito()\n\t{\n\t\t\teToPower.setBackground (black);\n\t\t\ttwoPower.setBackground (black);\n\t\t\tln.setBackground (black);\n\t\t\txCube.setBackground (black);\n\t\t\txSquare.setBackground (black);\n\t\t\tdel.setBackground (black);\n\t\t\tcubeRoot.setBackground (black);\n\t\t\tC.setBackground (black);\n\t\t\tnegate.setBackground (black);\n\t\t\tsquareRoot.setBackground (black);\n\t\t\tnine.setBackground (black);\n\t\t\teight.setBackground (black);\n\t\t\tseven.setBackground (black);\n\t\t\tsix.setBackground (black);\n\t\t\tfive.setBackground (black);\n\t\t\tfour.setBackground (black);\n\t\t\tthree.setBackground (black);\n\t\t\ttwo.setBackground (black);\n\t\t\tone.setBackground (black);\n\t\t\tzero.setBackground (black);\n\t\t\tdivide.setBackground (black);\n\t\t\tpercent.setBackground (black);\n\t\t\tmultiply.setBackground (black);\n\t\t\treciprocal.setBackground (black);\n\t\t\tadd.setBackground (black);\n\t\t\tsubtract.setBackground (black);\n\t\t\tdecimalPoint.setBackground (black);\n\t\t\tequals.setBackground (black);\n\t\t\te.setBackground (black);\n\t\t\tPI.setBackground (black);\n\t\t\t\n\t\t\teToPower.setForeground (white);\n\t\t\ttwoPower.setForeground (white);\n\t\t\tln.setForeground (white);\n\t\t\txCube.setForeground (white);\n\t\t\txSquare.setForeground (white);\n\t\t\tdel.setForeground (white);\n\t\t\tcubeRoot.setForeground (white);\n\t\t\tC.setForeground (white);\n\t\t\tnegate.setForeground (white);\n\t\t\tsquareRoot.setForeground (white);\n\t\t\tnine.setForeground (white);\n\t\t\teight.setForeground (white);\n\t\t\tseven.setForeground (white);\n\t\t\tsix.setForeground (white);\n\t\t\tfive.setForeground (white);\n\t\t\tfour.setForeground (white);\n\t\t\tthree.setForeground (white);\n\t\t\ttwo.setForeground (white);\n\t\t\tone.setForeground (white);\n\t\t\tzero.setForeground (white);\n\t\t\tdivide.setForeground (white);\n\t\t\tpercent.setForeground (white);\n\t\t\tmultiply.setForeground (white);\n\t\t\treciprocal.setForeground (white);\n\t\t\tadd.setForeground (white);\n\t\t\tsubtract.setForeground (white);\n\t\t\tdecimalPoint.setForeground (white);\n\t\t\tequals.setForeground (white);\n\t\t\te.setForeground (white);\n\t\t\tPI.setForeground (white);\n\t\t\t\t\t\n\t\t\tentry.setBackground (black);\n\t\t\tentry.setForeground(white);\n\n\t\t\tmenuBar.setBackground(black);\n\t\t\tmenuBar.setForeground(white);\n\t\t\tfileMenu.setForeground(white);\n\t\t\thelpMenu.setForeground (white);\n\t\t\ttoolsMenu.setForeground(white);\n\t\t\t\n\t\t\texit.setBackground(black);\n\t\t\tsettings.setBackground(black);\n\t\t\treadme.setBackground(black);\n\t\t\tabout.setBackground(black);\n\t\t\t\t\t\t\n\t\t\texit.setForeground(white);\n\t\t\tsettings.setForeground(white);\n\t\t\treadme.setForeground(white);\n\t\t\tabout.setForeground(white);\n\t}", "protected void setBoxBackground() { Console.setBackground(Console.RED); }", "public void fillColor() {\n\t\tSystem.out.println(\"Blue color\");\n\t}", "public void display() {\n System.out.println(\"显示浅蓝色文本框\");\n }", "private void setPenColor() {\n\t}", "public void printScreen() {\n\t\tBrowser.printScreen(this.getClass().getSimpleName());\n\t}", "public void setColor()\n {\n if(wall != null) // only if it's painted already...\n {\n wall.changeColor(\"yellow\");\n window.changeColor(\"black\");\n roof.changeColor(\"red\");\n sun.changeColor(\"yellow\");\n }\n }", "public void setColor()\n {\n if (wall != null) // only if it's painted already...\n {\n wall.changeColor(\"red\");\n window.changeColor(\"black\");\n roof.changeColor(\"green\");\n sun.changeColor(\"yellow\");\n }\n }", "public void allOff() {\r\n\t\tsetAllColor(0, 0, 0);\r\n\t}", "public void setColor()\n {\n if(wall != null) // only if it's painted already...\n {\n wall.changeColor(\"red\");\n window.changeColor(\"black\");\n roof.changeColor(\"green\");\n sun.changeColor(\"yellow\");\n }\n }", "public static void setBlue() {\r\n playerTeam.setColor(blue);\r\n updateMessage(\"Seu time agora é azul\");\r\n }", "public void flash(){\n phoneCam.setFlashlightEnabled(!flash);\n flash = !flash;\n }", "public void resetBlockColor() {\n for(int i=0;i<gridWidth; i++) {\n for(int j=0;j<gridHeight;j++) {\n getBlock(i,j).setDarker(false);\n }\n }\n repaint();\n }", "@Override\n\tpublic void color() {\n\t\tSystem.out.println(\"Colour is red\");\n\t\t\n\t}", "public void magenta() {\n g2.setPaint(Color.magenta);\r\n }", "private static void clearScreen()\n {\n System.out.print('\\u000C');\n }", "public void addBlackScreen(Pane root) {\n\t\tblackScreen=new Rectangle(0,0,1920,1080);\n\t\tblackScreen.setFill(Color.BLACK);\n\t\tblackScreen.setVisible(false);\n\t\troot.getChildren().add(blackScreen);\n\t}", "public void colorInfo() {\n\t\tSystem.out.println(\"Universal Color\");\n\t}", "public void setColour(Colour colour);", "public void reset() {\n\t\tbg = TetrisDefaults.BGColor;\n\t\ttext = TetrisDefaults.TEXTColor;\n\t\tz = TetrisDefaults.ZColor;\n\t\ts = TetrisDefaults.SColor;\n\t\tleft = TetrisDefaults.LEFTColor;\n\t\tright = TetrisDefaults.RIGHTColor;\n\t\tline = TetrisDefaults.LINEColor;\n\t\ttri = TetrisDefaults.TRIANGLEColor;\n\t\tsquare = TetrisDefaults.SQUAREColor;\n\t\tflash = TetrisDefaults.FLASHColor;\n\t}", "public void switchColor() {\r\n\t\tcolor = !color;\r\n\t}", "private void setAllPanelsBackgroundColorToBlack(ArrayList<JPanel> allPanels) {\n\t\tfor (JPanel panel : allPanels) {\n\t\t\tpanel.setBackground(Color.BLACK);\n\t\t}\n\t}", "private void setRedBorder() {\n\t\tSystem.out.println(\"red border.\");\r\n\t}", "public void changeTurn() {\n\t\t\n\t\tif(currentTurn == white) {\n\t\t\t\n\t\t\tcurrentTurn = black;\n\t\t}\n\t\telse if(currentTurn == black){\n\t\t\t\n\t\t\tcurrentTurn = white;\n\t\t}\n\t}", "public void print() {\n System.out.print(\"\\033[H\\033[2J\");\n for(int y = 0; y < this.height; y++) {\n for (int x = 0; x < this.width; x++) {\n ColoredCharacter character = characterLocations.get(new Coordinate(x , y));\n if (character == null) {\n System.out.print(\" \");\n } else {\n System.out.print(character);\n }\n }\n System.out.print(\"\\n\");\n }\n }", "private void drawNone(){\n drawAbstract(R.color.white);\n }", "public void setColors() {\n\t\tif (!this.block.isEditable()) {\n\t\t\tthis.dispNormal = Color.LIGHT_GRAY;\n\t\t\tthis.dispSelected = Color.GRAY;\n\t\t\tthis.displayNumberBlock.setBackground(dispNormal);\n\t\t} else {\n\t\t\tthis.dispNormal = Color.white;\n\t\t\tthis.dispSelected = Color.cyan;\n\t\t\tthis.displayNumberBlock.setBackground(dispNormal);\n\t\t}\n\t}", "private void setLed(int num, RGB rgb) {\n // Find the right buffer to write to (first or second half).\n byte[] buffer;\n if (num >= 16) {\n buffer = buffer2_;\n num -= 16;\n } else {\n buffer = buffer1_;\n }\n num *= 3;\n if (rgb.r == 0 && rgb.g == 0 && rgb.b == 0) {\n fadeOut(buffer, num++);\n fadeOut(buffer, num++);\n fadeOut(buffer, num++);\n } else {\n // Poor-man's white balanace :)\n buffer[num++] = fixColor(rgb.r, 0.9);\n buffer[num++] = rgb.g;\n buffer[num++] = fixColor(rgb.b, 0.5);\n }\n }", "@Override\n\tpublic void setFlashing(int bool) {\n\n\t}", "public void clear()\n {\n clear(BLACK);\n }", "@Override\n\tpublic void yellow() {\n\t\tSystem.out.println(\"Yellow Light\");\n\t\t\n\t}", "public void setSuppressAlpha(boolean suppressAlpha) {\n/* 106 */ this.suppressAlpha = suppressAlpha;\n/* */ }", "public void printCorlor() {\n\t\tSystem.out.println(\"I'm yellow\");\r\n\t}", "public void toggle() {\n if (currentPlayer.equals(\"red\")) {\n currentColor = BLUE_COLOUR;\n currentPlayer = \"blue\";\n } else {\n currentColor = RED_COLOUR;\n currentPlayer = \"red\";\n }\n //change color of grid\n changeColor();\n }", "public void modeColor(Graphics2D g2d) { g2d.setColor(RTColorManager.getColor(\"label\", \"default\")); }", "public void setColor(GrayColor color){\n this.color = color;\n }", "public void print1T0255(){\n StringBuilder out = new StringBuilder();\n for (int i = 1; i <= 255; i++){\n out.append( i + \" \");\n }\n System.out.println( out.toString());\n }", "@Override\n public Color getFontColor(){\n return Color.BLACK;\n }", "protected void setScrimAlpha(float alpha) {\n mShowScrim = alpha > 0f;\n mRenderer.getPaint().setAlpha((int) (alpha * 255));\n invalidate();\n }", "public void registerDarkness() {\n this.setDark(true);\n }", "public static void clearScreen()\r\n\t{\r\n\t\tSystem.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\\n\\n\");\r\n\t}", "public Bishop(String color) {//True is white, false is black\n\t\tsuper(color);\n\n\t}", "@Override\n\tpublic void setPersonal_4_HalfGaugeMeter() \n\t{\n\t\tbgColor = METER_SCALE_COLOR;\n\t}", "private static void turnFlashlightOn() {\n Parameters p = cam.getParameters();\n p.setFlashMode(Parameters.FLASH_MODE_TORCH);\n cam.setParameters(p);\n }", "public static void switchPlayers(){\n\t\tif(turn.equals(\"white\")){\n\t\t\tturn = \"black\";\n\t\t}\n\t\telse{\n\t\t\tturn = \"white\";\n\t\t}\n\t}", "public void changeOddToBlack()\n {\n for (int i = 1; i < sqList.size(); i += 2)\n {\n sqList.get(i).setColor(\"black\");\n }\n }", "protected void drawBlack(java.awt.Graphics2D g, float a) {\r\n Color oldColor = g.getColor();\r\n g.setColor(Color.BLACK);\r\n g.setComposite(AlphaComposite.SrcOver.derive(a));\r\n g.fillRect(0, 0, GamePanel.WIDTH, GamePanel.HEIGHT);\r\n g.setComposite(AlphaComposite.SrcOver.derive(1.0f));\r\n g.setColor(oldColor);\r\n }", "void setFalseColor(boolean falseColor);", "@Override\n\tpublic void Red() {\n\t\tSystem.out.println(\"Red Light\");\n\t\t\n\t}", "public void setMonochrome(boolean monochrome) {\n this.monochrome = monochrome;\n }" ]
[ "0.7455112", "0.7397796", "0.70451933", "0.7024512", "0.7024512", "0.700275", "0.69810635", "0.6658634", "0.6624094", "0.660962", "0.64252234", "0.63407165", "0.63061565", "0.61893684", "0.6184303", "0.61690664", "0.61465794", "0.61263496", "0.61112744", "0.6064612", "0.60619634", "0.59393954", "0.5920555", "0.5865976", "0.5857026", "0.5811503", "0.57516694", "0.5741631", "0.57125455", "0.57071877", "0.57019913", "0.56964225", "0.5683997", "0.56585", "0.5652821", "0.5647245", "0.5639311", "0.5633995", "0.5624123", "0.56119746", "0.5604111", "0.5580592", "0.5558689", "0.55511904", "0.55474466", "0.5544739", "0.5536432", "0.55340284", "0.55304664", "0.55038977", "0.55037326", "0.5491744", "0.548349", "0.5474177", "0.5467644", "0.54579484", "0.5452525", "0.54424614", "0.54286736", "0.54229707", "0.5417695", "0.54092944", "0.5402393", "0.53957415", "0.5393381", "0.53869337", "0.53743404", "0.5358973", "0.53515196", "0.5350604", "0.53183305", "0.5306979", "0.52920604", "0.5290527", "0.5286365", "0.5277216", "0.52691245", "0.5268119", "0.5256654", "0.5255096", "0.52498525", "0.52472615", "0.5240769", "0.5231574", "0.52308017", "0.5225467", "0.52084816", "0.5204241", "0.52025205", "0.52018464", "0.51934505", "0.5191659", "0.5190713", "0.5187691", "0.5179504", "0.5166474", "0.51635253", "0.51632535", "0.51624477", "0.5160693", "0.5160557" ]
0.0
-1
Sets underline and weight
public void setUnderline(int val) throws IOException { writer.write(0x1B); writer.write("-"); writer.write(val); writer.flush(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setUnderline(byte underline)\n {\n font.setUnderline(underline);\n }", "public void setUnderline(byte underline) {\n\t\tthis.underline = underline;\n\t}", "public final void setUnderline(final boolean underline) {\n this.underline = underline;\n }", "public void setUnderline() {\n italics.setSelected(false);\n Ok.setSelected(false); /*FAULT:: Ok.setSelected(true); */\n bold.setSelected(false);\n underline.setSelected(true);\n }", "void setWeightText(double weight) {\n if (!initialized){\n throw new IllegalStateException(\"Arrow wasn't initialized\");\n }\n\n this.weight = weight;\n double vectorX = x2 - x1;\n double vectorY = y2 - y1;\n var handler = weightText.getOnMouseClicked();\n boolean visibility = weightText.isVisible();\n\n if ((vectorX >= 0) && (vectorY >= 0) || (vectorX <= 0) && (vectorY <= 0)) {\n weightText = new Text((x1 + x2) / 2., (y1 + y2) / 2., String.format(\"%.2f\", weight));\n }\n else { //text crosses arrow, need to move to the left\n weightText = new Text((x1 + x2) / 2. - 30, (y1 + y2) / 2., String.format(\"%.2f\", weight));\n }\n\n weightText.setFont(new Font(15));\n weightText.setFill(TEXT_COLOR);\n weightText.setStroke(Color.BLACK);\n weightText.setStrokeWidth(0.5);\n weightText.setVisible(visibility);\n weightText.setOnMouseClicked(handler);\n }", "public void setBoldweight(short boldweight)\n {\n font.setBoldWeight(boldweight);\n }", "public void setEmphasis(double emphasisLevel);", "public CssTextEmphasisStyle() {\n value = initial;\n }", "@Override\n public void setWeight(double w) {\n this.weight = w;\n\n }", "private void setWeight(float weight){\n this.weight = weight;\n }", "@Override\r\n\tpublic void setWeight(double weight) {\n\t\t\r\n\t}", "public void setBold() {\n underline.setSelected(false);\n Ok.setSelected(false); /*FAULT:: Ok.setSelected(true); */\n italics.setSelected(false);\n bold.setSelected(true);\n }", "public void addWeight(TextView weight){\n displayedWeights.add(weight);\n }", "public boolean getUnderline() {\r\n return Underline;\r\n }", "public void setWeight(int w){\n\t\tweight = w;\n\t}", "public void setWeight(double weight) {\n this.weight = weight;\n }", "private void underlineLabelText(JLabel label) {\n Font font = label.getFont();\n Map attributes = font.getAttributes();\n attributes.put(TextAttribute.UNDERLINE, TextAttribute.UNDERLINE_ON);\n label.setFont(font.deriveFont(attributes));\n }", "public void setWeight(double weight) {\r\n this.weight = weight;\r\n }", "@Override\r\n\t\tpublic void updateDrawState(TextPaint ds) {\n\t\t\tsuper.updateDrawState(ds);\r\n\t\t\tds.setUnderlineText(false);\r\n\t\t}", "public void setTextSettings(){\n\n ArrayList<Text> headlines = new ArrayList<>();\n //Add any text element here\n //headlines.add(this.newText);\n\n Color textColorHeadlines = new Color(0.8,0.8,0.8,1);\n\n for ( Text text : headlines ){\n text.setFont(Font.font(\"verdana\", FontWeight.BOLD, FontPosture.REGULAR, 20));\n text.setFill(textColorHeadlines);\n text.setEffect(new DropShadow(30, Color.BLACK));\n\n }\n\n }", "public void setWeight(double w){\n weight = w;\n }", "public void setWeight(double weight){\n\t\tthis.weight = weight;\n\t}", "public void setWeight(float w) {\n weight = w;\n }", "@Override\n\tpublic void setWeight(final double weight) {\n\n\t}", "public void setWeight(int weightIn){\n\t\tthis.edgeWeight = weightIn;\n\t}", "public void setWeight(int w) {\n\t\tweight = w;\n\t}", "public static String underlineBold(String message) {\n return \"__**\" + message + \"**__\";\n }", "@Override\n public void updateDrawState(TextPaint ds) {\n ds.setUnderlineText(false);\n }", "public byte getUnderline() {\n\t\treturn this.underline;\n\t}", "public void setLineWidth(Integer width) {\n style.setBorderWidth(width);\n }", "private void setUpLedger() {\n _ledgerLine = new Line();\n _ledgerLine.setStrokeWidth(Constants.STROKE_WIDTH);\n _staffLine = new Line();\n _staffLine.setStrokeWidth(1);\n }", "public void setWeight(Double weight) {\n this.weight = weight;\n }", "public void setWeight(String weight) {\n this.weight = weight;\n }", "public void setWeight(double weight) {\n\t\tthis.weight = weight;\n\t}", "public HumanBuilder setWeight(double weight) {\n\t\t\t/*\n\t\t\t * if weight is a minus or 0 then will assign the value 0.1 to the weight of \n\t\t\t * the Human myHumaan\n\t\t\t */\n\t\t\tif(weight<=0)\n\t\t\t\tweight=0.1;\n\t\t\tmyHuman.weight=weight;\n\t\t\treturn this;\n\t\t}", "public void setWeight(double weight) {\n\t\tweightConfiguration.setWeightForIdentifier(this.getIdentifier(), weight);\n\t}", "public void setWeight(int weight){\n\t\tthis.weight = weight;\n\t}", "public void setWeight(double weight){\n\t\tthis._weight = weight;\n\t}", "public void setLineWidth(int width)\n {\n if (width > 0)\n lineWidth = width;\n else \n lineWidth = 1;\n }", "public void setLineWidth(float lineWidth);", "public void setWeights(double ACC, double ARM, double EVA, double HP, double INT,\n\t\t\tdouble LCK, double MAG, double MRE, double STR, double SP)\n\t{\n\t\tthis.statWeights = new double[10];\n\t\tstatWeights[0] = ACC;\n\t\tstatWeights[1] = ARM;\n\t\tstatWeights[2] = EVA;\n\t\tstatWeights[3] = HP;\n\t\tstatWeights[4] = INT;\n\t\tstatWeights[5] = LCK;\n\t\tstatWeights[6] = MAG;\n\t\tstatWeights[7] = MRE;\n\t\tstatWeights[8] = STR;\n\t\tstatWeights[9] = SP;\n\t}", "public void setGradingWeight(double weight){\n \tgradingWeight = weight;\n }", "public String getUnderline() {\n return underline.getText(); /*FAULT:: return \"y\"; */\n }", "public void setWeight(String newValue);", "public abstract void setLineWidth(float lineWidth);", "public void setBold(boolean bold) {\r\n try {\r\n if (bold) {\r\n this.setFont(this.getFont().deriveFont(Font.BOLD));\r\n } else {\r\n this.setFont(this.getFont().deriveFont(Font.PLAIN));\r\n }\r\n this.bold = bold;\r\n } catch (Exception e) {\r\n ToggleButton.logger.error(this.getClass().toString() + \" : Error establishing bold\", e);\r\n if (ApplicationManager.DEBUG) {\r\n ToggleButton.logger.error(null, e);\r\n }\r\n }\r\n }", "public void setTextBaseline(TEXT_BASELINE baseline);", "public void setWeight(final int weight) {\n this.weight = weight;\n }", "public synchronized void setWeight(int weight){\n\t\tthis.personWeight = weight; \n\t}", "public void styleforOne() {\r\n\t\t\r\n\r\n\t\tsuper.styleforOne();\r\n\t\t\r\n\t}", "@Override\n\t\tpublic float getBoldOffset() {\n\t\t\treturn 0.5F;\n\t\t}", "public void setWeight(Integer weight) {\n this.weight = weight;\n }", "public void setWeight (java.lang.Double weight) {\r\n\t\tthis.weight = weight;\r\n\t}", "public void setWeight(int newWeight) {\n weight = newWeight;\n }", "public void setWeight(float value) {\n this.weight = value;\n }", "protected void updateWeights() {\n\t\tvisualization.updateWeights();\n\t}", "public GUIPenStyle (List<GUITurtle> turtles, GUITurtleAreaBGInterface guiTurtleArea) {\n super(turtles, guiTurtleArea);\n setTextResources(ResourceBundle.getBundle(\"resources.guitext.PenStyle\"));\n displayInfo = getTextResources().getString(\"penstyle\");\n }", "public void setUnderlined(boolean aFlag) { }", "private void recordWeight(double weight) {\r\n\r\n\t\tthis.weight = weight;\r\n\t\tif (weight <= 3) {\r\n\t\t\tcategory = \"N/A\";\r\n\t\t} else if ((weight >= 3.1) && (weight <= 4.5)) {\r\n\t\t\tcategory = \"LIGHT\";\r\n\t\t} else if ((weight >= 4.51) && (weight <= 8.0)) {\r\n\t\t\tcategory = \"MEDIUM\";\r\n\t\t} else if (weight > 8.0) {\r\n\t\t\tcategory = \"HEAVY\";\r\n\t\t}\r\n\r\n\t}", "protected void setLineWidth(int width) {\r\n\t\tif (primaryShape instanceof Shape) {\r\n\t\t\t((Shape) primaryShape).setLineWidth(width);\r\n\t\t}\r\n\t}", "public static void setUnderlined(TextView textView, String text) {\n SpannableString spannable = new SpannableString(text);\n spannable.setSpan(new UnderlineSpan(), 0, text.length(), 0);\n textView.setText(spannable);\n }", "public void setWeight(final double pWeight){this.aWeight = pWeight;}", "@SuppressWarnings(\"unchecked\")\n\tpublic static void underlineLabel (JLabel label) {\n\t\t\n\t\tFont font = label.getFont();\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tMap attributes = font.getAttributes();\n\t\tattributes.put(TextAttribute.UNDERLINE, TextAttribute.UNDERLINE_ON);\n\t\tlabel.setFont(font.deriveFont(attributes));\n\t}", "public static String underlineBoldItalic(String message) {\n return \"__***\" + message + \"***__\";\n }", "public void setLineWidth(float width)\r\n\t{\r\n\t\t// not implemented\r\n\t\tg.setPenWidth((int) width);\r\n\t}", "public void setThickness(float thickness){\n this.thickness = thickness;\n }", "private void setWeight() {\n \tthis.trainWeight = (this.trainCars*TRAIN_WEIGHT) + (this.crew + this.numPassengers) * AVE_PASSENGER_WEIGHT;\n }", "public void setWeight(int weight) {\n\t\tif (weight > 0) {\n\t\t\tthis.weight = weight;\n\t\t} else {\n\t\t\tthis.weight = 0;\n\t\t}\n\t}", "public byte getUnderline()\n {\n return font.getUnderline();\n }", "public static SpannableString getNormalUnderlineString(String normalStr, String underlineStr) {\n SpannableString ss;\n\n if (TextUtils.isEmpty(normalStr))\n normalStr = \"\";\n\n if (TextUtils.isEmpty(underlineStr)) {\n ss = new SpannableString(normalStr);\n } else {\n int pos = underlineStr.length();\n\n ss = new SpannableString(normalStr + underlineStr);\n //ss.setSpan(new ForegroundColorSpan(Color.WHITE), 0, pos, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);\n ss.setSpan(new UnderlineSpan(), normalStr.length(), normalStr.length() + underlineStr.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);\n //ss.setSpan(new ForegroundColorSpan(Color.GRAY), pos + 2, boldStr.length() + normalStr.length() + 2, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);\n }\n\n return ss;\n }", "public void arreglarBoton()\r\n\t{\r\n\t\tthis.setBorder(BorderFactory.createLineBorder(Color.white, 4));\r\n\t\tthis.setFont(new Font(\"Arial\", Font.BOLD, 17));\r\n\t}", "protected double addTextElement(Element parent, double x, double y, String text,\n float fontSize, String anchor, String weight) {\n return addTextElement(parent, x, y, text, fontSize, anchor, weight, \"#000000\");\n }", "Widget(Colour colour,int weight){\n\t\tthis.colour=colour;\n\t\tthis.weight=weight;\n\t}", "public void setWeights(double[] w) {\n\t\t\tweights = w;\n\t\t}", "void setBorder(Color color, int thickness);", "public void setTextStyle(TextStyle.Horizontal hAlign, TextStyle.Vertical vAlign, \n TextStyle.Orientation orientation) {\n TextStyle style = this.textStyle;\n hAlign = (hAlign == null)? style.hAlign: hAlign;\n vAlign = (vAlign == null)? style.vAlign: vAlign;\n orientation = (orientation == null)? style.orientation: orientation;\n this.textStyle = new TextStyle(hAlign, vAlign, orientation);\n }", "public void setWeight(Byte weight) {\n\t\tthis.weight = weight;\n\t}", "public void initialSetting(AttributeSet attributeSet, int defStyleAttr){\n paint_brush.setAntiAlias(true);\n\n //Setting the color for the Paint Brush\n paint_brush.setColor(Color.BLACK);\n\n //Setting the corner display for the drawings done by the User\n //The corners will be seen circular in display\n paint_brush.setStrokeJoin(Paint.Join.ROUND);\n\n //Setting the style of the stroke of the paint brush\n paint_brush.setStyle(Paint.Style.STROKE);\n\n //Setting the width of the stroke of the paint brush\n paint_brush.setStrokeWidth(8f);\n }", "@Override\n\tprotected TextAttribute createTextAttribute(String[] stylePrefs) {\n\t\tint fontModifier = SWT.NORMAL;\n\t\tif (Boolean.valueOf(stylePrefs[2]).booleanValue()) { // bold\n\t\t\tfontModifier |= SWT.BOLD;\n\t\t}\n\t\tif (Boolean.valueOf(stylePrefs[3]).booleanValue()) { // italic\n\t\t\tfontModifier |= SWT.ITALIC;\n\t\t}\n\t\tif (Boolean.valueOf(stylePrefs[4]).booleanValue()) { // strikethrough\n\t\t\tfontModifier |= TextAttribute.STRIKETHROUGH;\n\t\t}\n\t\tif (Boolean.valueOf(stylePrefs[5]).booleanValue()) { // underline\n\t\t\tfontModifier |= TextAttribute.UNDERLINE;\n\t\t}\n\t\treturn new TextAttribute(EditorUtility.getColor(ColorHelper.toRGB(stylePrefs[0])),\n\t\t\t\tEditorUtility.getColor(ColorHelper.toRGB(stylePrefs[1])), fontModifier);\n\t}", "public void setWeights(Weight[] weights) {\n this.weights = weights;\n }", "public void setStrokeStyle(STYLE style);", "public void setEdgeWeight(Node p_a, Node p_b, double p_weight) {\n\t\t\n\t\t// We need to use the makeEdge method to make a new edge\n\t\t// So we can ensure we generate an edge with consistent hashCodes\n\t\tEdge edge = makeEdge(p_a, p_b);\n\t\tint id = edge.hashCode();\n\t\tweights.put(id, p_weight);\n\t}", "public WritingFont() {\n\t\tproperties.set(NAME, \"Untitled\");\n\t\tproperties.set(MEDIAN, .6f);\n\t\tproperties.set(DESCENT, .3f);\n\t\tproperties.set(LEADING, .1f);\n\t}", "public void setWeight(float value) {\n\t\t\tthis.weight = value;\n\t\t}", "public void setWeight(T3 eWeight) {\r\n\t\tthis.weight = eWeight;\r\n\t}", "protected final void setHeading(final int heading) {\n if (heading < 1 || heading > 6) {\n throw new IllegalArgumentException(\n \"Heading parameter must be between 1 and 6 (inclusive\");\n }\n if (heading < 5)\n setBold(true);\n setFontSize((int) (getFontSize() * HEADING_MULT[heading]));\n }", "public void updateWeights() {\n\t\t\n\t}", "@Override\n public void layout(LayoutContext lc) {\n //String s = new String(text);\n setFont(style.getFont());\n\n if (style.hasInitialValues()) {\n if (style.isDisjoint) {\n lc.disjoin();\n }\n Style.Header h = style.getHeader();\n if (h != null) {\n h.setFont(font);\n if (openIdent) {\n lc.setIdentation(style.indent, true);\n }\n parent.add((Control) h, lc.nextX, lc.nextY);\n lc.update(h.getWidth());\n }\n }\n\n boolean isPRE = style.alignment == Style.ALIGN_NONE;\n if (isPRE) {\n makePreformattedLines(lc);\n } else {\n makeLines(lc);\n }\n\n boolean disjoin = isPRE;\n boolean wasDisjoin = lc.lastStyle != null && lc.lastStyle.alignment == Style.ALIGN_NONE;\n lc.lastStyle = style;\n\n if (disjoin && wasDisjoin) {\n disjoin = false;\n } else if (!disjoin && wasDisjoin) {\n disjoin = true;\n }\n\n //debug(lc,style,new String(text));\n if (disjoin) {\n lc.disjoin();\n } else if (!disjoin && wasDisjoin) {\n lc.update(0);\n }\n if (finishIdent) {\n lc.setIdentation(0, false);\n }\n }", "public void setMaxWeight(String newValue);", "private void setPenColor() {\n\t}", "public void setWidth(double w)\n { this.widthDefault = w; }", "public void setHighlightLineWidth(float width) { this.mHighlightLineWidth = Utils.convertDpToPixel(width); }", "public void setBold(org.openxmlformats.schemas.presentationml.x2006.main.CTEmbeddedFontDataId bold)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.openxmlformats.schemas.presentationml.x2006.main.CTEmbeddedFontDataId target = null;\n target = (org.openxmlformats.schemas.presentationml.x2006.main.CTEmbeddedFontDataId)get_store().find_element_user(BOLD$4, 0);\n if (target == null)\n {\n target = (org.openxmlformats.schemas.presentationml.x2006.main.CTEmbeddedFontDataId)get_store().add_element_user(BOLD$4);\n }\n target.set(bold);\n }\n }", "public Button addExplicitStyle(String name, String value){\n if(this.explicitStyle==null){\n this.explicitStyle = name + \":\" + value + \";\";\n }else{\n this.explicitStyle += name + \":\" + value + \";\";\n }\n return this;\n }", "public ColorWeight()\n {\n weight = 0;\n }", "public short getBoldweight()\n {\n return font.getBoldWeight();\n }", "public void setWeight(double pounds) {\n if (pounds >= 80 && pounds <= 280)\n this.weight = pounds;\n }", "public void setLineWeight(int nuovo_lineaspessore)\n {\n \tboolean bo = informaPreUpdate();\n lineaspessore = nuovo_lineaspessore;\n\t\tinformaPostUpdate(bo);\n }", "public void setBold(Boolean bold) {\n getOrCreateProperties().setBold(bold);\n }", "public void setWeight(double weight2) {\n\t\tthis.weight = weight2;\n\t}" ]
[ "0.694754", "0.6915034", "0.6675739", "0.6515121", "0.60951364", "0.58855927", "0.5884507", "0.56201375", "0.5536734", "0.5531295", "0.5518616", "0.5493363", "0.5453484", "0.5434299", "0.54156727", "0.5412575", "0.54122317", "0.54036236", "0.5400889", "0.5391626", "0.53867066", "0.5382812", "0.5375653", "0.5361476", "0.53523654", "0.53521514", "0.53447837", "0.5337686", "0.5336212", "0.53332627", "0.53212225", "0.53101134", "0.53065264", "0.53029144", "0.5297248", "0.527401", "0.527206", "0.5253712", "0.5236102", "0.52360547", "0.5233128", "0.52313936", "0.5221157", "0.52130395", "0.52089113", "0.5200808", "0.5197999", "0.5196292", "0.51895344", "0.51876855", "0.5167752", "0.5161838", "0.5128418", "0.51226646", "0.51162034", "0.507945", "0.5058627", "0.5051394", "0.5044304", "0.5037509", "0.5020744", "0.502009", "0.50144553", "0.5013517", "0.50114954", "0.5006535", "0.5004254", "0.49884886", "0.4987415", "0.4982262", "0.4967462", "0.49597394", "0.49561694", "0.49538365", "0.495207", "0.49514621", "0.49429935", "0.49262795", "0.49165523", "0.4914579", "0.4914049", "0.49068493", "0.49029425", "0.49028337", "0.48987684", "0.48795033", "0.48715422", "0.4854849", "0.48511937", "0.4849265", "0.48482028", "0.4846588", "0.48465183", "0.48403516", "0.48367673", "0.48357415", "0.48255008", "0.48248804", "0.48200062", "0.48169222" ]
0.6242905
4
Sets left, center, right justification
public void setJustification(int val) throws IOException { writer.write(0x1B); writer.write("a"); writer.write(val); writer.flush(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void justifyCenter() {\n\t\tleft.center();\n\t}", "public TextJustification getJustification();", "public void justifyLeft() {\n\t\tleft.left();\n\t}", "public void setAlignmentX(AlignX anAlignX) { }", "public boolean centerJustified(){\n return justification.equals(FormatAlignment.CENTER_JUSTIFY);\n }", "public boolean leftJustified(){\n return justification.equals(FormatAlignment.LEFT_JUSTIFY);\n }", "public void centerText() {\r\n int theHeight = window.getGraphPanelHeight() / 2;\r\n int theWidth = window.getGraphPanelWidth() / 2;\r\n int writingHeight = textShape.getHeight() / 2;\r\n int writingWidth = textShape.getWidth() / 2;\r\n textShape.setY(theHeight - writingHeight);\r\n textShape.setX(theWidth - writingWidth);\r\n }", "public GraphicsImageWrapper setJustification(EscPosConst.Justification justification) {\n this.justification = justification;\n return this;\n }", "public void setHorizontalAlignment( short align )\n {\n this.halign = align;\n }", "public void justifyRight() {\n\t\tleft.right();\n\t}", "boolean getAligning();", "public void setOrigin(){\n // draw X-axis\n graphics2D.draw(new Line2D.Double(leftMiddle, rightMiddle));\n\n // draw string \"+X\" and \"-X\"\n graphics2D.drawString(\"+X\", (int) rightMiddle.getX() - 10, (int) rightMiddle.getY() - 5);\n graphics2D.drawString(\"-X\", (int) leftMiddle.getX() + 10, (int) leftMiddle.getY() + 10);\n\n // draw Y-axis\n graphics2D.draw(new Line2D.Double(topMiddle, bottomMiddle));\n\n // draw string \"+Y\" and \"-Y\"\n graphics2D.drawString(\"+Y\", (int) topMiddle.getX() + 5, (int) topMiddle.getY() + 10);\n graphics2D.drawString(\"-Y\", (int) bottomMiddle.getX() - 15, (int) bottomMiddle.getY());\n\n }", "public AlignX getAlignmentX() { return AlignX.Left; }", "public short getHorizontalAlignment()\n {\n return halign;\n }", "private void alignCenter(int newWidth) {\n for (Shape child : shape.getChildren()) {\n GraphicsAlgorithm ga = child.getGraphicsAlgorithm();\n int diff = (newWidth - ga.getWidth()) / 2;\n gaService.setLocation(ga, ga.getX() + diff, ga.getY());\n }\n }", "public void alignCenter() {\n\t\ttop.middle();\n\t}", "boolean hasAligning();", "public int getHorizontalAlignment() {\n return horizontalAlignment;\n }", "public void setHorizontalAlignment(int alignment) {\n if (alignment == horizontalAlignment) return;\n int oldValue = horizontalAlignment;\n if ((alignment == LEFT) || (alignment == CENTER) || \n\t (alignment == RIGHT)|| (alignment == LEADING) || \n\t (alignment == TRAILING)) {\n horizontalAlignment = alignment;\n } else {\n throw new IllegalArgumentException(\"horizontalAlignment\");\n }\n firePropertyChange(\"horizontalAlignment\", oldValue, horizontalAlignment); \n invalidate();\n repaint();\n }", "public boolean rightJustified(){\n return justification.equals(FormatAlignment.RIGHT_JUSTIFY);\n }", "private static void printCenter(String str, int fieldWidth, boolean newLine){\n int rightAlign = (int)(Math.floor(fieldWidth/2) + Math.ceil(str.length()/2));\n System.out.printf(\"%\" + rightAlign + \"s%\" + (fieldWidth - rightAlign) + \"s\" + (newLine ? \"%n\" : \"\"), str, \"\");\n }", "public void setCenter() {\n\t\tthis.isCenter = true;\n\t}", "public void setTextAlign(TEXT_ALIGN align);", "public void setAlignment(Position alignment)\n {\n int align = alignment.value;\n JLabel jl = getComponent();\n if ((align&NORTH.value) != 0)\n jl.setVerticalAlignment(SwingConstants.TOP);\n else if ((align&SOUTH.value) != 0)\n jl.setVerticalAlignment(SwingConstants.BOTTOM);\n else\n jl.setVerticalAlignment(SwingConstants.CENTER);\n if ((align&EAST.value) != 0)\n jl.setHorizontalAlignment(SwingConstants.RIGHT);\n else if ((align&WEST.value) != 0)\n jl.setHorizontalAlignment(SwingConstants.LEFT);\n else\n jl.setHorizontalAlignment(SwingConstants.CENTER);\n invalidateSize();\n }", "@Override\n public int width()\n {\n return widthCent; //Charlie Gao helped me debug the issue here\n }", "CrossAlign getCrossAlign();", "public void setRightJustify(boolean rightJustify) {\n this.rightJustify = rightJustify;\n }", "public void setAlignmentY(AlignY anAlignX) { }", "public void alignLocation();", "public int getHorizontalAlignment()\n {\n return field.getHorizontalAlignment();\n }", "public abstract void doAlignment(String sq1, String sq2);", "public boolean isRightJustify() {\n return getHorizontalAlignment()==JTextField.RIGHT;\n }", "public int getAlignment() {\n/* */ return this.newAlign;\n/* */ }", "public static void SetCenter(int center) //set the center fret when needed\n\t{\n\t\tif(center==0)\n\t\t\tSfret=Efret=Center=1;\n\t\tif(center==15)\n\t\t\tSfret=Efret=Center=14;\n\t}", "public CenteredBlock(TextBlock tb, int width)\n {\n this.textCent = tb;\n this.widthCent = width;\n }", "@Override\n public String getTextAlign() {\n return graphicsEnvironmentImpl.getTextAlign(canvas);\n }", "public boolean isRightJustify() {\n return rightJustify;\n }", "public void setAlignment(int paramInt) {\n/* */ this.newAlign = paramInt;\n/* */ switch (paramInt) {\n/* */ case 3:\n/* */ this.align = 0;\n/* */ return;\n/* */ case 4:\n/* */ this.align = 2;\n/* */ return;\n/* */ } \n/* */ this.align = paramInt;\n/* */ }", "private AminoAction AlignLeft(final SketchDocument doc) {\n return named(\"Align Left\", groupOnly(doc, new AminoAction() {\n @Override\n public void execute() throws Exception {\n double val = apply(doc.getSelection(), Double.MAX_VALUE, new Accumulate<Double>() {\n public Double accum(SketchNode node, Double value) {\n return Math.min(value, node.getInputBounds().getX() + node.getTranslateX());\n }\n });\n \n apply(doc.getSelection(), val, new Accumulate<Double>() {\n public Double accum(SketchNode node, Double value) {\n double x = node.getInputBounds().getX() + node.getTranslateX();\n node.setTranslateX(node.getTranslateX() + value - x);\n return value;\n }\n });\n }\n }));\n }", "public void setAlignment(int align)\n {\n this.align = align;\n }", "@Override\n\tpublic void setPosition(int left)\n\t{\n\t\t_mainPanel.getElement().getStyle().setLeft(left, Style.Unit.PX) ;\n\t}", "public void setRightJustify(boolean rightJustify) {\n setHorizontalAlignment(rightJustify ? JTextField.RIGHT : JTextField.LEFT);\n }", "public int getAlignment()\n {\n return align;\n }", "public int getSwtAlignment() {\r\n return f_swtAlignment;\r\n }", "static public String center(String str, int len)\n {\n int halfPad = (len-str.length())/2;\n \n StringBuffer sb = new StringBuffer(len);\n for (int i=0; i<halfPad; i++)\n {\n sb.append(\" \");\n }\n sb.append(str);\n\n //setLength appears to not work on SCO\n //sb.setLength(len);\n int remainingPad = len - sb.length();\n for (int i=0; i<remainingPad; i++)\n {\n sb.append(\" \");\n }\n\n return sb.toString();\n }", "public boolean noJustified(){\n return justification.equals(FormatAlignment.NO_JUSTIFY);\n }", "@JSProperty(\"textAlign\")\n void setTextAlign(String value);", "private void numberDisplayAlignment() {\n numberDisplay.setAlignment(Pos.CENTER_RIGHT);\n numberDisplay.setPrefSize(20, 10);\n }", "public int getHorizontalTextAlignment() {\r\n\t\treturn getJTextField().getHorizontalAlignment();\r\n\t}", "public void setHorizontalTextAlignment(short value)\n {\n field_1_options = HorizontalTextAlignment.setShortValue(field_1_options, value);\n }", "@Override\r\n protected void layout() {\n\r\n Check.setY(this.getHalfHeight() - Check.getHalfHeight());\r\n\r\n float asc = lblName.getFont().getDescent();\r\n\r\n lblName.setY(this.getHeight() - lblName.getHeight() + asc);\r\n lblName.setX(this.getLeftWidth());\r\n }", "private String centerName(int totalLength) {\n\t\tString name = getHotel().getName().toUpperCase();\n\t\tint spaces = totalLength - name.length();\n\t\tif (!(spaces % 2 == 1)) {\n\t\t\tspaces--;\n\t\t\tname += \" \";\n\t\t}\n\t\tfor (int i = 0; i < spaces / 2; i++) {\n\t\t\tname = \" \" + name + \" \";\n\t\t}\n\t\treturn \" \" + name;\n\t}", "public void Wrap () \n {\n pos.x = (pos.x + width) % width;\n pos.y = (pos.y + height) % height;\n }", "private static String center(Object obj){\r\n\t\tString str = obj.toString();\r\n\t\tint width = 17;\t\r\n\t\tint padSize = width - str.length();\r\n\t\tint padStart = str.length() + padSize / 2; \r\n\t\tstr = String.format(\"%\" + padStart + \"s\", str);\r\n\t\tstr = String.format(\"%-\" + width + \"s\", str);\r\n\t\t\r\n\t\treturn str;\r\n\t}", "private String centerText(String toCenter, int length, char spacer) {\n // Do fancy centering\n StringBuilder sb = new StringBuilder();\n int noOfSpaces = (toCenter.length() > length) ? 0 : (length - toCenter.length()) / 2;\n Stream.generate(() -> spacer).limit(noOfSpaces).forEach(sb::append);\n sb.append(toCenter);\n return sb.toString();\n }", "public static String leftAlignFormat() {\n String leftAlignFormat = \"\\n\\t\"\r\n + \"|\"\r\n + \" %-\" + Integer.toString(5) + \"s\"\r\n + \"|\"\r\n + \" %-\" + Integer.toString(40) + \"s\"\r\n + \"|\"\r\n + \" %-\" + Integer.toString(30) + \"s\"\r\n + \"|\"\r\n + \" %-\" + Integer.toString(30) + \"s\"\r\n + \"|\"\r\n + \" %-\" + Integer.toString(60) + \"s\"\r\n + \"|\"\r\n + \" %-\" + Integer.toString(15) + \"s\"\r\n + \"|\"\r\n + \" %-\" + Integer.toString(15) + \"s\" //string\r\n + \"|\"\r\n + \" %-\" + Integer.toString(24) + \"s\" \r\n + \"|\\n\";\r\n return leftAlignFormat;\r\n }", "int defaultHorizontal() {\n int horizontal;\n if (isDate(clazz) || isDateTime(clazz)\n || isLocalDate(clazz) || isLocalDateTime(clazz)\n || isTime(clazz) || isLocalTime(clazz)\n || isChar(clazz) || isBool(clazz)) {\n horizontal = Horizontals.CENTER;\n } else if (isInt(clazz) || isLong(clazz)\n || isFloat(clazz) || isDouble(clazz)\n || isBigDecimal(clazz)) {\n horizontal = Horizontals.RIGHT;\n } else {\n horizontal = Horizontals.LEFT;\n }\n return horizontal;\n }", "public void adjustLeft() {\n\n for (int y = 0; y < MAP_HEIGHT; y++)\n for (int x = 0; x < MAP_WIDTH; x++) {\n tiles[x][y].x = tiles[x][y].x - 4;\n backGroundTiles[x][y].x = backGroundTiles[x][y].x - 4;\n grassTiles[x][y].x = grassTiles[x][y].x - 4;\n }\n }", "private void setupPadding()\n\t{\n\t\tContext context = getContext();\n\t\tResources res = context.getResources();\n\t\tint main = (int) res.getDimension(R.dimen.sp_main);\n\t\tthis.mPadding[0] = main;\n\t\tthis.mPadding[1] = main;\n\t\tthis.mPadding[2] = 0;\n\t\tthis.mPadding[3] = main;\n\t}", "public void setHorizontalAlignment(int horizontalAlignment)\n {\n field.setHorizontalAlignment(horizontalAlignment);\n }", "public static String center(String str, int spaces)\n {\n String pad = \"\";\n\n for(int i = 0; i < (spaces - str.length()) / 2; i++)\n {\n pad += \" \";\n } \n return pad + str + pad;\n }", "int getVerticalAlignValue();", "protected String paramString() {\n String horizontalAlignmentString;\n if (horizontalAlignment == LEFT) {\n\t horizontalAlignmentString = \"LEFT\";\n\t} else if (horizontalAlignment == CENTER) {\n\t horizontalAlignmentString = \"CENTER\";\n\t} else if (horizontalAlignment == RIGHT) {\n\t horizontalAlignmentString = \"RIGHT\";\n\t} else if (horizontalAlignment == LEADING) {\n\t horizontalAlignmentString = \"LEADING\";\n\t} else if (horizontalAlignment == TRAILING) {\n\t horizontalAlignmentString = \"TRAILING\";\n\t} else horizontalAlignmentString = \"\";\n String commandString = (command != null ?\n\t\t\t\tcommand : \"\");\n\n return super.paramString() +\n \",columns=\" + columns +\n \",columnWidth=\" + columnWidth +\n \",command=\" + commandString +\n \",horizontalAlignment=\" + horizontalAlignmentString;\n }", "public static String formatColumn(String colText, Integer colWidth, boolean leftJustify) {\t\t\n\t\tString str50Spaces = \" \";\n\t\tString paddedResult;\n\t\tif (leftJustify) paddedResult = (colText + str50Spaces).substring(0, colWidth);\n\t\telse paddedResult = (str50Spaces + colText).substring(colWidth - colText.length());\n\t\treturn paddedResult;\n\t}", "public void setJustification(com.cognos.developer.schemas.raas.Returns__by__Order__Method___x002d__Prompted__Chart.JustificationEnum justification) {\r\n this.justification = justification;\r\n }", "@ApiModelProperty(value = \"The text after replacement is centered horizontally relative to the text being replaced.\")\n public Boolean isCenterTextHorizontally() {\n return centerTextHorizontally;\n }", "public String orientation()\n {\n int height = cat.getWidth();\n int width = cat.getHeight();\n\n if (height >= width)\n {\n return \"landscape\";\n }\n else \n {\n return \"portrait\";\n\n }\n }", "private void displayLeftAndRight(Location center, Player player) {\n\t\tParticleManager particleManager = Navigator.getInstance().getParticleManager();\n\n\t\t// the lower left corner\n\t\tdouble cornerX = center.getX() - (sideLength / 2);\n\t\tdouble leftZ = center.getZ() - (sideLength / 2);\n\n\t\t// for the right side\n\t\tdouble rightZ = center.getZ() + (sideLength / 2);\n\n\t\tLocation location = center.clone();\n\t\tlocation.setX(cornerX);\n\t\tlocation.setZ(leftZ);\n\n\t\t// display left line, going from left down upwards\n\t\tfor (double x = cornerX, max = cornerX + sideLength; x < max; x += granularity) {\n\t\t\tlocation.setX(x);\n\n\t\t\t// left line\n\t\t\tparticleManager.displayEndMarkerParticle(location, player);\n\n\t\t\t// right line\n\t\t\tlocation.setZ(rightZ);\n\t\t\tparticleManager.displayEndMarkerParticle(location, player);\n\t\t\tlocation.setZ(leftZ);\n\t\t}\n\t}", "public static String nameLeftValueRightJustify(String param1, String param2,\r\n\t\t\tint cpl) {\r\n\t\t if(param1 == null)\r\n \tparam1 = \"\";\r\n if(param2 == null)\r\n \tparam2 = \"\";\r\n\t\tint len = param1.length();\r\n\t\treturn param1.trim()+rightJustify(param2, (cpl - len));\r\n\t}", "public final float exactCenterX() {\n return (left + right) * 0.5f;\n }", "public void setHorizontalAlign(int align) {\r\n this.halign = align;\r\n updateToolbar();\r\n\r\n }", "Builder addEducationalAlignment(String value);", "public void renderCenterBlock(int cons, int side, int end)\r\n/* 143: */ {\r\n/* 144:135 */ if (cons == 0)\r\n/* 145: */ {\r\n/* 146:136 */ this.context.setTex(end);\r\n/* 147:137 */ doubleBox(63, 0.375F, 0.375F, 0.375F, 0.625F, 0.625F, 0.625F);\r\n/* 148:138 */ return;\r\n/* 149: */ }\r\n/* 150:139 */ if (cons == 3)\r\n/* 151: */ {\r\n/* 152:140 */ this.context.setTexFlags(1773);\r\n/* 153:141 */ this.context.setTex(end, end, side, side, side, side);\r\n/* 154:142 */ doubleBox(60, 0.375F, 0.0F, 0.375F, 0.625F, 1.0F, 0.625F);\r\n/* 155:143 */ return;\r\n/* 156: */ }\r\n/* 157:144 */ if (cons == 12)\r\n/* 158: */ {\r\n/* 159:145 */ this.context.setTexFlags(184365);\r\n/* 160:146 */ this.context.setTex(side, side, end, end, side, side);\r\n/* 161:147 */ doubleBox(51, 0.375F, 0.375F, 0.0F, 0.625F, 0.625F, 1.0F);\r\n/* 162:148 */ return;\r\n/* 163: */ }\r\n/* 164:149 */ if (cons == 48)\r\n/* 165: */ {\r\n/* 166:150 */ this.context.setTexFlags(187200);\r\n/* 167:151 */ this.context.setTex(side, side, side, side, end, end);\r\n/* 168:152 */ doubleBox(15, 0.0F, 0.375F, 0.375F, 1.0F, 0.625F, 0.625F);\r\n/* 169:153 */ return;\r\n/* 170: */ }\r\n/* 171:155 */ this.context.setTex(end);\r\n/* 172:156 */ doubleBox(0x3F ^ cons, 0.375F, 0.375F, 0.375F, 0.625F, 0.625F, 0.625F);\r\n/* 173:157 */ if ((cons & 0x1) > 0)\r\n/* 174: */ {\r\n/* 175:158 */ this.context.setTexFlags(1773);\r\n/* 176:159 */ this.context.setTex(end, end, side, side, side, side);\r\n/* 177:160 */ doubleBox(60, 0.375F, 0.0F, 0.375F, 0.625F, 0.375F, 0.625F);\r\n/* 178: */ }\r\n/* 179:162 */ if ((cons & 0x2) > 0)\r\n/* 180: */ {\r\n/* 181:163 */ this.context.setTexFlags(1773);\r\n/* 182:164 */ this.context.setTex(end, end, side, side, side, side);\r\n/* 183:165 */ doubleBox(60, 0.375F, 0.625F, 0.375F, 0.625F, 1.0F, 0.625F);\r\n/* 184: */ }\r\n/* 185:167 */ if ((cons & 0x4) > 0)\r\n/* 186: */ {\r\n/* 187:168 */ this.context.setTexFlags(184365);\r\n/* 188:169 */ this.context.setTex(side, side, end, end, side, side);\r\n/* 189:170 */ doubleBox(51, 0.375F, 0.375F, 0.0F, 0.625F, 0.625F, 0.375F);\r\n/* 190: */ }\r\n/* 191:172 */ if ((cons & 0x8) > 0)\r\n/* 192: */ {\r\n/* 193:173 */ this.context.setTexFlags(184365);\r\n/* 194:174 */ this.context.setTex(side, side, end, end, side, side);\r\n/* 195:175 */ doubleBox(51, 0.375F, 0.375F, 0.625F, 0.625F, 0.625F, 1.0F);\r\n/* 196: */ }\r\n/* 197:177 */ if ((cons & 0x10) > 0)\r\n/* 198: */ {\r\n/* 199:178 */ this.context.setTexFlags(187200);\r\n/* 200:179 */ this.context.setTex(side, side, side, side, end, end);\r\n/* 201:180 */ doubleBox(15, 0.0F, 0.375F, 0.375F, 0.375F, 0.625F, 0.625F);\r\n/* 202: */ }\r\n/* 203:182 */ if ((cons & 0x20) > 0)\r\n/* 204: */ {\r\n/* 205:183 */ this.context.setTexFlags(187200);\r\n/* 206:184 */ this.context.setTex(side, side, side, side, end, end);\r\n/* 207:185 */ doubleBox(15, 0.625F, 0.375F, 0.375F, 1.0F, 0.625F, 0.625F);\r\n/* 208: */ }\r\n/* 209: */ }", "public void setCorner(String paramString, Component paramComponent) {\n/* */ Component component;\n/* 1234 */ boolean bool = getComponentOrientation().isLeftToRight();\n/* 1235 */ if (paramString.equals(\"LOWER_LEADING_CORNER\")) {\n/* 1236 */ paramString = bool ? \"LOWER_LEFT_CORNER\" : \"LOWER_RIGHT_CORNER\";\n/* 1237 */ } else if (paramString.equals(\"LOWER_TRAILING_CORNER\")) {\n/* 1238 */ paramString = bool ? \"LOWER_RIGHT_CORNER\" : \"LOWER_LEFT_CORNER\";\n/* 1239 */ } else if (paramString.equals(\"UPPER_LEADING_CORNER\")) {\n/* 1240 */ paramString = bool ? \"UPPER_LEFT_CORNER\" : \"UPPER_RIGHT_CORNER\";\n/* 1241 */ } else if (paramString.equals(\"UPPER_TRAILING_CORNER\")) {\n/* 1242 */ paramString = bool ? \"UPPER_RIGHT_CORNER\" : \"UPPER_LEFT_CORNER\";\n/* */ } \n/* 1244 */ if (paramString.equals(\"LOWER_LEFT_CORNER\")) {\n/* 1245 */ component = this.lowerLeft;\n/* 1246 */ this.lowerLeft = paramComponent;\n/* */ }\n/* 1248 */ else if (paramString.equals(\"LOWER_RIGHT_CORNER\")) {\n/* 1249 */ component = this.lowerRight;\n/* 1250 */ this.lowerRight = paramComponent;\n/* */ }\n/* 1252 */ else if (paramString.equals(\"UPPER_LEFT_CORNER\")) {\n/* 1253 */ component = this.upperLeft;\n/* 1254 */ this.upperLeft = paramComponent;\n/* */ }\n/* 1256 */ else if (paramString.equals(\"UPPER_RIGHT_CORNER\")) {\n/* 1257 */ component = this.upperRight;\n/* 1258 */ this.upperRight = paramComponent;\n/* */ } else {\n/* */ \n/* 1261 */ throw new IllegalArgumentException(\"invalid corner key\");\n/* */ } \n/* 1263 */ if (component != null) {\n/* 1264 */ remove(component);\n/* */ }\n/* 1266 */ if (paramComponent != null) {\n/* 1267 */ add(paramComponent, paramString);\n/* */ }\n/* 1269 */ firePropertyChange(paramString, component, paramComponent);\n/* 1270 */ revalidate();\n/* 1271 */ repaint();\n/* */ }", "@Override\n public void setPadding(int left, int top, int right, int bottom) {\n super.setPadding(left, top, right, bottom);\n updatePolygonSize(left, top, right, bottom);\n invalidate(left, top, right, bottom);\n }", "TableSectionBuilder align(String align);", "public int getHorizontalAlignment() {\r\n\t\treturn getJTextField().getHorizontalAlignment();\r\n\t}", "int getAlignValue();", "public void setHAlign(int hAlign) {\n this.hAlign = hAlign;\n }", "void setLandscape(boolean ls);", "private Point middleLeft() {\n return this.topLeft.add(0, this.height / 2).asPoint();\n }", "public UtilsPadding setLeft(String left1) {\n if (jsBase == null) {\n this.left = null;\n this.left1 = null;\n \n this.left1 = left1;\n } else {\n this.left1 = left1;\n if (!isChain) {\n js.append(jsBase);\n isChain = true;\n }\n \n js.append(String.format(Locale.US, \".left(%s)\", wrapQuotes(left1)));\n\n if (isRendered) {\n onChangeListener.onChange(String.format(Locale.US, jsBase + \".left(%s);\", wrapQuotes(left1)));\n js.setLength(0);\n }\n }\n return this;\n }", "public static int getCenter() {\n\t\treturn Center;\n\t}", "public static void main(String[] args) {\n\t\tString[] words = { \"This\", \"is\", \"an\", \"example\", \"of\", \"text\", \"justification.\" };\n\t\tTextJustification t = new TextJustification();\n\t\tfor (String s : t.fullJustify(words, 16)){\n\t\t\tSystem.out.println(s);\n\t\t}\n\t}", "private void setupTransformationMatrix(ShapeRenderer renderer){\n\t\trenderer.identity();\n\t\trenderer.translate(cx, cy, 0);\n\t\trenderer.rotate(0, 0, 1, angle); \n\t\trenderer.translate(-cx, -cy, 0);\n\t}", "private void centre() {\n Dimension localDimension = Toolkit.getDefaultToolkit().getScreenSize();\n int i2 = (int) Math.min(localDimension.width * WIDTH, localDimension.height * WIDTH);\n\n Rectangle localRectangle = new Rectangle();\n localRectangle.setBounds(((localDimension.width - i2) / TWO), \n ((localDimension.height - i2) / TWO), i2, i2);\n\n setBounds(localRectangle);\n\n }", "public static String centerText(\n String text,\n int width,\n String pre,\n String post\n ) {\n int leftPadding = Color.strip(pre).length();\n int rightPadding = Color.strip(post).length();\n int s = width - leftPadding - rightPadding - Color.strip(text).length();\n String left;\n String right;\n\n if (s % 2 == 0) {\n left = right = spaces(s/2);\n }\n else {\n left = spaces(s/2);\n right = spaces(s/2 + 1);\n }\n\n StringBuffer b = new StringBuffer(width);\n b.append(pre);\n b.append(left);\n b.append(text);\n b.append(right);\n b.append(post);\n b.append(\"\\n\\r\");\n\n return b.toString();\n }", "public static String centerString(int width, String s) {\n \treturn String.format(\"%-\" + width + \"s\", String.format(\"%\" + (s.length() + (width - s.length()) / 2) + \"s\", s));\n\t}", "public ClusteringPnlLeft() {\n initComponents();\n setSize(MainGUI.getInstance().getWidth(), MainGUI.getInstance().getHeight());\n setVisible(true);\n checkBoxes = new ArrayList<>();\n pnlAttributes.setLayout(new FlowLayout((int) LEFT_ALIGNMENT));\n \n int numOfAttributes = Data.getInstance().getInstances().numAttributes();\n for (int i = 0; i < numOfAttributes; i++) {\n String name = Data.getInstance().getInstances().attribute(i).name();\n int blank = 30 - name.length();\n for (int j = 0; j < blank; j++) {\n name = name + \" \";\n }\n checkBoxes.add(new JCheckBox(name));\n pnlAttributes.add(checkBoxes.get(i));\n }\n\n }", "public static String centerText(String text) {\r\n\t int maxWidth = 80;\r\n\t\tint spaces = (int) Math.round((maxWidth-1.4*ChatColor.stripColor(text).length())/2);\r\n\t\t\r\n\t return StringUtils.repeat(\" \", spaces)+text;\r\n\t}", "public int getAlignment() {\r\n return Alignment;\r\n }", "public int getAlignment() {\r\n return Alignment;\r\n }", "public static String getCentered(int width, String text)\n {\n String line;\n int beforeTextSpace;\n beforeTextSpace = ((width - text.length()) / 2);\n\n line = ConsoleForm.getHorizontalLine(' ', beforeTextSpace);\n line += text;\n line += ConsoleForm.getHorizontalLine(' ', beforeTextSpace);\n return line;\n }", "public CenteredBlock(TextBlock tb, int width) throws Exception\n {\n if (this.width < tb.width())\n {\n this.text = tb;\n this.width = width;\n }\n }", "public void handleHorizontalAlign( IStyle style )\n \t{\n \t\tCSSValue hAlign = style.getProperty( IStyle.STYLE_TEXT_ALIGN );\n \t\tif ( null != hAlign )\n \t\t{\n \t\t\twriter.attribute( HTMLTags.ATTR_ALIGN, hAlign.getCssText( ) );\n \t\t}\n \t}", "public void setCenter(boolean isCenter) {\n\t\tthis.roomCenter = isCenter; \n\t}", "public void onMirrorHorizontal() {\n mirror(TransformDesign.MIRROR_HORIZONTAL, 0.0f);\n }", "public void setLeft(int x) {\r\n leftSide = x;\r\n }", "protected void configureCenter(LayoutOptions parent){\n LayoutOptions childOptions = new LayoutOptions(); \n parent.setChildOptions(childOptions); \n \n // options for center-north pane \n //LayoutOptions north = new LayoutOptions();\n //childOptions.setNorthOptions(north); \n \n createOptions(childOptions, CardinalPoint.CENTER);\n \n // options for center-south pane \n LayoutOptions south = createOptions(childOptions, CardinalPoint.SOUTH);\n setAttribute(south, \"size\", \"34\");\n fixed(south);\n \n //childOptions.setSouthOptions(south);\n \n \n\t}", "private void drawLeftColoumnText(SettingsClass s){\r\n Font font=new Font(\"SanSerif\",Font.BOLD,40);\r\n g.setColor(Color.black);\r\n g.setFont(font);\r\n\r\n g.drawString(\"Players\",50,40+50*1);\r\n g.drawString(\"Match Point\",50,40+50*2);\r\n g.drawString(\"Time Limit\",50,40+50*3);\r\n g.drawString(\"Sudden Death\",50,40+50*4);\r\n \r\n // draws player numbers\r\n font=new Font(\"SanSerif\",Font.BOLD,30);\r\n g.setColor(Color.black);\r\n g.setFont(font);\r\n for(int i=0;i<s.getNumPlayers();i++){\r\n String text=\"Player \"+(char)(i+1+'0');\r\n g.drawString(text,50,300+40*i); \r\n }\r\n }" ]
[ "0.705537", "0.6518676", "0.6442288", "0.63067955", "0.62496597", "0.61043364", "0.6096076", "0.60584956", "0.5967884", "0.5958183", "0.5919162", "0.59038085", "0.58924687", "0.58537954", "0.56530344", "0.56161743", "0.55944836", "0.55940664", "0.5568063", "0.54835504", "0.5480446", "0.54399115", "0.54282624", "0.5398925", "0.5392814", "0.5384131", "0.53825843", "0.53805375", "0.53762454", "0.53652906", "0.53600764", "0.53471017", "0.53454727", "0.5341187", "0.53321826", "0.5324719", "0.5267069", "0.5265103", "0.5257505", "0.5210094", "0.5195335", "0.5188481", "0.5169365", "0.51662564", "0.51536196", "0.5144897", "0.5138332", "0.5109173", "0.5106055", "0.5103637", "0.5100542", "0.5094706", "0.5092565", "0.50888985", "0.50882876", "0.5083202", "0.5074892", "0.5073685", "0.50731295", "0.50583416", "0.5045323", "0.50448185", "0.50380117", "0.50377065", "0.5031659", "0.5026635", "0.50181335", "0.50178224", "0.50108224", "0.5008673", "0.5000311", "0.49995792", "0.49881408", "0.4985836", "0.4978853", "0.4977796", "0.49730435", "0.4971545", "0.49681026", "0.49624407", "0.4958054", "0.49571186", "0.49536848", "0.49491918", "0.4942308", "0.49318075", "0.4931245", "0.4927051", "0.49264178", "0.4923796", "0.49227908", "0.49227908", "0.4922272", "0.49151748", "0.4909223", "0.49048534", "0.4893535", "0.48932543", "0.48842144", "0.48808268" ]
0.5865995
13
Encode and print QR code
public void printQR(String str, int errCorrect, int moduleSize) throws IOException { // save data function 80 alignQr(1, moduleSize); writer.write(0x1D);// init writer.write("(k");// adjust height of barcode writer.write(str.length() + 3); // pl writer.write(0); // ph writer.write(49); // cn writer.write(80); // fn writer.write(48); // writer.write(str); // error correction function 69 writer.write(0x1D); writer.write("(k"); writer.write(3); // pl writer.write(0); // ph writer.write(49); // cn writer.write(69); // fn writer.write(errCorrect); // 48<= n <= 51 // size function 67 writer.write(0x1D); writer.write("(k"); writer.write(3); writer.write(0); writer.write(49); writer.write(67); writer.write(moduleSize);// 1<= n <= 16 // print function 81 writer.write(0x1D); writer.write("(k"); writer.write(3); // pl writer.write(0); // ph writer.write(49); // cn writer.write(81); // fn writer.write(48); // m writer.flush(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Bitmap encodeToQrCode(String text) throws WriterException {\n BitMatrix bitMatrix;\n try {\n bitMatrix = new MultiFormatWriter().encode(\n text,\n BarcodeFormat.DATA_MATRIX.QR_CODE,\n QR_CODE_WIDTH, QR_CODE_WIDTH, null\n );\n\n } catch (IllegalArgumentException Illegalargumentexception) {\n return null;\n }\n int bitMatrixWidth = bitMatrix.getWidth();\n int bitMatrixHeight = bitMatrix.getHeight();\n int[] pixels = new int[bitMatrixWidth * bitMatrixHeight];\n\n for (int y = 0; y < bitMatrixHeight; y++) {\n int offset = y * bitMatrixWidth;\n for (int x = 0; x < bitMatrixWidth; x++) {\n pixels[offset + x] = bitMatrix.get(x, y) ?\n context.getResources().getColor(R.color.qrCodeBlack):context.getResources().getColor(R.color.qrCodeWhite);\n }\n }\n Bitmap bitmap = Bitmap.createBitmap(bitMatrixWidth, bitMatrixHeight, Bitmap.Config.ARGB_4444);\n bitmap.setPixels(pixels, 0, QR_CODE_WIDTH, 0, 0, bitMatrixWidth, bitMatrixHeight);\n return bitmap;\n }", "private void generateQRCode(String data) {\n com.google.zxing.Writer writer = new QRCodeWriter();\n String finaldata = Uri.encode(data, \"ISO-8859-1\");\n try {\n BitMatrix bm = writer.encode(finaldata, BarcodeFormat.QR_CODE, 350, 350);\n qrBitmap = Bitmap.createBitmap(350, 350, Bitmap.Config.ARGB_8888);\n for (int i = 0; i < 350; i++) {\n for (int j = 0; j < 350; j++) {\n qrBitmap.setPixel(i, j, bm.get(i, j) ? Color.BLACK : Color.WHITE);\n }\n }\n } catch (WriterException e) {\n e.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n if (qrBitmap != null) {\n qrCodeImg.setImageBitmap(qrBitmap);\n\n }\n }", "private void createQrCode(View view) {\n String result = getResult();\n Bitmap qrBitmap = ScannableController.createQrBitmap(ScannableController\n .createUri(result, getIntent().getStringExtra(EXPERIMENT_ID),\n ((ExperimentType) getIntent().getSerializableExtra(EXPERIMENT_TYPE)).toString(),\n location != null ? Double.valueOf(location.getLatitude()).toString() : \"\",\n location != null ? Double.valueOf(location.getLongitude()).toString() : \"\"\n ));\n if (qrBitmap == null || result == null) {\n Toast.makeText(this, \"Trial result is invalid, cannot make QR code\", Toast.LENGTH_SHORT).show();\n return;\n }\n String path = MediaStore.Images.Media\n .insertImage(view.getContext().getContentResolver(), qrBitmap, \"Kotlout Experiment QR Code\", null);\n Uri uri = Uri.parse(path);\n Intent shareImageIntent = new Intent(Intent.ACTION_SEND);\n shareImageIntent.setType(\"image/jpeg\");\n shareImageIntent.putExtra(Intent.EXTRA_STREAM, uri);\n view.getContext().startActivity(Intent.createChooser(shareImageIntent, \"Share QR Code\"));\n }", "private Bitmap generateQR() {\n //save information of reservation into string\n StringBuilder infoB = new StringBuilder(film.getTitle() + \" \" + time + \"\\n Places: \");\n for (int i : listPlaces) {\n infoB = infoB.append(i + 1);\n infoB = infoB.append(\", \");\n }\n //delete last comma\n infoB.deleteCharAt(infoB.length() - 2);\n String info = infoB.toString();\n System.out.println(info);\n\n //generate bitmap with QR generated\n Bitmap bitmap = null;\n MultiFormatWriter multiFormatWriter = new MultiFormatWriter();\n try {\n BitMatrix bitMatrix = multiFormatWriter.encode(info, BarcodeFormat.QR_CODE, 200, 200);\n BarcodeEncoder barcodeEncoder = new BarcodeEncoder();\n bitmap = barcodeEncoder.createBitmap(bitMatrix);\n } catch (WriterException e) {\n e.printStackTrace();\n }\n\n return bitmap;\n }", "public String generateQRCode(String barCodeStr, String receiptName,String qrCodeText) {\n\t\tlogger.error(\"Start of generateQRCode\"+barCodeStr+\"\"+qrCodeText);\r\n\t\tString path = getFileServerPath(barCodeStr+\"QR\"+\".jpg\");\r\n\t\t\r\n\t\tif(new File(path).exists()) return path;\r\n\t\t\r\n\t\tFileOutputStream fos = null;\r\n\t\tByteArrayOutputStream bytesOut = null;\r\n\t\t\r\n\t\ttry {\r\n\t\t\tint size = 125;\r\n\t\t\tString fileType = \"jpg\";\r\n\t\t\t/*\r\n\t\t\t * Barcode128 code128 = new Barcode128();\r\n\t\t\t * code128.setCodeType(Barcode128.CODE128); code128.setCode(barCodeStr);\r\n\t\t\t * java.awt.Image img = code128.createAwtImage(Color.BLACK, Color.WHITE);\r\n\t\t\t * \r\n\t\t\t * BufferedImage outImage = new BufferedImage(img.getWidth(null),\r\n\t\t\t * img.getHeight(null), BufferedImage.TYPE_INT_RGB);\r\n\t\t\t * outImage.getGraphics().drawImage(img, 0, 0, null); bytesOut = new\r\n\t\t\t * ByteArrayOutputStream();\r\n\t\t\t * \r\n\t\t\t * ImageIO.write(outImage, \"jpg\", bytesOut);\r\n\t\t\t */\r\n\t\t\t\r\n\t\t\t// Create the ByteMatrix for the QR-Code that encodes the given String\r\n\t\t\tHashtable<EncodeHintType, ErrorCorrectionLevel> hintMap = new Hashtable();\r\n\t\t\thintMap.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.L);\r\n\t\t\tQRCodeWriter qrCodeWriter = new QRCodeWriter();\r\n\t\t\tBitMatrix byteMatrix = qrCodeWriter.encode(qrCodeText, BarcodeFormat.QR_CODE, size, size, hintMap);\r\n\t\t\t// Make the BufferedImage that are to hold the QRCode\r\n\t\t\tint matrixWidth = byteMatrix.getWidth();\r\n\t\t\tBufferedImage image = new BufferedImage(matrixWidth, matrixWidth, BufferedImage.TYPE_INT_RGB);\r\n\t\t\timage.createGraphics();\r\n\r\n\t\t\tGraphics2D graphics = (Graphics2D) image.getGraphics();\r\n\t\t\tgraphics.setColor(Color.WHITE);\r\n\t\t\tgraphics.fillRect(0, 0, matrixWidth, matrixWidth);\r\n\t\t\t// Paint and save the image using the ByteMatrix\r\n\t\t\tgraphics.setColor(Color.BLACK);\r\n\r\n\t\t\tfor (int i = 0; i < matrixWidth; i++) {\r\n\t\t\t\tfor (int j = 0; j < matrixWidth; j++) {\r\n\t\t\t\t\tif (byteMatrix.get(i, j)) {\r\n\t\t\t\t\t\tgraphics.fillRect(i, j, 1, 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbytesOut= new ByteArrayOutputStream();\r\n\t\t\tImageIO.write(image, fileType, bytesOut);\r\n\t\t\t\r\n\t\t\tbyte[] pngImageData = bytesOut.toByteArray();\r\n\t\t\t\r\n\t\t\tfos = new FileOutputStream(new File(path));\r\n\t\t\tfos.write(pngImageData);\r\n\t\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} catch (WriterException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\t\r\n\t\t\tif (bytesOut != null) {\r\n\t\t\t\ttry {\t\t\t\t\t\r\n\t\t\t\t\tbytesOut.flush();\r\n\t\t\t\t\tbytesOut.close();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (fos != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos.flush();\r\n\t\t\t\t\tfos.close();\t\t\t\t\t\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//System.out.println(\"================================ \"+path +\" \"+ new File(path).exists());\r\n\t\t\t//logger.error(\"================================ \"+path +\" \"+ new File(path).exists());\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn path;\r\n\t}", "public ImageIcon createQrCode(OutputStream outputStream, String content, int qrCodeSize, String imageFormat)\n {\n BufferedImage image = null;\n\t\ttry\n {\n // Create the ByteMatrix for the QR-Code that encodes the given String.\n \n Hashtable<EncodeHintType, ErrorCorrectionLevel> hintMap = new Hashtable<EncodeHintType, ErrorCorrectionLevel>();\n hintMap.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.Q);\n \n QRCodeWriter qrCodeWriter = new QRCodeWriter();\n BitMatrix biteMatrix = qrCodeWriter.encode(content, BarcodeFormat.QR_CODE, qrCodeSize, qrCodeSize, hintMap);\n \n // Make the BufferedImage that are to hold the QRCode\n \n int matrixWidth = biteMatrix.getWidth();\n \n image = new BufferedImage(matrixWidth, matrixWidth, BufferedImage.TYPE_INT_RGB);\n image.createGraphics();\n \n Graphics2D graphics = (Graphics2D) image.getGraphics();\n graphics.setColor(Color.WHITE);\n graphics.fillRect(0, 0, matrixWidth, matrixWidth);\n \n // Paint and save the image using the ByteMatrix\n \n graphics.setColor(Color.BLACK);\n \n for (int i = 0; i < matrixWidth; i++)\n {\n for (int j = 0; j < matrixWidth; j++)\n {\n if (biteMatrix.get(i, j) == true)\n {\n graphics.fillRect(i, j, 1, 1);\n }\n }\n }\n \n //ImageIO.write(image, imageFormat, outputStream);\n }\n catch (Exception ex)\n {\n \n }\n \n return new ImageIcon(image);\n }", "private static void createQRImage(File qrFile, String qrCodeText, int size,String fileType) throws WriterException, IOException, BadElementException {\n\t\tHashtable hintMap = new Hashtable();\r\n\t\thintMap.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.L);\r\n\t\tQRCodeWriter qrCodeWriter = new QRCodeWriter();\r\n\t\tByteMatrix byteMatrix = qrCodeWriter.encode(qrCodeText,\r\n\t\t\t\tBarcodeFormat.QR_CODE, size, size, hintMap);\r\n\t\t// Make the BufferedImage that are to hold the QRCode\r\n\t\tint matrixWidth = byteMatrix.getWidth();\r\n\t\tBufferedImage image = new BufferedImage(matrixWidth, matrixWidth,\r\n\t\t\t\tBufferedImage.TYPE_INT_RGB);\r\n\t\timage.createGraphics();\r\n\r\n\t\tGraphics2D graphics = (Graphics2D) image.getGraphics();\r\n\t\tgraphics.setColor(Color.WHITE);\r\n\t\tgraphics.fillRect(0, 0, matrixWidth, matrixWidth);\r\n\t\t// Paint and save the image using the ByteMatrix\r\n\t\tgraphics.setColor(Color.BLACK);\r\n\r\n\t\tfor (int i = 0; i < matrixWidth; i++) {\r\n\t\t\tfor (int j = 0; j < matrixWidth; j++) {\r\n\t\t\t\tif (byteMatrix.equals(byteMatrix.get(i, j))) {\r\n\t\t\t\t\tgraphics.fillRect(i, j, 1, 1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tImageIO.write(image, fileType, qrFile);\r\n \r\n\r\n\r\n\t}", "protected String getQRData() {\n String data = \"\";\n\n // positions de départ hardcodées (i,j), sens de parcours nombres de lignes (0:down, 1:up),\n // nombres de lignes à lire (nb_lines), spécial 1 colonnes (0:2 col, 1:1 col)\n int[][] start_bits_list = new int[][] {{28,28,1,20,0}, {9,26,0,20,0}, {28,24,1,4,0}, {19,24,1,11,0}, {9,22,0,11,0}, {25,22,0,4,0},\n {28,20,1,4,0}, {24,19,1,5,1}, {19,20,1,13,0}, {5,20,1,6,0}, {0,18,0,6,0}, {7,18,0,22,0},\n {28,16,1,22,0}, {5,16,1,6,0}, {0,14,0,6,0}, {7,14,0,22,0}, {28,12,1,22,0}, {5,12,1,6,0},\n {0,10,0,6,0}, {7,10,0,22,0}, {20,8,1,12,0}, {9,5,0,12,0}, {20,3,1,12,0}, {9,1,0,8,0},\n {17,1,0,1,1}};\n int[] start_bit;\n\n /* --- Traitement --- */\n for (int l = 0; l < start_bits_list.length; l++) {\n start_bit = start_bits_list[l];\n\n if (start_bit[2] == 1) { // sens de parcours : UP\n data += this.getDataUp(start_bit[0], start_bit[1], start_bit[3], start_bit[4]);\n }\n else { // sens de parcours : DOWN\n data += this.getDataDown(start_bit[0], start_bit[1], start_bit[3], start_bit[4]);\n }\n }\n\n return data;\n }", "private static void createQRImage(String qrFile, String qrCodeText, int size,\n\t\t\tHashtable hintMap) throws WriterException, IOException {\n\t\tQRCodeWriter qrCodeWriter = new QRCodeWriter();\n\t\tBitMatrix byteMatrix = qrCodeWriter.encode(qrCodeText,\n\t\t\t\tBarcodeFormat.QR_CODE, size, size, hintMap);\n\t\tMatrixToImageWriter.writeToFile(byteMatrix, qrFile.substring(qrFile\n\t\t\t\t.lastIndexOf('.') + 1), new File(qrFile));\n\t\t// Make the BufferedImage that are to hold the QRCode\n\t}", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n IntentResult result = IntentIntegrator.parseActivityResult(requestCode, resultCode, data);\n if (result != null) {\n //if qrcode has nothing in it\n if (result.getContents() == null) {\n Toast.makeText(this, \"Result Not Found\", Toast.LENGTH_LONG).show();\n } else {\n //if qr contains data\n try {\n //converting the data to json\n JSONObject obj = new JSONObject(result.getContents());\n //setting values to textviews\n textViewName.setText(obj.getString(\"name\"));\n textViewAddress.setText(obj.getString(\"address\"));\n } catch (JSONException e) {\n e.printStackTrace();\n //if control comes here\n //that means the encoded format not matches\n //in this case you can display whatever data is available on the qrcode\n //to a toast\n Toast.makeText(this, result.getContents(), Toast.LENGTH_LONG).show();\n }\n }\n } else {\n super.onActivityResult(requestCode, resultCode, data);\n }\n }", "public static Bitmap createQrCode(@NotNull final String content,\n final int qrCodeSize,\n @NotNull final String ssidText,\n @NotNull final Typeface typeface) {\n try {\n if (qrCodeSize <= 0) {\n return Bitmap.createBitmap(1, 1, Bitmap.Config.ARGB_8888);\n }\n\n final int textHeight = qrCodeSize / 8;\n final int actualQrSize = qrCodeSize - textHeight;\n\n final Bitmap qrBmp = new QRCodeWriter().encode(\n content, BarcodeFormat.QR_CODE, actualQrSize, actualQrSize, ErrorCorrectionLevel.H);\n final Bitmap combinedBmp = Bitmap.createBitmap(qrCodeSize, qrCodeSize, Bitmap.Config.ARGB_8888);\n\n final Canvas canvas = new Canvas(combinedBmp);\n final Paint paint = new Paint();\n canvas.drawColor(Color.TRANSPARENT);\n\n canvas.drawBitmap(qrBmp, textHeight / 2f, 0, paint);\n\n paint.setColor(Color.BLACK);\n paint.setStyle(Paint.Style.FILL);\n\n paint.setTypeface(typeface);\n float fontSize = 10;\n final Rect bounds = new Rect();\n final int margin = textHeight / 8;\n\n while (true) {\n paint.setTextSize(fontSize);\n\n paint.getTextBounds(ssidText, 0, ssidText.length(), bounds);\n\n if (bounds.height() + (margin * 2) > textHeight || bounds.width() + (margin * 2) > qrCodeSize) {\n break;\n }\n\n fontSize += 0.1;\n }\n\n paint.setAntiAlias(true);\n paint.setSubpixelText(true);\n paint.setTextAlign(Paint.Align.CENTER);\n canvas.drawText(ssidText, qrCodeSize / 2f, actualQrSize + textHeight / 2 + margin, paint);\n\n return combinedBmp;\n } catch (WriterException e) {\n Timber.d(\"createQrCode error %s\", e);\n return null;\n }\n }", "public void writeQRCode(String message, String filename) throws NonValidQRCodeMessageException{\r\n if(!validMessage(message)){\r\n throw new NonValidQRCodeMessageException();\r\n }\r\n QRCodeWriter writer = new QRCodeWriter();\r\n BufferedImage image = new BufferedImage(this.width, this.height, BufferedImage.TYPE_INT_RGB); // create an empty image\r\n try {\r\n BitMatrix bitMatrix = writer.encode(message, BarcodeFormat.QR_CODE, this.width, this.height);\r\n for (int i = 0; i < this.width; i++) {\r\n for (int j = 0; j < this.height; j++) {\r\n image.setRGB(i, j, bitMatrix.get(i, j) ? this.black : this.white); // set pixel one by one\r\n }\r\n }\r\n try {\r\n ImageIO.write(image, \"jpg\", new File(\"qr.jpg\")); // save QR image to disk\r\n } catch (IOException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n }\r\n } catch (WriterException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n }\r\n }", "public static BufferedImage createQRCode(String data, String charset, Map<EncodeHintType, ?> hint, int width,\n int height) {\n BitMatrix matrix;\n try {\n matrix = new MultiFormatWriter().encode(new String(data.getBytes(charset), charset), BarcodeFormat.QR_CODE,\n width, height, hint);\n return toBufferedImage(matrix);\n } catch (WriterException e) {\n throw new RuntimeException(e.getMessage(), e);\n } catch (Exception e) {\n throw new RuntimeException(e.getMessage(), e);\n }\n }", "public static Bitmap createQrCode(String str, int width, int height) throws WriterException {\n BitMatrix result;\n try {\n\n //add hint to have 0 padding/margin in bitmap\n Map<EncodeHintType, Object> hints = new EnumMap<>(EncodeHintType.class);\n hints.put(EncodeHintType.MARGIN, 0);\n result = new QRCodeWriter().encode(str,\n BarcodeFormat.QR_CODE, width, height, hints);\n } catch (IllegalArgumentException iae) {\n return null;\n }\n int w = result.getWidth();\n int h = result.getHeight();\n int[] pixels = new int[w * h];\n for (int y = 0; y < h; y++) {\n int offset = y * w;\n for (int x = 0; x < w; x++) {\n pixels[offset + x] = result.get(x, y) ? BLACK : WHITE;\n }\n }\n Bitmap bitmap = Bitmap.createBitmap(w, h, Bitmap.Config.ARGB_8888);\n bitmap.setPixels(pixels, 0, width, 0, 0, w, h);\n return bitmap;\n }", "public static void main( String[] args ) {\n\t\tQrCode qr = new QrCodeEncoder().\n\t\t\t\tsetError(QrCode.ErrorLevel.M).\n\t\t\t\taddAutomatic(\"This is a Test ん鞠\").fixate();\n\t\t// NOTE: The final function you call must be fixate(), that's how it knows it's done\n\n\t\t// QrCodeGenerator is the base class with all the logic and the children tell it how to\n\t\t// write in a specific format. QrCodeGeneratorImage is included with BoofCV and is used\n\t\t// to create images\n\t\tvar render = new QrCodeGeneratorImage(/* pixel per module */ 20);\n\n\t\trender.render(qr);\n\n\t\t// Convert it to a BufferedImage for display purposes\n\t\tBufferedImage image = ConvertBufferedImage.convertTo(render.getGray(), null);\n\n\t\t// You can also save it to disk by uncommenting the line below\n//\t\tUtilImageIO.saveImage(image, \"qrcode.png\");\n\n\t\t// Display the image\n\t\tShowImages.showWindow(image, \"Rendered QR Code\", true);\n\t}", "@Override\r\n\tprotected Resultful getQRCodeURL() {\n\t\tString result = HttpRequest.post(domainName).body(getParamStr()).execute().body();\r\n\t\tlogger.info(\"【银联下单请求参数:{}】\",getParamStr());\r\n\t\tlogger.info(\"【银联商务下单响应:{}】:\",result);\r\n\t\tif (!StringUtils.isEmpty(result)){\r\n\t\t\tJSONObject ob = JSONObject.parseObject(result);\r\n\t\t\tif (\"SUCCESS\".equals(ob.getString(\"errCode\")))\r\n\t\t\t\treturn Resultful.qrCodeURL(ob.getString(\"billQRCode\"), billNo,String.format(\"%.2f\", Double.valueOf(totalAmount)));\t\r\n\t\t\telse\r\n\t\t\t\treturn Resultful.error(ob.getString(\"errMsg\"));\r\n\t\t}\r\n\t\treturn Resultful.error(\"下单失败\");\r\n\t}", "public static BufferedImage createQRCode(String data) {\n return createQRCode(data, QRCODE_DEFAULT_WIDTH, QRCODE_DEFAULT_HEIGHT);\n }", "@Override\n protected Bitmap doInBackground(Void... params) {\n QRCodeEncoder.HINTS.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.L);\n return QRCodeEncoder.syncEncodeQRCode(qrCodeStr, BGAQRCodeUtil.dp2px(context, 260), Color.parseColor(\"#000000\")/*, logoBitmap*/);\n }", "public static void encode() {\n char[] seq = new char[R];\n\n for (int i = 0; i < R; i++)\n seq[i] = (char) i;\n\n while (!BinaryStdIn.isEmpty()) {\n char c = BinaryStdIn.readChar();\n char t = seq[0];\n int i;\n for (i = 0; i < R - 1; i++) {\n char tmp;\n if (t == c) break;\n tmp = t;\n t = seq[i + 1];\n seq[i + 1] = tmp;\n }\n seq[0] = t;\n BinaryStdOut.write((char) i);\n }\n BinaryStdOut.close();\n }", "public static void generateQR(String order, int width, int height, String filepath) throws WriterException,\n IOException {\n\n QRCodeWriter qrCodeWriter = new QRCodeWriter();\n\n //Represents a 2D matrix of bits. X is the column position and y is the row position.\n BitMatrix bitMatrix = qrCodeWriter.encode(order, BarcodeFormat.QR_CODE, width, height);\n\n //Factory method for file systems. getDefault() returns the default FileSystem.\n Path path = FileSystems.getDefault().getPath(filepath);\n\n //Writes a BitMatrix to BufferedImage, file or stream. BufferedImage is used to handle and manipulate the\n // image data.\n MatrixToImageWriter.writeToPath(bitMatrix, \"PNG\", path);\n }", "public void onClick(View vw) {\n try {\n Bitmap bitmap = QRCodeHelper.encodeAsBitmap(mETWaybillId.getText().toString(), BarcodeFormat.QR_CODE, 300, 300);\n if (bitmap != null) {\n mIVQRCode.setImageBitmap(bitmap);\n } else {\n mTVDescription.setText(\"Bitmap null\");\n }\n } catch (Exception e) {\n Log.e(\"MainActivity\", \"Exe \", e);\n }\n }", "void barcodeCaptured(String barcodeString);", "public String generate(String input) {\n\t\treturn generate(input, new QRCodeOptions());\n\t}", "public Bitmap createQRCode(String id, int width, int height) {\n MultiFormatWriter multiFormatWriter = new MultiFormatWriter();\n try {\n BitMatrix bitMatrix = multiFormatWriter.encode(id, BarcodeFormat.QR_CODE, width, height);\n return Bitmap.createBitmap(IntStream.range(0, height)\n .flatMap(h -> IntStream.range(0, width).map(w -> bitMatrix.get(w, h) ? Color.BLACK : Color.WHITE))\n .collect(() -> IntBuffer.allocate(width * height), IntBuffer::put, IntBuffer::put)\n .array(),\n width, height, Bitmap.Config.ARGB_8888);\n } catch (WriterException e) {\n e.printStackTrace();\n return null;\n }\n }", "public Vista_GeneradorQR(String texto) {\n \tthis.texto=texto;\n initComponents();\n this.setLocationRelativeTo(null);\n this.setVisible(true);\n }", "private void printEncodedMessage() {\n System.out.print(\"\\nPrinting the encoded message\");\n System.out.print(\"\\n\" + encodedMessage + \"\\n\");\n System.out.println();\n }", "public static void createQRCode(String qrCodeData, String filePath, String charset, Map<EncodeHintType,ErrorCorrectionLevel> hintMap, int qrCodeheight,\n\t\t\tint qrCodewidth) throws WriterException, IOException {\n\t\tBitMatrix matrix = new MultiFormatWriter().encode(new String(qrCodeData.getBytes(charset), charset),\n\t\t\t\tBarcodeFormat.QR_CODE, qrCodewidth, qrCodeheight, hintMap);\n\t\tMatrixToImageWriter.writeToFile(matrix, filePath.substring(filePath.lastIndexOf('.') + 1), new File(filePath));\n\t}", "private void createAlert() {\n ImageView image = new ImageView(this);\n image.setImageResource(zunder.ebs.zunderapp.R.drawable.qr);\n\n myWallet = new MyWallet();\n setPrivateKey(myWallet.searchWallet());\n\n createQR = new CreateQR(700, 700);\n try {\n KeyPair pair = KeyPair.fromSecretSeed(getPrivateKey());\n setPublicKey(pair.getAccountId());\n try {\n Bitmap bitmap = createQR.encodeAsBitmap(getPublicKey());\n image.setImageBitmap(bitmap);\n } catch (WriterException e) {\n e.printStackTrace();\n }\n }catch (Exception e){\n e.getMessage();\n }\n\n\n\n AlertDialog.Builder builder =\n new AlertDialog.Builder(this).\n setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n }).\n setView(image);\n builder.create().show();\n }", "public void setQrcodeDecodeRect(int x, int y, int w, int h);", "Bitmap TextToImageEncode(String Value) throws WriterException {\n\n Log.d(\"HashValue: \", Value);\n BitMatrix bitMatrix;\n try {\n bitMatrix = new MultiFormatWriter().encode(\n Value,\n BarcodeFormat.QR_CODE,\n QRcodeWidth, QRcodeWidth, null\n );\n\n } catch (IllegalArgumentException Illegalargumentexception) {\n\n return null;\n }\n int bitMatrixWidth = bitMatrix.getWidth();\n\n int bitMatrixHeight = bitMatrix.getHeight();\n\n int[] pixels = new int[bitMatrixWidth * bitMatrixHeight];\n\n for (int y = 0; y < bitMatrixHeight; y++) {\n int offset = y * bitMatrixWidth;\n\n for (int x = 0; x < bitMatrixWidth; x++) {\n\n pixels[offset + x] = bitMatrix.get(x, y) ?\n getResources().getColor(R.color.black) : getResources().getColor(R.color.white);\n }\n }\n Bitmap bitmap = Bitmap.createBitmap(bitMatrixWidth, bitMatrixHeight, Bitmap.Config.ARGB_4444);\n\n bitmap.setPixels(pixels, 0, 500, 0, 0, bitMatrixWidth, bitMatrixHeight);\n return bitmap;\n }", "@Override\r\n public void run() {\n do {\r\n try {\r\n Thread.sleep(100);\r\n } catch (InterruptedException e) {\r\n e.printStackTrace();\r\n }\r\n Result result = null;\r\n BufferedImage image = null;\r\n if (webcam.isOpen()) {\r\n if ((image = webcam.getImage()) == null) {\r\n continue;\r\n }\r\n \t//iconlabel\r\n\t ImageIcon icon=new ImageIcon(image);\r\n\t icon.setImage(icon.getImage().getScaledInstance(300,300,Image.SCALE_DEFAULT));\r\n\t iconLabel.setIcon(icon); \r\n\t \r\n \t//qrcode\r\n LuminanceSource source =new BufferedImageLuminanceSource( image) ;\r\n BinaryBitmap bitmap = new BinaryBitmap(new HybridBinarizer(source));\r\n\r\n try {\r\n result = new MultiFormatReader().decode(bitmap);\r\n } catch (NotFoundException e) {\r\n // fall thru, it means there is no QR code in image\r\n }\r\n }\r\n if (result != null) {\r\n textarea.setText(result.getText());\r\n System.out.println(result.getText());\r\n }\r\n\r\n } while (true);\r\n }", "public static void encode() {\r\n int[] index = new int[R + 1];\r\n char[] charAtIndex = new char[R + 1];\r\n for (int i = 0; i < R + 1; i++) { \r\n index[i] = i; \r\n charAtIndex[i] = (char) i;\r\n }\r\n while (!BinaryStdIn.isEmpty()) {\r\n char c = BinaryStdIn.readChar();\r\n BinaryStdOut.write((char)index[c]);\r\n for (int i = index[c] - 1; i >= 0; i--) {\r\n char temp = charAtIndex[i];\r\n int tempIndex = ++index[temp];\r\n charAtIndex[tempIndex] = temp;\r\n }\r\n charAtIndex[0] = c;\r\n index[c] = 0;\r\n }\r\n BinaryStdOut.close();\r\n }", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException, Exception {\n response.setContentType(\"text/html;charset=UTF-8\");\n PrintWriter out=response.getWriter();\n Connection con = DBConnection1.getDBConnection();\n Statement stmt;\n stmt = con.createStatement();\n Code128 barcode = new Code128();\n String acc[]=request.getParameterValues(\"accession_no[]\");\n String title[]=request.getParameterValues(\"title[]\");\n System.out.println(acc.length+\" \"+acc[0]);\n String x=\"\";\n for(int i=0;i<acc.length;i++)\n {\n x+=\"('\"+acc[i]+\"','D://barcode//\"+acc[i]+\".gif','\"+title[i]+\"'),\";\n System.out.println(x);\n }\n \n x=x.substring(0,x.length()-1);\n String query=\"insert into lib_barcode(access_no,path,title) values \"+x;\n PreparedStatement pst=con.prepareStatement(query);\n int result = pst.executeUpdate();\n for(int i=0;i<acc.length;i++)\n {\n out.print(acc[i]);\n barcode.setData(acc[i]);\n barcode.setX(2);\n barcode.setShowText(false);\n barcode.drawBarcode(\"D://barcode//\"+acc[i]+\".gif\");\n }\n }", "public void full_simple(int version, QrCode.ErrorLevel error , QrCodeMaskPattern mask ) {\n\t\tQrCode expected = new QrCodeEncoder().setVersion(version).\n\t\t\t\tsetError(error).\n\t\t\t\tsetMask(mask).\n\t\t\t\taddNumeric(\"01234567\").fixate();\n\n\t\tQrCodeGeneratorImage generator = new QrCodeGeneratorImage(4);\n\t\tint border = generator.borderModule*4;\n//\t\tgenerator.renderData = false;\n\t\tgenerator.render(expected);\n\n\t\tFastQueue<PositionPatternNode> pps = createPositionPatterns(generator);\n\n\t\tQrCodeDecoderImage<GrayU8> decoder = new QrCodeDecoderImage<>(null,GrayU8.class);\n\n//\t\tShowImages.showWindow(generator.getGray(),\"QR Code\");\n//\t\tBoofMiscOps.sleep(100000);\n\n\t\tdecoder.process(pps,generator.getGray());\n\n\t\tassertEquals(1,decoder.successes.size());\n\t\tQrCode found = decoder.getFound().get(0);\n\n\t\t// Check format info\n\t\tassertEquals(expected.error,found.error);\n\t\tassertTrue(expected.mask==found.mask);\n\n\t\t// check version info\n\t\tassertEquals(version,found.version);\n\n\t\tint numModules = QrCode.totalModules(version);\n\n\t\t// sanity check the position patterns\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\tassertEquals(7*4,found.ppCorner.getSideLength(i),0.01);\n\t\t\tassertEquals(7*4,found.ppRight.getSideLength(i),0.01);\n\t\t\tassertEquals(7*4,found.ppDown.getSideLength(i),0.01);\n\t\t}\n\t\tassertTrue(found.ppCorner.get(0).distance(border,border) < 1e-4);\n\t\tassertTrue(found.ppRight.get(0).distance(border+(numModules-7)*4,border) < 1e-4);\n\t\tassertTrue(found.ppDown.get(0).distance(border,border+(numModules-7)*4) < 1e-4);\n\n\t\t// Check alignment patterns\n\t\tint alignment[] = QrCode.VERSION_INFO[version].alignment;\n\t\tif( alignment.length == 0 ) {\n\t\t\tassertEquals(0,found.alignment.size);\n\t\t} else {\n\t\t\tassertEquals(found.alignment.size, alignment.length * alignment.length - 3);\n\t\t\t// TODO Check alignment pattern locations\n\t\t}\n\n\t}", "public Map<String, Object> qrCodeGeneration(String address)\n\t\t\tthrows URISyntaxException, WriterException, IOException {\n\n\n\t\tUUID key = UUID.randomUUID();\n\t\tString uuid = key.toString();\n\t\tString file_path = filePath+\"/\"+uuid+\".png\";\n\t\tString file_name = uuid+\".png\";\n\t\tAddressInfo addressInfo = addressInfoDao.findByAddress(address);\n\t\t\n\t\tif(addressInfo == null) {\n\t\tString charset = \"UTF-8\"; // or \"ISO-8859-1\"\n\t\tMap<EncodeHintType, ErrorCorrectionLevel> hintMap = new HashMap<EncodeHintType, ErrorCorrectionLevel>();\n\t\thintMap.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.L);\n\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\t\n\t\tcreateQRCode(address, file_path, charset, hintMap, 200, 200);\n\t\t//AddressInfo address_info=new AddressInfo();\n\t\t//address_info.setQrCodeFilename(file_name);\n\t\t//address_info.setAddress(address);\n\t\t//address_info.setLebel(\"Label this address\");\n\t\t//address_info.setWalletUuid(walletUuid);\n\t\t//addressInfoDao.save(address_info);\n\t\tmap.put(\"file_name\", file_name);\n\t\tmap.put(\"address\", address);\n\t\treturn map;\n\t\t} else {\n\t\t\t existingQrFileName = addressInfo.getQrCodeFilename();\n\t\t}\n\t\tMap<String, Object> existingQrMap = new HashMap<String, Object>();\n\t\texistingQrMap.put(\"address\", address);\n\t\texistingQrMap.put(\"file_name\", existingQrFileName);\n\t\treturn existingQrMap;\n\t}", "private void iniciarQrDetector() {\n\n System.out.println(\"Iniciar Qr\");\n\n final Display display = getWindowManager().getDefaultDisplay();\n Point size = new Point();\n display.getSize(size);\n int width = size.x;\n int height = size.y;\n\n barcodeDetector = new BarcodeDetector.Builder(LectorActivity.this)\n .setBarcodeFormats(Barcode.QR_CODE)\n .build();\n\n barcodeDetector.setProcessor(new Detector.Processor<Barcode>() {\n @Override\n public void release() {\n }\n\n @Override\n public void receiveDetections(Detector.Detections<Barcode> detections) {\n\n if (seguir) {\n final SparseArray<Barcode> qrcodes = detections.getDetectedItems();\n\n try {\n value = qrcodes.valueAt(0).rawValue;\n\n\n } catch (ArrayIndexOutOfBoundsException e) {\n System.out.println(\"No se ha encontrado ningún código.\");\n }\n\n if (!value.equals(\"0\")) {\n seguir = false;\n System.out.println(\"Leido, \"+value);\n comprueba_maquina(value);\n }\n }\n }\n });\n cameraSource = new CameraSource\n .Builder(LectorActivity.this, barcodeDetector)\n .setRequestedPreviewSize(height, width)\n .setAutoFocusEnabled(true)\n .build();\n\n cameraPreview.getHolder().addCallback(new SurfaceHolder.Callback() {\n @Override\n public void surfaceCreated(SurfaceHolder surfaceHolder) {\n if (ActivityCompat.checkSelfPermission(LectorActivity.this, android.Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED) {\n //Request permission\n ActivityCompat.requestPermissions(LectorActivity.this,\n new String[]{Manifest.permission.CAMERA}, RequestCameraPermissionID);\n System.out.println(\"PERMISOS\");\n return;\n }\n try {\n System.out.println(\"INICIAR CAMARA\");\n cameraSource.start(cameraPreview.getHolder());\n } catch (IOException e) {\n System.out.println(\"FALLO AL INICIAR CAMARA\");\n e.printStackTrace();\n }\n }\n\n @Override\n public void surfaceChanged(SurfaceHolder surfaceHolder, int i, int i1, int i2) {\n\n }\n\n @Override\n public void surfaceDestroyed(SurfaceHolder surfaceHolder) {\n cameraSource.stop();\n }\n });\n }", "public void scanQR(View v) {\n try {\n //start the scanning activity from the com.google.zxing.client.android.SCAN intent\n Intent intent = new Intent(ACTION_SCAN);\n intent.putExtra(\"SCAN_MODE\", \"QR_CODE_MODE\");\n startActivityForResult(intent, 0);\n } catch (ActivityNotFoundException anfe) {\n //on catch, show the download dialog\n showDialog(this, \"No Scanner Found\", \"Download a scanner code activity?\", \"Yes\", \"No\").show();\n }\n }", "public static void encode() {\n char[] symbols = initializeSymbols();\n int position;\n while (!BinaryStdIn.isEmpty()) {\n char symbol = BinaryStdIn.readChar();\n position = 0;\n while (symbols[position] != symbol) {\n position++;\n }\n BinaryStdOut.write(position, BITS_PER_BYTE);\n System.arraycopy(symbols, 0, symbols, 1, position);\n symbols[0] = symbol;\n }\n BinaryStdOut.close();\n }", "@RequiresPermission(allOf = {Manifest.permission.CAMERA, Manifest.permission.BLUETOOTH_ADMIN, Manifest.permission.BLUETOOTH, Manifest.permission.ACCESS_FINE_LOCATION})\n public void scanQRCode(final Activity activityContext, final CameraSourcePreview cameraSourcePreview, final QRCodeScanListener qrCodeScanListener) {\n\n isScanned = false;\n BarcodeDetector barcodeDetector = new BarcodeDetector.Builder(activityContext)\n .setBarcodeFormats(Barcode.QR_CODE)\n .build();\n\n CameraSource cameraSource = new CameraSource.Builder(activityContext, barcodeDetector)\n .setFacing(CameraSource.CAMERA_FACING_BACK)\n .setRequestedPreviewSize(1600, 1024)\n .setAutoFocusEnabled(true)\n .build();\n\n if (cameraSource != null) {\n try {\n cameraSourcePreview.start(cameraSource);\n } catch (IOException e) {\n Log.e(TAG, \"Unable to start camera source.\", e);\n cameraSource.release();\n cameraSource = null;\n }\n }\n\n barcodeDetector.setProcessor(new Detector.Processor<Barcode>() {\n\n @Override\n public void release() {\n }\n\n @Override\n @RequiresPermission(allOf = {Manifest.permission.BLUETOOTH_ADMIN, Manifest.permission.BLUETOOTH, Manifest.permission.ACCESS_FINE_LOCATION})\n public void receiveDetections(Detector.Detections<Barcode> detections) {\n\n final SparseArray<Barcode> barcodes = detections.getDetectedItems();\n\n if (barcodes.size() != 0 && !isScanned) {\n\n Log.d(TAG, \"Barcodes size : \" + barcodes.size());\n Barcode barcode = barcodes.valueAt(0);\n Log.d(TAG, \"QR Code Data : \" + barcode.rawValue);\n String scannedData = barcode.rawValue;\n\n try {\n JSONObject jsonObject = new JSONObject(scannedData);\n\n String deviceName = jsonObject.optString(\"name\");\n String pop = jsonObject.optString(\"pop\");\n String transport = jsonObject.optString(\"transport\");\n int security = jsonObject.optInt(\"security\", ESPConstants.SecurityType.SECURITY_2.ordinal());\n String userName = jsonObject.optString(\"username\");\n String password = jsonObject.optString(\"password\");\n isScanned = true;\n\n if (qrCodeScanListener != null) {\n qrCodeScanListener.qrCodeScanned();\n }\n\n Handler handler = new Handler(Looper.getMainLooper());\n handler.post(new Runnable() {\n\n @Override\n public void run() {\n cameraSourcePreview.release();\n }\n });\n\n ESPConstants.TransportType transportType = null;\n ESPConstants.SecurityType securityType = null;\n\n if (!TextUtils.isEmpty(transport)) {\n\n if (transport.equalsIgnoreCase(\"softap\")) {\n\n transportType = ESPConstants.TransportType.TRANSPORT_SOFTAP;\n\n } else if (transport.equalsIgnoreCase(\"ble\")) {\n\n transportType = ESPConstants.TransportType.TRANSPORT_BLE;\n\n } else {\n qrCodeScanListener.onFailure(new RuntimeException(\"Transport type not supported\"));\n }\n\n } else {\n qrCodeScanListener.onFailure(new RuntimeException(\"Transport is not available\"));\n }\n\n securityType = setSecurityType(security);\n\n espDevice = new ESPDevice(context, transportType, securityType);\n espDevice.setDeviceName(deviceName);\n espDevice.setProofOfPossession(pop);\n espDevice.setUserName(userName);\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q && transportType.equals(ESPConstants.TransportType.TRANSPORT_SOFTAP)) {\n\n WiFiAccessPoint wiFiDevice = new WiFiAccessPoint();\n wiFiDevice.setWifiName(deviceName);\n wiFiDevice.setPassword(password);\n espDevice.setWifiDevice(wiFiDevice);\n qrCodeScanListener.deviceDetected(espDevice);\n } else {\n isDeviceAvailable(espDevice, password, qrCodeScanListener);\n }\n\n } catch (JSONException e) {\n\n e.printStackTrace();\n qrCodeScanListener.onFailure(new RuntimeException(\"QR code not valid\"));\n }\n }\n }\n });\n }", "public abstract String visualize(byte input);", "public int getQRcodeNumber() {\n return QRcodeNumber;\n }", "public String generate(String input, QRCodeOptions opts) {\n\n\t\tQRCode qrcode = new QRCode(-1, this.errorLevel);\n\t\tqrcode.addData(input);\n\t\tqrcode.make();\n\n\t\tStringBuilder output = new StringBuilder();\n\t\tif (opts.isSmall()) {\n\t\t\tboolean black = true;\n\t\t\tboolean white = false;\n\t\t\tint moduleCount = qrcode.getModuleCount();\n\t\t\tBoolean[][] md = QRUtil.copyBooleanArray(qrcode.getModules());\n\t\t\tList<List<Boolean>> moduleData = new ArrayList<>();\n\t\t\tfor(int i = 0; i < md.length; i++) {\n\t\t\t\tList<Boolean> B = new ArrayList<>();\n\t\t\t\tBoolean[] b = md[i];\n\t\t\t\tfor(int j = 0; j < b.length; j++) {\n\t\t\t\t\tBoolean r = b[j];\n\t\t\t\t\tB.add(r);\n\t\t\t\t}\n\t\t\t\tmoduleData.add(B);\n\t\t\t}\n\n\t\t\tboolean oddRow = (moduleCount % 2) == 1;\n\t\t\tif (oddRow) {\n\t\t\t\tmoduleData.add(fill(moduleCount, white));\n\t\t\t}\n\n\t\t\tString borderTop = repeat(BLACK_WHITE, moduleCount + 2);\n\t\t\tString borderBottom = repeat(WHITE_BLACK, moduleCount + 2);\n\t\t\toutput.append(borderTop).append('\\n');\n\n\t\t\tfor (int row = 0; row < moduleCount; row += 2) {\n\t\t\t\toutput.append(WHITE_ALL);\n\n\t\t\t\tfor (int col = 0; col < moduleCount; col++) {\n\t\t\t\t\tif (moduleData.get(row).get(col) == white && moduleData.get(row + 1).get(col) == white) {\n\t\t\t\t\t\toutput.append(WHITE_ALL);\n\t\t\t\t\t} else if (moduleData.get(row).get(col) == white && moduleData.get(row + 1).get(col) == black) {\n\t\t\t\t\t\toutput.append(WHITE_BLACK);\n\t\t\t\t\t} else if (moduleData.get(row).get(col) == black && moduleData.get(row + 1).get(col) == white) {\n\t\t\t\t\t\toutput.append(BLACK_WHITE);\n\t\t\t\t\t} else {\n\t\t\t\t\t\toutput.append(BLACK_ALL);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\toutput.append(WHITE_ALL).append('\\n');\n\t\t\t}\n\n\t\t\tif (!oddRow) {\n\t\t\t\toutput.append(borderBottom);\n\t\t\t}\n\t\t} else {\n\t\t\tString border = repeat(WHITE, qrcode.getModuleCount() + 2);\n\n\t\t\toutput.append(border).append('\\n');\n\t\t\tBoolean[][] modules = qrcode.getModules();\n\t\t\tfor(int i = 0; i < modules.length; i++) {\n\t\t\t\toutput.append(WHITE);\n\t\t\t\tBoolean[] b = modules[i];\n\t\t\t\tfor(int j = 0; j < b.length; j++) {\n\t\t\t\t\tBoolean bb = b[j];\n\t\t\t\t\toutput.append(toCell(bb));\n\t\t\t\t}\n\t\t\t\toutput.append(WHITE).append('\\n');\n\t\t\t}\n\t\t\toutput.append(border);\n\t\t}\n\n\t\treturn output.toString();\n\t}", "private void registerBarcode(View view) {\n if (getResult() != null) {\n Intent codeScannerIntent = new Intent(this, CodeScannerActivity.class);\n startActivityForResult(codeScannerIntent, CodeScannerActivity.SCAN_CODE_REQUEST);\n } else {\n Toast.makeText(this, \"Trial result is invalid, cannot register bar code\", Toast.LENGTH_SHORT).show();\n }\n }", "public String getlbr_Barcode2();", "public String generateBarCode(String barCodeStr, String receiptName) {\n\t\tString path = getFileServerPath(barCodeStr+\".jpg\");\r\n\t\t\r\n\t\tif(new File(path).exists()) return path;\r\n\t\t\r\n\t\tFileOutputStream fos = null;\r\n\t\tByteArrayOutputStream bytesOut = null;\r\n\t\t\r\n\t\ttry {\r\n\t\t\tBarcode128 code128 = new Barcode128();\r\n\t\t\tcode128.setCodeType(Barcode128.CODE128);\r\n\t\t\tcode128.setCode(barCodeStr);\r\n\t\t\tjava.awt.Image img = code128.createAwtImage(Color.BLACK, Color.WHITE);\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\tBufferedImage outImage = new BufferedImage(img.getWidth(null),\r\n\t\t\t\timg.getHeight(null), BufferedImage.TYPE_INT_RGB);\r\n\t\t\toutImage.getGraphics().drawImage(img, 0, 0, null);\r\n\t\t\tbytesOut = new ByteArrayOutputStream();\r\n\t\t\r\n\t\t\tImageIO.write(outImage, \"jpg\", bytesOut);\r\n\t\t\t\r\n\t\t\tbyte[] pngImageData = bytesOut.toByteArray();\r\n\t\t\t\r\n\t\t\tfos = new FileOutputStream(new File(path));\r\n\t\t\tfos.write(pngImageData);\r\n\t\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} finally {\r\n\t\t\t\r\n\t\t\tif (bytesOut != null) {\r\n\t\t\t\ttry {\t\t\t\t\t\r\n\t\t\t\t\tbytesOut.flush();\r\n\t\t\t\t\tbytesOut.close();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (fos != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos.flush();\r\n\t\t\t\t\tfos.close();\t\t\t\t\t\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//System.out.println(\"================================ \"+path +\" \"+ new File(path).exists());\r\n\t\t\t//logger.error(\"================================ \"+path +\" \"+ new File(path).exists());\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn path;\r\n\t}", "public void printBarcode(String code, int type, int h, int w, int font,\n int pos) throws IOException {\n\n // need to test for errors in length of code\n // also control for input type=0-6\n // GS H = HRI position\n writer.write(0x1D);\n writer.write(\"H\");\n writer.write(pos); // 0=no print, 1=above, 2=below, 3=above & below\n\n // GS f = set barcode characters\n writer.write(0x1D);\n writer.write(\"f\");\n writer.write(font);\n\n // GS h = sets barcode height\n writer.write(0x1D);\n writer.write(\"h\");\n writer.write(h);\n\n // GS w = sets barcode width\n writer.write(0x1D);\n writer.write(\"w\");\n writer.write(w);// module = 1-6\n\n // GS k\n writer.write(0x1D); // GS\n writer.write(\"k\"); // k\n writer.write(type);// m = barcode type 0-6\n writer.write(code.length()); // length of encoded string\n writer.write(code);// d1-dk\n writer.write(0);// print barcode\n\n writer.flush();\n }", "public static void encode()\n {\n \n String s = BinaryStdIn.readString();\n //String s = \"ABRACADABRA!\";\n int len = s.length();\n int key = 0;\n \n // generating rotating string table\n String[] table = new String[len];\n for (int i = 0 ; i < len; i++)\n {\n table[i] = rotate(s, i, len);\n }\n \n // sort the table\n String[] sorted = new String[len];\n for(int i = 0 ; i < len; i++)\n {\n sorted[i] = table[i];\n }\n sort(sorted, len);\n \n //generating encoded string\n StringBuilder result = new StringBuilder();\n for(int i = 0 ; i < len; i++)\n result.append(sorted[i].charAt(len-1));\n \n //find the key index \n for(int i = 0 ; i < table.length; i++)\n {\n if(sorted[i].equals(s))\n {\n key = i;\n break;\n }\n }\n \n // output part\n \n BinaryStdOut.write(key);\n \n for(int i = 0 ; i < len; i++)\n BinaryStdOut.write(result.charAt(i)); // generate the output character by character\n \n BinaryStdOut.close();\n \n }", "@SuppressWarnings({\"unchecked\", \"rawtypes\"})\n public static BufferedImage createQRCode(String data, String charset, int width, int height) {\n Map hint = new HashMap();\n hint.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.H);\n hint.put(EncodeHintType.CHARACTER_SET, charset);\n\n return createQRCode(data, charset, hint, width, height);\n }", "private static BitMatrix gerarBitMatrix(String conteudo, int width,\n\t\t\tint height) throws WriterException {\n\t\tQRCodeWriter writer = new QRCodeWriter();\n\t\tBitMatrix bm = writer.encode(conteudo, BarcodeFormat.QR_CODE, width,\n\t\t\t\theight);\n\t\treturn bm;\n\t}", "public void startQR(View view){\n\n try {\n Intent intent = new Intent(ACTION_SCAN);\n intent.putExtra(\"SCAN_MODE\", \"QR_CODE_MODE\");\n startActivityForResult(intent, 0);\n } catch (ActivityNotFoundException anfe) {\n showDialog(this, getResources().getString(R.string.qrreader_not_found), getResources().getString(R.string.would_you_like_to_download), getResources().getString(R.string.yes), getResources().getString(R.string.no)).show();\n }\n }", "@Test\n\tpublic void message_numeric() {\n\t\tString message = \"\";\n\t\tfor (int i = 0; i < 20; i++) {\n\t\t\tQrCode expected = new QrCodeEncoder().setVersion(1).\n\t\t\t\t\tsetError(QrCode.ErrorLevel.M).\n\t\t\t\t\tsetMask(QrCodeMaskPattern.M011).\n\t\t\t\t\taddNumeric(message).fixate();\n\n\t\t\tQrCodeGeneratorImage generator = new QrCodeGeneratorImage(4);\n\t\t\tgenerator.render(expected);\n\t\t\tFastQueue<PositionPatternNode> pps = createPositionPatterns(generator);\n\n//\t\tShowImages.showWindow(generator.gray,\"QR Code\", true);\n//\t\tBoofMiscOps.sleep(100000);\n\n\t\t\tQrCodeDecoderImage<GrayU8> decoder = new QrCodeDecoderImage<>(null,GrayU8.class);\n\t\t\tdecoder.process(pps,generator.getGray());\n\n\t\t\tassertEquals(1,decoder.successes.size());\n\t\t\tQrCode found = decoder.getFound().get(0);\n\n\t\t\tassertEquals(expected.version,found.version);\n\t\t\tassertEquals(expected.error,found.error);\n\t\t\tassertEquals(expected.mode,found.mode);\n\t\t\tassertEquals(message,new String(found.message));\n\t\t\tmessage += (i%10)+\"\";\n\t\t}\n\t}", "public void scanQrCode() {\r\n cameraView.getHolder().addCallback(new SurfaceHolder.Callback() {\r\n @Override\r\n public void surfaceCreated(SurfaceHolder holder) {\r\n try {\r\n if (ActivityCompat.checkSelfPermission(getApplicationContext(), Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED) {\r\n // TODO: Consider calling\r\n // ActivityCompat#requestPermissions\r\n // here to request the missing permissions, and then overriding\r\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\r\n // int[] grantResults)\r\n // to handle the case where the user grants the permission. See the documentation\r\n // for ActivityCompat#requestPermissions for more details.\r\n return;\r\n }\r\n cameraSource.start(cameraView.getHolder());\r\n } catch (IOException ie) {\r\n Log.e(\"CAMERA SOURCE\", ie.getMessage());\r\n }\r\n }\r\n\r\n @Override\r\n public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {\r\n //cameraSource.release();\r\n }\r\n\r\n @Override\r\n public void surfaceDestroyed(SurfaceHolder holder) {\r\n cameraSource.stop();\r\n }\r\n });\r\n\r\n cameraView.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n cameraFocus(cameraSource, Camera.Parameters.FOCUS_MODE_CONTINUOUS_VIDEO);\r\n }\r\n });\r\n\r\n barcodeDetector.setProcessor(new Detector.Processor<Barcode>() {\r\n @Override\r\n public void release() {\r\n\r\n }\r\n\r\n @Override\r\n public void receiveDetections(Detector.Detections<Barcode> detections) {\r\n final SparseArray<Barcode> barcodes = detections.getDetectedItems();\r\n\r\n if (barcodes.size() != 0) {\r\n barcodeInfo.post(new Runnable() {\r\n public void run() {\r\n try {\r\n if (Config.getInstance().isInternetAvailable(BarcodeScanner.this)) {\r\n\r\n Config.getInstance().logger(BarcodeScanner.this,Config.getInstance().logger_ATTENDANCE_FILL_ATTENDANCE);\r\n String contents = barcodes.valueAt(0).displayValue;\r\n Toast.makeText(BarcodeScanner.this, contents, Toast.LENGTH_SHORT).show();\r\n tv_detectedValue.setText(contents);\r\n\r\n } else {\r\n Config.getInstance().GlobalInternetDialog(BarcodeScanner.this);\r\n }\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n });\r\n }\r\n }\r\n });\r\n }", "private void print() {\n printInputMessage();\n printFrequencyTable();\n printCodeTable();\n printEncodedMessage();\n }", "@Override\n public String toString() {\n return \"code: \" + this.paintCode + \"secCode: \" + this.secCode + \", image: \" + this.image;\n }", "public static String romaCoding(String s){\n s = s.toLowerCase().replaceAll(\" \", \"\");\n StringBuffer sb = new StringBuffer(s);\n System.out.println(s);\n /**\n * Step1: Reverse the string\n */\n String step1 = sb.reverse().toString();\n System.out.println(step1);\n\n /**\n * Step2: Rail Fence Cipher Coding\n */\n String step2 = RailFenceCipher.railFenceCipherCoding(step1);\n System.out.println(step2);\n\n /**\n * Step3: Computer Key Board Coding\n */\n String step3 = \"\";\n Map<Character, Character> map = KeyBoard.getCodingMap();\n for(int i = 0; i < step2.length(); i++){\n step3 = step3 + map.get(step2.charAt(i));\n }\n System.out.println(step3);\n\n /**\n * Step4: Covert string to numbers with Nokia phone keyboard\n */\n String step4 = \"\";\n Map nokiaMap = KeyBoard.getNokiaCodingMap();\n for(int i = 0; i < step3.length(); i++){\n step4 = step4 + nokiaMap.get(step3.charAt(i)) + \"\";\n }\n System.out.println(step4);\n\n /**\n * Step5: Convert string to morse code\n */\n String step5 = \"\";\n Map morseMap = MorseCode.getMorseMap();\n for(int i = 0; i < step4.length(); i++){\n Character c = step4.charAt(i);\n step5 = step5 + morseMap.get(c) + \"/\";\n }\n System.out.println(step5);\n return step5;\n }", "@RequiresPermission(allOf = {Manifest.permission.CAMERA, Manifest.permission.BLUETOOTH_ADMIN, Manifest.permission.BLUETOOTH, Manifest.permission.ACCESS_FINE_LOCATION})\n public void scanQRCode(final CodeScanner codeScanner, final QRCodeScanListener qrCodeScanListener) {\n\n isScanned = false;\n List<BarcodeFormat> formats = new ArrayList<>();\n formats.add(BarcodeFormat.QR_CODE);\n\n codeScanner.setDecodeCallback(new DecodeCallback() {\n @Override\n public void onDecoded(@NonNull final Result result) {\n\n String scannedData = result.getText();\n\n if (!TextUtils.isEmpty(scannedData) && !isScanned) {\n\n Log.d(TAG, \"QR Code Data : \" + scannedData);\n\n try {\n JSONObject jsonObject = new JSONObject(scannedData);\n\n String deviceName = jsonObject.optString(\"name\");\n String pop = jsonObject.optString(\"pop\");\n String transport = jsonObject.optString(\"transport\");\n int security = jsonObject.optInt(\"security\", ESPConstants.SecurityType.SECURITY_2.ordinal());\n String userName = jsonObject.optString(\"username\");\n String password = jsonObject.optString(\"password\");\n isScanned = true;\n\n if (qrCodeScanListener != null) {\n qrCodeScanListener.qrCodeScanned();\n }\n\n Handler handler = new Handler(Looper.getMainLooper());\n handler.post(new Runnable() {\n\n @Override\n public void run() {\n codeScanner.releaseResources();\n }\n });\n\n ESPConstants.TransportType transportType = null;\n ESPConstants.SecurityType securityType = null;\n\n if (!TextUtils.isEmpty(transport)) {\n\n if (transport.equalsIgnoreCase(\"softap\")) {\n\n transportType = ESPConstants.TransportType.TRANSPORT_SOFTAP;\n\n } else if (transport.equalsIgnoreCase(\"ble\")) {\n\n transportType = ESPConstants.TransportType.TRANSPORT_BLE;\n\n } else {\n Log.e(TAG, \"\" + transport + \" Transport type is not supported\");\n qrCodeScanListener.onFailure(new RuntimeException(\"Transport type is not supported\"));\n return;\n }\n } else {\n Log.e(TAG, \"Transport is not available in QR code data\");\n qrCodeScanListener.onFailure(new RuntimeException(\"QR code is not valid\"), scannedData);\n return;\n }\n\n securityType = setSecurityType(security);\n\n espDevice = new ESPDevice(context, transportType, securityType);\n espDevice.setDeviceName(deviceName);\n espDevice.setProofOfPossession(pop);\n espDevice.setUserName(userName);\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q && transportType.equals(ESPConstants.TransportType.TRANSPORT_SOFTAP)) {\n\n WiFiAccessPoint wiFiDevice = new WiFiAccessPoint();\n wiFiDevice.setWifiName(deviceName);\n wiFiDevice.setPassword(password);\n espDevice.setWifiDevice(wiFiDevice);\n qrCodeScanListener.deviceDetected(espDevice);\n } else {\n isDeviceAvailable(espDevice, password, qrCodeScanListener);\n }\n\n } catch (JSONException e) {\n\n e.printStackTrace();\n qrCodeScanListener.onFailure(new RuntimeException(\"QR code is not valid\"), scannedData);\n }\n } else {\n qrCodeScanListener.onFailure(new RuntimeException(\"QR code is not valid\"), scannedData);\n }\n }\n });\n }", "public boolean qrcodeVideoPreviewEnabled();", "public static BufferedImage createQRCode(String data, int width, int height) {\n return createQRCode(data, QRCODE_DEFAULT_CHARSET, width, height);\n }", "public String encode(String text) {\n\t\t// TODO fill this in.\n\n\t\tString encodedText = \"\";\n\t\tSystem.out.println(\"text.length(): \" + text.length());\n\t\tfor (int i = 0; i < text.length(); i++) {\n\t\t\tString characterCode = encodingTable.get(text.charAt(i));\n\t\t\tSystem.out.println(text.charAt(i));\n\t\t\tencodedText = encodedText.concat(characterCode);\n\t\t}\n\t\tSystem.out.println(\"THISHERE: \\n\" + encodedText + \"\\nTHISEND\");\n\n\t\treturn encodedText;\n\t}", "public void encodeData() {\n frequencyTable = new FrequencyTableBuilder(inputPath).buildFrequencyTable();\n huffmanTree = new Tree(new HuffmanTreeBuilder(new FrequencyTableBuilder(inputPath).buildFrequencyTable()).buildTree());\n codeTable = new CodeTableBuilder(huffmanTree).buildCodeTable();\n encodeMessage();\n print();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v= inflater.inflate(R.layout.fragment_profile__generate_qr, container, false);\n\n\n generateButton=(Button)v.findViewById(R.id.generatebuttonID);\n saveButton=(Button)v.findViewById(R.id.saveQRButtonID);\n uploadButton=(Button)v.findViewById(R.id.uploadQRButtonID);\n\n qrImage=(ImageView)v.findViewById(R.id.qrID);\n firebaseAuth=FirebaseAuth.getInstance();\n firebaseUser=firebaseAuth.getCurrentUser();\n\n final String encodingtext=firebaseUser.getUid();\n\n key= (EditText)v.findViewById(R.id.keyEditText);\n reference = FirebaseDatabase.getInstance().getReference().child(firebaseUser.getUid());\n storageReference= FirebaseStorage.getInstance().getReference();\n\n\n\n generateButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n reference.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n\n String keyInDatabase = dataSnapshot.child(\"Key\").getValue().toString().trim();\n String keyEntered=key.getText().toString().trim();\n\n if ((Boolean) keyInDatabase.equals(keyEntered)) {\n //code to generate QR code\n\n MultiFormatWriter writer=new MultiFormatWriter();\n try\n {\n BitMatrix bitMatrix=writer.encode(encodingtext, BarcodeFormat.QR_CODE,300,300);\n BarcodeEncoder encoder=new BarcodeEncoder();\n b=encoder.createBitmap(bitMatrix);\n qrImage.setImageBitmap(b);\n }\n catch (WriterException e)\n {\n e.printStackTrace();\n\n }\n\n } else {\n Toast.makeText(getActivity(), \"Failed! Key is incorrect\", Toast.LENGTH_SHORT).show();\n }\n\n\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n\n }\n });\n\n\n saveButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n generateButton.setClickable(false);\n\n }\n });\n\n\n\n uploadButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n if(b!=null)\n {\n FirebaseUser user=firebaseAuth.getCurrentUser();\n final ProgressDialog progressDialog=new ProgressDialog(getActivity());\n progressDialog.setTitle(\"Uploading...\");\n progressDialog.show();\n String UID=user.getUid();\n\n StorageReference QRRef = storageReference.child(\"QRcodes/\"+UID+\".jpg\");\n\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n b.compress(Bitmap.CompressFormat.JPEG, 100, baos);\n byte[] data = baos.toByteArray();\n\n UploadTask uploadTask=QRRef.putBytes(data);\n\n uploadTask.addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Toast.makeText(getActivity(),\"Upload Successfull\",Toast.LENGTH_SHORT).show();\n progressDialog.dismiss();\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception exception) {\n // Handle unsuccessful uploads\n progressDialog.dismiss();\n Toast.makeText(getActivity(),\"Upload failed \"+exception.getMessage(),Toast.LENGTH_SHORT).show();\n\n // ...\n }\n\n\n })\n .addOnProgressListener(new OnProgressListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onProgress(UploadTask.TaskSnapshot taskSnapshot) {\n double progress=(100.0*taskSnapshot.getBytesTransferred())/taskSnapshot.getTotalByteCount();\n progressDialog.setMessage(((int)progress)+\"% uploaded...\");\n }\n })\n\n\n ;\n }\n\n\n\n }\n });\n\n\n\n return v;\n }", "void parseQrCode(String qrCodeData);", "private String getBarcode()\n {\n Scanner scanner = new Scanner(System.in);\n System.out.println(\"\");\n System.out.print(\"Indtast stregkode: \");\n return scanner.nextLine();\n }", "public PNGEncodeParam getEncodeParam() {\n/* 346 */ return this.encodeParam;\n/* */ }", "@ViewAnnotations.ViewOnClick(R.id.hunter_number_read_qr_button)\n protected void onReadQrCodeClicked(final View view) {\n final IntentIntegrator intentIntegrator = IntentIntegrator.forSupportFragment(this);\n intentIntegrator.setBarcodeImageEnabled(true);\n intentIntegrator.setOrientationLocked(false);\n intentIntegrator.initiateScan();\n }", "private String encodeCode11() {\n if (!checkNumericOnly(getRawData().replace(\"-\", \"\"))) {\n error(\"EC11-1: Numeric data and '-' Only\");\n }\n\n //calculate the checksums\n int weight = 1;\n int CTotal = 0;\n String dataToEncodeWithChecksums = getRawData();\n\n //figure the C checksum\n for (int i = getRawData().length() - 1; i >= 0; i--) {\n //C checksum weights go 1-10\n if (weight == 10) {\n weight = 1;\n }\n\n if (getRawData().charAt(i) != '-') {\n CTotal += Integer.parseInt(String.valueOf(getRawData().charAt(i))) * weight++;\n } else {\n CTotal += 10 * weight++;\n }\n }\n\n int checksumC = CTotal % 11;\n\n dataToEncodeWithChecksums += String.valueOf(checksumC);\n\n //K checksums are recommended on any message length greater than or equal to 10\n if (getRawData().length() >= 10) {\n weight = 1;\n int KTotal = 0;\n\n //calculate K checksum\n for (int i = dataToEncodeWithChecksums.length() - 1; i >= 0; i--) {\n //K checksum weights go 1-9\n if (weight == 9) {\n weight = 1;\n }\n\n if (dataToEncodeWithChecksums.charAt(i) != '-') {\n KTotal += Integer.parseInt(String.valueOf(dataToEncodeWithChecksums.charAt(i))) * weight++;\n } else {\n KTotal += 10 * weight++;\n }\n }\n\n int checksumK = KTotal % 9;\n dataToEncodeWithChecksums += checksumK;\n }\n\n //encode data\n String space = \"0\";\n StringBuilder builder = new StringBuilder();\n builder.append(C11_Code[11]);//start-stop char\n builder.append(space); //interchar space\n\n for (char c : dataToEncodeWithChecksums.toCharArray()) {\n int index = (c == '-' ? 10 : Integer.parseInt(String.valueOf(c)));\n builder.append(C11_Code[index]);\n\n //inter-character space\n builder.append(space);\n }//foreach\n\n //stop bars\n builder.append(C11_Code[11]);\n\n return builder.toString();\n }", "public void receiveResultget_qrcode(\n com.xteam.tourismpay.PFTMXStub.Get_qrcodeResponse result) {\n }", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tsetContentView(R.layout.activity_print_barcode);\r\n\t\t\r\n\t\tiv = (ImageView) findViewById(R.id.iv_test);\r\n\t\tet_input=(EditText)findViewById(R.id.et_input);\r\n\t\tbt_bar = (Button) findViewById(R.id.bt_bar);\r\n\t\tbt_bar.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\tif (PrintActivity.pl.getState() != PrinterClass.STATE_CONNECTED) {\r\n\t\t\t\t\tToast.makeText(\r\n\t\t\t\t\t\t\tPrintBarCodeActivity.this,\r\n\t\t\t\t\t\t\tPrintBarCodeActivity.this.getResources().getString(\r\n\t\t\t\t\t\t\t\t\tR.string.str_unconnected), 2000).show();\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tString message = et_input.getText().toString();\r\n\r\n\t\t\t\tif (message.getBytes().length > message.length()) {\r\n\t\t\t\t\tToast.makeText(\r\n\t\t\t\t\t\t\tPrintBarCodeActivity.this,\r\n\t\t\t\t\t\t\tPrintBarCodeActivity.this.getResources().getString(\r\n\t\t\t\t\t\t\t\t\tR.string.str_cannotcreatebar), 2000).show();\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tif (message.length() > 0) {\r\n\r\n\t\t\t\t\tbtMap = BarcodeCreater.creatBarcode(PrintBarCodeActivity.this,\r\n\t\t\t\t\t\t\tmessage, PrintService.imageWidth*8, 100, true, 1);\r\n\t\t\t\t\tiv.setImageBitmap(btMap);\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\r\n\t\tbt_image = (Button) findViewById(R.id.bt_image);\r\n\t\tbt_image.setOnClickListener(new OnClickListener() {\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\tif (btMap != null) {\r\n\t\t\t\t\tPrintActivity.pl.printImage(btMap);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tbtMap = BarcodeCreater.creatBarcode(PrintBarCodeActivity.this,\r\n\t\t\t\t\"9787111291954\", PrintService.imageWidth*8, 100, true, 1);\r\n\t\tiv.setImageBitmap(btMap);\r\n\t}", "@Override\n public void handleResult(Result rawResult) {\n\n Toast.makeText(this,rawResult.getText(),Toast.LENGTH_LONG).show();\n// Toast.makeText(this,rawResult.getBarcodeFormat().toString(),Toast.LENGTH_LONG).show();\n\n\n if (rawResult.getText().equals(\"admin\")) {\n\n Intent intent = new Intent(ScannerActivity.this, ExamPage.class);\n startActivity(intent);\n finish();\n\n\n } else {\n\n Toast.makeText(this,\"Wrong QR Code\",Toast.LENGTH_LONG).show();\n Intent intent = new Intent(ScannerActivity.this, ScannerActivity.class);\n startActivity(intent);\n finish();\n\n\n }\n\n\n\n SharedPreferences sp = getSharedPreferences(\"PREF_NAME\", Context.MODE_PRIVATE);\n String qrText = sp.getString(\"QR_Code\", String.valueOf(-1));\n Toast.makeText(this,qrText,Toast.LENGTH_LONG).show();\n\n\n Log.v(\"Scan\", rawResult.getText()); // Prints scan results\n Log.v(\"Scan\", rawResult.getBarcodeFormat().toString()); // Prints the scan format (qrcode, pdf417 etc.)\n }", "public static void printIRCode(){\n\t\tfor (int i=0; i < ircode.size(); i++){\n\t\t\tSystem.out.println(\";\"+ircode.get(i).printCode());\n\t\t}\n\t}", "public String enkodeRC4(String result)\n {\n try\n {\n String text2Encrypt;\n byte[] ciphertext1;\n ab.system.libraries.security.ABSecurity.ControllEncRC4Engine s1 = new ab.system.libraries.security.ABSecurity.ControllEncRC4Engine();\n text2Encrypt = result;\n s1.init(true, new KeyParameter(ABSecurity.keyRC4().getBytes()));\n ciphertext1 = new byte[text2Encrypt.length()];\n s1.processBytes(text2Encrypt.getBytes(), 0, text2Encrypt.length(), ciphertext1, 0);\n result = s1.bytesToHex(ciphertext1);\n }\n catch(Exception e)\n {\n e.printStackTrace();\n }\n return result;\n }", "public String qrCodeReader(String qrFileLoc){\n\t\tResult result = null;\n\t\tBinaryBitmap binaryBitmap;\n\t\ttry{\n\t\t\tbinaryBitmap = new BinaryBitmap(new HybridBinarizer(new BufferedImageLuminanceSource(ImageIO.read(\n\t\t\t\t\tnew FileInputStream(qrFileLoc)))));\n\t\t\tresult = new MultiFormatReader().decode(binaryBitmap);\n\t\t\treturn result.getText();\n\t\t}catch(Exception ex){\n\t\t\tex.printStackTrace();\n\t\t\tServerLoggers.errorLog.error(\"*** Error reading QR code Image. QRReader.qrCodeReader *** \");\n\t\t}\n\t\treturn null;\n\t}", "public void generateBarcode(String text, BarcodeGeneratorListener listener,\n int imageId){\n MultiFormatWriter multiFormatWriter = new MultiFormatWriter();\n try {\n BitMatrix bitMatrix = multiFormatWriter.encode(text, BarcodeFormat.CODE_128, 600, 200);\n BarcodeEncoder barcodeEncoder = new BarcodeEncoder();\n Bitmap bitmap = barcodeEncoder.createBitmap(bitMatrix);\n listener.onBarcodeGenerated(bitmap, imageId);\n } catch (WriterException e) {\n e.printStackTrace();\n }\n }", "public String printImage() {\n StringBuilder builder = new StringBuilder();\n builder.append(\"ID:\" + this.id + \"; Data:\\n\");\n\n for (int i = 1; i <= this.data.length; i++) {\n T t = data[i - 1];\n builder.append(t.toString() + \" \");\n if (i % 28 == 0) {\n builder.append(\"\\n\");\n }\n }\n return builder.toString().replace('0', ' ');\n }", "public void drawResultBitmap(Bitmap barcode) {\n resultBitmap = barcode;\n invalidate();\n }", "public QRCodeInfo build() {\n return new QRCodeInfo(this.f104433a, this.f104434b, super.buildUnknownFields());\n }", "private void Print_Test(){\n String lang = getString(R.string.strLang);\n if((lang.compareTo(\"en\")) == 0){\n\n //cetak gambar logo dulu\n Print_BMP();\n\n //cetak string struk\n String data = struk;\n SendDataByte(PrinterCommand.POS_Print_Text(data, CHINESE, 0, 0, 0, 0));\n SendDataByte(PrinterCommand.POS_Set_Cut(1));\n SendDataByte(PrinterCommand.POS_Set_PrtInit());\n }else if((lang.compareTo(\"cn\")) == 0){\n String msg = \"恭喜您!\\n\\n\";\n String data = \"您已经成功的连接上了我们的便携式蓝牙打印机!\\n我们公司是一家专业从事研发,生产,销售商用票据打印机和条码扫描设备于一体的高科技企业.\\n\\n\\n\\n\\n\\n\\n\";\n SendDataByte(PrinterCommand.POS_Print_Text(msg, CHINESE, 0, 1, 1, 0));\n SendDataByte(PrinterCommand.POS_Print_Text(data, CHINESE, 0, 0, 0, 0));\n SendDataByte(PrinterCommand.POS_Set_Cut(1));\n SendDataByte(PrinterCommand.POS_Set_PrtInit());\n }else if((lang.compareTo(\"hk\")) == 0 ){\n String msg = \"恭喜您!\\n\";\n String data = \"您已經成功的連接上了我們的便攜式藍牙打印機! \\n我們公司是一家專業從事研發,生產,銷售商用票據打印機和條碼掃描設備於一體的高科技企業.\\n\\n\\n\\n\\n\\n\\n\";\n SendDataByte(PrinterCommand.POS_Print_Text(msg, BIG5, 0, 1, 1, 0));\n SendDataByte(PrinterCommand.POS_Print_Text(data, BIG5, 0, 0, 0, 0));\n SendDataByte(PrinterCommand.POS_Set_Cut(1));\n SendDataByte(PrinterCommand.POS_Set_PrtInit());\n }else if((lang.compareTo(\"kor\")) == 0){\n String msg = \"축하 해요!\\n\";\n String data = \"성공적으로 우리의 휴대용 블루투스 프린터에 연결 한! \\n우리는 하이테크 기업 중 하나에서 개발, 생산 및 상업 영수증 프린터와 바코드 스캐닝 장비 판매 전문 회사입니다.\\n\\n\\n\\n\\n\\n\\n\";\n SendDataByte(PrinterCommand.POS_Print_Text(msg, KOREAN, 0, 1, 1, 0));\n SendDataByte(PrinterCommand.POS_Print_Text(data, KOREAN, 0, 0, 0, 0));\n SendDataByte(PrinterCommand.POS_Set_Cut(1));\n SendDataByte(PrinterCommand.POS_Set_PrtInit());\n }else if((lang.compareTo(\"thai\")) == 0){\n String msg = \"ขอแสดงความยินดี!\\n\";\n String data = \"คุณได้เชื่อมต่อกับบลูทู ธ เครื่องพิมพ์แบบพกพาของเรา! \\n เราเป็น บริษัท ที่มีความเชี่ยวชาญในการพัฒนา, การผลิตและการขายของเครื่องพิมพ์ใบเสร็จรับเงินและการสแกนบาร์โค้ดอุปกรณ์เชิงพาณิชย์ในหนึ่งในองค์กรที่มีเทคโนโลยีสูง.\\n\\n\\n\\n\\n\\n\\n\";\n SendDataByte(PrinterCommand.POS_Print_Text(msg, THAI, 255, 1, 1, 0));\n SendDataByte(PrinterCommand.POS_Print_Text(data, THAI, 255, 0, 0, 0));\n SendDataByte(PrinterCommand.POS_Set_Cut(1));\n SendDataByte(PrinterCommand.POS_Set_PrtInit());\n }\n }", "@Ignore @Test\n public void testEncode() {\n OutputStream[] outStreams = new OutputStream[8];\n for (int i = 0; i<7; i++)\n {\n try {\n outStreams[i] = new FileOutputStream(new File(tmpdir, \"bigRS\" + i));\n } catch (Exception e) {\n }\n \n } \n \n EncoderRS reed = new EncoderRS(5, 3, this.file, outStreams);\n \n reed.encode();\n String[] teste = reed.getPartsHash();\n BufferedOutputStream[] partesSaida = reed.getWriteBufs();\n \n File[] partesEntrada = new File[7];\n \n \n for (int i = 0; i<7; i++)\n {\n try {\n partesEntrada[i] = new File(tmpdir, \"bigRS\" + i);\n } catch (Exception e) {\n }\n \n } \n \n try { \n OutputStream outputStream2 = new FileOutputStream(new File(tmpdir, \"big2RS.pdf\"));\n DecoderRS dreed = new DecoderRS(5, 3, partesEntrada, outputStream2, null);\n dreed.decode();\n String teste2[] = dreed.getPartsHash();\n String testee = dreed.getFileHash();\n \n String rola;\n } catch (Exception e) {\n }\n \n \n \n \n System.out.println(\"E: \" + Monitor.getInstance().getTimeToEncode() + \" D: \" + Monitor.getInstance().getTimeToDecode());\n }", "protected boolean encode()\n {\n\t\tfor(int i=0;i<256;i++)\n {\n\t\t\tstr[i] = String.valueOf((char)i);\n\t\t}\n str[13] = \"\";\n\t\tstr[10] = \"\\n\";\n str[65] = \" \".concat(this.A);\n\t\tstr[67] = \" \".concat(this.C);\n str[71] = \" \".concat(this.G);\n\t\tstr[84] = \" \".concat(this.T);\n try\n\t\t{\n \treader = new FileReader(in);\n writer = new FileWriter(out);\n\n\t\t\t/*******************************************************************************\n\t\t\t *\tThis loop traverse to the dna sequence and maps each character to\n\t\t\t *\tpredefined graphical value character by character\n\t\t\t *******************************************************************************/\n\t\t\twhile(true)\n {\n\t\t\t\ttemp = reader.read();\n if(temp == -1)\n\t\t\t\t\tbreak;\n\t\t\t\t\tif(temp>=97 && temp<=122)\n\t\t\t\t\t\ttemp=temp-32;\n\t\t\t\tif(temp==65 || temp==67 || temp==71 || temp==84)\n \tspace_flag = 1;\n\t\t\t\telse\n\t\t\t\t{\n \tif(space_flag == 1)\n {\n\t\t\t\t\t\tt_str = \" \".concat(str[temp]);\n writer.write(t_str);\n\t\t\t\t\t\tspace_flag = 0;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n space_flag = 0;\n\t\t\t\t}\n if(temp == 59 || temp == 62)\n\t\t\t\t{\n \tt_str = \"\";\n while(temp != 10)\n\t\t\t\t\t{\n \tt_str = t_str.concat(String.valueOf((char)temp));\n temp = reader.read();\n\t\t\t\t\t}\n t_str = t_str.concat(\"(Mapping: A>\"+this.A+\" C>\"+this.C+\" G>\"+this.G+\" T>\"+this.T+\")\");\n t_str = t_str.concat(\"\\n\");\n\t\t\t\t\twriter.write(t_str);\n\t\t\t\t}\n else\n\t\t\t\t\twriter.write(str[temp]);\n\t\t\t}\n writer.close();\n\t\t\treader.close();\n\t\t}\n catch (IOException e)\n\t\t{\n e.printStackTrace (System.out);\n JOptionPane.showMessageDialog(null,\"Exception occurred :( \");\n return false;\n\t\t}\n\t\treturn true;\n\t}", "@Override\n protected void doEncode(ByteArrayEncodingState encodingState) {\n CoderUtil.resetOutputBuffers(encodingState.outputs,\n encodingState.outputOffsets,\n encodingState.encodeLength);\n\n // MSREncodeData(encodeMatrix, encodingState.encodeLength, encodingState.inputs, encodingState.outputs);\n RSUtil.encodeData(gfTables, encodingState.encodeLength,\n encodingState.inputs,\n encodingState.inputOffsets, encodingState.outputs,\n encodingState.outputOffsets);\n }", "public static Bitmap createBarcode(String contents, BarcodeFormat format,\n int desiredWidth, int desiredHeight) throws WriterException {\n\n Hashtable<EncodeHintType,Object> hints = new Hashtable<EncodeHintType,Object>(2);\n MultiFormatWriter writer = new MultiFormatWriter();\n BitMatrix result = writer.encode(contents, format, desiredWidth, desiredHeight, hints);\n\n int width = result.getWidth();\n int height = result.getHeight();\n int fgColor = 0xFF000000;\n int bgColor = 0x00FFFFFF;\n int[] pixels = new int[width * height];\n\n for (int y = 0; y < height; y++) {\n int offset = y * width;\n for (int x = 0; x < width; x++) {\n pixels[offset + x] = result.get(x, y) ? fgColor : bgColor;\n }\n }\n\n Bitmap bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);\n bitmap.setPixels(pixels, 0, width, 0, 0, width, height);\n return bitmap;\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n //if qrcode reader\n if(code == 1){\n IntentResult qrcode = IntentIntegrator.parseActivityResult(requestCode, resultCode, data);\n if (qrcode != null) {\n if (qrcode.getContents() != null) {\n String cut = qrcode.getContents();\n int corte = cut.indexOf(\"=\") + 1;\n final String code = cut.substring(corte, corte + 44);\n Intent readQRcode = new Intent(activity, VerNFe.class);\n readQRcode.putExtra(\"code\", code);\n overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);\n startActivity(readQRcode);\n } else {\n Toast.makeText(activity, R.string.toast_cancel_read_qrcode, Toast.LENGTH_SHORT).show();\n }\n drawerLayout.closeDrawers();\n } else {\n super.onActivityResult(requestCode, resultCode, data);\n }\n }\n //if barcode reader\n else if (code == 2){\n IntentResult barcode = IntentIntegrator.parseActivityResult(requestCode, resultCode, data);\n if (barcode != null) {\n if (barcode.getContents() != null) {\n String codigo_de_barras = barcode.getContents();\n Descontos d = new Descontos();\n d.pegaProdutoPorCodigoDeBarras(codigo_de_barras);\n } else {\n Toast.makeText(this, \"Leitura do código de barras cancelado\", Toast.LENGTH_SHORT).show();\n }\n } else {\n Toast.makeText(this, \"Erro ao ler código de barras do Produto\", Toast.LENGTH_LONG).show();\n }\n }\n\n }", "public void drawResultBitmap(Bitmap barcode) {\n resultBitmap = barcode;\n invalidate();\n }", "public void drawResultBitmap(Bitmap barcode) {\n resultBitmap = barcode;\n invalidate();\n }", "private void showSourceCode(boolean whole){\r\n\t\tsc = lang.newSourceCode(new Coordinates(50, 220), \"\", null, sc_props);\r\n\t\t\r\n\t\tsc.addCodeLine(\"fletcher(byte[] message){\", null, 0, null); // #0\r\n\t\tsc.addCodeLine(\"int i = 0; int sum1 = 0; int sum2 = 0;\", null, 1, null); // #1\r\n\t\tsc.addCodeLine(\"for(; i < message.length; i++){\", null, 1, null); // #2\r\n\t\tsc.addCodeLine(\"sum1 = (sum1 + message[i]) % 255 // 2 Operationen\", null, 2, null); // #3\r\n\t\tsc.addCodeLine(\"sum2 = (sum1 + sum2) % 255 // 2 Operationen\", null, 2, null); // #4\r\n\t\tsc.addCodeLine(\"}\", null, 1, null); // #5\r\n\t\t\r\n\t\tif(whole){\r\n\t\t\tsc.addCodeLine(\"int check1 = 255 - ((sum1 + sum2) % 255) // 3 Operationen\", null, 1, null); // #6\r\n\t\t\tsc.addCodeLine(\"int check2 = 255 - ((sum1 + check1) % 255) // 3 Operationen\", null, 1, null); // #7\r\n\t\t\tsc.addCodeLine(\"message = append(message,check1) // Erweitert arrays um ein angegebenes Element\", null, 1, null); // #8\r\n\t\t\tsc.addCodeLine(\"message = append(message,check2)\", null, 1, null); // #9\r\n\t\t\tsc.addCodeLine(\"return message\", null, 1, null); // #10\r\n\t\t}\r\n\t\t\r\n\t\tsc.addCodeLine(\"}\", null, 0, null); // #11\r\n\t}", "public QRInfo (Result res){\n ResultPoint center = midPoint(res.getResultPoints()[0],res.getResultPoints()[2]);\n this.xPosition = center.getX();\n this.yPosition = center.getY();\n this.distance = distanceBetweenPoints(res.getResultPoints()[1],center);\n this.idString = res.getText();\n this.rp1 = res.getResultPoints()[0];\n this.rp2 = res.getResultPoints()[1];\n this.rp3 = res.getResultPoints()[2];\n }", "private void displayExp(int disp_nr){\r\n\t\tswitch (disp_nr){\r\n\t\t\tcase 0 :\r\n\t\t\t\texpl = lang.newSourceCode(new Coordinates(200,100), \"\", null, expl_props);\r\n\t\t\t\texpl.addCodeLine(\"Bei 'Fletcher's Checksum' handelt es sich, wie beim Namen ersichtlich,\", null, 0, null);\r\n\t\t\t\texpl.addCodeLine(\"um einen Pruefsummen-Algorithmus zur Erkennung von Datenuebertragungsfehlern.\", null, 0, null);\r\n\t\t\t\texpl.addCodeLine(\"Er ist aehnlich stark wie das CRC-Verfahren,\", null, 0, null);\r\n\t\t\t\texpl.addCodeLine(\"hat aber einen teils wesentlich geringeren Rechenaufwand.\", null, 0, null);\r\n\t\t\t\texpl.addCodeLine(\"\", null, 0, null);\r\n\t\t\t\texpl.addCodeLine(\"Wir sehen uns den Algorithmus in 2 Faellen an:\", null, 0, null);\r\n\t\t\t\texpl.addCodeLine(\"- Korrekte uebertragung der Daten\", null, 0, null);\r\n\t\t\t\texpl.addCodeLine(\"- Fehlerhafte uebertragung der Daten\", null, 0, null);\r\n\t\t\t\texpl.addCodeLine(\"\", null, 0, null);\r\n\t\t\t\texpl.addCodeLine(\"Doch zuerst muessen die Pruefsummen selbst berechnet werden.\", null, 0, null);\r\n\t\t\t\texpl.addCodeLine(\"\", null, 0, null);\r\n\t\t\t\texpl.addCodeLine(\"In der urspruenglichen Variante des Algorithmus wird hierfuer der Datenstream\", null, 0, null);\r\n\t\t\t\texpl.addCodeLine(\"in Bytes (8-Bit Bloecke) zerlegt...\", null, 0, null);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 1 :\r\n\t\t\t\texpl = lang.newSourceCode(new Coordinates(300,150), \"\", null, expl_props);\r\n\t\t\t\texpl.addCodeLine(\"Nun stehen die zwei Pruefsummen fest.\",null,0,null);\r\n\t\t\t\texpl.addCodeLine(\"Damit aber die Qualitaet von CRC in Sachen Fehlererkennung erreicht wird,\", null, 0, null);\r\n\t\t\t\texpl.addCodeLine(\"muessen diese noch einmal verarbeitet werden und zwar wie folgt:\", null, 0, null);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 2 :\r\n\t\t\t\texpl = lang.newSourceCode(new Coordinates(300,150), \"\", null, expl_props);\r\n\t\t\t\texpl.addCodeLine(\"Diese 2 Werte werden nun an die zu versendende Nachricht drangehaengt\", null, 0, null);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 3 :\r\n\t\t\t\texpl = lang.newSourceCode(new Coordinates(300,150), \"\", null, expl_props);\r\n\t\t\t\texpl.addCodeLine(\"Zur Fehlerpruefung muss der Empfaenger nun den Algorithmus erneut\", null, 0, null);\r\n\t\t\t\texpl.addCodeLine(\"auf die empfangene Nachricht, samt Prueffeldern, andwenden\", null, 0, null);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 4 :\r\n\t\t\t\texpl = lang.newSourceCode(new Coordinates(300,150), \"\", null, expl_props);\r\n\t\t\t\texpl.addCodeLine(\"Die Pruefsumme (sum1 + sum2) ist 0! Somit kann von einer\", null, 0, null);\r\n\t\t\t\texpl.addCodeLine(\"korrekten uebertragung der Daten ausgegangen werden!\", null, 0, null);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 5 :\r\n\t\t\t\texpl = lang.newSourceCode(new Coordinates(300,150), \"\", null, expl_props);\r\n\t\t\t\texpl.addCodeLine(\"Nun ein anderes Szenario: Bei der uebertragung ist ein Fehler \", null, 0, null);\r\n\t\t\t\texpl.addCodeLine(\"aufgetreten - hier : in Byte #\" + error_position, null, 0, null);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 6 :\r\n\t\t\t\texpl = lang.newSourceCode(new Coordinates(300,150), \"\", null, expl_props);\r\n\t\t\t\texpl.addCodeLine(\"Wir pruefen erneut wie vorher...\", null, 0, null);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 7 :\r\n\t\t\t\texpl = lang.newSourceCode(new Coordinates(300,150), \"\", null, expl_props);\r\n\t\t\t\texpl.addCodeLine(\"Die Pruefsumme ist NICHT 0. Somit weiss der Empfaenger,\", null, 0, null);\r\n\t\t\t\texpl.addCodeLine(\"dass ein Fehler aufgetreten ist\", null, 0, null);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 9 :\r\n\t\t\t\texpl = lang.newSourceCode(new Coordinates(300,150), \"\", null, expl_props);\r\n\t\t\t\texpl.addCodeLine(\"Es wurden\",null,0,null);\r\n\t\t\t\texpl.addCodeLine(\"\",null,0,null);\r\n\t\t\t\texpl.addCodeLine(\"- Beim ersten Errechnen von sum1 und sum2 \"+op_counts[0]+\" Operationen\",null,0,null);\r\n\t\t\t\texpl.addCodeLine(\"- Beim Pruefen der Nachricht jeweils \"+op_counts[2]+\" Operationen\",null,0,null);\r\n\t\t\t\texpl.addCodeLine(\"... durchgefuehrt\",null,0,null);\r\n\t\t\t\texpl.addCodeLine(\"\",null,0,null);\r\n\t\t\t\texpl.addCodeLine(\"Man erkennt, dass die Zeitkomplexitaet ( der Hauptschleife ) bei n*4 liegt\",null,0,null);\r\n\t\t\t\texpl.addCodeLine(\"wobei n die Laenge der Nachricht ( die zu erweitern oder zu pruefen ist ) in Bytes ist.\",null,0,null);\r\n\t\t\t\texpl.addCodeLine(\"Dies steht im Gegensatz zu - zB. - dem CRC-Verfahren, welches (im schlimmsten Fall) von der Anzahl der einzelnen Bits abhaengt.\",null,0,null);\r\n\t\t\t\texpl.addCodeLine(\"\",null,0,null);\r\n\t\t\t\texpl.addCodeLine(\"Fazit: Ein einfacher, aber effektiver Algorithmus zur Erkennung\" +\r\n\t\t\t\t\t\t\" von uebertragungsfehlern. Hoffentlich war diese Animation aufschlussreich!\", null, 0, null);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 10 : \r\n\t\t\t\texpl = lang.newSourceCode(new Coordinates(300,150), \"\", null, expl_props);\r\n\t\t\t\texpl.addCodeLine(\"Die Schwaeche dieses Verfahrens liegt darin, dass es nicht zwischen den Bytes 11111111 und 00000000,\", null, 0, null);\r\n\t\t\t\texpl.addCodeLine(\"bzw. 255 und 0 ( in Dezimal ) unterscheiden kann, weswegen sich die Pruefsummen nicht geaendert und folgich der Fehler\", null, 0, null);\r\n\t\t\t\texpl.addCodeLine(\"leider nicht entdeckt wurde\", null, 0, null);\r\n\t\t\t\tbreak;\r\n\t\t\tdefault : break;\r\n\t\t}\r\n\t\tlang.nextStep();\r\n\t}", "public void setEncodeParam(PNGEncodeParam encodeParam) {\n/* 355 */ this.encodeParam = encodeParam;\n/* */ }", "private void debug()\n {\n if (!checkTestNeeded())\n {\n String resolution = width + \"x\" + height + \"-\";\n\n boolean success = preferences.getBoolean(PREF_PREFIX + resolution + \"success\",false);\n if (!success)\n {\n throw new RuntimeException(\"Phone not supported with this resolution (\" + width + \"x\" + height + \")\");\n }\n\n nv21Convertor.setSize(width, height);\n nv21Convertor.setSliceHeigth(preferences.getInt(PREF_PREFIX + resolution + \"sliceHeight\", 0));\n nv21Convertor.setStride(preferences.getInt(PREF_PREFIX + resolution + \"stride\", 0));\n nv21Convertor.setYPadding(preferences.getInt(PREF_PREFIX + resolution + \"padding\", 0));\n nv21Convertor.setPlanar(preferences.getBoolean(PREF_PREFIX + resolution + \"planar\", false));\n nv21Convertor.setColorPanesReversed(preferences.getBoolean(PREF_PREFIX + resolution + \"reversed\", false));\n encoderName = preferences.getString(PREF_PREFIX + resolution + \"encoderName\", \"\");\n encoderColorFormat = preferences.getInt(PREF_PREFIX + resolution + \"colorFormat\", 0);\n base64PPS = preferences.getString(PREF_PREFIX + resolution + \"pps\", \"\");\n base64SPS = preferences.getString(PREF_PREFIX + resolution + \"sps\", \"\");\n\n return;\n }\n\n Log.d(TAG, \">>>> Testing the phone for resolution \" + width + \"x\" + height);\n\n // Builds a list of available encoders and decoders we may be able to use\n // because they support some nice color formats\n Codec[] encoders = CodecManager.findEncodersForMimeType(MIME_TYPE);\n Codec[] decoders = CodecManager.findDecodersForMimeType(MIME_TYPE);\n\n int count = 0;\n int n = 1;\n for (Codec encoder1 : encoders)\n {\n count += encoder1.formats.length;\n }\n\n // Tries available encoders\n for (Codec encoder1 : encoders)\n {\n for (int j = 0; j < encoder1.formats.length; j++)\n {\n reset();\n\n encoderName = encoder1.name;\n encoderColorFormat = encoder1.formats[j];\n\n Log.v(TAG, \">> Test \" + (n++) + \"/\" + count + \": \" + encoderName + \" with color format \" + encoderColorFormat + \" at \" + width + \"x\" + height);\n\n // Converts from NV21 to YUV420 with the specified parameters\n nv21Convertor.setSize(width, height);\n nv21Convertor.setSliceHeigth(height);\n nv21Convertor.setStride(width);\n nv21Convertor.setYPadding(0);\n nv21Convertor.setEncoderColorFormat(encoderColorFormat);\n\n // /!\\ NV21Convertor can directly modify the input\n createTestImage();\n data = nv21Convertor.convert(initialImage);\n\n try\n {\n // Starts the encoder\n configureEncoder();\n searchSPSandPPS();\n\n Log.v(TAG, \"SPS and PPS in b64: SPS=\" + base64SPS + \", PPS=\" + base64PPS);\n\n // Feeds the encoder with an image repeatedly to produce some NAL units\n encode();\n\n // We now try to decode the NALs with decoders available on the phone\n boolean decoded = false;\n for (int k = 0; k < decoders.length && !decoded; k++)\n {\n for (int l = 0; l < decoders[k].formats.length && !decoded; l++)\n {\n decoderName = decoders[k].name;\n decoderColorFormat = decoders[k].formats[l];\n try\n {\n configureDecoder();\n } catch (Exception e)\n {\n Log.d(TAG, decoderName + \" can't be used with \" + decoderColorFormat + \" at \" + width + \"x\" + height, e);\n\n releaseDecoder();\n break;\n }\n\n try\n {\n decode(true);\n Log.d(TAG, decoderName + \" successfully decoded the NALs (color format \" + decoderColorFormat + \")\");\n\n decoded = true;\n }\n catch (Exception e)\n {\n Log.e(TAG, decoderName + \" failed to decode the NALs\", e);\n }\n finally\n {\n releaseDecoder();\n }\n }\n }\n\n if (!decoded)\n {\n throw new RuntimeException(\"Failed to decode NALs from the encoder.\");\n }\n\n // Compares the image before and after\n if (!compareLumaPanes())\n {\n // TODO: try again with a different stride\n // TODO: try again with the \"stride\" param\n throw new RuntimeException(\"It is likely that stride != width\");\n }\n\n int padding;\n if ((padding = checkPaddingNeeded()) > 0)\n {\n if (padding < 4096)\n {\n Log.d(TAG, \"Some padding is needed: \" + padding);\n\n nv21Convertor.setYPadding(padding);\n createTestImage();\n data = nv21Convertor.convert(initialImage);\n encodeDecode();\n }\n else\n {\n // TODO: try again with a different sliceHeight\n // TODO: try again with the \"slice-height\" param\n throw new RuntimeException(\"It is likely that sliceHeight != height\");\n }\n }\n\n createTestImage();\n if (!compareChromaPanes(false))\n {\n if (compareChromaPanes(true))\n {\n nv21Convertor.setColorPanesReversed(true);\n Log.d(TAG, \"U and V pane are reversed\");\n }\n else\n {\n throw new RuntimeException(\"Incorrect U or V pane...\");\n }\n }\n\n saveTestResult(true);\n Log.v(TAG, \"The encoder \" + encoderName + \" is usable with resolution \" + width + \"x\" + height);\n return;\n }\n catch (Exception e)\n {\n StringWriter sw = new StringWriter();\n PrintWriter pw = new PrintWriter(sw);\n e.printStackTrace(pw);\n String stack = sw.toString();\n String str = \"Encoder \" + encoderName + \" cannot be used with color format \" + encoderColorFormat;\n Log.e(TAG, str, e);\n errorLog += str + \"\\n\" + stack;\n }\n finally\n {\n releaseEncoder();\n }\n }\n }\n\n saveTestResult(false);\n Log.e(TAG,\"No usable encoder were found on the phone for resolution \" + width + \"x\" + height);\n throw new RuntimeException(\"No usable encoder were found on the phone for resolution \" + width + \"x\" + height);\n }", "public static void main(String[] args) {\n String filePath = \"C:\\\\Users\\\\nhern\\\\OneDrive\\\\Documentos\\\\POO\\\\hernandez.nicolas-diaz.matias-Proyecto\\\\QRScanner\\\\out\\\\qr_test.png\";\n QR.read_qr(filePath);\n }", "@Override\n public void handleResult(com.google.zxing.Result rawResult) {\n if (rawResult.getText().length() < 4) {\n mScannerView.resumeCameraPreview(SimpleScanner.this);\n Toast.makeText(this, \"Wrong QR Code\", Toast.LENGTH_SHORT).show();\n } else {\n Result = rawResult.getText().substring(0, 4);\n MachineID = rawResult.getText().substring(Result.length());\n if (Result.equals(Verification)) {\n Intent i = new Intent(SimpleScanner.this, DetailBreakdownPage2.class);\n String currentResponseDateFinish = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\", Locale.getDefault()).format(new Date());\n i.putExtra(\"MachineID\", MachineID);\n i.putExtra(\"ResponseDateFinish\", currentResponseDateFinish);\n i.putExtra(\"Line\", Line);\n i.putExtra(\"Station\", Station);\n i.putExtra(\"PIC\", PIC);\n startActivity(i);\n } else {\n mScannerView.resumeCameraPreview(SimpleScanner.this);\n Toast.makeText(this, \"Station tidak sesuai\", Toast.LENGTH_SHORT).show();\n }\n }\n }", "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 run() {\n String scanNumText = result.getText();\n Toast.makeText(ItemScan.this, scanNumText, Toast.LENGTH_SHORT).show();\n Intent intent = getIntent();\n intent.putExtra(\"Barcode\", scanNumText);\n setResult(Activity.RESULT_OK, getIntent());\n finish();\n }", "private void displayBarcodeAnimation(String barcode) {\n\n\t\t// barcode image\n\t\tBitmap bitmap = null;\n\t\t// show original barcode animation\n\t\ttry {\n\t\t\tint barcodeWidth = (screenWidth * 3) / 4;\n\t\t\tint barcodeHeight = barcodeWidth / 2;\n\t\t\tbitmap = encodeAsBitmap(barcode, BarcodeFormat.CODE_128,\n\t\t\t\t\tbarcodeWidth, barcodeHeight);\n\t\t} catch (WriterException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tcaptureImageView.setImageBitmap(bitmap);\n\t\tcapturedBarcodeTextView.setText(barcode);\n\n\t\tbitmap = null;\n\t\tanimationGroup.clearAnimation();\n\t\tanimationGroup.setVisibility(View.VISIBLE);\n\t\tanimationGroup.startAnimation(captureMoveAnimation);\n\n\t}", "public String getQrCodeToken() {\n return this.qrCodeToken;\n }", "private static BufferedImage getMagnifiedBarcode(Symbol symbol, int magnification, int BORDER_SIZE){\n BufferedImage image = new BufferedImage((symbol.getWidth() * magnification) + (2 * BORDER_SIZE),\n (symbol.getHeight() * magnification) + (2 * BORDER_SIZE), \n BufferedImage.TYPE_INT_RGB);\n Graphics2D g2d = image.createGraphics();\n g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n g2d.setColor(Color.WHITE);\n g2d.fillRect(0, 0, (symbol.getWidth() * magnification) + (2 * BORDER_SIZE),\n (symbol.getHeight() * magnification) + (2 * BORDER_SIZE));\n Java2DRenderer renderer = new Java2DRenderer(g2d, magnification, Color.WHITE, Color.BLACK);\n renderer.render(symbol);\n \n return image;\n }", "private StringBuffer qpencode( StringBuffer io2Append, String i2Encode, int iLength)\n \t{\n \t\tio2Append.ensureCapacity( 1024);\n \t int lCurLineLength = 0;\n \t\tint\tlPrevChar = -1;\n \t\tchar [] l2Encode = i2Encode.toCharArray();\n \t\ttry\n \t\t{\n \t\t\tfor(int i = 0;;i++)\n \t\t\t{\n \t\t\t\tchar lCurChar = l2Encode[i];\n \t\t\t\tif ((lCurChar > 126) ||\n \t\t\t\t\t\t(lCurChar < 32 && lCurChar != '\\n' && lCurChar != '\\t') ||\n \t\t\t\t\t\t(lCurChar == '=')) {\n \t\t\t\t\tio2Append.append('=');\n \t\t\t\t\tio2Append.append(hex_table[lCurChar >> 4]);\n \t\t\t\t\tio2Append.append(hex_table[lCurChar & 0x0f]);\n \t\t\t\t\tlCurLineLength += 3;\n \t\t\t\t\tlPrevChar = -1;\n \t\t\t\t}\n \t\t\t\telse if (lCurChar == '\\n') {\n \t\t\t\t\tif (lPrevChar == ' ' || lPrevChar == '\\t') {\n \t\t\t\t\t\tio2Append.append('=');\n \t\t\t\t\t\tio2Append.append(lCurChar);\n \t\t\t\t\t}\n \t\t\t\t\tio2Append.append(lCurChar);\n \t\t\t\t\tlCurLineLength = 0;\n \t\t\t\t\tlPrevChar = lCurChar;\n \t\t\t\t}\n \t\t\t\telse {\n \t\t\t\t\tio2Append.append(lCurChar);\n \t\t\t\t\tlCurLineLength++;\n \t\t\t\t\tlPrevChar = lCurChar;\n \t\t\t\t}\n \t\t\t\tif (lCurLineLength > iLength) {\n \t\t\t\t\tio2Append.append('=');\n \t\t\t\t\tio2Append.append('\\n');\n \t\t\t\t\tlCurLineLength = 0;\n \t\t\t\t\tlPrevChar = '\\n';\n \t\t\t\t}\n \t\t\t}\n \t\t} catch (ArrayIndexOutOfBoundsException e)\n \t\t{\n \t\t\t//normal exit, this should be faster than a test at each iterations for string with more than\n \t\t\t//about 40 char\n \t\t}\n \t\t\n \n \t\tif (lCurLineLength > 0) {\n \t\t\tio2Append.append('=');\n \t\t\tio2Append.append('\\n');\n \t\t}\n \t\treturn io2Append;\n \t}", "private void recordAndSendQuery(final QueryRequest qr, \n final MediaType type) {\n queryStats.get().recordQuery();\n responseVerifier.get().record(qr, type);\n searchResultHandler.get().addQuery(qr); // so we can leaf guide....\n messageRouter.get().sendDynamicQuery(qr);\n }", "public void onActivityResult(int requestCode, int resultCode, Intent intent) {\n if (requestCode == 0) {\n if (resultCode == RESULT_OK) {\n Intent scanResult = new Intent(getBaseContext(), OutdoorYouHere.class);\n String contents = intent.getStringExtra(\"SCAN_RESULT\");\n //scanResult.putExtra(\"FLOOR_NUMBER\", floorNumber);\n //scanResult.putExtra(\"ROOM_NUMBER\", roomNumber);\n scanResult.putExtra(\"QR_SCAN\", contents);\n startActivity(scanResult);\n\n } else if (resultCode == RESULT_CANCELED) {\n // Handle cancel\n }\n }\n }", "public String encode() {\n\t\tString encoded_string;\n\t\tencoded_string = MEDIA_FIELD;\n\t\tif (media != null)\n\t\t\tencoded_string += media + Separators.SP + port;\n\t\t// Workaround for Microsoft Messenger contributed by Emil Ivov\n\t\t// Leave out the nports parameter as this confuses the messenger.\n\t\tif (nports > 1)\n\t\t\tencoded_string += Separators.SLASH + nports;\n\n\t\tif (proto != null)\n\t\t\tencoded_string += Separators.SP + proto;\n\n\t\tif (formats != null)\n\t\t\tencoded_string += Separators.SP + encodeFormats();\n\n\t\tencoded_string += Separators.NEWLINE;\n\t\treturn encoded_string;\n\t}" ]
[ "0.7267461", "0.71881336", "0.7121849", "0.6920267", "0.678589", "0.6530939", "0.64910614", "0.6461124", "0.62808853", "0.6154477", "0.6129246", "0.607644", "0.59615064", "0.5935195", "0.58983606", "0.58345544", "0.5831441", "0.5818518", "0.57898283", "0.57855463", "0.5722137", "0.5719623", "0.5690424", "0.56773335", "0.5633926", "0.5631321", "0.5564587", "0.5537001", "0.5519937", "0.5516138", "0.54795927", "0.54780656", "0.5475619", "0.54596186", "0.54547024", "0.5451983", "0.54387885", "0.5397809", "0.5390033", "0.53869677", "0.53864807", "0.53825665", "0.5359716", "0.53420055", "0.53370917", "0.5318213", "0.5316184", "0.53028154", "0.53007525", "0.52948546", "0.5290096", "0.52773076", "0.5203484", "0.5180262", "0.51555103", "0.5144674", "0.5129735", "0.51237994", "0.51217103", "0.5113214", "0.51111287", "0.51040447", "0.50625825", "0.50506485", "0.5048376", "0.5034996", "0.5028041", "0.501633", "0.5012203", "0.5004134", "0.5003941", "0.50024945", "0.50003207", "0.4969109", "0.49435845", "0.49390683", "0.4934646", "0.49301046", "0.49116907", "0.49071023", "0.48994625", "0.48974964", "0.48660228", "0.48660228", "0.4862718", "0.48599198", "0.48510295", "0.48482624", "0.48413566", "0.48340592", "0.48335496", "0.48297736", "0.48232314", "0.48210824", "0.48146397", "0.48101798", "0.48087603", "0.48085776", "0.4808473", "0.48063943" ]
0.64484954
8
To control the printer performing paper feed and cut paper finally
public void feedAndCut() throws IOException { feed(); cut(); writer.flush(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void print() {\n DocFlavor flavor = DocFlavor.BYTE_ARRAY.AUTOSENSE;\n \n //Aca obtenemos el servicio de impresion por default\n //Si no quieres ver el dialogo de seleccionar impresora usa esto\n //PrintService defaultService = PrintServiceLookup.lookupDefaultPrintService();\n \n \n //Con esto mostramos el dialogo para seleccionar impresora\n //Si quieres ver el dialogo de seleccionar impresora usalo\n //Solo mostrara las impresoras que soporte arreglo de bits\n PrintRequestAttributeSet pras = new HashPrintRequestAttributeSet();\n PrintService printService[] = PrintServiceLookup.lookupPrintServices(flavor, pras);\n PrintService defaultService = PrintServiceLookup.lookupDefaultPrintService();\n PrintService service = ServiceUI.printDialog(null, 700, 200, printService, defaultService, flavor, pras);\n \n //Creamos un arreglo de tipo byte\n byte[] bytes;\n\n //Aca convertimos el string(cuerpo del ticket) a bytes tal como\n //lo maneja la impresora(mas bien ticketera :p)\n bytes = this.contenidoFactura.getBytes();\n //Creamos un documento a imprimir, a el se le appendeara\n //el arreglo de bytes\n Doc doc = new SimpleDoc(bytes,flavor,null);\n \n //Creamos un trabajo de impresión\n DocPrintJob job = service.createPrintJob();\n\n //Imprimimos dentro de un try de a huevo\n try {\n //El metodo print imprime\n job.print(doc, null);\n \n } catch (Exception er) {\n JOptionPane.showMessageDialog(null,\"Error al imprimir: \" + er.getMessage());\n }\n DocPrintJob cutjob = service.createPrintJob();\n DocPrintJob spacejob = service.createPrintJob();\n //dejando espacios al final\n byte[] espacio = (\"\\n \\n \\n \\n\").getBytes();\n try{\n spacejob.print(new SimpleDoc(espacio,flavor,null),null);\n }\n catch (Exception er) {\n JOptionPane.showMessageDialog(null,\"Error al imprimir: \" + er.getMessage());\n }\n //cortando el papel\n try{\n byte[] cutP = new byte[] { 0x1d, 'V', 1 };\n cutjob.print(new SimpleDoc(cutP,flavor,null),null); \n }catch (Exception er) {\n JOptionPane.showMessageDialog(null,\"Error al imprimir: \" + er.getMessage());\n }\n \n }", "public void actionPerformed(ActionEvent e){\n if (e.getSource() instanceof JButton) {\r\n PrinterJob printJob = PrinterJob.getPrinterJob();\r\n PageFormat pf = new PageFormat();\r\n pf.setOrientation(PageFormat.LANDSCAPE);\r\n printJob.setPrintable(_instance, pf);\r\n //if (printJob.printDialog()) {\r\n try {\r\n printJob.print();\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n //}\r\n }\r\n }", "public void doPrint() {\n printBehavior.printReceipt();\n\n }", "public void startPrinting()\n {\n printerSimulator.startPrintingProcess();\n }", "private void actionPrint() {\n // get PrinterJob\n PrinterJob job = PrinterJob.getPrinterJob();\n MyPrintable printable = new MyPrintable(job.defaultPage(), layoutPanel);\n\n // setup Printable, Pageable\n job.setPrintable(printable);\n job.setPageable(printable);\n\n // display print dialog and print\n if (job.printDialog()) {\n try {\n job.print();\n } catch (PrinterException e) {\n e.printStackTrace();\n }\n }\n }", "@Test\n public void canRefillPaper(){\n printer.print(10,2);\n printer.print(10,2);\n printer.refillPaper();\n assertEquals(250, printer.getSheets());\n }", "public void actionPerformed(ActionEvent e) {\n \t\tPrinterJob job = PrinterJob.getPrinterJob();\n \t\tjob.setPrintable(this);\n \t\tboolean ok = job.printDialog();\n \t\tif (ok) {\n \t\t\ttry {\n \t\t\t\tjob.print();\n \t\t\t} catch (PrinterException ex) {\n \t\t\t\t/* The job did not successfully complete */\n \t\t\t}\n \t\t}\n \n \t}", "public void PrinterStatus(){\n PrintService[] services = PrintServiceLookup.lookupPrintServices(null, null);\n System.out.println(\"Printer Services found:\");\n printService(services);\n\n // Look up the default print service\n PrintService service = PrintServiceLookup.lookupDefaultPrintService();\n if (service!=null) {\n System.out.println(\"Default Printer Service found:\");\n System.out.println(\"t\" + service);\n }\n\n\t\n // find printer service by name\n AttributeSet aset_name = new HashAttributeSet();\n aset_name.add(new PrinterName(\"Microsoft XPS Document Writer\", null));\n services = PrintServiceLookup.lookupPrintServices(null, aset_name);\n\n System.out.println(\"Printer Service Microsoft XPS Document Writer:\");\n printService(services);\n \n // find printer service by ip\n PrintServiceAttributeSet aset_URI = new HashPrintServiceAttributeSet();\n try {\n aset_URI.add(new PrinterURI(new URI(\"this ipp is wrong --ipp://hostName/printerName\")));\n } catch (URISyntaxException e) {\n System.out.println(\"URI exception caught: \"+e);\n }\n services = PrintServiceLookup.lookupPrintServices(null,aset_URI); \n // null could be replaced by DocFlavor.INPUT_STREAM.POSTSCRIPT, etc...\n System.out.println(\"Printer specific URI :\");\n printService(services);\n \n /*\n //another way to print to a specific uri\n URI printerURI = null;\n try {\n printerURI = new URI(\"ipp://SERVER:631/printers/PRINTER_NAME\");\n } catch (URISyntaxException ex) {\n Logger.getLogger(PrinterStatus.class.getName()).log(Level.SEVERE, null, ex);\n }\n IppPrintService svc = new IppPrintService(printerURI);\n services = PrintServiceLookup.lookupPrintServices(null,aset_URI); \n // null could be replaced by DocFlavor.INPUT_STREAM.POSTSCRIPT, etc...\n System.out.println(\"Printer specific URI :\");\n printService(services);\n // following is the way to print sth in a format of flavor\n InputStream stream = new BufferedInputStream(new FileInputStream(\"image.epl\"));\n DocFlavor flavor = DocFlavor.INPUT_STREAM.AUTOSENSE;\n Doc myDoc = new SimpleDoc(stream, flavor, null);\n DocPrintJob job = svc.createPrintJob();\n job.print(myDoc, null);\n */\n \n /*\n // find services that support a particular input format (e.g. JPEG)\n services = PrintServiceLookup.lookupPrintServices(DocFlavor.INPUT_STREAM.JPEG, null);\n System.out.println(\"Printer Services with JPEG support:\");\n printService(services);\n\n //find services that support a set of print job capabilities (e.g. color)\n aset = new HashAttributeSet();\n aset.add(ColorSupported.SUPPORTED);\n services = PrintServiceLookup.lookupPrintServices(null, aset);\n\n System.out.println(\"Printer Services with color support:\");\n printService(services);\n */ \n }", "@Override\n public void onPrinterAvailable(int flag) {\n Logger.i(TAG, \"working till here printer available!\");\n\n if (flag == 2) {\n// btn_PrintBill.setEnabled(false);\n// btn_Reprint.setEnabled(false);\n SetPrinterAvailable(false);\n } else if (flag == 5) {\n// btn_PrintBill.setEnabled(true);\n// btn_Reprint.setEnabled(true);\n// feedPrinter();\n SetPrinterAvailable(true);\n } else if (flag == 0) {\n// btn_PrintBill.setEnabled(true);\n// btn_Reprint.setEnabled(true);\n SetPrinterAvailable(false);\n }\n }", "public void printTest(){\n\r\n p.resetAll();\r\n p.initialize();\r\n p.feedBack((byte)2);\r\n// p.color(1);\r\n p.alignCenter();\r\n p.setText(\"The Dum Dum Name\");\r\n p.newLine();\r\n p.setText(\"Restaurant Dining\");\r\n p.newLine();\r\n p.addLineSeperator();\r\n p.newLine();\r\n p.setText(\"Bling Bling\");\r\n p.newLine();\r\n p.addLineSeperator();\r\n p.newLine();\r\n\r\n p.alignLeft();\r\n p.setText(\"POD No \\t\\t: 2001 \\t\\t Table \\t: E511\");\r\n p.newLine(); \r\n\r\n p.setText(\"Res Date \\t: \" + \"01/01/1801 22:59\");\r\n\r\n p.newLine();\r\n p.setText(\"Session \\t: Evening Session\");\r\n p.newLine();\r\n p.setText(\"Staff \\t\\t: Bum Dale\");\r\n p.newLine();\r\n p.addLineSeperator();\r\n p.newLine();\r\n p.alignCenter();\r\n p.setText(\" - Some Items - \");\r\n p.newLine();\r\n p.alignLeft();\r\n p.addLineSeperator();\r\n\r\n p.newLine();\r\n\r\n p.setText(\"No \\tItem\\t\\tUnit\\tQty\");\r\n p.newLine();\r\n p.addLineSeperator();\r\n \r\n p.newLine();\r\n p.setText(\"1\" + \"\\t\" + \"Aliens Everywhere\" + \"\\t\" + \"Rats\" + \"\\t\" + \"500\");\r\n p.newLine();\r\n p.setText(\"1\" + \"\\t\" + \"Aliens Everywhere\" + \"\\t\" + \"Rats\" + \"\\t\" + \"500\");\r\n p.newLine();\r\n p.setText(\"1\" + \"\\t\" + \"Aliens Everywhere\" + \"\\t\" + \"Rats\" + \"\\t\" + \"500\");\r\n p.newLine();\r\n p.setText(\"1\" + \"\\t\" + \"Aliens Everywhere\" + \"\\t\" + \"Rats\" + \"\\t\" + \"500\");\r\n p.newLine();\r\n p.setText(\"1\" + \"\\t\" + \"Aliens Everywhere\" + \"\\t\" + \"Rats\" + \"\\t\" + \"500\");\r\n p.newLine();\r\n p.setText(\"1\" + \"\\t\" + \"Aliens Everywhere\" + \"\\t\" + \"Rats\" + \"\\t\" + \"500\");\r\n p.newLine();\r\n \r\n p.addLineSeperator();\r\n p.feed((byte)3);\r\n p.finit();\r\n\r\n p.feedPrinter(p.finalCommandSet().getBytes());\r\n \r\n }", "@Override\r\n\tpublic void setPrinter(IPrinter printer) {\n\r\n\t}", "public void doPrint()\n {\n PrinterJob printJob = PrinterJob.getPrinterJob();\n \n printJob.setPrintable((Printable) mapComponent);\n if (printJob.printDialog()) {\n try {\n printJob.print();\n } catch (Exception e) {\n ErrorHandler.displayError(\"An error occured during printing:\\n\" + e, ErrorHandler.ERR_PRINT_FAIL);\n }\n }\n }", "public void savingsReceipPrint(List receiptDetails,Component c) {\n \np.resetAll();\n\np.initialize();\n\np.feedBack((byte)2);\n\n//p.color(0);\n//p.chooseFont(1);\np.alignCenter();\n//p.emphasized(true);\n//p.underLine(2);\np.setText(receiptDetails.get(1).toString());\np.newLine();\np.setText(receiptDetails.get(2).toString());\np.newLine();\np.setText(receiptDetails.get(3).toString());\np.newLine();\np.newLine();\n//p.addLineSeperatorX();\np.underLine(0);\np.emphasized(false);\np.underLine(0);\np.alignCenter();\np.setText(\" *** Savings Made Receipt ***\");\np.newLine();\np.addLineSeperator();\np.newLine();\n\np.alignLeft();\np.setText(\"Account Number: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(9).toString()+p.underLine(0));\np.newLine(); \np.alignLeft();\np.setText(\"Savings Id: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(0).toString()+p.underLine(0));\np.newLine(); \np.alignLeft();\np.emphasized(true);\np.setText(\"Customer: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(4).toString()+p.underLine(0));\np.newLine(); \n//p.emphasized(false);\n//p.setText(\"Loan+Interest: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(6).toString()+\"/=\"+p.underLine(0));\n//p.newLine();\n//p.setText(\"Date Taken: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(7).toString()+p.underLine(0));\n//p.newLine();\n//p.setText(\"Loan Status: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(14).toString()+p.underLine(0));\n//p.newLine();\np.setText(\"Savings Date: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(10).toString()+p.underLine(0));\np.newLine();\np.setText(\"Savings Time: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(11).toString()+p.underLine(0));\np.newLine();\n\np.underLine(0);\np.emphasized(false);\n//p.underLine(0);\np.addLineSeperator();\np.newLine();\np.alignCenter();\np.setText(\"***** Savings Details ***** \");\np.newLine();\np.addLineSeperator();\np.newLine();\n\np.alignLeft();\np.setText(\"Savings Made: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(6).toString()+\"/=\"+p.underLine(0));\np.newLine(); \np.alignLeft();\np.setText(\"Savings Balance: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(8).toString()+\"/=\"+p.underLine(0));\np.newLine(); \np.alignLeft();\np.emphasized(true);\n//p.setText(\"Customer Name: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(4).toString()+p.underLine(0));\n//p.newLine(); \n//p.emphasized(false);\n\np.addLineSeperator();\np.doubleStrik(true);\np.newLine();\np.underLine(2) ;\np.setText(\"Officer: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(5).toString()+p.underLine(0));\np.newLine();\np.addLineSeperatorX();\n\np.addLineSeperator();\np.doubleStrik(true);\np.newLine();\np.underLine(2) ;\np.setText(\"Officer Signiture:\");\np.addLineSeperatorX();\np.newLine();\np.addLineSeperator();\np.doubleStrik(true);\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\np.underLine(2) ;\np.setText(\"Customer Signiture:\");\np.addLineSeperatorX();\np.newLine();\np.setText(\"OFFICE NUMBER: \"+receiptDetails.get(12).toString());\n////p.newLine();\n//p.addLineSeperatorX();\np.feed((byte)3);\np.finit();\n\nprint.feedPrinter(dbq.printDrivers(c),p.finalCommandSet().getBytes());\n \n\n }", "public void TesteCompleto() {\n\n\n TectoySunmiPrint.getInstance().initPrinter();\n TectoySunmiPrint.getInstance().setSize(24);\n\n // Alinhamento do texto\n\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_CENTER);\n TectoySunmiPrint.getInstance().printText(\"Alinhamento\\n\");\n TectoySunmiPrint.getInstance().printText(\"--------------------------------\\n\");\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_LEFT);\n TectoySunmiPrint.getInstance().printText(\"TecToy Automação\\n\");\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_CENTER);\n TectoySunmiPrint.getInstance().printText(\"TecToy Automação\\n\");\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_RIGTH);\n TectoySunmiPrint.getInstance().printText(\"TecToy Automação\\n\");\n\n // Formas de impressão\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_CENTER);\n TectoySunmiPrint.getInstance().printText(\"Formas de Impressão\\n\");\n TectoySunmiPrint.getInstance().printText(\"--------------------------------\\n\");\n TectoySunmiPrint.getInstance().setSize(28);\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_LEFT);\n TectoySunmiPrint.getInstance().printStyleBold(true);\n TectoySunmiPrint.getInstance().printText(\"TecToy Automação\\n\");\n TectoySunmiPrint.getInstance().printStyleReset();\n TectoySunmiPrint.getInstance().printStyleAntiWhite(true);\n TectoySunmiPrint.getInstance().printText(\"TecToy Automação\\n\");\n TectoySunmiPrint.getInstance().printStyleReset();\n TectoySunmiPrint.getInstance().printStyleDoubleHeight(true);\n TectoySunmiPrint.getInstance().printText(\"TecToy Automação\\n\");\n TectoySunmiPrint.getInstance().printStyleReset();\n TectoySunmiPrint.getInstance().printStyleDoubleWidth(true);\n TectoySunmiPrint.getInstance().printText(\"TecToy Automação\\n\");\n TectoySunmiPrint.getInstance().printStyleReset();\n TectoySunmiPrint.getInstance().printStyleInvert(true);\n TectoySunmiPrint.getInstance().printText(\"TecToy Automação\\n\");\n TectoySunmiPrint.getInstance().printStyleReset();\n TectoySunmiPrint.getInstance().printStyleItalic(true);\n TectoySunmiPrint.getInstance().printText(\"TecToy Automação\\n\");\n TectoySunmiPrint.getInstance().printStyleReset();\n TectoySunmiPrint.getInstance().printStyleStrikethRough(true);\n TectoySunmiPrint.getInstance().printText(\"TecToy Automação\\n\");\n TectoySunmiPrint.getInstance().printStyleReset();\n TectoySunmiPrint.getInstance().printStyleUnderLine(true);\n TectoySunmiPrint.getInstance().printText(\"TecToy Automação\\n\");\n TectoySunmiPrint.getInstance().printStyleReset();\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_LEFT);\n TectoySunmiPrint.getInstance().printTextWithSize(\"TecToy Automação\\n\", 35);\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_CENTER);\n TectoySunmiPrint.getInstance().printTextWithSize(\"TecToy Automação\\n\", 28);\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_RIGTH);\n TectoySunmiPrint.getInstance().printTextWithSize(\"TecToy Automação\\n\",50);\n // TectoySunmiPrint.getInstance().feedPaper();\n TectoySunmiPrint.getInstance().setSize(24);\n\n\n // Impressão de BarCode\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_CENTER);\n TectoySunmiPrint.getInstance().printText(\"Imprime BarCode\\n\");\n TectoySunmiPrint.getInstance().printText(\"--------------------------------\\n\");\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_LEFT);\n TectoySunmiPrint.getInstance().printBarCode(\"7894900700046\", TectoySunmiPrint.BarCodeModels_EAN13, 162, 2,\n TectoySunmiPrint.BarCodeTextPosition_INFORME_UM_TEXTO);\n TectoySunmiPrint.getInstance().printAdvanceLines(2);\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_CENTER);\n TectoySunmiPrint.getInstance().printBarCode(\"7894900700046\", TectoySunmiPrint.BarCodeModels_EAN13, 162, 2,\n TectoySunmiPrint.BarCodeTextPosition_ABAIXO_DO_CODIGO_DE_BARRAS);\n TectoySunmiPrint.getInstance().printAdvanceLines(2);\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_RIGTH);\n TectoySunmiPrint.getInstance().printBarCode(\"7894900700046\", TectoySunmiPrint.BarCodeModels_EAN13, 162, 2,\n TectoySunmiPrint.BarCodeTextPosition_ACIMA_DO_CODIGO_DE_BARRAS_BARCODE);\n TectoySunmiPrint.getInstance().printAdvanceLines(2);\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_CENTER);\n TectoySunmiPrint.getInstance().printBarCode(\"7894900700046\", TectoySunmiPrint.BarCodeModels_EAN13, 162, 2,\n TectoySunmiPrint.BarCodeTextPosition_ACIMA_E_ABAIXO_DO_CODIGO_DE_BARRAS);\n //TectoySunmiPrint.getInstance().feedPaper();\n TectoySunmiPrint.getInstance().print3Line();\n // Impressão de BarCode\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_CENTER);\n TectoySunmiPrint.getInstance().printText(\"Imprime QrCode\\n\");\n TectoySunmiPrint.getInstance().printText(\"--------------------------------\\n\");\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_LEFT);\n TectoySunmiPrint.getInstance().printQr(\"www.tectoysunmi.com.br\", 8, 1);\n //TectoySunmiPrint.getInstance().feedPaper();\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_CENTER);\n TectoySunmiPrint.getInstance().printQr(\"www.tectoysunmi.com.br\", 8, 1);\n //TectoySunmiPrint.getInstance().feedPaper();\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_RIGTH);\n TectoySunmiPrint.getInstance().printQr(\"www.tectoysunmi.com.br\", 8, 1);\n //TectoySunmiPrint.getInstance().feedPaper();\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_LEFT);\n TectoySunmiPrint.getInstance().printDoubleQRCode(\"www.tectoysunmi.com.br\",\"tectoysunmi\", 7, 1);\n //TectoySunmiPrint.getInstance().feedPaper();\n\n\n // Impresão Imagem\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_CENTER);\n TectoySunmiPrint.getInstance().printText(\"Imprime Imagem\\n\");\n TectoySunmiPrint.getInstance().printText(\"-------------------------------\\n\");\n BitmapFactory.Options options = new BitmapFactory.Options();\n options.inTargetDensity = 160;\n options.inDensity = 160;\n Bitmap bitmap1 = null;\n Bitmap bitmap = null;\n if (bitmap == null) {\n bitmap = BitmapFactory.decodeResource(getResources(), test, options);\n }\n if (bitmap1 == null) {\n bitmap1 = BitmapFactory.decodeResource(getResources(), test1, options);\n bitmap1 = scaleImage(bitmap1);\n }\n TectoySunmiPrint.getInstance().printBitmap(bitmap1);\n //TectoySunmiPrint.getInstance().feedPaper();\n TectoySunmiPrint.getInstance().print3Line();\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_LEFT);\n TectoySunmiPrint.getInstance().printBitmap(bitmap1);\n //TectoySunmiPrint.getInstance().feedPaper();\n TectoySunmiPrint.getInstance().print3Line();\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_RIGTH);\n TectoySunmiPrint.getInstance().printBitmap(bitmap1);\n //TectoySunmiPrint.getInstance().feedPaper();\n TectoySunmiPrint.getInstance().print3Line();\n\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_CENTER);\n TectoySunmiPrint.getInstance().printText(\"Imprime Tabela\\n\");\n TectoySunmiPrint.getInstance().printText(\"--------------------------------\\n\");\n\n String[] prod = new String[3];\n int[] width = new int[3];\n int[] align = new int[3];\n\n width[0] = 100;\n width[1] = 50;\n width[2] = 50;\n\n align[0] = TectoySunmiPrint.Alignment_LEFT;\n align[1] = TectoySunmiPrint.Alignment_CENTER;\n align[2] = TectoySunmiPrint.Alignment_RIGTH;\n\n prod[0] = \"Produto 001\";\n prod[1] = \"10 und\";\n prod[2] = \"3,98\";\n TectoySunmiPrint.getInstance().printTable(prod, width, align);\n\n prod[0] = \"Produto 002\";\n prod[1] = \"10 und\";\n prod[2] = \"3,98\";\n TectoySunmiPrint.getInstance().printTable(prod, width, align);\n\n prod[0] = \"Produto 003\";\n prod[1] = \"10 und\";\n prod[2] = \"3,98\";\n TectoySunmiPrint.getInstance().printTable(prod, width, align);\n\n prod[0] = \"Produto 004\";\n prod[1] = \"10 und\";\n prod[2] = \"3,98\";\n TectoySunmiPrint.getInstance().printTable(prod, width, align);\n\n prod[0] = \"Produto 005\";\n prod[1] = \"10 und\";\n prod[2] = \"3,98\";\n TectoySunmiPrint.getInstance().printTable(prod, width, align);\n\n prod[0] = \"Produto 006\";\n prod[1] = \"10 und\";\n prod[2] = \"3,98\";\n TectoySunmiPrint.getInstance().printTable(prod, width, align);\n\n TectoySunmiPrint.getInstance().print3Line();\n TectoySunmiPrint.getInstance().openCashBox();\n TectoySunmiPrint.getInstance().cutpaper();\n\n }", "public void print() { /* FILL IN */ }", "public void savingsWithdrawReceipPrint(List receiptDetails,Component c) {\n \np.resetAll();\n\np.initialize();\n\np.feedBack((byte)2);\n\np.color(0);\np.chooseFont(1);\np.alignCenter();\n//p.emphasized(true);\n//p.underLine(2);\np.setText(receiptDetails.get(1).toString());\np.newLine();\np.setText(receiptDetails.get(2).toString());\np.newLine();\np.setText(receiptDetails.get(3).toString());\np.newLine();\np.newLine();\n//p.addLineSeperatorX();\np.underLine(0);\np.emphasized(false);\np.underLine(0);\np.alignCenter();\np.setText(\" *** Savings Withdrawal ***\");\np.newLine();\np.addLineSeperator();\np.newLine();\n\np.alignLeft();\np.setText(\"Account Number: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(9).toString()+p.underLine(0));\np.newLine(); \np.alignLeft();\np.setText(\"Savings Id: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(0).toString()+p.underLine(0));\np.newLine(); \np.alignLeft();\np.emphasized(true);\np.setText(\"Customer: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(4).toString()+p.underLine(0));\np.newLine(); \n//p.emphasized(false);\n//p.setText(\"Loan+Interest: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(6).toString()+\"/=\"+p.underLine(0));\n//p.newLine();\n//p.setText(\"Date Taken: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(7).toString()+p.underLine(0));\n//p.newLine();\n//p.setText(\"Loan Status: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(14).toString()+p.underLine(0));\n//p.newLine();\np.setText(\"Withdrawal Date: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(10).toString()+p.underLine(0));\np.newLine();\np.setText(\"Withdrawal Time: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(11).toString()+p.underLine(0));\np.newLine();\n\np.underLine(0);\np.emphasized(false);\n//p.underLine(0);\np.addLineSeperator();\np.newLine();\np.alignCenter();\np.setText(\"***** Withdrawal Details ***** \");\np.newLine();\np.addLineSeperator();\np.newLine();\n\np.alignLeft();\np.setText(\"Withdrawal Made: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(7).toString()+\"/=\"+p.underLine(0));\np.newLine(); \np.alignLeft();\np.setText(\"Savings Balance: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(8).toString()+\"/=\"+p.underLine(0));\np.newLine(); \np.alignLeft();\np.emphasized(true);\n//p.setText(\"Customer Name: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(4).toString()+p.underLine(0));\n//p.newLine(); \n//p.emphasized(false);\n\np.addLineSeperator();\np.doubleStrik(true);\np.newLine();\np.underLine(2) ;\np.setText(\"Officer: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(5).toString()+p.underLine(0));\np.newLine();\np.addLineSeperatorX();\n\np.addLineSeperator();\np.doubleStrik(true);\np.newLine();\np.underLine(2) ;\np.setText(\"Officer Signiture:\");\np.addLineSeperatorX();\np.newLine();\np.addLineSeperator();\np.doubleStrik(true);\n//p.newLine();\np.underLine(2) ;\np.setText(\"Customer Signiture:\");\np.addLineSeperatorX();\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\np.newLine();\np.setText(\"OFFICE NUMBER: \"+receiptDetails.get(12).toString());\n\np.newLine();\np.addLineSeperatorX();\n//p.newLine();\np.feed((byte)3);\np.finit();\n\nprint.feedPrinter(dbq.printDrivers(c),p.finalCommandSet().getBytes());\n \n\n }", "public void exePRINT()\n\t{\n\t\tif(!vldDATA())\n\t\t\treturn;\n\t\t\n\t\ttry\n\t\t{\n\t\t\tif(M_rdbHTML.isSelected())\n\t\t\t\tstrFILNM = cl_dat.M_strREPSTR_pbst+\"mr_rpexd.html\";\n\t\t\telse\n\t\t\t\tstrFILNM = cl_dat.M_strREPSTR_pbst+\"mr_rpexd.doc\";\n\n\t\t\tgetDATA();\n\t\t\t\n\t\t/*\tif(intRECCT == 0)\n\t\t\t{\t\n\t\t\t\tsetMSG(\"No Data found..\",'E');\n\t\t\t\treturn;\n\t\t\t}*/\n\t\t\tif(cl_dat.M_cmbOPTN_pbst.getSelectedItem().toString().equals(cl_dat.M_OPPRN_pbst))\n\t\t\t{\t\t\t\t\t\n\t\t\t\tif (M_rdbTEXT.isSelected())\n\t\t\t\t doPRINT(strFILNM);\n\t\t\t\telse \n\t\t\t\t{ \n\t\t\t\t\tRuntime r = Runtime.getRuntime();\n\t\t\t\t\tProcess p = null;\t\t\t\t\t\n\t\t\t\t\tp = r.exec(\"c:\\\\windows\\\\iexplore.exe \"+strFILNM); \n\t\t\t\t\tsetMSG(\"For Printing Select File Menu, then Print ..\",'N');\n\t\t\t\t} \n\t\t\t}\n\t\t\telse if(cl_dat.M_cmbOPTN_pbst.getSelectedItem().toString().equals(cl_dat.M_OPSCN_pbst))\n\t\t\t{\n\t\t\t Runtime r = Runtime.getRuntime();\n\t\t\t\tProcess p = null;\n\t\t\t\t\t\n\t\t\t\tif(M_rdbHTML.isSelected())\n\t\t\t\t p = r.exec(\"c:\\\\windows\\\\iexplore.exe \"+strFILNM); \n\t\t\t\telse\n\t\t\t\t p = r.exec(\"c:\\\\windows\\\\wordpad.exe \"+strFILNM);\n\t\t\t}\n\t\t\telse if(cl_dat.M_cmbDESTN_pbst.getSelectedItem().toString().trim().equals(cl_dat.M_OPEML_pbst))\n\t\t\t{\t\t\t\n\t\t\t\tcl_eml ocl_eml = new cl_eml();\t\t\t\t \n\t\t\t for(int i=0;i<M_cmbDESTN.getItemCount();i++)\n\t\t\t {\n\t\t\t\t ocl_eml.sendfile(M_cmbDESTN.getItemAt(i).toString().trim(),strFILNM,\"Export Certificate\",\" \");\n\t\t\t\t setMSG(\"File Sent to \" + M_cmbDESTN.getItemAt(i).toString().trim() + \" Successfuly \",'N');\t\t\t\t \n\t\t\t\t}\t\t\t\t \t \t\n\t\t\t}\n\t\t}\n\t\tcatch(Exception L_EX)\n\t\t{\n\t\t\tsetMSG(L_EX,\"exePRINT\");\n\t\t}\t\t\n\t}", "public void replenishPaperTray()\n {\n printerSimulator.replenishPaperTray (\n Printer.PAPER_STACK_SIZE );\n }", "public void changePrintingAll()\n {\n printingAll = !printingAll;\n }", "private void doPrint() {\n PrintManager printManager = (PrintManager) this\n .getSystemService(Context.PRINT_SERVICE);\n\n // Set job name, which will be displayed in the print queue\n String jobName = this.getString(R.string.app_name) + \" Document\";\n\n // Start a print job, passing in a PrintDocumentAdapter implementation\n // to handle the generation of a print document\n printManager.print(jobName, new MyPrintDocumentAdapter(this),\n null); //\n }", "private void realPrint(PrintJob job) {\n\t}", "private void realPrint(PrintJob job) {\n\t}", "private void doPrintAdvice(){\n\t\tcurrentStep = OPERATION_NAME+\": printing advice\";\n\t\tString[] toDisplay = {\n\t\t\t\t\"Operation succeeded!\",\n\t\t\t\t\"You have changed your password\",\n\t\t\t\t\"Press 1 -> Print the advice\",\n\t\t\t\t\"Press 2 -> Quit without printing\"\n\t\t};\n\t\tif (!_atmssHandler.doDisDisplayUpper(toDisplay)) {\n\t\t\trecord(\"Dis\");\n\t\t\treturn;\n\t\t}\n\t\twhile (true) {\n\t\t\tString userInput = _atmssHandler.doKPGetSingleInput(TIME_LIMIT);\n\t\t\tif (userInput == null) return;\n\t\t\tif (userInput.equals(\"1\")) {\n\t\t\t\tString[] toPrint = {\n\t\t\t\t\t\t\"Operation name: \" + OPERATION_NAME,\n\t\t\t\t\t\t\"Card Number: \" + _session.getCardNo(),\n\t\t\t\t\t\t\"Result: succeeded\"\n\t\t\t\t};\n\t\t\t\tif (!_atmssHandler.doAPPrintStrArray(toPrint)) record(\"AP\");\n\t\t\t\treturn;\n\t\t\t} else if (userInput.equals(\"2\")) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) {\r\n\t\t// Workaround for SWT bug on GTK - force SWT to initialize so we don't\r\n\t\t// crash.\r\n\t\tDisplay.getDefault();\r\n\r\n\t\tPaperClips.print(new PrintJob(\"BreakPrintExample.java\", createPrint()),\r\n\t\t\t\tnew PrinterData());\r\n\t}", "public void stop()\n {\n printerSimulator.stop();\n }", "public void setToPrint(Boolean toPrint) {\r\n this.toPrint = toPrint;\r\n }", "private void draw (String printable, StringBuffer canvas) {\r\n \t\t\tcanvas.append(\"| \");\r\n \t\t\t\r\n \t\t\tcanvas.append(printable);\r\n \t\t\tfor (int i=printable.length(); i<width-4; i++) //Fill in the spaces.\r\n \t\t\t{\r\n \t\t\t\tcanvas.append(' ');\r\n \t\t\t}\r\n \t\t\tcanvas.append(\" |\\n\");\r\n \t\t}", "public void print() {\n\t\tPrinter.print(doPrint());\n\t}", "@SuppressWarnings(\"unchecked\")\n\tprivate static void breakPrinterMenuLogic() {\n\t\t\n\t\tmenuHandler.prettyPrintPrinters(printers, 1);\n\t\tint printerChoice = menuHandler.intRangeInput(\"Please input a number in range [0, \" + (printers.size() - 1) + \"]\", 0, printers.size() - 1);\n\n\t\tPrinter printer = printers.get(\"Printer\" + printerChoice);\n\t\tVDMSet breakSet = new VDMSet();\n\t\t\n\t\t// Ask what to break for each of the printer's capabilities\n\t\tif(printer.getPrinterCapabilities().getCanPrintA4()) {\n\t\t\tif(menuHandler.inputYesNo(\"Empty A4 paper stock? [y/n]\")) breakSet.add(\"needA4\");\n\t\t}\n\t\t\n\t\tif(printer.getPrinterCapabilities().getCanPrintA3()) {\n\t\t\tif(menuHandler.inputYesNo(\"Empty A3 paper stock? [y/n]\")) breakSet.add(\"needA3\");\n\t\t}\n\t\t\n\t\tif(printer.getPrinterCapabilities().getCanPrintBlack()) {\n\t\t\tif(menuHandler.inputYesNo(\"Empty black toner stock? [y/n]\")) breakSet.add(\"needBlackToner\");\n\t\t}\n\t\t\n\t\tif(printer.getPrinterCapabilities().getCanPrintColor()) {\n\t\t\tif(menuHandler.inputYesNo(\"Empty color toner stock? [y/n]\")) breakSet.add(\"needColorToner\");\n\t\t}\n\t\t\n\t\tif(printer.getPrinterStatus().getStatus().contains(\"operational\")) {\n\t\t\tif(menuHandler.inputYesNo(\"Create malfunction in printer? [y/n]\")) breakSet.add(\"needFixing\");\n\t\t}\n\t\t\n\t\tprinter.break_(breakSet);\n\t}", "private static void createPrinterMenuLogic() {\n\n\t\tmenuHandler.clrscr();\n\n\t\t// Printer name\n\t\tString printerName = menuHandler.inputString(\"Please input the printer name (cannot be empty)\");\n\n\t\t// Printer paper format\n\t\tSystem.out.println(\"Select printer paper format capabilities\");\n\t\tint maxChoice = menuHandler.printerFormatMenu();\n\t\tint formatChoice = menuHandler.intRangeInput(\"Please input a number in range [1, \" + maxChoice + \"]\", 1, maxChoice);\n\n\t\t// Printer toner\n\t\tSystem.out.println(\"Select printer toner capabilities\");\n\t\tmaxChoice = menuHandler.printerTonerMenu();\n\t\tint tonerChoice = menuHandler.intRangeInput(\"Please input a number in range [1, \" + maxChoice + \"]\", 1, maxChoice);\n\n\t\t// Parse user choices and create printer capabilities object\n\t\tBoolean[] bools = parsePrinterCapabilities(formatChoice, tonerChoice);\n\t\tPrinterCapability printerCapability = objectHandler.createPrinterCapability(bools[canPrintA4], bools[canPrintA3], bools[canPrintBlack], bools[canPrintColor]);\n\n\t\t// Ask user about pricing and create printer pricing object\n\t\tPrinterPricing printerPricing = createPrinterPricing(bools);\n\n\t\t// Ask user about capacity and create printer capacity object\n\t\tPrinterCapacity printerCapacity = createPrinterCapacity(bools);\n\n\t\tprinters.put(\"Printer\" + printers.size(), objectHandler.createPrinter(printerName, printerCapability, printerPricing, printerCapacity, objectHandler.createPrinterStatus()));\n\t}", "public void savingsReceipPrintStamp(List receiptDetails,Component c) {\n \np.resetAll();\n\np.initialize();\n\np.feedBack((byte)2);\n\n//p.color(0);\n//p.chooseFont(1);\np.alignCenter();\n//p.emphasized(true);\n//p.underLine(2);\np.setText(receiptDetails.get(1).toString());\np.newLine();\np.setText(receiptDetails.get(2).toString());\np.newLine();\np.setText(receiptDetails.get(3).toString());\np.newLine();\np.newLine();\n//p.addLineSeperatorX();\np.underLine(0);\np.emphasized(false);\np.underLine(0);\np.alignCenter();\np.setText(\" *** Savings Made Receipt ***\");\np.newLine();\np.addLineSeperator();\np.newLine();\n\np.alignLeft();\np.setText(\"Account Number: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(9).toString()+p.underLine(0));\np.newLine(); \np.alignLeft();\np.setText(\"Savings Id: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(0).toString()+p.underLine(0));\np.newLine(); \np.alignLeft();\np.emphasized(true);\np.setText(\"Customer: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(4).toString()+p.underLine(0));\np.newLine(); \n//p.emphasized(false);\n//p.setText(\"Loan+Interest: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(6).toString()+\"/=\"+p.underLine(0));\n//p.newLine();\n//p.setText(\"Date Taken: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(7).toString()+p.underLine(0));\n//p.newLine();\n//p.setText(\"Loan Status: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(14).toString()+p.underLine(0));\n//p.newLine();\np.setText(\"Savings Date: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(10).toString()+p.underLine(0));\np.newLine();\np.setText(\"Savings Time: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(11).toString()+p.underLine(0));\np.newLine();\n\np.underLine(0);\np.emphasized(false);\n//p.underLine(0);\np.addLineSeperator();\np.newLine();\np.alignCenter();\np.setText(\"***** Savings Details ***** \");\np.newLine();\np.addLineSeperator();\np.newLine();\n\np.alignLeft();\np.setText(\"Savings Made: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(6).toString()+\"/=\"+p.underLine(0));\np.newLine(); \np.alignLeft();\np.setText(\"Savings Balance: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(8).toString()+\"/=\"+p.underLine(0));\np.newLine(); \np.alignLeft();\np.emphasized(true);\n//p.setText(\"Customer Name: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(4).toString()+p.underLine(0));\n//p.newLine(); \n//p.emphasized(false);\n\np.addLineSeperator();\np.doubleStrik(true);\np.newLine();\np.underLine(2) ;\np.setText(\"Officer: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(5).toString()+p.underLine(0));\np.newLine();\np.addLineSeperatorX();\n\np.addLineSeperator();\np.doubleStrik(true);\np.newLine();\np.underLine(2) ;\np.setText(\"Officer Signiture:\");\np.addLineSeperatorX();\np.newLine();\np.addLineSeperator();\np.doubleStrik(true);\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.underLine(2) ;\np.setText(\"Customer Signiture:\");\np.addLineSeperatorX();\np.newLine();\n//p.setText(\"OFFICE NUMBER: \"+receiptDetails.get(12).toString());\n////p.newLine();\n//p.addLineSeperatorX();\np.feed((byte)3);\np.finit();\n\nprint.feedPrinter(dbq.printDrivers(c),p.finalCommandSet().getBytes());\n \n\n }", "@Override\n public void run() {\n\n if (PrinterInstance.mPrinter == null) {\n Toast.makeText(mContext, getString(R.string.not_support), Toast.LENGTH_LONG).show();\n } else {\n mPrinter.printImage(monoChromeBitmap, PAlign.NONE, 0, false);\n }\n }", "public void visitPOSPrinter( DevCat devCat ) {}", "@Override\n public void run() {\n printfManager.openPrinter(alreadyBlueList.get(args));\n }", "public void skipPrint()\n {\n skipPrint(0);\n }", "public void print() {\n btprint(c);\n }", "public void setPrintArea(int arg0, String arg1) {\n\n\t}", "public void print() {\n\t\tSystem.out.println(\"针式打印机打印了\");\n\t\t\n\t}", "public void savingsWithdrawReceipPrintStamp(List receiptDetails,Component c) {\n \np.resetAll();\n\np.initialize();\n\np.feedBack((byte)2);\n\np.color(0);\np.chooseFont(1);\np.alignCenter();\n//p.emphasized(true);\n//p.underLine(2);\np.setText(receiptDetails.get(1).toString());\np.newLine();\np.setText(receiptDetails.get(2).toString());\np.newLine();\np.setText(receiptDetails.get(3).toString());\np.newLine();\np.newLine();\n//p.addLineSeperatorX();\np.underLine(0);\np.emphasized(false);\np.underLine(0);\np.alignCenter();\np.setText(\" *** Savings Withdrawal ***\");\np.newLine();\np.addLineSeperator();\np.newLine();\n\np.alignLeft();\np.setText(\"Account Number: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(9).toString()+p.underLine(0));\np.newLine(); \np.alignLeft();\np.setText(\"Savings Id: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(0).toString()+p.underLine(0));\np.newLine(); \np.alignLeft();\np.emphasized(true);\np.setText(\"Customer: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(4).toString()+p.underLine(0));\np.newLine(); \n//p.emphasized(false);\n//p.setText(\"Loan+Interest: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(6).toString()+\"/=\"+p.underLine(0));\n//p.newLine();\n//p.setText(\"Date Taken: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(7).toString()+p.underLine(0));\n//p.newLine();\n//p.setText(\"Loan Status: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(14).toString()+p.underLine(0));\n//p.newLine();\np.setText(\"Withdrawal Date: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(10).toString()+p.underLine(0));\np.newLine();\np.setText(\"Withdrawal Time: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(11).toString()+p.underLine(0));\np.newLine();\n\np.underLine(0);\np.emphasized(false);\n//p.underLine(0);\np.addLineSeperator();\np.newLine();\np.alignCenter();\np.setText(\"***** Withdrawal Details ***** \");\np.newLine();\np.addLineSeperator();\np.newLine();\n\np.alignLeft();\np.setText(\"Withdrawal Made: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(7).toString()+\"/=\"+p.underLine(0));\np.newLine(); \np.alignLeft();\np.setText(\"Savings Balance: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(8).toString()+\"/=\"+p.underLine(0));\np.newLine(); \np.alignLeft();\np.emphasized(true);\n//p.setText(\"Customer Name: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(4).toString()+p.underLine(0));\n//p.newLine(); \n//p.emphasized(false);\n\np.addLineSeperator();\np.doubleStrik(true);\np.newLine();\np.underLine(2) ;\np.setText(\"Officer: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(5).toString()+p.underLine(0));\np.newLine();\np.addLineSeperatorX();\n\np.addLineSeperator();\np.doubleStrik(true);\np.newLine();\np.underLine(2) ;\np.setText(\"Officer Signiture:\");\np.addLineSeperatorX();\np.newLine();\np.addLineSeperator();\np.doubleStrik(true);\n//p.newLine();\np.underLine(2) ;\np.setText(\"Customer Signiture:\");\np.addLineSeperatorX();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.setText(\"OFFICE NUMBER: \"+receiptDetails.get(12).toString());\n\np.newLine();\np.addLineSeperatorX();\n//p.newLine();\np.feed((byte)3);\np.finit();\n\nprint.feedPrinter(dbq.printDrivers(c),p.finalCommandSet().getBytes());\n \n\n }", "public void updatePrintFigures() {\n\n\t}", "@Override\n\tpublic void print() {\n\t\tdecoratedPrinter.print();\n\t}", "public static void main(String[] args){\n Printer printer = new Printer();\n printer.print();\n }", "QPrintTerm createPrintTerm();", "public static void main (String[] args)\n {\n PrinterJob job = PrinterJob.getPrinterJob();\n\n // It is first called to tell it what object will print each page.\n job.setPrintable(new PrintObject());\n\n // Then it is called to display the standard print options dialog.\n if (job.printDialog())\n {\n // If the user has pressed OK (printDialog returns true), then go\n // ahead with the printing. This is started by the simple call to\n // the job print() method. When it runs, it calls the page print\n // object for page index 0. Then page index 1, 2, and so on\n // until NO_SUCH_PAGE is returned.\n try { job.print(); }\n catch (PrinterException e) { System.out.println(e); }\n }\n }", "private void prnFOOTR()\n\t{\n\t\ttry\n\t\t{\n\t\t\tif(cl_dat.M_intLINNO_pbst >= 64)\n\t\t\t{\n\t\t\t\tdosREPORT.writeBytes(\"-------------------------------------------------------------------------------------------------------------------------------------\");\t\t\n\t\t\t\tif(cl_dat.M_cmbOPTN_pbst.getSelectedItem().toString().equals(cl_dat.M_OPPRN_pbst) && (M_rdbTEXT.isSelected()))\n\t\t\t\t\tprnFMTCHR(dosREPORT,M_strEJT);\n\t\t\t\tif(M_rdbHTML.isSelected())\n\t\t\t\t\tdosREPORT.writeBytes(\"<P CLASS = \\\"breakhere\\\">\");\t\t\t\t\t\t\t\t\n\t\t\t\tprnHEADER();\n\t\t\t}\n\t\t\tdosREPORT.writeBytes(\"-------------------------------------------------------------------------------------------------------------------------------------\\n\");\n\t\t\tdosREPORT.writeBytes (\"\\n\\n\\n\\n\\n\");\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\" \",10));//margin\n\t\t\tif(cl_dat.M_cmbOPTN_pbst.getSelectedItem().toString().equals(cl_dat.M_OPPRN_pbst) && (M_rdbTEXT.isSelected()))\n\t\t\t\tprnFMTCHR(dosREPORT,M_strBOLD);\n\t\t\tif(M_rdbHTML.isSelected())\n\t\t\t\tdosREPORT.writeBytes(\"<B>\");\n\t\t\tdosREPORT.writeBytes(padSTRING('R',\"PREPARED BY\",40));\n\t\t\tdosREPORT.writeBytes(padSTRING('R',\"CHECKED BY \",40));\n\t\t\tdosREPORT.writeBytes(padSTRING('R',\"H.O.D (MHD) \",40));\n\t\t\tif(cl_dat.M_cmbOPTN_pbst.getSelectedItem().toString().equals(cl_dat.M_OPPRN_pbst) && (M_rdbTEXT.isSelected()))\n\t\t\t\tprnFMTCHR(dosREPORT,M_strNOBOLD);\n\t\t\tif(M_rdbHTML.isSelected())\n\t\t\t\tdosREPORT.writeBytes(\"</B>\");\n\t\t\tdosREPORT.writeBytes(\"\\n\");\n\t\t\tdosREPORT.writeBytes(\"-------------------------------------------------------------------------------------------------------------------------------------\\n\");\n\t\t\t\n\t\t\tdosREPORT.writeBytes(\" System generated report, hence signature not required \\n\");\n\t\t\tcl_dat.M_intLINNO_pbst += 8;\n\t\t\tif(cl_dat.M_cmbOPTN_pbst.getSelectedItem().toString().equals(cl_dat.M_OPPRN_pbst))\n\t\t { \n\t\t\t\tprnFMTCHR(dosREPORT,M_strEJT);\n\t\t\t\tprnFMTCHR(dosREPORT,M_strNOCPI17);\n\t\t\t\tprnFMTCHR(dosREPORT,M_strCPI10);\n\t\t\t}\t\n\t\t}\n\t catch(Exception L_EX)\n\t {\n\t\t\tsetMSG(L_EX + \" prnFOOTR\",'E');\n\t\t}\t\n\t}", "public FrmP3BoletoParabrisas(java.awt.Dialog parent, boolean modal,\r\n PrinterJob job, Auto auto) throws PrinterException {\r\n super(parent, modal);\r\n initComponents();\r\n this.setLocationRelativeTo(parent);\r\n this.job = job;\r\n jLabProgresivo.setText(\"NO. \" + auto.getProgresivo());\r\n lblFecha.setText(auto.getFechaEntrada() + \" \" + auto.getHoraEntrada());\r\n this.job = PrinterJob.getPrinterJob();\r\n PrintService[] services = PrintServiceLookup.lookupPrintServices(null, null);\r\n int selectedService = 0;\r\n for(int i = 0; i < services.length;i++){\r\n if(services[i].getName().contains(\"STAR\")){\r\n selectedService = i;\r\n }\r\n }\r\n \r\n job.setPrintService(services[selectedService]);\r\n \r\n PrintRequestAttributeSet printRequestAttributeSet = new HashPrintRequestAttributeSet();\r\n MediaSizeName mediaSizeName = MediaSize.findMedia(4,4,MediaPrintableArea.INCH);\r\n printRequestAttributeSet.add(mediaSizeName);\r\n printRequestAttributeSet.add(new Copies(1));\r\n setVisible(true);\r\n imprimir(); \r\n \r\n }", "public void cancelPendingPrintJobs()\n {\n printerSimulator.cancelPendingPrintJobs();\n }", "public void removePrintArea(int arg0) {\n\n\t}", "public void KTesteCompleto() throws RemoteException {\n\n // Alinhamento\n kPrinterPresenter.printStyleBold(false);\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_CENTER);\n kPrinterPresenter.text(\"Alinhamento\\n\");\n kPrinterPresenter.text(\"--------------------------------\\n\");\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_LEFT);\n kPrinterPresenter.text(\"TecToy Automação\\n\");\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_CENTER);\n kPrinterPresenter.text(\"TecToy Automação\\n\");\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_RIGTH);\n kPrinterPresenter.text(\"TecToy Automação\\n\");\n kPrinterPresenter.print3Line();\n\n // Formas de impressão\n\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_CENTER);\n kPrinterPresenter.text(\"Formas de Impressão\\n\");\n kPrinterPresenter.text(\"--------------------------------\\n\");\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_LEFT);\n kPrinterPresenter.printStyleBold(true);\n kPrinterPresenter.text(\"TecToy Automação\\n\");\n\n\n // Barcode\n\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_CENTER);\n kPrinterPresenter.text(\"BarCode\\n\");\n kPrinterPresenter.text(\"--------------------------------\\n\");\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_LEFT);\n kPrinterPresenter.printBarcode(\"7891098010575\", 2, 162, 2, 0);\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_CENTER);\n kPrinterPresenter.printBarcode(\"7891098010575\", 2, 162, 2, 2);\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_RIGTH);\n kPrinterPresenter.printBarcode(\"7891098010575\", 2, 162, 2, 1);\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_CENTER);\n kPrinterPresenter.printBarcode(\"7891098010575\", 2, 162, 2, 3);\n kPrinterPresenter.print3Line();\n // QrCode\n\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_CENTER);\n kPrinterPresenter.text(\"QrCode\\n\");\n kPrinterPresenter.text(\"--------------------------------\\n\");\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_CENTER);\n kPrinterPresenter.printQr(\"www.tectoyautomacao.com.br\", 8, 0);\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_LEFT);\n kPrinterPresenter.printQr(\"www.tectoyautomacao.com.br\", 8, 0);\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_RIGTH);\n kPrinterPresenter.printQr(\"www.tectoyautomacao.com.br\", 8, 0);\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_LEFT);\n kPrinterPresenter.printDoubleQRCode(\"www.tectoyautomacao.com.br\",\"tectoy\", 7, 1);\n // Imagem\n\n\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_CENTER);\n kPrinterPresenter.text(\"Imagem\\n\");\n kPrinterPresenter.text(\"--------------------------------\\n\");\n BitmapFactory.Options options = new BitmapFactory.Options();\n options.inTargetDensity = 160;\n options.inDensity = 160;\n Bitmap bitmap1 = null;\n if (bitmap1 == null) {\n bitmap1 = BitmapFactory.decodeResource(getResources(), test1, options);\n bitmap1 = scaleImage(bitmap1);\n }\n kPrinterPresenter.printBitmap(bitmap1, 0);\n kPrinterPresenter.setAlign(0);\n kPrinterPresenter.printBitmap(bitmap1, 0);\n kPrinterPresenter.setAlign(2);\n kPrinterPresenter.printBitmap(bitmap1, 0);\n // Tabelas\n\n\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_CENTER);\n kPrinterPresenter.text(\"Tabelas\\n\");\n kPrinterPresenter.text(\"--------------------------------\\n\");\n String[] prod = new String[3];\n int[] width = new int[3];\n int[] align = new int[3];\n\n width[0] = 100;\n width[1] = 50;\n width[2] = 50;\n\n align[0] = kPrinterPresenter.Alignment_LEFT;\n align[1] = kPrinterPresenter.Alignment_CENTER;\n align[2] = kPrinterPresenter.Alignment_RIGTH;\n\n prod[0] = \"Produto 001\";\n prod[1] = \"10 und\";\n prod[2] = \"3,98\";\n kPrinterPresenter.printTable(prod, width, align);\n\n prod[0] = \"Produto 002\";\n prod[1] = \"10 und\";\n prod[2] = \"3,98\";\n kPrinterPresenter.printTable(prod, width, align);\n\n\n prod[0] = \"Produto 003\";\n prod[1] = \"10 und\";\n prod[2] = \"3,98\";\n kPrinterPresenter.printTable(prod, width, align);\n\n\n prod[0] = \"Produto 004\";\n prod[1] = \"10 und\";\n prod[2] = \"3,98\";\n kPrinterPresenter.printTable(prod, width, align);\n\n\n prod[0] = \"Produto 005\";\n prod[1] = \"10 und\";\n prod[2] = \"3,98\";\n kPrinterPresenter.printTable(prod, width, align);\n\n prod[0] = \"Produto 006\";\n prod[1] = \"10 und\";\n prod[2] = \"3,98\";\n kPrinterPresenter.printTable(prod, width, align);\n\n\n kPrinterPresenter.print3Line();\n kPrinterPresenter.cutpaper(KTectoySunmiPrinter.HALF_CUTTING, 10);\n\n }", "public void doPrint() {\n\n PrintingUtils.userPrintText(fDocument.getText(),\n fTextPanel.getDefaultValues(),\n this,\n this.getTitle());\n }", "private static void printerMenuLogic() {\n\t\t\n\t\tboolean onMenu = true;\n\n\t\twhile(onMenu) {\n\n\t\t\tmenuHandler.clrscr();\n\t\t\tint maxChoice = menuHandler.printerMenu();\n\n\t\t\tint intChoice = menuHandler.intRangeInput(\"Please input a number in range [1, \" + maxChoice + \"]\", 1, maxChoice);\n\n\t\t\tswitch(intChoice) {\n\t\t\tcase 1:\n\t\t\t\t// Create printer\n\t\t\t\tcreatePrinterMenuLogic();\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t// List printers\n\t\t\t\t\n\t\t\t\t// Check printers exist\n\t\t\t\tif(printers.size() == 0) {\n\t\t\t\t\tSystem.out.println(\"No printers created! Please create one before using this menu.\");\n\t\t\t\t} else {\n\t\t\t\t\tmenuHandler.prettyPrintPrinters(printers, 1);\n\t\t\t\t}\n\t\t\t\tmenuHandler.waitOnKey(keyMsg);\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\t// Print document\n\t\t\t\t\n\t\t\t\t// Check printers exist\n\t\t\t\tif(printers.size() == 0) {\n\t\t\t\t\tSystem.out.println(\"No printers created! Please create one before using this menu.\");\n\t\t\t\t\tmenuHandler.waitOnKey(keyMsg);\n\t\t\t\t} else {\n\t\t\t\t\tprintDocumentMenuLogic();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\t// Break/empty printer\n\t\t\t\t\n\t\t\t\t// Check printers exist\n\t\t\t\tif(printers.size() == 0) {\n\t\t\t\t\tSystem.out.println(\"No printers created! Please create one before using this menu.\");\n\t\t\t\t\tmenuHandler.waitOnKey(keyMsg);\n\t\t\t\t} else {\n\t\t\t\t\tbreakPrinterMenuLogic();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\t// Break all\n\t\t\t\t\n\t\t\t\t// Check printers exist\n\t\t\t\tif(printers.size() == 0) {\n\t\t\t\t\tSystem.out.println(\"No printers created! Please create one before using this menu.\");\n\t\t\t\t\tmenuHandler.waitOnKey(keyMsg);\n\t\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t\tmenuHandler.prettyPrintPrinters(printers, 1);\n\t\t\t\t\tint printerChoice = menuHandler.intRangeInput(\"Please input a number in range [0, \" + (printers.size() - 1) + \"]\", 0, printers.size() - 1);\n\n\t\t\t\t\tprinters.get(\"Printer\" + printerChoice).breakAll();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 6:\n\t\t\t\t// Fix/refill printer\n\t\t\t\t\n\t\t\t\t// Check printers exist\n\t\t\t\tif(printers.size() == 0) {\n\t\t\t\t\tSystem.out.println(\"No printers created! Please create one before using this menu.\");\n\t\t\t\t\tmenuHandler.waitOnKey(keyMsg);\n\t\t\t\t} else {\n\t\t\t\t\tfixPrinterMenuLogic();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 7:\n\t\t\t\t// Fix all\n\t\t\t\t\n\t\t\t\t// Check printers exist\n\t\t\t\tif(printers.size() == 0) {\n\t\t\t\t\tSystem.out.println(\"No printers created! Please create one before using this menu.\");\n\t\t\t\t\tmenuHandler.waitOnKey(keyMsg);\n\t\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t\tmenuHandler.prettyPrintPrinters(printers, 1);\n\t\t\t\t\tint printerChoice = menuHandler.intRangeInput(\"Please input a number in range [0, \" + (printers.size() - 1) + \"]\", 0, printers.size() - 1);\n\n\t\t\t\t\tprinters.get(\"Printer\" + printerChoice).fixAll();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 8:\n\t\t\t\t// Print report\n\t\t\t\t\n\t\t\t\t// Check printers exist\n\t\t\t\tif(printers.size() == 0) {\n\t\t\t\t\tSystem.out.println(\"No printers created! Please create one before using this menu.\");\n\t\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t\tmenuHandler.prettyPrintPrinters(printers, 1);\n\t\t\t\t\tint printerChoice = menuHandler.intRangeInput(\"Please input a number in range [0, \" + (printers.size() - 1) + \"]\", 0, printers.size() - 1);\n\n\t\t\t\t\tprinters.get(\"Printer\" + printerChoice).printIndividualReport();\n\t\t\t\t}\n\t\t\t\tmenuHandler.waitOnKey(keyMsg);\n\t\t\t\tbreak;\n\t\t\tcase 9:\n\t\t\t\tonMenu = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "void printBattle(ConsolePrinter printer);", "public void print(boolean border, PrintStream printer) throws UnsupportedException {\n\n\t\tif (border) {\n\t\t\tfor (int i = 0; i < canvas.getWidth() + 2; i++) {\n\t\t\t\tprinter.print(HORIZONTAL_LINE);\n\t\t\t}\n\t\t\tprinter.println();\n\t\t}\n\n\t\tchar[][] matrix = canvas.getMatrix();\n\t\tfor (int i = 0; i < canvas.getHeight(); i++) {\n\t\t\tif (border)\n\t\t\t\tprinter.print(VERTICAL_LINE);\n\t\t\tfor (int j = 0; j < canvas.getWidth(); j++) {\n\t\t\t\tprinter.print(matrix[j][i]);\n\t\t\t}\n\t\t\tif (border)\n\t\t\t\tprinter.print(VERTICAL_LINE + \"\\n\");\n\t\t}\n\n\t\tif (border) {\n\t\t\tfor (int i = 0; i < canvas.getWidth() + 2; i++) {\n\t\t\t\tprinter.print(HORIZONTAL_LINE);\n\t\t\t}\n\t\t\tprinter.println();\n\t\t}\n\t}", "public void print(String toPrint) {\n for (Printer print : printers) {\n// System.out.println(\"Start \" + print.busyEndTime);\n if (print.isAvailable()) {\n System.out.println(\"Printer \" + print.id + \" is available to print: \" + toPrint);\n }\n print.busyEndTime = LocalTime.now().plusSeconds(5);\n// System.out.println(\"End \" + print.busyEndTime);\n }\n // Its not needed to actually print with a printer in this exercise\n// System.out.println(\"Printer \" + id + \" is printing.\");\n// busyEndTime = LocalTime.now().plusSeconds(5);\n }", "@Override\n\t\t\tpublic void print() {\n\t\t\t\t\n\t\t\t}", "public void setPrintArea(int arg0, int arg1, int arg2, int arg3, int arg4) {\n\n\t}", "public Object getPrinter(PageFormat pf);", "public void setPrimaryPrintIndicator(java.lang.String param){\n localPrimaryPrintIndicatorTracker = true;\n \n this.localPrimaryPrintIndicator=param;\n \n\n }", "public void printThisFrame(int xoff, int yoff, boolean makeBorder) {\r\n\r\n java.util.Properties printprefs = new java.util.Properties();\r\n Toolkit toolkit = this.getToolkit();\r\n PrintJob job = toolkit.getPrintJob(this,\"Java Print\",printprefs);\r\n if (job == null) {return;}\r\n Graphics g = job.getGraphics();\r\n g.translate(xoff,yoff); // Offset from upper left corner\r\n Dimension size = this.getSize();\r\n if (makeBorder) { // Rectangular border\r\n g.drawRect(-1,-1,size.width+2,size.height+2);\r\n }\r\n g.setClip(0,0,size.width,size.height);\r\n this.printAll(g);\r\n g.dispose();\r\n job.end();\r\n }", "public void setSecondaryPrintIndicator(java.lang.String param){\n localSecondaryPrintIndicatorTracker = true;\n \n this.localSecondaryPrintIndicator=param;\n \n\n }", "@Override\n\tpublic String print(CliPrinter printer) {\n\t\treturn printer.printTProductCards(this);\n\t}", "public static void main (String[] args){\n Printer printer = new Printer();\n printer.print();\n }", "@Override\n\tpublic void print() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void print() {\n\t\t\t\t\r\n\t\t\t}", "public void visitFiscalPrinter( DevCat devCat ) {}", "@Override\n public void widgetSelected(SelectionEvent e) {\n if (previewProduct != null && !previewProduct.isEmpty()) {\n PshPrintUtil.getPshPrinter().printInput(previewProduct);\n }\n }", "private synchronized void print4() {\n try {\n int jNum = 0;\n\n byte[] printText22 = new byte[10240];\n\n byte[] oldText = setAlignCenter('0');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setInternationalCharcters('3');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setWH('4');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = getGbk(\"FoodCiti\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setWH('4');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = getGbk(\"\\nOrder No : \" + order.getOrderNo());\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"\\n-----------------------\\n\");\n oldText = getGbk(\"\\n........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(SessionManager.get(getActivity()).getRestaurantName() + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n String location = SessionManager.get(getActivity()).getRestaurantLocation();\n int spacecount = commacount(location);\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n if (spacecount >= 1) {\n oldText = getGbk(location.substring(0, location.indexOf(',')) + \"\\n\" + location.substring(location.indexOf(',') + 1) + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n } else {\n oldText = getGbk(location + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n }\n\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = getGbk(SessionManager.get(getActivity()).getRestaurantPostalCode() + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"Tel:\" + SessionManager.get(getActivity()).getRestaurantPhonenumber());\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"\\n-----------------------\\n\");\n oldText = getGbk(\"\\n........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n if (order.getOrderSpecialInstruction() != null) {\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(order.getOrderSpecialInstruction());\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"\\n-----------------------\\n\");\n oldText = getGbk(\"\\n........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n }\n\n oldText = setAlignCenter('0');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setWH('5');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setCusorPosition(390);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\" \" + \"GBP\" + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n // Toast.makeText(getContext(),\"Size \"+order.getOrderedItemList().size(),Toast.LENGTH_LONG).show();\n\n for (int i = 0; i < order.getOrderedItemList().size(); i++) {\n\n OrderedItem orderedItem = order.getOrderedItemList().get(i);\n\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('5');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// int qntity = Integer.parseInt(orderedItem.getQuantity());\n oldText = getGbk(\" \" + orderedItem.getQuantity() + \" x \" + orderedItem.getItemData().getItemName());\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setCusorPosition(390);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n Double total_price = Double.valueOf(orderedItem.getTotalPrice()) * Double.valueOf(orderedItem.getQuantity());\n\n oldText = getGbk(\" \" + String.format(Locale.getDefault(), \"%.2f\", total_price) + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n for (int j = 0; j < orderedItem.getSubItemList().size(); j++) {\n\n oldText = setWH('5');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setCusorPosition(35);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n SubItem subItem = orderedItem.getSubItemList().get(j);\n\n String subitemname = subItem.getItemName();\n int subItemOrderQty = Integer.parseInt(subItem.getOrderedQuantity());\n\n if (subItemOrderQty > 1) {\n oldText = getGbk(\" \" + subItem.getOrderedQuantity() + \" x \" + subitemname + \"\\n\");\n } else {\n oldText = getGbk(\" \" + subitemname + \"\\n\");\n }\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n // By Ravi\n// oldText = getGbk(\"........................\\n\");\n// System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n// jNum += oldText.length;\n//////////////////////////////////////////////////////////////////////////////////////////////////////////\n /** TODO\n * change here for print suboptions text\n * **/\n //print text for suboptions items\n if (subItem.getSubOptions() != null && subItem.getSubOptions().size() > 0) {\n List<SubOptions> subOptions = subItem.getSubOptions();\n for (int k = 0; k < subOptions.size(); k++) {\n SubOptions options = subOptions.get(k);\n oldText = getGbk(\" - \" + options.getName() + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n }\n }\n\n }\n\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n /*oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;*/\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"-----------------------\\n\");\n oldText = getGbk(\"........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n }\n\n oldText = setAlignCenter('0');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('5');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"Subtotal : \");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setCusorPosition(390);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = getGbk(\" \" + String.format(\" %.2f\", Double.valueOf(order.getOrderSubtotal())) + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n if (Double.valueOf(order.getDiscount()) > 0) {\n oldText = setAlignCenter('0');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('5');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"Discount : \");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setCusorPosition(390);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = getGbk(\" \" + String.format(\" %.2f\", Double.valueOf(order.getDiscount())) + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n }\n\n\n if (Double.valueOf(order.getTax()) > 0) {\n oldText = setAlignCenter('0');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('5');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"Service Charge : \");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setCusorPosition(390);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n if (order.getTax() != null) {\n oldText = getGbk(\" \" + String.format(\" %.2f\", Double.valueOf(order.getTax())) + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n } else {\n oldText = getGbk(\" \" + \"0.00\" + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n }\n }\n\n if (!order.getOrderDelivery().equals(Consts.PICK_UP) && Double.valueOf(order.getDeliveryCharges()) > 0) {\n oldText = setAlignCenter('0');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('5');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"Delivery Charges : \");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setCusorPosition(390);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = getGbk(\" \" + String.format(\" %.2f\", Double.valueOf(order.getDeliveryCharges())) + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n }\n\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"\\n-----------------------\\n\");\n oldText = getGbk(\"........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('0');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"TOTAL Price: \");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setCusorPosition(370);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n //Toast.makeText(getActivity(),String.valueOf(order.getOrderTotal()),Toast.LENGTH_LONG).show();\n\n oldText = getGbk(\" \" + String.format(\" %.2f\", Double.valueOf(order.getOrderTotal())));\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"\\n-----------------------\\n\");\n oldText = getGbk(\"\\n........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n if (order.getFreenDrinkText() != null && !TextUtils.isEmpty(order.getFreenDrinkText())) {\n oldText = setAlignCenter('0');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n String freeTxt = \"Free \" + order.getFreenDrinkText();\n oldText = getGbk(freeTxt);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n }\n\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"\\n-----------------------\\n\");\n oldText = getGbk(\"\\n........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('4');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n /** TODO\n * change here to print payment method text\n * **/\n //print text for payment method\n if (order.getOrderPaid().equalsIgnoreCase(\"paypal\") || order.getOrderPaid().equalsIgnoreCase(\"worldpay\")) {\n oldText = getGbk(order.getOrderPaid() + \" PAID \" + \"\\n\");\n } else {\n oldText = getGbk(order.getOrderPaid() + \" NOT PAID \" + \"\\n\");\n }\n// oldText = getGbk(\"ORDER BY \" + order.getOrderPaid() + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setWH('4');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n if (order.getOrderDelivery().equals(Consts.PICK_UP)) {\n oldText = getGbk(\"COLLECTION\" + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n } else {\n oldText = getGbk(\"DELIVERY\" + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n }\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n // String strTmp2 = new SimpleDateFormat(\"dd-MM-yyyy hh:mm a\", Locale.UK).format(new Date());\n oldText = getGbk(getDate(order.getOrderTime()));\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"\\n-----------------------\\n\");\n oldText = getGbk(\"\\n........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('0');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('4');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"Customer Details: \" + \"\\n\" +\n order.getUser().getUserName().toUpperCase() + \"\\n\" +\n order.getUser().getAddress().toUpperCase() + \"\\n\" +\n order.getUser().getCity().toUpperCase() + \"\\n\" +\n order.getUser().getPostalCode().toUpperCase() + \"\\n\" +\n order.getUser().getPhNo().toUpperCase()\n );\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"\\n-----------------------\\n\");\n oldText = getGbk(\"\\n........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('5');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"Ref:\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = getGbk(order.getOrderId());\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"\\n-----------------------\\n\");\n oldText = getGbk(\"\\n........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = getGbk(\"www.foodciti.co.uk\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"\\n\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n /*String s = new String(printText22);\n Toast.makeText(getActivity(),s,Toast.LENGTH_LONG).show();*/\n\n oldText = CutPaper();\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n Intent intent = new Intent(PrintUtils.ACTION_PRINT_REQUEST);\n intent.putExtra(PrintUtils.PRINT_DATA, printText22);\n localBroadcastManager.sendBroadcast(intent);\n\n// mOutputStream.write(printText22);\n\n } catch (Exception ex) {\n Exlogger exlogger = new Exlogger();\n exlogger.setErrorType(\"Print Error\");\n exlogger.setErrorMessage(ex.getMessage());\n exlogger.setScreenName(\"OrderInfo->>print4() function\");\n logger.addException(exlogger);\n Toast.makeText(getActivity(), ex.getMessage(), Toast.LENGTH_LONG).show();\n\n\n }\n }", "private void print() {\n\t\t// reorganize a wraparound queue and print\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tSystem.out.print(bq[(head + i) % bq.length] + \" \");\n\t\t}\n\t\tSystem.out.println(\"\\n\");\n\t}", "@Override\r\n\tpublic void print() {\n\t}", "void printout() {\n\t\tprintstatus = idle;\n\t\tanyprinted = false;\n\t\tfor (printoldline = printnewline = 1;;) {\n\t\t\tif (printoldline > oldinfo.maxLine) {\n\t\t\t\tnewconsume();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (printnewline > newinfo.maxLine) {\n\t\t\t\toldconsume();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (newinfo.other[printnewline] < 0) {\n\t\t\t\tif (oldinfo.other[printoldline] < 0)\n\t\t\t\t\tshowchange();\n\t\t\t\telse\n\t\t\t\t\tshowinsert();\n\t\t\t} else if (oldinfo.other[printoldline] < 0)\n\t\t\t\tshowdelete();\n\t\t\telse if (blocklen[printoldline] < 0)\n\t\t\t\tskipold();\n\t\t\telse if (oldinfo.other[printoldline] == printnewline)\n\t\t\t\tshowsame();\n\t\t\telse\n\t\t\t\tshowmove();\n\t\t}\n\t\tif (anyprinted == true)\n\t\t\tprintln(\">>>> End of differences.\");\n\t\telse\n\t\t\tprintln(\">>>> Files are identical.\");\n\t}", "private void printOut(String[] printerMakerResult)\n {\n //shows user the printerMaker result\n\n for(int i=0;i<printerMakerResult.length;i++)\n {\n outVideo.println(printerMakerResult[i]);\n outVideo.flush();\n }\n }", "public void closeLinePrinter();", "@Override\n\tpublic void print() {\n\n\t}", "public void actionPerformed(ActionEvent e) {\r\n final PrintPreview pp = new PrintPreview();\r\n final JEditorPane ep = new JEditorPane();\r\n final JFrame f = new JFrame(\"Print Preview\");\r\n ep.setEditable(false);\r\n ep.setText(getManager().getTabFolder().getSelection().getText());\r\n\r\n Font.decode(PreferenceStore.getString(Preference.FONT));\r\n f.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);\r\n f.setSize(800, 600);\r\n f.add(new JScrollPane(ep));\r\n f.setVisible(true);\r\n pp.showPreview(ep);\r\n f.dispose();\r\n \r\n }", "@Override\n public void printable()\n {\n\tfor (int i = 0; i < width; i++)\n\t{\n\t for (int k = 0; k < length; k++)\n\t {\n\t\tif (k == 0 || k == length - 1)\n\t\t System.out.print(\"O \");\n\t\telse if (i == 0 || i == width - 1)\n\t\t System.out.print(\"O \");\n\t\telse\n\t\t System.out.print(\" \");\n\t }\n\n\t System.out.println();\n\t}\n }", "public void printReceipt(){\n sale.updateExternalSystems();\n sale.printReceipt(totalCost, amountPaid, change);\n }", "public boolean getToPrint() {\r\n return this.toPrint;\r\n }", "private void Print_Test(){\n String lang = getString(R.string.strLang);\n if((lang.compareTo(\"en\")) == 0){\n\n //cetak gambar logo dulu\n Print_BMP();\n\n //cetak string struk\n String data = struk;\n SendDataByte(PrinterCommand.POS_Print_Text(data, CHINESE, 0, 0, 0, 0));\n SendDataByte(PrinterCommand.POS_Set_Cut(1));\n SendDataByte(PrinterCommand.POS_Set_PrtInit());\n }else if((lang.compareTo(\"cn\")) == 0){\n String msg = \"恭喜您!\\n\\n\";\n String data = \"您已经成功的连接上了我们的便携式蓝牙打印机!\\n我们公司是一家专业从事研发,生产,销售商用票据打印机和条码扫描设备于一体的高科技企业.\\n\\n\\n\\n\\n\\n\\n\";\n SendDataByte(PrinterCommand.POS_Print_Text(msg, CHINESE, 0, 1, 1, 0));\n SendDataByte(PrinterCommand.POS_Print_Text(data, CHINESE, 0, 0, 0, 0));\n SendDataByte(PrinterCommand.POS_Set_Cut(1));\n SendDataByte(PrinterCommand.POS_Set_PrtInit());\n }else if((lang.compareTo(\"hk\")) == 0 ){\n String msg = \"恭喜您!\\n\";\n String data = \"您已經成功的連接上了我們的便攜式藍牙打印機! \\n我們公司是一家專業從事研發,生產,銷售商用票據打印機和條碼掃描設備於一體的高科技企業.\\n\\n\\n\\n\\n\\n\\n\";\n SendDataByte(PrinterCommand.POS_Print_Text(msg, BIG5, 0, 1, 1, 0));\n SendDataByte(PrinterCommand.POS_Print_Text(data, BIG5, 0, 0, 0, 0));\n SendDataByte(PrinterCommand.POS_Set_Cut(1));\n SendDataByte(PrinterCommand.POS_Set_PrtInit());\n }else if((lang.compareTo(\"kor\")) == 0){\n String msg = \"축하 해요!\\n\";\n String data = \"성공적으로 우리의 휴대용 블루투스 프린터에 연결 한! \\n우리는 하이테크 기업 중 하나에서 개발, 생산 및 상업 영수증 프린터와 바코드 스캐닝 장비 판매 전문 회사입니다.\\n\\n\\n\\n\\n\\n\\n\";\n SendDataByte(PrinterCommand.POS_Print_Text(msg, KOREAN, 0, 1, 1, 0));\n SendDataByte(PrinterCommand.POS_Print_Text(data, KOREAN, 0, 0, 0, 0));\n SendDataByte(PrinterCommand.POS_Set_Cut(1));\n SendDataByte(PrinterCommand.POS_Set_PrtInit());\n }else if((lang.compareTo(\"thai\")) == 0){\n String msg = \"ขอแสดงความยินดี!\\n\";\n String data = \"คุณได้เชื่อมต่อกับบลูทู ธ เครื่องพิมพ์แบบพกพาของเรา! \\n เราเป็น บริษัท ที่มีความเชี่ยวชาญในการพัฒนา, การผลิตและการขายของเครื่องพิมพ์ใบเสร็จรับเงินและการสแกนบาร์โค้ดอุปกรณ์เชิงพาณิชย์ในหนึ่งในองค์กรที่มีเทคโนโลยีสูง.\\n\\n\\n\\n\\n\\n\\n\";\n SendDataByte(PrinterCommand.POS_Print_Text(msg, THAI, 255, 1, 1, 0));\n SendDataByte(PrinterCommand.POS_Print_Text(data, THAI, 255, 0, 0, 0));\n SendDataByte(PrinterCommand.POS_Set_Cut(1));\n SendDataByte(PrinterCommand.POS_Set_PrtInit());\n }\n }", "public interface PrintingIfc\n{\n /**\n revision number supplied by source-code-control system\n **/\n public static String revisionNumber = \"$Revision: /rgbustores_13.4x_generic_branch/1 $\";\n /**\n Date format for receipts and endorsements\n **/\n public static SimpleDateFormat DATE_LINE_FORMAT =\n new SimpleDateFormat(\"MM/dd/yyyy hh:mm:ss a z\");\n /**\n ESC sequence for right justification on the slip printer\n **/\n public static String PRINTER_RIGHT_JUSTIFY = new String(\"\\u001b|rA\");\n /**\n Slip printer line size\n **/\n public static int SLIP_PRINTER_LINE_SIZE = 33;\n}", "private void print_da_page() {\n \t\tSystem.out.println(\"**** Hell yeah, print da page\");\n \t\t// des Assert ici pour verifier qq truc sur le local storage serait p-e\n \t\t// bien..\n \n \t\tsetInSlot(SLOT_OPTION_SELECION, cardSelectionOptionPresenter);\n \t\tcardSelectionOptionPresenter.init();\n \t\t\n \t\tsetInSlot(SLOT_BOARD, boardPresenter);\n \n \t\tcardDragController.registerDropController(cardDropPanel);\n \t\t\n \t\tsetStaticFirstComboView();\n \t\twriteInstancePanel();\n \t\tStorage_access.setCurrentProjectInstanceBddId(0);\n \t\t//Storage_access.setCurrentProjectInstance(Storage_access.getInstanceBddId(Storage_access.getCurrentProjectInstance()));\n \t\t\n \t\treDrowStatusCard();\n \t\t\n \t\tthis.boardPresenter.redrawBoard(0,0); //TODO n'enregistrerons nous pas la \"vue par default\"? ou la derniere ?\n \t\t\n \t\twriteCardWidgetsFirstTime();\n \t\t//getView().constructFlex(cardDragController);\n \t\n \t\t\n \t\t\n \t\t//CellDropControler dropController = new CellDropControler(simplePanel);\n \t //\tcardDragController.registerDropController(dropController);\n \n \t}", "private void print() {\n printInputMessage();\n printFrequencyTable();\n printCodeTable();\n printEncodedMessage();\n }", "public void dumpBack(Printer pw, String prefix) {\n }", "public void goToPrinterSection(){\n click(By.name(printerTab));\n }", "private void realPrint(PrintJob job) {\n\t\tout.println(\"Print okay!\");\r\n\t}", "public void print()\n {\n System.out.println();\n System.out.println(\"Ticket to \" + destination +\n \" Price : \" + price + \" pence \" + \n \" Issued \" + issueDateTime);\n System.out.println();\n }", "void genReport() {\n\n current_part.save_state(); \n\n JTextArea ta = text;\n\n ta.setText(\"\");\n\n if (!t_foil_name.equals(\"Test\"))\n ta.append(\"Hydrofoil: \" + t_foil_name);\n\n java.util.Date date = new java.util.Date();\n ta.append(\"\\n Date: \" + date);\n \n wing.print( \"Main Wing\", ta);\n stab.print( \"Stabilizer Wing\", ta);\n strut.print(\"Mast (a.k.a. Strut)\", ta);\n fuse.print( \"Fuselage\", ta);\n\n ta.append( \"\\n\\n\");\n // tail volume is LAElev * AreaElev / (MACWing * AreaWing)\n // LAElev : The elevator's Lever Arm measured at the wing's and elevator's quarter chord point\n double LAElev = stab.xpos + stab.chord_xoffs + 0.25*stab.chord - (wing.xpos + wing.chord_xoffs + 0.25*wing.chord);\n // MAC : The main wing's Mean Aerodynamic Chord\n // AreaWing : The main wing's area\n // AreaElev : The elevator's area\n \n ta.append( \"\\nTail Voulume: \" + LAElev*stab.span*stab.chord/(wing.chord*wing.chord*wing.span));\n \n\n ta.append( \"\\n\\n\");\n switch (planet) {\n case 0: { \n ta.append( \"\\n Standard Earth Atmosphere\" );\n break;\n }\n case 1: { \n ta.append( \"\\n Martian Atmosphere\" );\n break;\n }\n case 2: { \n ta.append( \"\\n Water\" );\n break;\n }\n case 3: { \n ta.append( \"\\n Specified Conditions\" );\n break;\n }\n case 4: { \n ta.append( \"\\n Specified Conditions\" );\n break;\n }\n }\n\n // ta.append( \"\\n Altitude = \" + filter0(alt_val) );\n // if (lunits == IMPERIAL) ta.append( \" ft ,\" );\n // else /*METRIC*/ ta.append( \" m ,\" );\n \n switch (lunits) {\n case 0: { /* English */\n ta.append( \"\\n Density = \" + filter5(rho_EN) );\n ta.append( \"slug/cu ft\" );\n ta.append( \"\\n Pressure = \" + filter3(ps0/144.) );\n ta.append( \"lb/sq in,\" );\n ta.append( \" Temperature = \" + filter0(ts0 - 460.) );\n ta.append( \"F,\" );\n break;\n }\n case 1: { /* Metric */\n ta.append( \" Density = \" + filter3(rho_EN*515.4) );\n ta.append( \"kg/cu m\" );\n ta.append( \"\\n Pressure = \" + filter3(101.3/14.7*ps0/144.) );\n ta.append( \"kPa,\" );\n ta.append( \" Temperature = \" + filter0(ts0*5.0/9.0 - 273.1) );\n ta.append( \"C,\" );\n break;\n }\n }\n\n ta.append( \"\\n Speed = \" + filter1(velocity * (lunits==IMPERIAL? 0.868976 : 0.539957 )) + \"Kts, or\" );\n ta.append( \" \" + filter1(velocity) );\n if (lunits == IMPERIAL) ta.append( \" mph ,\" );\n else /*METRIC*/ ta.append( \" km/hr ,\" );\n\n // if (out_aux_idx == 1)\n // ta.append( \"\\n Lift Coefficient = \" + filter3(current_part.cl) );\n // if (out_aux_idx == 0) {\n // if (Math.abs(lift) <= 10.0) ta.append( \"\\n Lift = \" + filter3(lift) );\n // if (Math.abs(lift) > 10.0) ta.append( \"\\n Lift = \" + filter0(lift) );\n // if (lunits == IMPERIAL) ta.append( \" lbs \" );\n // else /*METRIC*/ ta.append( \" Newtons \" );\n // }\n // if ( polarOut == 1)\n // ta.append( \"\\n Drag Coefficient = \" + filter3(current_part.cd) );\n // if (out_aux_idx == 0) {\n // ta.append( \"\\n Drag = \" + filter0(drag) );\n // if (lunits == IMPERIAL) ta.append( \" lbs \" );\n // else /*METRIC*/ ta.append( \" Newtons \" );\n // }\n\n ta.append( \"\\n Lift = \" + dash.outTotalLift.getText());\n ta.append( \"\\n Drag = \" + dash.outTotalDrag.getText());\n\n if (min_takeoff_speed_info != null) \n ta.append( \"\\n\\n\" + min_takeoff_speed_info);\n\n if (cruising_info != null) \n ta.append( \"\\n\\n\" + cruising_info);\n\n if (max_speed_info != null) \n ta.append( \"\\n\\n\" + max_speed_info);\n\n // ensure end ta.setCaretPosition(ta.getText().length());\n // ensure start\n ta.setCaretPosition(0);\n }", "private boolean runPrintReceiptSequenceEpson() {\n if (!initializeObjectEpson()) {\n return false;\n }\n\n if (!createReceiptDataEpson()) {\n finalizeObjectEpson();\n return false;\n }\n\n if (!printDataEpson()) {\n finalizeObjectEpson();\n return false;\n }\n\n return true;\n }", "public void printReceipt(){\n\t\t//TO DO\n\t\t\n\t}", "private void init() {\n File file1 = new File(FileUtil.getInstance().getCacheDirPath(), \"jianyichuli.jpg\");\n if (file1.exists()) file1.delete();\n PrintView<JianyiChuliTongzhidanListBean.DataListBean> printView1 = new PrintView<>(this,entity);\n String path1 = FileUtil.getInstance().save2Local(printView1.getcacheBitmap(), file1.getAbsolutePath());\n if (((User) SPUtils.getInstance().getObjectData(Constance.USER_OBJECT)).getZt() == 1) {\n saveAndStartPrintShare(FileUtil.getInstance().getCacheDirPath(), \"jianyichuli.jpg\");\n return;\n }\n phandler.sendEmptyMessage(104);\n while (true){\n BorisPrint bPrint = new BorisPrint(MyApplication.getContext(), null,phandler);\n int code = bPrint.print(path1, 2);\n if (code==0){\n break;\n }\n }\n }", "private void feedback_output(){\r\n\t\tif(up){controller_computer.gui_computer.PressedBorderUp();}\r\n\t\tif(down){controller_computer.gui_computer.PressedBorderDown();}\r\n\t\tif(right){controller_computer.gui_computer.PressedBorderRight();}\r\n\t\tif(left){controller_computer.gui_computer.PressedBorderLeft();}\r\n\t}", "void PrintOnScreen(String toPrnt);", "private void printScreen()\n {\n try\n {\n Graphics g = getGraphics();\n if(drawingArea != null && g != null)\n {\n g.drawImage(drawingArea, 0, 0, null);\n }\n\n // Sync the display on some systems.\n // (on Linux, this fixes event queue problems)\n Toolkit.getDefaultToolkit().sync();\n g.dispose();\n }\n catch(Exception ex)\n {\n System.out.println(\"Graphics error: \" + ex);\n }\n }", "@Override\n\tvoid drowing() {\n\t\tSystem.out.println(\"test--drawing\");\n\t}", "void printFleet(ConsolePrinter printer);", "@Override\n\tpublic int updatePrinter(Printer printer) {\n\t\treturn centerPrinterMangeService.updatePrinter(printer);\n\t}", "public void loanDisbursementReceit(List receiptDetails,Component c) {\n \np.resetAll();\n\np.initialize();\n\np.feedBack((byte)2);\n\n//p.color(0);\n//p.chooseFont(1);\np.alignCenter();\n//p.emphasized(true);\n//p.underLine(2);\np.setText(receiptDetails.get(1).toString());\np.newLine();\np.setText(receiptDetails.get(2).toString());\np.newLine();\np.setText(receiptDetails.get(3).toString());\np.newLine();\np.newLine();\n//p.addLineSeperatorX();\np.underLine(0);\np.emphasized(false);\np.underLine(0);\np.alignCenter();\np.setText(\" *** Loan Disbursment Receipt ***\");\np.newLine();\np.addLineSeperator();\np.newLine();\n\np.alignLeft();\np.setText(\"Batch Number: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(10).toString()+p.underLine(0));\np.newLine(); \np.alignLeft();\np.setText(\"Loan ID: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(11).toString()+p.underLine(0));\np.newLine(); \np.alignLeft();\np.emphasized(true);\np.setText(\"Customer: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(4).toString()+p.underLine(0));\np.newLine(); \n//p.emphasized(false);\np.setText(\"Loan+Interest: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(6).toString()+\"/=\"+p.underLine(0));\np.newLine();\np.setText(\"Date Taken: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(7).toString()+p.underLine(0));\np.newLine();\np.setText(\"Loan Status: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(14).toString()+p.underLine(0));\np.newLine();\np.setText(\"Disbursemnt Date: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(12).toString()+p.underLine(0));\np.newLine();\np.setText(\"Disbursement Time: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(13).toString()+p.underLine(0));\np.newLine();\n\np.underLine(0);\np.emphasized(false);\n//p.underLine(0);\np.addLineSeperator();\np.newLine();\np.alignCenter();\np.setText(\"***** Disbursement Details ***** \");\np.newLine();\np.addLineSeperator();\np.newLine();\n\np.alignLeft();\np.setText(\"Loan Disbursed: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(15).toString()+\"/=\"+p.underLine(0));\np.newLine(); \n//p.alignLeft();\n//p.setText(\"Loan Remaining: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(9).toString()+\"/=\"+p.underLine(0));\n//p.newLine(); \n//p.alignLeft();\n//p.emphasized(true);\n//p.setText(\"Customer Name: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(4).toString()+p.underLine(0));\n//p.newLine(); \n//p.emphasized(false);\n\np.addLineSeperator();\np.doubleStrik(true);\np.newLine();\np.underLine(2) ;\np.setText(\"Officer: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(5).toString()+p.underLine(0));\np.newLine();\np.addLineSeperatorX();\n\np.addLineSeperator();\np.doubleStrik(true);\np.newLine();\np.underLine(2) ;\np.setText(\"Officer Signiture:\");\np.addLineSeperatorX();\n//p.newLine();\np.addLineSeperator();\np.doubleStrik(true);\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\np.underLine(2) ;\np.setText(\"Customer Signiture:\");\np.addLineSeperatorX();\np.newLine();\np.setText(\"OFFICE NUMBER: \"+receiptDetails.get(17).toString());\n//p.addLineSeperatorX();\n//p.newLine();\np.feed((byte)3);\np.finit();\n\nprint.feedPrinter(dbq.printDrivers(c),p.finalCommandSet().getBytes());\n \n }", "public void treat()\n\t{\n\t\tstroked();\n\t}", "public void pourCoffeeImp() {\n\t\tSystem.out.println(\"加奶咖啡\");\n\t}", "public MchPrinter(BPrinter fp, PrintStream ps) {\n\t\tprinter = fp;\n\t\tstream = ps;\n\t}", "public static void main(String[] args) {\n Book bk2 = new PrintedBook(\"asdf\", \"qwertz\", 1331, PrintedBookCoverType.Softcover);\n System.out.println(bk2.getPrice());\n\n //System.out.println(pb2.printedBookSpecific());\n }", "public void print () {\n }" ]
[ "0.6523627", "0.6472755", "0.64726204", "0.62683773", "0.62307", "0.61502326", "0.60991526", "0.6039564", "0.6020686", "0.5991731", "0.59781665", "0.5939299", "0.5931417", "0.5898148", "0.58554024", "0.5845106", "0.58353364", "0.58318186", "0.5820186", "0.58173186", "0.5781901", "0.5781901", "0.57802665", "0.5759889", "0.57426643", "0.57297", "0.5685002", "0.5681616", "0.56273377", "0.56167465", "0.5614239", "0.5580779", "0.55554503", "0.5544554", "0.55152225", "0.5509783", "0.55061156", "0.54998064", "0.5492461", "0.5469989", "0.54681635", "0.5463875", "0.5461954", "0.54589677", "0.54486895", "0.54166967", "0.53997153", "0.5396381", "0.5393609", "0.5383356", "0.5382506", "0.53736585", "0.53677946", "0.5367653", "0.53650415", "0.53641504", "0.5358872", "0.53518116", "0.5348154", "0.53453046", "0.5330991", "0.5329588", "0.5324088", "0.5318447", "0.530726", "0.53071076", "0.5298172", "0.52973896", "0.5289397", "0.526945", "0.5268649", "0.5267932", "0.5267369", "0.52596164", "0.5256154", "0.52474284", "0.52415353", "0.52245355", "0.52244246", "0.5219459", "0.52164704", "0.51960206", "0.5195267", "0.5195257", "0.51897246", "0.5185208", "0.5174159", "0.5171539", "0.51670605", "0.51639706", "0.5159831", "0.5158563", "0.51308036", "0.51253814", "0.51191235", "0.5111485", "0.51077294", "0.5105412", "0.5105142", "0.5101065", "0.5093748" ]
0.0
-1
To control the printer performing paper feed
public void feed() throws IOException { // 下面指令为打印完成后自动走纸 writer.write(27); writer.write(100); writer.write(4); writer.write(10); writer.flush(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void doPrint() {\n printBehavior.printReceipt();\n\n }", "public void actionPerformed(ActionEvent e){\n if (e.getSource() instanceof JButton) {\r\n PrinterJob printJob = PrinterJob.getPrinterJob();\r\n PageFormat pf = new PageFormat();\r\n pf.setOrientation(PageFormat.LANDSCAPE);\r\n printJob.setPrintable(_instance, pf);\r\n //if (printJob.printDialog()) {\r\n try {\r\n printJob.print();\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n //}\r\n }\r\n }", "public void startPrinting()\n {\n printerSimulator.startPrintingProcess();\n }", "private void actionPrint() {\n // get PrinterJob\n PrinterJob job = PrinterJob.getPrinterJob();\n MyPrintable printable = new MyPrintable(job.defaultPage(), layoutPanel);\n\n // setup Printable, Pageable\n job.setPrintable(printable);\n job.setPageable(printable);\n\n // display print dialog and print\n if (job.printDialog()) {\n try {\n job.print();\n } catch (PrinterException e) {\n e.printStackTrace();\n }\n }\n }", "@Override\r\n\tpublic void setPrinter(IPrinter printer) {\n\r\n\t}", "public void PrinterStatus(){\n PrintService[] services = PrintServiceLookup.lookupPrintServices(null, null);\n System.out.println(\"Printer Services found:\");\n printService(services);\n\n // Look up the default print service\n PrintService service = PrintServiceLookup.lookupDefaultPrintService();\n if (service!=null) {\n System.out.println(\"Default Printer Service found:\");\n System.out.println(\"t\" + service);\n }\n\n\t\n // find printer service by name\n AttributeSet aset_name = new HashAttributeSet();\n aset_name.add(new PrinterName(\"Microsoft XPS Document Writer\", null));\n services = PrintServiceLookup.lookupPrintServices(null, aset_name);\n\n System.out.println(\"Printer Service Microsoft XPS Document Writer:\");\n printService(services);\n \n // find printer service by ip\n PrintServiceAttributeSet aset_URI = new HashPrintServiceAttributeSet();\n try {\n aset_URI.add(new PrinterURI(new URI(\"this ipp is wrong --ipp://hostName/printerName\")));\n } catch (URISyntaxException e) {\n System.out.println(\"URI exception caught: \"+e);\n }\n services = PrintServiceLookup.lookupPrintServices(null,aset_URI); \n // null could be replaced by DocFlavor.INPUT_STREAM.POSTSCRIPT, etc...\n System.out.println(\"Printer specific URI :\");\n printService(services);\n \n /*\n //another way to print to a specific uri\n URI printerURI = null;\n try {\n printerURI = new URI(\"ipp://SERVER:631/printers/PRINTER_NAME\");\n } catch (URISyntaxException ex) {\n Logger.getLogger(PrinterStatus.class.getName()).log(Level.SEVERE, null, ex);\n }\n IppPrintService svc = new IppPrintService(printerURI);\n services = PrintServiceLookup.lookupPrintServices(null,aset_URI); \n // null could be replaced by DocFlavor.INPUT_STREAM.POSTSCRIPT, etc...\n System.out.println(\"Printer specific URI :\");\n printService(services);\n // following is the way to print sth in a format of flavor\n InputStream stream = new BufferedInputStream(new FileInputStream(\"image.epl\"));\n DocFlavor flavor = DocFlavor.INPUT_STREAM.AUTOSENSE;\n Doc myDoc = new SimpleDoc(stream, flavor, null);\n DocPrintJob job = svc.createPrintJob();\n job.print(myDoc, null);\n */\n \n /*\n // find services that support a particular input format (e.g. JPEG)\n services = PrintServiceLookup.lookupPrintServices(DocFlavor.INPUT_STREAM.JPEG, null);\n System.out.println(\"Printer Services with JPEG support:\");\n printService(services);\n\n //find services that support a set of print job capabilities (e.g. color)\n aset = new HashAttributeSet();\n aset.add(ColorSupported.SUPPORTED);\n services = PrintServiceLookup.lookupPrintServices(null, aset);\n\n System.out.println(\"Printer Services with color support:\");\n printService(services);\n */ \n }", "@Override\n public void onPrinterAvailable(int flag) {\n Logger.i(TAG, \"working till here printer available!\");\n\n if (flag == 2) {\n// btn_PrintBill.setEnabled(false);\n// btn_Reprint.setEnabled(false);\n SetPrinterAvailable(false);\n } else if (flag == 5) {\n// btn_PrintBill.setEnabled(true);\n// btn_Reprint.setEnabled(true);\n// feedPrinter();\n SetPrinterAvailable(true);\n } else if (flag == 0) {\n// btn_PrintBill.setEnabled(true);\n// btn_Reprint.setEnabled(true);\n SetPrinterAvailable(false);\n }\n }", "public void actionPerformed(ActionEvent e) {\n \t\tPrinterJob job = PrinterJob.getPrinterJob();\n \t\tjob.setPrintable(this);\n \t\tboolean ok = job.printDialog();\n \t\tif (ok) {\n \t\t\ttry {\n \t\t\t\tjob.print();\n \t\t\t} catch (PrinterException ex) {\n \t\t\t\t/* The job did not successfully complete */\n \t\t\t}\n \t\t}\n \n \t}", "public void changePrintingAll()\n {\n printingAll = !printingAll;\n }", "public void setToPrint(Boolean toPrint) {\r\n this.toPrint = toPrint;\r\n }", "public void print() {\n DocFlavor flavor = DocFlavor.BYTE_ARRAY.AUTOSENSE;\n \n //Aca obtenemos el servicio de impresion por default\n //Si no quieres ver el dialogo de seleccionar impresora usa esto\n //PrintService defaultService = PrintServiceLookup.lookupDefaultPrintService();\n \n \n //Con esto mostramos el dialogo para seleccionar impresora\n //Si quieres ver el dialogo de seleccionar impresora usalo\n //Solo mostrara las impresoras que soporte arreglo de bits\n PrintRequestAttributeSet pras = new HashPrintRequestAttributeSet();\n PrintService printService[] = PrintServiceLookup.lookupPrintServices(flavor, pras);\n PrintService defaultService = PrintServiceLookup.lookupDefaultPrintService();\n PrintService service = ServiceUI.printDialog(null, 700, 200, printService, defaultService, flavor, pras);\n \n //Creamos un arreglo de tipo byte\n byte[] bytes;\n\n //Aca convertimos el string(cuerpo del ticket) a bytes tal como\n //lo maneja la impresora(mas bien ticketera :p)\n bytes = this.contenidoFactura.getBytes();\n //Creamos un documento a imprimir, a el se le appendeara\n //el arreglo de bytes\n Doc doc = new SimpleDoc(bytes,flavor,null);\n \n //Creamos un trabajo de impresión\n DocPrintJob job = service.createPrintJob();\n\n //Imprimimos dentro de un try de a huevo\n try {\n //El metodo print imprime\n job.print(doc, null);\n \n } catch (Exception er) {\n JOptionPane.showMessageDialog(null,\"Error al imprimir: \" + er.getMessage());\n }\n DocPrintJob cutjob = service.createPrintJob();\n DocPrintJob spacejob = service.createPrintJob();\n //dejando espacios al final\n byte[] espacio = (\"\\n \\n \\n \\n\").getBytes();\n try{\n spacejob.print(new SimpleDoc(espacio,flavor,null),null);\n }\n catch (Exception er) {\n JOptionPane.showMessageDialog(null,\"Error al imprimir: \" + er.getMessage());\n }\n //cortando el papel\n try{\n byte[] cutP = new byte[] { 0x1d, 'V', 1 };\n cutjob.print(new SimpleDoc(cutP,flavor,null),null); \n }catch (Exception er) {\n JOptionPane.showMessageDialog(null,\"Error al imprimir: \" + er.getMessage());\n }\n \n }", "private void doPrint() {\n PrintManager printManager = (PrintManager) this\n .getSystemService(Context.PRINT_SERVICE);\n\n // Set job name, which will be displayed in the print queue\n String jobName = this.getString(R.string.app_name) + \" Document\";\n\n // Start a print job, passing in a PrintDocumentAdapter implementation\n // to handle the generation of a print document\n printManager.print(jobName, new MyPrintDocumentAdapter(this),\n null); //\n }", "public void doPrint()\n {\n PrinterJob printJob = PrinterJob.getPrinterJob();\n \n printJob.setPrintable((Printable) mapComponent);\n if (printJob.printDialog()) {\n try {\n printJob.print();\n } catch (Exception e) {\n ErrorHandler.displayError(\"An error occured during printing:\\n\" + e, ErrorHandler.ERR_PRINT_FAIL);\n }\n }\n }", "@Override\n public void run() {\n printfManager.openPrinter(alreadyBlueList.get(args));\n }", "public void print() {\n\t\tPrinter.print(doPrint());\n\t}", "private void doPrintAdvice(){\n\t\tcurrentStep = OPERATION_NAME+\": printing advice\";\n\t\tString[] toDisplay = {\n\t\t\t\t\"Operation succeeded!\",\n\t\t\t\t\"You have changed your password\",\n\t\t\t\t\"Press 1 -> Print the advice\",\n\t\t\t\t\"Press 2 -> Quit without printing\"\n\t\t};\n\t\tif (!_atmssHandler.doDisDisplayUpper(toDisplay)) {\n\t\t\trecord(\"Dis\");\n\t\t\treturn;\n\t\t}\n\t\twhile (true) {\n\t\t\tString userInput = _atmssHandler.doKPGetSingleInput(TIME_LIMIT);\n\t\t\tif (userInput == null) return;\n\t\t\tif (userInput.equals(\"1\")) {\n\t\t\t\tString[] toPrint = {\n\t\t\t\t\t\t\"Operation name: \" + OPERATION_NAME,\n\t\t\t\t\t\t\"Card Number: \" + _session.getCardNo(),\n\t\t\t\t\t\t\"Result: succeeded\"\n\t\t\t\t};\n\t\t\t\tif (!_atmssHandler.doAPPrintStrArray(toPrint)) record(\"AP\");\n\t\t\t\treturn;\n\t\t\t} else if (userInput.equals(\"2\")) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}", "public void setPrimaryPrintIndicator(java.lang.String param){\n localPrimaryPrintIndicatorTracker = true;\n \n this.localPrimaryPrintIndicator=param;\n \n\n }", "public void visitPOSPrinter( DevCat devCat ) {}", "public boolean getToPrint() {\r\n return this.toPrint;\r\n }", "public void doPrint() {\n\n PrintingUtils.userPrintText(fDocument.getText(),\n fTextPanel.getDefaultValues(),\n this,\n this.getTitle());\n }", "@Override\n\t\t\tpublic void print() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tpublic void print() {\n\t\tdecoratedPrinter.print();\n\t}", "public void printTest(){\n\r\n p.resetAll();\r\n p.initialize();\r\n p.feedBack((byte)2);\r\n// p.color(1);\r\n p.alignCenter();\r\n p.setText(\"The Dum Dum Name\");\r\n p.newLine();\r\n p.setText(\"Restaurant Dining\");\r\n p.newLine();\r\n p.addLineSeperator();\r\n p.newLine();\r\n p.setText(\"Bling Bling\");\r\n p.newLine();\r\n p.addLineSeperator();\r\n p.newLine();\r\n\r\n p.alignLeft();\r\n p.setText(\"POD No \\t\\t: 2001 \\t\\t Table \\t: E511\");\r\n p.newLine(); \r\n\r\n p.setText(\"Res Date \\t: \" + \"01/01/1801 22:59\");\r\n\r\n p.newLine();\r\n p.setText(\"Session \\t: Evening Session\");\r\n p.newLine();\r\n p.setText(\"Staff \\t\\t: Bum Dale\");\r\n p.newLine();\r\n p.addLineSeperator();\r\n p.newLine();\r\n p.alignCenter();\r\n p.setText(\" - Some Items - \");\r\n p.newLine();\r\n p.alignLeft();\r\n p.addLineSeperator();\r\n\r\n p.newLine();\r\n\r\n p.setText(\"No \\tItem\\t\\tUnit\\tQty\");\r\n p.newLine();\r\n p.addLineSeperator();\r\n \r\n p.newLine();\r\n p.setText(\"1\" + \"\\t\" + \"Aliens Everywhere\" + \"\\t\" + \"Rats\" + \"\\t\" + \"500\");\r\n p.newLine();\r\n p.setText(\"1\" + \"\\t\" + \"Aliens Everywhere\" + \"\\t\" + \"Rats\" + \"\\t\" + \"500\");\r\n p.newLine();\r\n p.setText(\"1\" + \"\\t\" + \"Aliens Everywhere\" + \"\\t\" + \"Rats\" + \"\\t\" + \"500\");\r\n p.newLine();\r\n p.setText(\"1\" + \"\\t\" + \"Aliens Everywhere\" + \"\\t\" + \"Rats\" + \"\\t\" + \"500\");\r\n p.newLine();\r\n p.setText(\"1\" + \"\\t\" + \"Aliens Everywhere\" + \"\\t\" + \"Rats\" + \"\\t\" + \"500\");\r\n p.newLine();\r\n p.setText(\"1\" + \"\\t\" + \"Aliens Everywhere\" + \"\\t\" + \"Rats\" + \"\\t\" + \"500\");\r\n p.newLine();\r\n \r\n p.addLineSeperator();\r\n p.feed((byte)3);\r\n p.finit();\r\n\r\n p.feedPrinter(p.finalCommandSet().getBytes());\r\n \r\n }", "public void exePRINT()\n\t{\n\t\tif(!vldDATA())\n\t\t\treturn;\n\t\t\n\t\ttry\n\t\t{\n\t\t\tif(M_rdbHTML.isSelected())\n\t\t\t\tstrFILNM = cl_dat.M_strREPSTR_pbst+\"mr_rpexd.html\";\n\t\t\telse\n\t\t\t\tstrFILNM = cl_dat.M_strREPSTR_pbst+\"mr_rpexd.doc\";\n\n\t\t\tgetDATA();\n\t\t\t\n\t\t/*\tif(intRECCT == 0)\n\t\t\t{\t\n\t\t\t\tsetMSG(\"No Data found..\",'E');\n\t\t\t\treturn;\n\t\t\t}*/\n\t\t\tif(cl_dat.M_cmbOPTN_pbst.getSelectedItem().toString().equals(cl_dat.M_OPPRN_pbst))\n\t\t\t{\t\t\t\t\t\n\t\t\t\tif (M_rdbTEXT.isSelected())\n\t\t\t\t doPRINT(strFILNM);\n\t\t\t\telse \n\t\t\t\t{ \n\t\t\t\t\tRuntime r = Runtime.getRuntime();\n\t\t\t\t\tProcess p = null;\t\t\t\t\t\n\t\t\t\t\tp = r.exec(\"c:\\\\windows\\\\iexplore.exe \"+strFILNM); \n\t\t\t\t\tsetMSG(\"For Printing Select File Menu, then Print ..\",'N');\n\t\t\t\t} \n\t\t\t}\n\t\t\telse if(cl_dat.M_cmbOPTN_pbst.getSelectedItem().toString().equals(cl_dat.M_OPSCN_pbst))\n\t\t\t{\n\t\t\t Runtime r = Runtime.getRuntime();\n\t\t\t\tProcess p = null;\n\t\t\t\t\t\n\t\t\t\tif(M_rdbHTML.isSelected())\n\t\t\t\t p = r.exec(\"c:\\\\windows\\\\iexplore.exe \"+strFILNM); \n\t\t\t\telse\n\t\t\t\t p = r.exec(\"c:\\\\windows\\\\wordpad.exe \"+strFILNM);\n\t\t\t}\n\t\t\telse if(cl_dat.M_cmbDESTN_pbst.getSelectedItem().toString().trim().equals(cl_dat.M_OPEML_pbst))\n\t\t\t{\t\t\t\n\t\t\t\tcl_eml ocl_eml = new cl_eml();\t\t\t\t \n\t\t\t for(int i=0;i<M_cmbDESTN.getItemCount();i++)\n\t\t\t {\n\t\t\t\t ocl_eml.sendfile(M_cmbDESTN.getItemAt(i).toString().trim(),strFILNM,\"Export Certificate\",\" \");\n\t\t\t\t setMSG(\"File Sent to \" + M_cmbDESTN.getItemAt(i).toString().trim() + \" Successfuly \",'N');\t\t\t\t \n\t\t\t\t}\t\t\t\t \t \t\n\t\t\t}\n\t\t}\n\t\tcatch(Exception L_EX)\n\t\t{\n\t\t\tsetMSG(L_EX,\"exePRINT\");\n\t\t}\t\t\n\t}", "public void savingsReceipPrint(List receiptDetails,Component c) {\n \np.resetAll();\n\np.initialize();\n\np.feedBack((byte)2);\n\n//p.color(0);\n//p.chooseFont(1);\np.alignCenter();\n//p.emphasized(true);\n//p.underLine(2);\np.setText(receiptDetails.get(1).toString());\np.newLine();\np.setText(receiptDetails.get(2).toString());\np.newLine();\np.setText(receiptDetails.get(3).toString());\np.newLine();\np.newLine();\n//p.addLineSeperatorX();\np.underLine(0);\np.emphasized(false);\np.underLine(0);\np.alignCenter();\np.setText(\" *** Savings Made Receipt ***\");\np.newLine();\np.addLineSeperator();\np.newLine();\n\np.alignLeft();\np.setText(\"Account Number: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(9).toString()+p.underLine(0));\np.newLine(); \np.alignLeft();\np.setText(\"Savings Id: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(0).toString()+p.underLine(0));\np.newLine(); \np.alignLeft();\np.emphasized(true);\np.setText(\"Customer: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(4).toString()+p.underLine(0));\np.newLine(); \n//p.emphasized(false);\n//p.setText(\"Loan+Interest: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(6).toString()+\"/=\"+p.underLine(0));\n//p.newLine();\n//p.setText(\"Date Taken: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(7).toString()+p.underLine(0));\n//p.newLine();\n//p.setText(\"Loan Status: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(14).toString()+p.underLine(0));\n//p.newLine();\np.setText(\"Savings Date: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(10).toString()+p.underLine(0));\np.newLine();\np.setText(\"Savings Time: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(11).toString()+p.underLine(0));\np.newLine();\n\np.underLine(0);\np.emphasized(false);\n//p.underLine(0);\np.addLineSeperator();\np.newLine();\np.alignCenter();\np.setText(\"***** Savings Details ***** \");\np.newLine();\np.addLineSeperator();\np.newLine();\n\np.alignLeft();\np.setText(\"Savings Made: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(6).toString()+\"/=\"+p.underLine(0));\np.newLine(); \np.alignLeft();\np.setText(\"Savings Balance: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(8).toString()+\"/=\"+p.underLine(0));\np.newLine(); \np.alignLeft();\np.emphasized(true);\n//p.setText(\"Customer Name: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(4).toString()+p.underLine(0));\n//p.newLine(); \n//p.emphasized(false);\n\np.addLineSeperator();\np.doubleStrik(true);\np.newLine();\np.underLine(2) ;\np.setText(\"Officer: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(5).toString()+p.underLine(0));\np.newLine();\np.addLineSeperatorX();\n\np.addLineSeperator();\np.doubleStrik(true);\np.newLine();\np.underLine(2) ;\np.setText(\"Officer Signiture:\");\np.addLineSeperatorX();\np.newLine();\np.addLineSeperator();\np.doubleStrik(true);\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\np.underLine(2) ;\np.setText(\"Customer Signiture:\");\np.addLineSeperatorX();\np.newLine();\np.setText(\"OFFICE NUMBER: \"+receiptDetails.get(12).toString());\n////p.newLine();\n//p.addLineSeperatorX();\np.feed((byte)3);\np.finit();\n\nprint.feedPrinter(dbq.printDrivers(c),p.finalCommandSet().getBytes());\n \n\n }", "public void print() {\n\t\tSystem.out.println(\"针式打印机打印了\");\n\t\t\n\t}", "public void setSecondaryPrintIndicator(java.lang.String param){\n localSecondaryPrintIndicatorTracker = true;\n \n this.localSecondaryPrintIndicator=param;\n \n\n }", "private static void createPrinterMenuLogic() {\n\n\t\tmenuHandler.clrscr();\n\n\t\t// Printer name\n\t\tString printerName = menuHandler.inputString(\"Please input the printer name (cannot be empty)\");\n\n\t\t// Printer paper format\n\t\tSystem.out.println(\"Select printer paper format capabilities\");\n\t\tint maxChoice = menuHandler.printerFormatMenu();\n\t\tint formatChoice = menuHandler.intRangeInput(\"Please input a number in range [1, \" + maxChoice + \"]\", 1, maxChoice);\n\n\t\t// Printer toner\n\t\tSystem.out.println(\"Select printer toner capabilities\");\n\t\tmaxChoice = menuHandler.printerTonerMenu();\n\t\tint tonerChoice = menuHandler.intRangeInput(\"Please input a number in range [1, \" + maxChoice + \"]\", 1, maxChoice);\n\n\t\t// Parse user choices and create printer capabilities object\n\t\tBoolean[] bools = parsePrinterCapabilities(formatChoice, tonerChoice);\n\t\tPrinterCapability printerCapability = objectHandler.createPrinterCapability(bools[canPrintA4], bools[canPrintA3], bools[canPrintBlack], bools[canPrintColor]);\n\n\t\t// Ask user about pricing and create printer pricing object\n\t\tPrinterPricing printerPricing = createPrinterPricing(bools);\n\n\t\t// Ask user about capacity and create printer capacity object\n\t\tPrinterCapacity printerCapacity = createPrinterCapacity(bools);\n\n\t\tprinters.put(\"Printer\" + printers.size(), objectHandler.createPrinter(printerName, printerCapability, printerPricing, printerCapacity, objectHandler.createPrinterStatus()));\n\t}", "public boolean isEnabledPrint() {\n return enabledPrint;\n }", "@Override\r\n\t\t\tpublic void print() {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\tpublic void print() {\n\t\t\n\t}", "@Override\r\n\tpublic void print() {\n\t}", "public void print() { /* FILL IN */ }", "@Override\n public void run() {\n\n if (PrinterInstance.mPrinter == null) {\n Toast.makeText(mContext, getString(R.string.not_support), Toast.LENGTH_LONG).show();\n } else {\n mPrinter.printImage(monoChromeBitmap, PAlign.NONE, 0, false);\n }\n }", "public void savingsWithdrawReceipPrint(List receiptDetails,Component c) {\n \np.resetAll();\n\np.initialize();\n\np.feedBack((byte)2);\n\np.color(0);\np.chooseFont(1);\np.alignCenter();\n//p.emphasized(true);\n//p.underLine(2);\np.setText(receiptDetails.get(1).toString());\np.newLine();\np.setText(receiptDetails.get(2).toString());\np.newLine();\np.setText(receiptDetails.get(3).toString());\np.newLine();\np.newLine();\n//p.addLineSeperatorX();\np.underLine(0);\np.emphasized(false);\np.underLine(0);\np.alignCenter();\np.setText(\" *** Savings Withdrawal ***\");\np.newLine();\np.addLineSeperator();\np.newLine();\n\np.alignLeft();\np.setText(\"Account Number: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(9).toString()+p.underLine(0));\np.newLine(); \np.alignLeft();\np.setText(\"Savings Id: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(0).toString()+p.underLine(0));\np.newLine(); \np.alignLeft();\np.emphasized(true);\np.setText(\"Customer: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(4).toString()+p.underLine(0));\np.newLine(); \n//p.emphasized(false);\n//p.setText(\"Loan+Interest: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(6).toString()+\"/=\"+p.underLine(0));\n//p.newLine();\n//p.setText(\"Date Taken: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(7).toString()+p.underLine(0));\n//p.newLine();\n//p.setText(\"Loan Status: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(14).toString()+p.underLine(0));\n//p.newLine();\np.setText(\"Withdrawal Date: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(10).toString()+p.underLine(0));\np.newLine();\np.setText(\"Withdrawal Time: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(11).toString()+p.underLine(0));\np.newLine();\n\np.underLine(0);\np.emphasized(false);\n//p.underLine(0);\np.addLineSeperator();\np.newLine();\np.alignCenter();\np.setText(\"***** Withdrawal Details ***** \");\np.newLine();\np.addLineSeperator();\np.newLine();\n\np.alignLeft();\np.setText(\"Withdrawal Made: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(7).toString()+\"/=\"+p.underLine(0));\np.newLine(); \np.alignLeft();\np.setText(\"Savings Balance: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(8).toString()+\"/=\"+p.underLine(0));\np.newLine(); \np.alignLeft();\np.emphasized(true);\n//p.setText(\"Customer Name: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(4).toString()+p.underLine(0));\n//p.newLine(); \n//p.emphasized(false);\n\np.addLineSeperator();\np.doubleStrik(true);\np.newLine();\np.underLine(2) ;\np.setText(\"Officer: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(5).toString()+p.underLine(0));\np.newLine();\np.addLineSeperatorX();\n\np.addLineSeperator();\np.doubleStrik(true);\np.newLine();\np.underLine(2) ;\np.setText(\"Officer Signiture:\");\np.addLineSeperatorX();\np.newLine();\np.addLineSeperator();\np.doubleStrik(true);\n//p.newLine();\np.underLine(2) ;\np.setText(\"Customer Signiture:\");\np.addLineSeperatorX();\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\np.newLine();\np.setText(\"OFFICE NUMBER: \"+receiptDetails.get(12).toString());\n\np.newLine();\np.addLineSeperatorX();\n//p.newLine();\np.feed((byte)3);\np.finit();\n\nprint.feedPrinter(dbq.printDrivers(c),p.finalCommandSet().getBytes());\n \n\n }", "public void print()\n {\n System.out.println();\n System.out.println(\"Ticket to \" + destination +\n \" Price : \" + price + \" pence \" + \n \" Issued \" + issueDateTime);\n System.out.println();\n }", "@Override\n\tpublic void print() {\n\n\t}", "public void replenishPaperTray()\n {\n printerSimulator.replenishPaperTray (\n Printer.PAPER_STACK_SIZE );\n }", "public Object getPrinter(PageFormat pf);", "public static void main(String[] args){\n Printer printer = new Printer();\n printer.print();\n }", "public void goToPrinterSection(){\n click(By.name(printerTab));\n }", "QPrintTerm createPrintTerm();", "private void realPrint(PrintJob job) {\n\t}", "private void realPrint(PrintJob job) {\n\t}", "private void print() {\n printInputMessage();\n printFrequencyTable();\n printCodeTable();\n printEncodedMessage();\n }", "public void print(String toPrint) {\n for (Printer print : printers) {\n// System.out.println(\"Start \" + print.busyEndTime);\n if (print.isAvailable()) {\n System.out.println(\"Printer \" + print.id + \" is available to print: \" + toPrint);\n }\n print.busyEndTime = LocalTime.now().plusSeconds(5);\n// System.out.println(\"End \" + print.busyEndTime);\n }\n // Its not needed to actually print with a printer in this exercise\n// System.out.println(\"Printer \" + id + \" is printing.\");\n// busyEndTime = LocalTime.now().plusSeconds(5);\n }", "@Override\n\tpublic boolean getPrint() {\n\t\treturn false;\n\t}", "@Override\n\t\tpublic void print() {\n\n\t\t}", "@Test\n public void canRefillPaper(){\n printer.print(10,2);\n printer.print(10,2);\n printer.refillPaper();\n assertEquals(250, printer.getSheets());\n }", "public static void main (String[] args)\n {\n PrinterJob job = PrinterJob.getPrinterJob();\n\n // It is first called to tell it what object will print each page.\n job.setPrintable(new PrintObject());\n\n // Then it is called to display the standard print options dialog.\n if (job.printDialog())\n {\n // If the user has pressed OK (printDialog returns true), then go\n // ahead with the printing. This is started by the simple call to\n // the job print() method. When it runs, it calls the page print\n // object for page index 0. Then page index 1, 2, and so on\n // until NO_SUCH_PAGE is returned.\n try { job.print(); }\n catch (PrinterException e) { System.out.println(e); }\n }\n }", "public static void main (String[] args){\n Printer printer = new Printer();\n printer.print();\n }", "public void printReceipt(){\n sale.updateExternalSystems();\n sale.printReceipt(totalCost, amountPaid, change);\n }", "public void skipPrint()\n {\n skipPrint(0);\n }", "public void printRecipt(){\n\n }", "public void printReceipt(){\n\t\t//TO DO\n\t\t\n\t}", "public void TesteCompleto() {\n\n\n TectoySunmiPrint.getInstance().initPrinter();\n TectoySunmiPrint.getInstance().setSize(24);\n\n // Alinhamento do texto\n\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_CENTER);\n TectoySunmiPrint.getInstance().printText(\"Alinhamento\\n\");\n TectoySunmiPrint.getInstance().printText(\"--------------------------------\\n\");\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_LEFT);\n TectoySunmiPrint.getInstance().printText(\"TecToy Automação\\n\");\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_CENTER);\n TectoySunmiPrint.getInstance().printText(\"TecToy Automação\\n\");\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_RIGTH);\n TectoySunmiPrint.getInstance().printText(\"TecToy Automação\\n\");\n\n // Formas de impressão\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_CENTER);\n TectoySunmiPrint.getInstance().printText(\"Formas de Impressão\\n\");\n TectoySunmiPrint.getInstance().printText(\"--------------------------------\\n\");\n TectoySunmiPrint.getInstance().setSize(28);\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_LEFT);\n TectoySunmiPrint.getInstance().printStyleBold(true);\n TectoySunmiPrint.getInstance().printText(\"TecToy Automação\\n\");\n TectoySunmiPrint.getInstance().printStyleReset();\n TectoySunmiPrint.getInstance().printStyleAntiWhite(true);\n TectoySunmiPrint.getInstance().printText(\"TecToy Automação\\n\");\n TectoySunmiPrint.getInstance().printStyleReset();\n TectoySunmiPrint.getInstance().printStyleDoubleHeight(true);\n TectoySunmiPrint.getInstance().printText(\"TecToy Automação\\n\");\n TectoySunmiPrint.getInstance().printStyleReset();\n TectoySunmiPrint.getInstance().printStyleDoubleWidth(true);\n TectoySunmiPrint.getInstance().printText(\"TecToy Automação\\n\");\n TectoySunmiPrint.getInstance().printStyleReset();\n TectoySunmiPrint.getInstance().printStyleInvert(true);\n TectoySunmiPrint.getInstance().printText(\"TecToy Automação\\n\");\n TectoySunmiPrint.getInstance().printStyleReset();\n TectoySunmiPrint.getInstance().printStyleItalic(true);\n TectoySunmiPrint.getInstance().printText(\"TecToy Automação\\n\");\n TectoySunmiPrint.getInstance().printStyleReset();\n TectoySunmiPrint.getInstance().printStyleStrikethRough(true);\n TectoySunmiPrint.getInstance().printText(\"TecToy Automação\\n\");\n TectoySunmiPrint.getInstance().printStyleReset();\n TectoySunmiPrint.getInstance().printStyleUnderLine(true);\n TectoySunmiPrint.getInstance().printText(\"TecToy Automação\\n\");\n TectoySunmiPrint.getInstance().printStyleReset();\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_LEFT);\n TectoySunmiPrint.getInstance().printTextWithSize(\"TecToy Automação\\n\", 35);\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_CENTER);\n TectoySunmiPrint.getInstance().printTextWithSize(\"TecToy Automação\\n\", 28);\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_RIGTH);\n TectoySunmiPrint.getInstance().printTextWithSize(\"TecToy Automação\\n\",50);\n // TectoySunmiPrint.getInstance().feedPaper();\n TectoySunmiPrint.getInstance().setSize(24);\n\n\n // Impressão de BarCode\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_CENTER);\n TectoySunmiPrint.getInstance().printText(\"Imprime BarCode\\n\");\n TectoySunmiPrint.getInstance().printText(\"--------------------------------\\n\");\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_LEFT);\n TectoySunmiPrint.getInstance().printBarCode(\"7894900700046\", TectoySunmiPrint.BarCodeModels_EAN13, 162, 2,\n TectoySunmiPrint.BarCodeTextPosition_INFORME_UM_TEXTO);\n TectoySunmiPrint.getInstance().printAdvanceLines(2);\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_CENTER);\n TectoySunmiPrint.getInstance().printBarCode(\"7894900700046\", TectoySunmiPrint.BarCodeModels_EAN13, 162, 2,\n TectoySunmiPrint.BarCodeTextPosition_ABAIXO_DO_CODIGO_DE_BARRAS);\n TectoySunmiPrint.getInstance().printAdvanceLines(2);\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_RIGTH);\n TectoySunmiPrint.getInstance().printBarCode(\"7894900700046\", TectoySunmiPrint.BarCodeModels_EAN13, 162, 2,\n TectoySunmiPrint.BarCodeTextPosition_ACIMA_DO_CODIGO_DE_BARRAS_BARCODE);\n TectoySunmiPrint.getInstance().printAdvanceLines(2);\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_CENTER);\n TectoySunmiPrint.getInstance().printBarCode(\"7894900700046\", TectoySunmiPrint.BarCodeModels_EAN13, 162, 2,\n TectoySunmiPrint.BarCodeTextPosition_ACIMA_E_ABAIXO_DO_CODIGO_DE_BARRAS);\n //TectoySunmiPrint.getInstance().feedPaper();\n TectoySunmiPrint.getInstance().print3Line();\n // Impressão de BarCode\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_CENTER);\n TectoySunmiPrint.getInstance().printText(\"Imprime QrCode\\n\");\n TectoySunmiPrint.getInstance().printText(\"--------------------------------\\n\");\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_LEFT);\n TectoySunmiPrint.getInstance().printQr(\"www.tectoysunmi.com.br\", 8, 1);\n //TectoySunmiPrint.getInstance().feedPaper();\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_CENTER);\n TectoySunmiPrint.getInstance().printQr(\"www.tectoysunmi.com.br\", 8, 1);\n //TectoySunmiPrint.getInstance().feedPaper();\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_RIGTH);\n TectoySunmiPrint.getInstance().printQr(\"www.tectoysunmi.com.br\", 8, 1);\n //TectoySunmiPrint.getInstance().feedPaper();\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_LEFT);\n TectoySunmiPrint.getInstance().printDoubleQRCode(\"www.tectoysunmi.com.br\",\"tectoysunmi\", 7, 1);\n //TectoySunmiPrint.getInstance().feedPaper();\n\n\n // Impresão Imagem\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_CENTER);\n TectoySunmiPrint.getInstance().printText(\"Imprime Imagem\\n\");\n TectoySunmiPrint.getInstance().printText(\"-------------------------------\\n\");\n BitmapFactory.Options options = new BitmapFactory.Options();\n options.inTargetDensity = 160;\n options.inDensity = 160;\n Bitmap bitmap1 = null;\n Bitmap bitmap = null;\n if (bitmap == null) {\n bitmap = BitmapFactory.decodeResource(getResources(), test, options);\n }\n if (bitmap1 == null) {\n bitmap1 = BitmapFactory.decodeResource(getResources(), test1, options);\n bitmap1 = scaleImage(bitmap1);\n }\n TectoySunmiPrint.getInstance().printBitmap(bitmap1);\n //TectoySunmiPrint.getInstance().feedPaper();\n TectoySunmiPrint.getInstance().print3Line();\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_LEFT);\n TectoySunmiPrint.getInstance().printBitmap(bitmap1);\n //TectoySunmiPrint.getInstance().feedPaper();\n TectoySunmiPrint.getInstance().print3Line();\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_RIGTH);\n TectoySunmiPrint.getInstance().printBitmap(bitmap1);\n //TectoySunmiPrint.getInstance().feedPaper();\n TectoySunmiPrint.getInstance().print3Line();\n\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_CENTER);\n TectoySunmiPrint.getInstance().printText(\"Imprime Tabela\\n\");\n TectoySunmiPrint.getInstance().printText(\"--------------------------------\\n\");\n\n String[] prod = new String[3];\n int[] width = new int[3];\n int[] align = new int[3];\n\n width[0] = 100;\n width[1] = 50;\n width[2] = 50;\n\n align[0] = TectoySunmiPrint.Alignment_LEFT;\n align[1] = TectoySunmiPrint.Alignment_CENTER;\n align[2] = TectoySunmiPrint.Alignment_RIGTH;\n\n prod[0] = \"Produto 001\";\n prod[1] = \"10 und\";\n prod[2] = \"3,98\";\n TectoySunmiPrint.getInstance().printTable(prod, width, align);\n\n prod[0] = \"Produto 002\";\n prod[1] = \"10 und\";\n prod[2] = \"3,98\";\n TectoySunmiPrint.getInstance().printTable(prod, width, align);\n\n prod[0] = \"Produto 003\";\n prod[1] = \"10 und\";\n prod[2] = \"3,98\";\n TectoySunmiPrint.getInstance().printTable(prod, width, align);\n\n prod[0] = \"Produto 004\";\n prod[1] = \"10 und\";\n prod[2] = \"3,98\";\n TectoySunmiPrint.getInstance().printTable(prod, width, align);\n\n prod[0] = \"Produto 005\";\n prod[1] = \"10 und\";\n prod[2] = \"3,98\";\n TectoySunmiPrint.getInstance().printTable(prod, width, align);\n\n prod[0] = \"Produto 006\";\n prod[1] = \"10 und\";\n prod[2] = \"3,98\";\n TectoySunmiPrint.getInstance().printTable(prod, width, align);\n\n TectoySunmiPrint.getInstance().print3Line();\n TectoySunmiPrint.getInstance().openCashBox();\n TectoySunmiPrint.getInstance().cutpaper();\n\n }", "@Override\n public void widgetSelected(SelectionEvent e) {\n if (previewProduct != null && !previewProduct.isEmpty()) {\n PshPrintUtil.getPshPrinter().printInput(previewProduct);\n }\n }", "public void savingsReceipPrintStamp(List receiptDetails,Component c) {\n \np.resetAll();\n\np.initialize();\n\np.feedBack((byte)2);\n\n//p.color(0);\n//p.chooseFont(1);\np.alignCenter();\n//p.emphasized(true);\n//p.underLine(2);\np.setText(receiptDetails.get(1).toString());\np.newLine();\np.setText(receiptDetails.get(2).toString());\np.newLine();\np.setText(receiptDetails.get(3).toString());\np.newLine();\np.newLine();\n//p.addLineSeperatorX();\np.underLine(0);\np.emphasized(false);\np.underLine(0);\np.alignCenter();\np.setText(\" *** Savings Made Receipt ***\");\np.newLine();\np.addLineSeperator();\np.newLine();\n\np.alignLeft();\np.setText(\"Account Number: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(9).toString()+p.underLine(0));\np.newLine(); \np.alignLeft();\np.setText(\"Savings Id: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(0).toString()+p.underLine(0));\np.newLine(); \np.alignLeft();\np.emphasized(true);\np.setText(\"Customer: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(4).toString()+p.underLine(0));\np.newLine(); \n//p.emphasized(false);\n//p.setText(\"Loan+Interest: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(6).toString()+\"/=\"+p.underLine(0));\n//p.newLine();\n//p.setText(\"Date Taken: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(7).toString()+p.underLine(0));\n//p.newLine();\n//p.setText(\"Loan Status: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(14).toString()+p.underLine(0));\n//p.newLine();\np.setText(\"Savings Date: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(10).toString()+p.underLine(0));\np.newLine();\np.setText(\"Savings Time: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(11).toString()+p.underLine(0));\np.newLine();\n\np.underLine(0);\np.emphasized(false);\n//p.underLine(0);\np.addLineSeperator();\np.newLine();\np.alignCenter();\np.setText(\"***** Savings Details ***** \");\np.newLine();\np.addLineSeperator();\np.newLine();\n\np.alignLeft();\np.setText(\"Savings Made: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(6).toString()+\"/=\"+p.underLine(0));\np.newLine(); \np.alignLeft();\np.setText(\"Savings Balance: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(8).toString()+\"/=\"+p.underLine(0));\np.newLine(); \np.alignLeft();\np.emphasized(true);\n//p.setText(\"Customer Name: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(4).toString()+p.underLine(0));\n//p.newLine(); \n//p.emphasized(false);\n\np.addLineSeperator();\np.doubleStrik(true);\np.newLine();\np.underLine(2) ;\np.setText(\"Officer: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(5).toString()+p.underLine(0));\np.newLine();\np.addLineSeperatorX();\n\np.addLineSeperator();\np.doubleStrik(true);\np.newLine();\np.underLine(2) ;\np.setText(\"Officer Signiture:\");\np.addLineSeperatorX();\np.newLine();\np.addLineSeperator();\np.doubleStrik(true);\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.underLine(2) ;\np.setText(\"Customer Signiture:\");\np.addLineSeperatorX();\np.newLine();\n//p.setText(\"OFFICE NUMBER: \"+receiptDetails.get(12).toString());\n////p.newLine();\n//p.addLineSeperatorX();\np.feed((byte)3);\np.finit();\n\nprint.feedPrinter(dbq.printDrivers(c),p.finalCommandSet().getBytes());\n \n\n }", "public void actionPerformed(ActionEvent e) {\r\n final PrintPreview pp = new PrintPreview();\r\n final JEditorPane ep = new JEditorPane();\r\n final JFrame f = new JFrame(\"Print Preview\");\r\n ep.setEditable(false);\r\n ep.setText(getManager().getTabFolder().getSelection().getText());\r\n\r\n Font.decode(PreferenceStore.getString(Preference.FONT));\r\n f.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);\r\n f.setSize(800, 600);\r\n f.add(new JScrollPane(ep));\r\n f.setVisible(true);\r\n pp.showPreview(ep);\r\n f.dispose();\r\n \r\n }", "public void print() {\n btprint(c);\n }", "public void print () {\n }", "public void setSprinting ( boolean sprinting ) {\n\t\texecute ( handle -> handle.setSprinting ( sprinting ) );\n\t}", "@FXML\n private void onPrintResults() {\n }", "@Override\n public void print() {\n }", "public static void main(String[] args) {\r\n\t\t// Workaround for SWT bug on GTK - force SWT to initialize so we don't\r\n\t\t// crash.\r\n\t\tDisplay.getDefault();\r\n\r\n\t\tPaperClips.print(new PrintJob(\"BreakPrintExample.java\", createPrint()),\r\n\t\t\t\tnew PrinterData());\r\n\t}", "@Override\n\tpublic String print(CliPrinter printer) {\n\t\treturn printer.printTProductCards(this);\n\t}", "public void visitFiscalPrinter( DevCat devCat ) {}", "private void printOut(String[] printerMakerResult)\n {\n //shows user the printerMaker result\n\n for(int i=0;i<printerMakerResult.length;i++)\n {\n outVideo.println(printerMakerResult[i]);\n outVideo.flush();\n }\n }", "public void setPrintArea(int arg0, String arg1) {\n\n\t}", "public TextFilePrinter getPrinter();", "public void updatePrintFigures() {\n\n\t}", "public void stop()\n {\n printerSimulator.stop();\n }", "public Port getPrint_port() {\nreturn Print_port;\n}", "public String getPrint_optr(){\r\n\t\treturn this.print_optr ;\r\n\t}", "private static void printerMenuLogic() {\n\t\t\n\t\tboolean onMenu = true;\n\n\t\twhile(onMenu) {\n\n\t\t\tmenuHandler.clrscr();\n\t\t\tint maxChoice = menuHandler.printerMenu();\n\n\t\t\tint intChoice = menuHandler.intRangeInput(\"Please input a number in range [1, \" + maxChoice + \"]\", 1, maxChoice);\n\n\t\t\tswitch(intChoice) {\n\t\t\tcase 1:\n\t\t\t\t// Create printer\n\t\t\t\tcreatePrinterMenuLogic();\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t// List printers\n\t\t\t\t\n\t\t\t\t// Check printers exist\n\t\t\t\tif(printers.size() == 0) {\n\t\t\t\t\tSystem.out.println(\"No printers created! Please create one before using this menu.\");\n\t\t\t\t} else {\n\t\t\t\t\tmenuHandler.prettyPrintPrinters(printers, 1);\n\t\t\t\t}\n\t\t\t\tmenuHandler.waitOnKey(keyMsg);\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\t// Print document\n\t\t\t\t\n\t\t\t\t// Check printers exist\n\t\t\t\tif(printers.size() == 0) {\n\t\t\t\t\tSystem.out.println(\"No printers created! Please create one before using this menu.\");\n\t\t\t\t\tmenuHandler.waitOnKey(keyMsg);\n\t\t\t\t} else {\n\t\t\t\t\tprintDocumentMenuLogic();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\t// Break/empty printer\n\t\t\t\t\n\t\t\t\t// Check printers exist\n\t\t\t\tif(printers.size() == 0) {\n\t\t\t\t\tSystem.out.println(\"No printers created! Please create one before using this menu.\");\n\t\t\t\t\tmenuHandler.waitOnKey(keyMsg);\n\t\t\t\t} else {\n\t\t\t\t\tbreakPrinterMenuLogic();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\t// Break all\n\t\t\t\t\n\t\t\t\t// Check printers exist\n\t\t\t\tif(printers.size() == 0) {\n\t\t\t\t\tSystem.out.println(\"No printers created! Please create one before using this menu.\");\n\t\t\t\t\tmenuHandler.waitOnKey(keyMsg);\n\t\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t\tmenuHandler.prettyPrintPrinters(printers, 1);\n\t\t\t\t\tint printerChoice = menuHandler.intRangeInput(\"Please input a number in range [0, \" + (printers.size() - 1) + \"]\", 0, printers.size() - 1);\n\n\t\t\t\t\tprinters.get(\"Printer\" + printerChoice).breakAll();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 6:\n\t\t\t\t// Fix/refill printer\n\t\t\t\t\n\t\t\t\t// Check printers exist\n\t\t\t\tif(printers.size() == 0) {\n\t\t\t\t\tSystem.out.println(\"No printers created! Please create one before using this menu.\");\n\t\t\t\t\tmenuHandler.waitOnKey(keyMsg);\n\t\t\t\t} else {\n\t\t\t\t\tfixPrinterMenuLogic();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 7:\n\t\t\t\t// Fix all\n\t\t\t\t\n\t\t\t\t// Check printers exist\n\t\t\t\tif(printers.size() == 0) {\n\t\t\t\t\tSystem.out.println(\"No printers created! Please create one before using this menu.\");\n\t\t\t\t\tmenuHandler.waitOnKey(keyMsg);\n\t\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t\tmenuHandler.prettyPrintPrinters(printers, 1);\n\t\t\t\t\tint printerChoice = menuHandler.intRangeInput(\"Please input a number in range [0, \" + (printers.size() - 1) + \"]\", 0, printers.size() - 1);\n\n\t\t\t\t\tprinters.get(\"Printer\" + printerChoice).fixAll();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 8:\n\t\t\t\t// Print report\n\t\t\t\t\n\t\t\t\t// Check printers exist\n\t\t\t\tif(printers.size() == 0) {\n\t\t\t\t\tSystem.out.println(\"No printers created! Please create one before using this menu.\");\n\t\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t\tmenuHandler.prettyPrintPrinters(printers, 1);\n\t\t\t\t\tint printerChoice = menuHandler.intRangeInput(\"Please input a number in range [0, \" + (printers.size() - 1) + \"]\", 0, printers.size() - 1);\n\n\t\t\t\t\tprinters.get(\"Printer\" + printerChoice).printIndividualReport();\n\t\t\t\t}\n\t\t\t\tmenuHandler.waitOnKey(keyMsg);\n\t\t\t\tbreak;\n\t\t\tcase 9:\n\t\t\t\tonMenu = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "private boolean runPrintReceiptSequenceEpson() {\n if (!initializeObjectEpson()) {\n return false;\n }\n\n if (!createReceiptDataEpson()) {\n finalizeObjectEpson();\n return false;\n }\n\n if (!printDataEpson()) {\n finalizeObjectEpson();\n return false;\n }\n\n return true;\n }", "void PrintOnScreen(String toPrnt);", "public void setIPrintCnt(int iPrintCnt) {\n this.iPrintCnt = iPrintCnt;\n }", "void printBattle(ConsolePrinter printer);", "void printWithJavaFX() {\n }", "public MchPrinter(BPrinter fp, PrintStream ps) {\n\t\tprinter = fp;\n\t\tstream = ps;\n\t}", "@Override\n\tpublic int updatePrinter(Printer printer) {\n\t\treturn centerPrinterMangeService.updatePrinter(printer);\n\t}", "public POSPrinterService(POSPrinterProperties props, JposDevice device) {\r\n super(props, device);\r\n Data = props;\r\n }", "public void savingsWithdrawReceipPrintStamp(List receiptDetails,Component c) {\n \np.resetAll();\n\np.initialize();\n\np.feedBack((byte)2);\n\np.color(0);\np.chooseFont(1);\np.alignCenter();\n//p.emphasized(true);\n//p.underLine(2);\np.setText(receiptDetails.get(1).toString());\np.newLine();\np.setText(receiptDetails.get(2).toString());\np.newLine();\np.setText(receiptDetails.get(3).toString());\np.newLine();\np.newLine();\n//p.addLineSeperatorX();\np.underLine(0);\np.emphasized(false);\np.underLine(0);\np.alignCenter();\np.setText(\" *** Savings Withdrawal ***\");\np.newLine();\np.addLineSeperator();\np.newLine();\n\np.alignLeft();\np.setText(\"Account Number: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(9).toString()+p.underLine(0));\np.newLine(); \np.alignLeft();\np.setText(\"Savings Id: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(0).toString()+p.underLine(0));\np.newLine(); \np.alignLeft();\np.emphasized(true);\np.setText(\"Customer: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(4).toString()+p.underLine(0));\np.newLine(); \n//p.emphasized(false);\n//p.setText(\"Loan+Interest: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(6).toString()+\"/=\"+p.underLine(0));\n//p.newLine();\n//p.setText(\"Date Taken: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(7).toString()+p.underLine(0));\n//p.newLine();\n//p.setText(\"Loan Status: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(14).toString()+p.underLine(0));\n//p.newLine();\np.setText(\"Withdrawal Date: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(10).toString()+p.underLine(0));\np.newLine();\np.setText(\"Withdrawal Time: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(11).toString()+p.underLine(0));\np.newLine();\n\np.underLine(0);\np.emphasized(false);\n//p.underLine(0);\np.addLineSeperator();\np.newLine();\np.alignCenter();\np.setText(\"***** Withdrawal Details ***** \");\np.newLine();\np.addLineSeperator();\np.newLine();\n\np.alignLeft();\np.setText(\"Withdrawal Made: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(7).toString()+\"/=\"+p.underLine(0));\np.newLine(); \np.alignLeft();\np.setText(\"Savings Balance: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(8).toString()+\"/=\"+p.underLine(0));\np.newLine(); \np.alignLeft();\np.emphasized(true);\n//p.setText(\"Customer Name: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(4).toString()+p.underLine(0));\n//p.newLine(); \n//p.emphasized(false);\n\np.addLineSeperator();\np.doubleStrik(true);\np.newLine();\np.underLine(2) ;\np.setText(\"Officer: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(5).toString()+p.underLine(0));\np.newLine();\np.addLineSeperatorX();\n\np.addLineSeperator();\np.doubleStrik(true);\np.newLine();\np.underLine(2) ;\np.setText(\"Officer Signiture:\");\np.addLineSeperatorX();\np.newLine();\np.addLineSeperator();\np.doubleStrik(true);\n//p.newLine();\np.underLine(2) ;\np.setText(\"Customer Signiture:\");\np.addLineSeperatorX();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.setText(\"OFFICE NUMBER: \"+receiptDetails.get(12).toString());\n\np.newLine();\np.addLineSeperatorX();\n//p.newLine();\np.feed((byte)3);\np.finit();\n\nprint.feedPrinter(dbq.printDrivers(c),p.finalCommandSet().getBytes());\n \n\n }", "public FrmP3BoletoParabrisas(java.awt.Dialog parent, boolean modal,\r\n PrinterJob job, Auto auto) throws PrinterException {\r\n super(parent, modal);\r\n initComponents();\r\n this.setLocationRelativeTo(parent);\r\n this.job = job;\r\n jLabProgresivo.setText(\"NO. \" + auto.getProgresivo());\r\n lblFecha.setText(auto.getFechaEntrada() + \" \" + auto.getHoraEntrada());\r\n this.job = PrinterJob.getPrinterJob();\r\n PrintService[] services = PrintServiceLookup.lookupPrintServices(null, null);\r\n int selectedService = 0;\r\n for(int i = 0; i < services.length;i++){\r\n if(services[i].getName().contains(\"STAR\")){\r\n selectedService = i;\r\n }\r\n }\r\n \r\n job.setPrintService(services[selectedService]);\r\n \r\n PrintRequestAttributeSet printRequestAttributeSet = new HashPrintRequestAttributeSet();\r\n MediaSizeName mediaSizeName = MediaSize.findMedia(4,4,MediaPrintableArea.INCH);\r\n printRequestAttributeSet.add(mediaSizeName);\r\n printRequestAttributeSet.add(new Copies(1));\r\n setVisible(true);\r\n imprimir(); \r\n \r\n }", "void printFleet(ConsolePrinter printer);", "public void print() {\r\n\t\tSystem.out.print(getUID());\r\n\t\tSystem.out.print(getTITLE());\r\n\t\tSystem.out.print(getNOOFCOPIES());\r\n\t}", "public void print()\n {\n chatarea.append(\"Sender:(\"+port.getText()+\")\"+System.lineSeparator()+msgarea.getText()+System.lineSeparator());\n }", "@SuppressWarnings(\"unchecked\")\n\tprivate static void breakPrinterMenuLogic() {\n\t\t\n\t\tmenuHandler.prettyPrintPrinters(printers, 1);\n\t\tint printerChoice = menuHandler.intRangeInput(\"Please input a number in range [0, \" + (printers.size() - 1) + \"]\", 0, printers.size() - 1);\n\n\t\tPrinter printer = printers.get(\"Printer\" + printerChoice);\n\t\tVDMSet breakSet = new VDMSet();\n\t\t\n\t\t// Ask what to break for each of the printer's capabilities\n\t\tif(printer.getPrinterCapabilities().getCanPrintA4()) {\n\t\t\tif(menuHandler.inputYesNo(\"Empty A4 paper stock? [y/n]\")) breakSet.add(\"needA4\");\n\t\t}\n\t\t\n\t\tif(printer.getPrinterCapabilities().getCanPrintA3()) {\n\t\t\tif(menuHandler.inputYesNo(\"Empty A3 paper stock? [y/n]\")) breakSet.add(\"needA3\");\n\t\t}\n\t\t\n\t\tif(printer.getPrinterCapabilities().getCanPrintBlack()) {\n\t\t\tif(menuHandler.inputYesNo(\"Empty black toner stock? [y/n]\")) breakSet.add(\"needBlackToner\");\n\t\t}\n\t\t\n\t\tif(printer.getPrinterCapabilities().getCanPrintColor()) {\n\t\t\tif(menuHandler.inputYesNo(\"Empty color toner stock? [y/n]\")) breakSet.add(\"needColorToner\");\n\t\t}\n\t\t\n\t\tif(printer.getPrinterStatus().getStatus().contains(\"operational\")) {\n\t\t\tif(menuHandler.inputYesNo(\"Create malfunction in printer? [y/n]\")) breakSet.add(\"needFixing\");\n\t\t}\n\t\t\n\t\tprinter.break_(breakSet);\n\t}", "public Printer(){ }", "public void cancelPendingPrintJobs()\n {\n printerSimulator.cancelPendingPrintJobs();\n }", "private void print_da_page() {\n \t\tSystem.out.println(\"**** Hell yeah, print da page\");\n \t\t// des Assert ici pour verifier qq truc sur le local storage serait p-e\n \t\t// bien..\n \n \t\tsetInSlot(SLOT_OPTION_SELECION, cardSelectionOptionPresenter);\n \t\tcardSelectionOptionPresenter.init();\n \t\t\n \t\tsetInSlot(SLOT_BOARD, boardPresenter);\n \n \t\tcardDragController.registerDropController(cardDropPanel);\n \t\t\n \t\tsetStaticFirstComboView();\n \t\twriteInstancePanel();\n \t\tStorage_access.setCurrentProjectInstanceBddId(0);\n \t\t//Storage_access.setCurrentProjectInstance(Storage_access.getInstanceBddId(Storage_access.getCurrentProjectInstance()));\n \t\t\n \t\treDrowStatusCard();\n \t\t\n \t\tthis.boardPresenter.redrawBoard(0,0); //TODO n'enregistrerons nous pas la \"vue par default\"? ou la derniere ?\n \t\t\n \t\twriteCardWidgetsFirstTime();\n \t\t//getView().constructFlex(cardDragController);\n \t\n \t\t\n \t\t\n \t\t//CellDropControler dropController = new CellDropControler(simplePanel);\n \t //\tcardDragController.registerDropController(dropController);\n \n \t}", "public void setPrint(String yorn) {\n print = yorn.trim().equals(\"y\");\n }", "public void setPrintArea(int arg0, int arg1, int arg2, int arg3, int arg4) {\n\n\t}", "@Override\r\n public void setStage(Stage s) {\r\n super.setStage(s);\r\n UtilsMsg utilsStage = new UtilsMsg(\"print/transmital/FXMLPrintTransmital.fxml\", \"سیستم ثبت \", Modality.NONE, thisStage.getOwner(), DocumentSystem.class);\r\n// utilsStage.getLoader().l.setPadding(Insets.EMPTY);\r\n container.getChildren().add(utilsStage.page);\r\n\r\n print.setOnAction((ActionEvent event) -> {\r\n PrinterJob printerJob = PrinterJob.createPrinterJob(Printer.getDefaultPrinter());\r\n\r\n if (printerJob != null) {\r\n System.out.println(\"sdadsadsad\");\r\n try {\r\n System.out.println(\"q\");\r\n// FXMLLoader loader = new FXMLLoader(GateBass.class.getResource(\"fxml/print/FXMLKhodroBackPrint.fxml\"));\r\n// FXMLLoader loader = new FXMLLoader(GateBass.class.getResource(\"temporary/FXMLTemporaryCard.fxml\"));\r\n// Parent root = (Parent) loader.load();\r\n// FXMLKhodroBackPrintController myController = loader.getController();\r\n//\r\n// Scene scene = new Scene(root);\r\n// stage.setScene(scene);\r\n System.out.println(\"\" + printerJob);\r\n Printer printer = Printer.getDefaultPrinter();\r\n PageLayout layout = printer.createPageLayout(Paper.A4, PageOrientation.PORTRAIT, Printer.MarginType.EQUAL);\r\n printerJob.getJobSettings().setPageLayout(layout);\r\n Boolean succes = printerJob.printPage(container);\r\n if (succes) {\r\n printerJob.endJob();\r\n }\r\n\r\n } catch (Exception e) {\r\n }\r\n\r\n }\r\n });\r\n }", "public void printScreen() {\n\t\tBrowser.printScreen(this.getClass().getSimpleName());\n\t}", "private void prnFOOTR()\n\t{\n\t\ttry\n\t\t{\n\t\t\tif(cl_dat.M_intLINNO_pbst >= 64)\n\t\t\t{\n\t\t\t\tdosREPORT.writeBytes(\"-------------------------------------------------------------------------------------------------------------------------------------\");\t\t\n\t\t\t\tif(cl_dat.M_cmbOPTN_pbst.getSelectedItem().toString().equals(cl_dat.M_OPPRN_pbst) && (M_rdbTEXT.isSelected()))\n\t\t\t\t\tprnFMTCHR(dosREPORT,M_strEJT);\n\t\t\t\tif(M_rdbHTML.isSelected())\n\t\t\t\t\tdosREPORT.writeBytes(\"<P CLASS = \\\"breakhere\\\">\");\t\t\t\t\t\t\t\t\n\t\t\t\tprnHEADER();\n\t\t\t}\n\t\t\tdosREPORT.writeBytes(\"-------------------------------------------------------------------------------------------------------------------------------------\\n\");\n\t\t\tdosREPORT.writeBytes (\"\\n\\n\\n\\n\\n\");\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\" \",10));//margin\n\t\t\tif(cl_dat.M_cmbOPTN_pbst.getSelectedItem().toString().equals(cl_dat.M_OPPRN_pbst) && (M_rdbTEXT.isSelected()))\n\t\t\t\tprnFMTCHR(dosREPORT,M_strBOLD);\n\t\t\tif(M_rdbHTML.isSelected())\n\t\t\t\tdosREPORT.writeBytes(\"<B>\");\n\t\t\tdosREPORT.writeBytes(padSTRING('R',\"PREPARED BY\",40));\n\t\t\tdosREPORT.writeBytes(padSTRING('R',\"CHECKED BY \",40));\n\t\t\tdosREPORT.writeBytes(padSTRING('R',\"H.O.D (MHD) \",40));\n\t\t\tif(cl_dat.M_cmbOPTN_pbst.getSelectedItem().toString().equals(cl_dat.M_OPPRN_pbst) && (M_rdbTEXT.isSelected()))\n\t\t\t\tprnFMTCHR(dosREPORT,M_strNOBOLD);\n\t\t\tif(M_rdbHTML.isSelected())\n\t\t\t\tdosREPORT.writeBytes(\"</B>\");\n\t\t\tdosREPORT.writeBytes(\"\\n\");\n\t\t\tdosREPORT.writeBytes(\"-------------------------------------------------------------------------------------------------------------------------------------\\n\");\n\t\t\t\n\t\t\tdosREPORT.writeBytes(\" System generated report, hence signature not required \\n\");\n\t\t\tcl_dat.M_intLINNO_pbst += 8;\n\t\t\tif(cl_dat.M_cmbOPTN_pbst.getSelectedItem().toString().equals(cl_dat.M_OPPRN_pbst))\n\t\t { \n\t\t\t\tprnFMTCHR(dosREPORT,M_strEJT);\n\t\t\t\tprnFMTCHR(dosREPORT,M_strNOCPI17);\n\t\t\t\tprnFMTCHR(dosREPORT,M_strCPI10);\n\t\t\t}\t\n\t\t}\n\t catch(Exception L_EX)\n\t {\n\t\t\tsetMSG(L_EX + \" prnFOOTR\",'E');\n\t\t}\t\n\t}", "@FXML\n void displayPD() {\n generalTextArea.clear();\n clearEverything();\n String employeeListPD = company.printByDepartment();\n generalTextArea.appendText(employeeListPD);\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tlp.drawType = 2;\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tlp.drawType = 1;\n\t\t\t}", "private void Print_Test(){\n String lang = getString(R.string.strLang);\n if((lang.compareTo(\"en\")) == 0){\n\n //cetak gambar logo dulu\n Print_BMP();\n\n //cetak string struk\n String data = struk;\n SendDataByte(PrinterCommand.POS_Print_Text(data, CHINESE, 0, 0, 0, 0));\n SendDataByte(PrinterCommand.POS_Set_Cut(1));\n SendDataByte(PrinterCommand.POS_Set_PrtInit());\n }else if((lang.compareTo(\"cn\")) == 0){\n String msg = \"恭喜您!\\n\\n\";\n String data = \"您已经成功的连接上了我们的便携式蓝牙打印机!\\n我们公司是一家专业从事研发,生产,销售商用票据打印机和条码扫描设备于一体的高科技企业.\\n\\n\\n\\n\\n\\n\\n\";\n SendDataByte(PrinterCommand.POS_Print_Text(msg, CHINESE, 0, 1, 1, 0));\n SendDataByte(PrinterCommand.POS_Print_Text(data, CHINESE, 0, 0, 0, 0));\n SendDataByte(PrinterCommand.POS_Set_Cut(1));\n SendDataByte(PrinterCommand.POS_Set_PrtInit());\n }else if((lang.compareTo(\"hk\")) == 0 ){\n String msg = \"恭喜您!\\n\";\n String data = \"您已經成功的連接上了我們的便攜式藍牙打印機! \\n我們公司是一家專業從事研發,生產,銷售商用票據打印機和條碼掃描設備於一體的高科技企業.\\n\\n\\n\\n\\n\\n\\n\";\n SendDataByte(PrinterCommand.POS_Print_Text(msg, BIG5, 0, 1, 1, 0));\n SendDataByte(PrinterCommand.POS_Print_Text(data, BIG5, 0, 0, 0, 0));\n SendDataByte(PrinterCommand.POS_Set_Cut(1));\n SendDataByte(PrinterCommand.POS_Set_PrtInit());\n }else if((lang.compareTo(\"kor\")) == 0){\n String msg = \"축하 해요!\\n\";\n String data = \"성공적으로 우리의 휴대용 블루투스 프린터에 연결 한! \\n우리는 하이테크 기업 중 하나에서 개발, 생산 및 상업 영수증 프린터와 바코드 스캐닝 장비 판매 전문 회사입니다.\\n\\n\\n\\n\\n\\n\\n\";\n SendDataByte(PrinterCommand.POS_Print_Text(msg, KOREAN, 0, 1, 1, 0));\n SendDataByte(PrinterCommand.POS_Print_Text(data, KOREAN, 0, 0, 0, 0));\n SendDataByte(PrinterCommand.POS_Set_Cut(1));\n SendDataByte(PrinterCommand.POS_Set_PrtInit());\n }else if((lang.compareTo(\"thai\")) == 0){\n String msg = \"ขอแสดงความยินดี!\\n\";\n String data = \"คุณได้เชื่อมต่อกับบลูทู ธ เครื่องพิมพ์แบบพกพาของเรา! \\n เราเป็น บริษัท ที่มีความเชี่ยวชาญในการพัฒนา, การผลิตและการขายของเครื่องพิมพ์ใบเสร็จรับเงินและการสแกนบาร์โค้ดอุปกรณ์เชิงพาณิชย์ในหนึ่งในองค์กรที่มีเทคโนโลยีสูง.\\n\\n\\n\\n\\n\\n\\n\";\n SendDataByte(PrinterCommand.POS_Print_Text(msg, THAI, 255, 1, 1, 0));\n SendDataByte(PrinterCommand.POS_Print_Text(data, THAI, 255, 0, 0, 0));\n SendDataByte(PrinterCommand.POS_Set_Cut(1));\n SendDataByte(PrinterCommand.POS_Set_PrtInit());\n }\n }" ]
[ "0.69121903", "0.6874964", "0.6849255", "0.67652285", "0.6753752", "0.669814", "0.65664446", "0.6510326", "0.64931685", "0.6470227", "0.64463556", "0.63343436", "0.6311884", "0.622672", "0.6220452", "0.62095076", "0.61805147", "0.6126563", "0.60156786", "0.60055333", "0.5982158", "0.59652495", "0.5963864", "0.5953509", "0.5948506", "0.59351385", "0.593107", "0.5912566", "0.5898363", "0.58929247", "0.5887422", "0.58834016", "0.5870184", "0.58636445", "0.5848754", "0.5848738", "0.58445257", "0.58230644", "0.58206683", "0.58007205", "0.57870615", "0.57605195", "0.5757576", "0.5757576", "0.5755236", "0.57336986", "0.57247615", "0.57207215", "0.571571", "0.5709945", "0.56916875", "0.5686327", "0.56800735", "0.56791973", "0.56789875", "0.56624496", "0.565333", "0.56157666", "0.5608444", "0.56033754", "0.5602677", "0.5598119", "0.5593858", "0.55809724", "0.5580916", "0.5579282", "0.55746186", "0.5573743", "0.556964", "0.5568006", "0.5556308", "0.5554535", "0.55541897", "0.55363685", "0.5525063", "0.5519968", "0.55179614", "0.55120605", "0.54944795", "0.54904413", "0.5488571", "0.5486611", "0.54845846", "0.54805624", "0.547472", "0.54724795", "0.5466287", "0.5460871", "0.5453834", "0.5445617", "0.54420763", "0.5433316", "0.5428223", "0.5420678", "0.5419244", "0.54021835", "0.5398933", "0.5398549", "0.5395691", "0.5394266", "0.5382962" ]
0.0
-1
Cut paper, functionality whether work depends on printer hardware
public void cut() throws IOException { // cut writer.write(0x1D); writer.write("V"); writer.write(48); writer.write(0); writer.flush(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void canRefillPaper(){\n printer.print(10,2);\n printer.print(10,2);\n printer.refillPaper();\n assertEquals(250, printer.getSheets());\n }", "public void print() {\n DocFlavor flavor = DocFlavor.BYTE_ARRAY.AUTOSENSE;\n \n //Aca obtenemos el servicio de impresion por default\n //Si no quieres ver el dialogo de seleccionar impresora usa esto\n //PrintService defaultService = PrintServiceLookup.lookupDefaultPrintService();\n \n \n //Con esto mostramos el dialogo para seleccionar impresora\n //Si quieres ver el dialogo de seleccionar impresora usalo\n //Solo mostrara las impresoras que soporte arreglo de bits\n PrintRequestAttributeSet pras = new HashPrintRequestAttributeSet();\n PrintService printService[] = PrintServiceLookup.lookupPrintServices(flavor, pras);\n PrintService defaultService = PrintServiceLookup.lookupDefaultPrintService();\n PrintService service = ServiceUI.printDialog(null, 700, 200, printService, defaultService, flavor, pras);\n \n //Creamos un arreglo de tipo byte\n byte[] bytes;\n\n //Aca convertimos el string(cuerpo del ticket) a bytes tal como\n //lo maneja la impresora(mas bien ticketera :p)\n bytes = this.contenidoFactura.getBytes();\n //Creamos un documento a imprimir, a el se le appendeara\n //el arreglo de bytes\n Doc doc = new SimpleDoc(bytes,flavor,null);\n \n //Creamos un trabajo de impresión\n DocPrintJob job = service.createPrintJob();\n\n //Imprimimos dentro de un try de a huevo\n try {\n //El metodo print imprime\n job.print(doc, null);\n \n } catch (Exception er) {\n JOptionPane.showMessageDialog(null,\"Error al imprimir: \" + er.getMessage());\n }\n DocPrintJob cutjob = service.createPrintJob();\n DocPrintJob spacejob = service.createPrintJob();\n //dejando espacios al final\n byte[] espacio = (\"\\n \\n \\n \\n\").getBytes();\n try{\n spacejob.print(new SimpleDoc(espacio,flavor,null),null);\n }\n catch (Exception er) {\n JOptionPane.showMessageDialog(null,\"Error al imprimir: \" + er.getMessage());\n }\n //cortando el papel\n try{\n byte[] cutP = new byte[] { 0x1d, 'V', 1 };\n cutjob.print(new SimpleDoc(cutP,flavor,null),null); \n }catch (Exception er) {\n JOptionPane.showMessageDialog(null,\"Error al imprimir: \" + er.getMessage());\n }\n \n }", "void cut(int cardPosition);", "private void draw (String printable, StringBuffer canvas) {\r\n \t\t\tcanvas.append(\"| \");\r\n \t\t\t\r\n \t\t\tcanvas.append(printable);\r\n \t\t\tfor (int i=printable.length(); i<width-4; i++) //Fill in the spaces.\r\n \t\t\t{\r\n \t\t\t\tcanvas.append(' ');\r\n \t\t\t}\r\n \t\t\tcanvas.append(\" |\\n\");\r\n \t\t}", "public void TesteCompleto() {\n\n\n TectoySunmiPrint.getInstance().initPrinter();\n TectoySunmiPrint.getInstance().setSize(24);\n\n // Alinhamento do texto\n\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_CENTER);\n TectoySunmiPrint.getInstance().printText(\"Alinhamento\\n\");\n TectoySunmiPrint.getInstance().printText(\"--------------------------------\\n\");\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_LEFT);\n TectoySunmiPrint.getInstance().printText(\"TecToy Automação\\n\");\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_CENTER);\n TectoySunmiPrint.getInstance().printText(\"TecToy Automação\\n\");\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_RIGTH);\n TectoySunmiPrint.getInstance().printText(\"TecToy Automação\\n\");\n\n // Formas de impressão\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_CENTER);\n TectoySunmiPrint.getInstance().printText(\"Formas de Impressão\\n\");\n TectoySunmiPrint.getInstance().printText(\"--------------------------------\\n\");\n TectoySunmiPrint.getInstance().setSize(28);\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_LEFT);\n TectoySunmiPrint.getInstance().printStyleBold(true);\n TectoySunmiPrint.getInstance().printText(\"TecToy Automação\\n\");\n TectoySunmiPrint.getInstance().printStyleReset();\n TectoySunmiPrint.getInstance().printStyleAntiWhite(true);\n TectoySunmiPrint.getInstance().printText(\"TecToy Automação\\n\");\n TectoySunmiPrint.getInstance().printStyleReset();\n TectoySunmiPrint.getInstance().printStyleDoubleHeight(true);\n TectoySunmiPrint.getInstance().printText(\"TecToy Automação\\n\");\n TectoySunmiPrint.getInstance().printStyleReset();\n TectoySunmiPrint.getInstance().printStyleDoubleWidth(true);\n TectoySunmiPrint.getInstance().printText(\"TecToy Automação\\n\");\n TectoySunmiPrint.getInstance().printStyleReset();\n TectoySunmiPrint.getInstance().printStyleInvert(true);\n TectoySunmiPrint.getInstance().printText(\"TecToy Automação\\n\");\n TectoySunmiPrint.getInstance().printStyleReset();\n TectoySunmiPrint.getInstance().printStyleItalic(true);\n TectoySunmiPrint.getInstance().printText(\"TecToy Automação\\n\");\n TectoySunmiPrint.getInstance().printStyleReset();\n TectoySunmiPrint.getInstance().printStyleStrikethRough(true);\n TectoySunmiPrint.getInstance().printText(\"TecToy Automação\\n\");\n TectoySunmiPrint.getInstance().printStyleReset();\n TectoySunmiPrint.getInstance().printStyleUnderLine(true);\n TectoySunmiPrint.getInstance().printText(\"TecToy Automação\\n\");\n TectoySunmiPrint.getInstance().printStyleReset();\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_LEFT);\n TectoySunmiPrint.getInstance().printTextWithSize(\"TecToy Automação\\n\", 35);\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_CENTER);\n TectoySunmiPrint.getInstance().printTextWithSize(\"TecToy Automação\\n\", 28);\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_RIGTH);\n TectoySunmiPrint.getInstance().printTextWithSize(\"TecToy Automação\\n\",50);\n // TectoySunmiPrint.getInstance().feedPaper();\n TectoySunmiPrint.getInstance().setSize(24);\n\n\n // Impressão de BarCode\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_CENTER);\n TectoySunmiPrint.getInstance().printText(\"Imprime BarCode\\n\");\n TectoySunmiPrint.getInstance().printText(\"--------------------------------\\n\");\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_LEFT);\n TectoySunmiPrint.getInstance().printBarCode(\"7894900700046\", TectoySunmiPrint.BarCodeModels_EAN13, 162, 2,\n TectoySunmiPrint.BarCodeTextPosition_INFORME_UM_TEXTO);\n TectoySunmiPrint.getInstance().printAdvanceLines(2);\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_CENTER);\n TectoySunmiPrint.getInstance().printBarCode(\"7894900700046\", TectoySunmiPrint.BarCodeModels_EAN13, 162, 2,\n TectoySunmiPrint.BarCodeTextPosition_ABAIXO_DO_CODIGO_DE_BARRAS);\n TectoySunmiPrint.getInstance().printAdvanceLines(2);\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_RIGTH);\n TectoySunmiPrint.getInstance().printBarCode(\"7894900700046\", TectoySunmiPrint.BarCodeModels_EAN13, 162, 2,\n TectoySunmiPrint.BarCodeTextPosition_ACIMA_DO_CODIGO_DE_BARRAS_BARCODE);\n TectoySunmiPrint.getInstance().printAdvanceLines(2);\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_CENTER);\n TectoySunmiPrint.getInstance().printBarCode(\"7894900700046\", TectoySunmiPrint.BarCodeModels_EAN13, 162, 2,\n TectoySunmiPrint.BarCodeTextPosition_ACIMA_E_ABAIXO_DO_CODIGO_DE_BARRAS);\n //TectoySunmiPrint.getInstance().feedPaper();\n TectoySunmiPrint.getInstance().print3Line();\n // Impressão de BarCode\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_CENTER);\n TectoySunmiPrint.getInstance().printText(\"Imprime QrCode\\n\");\n TectoySunmiPrint.getInstance().printText(\"--------------------------------\\n\");\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_LEFT);\n TectoySunmiPrint.getInstance().printQr(\"www.tectoysunmi.com.br\", 8, 1);\n //TectoySunmiPrint.getInstance().feedPaper();\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_CENTER);\n TectoySunmiPrint.getInstance().printQr(\"www.tectoysunmi.com.br\", 8, 1);\n //TectoySunmiPrint.getInstance().feedPaper();\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_RIGTH);\n TectoySunmiPrint.getInstance().printQr(\"www.tectoysunmi.com.br\", 8, 1);\n //TectoySunmiPrint.getInstance().feedPaper();\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_LEFT);\n TectoySunmiPrint.getInstance().printDoubleQRCode(\"www.tectoysunmi.com.br\",\"tectoysunmi\", 7, 1);\n //TectoySunmiPrint.getInstance().feedPaper();\n\n\n // Impresão Imagem\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_CENTER);\n TectoySunmiPrint.getInstance().printText(\"Imprime Imagem\\n\");\n TectoySunmiPrint.getInstance().printText(\"-------------------------------\\n\");\n BitmapFactory.Options options = new BitmapFactory.Options();\n options.inTargetDensity = 160;\n options.inDensity = 160;\n Bitmap bitmap1 = null;\n Bitmap bitmap = null;\n if (bitmap == null) {\n bitmap = BitmapFactory.decodeResource(getResources(), test, options);\n }\n if (bitmap1 == null) {\n bitmap1 = BitmapFactory.decodeResource(getResources(), test1, options);\n bitmap1 = scaleImage(bitmap1);\n }\n TectoySunmiPrint.getInstance().printBitmap(bitmap1);\n //TectoySunmiPrint.getInstance().feedPaper();\n TectoySunmiPrint.getInstance().print3Line();\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_LEFT);\n TectoySunmiPrint.getInstance().printBitmap(bitmap1);\n //TectoySunmiPrint.getInstance().feedPaper();\n TectoySunmiPrint.getInstance().print3Line();\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_RIGTH);\n TectoySunmiPrint.getInstance().printBitmap(bitmap1);\n //TectoySunmiPrint.getInstance().feedPaper();\n TectoySunmiPrint.getInstance().print3Line();\n\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_CENTER);\n TectoySunmiPrint.getInstance().printText(\"Imprime Tabela\\n\");\n TectoySunmiPrint.getInstance().printText(\"--------------------------------\\n\");\n\n String[] prod = new String[3];\n int[] width = new int[3];\n int[] align = new int[3];\n\n width[0] = 100;\n width[1] = 50;\n width[2] = 50;\n\n align[0] = TectoySunmiPrint.Alignment_LEFT;\n align[1] = TectoySunmiPrint.Alignment_CENTER;\n align[2] = TectoySunmiPrint.Alignment_RIGTH;\n\n prod[0] = \"Produto 001\";\n prod[1] = \"10 und\";\n prod[2] = \"3,98\";\n TectoySunmiPrint.getInstance().printTable(prod, width, align);\n\n prod[0] = \"Produto 002\";\n prod[1] = \"10 und\";\n prod[2] = \"3,98\";\n TectoySunmiPrint.getInstance().printTable(prod, width, align);\n\n prod[0] = \"Produto 003\";\n prod[1] = \"10 und\";\n prod[2] = \"3,98\";\n TectoySunmiPrint.getInstance().printTable(prod, width, align);\n\n prod[0] = \"Produto 004\";\n prod[1] = \"10 und\";\n prod[2] = \"3,98\";\n TectoySunmiPrint.getInstance().printTable(prod, width, align);\n\n prod[0] = \"Produto 005\";\n prod[1] = \"10 und\";\n prod[2] = \"3,98\";\n TectoySunmiPrint.getInstance().printTable(prod, width, align);\n\n prod[0] = \"Produto 006\";\n prod[1] = \"10 und\";\n prod[2] = \"3,98\";\n TectoySunmiPrint.getInstance().printTable(prod, width, align);\n\n TectoySunmiPrint.getInstance().print3Line();\n TectoySunmiPrint.getInstance().openCashBox();\n TectoySunmiPrint.getInstance().cutpaper();\n\n }", "public void actionPerformed(ActionEvent e){\n if (e.getSource() instanceof JButton) {\r\n PrinterJob printJob = PrinterJob.getPrinterJob();\r\n PageFormat pf = new PageFormat();\r\n pf.setOrientation(PageFormat.LANDSCAPE);\r\n printJob.setPrintable(_instance, pf);\r\n //if (printJob.printDialog()) {\r\n try {\r\n printJob.print();\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n //}\r\n }\r\n }", "public void removePrintArea(int arg0) {\n\n\t}", "public void cutSelection() {\r\n \t\t// Bertoli Marco\r\n \t\tclipboard.cut();\r\n \t}", "public void doCut()\n {\n bothToolClicked(map.selectedHexesIterator(), true);\n }", "public static void main(String[] args) {\r\n\t\t// Workaround for SWT bug on GTK - force SWT to initialize so we don't\r\n\t\t// crash.\r\n\t\tDisplay.getDefault();\r\n\r\n\t\tPaperClips.print(new PrintJob(\"BreakPrintExample.java\", createPrint()),\r\n\t\t\t\tnew PrinterData());\r\n\t}", "public void replenishPaperTray()\n {\n printerSimulator.replenishPaperTray (\n Printer.PAPER_STACK_SIZE );\n }", "public void performCut() {\n \t\ttext.cut();\n \t\tcheckSelection();\n \t\tcheckDeleteable();\n \t\tcheckSelectable();\n \t}", "public static void deselVols() {\r\n List<MeasureLine> selection = DataClipboard.getSelection();\r\n for(int i = DataClipboard.getSelectionLineBegin(); i < DataClipboard.getSelectionLineEnd() + 1; i++){\r\n if(selection.get(i) != null) {\r\n if (selection.get(i).getVolume() >= 0) {\r\n selection.get(i).setVolume(-1);\r\n }\r\n if(selection.get(i).isEmpty()) {\r\n selection.set(i, null);\r\n }\r\n }\r\n }\r\n \r\n //find new line begin \r\n for(int i = DataClipboard.getSelectionLineBegin(); i < DataClipboard.getSelectionLineEnd() + 1; i++){\r\n if(selection.get(i) != null) {\r\n DataClipboard.setSelectionLineBegin(i);\r\n break;\r\n }\r\n }\r\n \r\n //find new line end \r\n for(int i = DataClipboard.getSelectionLineEnd(); i > DataClipboard.getSelectionLineBegin() - 1; i--){\r\n if(selection.get(i) != null) {\r\n DataClipboard.setSelectionLineEnd(i);\r\n break;\r\n }\r\n }\r\n }", "@SuppressWarnings(\"unchecked\")\n\tprivate static void breakPrinterMenuLogic() {\n\t\t\n\t\tmenuHandler.prettyPrintPrinters(printers, 1);\n\t\tint printerChoice = menuHandler.intRangeInput(\"Please input a number in range [0, \" + (printers.size() - 1) + \"]\", 0, printers.size() - 1);\n\n\t\tPrinter printer = printers.get(\"Printer\" + printerChoice);\n\t\tVDMSet breakSet = new VDMSet();\n\t\t\n\t\t// Ask what to break for each of the printer's capabilities\n\t\tif(printer.getPrinterCapabilities().getCanPrintA4()) {\n\t\t\tif(menuHandler.inputYesNo(\"Empty A4 paper stock? [y/n]\")) breakSet.add(\"needA4\");\n\t\t}\n\t\t\n\t\tif(printer.getPrinterCapabilities().getCanPrintA3()) {\n\t\t\tif(menuHandler.inputYesNo(\"Empty A3 paper stock? [y/n]\")) breakSet.add(\"needA3\");\n\t\t}\n\t\t\n\t\tif(printer.getPrinterCapabilities().getCanPrintBlack()) {\n\t\t\tif(menuHandler.inputYesNo(\"Empty black toner stock? [y/n]\")) breakSet.add(\"needBlackToner\");\n\t\t}\n\t\t\n\t\tif(printer.getPrinterCapabilities().getCanPrintColor()) {\n\t\t\tif(menuHandler.inputYesNo(\"Empty color toner stock? [y/n]\")) breakSet.add(\"needColorToner\");\n\t\t}\n\t\t\n\t\tif(printer.getPrinterStatus().getStatus().contains(\"operational\")) {\n\t\t\tif(menuHandler.inputYesNo(\"Create malfunction in printer? [y/n]\")) breakSet.add(\"needFixing\");\n\t\t}\n\t\t\n\t\tprinter.break_(breakSet);\n\t}", "public int invokeCutMode()\n{\n \n return(0);\n\n}", "private synchronized void print4() {\n try {\n int jNum = 0;\n\n byte[] printText22 = new byte[10240];\n\n byte[] oldText = setAlignCenter('0');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setInternationalCharcters('3');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setWH('4');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = getGbk(\"FoodCiti\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setWH('4');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = getGbk(\"\\nOrder No : \" + order.getOrderNo());\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"\\n-----------------------\\n\");\n oldText = getGbk(\"\\n........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(SessionManager.get(getActivity()).getRestaurantName() + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n String location = SessionManager.get(getActivity()).getRestaurantLocation();\n int spacecount = commacount(location);\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n if (spacecount >= 1) {\n oldText = getGbk(location.substring(0, location.indexOf(',')) + \"\\n\" + location.substring(location.indexOf(',') + 1) + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n } else {\n oldText = getGbk(location + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n }\n\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = getGbk(SessionManager.get(getActivity()).getRestaurantPostalCode() + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"Tel:\" + SessionManager.get(getActivity()).getRestaurantPhonenumber());\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"\\n-----------------------\\n\");\n oldText = getGbk(\"\\n........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n if (order.getOrderSpecialInstruction() != null) {\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(order.getOrderSpecialInstruction());\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"\\n-----------------------\\n\");\n oldText = getGbk(\"\\n........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n }\n\n oldText = setAlignCenter('0');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setWH('5');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setCusorPosition(390);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\" \" + \"GBP\" + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n // Toast.makeText(getContext(),\"Size \"+order.getOrderedItemList().size(),Toast.LENGTH_LONG).show();\n\n for (int i = 0; i < order.getOrderedItemList().size(); i++) {\n\n OrderedItem orderedItem = order.getOrderedItemList().get(i);\n\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('5');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// int qntity = Integer.parseInt(orderedItem.getQuantity());\n oldText = getGbk(\" \" + orderedItem.getQuantity() + \" x \" + orderedItem.getItemData().getItemName());\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setCusorPosition(390);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n Double total_price = Double.valueOf(orderedItem.getTotalPrice()) * Double.valueOf(orderedItem.getQuantity());\n\n oldText = getGbk(\" \" + String.format(Locale.getDefault(), \"%.2f\", total_price) + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n for (int j = 0; j < orderedItem.getSubItemList().size(); j++) {\n\n oldText = setWH('5');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setCusorPosition(35);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n SubItem subItem = orderedItem.getSubItemList().get(j);\n\n String subitemname = subItem.getItemName();\n int subItemOrderQty = Integer.parseInt(subItem.getOrderedQuantity());\n\n if (subItemOrderQty > 1) {\n oldText = getGbk(\" \" + subItem.getOrderedQuantity() + \" x \" + subitemname + \"\\n\");\n } else {\n oldText = getGbk(\" \" + subitemname + \"\\n\");\n }\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n // By Ravi\n// oldText = getGbk(\"........................\\n\");\n// System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n// jNum += oldText.length;\n//////////////////////////////////////////////////////////////////////////////////////////////////////////\n /** TODO\n * change here for print suboptions text\n * **/\n //print text for suboptions items\n if (subItem.getSubOptions() != null && subItem.getSubOptions().size() > 0) {\n List<SubOptions> subOptions = subItem.getSubOptions();\n for (int k = 0; k < subOptions.size(); k++) {\n SubOptions options = subOptions.get(k);\n oldText = getGbk(\" - \" + options.getName() + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n }\n }\n\n }\n\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n /*oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;*/\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"-----------------------\\n\");\n oldText = getGbk(\"........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n }\n\n oldText = setAlignCenter('0');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('5');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"Subtotal : \");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setCusorPosition(390);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = getGbk(\" \" + String.format(\" %.2f\", Double.valueOf(order.getOrderSubtotal())) + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n if (Double.valueOf(order.getDiscount()) > 0) {\n oldText = setAlignCenter('0');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('5');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"Discount : \");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setCusorPosition(390);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = getGbk(\" \" + String.format(\" %.2f\", Double.valueOf(order.getDiscount())) + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n }\n\n\n if (Double.valueOf(order.getTax()) > 0) {\n oldText = setAlignCenter('0');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('5');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"Service Charge : \");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setCusorPosition(390);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n if (order.getTax() != null) {\n oldText = getGbk(\" \" + String.format(\" %.2f\", Double.valueOf(order.getTax())) + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n } else {\n oldText = getGbk(\" \" + \"0.00\" + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n }\n }\n\n if (!order.getOrderDelivery().equals(Consts.PICK_UP) && Double.valueOf(order.getDeliveryCharges()) > 0) {\n oldText = setAlignCenter('0');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('5');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"Delivery Charges : \");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setCusorPosition(390);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = getGbk(\" \" + String.format(\" %.2f\", Double.valueOf(order.getDeliveryCharges())) + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n }\n\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"\\n-----------------------\\n\");\n oldText = getGbk(\"........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('0');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"TOTAL Price: \");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setCusorPosition(370);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n //Toast.makeText(getActivity(),String.valueOf(order.getOrderTotal()),Toast.LENGTH_LONG).show();\n\n oldText = getGbk(\" \" + String.format(\" %.2f\", Double.valueOf(order.getOrderTotal())));\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"\\n-----------------------\\n\");\n oldText = getGbk(\"\\n........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n if (order.getFreenDrinkText() != null && !TextUtils.isEmpty(order.getFreenDrinkText())) {\n oldText = setAlignCenter('0');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n String freeTxt = \"Free \" + order.getFreenDrinkText();\n oldText = getGbk(freeTxt);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n }\n\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"\\n-----------------------\\n\");\n oldText = getGbk(\"\\n........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('4');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n /** TODO\n * change here to print payment method text\n * **/\n //print text for payment method\n if (order.getOrderPaid().equalsIgnoreCase(\"paypal\") || order.getOrderPaid().equalsIgnoreCase(\"worldpay\")) {\n oldText = getGbk(order.getOrderPaid() + \" PAID \" + \"\\n\");\n } else {\n oldText = getGbk(order.getOrderPaid() + \" NOT PAID \" + \"\\n\");\n }\n// oldText = getGbk(\"ORDER BY \" + order.getOrderPaid() + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setWH('4');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n if (order.getOrderDelivery().equals(Consts.PICK_UP)) {\n oldText = getGbk(\"COLLECTION\" + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n } else {\n oldText = getGbk(\"DELIVERY\" + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n }\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n // String strTmp2 = new SimpleDateFormat(\"dd-MM-yyyy hh:mm a\", Locale.UK).format(new Date());\n oldText = getGbk(getDate(order.getOrderTime()));\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"\\n-----------------------\\n\");\n oldText = getGbk(\"\\n........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('0');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('4');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"Customer Details: \" + \"\\n\" +\n order.getUser().getUserName().toUpperCase() + \"\\n\" +\n order.getUser().getAddress().toUpperCase() + \"\\n\" +\n order.getUser().getCity().toUpperCase() + \"\\n\" +\n order.getUser().getPostalCode().toUpperCase() + \"\\n\" +\n order.getUser().getPhNo().toUpperCase()\n );\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"\\n-----------------------\\n\");\n oldText = getGbk(\"\\n........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('5');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"Ref:\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = getGbk(order.getOrderId());\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"\\n-----------------------\\n\");\n oldText = getGbk(\"\\n........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = getGbk(\"www.foodciti.co.uk\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"\\n\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n /*String s = new String(printText22);\n Toast.makeText(getActivity(),s,Toast.LENGTH_LONG).show();*/\n\n oldText = CutPaper();\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n Intent intent = new Intent(PrintUtils.ACTION_PRINT_REQUEST);\n intent.putExtra(PrintUtils.PRINT_DATA, printText22);\n localBroadcastManager.sendBroadcast(intent);\n\n// mOutputStream.write(printText22);\n\n } catch (Exception ex) {\n Exlogger exlogger = new Exlogger();\n exlogger.setErrorType(\"Print Error\");\n exlogger.setErrorMessage(ex.getMessage());\n exlogger.setScreenName(\"OrderInfo->>print4() function\");\n logger.addException(exlogger);\n Toast.makeText(getActivity(), ex.getMessage(), Toast.LENGTH_LONG).show();\n\n\n }\n }", "public void doPrint() {\n printBehavior.printReceipt();\n\n }", "public void KTesteCompleto() throws RemoteException {\n\n // Alinhamento\n kPrinterPresenter.printStyleBold(false);\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_CENTER);\n kPrinterPresenter.text(\"Alinhamento\\n\");\n kPrinterPresenter.text(\"--------------------------------\\n\");\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_LEFT);\n kPrinterPresenter.text(\"TecToy Automação\\n\");\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_CENTER);\n kPrinterPresenter.text(\"TecToy Automação\\n\");\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_RIGTH);\n kPrinterPresenter.text(\"TecToy Automação\\n\");\n kPrinterPresenter.print3Line();\n\n // Formas de impressão\n\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_CENTER);\n kPrinterPresenter.text(\"Formas de Impressão\\n\");\n kPrinterPresenter.text(\"--------------------------------\\n\");\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_LEFT);\n kPrinterPresenter.printStyleBold(true);\n kPrinterPresenter.text(\"TecToy Automação\\n\");\n\n\n // Barcode\n\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_CENTER);\n kPrinterPresenter.text(\"BarCode\\n\");\n kPrinterPresenter.text(\"--------------------------------\\n\");\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_LEFT);\n kPrinterPresenter.printBarcode(\"7891098010575\", 2, 162, 2, 0);\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_CENTER);\n kPrinterPresenter.printBarcode(\"7891098010575\", 2, 162, 2, 2);\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_RIGTH);\n kPrinterPresenter.printBarcode(\"7891098010575\", 2, 162, 2, 1);\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_CENTER);\n kPrinterPresenter.printBarcode(\"7891098010575\", 2, 162, 2, 3);\n kPrinterPresenter.print3Line();\n // QrCode\n\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_CENTER);\n kPrinterPresenter.text(\"QrCode\\n\");\n kPrinterPresenter.text(\"--------------------------------\\n\");\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_CENTER);\n kPrinterPresenter.printQr(\"www.tectoyautomacao.com.br\", 8, 0);\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_LEFT);\n kPrinterPresenter.printQr(\"www.tectoyautomacao.com.br\", 8, 0);\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_RIGTH);\n kPrinterPresenter.printQr(\"www.tectoyautomacao.com.br\", 8, 0);\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_LEFT);\n kPrinterPresenter.printDoubleQRCode(\"www.tectoyautomacao.com.br\",\"tectoy\", 7, 1);\n // Imagem\n\n\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_CENTER);\n kPrinterPresenter.text(\"Imagem\\n\");\n kPrinterPresenter.text(\"--------------------------------\\n\");\n BitmapFactory.Options options = new BitmapFactory.Options();\n options.inTargetDensity = 160;\n options.inDensity = 160;\n Bitmap bitmap1 = null;\n if (bitmap1 == null) {\n bitmap1 = BitmapFactory.decodeResource(getResources(), test1, options);\n bitmap1 = scaleImage(bitmap1);\n }\n kPrinterPresenter.printBitmap(bitmap1, 0);\n kPrinterPresenter.setAlign(0);\n kPrinterPresenter.printBitmap(bitmap1, 0);\n kPrinterPresenter.setAlign(2);\n kPrinterPresenter.printBitmap(bitmap1, 0);\n // Tabelas\n\n\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_CENTER);\n kPrinterPresenter.text(\"Tabelas\\n\");\n kPrinterPresenter.text(\"--------------------------------\\n\");\n String[] prod = new String[3];\n int[] width = new int[3];\n int[] align = new int[3];\n\n width[0] = 100;\n width[1] = 50;\n width[2] = 50;\n\n align[0] = kPrinterPresenter.Alignment_LEFT;\n align[1] = kPrinterPresenter.Alignment_CENTER;\n align[2] = kPrinterPresenter.Alignment_RIGTH;\n\n prod[0] = \"Produto 001\";\n prod[1] = \"10 und\";\n prod[2] = \"3,98\";\n kPrinterPresenter.printTable(prod, width, align);\n\n prod[0] = \"Produto 002\";\n prod[1] = \"10 und\";\n prod[2] = \"3,98\";\n kPrinterPresenter.printTable(prod, width, align);\n\n\n prod[0] = \"Produto 003\";\n prod[1] = \"10 und\";\n prod[2] = \"3,98\";\n kPrinterPresenter.printTable(prod, width, align);\n\n\n prod[0] = \"Produto 004\";\n prod[1] = \"10 und\";\n prod[2] = \"3,98\";\n kPrinterPresenter.printTable(prod, width, align);\n\n\n prod[0] = \"Produto 005\";\n prod[1] = \"10 und\";\n prod[2] = \"3,98\";\n kPrinterPresenter.printTable(prod, width, align);\n\n prod[0] = \"Produto 006\";\n prod[1] = \"10 und\";\n prod[2] = \"3,98\";\n kPrinterPresenter.printTable(prod, width, align);\n\n\n kPrinterPresenter.print3Line();\n kPrinterPresenter.cutpaper(KTectoySunmiPrinter.HALF_CUTTING, 10);\n\n }", "public interface PrintingIfc\n{\n /**\n revision number supplied by source-code-control system\n **/\n public static String revisionNumber = \"$Revision: /rgbustores_13.4x_generic_branch/1 $\";\n /**\n Date format for receipts and endorsements\n **/\n public static SimpleDateFormat DATE_LINE_FORMAT =\n new SimpleDateFormat(\"MM/dd/yyyy hh:mm:ss a z\");\n /**\n ESC sequence for right justification on the slip printer\n **/\n public static String PRINTER_RIGHT_JUSTIFY = new String(\"\\u001b|rA\");\n /**\n Slip printer line size\n **/\n public static int SLIP_PRINTER_LINE_SIZE = 33;\n}", "@Override\r\n\t\tpublic void preCalculation() {\r\n\t\t\tint screenWidth = getWidth();\r\n\t\t\tint screenHeight = getHeight();\r\n\r\n\t\t\tmidWidth = screenWidth / 2 ;\r\n\t\t\tscreenRectWidth = (int)(screenWidth * SCALE_WIDTH_COEFFICIENT);\r\n\t\t\t/***** Calculate screen and board positions and measurements *****/\r\n\r\n\t\t\t/***** Calculate text positions and measurements *****/\r\n\t\t\tint headerRectHeight = (int)((screenHeight * HEADER_HEIGHT_RELATIVE) * SCALE_HEIGHT_COEFFICIENT);\r\n\r\n\t\t\tint subHeaderRectHeight = (int)((screenHeight * SUB_HEADER_HEIGHT_RELATIVE) * SCALE_HEIGHT_COEFFICIENT);\r\n\r\n\t\t\ttextRectHeight = (int)((screenHeight * TEXT_HEIGHT_RELATIVE) * SCALE_HEIGHT_COEFFICIENT);\r\n\r\n\t\t\tint headerHeight = (int) (screenHeight * HEADER_HEIGHT_RELATIVE_POS);\r\n\t\t\tint subHeaderHeight = (int) (screenHeight * SUB_HEADER_HEIGHT_RELATIVE_POS);\r\n\r\n\t\t\ttextHeight = (int) (screenHeight * TEXT_HEIGHT_RELATIVE_POS);\r\n\t\t\t/***** Calculate tile positions and measurements *****/\r\n\r\n\t\t\t/***** Define Paint objects *****/\r\n\t\t\ttextPaint = new Paint();\r\n\t\t\ttextPaint.setColor(Color.RED);\r\n\r\n\t\t\theaderTextPaint = new Paint();\r\n\t\t\theaderTextPaint.setTextSize(Logic_Utils.determineMaxTextSize(currentHeaderToPrint, screenRectWidth, headerRectHeight));\r\n\r\n\t\t\tRect headerBounds = new Rect();\r\n\r\n\t\t\theaderTextPaint.getTextBounds(currentHeaderToPrint, 0, currentHeaderToPrint.length(), headerBounds);\r\n\r\n\t\t\tsubHeaderTextPaint = new Paint();\r\n\t\t\tsubHeaderTextPaint.setTextSize(Logic_Utils.determineMaxTextSize(currentSubHeaderToPrint, screenRectWidth, subHeaderRectHeight));\r\n\r\n\t\t\tRect subHeaderBounds = new Rect();\r\n\r\n\t\t\tsubHeaderTextPaint.getTextBounds(currentSubHeaderToPrint, 0, currentSubHeaderToPrint.length(), subHeaderBounds);\r\n\t\t\t/***** Define Paint objects *****/\r\n\r\n\t\t\t/***** Calculate header positions and measurements *****/\r\n\t\t\theaderTextXpos = midWidth - (headerBounds.width() / 2);\r\n\t\t\theaderTextYpos = headerHeight;\r\n\t\t\t/***** Calculate header positions and measurements *****/\r\n\r\n\t\t\t/***** Calculate sub header positions and measurements *****/\r\n\t\t\tsubHeaderTextXpos = midWidth - (subHeaderBounds.width() / 2);\r\n\t\t\tsubHeaderTextYpos = subHeaderHeight;\r\n\t\t\t/***** Calculate sub header positions and measurements *****/\r\n\r\n\t\t}", "public void savingsReceipPrint(List receiptDetails,Component c) {\n \np.resetAll();\n\np.initialize();\n\np.feedBack((byte)2);\n\n//p.color(0);\n//p.chooseFont(1);\np.alignCenter();\n//p.emphasized(true);\n//p.underLine(2);\np.setText(receiptDetails.get(1).toString());\np.newLine();\np.setText(receiptDetails.get(2).toString());\np.newLine();\np.setText(receiptDetails.get(3).toString());\np.newLine();\np.newLine();\n//p.addLineSeperatorX();\np.underLine(0);\np.emphasized(false);\np.underLine(0);\np.alignCenter();\np.setText(\" *** Savings Made Receipt ***\");\np.newLine();\np.addLineSeperator();\np.newLine();\n\np.alignLeft();\np.setText(\"Account Number: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(9).toString()+p.underLine(0));\np.newLine(); \np.alignLeft();\np.setText(\"Savings Id: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(0).toString()+p.underLine(0));\np.newLine(); \np.alignLeft();\np.emphasized(true);\np.setText(\"Customer: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(4).toString()+p.underLine(0));\np.newLine(); \n//p.emphasized(false);\n//p.setText(\"Loan+Interest: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(6).toString()+\"/=\"+p.underLine(0));\n//p.newLine();\n//p.setText(\"Date Taken: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(7).toString()+p.underLine(0));\n//p.newLine();\n//p.setText(\"Loan Status: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(14).toString()+p.underLine(0));\n//p.newLine();\np.setText(\"Savings Date: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(10).toString()+p.underLine(0));\np.newLine();\np.setText(\"Savings Time: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(11).toString()+p.underLine(0));\np.newLine();\n\np.underLine(0);\np.emphasized(false);\n//p.underLine(0);\np.addLineSeperator();\np.newLine();\np.alignCenter();\np.setText(\"***** Savings Details ***** \");\np.newLine();\np.addLineSeperator();\np.newLine();\n\np.alignLeft();\np.setText(\"Savings Made: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(6).toString()+\"/=\"+p.underLine(0));\np.newLine(); \np.alignLeft();\np.setText(\"Savings Balance: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(8).toString()+\"/=\"+p.underLine(0));\np.newLine(); \np.alignLeft();\np.emphasized(true);\n//p.setText(\"Customer Name: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(4).toString()+p.underLine(0));\n//p.newLine(); \n//p.emphasized(false);\n\np.addLineSeperator();\np.doubleStrik(true);\np.newLine();\np.underLine(2) ;\np.setText(\"Officer: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(5).toString()+p.underLine(0));\np.newLine();\np.addLineSeperatorX();\n\np.addLineSeperator();\np.doubleStrik(true);\np.newLine();\np.underLine(2) ;\np.setText(\"Officer Signiture:\");\np.addLineSeperatorX();\np.newLine();\np.addLineSeperator();\np.doubleStrik(true);\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\np.underLine(2) ;\np.setText(\"Customer Signiture:\");\np.addLineSeperatorX();\np.newLine();\np.setText(\"OFFICE NUMBER: \"+receiptDetails.get(12).toString());\n////p.newLine();\n//p.addLineSeperatorX();\np.feed((byte)3);\np.finit();\n\nprint.feedPrinter(dbq.printDrivers(c),p.finalCommandSet().getBytes());\n \n\n }", "public Object getPrinter(PageFormat pf);", "@Override\r\n public final void draw(final Rectangle r, final BufferedImage paper) {\n String red;\r\n String green;\r\n String blue;\r\n if (Integer.toHexString(r.getBorderColor().getRed()).length() == 1) {\r\n red = \"0\" + Integer.toHexString(r.getBorderColor().getRed());\r\n } else {\r\n red = Integer.toHexString(r.getBorderColor().getRed());\r\n }\r\n if (Integer.toHexString(r.getBorderColor().getGreen()).length() == 1) {\r\n green = \"0\" + Integer.toHexString(r.getBorderColor().getGreen());\r\n } else {\r\n green = Integer.toHexString(r.getBorderColor().getGreen());\r\n }\r\n if (Integer.toHexString(r.getBorderColor().getBlue()).length() == 1) {\r\n blue = \"0\" + Integer.toHexString(r.getBorderColor().getBlue());\r\n } else {\r\n blue = Integer.toHexString(r.getBorderColor().getBlue());\r\n }\r\n String color = \"#\" + red + green + blue;\r\n\r\n draw(new Line((String.valueOf(r.getxSus())), String.valueOf(r.getySus()),\r\n String.valueOf(r.getxSus() + r.getLungime() - 1), String.valueOf(r.getySus()),\r\n color, String.valueOf(r.getBorderColor().getAlpha()), paper), paper);\r\n\r\n draw(new Line((String.valueOf(r.getxSus() + r.getLungime() - 1)),\r\n String.valueOf(r.getySus()), String.valueOf(r.getxSus() + r.getLungime() - 1),\r\n String.valueOf(r.getySus() + r.getInaltime() - 1), color,\r\n String.valueOf(r.getBorderColor().getAlpha()), paper), paper);\r\n\r\n draw(new Line((String.valueOf(r.getxSus() + r.getLungime() - 1)),\r\n String.valueOf(r.getySus() + r.getInaltime() - 1), String.valueOf(r.getxSus()),\r\n String.valueOf(r.getySus() + r.getInaltime() - 1), color,\r\n String.valueOf(r.getBorderColor().getAlpha()), paper), paper);\r\n\r\n draw(new Line((String.valueOf(r.getxSus())),\r\n String.valueOf(r.getySus() + r.getInaltime() - 1), String.valueOf(r.getxSus()),\r\n String.valueOf(r.getySus()), color, String.valueOf(r.getBorderColor().getAlpha()),\r\n paper), paper);\r\n\r\n for (int i = r.getxSus() + 1; i < r.getxSus() + r.getLungime() - 1; i++) {\r\n for (int j = r.getySus() + 1; j < r.getySus() + r.getInaltime() - 1; j++) {\r\n if (checkBorder(i, j, paper)) {\r\n paper.setRGB(i, j, r.getFillColor().getRGB());\r\n }\r\n }\r\n }\r\n }", "public void touche() {\n if (theme==0) { //Changer les couleurs ici et dans Option\n couleurNote1=0xff00FF00;\n couleurNote2=0xffFF0000;\n couleurNote3=0xffFFFF00;\n couleurNote4=0xff0000FF;\n }\n if (theme==1) {\n couleurNote1=0xffFF0000;\n couleurNote2=0xffFFFF00;\n couleurNote3=0xff0081FF;\n couleurNote4=0xff973EFF;\n }\n if (theme==2) {\n couleurNote1=0xff8FF5F2;\n couleurNote2=0xffFAACE3;\n couleurNote3=0xffF5E8A6;\n couleurNote4=0xffD9F074;\n }\n if (theme==3) {\n couleurNote1=0xffD4AF37;\n couleurNote2=0xffD4AF37;\n couleurNote3=0xffD4AF37;\n couleurNote4=0xffD4AF37;\n }\n\n if (theme==4) {\n couleurNote1=PApplet.parseInt(random(0xff000000, 0xffFFFFFF));\n couleurNote2=PApplet.parseInt(random(0xff000000, 0xffFFFFFF));\n couleurNote3=PApplet.parseInt(random(0xff000000, 0xffFFFFFF));\n couleurNote4=PApplet.parseInt(random(0xff000000, 0xffFFFFFF));\n }\n //#3F48CC\n\n if (touche1) {\n cc1=0xffFFFFFF;\n } else cc1=couleurNote1;\n fill(cc1);\n rect(420, 593, taille+14, taille+13);\n\n if (touche2) {\n cc2=0xffFFFFFF;\n } else cc2=couleurNote2;\n fill(cc2);\n rect(490, 593, taille+14, taille+13);\n\n if (touche3) {\n cc3=0xffFFFFFF;\n } else cc3=couleurNote3;\n fill(cc3);\n rect(560, 593, taille+14, taille+13);\n\n if (touche4) {\n cc4=0xffFFFFFF;\n } else cc4=couleurNote4;\n fill(cc4);\n rect(630, 593, taille+14, taille+13);\n}", "public void savingsWithdrawReceipPrint(List receiptDetails,Component c) {\n \np.resetAll();\n\np.initialize();\n\np.feedBack((byte)2);\n\np.color(0);\np.chooseFont(1);\np.alignCenter();\n//p.emphasized(true);\n//p.underLine(2);\np.setText(receiptDetails.get(1).toString());\np.newLine();\np.setText(receiptDetails.get(2).toString());\np.newLine();\np.setText(receiptDetails.get(3).toString());\np.newLine();\np.newLine();\n//p.addLineSeperatorX();\np.underLine(0);\np.emphasized(false);\np.underLine(0);\np.alignCenter();\np.setText(\" *** Savings Withdrawal ***\");\np.newLine();\np.addLineSeperator();\np.newLine();\n\np.alignLeft();\np.setText(\"Account Number: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(9).toString()+p.underLine(0));\np.newLine(); \np.alignLeft();\np.setText(\"Savings Id: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(0).toString()+p.underLine(0));\np.newLine(); \np.alignLeft();\np.emphasized(true);\np.setText(\"Customer: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(4).toString()+p.underLine(0));\np.newLine(); \n//p.emphasized(false);\n//p.setText(\"Loan+Interest: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(6).toString()+\"/=\"+p.underLine(0));\n//p.newLine();\n//p.setText(\"Date Taken: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(7).toString()+p.underLine(0));\n//p.newLine();\n//p.setText(\"Loan Status: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(14).toString()+p.underLine(0));\n//p.newLine();\np.setText(\"Withdrawal Date: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(10).toString()+p.underLine(0));\np.newLine();\np.setText(\"Withdrawal Time: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(11).toString()+p.underLine(0));\np.newLine();\n\np.underLine(0);\np.emphasized(false);\n//p.underLine(0);\np.addLineSeperator();\np.newLine();\np.alignCenter();\np.setText(\"***** Withdrawal Details ***** \");\np.newLine();\np.addLineSeperator();\np.newLine();\n\np.alignLeft();\np.setText(\"Withdrawal Made: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(7).toString()+\"/=\"+p.underLine(0));\np.newLine(); \np.alignLeft();\np.setText(\"Savings Balance: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(8).toString()+\"/=\"+p.underLine(0));\np.newLine(); \np.alignLeft();\np.emphasized(true);\n//p.setText(\"Customer Name: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(4).toString()+p.underLine(0));\n//p.newLine(); \n//p.emphasized(false);\n\np.addLineSeperator();\np.doubleStrik(true);\np.newLine();\np.underLine(2) ;\np.setText(\"Officer: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(5).toString()+p.underLine(0));\np.newLine();\np.addLineSeperatorX();\n\np.addLineSeperator();\np.doubleStrik(true);\np.newLine();\np.underLine(2) ;\np.setText(\"Officer Signiture:\");\np.addLineSeperatorX();\np.newLine();\np.addLineSeperator();\np.doubleStrik(true);\n//p.newLine();\np.underLine(2) ;\np.setText(\"Customer Signiture:\");\np.addLineSeperatorX();\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\np.newLine();\np.setText(\"OFFICE NUMBER: \"+receiptDetails.get(12).toString());\n\np.newLine();\np.addLineSeperatorX();\n//p.newLine();\np.feed((byte)3);\np.finit();\n\nprint.feedPrinter(dbq.printDrivers(c),p.finalCommandSet().getBytes());\n \n\n }", "public void doCopy() {\n if (renderPieces.size() == 0) {\n System.out.println(\"Nothing is selected for copy operation.\");\n return;\n }\n StringBuffer sb = new StringBuffer();\n\n textBuffer.renderInit();\n Text text;\n if (!reversed) {\n while ((text = textBuffer.getTextToRender()) != null) {\n sb.append(text.getText());\n }\n } else {\n while ((text = textBuffer.getPreToRender()) != null) {\n sb.append(text);\n }\n String reversedText = sb.toString();\n sb = new StringBuffer();\n for (int i = reversedText.length()-1; i >= 0; i -= 1) {\n sb.append(reversedText.charAt(i));\n }\n }\n Clipboard clipboard = Clipboard.getSystemClipboard();\n ClipboardContent content = new ClipboardContent();\n content.putString(sb.toString());\n clipboard.setContent(content);\n System.out.println(\"Copy succeed.\");\n }", "public String markDivorceExtractAsPrinted() {\n MarriageRegister marriageRegister = marriageRegistrationService.getMarriageRegisterByIdUKey(idUKey, user,\n Permission.PRINT_MARRIAGE_EXTRACT);\n\n if (marriageRegister != null && marriageRegister.getState() == MarriageRegister.State.DIVORCE_CERT_PRINTED) {\n addActionMessage(getText(\"message.divorcerextract.alreadymarkedasprinted\"));\n return SUCCESS;\n } else {\n try {\n //TODO : refactor rename licensePrintedLocationId and licenseIssuedUserId in order to user this attribute for both notice and Extract print\n marriageRegistrationService.markDivorceExtractAsPrinted(idUKey, locationDAO.\n getLocation(licensePrintedLocationId), userDAO.getUserByPK(licenseIssuedUserId), user);\n } catch (CRSRuntimeException e) {\n switch (e.getErrorCode()) {\n case ErrorCodes.MARRIAGE_REGISTER_NOT_FOUND:\n addActionError(getText(\"error.marriageregister.notfound\"));\n break;\n case ErrorCodes.INVALID_STATE_OF_MARRIAGE_REGISTER:\n addActionError(getText(\"error.marriageregister.invalidstate\"));\n break;\n case ErrorCodes.PERMISSION_DENIED:\n addActionError(getText(\"message.permissiondenied\"));\n break;\n case ErrorCodes.INVALID_LOCATION_ON_ISSUING_MARRIAGE_EXTRACT:\n addActionError(getText(\"message.marriagerextract.markasprintedfailed\"));\n break;\n case ErrorCodes.INVALID_USER_ON_CERTIFYING_MARRIAGE_EXTRACT:\n addActionError(getText(\"message.marriagerextract.markasprintedfailed\"));\n break;\n default:\n addActionError(getText(\"message.marriagerextract.markasprintedfailed\"));\n break;\n }\n return ERROR;\n }\n }\n addActionMessage(getText(\"message.divorceextract.markasprinted\"));\n return SUCCESS;\n }", "@Override\r\n public final void draw(final Circle s, final BufferedImage paper) {\n\r\n int xc = s.getX();\r\n int yc = s.getY();\r\n int r = s.getRaza();\r\n int x = 0, y = r;\r\n final int trei = 3;\r\n int doi = 2;\r\n int d = trei - doi * r;\r\n while (y >= x) {\r\n if (checkBorder(xc + x, yc + y, paper)) {\r\n paper.setRGB(xc + x, yc + y, s.getBorderColor().getRGB());\r\n }\r\n if (checkBorder(xc - x, yc + y, paper)) {\r\n paper.setRGB(xc - x, yc + y, s.getBorderColor().getRGB());\r\n }\r\n if (checkBorder(xc + x, yc - y, paper)) {\r\n paper.setRGB(xc + x, yc - y, s.getBorderColor().getRGB());\r\n }\r\n if (checkBorder(xc - x, yc - y, paper)) {\r\n paper.setRGB(xc - x, yc - y, s.getBorderColor().getRGB());\r\n }\r\n if (checkBorder(xc + y, yc + x, paper)) {\r\n paper.setRGB(xc + y, yc + x, s.getBorderColor().getRGB());\r\n }\r\n if (checkBorder(xc + y, yc - x, paper)) {\r\n paper.setRGB(xc + y, yc - x, s.getBorderColor().getRGB());\r\n }\r\n if (checkBorder(xc - y, yc + x, paper)) {\r\n paper.setRGB(xc - y, yc + x, s.getBorderColor().getRGB());\r\n }\r\n if (checkBorder(xc - y, yc - x, paper)) {\r\n paper.setRGB(xc - y, yc - x, s.getBorderColor().getRGB());\r\n }\r\n\r\n x++;\r\n if (d > 0) {\r\n y--;\r\n final int patru = 4;\r\n final int zece = 10;\r\n d = d + patru * (x - y) + zece;\r\n } else {\r\n final int patru = 4;\r\n final int sase = 6;\r\n d = d + patru * x + sase;\r\n }\r\n if (checkBorder(xc + x, yc + y, paper)) {\r\n paper.setRGB(xc + x, yc + y, s.getBorderColor().getRGB());\r\n }\r\n if (checkBorder(xc - x, yc + y, paper)) {\r\n paper.setRGB(xc - x, yc + y, s.getBorderColor().getRGB());\r\n }\r\n if (checkBorder(xc + x, yc - y, paper)) {\r\n paper.setRGB(xc + x, yc - y, s.getBorderColor().getRGB());\r\n }\r\n if (checkBorder(xc - x, yc - y, paper)) {\r\n paper.setRGB(xc - x, yc - y, s.getBorderColor().getRGB());\r\n }\r\n if (checkBorder(xc + y, yc + x, paper)) {\r\n paper.setRGB(xc + y, yc + x, s.getBorderColor().getRGB());\r\n }\r\n if (checkBorder(xc + y, yc - x, paper)) {\r\n paper.setRGB(xc + y, yc - x, s.getBorderColor().getRGB());\r\n }\r\n if (checkBorder(xc - y, yc + x, paper)) {\r\n paper.setRGB(xc - y, yc + x, s.getBorderColor().getRGB());\r\n }\r\n if (checkBorder(xc - y, yc - x, paper)) {\r\n paper.setRGB(xc - y, yc - x, s.getBorderColor().getRGB());\r\n }\r\n\r\n }\r\n floodFill(xc, yc, s.getFillColor(), s.getBorderColor(), paper);\r\n }", "private static void createPrinterMenuLogic() {\n\n\t\tmenuHandler.clrscr();\n\n\t\t// Printer name\n\t\tString printerName = menuHandler.inputString(\"Please input the printer name (cannot be empty)\");\n\n\t\t// Printer paper format\n\t\tSystem.out.println(\"Select printer paper format capabilities\");\n\t\tint maxChoice = menuHandler.printerFormatMenu();\n\t\tint formatChoice = menuHandler.intRangeInput(\"Please input a number in range [1, \" + maxChoice + \"]\", 1, maxChoice);\n\n\t\t// Printer toner\n\t\tSystem.out.println(\"Select printer toner capabilities\");\n\t\tmaxChoice = menuHandler.printerTonerMenu();\n\t\tint tonerChoice = menuHandler.intRangeInput(\"Please input a number in range [1, \" + maxChoice + \"]\", 1, maxChoice);\n\n\t\t// Parse user choices and create printer capabilities object\n\t\tBoolean[] bools = parsePrinterCapabilities(formatChoice, tonerChoice);\n\t\tPrinterCapability printerCapability = objectHandler.createPrinterCapability(bools[canPrintA4], bools[canPrintA3], bools[canPrintBlack], bools[canPrintColor]);\n\n\t\t// Ask user about pricing and create printer pricing object\n\t\tPrinterPricing printerPricing = createPrinterPricing(bools);\n\n\t\t// Ask user about capacity and create printer capacity object\n\t\tPrinterCapacity printerCapacity = createPrinterCapacity(bools);\n\n\t\tprinters.put(\"Printer\" + printers.size(), objectHandler.createPrinter(printerName, printerCapability, printerPricing, printerCapacity, objectHandler.createPrinterStatus()));\n\t}", "@Test\n public void canPrint(){\n printer.print(10,2);\n assertEquals(230, printer.getSheets());\n }", "void doCut(boolean surface, boolean building) {\r\n\t\tdoCopy(surface, building);\r\n\t\tif (surface && building) {\r\n\t\t\tdoDeleteBoth();\r\n\t\t} else\r\n\t\tif (surface) {\r\n\t\t\tdoDeleteSurface();\r\n\t\t} else\r\n\t\tif (building) {\r\n\t\t\tdoDeleteBuilding();\r\n\t\t}\r\n\t}", "protected void releaseFromPrison() {\n\t\tisInPrison = false;\r\n\t\tnumberOfRound = 0;\r\n\t}", "@Override\n\tpublic String print(CliPrinter printer) {\n\t\treturn printer.printTProductCards(this);\n\t}", "void PrintOnScreen(String toPrnt);", "public void stop()\n {\n printerSimulator.stop();\n }", "public void print() { /* FILL IN */ }", "public void printDrawCard(PoliticCard card);", "private void prnFOOTR()\n\t{\n\t\ttry\n\t\t{\n\t\t\tif(cl_dat.M_intLINNO_pbst >= 64)\n\t\t\t{\n\t\t\t\tdosREPORT.writeBytes(\"-------------------------------------------------------------------------------------------------------------------------------------\");\t\t\n\t\t\t\tif(cl_dat.M_cmbOPTN_pbst.getSelectedItem().toString().equals(cl_dat.M_OPPRN_pbst) && (M_rdbTEXT.isSelected()))\n\t\t\t\t\tprnFMTCHR(dosREPORT,M_strEJT);\n\t\t\t\tif(M_rdbHTML.isSelected())\n\t\t\t\t\tdosREPORT.writeBytes(\"<P CLASS = \\\"breakhere\\\">\");\t\t\t\t\t\t\t\t\n\t\t\t\tprnHEADER();\n\t\t\t}\n\t\t\tdosREPORT.writeBytes(\"-------------------------------------------------------------------------------------------------------------------------------------\\n\");\n\t\t\tdosREPORT.writeBytes (\"\\n\\n\\n\\n\\n\");\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\" \",10));//margin\n\t\t\tif(cl_dat.M_cmbOPTN_pbst.getSelectedItem().toString().equals(cl_dat.M_OPPRN_pbst) && (M_rdbTEXT.isSelected()))\n\t\t\t\tprnFMTCHR(dosREPORT,M_strBOLD);\n\t\t\tif(M_rdbHTML.isSelected())\n\t\t\t\tdosREPORT.writeBytes(\"<B>\");\n\t\t\tdosREPORT.writeBytes(padSTRING('R',\"PREPARED BY\",40));\n\t\t\tdosREPORT.writeBytes(padSTRING('R',\"CHECKED BY \",40));\n\t\t\tdosREPORT.writeBytes(padSTRING('R',\"H.O.D (MHD) \",40));\n\t\t\tif(cl_dat.M_cmbOPTN_pbst.getSelectedItem().toString().equals(cl_dat.M_OPPRN_pbst) && (M_rdbTEXT.isSelected()))\n\t\t\t\tprnFMTCHR(dosREPORT,M_strNOBOLD);\n\t\t\tif(M_rdbHTML.isSelected())\n\t\t\t\tdosREPORT.writeBytes(\"</B>\");\n\t\t\tdosREPORT.writeBytes(\"\\n\");\n\t\t\tdosREPORT.writeBytes(\"-------------------------------------------------------------------------------------------------------------------------------------\\n\");\n\t\t\t\n\t\t\tdosREPORT.writeBytes(\" System generated report, hence signature not required \\n\");\n\t\t\tcl_dat.M_intLINNO_pbst += 8;\n\t\t\tif(cl_dat.M_cmbOPTN_pbst.getSelectedItem().toString().equals(cl_dat.M_OPPRN_pbst))\n\t\t { \n\t\t\t\tprnFMTCHR(dosREPORT,M_strEJT);\n\t\t\t\tprnFMTCHR(dosREPORT,M_strNOCPI17);\n\t\t\t\tprnFMTCHR(dosREPORT,M_strCPI10);\n\t\t\t}\t\n\t\t}\n\t catch(Exception L_EX)\n\t {\n\t\t\tsetMSG(L_EX + \" prnFOOTR\",'E');\n\t\t}\t\n\t}", "public void pourCoffeeImp() {\n\t\tSystem.out.println(\"加奶咖啡\");\n\t}", "public void CleanScr() {\n\t\tint a = 0;\n\t\twhile (a < 16) {\n\t\t\tR0[a].setSelected(false);\n\t\t\tR1[a].setSelected(false);\n\t\t\tR2[a].setSelected(false);\n\t\t\tR3[a].setSelected(false);\n\t\t\tX1[a].setSelected(false);\n\t\t\tX2[a].setSelected(false);\n\t\t\tX3[a].setSelected(false);\n\t\t\tMAR[a].setSelected(false);\n\t\t\tMBR[a].setSelected(false);\n\t\t\tIR[a].setSelected(false);\n//\t\t\tMem[a].setSelected(false);\n\t\t\ta++;\n\t\t}\n\t\tint b = 0;\n\t\twhile (b < 12) {\n\t\t\tPC[b].setSelected(false);\n\t\t\tb++;\n\t\t}\n\t}", "public void savingsReceipPrintStamp(List receiptDetails,Component c) {\n \np.resetAll();\n\np.initialize();\n\np.feedBack((byte)2);\n\n//p.color(0);\n//p.chooseFont(1);\np.alignCenter();\n//p.emphasized(true);\n//p.underLine(2);\np.setText(receiptDetails.get(1).toString());\np.newLine();\np.setText(receiptDetails.get(2).toString());\np.newLine();\np.setText(receiptDetails.get(3).toString());\np.newLine();\np.newLine();\n//p.addLineSeperatorX();\np.underLine(0);\np.emphasized(false);\np.underLine(0);\np.alignCenter();\np.setText(\" *** Savings Made Receipt ***\");\np.newLine();\np.addLineSeperator();\np.newLine();\n\np.alignLeft();\np.setText(\"Account Number: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(9).toString()+p.underLine(0));\np.newLine(); \np.alignLeft();\np.setText(\"Savings Id: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(0).toString()+p.underLine(0));\np.newLine(); \np.alignLeft();\np.emphasized(true);\np.setText(\"Customer: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(4).toString()+p.underLine(0));\np.newLine(); \n//p.emphasized(false);\n//p.setText(\"Loan+Interest: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(6).toString()+\"/=\"+p.underLine(0));\n//p.newLine();\n//p.setText(\"Date Taken: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(7).toString()+p.underLine(0));\n//p.newLine();\n//p.setText(\"Loan Status: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(14).toString()+p.underLine(0));\n//p.newLine();\np.setText(\"Savings Date: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(10).toString()+p.underLine(0));\np.newLine();\np.setText(\"Savings Time: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(11).toString()+p.underLine(0));\np.newLine();\n\np.underLine(0);\np.emphasized(false);\n//p.underLine(0);\np.addLineSeperator();\np.newLine();\np.alignCenter();\np.setText(\"***** Savings Details ***** \");\np.newLine();\np.addLineSeperator();\np.newLine();\n\np.alignLeft();\np.setText(\"Savings Made: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(6).toString()+\"/=\"+p.underLine(0));\np.newLine(); \np.alignLeft();\np.setText(\"Savings Balance: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(8).toString()+\"/=\"+p.underLine(0));\np.newLine(); \np.alignLeft();\np.emphasized(true);\n//p.setText(\"Customer Name: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(4).toString()+p.underLine(0));\n//p.newLine(); \n//p.emphasized(false);\n\np.addLineSeperator();\np.doubleStrik(true);\np.newLine();\np.underLine(2) ;\np.setText(\"Officer: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(5).toString()+p.underLine(0));\np.newLine();\np.addLineSeperatorX();\n\np.addLineSeperator();\np.doubleStrik(true);\np.newLine();\np.underLine(2) ;\np.setText(\"Officer Signiture:\");\np.addLineSeperatorX();\np.newLine();\np.addLineSeperator();\np.doubleStrik(true);\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.underLine(2) ;\np.setText(\"Customer Signiture:\");\np.addLineSeperatorX();\np.newLine();\n//p.setText(\"OFFICE NUMBER: \"+receiptDetails.get(12).toString());\n////p.newLine();\n//p.addLineSeperatorX();\np.feed((byte)3);\np.finit();\n\nprint.feedPrinter(dbq.printDrivers(c),p.finalCommandSet().getBytes());\n \n\n }", "@Source(\"gr/grnet/pithos/resources/editcut.png\")\n ImageResource cut();", "void setPaperSize(short size);", "@Override\n public void printable()\n {\n\tfor (int i = 0; i < width; i++)\n\t{\n\t for (int k = 0; k < length; k++)\n\t {\n\t\tif (k == 0 || k == length - 1)\n\t\t System.out.print(\"O \");\n\t\telse if (i == 0 || i == width - 1)\n\t\t System.out.print(\"O \");\n\t\telse\n\t\t System.out.print(\" \");\n\t }\n\n\t System.out.println();\n\t}\n }", "public void printTest(){\n\r\n p.resetAll();\r\n p.initialize();\r\n p.feedBack((byte)2);\r\n// p.color(1);\r\n p.alignCenter();\r\n p.setText(\"The Dum Dum Name\");\r\n p.newLine();\r\n p.setText(\"Restaurant Dining\");\r\n p.newLine();\r\n p.addLineSeperator();\r\n p.newLine();\r\n p.setText(\"Bling Bling\");\r\n p.newLine();\r\n p.addLineSeperator();\r\n p.newLine();\r\n\r\n p.alignLeft();\r\n p.setText(\"POD No \\t\\t: 2001 \\t\\t Table \\t: E511\");\r\n p.newLine(); \r\n\r\n p.setText(\"Res Date \\t: \" + \"01/01/1801 22:59\");\r\n\r\n p.newLine();\r\n p.setText(\"Session \\t: Evening Session\");\r\n p.newLine();\r\n p.setText(\"Staff \\t\\t: Bum Dale\");\r\n p.newLine();\r\n p.addLineSeperator();\r\n p.newLine();\r\n p.alignCenter();\r\n p.setText(\" - Some Items - \");\r\n p.newLine();\r\n p.alignLeft();\r\n p.addLineSeperator();\r\n\r\n p.newLine();\r\n\r\n p.setText(\"No \\tItem\\t\\tUnit\\tQty\");\r\n p.newLine();\r\n p.addLineSeperator();\r\n \r\n p.newLine();\r\n p.setText(\"1\" + \"\\t\" + \"Aliens Everywhere\" + \"\\t\" + \"Rats\" + \"\\t\" + \"500\");\r\n p.newLine();\r\n p.setText(\"1\" + \"\\t\" + \"Aliens Everywhere\" + \"\\t\" + \"Rats\" + \"\\t\" + \"500\");\r\n p.newLine();\r\n p.setText(\"1\" + \"\\t\" + \"Aliens Everywhere\" + \"\\t\" + \"Rats\" + \"\\t\" + \"500\");\r\n p.newLine();\r\n p.setText(\"1\" + \"\\t\" + \"Aliens Everywhere\" + \"\\t\" + \"Rats\" + \"\\t\" + \"500\");\r\n p.newLine();\r\n p.setText(\"1\" + \"\\t\" + \"Aliens Everywhere\" + \"\\t\" + \"Rats\" + \"\\t\" + \"500\");\r\n p.newLine();\r\n p.setText(\"1\" + \"\\t\" + \"Aliens Everywhere\" + \"\\t\" + \"Rats\" + \"\\t\" + \"500\");\r\n p.newLine();\r\n \r\n p.addLineSeperator();\r\n p.feed((byte)3);\r\n p.finit();\r\n\r\n p.feedPrinter(p.finalCommandSet().getBytes());\r\n \r\n }", "void printBattle(ConsolePrinter printer);", "private void realPrint(PrintJob job) {\n\t}", "private void realPrint(PrintJob job) {\n\t}", "short getPaperSize();", "public void startPrinting()\n {\n printerSimulator.startPrintingProcess();\n }", "double computePrintingCost(double price){\n //TODO calculate price and return it\n return price * printer.countCharactersPrinted();\n }", "public void visitPOSPrinter( DevCat devCat ) {}", "private void actionPrint() {\n // get PrinterJob\n PrinterJob job = PrinterJob.getPrinterJob();\n MyPrintable printable = new MyPrintable(job.defaultPage(), layoutPanel);\n\n // setup Printable, Pageable\n job.setPrintable(printable);\n job.setPageable(printable);\n\n // display print dialog and print\n if (job.printDialog()) {\n try {\n job.print();\n } catch (PrinterException e) {\n e.printStackTrace();\n }\n }\n }", "public void cutCopyEnabled(boolean enabled);", "public static void main(String [] args)\n{\n //this is something to memorize \n\nDrawingTool pencil;\nSketchPad paper;\n//these two were object declarations \npaper = new SketchPad (300,300); \npencil = new DrawingTool(paper); \n//these two were to create instances of the DrawingTool and SketchPad that are in the library today \n\n//now, directions: memorize the format for the instructions \npencil.forward (100);\npencil.turnRight (90);\npencil.forward (200);\npencil.turnRight (90);\npencil.forward (100);\npencil.turnRight (90);\npencil.forward (200);\npencil.turnRight (90);\npencil.forward (100);\npencil.turnRight (45);\npencil.forward (142);\npencil.turnRight (90); \npencil.forward (142);\npencil.turnRight (45);\npencil.forward (100);\npencil.turnRight (90);\npencil.forward (80);\npencil.turnRight (90);\npencil.forward (40);\npencil.turnLeft (90);\npencil.forward (20);\npencil.turnLeft (90);\npencil.forward (40);\n/*a few questions I have: can I change the color of the pencil, can I lift\n * it or choose where to start\n */\npencil.turnRight(90);\npencil.forward (100);\npencil.turnRight (90);\npencil.forward (160);\npencil.turnRight (90);\npencil.forward (30);\npencil.turnRight (90);\npencil.forward (30);\n\n\n\n \n\n//how can I add a new color in this? I requested access for the video \n//that the logo team made\n \n \n}", "@Override\r\n public final void draw(final Canvas c, final BufferedImage paper) {\n for (int i = 0; i < c.getHeight(); i++) {\r\n for (int j = 0; j < c.getWidth(); j++) {\r\n paper.setRGB(i, j, c.getBorderColor().getRGB());\r\n }\r\n }\r\n }", "@Override\n public void run() {\n\n if (PrinterInstance.mPrinter == null) {\n Toast.makeText(mContext, getString(R.string.not_support), Toast.LENGTH_LONG).show();\n } else {\n mPrinter.printImage(monoChromeBitmap, PAlign.NONE, 0, false);\n }\n }", "public void exePRINT()\n\t{\n\t\tif(!vldDATA())\n\t\t\treturn;\n\t\t\n\t\ttry\n\t\t{\n\t\t\tif(M_rdbHTML.isSelected())\n\t\t\t\tstrFILNM = cl_dat.M_strREPSTR_pbst+\"mr_rpexd.html\";\n\t\t\telse\n\t\t\t\tstrFILNM = cl_dat.M_strREPSTR_pbst+\"mr_rpexd.doc\";\n\n\t\t\tgetDATA();\n\t\t\t\n\t\t/*\tif(intRECCT == 0)\n\t\t\t{\t\n\t\t\t\tsetMSG(\"No Data found..\",'E');\n\t\t\t\treturn;\n\t\t\t}*/\n\t\t\tif(cl_dat.M_cmbOPTN_pbst.getSelectedItem().toString().equals(cl_dat.M_OPPRN_pbst))\n\t\t\t{\t\t\t\t\t\n\t\t\t\tif (M_rdbTEXT.isSelected())\n\t\t\t\t doPRINT(strFILNM);\n\t\t\t\telse \n\t\t\t\t{ \n\t\t\t\t\tRuntime r = Runtime.getRuntime();\n\t\t\t\t\tProcess p = null;\t\t\t\t\t\n\t\t\t\t\tp = r.exec(\"c:\\\\windows\\\\iexplore.exe \"+strFILNM); \n\t\t\t\t\tsetMSG(\"For Printing Select File Menu, then Print ..\",'N');\n\t\t\t\t} \n\t\t\t}\n\t\t\telse if(cl_dat.M_cmbOPTN_pbst.getSelectedItem().toString().equals(cl_dat.M_OPSCN_pbst))\n\t\t\t{\n\t\t\t Runtime r = Runtime.getRuntime();\n\t\t\t\tProcess p = null;\n\t\t\t\t\t\n\t\t\t\tif(M_rdbHTML.isSelected())\n\t\t\t\t p = r.exec(\"c:\\\\windows\\\\iexplore.exe \"+strFILNM); \n\t\t\t\telse\n\t\t\t\t p = r.exec(\"c:\\\\windows\\\\wordpad.exe \"+strFILNM);\n\t\t\t}\n\t\t\telse if(cl_dat.M_cmbDESTN_pbst.getSelectedItem().toString().trim().equals(cl_dat.M_OPEML_pbst))\n\t\t\t{\t\t\t\n\t\t\t\tcl_eml ocl_eml = new cl_eml();\t\t\t\t \n\t\t\t for(int i=0;i<M_cmbDESTN.getItemCount();i++)\n\t\t\t {\n\t\t\t\t ocl_eml.sendfile(M_cmbDESTN.getItemAt(i).toString().trim(),strFILNM,\"Export Certificate\",\" \");\n\t\t\t\t setMSG(\"File Sent to \" + M_cmbDESTN.getItemAt(i).toString().trim() + \" Successfuly \",'N');\t\t\t\t \n\t\t\t\t}\t\t\t\t \t \t\n\t\t\t}\n\t\t}\n\t\tcatch(Exception L_EX)\n\t\t{\n\t\t\tsetMSG(L_EX,\"exePRINT\");\n\t\t}\t\t\n\t}", "static void print_disk(int size){\n for(int i = 0; i < 5-size; i++)\n System.out.print(\" \");\n for(int i = 0; i < size; i++){\n if(i == size/2 && size%2 == 0)\n System.out.print(\"||--\");\n else if(i == size/2 && size%2 == 1)\n System.out.print(\"-||-\");\n else\n System.out.print(\"--\");\n }\n for(int i = 0; i < 5-size; i++)\n System.out.print(\" \");\n System.out.print(\"\\t\");\n }", "public static void deselNotes() {\r\n List<MeasureLine> selection = DataClipboard.getSelection();\r\n for(int i = DataClipboard.getSelectionLineBegin(); i < DataClipboard.getSelectionLineEnd() + 1; i++){\r\n if(selection.get(i) != null) {\r\n if (selection.get(i).size() > 0) {\r\n selection.get(i).clear();\r\n }\r\n if(selection.get(i).getVolume() < 0) {\r\n selection.set(i, null);\r\n }\r\n }\r\n }\r\n \r\n //find new line begin \r\n for(int i = DataClipboard.getSelectionLineBegin(); i < DataClipboard.getSelectionLineEnd() + 1; i++){\r\n if(selection.get(i) != null) {\r\n DataClipboard.setSelectionLineBegin(i);\r\n break;\r\n }\r\n }\r\n \r\n //find new line end \r\n for(int i = DataClipboard.getSelectionLineEnd(); i > DataClipboard.getSelectionLineBegin() - 1; i--){\r\n if(selection.get(i) != null) {\r\n DataClipboard.setSelectionLineEnd(i);\r\n break;\r\n }\r\n }\r\n }", "public void skipPrint()\n {\n skipPrint(0);\n }", "QPrintTerm createPrintTerm();", "public void savingsWithdrawReceipPrintStamp(List receiptDetails,Component c) {\n \np.resetAll();\n\np.initialize();\n\np.feedBack((byte)2);\n\np.color(0);\np.chooseFont(1);\np.alignCenter();\n//p.emphasized(true);\n//p.underLine(2);\np.setText(receiptDetails.get(1).toString());\np.newLine();\np.setText(receiptDetails.get(2).toString());\np.newLine();\np.setText(receiptDetails.get(3).toString());\np.newLine();\np.newLine();\n//p.addLineSeperatorX();\np.underLine(0);\np.emphasized(false);\np.underLine(0);\np.alignCenter();\np.setText(\" *** Savings Withdrawal ***\");\np.newLine();\np.addLineSeperator();\np.newLine();\n\np.alignLeft();\np.setText(\"Account Number: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(9).toString()+p.underLine(0));\np.newLine(); \np.alignLeft();\np.setText(\"Savings Id: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(0).toString()+p.underLine(0));\np.newLine(); \np.alignLeft();\np.emphasized(true);\np.setText(\"Customer: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(4).toString()+p.underLine(0));\np.newLine(); \n//p.emphasized(false);\n//p.setText(\"Loan+Interest: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(6).toString()+\"/=\"+p.underLine(0));\n//p.newLine();\n//p.setText(\"Date Taken: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(7).toString()+p.underLine(0));\n//p.newLine();\n//p.setText(\"Loan Status: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(14).toString()+p.underLine(0));\n//p.newLine();\np.setText(\"Withdrawal Date: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(10).toString()+p.underLine(0));\np.newLine();\np.setText(\"Withdrawal Time: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(11).toString()+p.underLine(0));\np.newLine();\n\np.underLine(0);\np.emphasized(false);\n//p.underLine(0);\np.addLineSeperator();\np.newLine();\np.alignCenter();\np.setText(\"***** Withdrawal Details ***** \");\np.newLine();\np.addLineSeperator();\np.newLine();\n\np.alignLeft();\np.setText(\"Withdrawal Made: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(7).toString()+\"/=\"+p.underLine(0));\np.newLine(); \np.alignLeft();\np.setText(\"Savings Balance: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(8).toString()+\"/=\"+p.underLine(0));\np.newLine(); \np.alignLeft();\np.emphasized(true);\n//p.setText(\"Customer Name: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(4).toString()+p.underLine(0));\n//p.newLine(); \n//p.emphasized(false);\n\np.addLineSeperator();\np.doubleStrik(true);\np.newLine();\np.underLine(2) ;\np.setText(\"Officer: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(5).toString()+p.underLine(0));\np.newLine();\np.addLineSeperatorX();\n\np.addLineSeperator();\np.doubleStrik(true);\np.newLine();\np.underLine(2) ;\np.setText(\"Officer Signiture:\");\np.addLineSeperatorX();\np.newLine();\np.addLineSeperator();\np.doubleStrik(true);\n//p.newLine();\np.underLine(2) ;\np.setText(\"Customer Signiture:\");\np.addLineSeperatorX();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.setText(\"OFFICE NUMBER: \"+receiptDetails.get(12).toString());\n\np.newLine();\np.addLineSeperatorX();\n//p.newLine();\np.feed((byte)3);\np.finit();\n\nprint.feedPrinter(dbq.printDrivers(c),p.finalCommandSet().getBytes());\n \n\n }", "public void cut() {\n\t\tcmd = new CutCommand(editor);\n\t\tinvoker = new MiniEditorInvoker(cmd);\n\t\tinvoker.action();\n\t}", "public String unitPriceOfHardCopyPdf()\n \t{\n \t\tString unitPriceOfHardCopyPdf = productRequirementsPageLocators.hardCopyUnitPrice.getText();\n \t\tSystem.out.println(\"unit price of pdf englihs is: \"+unitPriceOfHardCopyPdf);\n\t\treturn unitPriceOfHardCopyPdf;\n\n \t}", "public void onTextCut()\n\t{\n\t}", "Sketch apex();", "public boolean isCut() {\n\t\treturn isCut;\n\t}", "public void PrinterStatus(){\n PrintService[] services = PrintServiceLookup.lookupPrintServices(null, null);\n System.out.println(\"Printer Services found:\");\n printService(services);\n\n // Look up the default print service\n PrintService service = PrintServiceLookup.lookupDefaultPrintService();\n if (service!=null) {\n System.out.println(\"Default Printer Service found:\");\n System.out.println(\"t\" + service);\n }\n\n\t\n // find printer service by name\n AttributeSet aset_name = new HashAttributeSet();\n aset_name.add(new PrinterName(\"Microsoft XPS Document Writer\", null));\n services = PrintServiceLookup.lookupPrintServices(null, aset_name);\n\n System.out.println(\"Printer Service Microsoft XPS Document Writer:\");\n printService(services);\n \n // find printer service by ip\n PrintServiceAttributeSet aset_URI = new HashPrintServiceAttributeSet();\n try {\n aset_URI.add(new PrinterURI(new URI(\"this ipp is wrong --ipp://hostName/printerName\")));\n } catch (URISyntaxException e) {\n System.out.println(\"URI exception caught: \"+e);\n }\n services = PrintServiceLookup.lookupPrintServices(null,aset_URI); \n // null could be replaced by DocFlavor.INPUT_STREAM.POSTSCRIPT, etc...\n System.out.println(\"Printer specific URI :\");\n printService(services);\n \n /*\n //another way to print to a specific uri\n URI printerURI = null;\n try {\n printerURI = new URI(\"ipp://SERVER:631/printers/PRINTER_NAME\");\n } catch (URISyntaxException ex) {\n Logger.getLogger(PrinterStatus.class.getName()).log(Level.SEVERE, null, ex);\n }\n IppPrintService svc = new IppPrintService(printerURI);\n services = PrintServiceLookup.lookupPrintServices(null,aset_URI); \n // null could be replaced by DocFlavor.INPUT_STREAM.POSTSCRIPT, etc...\n System.out.println(\"Printer specific URI :\");\n printService(services);\n // following is the way to print sth in a format of flavor\n InputStream stream = new BufferedInputStream(new FileInputStream(\"image.epl\"));\n DocFlavor flavor = DocFlavor.INPUT_STREAM.AUTOSENSE;\n Doc myDoc = new SimpleDoc(stream, flavor, null);\n DocPrintJob job = svc.createPrintJob();\n job.print(myDoc, null);\n */\n \n /*\n // find services that support a particular input format (e.g. JPEG)\n services = PrintServiceLookup.lookupPrintServices(DocFlavor.INPUT_STREAM.JPEG, null);\n System.out.println(\"Printer Services with JPEG support:\");\n printService(services);\n\n //find services that support a set of print job capabilities (e.g. color)\n aset = new HashAttributeSet();\n aset.add(ColorSupported.SUPPORTED);\n services = PrintServiceLookup.lookupPrintServices(null, aset);\n\n System.out.println(\"Printer Services with color support:\");\n printService(services);\n */ \n }", "public void print(boolean border, PrintStream printer) throws UnsupportedException {\n\n\t\tif (border) {\n\t\t\tfor (int i = 0; i < canvas.getWidth() + 2; i++) {\n\t\t\t\tprinter.print(HORIZONTAL_LINE);\n\t\t\t}\n\t\t\tprinter.println();\n\t\t}\n\n\t\tchar[][] matrix = canvas.getMatrix();\n\t\tfor (int i = 0; i < canvas.getHeight(); i++) {\n\t\t\tif (border)\n\t\t\t\tprinter.print(VERTICAL_LINE);\n\t\t\tfor (int j = 0; j < canvas.getWidth(); j++) {\n\t\t\t\tprinter.print(matrix[j][i]);\n\t\t\t}\n\t\t\tif (border)\n\t\t\t\tprinter.print(VERTICAL_LINE + \"\\n\");\n\t\t}\n\n\t\tif (border) {\n\t\t\tfor (int i = 0; i < canvas.getWidth() + 2; i++) {\n\t\t\t\tprinter.print(HORIZONTAL_LINE);\n\t\t\t}\n\t\t\tprinter.println();\n\t\t}\n\t}", "public void print() {\n btprint(c);\n }", "public void removePaper(ConferencePaper pape){\r\n\t\tpapers.remove(pape);\r\n\t}", "public static void main(String[] args) {\n Book bk2 = new PrintedBook(\"asdf\", \"qwertz\", 1331, PrintedBookCoverType.Softcover);\n System.out.println(bk2.getPrice());\n\n //System.out.println(pb2.printedBookSpecific());\n }", "@Override\n\tpublic void removePrinter(Printer<? super BitString> printer) {\n\t\t\n\t}", "public void actionPerformed(ActionEvent e) {\n \t\tPrinterJob job = PrinterJob.getPrinterJob();\n \t\tjob.setPrintable(this);\n \t\tboolean ok = job.printDialog();\n \t\tif (ok) {\n \t\t\ttry {\n \t\t\t\tjob.print();\n \t\t\t} catch (PrinterException ex) {\n \t\t\t\t/* The job did not successfully complete */\n \t\t\t}\n \t\t}\n \n \t}", "void genReport() {\n\n current_part.save_state(); \n\n JTextArea ta = text;\n\n ta.setText(\"\");\n\n if (!t_foil_name.equals(\"Test\"))\n ta.append(\"Hydrofoil: \" + t_foil_name);\n\n java.util.Date date = new java.util.Date();\n ta.append(\"\\n Date: \" + date);\n \n wing.print( \"Main Wing\", ta);\n stab.print( \"Stabilizer Wing\", ta);\n strut.print(\"Mast (a.k.a. Strut)\", ta);\n fuse.print( \"Fuselage\", ta);\n\n ta.append( \"\\n\\n\");\n // tail volume is LAElev * AreaElev / (MACWing * AreaWing)\n // LAElev : The elevator's Lever Arm measured at the wing's and elevator's quarter chord point\n double LAElev = stab.xpos + stab.chord_xoffs + 0.25*stab.chord - (wing.xpos + wing.chord_xoffs + 0.25*wing.chord);\n // MAC : The main wing's Mean Aerodynamic Chord\n // AreaWing : The main wing's area\n // AreaElev : The elevator's area\n \n ta.append( \"\\nTail Voulume: \" + LAElev*stab.span*stab.chord/(wing.chord*wing.chord*wing.span));\n \n\n ta.append( \"\\n\\n\");\n switch (planet) {\n case 0: { \n ta.append( \"\\n Standard Earth Atmosphere\" );\n break;\n }\n case 1: { \n ta.append( \"\\n Martian Atmosphere\" );\n break;\n }\n case 2: { \n ta.append( \"\\n Water\" );\n break;\n }\n case 3: { \n ta.append( \"\\n Specified Conditions\" );\n break;\n }\n case 4: { \n ta.append( \"\\n Specified Conditions\" );\n break;\n }\n }\n\n // ta.append( \"\\n Altitude = \" + filter0(alt_val) );\n // if (lunits == IMPERIAL) ta.append( \" ft ,\" );\n // else /*METRIC*/ ta.append( \" m ,\" );\n \n switch (lunits) {\n case 0: { /* English */\n ta.append( \"\\n Density = \" + filter5(rho_EN) );\n ta.append( \"slug/cu ft\" );\n ta.append( \"\\n Pressure = \" + filter3(ps0/144.) );\n ta.append( \"lb/sq in,\" );\n ta.append( \" Temperature = \" + filter0(ts0 - 460.) );\n ta.append( \"F,\" );\n break;\n }\n case 1: { /* Metric */\n ta.append( \" Density = \" + filter3(rho_EN*515.4) );\n ta.append( \"kg/cu m\" );\n ta.append( \"\\n Pressure = \" + filter3(101.3/14.7*ps0/144.) );\n ta.append( \"kPa,\" );\n ta.append( \" Temperature = \" + filter0(ts0*5.0/9.0 - 273.1) );\n ta.append( \"C,\" );\n break;\n }\n }\n\n ta.append( \"\\n Speed = \" + filter1(velocity * (lunits==IMPERIAL? 0.868976 : 0.539957 )) + \"Kts, or\" );\n ta.append( \" \" + filter1(velocity) );\n if (lunits == IMPERIAL) ta.append( \" mph ,\" );\n else /*METRIC*/ ta.append( \" km/hr ,\" );\n\n // if (out_aux_idx == 1)\n // ta.append( \"\\n Lift Coefficient = \" + filter3(current_part.cl) );\n // if (out_aux_idx == 0) {\n // if (Math.abs(lift) <= 10.0) ta.append( \"\\n Lift = \" + filter3(lift) );\n // if (Math.abs(lift) > 10.0) ta.append( \"\\n Lift = \" + filter0(lift) );\n // if (lunits == IMPERIAL) ta.append( \" lbs \" );\n // else /*METRIC*/ ta.append( \" Newtons \" );\n // }\n // if ( polarOut == 1)\n // ta.append( \"\\n Drag Coefficient = \" + filter3(current_part.cd) );\n // if (out_aux_idx == 0) {\n // ta.append( \"\\n Drag = \" + filter0(drag) );\n // if (lunits == IMPERIAL) ta.append( \" lbs \" );\n // else /*METRIC*/ ta.append( \" Newtons \" );\n // }\n\n ta.append( \"\\n Lift = \" + dash.outTotalLift.getText());\n ta.append( \"\\n Drag = \" + dash.outTotalDrag.getText());\n\n if (min_takeoff_speed_info != null) \n ta.append( \"\\n\\n\" + min_takeoff_speed_info);\n\n if (cruising_info != null) \n ta.append( \"\\n\\n\" + cruising_info);\n\n if (max_speed_info != null) \n ta.append( \"\\n\\n\" + max_speed_info);\n\n // ensure end ta.setCaretPosition(ta.getText().length());\n // ensure start\n ta.setCaretPosition(0);\n }", "public void dumpBack(Printer pw, String prefix) {\n }", "static public PrintDataPart getEscCut(PrintDataPart obj, int type, int subtype, int value, String escdata, boolean negated, boolean valueispresent) {\r\n if (type == 'P' && !negated && escdata == null) {\r\n EscCut esc = new EscCut();\r\n esc.Percent = valueispresent ? value : 100;\r\n esc.Stamp = subtype == 's';\r\n esc.Feed = subtype != 0;\r\n if (esc.Stamp || !esc.Feed || subtype == 'f')\r\n return esc;\r\n }\r\n return obj;\r\n }", "public void goToPrinterSection(){\n click(By.name(printerTab));\n }", "@Override\n public void onPrinterAvailable(int flag) {\n Logger.i(TAG, \"working till here printer available!\");\n\n if (flag == 2) {\n// btn_PrintBill.setEnabled(false);\n// btn_Reprint.setEnabled(false);\n SetPrinterAvailable(false);\n } else if (flag == 5) {\n// btn_PrintBill.setEnabled(true);\n// btn_Reprint.setEnabled(true);\n// feedPrinter();\n SetPrinterAvailable(true);\n } else if (flag == 0) {\n// btn_PrintBill.setEnabled(true);\n// btn_Reprint.setEnabled(true);\n SetPrinterAvailable(false);\n }\n }", "@Override\n public void cut() {\n clipboard.setContents(getSelectionAsList(true));\n }", "private void PIDDrive(double output){\n if(!manual){\n \tif (top_limitSwitch.get() == false && (output<0)){\n \t\televMotor.pidWrite(0);\n \t\tcurrentStep = 4;\n \t}\n \telse if (bottom_hallEffect.get() == false && (output>0)){\n \t\televMotor.set(0);\n \t\tencReset();\n \t}\n \telse {\n \t\televMotor.pidWrite(output);\n \t}\n }\n }", "private void print_da_page() {\n \t\tSystem.out.println(\"**** Hell yeah, print da page\");\n \t\t// des Assert ici pour verifier qq truc sur le local storage serait p-e\n \t\t// bien..\n \n \t\tsetInSlot(SLOT_OPTION_SELECION, cardSelectionOptionPresenter);\n \t\tcardSelectionOptionPresenter.init();\n \t\t\n \t\tsetInSlot(SLOT_BOARD, boardPresenter);\n \n \t\tcardDragController.registerDropController(cardDropPanel);\n \t\t\n \t\tsetStaticFirstComboView();\n \t\twriteInstancePanel();\n \t\tStorage_access.setCurrentProjectInstanceBddId(0);\n \t\t//Storage_access.setCurrentProjectInstance(Storage_access.getInstanceBddId(Storage_access.getCurrentProjectInstance()));\n \t\t\n \t\treDrowStatusCard();\n \t\t\n \t\tthis.boardPresenter.redrawBoard(0,0); //TODO n'enregistrerons nous pas la \"vue par default\"? ou la derniere ?\n \t\t\n \t\twriteCardWidgetsFirstTime();\n \t\t//getView().constructFlex(cardDragController);\n \t\n \t\t\n \t\t\n \t\t//CellDropControler dropController = new CellDropControler(simplePanel);\n \t //\tcardDragController.registerDropController(dropController);\n \n \t}", "public void setPrintArea(int arg0, String arg1) {\n\n\t}", "public void makeBreakdownShell(SizeBreakdown breakdown)\n throws IOException {\n \n Map<String, CodeCollection> nameToCodeColl = breakdown.nameToCodeColl;\n Map<String, LiteralsCollection> nameToLitColl = breakdown.nameToLitColl;\n \n // copy from the bin directory to the current directory\n String classPath = GlobalInformation.settings.resources.get();\n if (classPath == null) {\n classPath = System.getProperty(\"java.class.path\");\n }\n if (!classPath.endsWith(\"/\")) {\n classPath += \"/\";\n }\n String inputFileName = \"roundedCorners.css\";\n File inputFile = new File(classPath + inputFileName);\n File outputFile = getOutFile(\"roundedCorners.css\");\n copyFileOrDirectory(inputFile, outputFile, classPath, inputFileName, false);\n \n inputFileName = \"classLevel.css\";\n File inputFile2 = new File(classPath + inputFileName);\n File outputFile2 = getOutFile(\"classLevel.css\");\n copyFileOrDirectory(inputFile2, outputFile2, classPath, inputFileName,\n false);\n \n inputFileName = \"images\";\n File inputDir = new File(classPath + \"images\");\n File outputDir = getOutFile(\"images\");\n copyFileOrDirectory(inputDir, outputDir, classPath, inputFileName, true);\n \n final PrintWriter outFile = new PrintWriter(getOutFile(shellFileName(breakdown)));\n outFile.println(\"<!DOCTYPE HTML PUBLIC \\\"-//IETF//DTD HTML//EN\\\">\");\n outFile.println(\"<html>\");\n outFile.println(\"<head>\");\n outFile.println(\"<title>Story of Your Compile - Top Level Dashboard for Permutation</title>\");\n \n outFile.println(\"<link rel=\\\"stylesheet\\\" href=\\\"roundedCorners.css\\\">\");\n outFile.println(\"<style type=\\\"text/css\\\">\");\n outFile.println(\"body {background-color: #728FCE}\");\n outFile.println(\"h2 {background-color: transparent}\");\n outFile.println(\"p {background-color: fuchsia}\");\n outFile.println(\"</style>\");\n outFile.println(\"</head>\");\n \n outFile.println(\"<body>\");\n outFile.println(\"<center>\");\n outFile.println(\"<h3>Story of Your Compile Dashboard</h3>\");\n addHeaderWithBreakdownContext(breakdown, outFile);\n \n outFile.println(\"</center>\");\n outFile.println(\" <div style=\\\"width:50%; float:left; padding-top: 10px;\\\">\");\n outFile.println(\"<b>Package breakdown</b>\");\n outFile.println(\" </div>\");\n outFile.println(\" <div style=\\\"width:48%; float:right; padding-top: 10px; \\\">\");\n outFile.println(\"<b>Code type breakdown</b>\");\n outFile.println(\" </div>\");\n \n outFile.println(\" <div style=\\\"width:50%; float:left; padding-top: 10px;\\\">\");\n outFile.println(\"<div style=\\\"width: 110px; float: left; font-size:16px;\\\">Size</div>\");\n outFile.println(\"<div style=\\\"width: 200px; float: left; text-align:left; font-size:16px; \\\">Package Name</div>\");\n outFile.println(\" </div>\");\n \n outFile.println(\" <div style=\\\"width:48%; float:right; padding-top: 10px;\\\">\");\n outFile.println(\"<div style=\\\"width: 110px; float: left; font-size:16px;\\\">Size</div>\");\n outFile.println(\"<div style=\\\"width: 200px; float: left; text-align:left; font-size:16px; \\\">Code Type</div>\");\n outFile.println(\" </div>\");\n \n String packageBreakdownFileName = makePackageHtml(breakdown);\n outFile.println(\"<div style=\\\"height:35%; width:48%; margin:0 auto; background-color:white; float:left;\\\">\");\n outFile.println(\"<iframe src=\\\"\" + packageBreakdownFileName\n + \"\\\" width=100% height=100% scrolling=auto></iframe>\");\n outFile.println(\" </div>\");\n \n String codeTypeBreakdownFileName = makeCodeTypeHtml(breakdown,\n nameToCodeColl);\n outFile.println(\"<div style=\\\"height:35%; width:48%; margin:0 auto; background-color:white; float:right;\\\">\");\n outFile.println(\"<iframe src=\\\"\" + codeTypeBreakdownFileName\n + \"\\\" width=100% height=100% scrolling=auto></iframe>\");\n outFile.println(\" </div>\");\n \n outFile.println(\" <div style=\\\"width:50%; float:left; padding-top: 10px;\\\">\");\n outFile.println(\"<b>Literals breakdown</b>\");\n outFile.println(\" </div>\");\n outFile.println(\" <div style=\\\"width:48%; float:right; padding-top: 10px; \\\">\");\n outFile.println(\"<b>String literals breakdown</b>\");\n outFile.println(\" </div>\");\n \n outFile.println(\" <div style=\\\"width:50%; float:left; padding-top: 10px;\\\">\");\n outFile.println(\"<div style=\\\"width: 110px; float: left; font-size:16px;\\\">Size</div>\");\n outFile.println(\"<div style=\\\"width: 200px; float: left; text-align:left; font-size:16px; \\\">Literal Type</div>\");\n outFile.println(\" </div>\");\n \n outFile.println(\" <div style=\\\"width:48%; float:right; padding-top: 10px; \\\">\");\n outFile.println(\"<div style=\\\"width: 110px; float: left; font-size:16px;\\\">Size</div>\");\n outFile.println(\"<div style=\\\"width: 200px; float: left; text-align:left; font-size:16px; \\\">String Literal Type</div>\");\n outFile.println(\" </div>\");\n \n String literalsBreakdownFileName = makeLiteralsHtml(breakdown,\n nameToLitColl);\n outFile.println(\"<div style=\\\"height:35%; width:48%; margin:0 auto; background-color:white; float:left;\\\">\");\n outFile.println(\"<iframe src=\\\"\" + literalsBreakdownFileName\n + \"\\\" width=100% height=100% scrolling=auto></iframe>\");\n outFile.println(\"</div>\");\n \n String stringLiteralsBreakdownFileName = makeStringLiteralsHtml(breakdown,\n nameToLitColl);\n outFile.println(\"<div style=\\\"height:35%; width:48%; margin:0 auto; background-color:white; float:right;\\\">\");\n outFile.println(\"<iframe src=\\\"\" + stringLiteralsBreakdownFileName\n + \"\\\" width=100% height=100% scrolling=auto></iframe>\");\n outFile.println(\" </div>\");\n \n outFile.println(\" </body>\");\n outFile.println(\"</html>\");\n outFile.close();\n }", "public void visitFiscalPrinter( DevCat devCat ) {}", "public void setDrawingCap(CAP cap);", "void calculateChevronTrim() {\n ToolBar tb = new ToolBar( parent, SWT.FLAT );\n ToolItem ti = new ToolItem( tb, SWT.PUSH );\n // Image image = new Image (display, 1, 1);\n // ti.setImage (image);\n Point size = tb.computeSize( SWT.DEFAULT, SWT.DEFAULT );\n size = parent.fixPoint( size.x, size.y );\n CHEVRON_HORIZONTAL_TRIM = size.x - 1;\n CHEVRON_VERTICAL_TRIM = size.y - 1;\n tb.dispose();\n ti.dispose();\n // image.dispose ();\n }", "public static void part2(){\n\t\n System.out.println(\"\\\\\"); //Outer wall\n System.out.println(\"\\\\\");\n System.out.println(\"\\\\\");\n for(int i = 0; i <= 16; i++){ //loop created to display top of the door\n\n \tSystem.out.print(\"-\");\n\n\t}\n System.out.println(\"\");\n System.out.println(\"\\\\\\t\\t| \\t(\\\")\"); //The door and the stick figure\n System.out.println(\"\\\\\\t\\t|\\t-|-\");\n System.out.println(\"\\\\\\t o | \\t |\");\n System.out.println(\"\\\\\\t\\t|\\t /\\\\\");\n System.out.println(\"\\\\\\t\\t|\\t/ \\\\\");\n\t\t\n }", "private void Print_Test(){\n String lang = getString(R.string.strLang);\n if((lang.compareTo(\"en\")) == 0){\n\n //cetak gambar logo dulu\n Print_BMP();\n\n //cetak string struk\n String data = struk;\n SendDataByte(PrinterCommand.POS_Print_Text(data, CHINESE, 0, 0, 0, 0));\n SendDataByte(PrinterCommand.POS_Set_Cut(1));\n SendDataByte(PrinterCommand.POS_Set_PrtInit());\n }else if((lang.compareTo(\"cn\")) == 0){\n String msg = \"恭喜您!\\n\\n\";\n String data = \"您已经成功的连接上了我们的便携式蓝牙打印机!\\n我们公司是一家专业从事研发,生产,销售商用票据打印机和条码扫描设备于一体的高科技企业.\\n\\n\\n\\n\\n\\n\\n\";\n SendDataByte(PrinterCommand.POS_Print_Text(msg, CHINESE, 0, 1, 1, 0));\n SendDataByte(PrinterCommand.POS_Print_Text(data, CHINESE, 0, 0, 0, 0));\n SendDataByte(PrinterCommand.POS_Set_Cut(1));\n SendDataByte(PrinterCommand.POS_Set_PrtInit());\n }else if((lang.compareTo(\"hk\")) == 0 ){\n String msg = \"恭喜您!\\n\";\n String data = \"您已經成功的連接上了我們的便攜式藍牙打印機! \\n我們公司是一家專業從事研發,生產,銷售商用票據打印機和條碼掃描設備於一體的高科技企業.\\n\\n\\n\\n\\n\\n\\n\";\n SendDataByte(PrinterCommand.POS_Print_Text(msg, BIG5, 0, 1, 1, 0));\n SendDataByte(PrinterCommand.POS_Print_Text(data, BIG5, 0, 0, 0, 0));\n SendDataByte(PrinterCommand.POS_Set_Cut(1));\n SendDataByte(PrinterCommand.POS_Set_PrtInit());\n }else if((lang.compareTo(\"kor\")) == 0){\n String msg = \"축하 해요!\\n\";\n String data = \"성공적으로 우리의 휴대용 블루투스 프린터에 연결 한! \\n우리는 하이테크 기업 중 하나에서 개발, 생산 및 상업 영수증 프린터와 바코드 스캐닝 장비 판매 전문 회사입니다.\\n\\n\\n\\n\\n\\n\\n\";\n SendDataByte(PrinterCommand.POS_Print_Text(msg, KOREAN, 0, 1, 1, 0));\n SendDataByte(PrinterCommand.POS_Print_Text(data, KOREAN, 0, 0, 0, 0));\n SendDataByte(PrinterCommand.POS_Set_Cut(1));\n SendDataByte(PrinterCommand.POS_Set_PrtInit());\n }else if((lang.compareTo(\"thai\")) == 0){\n String msg = \"ขอแสดงความยินดี!\\n\";\n String data = \"คุณได้เชื่อมต่อกับบลูทู ธ เครื่องพิมพ์แบบพกพาของเรา! \\n เราเป็น บริษัท ที่มีความเชี่ยวชาญในการพัฒนา, การผลิตและการขายของเครื่องพิมพ์ใบเสร็จรับเงินและการสแกนบาร์โค้ดอุปกรณ์เชิงพาณิชย์ในหนึ่งในองค์กรที่มีเทคโนโลยีสูง.\\n\\n\\n\\n\\n\\n\\n\";\n SendDataByte(PrinterCommand.POS_Print_Text(msg, THAI, 255, 1, 1, 0));\n SendDataByte(PrinterCommand.POS_Print_Text(data, THAI, 255, 0, 0, 0));\n SendDataByte(PrinterCommand.POS_Set_Cut(1));\n SendDataByte(PrinterCommand.POS_Set_PrtInit());\n }\n }", "public void doPrint()\n {\n PrinterJob printJob = PrinterJob.getPrinterJob();\n \n printJob.setPrintable((Printable) mapComponent);\n if (printJob.printDialog()) {\n try {\n printJob.print();\n } catch (Exception e) {\n ErrorHandler.displayError(\"An error occured during printing:\\n\" + e, ErrorHandler.ERR_PRINT_FAIL);\n }\n }\n }", "public Printable getPrintableComponent();", "public void paste() {\r\n getToolkit().beep();\r\n }", "public void cut(int cutPoint) {\n if (cutPoint > deckOfCards.size()){\n return;\n }\n List<Card> cutList;\n cutList = new ArrayList<Card>(deckOfCards.subList(0,cutPoint));\n deckOfCards.subList(0,cutPoint).clear();\n deckOfCards.addAll(cutList);\n }", "public static void main(String[] args) {\n\t\t final double CM_PER_INCH = 2.54; \n\t\t double paperWidth = 8.5; \n\t\t double paperHeight = 11; \n\t\t System.out.println(\"Paper size in centimeters: \" + \n\t\t paperWidth * CM_PER_INCH + \" by \" + paperHeight * \n\t\t CM_PER_INCH); \n\t}", "private static PrinterPricing createPrinterPricing(Boolean[] bools) {\n\t\t\n\t\t// Init all pricing to 0\n\t\tdouble priceA4B, priceA4C, priceA3B, priceA3C;\n\t\tpriceA4B = 0.0;\n\t\tpriceA4C = 0.0;\n\t\tpriceA3B = 0.0;\n\t\tpriceA3C = 0.0;\n\t\t\n\t\t// Can print A4 Black\n\t\tif(bools[canPrintA4] && bools[canPrintBlack]) {\n\t\t\tpriceA4B = menuHandler.doubleGTInput(\"Please input A4 black per page price (must be > 0.0)\", 0);\n\t\t}\n\t\t\n\t\t// Can print A4 Color\n\t\tif(bools[canPrintA4] && bools[canPrintColor]) {\n\t\t\tpriceA4C = menuHandler.doubleGTInput(\"Please input A4 color per page price (must be > 0.0)\", 0);\n\t\t}\n\t\t\n\t\t// Can print A3 Black\n\t\tif(bools[canPrintA3] && bools[canPrintBlack]) {\n\t\t\tpriceA3B = menuHandler.doubleGTInput(\"Please input A3 black per page price (must be > 0.0)\", 0);\n\t\t}\n\t\t\n\t\t// Can print A3 Color\n\t\tif(bools[canPrintA3] && bools[canPrintColor]) {\n\t\t\tpriceA3C = menuHandler.doubleGTInput(\"Please input A3 color per page price (must be > 0.0)\", 0);\n\t\t}\n\t\t\n\t\treturn objectHandler.createPrinterPricing(priceA4B, priceA4C, priceA3B, priceA3C);\n\t}", "@Override\n\tpublic String exportMyPaper(HttpServletRequest request, HttpServletResponse response) {\n\t\tString line = request.getParameter(\"line\");\n\t\tString zhuzhuangtu = request.getParameter(\"pie\");\n\t\tString bingtu = request.getParameter(\"bar\");\n\t\tString listpb= request.getParameter(\"ids\");\n\t\tString pos= request.getParameter(\"pos\");\n\t\tString neg= request.getParameter(\"neg\");\n\t\tString[] netinfo = listpb.split(\",\");\n\t\tString[] poslist = pos.split(\",\");\n\t\tString[] neglist = neg.split(\",\");\n\t\tString name = request.getParameter(\"name\");\n\t\tString[] url1 = line.split(\",\");\n\t\tString u1 = url1[1];\n\t\tSystem.out.println(u1 + \"u1\");\n\t\tString[] url2 = zhuzhuangtu.split(\",\");\n\t\tString u2 = url2[1];\n\t\tString[] url3 = bingtu.split(\",\");\n\t\tString u3 = url3[1];\n\t\tbyte[] b1 = null;\n\t\ttry {\n\t\t\tb1 = new BASE64Decoder().decodeBuffer(u1);\n\t\t} catch (IOException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tLog.info(e1.getMessage());\n\t\t\tLog.error(e1.getMessage(),e1);\n\t\t}\n\t\tbyte[] b2 = null;\n\t\ttry {\n\t\t\tb2 = new BASE64Decoder().decodeBuffer(u2);\n\t\t} catch (IOException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tLog.info(e1.getMessage());\n\t\t\tLog.error(e1.getMessage(),e1);\n\t\t}\n\t\tbyte[] b3 = null;\n\t\ttry {\n\t\t\tb3 = new BASE64Decoder().decodeBuffer(u3);\n\t\t} catch (IOException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tSystem.out.println(e1.getMessage());\n\t\t\tLog.info(e1.getMessage());\n\t\t\tLog.error(e1.getMessage(),e1);\n\t\t}\n XWPFParagraph paragraph = null; \n XWPFTable table1 = null; \n User user = (User)request.getSession().getAttribute(\"user\");\n \n CustomXWPFDocument doc = new CustomXWPFDocument(); \n \n paragraph = doc.createParagraph();\n XWPFRun run = paragraph.createRun();\n if(name!=null&&!name.equals(\"\")){\n \t run.setText(name+\"的报纸\");\n }else{\n \t run.setText(\"我的报纸\");\n }\n run.setFontFamily(\"楷体\");\n \t\t run.setFontSize(20);\n \t\t run.setColor(\"FF0000\");\n paragraph.setAlignment(ParagraphAlignment.CENTER);\n //今日概况\n paragraph = doc.createParagraph();\n run = paragraph.createRun();\n run.setText(\"今日概况:\");\n run.setFontFamily(\"黑体\");\n \t\t run.setFontSize(14);\n XWPFTable tab = doc.createTable(3, 11);\n setTableWidth(tab, \"8200\");\n\t\t//\ttab.setCellMargins(50, 45, 50, 450);// top, left, bottom, right\n\t\t\ttab.getRow(0).getCell(0).setText(\"媒体类型\");\n\t\t\ttab.getRow(0).getCell(1).setText(\"新闻\");\n\t\t\ttab.getRow(0).getCell(2).setText(\"论坛\");\n\t\t\ttab.getRow(0).getCell(3).setText(\"贴吧\");\n\t\t\ttab.getRow(0).getCell(4).setText(\"微博\");\n\t\t\ttab.getRow(0).getCell(5).setText(\"微信\");\n\t\t\ttab.getRow(0).getCell(6).setText(\"视频\");\n\t\t\ttab.getRow(0).getCell(7).setText(\"博客\");\n\t\t\ttab.getRow(0).getCell(8).setText(\"平媒\");\n\t\t\ttab.getRow(0).getCell(9).setText(\"APP\");\n\t\t\ttab.getRow(0).getCell(10).setText(\"其他\");\n\t\t\ttab.getRow(1).getCell(0).setText(\"正面\");\n\t\t\tfor(int i=0;i<poslist.length;i++){\n\t\t\t\t \n\t\t\t\t\t tab.getRow(1).getCell(i+1).setText(poslist[i]);\n\t\t\t\t \n\t\t\t\t\n\t\t\t}\n\t\t\t/*tab.getRow(0).getCell(0).setText(poslist[0]);\n\t\t\ttab.getRow(0).getCell(1).setText(\"字段二:\");\n\t\t\ttab.getRow(0).getCell(2).setText(\"字段二:\");\n\t\t\ttab.getRow(0).getCell(3).setText(\"字段二:\");\n\t\t\ttab.getRow(0).getCell(4).setText(\"字段二:\");\n\t\t\ttab.getRow(0).getCell(5).setText(\"字段二:\");*/\n\t\t\ttab.getRow(2).getCell(0).setText(\"负面\");\n\t\t\tfor(int i=0;i<neglist.length;i++){\n\t\t\t\t\n\t\t\t\ttab.getRow(2).getCell(i+1).setText(neglist[i]);\n\t\t\t}\n\t\t\t\n\t\t\t/*tab.getRow(1).getCell(1).setText(\"字段四:\");\n\t\t\ttab.getRow(1).getCell(2).setText(\"字段四:\");\n\t\t\ttab.getRow(1).getCell(3).setText(\"字段四:\");\n\t\t\ttab.getRow(1).getCell(4).setText(\"字段四:\");\n\t\t\ttab.getRow(1).getCell(5).setText(\"字段四:\");\n */\n \n \n //全网动态列表\n paragraph = doc.createParagraph();\n run = paragraph.createRun();\n run.setText(\"全网动态:\");\n run.setFontFamily(\"黑体\");\n \t\t run.setFontSize(14);\n \t\t XWPFTable tableOne = doc.createTable(7,4);\n \t\t setTableWidth(tableOne, \"8200\");\n \t\t // tableOne.setCellMargins(50, 45, 50, 1000);\n \t\t XWPFTableRow tableOneRowOne = tableOne.getRow(0);\n \t\t \n \t\t tableOneRowOne.getCell(0).setText(\"文章标题\");\n \t\t \n \t\t tableOneRowOne.getCell(1).setText(\"文章来源\");\n \t\t tableOneRowOne.getCell(2).setText(\"发布时间\");\n \t\t tableOneRowOne.getCell(3).setText(\"是否关注\");\n \t\t \n for(int i=0;i<netinfo.length;i++){\n \t Personmanagemarticle pm = new Personmanagemarticle();\n \t pm = this.selectPersonMInfo(netinfo[i]);\n \t PersonmanagemarticleBo pb = new PersonmanagemarticleBo();\n \t if(pm!=null){\n \t\t BeanUtils.copyProperties(pm, pb);\n \t\t\t\t Date date = pm.getPubdate();\n \t\t\t\t SimpleDateFormat df=new SimpleDateFormat(\"yyyy-MM-dd\");\n \t\t\t\t String d = df.format(date);\n \t\t\t\t Date dat=new Date();\n \t\t\t\t String current = df.format(new Date());\n \t\t\t\t if(d.equals(current)){\n \t\t\t\t\t pb.setUpdatetime(DateFormatUtil.timeString(pm.getPubdate()));\n \t\t\t\t }else{\n \t\t\t\t\t pb.setUpdatetime(d);\n \t\t\t\t }\n \t\t\t\t String attention = \"\";\n \t if(pb!=null){\n \t \t if(pb.getAttention()){\n \t \t attention = \"取消关注\";\n \t }else{\n \t \t attention = \"关注\";\n \t }\n \t \t System.out.println(i);\n \t XWPFTableRow tableOneRow = tableOne.getRow(i+1);\n \t tableOne.getRow(i+1).getCell(0).setText(pb.getTitle());\n \t tableOne.getRow(i+1).getCell(1).setText(pb.getSource());\n \t tableOne.getRow(i+1).getCell(2).setText(pb.getUpdatetime());\n \ttableOne.getRow(i+1).getCell(3).setText(attention);\n \t }\n \t }\n \t\t\t \n }\n paragraph = doc.createParagraph();\n run = paragraph.createRun();\n run.setText(\"趋势分析:\");\n run.setFontFamily(\"黑体\");\n \t\t run.setFontSize(14);\n //\n paragraph = doc.createParagraph(); \n try {\n\t\t\tdoc.addPictureData(b3,XWPFDocument.PICTURE_TYPE_PNG);\n\t\t } catch (InvalidFormatException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tSystem.out.println(e.getMessage());\n\t\t\tLog.error(e.getMessage(),e);\n\t\t }\n doc.createPicture(paragraph,doc.getAllPictures().size()-1, 650,230,\"\");\n //table表格\n \n paragraph = doc.createParagraph();\n run = paragraph.createRun();\n run.setText(\"媒体top:\");\n run.setFontFamily(\"黑体\");\n \t\t run.setFontSize(14);\n \t\t \n \t paragraph = doc.createParagraph();\n paragraph = doc.createParagraph();\n try {\n\t\t\t doc.addPictureData(b2,XWPFDocument.PICTURE_TYPE_PNG);\n\t\t } catch (InvalidFormatException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\t//System.out.println(e.getMessage());\n\t\t\tLog.info(e.getMessage());\n\t\t\tLog.error(e.getMessage(),e);\n\t\t }\n doc.createPicture(paragraph,doc.getAllPictures().size()-1, 650,300,\"\");\n paragraph = doc.createParagraph();\n run = paragraph.createRun();\n run.setText(\"媒体分布:\");\n run.setFontFamily(\"黑体\");\n \t\t run.setFontSize(14);\n paragraph = doc.createParagraph();\n try {\n\t\t\tdoc.addPictureData(b1,XWPFDocument.PICTURE_TYPE_PNG);\n\t\t } catch (InvalidFormatException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\t\tLog.error(e.getMessage(),e);\n\t\t\tSystem.out.println(e.getMessage());\n\t\t }\n doc.createPicture(paragraph,doc.getAllPictures().size()-1, 650,300,\"\");\n String filename1 = new SimpleDateFormat(\"yyyyMMddhhmmss\").format(new Date()) + \".docx\";\n \t\t String url = request.getContextPath() + \"/upload/\";\n \t\t System.out.println(url);\n \t\t String path = request.getSession().getServletContext().getRealPath(\"/upload\");\n \t\t File targetFile = new File(path, filename1);\n \t\t if (!targetFile.getParentFile().exists()) {\n \t\t\ttargetFile.getParentFile().mkdirs();\n \t\t }\n \t\t if (!targetFile.exists()) {\n \t\t\ttry {\n\t\t\t\ttargetFile.createNewFile();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t\tLog.error(e.getMessage(),e);\n\t\t\t}\n \t\t }\n \t\t String filename = path + \"/\" + filename1;\n \t\t OutputStream os = null;\n\t\ttry {\n\t\t\tos = new FileOutputStream(filename);\n\t \n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\n\t\t\t//System.out.println(e.getMessage());\n\t\t\tLog.info(e.getMessage());\n\t\t\tLog.error(e.getMessage(),e);\n\t\t} \n\t\ttry {\n\t\t\tdoc.write(os);\n\t\t\tif(null!=os){\n\t\t\t\tos.flush();\n\t\t os.close();\n\t\t\t}\n\t\t\t\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\t//System.out.println(e.getMessage());\n\t\t\tLog.info(e.getMessage());\n\t\t\tLog.error(e.getMessage(),e);\n\t\t}\n \t\t System.out.println(filename);\n String addurl = \"upload/\" + filename1;\n\t\treturn addurl;\n\t}", "public PosPrinter(String sDevicePrinterName, String sDeviceDrawerName) {\r\n\t\tm_sName = sDevicePrinterName;\r\n\r\n\t\tm_printer = new POSPrinter();\r\n\t\t//\r\n\t\ttry {\r\n\t\t\tm_printer.open(sDevicePrinterName);\r\n\t\t\tm_printer.claim(10000);\r\n\t\t\tm_printer.setDeviceEnabled(true);\r\n\t\t\tm_printer.setMapMode(POSPrinterConst.PTR_MM_METRIC); // unit = 1/100 mm - i.e. 1 cm = 10 mm = 10 * 100 units\r\n\r\n\t\t\t\r\n\t\t} catch (JposException e) {\r\n\t\t\tthrow new RuntimeException(e.getMessage(), e);\r\n\t\t}\r\n\t\t\r\n\t\ttry {\r\n\t\t\tm_drawer = new CashDrawer();\r\n\t\t\tm_drawer.open(sDevicePrinterName);\r\n\t\t\tm_drawer.claim(10000);\r\n\t\t\tm_drawer.setDeviceEnabled(true);\r\n\t\t} catch (Exception x) {\r\n\t\t\tx.printStackTrace();\r\n\t\t}\r\n\t}", "private void printScreen()\n {\n try\n {\n Graphics g = getGraphics();\n if(drawingArea != null && g != null)\n {\n g.drawImage(drawingArea, 0, 0, null);\n }\n\n // Sync the display on some systems.\n // (on Linux, this fixes event queue problems)\n Toolkit.getDefaultToolkit().sync();\n g.dispose();\n }\n catch(Exception ex)\n {\n System.out.println(\"Graphics error: \" + ex);\n }\n }", "public void setPC(PDAction pc) {\n/* 296 */ this.actions.setItem(\"PC\", (COSObjectable)pc);\n/* */ }" ]
[ "0.6069809", "0.57537246", "0.55847836", "0.5534149", "0.55203426", "0.53887445", "0.53701776", "0.5328333", "0.53125614", "0.53038716", "0.52654874", "0.52584183", "0.5209022", "0.52029324", "0.52017313", "0.5181307", "0.51407963", "0.5134763", "0.511072", "0.50970143", "0.50931084", "0.50822574", "0.5046751", "0.5040544", "0.5010294", "0.49893484", "0.49886647", "0.4986203", "0.4972054", "0.49719507", "0.49715212", "0.4968911", "0.49552912", "0.49531695", "0.49436554", "0.4924114", "0.49120885", "0.48997363", "0.4897656", "0.48973677", "0.4895368", "0.48922127", "0.48739782", "0.48734543", "0.4870683", "0.4870376", "0.4850361", "0.4850361", "0.48410758", "0.48407322", "0.4835057", "0.48249155", "0.48229194", "0.4821871", "0.48175097", "0.47975412", "0.47921324", "0.47883347", "0.4782848", "0.4778632", "0.477834", "0.477762", "0.477337", "0.47663638", "0.47598445", "0.47475132", "0.4741816", "0.47408572", "0.4721844", "0.47007412", "0.4695215", "0.4692535", "0.4690236", "0.46843252", "0.46835274", "0.4678418", "0.46768662", "0.4665313", "0.4656443", "0.4654028", "0.46526334", "0.46408594", "0.46218795", "0.46166876", "0.46135378", "0.46027198", "0.46022424", "0.4602178", "0.46003523", "0.4597695", "0.45951462", "0.4594546", "0.45939332", "0.45920476", "0.45919526", "0.45910415", "0.45907417", "0.45862043", "0.45851323", "0.45832172" ]
0.52035785
13
at the end, close writer and socketOut
public void closeConn() { try { if (writer != null) { writer.close(); } if (sockoutOs != null) { sockoutOs.close(); } if (null != socket || !socket.isClosed()) { socket.close(); } } catch (IOException ex) { ex.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void close()\r\n {\r\n try \r\n {\r\n if(out != null) out.close();\r\n }\r\n catch(Exception e) {\r\n \r\n }\r\n try \r\n {\r\n if(in != null) in.close();\r\n }\r\n\r\n catch(Exception e) {\r\n \r\n };\r\n try \r\n {\r\n if(socket != null) socket.close();\r\n }\r\n catch (Exception e) {\r\n \r\n }\r\n }", "public void close() {\n try { out.flush(); } catch (Exception e) {}; // just to be sure\n \n cleanup();\n }", "public void close(){\r\n\t\tif(managedOutputSocket != null) managedOutputSocket.close();\r\n\t\tmanagedOutputSocket = null;\r\n\t\tsuper.close();\r\n\t}", "protected void close()\n {\n out.close();\n }", "public synchronized void closeAllSocket()\n {\n \ttry {\n \t\toutput.close();\n \t}\n \tcatch(Exception e)\n \t{\n \t\terror(e);\n \t}\t\n }", "private void openOutputStream() throws IOException {\n writer=new PrintWriter(this.sock.getOutputStream());\n }", "public void close(){\n\t\tlog.debug(\"[SC] Close called\", 5);\n\t\tif(socket!=null){\n\t\t\tlog.debug(\"[SC] Closing socket\", 4);\n\t\t\ttry {\n\t\t\t\tThread.sleep(10);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t//Silly impatient thread\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tout.close();\n\t\t\t\tin.close();\n\t\t\t\tsocket.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\t//we're going to close it anyway\n\t\t\t}\n\t\t\tsocket = null;\n\t\t\trun = false;\n\t\t}\n\t}", "public void close() {\n try {\n socket.close();\n outputStream.close();\n inputStream.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "@Override\n public void close() throws IOException {\n inputMessageStream.close();\n outputMessageStream.close();\n socket.close();\n }", "private void close(){\n try {\n socket.close();\n objOut.close();\n line.close();\n audioInputStream.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void close() {\n\t\tif (socketChannel != null) {\n\t\t\ttry {\n\t\t\t\tif (in != null) {\n\t\t\t\t\tin.close();\n\t\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t\tlog.log(Level.SEVERE, \"Close in stream \", e);\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tif (out != null) {\n\t\t\t\t\tout.close();\n\t\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t\tlog.log(Level.SEVERE, \"Close out stream \", e);\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tsocketChannel.close();\n\t\t\t} catch (IOException ex) {\n\t\t\t\tlog.log(Level.SEVERE, \"Can't close socket channel\", ex);\n\t\t\t}\n\n\t\t}\n\t\t//Defender.stopConnection();\n\t}", "private void close()\n {\n try\n {\n if (outputStream != null)\n {\n outputStream.close();\n }\n } catch (Exception e)\n {\n\n }\n try\n {\n if (inputStream != null)\n {\n inputStream.close();\n }\n } catch (Exception e)\n {\n\n }\n try\n {\n if (socket != null)\n {\n socket.close();\n }\n } catch (Exception e)\n {\n\n }\n }", "@Override\n\t\tpublic void close() throws IOException {\n\t\t\tout.close();\n\t\t}", "private void close() {\n\t\ttry {\n\t\t\tsendCommand(\"end\\n\");\n\t\t\tout.close();\n\t\t\tin.close();\n\t\t\tsocket.close();\n\t\t} catch (MossException e) {\n\t\t} catch (IOException e2) {\n\t\t} finally {\n\t\t\tcurrentStage = Stage.DISCONNECTED;\n\t\t}\n\n\t}", "@Override\r\n\tpublic void close() {\r\n\t\tthis.socket.close();\r\n\t}", "void closeSocket() {\n try {\n if (outputStream != null && clientSocket != null) {\n outputStream.close();\n clientSocket.close();\n }\n } catch (IOException e) {\n getLog().error(\"Error while closing TCP client socket connection\", e);\n }\n }", "@Override\n public void close() {\n try {\n out.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void close() throws IOException\n {\n _out.close();\n }", "public void closeConnection() {\n try {\n stdIn.close();\n socketIn.close();\n socketOut.close();\n }\n catch(IOException e) {\n e.printStackTrace();\n }\n }", "private void closeConnection(Socket socket) throws IOException {\n reader.close();\n dataWriter.close();\n socket.close();\n }", "public synchronized void close() throws IOException {\n\t\t\tfinish();\n\t\t\tout.close();\n\t\t}", "public synchronized void close(){\n if(connected){\n try{\n socket.close();\n streamIn.close();\n streamOut.close();\n System.out.println(clientID+\": close: socket\"); \n }catch(IOException ioe){\n System.out.println(clientID+\": close: IOException:\"+ioe);\n }\n }else if(isHost){\n try{\n hostSocket.close();\n System.out.println(clientID+\": close: hostSocket\"); \n }catch(IOException ioe){\n System.out.println(clientID+\": close: IOException:\"+ioe);\n }\n }\n }", "private void cerrarRecibir() {\n \t try {\r\n \t \tout.flush(); \r\n \t in.close();\r\n \t out.close(); \r\n \t }catch(Exception e) {}\r\n\t}", "public void closeSocket() { //gracefully close the socket connection\n\t\ttry {\n\t\t\tthis.os.close();\n\t\t\tthis.is.close();\n\t\t\tthis.clientSocket.close();\n\t\t} \n\t\tcatch (Exception e) {\n\t\t\tSystem.out.println(\"XX. \" + e.getStackTrace());\n\t\t}\n\t}", "@Override\r\n public void close() {\r\n sock.close();\r\n }", "private void close() {\r\n try {\r\n if (m_in != null) {\r\n m_in.close();\r\n }\r\n if (m_out != null) {\r\n m_out.close();\r\n }\r\n if (m_socket != null) {\r\n m_socket.close();\r\n }\r\n } catch (IOException e) {\r\n throw new WrappedRuntimeException(e);\r\n }\r\n }", "public void closeSocket() { //gracefully close the socket connection\r\n try {\r\n this.os.close();\r\n this.is.close();\r\n this.clientSocket.close();\r\n } \r\n catch (Exception e) {\r\n System.out.println(\"XX. \" + e.getStackTrace());\r\n }\r\n }", "public void close() {\n\t\ttry {\n\t\t\t_inputStream.close();\n\t\t\t_outputStream.close();\n\t\t\t_socket.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public void close() throws IOException {\n\t\tout.flush();\n\t\tout.close();\n\t}", "@Override\n\t public synchronized void close() throws IOException {\n\t\tout.close();\n\t\topen = false;\n\t }", "public void close() {\n try {\n inputStream.close();\n } catch(IOException e) {\n GenericIO.writelnString(Thread.currentThread().getName()\n + \" - could not close the socket's input stream!\");\n e.printStackTrace();\n System.exit(1);\n }\n\n try {\n outputStream.close();\n } catch(IOException e) {\n GenericIO.writelnString(Thread.currentThread().getName()\n + \" - could not close the socket's output stream!\");\n e.printStackTrace();\n System.exit(1);\n }\n\n try {\n commSocket.close();\n } catch(IOException e) {\n GenericIO.writelnString(Thread.currentThread().getName()\n + \" - could not close the communication socket!\");\n e.printStackTrace();\n System.exit(1);\n }\n }", "private void closeStreams() {\n try {\n windowForCommunication.append(\"Closing connection now.\" + \"\\n\");\n sendMessageToClient(\"ENDING CHAT: Closing connection now\");\n input.close();\n output.close();\n serverSocket.close();\n }\n catch(IOException e) {\n System.out.println(e);\n windowForCommunication.append(\"Uh oh. Seems like there was a communication error....!\");\n }\n }", "@Override\n public void close() throws IOException {\n opened = false;\n if (socket != null) {\n Utils.closeSilent(dis);\n Utils.closeSilent(dos);\n socket.close();\n }\n }", "@Override\n public void close(){\n outObject = \"close-\";\n try {\n out.writeObject(outObject);\n } catch (IOException ex) {\n }\n }", "public void close() {\n if (this.out == null) {\n return;\n }\n try {\n this.out.flush();\n this.out.close();\n this.out = null;\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void close() throws IOException {\n\t\tistream.close();\n\t\tostream.close();\n\t\tsocket.close();\n\t}", "public void dispose() {\n\t\tsocket.close();\n\t}", "@Override\n public void close() throws IOException {\n if (socket != null) {\n socket.close();\n }\n\n }", "public void close() throws Exception{\r\n\tout.close();\r\n}", "public void close() {\n try {\n socket.close();\n } catch (IOException e) {\n renderablePublisher.submit(new ServerOfflineUpdate());\n }\n }", "void closeSocket() {\n\t\tint size = threads.size();\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tif (threads.get(i) == this) {\n\t\t\t\tthreads.remove(i);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\n\t\tprintActiveClients();\n\n\t\ttry {\n\t\t\tmessageBuffer.add(name + \" has just left the chatroom...\");\n\t\t\tinputStream.close();\n\t\t\toutputStream.close();\n\t\t\tclientSocket.close();\n\t\t\treturn;\n\t\t} catch (IOException ioe) {\n\t\t\tioe.printStackTrace();\n\t\t} catch (InterruptedException ine) {\n\t\t\treturn;\n\t\t}\n\t}", "protected void cleanExit() throws IOException, InterruptedException {\n if (!socket.isClosed()) {\n serverInput.close();\n clientOutput.close();\n socket.close();\n if (pingThread.isAlive())\n pingThread.join();\n } else {\n view.showError(\"Match terminated due to server disconnection\");\n }\n }", "void close() {\n try {\n socketInput.close();\n socketOutput.close();\n this.connected = false;\n } catch (IOException e) {\n throw new UnexpectedBehaviourException();\n }\n }", "@Override\n public void close() throws IOException\n {\n if(socket != null)\n {\n socket.close();\n }\n }", "public void close() {\n this.consoleListenerAndSender.shutdownNow();\n this.serverListenerAndConsoleWriter.shutdownNow();\n try {\n this.getter.close();\n this.sender.close();\n this.socket.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void close() {\n try {\n out.close();\n } catch (java.io.IOException ioe) {\n }\n ;\n }", "public void close() {\n try {\n closeConnection(socket);\n } catch (IOException ioe) {\n ioe.printStackTrace();\n }\n }", "private void closeFedSockets() {\r\n try {\r\n cSocket.close();\r\n } catch (Exception e) {\r\n if (!FLAG) {\r\n System.err.println(\"Error closing Client Socket\");\r\n }\r\n FedLog.writeLog(this.getPeerIP().split(\":\")[1], \"masterLog%g-\" + this.getPeerIP().substring(2) + \".log\", FedLog.getExceptionStack(e), \"severe\");\r\n }\r\n try {\r\n sSocket.close();\r\n } catch (Exception e) {\r\n if (!FLAG) {\r\n System.err.println(\"Error closing Server Socket\");\r\n }\r\n FedLog.writeLog(this.getPeerIP().split(\":\")[1], \"masterLog%g-\" + this.getPeerIP().substring(2) + \".log\", FedLog.getExceptionStack(e), \"severe\");\r\n }\r\n }", "protected void cleanup() {\n try {\n if (_in != null) {\n _in.close();\n _in = null;\n }\n if (_out != null) {\n _out.close();\n _out = null;\n }\n if (_socket != null) {\n _socket.close();\n _socket = null;\n }\n } catch (java.io.IOException e) {\n }\n }", "public static void end()\n {\n if(out!=null) {\n out.println(\"close \" + name);\n out.flush();\n }\n }", "@Override\n public void closeConnection() {\n\n System.out.println(\"[CLIENT] Closing socket connection...\");\n try {\n socket.close();\n in.close();\n out.close();\n System.out.println(\"[CLIENT] Closed socket connection.\");\n } catch (IOException e) {\n System.out.println(\"[CLIENT] Error occurred when closing socket\");\n }\n System.exit(0);\n\n }", "private void fermerConnexion() throws IOException {\n this.reader.close();\n this.serverSocket.close();\n this.coTerminee = true ;\n }", "public void closeSocket()\n\t{\n\t\ttry\n\t\t{\n\t\t\tfor (CharData chs : replyList)\n\t\t\t{\n\t\t\t\tchs.conn.replyList.remove(ch);\n\t\t\t\tchs.sendln(\"Your reply list has changed.\");\n\t\t\t}\n\t\t\t\n\t\t\tif (saveable)\n\t\t\t{\n\t\t\t\tif (realCh != null)\n\t\t\t\t\tStaffCommands.doReturn(this, \"\");\n\t\t\t\t\n\t\t\t\tch.save();\n\t\t\t\tDatabase.saveAccount(this);\n\t\t\t}\n\t\t\t\n\t\t\tconnSocket.close();\n\t\t} catch (Exception e) {\n\t\t\tsysLog(\"bugs\", \"Error in closeSocket: \"+e.getMessage());\n\t\t\tlogException(e);\n\t\t}\n\t}", "public void close()\n {\n \tSystem.out.println(\"close\");\n \tsend(\"<message> <disconnect/></message>\");\n \ttry {\n\t\t\tsocket.close();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n }", "public void shutdown() {\n try {\n this.writer.close();\n } catch (IOException e) {\n log.warn(i18n.getString(\"problemCloseOutput\", e), e);\n }\n }", "public void quit()throws IOException {\n if(s.isConnected()) {\n reader.close();\n writer.close();\n s.close();\n System.out.println(\"Disconnected from the server.\");\n }\n }", "public void close() {\n try {\n socket.close();\n sInput.close();\n sOutput.close();\n sInput = null;\n socket = null;\n } catch (IOException e) {\n System.out.println(\"Logged Out.\");\n }\n }", "public void close() {\n\t\tmainSocket.close();\n\t}", "public void exit() {\r\n\t\tsendReceiveSocket.close();\r\n\t}", "public void close() throws IOException {\n\t\ttry {\n\t\t\tprinter.close();\n\t\t\treader.close();\n\t\t\tclientSocket.close();\n\t\t} catch (IOException e) {\n\t\t\tthrow new SocketException(\"Something went wrong when closing the command channel : \" + e.getMessage());\n\t\t}\n\n\t}", "private void sendSocket()\n {\n InputStreamReader reader = null;\n BufferedReader bufferreader = null;\n Socket socket = null;\n try{\n socket = new Socket(address, port);\n OutputStream outputstream = socket.getOutputStream();\n DataOutputStream dataOutputStream = new DataOutputStream(outputstream);\n OutputStreamWriter outputStreamWriter = new OutputStreamWriter(dataOutputStream);\n String tem_msg = \"\";\n if(SEND_FILE==0)\n {\n tem_msg = original_name;\n }\n tem_msg = tem_msg+msg;\n// outputstream.write(msg.getBytes());\n// outputstream.flush();\n //dataOutputStream.writeUTF(msg);\n //dataOutputStream.flush();\n outputStreamWriter.write(tem_msg);\n outputStreamWriter.flush();\n //DataInputStream dataInputStream = new DataInputStream(socket.getInputStream());\n //InputStreamReader inputStreamReader = new InputStreamReader(dataInputStream);\n //dataOutputStream.close();\n socket.shutdownOutput();\n\n InputStream inputstream = socket.getInputStream();\n reader = new InputStreamReader(inputstream);\n bufferreader = new BufferedReader(reader);\n String tem = null;\n final StringBuffer stringb = new StringBuffer();\n while((tem=bufferreader.readLine())!=null){\n stringb.append(tem);\n }\n sendMsg(msg_what, stringb.toString());\n dataOutputStream.flush();\n dataOutputStream.close();\n socket.close();\n inputstream.close();\n }catch(UnknownHostException e){\n e.printStackTrace();\n }catch(IOException e){\n e.printStackTrace();\n }finally {\n try{\n if(bufferreader!=null)\n bufferreader.close();\n }catch(IOException ex){\n ex.printStackTrace();\n }\n }\n }", "protected void close() {\n\t\tthis.writer.stop();\n\t\tsynchronized (this.writer.writer) {\n\t\t\twhile (!this.writer.isFinished()) {\n\t\t\t\ttry {\n\t\t\t\t\tthis.writer.writer.wait();\n\t\t\t\t}\n\t\t\t\tcatch (InterruptedException e) {\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\ttry {\n\t\t\tthis.btc.close();\n\t\t}\n\t\tcatch (IOException e) {\n\t\t}\n\n\t\tthis.closed = true;\n\t}", "private void close() {\n // try to close the connection\n try {\n if (sOutput != null)\n sOutput.close();\n } catch(Exception e) {\n //handle exception\n }\n try {\n if (sInput != null)\n sInput.close();\n } catch(Exception e) {\n //handle exception\n }\n try {\n if (socket != null)\n socket.close();\n } catch (Exception e) {\n //handle exception\n }\n //save the chatlist array\n chatSave();\n }", "public void stopConnection() throws IOException {\n in.close();\n out.close();\n clientSocket.close();\n }", "protected final void doShutdownOutput() throws Exception {\n/* 556 */ this.socket.shutdown(false, true);\n/* */ }", "public static void endWrite()\r\n\t{\r\n\t\r\n\t}", "public void disconnect() {\n\t\tif (sock != null) {\n\t\t\ttry {\n\t\t\t\tsock.close();\n\t\t\t} catch (IOException ioe) {\n\t\t\t} finally {\n\t\t\t\tsock = null;\n\t\t\t}\n\t\t}\n\t\toutStream.reset();\n\t\tdisconnected();\n\t}", "private void disconnect() {\n\n if (inStream != null) {\n try {inStream.close();} catch (Exception e) { e.printStackTrace(); }\n }\n\n if (outStream != null) {\n try {outStream.close();} catch (Exception e) { e.printStackTrace(); }\n }\n\n if (socket != null) {\n try {socket.close();} catch (Exception e) { e.printStackTrace(); }\n }\n }", "public void close() throws IOException {\n if (sink != null) {\n sink.receivedLast();\n }\n }", "private void closeConnection() {\r\n try {\r\n socket.close();\r\n } catch (IOException ex) {\r\n // Ex on close\r\n }\r\n }", "public void close(){\r\n\t\ttry {\r\n\t\t\tif(mServerSocket != null) mServerSocket.close();\r\n\t\t\tif(clientSocket != null) clientSocket.close();\r\n\t\t} catch (IOException e) { e.printStackTrace(); }\r\n\t}", "private void closeConnection() throws IOException {\n\t\tclientSocket.close();\n\t}", "private void closeServer() {\r\n\t\tMisc.log(\"Server will now close.\");\r\n\t\t//close the socket and server when done\r\n\t\ttry {\r\n\t\t\tserver.close();\r\n\t\t\tsocket.close();\r\n\t\t\tin.close();\r\n\t\t\tout.close();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "protected void finish() {\n writerServerTimingHeader();\n\n try {\n\n // maybe nobody ever call getOutputStream() or getWriter()\n if (bufferedOutputStream != null) {\n\n // make sure the writer flushes everything to the underlying output stream\n if (bufferedWriter != null) {\n bufferedWriter.flush();\n }\n\n // send the buffered response to the client\n bufferedOutputStream.writeBufferTo(getResponse().getOutputStream());\n\n }\n\n } catch (IOException e) {\n throw new IllegalStateException(\"Could not flush response buffer\", e);\n }\n\n }", "protected void onEndOfStream()\n {\n synchronized (f_aBuffSingleInbound)\n {\n synchronized (f_aBuffSingleOutbound)\n {\n if (f_engine.getSession().isValid())\n {\n try\n {\n f_engine.closeInbound();\n closeOutbound(false);\n }\n catch (SSLException e)\n {\n // mimicking SSLSocket\n }\n catch (IOException ignored)\n {\n // won't occur\n }\n }\n }\n }\n }", "@Override\n public void close() throws IOException {\n if (clientSocket != null) {\n clientSocket.close();\n }\n }", "@Override\n\tpublic void close() throws IOException\n\t{\n\t\tthis.decoratee.close();\n\t\tregisterSocketIsClosing(this);\n\t}", "public void closeSocket() {\n\t\t\ttry {\n\t\t\t\tsocket.close();\n\t\t\t} catch (java.io.IOException e) {\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t}\n\t\t}", "@Override\n\t\t\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t\t\tcancelsent=0;\n\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\tLog.e(\"About to get out\",\"before sending kickmeout\");\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(dos!=null)\n\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\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(ispeak==1)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{ispeak=0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdos.writeUTF(\"kick_me_out_speaking\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLog.e(\"Kick me\",\"KICKED SPEAKING\");\n\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\n\t\t\t\t\t\t\t\t\t\t\t\t\t\telse\n\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\tdos.writeUTF(\"kick_me_out_waiting\");\n\t\t\t\t\t\t\t\t\t\t\t\t\tdos.writeUTF(TestConnection.macid);\n\t\t\t\t\t\t\t\t\t\t\t\t\tLog.e(\"Kick me\",\"KICKED WAITING\");\n\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\n\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\tcancelsent=1;\n\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\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\t\trecSocket.close();\n\t\t\t\t\t\t\t\t\t\t\t\t\tLog.e(\"closing\", \"socket closed\");\n\t\t\t\t\t\t\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\t\t\t\t\te.printStackTrace();\n\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\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t}", "public void closeAll() throws IOException {\r\n\t\ttry {\r\n\t\t\t// Close the socket\r\n\t\t\tif (this.clientSocket != null)\r\n\t\t\t\tthis.clientSocket.close();\r\n\t\t\t// Close the output stream\r\n\t\t\tif (this.out != null)\r\n\t\t\t\tthis.out.close();\r\n\t\t\t// Close the input stream\r\n\t\t\tif (this.in != null)\r\n\t\t\t\tthis.in.close();\r\n\t\t} finally {\r\n\t\t\t// Set the streams and the sockets to NULL no matter what.\r\n\t\t\tthis.in = null;\r\n\t\t\tthis.in = null;\r\n\t\t\tthis.clientSocket = null;\r\n\t\t\t\r\n\t\t}\r\n\t}", "public void close() {\r\n\t\tif (socket != null)\r\n\t\t\tsocket.close();\r\n\t}", "private void closeStreams() {\n try {\n System.out.println(\"Closing streams and terminating thread.\");\n running = false;\n outputStream.close();\n inputStream.close();\n clientSocket.close();\n } catch (IOException e) {\n System.err.println(e.getMessage());\n }\n }", "protected HttpRequest closeOutput() throws IOException {\n block6: {\n if (this.output == null) {\n return this;\n }\n if (this.multipart) {\n this.output.write(\"\\r\\n--00content0boundary00--\\r\\n\");\n }\n if (this.ignoreCloseExceptions) {\n this.output.close();\n ** GOTO lbl13\n } else {\n this.output.close();\n }\n break block6;\n catch (IOException var1_1) {}\n }\n this.output = null;\n return this;\n }", "@Override\n\tpublic void shutdown() {\n\t\tif (messageOpen) {\n\t\t\tDataOutputBlobWriter.closeLowLevelField(Pipe.outputStream(output)); \n\t\t\tPipe.confirmLowLevelWrite(output, Pipe.sizeOf(output, RawDataSchema.MSG_CHUNKEDSTREAM_1));\n\t\t\tPipe.publishWrites(output);\t\n\t\t\tmessageOpen=false;\n\t\t}\n\t}", "private void closeOutput() throws Exception \n { Close the fifo file...\n //\n data.fifoStream.close();\n data.fifoStream=null;\n \n // wait for the INSERT statement to finish and check for any\n // error and/or warning...\n // \n data.sqlRunner.join();\n SqlRunner sqlRunner = data.sqlRunner;\n data.sqlRunner = null;\n sqlRunner.checkExcn();\n \n //wait for UNIX/Linux Process to be finished\n data.sqlProcess.waitFor();\n \n data.sqlOutputStream.close();\n data.sqlOutputStream=null;\n }", "@Override\n public void close() throws IOException {\n flush();\n }", "private void closeDataConnection() {\n try {\n dataOutWriter.close();\n dataConnection.close();\n if (dataSocket != null) {\n dataSocket.close();\n }\n\n debugOutput(\"Data connection was closed\");\n } catch (IOException e) {\n debugOutput(\"Could not close data connection\");\n e.printStackTrace();\n }\n dataOutWriter = null;\n dataConnection = null;\n dataSocket = null;\n }", "public void close() throws IOException {\n /*\n * Set m_iport to 0, in order to quit out of the while loop\n * in the receiver thread.\n */\n\tint save_iport = m_iport;\n\n\tm_iport = 0;\n\n synchronized (closeLock) {\n if (open) {\n /*\n * Reset open flag early to prevent receive0 executed by\n * concurrent thread to operate on partially closed\n * connection\n */\n open = false;\n\n close0(save_iport, connHandle, 1);\n\n setMessageListener(null);\n\n /*\n * Reset handle and other params to default\n * values. Multiple calls to close() are allowed\n * by the spec and the resetting would prevent any\n * strange behaviour.\n */\n connHandle = 0;\n host = null;\n m_mode = 0;\n\n /*\n * Remove this connection from the list of open\n * connections.\n */\n int len = openconnections.size();\n for (int i = 0; i < len; i++) {\n if (openconnections.elementAt(i) == this) {\n openconnections.removeElementAt(i);\n break;\n }\n }\n\n open_count--;\n }\n }\n }", "public void close()\n {\n try\n {\n System.out.println(\"CLIENT chiude connessione\");\n receiverThread.interrupt();\n socket.close();\n System.exit(0);\n }\n catch (IOException e)\n {\n System.out.println(e.getMessage());\n System.exit(1);\n }\n }", "private void shutdown() {\n clientTUI.showMessage(\"Closing the connection...\");\n try {\n in.close();\n out.close();\n serverSock.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void closeConnection(){\n\n try {\n fromClient.close();\n socket.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "@Override\r\n\tpublic void disconnect() throws Exception\r\n\t\t{\r\n\t\treader.close();\r\n\t\toutputStream.close();\r\n\t\tport.close();\r\n\t\t}", "protected void shutdownOutput() throws IOException\n {\n if (fd == null) {\n throw new IOException(\"socket not created\");\n }\n\n try {\n Os.shutdown(fd, OsConstants.SHUT_WR);\n } catch (ErrnoException e) {\n throw e.rethrowAsIOException();\n }\n }", "@Override\n\tpublic void onTerminating() {\n\t\tWriterUtil.flushBuffer(this.registryBuffer, this.socketChannel, LOGGER);\n\t\tWriterUtil.flushBuffer(this.buffer, this.socketChannel, LOGGER);\n\t\tWriterUtil.close(this.socketChannel, LOGGER);\n\t}", "@Override\n public void disconnect() {\n if(!isConnected)\n return;\n\n if(out!=null)\n out.close();\n\n if(in!=null) {\n try {\n in.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }", "final private void closeAll() throws IOException {\n // This method is final since version 2.2\n\n try {\n // Close the socket\n if (clientSocket != null)\n clientSocket.close();\n\n // Close the output stream\n if (output != null)\n output.close();\n\n // Close the input stream\n if (input != null)\n input.close();\n } finally {\n // Set the streams and the sockets to NULL no matter what\n // Doing so allows, but does not require, any finalizers\n // of these objects to reclaim system resources if and\n // when they are garbage collected.\n output = null;\n input = null;\n clientSocket = null;\n }\n }", "private void closeEverything() {\n\t \t// free up I/O streams and close the socket connection\n \ttry {\n \tif (in != null)\n \t\tin.close();\n \t} catch (Exception ignored) {}\n \ttry {\n \tif (out != null)\n \t\tout.close();\n \t} catch (Exception ignored) {}\n \ttry {\n \tif (out != null)\n \t\tout.close();\n \t} catch (Exception ignored) {}\n \ttry {\n \tif (in != null)\n \t\tin.close();\n \t} catch (Exception ignored) {}\n \ttry {\n \t\tif (inToRobot != null){\n \t\t\tinToRobot.close();\n \t\t}\n \t} catch (Exception ignored) {}\n \ttry {\n \t\tif (outFromRobot != null){\n \t\t\toutFromRobot.close();\n \t\t}\n \t} catch (Exception ignored) {}\n\t}", "public void close() {\n // close socket\n if (socket != null) {\n try {\n socket.close();\n } catch (IOException e) {\n // ignore\n }\n }\n\n socket = null;\n in = null;\n out = null;\n\n // try to stop dispather\n if (dispatcher != null) {\n dispatcher.setStopped(true);\n dispatcher.interrupt();\n }\n\n // notify all blocked thread\n if (requests != null) {\n for (Element element : requests.values()) {\n if (element.lock != null) {\n synchronized (element.lock) {\n element.lock.notify();\n }\n } else {\n // TODO notify persistent search listeners\n }\n }\n requests.clear();\n requests = null;\n }\n\n }", "private void closeConnection() {\n\t\t\tSystem.out.println(\"\\nTerminating connection \" + myConID + \"\\n\");\n\t\t\ttry {\n\t\t\t\toutput.close(); // close output stream\n\t\t\t\tinput.close(); // close input stream\n\t\t\t\tconnection.close(); // close socket\n\t\t\t} catch (IOException ioException) {\n\t\t\t\tSystem.out.println(\"Exception occured in closing connection\"\n\t\t\t\t\t\t+ ioException);\n\t\t\t}\n\t\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\tsocket.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}" ]
[ "0.74685514", "0.7221587", "0.71903354", "0.7079193", "0.7064592", "0.7058516", "0.70250016", "0.6974198", "0.6924602", "0.692389", "0.69076157", "0.68639934", "0.68511933", "0.6838696", "0.6799166", "0.67527", "0.67408943", "0.67380893", "0.6679048", "0.6668306", "0.6632215", "0.6617849", "0.66150856", "0.6603844", "0.6593819", "0.6585888", "0.65808177", "0.6557464", "0.6549316", "0.65474826", "0.65403116", "0.6534754", "0.65158623", "0.651414", "0.6512393", "0.65039927", "0.6482334", "0.6468797", "0.64616936", "0.6448267", "0.6437826", "0.64287984", "0.6413958", "0.6400949", "0.64009184", "0.6394769", "0.63833404", "0.6372878", "0.63726497", "0.6351052", "0.6347765", "0.6343215", "0.63061315", "0.6305839", "0.62981844", "0.62942344", "0.6289377", "0.628611", "0.6270778", "0.62679464", "0.62628275", "0.62600857", "0.6250522", "0.62455744", "0.62297297", "0.62241095", "0.62080765", "0.6206255", "0.6204754", "0.6200058", "0.61923933", "0.61892706", "0.6180114", "0.61744034", "0.61732745", "0.61670065", "0.61165476", "0.6104553", "0.6104474", "0.61036897", "0.61014163", "0.6095041", "0.60927117", "0.60873485", "0.6085599", "0.6082023", "0.6076425", "0.6070525", "0.60675436", "0.6067279", "0.60628676", "0.605277", "0.6048393", "0.6045423", "0.60331935", "0.60310864", "0.6029858", "0.6024711", "0.602031", "0.60195124" ]
0.73074734
1
Instantiates a new VendorLocationsDAOImpl
public VendorLocationsDAOImpl() { super(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public AddressDaoImpl()\n {\n \t//Initialise the related Object stores\n \n }", "public OnibusDAO() {}", "public ZyCorporationDAOImpl() {\r\n super();\r\n }", "public void setLocationDao(LocationDAO dao) { _locationData = dao; }", "public ProductosPuntoVentaDaoImpl() {\r\n }", "public ProductDAO() {\n }", "public VRpHrStpDAOImpl() {\r\n super();\r\n }", "public AdministratorDAO() {\n super();\n DAOClassType = Administrator.class;\n }", "public ProfesorDAOImpl() {\n super();\n }", "public LPMapdataDaoImpl() {\r\n\t\t\r\n\t}", "public static DDBUserPointDAO getInstance() {\r\n\t\tif (instance == null) {\r\n\t\t\tconfig = new GeoDataManagerConfiguration(client, DynamoDBConfiguration.USER_POINT_TABLE_NAME);\r\n\t\t\tgeoDataManager = new GeoDataManager(config);\r\n\t\t\t\r\n\t\t\tmapper = new ObjectMapper();\r\n\t\t\tfactory = mapper.getJsonFactory();\r\n\t\t\tinstance = new DDBUserPointDAO();\r\n\t\t}\r\n\r\n\t\treturn instance;\r\n\t}", "public ModeOfPurchaseDAOImpl() {\r\n\r\n }", "public VRpDyHlrforbeDAOImpl() {\r\n super();\r\n }", "private OrderFacade(){\n\t\tAbstractDAOFactory f = new MySQLDAOFactory();\n \tthis.odao = f.getOrderDAO();\n\t}", "private PurchaseDAO(){\n }", "public ProductLocation() {\n }", "public Dao<Locator, Integer> getLocatorDao() throws SQLException {\n\t\tif (locatorDao == null) {\n\t\t\tlocatorDao = getDao(Locator.class);\n\t\t}\n\t\treturn locatorDao;\n\t}", "public DepartmentsDaoImpl() {\n\t\tsuper();\n\t}", "public TbAdminMenuDAOImpl() {\n super();\n }", "private void init(){\n if(solicitudEnviadaDAO == null){\n solicitudEnviadaDAO = new SolicitudEnviadaDAO(getApplicationContext());\n }\n if(solicitudRecibidaDAO == null){\n solicitudRecibidaDAO = new SolicitudRecibidaDAO(getApplicationContext());\n }\n if(solicitudContestadaDAO == null){\n solicitudContestadaDAO = new SolicitudContestadaDAO(getApplicationContext());\n }\n if(preguntaEnviadaDAO == null){\n preguntaEnviadaDAO = new PreguntaEnviadaDAO(getApplicationContext());\n }\n if(preguntaRecibidaDAO == null){\n preguntaRecibidaDAO = new PreguntaRecibidaDAO(getApplicationContext());\n }\n if(preguntaContestadaDAO == null){\n preguntaContestadaDAO = new PreguntaContestadaDAO(getApplicationContext());\n }\n if(puntuacionRecibidaDAO == null){\n puntuacionRecibidaDAO = new PuntuacionRecibidaDAO(getApplicationContext());\n }\n }", "public AppointmentDAOImpl() {\n this.conn = DBConnector.getConnection();\n }", "@Override\n\tpublic StudentDao createDao() {\n\t\treturn new SqliteStudentDaoImpl();\n\t}", "AddressDao getAddressDao();", "public GeneracionPolizasDAOImpl(SqlMapClient sqlMapClient) {\r\n \n\t super();\r\n\t this.sqlMapClient = sqlMapClient;\r\n\t }", "public AlManageOnAirDAOImpl() {\r\n super();\r\n }", "protected DAO()\r\n\t{\r\n\t\tcustomers = new ArrayList<Customer>();\r\n\t}", "public RegionDAO(SessionFactory factory) {\r\n this.factory = factory;\r\n }", "public StorePointsUsersDAO(){\n\t\t\n\t}", "public PisoDAO createPisoDAO() {\n\n if (pisoDAO == null) {\n pisoDAO = new PisoDAO();\n }\n return pisoDAO;\n }", "public HRouterDAOImpl() {\r\n super();\r\n }", "public interface VendorSiteAddrVDao {\n\n\n\tList<VendorSiteAddrV> getAddressList(Integer vendorId, Integer orgId);\n\n\tVendorSiteAddrV getAddressBy(String vendorSiteId);\n}", "public EpAssetsDAOImpl() {\n super();\n }", "private CmmTagMasterVDao() {\r\n\t}", "private LabelDbmsDao() {\r\n }", "public HProvinceFbDAOImpl() {\r\n super();\r\n }", "private SummonerSpellsDao() {\n\t\tconnectionManager = new ConnectionManager();\n\t}", "public RouteDao() {\n super(Route.ROUTE, com.dator.jqtest.dao.model.tables.pojos.Route.class);\n }", "@Override\n public OrdersDAO getOrdersDAO() {\n\n if (instanceOrdersDAO == null) {\n return new MySQLOrdersDAO(connection);\n } else {\n return instanceOrdersDAO;\n }\n }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n usuarioImplementacion=new Usuario_DAO_Imp();\n }", "public empresaDAO(){\r\n \r\n }", "public DepartmentsDAO() {\r\n\t\tconn = DBConnector.getConnection();\r\n\t}", "@Override\n\tpublic DAOProducto crearDAOProductoAlmacen() {\n\t\treturn new DAOProducto();\n\t}", "public ServiceDAO(){\n\t\t\n\t\tString[] tables = new String[]{\"CUSTOMERS\",\"PRODUCTS\"};\n\t\tfor(String table:tables){\n\t\t\tif(!checkIfDBExists(table)){\n\t\t\t\ttry{\n\t\t\t\t\tnew DerbyDataLoader().loadDataFor(table);\n\t\t\t\t}\n\t\t\t\tcatch(Exception e){\n\t\t\t\t\tlogger.error(\"Error Loading the Data into the Derby\");\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public interface VillageDao extends CrudDao<Village> {\n Village getById(String id);\n Village getByCoordinates(short xCoort, short yCoord);\n Village getByName(String name);\n}", "private static AnnualLeaseDAO getDAO() throws DAOSysException {\n\t\tif (dao == null)\t{\n\t\t\tdao = (AnnualLeaseDAO) DAOFactory.getDAO(\"marina.AnnualLease\");\n\t\t}\n\n\t\treturn dao;\n\t}", "public interface RegionPlaceDAO {\r\n\tpublic List<RegionPlace> viewRegionPlace() throws SQLException, ClassNotFoundException, NamingException;\r\n\tpublic RegionPlace selectRegionPlace(RegionPlace region) throws SQLException, ClassNotFoundException, NamingException;\r\n\tpublic RegionPlace getRegionPlace(TypePlace typePlace) throws SQLException, ClassNotFoundException, NamingException;\r\n}", "public LocationService() {\r\n\t\tSettings settings = Settings.getInstance();\r\n\t\tthis.location = settings.getLocation();\r\n\t\tthis.ebAddress = settings.getEbAddress();\r\n\t\tthis.ebPort = settings.getEbPort();\r\n\t\tloggedIn = false;\r\n\t\tobservers = new ArrayList<IObserver>();\r\n\t\tdbAdapter = InformationStorageFactory.getStorageAdapter();\r\n\t}", "public static TwitterDAOInterface CreateObject() {\n\t\treturn new TwitterDAO();\r\n\t}", "public RouteDAO() {\n\t\tconn = DBConnection.getConnection();\n\t}", "public AdminDAO()\n {\n con = DataBase.getConnection();//crear una conexión al crear un objeto AdminDAO\n }", "public VoterDao() {\n super(Voter.VOTER, com.hexarchbootdemo.adapter.output.persistence.h2.generated_sources.jooq.tables.pojos.Voter.class);\n }", "public RcivControlDAOImpl(){\r\n \r\n }", "private static OfferDAO getOfferDAO() {\n DbConnection dbConnection = new DbConnection();\n DBI dbi = dbConnection.getDBConnection();\n OfferDAO offerDAO = dbi.onDemand(OfferDAO.class);\n return offerDAO;\n }", "public ContextDaoImpl() {\n Set<Commissioner> commissionerSet = new HashSet<>();\n List<String> logins = new ArrayList<>();\n commissionerSet.add(new Commissioner(\"victor.net\", \"25345Qw&&\", true));\n commissionerSet.add(new Commissioner(\"egor.net\", \"3456eR&21\", false));\n commissionerSet.add(new Commissioner(\"igor.net\", \"77??SDSw23\", false));\n logins.add(\"victor@khoroshev.net\");\n logins.add(\"egor@khoroshev.net\");\n logins.add(\"igor@khoroshev.net\");\n Database.setCandidateSet(new HashSet<>());\n Database.setVoterSet(new HashSet<>());\n Database.setLogins(logins);\n Database.setCommissionerSet(commissionerSet);\n }", "public AutorDao criarAutorDao(){\n\t\treturn new AutorDaoImpl();\n\t}", "protected DDBUserPointDAO() {\r\n\t\tsuper(UserPoint.class);\r\n\t}", "public static ChoiceDAO getDAO() throws ChoiceDAOSysException\r\n {\r\n ChoiceDAO dao = null;\r\n\r\n try\r\n {\r\n dao = new ChoiceDAOImpl();\r\n }\r\n catch (Exception se)\r\n {\r\n throw new ChoiceDAOSysException(\r\n \"ChoiceDAOFactory.getDAO: Exception while getting DAO type : \\n\" +\r\n se.getMessage());\r\n }\r\n\r\n return dao;\r\n }", "public AdminServiceImpl() {\n\t\tuserDao = DaoImpl.getDaoImpl();\n\t\temployeeDao = DaoImpl.getDaoImpl();\n\t}", "private LocationService() {\n }", "public ISegUsuarioDAO getSegUsuarioDAO() {\r\n return new SegUsuarioDAO();\r\n }", "public MovementDAO() { this(CoreDAO.DRIVER_NAME, CoreDAO.URL, CoreDAO.USER, CoreDAO.PASSWORD);\t\t}", "public SchoolCourseStudentDAOImpl() {\r\n\t\tsuper();\r\n\t}", "public DAOBaseImpl() {\n\t\tsuper();\n\t}", "public BaseDaoImpl() {\n\t\tsuper();\n\t}", "public void init() {\n\t\tlog.info(\"Initialise StudentDAO\");\n\t\tquery_getStudent = new Query_GetStudent(dataSource);\n\t\tquery_insertStudent = new Query_InsertStudent(dataSource);\n\t\tquery_getStudentId = new Query_GetStudentID(dataSource);\n\t\tquery_updateStudent = new Query_UpdateStudent(dataSource);\n\t\tquery_deleteStudent = new Query_DeleteStudent(dataSource);\n\t\tquery_getAllStudentsOrderMatnr = new Query_GetAllStudentsOrderMatnr(\n\t\t\t\tdataSource);\n\t\tquery_getAllStudentsOrderNachname = new Query_GetAllStudentsOrderNachname(\n\t\t\t\tdataSource);\n\t}", "public DescritoresDAO() {\n\t\t\n\t}", "@Profile(\"production\")\r\n @Bean\r\n @DependsOn(\"SessionFactory\") \r\n public EshopDAOImpl getLocaleDAO(SessionFactory sessionFactory, DataSource dataSource) { \r\n \r\n EshopDAOImpl instanceDAOImpl = new EshopDAOImpl();\r\n \r\n //Inject datasource for JDBC.\r\n// instanceDAOImpl.setDataSource(dataSource); \r\n \r\n //Initialize reference to a SessionFactoryBean for database's methods. \r\n instanceDAOImpl.setSessionFactory(sessionFactory);\r\n \r\n return instanceDAOImpl; \r\n }", "public interface LocacaoDAO {\n\n public void salvar(Locacao locacao);\n}", "protected ContaCapitalCadastroDaoFactory() {\n\t\t\n\t}", "private DaoManager() {\n }", "public UserDAO() {\n }", "public ISegAuditoriaDAO getSegAuditoriaDAO() {\r\n return new SegAuditoriaDAO();\r\n }", "public UserLoginDAOImpl() {\r\n\r\n }", "public PacienteDAO(){ \n }", "public interface IdbLocation {\n\n Location createLocation(int _id, String _name); //throws DBException;\n Location setLocation(int _id, String _name);\n boolean deleteLocation(int _id);\n\n static Location getLocation(int _id) {\n return new Location();\n }\n\n static HashMap<Integer, Location> getLocations() { // <id_Location, Location object itself>\n return new HashMap<Integer, Location>();\n }\n \n}", "public OrderDaoImpl() {\n\t\tsuper.setDaoType(Order.class);\n\t}", "public DeptpkDAOImpl(SqlMapClient sqlMapClient) {\r\n super();\r\n this.sqlMapClient = sqlMapClient;\r\n }", "private HibernateToListDAO(){\r\n\t\tfactory = new AnnotationConfiguration().addPackage(\"il.hit.model\") //the fully qualified package name\r\n .addAnnotatedClass(User.class).addAnnotatedClass(Items.class)\r\n .addResource(\"hibernate.cfg.xml\").configure().buildSessionFactory();\r\n\t}", "public MyLocation() {}", "public ArAgingDetailReportDAO () {}", "public MultaDAO() {\r\n super(MultaDAO.class);\r\n }", "public WkBscCoreDAOImpl() {\r\n super();\r\n }", "public ISegSucursalDAO getSegSucursalDAO() {\r\n return new SegSucursalDAO();\r\n }", "public ProtocoloDAO() {\n }", "public UserDAO()\n {\n \n }", "D getDao();", "public MenuDAO() {\n\t\t\n\t\tconnection = ConnectDatabase.connectDatabase();\n\t\t\n\t}", "void setCustomerDao(CustomerDao customerDao);", "public DaoFactory()\n\t{\n\n\t}", "public HLCICPUserDAO() {\n }", "@Inject\n\tpublic AlunoDAO(EntityManager entityManager) {\n\t\tthis.entityManager = entityManager;\n\t}", "@Override\n public CarsDAO getCarsDAO() {\n if (instanceCarsDAO == null) {\n return new MySQLCarsDAO(connection);\n } else {\n return instanceCarsDAO;\n }\n }", "public static HibernateToListDAO getInstance()\r\n\t{\r\n\t\tif(_instanceDAO == null) {\r\n\t\t\t_instanceDAO = new HibernateToListDAO();\r\n\t }\r\n\t\treturn _instanceDAO;\r\n\t}", "public interface AddressDao {\n}", "public interface RegionDao {\n Long create(Region reg);\n Region read(Long id);\n void update(Region reg);\n void delete(Region reg);\n List<Region> findAll();\n List<Region> findForName(String name);\n List<Region> findForIndeces(int start,int end);\n List<Region> getPorcies(int count_el);\n}", "public ActorDtoDAOImpl() {\n super();\n }", "public static synchronized LocationsDB getInstance(Context context) {\n if (sInstance == null) {\n sInstance = new LocationsDB(context.getApplicationContext());\n\n }\n return sInstance;\n }", "public VBookDao() {\n\t\tsuper(org.jooq.test.h2.generatedclasses.tables.VBook.V_BOOK, org.jooq.test.h2.generatedclasses.tables.pojos.VBook.class);\n\t}", "public DeploymentLocationsInner() {\n }", "public ETLLogDAOImpl() {\r\n this(new Configuration());\r\n }" ]
[ "0.64078844", "0.60521275", "0.605187", "0.60273975", "0.60165644", "0.5998226", "0.5972258", "0.58767194", "0.5874731", "0.586607", "0.58548623", "0.582762", "0.5799304", "0.57888985", "0.5786092", "0.57799613", "0.5708098", "0.5686239", "0.5678418", "0.5649768", "0.56443787", "0.5632456", "0.56282026", "0.56206787", "0.5617614", "0.5614974", "0.5611807", "0.56041986", "0.5594624", "0.5576463", "0.55732745", "0.5553355", "0.55392677", "0.5514698", "0.5495401", "0.547693", "0.5465303", "0.5463489", "0.54215217", "0.5407946", "0.5407809", "0.54045206", "0.53994155", "0.5388358", "0.53831923", "0.5379039", "0.53618497", "0.5360691", "0.5360308", "0.5354394", "0.53537434", "0.53417075", "0.5341704", "0.5341368", "0.53398895", "0.5337062", "0.53342885", "0.5327404", "0.5327347", "0.532354", "0.53222805", "0.5319184", "0.53013116", "0.52995515", "0.52988976", "0.5295335", "0.5294882", "0.52918506", "0.5288677", "0.5287562", "0.52871245", "0.5282461", "0.52779055", "0.52681863", "0.5267907", "0.5267655", "0.52658945", "0.52633417", "0.52615875", "0.5255159", "0.5249028", "0.5227971", "0.5223697", "0.5223073", "0.5219964", "0.52171946", "0.5217121", "0.52163035", "0.5213714", "0.5200559", "0.51981086", "0.5197054", "0.5195976", "0.519595", "0.5192793", "0.5190628", "0.5189794", "0.5187539", "0.518651", "0.5171049" ]
0.8411873
0
Get the entity manager that manages persistence unit
public EntityManager getEntityManager() { return entityManager; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static EntityManager getEntityManager() {\n EntityManager em = tl.get();\n return em;\n }", "public EntityManager getEntityManager() {\n return getFactory().createEntityManager();\n }", "protected EntityManager getEntityManager() {\n return emf.createEntityManager();\n }", "static EntityManager getEntityManager(){\n return ENTITY_MANAGER_FACTORY.createEntityManager();\n }", "public final static EntityManager getEntityManager() {\r\n\t\treturn entityManager;\r\n\t}", "public EntityManager getEntityManager() {\r\n return entityManager;\r\n }", "public EntityManager getEntityManager() {\r\n\t\treturn entityManager;\r\n\t}", "public EntityManager getEntityManager() {\r\n\t\treturn entityManager;\r\n\t}", "public EntityManager getEntityManager() {\r\n\t\treturn entityManager;\r\n\t}", "private PersistenceManager getPersistenceManager() {\n if(pmf==null) {\n getFacetHolder().getServiceInjector().injectServicesInto(this);\n }\n return pmf.getPersistenceManagerFactory().getPersistenceManager();\n }", "protected abstract EntityManager getEntityManager();", "protected EntityManager getEntityManager() {\n return em;\n }", "public EntityManager getEntityManager() {\n\t\treturn this.entityManager;\n\t}", "public EntityManager getEntityManager() {\n return this.em;\n }", "@Override\n\tpublic EntityManager getEntityManager() {\n\t return em;\n\t}", "protected EntityManager getEntityManager() {\n return this.entityManager;\n }", "@Override\n public EntityManager getEntityManager() {\n return entityManager;\n }", "javax.management.ObjectName getPersistenceManager();", "@Override\n\tprotected EntityManager getEntityManager() {\n\t\treturn em;\n\t}", "@Override\n\tprotected EntityManager getEntityManager() {\n\t\treturn em;\n\t}", "@Override\n\tprotected EntityManager getEntityManager() {\n\t\treturn entityManager;\n\t}", "private static PersistenceManager getPersistenceManager() {\n\t\treturn PMF.get().getPersistenceManager();\n\t}", "@Override\r\n\tpublic EntityManager getEntityManger() {\n\t\treturn em;\r\n\t}", "abstract E getEntityManager();", "private EntityManager getEM() {\n\t\tif (emf == null || !emf.isOpen())\n\t\t\temf = Persistence.createEntityManagerFactory(PUnit);\n\t\tEntityManager em = threadLocal.get();\n\t\tif (em == null || !em.isOpen()) {\n\t\t\tem = emf.createEntityManager();\n\t\t\tthreadLocal.set(em);\n\t\t}\n\t\treturn em;\n\t}", "@Override\n protected EntityManager getEntityManager() {\n return em;\n }", "@Override\n\tprotected EntityManager getEntityManager() {\n\t return em;\n\t}", "public final PersistenceManager getPersistenceManager (){\n//\t\tSystem.out.println (\"returning persistent manager for properties \"+\tthis._dataStoreEnvironment.getDataStoreProperties ());\n\t\treturn this.pm;\n\t}", "protected abstract EntityManagerFactory getEntityManagerFactory();", "public EntityManager getEM() {\n\t\treturn this.entity;\n\t}", "EntityManager createEntityManager();", "public static final EntityManager getDefaultEntityManager() {\n\t\tEntityManagerFactory entityManagerFactory = Persistence.createEntityManagerFactory(ConfigurationReader.getDatabasePersistenceUnitName());\n\t\treturn entityManagerFactory.createEntityManager();\n\t}", "public EntityManager getEm() {\n\t\treturn em;\n\t}", "@Override\n\tpublic EntityManagerFactory getEntityManagerFactory() {\n\t\treturn null;\n\t}", "@Override\n public GenericManager<Societe, Long> getManager() {\n return manager;\n }", "public PersistenceManagerFactory getPersistenceManagerFactory() {\n return pmf;\n }", "public Manager getManager() {\n return this.manager;\n }", "@Override\n\tprotected EntityManager getEntityManager() {\n\t\treturn null;\n\t}", "public final T getManager() {\n return this.manager;\n }", "Manager getManager() {\n return Manager.getInstance();\n }", "Manager getManager() {\n return Manager.getInstance();\n }", "Manager getManager() {\n return Manager.getInstance();\n }", "private static AdapterManager getAdapterManager() {\r\n return getPersistenceSession().getAdapterManager();\r\n }", "public static DatabaseManager getDatabaseManager() {\r\n return dbManager;\r\n }", "public ContentManager getManager() {\r\n\t\treturn manager;\r\n\t}", "public interface EntityManagerCreator {\n EntityManager createEntityManager();\n}", "@Bean\n @Scope(SCOPE_PROTOTYPE)\n EntityManager entityManagerProvider(EntityManagerFactory emf) {\n EntityManagerHolder holder = (EntityManagerHolder) getResource(emf);\n if (holder == null) {\n return emf.createEntityManager();\n }\n return holder.getEntityManager();\n }", "public ExecutionManager getManager() {\n return manager;\n }", "public String getManager() {\n return manager;\n }", "public DBManager getDBManager() {\n\t\treturn dbManager;\n\t}", "public static EntityManagerFactory getConnection() {\r\n return emf;\r\n }", "public Object getObject()\n\t{\n\t\treturn transactionManager;\n\t}", "public ObjectManager getObjectManager() {\n\treturn this.objectManager;\n }", "public IPersistence<T> getPersistence();", "public EmployeeManager getEmployeeManager() {\n\t\tif (employeeManager == null) {\n\t\t\tIEmployeeDAO emplDAO = new EmployeeDAOSqlite(dbHelper);\n\t\t\temployeeManager = new EmployeeManager(emplDAO);\n\t\t\temployeeManager.setManagerHolder(this);\n\t\t}\n\t\treturn employeeManager;\n\t}", "public static EntityManagerFactory getEntityManagerFactory()\n\t\t\tthrows PersistenceException, UnsupportedUserAttributeException, NamingException {\n\t\tif (emf == null)\n\t\t\temf = createNewEntityManagerFactory();\n\t\treturn emf;\n\t}", "EMInitializer() {\r\n try {\r\n emf = Persistence.createEntityManagerFactory(\"pl.polsl_MatchStatist\"\r\n + \"icsWeb_war_4.0-SNAPSHOTPU\");\r\n em = emf.createEntityManager();\r\n } catch (Exception e) {\r\n em = null;\r\n emf = null;\r\n }\r\n\r\n }", "public synchronized String getManager()\r\n {\r\n return manager;\r\n }", "@Override\r\n public GenericManager<TraitSalaire, Long> getManager() {\r\n return manager;\r\n }", "private static PersistenceSession getPersistenceSession() {\n return NakedObjectsContext.getPersistenceSession();\n }", "public EntityManagerFactory newEMFactory() {\n emFactory = Persistence.createEntityManagerFactory(\"Exercici1-JPA\");\n return emFactory;\n }", "private TransactionManager obtainTransactionManager()\n {\n TransactionManager tm = ec.getNucleusContext().getJtaTransactionManager();\n if (tm == null)\n {\n throw new NucleusTransactionException(LOCALISER.msg(\"015030\"));\n }\n else\n {\n return tm;\n }\n }", "public String getmanager() {\n\t\treturn _manager;\n\t}", "public String getManager() {\n\n return this.manager;\n }", "public static DataManager getInstance()\n\t{\n\t\tDataManager pManager = null;\n\t\tObject pObject = UiStorage.getEntity(DataManager.class);\n\t\tif ( null == pObject )\n\t\t{\n\t\t\tpManager = new DataManager();\n\t\t\tUiStorage.setEntity(pManager);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tpManager = (DataManager)pObject;\n\t\t}\n\t\t\n\t\treturn pManager;\n\t}", "@Override\r\n public GenericManager<LigneReponseDP, Long> getManager() {\r\n return manager;\r\n }", "public static DBManager getInstance() {\n return DB_MANAGER;\n }", "@Override\n @RequestScoped\n public EntityManager provide() {\n // hk2\n final EntityManager instance = getEntityManager();\n\n if (closeableService != null) {\n closeableService.add(new Closeable() {\n @Override\n public void close() throws IOException {\n dispose(instance);\n }\n });\n }\n return instance;\n }", "protected PersistenceStructureService getPersistenceStructureService() {\r\n return persistenceStructureService;\r\n }", "public abstract void setEntityManager(EntityManager em);", "public Object getTransactionManager()\n\t{\n\t\treturn transactionManager;\n\t}", "public Actor getManager() {\n return ActorDao.getActorByRefId(getManagerRefId());\n }", "TransactionalRepositoryManager getTransactionalRepositoryManager() throws DaoException;", "public String getManager()\r\n {\r\n return (m_manager);\r\n }", "@Bean(name = \"masterEntityManager\")\n\tpublic LocalContainerEntityManagerFactoryBean entityManagerFactory() {\n\t\tJpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter();\n\t\tLocalContainerEntityManagerFactoryBean em = new LocalContainerEntityManagerFactoryBean();\n\t\tem.setDataSource(dataSource());\n\t\tem.setPackagesToScan(\"model\");\n\t\tem.setJpaVendorAdapter(vendorAdapter);\n\t\tem.setJpaProperties(new Properties());\n\t\tem.setPersistenceUnitName(\"master\");\n\t\treturn em;\n\t}", "public static EntityAttributeManager instance() {\r\n\t\tif (instance == null) {\r\n\t\t\tinstance = new EntityAttributeManager();\r\n\t\t}\r\n\t\treturn instance;\r\n\t}", "public PersistenceStructureService getPersistenceStructureService() {\r\n return persistenceStructureService;\r\n }", "public interface IEntityManagerFactory {\r\n\r\n\t/**\r\n\t * Called when entity manager factory will help to create DAO objects.\r\n\t * \r\n\t * @return\r\n\t */\r\n\tEntityManager createEntityManager();\r\n}", "@Override\n public GenericManager<TraitementCourrier, Long> getManager() {\n return manager;\n }", "public Manager getEmployee() {\n\t\treturn new Manager();\n\t}", "public VehicleManager getVehicleManager() {\n\t\tif (vehicleManager == null) {\n\t\t\tIVehicleDAO vehicleDAO = new VehicleDAOSqlite(dbHelper);\n\t\t\tvehicleManager = new VehicleManager(vehicleDAO);\n\t\t\tvehicleManager.setManagerHolder(this);\n\t\t}\n\t\treturn vehicleManager;\n\t}", "void setPersistenceManager(javax.management.ObjectName objectName);", "protected FullTextEntityManager getFullTextEntityManager() {\n\t if (ftem == null) {\n\t ftem = Search.getFullTextEntityManager(getEntityManager());\n\t try {\n\t\t\t\t/* Como o banco de dados é resetado a cada vez que\n\t\t\t\t * a aplicação inicializa (banco em memória), é preciso reconstruir\n\t\t\t\t * os índices de busca utilizados pelo hibernate-search.*/\n\t\t\t\tftem.createIndexer().startAndWait();\n\t\t\t} catch (InterruptedException e) {//TODO: tratar exceção\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t }\n\t return ftem;\n\t}", "public static DepartmentManager getInstance() {\n if (instance == null) {\n instance = new DepartmentManager();\n }\n return instance;\n }", "public Class<T> getPersistenceClass()\n \t{\n \t\treturn this.persistenceClass;\n \t}", "public TransactionManagerLookup transactionManagerLookup() {\n return transactionManagerLookup;\n }", "public DatabaseManager getDatabase() {\n\t\treturn (db);\n\t}", "public UserManager getUserManager() {\n return userManager;\n }", "protected TransactionManager getTransactionManager()\n {\n if (getTransactionIntegration() != null)\n return getTransactionIntegration().getTransactionManager();\n\n return null;\n }", "public static ReferenceLoginManager getInstance() {\n if (instance == null) {\n throw new RuntimeException(\"Persistence not configured yet!\");\n } else return instance;\n }", "public abstract FHIRPersistence getPersistenceImpl() throws Exception;", "@PersistenceContext(unitName=\"microrest-persistence\")\n public void setPersistenceContext(EntityManager em)\n {\n this.em = em;\n }", "private EntityManagerProvider(){}", "@PersistenceContext\n public void setEntityManager(EntityManager em) {\n this.em = em;\n }", "@PersistenceContext\n public void setEntityManager(EntityManager em) {\n this.em = em;\n }", "@PersistenceContext\n public void setEntityManager(EntityManager em) {\n this.em = em;\n }", "@PersistenceContext\r\n public void setEntityManager(EntityManager em) {\r\n this.em = em;\r\n }" ]
[ "0.81244534", "0.8066936", "0.80646527", "0.79699105", "0.7882468", "0.7836241", "0.7816455", "0.7816455", "0.7816455", "0.7771495", "0.77314746", "0.76671195", "0.7658572", "0.7638356", "0.76285535", "0.76072854", "0.7577317", "0.7530995", "0.74679554", "0.74679554", "0.74668616", "0.7463218", "0.7407091", "0.73896384", "0.7342996", "0.7332518", "0.7320188", "0.7295585", "0.72638434", "0.7235963", "0.7172674", "0.71580553", "0.7055505", "0.69545496", "0.69252795", "0.6924947", "0.685795", "0.68371797", "0.6784649", "0.6740242", "0.6740242", "0.6740242", "0.6678461", "0.66230106", "0.65543246", "0.65481794", "0.65263355", "0.6523618", "0.65097535", "0.65031546", "0.6494009", "0.64847976", "0.64539963", "0.64513326", "0.64295983", "0.64221704", "0.6412136", "0.63796204", "0.63586736", "0.6347867", "0.63342124", "0.63013256", "0.6296624", "0.6284932", "0.6277813", "0.626973", "0.6267915", "0.62564313", "0.6251017", "0.62160945", "0.6197561", "0.61701465", "0.6162822", "0.6140312", "0.6139323", "0.6132628", "0.6118419", "0.61182654", "0.6105708", "0.6093964", "0.6067979", "0.6061284", "0.60595727", "0.60575575", "0.60556144", "0.6054034", "0.60338145", "0.602603", "0.60212535", "0.60211134", "0.60205007", "0.60100746", "0.6007483", "0.59944427", "0.59944427", "0.59944427", "0.5994291" ]
0.7806603
12
Returns the set of entity classes managed by this DAO.
public Set<Class<?>> getTypes() { return dataTypes; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Set<Class<? extends Entity>> getEntityBeans() {\r\n\t\tfinal Set<Class<? extends Entity>> entityClasses=new HashSet<>();\r\n\t\tfinal ClassLoader cl=Thread.currentThread().getContextClassLoader();\r\n\t\tfinal URL packageURL=cl.getResource(\r\n\t\t\t\tENTITY_BEANS_PACKAGE.replace(\".\", \"/\")+\"package-info.class\");\r\n\t\ttry {\r\n\t\t\tfinal File[] entityFiles=new File(packageURL.toURI()).getParentFile().listFiles(new FilenameFilter() {\r\n\t\t\t\t@Override public boolean accept(final File dir, final String name) {\r\n\t\t\t\t\treturn name.endsWith(\".class\"); \r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tfor(final File f:entityFiles) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfinal Class<?> cls=cl.loadClass(getPackageClass(f));\r\n\t\t\t\t\tif(Entity.class.isAssignableFrom(cls)) entityClasses.add((Class<? extends Entity>) cls);\r\n\t\t\t\t} catch (ClassNotFoundException e) {//skip class if search failed\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (URISyntaxException e) {\r\n\t\t}\r\n\t\t\r\n\t\treturn entityClasses;\r\n\t}", "public List<Class<?>> getAllModelEntities() {\n\t\treturn ModelClasses.findModelClassesWithInterface(IEntityType.class);\n\t}", "public List<Class<?>> getEntities(){\n\t\tList<Class<?>> result = new ArrayList<Class<?>>();\n\t\t\n//\t\tresult.add(Equipo.class);\n\t\tresult.add(Formacion.class);\n\t\tresult.add(FormacionStrategy.class);\n\t\tresult.add(Habilidad.class);\n\t\tresult.add(Jugador.class);\n\t\tresult.add(Tecnico.class);\n\t\tresult.add(Titular.class);\n//\t\tresult.add(PartidoSimple.class);\n//\t\tresult.add(PartidoDeCopa.class);\n\t\t\n\t\treturn result;\n\t}", "public Map<String, Class<?>> getEntityTypes() {\n return entityTypes;\n }", "List<Class<?>> getManagedClasses();", "@Override\n\tpublic List<Classe> getClasses() {\n\t\treturn classeRepository.findAll();\n\t}", "@Override\n\tpublic List<Classe> getClasses() {\n\t\treturn classeRepo.findAll();\n\t}", "private static ImmutableList<Class<?>> applicationEntities() {\n List<String> paths = new ArrayList<>(List.of(PREFIX_STRING));\n if (additionalPaths != null) {\n paths.addAll(additionalPaths);\n }\n\n final List<Class<?>> collect = paths\n .stream()\n .map(path -> {\n logger.info(\"Scanning {} for Hibernate entities\", path);\n final Reflections reflections = new Reflections(path);\n final Set<Class<?>> entities = reflections.getTypesAnnotatedWith(Entity.class);\n logger.info(\"Found {} Hibernate entities\", entities.getClass());\n if (logger.isDebugEnabled()) {\n entities.forEach((entity) -> logger.debug(\"Registered {}.\", entity.getName()));\n }\n return entities;\n })\n .flatMap(Collection::stream)\n .collect(Collectors.toList());\n\n return ImmutableList.copyOf(collect);\n }", "Collection<Class<?>> registerEntities();", "public Set<EntityType> getEntityTypes() {\n\t\ttry {\n\t\t\tSet<EntityType> entityTypes =\n\t\t\t\tnew HashSet<EntityType>(getWorkbench().getSearchableEntityTypes());\n\t\t\tentityTypes.add(EntityType.UNKNOWN);\n\t\t\treturn entityTypes;\n\t\t} catch (Throwable error) {\n\t\t\treportError(error, \"Error retrieving the set of searchable EntityTypes\");\n\t\t\treturn null;\n\t\t}\n\t}", "public List<Entity> getAllEntities()\n\t{\n\t\treturn this.entities;\n\t}", "public Class<?> getEntityClass() {\r\n\t\treturn entityClass;\r\n\t}", "@Override\n\tpublic List<Classes> findAllClasses() {\n\t\tString sql = \"select * from classes\";\n\t\tJdbcQuery querys = JdbcUtils.createNativeQuery(sql, Classes.class);\n\t\tList<Classes> classesList = (List<Classes>) querys.getResultList();\n\t\treturn classesList;\n\t}", "public Class<T> getEntityClass() {\n\t\treturn persistentClass;\n\t}", "@Override\n public Class<E> getPersistentClass() {\n return entityClass;\n }", "public List<EntityObject> getEntities() {\n\t\treturn entities;\n\t}", "public List<Entity> getEntities() {\n return entities;\n }", "public Set<String> getEntityNames() {\n return this.entityNameSet;\n }", "@Override\n public Set<Class<?>> getClasses() {\n HashSet h = new HashSet<Class<?>>();\n h.add(AffirmationService.class );\n return h;\n }", "public List<T> findAll() {\n\t Query q = getEntityManager().createQuery(\"select u from \" + getEntityClass().getSimpleName() + \" u\");\n\t return q.getResultList();\n\t }", "private List<Class> getClasses(final String scanPackage) {\n ClassPathScanningCandidateComponentProvider provider = new ClassPathScanningCandidateComponentProvider(false);\n provider.addIncludeFilter(new AnnotationTypeFilter(ElementEntity.class));\n provider.addIncludeFilter(new AnnotationTypeFilter(VertexEntity.class));\n provider.addIncludeFilter(new AnnotationTypeFilter(EdgeEntity.class));\n provider.addIncludeFilter(new AnnotationTypeFilter(EmbeddedEntity.class));\n Set<BeanDefinition> beanDefinitionSet = provider.findCandidateComponents(scanPackage);\n List<Class> entityClasses = new ArrayList<>();\n for (BeanDefinition beanDefinition : beanDefinitionSet) {\n String beanClassName = beanDefinition.getBeanClassName();\n try {\n entityClasses.add(Class.forName(beanClassName));\n } catch (ClassNotFoundException e) {\n LOG.error(\"Generate class: {}'s schema error: \", beanClassName, e);\n }\n }\n return entityClasses;\n }", "public ArrayList<Entity> getEntities() {\n\t\treturn entities;\n\t}", "public Set<Class<? extends RealmModel>> getDBTableTypes(){\n try {\n if (this.realmConfiguration == null) {\n this.realmConfiguration = DatabaseUtilities\n .buildRealmConfig(context, null, null, null);\n }\n } catch (Exception e){\n e.printStackTrace();\n }\n\n if(realmConfiguration == null){\n return null;\n }\n return realmConfiguration.getRealmObjectClasses();\n }", "public List<Entity> getAll() {\n return entities;\n }", "public static Set<String> getClassNamesToPersistIds() {\n\t\tif (classNamesToPersistIds == null) {\n\t\t\tGlobalProperty gp = Context.getAdministrationService()\n\t\t\t.getGlobalPropertyObject(\n\t\t\t\t\tMetadataSharingConsts.GP_PERSIST_IDS_FOR_CLASSES);\n\t\t\tupdatePersistClasses(gp);\n\t\t}\n\t\t\n\t\treturn classNamesToPersistIds;\n\t}", "public List<String> getAllClassIds() throws ServiceException {\n\t\ttry {\n\t\t\treturn classQueries.getAllClassIds();\n\t\t}\n\t\tcatch(DataAccessException e) {\n\t\t\tthrow new ServiceException(e);\n\t\t}\n\t}", "protected final Class<?> getEntityClass() {\n return entityClass;\n }", "@Override\r\n\tpublic List<T> findAll() {\n\t\treturn getSession().createQuery(\r\n\t\t\t\t\"FROM \"+clazz.getSimpleName())\r\n\t\t\t\t.list();\r\n\t}", "public Collection<E> getColecaoEntidades() {\n\n\t\treturn this.colecaoEntidades;\n\t}", "public Set<T> getSaveEntities() {\n return unmodifiableSet(saveEntities);\n }", "public List<BaseClass> baseClasses() {\r\n\t\treturn this.baseClasses;\r\n\t}", "public static ArrayList<? extends Entity>getEntities(){\n\t\tArrayList<Entity> totalEntities = new ArrayList<Entity>();\n\t\ttotalEntities.addAll(humans);\n\t\ttotalEntities.addAll(zombies);\n\n\t\treturn totalEntities;\n\t}", "@NotNull\r\n Entity[] getEntities();", "public final Class<E> getEntityImplClass() {\n\t\treturn eClass;\n\t}", "@Override\n\tpublic List<TClassInfo> getClazzs(String hql) {\n\t\tSession session=HibernateSessionFactory.getSession();\n\t\tTransaction transaction=session.beginTransaction();\n\t\tQuery query=session.createQuery(hql);\n\t\tList<TClassInfo> clazzs=new ArrayList<TClassInfo>();\n\t\tclazzs=query.list();\n\t\ttransaction.commit();\n\t\tsession.close();\n\t\treturn clazzs;\n\t}", "@Override\r\n\tpublic String[] getEntityBasePackages() {\r\n\t\treturn new String[] {\"com.infosys.apachecassandra.entities\"};\r\n\t}", "public Class getTableClass() {\n\t\treturn entityClass;\r\n\t}", "public Class<T> getPersistentClass()\n {\n return _persistentClass;\n }", "private Class<T> getPersistentClass() {\n return this.persistentClass;\n }", "public List<ConsejoEntity> findAll() {\r\n Query q = em.createQuery(\"select u from ConsejoEntity u\");\r\n return q.getResultList();\r\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic List<T> getList() {\n\t\tthis.hql = \"select m from \" + entityClassName + \" as m \";\n\t\tList<T> resultSet = entity.createQuery(this.hql).getResultList();\n\t\treturn resultSet;\n\t}", "protected abstract Loadable[] getEntityPersisters();", "public Entity[][] entities() {\r\n\t\treturn this.entities;\r\n\t}", "public Set<E> getTodos() {\n logger.debug(\"Obteniendo todos los [\" + clasePersistente + \"]\");\n return castLista(clasePersistente, crearCriteria().list());\n }", "@Override\n protected Loadable[] getEntityPersisters() {\n \t\treturn persisters;\n \t}", "public Vector<HibernateEntity> getEntitiesAllowedAsParent() {\n\t\tVector<HibernateEntity> result = new Vector<HibernateEntity>();\n\t\tfor (HibernateEntity entity : getHibernateModel().getEntities()) {\n\t\t\tif (entity != this && entity.getFather() == null) {\n\t\t\t\tresult.add(entity);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}", "public List<WrapperEntity> getEntitiesClassNamed(String className){\r\n\t\tList<WrapperEntity> entities = new ArrayList<WrapperEntity>();\r\n\t\tfor(Entity entity : world.loadedEntityList){\r\n\t\t\tif(entity.getClass().getCanonicalName().equals(className)){\r\n\t\t\t\tentities.add(WrapperEntity.getWrapperFor(entity));\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn entities;\r\n\t}", "public Class<T> getPersistenceClass()\n \t{\n \t\treturn this.persistenceClass;\n \t}", "public EntityTable getEntities() \t{ \n return (entities == null && nameContext != null) \n ? nameContext.getEntities() \n : entities;\n }", "@Override\n public Set<Class<?>> getClasses() {\n\n Set<Class<?>> resources = new java.util.HashSet<>();\n resources.add(CountryResource.class);\n resources.add(DepartmentResource.class);\n resources.add(JobResource.class);\n return resources;\n }", "public Set<String> persistentFieldNames() {\n return entityMetaData.typeMap.keySet();\n }", "Class<?> getEntityClass();", "public org.LexGrid.concepts.Entities getEntities() {\n return entities;\n }", "public LazyDataModel<BasicEntity> getEntities() {\n return entities;\n }", "@NotNull\n List<? extends ClassInfo> getClasses();", "public Collection getPersistedTypeNames() {\n return (_addClasses == null) ? Collections.EMPTY_LIST : _addClasses;\n }", "public Set<Class<?>> getScanClasses();", "public ClassInfo[] getClasses() {\r\n return classes.toArray(new ClassInfo[classes.size()]);\r\n }", "protected String getEntityClassName() {\n\t\treturn this.getEntityClass().getName();\n\t}", "@SuppressWarnings(\"rawtypes\")\n \tpublic static Class getEntityClass() {\n \t\treturn getMinecraftClass(\"Entity\");\n \t}", "public Class<?> getDaoClass() {\n return daoClass;\n }", "@SuppressWarnings(\"unchecked\")\r\n public List<DomainObject> getList() {\r\n Session session = getSession();\r\n try {\r\n session.flush();\r\n return session.createQuery(\"from \" + getPersistentClass().getName()).list();\r\n } catch (HibernateException e) {\r\n LOG.error(MODULE + \"Exception in getList() Method:\" + e, e);\r\n throw e;\r\n }\r\n }", "@Override\n\tpublic Class<?> getEntityClass() {\n\t\treturn null;\n\t}", "public List<E> findAll() {\n return getDao().findAll();\n }", "public static synchronized Set<Class<?>> keySet() {\n\t\treturn ClassRegistry.dictionary.keySet();\n\t}", "default ImmutableSet<Class<? extends ManagedService>> getDependencies()\n\t{\n\t\treturn Sets.immutable.empty();\n\t}", "@Override\n\tpublic List<Class> bestClass() {\n\t\treturn mainDao.bestClass();\n\t}", "@Override\n public List<BaiseeClazz> findAllClazzInfo() {\n return claMapper.findAllClazzInfo();\n }", "public abstract Class<?>[] getCoClasses();", "@Override\n\tpublic List<T> getAllEntry() {\n\t\treturn this.hibernateTemplate.find(\"from \"+this.classt.getName());\n\t}", "@NotNull\n List<? extends ClassInfo> getAllClasses();", "@OneToMany(mappedBy=\"classRoom\")\n @OrderBy(\"className ASC\")\n public Collection<Class> getClasses() {\n return classes;\n }", "@Override\n\tpublic List<TBasUnitClass> findAll() {\n\t\treturn tBasUnitClassRepository.findAll();\n\t}", "public List<UserEntity> findAllUserEntitys() {\n return userEntityRepository.findAll();\n }", "public Table getEntitiesTable(){\n\t\treturn m_entities;\n\t}", "public List<String> getClassesList() {\n\t\tCursor c = theDb.rawQuery(\"SELECT * \" +\n\t\t\t\t\t\t\t\t \"FROM \" + DbContract.Classes.TABLE_NAME, null);\n\t\t\n\t\t//Read cursor into an ArrayList\n\t\tList<String> classesList = new ArrayList<String>();\n\t\tclassesList.add( context.getString(R.string.all_classes) );\t\t\t//Add \"All classes\"\n\t\t\n\t\twhile (c.moveToNext()) {\n\t\t\tclassesList.add( c.getString( c.getColumnIndex(DbContract.Classes.ATTRIBUTE_NAME)));\n\t\t}\n\t\t\n\t\treturn classesList;\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic ArrayList<E> getEntities() {\n\t\treturn (ArrayList<E>) entities.clone();\n\t}", "Class<E> getEntityClass();", "@Override\n\tpublic List<UsuariosEntity> findAll() {\n\t\treturn (List<UsuariosEntity>) iUsuarios.findAll();\n\t}", "@Override\n\tpublic Class<E> getEntityClass() {\n\t\treturn null;\n\t}", "public List<String> getClassList() {\n return classlist;\n }", "public static Iterable<Entity> getAllEntities() {\n\t\treturn Util.listEntities(\"RecetteId\", null, null);\n\t}", "@Override\n public List<R> getAll() {\n return onFindForList(getSession().createCriteria(entityClass).list());\n }", "protected abstract Class<T> getEntityClass();", "protected abstract Class<T> getEntityClass();", "public List<EntityMapping> entityMappings() {\n return this.innerProperties() == null ? null : this.innerProperties().entityMappings();\n }", "@Override\n public SortedSet<EmployeeIdentity> getEmployeeIdentities() {\n Identity identity = new Identity();\n identity.setId(OBJECT_ID);\n identity.setCode(identityCode);\n EmployeeIdentity employeeIdentity = new EmployeeIdentity(identity, this);\n employeeIdentity.setId(OBJECT_ID);\n SortedSet<EmployeeIdentity> employeeCategories = new TreeSet<EmployeeIdentity>();\n employeeCategories.add(employeeIdentity);\n return employeeCategories;\n }", "public static synchronized Set getDescriptorClasses() {\n\tHashSet set = new HashSet();\n\n for (Enumeration e = registryModes.elements(); e.hasMoreElements();) {\n RegistryMode mode = (RegistryMode)e.nextElement();\n\n\t set.add(mode.descriptorClass);\n\t}\n\n\treturn set;\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic List<T> list() {\n\t\treturn sessionFactory.getCurrentSession().createCriteria(clazz).addOrder(org.hibernate.criterion.Order.asc(\"id\")).list();\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic List<T> getList() {\r\n\t\tgetEntityManager().flush();\r\n\t\treturn getEntityManager().createQuery(\r\n\t\t\t\t\"select OBJECT(o) from \" + getClassType().getSimpleName() + \" o order by o.id\")\r\n\t\t\t\t.getResultList();\r\n\t}", "@Override\r\n public List<? extends DataStoreEntity> getAllEntities(boolean recursive) {\n return null;\r\n }", "public DBObject[] getDbObjects() {\n return dbObjects;\n }", "@SuppressWarnings(\"unchecked\")\n\tprotected Class<Model> getEntityClass() {\n\t\tParameterizedType pt = (ParameterizedType) this.getClass().getGenericSuperclass();\n\t\treturn (Class<Model>) pt.getActualTypeArguments()[0];\n\t}", "public static Class get_CLASS()\n {\n return WrapperMap.EntrySet.class;\n }", "@Override\r\n\tpublic List<Type> getTypes() {\n\t\treturn (List<Type>)BaseDao.select(\"select * from type\", Type.class);\r\n\t}", "public List<Classinfo> list() {\n\t\treturn null;\r\n\t}", "@Override\n\t@Transactional\n\tpublic List<T> getAll() {\n\t\tList<?> result = hibernateTemplate.getSessionFactory().getCurrentSession()\n\t\t\t\t.createCriteria(getGenericClass())\n\t\t\t\t.list();\n\t\treturn result.stream()\n\t\t\t\t.map(e -> initialize(checkType(e)))\n\t\t\t\t.filter(e -> e != null)\n\t\t\t\t.collect(Collectors.toList());\n\t}", "public List<Class<?>> getKnownClasses();", "public List findAll() {\n return findAll(ClassItem.class);\n }", "Class<? extends EntityPersister> getEntityPersisterClass(PersistentClass metadata);", "public List<IclassItem> getClasses() {\n if(projectData!=null){\n return projectData.getClasses();\n }\n return new ArrayList<IclassItem>();\n }" ]
[ "0.75727713", "0.731534", "0.7015043", "0.70115775", "0.6999388", "0.6762259", "0.6751526", "0.66586655", "0.66073024", "0.656222", "0.6440437", "0.6410978", "0.6402292", "0.6392862", "0.6390568", "0.6299281", "0.62926966", "0.62782663", "0.62222093", "0.61969113", "0.6149837", "0.61474454", "0.6109884", "0.61073077", "0.6085008", "0.60805047", "0.60599494", "0.60158783", "0.5988944", "0.59647024", "0.5930123", "0.5904426", "0.5902073", "0.59010136", "0.58912575", "0.5883803", "0.58823746", "0.58806765", "0.5870754", "0.5859332", "0.5807378", "0.5801978", "0.57985294", "0.579648", "0.57777095", "0.5771902", "0.5767275", "0.5767043", "0.5760957", "0.57580376", "0.5748465", "0.5739316", "0.57178926", "0.56876355", "0.568259", "0.567716", "0.56676304", "0.566133", "0.56523913", "0.56476223", "0.5646782", "0.56462586", "0.5639566", "0.56282306", "0.56230026", "0.5609526", "0.55975246", "0.5588098", "0.558476", "0.557931", "0.5553043", "0.55527294", "0.55227345", "0.55183977", "0.5512084", "0.5508507", "0.5504813", "0.55011314", "0.54988605", "0.5497609", "0.5497388", "0.54961824", "0.54959756", "0.54955435", "0.54955435", "0.5495328", "0.5491139", "0.54830194", "0.5481476", "0.5475768", "0.5471228", "0.5470459", "0.5458082", "0.54577553", "0.5457703", "0.5455056", "0.54529893", "0.54465646", "0.5438641", "0.54381484", "0.54348344" ]
0.0
-1
Used to determine whether or not to merge the entity or persist the entity when calling Store
public boolean canBeMerged(VendorLocations entity) { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"unchecked\")\n @Override\n protected <T> T _persistOrMerge(T entity) {\n if (entity == null) {\n logger.debug(\"entity == null\");\n return null;\n }\n if (em().contains(entity)) {\n logger.debug(\"em().contains(entity), try to _merge\");\n return _merge(entity);\n }\n Serializable id = getMetadataUtil().getId(entity);\n if (id == null) {\n logger.debug(\"_persist(id == null)\");\n _persist(entity);\n return entity;\n }\n T prev = em().find((Class<T>) entity.getClass(), id);\n if (prev == null) {\n logger.debug(\"_persist(prev == null)\");\n _persist(entity);\n return entity;\n } else {\n logger.debug(\"_merge\");\n return _merge(entity);\n }\n }", "boolean hasMergeStore();", "boolean propagateSession() {\n if (committed && !isDirty()) {\n return true;\n }\n if (getRepositoryBackedSession(false) == null) {\n setPropagateOnCreate(true);\n return false;\n }\n return doPropagateAndStoreIfFirstWrapper();\n }", "public boolean isPersisted() {\n return systemId!=NOT_PERSISTED;\n }", "@Override\n\tpublic boolean requiresPostCommitHanding(EntityPersister arg0) {\n\t\treturn false;\n\t}", "protected boolean afterMerge() throws DBSIOException{return true;}", "@Override\n\tpublic L mergeIntoPersisted(R root, L entity) {\n\t\treturn entity;\n\t}", "@Override\r\n\tpublic void save(T instance) {\r\n\t\tif (isManaged(instance)) {\r\n\t\t\tgetEntityManager().merge(instance);\r\n\t\t} else {\r\n\t\t\tgetEntityManager().persist(instance);\r\n\t\t}\r\n\t}", "@Override\n\tpublic <T> T merge(T entity) {\n\t\treturn null;\n\t}", "@Override\r\n public void saveOrUpdateEntity(String entityName, DataStoreEntity dataStoreEntity) {\n\r\n }", "@Override\n\tpublic void persist(Object entity) {\n\t\t\n\t}", "public T save(T entity) throws Exception{\n\t\tentity = em.merge(entity);\n\t\treturn entity;\n\t}", "Boolean save(T entity);", "@Override\n public void persist() {\n }", "public boolean hasMergeStore() {\n return ((bitField0_ & 0x00100000) == 0x00100000);\n }", "public E saveUpdate(E entity){\n EntityTransaction transaction = entityManager.getTransaction();\n transaction.begin();\n E e = entityManager.merge(entity);\n transaction.commit();\n return e;\n }", "@PostPersist\n\t@PostUpdate\n\tprivate void storeChangesToDw() {\n\t}", "public boolean hasMergeStore() {\n return ((bitField0_ & 0x00100000) == 0x00100000);\n }", "public boolean canBeMerged(MInspectSetting entity) {\n\t\treturn true;\n\t}", "@Override\r\n\tpublic void persist() {\n\t}", "public boolean canBeMerged(SchoolCourseStudent entity) {\r\n\t\treturn true;\r\n\t}", "public void merge(T entity) {\n\t\t\n\t}", "public boolean persistChanges() throws ProvisioningException {\n final ProvisioningDiffProvider diffProvider = getDiffMergedConfig();\n if(diffProvider == null) {\n return false;\n }\n final ProvisioningConfig mergedConfig = diffProvider.getMergedConfig();\n if(mergedConfig.equals(getProvisioningConfig())) {\n return false;\n }\n try (ProvisioningLayout<FeaturePackRuntimeBuilder> layout = getLayoutFactory().newConfigLayout(mergedConfig, ProvisioningRuntimeBuilder.FP_RT_FACTORY, false)) {\n doProvision(layout, diffProvider.getFsDiff(), false);\n }\n return true;\n }", "@Override\n public void mergeEntity(String entitySetName, OEntity entity) {\n super.mergeEntity(entitySetName, entity);\n }", "public boolean canBeMerged(Releaseplan entity) {\r\n\t\treturn true;\r\n\t}", "@Override\n\tpublic void saveOrUpdate(EmpType entity) {\n\n\t}", "public boolean doSave() {\n return true;\n }", "@Override\n\tpublic Map<String, Object> update(StoreBase entity) {\n\t\treturn null;\n\t}", "boolean hasInsertOrUpdate();", "private boolean saveData() {\n // get data from input controls\n collectDataFromUI();\n\n if (!validateData()) return false;\n\n boolean isTransfer = mCommon.transactionEntity.getTransactionType().equals(TransactionTypes.Transfer);\n if (!isTransfer) {\n mCommon.resetTransfer();\n }\n\n // Transaction. Need the id for split categories.\n\n if (!saveTransaction()) return false;\n\n // Split Categories\n\n if (mCommon.convertOneSplitIntoRegularTransaction()) {\n saveTransaction();\n }\n\n if(!mCommon.isSplitSelected()) {\n // Delete any split categories if split is unchecked.\n mCommon.removeAllSplitCategories();\n }\n if (!saveSplitCategories()) return false;\n\n return true;\n }", "@Override\r\n public Assunto persistir(Assunto assunto) {\r\n EntityManager em = PersistenceUtil.getEntityManager();\r\n em.getTransaction().begin();\r\n try {\r\n assunto = em.merge(assunto);\r\n em.getTransaction().commit();\r\n System.out.println(\"Registro Assunto gravado com sucesso\");\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n return assunto;\r\n }", "public boolean isUpsert() {\n return upsert;\n }", "boolean shouldMerge() {\n return mergeState.segmentInfo.getDocCount() > 0;\n }", "public Boolean hasEntity() {\n \n return hasEntity_;\n \n }", "protected boolean save() {\n\t\t// if modified... then do save\n\t\tif (stateProperty().getValue().contains(State.Modified) || \n\t\t\t\t// or if loaded from a dataset but was set inactive afterwards\n\t\t\t\t(stateProperty().getValue().contains(State.Dataset) && !activeProperty().getValue())) {\n\t\t\t// Save all the independent children first\n\t\t\tif (children != null) {\n\t\t\t\tfor (BusinessObject child : children.values()) {\n\t\t\t\t\t// Attributes should be managed by the owner, and shouldn't need to manage themselves\n\t\t\t\t\tif(!(child.isAttribute()) &&\n\t\t\t\t\t\t\t// either independent and active, or dependent and inactive\n\t\t\t\t\t\t\tchild.independentProperty().getValue() == isActive()) {\n\t\t\t\t\t\tchild.save();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// We want to call doSave if the value is active, otherwise doDelete should be called\n\t\t\tif (activeProperty().getValue()) {\n\t\t\t\tdoSave();\n\t\t\t} else {\n\t\t\t\tdoDelete();\n\t\t\t}\n\t\t\t\n\t\t\t// Save all the dependent children after this object has been saved\n\t\t\tif (children != null) {\n\t\t\t\tfor (BusinessObject child: children.values()) {\n\t\t\t\t\t// Attributes should be managed by the owner, and shouldn't need to manage themselves\n\t\t\t\t\tif (!(child.isAttribute()) &&\n\t\t\t\t\t\t\t// either independent and inactive, or dependent and active\n\t\t\t\t\t\t\tchild.independentProperty().getValue() != isActive()) {\n\t\t\t\t\t\tchild.save();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Should be safe to assume the following state after successful saving\n\t\t\tstateProperty().getValue().remove(State.Modified);\n\t\t\tif (isActive()) {\n\t\t\t\tstateProperty().getValue().add(State.Dataset);\n\t\t\t} else {\n\t\t\t\tstateProperty().getValue().remove(State.Dataset);\n\t\t\t}\n\t\t\t// Let listeners know about the save\n\t\t\tfireModified(new ModifiedEvent(this, ModifiedEventType.Save));\t\t\t\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "@Override\n\tpublic boolean updateApplicant(ApplicantEntity applicantEntity) {\n\t\tentityManager.merge(applicantEntity);\n\t\treturn false;\n\t}", "@Override\n public E update(E entity) {\n LOG.info(\"[update] Start: entity = \" + entity.getClass().getSimpleName());\n entityManager.merge(entity);\n LOG.info(\"[update] End\");\n return entity;\n }", "public void setHasEntity(Boolean setTo) {\n \n hasEntity_ = setTo;\n \n }", "@Override\n\tpublic T create(T entity) {\n\t\t//TODO al anotar un metodo como transaccional spring de encarga de la transaccion por lo que no hay que \n\t\t//abrir la transaccion ni hacer commit, se encarga spring. Es más si lo intentas da un error, no se \n\t\t//pueden crear transacciones en una transaccion conpartida\n\t\t//Not allowed to create transaction on shared EntityManager - use Spring transactions\n\t\t//em.getTransaction().begin();\n\t\t\n\t\tSystem.out.println(em.contains(entity));\n\t\tem.persist(entity);\n\t\tSystem.out.println(em.contains(entity));\n\t\t//em.getTransaction().commit();\n\t\t\n\t\t//Session session = (Session) em.getDelegate();\n\t\t//Transaction tx = session.beginTransaction();\n\t\t//session.saveOrUpdate(entity);\n\t\t//session.flush();\n\t\t//tx.commit();\n\t\treturn entity;\n\t}", "@Override\n\tpublic void save(EmpType entity) {\n\t\t\n\t}", "@Override\n\tpublic <S extends Audit> S saveAndFlush(S entity) {\n\t\treturn null;\n\t}", "public boolean guardarDatos2(Object dato) {\r\n\t\t\r\n\t\tEntityTransaction transaccion = em.getTransaction();\r\n\t\ttransaccion.begin();\r\n\r\n\t\ttry {\r\n\t\t\tem.persist(dato);\r\n\t\t\tem.flush();\r\n\t\t\ttransaccion.commit();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tif(transaccion.isActive()){\r\n\t\t\t\ttransaccion.rollback();\r\n\t }\r\n\t\t\treturn false;\r\n\t\t} finally {\r\n\t\t\t//cerrar();\r\n\t\t}\t\t\r\n\t\treturn true;\t\t\r\n\t}", "protected Object update(Object entity) {\r\n\r\n try {\r\n entityManager.getTransaction().begin();\r\n Object o = entityManager.merge(entity);\r\n entityManager.getTransaction().commit();\r\n return o;\r\n } catch (Exception e) {\r\n System.err.println(\"Erro ao atualizar Entidade \" + e.getMessage());\r\n }\r\n\r\n return null;\r\n }", "@Override\n public int save(T entity) {\n return mapper.insert(entity);\n }", "protected boolean save() {\r\n\t\tboolean saved=true;\r\n\t\tif(validated()){\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tsaved=false;\r\n\t\t}\r\n\t\treturn saved;\r\n\t}", "@Override\n\tprotected void updateEntityBeforeSave(final Entity entity) {\n\t\tif (entity instanceof PersistenceInterceptor) {\n\t\t\t((PersistenceInterceptor) entity).executeBeforePersistAction();\n\t\t}\n\t}", "public boolean save() {\n\t\tboolean isCreate = false;\n\t\tif(!validate() || !beforeSave(isCreate)){\n\t\t\treturn false;\n\t\t}\n\t\ttry {\n\t\t\tupdate();\n\t\t} catch (SQLException e) {\n\t\t\tnew Event(Event.getLeafLevelClassName(this), \"save\",\n\t\t\t\t\t\"SQL error while saving: \" + e.toString(), Event.ERROR);\n\t\t\treturn false;\n\t\t}\n\t\tthis.setPersisted(true);\n\t\tafterSave(isCreate);\n\t\treturn true;\n\t}", "public abstract boolean isPersistent();", "@Override\n public boolean isAlreadyInDb () {\n try {\n load( idDevice );\n } catch ( EntityNotFoundException e ) {\n return false;\n }\n return true;\n }", "@Override\n\tpublic <S extends Audit> S save(S entity) {\n\t\treturn null;\n\t}", "@Override\n public boolean canBeMerged(AuditRefuseBackup o) {\n return true;\n }", "public boolean save() {\n executeCallbacks(CallbackType.BEFORE_SAVE);\n if (readOnly) throw new ReadOnlyException(getClass().getName() + \" is read only\");\n createOrUpdate();\n executeCallbacks(CallbackType.AFTER_SAVE);\n return true;\n }", "@Rollback(false)\r\n @Test\r\n public void testEntityMerge_Insert()\r\n {\n PersonDAO person = personFactory.blank();\r\n //Populate\r\n person.setName(\"New Person\");//a NON EXISTING person!\r\n //Add an EXISTING parent person\r\n PersonDAO parent = personFactory.blank();\r\n parent.setId(5);\r\n person.setParent(parent);\r\n\r\n //persist\r\n personFactory.merge(person);\r\n System.out.println(\"Person:\"+person);\r\n\r\n newId = person.getId();\r\n\r\n //-------------------------------------------------------------------------------------\r\n\r\n //dissect\r\n GenericDaoProxy<PersonDAO> dao = GenericDaoProxy.getDaoFromProxiedEntity(person);\r\n\r\n assertThat(dao.getCommonName(), is(\"person\"));\r\n assertThat(person.__identity(), is(dao.getIdentity()));\r\n\r\n //verify that modified fields are detected correctly and not cleared before transaction commit\r\n Set<String> modifiedFields = dao.getModifiedFields();\r\n assertThat(modifiedFields.size(),is(2));\r\n assertThat(modifiedFields.contains(\"name\"),is(true));\r\n assertThat(modifiedFields.contains(\"parent\"),is(true));\r\n\r\n assertThat(person.__revision(), is(-1L));//the default value (not yet updated to the new value (1))\r\n assertThat(dao.getData().get(\"__revision$new\"), is(0L));//verify the new entity revision is 0 (after merge)\r\n\r\n //verify raw data\r\n assertThat(dao.getData().get(\"name\"), is(\"New Person\"));\r\n assertThat(dao.getData().get(\"id$new\"), is(newId));\r\n }", "boolean hasAsyncPersistRequest();", "public default void checkPersisted(Object entity) {\n\t\tif (!getEntityManager().contains(entity)) {\n\t\t\tthrow new ProgrammingException(\"Method requires a persisted entity, transient passed\");\n\t\t}\n\t}", "@Override\n public SideDishEntity save(SideDishEntity entity) {\n return null;\n }", "public Saver save() {\n return new AugmentedSaver() {\n @Override\n protected void handleSave(Iterable<?> entities) {\n assertInTransaction();\n checkState(\n Streams.stream(entities).allMatch(Objects::nonNull), \"Can't save a null entity.\");\n checkProhibitedAnnotations(entities, NotBackedUp.class, VirtualEntity.class);\n ImmutableMap<Key<?>, ?> keysToEntities = uniqueIndex(entities, Key::create);\n TRANSACTION_INFO.get().putSaves(keysToEntities);\n }\n };\n }", "Entity save(Entity entity);", "@Override\r\n\tpublic Plate persist(Plate entity) {\n\t\treturn null;\r\n\t}", "public boolean canBeMerged(TAssignmentGradingAttachment entity) {\r\n\t\treturn true;\r\n\t}", "public abstract boolean store();", "@Override\n public Building save(Building entity) {\n return dao.save(entity);\n }", "public boolean isStore() { return _store; }", "@Override\n public boolean save()\n {\n return false;\n }", "E save(E entity);", "public boolean save() {\n return save(Datastore.fetchDefaultService(), false);\n }", "boolean hasEntity();", "boolean hasEntity();", "public boolean canSaveChanges() {\n return false;\n }", "public boolean canSaveChanges() {\n return false;\n }", "public boolean canSave()\n {\n return true;\n }", "public boolean canSave()\n {\n return true;\n }", "@Override\r\n\tpublic boolean addemp(EmployeeBean employeeBean) {\n\r\n\t\tEntityManager manager = entityManagerFactory.createEntityManager();\r\n\t\tEntityTransaction entityTransaction = manager.getTransaction();\r\n\t\tboolean isAdd = false;\r\n\t\ttry {\r\n\t\t\tentityTransaction.begin();\r\n\t\t\tmanager.persist(employeeBean);\r\n\t\t\tif(employeeBean != null) {\r\n\t\t\t\tentityTransaction.commit();\r\n\t\t\t\tisAdd=true;\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tisAdd = false;\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn isAdd;\r\n\t}", "alluxio.proto.journal.KeyValue.MergeStoreEntry getMergeStore();", "@Override\n\tpublic boolean isPersistent() {\n\t\treturn id != -1;\n\t}", "private Boolean persistRecords() {\n\t\t//Declarations\n\t\tBoolean persisted = false;\n\t\t\n\t\ttry{\t\t\t\t\t\n\t\t\t//Create the DB Handler\n\t\t\tDBHandler dbHandler = new DBHandler();\t\t\t\n\t\t\tDate date = new Date();\n\t\t\t\t\t\t\n\t\t\t//Set the updated time\n\t\t\t_medicalData.setUpdatedOn(date.toString());\n\t\t\t\n\t\t\t//Store the data to data store\n\t\t\tpersisted = dbHandler.storeData(_medicalData);\t\t\t\t\t\t\n\t\t}catch(Exception ex){\n\t\t\tpersisted = false;\n\t\t}\n\t\t\n\t\treturn persisted;\t\t\n\t}", "public abstract void saveOrUpdate(T entity);", "public void preDoSave(T entity)\n {\n }", "@Override\n\tpublic ResponsePersist persist(Produto entity, ProdutoService service, List<?> objects, Object role) {\n\t\treturn null;\n\t}", "@Override\n public void save()\n {\n// dao1.save();\n// dao2.save();\n }", "alluxio.proto.journal.KeyValue.MergeStoreEntryOrBuilder getMergeStoreOrBuilder();", "public void save() {\n if(persistenceType == PropertyPersistenceType.Persistent) {\n if (!isSetToDefault()) {\n permanentStore.setBoolean(key, get());\n } else {\n permanentStore.remove(key);\n }\n }\n }", "public void SaveVsPersist() {\n\t\tSession session = HibernateUtil.getSession();\n\t\tTransaction tx = null;\n\t\t\n\t\ttry{\n\t\t\ttx = session.beginTransaction();\n//\t\t\tItem item = new Item(\"Premium Water\", 900);\n//\t\t\titem.setShops(((Item)session.get(Item.class, 1)).getShops());\n//\t\t\t\n//\t\t\t\n//\t\t\tSystem.out.println( \"BEFORE SAVE: \" + item.getId());\n//\t\t\tSystem.out.println(\"-----SAVE-----\");\n//\t\t\tSystem.out.println(\"ID IS:\" + session.save(item));\n//\t\t\t//When saving we are returned the id.\n//\t\t\tSystem.out.println(\"AFTER SAVE:\" + item.getId());\n\t\t\t\n\n\t\t\t\n\t\t\tItem item2 = new Item(\"Deluxe Premium Super Awesome Bargain Water\", 12);\n\t\t\tSystem.out.println(\"-----persist-----\");\n\t\t\tSystem.out.println( \"BEFORE Persist: \" + item2.getId());\n\t\t\tsession.persist(item2);\n\t\t\tSystem.out.println(\"AFTER PERSIST:\" + item2.getId());\n\n\t\t\t//We are not guaranteed an ID right away, so we have to return nothing.\n\t\t\t\n\t\t\ttx.commit();\n\t\t\t\n\t\t}catch(HibernateException e){\n\t\t\tif(tx!=null){\n\t\t\t\ttx.rollback();\n\t\t\t}\n\t\t\te.printStackTrace();\n\t\t}finally{\n\t\t\tsession.close(); \n\t\t}\n\t}", "public static boolean updateStuff(Entity entity){\n\t\tDatastoreService datastore = DatastoreServiceFactory.getDatastoreService();\n\t\tKey key = datastore.put(entity);\n\t\tif (key != null){\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "boolean hasPersistent();", "public boolean getSave(){\n return this.didSave;\n }", "public void save() throws EntityPersistenceException {\n\n }", "@Override\n\tpublic T save(T entity) {\n\t\treturn getDao().save(entity);\n\t}", "public boolean canSave()\n\t{\n\t\treturn false;\n\t}", "public boolean save(Datastore store, WriteConcern concern) {\n return save(store, false, concern);\n }", "public boolean save(Datastore store) {\n return save(store, false);\n }", "public T doSave(T entity)\n {\n preDoSave(entity);\n session.saveOrUpdate(entity);\n postDoSave(entity);\n\n return entity;\n }", "@Override\n\tpublic void persist(Recipe entity) {\n\t\t\n\t}", "@Override\n\tpublic ResponsePersist persist(Produto entity, ProdutoService service, Object role) {\n\t\treturn null;\n\t}", "public void saveOrUpdate(T entity) {\n\t\t\n\t}", "public Boolean persistent();", "<S extends T> S save(S entity);", "<S extends T> S save(S entity);", "@Exclude\n public abstract void save();", "@Override\n\tpublic <S extends Translator> S saveAndFlush(S entity) {\n\t\treturn null;\n\t}" ]
[ "0.72734135", "0.67285013", "0.6246261", "0.61787426", "0.6159952", "0.6111735", "0.6106706", "0.6054858", "0.60272455", "0.6026947", "0.6023875", "0.5925287", "0.59011143", "0.58779144", "0.58719575", "0.5839548", "0.5833217", "0.58090156", "0.57850313", "0.5783167", "0.57565975", "0.57475966", "0.5742799", "0.56798714", "0.56717324", "0.5658685", "0.56428474", "0.5641516", "0.5641144", "0.564035", "0.5636527", "0.5635294", "0.56209946", "0.5619956", "0.5610607", "0.56058675", "0.55971617", "0.5588287", "0.5587332", "0.5585157", "0.5577204", "0.5571001", "0.55699515", "0.55681616", "0.55523753", "0.555206", "0.55493605", "0.55492777", "0.55487496", "0.55375665", "0.55289537", "0.55253065", "0.5515165", "0.550892", "0.55077404", "0.5496143", "0.5490042", "0.54865086", "0.54850143", "0.547747", "0.5463943", "0.54533243", "0.5448389", "0.5428159", "0.5425476", "0.54247445", "0.5418085", "0.5418085", "0.5415604", "0.5415604", "0.5407803", "0.5407803", "0.5390738", "0.53832406", "0.53800863", "0.53695685", "0.5365512", "0.53637415", "0.5361069", "0.5348005", "0.53444695", "0.5342939", "0.5342295", "0.53363186", "0.53268915", "0.5320384", "0.53134996", "0.53101003", "0.5305694", "0.5305085", "0.53005946", "0.52981496", "0.52952117", "0.5293087", "0.5289995", "0.5286797", "0.5285013", "0.5285013", "0.5282048", "0.5272481" ]
0.572282
23
/ renamed from: a
public Callback mo16235a() { return (Callback) this.f8227a.get(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }", "interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }", "public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}", "public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }", "public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }", "public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}", "public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }", "interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }", "public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }", "public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }", "private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }", "protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }", "public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }", "private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }", "public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }", "public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}", "public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}", "public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }", "public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }", "public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }", "public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }", "public void a() {\n ((a) this.a).a();\n }", "public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }", "public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}", "public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}", "public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }", "@Override\r\n\tpublic void a() {\n\t\t\r\n\t}", "public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}", "public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}", "public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}", "public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}", "interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}", "public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}", "public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}", "public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }", "@Override\n\tpublic void a() {\n\t\t\n\t}", "public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}", "void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}", "public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}", "public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }", "public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}", "public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}", "public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }", "public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}", "public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}", "public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}", "public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}", "public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }", "public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}", "public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}", "public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}", "public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }", "public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}", "public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}", "public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}", "public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}", "public void acionou(int a){\n\t\t\tb=a;\n\t\t}", "public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}", "public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }", "public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}", "public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }", "public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }", "public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }", "public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }", "public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }", "public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}", "public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}", "public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }", "public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}", "protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }", "public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }", "public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }", "public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }", "public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }", "public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }", "public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}", "public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}", "public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}", "public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }", "public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }", "interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }", "public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}", "public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }", "private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }", "interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }" ]
[ "0.62497115", "0.6242887", "0.61394435", "0.61176854", "0.6114027", "0.60893", "0.6046901", "0.6024682", "0.60201293", "0.5975212", "0.59482527", "0.59121317", "0.5883635", "0.587841", "0.58703005", "0.5868436", "0.5864884", "0.5857492", "0.58306104", "0.5827752", "0.58272064", "0.5794689", "0.57890314", "0.57838726", "0.5775679", "0.57694733", "0.5769128", "0.57526815", "0.56907034", "0.5677874", "0.5670547", "0.56666386", "0.56592244", "0.5658682", "0.56574154", "0.5654324", "0.5644676", "0.56399715", "0.5638734", "0.5630582", "0.56183887", "0.5615435", "0.56069666", "0.5605207", "0.56005067", "0.559501", "0.55910283", "0.5590222", "0.55736613", "0.5556682", "0.5554544", "0.5550076", "0.55493855", "0.55446684", "0.5538079", "0.5529058", "0.5528109", "0.552641", "0.5525864", "0.552186", "0.5519972", "0.5509587", "0.5507195", "0.54881203", "0.5485328", "0.54826045", "0.5482066", "0.5481586", "0.5479751", "0.54776895", "0.54671466", "0.5463307", "0.54505056", "0.54436916", "0.5440517", "0.5439747", "0.5431944", "0.5422869", "0.54217863", "0.5417556", "0.5403905", "0.5400223", "0.53998446", "0.5394735", "0.5388649", "0.5388258", "0.5374842", "0.5368887", "0.53591394", "0.5357029", "0.5355688", "0.535506", "0.5355034", "0.53494394", "0.5341044", "0.5326166", "0.53236824", "0.53199095", "0.53177035", "0.53112453", "0.5298229" ]
0.0
-1
Busca os id das respostas relacionadas com palavras chaves
public ArrayList<Resposta> searchPchave_has_resp(ArrayList<PalavraChave> relatedKey){ System.out.println("aquii--------" + relatedKey.size()); ArrayList<PchaveHasResposta> keyHasResp = new ArrayList<PchaveHasResposta>(); //pegando dados da tabela palavra chave PchaveHasRespService service = new PchaveHasRespService(); ArrayList<PchaveHasResposta> db_PchaveHasResp = new ArrayList<PchaveHasResposta>(); db_PchaveHasResp.addAll(service.listarPchaveHasResp()); for(int i = 0; i < relatedKey.size(); i++) { for(int j = 0; j < db_PchaveHasResp.size(); j++) { // System.out.println(c.getPchaveHasResp().get(j).getIdResp()); if(relatedKey.get(i).getIdPchave() == db_PchaveHasResp.get(j).getIdPchave()) { keyHasResp.add(db_PchaveHasResp.get(j)); } } } return searchResp(keyHasResp); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void onGetAllIdentitet(Event<FintResource> responseEvent) {\n Identifikator batmanId = new Identifikator();\n batmanId.setIdentifikatorverdi(\"BATMAN\");\n Identitet batman = new Identitet();\n batman.setSystemId(batmanId);\n responseEvent.addData(FintResource\n .with(batman)\n .addRelations(new Relation.Builder().with(Identitet.Relasjonsnavn.PERSONALRESSURS).forType(Personalressurs.class).field(\"ansattnummer\").value(\"100001\").build())\n .addRelations(new Relation.Builder().with(Identitet.Relasjonsnavn.RETTIGHET).forType(Rettighet.class).field(\"systemid\").value(\"BATCAVE\").build())\n .addRelations(new Relation.Builder().with(Identitet.Relasjonsnavn.RETTIGHET).forType(Rettighet.class).field(\"systemid\").value(\"BATMOBILE\").build()));\n\n Identifikator robinId = new Identifikator();\n robinId.setIdentifikatorverdi(\"ROBIN\");\n Identitet robin = new Identitet();\n robin.setSystemId(robinId);\n responseEvent.addData(FintResource\n .with(robin)\n .addRelations(new Relation.Builder().with(Identitet.Relasjonsnavn.PERSONALRESSURS).forType(Personalressurs.class).field(\"ansattnummer\").value(\"100002\").build())\n .addRelations(new Relation.Builder().with(Identitet.Relasjonsnavn.RETTIGHET).forType(Rettighet.class).field(\"systemid\").value(\"BATCAVE\").build()));\n }", "private List<Integer> findAllId(EntityManager em) {\n TypedQuery<Permesso> permessoQuery = em.createQuery(\"SELECT c FROM com.hamid.entity.Permesso c\", Permesso.class);\n List<Permesso> permessoRes = permessoQuery.getResultList();\n List<Integer> p_id = new ArrayList<Integer>();\n for (Permesso p : permessoRes) {\n int p_id1 = p.getPermesso_id();\n p_id.add(p_id1);\n }\n return p_id;\n }", "public static ArrayList<Krediti> idPoiskKrediti() {\r\n\t\tArrayList<Krediti> foundKrediti = new ArrayList<Krediti>();\r\n\t\tint i = 0;\r\n\t\tScanner n = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Vvedite Id\");\r\n\t\tint t = n.nextInt();// number of rooms\r\n\t\tfor (Krediti kredit : kred) {\r\n\t\t\tif (kredit.getId() == t) {\r\n\t\t\t\tfoundKrediti.add(kredit);\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn foundKrediti;\r\n\t}", "private static void idVorhanden() {\n\t\tLinkedHashSet<String> genre = new LinkedHashSet<String>();\t\t\t// benötigt, um duplikate von genres zu entfernen\n\t\tLinkedHashSet<String> darsteller = new LinkedHashSet<String>();\t\t// benötigt, um duplikate von darstellern zu entfernen\n\t\tString kinofilm = \"\";\t\t\t\t\t\t\t\t\t\t\t\t// benötigt für die Ausgabe des Filmtitels und Jahr\n\t\t\n\t\tsetSql(\"SELECT g.GENRE, m.TITLE, m.YEAR, mc.CHARACTER, p.NAME from Movie m JOIN MOVgen MG ON MG.MOVIEID = M.MOVIEID right JOIN GENRE G ON MG.GENREID = G.GENREID\\n\"\n\t\t\t\t\t+ \"\t\t\t\tright JOIN MOVIECHARACTER MC ON M.MOVIEID = MC.MOVIEID JOIN PERSON P ON MC.PERSONID = P.PERSONID\\n\"\n\t\t\t\t\t+ \"\t\t\t\tWHERE M.MOVIEID = \" + movieID);\t// SQL Abfrage, um Genre, Title, Year, Character und Name eines Films zu bekommen\n\t\t\n\t\tsqlAbfrage();\t\t\t\t\t\t\t\t\t// SQL Abfrage ausführen und Ergebnis im ResultSet speichern\n\t\t\n\t\ttry {\n\t\t\n\t\t\tif(!rs.next()) {\t\t\t\t\t\t\t// prüfe, ob das ResultSet leer ist\n\t\t\t\tSystem.out.println();\n\t\t\t\tSystem.out.println(\"MovieID ungültig. Bitte eine der folgenden MovieID's angeben: \"); // Meldung ausgeben, dass ID ungültig ist\n\t\t\t\tidProblem();\t\t\t\t\t\t\t// wenn movieID nicht vorhanden, führe idProblem() aus, um mögliche Filme anzuzeigen\n\t\t\t} else {\n\t\t\t\trs.isBeforeFirst();\t\t\t\t\t\t// Durch die if-Abfrage springt der Cursor des ResultSets einen weiter und muss zurück auf die erste Stelle\n\t\t\t\twhile (rs.next()) {\t\t\t\t\t\t// Zeilenweises durchgehen des ResultSets \"rs\"\n\t\t\t\t\t/*\n\t\t\t\t\t * Aufbau des ResultSets \"rs\":\n\t\t\t\t\t * eine oder mehrere Zeilen mit folgenden Spalten:\n\t\t\t\t\t * GENRE | TITLE | YEAR | CHARACTER | NAME\n\t\t\t\t\t * (1) (2) (3) (4) (5)\n\t\t\t\t\t */\n\t\t\t\t\tgenre.add(rs.getString(1));\t\t\t\t\t\t\t\t\t\t\t// speichern und entfernen der Duplikate der Genres in \"genre\"\n\t\t\t\t\tkinofilm = (rs.getString(2) + \" (\" + rs.getString(3) + \")\");\t\t// Speichern des Filmtitels und des Jahrs in \"kinolfilm\"\n\t\t\t\t\tdarsteller.add(rs.getString(4) + \": \" + rs.getString(5));\t\t\t// speichern und entfernen der Duplikate der Darsteller in \"darsteller\"\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\t * Zur besseres Ausgabe, werden die LinkedHashSets in ArrayLists übertragen\n\t\t\t\t * Grund: Es ist nicht möglich auf einzelne, bestimmte Elemente des HashSets zuzugreifen.\n\t\t\t\t * Bedeutet: HashSet.get(2) existiert nicht, ArrayList.get(2) existiert.\n\t\t\t\t */\n\t\t\t\tArrayList<String> genreArrayList = new ArrayList<String>();\n\t\t\t\t\tfor (String s : genre) {\n\t\t\t\t\t\tgenreArrayList.add(s);\n\t\t\t\t\t}\n\n\t\t\t\tArrayList<String> darstellerArrayList = new ArrayList<String>();\n\t\t\t\t\tfor (String s : darsteller) {\n\t\t\t\t\t\tdarstellerArrayList.add(s);\n\t\t\t\t\t}\n\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t * Ausgabe der Kinofilm Daten nach vorgegebenen Format:\n\t\t\t\t\t\t\t * \n\t\t\t\t\t\t\t * Kinofilm: Filmtitel (Year)\n\t\t\t\t\t\t\t * Genre: ... | ... | ..\n\t\t\t\t\t\t\t * Darsteller:\n\t\t\t\t\t\t\t * Character: Name\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\tSystem.out.println();\t\t\t\t\t\t\t\t// erzeugt Leerzeile\n\t\t\t\t\t\t\tSystem.out.println(\"Kinofilme: \" + kinofilm);\t\t// Ausgabe: Kinofilm: Filmtitel (Year)\n\t\t\t\t\t\t\tSystem.out.print(\"Genre: \" + genreArrayList.get(0)); // Ausgabe des ersten Genres, vermeidung des Zaunpfahlproblems\n\n\t\t\t\t\t\t\tfor (int i = 1; i < genreArrayList.size(); i++) {\t\t// Ausgabe weiterer Genres, solange es weitere Einträge in\t\n\t\t\t\t\t\t\t\tSystem.out.print(\" | \" + genreArrayList.get(i)); \t// der ArrayList \"genreArrayList\" gibt\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tSystem.out.println();\t\t\t\t\t\t\t\t// erzeugt Leerzeile\n\t\t\t\t\t\t\tSystem.out.println(\"Darsteller:\");\t\t\t\t\t// Ausgabe: Darsteller:\n\t\t\t\t\t\t\tfor (int i = 0; i < darstellerArrayList.size(); i++) {\t// Ausgabe der Darsteller, solange es\n\t\t\t\t\t\t\t\tSystem.out.println(\" \" + darstellerArrayList.get(i));\t// Darsteller in der \"darstellerArrayList\" gibt\n\t\t\t\t\t\t\t}\t\t\t\n\t\t\t}\n\t\t\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(e); // Ausgabe Fehlermeldung\n\t\t}\n\t}", "public ArrayList<Note> pedirTodasLasNotasPorTratamiento(int id){\n ArrayList<Note> todasLasNotas = new ArrayList<>();\n Note nota;\n HashMap<Integer,String> misNotas = new HashMap<Integer,String>();\n ArrayList<String> tituloTratamiento = new ArrayList<String>();\n String[] campos = {\"_id\",\"titulo\",\"fecha\"};\n String[] argumentos = {Integer.toString(id)};\n Cursor c = db.query(\"nota\",campos,\"examenAsociado=?\",argumentos,null,null,null);\n if(c.moveToFirst()){\n do{\n nota = new Note();\n nota.setId(c.getInt(0));\n nota.setTitulo(c.getString(1));\n nota.setFechaFormateada(c.getString(2));\n todasLasNotas.add(nota);\n }while(c.moveToNext());\n return todasLasNotas;\n }\n return null;\n }", "public static ArrayList<Vkladi> idPoiskVkladi() {\r\n\t\tArrayList<Vkladi> foundVkladi = new ArrayList<Vkladi>();\r\n\r\n\t\tint i = 0;\r\n\t\tScanner n = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Vvedite Id\");\r\n\t\tint t = n.nextInt();\r\n\t\tfor (Vkladi vkla : vklad) {\r\n\t\t\tif (vkla.getId() == t) {\r\n\t\t\t\tfoundVkladi.add(vkla);\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn foundVkladi;\r\n\t}", "public java.lang.Integer getId_rango();", "long getPokemonId();", "public NominaPuesto[] findWhereIdPuestoEquals(int idPuesto) throws NominaPuestoDaoException;", "@Override\n\tpublic ArrayList<Risposta> getRisposte(int id) {\n\t\tDB db = getDB();\n\t\tArrayList<Risposta> risposte = new ArrayList<Risposta>();\n\t\tMap<Long, Risposta> list = db.getTreeMap(\"risposte\");\n\t\tfor(Map.Entry<Long, Risposta> risposta : list.entrySet())\n\t\t\tif(risposta.getValue() instanceof Risposta) {\n\t\t\t\tif(risposta.getValue().getDomandaID() == id)\n\t\t\t\t\trisposte.add((Risposta)risposta.getValue());\n\t\t\t}\n\t\treturn risposte;\n\t}", "public Integer getIdRespuesta() {\n return idRespuesta;\n }", "public static void actualizarCreencias(int id) {\n\t\tint j =0;\t\t\n\t\t//Actualizamos las creecias del jugador \n\t\tint i =0;\n\t\tfor(j =0; j < GestorPartida.getContJugadores();j++) {\n\t\t\t\n\t\t\t\n\t\t\tif(GestorPartida.getJugadores()[j].getId() != id) {\n\t\t\t\t//Filtramos que los jugadores que vayan a actualizar sus creencias sean los de la sala del jugador que acaba de realizar una accion, excepto las suyas propias\t\t\t\n\t\t\t\tif(GestorPartida.getJugadores()[j].getSala().equalsIgnoreCase(GestorPartida.getJugadores()[id].getSala()) && GestorPartida.getJugadores()[j].getId() != id) {\n\t\t\t\t\t//Actualizamos la sala por si el jugador se acaba de mover\n\t\t\t\t\tGestorPartida.getJugadores()[id].getCreencias().setSalaPersona(GestorPartida.getJugadores()[j].getSala(), i);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\t\t\n\t\tfor(j = 0; j < GestorPartida.getContObjetosJugador();j++) {\n\t\t\t//Comprobamos que el jugador coincida con un poseedor de un objeto\n\t\t\tif(GestorPartida.getObjetoJugador()[j].getJugador().getSala().equalsIgnoreCase(GestorPartida.getJugadores()[id].getSala())) {\n\t\t\t\tfor(int x =0; GestorPartida.getJugadores()[id].getCreencias().getNombreObjeto()[x]!=null ; x++) {\n\t\t\t\t\t//Cogemos la posicion del objeto donde esta el objeto dentro de las creencias\n\t\t\t\t\tif(GestorPartida.getJugadores()[id].getCreencias().getNombreObjeto()[x].equalsIgnoreCase(GestorPartida.getObjetoJugador()[j].getNombreObjeto())) {\n\t\t\t\t\t\tGestorPartida.getJugadores()[id].getCreencias().setLugarObjeto(GestorPartida.getObjetoJugador()[j].getJugador().getNombre(), x);\n\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\tfor(j = 0; j < GestorPartida.getContObjetosSala();j++) {\n\t\t\t//Comprobamos si hay objetos en la sala del jugador\n\t\t\tif(GestorPartida.getObjetoSala()[j].getSala().getNombre().equalsIgnoreCase(GestorPartida.getJugadores()[id].getSala())) {\n\t\t\t\tfor(int x =0; GestorPartida.getJugadores()[id].getCreencias().getNombreObjeto()[x]!=null ; x++) {\n\t\t\t\t\t//Cogemos la posicion del objeto donde esta el objeto dentro de las creencias\n\t\t\t\t\tif(GestorPartida.getJugadores()[id].getCreencias().getNombreObjeto()[x].equalsIgnoreCase(GestorPartida.getObjetoSala()[j].getNombreObjeto())) {\n\t\t\t\t\t\tGestorPartida.getJugadores()[id].getCreencias().setLugarObjeto(GestorPartida.getObjetoSala()[j].getSala().getNombre(), x);\n\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\t\n\t\t\n\t}", "public RelacionConceptoEmbalaje[] findWhereIdRelacionEquals(int idRelacion) throws RelacionConceptoEmbalajeDaoException;", "RespuestaRest<ParqueaderoEntidad> consultar(String id);", "public Result all(String id);", "private void onGetAllRettighet(Event<FintResource> responseEvent) {\n Identifikator batcaveId = new Identifikator();\n batcaveId.setIdentifikatorverdi(\"BATCAVE\");\n Rettighet batcave = new Rettighet();\n batcave.setSystemId(batcaveId);\n batcave.setNavn(\"Batcave\");\n batcave.setKode(\"BAT-002\");\n batcave.setBeskrivelse(\"Grants access to the secret cave\");\n responseEvent.addData(FintResource\n .with(batcave)\n .addRelations(new Relation.Builder().with(Rettighet.Relasjonsnavn.IDENTITET).forType(Identitet.class).field(\"systemid\").value(\"BATMAN\").build())\n .addRelations(new Relation.Builder().with(Rettighet.Relasjonsnavn.IDENTITET).forType(Identitet.class).field(\"systemid\").value(\"ROBIN\").build())\n );\n\n Identifikator batmobileId = new Identifikator();\n batmobileId.setIdentifikatorverdi(\"BATMOBILE\");\n Rettighet batmobile = new Rettighet();\n batmobile.setSystemId(batmobileId);\n batmobile.setKode(\"BAT-001\");\n batmobile.setNavn(\"Batmobile\");\n batmobile.setBeskrivelse(\"Grants access to driving the ultimate vehicle\");\n responseEvent.addData(FintResource.with(batmobile)\n .addRelations(new Relation.Builder().with(Rettighet.Relasjonsnavn.IDENTITET).forType(Identitet.class).field(\"systemid\").value(\"BATMAN\").build())\n );\n }", "public int getIdPermisos()\r\n\t{\r\n\t\treturn idPermisos;\r\n\t}", "protected void podesiIDPredstave(String nazivPredstave) {\n\t\tfor (Predstave p:Kontroler.getInstanca().vratiRepertoar())\r\n\t\t\tif(p.getNazivPredstave().equals(nazivPredstave))\r\n\t\t\t\tID_Pred=p.getId();\r\n\t}", "public int[] getAllId(int id) {\n int[] ids = new int[50];\n int i = 0;\n String sql= \"select * from photo where id_annonce = \"+id;\n Cursor cursor = this.getReadableDatabase().rawQuery(sql, null);\n if (cursor.moveToFirst())\n do {\n ids[i] = cursor.getInt(cursor.getColumnIndex(\"id_photo\"));\n i++;\n }while (cursor.moveToNext());\n cursor.close();\n return ids;\n }", "public List<Integer> findAllPaintersId();", "@Test\r\n\tpublic void testGetId() {\r\n\t\tassertEquals(1, breaku1.getId());\r\n\t\tassertEquals(2, externu1.getId());\r\n\t\tassertEquals(3, meetingu1.getId());\r\n\t\tassertEquals(4, teachu1.getId());\r\n\t}", "public void guarda_respuestas() throws SQLException {\n pdb = new PreguntasDB();\n xrdb = new x_respuestasDB();\n int p1 = 0, p2 = 0, p3 = 0, p4 = 0, p5 = 0, p6 = 0, p7 = 0, p8 = 0, p9 = 0, p10 = 0;\n int p11 = 0, p12 = 0, p13 = 0, p14 = 0, p15 = 0, p16 = 0, p17 = 0, p18 = 0, p19 = 0, p20 = 0;\n String r1 = \"\", r2 = \"\", r3 = \"\", r4 = \"\", r5 = \"\", r6 = \"\", r7 = \"\", r8 = \"\", r9 = \"\", r10 = \"\",\n r11 = \"\", r12 = \"\", r13 = \"\", r14 = \"\", r15 = \"\", r16 = \"\", r17 = \"\", r18 = \"\", r19 = \"\", r20 = \"\";\n p1 = pdb.obtener_id(v.getLblPregunta1().getText(), 1);\n System.out.println(p1);\n r1 = v.getCbxPregunta1().getSelectedItem().toString();\n System.out.println(\"-------\" + r1);\n //----------------------------------------------------------------------\n p2 = pdb.obtener_id(v.getLblPregunta2().getText(), 1);\n System.out.println(p2);\n r2 = v.getCbxPregunta2().getSelectedItem().toString();\n //---------------------------------------------------------------------\n p3 = pdb.obtener_id(v.getLblPregunta3().getText(), 1);\n System.out.println(p3);\n r3 = v.getCbxPregunta3().getSelectedItem().toString();\n //---------------------------------------------------------------------\n p4 = pdb.obtener_id(v.getLblPregunta4().getText(), 1);\n System.out.println(p4);\n r4 = v.getCbxPregunta4().getSelectedItem().toString();\n //---------------------------------------------------------------------\n p5 = pdb.obtener_id(v.getLblPregunta5().getText(), 1);\n System.out.println(p5);\n r5 = v.getCbxPregunta5().getSelectedItem().toString();\n //---------------------------------------------------------------------\n p6 = pdb.obtener_id(v.getLblPregunta6().getText(), 1);\n System.out.println(p6);\n r6 = v.getCbxPregunta6().getSelectedItem().toString();\n //---------------------------------------------------------------------\n p7 = pdb.obtener_id(v.getLblPregunta7().getText(), 1);\n System.out.println(p7);\n r7 = v.getCbxPregunta7().getSelectedItem().toString();\n //---------------------------------------------------------------------\n p8 = pdb.obtener_id(v.getLblPregunta8().getText(), 1);\n System.out.println(p8);\n r8 = v.getCbxPregunta8().getSelectedItem().toString();\n //---------------------------------------------------------------------\n p9 = pdb.obtener_id(v.getLblPregunta9().getText(), 1);\n System.out.println(p9);\n r9 = v.getCbxPregunta9().getSelectedItem().toString();\n //---------------------------------------------------------------------\n p10 = pdb.obtener_id(v.getLblPregunta10().getText(), 1);\n System.out.println(p10);\n r10 = v.getCbxPregunta10().getSelectedItem().toString();\n //---------------------------------------------------------------------\n p11 = pdb.obtener_id(v.getLblPregunta11().getText(), 1);\n System.out.println(p11);\n r11 = v.getCbxPregunta11().getSelectedItem().toString();\n //---------------------------------------------------------------------\n p12 = pdb.obtener_id(v.getLblPregunta12().getText(), 1);\n System.out.println(p12);\n r12 = v.getCbxPregunta12().getSelectedItem().toString();\n //---------------------------------------------------------------------\n p13 = pdb.obtener_id(v.getLblPregunta13().getText(), 1);\n System.out.println(p13);\n r13 = v.getCbxPregunta13().getSelectedItem().toString();\n //---------------------------------------------------------------------\n p14 = pdb.obtener_id(v.getLblPregunta14().getText(), 1);\n System.out.println(p14);\n r14 = v.getCbxPregunta14().getSelectedItem().toString();\n //---------------------------------------------------------------------\n p15 = pdb.obtener_id(v.getLblPregunta15().getText(), 1);\n System.out.println(p15);\n r15 = v.getCbxPregunta15().getSelectedItem().toString();\n //---------------------------------------------------------------------\n p16 = pdb.obtener_id(v.getLblPregunta16().getText(), 1);\n System.out.println(p16);\n r16 = v.getCbxPregunta16().getSelectedItem().toString();\n //---------------------------------------------------------------------\n p17 = pdb.obtener_id(v.getLblPregunta17().getText(), 1);\n System.out.println(p17);\n r17 = v.getCbxPregunta17().getSelectedItem().toString();\n //---------------------------------------------------------------------\n p18 = pdb.obtener_id(v.getLblPregunta18().getText(), 1);\n System.out.println(p18);\n r18 = v.getCbxPregunta18().getSelectedItem().toString();\n //---------------------------------------------------------------------\n p19 = pdb.obtener_id(v.getLblPregunta19().getText(), 1);\n System.out.println(p19);\n r19 = v.getCbxPregunta19().getSelectedItem().toString();\n //---------------------------------------------------------------------\n p20 = pdb.obtener_id(v.getLblPregunta20().getText(), 1);\n System.out.println(p20);\n r20 = v.getCbxPregunta20().getSelectedItem().toString();\n //------------------------------------------------------------------------------------------------------------------------------------------\n xrdb.insert_x_respuesta_r1(EncuestaDB.getEncuesta_codigo_static(), p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,\n r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15, r16, r17, r18, r19, r20);\n\n }", "public void aceptarPresupuesto(Long idPresupuesto) {\n\n Presupuesto presupuesto = buscarPresupuesto(idPresupuesto);\n\n EstadoPresupuesto estadoAceptado = estadoPresupuestoRepository\n .findByNombreEstado(globales.NOMBRE_ESTADO_PRESUPUESTO_ACEPTADO);\n if (presupuesto.getEstadoPresupuesto().equals(estadoAceptado)) {\n\n // este presupuesto ya fue aceptado\n // avisar por pantalla la fecha de aceptacion\n LocalDate fechaAceptado = presupuesto.getFechaAceptado();\n\n } else {\n // cambio el estado del presupuesto a aceptado y tambien del pedido de repuesto\n EstadoPresupuesto estadoCreado = estadoPresupuestoRepository\n .findByNombreEstado(globales.NOMBRE_ESTADO_PRESUPUESTO_CREADO);\n if (presupuesto.getEstadoPresupuesto().equals(estadoCreado)) {\n\n presupuesto.setEstadoPresupuesto(estadoAceptado);\n presupuesto.setFechaAceptado(LocalDate.now());\n\n EstadoPedidoRepuesto estadoPendienteDePedido = estadoPedidoRepuestoRepository\n .findByNombreEstado(globales.NOMBRE_ESTADO_PEDIDO_REPUESTO_PENDIENTE_DE_PEDIDO);\n\n PedidoRepuesto pedido = pedidoRepuestoRepository.findByPresupuesto(presupuesto);\n\n pedido.setEstadoPedidoRepuesto(estadoPendienteDePedido);\n\n // GUARDAR\n pedidoRepuestoRepository.save(pedido);\n }\n }\n }", "public void pesquisarId(Integer id) {\n\t\t\n\t}", "public Cliente[] findWhereIdVendedorConsignaEquals(int idVendedorConsigna) throws ClienteDaoException;", "public void peleaEn(int idPeleador,int idEmpresa){\n\t\t\n\t}", "private void getAllIds() {\n try {\n ArrayList<String> NicNumber = GuestController.getAllIdNumbers();\n for (String nic : NicNumber) {\n combo_nic.addItem(nic);\n\n }\n } catch (Exception ex) {\n Logger.getLogger(ModifyRoomReservation.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public long getVocubalaryId();", "int getOtherIds(int index);", "@GetMapping(\n\t\t\tvalue=\"/bioskopi/ukloni/{id}\",\n\t\t\tproduces = MediaType.APPLICATION_JSON_VALUE)\n\tpublic ResponseEntity<BioskopDTO> ukloni(@PathVariable(name=\"id\") Long id){/*patvariable dovablja id od bioskopa (this.id iz jsa)*/\n\t\tBioskop b=this.bioskopService.findOne(id);\n\t\tif(b==null) {\n\t\t\treturn new ResponseEntity<>(HttpStatus.NOT_FOUND);\n\t\t}\n\t\t\n\t\tBioskopDTO bioskop=new BioskopDTO(b.getId(), b.getNaziv(), b.getAdresa(), b.getBrojCentrale(), b.getEMail());\n\t\t/*prolazi kroz projekcije sale i sve brise i na kraju obrise tu salu*/\n\t\tSet<Sala> sale=b.getSale();\n\t\tfor (Sala sala : sale) {\n\t\t\tList<Terminski_raspored> projekcije=sala.getProjekcije();\n\t\t\tfor (Terminski_raspored t : projekcije) {\n\t\t\t\tSet<Gledalac> gledaoci=t.getGledaoci_koji_su_rezervisali_film();\n\t\t\t\tfor (Gledalac g : gledaoci) {\n\t\t\t\t\tif(g.getRezervisani_filmovi().contains(t)) {\n\t\t\t\t\t\tg.getRezervisani_filmovi().remove(t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tSet<Raspored_filmova> rasporedi=t.getRasporedi();\n\t\t\t\tfor(Raspored_filmova r:rasporedi) {\n\t\t\t\t\tthis.raspored_filmovaService.delete(t.getId());\n\t\t\t\t}\n\t\t\t\t//this.terminski_rasporedService.delete(t.getId());\n\t\t\t}\n\t\t\tthis.salaservice.deleteById(sala.getId());\n\t\t}\n\t\tthis.bioskopService.delete(id); \n\t\t\n\t\t\n\t\treturn new ResponseEntity<>(bioskop,HttpStatus.OK);\n\t}", "public String getResouceId() {\n return id;\n }", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "public Paises obtenerPaisPorID(Integer txtPais);", "public List<Ve> getAllVe(long idKhachHang);", "private Object saveGivens() {\n List<String> out = new ArrayList<>();\n for(UUID id : givenEmpty) {\n out.add(id.toString());\n }\n return out;\n }", "public int getId() {return id;}", "public int getIdpres() {\r\n return idpres;\r\n }", "public Ruta[] findWhereIdRutaEquals(int idRuta) throws RutaDaoException;", "public int getId()\r\n/* 75: */ {\r\n/* 76:110 */ return this.idAutorizacionDocumentoPuntoDeVentaAutoimpresorSRI;\r\n/* 77: */ }", "private void seePerso() {\n\t\tfor (int i = 0; i < persoList.size(); i++) {\n\t\t\tPersonnage perso = persoList.get(i);\n\t\t\tSystem.out.println(\"id : \" + i);\n\t\t\tSystem.out.println(perso);\n\t\t}\n\n\t\tSystem.out.println(\"souhaitez vous modifier un personnage ? o/n\");\n\t\tif (sc.nextLine().toLowerCase().contentEquals(\"o\")) {\n\t\t\tSystem.out.println(\"Lequel ? id\");\n\t\t\tint id = sc.nextInt();\n\t\t\tsc.nextLine();\n\t\t\tchangePerso(id);\n\t\t}\n\t}", "@Override\n public int hashCode() {\n return Objects.hashCode(getId());\n }", "public int getId(){return id;}", "public int getIdReceta() {\r\n return idReceta;\r\n }", "private boolean idSaoIguais(Service servico, Service servicoAComparar) {\n return servico.getId() == servicoAComparar.getId();\n }", "public Pregunta getPregunta(int id);", "public Integer getIdLocacion();", "@Override\n\tpublic int compareTo(Resposta r) {\n\t\treturn this.id.compareTo(r.getId());\n\t}", "public String getId_Pelanggan(){\r\n \r\n return id_pelanggan;\r\n }", "public void getIdForDel(int rID, int fID, int vID){\n recipeID = rID;\n foodID = fID;\n vitaminID = vID;\n }", "public int getId()\r\n/* 208: */ {\r\n/* 209:381 */ return this.idCargaEmpleado;\r\n/* 210: */ }", "@Override\n public Pessoa buscar(int id) {\n try {\n for (Pessoa p : pessoa.getPessoas()){\n if(p.getCodPessoa()== id){\n return p;\n }\n }\n } catch (Exception ex) {\n Logger.getLogger(AnimalDAO.class.getName()).log(Level.SEVERE, null, ex);\n }\n return null;\n }", "public abstract java.lang.Long getId_causal_peticion();", "public String getId(){return id;}", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "private HashMap<String, String> getAnswerCodesByID(String id, boolean oth)\n\t{\n\t\tHashMap<String, String> ans_map = new HashMap<String, String>();\n\t\tNode ans_l10ns = doc.selectSingleNode(\"//document/answer_l10ns/rows\");\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList<Element> a_meta = doc.selectNodes(\"//document/answers/rows/row[qid=\" + id + \"]\");\n\t\tfor (Element elem : a_meta) {\n\t\t\tans_map.put(elem.elementText(\"code\"), ans_l10ns.selectSingleNode(\"row[aid=\" + elem.elementText(\"aid\") + \"]/answer\").getText());\n\t\t}\n\n\t\tif (oth) {\n\t\t\tans_map.put(\"-oth-\", \"other\");\n\t\t}\n\t\treturn ans_map;\n\t}", "public List getAllIds();", "public int id() {return id;}", "public Integer pesquisarIdContaRetificada(Integer idImovel,\tint anoMesReferenciaConta) throws ErroRepositorioException;", "public RelacionConceptoEmbalaje[] findWhereIdConceptoEquals(int idConcepto) throws RelacionConceptoEmbalajeDaoException;", "public abstract ObjectId[] prenota(List<T> listToAdd, ObjectId idVolo) throws FlightNotFoundException, SeatsSoldOutException;", "long buscarAnterior(long id);", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();" ]
[ "0.5484237", "0.54693043", "0.5381854", "0.5381352", "0.5366147", "0.5349472", "0.53458357", "0.5310466", "0.52922523", "0.5273349", "0.52651155", "0.52496755", "0.5205732", "0.51789874", "0.5167011", "0.5164518", "0.51619035", "0.5158148", "0.5143025", "0.5125993", "0.5118633", "0.5097454", "0.5097221", "0.5096813", "0.5096162", "0.509011", "0.50841236", "0.5082786", "0.5082362", "0.5082294", "0.5080204", "0.5055177", "0.5055177", "0.5055177", "0.5055177", "0.5055177", "0.5055177", "0.5055177", "0.5055177", "0.5055177", "0.5055177", "0.5055177", "0.5055177", "0.5055177", "0.5055177", "0.5055177", "0.5055177", "0.5055177", "0.5055177", "0.5055177", "0.50501496", "0.5046799", "0.5038176", "0.50321794", "0.50312215", "0.50275904", "0.5025359", "0.50240195", "0.50176805", "0.5014461", "0.50116533", "0.50043964", "0.50039434", "0.5003072", "0.49917692", "0.49792922", "0.49705225", "0.49702558", "0.4964362", "0.49633366", "0.4955056", "0.49525067", "0.49525067", "0.49525067", "0.49525067", "0.49525067", "0.49525067", "0.4946629", "0.49451375", "0.4944602", "0.49443656", "0.49431646", "0.49416342", "0.49338135", "0.49323535", "0.49323535", "0.49323535", "0.49323535", "0.49323535", "0.49323535", "0.49323535", "0.49323535", "0.49323535", "0.49323535", "0.49323535", "0.49323535", "0.49323535", "0.49323535", "0.49323535", "0.49323535" ]
0.5108086
21
Toast.makeText(context, idec + " " + idev, Toast.LENGTH_LONG).show();
public void escolherequipa () { if (idec != -1 && idev !=-1 && idec != idev) { ArrayList<String> equipaanotar = new ArrayList<String>(); equipaanotar.add(nomeequipas.get(idec)); equipaanotar.add(nomeequipas.get(idev)); ddes.setAdapter(new ArrayAdapter<String>(this, android.R.layout.simple_spinner_dropdown_item, equipaanotar)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void display(int number){\n TextView quantTV = (TextView) findViewById(R.id.quant_tv);\n quantTV.setText(\"\"+ number);\n }", "public void showInfo(){\n DisplayMetrics displaymetrics = new DisplayMetrics();\n getWindowManager().getDefaultDisplay().getMetrics(displaymetrics);\n int height = displaymetrics.heightPixels;\n int width = displaymetrics.widthPixels;\n int colorDep = getWindowManager().getDefaultDisplay().getPixelFormat();\n //String android_id = Secure.getString(this.getContentResolver(), Secure.ANDROID_ID);\n TelephonyManager telephonyManager = (TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE);\n\n Calendar c = Calendar.getInstance();\n SimpleDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n String now = df.format(c.getTime());\n\n String text = \"手机分辨率是:\"+width+\"*\"+height+\" 手机色深是:\"+colorDep+\" IMEI是:\"+telephonyManager.getDeviceId()+\" Time: \"+now;\n Toast.makeText(getApplicationContext(),text,Toast.LENGTH_SHORT).show();\n }", "void showToast(String value);", "void displayMessage(){\r\n Toast toast = Toast.makeText(this, getString(R.string.congratz_message, String.valueOf(playerScore)), Toast.LENGTH_SHORT);\r\n toast.show();\r\n }", "private void showToast(final int resid) {\n\t\tm_toastHandler.post(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\tToast.makeText(InstrumentService.this, resid, Toast.LENGTH_SHORT).show();\n\t\t\t}\n\t\t});\n\t}", "public void setAirHumidity(double airhum){humidityval.setText(Double.toString(airhum));}", "private void showToast(int color) {\n String rgbString = \"R: \" + Color.red(color) + \" B: \" + Color.blue(color) + \" G: \" + Color.green(color);\n Toast.makeText(this, rgbString, Toast.LENGTH_SHORT).show();\n }", "void toast(int resId);", "private static void debug(Context context, String p){\n\t\tToast.makeText(context, p, Toast.LENGTH_SHORT).show();\n\t}", "private void displayquintity(int numberOFCoffee){\n TextView quintityText= findViewById(R.id.quantity_text_view);\n quintityText.setText(\"\"+numberOFCoffee);\n\n }", "@Override\n public void onClick(View v) {\n if(flag){\n temp *= 10;\n temp += 2;\n }else {\n step /= 10;\n temp += step * 2;\n }\n tv.setText(numUtil._tv(temp));\n }", "private void displayQuantity(int numOfCoffeee) {\n TextView quantityTextView = (TextView) findViewById(R.id.quantity_text_view);\n quantityTextView.setText(\"\" + numOfCoffeee);\n }", "@Override\n public void onClick(View v) {\n if(flag){\n temp *= 10;\n temp += 4;\n }else {\n step /= 10;\n temp += step * 4;\n }\n tv.setText(numUtil._tv(temp));\n }", "@Override\n public void onClick(View v) {\n\n String s = v.getTag().toString();\n int duration = Toast.LENGTH_SHORT;\n Toast toast = Toast.makeText(context, s, duration);\n toast.show();\n }", "public void show(){\n sensorTextView.setText(String.format(Locale.US,\"Earth\\nx: %f\\n\" +\"y: %f\\nz: %f\", earthMag[0], earthMag[1], earthMag[2]));\n }", "public void button0OnClick(View view){ display.setText(display.getText()+ \"0\");}", "private void display(int number) {\n TextView quantityTextView = (TextView) findViewById(R.id.minute_text_view);\n quantityTextView.setText(\"\" + number);\n\n }", "@Override\n public void onClick(View v) {\n if(flag){\n temp *= 10;\n temp += 3;\n }else {\n step /= 10;\n temp += step * 3;\n }\n tv.setText(numUtil._tv(temp));\n }", "public void setTemperature(double temp){tempval.setText(Double.toString(temp));}", "public void showValor() {\n String out = new String();\n this.setText(Integer.toString(valor));\n }", "private void display(int number) {\n TextView quantityText = findViewById(R.id.textCups);\n quantityText.setText(\"\" + number);\n }", "@Override\n public void run() {\n TextView tempDoe = (TextView) findViewById(R.id.tempMonitor);\n TextView humid = (TextView) findViewById(R.id.humidMonitor);\n TextView noisePol = (TextView) findViewById(R.id.noisePolMonitor);\n TextView carMon = (TextView) findViewById(R.id.coMonitor);\n float value = new BigInteger(tokens[0], 16).longValue();\n //System.out.println(value);\n float temp = (value * 50) / 65535;\n //System.out.println(temp);\n double tempFah = temp * 1.8000 + 32.00;\n String tempFahStr = String.valueOf(tempFah);\n //System.out.println(tempFah);\n int humidity = (Integer.parseInt(tokens[1],16) * 100) / 65535;\n String humidityDoe = String.valueOf(humidity);\n double noiseLev = Integer.parseInt(tokens[2],16);\n noiseLev = 20*(Math.log10(noiseLev/1024));\n String noiseLevStr = String.valueOf(noiseLev);\n int methane = Integer.parseInt(tokens[3],16);\n String methaneStr = String.valueOf(methane);\n tempDoe.setText(tempFahStr);\n humid.setText(humidityDoe);\n noisePol.setText(noiseLevStr);\n carMon.setText(methaneStr);\n }", "@Override\n public void onClick(View v) {\n if(flag){\n temp *= 10;\n temp += 8;\n }else {\n step /= 10;\n temp += step * 8;\n }\n tv.setText(numUtil._tv(temp));\n }", "@Override\n public void onClick(View v) {\n if(flag){\n temp *= 10;\n temp += 7;\n }else {\n step /= 10;\n temp += step * 7;\n }\n tv.setText(numUtil._tv(temp));\n }", "void toast(CharSequence sequence);", "private void display(int number) {\n TextView quantityTextView = (TextView) findViewById(R.id.quantity_text_view);\n quantityTextView.setText(\"\" + number);\n\n }", "public void onclickmrc(View v){\n Button b = (Button)v;\n String t;\n t=df2.format(total);\n screen.setText(t);\n }", "private void showSecondINputDialog() {\n String currentDateTimeString = DateFormat.getDateTimeInstance().format(new Date());\n Toast.makeText(this, currentDateTimeString,\n Toast.LENGTH_LONG).show();\n }", "private void display(int number)\n {\n TextView quantityTextView = (TextView) findViewById(R.id.quantity_text_view);\n quantityTextView.setText(\"\" + number);\n }", "private void display(int number) {\r\n TextView quantity_txt = (TextView) findViewById(R.id.quantity_textview);\r\n quantity_txt.setText(\"\" + number);\r\n }", "private void displayQuantity(int number) {\n TextView ob = findViewById(R.id.quantity_text_view);\n ob.setText(\"\"+number);\n }", "@Override\n public void onClick(View v) {\n if(flag){\n temp *= 10;\n temp += 5;\n }else {\n step /= 10;\n temp += step * 5;\n }\n tv.setText(numUtil._tv(temp));\n }", "@Override\n public void onClick(View v) {\n if(flag){\n temp *= 10;\n temp += 6;\n }else {\n step /= 10;\n temp += step * 6;\n }\n tv.setText(numUtil._tv(temp));\n }", "@Override\n public void onClick(View v) {\n float calculate = Float.valueOf(et_cal.getText().toString().trim());\n Float mutiply = Float.parseFloat(sub);\n\n float x = (float) (calculate * mutiply);\n\n result.setText(calculate+\"\"+\" USD = \"+x+\"\" + \" MMK\");\n date.setText(\"Indicative Rate as on \"+date_time);\n btnOk.setVisibility(View.VISIBLE);\n\n // Toast.makeText(getActivity(),\"work\",Toast.LENGTH_SHORT).show();\n\n\n\n }", "public void getTip(View v)\n {\n EditText billEditText = (EditText) findViewById(R.id.billEditText);\n EditText percentEditText = (EditText) findViewById(R.id.percentEditText);\n TextView tipTextView = (TextView) findViewById(R.id.tipTextView);\n TextView totalTextView = (TextView) findViewById(R.id.totalTextView);\n\n //get the values from the EditText boxes and convert them to double data types\n double bill = Double.parseDouble(billEditText.getText().toString());\n double percent = Double.parseDouble(percentEditText.getText().toString());\n //double total = Double.parseDouble(totalTextView.getText().toString());\n\n //calculate tip\n percent = percent/100;\n double tip = bill*percent;\n double total = bill + tip;\n\n tipTextView.setText(\"Tip: \" + tip);\n totalTextView.setText(\"Total: \" + total);\n\n\n\n\n }", "public void showMessage(int i) {\n ToastHelper.showLongToast(getContext().getString(i));\n }", "private void displayQuantity(int number) {\n TextView quantityTextView = (TextView) findViewById(R.id.quantity_text_view);\n quantityTextView.setText(\"\"+ number);\n }", "void putdata()\n {\n System.out.printf(\"\\nCD Title \\\"%s\\\", is of %d minutes length and of %d rupees.\",title,length,price);\n }", "@Override\n public void onClick(View v) {\n if(flag){\n temp *= 10;\n temp += 1;\n }else {\n step /= 10;\n temp += step * 1.0;\n }\n tv.setText(numUtil._tv(temp));\n }", "public void setAirPressure(double airpress){airpressval.setText(Double.toString(airpress));}", "@Override\n public void onClick(View v) {\n if(flag){\n temp *= 10;\n temp += 9;\n }else {\n step /= 10;\n temp += step * 9;\n }\n tv.setText(numUtil._tv(temp));\n }", "private void msg(String s)\n {\n Toast.makeText(getApplicationContext(),s,Toast.LENGTH_LONG).show();\n }", "private void msg(String s)\n {\n Toast.makeText(getApplicationContext(),s,Toast.LENGTH_LONG).show();\n }", "private void displayQuantity(int number) {\n TextView quantityTextView = (TextView) findViewById(R.id.quantity_text_view);\n quantityTextView.setText(String.valueOf(number));\n //quantityTextView.setText(new Integer(number).toString());\n }", "public void makeToast(String name,int time){\n toast = new Toast(context);\n// toast.setGravity(Gravity.BOTTOM|Gravity.CENTER_HORIZONTAL , 0, SecretMessageApplication.get720WScale(240));\n toast.setDuration(time);\n// toast.setView(layout);\n toast.show();\n\n }", "private void sendToCatVA()\n {\n Toast.makeText(getApplicationContext(), \"No Results Found For 'Visual Art'\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onClick(View v) {\n if(flag){\n flag = false;\n tv.setText(numUtil._tv(temp)+\".\");\n }\n }", "private void display(int number) {\n TextView quantityTextView = (TextView)\n findViewById(R.id.quantity_text_view);\n quantityTextView.setText(\"\" + number);\n\n }", "private void display(int number) {\n TextView quantityTextView = (TextView) findViewById(R.id.quantity_text_view);\n quantityTextView.setText(\"\" + number);\n }", "private void display(int number) {\n TextView quantityTextView = (TextView) findViewById(R.id.quantity_text_view);\n quantityTextView.setText(\"\" + number);\n }", "private void display(int number) {\n TextView quantityTextView = (TextView) findViewById(R.id.quantity_text_view);\n quantityTextView.setText(\"\" + number);\n }", "private void display(int number) {\n TextView quantityTextView = (TextView) findViewById(R.id.quantity_text_view);\n quantityTextView.setText(\"\" + number);\n }", "private void display(int number) {\n TextView quantityTextView = (TextView) findViewById(R.id.quantity_text_view);\n quantityTextView.setText(\"\" + number);\n }", "private void display(int number) {\n TextView quantityTextView = (TextView) findViewById(R.id.quantity_text_view);\n quantityTextView.setText(\"\" + number);\n }", "private void display(int number) {\n TextView quantityTextView = (TextView) findViewById(R.id.quantity_text_view);\n quantityTextView.setText(\"\" + number);\n }", "static void makeToast(Context ctx, String s){\n Toast.makeText(ctx, s, Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onClick(View v) {\n if(temp < 0.00000001 && temp > 0.0)\n tv.setText(\"0\");\n else{\n if(flag){\n temp *= 10;\n }else {\n step /= 10;\n }\n tv.setText(numUtil._tv(temp));\n }\n }", "private void toast(String bread) {\n Toast.makeText(getActivity(), bread, Toast.LENGTH_SHORT).show();\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.alarm12);\n\n anglelimitshared = getSharedPreferences(\"Mydata\", Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = anglelimitshared.edit();\n temp = anglelimitshared.getInt(\"angle_limit\", 0);\n text = (TextView) findViewById(R.id.disp_text);\n text.setText(String.valueOf(temp));\n\n\n }", "public void cT(String s) { \r\n\t\tToast.makeText(this, s, Toast.LENGTH_SHORT).show();\r\n\t}", "private void displayToast(CharSequence text){\n Context context = getApplicationContext();\n int duration = Toast.LENGTH_SHORT;\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n }", "@Override\n public void toastSemEnderecos() {\n Toast.makeText(MainActivity.this, R.string.semEndereco, Toast.LENGTH_SHORT).show();\n }", "private void showResultAsToast(int nbOfCorrectAnswers) {\n String msg = \"\";\n\n if(nbOfCorrectAnswers == 4) {\n msg = \"Genius ! LOL !! \" + nbOfCorrectAnswers + \"/4\";\n } else if (nbOfCorrectAnswers < 4) {\n msg = \"You can do better than this! \" + nbOfCorrectAnswers + \"/4\";\n }\n\n // The Toast method helps to show a message that shows the number of correct answers\n Toast.makeText(this, msg, Toast.LENGTH_LONG).show();\n }", "@Override\n public void display(String numeroPantalla) {\n debug (\"display\", \"numeroPantalla\", numeroPantalla);\n TextView display = (TextView) findViewById(R.id.numberRolled);\n display.setText(numeroPantalla);\n }", "public void displayAnswer(){\r\n String message = \"That is the correct answer!\";\r\n\r\n Toast.makeText(QuizActivity.this,\r\n message, Toast.LENGTH_SHORT).show();\r\n }", "private void display(int number) {\n TextView quantityTextView = (TextView) findViewById(R.id.quantity_text_view);\n quantityTextView.setText(String.format(\"%d\", number));\n }", "@SuppressLint(\"StringFormatMatches\")\n private String createToast(double grade) {\n String message;\n Resources res = getResources();\n message = res.getString(R.string.toast_message, grade);\n return message;\n }", "private void yell(String str){\n Toast.makeText(this, str, Toast.LENGTH_SHORT).show();\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.end);\n\t\tcd=(TextView) findViewById(R.id.cd);\n\t\tBundle gt=getIntent().getExtras();\n \t\tg=gt.getString(\"abcd\");\n \t\t\n \t\tcd.setText(g);\n \t\tToast.makeText(getApplicationContext(), \"Call Duration = \"+ g, Toast.LENGTH_SHORT).show();\n \t\t//Toast.makeText(getApplicationContext(), g+ \" :Call duration\", Toast.LENGTH_LONG).show();\n\t\tbh=(Button) findViewById(R.id.bh);\n\t\tbh.setOnClickListener(this);\n\n\t}", "private void displayQuantity(int number) {\n TextView quantityTextView = (TextView) findViewById(R.id.quantity_text_view);\n quantityTextView.setText(\"\" + number);\n }", "private void display() {\n TextView textview = (TextView) findViewById(R.id.textView);\n EditText editText = (EditText) findViewById(R.id.editNumber) ;\n textview.setText(\"TEXT\");\n editText.setText(\"\");\n\n }", "private void showToast(String msg) {\r\n Toast.makeText(Imprimir.this, msg, Toast.LENGTH_LONG).show();\r\n }", "public void showErrorMessage(){\n Toast.makeText(context, R.string.generic_error_message, Toast.LENGTH_LONG).show();\n }", "public void display(int counterMessage) {\n TextView textView = (TextView) findViewById(R.id.pointsValue);\n textView.setText(\"\" + counterMessage);\n }", "private void toast(String string){\n Toast.makeText(this, string, Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onProgressChanged(SeekBar seekBar, int progress,boolean fromUser) {\n TextView txtV_quantidade = inf.findViewById(R.id.volume_12);\n txtV_quantidade.setText(\"\"+progress+\" copo(s)\");\n }", "private static void showToastText(String infoStr, int TOAST_LENGTH) {\n Context context = null;\n\t\ttoast = getToast(context);\n\t\tTextView textView = (TextView) toast.getView().findViewById(R.id.tv_toast);\n\t\ttextView.setText(infoStr);\n textView.setTypeface(Typeface.SANS_SERIF);\n\t\ttoast.setDuration(TOAST_LENGTH);\n\t\ttoast.show();\n\t}", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent intent) {\n // TODO Auto-generated method stub\n if ((requestCode == request_code) && (resultCode == RESULT_OK)) {\n\n // Toast.makeText(this, intent.getStringExtra(\"resultado\"), Toast.LENGTH_LONG).show();\n inEquipo.setText(intent.getStringExtra(\"resultado\"));\n }\n }", "private void displayPrice(int number){\n TextView priceTV = (TextView) findViewById(R.id.price_tv);\n priceTV.setText(NumberFormat.getCurrencyInstance().format(number));\n }", "private void display(int number) {\n TextView quantityTextView = (TextView) findViewById(\n R.id.quantity_text_view);\n quantityTextView.setText(\"\" + number);\n }", "private void sendToCatDance()\n {\n Toast.makeText(getApplicationContext(), \"No Results Found For 'Dance'\", Toast.LENGTH_SHORT).show();\n }", "private void diplay() {\n\t\tSystem.out.println(new StringBuilder(HUMIDITY_CONSTANT + humidity + TEMPRETURE_CONSTANT + temp\n\t\t\t\t+ PRESSURE_CONSTANT + pressure));\n\n\t}", "public void transConfirm(float draw){\n System.out.println(\"La cantidad de \"+draw+\" ha sido transferida correctamente\");\n System.out.println(\"\");\n}", "void showToast(String message);", "void showToast(String message);", "private void displayQuantity(int number) {\n TextView quantityTextView = findViewById(R.id.quantity_text_view);\n quantityTextView.setText(\"\" + number);\n }", "@Override\n public void run() {\n if (!MainActivity.pause) {\n MainActivity.fetch = MainActivity.fetch - 1;\n MainActivity.cpbProgress.setProgress(MainActivity.fetch);\n if (MainActivity.fetch < 10) {\n MainActivity.tvTimer.setText(Constant.ZERO + MainActivity.fetch + \"\");\n } else {\n MainActivity.tvTimer.setText(MainActivity.fetch + \"\");\n }\n if (MainActivity.fetch == 0) {\n /*Toast t=Toast.makeText(MainActivity.act, \"Sorry time is Up....\",4000);//////..........not working............///////\n t.show();*/\n finish();\n System.exit(0);\n }\n } else {\n i--;\n }\n }", "private void msg(String s) {\n Toast.makeText(getApplicationContext(), s, Toast.LENGTH_LONG).show();\n }", "private void msg(String s) {\n Toast.makeText(getApplicationContext(), s, Toast.LENGTH_LONG).show();\n }", "private void msg(String s) {\n Toast.makeText(getApplicationContext(), s, Toast.LENGTH_LONG).show();\n }", "public void affiche() {\n\t\tSystem.out.println(\"Valeur: \" + cpt);\n\t}", "private void displayQuantity(int number) {\n TextView quantityTextView = (TextView) findViewById(R.id.quantity_text_view);\n quantityTextView.setText(number);\n }", "private void toast(String aToast) {\n Toast.makeText(getApplicationContext(), aToast, Toast.LENGTH_LONG).show();\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n String output = intent.getStringExtra(\"success\");\n //SpannableString redSpannable= new SpannableString(output);\n //redSpannable.setSpan(new ForegroundColorSpan(Color.RED), 0, output.length(), 0);\n Log.d(\"Output\", output);\n TextView ins = (TextView)findViewById(R.id.instructions);\n //String start_display = \"User Guide: \\n 1. Press Heart Rate Button \\n 2. Turn on Flash Light \\n\" + \"3. Keep Fingertip on camera\";\n ins.append(\"\\n Respiratory Rate: \"+ output);\n rr_val = Double.parseDouble(output);\n hideProgressDialogWithTitle();\n\n }", "@Override\n public void onClick(View view) {\n switch (view.getId()) {\n /*\n *Caso para botton calcular\n */\n case R.id.calcular_button:\n\n /*\n *Detecto los EditText en XML\n */\n\n etAltura = (EditText) activity.findViewById(R.id.altura_et);\n etPeso = (EditText) activity.findViewById(R.id.peso_et);\n\n /*\n * Defino dos String que captura lo texto introducido en EditText\n */\n String altura = etAltura.getText().toString();\n String peso = etPeso.getText().toString();\n\n /*\n * Si usario no introduce ningun valor entra en bucle.\n * Si usario introduce peso o altura no adecuado entra en bucle.\n */\n if (altura.trim().equals(\"\") || peso.trim().equals(\"\") || Float.parseFloat(altura)< 100\n || Float.parseFloat(altura)>250 || Float.parseFloat(peso)< 20 || Float.parseFloat(peso)>250) {\n Log.d(getClass().getCanonicalName(), \"Preparo Toast: \" + altura + \"(cm)\" + peso+ \"(kg)\");\n\n /*\n * Construyo el Toast Message\n */\n Toast toast=Toast.makeText(activity, R.string.comrueba_peso_altura, Toast.LENGTH_LONG);\n\n /*\n * Defino LinearLayout para poder personalizar el Toast Message\n */\n LinearLayout layout = (LinearLayout) toast.getView();\n\n\n if (layout.getChildCount() > 0) {\n TextView textView = (TextView) layout.getChildAt(0);\n\n /*\n * Personalizo textView. TextAligment center.\n */\n textView.setGravity(Gravity.CENTER_VERTICAL | Gravity.CENTER_HORIZONTAL);\n }\n\n /*\n * El Toast Message aparecera en el centro de pantalla.\n */\n toast.setGravity(Gravity.CENTER, 0,0);\n toast.show();\n return;\n }\n\n /*\n *Si Usario introducido altura y peso adecuado entro en bucle\n */\n if (peso.length() > 0 && altura.length() > 0) {\n Log.d(getClass().getCanonicalName(), \"Preparo Intent: \");\n Intent intent = new Intent(activity, ResultadoActivity.class);\n intent.putExtra(\"PESO\", peso);\n intent.putExtra(\"ALTURA\", altura);\n activity.startActivity(intent);\n }break;\n\n /*\n *Caso para botton Ver Tabla.\n */\n case R.id.ver_tabla_button:\n activity.startActivity(new Intent(activity, TablaActivity.class));\n break;\n /*\n *Caso para botton Volver. Vuelve a Main Activity\n */\n case R.id.volver_button:\n activity.finish();\n break;\n }\n }", "private void doToast() {\n\t\tEditText editText = (EditText) findViewById(R.id.edit_message);\r\n\t\tString message = editText.getText().toString();\r\n\t\t\r\n\t\t// Create and send toast\r\n\t\tContext context = getApplicationContext();\r\n\t\tint duration = Toast.LENGTH_SHORT;\r\n\t\tToast toast = Toast.makeText(context, message, duration);\r\n\t\ttoast.show();\r\n\t}", "@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tdct4--;\r\n\t\t\t\tif(dct4<0){\r\n\t\t\t\t\tdct4 = 0;\r\n\t\t\t\t\tdttotal = dttotal - 0;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tdct4 = dct4;\r\n\t\t\t\t\tdttotal = dttotal - 120;\r\n\t\t\t\t}\r\n\t\t\t\tdtAdd4.setText(\"\" + dct4);\r\n\t\t\t\tdtotal.setText(\"Bill Scratch Pad : To Pay tk. \" + dttotal);\r\n\t\t\t}", "@Override\n\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (resultCode == Activity.RESULT_OK && requestCode == 0) {\n Bundle extras = data.getExtras();\n value = extras.getString(\"value\");\n cost_btn.setText(DecimalFormat.getCurrencyInstance().format(Double.parseDouble(value)));\n }\n }", "@Override\n public void onClick(View view) {\n\n if (view.getId() == R.id.tvFrage ) {\n\n }else {\n int[] color = {Color.GREEN, Color.RED, Color.BLUE};\n Button bTemp = (Button) view;\n sButtText = bTemp.getText().toString();\n double[] eingrenzRight = logic.checkAnswer(sButtText);\n tvInfo.performHapticFeedback(3);\n\n String[] infoStrings = new String[8];\n\n infoStrings[0] = \" Round: \" + MySingleton.getInstance().getNext();\n infoStrings[1] = \" Count: \" + MySingleton.getInstance().getCount() + \" (\" + MySingleton.getInstance().getAktiviert() + \")\";\n infoStrings[2] = \" S: \" + eingrenzRight[2] ;\n infoStrings[3] = \" C: \" + (int)eingrenzRight[3] ;\n infoStrings[4] = \" R: \" + eingrenzRight[4] ;\n infoStrings[5] = \" V: \" + (int)eingrenzRight[5] ;\n infoStrings[6] = \" N: \" + (int)eingrenzRight[6] ;\n\n mCallback.onUpdate(infoStrings);\n\n String infoText = MySingleton.getInstance().vorschubText;\n tvInfo.setText(infoText);\n\n tvInfo.setBackgroundColor(color[(int)eingrenzRight[1]]);\n if (eingrenzRight[0] == 0 ) { // Eingrenzungsantwort\n setUpButtonsMC();\n } else if (eingrenzRight[1] == 0) { //Antwort richtig\n neueFrage();\n } else { //Antwort falsch\n neueFrage();\n }\n ;\n }\n }", "private void displayToast(String paintingDescription) {\n Toast.makeText(this, paintingDescription, Toast.LENGTH_SHORT).show();\n }", "public void displayFoulb (int foul){\n\n TextView foulA = (TextView)findViewById(R.id.team_b_foul);\n foulA.setText(String.valueOf(foul));\n }" ]
[ "0.6494404", "0.6402976", "0.6148805", "0.61433244", "0.6101366", "0.6100884", "0.606254", "0.59896666", "0.59841985", "0.5958939", "0.5822692", "0.58203876", "0.58146936", "0.5802804", "0.57971126", "0.5789945", "0.57782716", "0.5777611", "0.5765574", "0.57492286", "0.574755", "0.5743182", "0.57430786", "0.57314885", "0.5719186", "0.571891", "0.571792", "0.5707737", "0.570769", "0.5693633", "0.5678686", "0.5673402", "0.5673013", "0.566764", "0.5662048", "0.5658703", "0.5653176", "0.5651452", "0.56431544", "0.56355494", "0.5629866", "0.5627709", "0.5627709", "0.5622667", "0.56036735", "0.5598146", "0.5587618", "0.5587248", "0.5582737", "0.5582737", "0.5582737", "0.5582737", "0.5582737", "0.5582737", "0.5582737", "0.558206", "0.5556178", "0.55509603", "0.5546103", "0.5542412", "0.5541025", "0.5539053", "0.55236036", "0.5522985", "0.5515565", "0.55101085", "0.5490604", "0.5490467", "0.54846543", "0.5478705", "0.5474601", "0.5471779", "0.54704297", "0.5468648", "0.5468011", "0.5466312", "0.54595745", "0.5457797", "0.54466975", "0.54459965", "0.54451644", "0.54435337", "0.54354995", "0.5424325", "0.5424325", "0.54150754", "0.54114604", "0.5411176", "0.5411176", "0.5411176", "0.5410704", "0.5403367", "0.54018897", "0.5385238", "0.5383657", "0.53830034", "0.53762734", "0.53655595", "0.5364255", "0.5363525", "0.53623503" ]
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\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater bow=getMenuInflater();\n\t\tbow.inflate(R.menu.menu, menu);\n\t\treturn true;\n\t\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.action_menu, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\t\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\t\t\n\t\t/* Inflate the menu; this adds items to the action bar if it is present */\n\t\tgetMenuInflater().inflate(R.menu.act_main, menu);\t\t\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflate = getMenuInflater();\n inflate.inflate(R.menu.menu, ApplicationData.amvMenu.getMenu());\n return true;\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.menu, menu);\n\t\t\treturn true; \n\t\t\t\t\t\n\t\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.main, menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_bar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_item, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.menu, menu);\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t \n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n this.getMenuInflater().inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@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 void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.main, menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu( Menu menu, MenuInflater inflater )\n\t{\n\t\tsuper.onCreateOptionsMenu( menu, inflater );\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n \t// We must call through to the base implementation.\r\n \tsuper.onCreateOptionsMenu(menu);\r\n \t\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_menu, menu);\r\n\r\n return true;\r\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.inter_main, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.action, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu (Menu menu){\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.custom_action_bar, menu);\n\t\treturn true;\n\t}", "public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\tadd(fileMenu);\n\n\t\t// \"Edit\"\n\t\teditMenu = new EditMenuD(app);\n\t\tadd(editMenu);\n\n\t\t// \"View\"\n\t\t// #3711 viewMenu = app.isApplet()? new ViewMenu(app, layout) : new\n\t\t// ViewMenuApplicationD(app, layout);\n\t\tviewMenu = new ViewMenuApplicationD(app, layout);\n\t\tadd(viewMenu);\n\n\t\t// \"Perspectives\"\n\t\t// if(!app.isApplet()) {\n\t\t// perspectivesMenu = new PerspectivesMenu(app, layout);\n\t\t// add(perspectivesMenu);\n\t\t// }\n\n\t\t// \"Options\"\n\t\toptionsMenu = new OptionsMenuD(app);\n\t\tadd(optionsMenu);\n\n\t\t// \"Tools\"\n\t\ttoolsMenu = new ToolsMenuD(app);\n\t\tadd(toolsMenu);\n\n\t\t// \"Window\"\n\t\twindowMenu = new WindowMenuD(app);\n\n\t\tadd(windowMenu);\n\n\t\t// \"Help\"\n\t\thelpMenu = new HelpMenuD(app);\n\t\tadd(helpMenu);\n\n\t\t// support for right-to-left languages\n\t\tapp.setComponentOrientation(this);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp=getMenuInflater();\n\t\tblowUp.inflate(R.menu.welcome_menu, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.item, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.resource, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu,menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.home_action_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.template, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n Log.d(\"onCreateOptionsMenu\", \"create menu\");\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.socket_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);//Menu Resource, Menu\n\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actionbar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(toolbar_res, menu);\n updateMenuItemsVisibility(menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t// \n\t\tMenuInflater mi = getMenuInflater();\n\t\tmi.inflate(R.menu.thumb_actv_menu, menu);\n\t\t\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.swag_list_activity_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\n\t\treturn true;\n\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.jarvi, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {\n menuInflater.inflate(R.menu.main, menu);\n\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add__listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actmain, menu);\r\n return true;\r\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.buat_menu, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.layout.menu, menu);\n\t\treturn true;\n\t}", "@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\n\n\t\n\t\n\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\n\treturn super.onCreateOptionsMenu(menu);\n}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ichat, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater)\n\t{\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\tinflater.inflate(R.menu.expenses_menu, menu);\n\t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.action_bar, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp = getMenuInflater();\n\t\tblowUp.inflate(R.menu.status, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\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.7249559", "0.7204226", "0.71981144", "0.7180145", "0.7110589", "0.70431244", "0.7041351", "0.70150685", "0.70118093", "0.69832", "0.6947845", "0.69419056", "0.6937257", "0.6920975", "0.6920975", "0.68938893", "0.68867826", "0.6878929", "0.6877472", "0.68656766", "0.68656766", "0.68656766", "0.68656766", "0.68553543", "0.6850232", "0.6822862", "0.68201447", "0.68163574", "0.68163574", "0.6816304", "0.6809227", "0.6803687", "0.6801118", "0.67946446", "0.67919034", "0.67913854", "0.6786644", "0.67618436", "0.6760987", "0.67516655", "0.67475504", "0.67475504", "0.6744612", "0.67433023", "0.6729379", "0.67267543", "0.67261547", "0.67261547", "0.6724336", "0.6714574", "0.67084044", "0.670811", "0.67026806", "0.6701955", "0.670018", "0.6697785", "0.66899645", "0.6687168", "0.6687168", "0.66860044", "0.66835976", "0.6682339", "0.668104", "0.6671387", "0.66706777", "0.6665407", "0.6659777", "0.6659777", "0.6659777", "0.6659032", "0.6658105", "0.6658105", "0.6658105", "0.66553104", "0.6654278", "0.6654054", "0.66521645", "0.6650613", "0.66495895", "0.6649238", "0.66490036", "0.6648245", "0.66481483", "0.6646514", "0.6646321", "0.6645122", "0.66418123", "0.6638334", "0.6636035", "0.6635416", "0.6635416", "0.6635416", "0.6635411", "0.66325295", "0.6631742", "0.66299105", "0.6629049", "0.6627932", "0.66237384", "0.662195", "0.662195" ]
0.0
-1
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml.
@Override public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); //noinspection SimplifiableIfStatement if (id == R.id.action_settings) { return true; } //noinspection SimplifiableIfStatement if (id == R.id.criar_evento) { startActivity(new Intent(this, Criar_Evento.class)); //return true; } if (id == R.id.pagina_inicial) { startActivity(new Intent(this, Pagina_Inicial.class)); } if (id == R.id.historico) { startActivity(new Intent(this, Historico.class)); } return super.onOptionsItemSelected(item); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n //\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // Back button clicked\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // app icon in action bar clicked; goto parent activity.\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n switch (id) {\r\n case android.R.id.home:\r\n // app icon in action bar clicked; go home\r\n this.finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // app icon in action bar clicked; go home\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n Log.e(\"clik\", \"action bar clicked\");\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\t public boolean onOptionsItemSelected(MenuItem item) {\n\t int id = item.getItemId();\n\t \n\t\t\tif (id == android.R.id.home) {\n\t\t\t\t// Respond to the action bar's Up/Home button\n\t\t\t\t// NavUtils.navigateUpFromSameTask(this);\n\t\t\t\tonBackPressed();\n\t\t\t\treturn true;\n\t\t\t}\n\t \n\t \n\t return super.onOptionsItemSelected(item);\n\t }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n // Respond to the action bar's Up/Home button\r\n case android.R.id.home:\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle presses on the action bar items\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n case R.id.action_clear:\n return true;\n case R.id.action_done:\n\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onActionHomePressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId())\n {\n case android.R.id.home :\n super.onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId ()) {\n case android.R.id.home:\n onBackPressed ();\n return true;\n\n default:\n break;\n }\n return super.onOptionsItemSelected ( item );\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t switch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\t// app icon in action bar clicked; go home \n\t\t\tIntent intent = new Intent(this, Kelutral.class); \n\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); \n\t\t\tstartActivity(intent); \n\t\t\treturn true;\t\t\n\t case R.id.Search:\n\t \treturn onSearchRequested();\n\t\tcase R.id.AppInfo:\n\t\t\t// Place holder menu item\n\t\t\tIntent newIntent = new Intent(Intent.ACTION_VIEW,\n\t\t\t\t\tUri.parse(\"http://forum.learnnavi.org/mobile-apps/\"));\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\n\t\tcase R.id.Preferences:\n\t\t\tnewIntent = new Intent(getBaseContext(), Preferences.class);\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\t\n\t }\n\t return false;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n onBackPressed();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // Intent homeIntent = new Intent(this, MainActivity.class);\n // homeIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n // startActivity(homeIntent);\n finish();\n return true;\n default:\n return (super.onOptionsItemSelected(item));\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // setResult and close the activity when Action Bar Up Button clicked.\n if (item.getItemId() == android.R.id.home) {\n setResult(RESULT_CANCELED);\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // This ID represents the Home or Up button. In the case of this\n // activity, the Up button is shown. Use NavUtils to allow users\n // to navigate up one level in the application structure. For\n // more details, see the Navigation pattern on Android Design:\n //\n // http://developer.android.com/design/patterns/navigation.html#up-vs-back\n //\n \tgetActionBar().setDisplayHomeAsUpEnabled(false);\n \tgetFragmentManager().popBackStack();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if(id == android.R.id.home){\n onBackPressed();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@RequiresApi(api = Build.VERSION_CODES.M)\n @Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif(item.getItemId()==android.R.id.home)\r\n\t\t{\r\n\t\t\tgetActivity().onBackPressed();\r\n\t\t}\r\n\t\treturn super.onOptionsItemSelected(item);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if(item.getItemId()==android.R.id.home){\n super.onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n return false;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n //Back arrow\n case android.R.id.home:\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // android.R.id.home是Android内置home按钮的id\n finish();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n this.onBackPressed();\n return false;\n }\n return false;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n\r\n case android.R.id.home:\r\n /*Intent i= new Intent(getApplication(), MainActivity.class);\r\n i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n startActivity(i);*/\r\n onBackPressed();\r\n finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case android.R.id.home:\n this.finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n NavUtils.navigateUpFromSameTask(getActivity());\n return true;\n case R.id.action_settings:\n Intent i = new Intent(getActivity(), SettingsActivity.class);\n startActivity(i);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Pass the event to ActionBarDrawerToggle, if it returns\n // true, then it has handled the app icon touch event\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n\n // Handle your other action bar items...\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n //Fixes the Up Button\n if(id == android.R.id.home) {\n BuildRoute.this.finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()){\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return true;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if (id == android.R.id.home) {\n NavUtils.navigateUpFromSameTask(this);\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n break;\r\n }\r\n return true;\r\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif (item.getItemId() == android.R.id.home) {\n\t\t\tfinish();\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n onBackPressed();\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if ( id == android.R.id.home ) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.home) {\r\n NavUtils.navigateUpFromSameTask(this);\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_about) {\r\n AboutDialog();\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_exit) {\r\n finish();\r\n return true;\r\n }\r\n\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n//noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n// finish the activity\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item)\n {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if( id == android.R.id.home ) // Back button of the actionbar\n {\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\t\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\t\tswitch (item.getItemId()) {\r\n\t\t\tcase android.R.id.home:\r\n\t\t\t\tfinish();\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\treturn super.onOptionsItemSelected(item);\r\n\t\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n return true;\n }\n return false;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if(id == android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n if (item.getItemId() == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\r\n\t\tcase android.R.id.home:\r\n\t\t\tsetResult(RESULT_OK, getIntent());\r\n\t\t\tfinish();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n\n case android.R.id.home:\n this.finish();\n return true;\n }\n return true;\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\tif (id == android.R.id.home) {\n\t\t\tfinish();\n\t\t\treturn true;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if (id == android.R.id.home) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n //NavUtils.navigateUpFromSameTask(this);\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // todo: goto back activity from here\n finish();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n // Handle item selection\r\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n return true;\r\n\r\n case me.cchiang.lookforthings.R.id.action_sample:\r\n// Snackbar.make(parent_view, item.getTitle() + \" Clicked \", Snackbar.LENGTH_SHORT).show();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tcase R.id.scan_menu:\n\t\t\tonScan();\n\t\t\tbreak;\n\t\tcase R.id.opt_about:\n\t\t\t//onAbout();\n\t\t\tbreak;\n\t\tcase R.id.opt_exit:\n\t\t\tfinish();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t\treturn true;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n super.onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n finish();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\r\n\t switch (item.getItemId()) {\r\n\t \t// back to previous page\r\n\t case android.R.id.home:\r\n\t finish();\r\n\t return true;\r\n\t }\r\n\t return super.onOptionsItemSelected(item);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if(id==android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId())\n {\n case android.R.id.home:\n this.finish();\n return (true);\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case R.id.home:{\n NavUtils.navigateUpFromSameTask(this);\n return true;\n }\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n switch(item.getItemId())\n {\n case android.R.id.home:\n super.onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\treturn true;\n\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n\r\n int id = item.getItemId();\r\n if(id==android.R.id.home){\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }" ]
[ "0.79052806", "0.7806316", "0.7767438", "0.772778", "0.76324606", "0.7622031", "0.758556", "0.7531728", "0.7489057", "0.74576724", "0.74576724", "0.743964", "0.7422121", "0.74037784", "0.73926556", "0.7387903", "0.73803806", "0.73715395", "0.7362778", "0.7357048", "0.7346653", "0.73422706", "0.7331221", "0.7329421", "0.7326524", "0.73197514", "0.73175013", "0.7314632", "0.7305193", "0.7305193", "0.73030055", "0.72992206", "0.7294402", "0.7287853", "0.7284157", "0.72821075", "0.72797185", "0.7260893", "0.7260893", "0.7260893", "0.7260798", "0.72604334", "0.7250995", "0.72243106", "0.72205526", "0.7217967", "0.72052115", "0.72008896", "0.7200226", "0.71938485", "0.7186533", "0.7178549", "0.71698415", "0.7168567", "0.7154602", "0.7154338", "0.71365875", "0.71357495", "0.71357495", "0.71302795", "0.7129606", "0.7125107", "0.7124433", "0.71243066", "0.7122874", "0.7118138", "0.71181303", "0.71180034", "0.71180034", "0.71180034", "0.71180034", "0.7117241", "0.71159554", "0.7113099", "0.7110779", "0.71097904", "0.71062744", "0.710078", "0.7099281", "0.70957214", "0.7094494", "0.7094494", "0.7087356", "0.70834076", "0.7081747", "0.70809853", "0.70746684", "0.70691484", "0.70627403", "0.70616937", "0.7060999", "0.7052165", "0.70382303", "0.70382303", "0.7036847", "0.7036218", "0.7036218", "0.70333946", "0.7031289", "0.7030542", "0.70198953" ]
0.0
-1
Test init a queue configuration, children's capacity for a given label doesn't equals to 100%. This expect IllegalArgumentException thrown.
@Test(expected = IllegalArgumentException.class) public void testQueueParsingFailWhenSumOfChildrenNonLabeledCapacityNot100Percent() throws IOException { nodeLabelManager.addToCluserNodeLabelsWithDefaultExclusivity(ImmutableSet.of("red", "blue")); YarnConfiguration conf = new YarnConfiguration(); CapacitySchedulerConfiguration csConf = new CapacitySchedulerConfiguration(conf); setupQueueConfiguration(csConf); csConf.setCapacity(((ROOT) + ".c.c2"), 5); CapacityScheduler capacityScheduler = new CapacityScheduler(); RMContextImpl rmContext = new RMContextImpl(null, null, null, null, null, null, new org.apache.hadoop.yarn.server.resourcemanager.security.RMContainerTokenSecretManager(csConf), new org.apache.hadoop.yarn.server.resourcemanager.security.NMTokenSecretManagerInRM(csConf), new ClientToAMTokenSecretManagerInRM(), null); rmContext.setNodeLabelManager(nodeLabelManager); capacityScheduler.setConf(csConf); capacityScheduler.setRMContext(rmContext); capacityScheduler.init(csConf); capacityScheduler.start(); ServiceOperations.stopQuietly(capacityScheduler); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(expected = IllegalArgumentException.class)\n public void testQueueParsingFailWhenSumOfChildrenLabeledCapacityNot100Percent() throws IOException {\n nodeLabelManager.addToCluserNodeLabelsWithDefaultExclusivity(ImmutableSet.of(\"red\", \"blue\"));\n YarnConfiguration conf = new YarnConfiguration();\n CapacitySchedulerConfiguration csConf = new CapacitySchedulerConfiguration(conf);\n setupQueueConfigurationWithLabels(csConf);\n csConf.setCapacityByLabel(((ROOT) + \".b.b3\"), \"red\", 24);\n CapacityScheduler capacityScheduler = new CapacityScheduler();\n RMContextImpl rmContext = new RMContextImpl(null, null, null, null, null, null, new org.apache.hadoop.yarn.server.resourcemanager.security.RMContainerTokenSecretManager(csConf), new org.apache.hadoop.yarn.server.resourcemanager.security.NMTokenSecretManagerInRM(csConf), new ClientToAMTokenSecretManagerInRM(), null);\n rmContext.setNodeLabelManager(nodeLabelManager);\n capacityScheduler.setConf(csConf);\n capacityScheduler.setRMContext(rmContext);\n capacityScheduler.init(csConf);\n capacityScheduler.start();\n ServiceOperations.stopQuietly(capacityScheduler);\n }", "@Test(expected = IllegalArgumentException.class)\n public void testQueueParsingWithSumOfChildLabelCapacityNot100PercentWithWildCard() throws IOException {\n nodeLabelManager.addToCluserNodeLabelsWithDefaultExclusivity(ImmutableSet.of(\"red\", \"blue\"));\n YarnConfiguration conf = new YarnConfiguration();\n CapacitySchedulerConfiguration csConf = new CapacitySchedulerConfiguration(conf);\n setupQueueConfigurationWithLabels(csConf);\n csConf.setCapacityByLabel(((ROOT) + \".b.b3\"), \"red\", 24);\n csConf.setAccessibleNodeLabels(ROOT, ImmutableSet.of(ANY));\n csConf.setAccessibleNodeLabels(((ROOT) + \".b\"), ImmutableSet.of(ANY));\n CapacityScheduler capacityScheduler = new CapacityScheduler();\n RMContextImpl rmContext = new RMContextImpl(null, null, null, null, null, null, new org.apache.hadoop.yarn.server.resourcemanager.security.RMContainerTokenSecretManager(csConf), new org.apache.hadoop.yarn.server.resourcemanager.security.NMTokenSecretManagerInRM(csConf), new ClientToAMTokenSecretManagerInRM(), null);\n rmContext.setNodeLabelManager(nodeLabelManager);\n capacityScheduler.setConf(csConf);\n capacityScheduler.setRMContext(rmContext);\n capacityScheduler.init(csConf);\n capacityScheduler.start();\n ServiceOperations.stopQuietly(capacityScheduler);\n }", "@Test\n public void capacityTest() {\n // TODO: test capacity\n }", "private void checkCapacity(int capacity) \n {\n if (capacity > MAX_CAPACITY)\n throw new IllegalStateException(\"Attempt to create a bag whose \" +\n \"capacity exeeds allowed \" +\n \"maximum of \" + MAX_CAPACITY);\n }", "@Before\n public void setUp() throws Exception {\n csConf = new CapacitySchedulerConfiguration();\n csConf.setClass(YarnConfiguration.RM_SCHEDULER, CapacityScheduler.class,\n ResourceScheduler.class);\n\n // By default, set 3 queues, a/b, and a.a1\n csConf.setQueues(\"root\", new String[]{\"a\", \"b\"});\n csConf.setNonLabeledQueueWeight(\"root\", 1f);\n csConf.setNonLabeledQueueWeight(\"root.a\", 1f);\n csConf.setNonLabeledQueueWeight(\"root.b\", 1f);\n csConf.setQueues(\"root.a\", new String[]{\"a1\"});\n csConf.setNonLabeledQueueWeight(\"root.a.a1\", 1f);\n csConf.setAutoQueueCreationV2Enabled(\"root\", true);\n csConf.setAutoQueueCreationV2Enabled(\"root.a\", true);\n csConf.setAutoQueueCreationV2Enabled(\"root.e\", true);\n csConf.setAutoQueueCreationV2Enabled(PARENT_QUEUE, true);\n // Test for auto deletion when expired\n csConf.setAutoExpiredDeletionTime(1);\n }", "public void test_4() throws Exception {\n\t\tBoundedSharedQueue theBSQ = new BoundedSharedQueue(MAX_CAPACITY);\n\n\t\ttry {\n\t\t\ttheBSQ.add(null); // null is not an accepted value\n\t\t\tfail(\"should throw an IllegalArgumentException\");\n\t\t}\n\t\tcatch(IllegalArgumentException ex) {\n\t\t\t// OK\n\t\t}\n\t}", "public void test_5() throws Exception {\n\t\ttry {\n\t\t\tBoundedSharedQueue theBSQ = new BoundedSharedQueue(0);\n\t\t\tfail(\"should throw an IllegalArgumentException\");\n\t\t}\n\t\tcatch(IllegalArgumentException ex) {\n\t\t\t// OK\n\t\t}\n\t}", "public PriorityQueue(int capacity) { \r\n this.capacity=capacity;\r\n this.currentSize=0;\r\n this.queue=new NodeBase[capacity];\r\n }", "public WaitablePQueue(int capacity) {\n\t\tthis(capacity, null);\n\t}", "@Test\r\n public void testLongTermStorageGetCapacity1()\r\n {\r\n assertEquals(\"Capacity is wrong\", TEST_LONG_TERM_STORAGE_CAPACITY,\r\n testLongTermStorage.getCapacity());\r\n }", "public void ensureCapacity(int minCapacity);", "@Test\n public void testExceedsQuotaOnStartup() throws Exception {\n List<Dag<JobExecutionPlan>> dags = DagManagerTest.buildDagList(2, \"user\", ConfigFactory.empty());\n // Ensure that the current attempt is 1, normally done by DagManager\n dags.get(0).getNodes().get(0).getValue().setCurrentAttempts(1);\n dags.get(1).getNodes().get(0).getValue().setCurrentAttempts(1);\n\n // Should not be throwing the exception\n this._quotaManager.init(dags);\n }", "public Queue()\r\n\t{\r\n\t\tthis(capacity);\r\n\t}", "myQueue(int size){\n }", "@Test\n void constructor() {\n // Act\n final CreateQueueOptions actual = new CreateQueueOptions();\n\n // Assert\n assertEquals(MAX_DURATION, actual.getAutoDeleteOnIdle());\n assertEquals(MAX_DURATION, actual.getDefaultMessageTimeToLive());\n assertEquals(DEFAULT_DUPLICATE_DETECTION_DURATION, actual.getDuplicateDetectionHistoryTimeWindow());\n assertTrue(actual.isBatchedOperationsEnabled());\n assertFalse(actual.isPartitioningEnabled());\n assertEquals(DEFAULT_LOCK_DURATION, actual.getLockDuration());\n assertEquals(DEFAULT_MAX_DELIVERY_COUNT, actual.getMaxDeliveryCount());\n assertEquals(DEFAULT_QUEUE_SIZE, actual.getMaxSizeInMegabytes());\n assertFalse(actual.isDuplicateDetectionRequired());\n assertFalse(actual.isSessionRequired());\n assertFalse(actual.isDeadLetteringOnMessageExpiration());\n assertNull(actual.getUserMetadata());\n assertEquals(EntityStatus.ACTIVE, actual.getStatus());\n }", "public void setCapacity(int capacity) \n {\n this.capacity = capacity;\n }", "@Before\r\n public void setUp() {\r\n queue = new LinkedQueue<String> (initCapacity);\r\n }", "@Test\n\tpublic void overrideDefaultCapacity() {\n\t\tcst = new Airport(2, weatherMock);\n\t\tassertEquals(2, cst.capacity);\n\t}", "public void setCapacity(int value) {\n this.capacity = value;\n }", "public void checkCapacity(String target, long size) throws Exception;", "@Test\n public void testMaxQueue() throws Throwable {\n internalMaxQueue(\"core\");\n internalMaxQueue(\"openwire\");\n internalMaxQueue(\"amqp\");\n }", "@Test\r\n public void testLongTermStorageGetAvailableCapacity1()\r\n {\r\n testLongTermStorage.addItem(item2, testLongTermStorage.getCapacity() / item2.getVolume());\r\n testLongTermStorage.resetInventory();\r\n assertEquals(\"Available capacity is wrong\", testLongTermStorage.getCapacity(),\r\n testLongTermStorage.getAvailableCapacity());\r\n }", "public void test_1() throws Exception {\n\t\tBoundedSharedQueue theBSQ = new BoundedSharedQueue(MAX_CAPACITY);\n\n\t\tassertEquals(MAX_CAPACITY, theBSQ.capacity());\n\t\t// make sure that the queue properties are right\n\t\tassertTrue(theBSQ.isEmpty());\n\t\tassertTrue(!theBSQ.isFull());\n\n\t\t// Fill the Queue\n\t\tfor(int i = 0; i < theBSQ.capacity(); ++i) {\n\t\t\tassertEquals(i, theBSQ.size());\n\t\t\ttheBSQ.add(new Integer(i));\n\t\t}\n\n\t\t// make sure the capacity doesn't evolve\n\t\tassertEquals(MAX_CAPACITY, theBSQ.capacity());\n\t\t// make sure the size is right after the filling loop\n\t\tassertEquals(theBSQ.capacity(), theBSQ.size());\n\t\t// make sure that the queue properties are right\n\t\tassertTrue(!theBSQ.isEmpty());\n\t\tassertTrue(theBSQ.isFull());\n\n\t\t// Empty the queue\n\t\tfor(int i = theBSQ.capacity(); i > 0 ; --i) {\n\t\t\tassertEquals(i, theBSQ.size());\n\t\t\tObject theObject = theBSQ.remove();\n\t\t\tassertEquals(theObject, new Integer(theBSQ.capacity()-i));\n\t\t}\n\n\t\tcheckEmptyness(theBSQ);\n\t}", "public void setCapacity(int capacity)\n {\n Validate.isTrue(capacity > 0, \"Capacity must be > 0\");\n capacity_ = capacity; \n }", "@Test\r\n\tpublic void testFillChargingNonlinear_EmptyCar_ExhaustiveDesiredCapacity() {\n\t\tSimulation.verbosity = 0;\r\n\t\tint startTimeSeconds = 0;\r\n\t\t\r\n\t\tdouble desiredCapacityInterval = 1; \r\n\t\t\r\n\t\tdouble desiredCapacity = desiredCapacityInterval;\r\n\t\twhile (desiredCapacity <= car.getMaxCapacity()) {\r\n\t\t\t\r\n\t\t\t//System.out.println(\"desiredCapacity=\" + desiredCapacity);\r\n\t\t\tcar.setCurrentPlan(new double[96]);\r\n\t\t\tschedulerNonlinear.fillChargingPlan(car, chargingStation, desiredCapacity, \r\n\t\t\t\t\tTimeslotSorter.getSortedTimeslots(null, 0, 96, TimeslotSortingCriteria.INDEX), \r\n\t\t\t\t\tstartTimeSeconds);\r\n\t\t\t\r\n\t\t\tassertEquals(desiredCapacity, schedulerNonlinear.getPlannedCapacity(chargingStation, car, startTimeSeconds), 1e-2);\r\n\t\t\tdesiredCapacity += desiredCapacityInterval;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "@Test\n public void testSize() {\n PriorityQueue<Integer> instance = new PriorityQueue<>();\n assertEquals(0, instance.size());\n instance.insert(1);\n instance.insert(2);\n assertEquals(2, instance.size());\n }", "public void setCapacity(Integer capacity) {\n this.capacity = capacity;\n }", "public void setCapacity(int capacity) {\r\n this.capacity = capacity;\r\n }", "public AsyncQueueBroker(int capacity, int timeoutDuration)\n {\n super(capacity, timeoutDuration);\n queue = new ArrayBlockingQueue<V>(100);\n }", "public void setCapacity(int capacity) {\n this.capacity = capacity;\n }", "public void setCapacity(int capacity) {\r\n\r\n this.capacity = capacity;\r\n }", "@WithName(\"max.queue.size\")\n @WithDefault(\"2048\")\n Integer maxQueueSize();", "public Battery(double initialCapacity) {\r\n capacity = initialCapacity;\r\n originalCapacity = initialCapacity;\r\n }", "private void checkCapacity(int desiredCapacity)\n {\n if (desiredCapacity > MAX_CAPACITY)\n throw new IllegalStateException(\"Attempt to create a hash table \" +\n \"whose capacity exceeds \" +\n \"allowed maximum.\");\n }", "public HeapPriorityQueue () \n\t{\n\t\tthis(DEFAULT_SIZE);\n\t}", "public void test_2() throws Exception {\n\t\tBoundedSharedQueue theBSQ = new BoundedSharedQueue(MAX_CAPACITY);\n\n\t\tassertEquals(MAX_CAPACITY, theBSQ.capacity());\n\t\tassertTrue(theBSQ.isEmpty());\n\t\tassertTrue(!theBSQ.isFull());\n\n\t\tfor(int i = 0; i < theBSQ.capacity(); ++i) {\n\t\t\tassertEquals(i, theBSQ.size());\n\t\t\ttheBSQ.add(new Integer(i));\n\t\t}\n\n\t\t// clear the queue\n\t\ttheBSQ.clear();\n\n\t\tcheckEmptyness(theBSQ);\n\t}", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n ConnectionFactories connectionFactories0 = new ConnectionFactories();\n QueueConnectionFactory queueConnectionFactory0 = new QueueConnectionFactory();\n try { \n connectionFactories0.addQueueConnectionFactory((-4356), queueConnectionFactory0);\n fail(\"Expecting exception: IndexOutOfBoundsException\");\n \n } catch(IndexOutOfBoundsException e) {\n //\n // Index: -4356, Size: 0\n //\n verifyException(\"java.util.ArrayList\", e);\n }\n }", "abstract protected int getCapacity();", "@Test\n public void testpoll() {\n\tFileBackedBlockingQueue<String> queue = new FileBackedBlockingQueue.Builder<String>()\n\t\t.directory(TEST_DIR)\n\t\t.serializer(new StringSerializer())\n\t\t.segmentSize((TEST_STRING.length() + Segment.ENTRY_OVERHEAD_SIZE) * 100)\n\t\t.build();\n\n\t// init\n\tfor (int i = 0; i < 2000; i++)\n\t queue.add(TEST_STRING);\n\tfor (int i = 0; i < 2000; i++) {\n\t if (i <= 1000)\n\t\tAssert.assertTrue(queue.segments.getActiveSegments() > 10);\n\t else\n\t\tAssert.assertTrue(\n\t\t\t\"size : \" + queue.segments.getInActiveSegments(),\n\t\t\tqueue.segments.getInActiveSegments() >= 9);\n\t Assert.assertEquals(TEST_STRING, queue.poll());\n\t}\n }", "@Test(expected=IllegalArgumentException.class)\r\n public void testConstructor_max0() {\r\n \r\n new LengthMax(0);\r\n fail();\r\n \r\n }", "@Test\r\n\tpublic void testCapacityZero(){\r\n\t\tString expectedResult = \"-\";\r\n\t\tString itemsResults = Packer.pack(\"./src/test/resources/capacityZero.txt\");\r\n\t\tassertEquals(expectedResult, itemsResults);\r\n\t\tSystem.out.println(\"Test passed. CapacityZero.\");\r\n\t}", "@Test\n public void sizeTest() {\n assertThat(4, is(this.queue.size()));\n }", "public void testSize() {\n assertEquals(this.stack.size(), 10, 0.01);\n assertEquals(this.empty.size(), 0, 0.01);\n }", "public void setCapacity(final int capacity) {\n this.capacity = capacity;\n }", "public test346(int size) {\n \tqueue = new LinkedList<>(); \n \tcap = size;\n }", "public ArrayQueue() {\n\t\tthis(Integer.MAX_VALUE);\n\t}", "public Builder setAvailableCapacity(int value) {\n \n availableCapacity_ = value;\n onChanged();\n return this;\n }", "@Test\r\n\tpublic void testFillChargingNonlinear_HighInitialSoC_ExhaustiveDesiredCapacity() {\n\t\tSimulation.verbosity = 0;\r\n\t\tint startTimeSeconds = 0;\r\n\t\t\r\n\t\t// Charge until soc=0.9\r\n\t\tdouble initialSoC = 0.9;\r\n\t\twhile (car.carBattery.getSoC() < initialSoC) {\r\n\t\t\tcar.addChargedCapacity(1, 32);\r\n\t\t}\r\n\t\t\r\n\t\tdouble desiredCapacity = 0.1;\r\n\t\twhile (desiredCapacity <= car.getMissingCapacity()) {\r\n\t\t\t\r\n\t\t\tcar.setCurrentPlan(new double[96]);\r\n\t\t\tschedulerNonlinear.fillChargingPlan(car, chargingStation, desiredCapacity, \r\n\t\t\t\t\tTimeslotSorter.getSortedTimeslots(null, 0, 96, TimeslotSortingCriteria.INDEX), \r\n\t\t\t\t\tstartTimeSeconds);\r\n\t\t\t\r\n\r\n\t\t\tdouble plannedCapacity = schedulerNonlinear.getPlannedCapacity(chargingStation, car, startTimeSeconds);\r\n\t\t\t//System.out.println(\"desiredCapacity=\" + desiredCapacity + \"Ah, plannedCapacity=\" + plannedCapacity);\r\n\t\t\t\r\n\t\t\tassertEquals(desiredCapacity, plannedCapacity, 1e-2);\r\n\t\t\tdesiredCapacity+=0.1;\r\n\t\t}\r\n\t\t\r\n\t}", "@Test\r\n public void testLongTermStorageGetCapacity2()\r\n {\r\n testLongTermStorage.addItem(item2, testLongTermStorage.getCapacity() / item2.getVolume());\r\n testLongTermStorage.resetInventory();\r\n assertEquals(\"Capacity is wrong\", TEST_LONG_TERM_STORAGE_CAPACITY,\r\n testLongTermStorage.getCapacity());\r\n }", "public void setCapacity(int capacity)\n {\n if(capacity >= 0)\n {\n this.capacity = capacity;\n }\n else\n {\n System.out.println(\"Cannot be negative.\");\n }\n }", "@Test(timeout = 4000)\n public void test00() throws Throwable {\n ConnectionFactories connectionFactories0 = new ConnectionFactories();\n connectionFactories0.isValid();\n QueueConnectionFactory[] queueConnectionFactoryArray0 = connectionFactories0.getQueueConnectionFactory();\n assertEquals(0, queueConnectionFactoryArray0.length);\n }", "@Test\n public void totalOfEmptyQueue(){\n // Arrange\n QueueOfPeople queueOfPeople = new QueueOfPeople(Arrays.asList());\n // Act\n // Assert\n assertEquals(0.0, queueOfPeople.getAmountOfPeopleWaiting(), 0.0);\n }", "@Test\n public void testIsEmpty() {\n this.queue = new HeapPriorityQueue<Person>(5); \n boolean actualResult = this.queue.isEmpty();\n \n boolean expectedResult = true;\n \n assertEquals(expectedResult, actualResult);\n }", "@Test\n public void labelIsNotOutOfRange() {\n propertyIsNot(\n StringUtil.createJString(MAX_RANGE_255 + 1),\n null,\n CodeI18N.FIELD_SIZE,\n \"label property must not be of size lesser than 0 and larger than \" + MAX_RANGE_255 + \" characters\"\n );\n }", "public void testFairEmptyFull() {\n SynchronousQueue q = new SynchronousQueue(true);\n assertTrue(q.isEmpty());\n\tassertEquals(0, q.size());\n assertEquals(0, q.remainingCapacity());\n assertFalse(q.offer(zero));\n }", "@Test\n public void testIsEmpty() {\n PriorityQueue test = new PriorityQueue();\n assertEquals(true, test.isEmpty());\n }", "Integer backlogCapacity();", "public abstract int capacity();", "public MyQueue() {\n queue = new PriorityQueue<>();\n }", "public void setCapacity(int capacity) {\n\n\t\tthis.capacity = capacity;\n\t}", "public Builder setMaximumCapacity(int value) {\n \n maximumCapacity_ = value;\n onChanged();\n return this;\n }", "@Test (timeout=5000)\n public void test2Queue() throws IOException {\n Configuration conf = getConfiguration();\n\n QueueManager manager = new QueueManager(conf);\n manager.setSchedulerInfo(\"first\", \"queueInfo\");\n manager.setSchedulerInfo(\"second\", \"queueInfoqueueInfo\");\n\n Queue root = manager.getRoot();\n \n // test children queues\n assertTrue(root.getChildren().size() == 2);\n Iterator<Queue> iterator = root.getChildren().iterator();\n Queue firstSubQueue = iterator.next();\n assertEquals(\"first\", firstSubQueue.getName());\n assertThat(\n firstSubQueue.getAcls().get(\"mapred.queue.first.acl-submit-job\")\n .toString()).isEqualTo(\n \"Users [user1, user2] and members of \" +\n \"the groups [group1, group2] are allowed\");\n Queue secondSubQueue = iterator.next();\n assertEquals(\"second\", secondSubQueue.getName());\n\n assertThat(firstSubQueue.getState().getStateName()).isEqualTo(\"running\");\n assertThat(secondSubQueue.getState().getStateName()).isEqualTo(\"stopped\");\n assertTrue(manager.isRunning(\"first\"));\n assertFalse(manager.isRunning(\"second\"));\n\n assertThat(firstSubQueue.getSchedulingInfo()).isEqualTo(\"queueInfo\");\n assertThat(secondSubQueue.getSchedulingInfo())\n .isEqualTo(\"queueInfoqueueInfo\");\n // test leaf queue\n Set<String> template = new HashSet<String>();\n template.add(\"first\");\n template.add(\"second\");\n assertEquals(manager.getLeafQueueNames(), template);\n }", "public void testEmptyFull() {\n SynchronousQueue q = new SynchronousQueue();\n assertTrue(q.isEmpty());\n\tassertEquals(0, q.size());\n assertEquals(0, q.remainingCapacity());\n assertFalse(q.offer(zero));\n }", "public MessageQueue(int capacity) \n { \n elements = new Message[capacity]; \n count = 0; \n head = 0; \n tail = 0; \n }", "@Test\r\n\tpublic void testCapacityNegative(){\r\n\t\ttry{\r\n\t\t\tPacker.pack(\"./src/test/resources/capacityNegative.txt\");\r\n\t\t}catch (APIException e) {\r\n\t\t\t// test passed - exception expected when incorrect parameters are being passed\r\n\t\t\tSystem.out.println(\"Test Passed. CapacityNegative.\");\r\n\t\t\treturn;\r\n\t\t} catch (Throwable t){\r\n\t\t\tSystem.out.println(\"Unexpected throwable: \" + t.getMessage());\r\n\t\t}\r\n\t\tSystem.out.println(\"\\n\");\r\n\t\tfail(\"APIException was expected\");\r\n\t}", "void setOrderCapacity(OrderCapacity inOrderCapacity);", "private void verifySteadyFairShareMemory(Collection<FSLeafQueue> leafQueues,\n int nodeCapacity) {\n for (FSLeafQueue leaf : leafQueues) {\n if (leaf.getName().startsWith(\"root.parentA\")) {\n assertEquals(0.2,\n (double) leaf.getSteadyFairShare().getMemorySize() / nodeCapacity,\n 0.001);\n } else if (leaf.getName().startsWith(\"root.parentB\")) {\n assertEquals(0.05,\n (double) leaf.getSteadyFairShare().getMemorySize() / nodeCapacity,\n 0.001);\n }\n }\n }", "public ArrayQueue() {\n this(10);\n }", "@Test\n public void testAdd() throws Exception {\n this.queue = new HeapPriorityQueue<Person>(5); \n this.queue.add(new Person(\"Four\"), 4);\n this.queue.add(new Person(\"Five\"), 5);\n boolean actualResult = this.queue.isEmpty();\n \n boolean expectedResult = false; \n assertEquals(expectedResult, actualResult);\n }", "public void setCapacity(String capacity) {\n\t\tthis.capacity = capacity;\n\t}", "public ArrayMaxPQ(int capacity) {\n pq = new int[capacity];\n }", "public void setCapacity(Long capacity) {\n this.capacity = capacity;\n }", "@Test(timeout = 4000)\n public void test21() throws Throwable {\n ConnectionFactories connectionFactories0 = new ConnectionFactories();\n QueueConnectionFactory queueConnectionFactory0 = new QueueConnectionFactory();\n try { \n connectionFactories0.setQueueConnectionFactory((-2400), queueConnectionFactory0);\n fail(\"Expecting exception: IndexOutOfBoundsException\");\n \n } catch(IndexOutOfBoundsException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.exolab.jms.config.ConnectionFactories\", e);\n }\n }", "public PacketBuilder(int capacity) {\n\t\tbuffer = ByteBuffer.allocate(capacity);\n\t}", "public int getInitialCapacity();", "public Builder setCapacity(com.cantor.drop.aggregator.model.CFTrade.Capacity value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000040;\n capacity_ = value.getNumber();\n onChanged();\n return this;\n }", "@Test\n public void test006_test_capcaity() {\n try {\n HashTableADT test = new HashTable<Integer, String>(2, 0.5);\n test.insert(1, \"2\");\n test.insert(2, \"3\");\n if (test.getCapacity() != 5) { //capacity should be 2* original + 1\n fail(\"resize not correct\");\n }\n } catch (Exception e) {\n fail(\"Correct Exception wasn't thrown\");\n }\n }", "@Test\r\n\tpublic void permutationsTestSize5() throws BoundedQueueException {\r\n\t\tbq.enqueue(1);\r\n\t\tbq.enqueue(2);\r\n\t\tbq.enqueue(3);\r\n\t\tbq.enqueue(4);\r\n\t\tbq.enqueue(5);\r\n\t\tbq.permutations();\r\n\t}", "public Queue(int maxsize){\n this.maxsize=maxsize; // sets the limit\n System.out.println(\"The maxsize was set to \"+maxsize);\n }", "public static void setSizeOfQueue(Label sizeOfQueueValue) {\n \tsizeOfQueueValue.setText(String.valueOf(Capture.getInspectionQueue().size()));\n }", "@Test\n\tpublic void createListWithInitialCapacity() {\n\t\tList<String> list1 = new ArrayList<>();\n\n\t\t// You can set capacity using constructor of ArrayList\n\t\tList<String> list2 = new ArrayList<>(20);\n\n\t\tassertTrue(list1.isEmpty());\n\t\tassertTrue(list2.isEmpty());\n\t\tassertTrue(list1.equals(list2));\n\t}", "public int getCapacity();", "public void testConstructorA1() {\r\n try {\r\n new BidUpdateHandler(\" \", \"bidId\", \"maxAmount\");\r\n fail(\"IllegalArgumentException is expected\");\r\n } catch (IllegalArgumentException e) {\r\n // ok.\r\n }\r\n }", "public ArrayQueue(int capacity){\r\n\t\tq = new String [capacity];\r\n\t\tn = 0;\r\n\t\tfirst = 0;\r\n\t\tlast = 0; \r\n\t}", "boolean hasCapacity();", "public WaitablePQueue() {\n\t\tthis(DEFAULT_INITIAL_CAPACITY, null);\n\t}", "@Test(timeout = 4000)\n public void test40() throws Throwable {\n ConnectionFactories connectionFactories0 = new ConnectionFactories();\n try { \n connectionFactories0.addXAQueueConnectionFactory(457, (XAQueueConnectionFactory) null);\n fail(\"Expecting exception: IndexOutOfBoundsException\");\n \n } catch(IndexOutOfBoundsException e) {\n //\n // Index: 457, Size: 0\n //\n verifyException(\"java.util.ArrayList\", e);\n }\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n ConnectionFactories connectionFactories0 = new ConnectionFactories();\n try { \n connectionFactories0.getQueueConnectionFactory((-1638));\n fail(\"Expecting exception: IndexOutOfBoundsException\");\n \n } catch(IndexOutOfBoundsException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.exolab.jms.config.ConnectionFactories\", e);\n }\n }", "@Test(timeout = 4000)\n public void test72() throws Throwable {\n ConnectionFactories connectionFactories0 = new ConnectionFactories();\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, true);\n QueueConnectionFactory queueConnectionFactory0 = new QueueConnectionFactory();\n connectionFactories0.addQueueConnectionFactory(queueConnectionFactory0);\n QueueConnectionFactory[] queueConnectionFactoryArray0 = connectionFactories0.getQueueConnectionFactory();\n assertEquals(1, queueConnectionFactoryArray0.length);\n }", "public TabuList(int capacity)\r\n\t{\r\n\t\tthis.capacity = capacity;\r\n\t\tqueue = new LinkedList<Solution>();\r\n\t\tset = new TreeSet<Solution>();\r\n\t}", "public Heap(int initialCapacity) {\r\n\t\tthis(initialCapacity, null);\r\n\t}", "@Test(timeout = 4000)\n public void test69() throws Throwable {\n ConnectionFactories connectionFactories0 = new ConnectionFactories();\n XAQueueConnectionFactory xAQueueConnectionFactory0 = new XAQueueConnectionFactory();\n try { \n connectionFactories0.setXAQueueConnectionFactory(0, xAQueueConnectionFactory0);\n fail(\"Expecting exception: IndexOutOfBoundsException\");\n \n } catch(IndexOutOfBoundsException e) {\n //\n // Index: 0, Size: 0\n //\n verifyException(\"java.util.ArrayList\", e);\n }\n }", "public static boolean testAlphabetListConstructorBadInput() {\r\n try {\r\n AlphabetList list1 = new AlphabetList(-2);\r\n } catch (IllegalArgumentException e) {\r\n if (e.getMessage() != null && e.getMessage()\r\n .contains(\"capacity of this list must be a non-zero a positive integer.\"))\r\n\r\n return true;\r\n }\r\n return false;\r\n }", "@Test(timeout = 4000)\n public void test11() throws Throwable {\n ConnectionFactories connectionFactories0 = new ConnectionFactories();\n try { \n connectionFactories0.getQueueConnectionFactory(0);\n fail(\"Expecting exception: IndexOutOfBoundsException\");\n \n } catch(IndexOutOfBoundsException e) {\n //\n // Index: 0, Size: 0\n //\n verifyException(\"java.util.ArrayList\", e);\n }\n }", "public void testConstructorA5() {\r\n try {\r\n new BidUpdateHandler(\"auctionId\", null, \"maxAmount\");\r\n fail(\"IllegalArgumentException is expected\");\r\n } catch (IllegalArgumentException e) {\r\n // ok.\r\n }\r\n }", "public Queue() {}", "public BlockingQueue(int maxSize) {\r\n\t\tthis.maxSize = maxSize;\r\n\t\tqueue = new LinkedList<T>();\r\n\t}", "public RingBuffer(int capacity){\n structure = new LinkedList<E>();\n this.capacity = capacity;\n }", "private String notEnoughCapacity(String resource, int level) {\n return String.format(\"Capacity of %s's container is less on: %d.\\n\", resource, level);\n }", "@Test(timeout = 4000)\n public void test48() throws Throwable {\n ConnectionFactories connectionFactories0 = new ConnectionFactories();\n connectionFactories0.getQueueConnectionFactoryCount();\n ConnectionFactory connectionFactory0 = new ConnectionFactory();\n try { \n connectionFactories0.setConnectionFactory(0, connectionFactory0);\n fail(\"Expecting exception: IndexOutOfBoundsException\");\n \n } catch(IndexOutOfBoundsException e) {\n //\n // Index: 0, Size: 0\n //\n verifyException(\"java.util.ArrayList\", e);\n }\n }" ]
[ "0.7656539", "0.7522964", "0.6203029", "0.5998917", "0.58360815", "0.57339984", "0.56196845", "0.5598431", "0.5579483", "0.5554304", "0.5529724", "0.55280566", "0.5522661", "0.5511202", "0.5500058", "0.5487799", "0.54693586", "0.5444465", "0.5433737", "0.5413645", "0.54031855", "0.5366726", "0.5362038", "0.53558505", "0.5355068", "0.5338364", "0.5322408", "0.5311321", "0.5306105", "0.52999556", "0.5298601", "0.52859354", "0.52601534", "0.52321637", "0.52308255", "0.5227", "0.5226707", "0.51987475", "0.51939577", "0.5191331", "0.5176349", "0.51658684", "0.51464796", "0.5141759", "0.5137878", "0.5136641", "0.51354176", "0.5116325", "0.510476", "0.5096819", "0.50873935", "0.5085097", "0.5084081", "0.5078884", "0.50770545", "0.507534", "0.50671136", "0.50595695", "0.50499153", "0.5045643", "0.5033344", "0.50285923", "0.5014801", "0.50132245", "0.5013122", "0.5008139", "0.49988788", "0.49965146", "0.4995526", "0.49942493", "0.49881208", "0.49862412", "0.49781898", "0.49765557", "0.496788", "0.49648526", "0.49640563", "0.4962644", "0.49559435", "0.4946693", "0.4944127", "0.49381542", "0.49380988", "0.49338353", "0.4928417", "0.4922024", "0.4910198", "0.49091592", "0.49089417", "0.49084374", "0.48961976", "0.48948863", "0.4894223", "0.48938987", "0.48877057", "0.48860526", "0.48832983", "0.4875098", "0.48724028", "0.48716912" ]
0.75236106
1
Test init a queue configuration, children's capacity for a given label doesn't equals to 100%. This expect IllegalArgumentException thrown.
@Test(expected = IllegalArgumentException.class) public void testQueueParsingFailWhenSumOfChildrenLabeledCapacityNot100Percent() throws IOException { nodeLabelManager.addToCluserNodeLabelsWithDefaultExclusivity(ImmutableSet.of("red", "blue")); YarnConfiguration conf = new YarnConfiguration(); CapacitySchedulerConfiguration csConf = new CapacitySchedulerConfiguration(conf); setupQueueConfigurationWithLabels(csConf); csConf.setCapacityByLabel(((ROOT) + ".b.b3"), "red", 24); CapacityScheduler capacityScheduler = new CapacityScheduler(); RMContextImpl rmContext = new RMContextImpl(null, null, null, null, null, null, new org.apache.hadoop.yarn.server.resourcemanager.security.RMContainerTokenSecretManager(csConf), new org.apache.hadoop.yarn.server.resourcemanager.security.NMTokenSecretManagerInRM(csConf), new ClientToAMTokenSecretManagerInRM(), null); rmContext.setNodeLabelManager(nodeLabelManager); capacityScheduler.setConf(csConf); capacityScheduler.setRMContext(rmContext); capacityScheduler.init(csConf); capacityScheduler.start(); ServiceOperations.stopQuietly(capacityScheduler); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(expected = IllegalArgumentException.class)\n public void testQueueParsingFailWhenSumOfChildrenNonLabeledCapacityNot100Percent() throws IOException {\n nodeLabelManager.addToCluserNodeLabelsWithDefaultExclusivity(ImmutableSet.of(\"red\", \"blue\"));\n YarnConfiguration conf = new YarnConfiguration();\n CapacitySchedulerConfiguration csConf = new CapacitySchedulerConfiguration(conf);\n setupQueueConfiguration(csConf);\n csConf.setCapacity(((ROOT) + \".c.c2\"), 5);\n CapacityScheduler capacityScheduler = new CapacityScheduler();\n RMContextImpl rmContext = new RMContextImpl(null, null, null, null, null, null, new org.apache.hadoop.yarn.server.resourcemanager.security.RMContainerTokenSecretManager(csConf), new org.apache.hadoop.yarn.server.resourcemanager.security.NMTokenSecretManagerInRM(csConf), new ClientToAMTokenSecretManagerInRM(), null);\n rmContext.setNodeLabelManager(nodeLabelManager);\n capacityScheduler.setConf(csConf);\n capacityScheduler.setRMContext(rmContext);\n capacityScheduler.init(csConf);\n capacityScheduler.start();\n ServiceOperations.stopQuietly(capacityScheduler);\n }", "@Test(expected = IllegalArgumentException.class)\n public void testQueueParsingWithSumOfChildLabelCapacityNot100PercentWithWildCard() throws IOException {\n nodeLabelManager.addToCluserNodeLabelsWithDefaultExclusivity(ImmutableSet.of(\"red\", \"blue\"));\n YarnConfiguration conf = new YarnConfiguration();\n CapacitySchedulerConfiguration csConf = new CapacitySchedulerConfiguration(conf);\n setupQueueConfigurationWithLabels(csConf);\n csConf.setCapacityByLabel(((ROOT) + \".b.b3\"), \"red\", 24);\n csConf.setAccessibleNodeLabels(ROOT, ImmutableSet.of(ANY));\n csConf.setAccessibleNodeLabels(((ROOT) + \".b\"), ImmutableSet.of(ANY));\n CapacityScheduler capacityScheduler = new CapacityScheduler();\n RMContextImpl rmContext = new RMContextImpl(null, null, null, null, null, null, new org.apache.hadoop.yarn.server.resourcemanager.security.RMContainerTokenSecretManager(csConf), new org.apache.hadoop.yarn.server.resourcemanager.security.NMTokenSecretManagerInRM(csConf), new ClientToAMTokenSecretManagerInRM(), null);\n rmContext.setNodeLabelManager(nodeLabelManager);\n capacityScheduler.setConf(csConf);\n capacityScheduler.setRMContext(rmContext);\n capacityScheduler.init(csConf);\n capacityScheduler.start();\n ServiceOperations.stopQuietly(capacityScheduler);\n }", "@Test\n public void capacityTest() {\n // TODO: test capacity\n }", "private void checkCapacity(int capacity) \n {\n if (capacity > MAX_CAPACITY)\n throw new IllegalStateException(\"Attempt to create a bag whose \" +\n \"capacity exeeds allowed \" +\n \"maximum of \" + MAX_CAPACITY);\n }", "@Before\n public void setUp() throws Exception {\n csConf = new CapacitySchedulerConfiguration();\n csConf.setClass(YarnConfiguration.RM_SCHEDULER, CapacityScheduler.class,\n ResourceScheduler.class);\n\n // By default, set 3 queues, a/b, and a.a1\n csConf.setQueues(\"root\", new String[]{\"a\", \"b\"});\n csConf.setNonLabeledQueueWeight(\"root\", 1f);\n csConf.setNonLabeledQueueWeight(\"root.a\", 1f);\n csConf.setNonLabeledQueueWeight(\"root.b\", 1f);\n csConf.setQueues(\"root.a\", new String[]{\"a1\"});\n csConf.setNonLabeledQueueWeight(\"root.a.a1\", 1f);\n csConf.setAutoQueueCreationV2Enabled(\"root\", true);\n csConf.setAutoQueueCreationV2Enabled(\"root.a\", true);\n csConf.setAutoQueueCreationV2Enabled(\"root.e\", true);\n csConf.setAutoQueueCreationV2Enabled(PARENT_QUEUE, true);\n // Test for auto deletion when expired\n csConf.setAutoExpiredDeletionTime(1);\n }", "public void test_4() throws Exception {\n\t\tBoundedSharedQueue theBSQ = new BoundedSharedQueue(MAX_CAPACITY);\n\n\t\ttry {\n\t\t\ttheBSQ.add(null); // null is not an accepted value\n\t\t\tfail(\"should throw an IllegalArgumentException\");\n\t\t}\n\t\tcatch(IllegalArgumentException ex) {\n\t\t\t// OK\n\t\t}\n\t}", "public void test_5() throws Exception {\n\t\ttry {\n\t\t\tBoundedSharedQueue theBSQ = new BoundedSharedQueue(0);\n\t\t\tfail(\"should throw an IllegalArgumentException\");\n\t\t}\n\t\tcatch(IllegalArgumentException ex) {\n\t\t\t// OK\n\t\t}\n\t}", "public PriorityQueue(int capacity) { \r\n this.capacity=capacity;\r\n this.currentSize=0;\r\n this.queue=new NodeBase[capacity];\r\n }", "public WaitablePQueue(int capacity) {\n\t\tthis(capacity, null);\n\t}", "@Test\r\n public void testLongTermStorageGetCapacity1()\r\n {\r\n assertEquals(\"Capacity is wrong\", TEST_LONG_TERM_STORAGE_CAPACITY,\r\n testLongTermStorage.getCapacity());\r\n }", "public void ensureCapacity(int minCapacity);", "@Test\n public void testExceedsQuotaOnStartup() throws Exception {\n List<Dag<JobExecutionPlan>> dags = DagManagerTest.buildDagList(2, \"user\", ConfigFactory.empty());\n // Ensure that the current attempt is 1, normally done by DagManager\n dags.get(0).getNodes().get(0).getValue().setCurrentAttempts(1);\n dags.get(1).getNodes().get(0).getValue().setCurrentAttempts(1);\n\n // Should not be throwing the exception\n this._quotaManager.init(dags);\n }", "public Queue()\r\n\t{\r\n\t\tthis(capacity);\r\n\t}", "myQueue(int size){\n }", "@Test\n void constructor() {\n // Act\n final CreateQueueOptions actual = new CreateQueueOptions();\n\n // Assert\n assertEquals(MAX_DURATION, actual.getAutoDeleteOnIdle());\n assertEquals(MAX_DURATION, actual.getDefaultMessageTimeToLive());\n assertEquals(DEFAULT_DUPLICATE_DETECTION_DURATION, actual.getDuplicateDetectionHistoryTimeWindow());\n assertTrue(actual.isBatchedOperationsEnabled());\n assertFalse(actual.isPartitioningEnabled());\n assertEquals(DEFAULT_LOCK_DURATION, actual.getLockDuration());\n assertEquals(DEFAULT_MAX_DELIVERY_COUNT, actual.getMaxDeliveryCount());\n assertEquals(DEFAULT_QUEUE_SIZE, actual.getMaxSizeInMegabytes());\n assertFalse(actual.isDuplicateDetectionRequired());\n assertFalse(actual.isSessionRequired());\n assertFalse(actual.isDeadLetteringOnMessageExpiration());\n assertNull(actual.getUserMetadata());\n assertEquals(EntityStatus.ACTIVE, actual.getStatus());\n }", "public void setCapacity(int capacity) \n {\n this.capacity = capacity;\n }", "@Before\r\n public void setUp() {\r\n queue = new LinkedQueue<String> (initCapacity);\r\n }", "@Test\n\tpublic void overrideDefaultCapacity() {\n\t\tcst = new Airport(2, weatherMock);\n\t\tassertEquals(2, cst.capacity);\n\t}", "public void setCapacity(int value) {\n this.capacity = value;\n }", "public void checkCapacity(String target, long size) throws Exception;", "@Test\n public void testMaxQueue() throws Throwable {\n internalMaxQueue(\"core\");\n internalMaxQueue(\"openwire\");\n internalMaxQueue(\"amqp\");\n }", "@Test\r\n public void testLongTermStorageGetAvailableCapacity1()\r\n {\r\n testLongTermStorage.addItem(item2, testLongTermStorage.getCapacity() / item2.getVolume());\r\n testLongTermStorage.resetInventory();\r\n assertEquals(\"Available capacity is wrong\", testLongTermStorage.getCapacity(),\r\n testLongTermStorage.getAvailableCapacity());\r\n }", "public void test_1() throws Exception {\n\t\tBoundedSharedQueue theBSQ = new BoundedSharedQueue(MAX_CAPACITY);\n\n\t\tassertEquals(MAX_CAPACITY, theBSQ.capacity());\n\t\t// make sure that the queue properties are right\n\t\tassertTrue(theBSQ.isEmpty());\n\t\tassertTrue(!theBSQ.isFull());\n\n\t\t// Fill the Queue\n\t\tfor(int i = 0; i < theBSQ.capacity(); ++i) {\n\t\t\tassertEquals(i, theBSQ.size());\n\t\t\ttheBSQ.add(new Integer(i));\n\t\t}\n\n\t\t// make sure the capacity doesn't evolve\n\t\tassertEquals(MAX_CAPACITY, theBSQ.capacity());\n\t\t// make sure the size is right after the filling loop\n\t\tassertEquals(theBSQ.capacity(), theBSQ.size());\n\t\t// make sure that the queue properties are right\n\t\tassertTrue(!theBSQ.isEmpty());\n\t\tassertTrue(theBSQ.isFull());\n\n\t\t// Empty the queue\n\t\tfor(int i = theBSQ.capacity(); i > 0 ; --i) {\n\t\t\tassertEquals(i, theBSQ.size());\n\t\t\tObject theObject = theBSQ.remove();\n\t\t\tassertEquals(theObject, new Integer(theBSQ.capacity()-i));\n\t\t}\n\n\t\tcheckEmptyness(theBSQ);\n\t}", "public void setCapacity(int capacity)\n {\n Validate.isTrue(capacity > 0, \"Capacity must be > 0\");\n capacity_ = capacity; \n }", "@Test\r\n\tpublic void testFillChargingNonlinear_EmptyCar_ExhaustiveDesiredCapacity() {\n\t\tSimulation.verbosity = 0;\r\n\t\tint startTimeSeconds = 0;\r\n\t\t\r\n\t\tdouble desiredCapacityInterval = 1; \r\n\t\t\r\n\t\tdouble desiredCapacity = desiredCapacityInterval;\r\n\t\twhile (desiredCapacity <= car.getMaxCapacity()) {\r\n\t\t\t\r\n\t\t\t//System.out.println(\"desiredCapacity=\" + desiredCapacity);\r\n\t\t\tcar.setCurrentPlan(new double[96]);\r\n\t\t\tschedulerNonlinear.fillChargingPlan(car, chargingStation, desiredCapacity, \r\n\t\t\t\t\tTimeslotSorter.getSortedTimeslots(null, 0, 96, TimeslotSortingCriteria.INDEX), \r\n\t\t\t\t\tstartTimeSeconds);\r\n\t\t\t\r\n\t\t\tassertEquals(desiredCapacity, schedulerNonlinear.getPlannedCapacity(chargingStation, car, startTimeSeconds), 1e-2);\r\n\t\t\tdesiredCapacity += desiredCapacityInterval;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "@Test\n public void testSize() {\n PriorityQueue<Integer> instance = new PriorityQueue<>();\n assertEquals(0, instance.size());\n instance.insert(1);\n instance.insert(2);\n assertEquals(2, instance.size());\n }", "public void setCapacity(Integer capacity) {\n this.capacity = capacity;\n }", "public void setCapacity(int capacity) {\r\n this.capacity = capacity;\r\n }", "public AsyncQueueBroker(int capacity, int timeoutDuration)\n {\n super(capacity, timeoutDuration);\n queue = new ArrayBlockingQueue<V>(100);\n }", "public void setCapacity(int capacity) {\n this.capacity = capacity;\n }", "public void setCapacity(int capacity) {\r\n\r\n this.capacity = capacity;\r\n }", "@WithName(\"max.queue.size\")\n @WithDefault(\"2048\")\n Integer maxQueueSize();", "public Battery(double initialCapacity) {\r\n capacity = initialCapacity;\r\n originalCapacity = initialCapacity;\r\n }", "private void checkCapacity(int desiredCapacity)\n {\n if (desiredCapacity > MAX_CAPACITY)\n throw new IllegalStateException(\"Attempt to create a hash table \" +\n \"whose capacity exceeds \" +\n \"allowed maximum.\");\n }", "public HeapPriorityQueue () \n\t{\n\t\tthis(DEFAULT_SIZE);\n\t}", "public void test_2() throws Exception {\n\t\tBoundedSharedQueue theBSQ = new BoundedSharedQueue(MAX_CAPACITY);\n\n\t\tassertEquals(MAX_CAPACITY, theBSQ.capacity());\n\t\tassertTrue(theBSQ.isEmpty());\n\t\tassertTrue(!theBSQ.isFull());\n\n\t\tfor(int i = 0; i < theBSQ.capacity(); ++i) {\n\t\t\tassertEquals(i, theBSQ.size());\n\t\t\ttheBSQ.add(new Integer(i));\n\t\t}\n\n\t\t// clear the queue\n\t\ttheBSQ.clear();\n\n\t\tcheckEmptyness(theBSQ);\n\t}", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n ConnectionFactories connectionFactories0 = new ConnectionFactories();\n QueueConnectionFactory queueConnectionFactory0 = new QueueConnectionFactory();\n try { \n connectionFactories0.addQueueConnectionFactory((-4356), queueConnectionFactory0);\n fail(\"Expecting exception: IndexOutOfBoundsException\");\n \n } catch(IndexOutOfBoundsException e) {\n //\n // Index: -4356, Size: 0\n //\n verifyException(\"java.util.ArrayList\", e);\n }\n }", "abstract protected int getCapacity();", "@Test(expected=IllegalArgumentException.class)\r\n public void testConstructor_max0() {\r\n \r\n new LengthMax(0);\r\n fail();\r\n \r\n }", "@Test\n public void testpoll() {\n\tFileBackedBlockingQueue<String> queue = new FileBackedBlockingQueue.Builder<String>()\n\t\t.directory(TEST_DIR)\n\t\t.serializer(new StringSerializer())\n\t\t.segmentSize((TEST_STRING.length() + Segment.ENTRY_OVERHEAD_SIZE) * 100)\n\t\t.build();\n\n\t// init\n\tfor (int i = 0; i < 2000; i++)\n\t queue.add(TEST_STRING);\n\tfor (int i = 0; i < 2000; i++) {\n\t if (i <= 1000)\n\t\tAssert.assertTrue(queue.segments.getActiveSegments() > 10);\n\t else\n\t\tAssert.assertTrue(\n\t\t\t\"size : \" + queue.segments.getInActiveSegments(),\n\t\t\tqueue.segments.getInActiveSegments() >= 9);\n\t Assert.assertEquals(TEST_STRING, queue.poll());\n\t}\n }", "@Test\r\n\tpublic void testCapacityZero(){\r\n\t\tString expectedResult = \"-\";\r\n\t\tString itemsResults = Packer.pack(\"./src/test/resources/capacityZero.txt\");\r\n\t\tassertEquals(expectedResult, itemsResults);\r\n\t\tSystem.out.println(\"Test passed. CapacityZero.\");\r\n\t}", "@Test\n public void sizeTest() {\n assertThat(4, is(this.queue.size()));\n }", "public void testSize() {\n assertEquals(this.stack.size(), 10, 0.01);\n assertEquals(this.empty.size(), 0, 0.01);\n }", "public void setCapacity(final int capacity) {\n this.capacity = capacity;\n }", "public test346(int size) {\n \tqueue = new LinkedList<>(); \n \tcap = size;\n }", "public ArrayQueue() {\n\t\tthis(Integer.MAX_VALUE);\n\t}", "public Builder setAvailableCapacity(int value) {\n \n availableCapacity_ = value;\n onChanged();\n return this;\n }", "@Test\r\n\tpublic void testFillChargingNonlinear_HighInitialSoC_ExhaustiveDesiredCapacity() {\n\t\tSimulation.verbosity = 0;\r\n\t\tint startTimeSeconds = 0;\r\n\t\t\r\n\t\t// Charge until soc=0.9\r\n\t\tdouble initialSoC = 0.9;\r\n\t\twhile (car.carBattery.getSoC() < initialSoC) {\r\n\t\t\tcar.addChargedCapacity(1, 32);\r\n\t\t}\r\n\t\t\r\n\t\tdouble desiredCapacity = 0.1;\r\n\t\twhile (desiredCapacity <= car.getMissingCapacity()) {\r\n\t\t\t\r\n\t\t\tcar.setCurrentPlan(new double[96]);\r\n\t\t\tschedulerNonlinear.fillChargingPlan(car, chargingStation, desiredCapacity, \r\n\t\t\t\t\tTimeslotSorter.getSortedTimeslots(null, 0, 96, TimeslotSortingCriteria.INDEX), \r\n\t\t\t\t\tstartTimeSeconds);\r\n\t\t\t\r\n\r\n\t\t\tdouble plannedCapacity = schedulerNonlinear.getPlannedCapacity(chargingStation, car, startTimeSeconds);\r\n\t\t\t//System.out.println(\"desiredCapacity=\" + desiredCapacity + \"Ah, plannedCapacity=\" + plannedCapacity);\r\n\t\t\t\r\n\t\t\tassertEquals(desiredCapacity, plannedCapacity, 1e-2);\r\n\t\t\tdesiredCapacity+=0.1;\r\n\t\t}\r\n\t\t\r\n\t}", "@Test\r\n public void testLongTermStorageGetCapacity2()\r\n {\r\n testLongTermStorage.addItem(item2, testLongTermStorage.getCapacity() / item2.getVolume());\r\n testLongTermStorage.resetInventory();\r\n assertEquals(\"Capacity is wrong\", TEST_LONG_TERM_STORAGE_CAPACITY,\r\n testLongTermStorage.getCapacity());\r\n }", "public void setCapacity(int capacity)\n {\n if(capacity >= 0)\n {\n this.capacity = capacity;\n }\n else\n {\n System.out.println(\"Cannot be negative.\");\n }\n }", "@Test(timeout = 4000)\n public void test00() throws Throwable {\n ConnectionFactories connectionFactories0 = new ConnectionFactories();\n connectionFactories0.isValid();\n QueueConnectionFactory[] queueConnectionFactoryArray0 = connectionFactories0.getQueueConnectionFactory();\n assertEquals(0, queueConnectionFactoryArray0.length);\n }", "@Test\n public void totalOfEmptyQueue(){\n // Arrange\n QueueOfPeople queueOfPeople = new QueueOfPeople(Arrays.asList());\n // Act\n // Assert\n assertEquals(0.0, queueOfPeople.getAmountOfPeopleWaiting(), 0.0);\n }", "@Test\n public void testIsEmpty() {\n this.queue = new HeapPriorityQueue<Person>(5); \n boolean actualResult = this.queue.isEmpty();\n \n boolean expectedResult = true;\n \n assertEquals(expectedResult, actualResult);\n }", "@Test\n public void labelIsNotOutOfRange() {\n propertyIsNot(\n StringUtil.createJString(MAX_RANGE_255 + 1),\n null,\n CodeI18N.FIELD_SIZE,\n \"label property must not be of size lesser than 0 and larger than \" + MAX_RANGE_255 + \" characters\"\n );\n }", "public void testFairEmptyFull() {\n SynchronousQueue q = new SynchronousQueue(true);\n assertTrue(q.isEmpty());\n\tassertEquals(0, q.size());\n assertEquals(0, q.remainingCapacity());\n assertFalse(q.offer(zero));\n }", "@Test\n public void testIsEmpty() {\n PriorityQueue test = new PriorityQueue();\n assertEquals(true, test.isEmpty());\n }", "Integer backlogCapacity();", "public abstract int capacity();", "public MyQueue() {\n queue = new PriorityQueue<>();\n }", "public void setCapacity(int capacity) {\n\n\t\tthis.capacity = capacity;\n\t}", "public Builder setMaximumCapacity(int value) {\n \n maximumCapacity_ = value;\n onChanged();\n return this;\n }", "@Test (timeout=5000)\n public void test2Queue() throws IOException {\n Configuration conf = getConfiguration();\n\n QueueManager manager = new QueueManager(conf);\n manager.setSchedulerInfo(\"first\", \"queueInfo\");\n manager.setSchedulerInfo(\"second\", \"queueInfoqueueInfo\");\n\n Queue root = manager.getRoot();\n \n // test children queues\n assertTrue(root.getChildren().size() == 2);\n Iterator<Queue> iterator = root.getChildren().iterator();\n Queue firstSubQueue = iterator.next();\n assertEquals(\"first\", firstSubQueue.getName());\n assertThat(\n firstSubQueue.getAcls().get(\"mapred.queue.first.acl-submit-job\")\n .toString()).isEqualTo(\n \"Users [user1, user2] and members of \" +\n \"the groups [group1, group2] are allowed\");\n Queue secondSubQueue = iterator.next();\n assertEquals(\"second\", secondSubQueue.getName());\n\n assertThat(firstSubQueue.getState().getStateName()).isEqualTo(\"running\");\n assertThat(secondSubQueue.getState().getStateName()).isEqualTo(\"stopped\");\n assertTrue(manager.isRunning(\"first\"));\n assertFalse(manager.isRunning(\"second\"));\n\n assertThat(firstSubQueue.getSchedulingInfo()).isEqualTo(\"queueInfo\");\n assertThat(secondSubQueue.getSchedulingInfo())\n .isEqualTo(\"queueInfoqueueInfo\");\n // test leaf queue\n Set<String> template = new HashSet<String>();\n template.add(\"first\");\n template.add(\"second\");\n assertEquals(manager.getLeafQueueNames(), template);\n }", "public void testEmptyFull() {\n SynchronousQueue q = new SynchronousQueue();\n assertTrue(q.isEmpty());\n\tassertEquals(0, q.size());\n assertEquals(0, q.remainingCapacity());\n assertFalse(q.offer(zero));\n }", "@Test\r\n\tpublic void testCapacityNegative(){\r\n\t\ttry{\r\n\t\t\tPacker.pack(\"./src/test/resources/capacityNegative.txt\");\r\n\t\t}catch (APIException e) {\r\n\t\t\t// test passed - exception expected when incorrect parameters are being passed\r\n\t\t\tSystem.out.println(\"Test Passed. CapacityNegative.\");\r\n\t\t\treturn;\r\n\t\t} catch (Throwable t){\r\n\t\t\tSystem.out.println(\"Unexpected throwable: \" + t.getMessage());\r\n\t\t}\r\n\t\tSystem.out.println(\"\\n\");\r\n\t\tfail(\"APIException was expected\");\r\n\t}", "public MessageQueue(int capacity) \n { \n elements = new Message[capacity]; \n count = 0; \n head = 0; \n tail = 0; \n }", "void setOrderCapacity(OrderCapacity inOrderCapacity);", "private void verifySteadyFairShareMemory(Collection<FSLeafQueue> leafQueues,\n int nodeCapacity) {\n for (FSLeafQueue leaf : leafQueues) {\n if (leaf.getName().startsWith(\"root.parentA\")) {\n assertEquals(0.2,\n (double) leaf.getSteadyFairShare().getMemorySize() / nodeCapacity,\n 0.001);\n } else if (leaf.getName().startsWith(\"root.parentB\")) {\n assertEquals(0.05,\n (double) leaf.getSteadyFairShare().getMemorySize() / nodeCapacity,\n 0.001);\n }\n }\n }", "public ArrayQueue() {\n this(10);\n }", "@Test\n public void testAdd() throws Exception {\n this.queue = new HeapPriorityQueue<Person>(5); \n this.queue.add(new Person(\"Four\"), 4);\n this.queue.add(new Person(\"Five\"), 5);\n boolean actualResult = this.queue.isEmpty();\n \n boolean expectedResult = false; \n assertEquals(expectedResult, actualResult);\n }", "public void setCapacity(String capacity) {\n\t\tthis.capacity = capacity;\n\t}", "public ArrayMaxPQ(int capacity) {\n pq = new int[capacity];\n }", "public void setCapacity(Long capacity) {\n this.capacity = capacity;\n }", "@Test(timeout = 4000)\n public void test21() throws Throwable {\n ConnectionFactories connectionFactories0 = new ConnectionFactories();\n QueueConnectionFactory queueConnectionFactory0 = new QueueConnectionFactory();\n try { \n connectionFactories0.setQueueConnectionFactory((-2400), queueConnectionFactory0);\n fail(\"Expecting exception: IndexOutOfBoundsException\");\n \n } catch(IndexOutOfBoundsException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.exolab.jms.config.ConnectionFactories\", e);\n }\n }", "public PacketBuilder(int capacity) {\n\t\tbuffer = ByteBuffer.allocate(capacity);\n\t}", "public int getInitialCapacity();", "@Test\n public void test006_test_capcaity() {\n try {\n HashTableADT test = new HashTable<Integer, String>(2, 0.5);\n test.insert(1, \"2\");\n test.insert(2, \"3\");\n if (test.getCapacity() != 5) { //capacity should be 2* original + 1\n fail(\"resize not correct\");\n }\n } catch (Exception e) {\n fail(\"Correct Exception wasn't thrown\");\n }\n }", "public Builder setCapacity(com.cantor.drop.aggregator.model.CFTrade.Capacity value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000040;\n capacity_ = value.getNumber();\n onChanged();\n return this;\n }", "@Test\r\n\tpublic void permutationsTestSize5() throws BoundedQueueException {\r\n\t\tbq.enqueue(1);\r\n\t\tbq.enqueue(2);\r\n\t\tbq.enqueue(3);\r\n\t\tbq.enqueue(4);\r\n\t\tbq.enqueue(5);\r\n\t\tbq.permutations();\r\n\t}", "public Queue(int maxsize){\n this.maxsize=maxsize; // sets the limit\n System.out.println(\"The maxsize was set to \"+maxsize);\n }", "@Test\n\tpublic void createListWithInitialCapacity() {\n\t\tList<String> list1 = new ArrayList<>();\n\n\t\t// You can set capacity using constructor of ArrayList\n\t\tList<String> list2 = new ArrayList<>(20);\n\n\t\tassertTrue(list1.isEmpty());\n\t\tassertTrue(list2.isEmpty());\n\t\tassertTrue(list1.equals(list2));\n\t}", "public static void setSizeOfQueue(Label sizeOfQueueValue) {\n \tsizeOfQueueValue.setText(String.valueOf(Capture.getInspectionQueue().size()));\n }", "public void testConstructorA1() {\r\n try {\r\n new BidUpdateHandler(\" \", \"bidId\", \"maxAmount\");\r\n fail(\"IllegalArgumentException is expected\");\r\n } catch (IllegalArgumentException e) {\r\n // ok.\r\n }\r\n }", "public int getCapacity();", "public ArrayQueue(int capacity){\r\n\t\tq = new String [capacity];\r\n\t\tn = 0;\r\n\t\tfirst = 0;\r\n\t\tlast = 0; \r\n\t}", "boolean hasCapacity();", "public WaitablePQueue() {\n\t\tthis(DEFAULT_INITIAL_CAPACITY, null);\n\t}", "@Test(timeout = 4000)\n public void test40() throws Throwable {\n ConnectionFactories connectionFactories0 = new ConnectionFactories();\n try { \n connectionFactories0.addXAQueueConnectionFactory(457, (XAQueueConnectionFactory) null);\n fail(\"Expecting exception: IndexOutOfBoundsException\");\n \n } catch(IndexOutOfBoundsException e) {\n //\n // Index: 457, Size: 0\n //\n verifyException(\"java.util.ArrayList\", e);\n }\n }", "@Test(timeout = 4000)\n public void test72() throws Throwable {\n ConnectionFactories connectionFactories0 = new ConnectionFactories();\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, true);\n QueueConnectionFactory queueConnectionFactory0 = new QueueConnectionFactory();\n connectionFactories0.addQueueConnectionFactory(queueConnectionFactory0);\n QueueConnectionFactory[] queueConnectionFactoryArray0 = connectionFactories0.getQueueConnectionFactory();\n assertEquals(1, queueConnectionFactoryArray0.length);\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n ConnectionFactories connectionFactories0 = new ConnectionFactories();\n try { \n connectionFactories0.getQueueConnectionFactory((-1638));\n fail(\"Expecting exception: IndexOutOfBoundsException\");\n \n } catch(IndexOutOfBoundsException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.exolab.jms.config.ConnectionFactories\", e);\n }\n }", "public TabuList(int capacity)\r\n\t{\r\n\t\tthis.capacity = capacity;\r\n\t\tqueue = new LinkedList<Solution>();\r\n\t\tset = new TreeSet<Solution>();\r\n\t}", "public Heap(int initialCapacity) {\r\n\t\tthis(initialCapacity, null);\r\n\t}", "@Test(timeout = 4000)\n public void test69() throws Throwable {\n ConnectionFactories connectionFactories0 = new ConnectionFactories();\n XAQueueConnectionFactory xAQueueConnectionFactory0 = new XAQueueConnectionFactory();\n try { \n connectionFactories0.setXAQueueConnectionFactory(0, xAQueueConnectionFactory0);\n fail(\"Expecting exception: IndexOutOfBoundsException\");\n \n } catch(IndexOutOfBoundsException e) {\n //\n // Index: 0, Size: 0\n //\n verifyException(\"java.util.ArrayList\", e);\n }\n }", "public static boolean testAlphabetListConstructorBadInput() {\r\n try {\r\n AlphabetList list1 = new AlphabetList(-2);\r\n } catch (IllegalArgumentException e) {\r\n if (e.getMessage() != null && e.getMessage()\r\n .contains(\"capacity of this list must be a non-zero a positive integer.\"))\r\n\r\n return true;\r\n }\r\n return false;\r\n }", "@Test(timeout = 4000)\n public void test11() throws Throwable {\n ConnectionFactories connectionFactories0 = new ConnectionFactories();\n try { \n connectionFactories0.getQueueConnectionFactory(0);\n fail(\"Expecting exception: IndexOutOfBoundsException\");\n \n } catch(IndexOutOfBoundsException e) {\n //\n // Index: 0, Size: 0\n //\n verifyException(\"java.util.ArrayList\", e);\n }\n }", "public void testConstructorA5() {\r\n try {\r\n new BidUpdateHandler(\"auctionId\", null, \"maxAmount\");\r\n fail(\"IllegalArgumentException is expected\");\r\n } catch (IllegalArgumentException e) {\r\n // ok.\r\n }\r\n }", "public Queue() {}", "public BlockingQueue(int maxSize) {\r\n\t\tthis.maxSize = maxSize;\r\n\t\tqueue = new LinkedList<T>();\r\n\t}", "public RingBuffer(int capacity){\n structure = new LinkedList<E>();\n this.capacity = capacity;\n }", "@Test(timeout = 4000)\n public void test48() throws Throwable {\n ConnectionFactories connectionFactories0 = new ConnectionFactories();\n connectionFactories0.getQueueConnectionFactoryCount();\n ConnectionFactory connectionFactory0 = new ConnectionFactory();\n try { \n connectionFactories0.setConnectionFactory(0, connectionFactory0);\n fail(\"Expecting exception: IndexOutOfBoundsException\");\n \n } catch(IndexOutOfBoundsException e) {\n //\n // Index: 0, Size: 0\n //\n verifyException(\"java.util.ArrayList\", e);\n }\n }", "private String notEnoughCapacity(String resource, int level) {\n return String.format(\"Capacity of %s's container is less on: %d.\\n\", resource, level);\n }" ]
[ "0.7522257", "0.75212055", "0.62038654", "0.5999786", "0.58354354", "0.5734184", "0.5620401", "0.55971855", "0.5578381", "0.5554689", "0.5530785", "0.55291855", "0.55219555", "0.5510661", "0.55007535", "0.54874486", "0.5470552", "0.54455084", "0.5433648", "0.5414428", "0.5403464", "0.5367474", "0.5362451", "0.5356413", "0.5355782", "0.5338992", "0.53219205", "0.5310971", "0.5304645", "0.52995515", "0.52983224", "0.52863854", "0.5260151", "0.52331436", "0.5230475", "0.52282023", "0.52276325", "0.5198712", "0.5193468", "0.51931727", "0.5176915", "0.5166405", "0.5147393", "0.51413876", "0.5138075", "0.513708", "0.513601", "0.5117269", "0.51055586", "0.50967973", "0.50890815", "0.5085679", "0.5084484", "0.50810695", "0.50778174", "0.50761276", "0.506681", "0.50594217", "0.50487256", "0.50452435", "0.503374", "0.50284433", "0.5015858", "0.5013366", "0.5012672", "0.50076324", "0.4999815", "0.4996326", "0.49957326", "0.49936035", "0.49881402", "0.49855343", "0.49795184", "0.49763936", "0.49693233", "0.4965594", "0.49640766", "0.4962", "0.49556357", "0.49468753", "0.49465603", "0.49399516", "0.49380168", "0.49330848", "0.49290097", "0.4921546", "0.49112803", "0.49099538", "0.4909916", "0.49086824", "0.48968905", "0.48963532", "0.48957044", "0.4894858", "0.4889255", "0.48858032", "0.48836485", "0.48745835", "0.48732835", "0.4872628" ]
0.7655009
0
Test init a queue configuration, children's capacity for a given label doesn't equals to 100%. This expect IllegalArgumentException thrown.
@Test(expected = IllegalArgumentException.class) public void testQueueParsingWithSumOfChildLabelCapacityNot100PercentWithWildCard() throws IOException { nodeLabelManager.addToCluserNodeLabelsWithDefaultExclusivity(ImmutableSet.of("red", "blue")); YarnConfiguration conf = new YarnConfiguration(); CapacitySchedulerConfiguration csConf = new CapacitySchedulerConfiguration(conf); setupQueueConfigurationWithLabels(csConf); csConf.setCapacityByLabel(((ROOT) + ".b.b3"), "red", 24); csConf.setAccessibleNodeLabels(ROOT, ImmutableSet.of(ANY)); csConf.setAccessibleNodeLabels(((ROOT) + ".b"), ImmutableSet.of(ANY)); CapacityScheduler capacityScheduler = new CapacityScheduler(); RMContextImpl rmContext = new RMContextImpl(null, null, null, null, null, null, new org.apache.hadoop.yarn.server.resourcemanager.security.RMContainerTokenSecretManager(csConf), new org.apache.hadoop.yarn.server.resourcemanager.security.NMTokenSecretManagerInRM(csConf), new ClientToAMTokenSecretManagerInRM(), null); rmContext.setNodeLabelManager(nodeLabelManager); capacityScheduler.setConf(csConf); capacityScheduler.setRMContext(rmContext); capacityScheduler.init(csConf); capacityScheduler.start(); ServiceOperations.stopQuietly(capacityScheduler); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(expected = IllegalArgumentException.class)\n public void testQueueParsingFailWhenSumOfChildrenLabeledCapacityNot100Percent() throws IOException {\n nodeLabelManager.addToCluserNodeLabelsWithDefaultExclusivity(ImmutableSet.of(\"red\", \"blue\"));\n YarnConfiguration conf = new YarnConfiguration();\n CapacitySchedulerConfiguration csConf = new CapacitySchedulerConfiguration(conf);\n setupQueueConfigurationWithLabels(csConf);\n csConf.setCapacityByLabel(((ROOT) + \".b.b3\"), \"red\", 24);\n CapacityScheduler capacityScheduler = new CapacityScheduler();\n RMContextImpl rmContext = new RMContextImpl(null, null, null, null, null, null, new org.apache.hadoop.yarn.server.resourcemanager.security.RMContainerTokenSecretManager(csConf), new org.apache.hadoop.yarn.server.resourcemanager.security.NMTokenSecretManagerInRM(csConf), new ClientToAMTokenSecretManagerInRM(), null);\n rmContext.setNodeLabelManager(nodeLabelManager);\n capacityScheduler.setConf(csConf);\n capacityScheduler.setRMContext(rmContext);\n capacityScheduler.init(csConf);\n capacityScheduler.start();\n ServiceOperations.stopQuietly(capacityScheduler);\n }", "@Test(expected = IllegalArgumentException.class)\n public void testQueueParsingFailWhenSumOfChildrenNonLabeledCapacityNot100Percent() throws IOException {\n nodeLabelManager.addToCluserNodeLabelsWithDefaultExclusivity(ImmutableSet.of(\"red\", \"blue\"));\n YarnConfiguration conf = new YarnConfiguration();\n CapacitySchedulerConfiguration csConf = new CapacitySchedulerConfiguration(conf);\n setupQueueConfiguration(csConf);\n csConf.setCapacity(((ROOT) + \".c.c2\"), 5);\n CapacityScheduler capacityScheduler = new CapacityScheduler();\n RMContextImpl rmContext = new RMContextImpl(null, null, null, null, null, null, new org.apache.hadoop.yarn.server.resourcemanager.security.RMContainerTokenSecretManager(csConf), new org.apache.hadoop.yarn.server.resourcemanager.security.NMTokenSecretManagerInRM(csConf), new ClientToAMTokenSecretManagerInRM(), null);\n rmContext.setNodeLabelManager(nodeLabelManager);\n capacityScheduler.setConf(csConf);\n capacityScheduler.setRMContext(rmContext);\n capacityScheduler.init(csConf);\n capacityScheduler.start();\n ServiceOperations.stopQuietly(capacityScheduler);\n }", "@Test\n public void capacityTest() {\n // TODO: test capacity\n }", "private void checkCapacity(int capacity) \n {\n if (capacity > MAX_CAPACITY)\n throw new IllegalStateException(\"Attempt to create a bag whose \" +\n \"capacity exeeds allowed \" +\n \"maximum of \" + MAX_CAPACITY);\n }", "@Before\n public void setUp() throws Exception {\n csConf = new CapacitySchedulerConfiguration();\n csConf.setClass(YarnConfiguration.RM_SCHEDULER, CapacityScheduler.class,\n ResourceScheduler.class);\n\n // By default, set 3 queues, a/b, and a.a1\n csConf.setQueues(\"root\", new String[]{\"a\", \"b\"});\n csConf.setNonLabeledQueueWeight(\"root\", 1f);\n csConf.setNonLabeledQueueWeight(\"root.a\", 1f);\n csConf.setNonLabeledQueueWeight(\"root.b\", 1f);\n csConf.setQueues(\"root.a\", new String[]{\"a1\"});\n csConf.setNonLabeledQueueWeight(\"root.a.a1\", 1f);\n csConf.setAutoQueueCreationV2Enabled(\"root\", true);\n csConf.setAutoQueueCreationV2Enabled(\"root.a\", true);\n csConf.setAutoQueueCreationV2Enabled(\"root.e\", true);\n csConf.setAutoQueueCreationV2Enabled(PARENT_QUEUE, true);\n // Test for auto deletion when expired\n csConf.setAutoExpiredDeletionTime(1);\n }", "public void test_4() throws Exception {\n\t\tBoundedSharedQueue theBSQ = new BoundedSharedQueue(MAX_CAPACITY);\n\n\t\ttry {\n\t\t\ttheBSQ.add(null); // null is not an accepted value\n\t\t\tfail(\"should throw an IllegalArgumentException\");\n\t\t}\n\t\tcatch(IllegalArgumentException ex) {\n\t\t\t// OK\n\t\t}\n\t}", "public void test_5() throws Exception {\n\t\ttry {\n\t\t\tBoundedSharedQueue theBSQ = new BoundedSharedQueue(0);\n\t\t\tfail(\"should throw an IllegalArgumentException\");\n\t\t}\n\t\tcatch(IllegalArgumentException ex) {\n\t\t\t// OK\n\t\t}\n\t}", "public PriorityQueue(int capacity) { \r\n this.capacity=capacity;\r\n this.currentSize=0;\r\n this.queue=new NodeBase[capacity];\r\n }", "public WaitablePQueue(int capacity) {\n\t\tthis(capacity, null);\n\t}", "@Test\r\n public void testLongTermStorageGetCapacity1()\r\n {\r\n assertEquals(\"Capacity is wrong\", TEST_LONG_TERM_STORAGE_CAPACITY,\r\n testLongTermStorage.getCapacity());\r\n }", "public void ensureCapacity(int minCapacity);", "@Test\n public void testExceedsQuotaOnStartup() throws Exception {\n List<Dag<JobExecutionPlan>> dags = DagManagerTest.buildDagList(2, \"user\", ConfigFactory.empty());\n // Ensure that the current attempt is 1, normally done by DagManager\n dags.get(0).getNodes().get(0).getValue().setCurrentAttempts(1);\n dags.get(1).getNodes().get(0).getValue().setCurrentAttempts(1);\n\n // Should not be throwing the exception\n this._quotaManager.init(dags);\n }", "public Queue()\r\n\t{\r\n\t\tthis(capacity);\r\n\t}", "myQueue(int size){\n }", "@Test\n void constructor() {\n // Act\n final CreateQueueOptions actual = new CreateQueueOptions();\n\n // Assert\n assertEquals(MAX_DURATION, actual.getAutoDeleteOnIdle());\n assertEquals(MAX_DURATION, actual.getDefaultMessageTimeToLive());\n assertEquals(DEFAULT_DUPLICATE_DETECTION_DURATION, actual.getDuplicateDetectionHistoryTimeWindow());\n assertTrue(actual.isBatchedOperationsEnabled());\n assertFalse(actual.isPartitioningEnabled());\n assertEquals(DEFAULT_LOCK_DURATION, actual.getLockDuration());\n assertEquals(DEFAULT_MAX_DELIVERY_COUNT, actual.getMaxDeliveryCount());\n assertEquals(DEFAULT_QUEUE_SIZE, actual.getMaxSizeInMegabytes());\n assertFalse(actual.isDuplicateDetectionRequired());\n assertFalse(actual.isSessionRequired());\n assertFalse(actual.isDeadLetteringOnMessageExpiration());\n assertNull(actual.getUserMetadata());\n assertEquals(EntityStatus.ACTIVE, actual.getStatus());\n }", "public void setCapacity(int capacity) \n {\n this.capacity = capacity;\n }", "@Before\r\n public void setUp() {\r\n queue = new LinkedQueue<String> (initCapacity);\r\n }", "@Test\n\tpublic void overrideDefaultCapacity() {\n\t\tcst = new Airport(2, weatherMock);\n\t\tassertEquals(2, cst.capacity);\n\t}", "public void setCapacity(int value) {\n this.capacity = value;\n }", "public void checkCapacity(String target, long size) throws Exception;", "@Test\n public void testMaxQueue() throws Throwable {\n internalMaxQueue(\"core\");\n internalMaxQueue(\"openwire\");\n internalMaxQueue(\"amqp\");\n }", "@Test\r\n public void testLongTermStorageGetAvailableCapacity1()\r\n {\r\n testLongTermStorage.addItem(item2, testLongTermStorage.getCapacity() / item2.getVolume());\r\n testLongTermStorage.resetInventory();\r\n assertEquals(\"Available capacity is wrong\", testLongTermStorage.getCapacity(),\r\n testLongTermStorage.getAvailableCapacity());\r\n }", "public void test_1() throws Exception {\n\t\tBoundedSharedQueue theBSQ = new BoundedSharedQueue(MAX_CAPACITY);\n\n\t\tassertEquals(MAX_CAPACITY, theBSQ.capacity());\n\t\t// make sure that the queue properties are right\n\t\tassertTrue(theBSQ.isEmpty());\n\t\tassertTrue(!theBSQ.isFull());\n\n\t\t// Fill the Queue\n\t\tfor(int i = 0; i < theBSQ.capacity(); ++i) {\n\t\t\tassertEquals(i, theBSQ.size());\n\t\t\ttheBSQ.add(new Integer(i));\n\t\t}\n\n\t\t// make sure the capacity doesn't evolve\n\t\tassertEquals(MAX_CAPACITY, theBSQ.capacity());\n\t\t// make sure the size is right after the filling loop\n\t\tassertEquals(theBSQ.capacity(), theBSQ.size());\n\t\t// make sure that the queue properties are right\n\t\tassertTrue(!theBSQ.isEmpty());\n\t\tassertTrue(theBSQ.isFull());\n\n\t\t// Empty the queue\n\t\tfor(int i = theBSQ.capacity(); i > 0 ; --i) {\n\t\t\tassertEquals(i, theBSQ.size());\n\t\t\tObject theObject = theBSQ.remove();\n\t\t\tassertEquals(theObject, new Integer(theBSQ.capacity()-i));\n\t\t}\n\n\t\tcheckEmptyness(theBSQ);\n\t}", "public void setCapacity(int capacity)\n {\n Validate.isTrue(capacity > 0, \"Capacity must be > 0\");\n capacity_ = capacity; \n }", "@Test\r\n\tpublic void testFillChargingNonlinear_EmptyCar_ExhaustiveDesiredCapacity() {\n\t\tSimulation.verbosity = 0;\r\n\t\tint startTimeSeconds = 0;\r\n\t\t\r\n\t\tdouble desiredCapacityInterval = 1; \r\n\t\t\r\n\t\tdouble desiredCapacity = desiredCapacityInterval;\r\n\t\twhile (desiredCapacity <= car.getMaxCapacity()) {\r\n\t\t\t\r\n\t\t\t//System.out.println(\"desiredCapacity=\" + desiredCapacity);\r\n\t\t\tcar.setCurrentPlan(new double[96]);\r\n\t\t\tschedulerNonlinear.fillChargingPlan(car, chargingStation, desiredCapacity, \r\n\t\t\t\t\tTimeslotSorter.getSortedTimeslots(null, 0, 96, TimeslotSortingCriteria.INDEX), \r\n\t\t\t\t\tstartTimeSeconds);\r\n\t\t\t\r\n\t\t\tassertEquals(desiredCapacity, schedulerNonlinear.getPlannedCapacity(chargingStation, car, startTimeSeconds), 1e-2);\r\n\t\t\tdesiredCapacity += desiredCapacityInterval;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "@Test\n public void testSize() {\n PriorityQueue<Integer> instance = new PriorityQueue<>();\n assertEquals(0, instance.size());\n instance.insert(1);\n instance.insert(2);\n assertEquals(2, instance.size());\n }", "public void setCapacity(Integer capacity) {\n this.capacity = capacity;\n }", "public void setCapacity(int capacity) {\r\n this.capacity = capacity;\r\n }", "public AsyncQueueBroker(int capacity, int timeoutDuration)\n {\n super(capacity, timeoutDuration);\n queue = new ArrayBlockingQueue<V>(100);\n }", "public void setCapacity(int capacity) {\n this.capacity = capacity;\n }", "public void setCapacity(int capacity) {\r\n\r\n this.capacity = capacity;\r\n }", "@WithName(\"max.queue.size\")\n @WithDefault(\"2048\")\n Integer maxQueueSize();", "public Battery(double initialCapacity) {\r\n capacity = initialCapacity;\r\n originalCapacity = initialCapacity;\r\n }", "private void checkCapacity(int desiredCapacity)\n {\n if (desiredCapacity > MAX_CAPACITY)\n throw new IllegalStateException(\"Attempt to create a hash table \" +\n \"whose capacity exceeds \" +\n \"allowed maximum.\");\n }", "public HeapPriorityQueue () \n\t{\n\t\tthis(DEFAULT_SIZE);\n\t}", "public void test_2() throws Exception {\n\t\tBoundedSharedQueue theBSQ = new BoundedSharedQueue(MAX_CAPACITY);\n\n\t\tassertEquals(MAX_CAPACITY, theBSQ.capacity());\n\t\tassertTrue(theBSQ.isEmpty());\n\t\tassertTrue(!theBSQ.isFull());\n\n\t\tfor(int i = 0; i < theBSQ.capacity(); ++i) {\n\t\t\tassertEquals(i, theBSQ.size());\n\t\t\ttheBSQ.add(new Integer(i));\n\t\t}\n\n\t\t// clear the queue\n\t\ttheBSQ.clear();\n\n\t\tcheckEmptyness(theBSQ);\n\t}", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n ConnectionFactories connectionFactories0 = new ConnectionFactories();\n QueueConnectionFactory queueConnectionFactory0 = new QueueConnectionFactory();\n try { \n connectionFactories0.addQueueConnectionFactory((-4356), queueConnectionFactory0);\n fail(\"Expecting exception: IndexOutOfBoundsException\");\n \n } catch(IndexOutOfBoundsException e) {\n //\n // Index: -4356, Size: 0\n //\n verifyException(\"java.util.ArrayList\", e);\n }\n }", "abstract protected int getCapacity();", "@Test\n public void testpoll() {\n\tFileBackedBlockingQueue<String> queue = new FileBackedBlockingQueue.Builder<String>()\n\t\t.directory(TEST_DIR)\n\t\t.serializer(new StringSerializer())\n\t\t.segmentSize((TEST_STRING.length() + Segment.ENTRY_OVERHEAD_SIZE) * 100)\n\t\t.build();\n\n\t// init\n\tfor (int i = 0; i < 2000; i++)\n\t queue.add(TEST_STRING);\n\tfor (int i = 0; i < 2000; i++) {\n\t if (i <= 1000)\n\t\tAssert.assertTrue(queue.segments.getActiveSegments() > 10);\n\t else\n\t\tAssert.assertTrue(\n\t\t\t\"size : \" + queue.segments.getInActiveSegments(),\n\t\t\tqueue.segments.getInActiveSegments() >= 9);\n\t Assert.assertEquals(TEST_STRING, queue.poll());\n\t}\n }", "@Test(expected=IllegalArgumentException.class)\r\n public void testConstructor_max0() {\r\n \r\n new LengthMax(0);\r\n fail();\r\n \r\n }", "@Test\r\n\tpublic void testCapacityZero(){\r\n\t\tString expectedResult = \"-\";\r\n\t\tString itemsResults = Packer.pack(\"./src/test/resources/capacityZero.txt\");\r\n\t\tassertEquals(expectedResult, itemsResults);\r\n\t\tSystem.out.println(\"Test passed. CapacityZero.\");\r\n\t}", "@Test\n public void sizeTest() {\n assertThat(4, is(this.queue.size()));\n }", "public void testSize() {\n assertEquals(this.stack.size(), 10, 0.01);\n assertEquals(this.empty.size(), 0, 0.01);\n }", "public void setCapacity(final int capacity) {\n this.capacity = capacity;\n }", "public test346(int size) {\n \tqueue = new LinkedList<>(); \n \tcap = size;\n }", "public ArrayQueue() {\n\t\tthis(Integer.MAX_VALUE);\n\t}", "public Builder setAvailableCapacity(int value) {\n \n availableCapacity_ = value;\n onChanged();\n return this;\n }", "@Test\r\n\tpublic void testFillChargingNonlinear_HighInitialSoC_ExhaustiveDesiredCapacity() {\n\t\tSimulation.verbosity = 0;\r\n\t\tint startTimeSeconds = 0;\r\n\t\t\r\n\t\t// Charge until soc=0.9\r\n\t\tdouble initialSoC = 0.9;\r\n\t\twhile (car.carBattery.getSoC() < initialSoC) {\r\n\t\t\tcar.addChargedCapacity(1, 32);\r\n\t\t}\r\n\t\t\r\n\t\tdouble desiredCapacity = 0.1;\r\n\t\twhile (desiredCapacity <= car.getMissingCapacity()) {\r\n\t\t\t\r\n\t\t\tcar.setCurrentPlan(new double[96]);\r\n\t\t\tschedulerNonlinear.fillChargingPlan(car, chargingStation, desiredCapacity, \r\n\t\t\t\t\tTimeslotSorter.getSortedTimeslots(null, 0, 96, TimeslotSortingCriteria.INDEX), \r\n\t\t\t\t\tstartTimeSeconds);\r\n\t\t\t\r\n\r\n\t\t\tdouble plannedCapacity = schedulerNonlinear.getPlannedCapacity(chargingStation, car, startTimeSeconds);\r\n\t\t\t//System.out.println(\"desiredCapacity=\" + desiredCapacity + \"Ah, plannedCapacity=\" + plannedCapacity);\r\n\t\t\t\r\n\t\t\tassertEquals(desiredCapacity, plannedCapacity, 1e-2);\r\n\t\t\tdesiredCapacity+=0.1;\r\n\t\t}\r\n\t\t\r\n\t}", "@Test\r\n public void testLongTermStorageGetCapacity2()\r\n {\r\n testLongTermStorage.addItem(item2, testLongTermStorage.getCapacity() / item2.getVolume());\r\n testLongTermStorage.resetInventory();\r\n assertEquals(\"Capacity is wrong\", TEST_LONG_TERM_STORAGE_CAPACITY,\r\n testLongTermStorage.getCapacity());\r\n }", "public void setCapacity(int capacity)\n {\n if(capacity >= 0)\n {\n this.capacity = capacity;\n }\n else\n {\n System.out.println(\"Cannot be negative.\");\n }\n }", "@Test(timeout = 4000)\n public void test00() throws Throwable {\n ConnectionFactories connectionFactories0 = new ConnectionFactories();\n connectionFactories0.isValid();\n QueueConnectionFactory[] queueConnectionFactoryArray0 = connectionFactories0.getQueueConnectionFactory();\n assertEquals(0, queueConnectionFactoryArray0.length);\n }", "@Test\n public void totalOfEmptyQueue(){\n // Arrange\n QueueOfPeople queueOfPeople = new QueueOfPeople(Arrays.asList());\n // Act\n // Assert\n assertEquals(0.0, queueOfPeople.getAmountOfPeopleWaiting(), 0.0);\n }", "@Test\n public void testIsEmpty() {\n this.queue = new HeapPriorityQueue<Person>(5); \n boolean actualResult = this.queue.isEmpty();\n \n boolean expectedResult = true;\n \n assertEquals(expectedResult, actualResult);\n }", "public void testFairEmptyFull() {\n SynchronousQueue q = new SynchronousQueue(true);\n assertTrue(q.isEmpty());\n\tassertEquals(0, q.size());\n assertEquals(0, q.remainingCapacity());\n assertFalse(q.offer(zero));\n }", "@Test\n public void labelIsNotOutOfRange() {\n propertyIsNot(\n StringUtil.createJString(MAX_RANGE_255 + 1),\n null,\n CodeI18N.FIELD_SIZE,\n \"label property must not be of size lesser than 0 and larger than \" + MAX_RANGE_255 + \" characters\"\n );\n }", "@Test\n public void testIsEmpty() {\n PriorityQueue test = new PriorityQueue();\n assertEquals(true, test.isEmpty());\n }", "Integer backlogCapacity();", "public abstract int capacity();", "public MyQueue() {\n queue = new PriorityQueue<>();\n }", "public void setCapacity(int capacity) {\n\n\t\tthis.capacity = capacity;\n\t}", "public Builder setMaximumCapacity(int value) {\n \n maximumCapacity_ = value;\n onChanged();\n return this;\n }", "@Test (timeout=5000)\n public void test2Queue() throws IOException {\n Configuration conf = getConfiguration();\n\n QueueManager manager = new QueueManager(conf);\n manager.setSchedulerInfo(\"first\", \"queueInfo\");\n manager.setSchedulerInfo(\"second\", \"queueInfoqueueInfo\");\n\n Queue root = manager.getRoot();\n \n // test children queues\n assertTrue(root.getChildren().size() == 2);\n Iterator<Queue> iterator = root.getChildren().iterator();\n Queue firstSubQueue = iterator.next();\n assertEquals(\"first\", firstSubQueue.getName());\n assertThat(\n firstSubQueue.getAcls().get(\"mapred.queue.first.acl-submit-job\")\n .toString()).isEqualTo(\n \"Users [user1, user2] and members of \" +\n \"the groups [group1, group2] are allowed\");\n Queue secondSubQueue = iterator.next();\n assertEquals(\"second\", secondSubQueue.getName());\n\n assertThat(firstSubQueue.getState().getStateName()).isEqualTo(\"running\");\n assertThat(secondSubQueue.getState().getStateName()).isEqualTo(\"stopped\");\n assertTrue(manager.isRunning(\"first\"));\n assertFalse(manager.isRunning(\"second\"));\n\n assertThat(firstSubQueue.getSchedulingInfo()).isEqualTo(\"queueInfo\");\n assertThat(secondSubQueue.getSchedulingInfo())\n .isEqualTo(\"queueInfoqueueInfo\");\n // test leaf queue\n Set<String> template = new HashSet<String>();\n template.add(\"first\");\n template.add(\"second\");\n assertEquals(manager.getLeafQueueNames(), template);\n }", "public void testEmptyFull() {\n SynchronousQueue q = new SynchronousQueue();\n assertTrue(q.isEmpty());\n\tassertEquals(0, q.size());\n assertEquals(0, q.remainingCapacity());\n assertFalse(q.offer(zero));\n }", "public MessageQueue(int capacity) \n { \n elements = new Message[capacity]; \n count = 0; \n head = 0; \n tail = 0; \n }", "@Test\r\n\tpublic void testCapacityNegative(){\r\n\t\ttry{\r\n\t\t\tPacker.pack(\"./src/test/resources/capacityNegative.txt\");\r\n\t\t}catch (APIException e) {\r\n\t\t\t// test passed - exception expected when incorrect parameters are being passed\r\n\t\t\tSystem.out.println(\"Test Passed. CapacityNegative.\");\r\n\t\t\treturn;\r\n\t\t} catch (Throwable t){\r\n\t\t\tSystem.out.println(\"Unexpected throwable: \" + t.getMessage());\r\n\t\t}\r\n\t\tSystem.out.println(\"\\n\");\r\n\t\tfail(\"APIException was expected\");\r\n\t}", "void setOrderCapacity(OrderCapacity inOrderCapacity);", "private void verifySteadyFairShareMemory(Collection<FSLeafQueue> leafQueues,\n int nodeCapacity) {\n for (FSLeafQueue leaf : leafQueues) {\n if (leaf.getName().startsWith(\"root.parentA\")) {\n assertEquals(0.2,\n (double) leaf.getSteadyFairShare().getMemorySize() / nodeCapacity,\n 0.001);\n } else if (leaf.getName().startsWith(\"root.parentB\")) {\n assertEquals(0.05,\n (double) leaf.getSteadyFairShare().getMemorySize() / nodeCapacity,\n 0.001);\n }\n }\n }", "public ArrayQueue() {\n this(10);\n }", "@Test\n public void testAdd() throws Exception {\n this.queue = new HeapPriorityQueue<Person>(5); \n this.queue.add(new Person(\"Four\"), 4);\n this.queue.add(new Person(\"Five\"), 5);\n boolean actualResult = this.queue.isEmpty();\n \n boolean expectedResult = false; \n assertEquals(expectedResult, actualResult);\n }", "public void setCapacity(String capacity) {\n\t\tthis.capacity = capacity;\n\t}", "public ArrayMaxPQ(int capacity) {\n pq = new int[capacity];\n }", "public void setCapacity(Long capacity) {\n this.capacity = capacity;\n }", "@Test(timeout = 4000)\n public void test21() throws Throwable {\n ConnectionFactories connectionFactories0 = new ConnectionFactories();\n QueueConnectionFactory queueConnectionFactory0 = new QueueConnectionFactory();\n try { \n connectionFactories0.setQueueConnectionFactory((-2400), queueConnectionFactory0);\n fail(\"Expecting exception: IndexOutOfBoundsException\");\n \n } catch(IndexOutOfBoundsException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.exolab.jms.config.ConnectionFactories\", e);\n }\n }", "public PacketBuilder(int capacity) {\n\t\tbuffer = ByteBuffer.allocate(capacity);\n\t}", "public int getInitialCapacity();", "@Test\n public void test006_test_capcaity() {\n try {\n HashTableADT test = new HashTable<Integer, String>(2, 0.5);\n test.insert(1, \"2\");\n test.insert(2, \"3\");\n if (test.getCapacity() != 5) { //capacity should be 2* original + 1\n fail(\"resize not correct\");\n }\n } catch (Exception e) {\n fail(\"Correct Exception wasn't thrown\");\n }\n }", "public Builder setCapacity(com.cantor.drop.aggregator.model.CFTrade.Capacity value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000040;\n capacity_ = value.getNumber();\n onChanged();\n return this;\n }", "@Test\r\n\tpublic void permutationsTestSize5() throws BoundedQueueException {\r\n\t\tbq.enqueue(1);\r\n\t\tbq.enqueue(2);\r\n\t\tbq.enqueue(3);\r\n\t\tbq.enqueue(4);\r\n\t\tbq.enqueue(5);\r\n\t\tbq.permutations();\r\n\t}", "public Queue(int maxsize){\n this.maxsize=maxsize; // sets the limit\n System.out.println(\"The maxsize was set to \"+maxsize);\n }", "@Test\n\tpublic void createListWithInitialCapacity() {\n\t\tList<String> list1 = new ArrayList<>();\n\n\t\t// You can set capacity using constructor of ArrayList\n\t\tList<String> list2 = new ArrayList<>(20);\n\n\t\tassertTrue(list1.isEmpty());\n\t\tassertTrue(list2.isEmpty());\n\t\tassertTrue(list1.equals(list2));\n\t}", "public static void setSizeOfQueue(Label sizeOfQueueValue) {\n \tsizeOfQueueValue.setText(String.valueOf(Capture.getInspectionQueue().size()));\n }", "public void testConstructorA1() {\r\n try {\r\n new BidUpdateHandler(\" \", \"bidId\", \"maxAmount\");\r\n fail(\"IllegalArgumentException is expected\");\r\n } catch (IllegalArgumentException e) {\r\n // ok.\r\n }\r\n }", "public int getCapacity();", "public ArrayQueue(int capacity){\r\n\t\tq = new String [capacity];\r\n\t\tn = 0;\r\n\t\tfirst = 0;\r\n\t\tlast = 0; \r\n\t}", "boolean hasCapacity();", "public WaitablePQueue() {\n\t\tthis(DEFAULT_INITIAL_CAPACITY, null);\n\t}", "@Test(timeout = 4000)\n public void test40() throws Throwable {\n ConnectionFactories connectionFactories0 = new ConnectionFactories();\n try { \n connectionFactories0.addXAQueueConnectionFactory(457, (XAQueueConnectionFactory) null);\n fail(\"Expecting exception: IndexOutOfBoundsException\");\n \n } catch(IndexOutOfBoundsException e) {\n //\n // Index: 457, Size: 0\n //\n verifyException(\"java.util.ArrayList\", e);\n }\n }", "public TabuList(int capacity)\r\n\t{\r\n\t\tthis.capacity = capacity;\r\n\t\tqueue = new LinkedList<Solution>();\r\n\t\tset = new TreeSet<Solution>();\r\n\t}", "@Test(timeout = 4000)\n public void test72() throws Throwable {\n ConnectionFactories connectionFactories0 = new ConnectionFactories();\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, true);\n QueueConnectionFactory queueConnectionFactory0 = new QueueConnectionFactory();\n connectionFactories0.addQueueConnectionFactory(queueConnectionFactory0);\n QueueConnectionFactory[] queueConnectionFactoryArray0 = connectionFactories0.getQueueConnectionFactory();\n assertEquals(1, queueConnectionFactoryArray0.length);\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n ConnectionFactories connectionFactories0 = new ConnectionFactories();\n try { \n connectionFactories0.getQueueConnectionFactory((-1638));\n fail(\"Expecting exception: IndexOutOfBoundsException\");\n \n } catch(IndexOutOfBoundsException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.exolab.jms.config.ConnectionFactories\", e);\n }\n }", "public Heap(int initialCapacity) {\r\n\t\tthis(initialCapacity, null);\r\n\t}", "@Test(timeout = 4000)\n public void test69() throws Throwable {\n ConnectionFactories connectionFactories0 = new ConnectionFactories();\n XAQueueConnectionFactory xAQueueConnectionFactory0 = new XAQueueConnectionFactory();\n try { \n connectionFactories0.setXAQueueConnectionFactory(0, xAQueueConnectionFactory0);\n fail(\"Expecting exception: IndexOutOfBoundsException\");\n \n } catch(IndexOutOfBoundsException e) {\n //\n // Index: 0, Size: 0\n //\n verifyException(\"java.util.ArrayList\", e);\n }\n }", "public static boolean testAlphabetListConstructorBadInput() {\r\n try {\r\n AlphabetList list1 = new AlphabetList(-2);\r\n } catch (IllegalArgumentException e) {\r\n if (e.getMessage() != null && e.getMessage()\r\n .contains(\"capacity of this list must be a non-zero a positive integer.\"))\r\n\r\n return true;\r\n }\r\n return false;\r\n }", "@Test(timeout = 4000)\n public void test11() throws Throwable {\n ConnectionFactories connectionFactories0 = new ConnectionFactories();\n try { \n connectionFactories0.getQueueConnectionFactory(0);\n fail(\"Expecting exception: IndexOutOfBoundsException\");\n \n } catch(IndexOutOfBoundsException e) {\n //\n // Index: 0, Size: 0\n //\n verifyException(\"java.util.ArrayList\", e);\n }\n }", "public void testConstructorA5() {\r\n try {\r\n new BidUpdateHandler(\"auctionId\", null, \"maxAmount\");\r\n fail(\"IllegalArgumentException is expected\");\r\n } catch (IllegalArgumentException e) {\r\n // ok.\r\n }\r\n }", "public Queue() {}", "public BlockingQueue(int maxSize) {\r\n\t\tthis.maxSize = maxSize;\r\n\t\tqueue = new LinkedList<T>();\r\n\t}", "public RingBuffer(int capacity){\n structure = new LinkedList<E>();\n this.capacity = capacity;\n }", "private String notEnoughCapacity(String resource, int level) {\n return String.format(\"Capacity of %s's container is less on: %d.\\n\", resource, level);\n }", "@Test(timeout = 4000)\n public void test48() throws Throwable {\n ConnectionFactories connectionFactories0 = new ConnectionFactories();\n connectionFactories0.getQueueConnectionFactoryCount();\n ConnectionFactory connectionFactory0 = new ConnectionFactory();\n try { \n connectionFactories0.setConnectionFactory(0, connectionFactory0);\n fail(\"Expecting exception: IndexOutOfBoundsException\");\n \n } catch(IndexOutOfBoundsException e) {\n //\n // Index: 0, Size: 0\n //\n verifyException(\"java.util.ArrayList\", e);\n }\n }" ]
[ "0.76559657", "0.7523366", "0.6203779", "0.59995466", "0.5835834", "0.5735099", "0.5620258", "0.5599867", "0.55810297", "0.555474", "0.55307406", "0.552922", "0.5524151", "0.55127525", "0.5500562", "0.54887056", "0.5472277", "0.5445237", "0.5434765", "0.54129136", "0.5404555", "0.5367915", "0.5364053", "0.53574806", "0.5356418", "0.53396964", "0.5323624", "0.53122663", "0.5306873", "0.53009266", "0.52996343", "0.5285945", "0.5261465", "0.52329904", "0.5231965", "0.5229594", "0.52269423", "0.51988876", "0.51942056", "0.51917887", "0.5176736", "0.51662093", "0.5147189", "0.51427907", "0.5139102", "0.5138337", "0.51359564", "0.5117551", "0.5106171", "0.5098072", "0.50887334", "0.5087061", "0.50854015", "0.50797904", "0.5078877", "0.50770175", "0.5067795", "0.5059902", "0.5051967", "0.5046642", "0.5033834", "0.5028696", "0.5017518", "0.50152546", "0.5012941", "0.5009053", "0.4999991", "0.49982014", "0.49970582", "0.49946353", "0.4989205", "0.49868053", "0.49776888", "0.4977189", "0.49696273", "0.49648082", "0.4964729", "0.49635038", "0.49566448", "0.4946596", "0.49465755", "0.49389234", "0.4938636", "0.493512", "0.49289483", "0.49238217", "0.49106216", "0.49097586", "0.49097258", "0.4908358", "0.48978773", "0.48953673", "0.48946288", "0.48937452", "0.48884457", "0.48878494", "0.4885742", "0.48762205", "0.48723412", "0.48722565" ]
0.752211
2
TODO Autogenerated method stub
@Override public TableRow<Document> call(TableView<Document> param) { TableRow<Document> row = new TableRow<Document>(); MenuItem openItem = new MenuItem("打开"); openItem.setOnAction(e->{ System.out.println("打开文件"); }); MenuItem deleteItem = new MenuItem("删除"); MenuItem renameItem = new MenuItem("重命名"); MenuItem setmodeItem = new MenuItem("设置属性"); ContextMenu menu = new ContextMenu(openItem,deleteItem,renameItem,setmodeItem); row.setOnMouseClicked(e->{ if (e.getButton() == MouseButton.PRIMARY && !row.isEmpty()) { row.setContextMenu(menu); } }); return row; }
{ "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
forced login necessary for testing artist functions
@Test public void testStartEvent() { LoginController lc = new LoginController(); lc.artistLogin("meo", "password"); MapController mc = new MapController(); boolean emptyField= false; try { //meo is trying to submit an event without writing any title mc.submitEvent("", "Villa", "desc"); } catch (EmptyFieldException e) { emptyField = true; } catch (DescriptionTooLongException e) { e.printStackTrace(); } assertEquals(true, emptyField); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void login() {\n\t\t\r\n\t}", "public void testLogin() {\n login(datum.junit);\n\t}", "public void testLogin() throws Exception {\n super.login();\n }", "@Test\n\t\tpublic void login() {\n\n\t\t\tlaunchApp(\"chrome\", \"http://demo1.opentaps.org/opentaps/control/main\");\n\t\t\t//Enter username\n\t\t\tenterTextById(\"username\", \"DemoSalesManager\");\n\t\t\t//Enter Password\n\t\t\tenterTextById(\"password\", \"crmsfa\");\n\t\t\t//Click Login\n\t\t\tclickByClassName(\"decorativeSubmit\");\n\t\t\t//Check Browser Title\n\t\t\tverifyBrowserTitle(\"Opentaps Open Source ERP + CRM\");\n\t\t\t//Click Logout\n\t\t\tclickByClassName(\"decorativeSubmit\");\n\t\t\t\n\n\t\t}", "@Override\r\n\tpublic void login() {\n\t\t\r\n\t}", "@Override\n\tprotected void login() {\n\t\tsuper.login();\n\t}", "@Test\n public void bTestLogin(){\n given()\n .param(\"username\", \"playlist\")\n .param(\"password\", \"playlist\")\n .post(\"/login\")\n .then()\n .statusCode(200);\n }", "@Before(unless = { \"signin\", \"doLogin\" })\n\tprivate static void checkAuthentification() {\n\t\t// get ID from secure social plugin\n\t\tString uid = session.get(PLAYUSER_ID);\n\t\tif (uid == null) {\n\t\t\tsignin(null);\n\t\t}\n\n\t\t// get the user from the store. TODO Can also get it from the cache...\n\t\tUser user = null;\n\t\tif (Cache.get(uid) == null) {\n\t\t\ttry {\n\t\t\t\tuser = UserClient.getUserFromID(uid);\n\t\t\t\tCache.set(uid, user);\n\t\t\t} catch (ApplicationException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tflash.error(\"Problem while getting user from store...\");\n\t\t\t}\n\t\t} else {\n\t\t\tuser = (User) Cache.get(uid);\n\t\t}\n\n\t\tif (user == null) {\n\t\t\tflash.error(\"Problem while getting user from store...\");\n\t\t\tAuthentifier.logout();\n\t\t}\n\n\t\tif (user.avatarURL == null) {\n\t\t\tuser.avatarURL = Gravatar.get(user.email, 100);\n\t\t}\n\n\t\t// push the user object in the request arguments for later display...\n\t\trenderArgs.put(PLAYUSER, user);\n\t}", "public static void Login() \r\n\t{\n\t\t\r\n\t}", "@Override\r\n\tpublic void login() {\n\r\n\t}", "@Test\n public void cloudAlbumLogin() throws InterruptedException {\n\n login();\n\n // wait to login\n WebDriverWait wait = new WebDriverWait(driver, 30);\n\t\t// wait until find local album\n wait.until(ExpectedConditions.presenceOfElementLocated(By.id(\"local_album_wrap\")));\n Assert.assertTrue(driver.findElement(By.name(\"本地相册\")).isDisplayed(),\"登录后顶部title与预期不符!\");\n \n // check login user name\n driver.findElement(By.className(\"android.widget.ImageView\")).click();\n String actualLoginUser = driver.findElement(By.id(\"g_slidemenu_loginfo_username\")).getText();\n Assert.assertEquals(actualLoginUser, \"xiangyuantest2\",\"已登录用户名与预期不符!\");\n\n logout();\n \n // check if logout\n WebDriverWait wait2 = new WebDriverWait(driver, 30);\n wait2.until(ExpectedConditions.presenceOfElementLocated(By.name(\"登录\")));\n Assert.assertTrue(driver.findElement(By.name(\"登录云相册可以使用更多功能\")).isDisplayed(),\"退出登录后提示信息与预期不符!\");\n }", "public void logincredentials() {\n\t\tutil.entertext(prop.getValue(\"locators.text.uname\"), \"admin\");\n\t\tutil.entertext(prop.getValue(\"locators.text.password\"), \"Admin123\");\n\t\tutil.ClickElement(prop.getValue(\"locators.button.regdesk\"));\n\t\tutil.ClickElement(prop.getValue(\"locators.button.login\"));\n\t\tlogreport.info(\"logged into the application\");\n\n\t}", "@BeforeGroups(groups = \"OFFICER\")\n protected void loginOfficer() throws Exception {\n login(\"officer@eos.cz\", \"officer\");\n }", "public void LogIn() {\n\t\t\r\n\t}", "@Test\n public void ValidLoginTest() throws Exception {\n openDemoSite(driver).typeAuthInfo(loginEmail, \"Temp1234%\").signInByClick();\n }", "@Test\n\tpublic void loginWithValidCredentials(){\n\t\tapp.loginScreen().waitUntilLoaded();\n\t\tapp.loginScreen().logIn(Credentials.USER_VALID.username, Credentials.USER_VALID.password);\n\t\tassertTrue(app.userDashboardScreen().isActive());\n\t}", "protected synchronized void login() {\n\t\tauthenticate();\n\t}", "@Test(priority = 0, groups = \"test\")\r\n\tpublic void TestLogin()\r\n\t{\r\n\t\t// Step-1] Login using adminX credentials.\r\n\t login.AdminXLogin();\r\n\t extent.log(LogStatus.INFO, \"LoggedIn successfully.\");\r\n\t wait.until(ExpectedConditions.elementToBeClickable(By.linkText(\"PRODUCT\")));\r\n\t // Step-2] Open Add scheme page.\r\n\t Ops.OpenAddScheme();\r\n\t \r\n\t}", "private void loggedInUser() {\n\t\t\n\t}", "@Test\n\tpublic void adminLogin()\n\t{\n\t\tAdminFacade af = admin.login(\"admin\", \"1234\", ClientType.ADMIN);\n\t\tAssert.assertNotNull(af);\n\t}", "private LogIn() {}", "@Test\n public void test5() {\n userFury.login(\"45ab\");\n assertFalse(userFury.getLoggedIn());\n }", "@Test\n\tpublic void loginToOpentaps() {\n\t\tinvokeApp(\"chrome\", \"http://demo1.opentaps.org\");\n\n\t\t// Step 2: Enter user name\n\t\tenterById(\"username\", \"DemoSalesManager\");\n\n\t\t// Step 3: Enter Password\n\t\tenterById(\"password\", \"crmsfa\");\n\n\t\t// Step 4: Click Login\n\t\tclickByClassName(\"decorativeSubmit\");\n\t\t\n\t\t// Step 5: Verify Username\n\t\tverifyTextContainsByXpath(\"//div[@id='form']/h2\", \"Welcome\");\n\t\t\n\t\t// Step 6: Click Logout\n\t\tclickByClassName(\"decorativeSubmit\");\n\t\t\n\n\n\n\t}", "public void login() {\n\t\tloggedIn = true;\n\t}", "@Test\n public void stage03_testLogin() {\n String userName = \"\";\n String password = \"\";\n //Sign in\n SignIn signIn = new SignIn(driver);\n HomePage homePage = signIn.loginValidUser(userName, password);\n //Get login name\n String loginName = homePage.getLoginName();\n //Testing if login name is correct\n assertEquals(loginName, (userName));\n //logging\n if (loginName.equals(userName)) {\n logger.info(\"Loged in succesfully.\");\n logger.info(\"( stage02_testOpenLoginPage )Actual username : \" + loginName + password);\n } else {\n logger.error(\"Unable to login.\");\n logger.error(\"( stage02_testOpenLoginPage )Actual username : \" + loginName);\n }\n }", "@Test\r\n\tpublic void testLogin5() {\r\n\t\tassertFalse(t1.login(\"userrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr\", \"passssssssssssssssssssssssssssssssssssssssss\"));\r\n\t}", "private void loginAsAdmin() {\n vinyardApp.navigateToUrl(\"http://localhost:8080\");\n vinyardApp.fillUsername(\"admin\");\n vinyardApp.fillPassord(\"321\");\n vinyardApp.clickSubmitButton();\n }", "@Test(priority = 1)\n\tpublic void login() {\n\t\tlp.loginToApp();\n\t}", "@Test\n\tpublic void adminLogin2()\n\t{\n\t\tAdminFacade af = admin.login(\"admin\", \"4321\", ClientType.ADMIN);\n\t\tAssert.assertNull(af);\n\t}", "@Test\r\n\tpublic void testLogin8() {\r\n\t\tassertTrue(t1.login(\"user\", \"pass\"));\r\n\t}", "private void setupSession() {\n // TODO Retreived the cached Evernote AuthenticationResult if it exists\n// if (hasCachedEvernoteCredentials) {\n// AuthenticationResult result = new AuthenticationResult(authToken, noteStoreUrl, webApiUrlPrefix, userId);\n// session = new EvernoteSession(info, result, getTempDir());\n// }\n ConnectionUtils.connectFirstTime();\n updateUiForLoginState();\n }", "@org.junit.Test\r\n\tpublic void login() {\n\t\tParameters parameters = new Parameters();\r\n\t\tparameters.setUrl(\"LoginServlet?action=login\");\r\n\t\tparameters.setList(new ArrayList<NameValuePair>());\r\n\t\tparameters.getList().add(new BasicNameValuePair(\"info\", \"jitl\"));\r\n\t\tparameters.getList().add(new BasicNameValuePair(\"info2\", \"admin\"));\r\n\t\tparameters.getList().add(new BasicNameValuePair(\"info3\", \"admin\"));\r\n\t\t@SuppressWarnings(\"unused\")\r\n\t\tString string = (String) MainUtilityTools.execute(parameters);\r\n\t\tSystem.out.println(string);\r\n\t}", "@Test\n public void good_login() throws UnirestException {\n login();\n }", "@Test\t\t\n\tpublic void Login()\t\t\t\t\n\t{\t\t\n\t driver.get(\"https://demo.actitime.com/login.do\");\t\t\t\t\t\n\t driver.findElement(By.id(\"username\")).sendKeys(\"admin\");\t\t\t\t\t\t\t\n\t driver.findElement(By.name(\"pwd\")).sendKeys(\"manager\");\t\t\t\t\t\t\t\n\t driver.findElement(By.xpath(\"//div[.='Login ']\")).click();\t\t\n\t driver.close();\n\t}", "private void login(String username,String password){\n\n }", "protected Response login() {\n return login(\"\");\n }", "public void logInAcceptanceTestFounder() throws Exception {\n String acceptanceTestUserName = \"acceptancetestuser@gmail.com\";\n String acceptanceTestPassword = \"qualityassurance\";\n //Log into Mentor Marketplace as our acceptance test user\n System.out.println(\"Logging in as test user\");\n driver.findElement(By.id(\"registrationButton\")).click();\n driver.findElement(By.id(\"session_key-oauth2SAuthorizeForm\")).sendKeys(acceptanceTestUserName);\n driver.findElement(By.id(\"session_password-oauth2SAuthorizeForm\")).sendKeys(acceptanceTestPassword);\n driver.findElement(By.name(\"authorize\")).click();\n //Set up a wait to use while navigating between pages\n WebDriverWait wait = new WebDriverWait(driver, 10);\n //Wait for the page to load\n WebElement element = wait.until(ExpectedConditions.visibilityOfElementLocated(By.id(\"founderProfile\")));\n }", "public void testLoginPUK() {\r\n try {\r\n tokenHandler.loginPUK(pukCode);\r\n tokenHandler.logoutPUK();\r\n } catch (Exception e) {\r\n fail(e.toString());\r\n }\r\n }", "@Test\n public void logInAcceptanceTestMentor() throws Exception {\n String acceptanceTestUserName = \"acceptancetestmentor@gmail.com\";\n String acceptanceTestPassword = \"qualityassurance\";\n //Log into Mentor Marketplace as our acceptance test user\n System.out.println(\"Logging in as test user\");\n driver.findElement(By.id(\"registrationButton\")).click();\n driver.findElement(By.id(\"session_key-oauth2SAuthorizeForm\")).sendKeys(acceptanceTestUserName);\n driver.findElement(By.id(\"session_password-oauth2SAuthorizeForm\")).sendKeys(acceptanceTestPassword);\n driver.findElement(By.name(\"authorize\")).click();\n //Set up a wait to use while navigating between pages\n WebDriverWait wait = new WebDriverWait(driver, 10);\n //Wait for the page to load\n WebElement element = wait.until(ExpectedConditions.visibilityOfElementLocated(By.id(\"founderProfile\")));\n logOutUser();\n }", "Login() { \n }", "@Test\n public void test001() {\n String login = \"admin\";\n String password = \"admin\";\n\n openBasicAuthPage(login, password);\n assertThatAuthenticated();\n\n }", "@Test\n\tpublic void login(){\n\t\tloginPage.login(data.readData(\"email\"), data.readData(\"password\"));\n\t\tAssert.assertEquals(isPresent(locateElement(By.id(home.homeLogo))),true,\"user not got logged in successfully\");\n\t}", "public void loginAsUser() {\n vinyardApp.navigateToUrl(\"http://localhost:8080\");\n vinyardApp.fillUsername(\"user\");\n vinyardApp.fillPassord(\"123\");\n vinyardApp.clickSubmitButton();\n }", "@Override\n\tpublic void loginEnsure(String userName) {\n\t\t\n\t}", "private void login() {\n AnonimoTO dati = new AnonimoTO();\n String username = usernameText.getText();\n String password = passwordText.getText();\n\n if (isValidInput(username, password)) {\n dati.username = username;\n dati.password = password;\n\n ComplexRequest<AnonimoTO> request =\n new ComplexRequest<AnonimoTO>(\"login\", RequestType.SERVICE);\n request.addParameter(dati);\n\n SimpleResponse response =\n (SimpleResponse) fc.processRequest(request);\n\n if (!response.getResponse()) {\n if (ShowAlert.showMessage(\n \"Username o password non corretti\", AlertType.ERROR)) {\n usernameText.clear();\n passwordText.clear();\n }\n }\n }\n\n }", "public void loginAsTom() {\n textFieldUsername.withTimeoutOf(2000, MILLIS).type(\"tomsmith\");\n textFieldPassword.type(\"SuperSecretPassword!\");\n buttonLogin.click();\n }", "private void adminLogin() {\n\t\tdriver.get(loginUrl);\r\n\t\t// fill the form\r\n\t\tdriver.findElement(By.name(\"username\")).sendKeys(USERNAME);\r\n\t\tdriver.findElement(By.name(\"password\")).sendKeys(PASSWORD);\r\n\t\t// submit login\r\n\t\tdriver.findElement(By.name(\"btn_submit\")).click();\r\n\t}", "@Test\n public void testlogInAcceptanceTestFounder() throws Exception {\n String acceptanceTestUserName = \"acceptancetestuser@gmail.com\";\n String acceptanceTestPassword = \"qualityassurance\";\n //Log into Mentor Marketplace as our acceptance test user\n System.out.println(\"Logging in as test user\");\n driver.findElement(By.id(\"registrationButton\")).click();\n driver.findElement(By.id(\"session_key-oauth2SAuthorizeForm\")).sendKeys(acceptanceTestUserName);\n driver.findElement(By.id(\"session_password-oauth2SAuthorizeForm\")).sendKeys(acceptanceTestPassword);\n driver.findElement(By.name(\"authorize\")).click();\n //Set up a wait to use while navigating between pages\n WebDriverWait wait = new WebDriverWait(driver, 10);\n //Wait for the page to load\n WebElement element = wait.until(ExpectedConditions.visibilityOfElementLocated(By.id(\"founderProfile\")));\n //verify we're viewing the testing profile\n assertTrue(driver.findElement(By.id(\"founderProfile\")).isDisplayed());\n logOutUser();\n }", "@Override\n\tpublic boolean login(Credentials cred) {\n\t\treturn true;\n\t}", "@Test\n public void cTestGetLoginToken() {\n token = given()\n .param(\"username\", \"playlist\")\n .param(\"password\", \"playlist\")\n .post(\"/login\")\n .jsonPath().getString(\"token\");\n }", "public void btnLoginClicked() {\n String username = txfUsername.getText();\n String password = txfPassword.getText();\n DatabaseController database = new DatabaseController(new TuDbConnectionFactory());\n Authentication auth = new Authentication(database);\n if (auth.signIn(username, password)) {\n Player player = new Player(username, database.getPersonalTopScore(username));\n game.setScreen(new PreGameScreen(game,\"music/bensound-funkyelement.mp3\", player));\n } else {\n txfUsername.setColor(Color.RED);\n txfPassword.setColor(Color.RED);\n }\n }", "@Given(\"^user is logged in My Store$\")\n public void userIsLoggedInMyStore() {\n System.setProperty(\"webdriver.chrome.driver\", \"src/main/resources/chromedriver\");\n driver = new ChromeDriver();\n driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\n // Maximize the browser window\n driver.manage().window().maximize();\n\n //login correctly to my store\n driver.get(\"https://prod-kurs.coderslab.pl/index.php?controller=authentication&back=my-account\");\n loginPage = new LoginPage(driver);\n loginPage.loginAs(EMAIL, PASSWORD);\n Assert.assertEquals(LOGGED_USER, loginPage.getLoggedUsername());\n }", "@Override\n\tpublic void loginUser() {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tTestCase3.login();\n\t\t\n\t\t\n\t\t\n\t\t\n\n\t}", "@Override\n\tpublic void credite() {\n\t\t\n\t}", "@Test\r\n\tpublic void testLogin1() {\r\n\t\tassertFalse(t1.login(\"\", \"pass\"));\t\r\n\t}", "@Test\r\n\tpublic void validLoginTest()\r\n\t{\n\t\thomePOM.selectMyAccount();\r\n\t\t\r\n\t\t//select Login option from My Account\r\n\t\thomePOM.myAccountLogin();\r\n\t\t//read username from property file\r\n\t\tusername=properties.getProperty(\"username\");\r\n\t\t//read password from property file\r\n\t\tpassword=properties.getProperty(\"password\");\r\n\t\t\r\n\t\t//login to Application\r\n\t\tloginPOM.sendLoginDetails(username,password);\r\n\t\t\r\n\t\t//validate login\r\n\t\tloginPOM.loginValidate();\r\n\t\t\r\n\t\t\r\n\t}", "@BeforeMethod\n\tpublic void testSetUp()\n\t{\n\t\tcommonUtilities.invokeBrowser();\n\t\tloginPage.login(ReadPropertiesFile.getPropertyValue(\"username\"), ReadPropertiesFile.getPropertyValue(\"password\"));\n\t}", "@Given(\"Login Functionality\")\n public void Login_Functionality() {\n String url = ConfigurationReader.get(\"url\");\n Driver.get().get(url);\n //login with valid credentials\n loginPage.login();\n }", "@Given ( \"I am logged into iTrust2 as an Admin\" )\r\n public void loginAsAdmin () {\r\n driver.get( baseUrl );\r\n final WebElement username = driver.findElement( By.name( \"username\" ) );\r\n username.clear();\r\n username.sendKeys( \"admin\" );\r\n final WebElement password = driver.findElement( By.name( \"password\" ) );\r\n password.clear();\r\n password.sendKeys( \"123456\" );\r\n final WebElement submit = driver.findElement( By.className( \"btn\" ) );\r\n submit.click();\r\n\r\n }", "public void StartLogIn(){\n\t}", "private void signIn() {\n }", "void login(String user, String password);", "@Test\n public void shouldLogin() {\n }", "@Override\n protected void afterAuthenticating() {\n }", "@Test\r\n public void login() throws ServletException, IOException {\r\n\r\n }", "@Test\n public void testWebAuthnIDLessLogin() throws IOException {\n\n configureUser(username, false, true, true);\n initializeAuthenticator(true, true, true, true);\n setWebAuthnRealmSettings(false, false, true, true);\n\n // Trigger webauthn-passwordless setup (resident key)\n setUpUsernamePasswordFlow(\"username-password-flow\");\n String credentialId = usernamePasswordAuthWithAuthSetup(username, true, true);\n\n setUpIDLessOnlyFlow(\"idless-only-flow\");\n idlessAuthentication(username, credentialId, false, true);\n\n }", "@Test\n\tpublic void loginWithInvalidCredentials(){\n\t\tapp.loginScreen().waitUntilLoaded();\n\t\tapp.loginScreen().logIn(Credentials.USER_INVALID.username, Credentials.USER_INVALID.password);\n\t\tassertTrue(app.loginScreen().isActive());\n\t}", "@Test\n\tpublic void testLoginUser(){\n\t\t\n\t\tboolean passed = true;\n\t\t\n\t\ttry {\n\t\t\tps.loginUser(new UserLoginInput(\"Sam\", \"sam\"));\n\t\t} catch (ServerException e) {\n\t\t\te.printStackTrace();\n\t\t\tpassed = false;\n\t\t}\n\t\t\n\t\tassertTrue(passed);\n\t}", "@Test\n\tpublic void LoginToYoutube() {\n\t\tdriver.get(\"http://www.youtube.com\");\n\t}", "public void sellerLogin() throws FileNotFoundException, IOException, ParseException, InterruptedException\n\t{\n\t\tObject obj = parser.parse(new FileReader(\"src/test/java/JSONData/sellerLoginInputData.json\"));\n\t\tJSONObject jsonObject = (JSONObject) obj;\n\t\tusername = (String) jsonObject.get(\"UserName\");\n\t\tpassword = (String) jsonObject.get(\"Password\");\t\t\n\t\tnew WebDriverWait(driver, 120).until(ExpectedConditions.invisibilityOfElementLocated(By.className(\"yokart-loader\")));\n\t\twaitForVisibility(clicklogin);\n\t\tclicklogin.click();\n\t\twaitForVisibility(usrname);\n\t\tusrname.clear();\n\t\tusrname.sendKeys(username);\n\t\twaitForVisibility(pwd);\n\t\tpwd.clear();\n\t\tpwd.sendKeys(password);\n\t\tsbmnit.click();\n\t}", "@Test\n public void testTIM(){\n loginToVisit();\n }", "@BeforeGroups(groups = \"SUPER_ADMIN\")\n protected void loginSuperAdmin() throws Exception {\n login(\"spravce@eos.cz\", \"spravce\");\n }", "public login() {\r\n\t\tsuper();\r\n\t}", "public void login () {\n\t\tGPPSignIn.sharedInstance().authenticate();\n\t}", "@Test(priority = 0)\n public void salesforceLogin() {\n SalesforceLoginPage salesforceLoginObj = new SalesforceLoginPage(driver);\n\n driver.get(\"https://login.salesforce.com\");\n\n salesforceLoginObj.setUsername(\"*********\");//Enter valid username\n salesforceLoginObj.setPassword(\"********\");//Enter valid password\n salesforceLoginObj.logInButtonClick();\n\n try {\n Thread.sleep(3000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "Login(String strLogin)\n {\n \tsetLogin(strLogin);\n }", "public void login() {\n presenter.login(username.getText().toString(), password.getText().toString());\n }", "@Test(dependsOnMethods=\"startapp\")\r\n\tpublic void loginapp() {\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"root\\\"]/div/div/div/form/div[1]/input\")).sendKeys(\"amanda@doorfunds.com\");\r\n\t\t//((WebElement) driver.findElements(By.xpath(\"//*[@id=\\\"idSIButton9\\\"]\"))).click();\r\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"root\\\"]/div/div/div/form/div[2]/input\")).sendKeys(\"Liverpool1\");\r\n\t\t\r\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"root\\\"]/div/div/div/form/button\")).click();\r\n\t\tdriver.manage().timeouts().implicitlyWait(3, TimeUnit.SECONDS);\r\n\t}", "@Test\n\tpublic void authenticateTest() {\n\t\t\n\t\tassertEquals(true, true);\n\n\t}", "@Test\r\n\tpublic void login() {\n\t\tUser loginExit = userMapper.login(\"wangxin\", \"123456\");\r\n\t\tif (loginExit == null) {\r\n\t\t\tSystem.out.println(\"用户不存在\");\r\n\t\t} else {\r\n\t\t\tSystem.out.println(loginExit);\r\n\t\t\tSystem.out.println(\"登录成功!\");\r\n\t\t}\r\n\t}", "@Before\r\n public void setUp() {\r\n clientAuthenticated = new MockMainServerForClient();\r\n }", "@BeforeClass(description=\"Launching chrome browser\")\n\t//Launch browser and Log in to store\n\tpublic void login() throws Exception\n\t{\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", Utility.getProperty(\"Chrome_Driver_Path\"));\n\t\t//Launch chrome driver\n\t\td = new ChromeDriver();\n\t\t//Launch URL\n\t\td.get(\"http://www.lingapos.com/signin/\");\n\t\t//Maximize window\n\t\td.manage().window().maximize();\n\t\td.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\n\t\t//Entering User name\n\t\td.findElement(By.name(\"txtusername\")).sendKeys(\"hariteststore@mail.com\");\n\t\t//Entering Password\n\t\td.findElement(By.name(\"txtpassword\")).sendKeys(\"haristore1\");\n\t\t//Log in to store\n\t\td.findElement(By.name(\"submitlogin\")).sendKeys(Keys.ENTER);\n\t\td.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\n\t\t//Validating whether logged into store by checking Live Updates \n\t\tif(d.findElement(By.xpath(\"//*[@id=\\\"navigation\\\"]/ul[1]/li/a\")).getText().equalsIgnoreCase(\"Sale Dashboard\"))\n\t\t{\n\t\t\tSystem.out.println(\"Log in successful\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"log in unsuccessful\");\n\t\t}\n\t}", "@Test(priority = 0)\n public void correctLogin() {\n Login login = new Login(driver, wait);\n login.LoginMethod(login);\n login.typeCredentials(login.emailLabel, correctMail);\n login.typeCredentials(login.passwordLabel, correctPassword);\n login.click(login.submitBtn);\n login.checkElementDisplayed(login.loginContainer);\n }", "public void verifyBeforeLogin() {\n\t\t\n\t\tAssert.assertTrue(driver.getTitle().contains(\"ToolsQA\"));\t\t\n\t}", "@Test\n public void positiveTest() {\n\n loginPage.setUsername(\"admin\");\n loginPage.setPassword(\"123\");\n loginPage.clickOnLogin();\n Assert.assertEquals(driver.getTitle(), \"Players\", \"Wrong title after login\");\n Assert.assertNotEquals(driver.getCurrentUrl(), LoginPage.URL_login, \"You are still on login page.\");\n }", "@Test(priority = 1)\n\tpublic void login() {\n\n\t}", "@Test\n public void testLiveLoginResponse() {\n\n // Create test data\n String username = \"geoff\";\n char[] password = {'p', 'a', 's'};\n int[] indecies = {0, 1, 2};\n\n\n // Create delegate to get response\n LoginDelegate delegate = new LoginDelegate() {\n @Override\n public void loginPassed(User user) {\n\n assertNotNull(user);\n }\n\n @Override\n public void loginFailed(String errMessage) {\n\n fail(errMessage);\n }\n };\n\n testConnector.login(username, password, indecies, delegate);\n\n // Test the token\n String token = DataStore.sharedInstance().getToken();\n assertEquals(token, \"Ppx9BeXdbotVtfxQJ5H3v0bEl9kFtciZ1pLcCgRP2GbGvPVX4LgVFKEB98IgflkZ\");\n\n\n // Test the user\n User user = DataStore.sharedInstance().getCurrentUser();\n assertNotNull(user);\n\n\n List<Product> products = DataStore.sharedInstance().getProducts();\n List<Product> newProds = DataStore.sharedInstance().getNewProducts();\n List<Reward> rewards = DataStore.sharedInstance().getRewards();\n\n\n // Test Products\n assertEquals(products.size(), 3);\n assertEquals(1, products.get(0).getId());\n assertEquals(\"Savings Account\", products.get(0).getTitle());\n assertNotNull(products.get(0).getContent());\n\n\n // Test New Products\n assertEquals(1, newProds.size());\n assertEquals(3, newProds.get(0).getId());\n\n\n // Test Rewards\n assertEquals(rewards.size(), 2);\n assertEquals(rewards.get(0).getId(), 1);\n assertEquals(rewards.get(0).getName(), \"Cinema Tickets\");\n assertEquals(rewards.get(0).getCost(), 300);\n assertNotNull(rewards.get(0).getDescription());\n\n\n // Test the User's properties\n assertEquals(2, user.getId());\n assertEquals(\"geoff\", user.getUsername());\n assertEquals(\"Geoff\", user.getFirstName());\n assertEquals(\"Butcher\", user.getLastName());\n assertEquals(3, user.getNumberOfSpins());\n assertEquals(450, user.getPoints());\n assertEquals(2, user.getNumNewPayments());\n\n assertEquals(2, user.getAccounts().size());\n assertEquals(2, user.getAllGroups().size());\n assertEquals(2, user.getRecentPoints().size());\n assertEquals(1, user.getRecentRewards().size());\n\n\n // Test An Account\n Account account = user.getAccounts().get(0);\n assertEquals(7, account.getId());\n assertEquals(\"Student Account\", account.getName());\n assertEquals(131.97, account.getBalance(), 0.0001);\n assertNotNull(account.getFirstTransaction());\n assertNotNull(account.getProduct());\n assertEquals(2, account.getProduct().getId());\n\n\n // Test A Group\n BudgetGroup testGroup = user.getAllGroups().get(0);\n assertNotNull(testGroup);\n assertEquals(3, testGroup.getId());\n assertEquals(\"Bills\", testGroup.getName());\n assertEquals(2, testGroup.getCategories().size());\n\n // Test A Category\n BudgetCategory testCat = testGroup.getCategories().get(0);\n assertEquals(7, testCat.getId());\n assertEquals(\"Rent\", testCat.getName());\n assertEquals(500.0, testCat.getBudgeted(), 0.1);\n assertEquals(450.0, testCat.getSpent(), 0.1);\n\n // Test a PointGain\n PointGain testGain = user.getRecentPoints().get(0);\n assertEquals(3, testGain.getId());\n assertEquals(\"Spin Reward\", testGain.getName());\n assertEquals(25, testGain.getPoints());\n assertNotNull(testGain.getDescription());\n\n // Test a RewardTaken\n RewardTaken testTaken = user.getRecentRewards().get(0);\n assertEquals(2, testTaken.getId());\n assertNotNull(testTaken.getReward());\n }", "public abstract void login(String userName, String password) throws RemoteException;", "public String quickLogin(String token, String email, String password, HttpServletRequest req, HttpServletResponse resp) {\r\n //1. user info\r\n List<String> data = new ArrayList<String>();\r\n log.info (\"[quickLogin] verify user: \" + token);\r\n String userInfo = \"\";\r\n if (token != null) {\r\n userInfo = this.userTokenVerify(token, req, resp);\r\n } else if (email != null || password != null) { \r\n userInfo = this.login(email, password, req, resp); \r\n } else {\r\n userInfo = this.guestRegister(req, resp);\r\n }\r\n if (this.getStatus(userInfo) != NnStatusCode.SUCCESS) {\r\n return userInfo;\r\n } \r\n String sphere = \"en\";\r\n Pattern pattern = Pattern.compile(\".*sphere\\t((en|zh)).*\", Pattern.DOTALL);\r\n Matcher matcher = pattern.matcher(userInfo);\r\n if (matcher.matches()) {\r\n sphere = matcher.group(1);\r\n } \r\n data.add(userInfo);\r\n //2. channel lineup\r\n log.info (\"[quickLogin] channel lineup: \" + token);\r\n String lineup = this.channelLineup(token, null, null, false, null, true, false, false, false, null, req);\r\n data.add(lineup);\r\n if (this.getStatus(lineup) != NnStatusCode.SUCCESS) {\r\n return this.assembleSections(data);\r\n }\r\n //3. featured curators\r\n log.info (\"[quickLogin] featured curators\");\r\n String curatorInfo = this.curator(null, null, \"featured\", req);\r\n data.add(curatorInfo);\r\n //4. trending\r\n log.info (\"[quickLogin] trending channels\");\r\n String trending = this.channelStack(Tag.TRENDING, sphere, token, null, false);\r\n data.add(trending);\r\n if (this.getStatus(trending) != NnStatusCode.SUCCESS) {\r\n return this.assembleSections(data);\r\n }\r\n //5. recommended\r\n log.info (\"[quickLogin] recommended channels\");\r\n String recommended = this.channelStack(Tag.RECOMMEND, sphere, token, null, false); \r\n data.add(recommended);\r\n if (this.getStatus(recommended) != NnStatusCode.SUCCESS) {\r\n return this.assembleSections(data);\r\n }\r\n //6. featured\r\n log.info (\"[quickLogin] featured channels\");\r\n String featured = this.channelStack(Tag.FEATURED, sphere, token, null, false);\r\n data.add(featured);\r\n if (this.getStatus(featured) != NnStatusCode.SUCCESS) {\r\n return this.assembleSections(data);\r\n }\r\n //7. hottest\r\n log.info (\"[quickLogin] hot channels\");\r\n String hot = this.channelStack(Tag.HOT, sphere, token, null, false);\r\n data.add(hot);\r\n if (this.getStatus(hot) != NnStatusCode.SUCCESS) {\r\n return this.assembleSections(data);\r\n }\r\n //8. category top level\r\n // log.info (\"[quickLogin] top level categories: \" + ((sphere == null) ? \"default\" : sphere));\r\n // hardcoding to English for now, and keeping translations on the player side\r\n log.info (\"[quickLogin] top level categories: en\");\r\n String categoryTop = this.category (null, \"en\", false);\r\n data.add(categoryTop);\r\n return this.assembleSections(data);\r\n }", "void loginDone();", "public void test_LoginToSystem5(){\n\t\tLogin l = new Login();\n\t\tl.LoginToSystem(\"\" , \"test\");\n\t\tassertFalse(l.GetSuccessfulLogin());\n\t}", "private void login() {\n setCredentials();\n setSysProperties();\n\n Properties sysProperties = System.getProperties();\n sysProperties.put(\"mail.store.protocol\", \"imaps\");\n this.session = Session.getInstance(sysProperties,\n new Authenticator() {\n @Override\n protected PasswordAuthentication getPasswordAuthentication() {\n return new PasswordAuthentication(username, password);\n }\n });\n }", "public Login() {\r\n\t\tinitialize();\r\n\t}", "@Test\r\n void checkSession() {\n }", "@Test\r\n\tpublic void testUserLogin() throws Exception {\n\t}", "public void logon ()\n {\n ClientResolutionListener clr = new ClientResolutionListener() {\n public void clientResolved (Name username, ClientObject clobj) {\n // fake up a bootstrap; I need to expose the mechanisms in\n // Presents that create it in a network environment\n BootstrapData data = new BootstrapData();\n data.clientOid = clobj.getOid();\n data.services = EditorServer.invmgr.bootlist;\n\n // and configure the client to operate using the server's\n // distributed object manager\n _client.getContext().getClient().gotBootstrap(\n data, EditorServer.omgr);\n }\n\n public void resolutionFailed (Name username, Exception reason) {\n log.log(Level.WARNING, \"Failed to resolve client [who=\" +\n username + \"].\", reason);\n // TODO: display this error\n }\n };\n EditorServer.clmgr.resolveClientObject(new Name(\"editor\"), clr);\n }", "@Test\n public void positiveLoginTest(){\n Driver.getDriver().get(ConfigReader.getProperty(\"CHQAUrl\"));\n\n QAConcortPage qaConcortPage=new QAConcortPage();\n //login butonuna bas\n qaConcortPage.ilkLoginLinki.click();\n //test data username: manager ,\n qaConcortPage.usernameKutusu.sendKeys(ConfigReader.getProperty(\"CHQAValidUsername\"));\n //test data password : Manager1!\n qaConcortPage.passwordKutusu.sendKeys(ConfigReader.getProperty(\"CHQAValidPassword\"));\n qaConcortPage.loginButonu.click();\n //Degerleri girildiginde sayfaya basarili sekilde girilebildigini test et\n Assert.assertTrue(qaConcortPage.basariliGirisYaziElementi.isDisplayed());\n Driver.closeDriver();\n }", "@Override\n\tpublic boolean login(String username, String password) {\n\t\treturn true;\n\t}", "public static void forceLogin() {\n forcedLogin = true;\n }", "private boolean login()\n {\n System.out.print(\"Enter your username: \");\n String userName = keyboard.nextLine().toLowerCase();\n currentUser = fs.getUser(userName);\n System.out.println();\n\n return currentUser != null;\n }" ]
[ "0.68990004", "0.68302995", "0.6611684", "0.6591196", "0.657438", "0.65681547", "0.64582753", "0.639651", "0.63892245", "0.63745385", "0.6355593", "0.6337877", "0.63337374", "0.6295353", "0.6259104", "0.6251729", "0.6232431", "0.6227686", "0.6216336", "0.6201369", "0.6194873", "0.6191007", "0.61703813", "0.61665493", "0.6161374", "0.6161068", "0.61595225", "0.61484534", "0.614159", "0.613723", "0.6107809", "0.6082617", "0.6078449", "0.60696244", "0.6060553", "0.6025231", "0.6004556", "0.60025984", "0.59895545", "0.59777397", "0.59656435", "0.59615177", "0.59566295", "0.59525967", "0.59525156", "0.5948301", "0.5938786", "0.592721", "0.59237653", "0.5923206", "0.5921312", "0.5912269", "0.5911309", "0.58912766", "0.5888725", "0.5888184", "0.5886036", "0.58793277", "0.58616644", "0.5857288", "0.5856255", "0.5837793", "0.5829607", "0.58208334", "0.5807043", "0.5780643", "0.5777589", "0.57748216", "0.577455", "0.577307", "0.5763808", "0.5762929", "0.5761068", "0.5755021", "0.5753875", "0.5749839", "0.574038", "0.57390743", "0.57389367", "0.5736681", "0.5725138", "0.57093656", "0.57058716", "0.57046247", "0.57035345", "0.5699829", "0.56759375", "0.56651485", "0.56557995", "0.5650958", "0.564552", "0.5640803", "0.56397986", "0.56368923", "0.56336427", "0.5633264", "0.56296444", "0.56288904", "0.5622193", "0.5622089", "0.56219393" ]
0.0
-1
Cambia la imagen seleccionada (ampliada en panel este)
public void cambiarImagenGrande(ImagenTemp it) { //TODO automatizar haciendo que el método directamente coloque la imagen escalada en el panel? Image imgtemp = VistaPrincipal.ponerImagenEscalada(it.getbImagen(), panelImagenGrande); labelImagenGrande.setIcon(new ImageIcon(imgtemp)); labelImagenGrande.setBounds((int)(((float)panelImagenGrande.getWidth()/2) - ((float)imgtemp.getWidth(null))/((float)2)), (int)(((float)panelImagenGrande.getHeight()/2) - ((float)imgtemp.getHeight(null))/((float)2)),imgtemp.getWidth(null), imgtemp.getHeight(null)); //Se rellenan los datos de la imagen seleccionada labelNombre.setText(it.getNombre()+it.getExtension()); LocalDate localDate = LocalDate.ofEpochDay(it.getFecha()/(1000*60*60*24));//TODO llevar esto a un método estático de VistaPrincipal si se repite labelFecha.setText(localDate.getDayOfMonth() + "/" + localDate.getMonthValue() + "/" + localDate.getYear()); labelResolucion.setText(it.getbImagen().getWidth() + " x " + it.getbImagen().getHeight()); String peso = it.getImagen().length()/1024 < 1000 ? (float)(it.getImagen().length()/1024) + " kB" : (int)(it.getImagen().length()/(1024*1024)) + " MB"; labelPeso.setText(peso); //Se rellenan las etiquetas panelImagenEtiquetas.removeAll(); for(Etiquetas e : it.getArrayEtiquetas()) panelImagenEtiquetas.add(e); resultadosEste.revalidate(); resultadosEste.repaint(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public SeleccionarRancho() {\n setExtendedState(JFrame.MAXIMIZED_BOTH);\n initComponents();\n Image i = null;\n i = Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"/resources/logo tru-test.png\"));\n setIconImage(i);\n // setLocationRelativeTo(null);\n ranchoSelector1.cargar();\n jPanel2.setOpaque(false);\n cargarcomponentes();\n }", "@Override\n\tpublic void mouseClicked(MouseEvent ev) {\n\t\tif(ev.getSource() instanceof PanelImagenRes) {\n\t\t\tcambiarImagenGrande(((PanelImagenRes)ev.getSource()).getImagenTemp());\n\t\t\timagenTempSeleccionada = ((PanelImagenRes)ev.getSource()).getImagenTemp();\n\t\t}\n\t\t\n\t}", "void selectImage(String path);", "BufferedImage getSelectedImage();", "private void botaoImagemClienteMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_botaoImagemClienteMouseClicked\n\n // Instancia seletor de arquivo.\n JFileChooser arquivo = new JFileChooser();\n\n // Insere filtro para png e jgp.\n arquivo.setFileFilter(filtro);\n\n // Inicia variavel para parametrizar imagem.\n BufferedImage img;\n\n // Variavel para receber imagem.\n Icon novaImg = null;\n\n // Parametro para seletor selecionar somente o pre determinado\n arquivo.setAcceptAllFileFilterUsed(false);\n\n // Instancia seletor no frame.\n arquivo.showOpenDialog(painelCadastrarCliente);\n\n // Titulo.\n arquivo.setDialogTitle(\"Escolha imagem: extensao jpg e png\");\n\n // Impede mais de uma selecao.\n arquivo.setMultiSelectionEnabled(true);\n\n // Se alguma imagem for selecionada.\n if (arquivo.getSelectedFile() != null) {\n\n // Verifica erro de Io\n try {\n\n // Parametriza a dimensao de imagem.\n int largura = 161, altura = 158;\n\n // Recebe arquivo selecionado.\n img = ImageIO.read(arquivo.getSelectedFile());\n\n // Recebe imagem parametrizada.\n novaImg = new ImageIcon(img.getScaledInstance(largura, altura,\n java.awt.Image.SCALE_SMOOTH));\n\n // Insere imagem na tela por um label.\n imgCaminho = arquivo.getSelectedFile().getAbsolutePath();\n\n } catch (IOException ex) {\n\n // Mensagem de erro.\n JOptionPane.showMessageDialog(null, \"Erro na imagem\", \"Erro\", JOptionPane.ERROR);\n\n }\n\n // Substitui label por imagem.\n imagemCliente.setIcon(novaImg);\n imagemCliente.setVisible(true);\n\n }\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tJFileChooser jfc=new JFileChooser(); \r\n\t\t jfc.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES ); \r\n\t\t jfc.showDialog(new JLabel(), \"选择\"); \r\n\t\t File file=jfc.getSelectedFile();\r\n\t\t if(null==file){\r\n\t\t \treturn;\r\n\t\t }\r\n\t\t if(file.isDirectory()){\r\n\t\t System.out.println(\"文件夹:\"+file.getAbsolutePath()); \r\n\t\t }else if(file.isFile()){\r\n\t\t System.out.println(\"文件:\"+file.getAbsolutePath()); \r\n\t\t }\r\n\t\t if(Util.isImage(file)){\r\n\t\t \tImageIcon img = new ImageIcon(file.getAbsolutePath());\r\n\t\t\t\t\tlbImage.setIcon(img);\r\n\t\t\t\t\tMain.img = img.getImage();\r\n\t\t }else{\r\n\t\t \tJOptionPane.showMessageDialog(Main.this, \"请选择图片\");\r\n\t\t }\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void seleccionar() {\n\r\n\t\t\t}", "public PlayerSelection(){\n try{\n image = ImageIO.read(new File(\"../images/PlaySelection.png\"));\n repaint();\n }\n catch(IOException e){\n }\n addMouse();\n }", "public void seleccionarPieza(java.awt.event.MouseEvent evt) {\n // Se pasa como parametro el evento\n CuadroPieza t = ((CuadroPieza) evt.getComponent());//Averiguo en que cuadro sucedio el evento\n if (t.getPieza() != null) {//Veo si el cuadro no esta vacio.\n if (t.getPieza().getColor() == getTurno()) {//Veo si es del mismo color del turno que actualmente le toca.\n cuadroSeleccionado = t;\n /*\n * Con esto hago que se resalten los posibles movimientos en todo el tablero.\n */\n for (int x = 0; x < 8; x++) {\n for (int y = 0; y < 8; y++) {\n tablero[x][y].opacarPieza();//Si hay piezas seleccionadas, las opaco\n if (isSeleccionarAlternativas()) {//Resalto los posibles movimientos.\n if (cuadroSeleccionado.getPieza().validarMovimiento(tablero[x][y], this)) {\n tablero[x][y].resaltarPieza(tablero[x][y].getPieza() != null ? getAlerta() : null);\n }\n }\n }\n }\n /*\n * Resalto el cuadro que ha sido seleccionado para que el usuario sepa que cuadro selecciono\n */\n cuadroSeleccionado.resaltarPieza(getSeleccionado());\n /*\n * Establesco la imagen de la pieza que ha sido seleccionada al label.\n */\n tmp.setIcon(cuadroSeleccionado.getPieza().getImagenPieza());\n /*\n * borro la imagen de la pieza del cuadro.\n */\n cuadroSeleccionado.lbl.setIcon(null);\n /*\n * Establesco la nueva posicion del label, que tiene la imagen de la pieza.\n */\n tmp.setLocation(cuadroSeleccionado.getLocation().x + evt.getX() - 18, cuadroSeleccionado.getLocation().y + evt.getY() - 28);\n }\n }\n }", "private void selectImage() {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(\n Intent.createChooser(\n intent,\n \"Select Image from here...\"),\n PICK_IMAGE_REQUEST);\n }", "public ActionListener getListenerSelectImage() {\n\treturn new ActionListener() {\n\t @Override\n\t public void actionPerformed(ActionEvent e) {\n\t\tJFileChooser chooser = new JFileChooser();\n\t\t// configuration du selecteur de fichier\n\t\tchooser.setDialogTitle(\"Select image\");\n\t\tchooser.setMultiSelectionEnabled(false);\n\t\tchooser.setCurrentDirectory(new File(ressourcesPath));\n\t\tFileNameExtensionFilter filter = new FileNameExtensionFilter(\"Images\", \"jpg\", \"png\", \"jpeg\");\n\t\tchooser.setFileFilter(filter);\n\t\tint returnValue = chooser.showOpenDialog(null);\n\t\tif (returnValue == JFileChooser.APPROVE_OPTION) {\n\t\t // si l'utilisateur a fait ouvrir en ayant un fichier de selectionne\n\t\t File selectedImage = chooser.getSelectedFile();\n\t\t // on essaye de charger l'image dans la GridView\n\t\t try {\n\t\t\tMainWindow.this.view.loadImage(selectedImage.getAbsolutePath());\n\t\t } catch (NullPointerException ex) {\n\t\t\t// si c'est pas une image dans les formats attendus alors\n\t\t\t// on affiche une popup d'erreur\n\t\t\tshowError(\"This file isn't an image.\");\n\t\t } \n\t\t}\n\t }\n\t};\n }", "public void cambiarEstadoImagen(){\n ImageIcon respuesta=new ImageIcon();\n if(oportunidades==0){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado7.jpg\"));\n }\n if(oportunidades==1){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado6.jpg\"));\n }\n if(oportunidades==2){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado5.jpg\"));\n }\n if(oportunidades==3){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado4.jpg\"));\n }\n if(oportunidades==4){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado3.jpg\"));\n }\n if(oportunidades==5){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado2.jpg\"));\n }\n if(oportunidades==6){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado1.jpg\"));\n }\n if(oportunidades==7){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado0.jpg\"));\n }\n this.imgAhorcado=respuesta; \n }", "@Override\n public void onClick(View v) {\n chooseImage();\n }", "public void irAPanelAbierto() {\r\n //Seleccionar PerfilPanel\r\n itemClicked(jpanePerfil, jpaneActivePerfil, jlblPerfil, 1);\r\n }", "public void handleActionChosenImageView(MouseEvent event){\n Integer actionSelected = buttonAction.get(event.getSource());\n System.out.println(\"input sent from gameboard Controller : execute action \" + actionSelected.toString());\n sender.sendInput(\"execute action \" + actionSelected.toString());\n\n for (Map.Entry<Integer, ImageView> entry : coverImages.entrySet()) {\n\n entry.getValue().setVisible(false);\n }\n\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n JFileChooser fc = new JFileChooser(); \n int returnVal = fc.showOpenDialog(null);\n if (returnVal == JFileChooser.APPROVE_OPTION) {\n File file = fc.getSelectedFile();\n System.out.println(file.getAbsolutePath()); \n image = loadImage( file);\n }\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tJFileChooser chooser = new JFileChooser();\r\n\t\t\t\tFileNameExtensionFilter filter = new FileNameExtensionFilter(\r\n\t\t\t\t\t\t\"Image Files\", // 파일 이름에 창에 출력될 문자열\r\n\t\t\t\t\t\t\"jpg\", \"gif\", \"PNG\"); // 파일 필터로 사용되는 확장자. *.jpg. *.gif만\r\n\t\t\t\t\t\t\t\t\t\t\t\t// 나열됨\r\n\t\t\t\tchooser.setFileFilter(filter); // 파일 다이얼로그에 파일 필터 설정\r\n\t\t\t\tchooser.setMultiSelectionEnabled(false);//다중 선택 불가\r\n\r\n\t\t\t\t// 파일 다이얼로그 출력\r\n\t\t\t\tint ret = chooser.showOpenDialog(null);\r\n\t\t\t\tif (ret != JFileChooser.APPROVE_OPTION) { // 사용자가 창을 강제로 닫았거나 취소\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 버튼을 누른 경우\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"파일을 선택하지 않았습니다\", \"경고\",\r\n\t\t\t\t\t\t\tJOptionPane.WARNING_MESSAGE);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// 사용자가 파일을 선택하고 \"열기\" 버튼을 누른 경우\r\n\t\t\t\tfilePath = chooser.getSelectedFile().getPath(); // 파일 경로명을\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 알아온다.\r\n\r\n\t\t\t\tplaqueP1.setIcon(new ImageIcon(((new ImageIcon(filePath))\r\n\t\t\t\t\t\t.getImage()).getScaledInstance(300, 250,\r\n\t\t\t\t\t\tjava.awt.Image.SCALE_SMOOTH))); // 파일을 로딩하여 이미지 레이블에\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 출력한다.\r\n\t\t\t\tplaqueP1.addMouseListener(new EnlargeListener());\r\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tImage imagen = panelCamara.getImage();\n\t\t\t\tFile fichero = new File(\"usuarios/\"+nick+\".jpg\");\n\t\t\t\tString formato = \"jpg\";\n\t\t\t\ttry {\n\t\t\t\t\tImageIO.write((RenderedImage)imagen, formato, fichero);\n\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tBD.btnGuardar(\"usuarios/\"+nick+\".jpg\",nick);\n\t\t\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tJFileChooser chooser = new JFileChooser();\r\n\t\t\t\tFileNameExtensionFilter filter = new FileNameExtensionFilter(\r\n\t\t\t\t\t\t\"Image Files\", // 파일 이름에 창에 출력될 문자열\r\n\t\t\t\t\t\t\"jpg\", \"gif\", \"PNG\"); // 파일 필터로 사용되는 확장자. *.jpg. *.gif만\r\n\t\t\t\t\t\t\t\t\t\t\t\t// 나열됨\r\n\t\t\t\tchooser.setFileFilter(filter); // 파일 다이얼로그에 파일 필터 설정\r\n\t\t\t\tchooser.setMultiSelectionEnabled(false);//다중 선택 불가\r\n\r\n\t\t\t\t// 파일 다이얼로그 출력\r\n\t\t\t\tint ret = chooser.showOpenDialog(null);\r\n\t\t\t\tif (ret != JFileChooser.APPROVE_OPTION) { // 사용자가 창을 강제로 닫았거나 취소\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 버튼을 누른 경우\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"파일을 선택하지 않았습니다\", \"경고\",\r\n\t\t\t\t\t\t\tJOptionPane.WARNING_MESSAGE);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// 사용자가 파일을 선택하고 \"열기\" 버튼을 누른 경우\r\n\t\t\t\tfilePath = chooser.getSelectedFile().getPath(); // 파일 경로명을\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 알아온다.\r\n\t\t\t\tplaqueP2.setIcon(new ImageIcon(((new ImageIcon(filePath))\r\n\t\t\t\t\t\t.getImage()).getScaledInstance(300, 250,\r\n\t\t\t\t\t\tjava.awt.Image.SCALE_SMOOTH))); // 파일을 로딩하여 이미지 레이블에\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 출력한다.\r\n\t\t\t\tplaqueP2.addMouseListener(new EnlargeListener());\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tJFileChooser chooser = new JFileChooser();\r\n\t\t\t\tFileNameExtensionFilter filter = new FileNameExtensionFilter(\r\n\t\t\t\t\t\t\"Image Files\", // 파일 이름에 창에 출력될 문자열\r\n\t\t\t\t\t\t\"jpg\", \"gif\", \"PNG\"); // 파일 필터로 사용되는 확장자. *.jpg. *.gif만\r\n\t\t\t\t\t\t\t\t\t\t\t\t// 나열됨\r\n\t\t\t\tchooser.setFileFilter(filter); // 파일 다이얼로그에 파일 필터 설정\r\n\t\t\t\tchooser.setMultiSelectionEnabled(false);//다중 선택 불가\r\n\r\n\t\t\t\t// 파일 다이얼로그 출력\r\n\t\t\t\tint ret = chooser.showOpenDialog(null);\r\n\t\t\t\tif (ret != JFileChooser.APPROVE_OPTION) { // 사용자가 창을 강제로 닫았거나 취소\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 버튼을 누른 경우\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"파일을 선택하지 않았습니다\", \"경고\",\r\n\t\t\t\t\t\t\tJOptionPane.WARNING_MESSAGE);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// 사용자가 파일을 선택하고 \"열기\" 버튼을 누른 경우\r\n\t\t\t\tfilePath = chooser.getSelectedFile().getPath(); // 파일 경로명을\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 알아온다.\r\n\t\t\t\tplaqueP3.setIcon(new ImageIcon(((new ImageIcon(filePath))\r\n\t\t\t\t\t\t.getImage()).getScaledInstance(300, 250,\r\n\t\t\t\t\t\tjava.awt.Image.SCALE_SMOOTH))); // 파일을 로딩하여 이미지 레이블에\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 출력한다.\r\n\t\t\t\tplaqueP3.addMouseListener(new EnlargeListener());\r\n\t\t\t}", "public void mouseClicked(MouseEvent evt) {\n if (imgIndex != 0) {\n Panels.currPanel.deactivate();\n if (imgIndex == 1) { // easy CPU\n Panels.layout.show(Panels.contentPanel, \"display\");\n Panels.displayPanel.activate(Panels.easyPanel, \"easy\", Images.VS_CPU_INSTRS);\n Panels.currPanel = Panels.displayPanel;\n } else if (imgIndex == 2) { // hard CPU\n Panels.layout.show(Panels.contentPanel, \"display\");\n Panels.displayPanel.activate(Panels.solvedPanel, \"solved\", Images.VS_CPU_INSTRS);\n Panels.currPanel = Panels.displayPanel;\n } else { // main menu\n Panels.layout.show(Panels.contentPanel, \"mainMenu\");\n Panels.mainMenuPanel.activate();\n Panels.currPanel = Panels.mainMenuPanel;\n }\n } \n }", "public void selectImage(View view){\n Intent intent = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.INTERNAL_CONTENT_URI);\n startActivityForResult(intent,PICK_IMAGE);\n }", "public void setSelectedImgURI(Uri select){\n this.selectedImageUri = select;\n }", "@Override\n public void onClick(View v) {\n Intent i = new Intent(\n Intent.ACTION_PICK,\n android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n startActivityForResult(i, SELECTED_PICTURE);\n }", "public void selectedImageButtonPushed(ActionEvent event) throws IOException {\n // get the Stage to open a new window\n Stage stage = (Stage)((Node)event.getSource()).getScene().getWindow();\n FileChooser fileChooser = new FileChooser();\n fileChooser.setTitle(\"open Image\");\n //filter for .jpg and .png\n FileChooser.ExtensionFilter imageFilter = new FileChooser.ExtensionFilter(\"Image Files\",\"*.jpg\",\"*.png\");\n fileChooser.getExtensionFilters().add(imageFilter);\n // set the start directory\n String userDirectoryString = System.getProperty(\"user.home\")+\"\\\\Pictures\";\n File userDirectory = new File(userDirectoryString);\n // confirm that system can reach the directory\n if (!userDirectory.canRead())\n userDirectory = new File(System.getProperty(\"user.home\"));\n //set the file chooser to select initial directory\n fileChooser.setInitialDirectory(userDirectory);\n File imageFile = fileChooser.showOpenDialog(stage);\n if (imageFile != null && imageFile.isFile())\n {\n selectImage.setImage(new Image(imageFile.toURI().toString()));\n }\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent i = new Intent(\n\t\t\t\t\t\tIntent.ACTION_PICK,\n\t\t\t\t\t\tandroid.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n\t\t\t\tstartActivityForResult(i, RESULT_LOAD_IMAGE);\n\n\t\t\t refreshResult();\n\t\t\t LeftEdge.setImageResource(R.drawable.left_edgeicon);\n\t\t\t RightEdge.setImageResource(R.drawable.right_edgeicon);\n\t\t\t// ChannelCheck0.setImageResource(R.drawable.control);\n\t\t\t \n\t\t\t}", "public void mousePressed(MouseEvent e) {\r\n ((JLabel)e.getSource()).setIcon(new ImageIcon(\"images\" + File.separator + \"selected.gif\"));\r\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\n\t\t\t\tselectImageMethod();\n\t\t\t}", "public void selectMarkerImage() {\r\n\t\tsafeClick(selectAddMarkerImage, MEDIUMWAIT);\r\n\t}", "public void changeImage(){\n if(getImage()==storeItemImg) setImage(selected);\n else setImage(storeItemImg);\n }", "private void selectImage() {\n final CharSequence[] items = {\"Take Photo\", \"Choose from Library\",\n \"Cancel\"};\n\n AlertDialog.Builder builder = new AlertDialog.Builder(Timetable.this);\n builder.setTitle(\"Add Photo!\");\n builder.setItems(items, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int item) {\n if (items[item].equals(\"Take Photo\")) {\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n startActivityForResult(intent, REQUEST_CAMERA);\n } else if (items[item].equals(\"Choose from Library\")) {\n Intent intent = new Intent(\n Intent.ACTION_PICK,\n android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n intent.setType(\"image/*\");\n startActivityForResult(\n Intent.createChooser(intent, \"Select File\"),\n SELECT_FILE);\n } else if (items[item].equals(\"Cancel\")) {\n dialog.dismiss();\n }\n }\n });\n builder.show();\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent(Intent.ACTION_PICK, null);\n\n\t\t\t\tintent.setDataAndType(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, \"image/*\");\n\t\t\t\tstartActivityForResult(intent, 1);\n\t\t\t\tmenu_mine.setVisibility(View.GONE);\n\t\t\t}", "public void selectImages()\n {\n Log.d(TAG, \"selectImages\");\n BSImagePicker multiPicker = null;\n\n multiPicker = new BSImagePicker.Builder(FILE_PROVIDER)\n .isMultiSelect()\n .setMultiSelectBarBgColor(android.R.color.background_dark)\n .setMultiSelectTextColor(R.color.primary_text)\n .setMultiSelectDoneTextColor(android.R.color.white)\n .setSpanCount(NUMBER_OF_COLUMNS)\n .build();\n\n multiPicker.show(this.fragmentActivity.getSupportFragmentManager(), \"Image picker\");\n }", "public void mouseClicked(MouseEvent e) {\n adaptee.listSeleccionadas_mouseClicked(e);\n }", "public void setActiveImage() {\n\t\tsetGraphic(new ImageView(activePiece));\n\t\tisActiveImageOn = true;\t\t\n\t}", "private void selectImageFromGallery() {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, getString(R.string.select_picture)),\n REQUEST_IMAGE_OPEN);\n }", "public interface ImageSelectClicked {\n void clickImage(int position);\n}", "private void selectImage(){\n final CharSequence[] options = { \"Choose from Gallery\",\"Cancel\" };\n AlertDialog.Builder builder = new AlertDialog.Builder(activity);\n builder.setItems(options, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int item) {\n if (options[item].equals(\"Choose from Gallery\"))\n {\n Intent intent = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);\n startActivityForResult(intent, 2);\n }\n else if (options[item].equals(\"Cancel\")) {\n dialog.dismiss();\n }\n }\n });\n builder.show();\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tJFileChooser chooser = new JFileChooser();\r\n\t\t\t\tFileNameExtensionFilter filter = new FileNameExtensionFilter(\r\n\t\t\t\t\t\t\"Image Files\", // 파일 이름에 창에 출력될 문자열\r\n\t\t\t\t\t\t\"jpg\", \"gif\", \"PNG\"); // 파일 필터로 사용되는 확장자. *.jpg. *.gif만\r\n\t\t\t\t\t\t\t\t\t\t\t\t// 나열됨\r\n\t\t\t\tchooser.setFileFilter(filter); // 파일 다이얼로그에 파일 필터 설정\r\n\t\t\t\tchooser.setMultiSelectionEnabled(false);//다중 선택 불가\r\n\r\n\t\t\t\t// 파일 다이얼로그 출력\r\n\t\t\t\tint ret = chooser.showOpenDialog(null);\r\n\t\t\t\tif (ret != JFileChooser.APPROVE_OPTION) { // 사용자가 창을 강제로 닫았거나 취소\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 버튼을 누른 경우\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"파일을 선택하지 않았습니다\", \"경고\",\r\n\t\t\t\t\t\t\tJOptionPane.WARNING_MESSAGE);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// 사용자가 파일을 선택하고 \"열기\" 버튼을 누른 경우\r\n\t\t\t\tfilePath = chooser.getSelectedFile().getPath(); // 파일 경로명을\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 알아온다.\r\n\t\t\t\t\r\n\r\n\t\t\t\tteethP1.setIcon(new ImageIcon(((new ImageIcon(filePath))\r\n\t\t\t\t\t\t.getImage()).getScaledInstance(300, 250,\r\n\t\t\t\t\t\tjava.awt.Image.SCALE_SMOOTH))); // 파일을 로딩하여 이미지 레이블에\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 출력한다.\r\n\t\t\t\tteethP1.addMouseListener(new EnlargeListener());\r\n\t\t\t}", "public void loadInputImage()\n{\n selectInput(\"Select a file to process:\", \"imageLoader\"); // select image window -> imageLoader()\n}", "public void actionPerformed(ActionEvent e) {\n\t\t int returnVal = fc.showOpenDialog(GenerateWindow.this);\n\n\t\t if (returnVal == JFileChooser.APPROVE_OPTION) {\n\t\t File imagefile = fc.getSelectedFile();\n\t\t imageSelect.setText(\"images/\"+imagefile.getName());\n\t\t }}", "@Override\n public void onClick(View v) {\n\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent,\n \"Select Picture\"), IMG_RESULT);\n\n }", "public void onClick(View arg0) {\n Intent intent = new Intent();\r\n intent.setType(\"image/*\");\r\n intent.setAction(Intent.ACTION_GET_CONTENT);\r\n startActivityForResult(Intent.createChooser(intent,\r\n \"Select Picture\"), SELECT_PICTURE);\r\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tJFileChooser chooser = new JFileChooser();\r\n\t\t\t\tFileNameExtensionFilter filter = new FileNameExtensionFilter(\r\n\t\t\t\t\t\t\"Image Files\", // 파일 이름에 창에 출력될 문자열\r\n\t\t\t\t\t\t\"jpg\", \"gif\", \"PNG\"); // 파일 필터로 사용되는 확장자. *.jpg. *.gif만\r\n\t\t\t\t\t\t\t\t\t\t\t\t// 나열됨\r\n\t\t\t\tchooser.setFileFilter(filter); // 파일 다이얼로그에 파일 필터 설정\r\n\t\t\t\tchooser.setMultiSelectionEnabled(false);//다중 선택 불가\r\n\r\n\t\t\t\t// 파일 다이얼로그 출력\r\n\t\t\t\tint ret = chooser.showOpenDialog(null);\r\n\t\t\t\tif (ret != JFileChooser.APPROVE_OPTION) { // 사용자가 창을 강제로 닫았거나 취소\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 버튼을 누른 경우\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"파일을 선택하지 않았습니다\", \"경고\",\r\n\t\t\t\t\t\t\tJOptionPane.WARNING_MESSAGE);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// 사용자가 파일을 선택하고 \"열기\" 버튼을 누른 경우\r\n\t\t\t\tfilePath = chooser.getSelectedFile().getPath(); // 파일 경로명을\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 알아온다.\r\n\t\t\t\t\r\n\t\t\t\tteethP2.setIcon(new ImageIcon(((new ImageIcon(filePath))\r\n\t\t\t\t\t\t.getImage()).getScaledInstance(300, 250,\r\n\t\t\t\t\t\tjava.awt.Image.SCALE_SMOOTH))); // 파일을 로딩하여 이미지 레이블에\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 출력한다.\r\n\t\t\t\tteethP2.addMouseListener(new EnlargeListener());\r\n\t\t\t}", "public JPanelRegistro() {\n initComponents();\n jfcImagen.setFileFilter(filtro);\n jfcImagen.setDialogTitle(\"Seleccione una imagen\");\n jfcImagen.setAcceptAllFileFilterUsed(false);\n jlImagen.setBackground(Color.white);\n \n \n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent,\n \"Select Picture\"), SELECT_PICTURE);\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}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif (e.getSource() == first) {\n\t\t\tshowPictureFromTheInternet(\"http://www.pictorem.com/collection/900_2331348HighRes.jpg\");\n\t\t} else if (e.getSource() == secound) {\n\t\t\tshowPictureFromTheInternet(\"https://ih1.redbubble.net/image.410068489.3517/ap,550x550,12x12,1,transparent,t.png\");\n\t\t}\n\n\t}", "public void selectPanel() {\n\t\tthis.displayNumberBlock.setBackground(dispSelected);\n\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tJFileChooser chooser = new JFileChooser();\r\n\t\t\t\tFileNameExtensionFilter filter = new FileNameExtensionFilter(\r\n\t\t\t\t\t\t\"Image Files\", // 파일 이름에 창에 출력될 문자열\r\n\t\t\t\t\t\t\"jpg\", \"gif\", \"PNG\"); // 파일 필터로 사용되는 확장자. *.jpg. *.gif만\r\n\t\t\t\t\t\t\t\t\t\t\t\t// 나열됨\r\n\t\t\t\tchooser.setFileFilter(filter); // 파일 다이얼로그에 파일 필터 설정\r\n\t\t\t\tchooser.setMultiSelectionEnabled(false);//다중 선택 불가\r\n\r\n\t\t\t\t// 파일 다이얼로그 출력\r\n\t\t\t\tint ret = chooser.showOpenDialog(null);\r\n\t\t\t\tif (ret != JFileChooser.APPROVE_OPTION) { // 사용자가 창을 강제로 닫았거나 취소\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 버튼을 누른 경우\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"파일을 선택하지 않았습니다\", \"경고\",\r\n\t\t\t\t\t\t\tJOptionPane.WARNING_MESSAGE);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// 사용자가 파일을 선택하고 \"열기\" 버튼을 누른 경우\r\n\t\t\t\tfilePath = chooser.getSelectedFile().getPath(); // 파일 경로명을\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 알아온다.\r\n\t\t\t\t\r\n\t\t\t\tteethP3.setIcon(new ImageIcon(((new ImageIcon(filePath))\r\n\t\t\t\t\t\t.getImage()).getScaledInstance(300, 250,\r\n\t\t\t\t\t\tjava.awt.Image.SCALE_SMOOTH))); // 파일을 로딩하여 이미지 레이블에\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 출력한다.\r\n\t\t\t\tteethP3.addMouseListener(new EnlargeListener());\r\n\t\t\t}", "private void jMenuItem1ActionPerformed(ActionEvent evt) {\n\n\t\tif (!entry.isDisabled) {\n\n\t\t\tBufferedImage selectedImage;\n\n\t\t\tJFileChooser _fileChooser = new JFileChooser();\n\t\t\tint retval = _fileChooser.showOpenDialog(Main.this);\n\n\t\t\t/**\n\t\t\t * extensions of images user is allowed to choose\n\t\t\t */\n\t\t\tfinal String[] okFileExtensions = new String[] { \"jpg\", \"png\", \"gif\", \"bmp\", \"jpeg\" };\n\t\t\tFile file;\n\n\t\t\tif (retval == JFileChooser.APPROVE_OPTION) {\n\t\t\t\ttry {\n\t\t\t\t\tfile = _fileChooser.getSelectedFile();\n\t\t\t\t\tBoolean flag = false;\n\t\t\t\t\tfor (String extension : okFileExtensions) {\n\t\t\t\t\t\tif (file.getName().toLowerCase().endsWith(extension)) {\n\t\t\t\t\t\t\toutputFile = file;\n\t\t\t\t\t\t\tfileExtension = extension;\n\t\t\t\t\t\t\tflag = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (!flag) {\n\t\t\t\t\t\tJOptionPane.showMessageDialog(this, \"Please choose a jpg, jpeg, png, bmp or gif file only.\", \"Error\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tentry.SavedImages.clear();\n\t\t\t\t\tentry.RedoImages.clear();\n\t\t\t\t\tselectedImage = ImageIO.read(file);\n\t\t\t\t\tImage tmg = createImage(((Image) selectedImage).getWidth(this), ((Image) selectedImage).getHeight(this));\n\t\t\t\t\tGraphics tg = tmg.getGraphics();\n\t\t\t\t\ttg.drawImage(selectedImage, 0, 0, null);\n\t\t\t\t\tentry.SavedImages.push(selectedImage);\n\t\t\t\t\tentryImage = tmg;\n\t\t\t\t\tentry.showImage(entryImage);\n\t\t\t\t\tentry.setPreferredSize(new Dimension(entryImage.getWidth(this), entryImage.getHeight(this)));\n\t\t\t\t\tint w = Math.min(entryImage.getWidth(this) + 3, getContentPane().getWidth());\n\t\t\t\t\tint h = Math.min(entryImage.getHeight(this) + 3, getContentPane().getHeight());\n\t\t\t\t\tpictureScrollPane.setBounds((getContentPane().getWidth() - w) / 2, (getContentPane().getHeight() - h) / 2, w, h);\n\t\t\t\t\tpictureScrollPane.setViewportView(entry);\n\t\t\t\t} catch (IOException ex) {\n\t\t\t\t\tLogger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void onClick(View v) {\n\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n Intent pickIntent = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n pickIntent.setType(\"image/*\");\n Intent chooserIntent = Intent.createChooser(intent, \"Select Image\");\n chooserIntent.putExtra(Intent.EXTRA_INITIAL_INTENTS, new Intent[] {pickIntent});\n startActivityForResult(chooserIntent,PICK_IMAGE_REQUEST);\n }", "private void itemBrowseTextureActionPerformed(java.awt.event.ActionEvent evt) {\n }", "@OnClick(R.id.hinhanh_dangtin)\n void ChooseImage(View v) {\n onPickPhoto(v);\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t dia.dismiss();\n\t\t\t\tIntent intent = new Intent( Intent.ACTION_PICK,android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n\t\t\t\t startActivityForResult(intent, 1);\n\t\t\t\t\n\t\t\t}", "public void mouseClicked(MouseEvent e) {\n\t\t IR.panelecturasmci = Panelecturasmci.getInstance();\n\t\t // Buclo popr los sensores para añadir los listeners\n\t\t // necesarios\n\t\t for (int i = 0; i < IR.sensores.size(); i++) {\n\t\t\tif (IR.sensores.get(i).getNum_placa() == IrrisoftConstantes.PLACA_MCI_4) {\n\t\t\t IR.sensores.get(i).setLectura(\"\");\n\t\t\t IR.sensores.get(i).setPulsos(-1);\n\t\t\t IR.sensores.get(i).addPropertyChangeListener(\n\t\t\t\t \"pulsos\", IR.panelecturasmci);\n\t\t\t IR.sensores.get(i).addPropertyChangeListener(\n\t\t\t\t \"lectura\", IR.panelecturasmci);\n\t\t\t}\n\t\t }\n\t\t // Aki se llama al panelecturas\n\n\t\t IR.panelecturas.setVisible(false);\n\t\t IR.panelecturasmci.getLbltitulo().setText(\"PLACA MCI 4\");\n\t\t IR.panelecturasmci.repaint();\n\t\t IR.frmIrrisoft.getContentPane().add(IR.panelecturasmci);\n\t\t IR.panelecturasmci.setVisible(true);\n\n\t\t}", "public void mouseClicked(MouseEvent e) {\n\t\t IR.panelecturasmci = Panelecturasmci.getInstance();\n\t\t // Buclo popr los sensores para añadir los listeners\n\t\t // necesarios\n\t\t for (int i = 0; i < IR.sensores.size(); i++) {\n\t\t\tif (IR.sensores.get(i).getNum_placa() == IrrisoftConstantes.PLACA_MCI_1) {\n\t\t\t IR.sensores.get(i).setLectura(\"\");\n\t\t\t IR.sensores.get(i).setPulsos(-1);\n\t\t\t IR.sensores.get(i).addPropertyChangeListener(\n\t\t\t\t \"pulsos\", IR.panelecturasmci);\n\t\t\t IR.sensores.get(i).addPropertyChangeListener(\n\t\t\t\t \"lectura\", IR.panelecturasmci);\n\t\t\t}\n\t\t }\n\t\t // Aki se llama al panelecturas\n\t\t IR.panelecturas.setVisible(false);\n\t\t IR.panelecturasmci.getLbltitulo().setText(\"PLACA MCI 1\");\n\t\t IR.panelecturasmci.repaint();\n\t\t IR.frmIrrisoft.getContentPane().add(IR.panelecturasmci);\n\t\t IR.panelecturasmci.setVisible(true);\n\n\t\t}", "@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t\t{\n\t\t\t\t\tpath = getLinkOfFoto();\n\t\t\t\t\tif(path.equals(\"\"))\n\t\t\t\t\t\treturn;\n\t\t\t\t\tactualCat.addFoto(path,actualCat.pathToImage(path));\n\t\t\t\t\tredraw(actualCat, panel);\n\t\t\t\t\t\n\t\t\t\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tITransformation selectedTransformation = transformations[transformationSelectionBox.getSelectedIndex()];\n\t\t\t\t\n\t\t\t\t// change the parameter selection panel card based on the selected transformation\n\t\t\t\tCardLayout cl = (CardLayout) (parameterSelectionPanel.getLayout());\n\t\t\t cl.show(parameterSelectionPanel, selectedTransformation.toString());\n\t\t\t\t\n\t\t\t\t// transform the image\n\t\t\t\tselectedTransformation.transform();\n\t\t\t}", "abstract void listSeleccionadas_mouseClicked(MouseEvent e);", "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}", "public void mouseClicked(MouseEvent e) {\n\t\t IR.panelecturasmci = Panelecturasmci.getInstance();\n\t\t // Buclo popr los sensores para añadir los listeners\n\t\t // necesarios\n\t\t for (int i = 0; i < IR.sensores.size(); i++) {\n\t\t\tif (IR.sensores.get(i).getNum_placa() == IrrisoftConstantes.PLACA_MCI_2) {\n\t\t\t IR.sensores.get(i).setLectura(\"\");\n\t\t\t IR.sensores.get(i).setPulsos(-1);\n\t\t\t IR.sensores.get(i).addPropertyChangeListener(\n\t\t\t\t \"pulsos\", IR.panelecturasmci);\n\t\t\t IR.sensores.get(i).addPropertyChangeListener(\n\t\t\t\t \"lectura\", IR.panelecturasmci);\n\t\t\t}\n\t\t }\n\t\t // Aki se llama al panelecturas\n\n\t\t IR.panelecturas.setVisible(false);\n\t\t IR.panelecturasmci.getLbltitulo().setText(\"PLACA MCI 2\");\n\t\t IR.panelecturasmci.repaint();\n\t\t IR.frmIrrisoft.getContentPane().add(IR.panelecturasmci);\n\t\t IR.panelecturasmci.setVisible(true);\n\n\t\t}", "private void AnnulerEffect() {\n panImg.setImg(lstImg.getSelectImg(), lstImg.getSelectTitle());\n panImg.repaint();\n }", "private void selectOptionOfPicture() {\n final CharSequence[] options = { \"Take Photo\", \"Choose from Gallery\",\"Cancel\" };\n AlertDialog.Builder builder = new AlertDialog.Builder(view.getContext());\n builder.setTitle(\"Add Photo!\");\n builder.setItems(options, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int item) {\n if (options[item].equals(\"Take Photo\"))\n {\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n startActivityForResult(intent, 1);\n }\n else if (options[item].equals(\"Choose from Gallery\"))\n {\n Intent intent = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.INTERNAL_CONTENT_URI);\n startActivityForResult(intent, 2);\n }\n else if (options[item].equals(\"Cancel\")) {\n dialog.dismiss();\n }\n }\n });\n builder.show();\n }", "public void subir_file()\n {\n FileChooser fc = new FileChooser();\n\n fc.getExtensionFilters().addAll(new FileChooser.ExtensionFilter(\"PDF Files\",\"*.pdf\")\n , new FileChooser.ExtensionFilter(\"Jpg Images\",\"*.jpg\",\"*.JPEG\",\"*.JPG\",\"*.jpeg\",\"*.PNG\",\"*.png\"));\n\n File fileSelected = fc.showOpenDialog(null);\n\n if (fileSelected!= null){\n txt_ruta.setText(fileSelected.getPath());\n\n if(txt_ruta.getText().contains(\".pdf\"))\n {\n System.out.println(\"si es pdf\");\n Image image = new Image(\"/sample/Clases/pdf.png\");\n image_esquema.setImage(image);\n\n }\n else\n {\n File file = new File(txt_ruta.getText());\n javafx.scene.image.Image image = new Image(file.toURI().toString());\n image_esquema.setImage(image);\n }\n\n }\n else{\n System.out.println(\"no se seleccinoó\");\n }\n }", "public void mouseClicked(MouseEvent e) {\n\t\t IR.panelecturasmci = Panelecturasmci.getInstance();\n\t\t // Buclo popr los sensores para añadir los listeners\n\t\t // necesarios\n\t\t for (int i = 0; i < IR.sensores.size(); i++) {\n\t\t\tif (IR.sensores.get(i).getNum_placa() == IrrisoftConstantes.PLACA_MCI_3) {\n\t\t\t IR.sensores.get(i).setLectura(\"\");\n\t\t\t IR.sensores.get(i).setPulsos(-1);\n\t\t\t IR.sensores.get(i).addPropertyChangeListener(\n\t\t\t\t \"pulsos\", IR.panelecturasmci);\n\t\t\t IR.sensores.get(i).addPropertyChangeListener(\n\t\t\t\t \"lectura\", IR.panelecturasmci);\n\t\t\t}\n\t\t }\n\t\t // Aki se llama al panelecturas\n\n\t\t IR.panelecturas.setVisible(false);\n\t\t IR.panelecturasmci.getLbltitulo().setText(\"PLACA MCI 3\");\n\t\t IR.panelecturasmci.repaint();\n\t\t IR.frmIrrisoft.getContentPane().add(IR.panelecturasmci);\n\t\t IR.panelecturasmci.setVisible(true);\n\n\t\t}", "public void mouseReleased(MouseEvent e) {\r\n ((JLabel)e.getSource()).setIcon(new ImageIcon(\"images\" + File.separator + \"notSelected.gif\")); \r\n }", "private void showImage() {\n this.animalKind = (String) imageCbox.getSelectedItem();\n try {\n ImageIcon imageIcon = new ImageIcon(getClass().getResource(\"/\" + animalKind + \"E.png\")); // load the image to a imageIcon\n Image image = imageIcon.getImage(); // transform it\n Image newImg = image.getScaledInstance(120, 120, Image.SCALE_SMOOTH); // scale it the smooth way\n imageIcon = new ImageIcon(newImg);// transform it back\n imgLabel.setIcon(imageIcon);\n this.add(imgLabel, gbc);\n\n } catch (Exception exception) {\n exception.printStackTrace();\n }\n repaint();\n }", "@Override\n public boolean onSelection(MaterialDialog dialog, View view, int which, CharSequence text) {\n if(which == 1){\n Crop.pickImage(ProductDetailActivity.this);\n }\n return true;\n }", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tif (listSelectPath.contains(listPath.get(position))) {\n\t\t\t\t\t\tlistSelectPath.remove(listPath.get(position));\n\t\t\t\t\t\tholder.img_select.setVisibility(View.GONE);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (listSelectPath.size() > mSelectNum - 1) {\n\t\t\t\t\t\t\tshowToast(\"最多选择\" + mSelectNum + \"张照片\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlistSelectPath.add(listPath.get(position));\n\t\t\t\t\t\tholder.img_select.setVisibility(View.VISIBLE);\n\t\t\t\t\t\tholder.img_select.startAnimation(mLitteAnimation);\n\t\t\t\t\t}\n\t\t\t\t}", "public VisualizadorImagemJFrame() {\n initComponents();\n \n setLocationRelativeTo(null);\n \n AbrirAction abrirAction = new AbrirAction(this);\n jMenuItemAbrir.setAction(abrirAction);\n abrirBtn.setAction(abrirAction);\n intFrameImage.setVisible(false);\n }", "@Override\n\t\tpublic void onClick(View v) { Intent galleryIntent = new Intent(Intent.ACTION_PICK,\n\t\t\t\t\tandroid.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n\n\t\t\t// Start the Intent\n\t\t\tstartActivityForResult(\n\t\t\t\t\tIntent.createChooser(galleryIntent, \"Select Picture\"), REQUEST_CODE);\n\t\t}", "public void affiche() {\n\t\tcontroller.image.repaint();\n\t}", "@Override\n public void onClick(View view) {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, \"Select Picture\"), REQUEST_IMAGE);\n }", "public static void clickrun2() {\n JFileChooser file = new JFileChooser();\n file.setCurrentDirectory(new File(System.getProperty(\"user.home\")));\n FileNameExtensionFilter filter = new FileNameExtensionFilter(\"*.images\", \"jpg\", \"png\");\n file.addChoosableFileFilter(filter);\n int result = file.showSaveDialog(null);\n if (result == JFileChooser.APPROVE_OPTION) {\n File selectedFile = file.getSelectedFile();\n String path = selectedFile.getAbsolutePath();\n lblAnhsanphamsua.setIcon(ResizeImage2(path, null));\n ImagePast2 = path;\n System.out.println(ImagePast2);\n } else {\n\n }\n }", "public void mouseClicked(MouseEvent e) {\n\t\t IR.panelecturasens = Panelecturasens.getInstance();\n\t\t // Buclo popr los sensores para añadir los listeners\n\t\t // necesarios\n\t\t for (int i = 0; i < IR.sensores.size(); i++) {\n\t\t\tif (IR.sensores.get(i).getNum_placa() == IrrisoftConstantes.PLACA_SENSORES_0) {\n\t\t\t IR.sensores.get(i).setLectura(\"\");\n\t\t\t IR.sensores.get(i).setPulsos(-1);\n\t\t\t IR.sensores.get(i).addPropertyChangeListener(\n\t\t\t\t \"pulsos\", IR.panelecturasens);\n\t\t\t IR.sensores.get(i).addPropertyChangeListener(\n\t\t\t\t \"lectura\", IR.panelecturasens);\n\t\t\t \n\t\t\t}\n\t\t }\n\n\t\t // Aki se llama al panelecturas\n\t\t IR.panelecturas.setVisible(false);\n\t\t IR.panelecturasens.repaint();\n\t\t IR.frmIrrisoft.getContentPane().add(IR.panelecturasens);\n\t\t IR.panelecturasens.setVisible(true);\n\t\t}", "private void choseImage() {\n Intent intent = new Intent(Intent.ACTION_GET_CONTENT);\n intent.setType(\"image/*\");\n\n if (intent.resolveActivity(getPackageManager()) != null) {\n startActivityForResult(intent, GALLERY_REQ_CODE);\n } else {\n Toast.makeText(this, R.string.no_image_picker, Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n public void onClick(View v) {\n\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true);\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, \"Select Picture\"), 1);\n\n }", "@FXML\n public void onBrowseButtonClick() {\n\t\tFileChooser fileChooser = new FileChooser();\n\t\tfileChooser.setTitle(\"Open\");\n\t\tfileChooser.getExtensionFilters().addAll(\n\t\t\t\tnew FileChooser.ExtensionFilter(\"Images\", \"*.jpg\", \"*.png\", \"*.jpeg\")\n\t\t);\n\n\t\t// Opens the file chooser and grabs the image the user selected\n\t\tFile file = fileChooser.showOpenDialog(root.getScene().getWindow());\n\t\tif (file == null)\n\t\t\treturn;\n\n\t\t// Saves the image in the program\n\t\tImage originalImage = new Image(file.toURI().toString());\n\t\tMain.setOriginalImage(originalImage);\n\n\t\t// Shows the path text and saves the original image in the program\n\t\toriginalImageView.setImage(originalImage);\n\n\t\t// Centers the image in the tiny space it has\n\t\tdouble imageViewOffset = originalImageView.getBoundsInParent().getWidth() / 2;\n\t\toriginalImageView.setLayoutX(128 - imageViewOffset);\n\n\t\tcreateRectifiedImage();\n\t\tshowRectifiedImage();\n\t}", "@Override\n public void onClick(View v) {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n ((MainActivity) getActivity()).startActivityForResult(\n Intent.createChooser(intent, \"Select Picture\"),\n MainActivity.GALLERY_CODE);\n\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tmIsSubCamera = true;\n\t\t\t\tDrawable subCameraDrawableSelect = getResources().getDrawable(\n\t\t\t\t\t\tR.drawable.ftp_subcamera_select);\n\t\t\t\tsubCameraDrawableSelect.setBounds(0, 0,\n\t\t\t\t\t\tsubCameraDrawableSelect.getMinimumWidth(),\n\t\t\t\t\t\tsubCameraDrawableSelect.getMinimumHeight());\n\t\t\t\tmSubCamera.setCompoundDrawables(null, subCameraDrawableSelect,\n\t\t\t\t\t\tnull, null);\n\n\t\t\t\tDrawable mainCameraDrawableNormal = getResources().getDrawable(\n\t\t\t\t\t\tR.drawable.ftp_camera_normal);\n\t\t\t\tmainCameraDrawableNormal.setBounds(0, 0,\n\t\t\t\t\t\tmainCameraDrawableNormal.getMinimumWidth(),\n\t\t\t\t\t\tmainCameraDrawableNormal.getMinimumHeight());\n\t\t\t\tmMainCamera.setCompoundDrawables(null,\n\t\t\t\t\t\tmainCameraDrawableNormal, null, null);\n\t\t\t}", "public void onClick(View v) {\n intent = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n startActivityForResult(intent, SELECTED_IMAGE);\n }", "public UsuariosSelected(Permisos u) {\n initComponents();\n this.u=u;\n setIconImage(new ImageIcon(getClass().getResource(\"/imagenes/Logo_JAR.png\")).getImage());\n this.getContentPane().setBackground(Color.RED);\n this.setLocationRelativeTo(this);\n loadData();\n \n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n // image k selection k liey requesting code jo hai upar vo 1234 hai ye dena hota hai\n startActivityForResult(Intent.createChooser(intent, \"Select Image\"), REQUEST_CODE);\n }", "@Override\n public void onClick(View v) {\n Intent i = new Intent(\n Intent.ACTION_PICK,\n android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n startActivityForResult(i , RESULT_LOAD_IMAGE);\n\n\n }", "@FXML\n public void pickOwnPicture(ActionEvent event) {\n FileChooser fc = new FileChooser();\n fc.getExtensionFilters().addAll(new FileChooser.ExtensionFilter(\"Image Files\", \"*.jpg\", \"*.png\"));\n File selectedFile = fc.showOpenDialog(null);\n\n\n if (selectedFile != null) {\n pathToFile = selectedFile.getAbsolutePath();\n ;\n Image img = new Image(selectedFile.toURI().toString());\n\n ImageView mainImageView = new ImageView(img);\n mainImageView.setPreserveRatio(true);\n mainImageView.setFitWidth(imageStackPane.getWidth());\n mainImageView.setFitHeight(imageStackPane.getHeight());\n imageStackPane.getChildren().clear();\n imageStackPane.getChildren().add(mainImageView);\n\n\n }\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, \"SELECT IMAGE\"), GALLERY_PICK);\n }", "public void OpenActionPerformed(ActionEvent evt) { \r\n\r\n //open file from file browser and display the image in the drawing panel\r\n if (jfcOpen.showOpenDialog(this) == JFileChooser.APPROVE_OPTION){\r\n //get selected image file\r\n File fileOpen = jfcOpen.getSelectedFile();\r\n \r\n //get image file path\r\n String fileName = fileOpen.toString();\r\n \r\n //set image path and display image\r\n drawingPanel.setPath(fileName); \r\n }\r\n }", "void imageChooser() {\n\n\n Intent i = new Intent();\n i.setType(\"image/*\");\n i.setAction(Intent.ACTION_GET_CONTENT);\n\n\n startActivityForResult(Intent.createChooser(i, \"Select Picture\"), SELECT_PICTURE);\n }", "private void actionViewOriginalImage ()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tint tableSize = DataController.getTable().getTableSize();\r\n\r\n\t\t\tif (tableSize != 0)\r\n\t\t\t{\r\n\t\t\t\tint imagIndex = mainFormLink.getComponentPanelLeft().getComponentComboboxFileName().getSelectedIndex();\r\n\r\n\t\t\t\t//---- Get path to the original image\r\n\t\t\t\tString filePath = DataController.getTable().getElement(imagIndex).getDataFile().getFilePath();\r\n\r\n\t\t\t\t//---- Load the image into the image viewer\r\n\t\t\t\tmainFormLink.getComponentPanelCenter().getComponentPanelImageView().displayPolygonStop();\r\n\t\t\t\tmainFormLink.getComponentPanelCenter().getComponentPanelImageView().loadImage(filePath);\r\n\r\n\t\t\t\t//---- Change button icon\r\n\t\t\t\tImageIcon iconButton = FormUtils.getIconResource(FormStyle.RESOURCE_PATH_ICO_ORIGINAL_IMAGE);\r\n\r\n\t\t\t\tmainFormLink.getComponentToolbar().getComponentButtonViewImage().setIcon(iconButton);\r\n\t\t\t\tmainFormLink.getComponentToolbar().getComponentButtonViewImage().setActionCommand(FormMainHandlerCommands.AC_VIEW_CELL);\r\n\t\t\t\tmainFormLink.getComponentToolbar().getComponentButtonViewImage().setToolTipText(\"View cells\");\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tcatch (ExceptionMessage exception)\r\n\t\t{\r\n\t\t\tExceptionHandler.processException(exception);\r\n\t\t}\r\n\t}", "public void changePic(View v){\n //Intent gallery = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.INTERNAL_CONTENT_URI);\n //startActivityForResult(gallery,PICK_IMAGE);\n new AlertDialog.Builder(ProfileModify.this)\n .setIcon(android.R.drawable.ic_dialog_alert)\n .setTitle(\"Choose\")\n .setItems(Choose, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n if(which == 0) {\n Intent iGallery = new Intent(Intent.ACTION_PICK,MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n startActivityForResult(iGallery,PICK_GALLERY);\n }\n else {\n Intent iCamera = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n if(iCamera.resolveActivity(getPackageManager()) != null){\n startActivityForResult(iCamera,REQUEST_IMAGE_CAPTURE);\n }\n }\n }\n }).create().show();\n }", "@Override\n\t\t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\t\tsplash.setVisible(false);\n\t\t\t\t\t\t\tKabasuji game = new Kabasuji();\n\t\t\t\t\t\t\tLevelSelectorView window = new LevelSelectorView(game);\n\n\t\t\t\t\t\t\t// allow controller to set up GUI based on the levels loaded by 'game'\n\t\t\t\t\t\t\tStartLevelSelectorController selectorController = new StartLevelSelectorController(window, game);\n\t\t\t\t\t\t\tselectorController.process();\n\n\t\t\t\t\t\t\t// show window\n\t\t\t\t\t\t\twindow.setVisible(true);\n\t\t\t\t\t\t\tImageIcon image = new ImageIcon(StartKabasuji.class.getResource(\"/images/heineman.jpg\"));\n\t\t\t\t\t\t\twindow.setIconImage(image.getImage().getScaledInstance(40, 40, 0));\n\t\t\t\t\t\t\tSystem.out.println(image);\t\n\t\t\t\t\t\t}", "private void change_im_tool4(int boo){\r\n if(boo == 0){ //IMAGEN SI EL USUARIO ESTA INHABILITADO\r\n im_tool4.setImage(new Image(getClass().getResourceAsStream(\"/Images/img07.png\")));\r\n }else{ //IMAGEN PARA HABILITAR AL USUARIO\r\n im_tool4.setImage(new Image(getClass().getResourceAsStream(\"/Images/img06.png\")));\r\n }\r\n }", "public void choosePicture() {\n\n Intent intent = new Intent();\n intent.setType(\"image/*\"); //inserting all images inside this Image folder\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(intent, 1);\n\n }", "public void showTexturePage(String selection, int page){\n \n ArrayList<String> idSubStages = control.getIdsSubStages(selection);\n ArrayList<String> idsTexturesOrSubMeshes = control.getIdsTexturesORSubMeshes(idSubStages.get(0));\n unCheck();\n subStageSelected = \"\";\n nifty.getScreen(stageType).findElementByName(\"panel_color\").setVisible(false);\n for(int i=page*TEXTURES_PAGE; i<control.getNumTexturesORSubMeshes(idSubStages.get(0)); i++){\n if(i<((page+1)*TEXTURES_PAGE)){\n Element image = nifty.getScreen(stageType).findElementByName(\"i\"+Integer.toString(i%TEXTURES_PAGE));\n List<Effect> effects = image.getEffects(EffectEventId.onHover,Tooltip.class);\n String idTexturesOrSubMeshes = i18nModel.getString(control.getTextTexturesORSubMeshes(idsTexturesOrSubMeshes.get(i)));\n if(idTexturesOrSubMeshes==null){\n idTexturesOrSubMeshes=control.getTextTexturesORSubMeshes(idsTexturesOrSubMeshes.get(i));\n }\n effects.get(0).getParameters().setProperty(\"hintText\",idTexturesOrSubMeshes);\n image.setVisible(true);\n ImageRenderer imager = image.getRenderer(ImageRenderer.class);\n String imagePath = control.getIconPathTexturesORSubMeshes(idsTexturesOrSubMeshes.get(i));\n if(imagePath!=null){\n imager.setImage(nifty.getRenderEngine().createImage(imagePath, false));\n }\n else{\n imager.setImage(nifty.getRenderEngine().createImage(Resources.x, false));\n }\n if (control.isChecked(idSubStages.get(0), idsTexturesOrSubMeshes.get(i))){\n nifty.getScreen(stageType).findElementByName(\"t\"+Integer.toString(i%TEXTURES_PAGE)).setVisible(true);\n subStageSelected = idSubStages.get(0);\n if(!seleccionado.containsKey(subStageSelected)){\n seleccionado.put(subStageSelected, idsTexturesOrSubMeshes.get(i));\n }\n }\n else{\n nifty.getScreen(stageType).findElementByName(\"t\"+Integer.toString(i%TEXTURES_PAGE)).setVisible(false);\n }\n }\n }\n if(seleccionado.containsKey(subStageSelected)){\n if(!(control.getTextureType(seleccionado.get(subStageSelected)) == TexturesMeshType.simpleTexture)){\n nifty.getScreen(stageType).findElementByName(\"panel_color\").setVisible(true);\n }\n else{\n nifty.getScreen(stageType).findElementByName(\"panel_color\").setVisible(false);\n }\n }\n else{\n nifty.getScreen(stageType).findElementByName(\"panel_color\").setVisible(false);\n }\n for(int i=control.getNumTexturesORSubMeshes(idSubStages.get(0));i<((page+1)*TEXTURES_PAGE);i++){\n Element image = nifty.getScreen(stageType).findElementByName(\"i\"+Integer.toString(i%TEXTURES_PAGE));\n image.setVisible(false);\n }\n if(page > 0){\n nifty.getScreen(stageType).findElementByName(\"leftT\").setVisible(true);\n }\n else{\n nifty.getScreen(stageType).findElementByName(\"leftT\").setVisible(false);\n }\n if((((double)control.getNumTexturesORSubMeshes(idSubStages.get(0))/(double)TEXTURES_PAGE) - page) > 1){\n nifty.getScreen(stageType).findElementByName(\"rightT\").setVisible(true);\n }\n else{\n nifty.getScreen(stageType).findElementByName(\"rightT\").setVisible(false);\n }\n }", "@Override\n public void onClick(View v) {\n Intent photoPickerIntent = new Intent(Intent.ACTION_PICK);\n photoPickerIntent.setType(\"image/*\");\n startActivityForResult(photoPickerIntent, SELECT_PHOTO);\n }", "@Override\n public void onClick(View v) {\n\n Intent intent = new Intent( Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n intent.setType(\"image/*\");\n startActivityForResult(Intent.createChooser(intent, \"Select File\"), 1);\n }", "@Override\r\n public void actionPerformed(ActionEvent e) {\n state = \"select\";\r\n instruction.setText(\"Drag the rectangle to cover the whole shape which you want to select\");\r\n\r\n }", "@Override\n public void onClick(View v) {\n Intent camIntent = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n\n camIntent.setType(\"image/*\");\n startActivityForResult(camIntent,CAMERA_REQUEST);\n }", "public GUIPanelInicio() {\n initComponents();\n \n imagenP.setIcon(new ImageIcon(this.getClass().getResource(\"/img/principal2.png\")));\n }", "@FXML\r\n public void imageButtonClicked() {\r\n File file = fileChooser.showOpenDialog(viewHandler.getPrimaryStage());\r\n if (file != null) {\r\n try {\r\n viewModel.setImageurl(ImageConverter.ImageToByte(file));\r\n Image img = new Image(new ByteArrayInputStream(viewModel.getImageurl()));\r\n dogPicture.setFill(new ImagePattern(img));\r\n } catch (FileNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }" ]
[ "0.7346808", "0.71275276", "0.7090085", "0.6854198", "0.6842203", "0.65968204", "0.65777797", "0.6554698", "0.6541349", "0.6490208", "0.648607", "0.6462752", "0.63823986", "0.6380165", "0.6378832", "0.6370132", "0.63042545", "0.6270208", "0.6261555", "0.6214825", "0.62146616", "0.62098813", "0.62086767", "0.61901724", "0.61875296", "0.6176935", "0.6172055", "0.61370844", "0.6130488", "0.6121157", "0.61209583", "0.61160374", "0.6109178", "0.6101964", "0.60705686", "0.6068723", "0.60603696", "0.60585594", "0.6057283", "0.60563624", "0.6052723", "0.60396546", "0.6012536", "0.60125184", "0.60031843", "0.6001805", "0.59995574", "0.5995499", "0.5991082", "0.59901077", "0.5984829", "0.59822893", "0.59759307", "0.5969983", "0.596856", "0.5966486", "0.5961747", "0.59606665", "0.59567654", "0.5952077", "0.5951191", "0.5936324", "0.5929184", "0.5906002", "0.59049845", "0.58971626", "0.5886082", "0.588409", "0.5856564", "0.58448535", "0.58391035", "0.583313", "0.58321285", "0.5828602", "0.5825078", "0.5819723", "0.5814923", "0.58095807", "0.5806651", "0.58045673", "0.5797534", "0.57968915", "0.579681", "0.5788011", "0.5787161", "0.57863146", "0.5784399", "0.5782703", "0.5779144", "0.57696295", "0.57627887", "0.5762351", "0.575844", "0.5755433", "0.575233", "0.5751435", "0.575096", "0.5748586", "0.574594", "0.5744599", "0.57331306" ]
0.0
-1
Se quitan los datos de la imagen seleccionada
public void vaciarImagenGrande() { labelImagenGrande.setIcon(null); labelNombre.setText(""); labelFecha.setText(""); labelResolucion.setText(""); labelPeso.setText(""); panelImagenEtiquetas.removeAll(); resultadosEste.revalidate(); resultadosEste.repaint(); //TODO comprobar si es necesario quitar la referencia de imagenTempActual }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void cambiarEstadoImagen(){\n ImageIcon respuesta=new ImageIcon();\n if(oportunidades==0){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado7.jpg\"));\n }\n if(oportunidades==1){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado6.jpg\"));\n }\n if(oportunidades==2){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado5.jpg\"));\n }\n if(oportunidades==3){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado4.jpg\"));\n }\n if(oportunidades==4){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado3.jpg\"));\n }\n if(oportunidades==5){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado2.jpg\"));\n }\n if(oportunidades==6){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado1.jpg\"));\n }\n if(oportunidades==7){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado0.jpg\"));\n }\n this.imgAhorcado=respuesta; \n }", "public void rellenaImagen()\n {\n rellenaDatos(\"1\",\"Samsung\", \"cv3\", \"blanco\" , \"50\", 1200,2);\n rellenaDatos(\"2\",\"Samsung\", \"cv5\", \"negro\" , \"30\", 600,5);\n }", "public void selectImages()\n {\n Log.d(TAG, \"selectImages\");\n BSImagePicker multiPicker = null;\n\n multiPicker = new BSImagePicker.Builder(FILE_PROVIDER)\n .isMultiSelect()\n .setMultiSelectBarBgColor(android.R.color.background_dark)\n .setMultiSelectTextColor(R.color.primary_text)\n .setMultiSelectDoneTextColor(android.R.color.white)\n .setSpanCount(NUMBER_OF_COLUMNS)\n .build();\n\n multiPicker.show(this.fragmentActivity.getSupportFragmentManager(), \"Image picker\");\n }", "private void botaoImagemClienteMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_botaoImagemClienteMouseClicked\n\n // Instancia seletor de arquivo.\n JFileChooser arquivo = new JFileChooser();\n\n // Insere filtro para png e jgp.\n arquivo.setFileFilter(filtro);\n\n // Inicia variavel para parametrizar imagem.\n BufferedImage img;\n\n // Variavel para receber imagem.\n Icon novaImg = null;\n\n // Parametro para seletor selecionar somente o pre determinado\n arquivo.setAcceptAllFileFilterUsed(false);\n\n // Instancia seletor no frame.\n arquivo.showOpenDialog(painelCadastrarCliente);\n\n // Titulo.\n arquivo.setDialogTitle(\"Escolha imagem: extensao jpg e png\");\n\n // Impede mais de uma selecao.\n arquivo.setMultiSelectionEnabled(true);\n\n // Se alguma imagem for selecionada.\n if (arquivo.getSelectedFile() != null) {\n\n // Verifica erro de Io\n try {\n\n // Parametriza a dimensao de imagem.\n int largura = 161, altura = 158;\n\n // Recebe arquivo selecionado.\n img = ImageIO.read(arquivo.getSelectedFile());\n\n // Recebe imagem parametrizada.\n novaImg = new ImageIcon(img.getScaledInstance(largura, altura,\n java.awt.Image.SCALE_SMOOTH));\n\n // Insere imagem na tela por um label.\n imgCaminho = arquivo.getSelectedFile().getAbsolutePath();\n\n } catch (IOException ex) {\n\n // Mensagem de erro.\n JOptionPane.showMessageDialog(null, \"Erro na imagem\", \"Erro\", JOptionPane.ERROR);\n\n }\n\n // Substitui label por imagem.\n imagemCliente.setIcon(novaImg);\n imagemCliente.setVisible(true);\n\n }\n }", "void selectImage(String path);", "public void cargarImagenes() {\n try {\n\n variedad = sp.getString(\"variedad\", \"\");\n gDia = sp.getFloat(\"gDia\", 0);\n dia = sp.getInt(\"dia\", 0);\n idVariedad = sp.getLong(\"IdVariedad\", 0);\n idFinca = sp.getLong(\"IdFinca\",0);\n\n\n\n imageAdmin iA = new imageAdmin();\n List<fenologiaTab> fi = forGradoloc(dia, gDia, idVariedad);\n\n path = getExternalFilesDir(null) + File.separator;\n String path2 = \"/storage/emulated/0/Pictures/fenologias/\"+idFinca+\"/\";\n\n iA.getImage(path2,jpgView1, idVariedad, fi.get(0).getImagen());\n datos(txt1, fi.get(0).getDiametro_boton(), fi.get(0).getLargo_boton(), fi.get(0).getGrados_dia(), fi.get(0).getImagen());\n\n iA.getImage(path2,jpgView2, idVariedad, fi.get(1).getImagen());\n datos(txt2, fi.get(1).getDiametro_boton(), fi.get(1).getLargo_boton(), fi.get(1).getGrados_dia(), fi.get(1).getImagen());\n\n iA.getImage(path2,jpgView3, idVariedad, fi.get(2).getImagen());\n datos(txt3, fi.get(2).getDiametro_boton(), fi.get(2).getLargo_boton(), fi.get(2).getGrados_dia(), fi.get(2).getImagen());\n\n iA.getImage(path2,jpgView4, idVariedad, fi.get(3).getImagen());\n datos(txt4, fi.get(3).getDiametro_boton(), fi.get(3).getLargo_boton(), fi.get(3).getGrados_dia(), fi.get(3).getImagen());\n } catch (Exception e) {\n Toast.makeText(getApplicationContext(), \"Error \\n\" + e, Toast.LENGTH_LONG).show();\n }\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == REQUEST_CODE_PICKER && resultCode == RESULT_OK && data != null) {\n images = data.getParcelableArrayListExtra(ImagePickerActivity.INTENT_EXTRA_SELECTED_IMAGES);\n if (images.size() > 0){\n imgButtonAddCustomerImage.setImageBitmap(BitmapFactory.decodeFile(images.get(0).getPath()));\n }\n }\n }", "public void seleccionarPieza(java.awt.event.MouseEvent evt) {\n // Se pasa como parametro el evento\n CuadroPieza t = ((CuadroPieza) evt.getComponent());//Averiguo en que cuadro sucedio el evento\n if (t.getPieza() != null) {//Veo si el cuadro no esta vacio.\n if (t.getPieza().getColor() == getTurno()) {//Veo si es del mismo color del turno que actualmente le toca.\n cuadroSeleccionado = t;\n /*\n * Con esto hago que se resalten los posibles movimientos en todo el tablero.\n */\n for (int x = 0; x < 8; x++) {\n for (int y = 0; y < 8; y++) {\n tablero[x][y].opacarPieza();//Si hay piezas seleccionadas, las opaco\n if (isSeleccionarAlternativas()) {//Resalto los posibles movimientos.\n if (cuadroSeleccionado.getPieza().validarMovimiento(tablero[x][y], this)) {\n tablero[x][y].resaltarPieza(tablero[x][y].getPieza() != null ? getAlerta() : null);\n }\n }\n }\n }\n /*\n * Resalto el cuadro que ha sido seleccionado para que el usuario sepa que cuadro selecciono\n */\n cuadroSeleccionado.resaltarPieza(getSeleccionado());\n /*\n * Establesco la imagen de la pieza que ha sido seleccionada al label.\n */\n tmp.setIcon(cuadroSeleccionado.getPieza().getImagenPieza());\n /*\n * borro la imagen de la pieza del cuadro.\n */\n cuadroSeleccionado.lbl.setIcon(null);\n /*\n * Establesco la nueva posicion del label, que tiene la imagen de la pieza.\n */\n tmp.setLocation(cuadroSeleccionado.getLocation().x + evt.getX() - 18, cuadroSeleccionado.getLocation().y + evt.getY() - 28);\n }\n }\n }", "@Override\n\tpublic void mouseClicked(MouseEvent ev) {\n\t\tif(ev.getSource() instanceof PanelImagenRes) {\n\t\t\tcambiarImagenGrande(((PanelImagenRes)ev.getSource()).getImagenTemp());\n\t\t\timagenTempSeleccionada = ((PanelImagenRes)ev.getSource()).getImagenTemp();\n\t\t}\n\t\t\n\t}", "BufferedImage getSelectedImage();", "@Override\n protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == CODIGO_DE_SOLICITUD_IMAGEN\n && resultCode == RESULT_OK\n && data!=null\n && data.getData() != null){\n\n RutaArchivoUri = data.getData();\n try {\n //Convertimos a bitmap\n Bitmap bitmap = MediaStore.Images.Media.getBitmap(getContentResolver(),RutaArchivoUri);\n //seteamos la imagen\n ImagenAgregarSerie.setImageBitmap(bitmap);\n\n }catch (Exception e){\n Toast.makeText(this, \"\"+e.getMessage(), Toast.LENGTH_SHORT).show();\n\n }\n }\n }", "public void cargarimagen(){\n Intent intent= new Intent(Intent.ACTION_GET_CONTENT, MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n intent.setType(\"image/*\");\n startActivityForResult(intent.createChooser(intent,\"Seleccione la imagen\"),69);\n }", "public void subir_file()\n {\n FileChooser fc = new FileChooser();\n\n fc.getExtensionFilters().addAll(new FileChooser.ExtensionFilter(\"PDF Files\",\"*.pdf\")\n , new FileChooser.ExtensionFilter(\"Jpg Images\",\"*.jpg\",\"*.JPEG\",\"*.JPG\",\"*.jpeg\",\"*.PNG\",\"*.png\"));\n\n File fileSelected = fc.showOpenDialog(null);\n\n if (fileSelected!= null){\n txt_ruta.setText(fileSelected.getPath());\n\n if(txt_ruta.getText().contains(\".pdf\"))\n {\n System.out.println(\"si es pdf\");\n Image image = new Image(\"/sample/Clases/pdf.png\");\n image_esquema.setImage(image);\n\n }\n else\n {\n File file = new File(txt_ruta.getText());\n javafx.scene.image.Image image = new Image(file.toURI().toString());\n image_esquema.setImage(image);\n }\n\n }\n else{\n System.out.println(\"no se seleccinoó\");\n }\n }", "private void btnModificarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnModificarActionPerformed\n if(libCancion.getSelectedIndex()<0){\n \n }\n else{\n int a = libCancion.getSelectedIndex();\n modificar = new modificarInfo();\n modificar.setVisible(true);\n modificar.btn.getModel().setEnabled(true);\n modificar.btn.addActionListener(new ActionListener(){\n public void actionPerformed(ActionEvent evt){\n \n String artista = modificar.txtArtista.getText();\n String album = modificar.txtAlbum.getText();\n String genero = modificar.txtGenero.getText();\n cancion.modificarCancion(a, artista, album, genero);\n modificar.lblCorrecto.setText(\"Se ha modificado\");\n libCancion.setModel(lista);\n }\n \n \n \n \n });\n imagen=null;\n modificar.subir.setEnabled(true);\n modificar.subir.addActionListener(new ActionListener(){\n public void actionPerformed(ActionEvent evt){\n int status = fileChooser.showOpenDialog (null);\n if (status == JFileChooser.APPROVE_OPTION){\n File selectedFile = fileChooser.getSelectedFile();\n imagen = selectedFile.getAbsolutePath();\n System.out.println(imagen);\n cancion.subirImagen(a, imagen);\n \n \n }\n \n else{ \n if (status == JFileChooser.CANCEL_OPTION){\n System.out.println(\"CANCELAR\");\n }\n cancion.subirImagen(a, imagen);\n \n \n }\n }\n });\n }\n }", "public SeleccionarRancho() {\n setExtendedState(JFrame.MAXIMIZED_BOTH);\n initComponents();\n Image i = null;\n i = Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"/resources/logo tru-test.png\"));\n setIconImage(i);\n // setLocationRelativeTo(null);\n ranchoSelector1.cargar();\n jPanel2.setOpaque(false);\n cargarcomponentes();\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n switch (requestCode){\n case Ubicacion.REQUEST_CODE:\n if(resultCode== Activity.RESULT_OK && data!=null)\n {\n //Uri de imagenes guardadas en filePaths\n filePaths = new ArrayList<>();\n filePaths.addAll(data.getStringArrayListExtra(FilePickerConst.KEY_SELECTED_MEDIA));\n tvNumeroImagen.setText(String.valueOf(filePaths.size()) + \" \" + getString(R.string.promocionesDisponibilidad_num_imagenes)) ;\n }\n break;\n }\n }", "private void setImage(){\n if(objects.size() <= 0)\n return;\n\n IImage img = objects.get(0).getImgClass();\n boolean different = false;\n \n //check for different images.\n for(IDataObject object : objects){\n IImage i = object.getImgClass();\n \n if((img == null && i != null) || \n (img != null && i == null)){\n different = true;\n break;\n }else if (img != null && i != null){ \n \n if(!i.getName().equals(img.getName()) ||\n !i.getDir().equals(img.getDir())){\n different = true;\n break;\n }\n } \n }\n \n if(!different){\n image.setText(BUNDLE.getString(\"NoImage\"));\n if(img != null){\n imgName = img.getName();\n imgDir = img.getDir();\n image.setImage(img.getImage());\n }else{\n image.setImage(null);\n }\n }else{\n image.setText(BUNDLE.getString(\"DifferentImages\"));\n }\n \n image.repaint();\n }", "public void mostraImagemBD(String titulo) throws SQLException {\n PreparedStatement s = conexao.prepareStatement(\"SELECT * FROM dados WHERE titulo='\" + titulo + \"'\");\n ImageIcon imageIcon = null;\n ImageIcon imageIcon2 = null;\n ResultSet resultado = s.executeQuery();\n if (resultado.next()) {\n String q = resultado.getString(9);\n // System.out.println(q);\n Blob blob = resultado.getBlob(10);\n imageIcon = new ImageIcon(blob.getBytes(1, (int) blob.length()));\n }\n resultado = s.executeQuery();\n if (resultado.next()) {\n // System.out.println(\"OI\");\n String q = resultado.getString(11);\n // System.out.println(q);\n Blob blob = resultado.getBlob(12);\n imageIcon2 = new ImageIcon(blob.getBytes(1, (int) blob.length()));\n }\n\n JFrame j = new JFrame();\n JPanel p = new JPanel(null);\n JLabel l = new JLabel(imageIcon);\n JLabel l2 = new JLabel(imageIcon2);\n l.setBounds(100, 100, 100, 100);\n l2.setBounds(250, 100, 100, 100);\n p.add(l);\n p.add(l2);\n p.revalidate();\n p.repaint();\n j.add(p);\n j.setVisible(true);\n j.setSize(500, 500);\n j.setLocationRelativeTo(null);\n j.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n // try {\n // Thread.sleep(2000);\n // } catch (InterruptedException ex) {\n // Logger.getLogger(InterfaceGrafica.class.getName()).log(Level.SEVERE, null, ex);\n // }\n // j.dispose();\n }", "private void init()\n {\n btnTomarFotos = findViewById(R.id.imgbtnTomarFotosCP);\n btnSeleccionarFoto = findViewById(R.id.imgbtnBuscarFotosV);\n imgFotoMascota = findViewById(R.id.imgCreacionPerfiles);\n agregarEspecie = findViewById(R.id.imgbtnAgregarNuevaEspecie2);\n agregarRaza = findViewById(R.id.imgbtnAgregarNuevaRaza);\n spiEspecie = findViewById(R.id.spiEspecie);\n spiRaza = findViewById(R.id.spiRaza);\n edtFechaNaciento=findViewById(R.id.edtFechaNacimiento);\n rbtnHembra=findViewById(R.id.rbHembra);\n rbtnMacho = findViewById(R.id.rbMacho);\n rbgGrupoGenero =findViewById(R.id.rbgGrupoGenero);\n edtNombreMascota= findViewById(R.id.edtNombreMascota);\n rbtnMacho.setSelected(true);\n metodosImagenes =new MetodosImagenes(this);\n btnGuardar = findViewById(R.id.btnGuardarCP);\n edtNumeroChip =findViewById(R.id.edtNumeroChip);\n especie = \"\";\n fechaHora = new DateTime();\n\n arrayNombreRazas = new ArrayList<>();\n arrayNombreEspecies = new ArrayList<>();\n\n /** Se obtiene una instancia de la base de datos*/\n instanciaDB = SingletonDB.getDatabase(this);\n\n\n /** Se asigna al Spinner de raza un evento de escucha, un array con la list**/\n spiRaza.setOnItemSelectedListener(this);\n arrayNombreRazas.add(\"Seleccione raza\");\n startSpinnerValues(spiRaza,arrayNombreRazas,adaptadorRaza);\n\n /** Se asigna al Spinner de especie un evento de escucha, ademas se le agrega un adaptador con **/\n spiEspecie.setOnItemSelectedListener(this);\n arrayNombreEspecies.add(\"Seleccione especie\");\n startSpinnerValues(spiEspecie,arrayNombreEspecies,adaptadorEspecie);\n\n\n /**Obtemos datos del Intent y determinamos si es una actualizacion o una insercion, estos valores se optienen con el */\n intentValues= getIntent();\n accion=intentValues.getIntExtra(Constantes.TAG_ACCION,Constantes.GUARDAR);\n if(accion==Constantes.GUARDAR){\n disableSpinnerAndButton(spiRaza,agregarRaza);\n //Se carga la fecha por defecto que es la fecha actual\n dia=DateTime.diaDelMes;\n mes=DateTime.mes;\n anio=DateTime.anio;\n /**Asignamos una foto de perfil por defecto*/\n Glide.with(this)\n .load(R.drawable.default_credencial)\n .into(imgFotoMascota);\n }\n\n /** Acciones a realizar si se la opcion es actualizar*/\n else if(accion==Constantes.ACTUALIZAR)\n {\n\n /** Si es una actualización se debe parsear la fecha guadarda previamente para colocarla en variables de fecha\n * para dar formato y tomarla como fecha de refeencia*/\n String [] fecha=intentValues.getStringExtra(Constantes.TAG_FECHA_NACIENTO).split(\"-\");\n dia=Integer.parseInt(fecha[0]);\n mes= Integer.parseInt(fecha[1]);\n anio=Integer.parseInt(fecha[2]);\n /**Se valida si al actualizar tenia una foto, ser asi se muestra, de lo contrario se carga una imagen por defecto*/\n if(!intentValues.getStringExtra(Constantes.TAG_IMG_PATH).equals(\"\"))\n {\n File filePhoto = new File(metodosImagenes.getRootPath()+\"/\"\n +MetodosImagenes.PET_FOLDER+\"/\"+\n intentValues.getStringExtra(Constantes.TAG_IMG_PATH));\n Glide.with(this)\n .load(filePhoto)\n .into(imgFotoMascota);\n }\n else\n {\n /**Asignamos una foto de perfil por defecto*/\n Glide.with(this)\n .load(R.drawable.default_credencial)\n .into(imgFotoMascota);\n }\n\n\n\n /** Se optiene el nombre del genero y se valida para seleccionar el radio button Correcto\n * */\n String genero = instanciaDB.getGeneroDAO().\n getGenderById(intentValues.getIntExtra(Constantes.TAG_GENERO,Constantes.DEFAULT));\n if (genero.equals(\"Hembra\")) {\n rbgGrupoGenero.check(R.id.rbHembra);\n } else {\n rbgGrupoGenero.check(R.id.rbMacho);\n }\n\n edtNombreMascota.setText(intentValues.getStringExtra(Constantes.TAG_NOMBRE));\n edtNumeroChip.setText(intentValues.getStringExtra(Constantes.TAG_NUMERO_CHIP));\n\n /** Se optiene en nombre de la especie para seleccionarlo en el Spinner de especie, ya que este es\n * el valor guardado por el usuario*/\n raza= instanciaDB.getRazaDAO()\n .getNameRazaById(intentValues.getIntExtra(Constantes.TAG_RAZA,Constantes.DEFAULT));\n\n /** Se obtiene el nombre de la raza para seleccionarlo en el Spinner*/\n especie = instanciaDB.getSpeciesDAO()\n .getNameSpecieById(intentValues.getIntExtra(Constantes.TAG_ESPECIE,Constantes.DEFAULT));\n\n }\n edtFechaNaciento.setText(fechaHora.formatoFecha(dia,mes,anio));\n\n }", "protected void carregaImagens() {\n Handler carregaImagensHandler = new Handler();\n\n // Envia a Runnable ao Handler simulando um carregamento assincrono depois de 1 segundo\n carregaImagensHandler.postDelayed(new Runnable() {\n public void run() {\n // Carregando primeira imagem\n ImageView altaIV = findViewById(R.id.iv_alta);\n altaIV.setImageResource(R.drawable.android_verde);\n\n // Carregando primeira imagem\n ImageView baixaIV = findViewById(R.id.iv_baixa);\n baixaIV.setImageResource(R.drawable.android_preto);\n }\n }, 1000);\n }", "public void picLoader() {\n if (num==0){\n image.setImageResource(R.drawable.mario);\n }\n if(num==1){\n image.setImageResource(R.drawable.luigi);\n }\n if(num==2){\n image.setImageResource(R.drawable.peach);\n }\n if(num==3){\n image.setImageResource(R.drawable.rosalina);\n }\n }", "public void cambiarImagenGrande(ImagenTemp it) {\n\t\t\n\t\t//TODO automatizar haciendo que el método directamente coloque la imagen escalada en el panel?\n\t\tImage imgtemp = VistaPrincipal.ponerImagenEscalada(it.getbImagen(), panelImagenGrande);\n\t\tlabelImagenGrande.setIcon(new ImageIcon(imgtemp));\n\t\tlabelImagenGrande.setBounds((int)(((float)panelImagenGrande.getWidth()/2) - ((float)imgtemp.getWidth(null))/((float)2)), (int)(((float)panelImagenGrande.getHeight()/2) - ((float)imgtemp.getHeight(null))/((float)2)),imgtemp.getWidth(null), imgtemp.getHeight(null));\n\t\t\n\t\t\n\t\t//Se rellenan los datos de la imagen seleccionada\n\t\tlabelNombre.setText(it.getNombre()+it.getExtension());\n\t\t\n\t\tLocalDate localDate = LocalDate.ofEpochDay(it.getFecha()/(1000*60*60*24));//TODO llevar esto a un método estático de VistaPrincipal si se repite\n\t\tlabelFecha.setText(localDate.getDayOfMonth() + \"/\" + localDate.getMonthValue() + \"/\" + localDate.getYear());\n\t\t\n\t\tlabelResolucion.setText(it.getbImagen().getWidth() + \" x \" + it.getbImagen().getHeight());\n\t\t\n\t\tString peso = it.getImagen().length()/1024 < 1000 ? (float)(it.getImagen().length()/1024) + \" kB\" : (int)(it.getImagen().length()/(1024*1024)) + \" MB\";\n\t\tlabelPeso.setText(peso);\n\t\t\n\t\t\n\t\t//Se rellenan las etiquetas\n\t\tpanelImagenEtiquetas.removeAll();\n\t\tfor(Etiquetas e : it.getArrayEtiquetas()) panelImagenEtiquetas.add(e);\n\t\tresultadosEste.revalidate();\n\t\tresultadosEste.repaint();\n\t\t\n\t}", "@Override\n public void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n //O sea que, la accion que ejecuta el usuario es igual a seleccionar una imagen de la galeria\n // Y \"&&\" que la seleccion de la imagen se hizo bien\n if (requestCode == CODIGO_GALERIA && resultCode == RESULT_OK);\n try {\n //Esto nos va transformar la URI en este archivo que esta aqui colocado.\n ArchivoImagen = UtilidadFile.from(this,data.getData());\n //Para que la imagen cargue en uno de los recuadros de la interfaz grafica se hara\n //esta implementacion en la cual recibe la ruta de la imagen.\n imgpost1.setImageBitmap(BitmapFactory.decodeFile(ArchivoImagen.getAbsolutePath()));\n }catch (Exception ex){\n Log.d(\"ERROR\", \"Ha ocurrido un error \"+ ex.getMessage());\n }\n }", "private void guardarFoto() {\n if (foto != null && is != null) {\n\n Image foto_Nueva;\n foto_Nueva = foto.getScaledInstance(frmPersona.getLblFoto().getWidth(), frmPersona.getLblFoto().getHeight(), Image.SCALE_SMOOTH);\n frmPersona.getLblFoto().setIcon(new ImageIcon(foto_Nueva));\n cancelarFoto();\n ctrFrmPersona.pasarFoto(is);\n } else {\n JOptionPane.showMessageDialog(vtnWebCam, \"Aun no se a tomado una foto.\");\n }\n\n }", "@Override\n public void actionPerformed(ActionEvent ae) \n {\n if (ae.getSource().equals(Imagen1)) \n {\n ImagenProductoPrincipal.setIcon(new ImageIcon(productoPrincipal.getImagenesEnBuffer()[0]\n .getScaledInstance(ImagenProductoPrincipal.getWidth(), \n ImagenProductoPrincipal.getHeight(), \n java.awt.Image.SCALE_DEFAULT)));\n }\n else if (ae.getSource().equals(Imagen2)) \n {\n ImagenProductoPrincipal.setIcon(new ImageIcon(productoPrincipal.getImagenesEnBuffer()[1]\n .getScaledInstance(ImagenProductoPrincipal.getWidth(), \n ImagenProductoPrincipal.getHeight(), \n java.awt.Image.SCALE_DEFAULT)));\n }\n else if (ae.getSource().equals(Imagen3)) \n {\n ImagenProductoPrincipal.setIcon(new ImageIcon(productoPrincipal.getImagenesEnBuffer()[2]\n .getScaledInstance(ImagenProductoPrincipal.getWidth(), \n ImagenProductoPrincipal.getHeight(), \n java.awt.Image.SCALE_DEFAULT)));\n }\n else if (ae.getSource().equals(Imagen4)) \n {\n ImagenProductoPrincipal.setIcon(new ImageIcon(productoPrincipal.getImagenesEnBuffer()[3]\n .getScaledInstance(ImagenProductoPrincipal.getWidth(), \n ImagenProductoPrincipal.getHeight(), \n java.awt.Image.SCALE_DEFAULT)));\n }\n \n else if (ae.getSource().equals(Agregar)) \n {\n if(cantidadDeProductos < productoPrincipal.getExistencias())\n {\n cantidadDeProductos++;\n Cantidad.setText(String.valueOf(cantidadDeProductos));\n }\n }\n \n else if (ae.getSource().equals(Quitar)) \n {\n if(cantidadDeProductos > 1)\n {\n cantidadDeProductos--;\n Cantidad.setText(String.valueOf(cantidadDeProductos));\n }\n }\n \n else if (ae.getSource().equals(AgregarAlaCesta)) \n {\n productosCesta.add(new ProductoCompra(productoPrincipal, cantidadDeProductos));\n mostrarCesta();\n }\n \n else if (ae.getSource().equals(EliminarCesta)) \n {\n eliminarDeLaCesta();\n mostrarCesta();\n }\n else if (ae.getSource().equals(SiguientesProductos)) \n {\n posProductos++;\n if(posProductos < anilloProductos)\n { \n this.setProductos(posProductos * NUMPRODUCTOS, (posProductos + 1) * NUMPRODUCTOS);\n }\n else if(posProductos == anilloProductos && residuoProductos > 0)\n {\n this.setProductos(posProductos * NUMPRODUCTOS, lp.getSize()); \n }\n else\n {\n posProductos--; \n }\n }\n else if (ae.getSource().equals(AnterioresProductos)) \n {\n posProductos--;\n if(posProductos > -1)\n { \n this.setProductos(posProductos * NUMPRODUCTOS, (posProductos + 1) * NUMPRODUCTOS);\n }\n else\n {\n posProductos++; \n }\n }\n else if (ae.getSource().equals(SiguientesCategorias)) \n {\n posCategorias++;\n if(posCategorias < anilloCategorias)\n { \n this.setCategorias(posCategorias * NUMCATEGORIAS, (posCategorias + 1) * NUMCATEGORIAS);\n }\n else if(posCategorias == anilloCategorias && residuoCategorias > 0)\n {\n this.setCategorias(posCategorias * NUMCATEGORIAS, lc.getSize()); \n }\n else\n {\n posCategorias--; \n }\n \n }\n else if (ae.getSource().equals(AnterioresCategorias)) \n {\n posCategorias--;\n if(posCategorias > -1)\n { \n this.setCategorias(posCategorias * NUMCATEGORIAS, (posCategorias + 1) * NUMCATEGORIAS);\n }\n else\n {\n posCategorias++; \n }\n }\n \n else if(ae.getSource().equals(ComprarTodo))\n {\n if (productosCesta.size() > 0) {\n DialogoCompra dialog = null;\n try {\n dialog = new DialogoCompra(new javax.swing.JFrame(), true, productosCesta, ois, oos);\n } catch (IOException ex) {\n Logger.getLogger(VistaCliente.class.getName()).log(Level.SEVERE, null, ex);\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(VistaCliente.class.getName()).log(Level.SEVERE, null, ex);\n }\n /*\n dialog.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);\n dialog.addWindowListener(new java.awt.event.WindowAdapter() {\n @Override\n public void windowClosing(java.awt.event.WindowEvent e) {\n \n }\n });\n*/\n dialog.setVisible(true);\n }\n else\n {\n UIFunctions.informationMessage(\"No has seleccionado productos\", \"CML Express\");\n }\n }\n \n int i = 0;\n for(i = 0; i < NUMPRODUCTOS; i++)\n {\n if(productos[i] != null)\n {\n if(ae.getSource().equals(productos[i]))\n {\n this.setProductoPrincipal(producto[i]);\n }\n }\n }\n \n for(i = 0; i < NUMCATEGORIAS; i++)\n {\n if(categorias[i] != null)\n {\n if(ae.getSource().equals(categorias[i]))\n {\n try {\n lp = AdministradorDeOperaciones.obtenerProductosDeUnaCategoria(oos, ois, \n categoria[i].getRuta());\n this.anilloProductos = (short) (lp.getSize() / NUMPRODUCTOS);\n this.residuoProductos = (short) (lp.getSize() % NUMPRODUCTOS);\n \n \n setProductos( 0, NUMPRODUCTOS < lp.getSize() ? NUMPRODUCTOS : lp.getSize());\n if(lp.getSize() > 0)\n setProductoPrincipal(lp.get(0));\n } catch (IOException ex) {\n Logger.getLogger(VistaCliente.class.getName()).log(Level.SEVERE, null, ex);\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(VistaCliente.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }\n }\n }\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}", "@Override\n public void actionPerformed(ActionEvent e) {\n JFileChooser fc = new JFileChooser(); \n int returnVal = fc.showOpenDialog(null);\n if (returnVal == JFileChooser.APPROVE_OPTION) {\n File file = fc.getSelectedFile();\n System.out.println(file.getAbsolutePath()); \n image = loadImage( file);\n }\n }", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n switch (requestCode) {\n case SELECT_PHOTO:\n if (resultCode == RESULT_OK) {\n // imABoolean=true;\n try {\n filePath = data.getData();\n bitmap = MediaStore.Images.Media.getBitmap(getActivity().getContentResolver(), filePath);\n\n logo.setImageBitmap(bitmap);\n\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n break;\n }\n }\n\n\n }", "public void seleccionarFotoPerfil(View v) {\n //Crea un Intent\n Intent intent = new Intent();\n //con intent.setType(\"image/*\") indicamos que en la nueva actividad solo se mostraran imagenes\n intent.setType(\"image/*\");\n //Muestra contenido que el usuario puede escoger, y que devolvera una URI resultante\n intent.setAction(Intent.ACTION_GET_CONTENT);\n //Inicia una nueva actividad que mostrara el seleccionador de imagenes\n startActivityForResult(Intent.createChooser(intent, \"Select Picture\"), PICK_IMAGE_REQUEST);\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent i = new Intent(\n\t\t\t\t\t\tIntent.ACTION_PICK,\n\t\t\t\t\t\tandroid.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n\t\t\t\tstartActivityForResult(i, RESULT_LOAD_IMAGE);\n\n\t\t\t refreshResult();\n\t\t\t LeftEdge.setImageResource(R.drawable.left_edgeicon);\n\t\t\t RightEdge.setImageResource(R.drawable.right_edgeicon);\n\t\t\t// ChannelCheck0.setImageResource(R.drawable.control);\n\t\t\t \n\t\t\t}", "private void change_im_check(boolean boo){\r\n if(boo){ //IMAGEN SI EL MEASURE ES CORRECTO\r\n im_check.setImage(new Image(getClass().getResourceAsStream(\"/Images/img06.png\")));\r\n }else{ //IMAGEN PARA LA BUSQUEDA DE UN MEASURE\r\n im_check.setImage(new Image(getClass().getResourceAsStream(\"/Images/img34.png\")));\r\n }\r\n }", "@Override\r\n\tpublic ArrayList<theaterImageVo> selectImage() {\n\t\treturn theaterRentalDaoImpl.selectImage();\r\n\t}", "protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n switch (requestCode) {\n case SELECTED_PICTURE:\n if (resultCode == RESULT_OK) {\n uri = data.getData();\n\n\n Log.e(\"Image path is \", \"\" + uri);\n String[] projection = {MediaStore.Images.Media.DATA};\n\n Cursor cursor = getContentResolver().query(uri, projection,\n null, null, null);\n cursor.moveToFirst();\n\n int columnIndex = cursor.getColumnIndex(projection[0]);\n String filePath = cursor.getString(columnIndex);\n String path = filePath;\n img = path;\n\n cursor.close();\n\n\n Bitmap yourSelectedImage = BitmapFactory.decodeFile(filePath);\n\n Drawable d = new BitmapDrawable(yourSelectedImage);\n\n newImage.setImageDrawable(d);\n Toast.makeText(getApplicationContext(), filePath,\n Toast.LENGTH_SHORT).show();\n\n\n\n }\n break;\n\n default:\n break;\n }\n }", "private void selectImage() {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(\n Intent.createChooser(\n intent,\n \"Select Image from here...\"),\n PICK_IMAGE_REQUEST);\n }", "public ActionListener getListenerSelectImage() {\n\treturn new ActionListener() {\n\t @Override\n\t public void actionPerformed(ActionEvent e) {\n\t\tJFileChooser chooser = new JFileChooser();\n\t\t// configuration du selecteur de fichier\n\t\tchooser.setDialogTitle(\"Select image\");\n\t\tchooser.setMultiSelectionEnabled(false);\n\t\tchooser.setCurrentDirectory(new File(ressourcesPath));\n\t\tFileNameExtensionFilter filter = new FileNameExtensionFilter(\"Images\", \"jpg\", \"png\", \"jpeg\");\n\t\tchooser.setFileFilter(filter);\n\t\tint returnValue = chooser.showOpenDialog(null);\n\t\tif (returnValue == JFileChooser.APPROVE_OPTION) {\n\t\t // si l'utilisateur a fait ouvrir en ayant un fichier de selectionne\n\t\t File selectedImage = chooser.getSelectedFile();\n\t\t // on essaye de charger l'image dans la GridView\n\t\t try {\n\t\t\tMainWindow.this.view.loadImage(selectedImage.getAbsolutePath());\n\t\t } catch (NullPointerException ex) {\n\t\t\t// si c'est pas une image dans les formats attendus alors\n\t\t\t// on affiche une popup d'erreur\n\t\t\tshowError(\"This file isn't an image.\");\n\t\t } \n\t\t}\n\t }\n\t};\n }", "public static void clickrun2() {\n JFileChooser file = new JFileChooser();\n file.setCurrentDirectory(new File(System.getProperty(\"user.home\")));\n FileNameExtensionFilter filter = new FileNameExtensionFilter(\"*.images\", \"jpg\", \"png\");\n file.addChoosableFileFilter(filter);\n int result = file.showSaveDialog(null);\n if (result == JFileChooser.APPROVE_OPTION) {\n File selectedFile = file.getSelectedFile();\n String path = selectedFile.getAbsolutePath();\n lblAnhsanphamsua.setIcon(ResizeImage2(path, null));\n ImagePast2 = path;\n System.out.println(ImagePast2);\n } else {\n\n }\n }", "public void actualizarImagen() {\n\t\tentidadGrafica.actualizarImagen(this.valor);\n\t}", "@Override\r\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\r\n //jika image picker membawa sebuah data berupa foto maka\r\n if (ImagePicker.shouldHandle(requestCode, resultCode, data)) {\r\n //ambil data foto yang dipilih\r\n Image image = ImagePicker.getFirstImageOrNull(data);\r\n //ambil path/lokasi dari foto/gambar yang dipilih\r\n File imgFile = new File(image.getPath());\r\n if (imgFile.exists()) {\r\n //convert path ke bitmap dan tampilkan pada imageview\r\n Bitmap myBitmap = BitmapFactory.decodeFile(imgFile.getAbsolutePath());\r\n imgTranscript.setImageBitmap(myBitmap);\r\n\r\n //set variabel change true karena gambar telah diupdate\r\n isPicChange = true;\r\n }\r\n }\r\n\r\n super.onActivityResult(requestCode, resultCode, data);\r\n }", "public JPanelRegistro() {\n initComponents();\n jfcImagen.setFileFilter(filtro);\n jfcImagen.setDialogTitle(\"Seleccione una imagen\");\n jfcImagen.setAcceptAllFileFilterUsed(false);\n jlImagen.setBackground(Color.white);\n \n \n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tJFileChooser jfc=new JFileChooser(); \r\n\t\t jfc.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES ); \r\n\t\t jfc.showDialog(new JLabel(), \"选择\"); \r\n\t\t File file=jfc.getSelectedFile();\r\n\t\t if(null==file){\r\n\t\t \treturn;\r\n\t\t }\r\n\t\t if(file.isDirectory()){\r\n\t\t System.out.println(\"文件夹:\"+file.getAbsolutePath()); \r\n\t\t }else if(file.isFile()){\r\n\t\t System.out.println(\"文件:\"+file.getAbsolutePath()); \r\n\t\t }\r\n\t\t if(Util.isImage(file)){\r\n\t\t \tImageIcon img = new ImageIcon(file.getAbsolutePath());\r\n\t\t\t\t\tlbImage.setIcon(img);\r\n\t\t\t\t\tMain.img = img.getImage();\r\n\t\t }else{\r\n\t\t \tJOptionPane.showMessageDialog(Main.this, \"请选择图片\");\r\n\t\t }\r\n\t\t\t}", "public void setSelectedImgURI(Uri select){\n this.selectedImageUri = select;\n }", "public void recuperarDados() {\n\n id = getArguments().getString(\"id\");\n nome = getArguments().getString(\"nome\");\n raca = getArguments().getString(\"raca\");\n idade = getArguments().getString(\"idade\");\n sexo = getArguments().getString(\"sexo\");\n cor = getArguments().getString(\"cor\");\n\n imgPerfil = getArguments().getString(\"imgPerfil\");\n img01 = getArguments().getString(\"img01\");\n img02 = getArguments().getString(\"img02\");\n img03 = getArguments().getString(\"img03\");\n tipo = getArguments().getString(\"tipo\");\n Log.e(\"id\", \"idedit\"+id);\n Log.e(\"nome\", \"nomeedit\"+nome);\n\n\n\n assert sexo != null;\n if (sexo.equals(\"Macho\")) {\n machoAnimal.setChecked(true);\n } else {\n femeaAnimal.setChecked(true);\n }\n\n nomeAnimal.setText(nome);\n idadeAnimal.setText(idade);\n corAnimal.setText(cor);\n\n\n if (imgPerfil != null)\n Picasso.get().load(imgPerfil).into(perfilImagem);\n\n /* if (img01 != null)\n Picasso.get().load(img01).into(imagem01);\n\n if (img02 != null)\n Picasso.get().load(img02).into(imagem02);\n\n if (img03 != null)\n Picasso.get().load(img03).into(imagem03);*/\n\n }", "public void salvaAula()\n { \n JFileChooser fileChooser = new JFileChooser();\n String strFilePlan = \"out/\" + this.myAula.getNome()+ \"_plan\"+ \".png\";\n System.out.println(\"scrivo su file \"+ strFilePlan);\n File fp = new File(strFilePlan);\n String strFileDati = \"out/\" + this.myAula.getNome()+ \"_dati\"+ \".png\";\n File fd = new File(strFileDati);\n fileChooser.setSelectedFile(fd);\n try\n { \n ImageIO.write(this.getPlan(), \"png\", fp);\n ImageIO.write(this.getDati(), \"png\", fd);\n }\n catch (Exception ex)\n {\n System.out.println(\"errore in Salvataggio aula su file\");\n }\n \n JOptionPane.showMessageDialog(this, \"file salvati correttamente sotto cartella /out\",\"Info\", JOptionPane.INFORMATION_MESSAGE);\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tJFileChooser chooser = new JFileChooser();\r\n\t\t\t\tFileNameExtensionFilter filter = new FileNameExtensionFilter(\r\n\t\t\t\t\t\t\"Image Files\", // 파일 이름에 창에 출력될 문자열\r\n\t\t\t\t\t\t\"jpg\", \"gif\", \"PNG\"); // 파일 필터로 사용되는 확장자. *.jpg. *.gif만\r\n\t\t\t\t\t\t\t\t\t\t\t\t// 나열됨\r\n\t\t\t\tchooser.setFileFilter(filter); // 파일 다이얼로그에 파일 필터 설정\r\n\t\t\t\tchooser.setMultiSelectionEnabled(false);//다중 선택 불가\r\n\r\n\t\t\t\t// 파일 다이얼로그 출력\r\n\t\t\t\tint ret = chooser.showOpenDialog(null);\r\n\t\t\t\tif (ret != JFileChooser.APPROVE_OPTION) { // 사용자가 창을 강제로 닫았거나 취소\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 버튼을 누른 경우\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"파일을 선택하지 않았습니다\", \"경고\",\r\n\t\t\t\t\t\t\tJOptionPane.WARNING_MESSAGE);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// 사용자가 파일을 선택하고 \"열기\" 버튼을 누른 경우\r\n\t\t\t\tfilePath = chooser.getSelectedFile().getPath(); // 파일 경로명을\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 알아온다.\r\n\r\n\t\t\t\tplaqueP1.setIcon(new ImageIcon(((new ImageIcon(filePath))\r\n\t\t\t\t\t\t.getImage()).getScaledInstance(300, 250,\r\n\t\t\t\t\t\tjava.awt.Image.SCALE_SMOOTH))); // 파일을 로딩하여 이미지 레이블에\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 출력한다.\r\n\t\t\t\tplaqueP1.addMouseListener(new EnlargeListener());\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tJFileChooser chooser = new JFileChooser();\r\n\t\t\t\tFileNameExtensionFilter filter = new FileNameExtensionFilter(\r\n\t\t\t\t\t\t\"Image Files\", // 파일 이름에 창에 출력될 문자열\r\n\t\t\t\t\t\t\"jpg\", \"gif\", \"PNG\"); // 파일 필터로 사용되는 확장자. *.jpg. *.gif만\r\n\t\t\t\t\t\t\t\t\t\t\t\t// 나열됨\r\n\t\t\t\tchooser.setFileFilter(filter); // 파일 다이얼로그에 파일 필터 설정\r\n\t\t\t\tchooser.setMultiSelectionEnabled(false);//다중 선택 불가\r\n\r\n\t\t\t\t// 파일 다이얼로그 출력\r\n\t\t\t\tint ret = chooser.showOpenDialog(null);\r\n\t\t\t\tif (ret != JFileChooser.APPROVE_OPTION) { // 사용자가 창을 강제로 닫았거나 취소\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 버튼을 누른 경우\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"파일을 선택하지 않았습니다\", \"경고\",\r\n\t\t\t\t\t\t\tJOptionPane.WARNING_MESSAGE);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// 사용자가 파일을 선택하고 \"열기\" 버튼을 누른 경우\r\n\t\t\t\tfilePath = chooser.getSelectedFile().getPath(); // 파일 경로명을\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 알아온다.\r\n\t\t\t\tplaqueP2.setIcon(new ImageIcon(((new ImageIcon(filePath))\r\n\t\t\t\t\t\t.getImage()).getScaledInstance(300, 250,\r\n\t\t\t\t\t\tjava.awt.Image.SCALE_SMOOTH))); // 파일을 로딩하여 이미지 레이블에\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 출력한다.\r\n\t\t\t\tplaqueP2.addMouseListener(new EnlargeListener());\r\n\t\t\t}", "@Override\n public void onActivityResult(int requestCode,int resultCode,Intent data)\n {\n alerta.dismiss();\n if(resultCode!=0)\n loading.abrir(\"Aguarde...\");\n\n super.onActivityResult(requestCode, resultCode, data);\n\n switch (requestCode) {\n case imagem_interna:\n if (resultCode == RESULT_OK) {\n Image img = new Image();\n ContentResolver cResolver = getContentResolver();\n Uri uri = data.getData();\n String[] projection = {MediaStore.Images.Media.DATA};\n Cursor cursor = cResolver.query(uri, projection, null, null, null);\n cursor.moveToFirst();\n int columnIndex = cursor.getColumnIndex(projection[0]);\n filepath = cursor.getString(columnIndex);\n cursor.close();\n\n File f64 = new File(filepath);\n if(f64!=null)\n {\n img.setResizedBitmap(f64,percentImgArq);\n img.setMimeFromImgPath(f64.getPath());\n }\n img64 = img.getBitmapBase64();\n tipoImagem = img.getMime();\n\n if(img.getBitmap()!=null)\n {\n imagem.setImageBitmap(img.getBitmap());\n }\n loading.fechar();\n }\n break;\n\n case imagem_camera:\n if (resultCode == RESULT_OK)\n {\n Image img = new Image();\n Bitmap photo = (Bitmap) data.getExtras().get(\"data\");\n\n Uri uri = img.getImageUri(pesqAgendaUser.this, photo);\n File file = new File(img.getRealPathFromURI(pesqAgendaUser.this,uri));\n String pathImgCamera = file.getPath();\n File f64 = new File(pathImgCamera);\n if(f64!=null)\n {\n img.setResizedBitmap(f64,percentImgCam);\n img.setMimeFromImgPath(f64.getPath());\n }\n img64 = img.getBitmapBase64();\n tipoImagem = img.getMime();\n\n if(img.getBitmap()!=null)\n {\n imagem.setImageBitmap(img.getBitmap());\n }\n loading.fechar();\n\n }\n break;\n\n default:\n loading.fechar();\n break;\n }//fim switch\n\n }", "private void queryAndSetPicture() {\n StorageReference storageRef = mStorage.getReference().child(user.getId());\n final long ONE_MEGABYTE = 1024 * 1024;\n storageRef.getBytes(ONE_MEGABYTE).addOnSuccessListener(new OnSuccessListener<byte[]>() {\n @Override\n public void onSuccess(byte[] bytes) {\n // Data for \"images/island.jpg\" is returns, use this as needed\n mImageByteArray = bytes;\n mImageBitmap = BitmapFactory.decodeByteArray(mImageByteArray, 0, mImageByteArray.length);\n mUserimage.setImageBitmap(mImageBitmap);\n mUserimage.setBackgroundColor(80000000);\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception exception) {\n // Handle any errors\n// mUserimage.setBackgroundColor(80000000);\n }\n });\n\n }", "private int seleccionarImagenTipo(int position){\n if(pedido.get(position).getCategoria().equalsIgnoreCase(\"compañia\")){\n return R.drawable.amigos;\n }else if (pedido.get(position).getCategoria().equalsIgnoreCase(\"informatica\")){\n return R.drawable.ordenador;\n }else if (pedido.get(position).getCategoria().equalsIgnoreCase(\"clases\")){\n return R.drawable.clases;\n }else if (pedido.get(position).getCategoria().equalsIgnoreCase(\"menaje/hogar\")){\n return R.drawable.herramientas;\n }\n return 0;\n }", "public Coloca_imagen(){\n \n \n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == PICK_IMAGE && resultCode == RESULT_OK && data != null && data.getData() != null) {\n filePath = data.getData();\n try {\n Bitmap bitmap = MediaStore.Images.Media.getBitmap(getContentResolver(), filePath);\n Image_brand.setImageBitmap(bitmap);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == RESULT_LOAD_IMAGE && resultCode == RESULT_OK && null != data) {\n Uri selectedImage = data.getData();\n String[] filePathColumn = {MediaStore.Images.Media.DATA};\n Cursor cursor = getContentResolver().query(selectedImage,\n filePathColumn, null, null, null);\n cursor.moveToFirst();\n int columnIndex = cursor.getColumnIndex(filePathColumn[0]);\n picturePath = cursor.getString(columnIndex);\n cursor.close();\n Bitmap bitmap = BitmapFactory.decodeFile(picturePath);\n mItemImageView.setImageBitmap(bitmap);\n }\n }", "private void fileListValueChanged() {\r\n if (this.fileList.getSelectedIndex() >= 0) {\r\n File file = listFiles.get(this.fileList.getSelectedIndex());\r\n BufferedImage myPicture;\r\n try {\r\n myPicture = ImageIO.read(file);\r\n this.setPicture(myPicture);\r\n this.SetPictureLabel(file.getName() + \" Width: \" + myPicture.getWidth() + \"px Height: \" + myPicture.getHeight() + \"px\");\r\n } catch (Exception e) {\r\n this.setPicture(null);\r\n this.SetPictureLabel(\"Could not read file.\");\r\n }\r\n /*BufferedImage myPicture = null;\r\n try {\r\n File file = listFiles.get(this.fileList.getSelectedIndex());\r\n myPicture = ImageIO.read(file);\r\n Image scaled = myPicture.getScaledInstance(jScrollPane1.getWidth(), jScrollPane1.getHeight(), Image.SCALE_SMOOTH);\r\n photoScrollPane.setIcon(new ImageIcon(scaled));\r\n //photoScrollPane.setIcon(new ImageIcon(ImageIO.read(listFiles.get(this.fileList.getSelectedIndex()))));\r\n SetPictureLabel(file.getName() + \" Width: \" + myPicture.getWidth() + \" Height: \" + myPicture.getHeight());\r\n } catch (Exception e) {\r\n photoScrollPane.setIcon(null);\r\n photoScrollPane.setText(\"Could not read file\");\r\n } */\r\n }\r\n }", "public void choosePicture() {\n\n Intent intent = new Intent();\n intent.setType(\"image/*\"); //inserting all images inside this Image folder\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(intent, 1);\n\n }", "List<BufferedImage> listarHuellas(Integer fcdc_id) throws SQLException, IOException;", "@Override\n public void onClick(View v) {\n\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true);\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, \"Select Picture\"), 1);\n\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tJFileChooser chooser = new JFileChooser();\r\n\t\t\t\tFileNameExtensionFilter filter = new FileNameExtensionFilter(\r\n\t\t\t\t\t\t\"Image Files\", // 파일 이름에 창에 출력될 문자열\r\n\t\t\t\t\t\t\"jpg\", \"gif\", \"PNG\"); // 파일 필터로 사용되는 확장자. *.jpg. *.gif만\r\n\t\t\t\t\t\t\t\t\t\t\t\t// 나열됨\r\n\t\t\t\tchooser.setFileFilter(filter); // 파일 다이얼로그에 파일 필터 설정\r\n\t\t\t\tchooser.setMultiSelectionEnabled(false);//다중 선택 불가\r\n\r\n\t\t\t\t// 파일 다이얼로그 출력\r\n\t\t\t\tint ret = chooser.showOpenDialog(null);\r\n\t\t\t\tif (ret != JFileChooser.APPROVE_OPTION) { // 사용자가 창을 강제로 닫았거나 취소\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 버튼을 누른 경우\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"파일을 선택하지 않았습니다\", \"경고\",\r\n\t\t\t\t\t\t\tJOptionPane.WARNING_MESSAGE);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// 사용자가 파일을 선택하고 \"열기\" 버튼을 누른 경우\r\n\t\t\t\tfilePath = chooser.getSelectedFile().getPath(); // 파일 경로명을\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 알아온다.\r\n\t\t\t\tplaqueP3.setIcon(new ImageIcon(((new ImageIcon(filePath))\r\n\t\t\t\t\t\t.getImage()).getScaledInstance(300, 250,\r\n\t\t\t\t\t\tjava.awt.Image.SCALE_SMOOTH))); // 파일을 로딩하여 이미지 레이블에\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 출력한다.\r\n\t\t\t\tplaqueP3.addMouseListener(new EnlargeListener());\r\n\t\t\t}", "public void cargarEpicrisis() {\r\n\t\tif (admision_seleccionada != null\r\n\t\t\t\t&& admision_seleccionada.getAtendida()) {\r\n\t\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\t\tparametros.put(\"nro_identificacion\",\r\n\t\t\t\t\tadmision_seleccionada.getNro_identificacion());\r\n\t\t\tparametros.put(\"nro_ingreso\",\r\n\t\t\t\t\tadmision_seleccionada.getNro_ingreso());\r\n\t\t\tparametros.put(\"estado\", admision_seleccionada.getEstado());\r\n\t\t\tparametros.put(\"codigo_administradora\",\r\n\t\t\t\t\tadmision_seleccionada.getCodigo_administradora());\r\n\t\t\tparametros.put(\"id_plan\", admision_seleccionada.getId_plan());\r\n\t\t\tparametros.put(IVias_ingreso.ADMISION_PACIENTE,\r\n\t\t\t\t\tadmision_seleccionada);\r\n\t\t\tparametros.put(IVias_ingreso.OPCION_VIA_INGRESO,\r\n\t\t\t\t\tOpciones_via_ingreso.REGISTRAR);\r\n\t\t\ttabboxContendor.abrirPaginaTabDemanda(false,\r\n\t\t\t\t\tIRutas_historia.PAGINA_HC_EPICRISIS,\r\n\t\t\t\t\tIRutas_historia.LABEL_HC_EPICRISIS, parametros);\r\n\t\t}\r\n\r\n\t}", "public void mostrar_dados()\n {\n try\n {\n jl_codigo.setText(con_clientes.resultset.getString(\"codigo\"));\n tf_nome.setText(con_clientes.resultset.getString(\"nome\"));\n cb_dndia.setSelectedItem(con_clientes.resultset.getString(\"dn_dia\"));\n cb_dnmes.setSelectedItem(con_clientes.resultset.getString(\"dn_mes\"));\n cb_dnano.setSelectedItem(con_clientes.resultset.getString(\"dn_ano\"));\n tf_natural.setText(con_clientes.resultset.getString(\"naturalidade\"));\n tf_foto.setText(con_clientes.resultset.getString(\"foto\"));\n jl_foto.setIcon(new ImageIcon(\"/Estoque/Imagens/\"+tf_foto.getText()));\n \n }\n catch(SQLException erro)\n {\n if (navega == 1)\n JOptionPane.showMessageDialog(null,\"Olha, você já está no primeiro registro\");\n else if (navega == 2)\n JOptionPane.showMessageDialog(null,\"Olha, você já está no último registro\");\n else\n JOptionPane.showMessageDialog(null,\"Não localizou dados \"+erro);\n navega=0;\n }\n }", "public void setIdImagen(int idImagen) {\n this.idImagen = idImagen;\n }", "@Override\n\t\t\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\t\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\n\t\t\t\tif (SdCardUtil.checkSdCard() == true) {\n\t\t\t\t\tif (requestCode == 1 && resultCode==RESULT_OK) {\n\t\t\t\t\t\tLog.e(\"ERROR\",\"准备显示\");\n\t\t\t\t\t\tgetImaged(data);\n\t\t\t\t\t} else if (requestCode == 2 && resultCode==RESULT_OK) {\n\t\t\t\t\t\tgetImaged(data);\n\t\t\t\t\t} else if (requestCode == 3 && resultCode==RESULT_OK) {\n\t\t\t\t\t\tgetImaged(data);\n\t\t\t\t\t} else if (requestCode == 4 && resultCode==RESULT_OK) {\n\t\t\t\t\t\tgetImaged(data);\n\t\t\t\t\t} else if (requestCode == 5 && resultCode==RESULT_OK) {\n\t\t\t\t\t\tgetImaged(data);\n\t\t\t\t\t} else if (requestCode == 6 && resultCode==RESULT_OK) {\n\t\t\t\t\t\tgetImaged(data);\n\t\t\t\t\t}else if(requestCode==7 && resultCode==RESULT_OK){\n\t\t\t\t\t\tContentResolver resolver = getContentResolver();\n\t\t\t\t\t\tUri uri=data.getData();\n\t\t\t\t\t\tBitmap bm=null;\n\t\t\t\t\t\tif(uri!=null){\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tbm = MediaStore.Images.Media.getBitmap(resolver, uri);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tLog.e(\"ERROR\",\"获取路径成功\");\n\t\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t\t// TODO 自动生成的 catch 块\n\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(bm!=null){\n\t\t\t\t\t\t\tBitmap resizeBmp = ThumbnailUtils.extractThumbnail(bm, 88, 88); \n\t\t\t\t\t\t\tallImages.add(allImages.size()-1,resizeBmp);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tgridAdapter.notifyDataSetChanged();\n\t\t\t\t\t\t\tLog.e(\"ERROR\",\"GirdView显示成功\");\n\t\t\t\t\t\t\tsaveImageToFile(bm);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/*String[] proj = {MediaStore.Images.Media.DATA};\n\t\t\t\t\t\t \n\t\t\t\t //好像是android多媒体数据库的封装接口,具体的看Android文档\n\t\t\t\t Cursor cursor = managedQuery(uri, proj, null, null, null); \n\t\t\t\t //按我个人理解 这个是获得用户选择的图片的索引值\n\t\t\t\t int column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);\n\t\t\t\t //将光标移至开头 ,这个很重要,不小心很容易引起越界\n\t\t\t\t cursor.moveToFirst();\n\t\t\t\t //最后根据索引值获取图片路径\n\t\t\t\t String path = cursor.getString(column_index);\n\t\t\t\t imageUrl.add(path);*/\n\t\t\t\t\t\t//getImaged(data);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//显得到bitmap图片\n\t\t\t\t\t\t/*\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcropImage(uri, 150, 150, 8);\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t} */\n\t\t\t\t\t}/**\n\t\t\t\t\t\t裁剪完图片\n\t\t\t\t\t*/\n\t\t\t\t\telse if(requestCode==8 && resultCode==RESULT_OK){\n\t\t\t\t\t\t\n\t\t\t\t\t\tBitmap photo = null;\n\t\t\t\t\t\tUri photoUri = data.getData();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (photoUri != null) {\n\t\t\t\t\t\t\tphoto = BitmapFactory.decodeFile(photoUri.getPath());\n\t\t\t\t\t\t\tLog.e(\"ERROR\",\"没图片\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (photo == null) {\n\t\t\t\t\t\t\tBundle extra = data.getExtras();\n\t\t\t\t\t\t\tif (extra != null) {\n\t\t\t\t photo = (Bitmap)extra.get(\"data\"); \n\t\t\t\t Log.e(\"ERROR\",\"传入失败\");\n\t\t\t\t ByteArrayOutputStream stream = new ByteArrayOutputStream(); \n\t\t\t\t photo.compress(Bitmap.CompressFormat.JPEG, 100, stream);\n\t\t\t\t } \n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(photo!=null){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tBitmap resizeBmp = ThumbnailUtils.extractThumbnail(photo, 88, 88); \n\t\t\t\t\t\t\tallImages.add(allImages.size()-1,resizeBmp);\n\t\t\t\t\t\t\tLog.e(\"ERROR\",\"传入成功\");\n\t\t\t\t\t\t\tgridAdapter.notifyDataSetChanged();\n\t\t\t\t\t\t\tsaveImageToFile(photo);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\t\t\t\t\tToast.makeText(context, \"SD卡不存在,请检查您的sd卡\",\n\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t}\n\t\t\t}", "private void selectImageFromGallery() {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, getString(R.string.select_picture)),\n REQUEST_IMAGE_OPEN);\n }", "private void selectImage() {\n final CharSequence[] items = {\"Take Photo\", \"Choose from Library\",\n \"Cancel\"};\n\n AlertDialog.Builder builder = new AlertDialog.Builder(Timetable.this);\n builder.setTitle(\"Add Photo!\");\n builder.setItems(items, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int item) {\n if (items[item].equals(\"Take Photo\")) {\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n startActivityForResult(intent, REQUEST_CAMERA);\n } else if (items[item].equals(\"Choose from Library\")) {\n Intent intent = new Intent(\n Intent.ACTION_PICK,\n android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n intent.setType(\"image/*\");\n startActivityForResult(\n Intent.createChooser(intent, \"Select File\"),\n SELECT_FILE);\n } else if (items[item].equals(\"Cancel\")) {\n dialog.dismiss();\n }\n }\n });\n builder.show();\n }", "private void cargardatos() {\n String sql = \"SELECT * FROM nomPercepciones\";\n\n Object datos[] = new Object[13];\n try {\n conn = (this.userConn != null) ? this.userConn : Conexion.getConnection();\n stmt = conn.prepareStatement(sql);\n rs = stmt.executeQuery();\n while (rs.next()) {\n datos[0] = rs.getString(\"idNomPer\");\n datos[1] = rs.getString(\"nombre\");\n datos[2] = rs.getString(\"dias\");\n if (rs.getString(\"estatus\").equalsIgnoreCase(\"1\")) {\n datos[3] = new JLabel(new ImageIcon(getClass().getResource(\"/View/img/actulizadoj.png\")));\n } else {\n datos[3] = new JLabel(new ImageIcon(getClass().getResource(\"/View/img/noactualizadoj.png\")));\n }\n\n tabla1.addRow(datos);\n }\n } catch (SQLException e) {\n JOptionPane.showMessageDialog(null, \"Error al cargar los datos\\n\" + e, \"ERROR\", JOptionPane.ERROR_MESSAGE);\n } finally {\n Conexion.close(rs);\n Conexion.close(stmt);\n if (this.userConn == null) {\n Conexion.close(conn);\n }\n }\n }", "public boolean GetImgPagina(int cod, String filePathName) throws SQLException {\n try {\n\n Connection con = model.connectionDataBase.ConnectionDB.Connect();\n\n \n PreparedStatement stmt = con.prepareStatement(\"SELECT `immagine_pagina` FROM `pagine_opera` WHERE cod_pagina = ?\");\n\n stmt.setInt(1, cod);\n ResultSet rs = stmt.executeQuery();\n\n\n while (rs.next()) {\n InputStream in = rs.getBinaryStream(1);\n OutputStream f = new FileOutputStream(new File(filePathName));\n \n int n = 0;\n while ((n = in.read()) > -1) {\n f.write(n);\n }\n f.close();\n in.close();\n\n return true;\n }\n } catch(Exception ex){\n System.out.println(ex.getMessage());\n }\n return false;\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n selectButton = new javax.swing.JButton();\n jLabel2 = new javax.swing.JLabel();\n selectedPic = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n cannyIrisImage = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n htIrisImage = new javax.swing.JLabel();\n cannyPupilImage = new javax.swing.JLabel();\n jLabel9 = new javax.swing.JLabel();\n jLabel10 = new javax.swing.JLabel();\n htPupilImage = new javax.swing.JLabel();\n jLabel12 = new javax.swing.JLabel();\n eyeDetectedImage = new javax.swing.JLabel();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n editedImage = new javax.swing.JLabel();\n jLabel15 = new javax.swing.JLabel();\n userData = new javax.swing.JLabel();\n jLabel1 = new javax.swing.JLabel();\n jMenuBar1 = new javax.swing.JMenuBar();\n jMenu1 = new javax.swing.JMenu();\n jMenu2 = new javax.swing.JMenu();\n jMenu3 = new javax.swing.JMenu();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"Iris-Pupil detection\");\n setBackground(new java.awt.Color(153, 153, 153));\n setFont(new java.awt.Font(\"Times New Roman\", 3, 24)); // NOI18N\n setMinimumSize(new java.awt.Dimension(860, 640));\n getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n selectButton.setText(\"select image\");\n selectButton.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n selectButtonMouseClicked(evt);\n }\n });\n selectButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n selectButtonActionPerformed(evt);\n }\n });\n getContentPane().add(selectButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(380, 580, 105, -1));\n\n jLabel2.setFont(new java.awt.Font(\"Times New Roman\", 1, 18)); // NOI18N\n jLabel2.setForeground(new java.awt.Color(0, 51, 153));\n jLabel2.setText(\"selected image\");\n getContentPane().add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 20, 118, -1));\n\n selectedPic.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/resources/empty.png\"))); // NOI18N\n selectedPic.setBorder(javax.swing.BorderFactory.createTitledBorder(\"\"));\n getContentPane().add(selectedPic, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 50, 256, 160));\n\n jLabel4.setFont(new java.awt.Font(\"Times New Roman\", 1, 18)); // NOI18N\n jLabel4.setForeground(new java.awt.Color(0, 51, 153));\n jLabel4.setText(\"canny iris\");\n getContentPane().add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(370, 20, 101, -1));\n\n cannyIrisImage.setBorder(javax.swing.BorderFactory.createTitledBorder(\"\"));\n getContentPane().add(cannyIrisImage, new org.netbeans.lib.awtextra.AbsoluteConstraints(310, 50, 256, 160));\n\n jLabel6.setFont(new java.awt.Font(\"Times New Roman\", 1, 18)); // NOI18N\n jLabel6.setForeground(new java.awt.Color(0, 51, 153));\n jLabel6.setText(\"hough transformed iris\");\n getContentPane().add(jLabel6, new org.netbeans.lib.awtextra.AbsoluteConstraints(610, 20, -1, -1));\n\n htIrisImage.setBorder(javax.swing.BorderFactory.createTitledBorder(\"\"));\n getContentPane().add(htIrisImage, new org.netbeans.lib.awtextra.AbsoluteConstraints(600, 50, 256, 160));\n\n cannyPupilImage.setBorder(javax.swing.BorderFactory.createTitledBorder(\"\"));\n getContentPane().add(cannyPupilImage, new org.netbeans.lib.awtextra.AbsoluteConstraints(310, 260, 256, 160));\n\n jLabel9.setFont(new java.awt.Font(\"Times New Roman\", 1, 18)); // NOI18N\n jLabel9.setForeground(new java.awt.Color(0, 51, 153));\n jLabel9.setText(\"Iris-Pupil detected\");\n getContentPane().add(jLabel9, new org.netbeans.lib.awtextra.AbsoluteConstraints(100, 230, 150, -1));\n\n jLabel10.setBackground(new java.awt.Color(255, 255, 255));\n jLabel10.setFont(new java.awt.Font(\"Times New Roman\", 1, 18)); // NOI18N\n jLabel10.setForeground(new java.awt.Color(0, 51, 153));\n jLabel10.setText(\"canny pupil\");\n getContentPane().add(jLabel10, new org.netbeans.lib.awtextra.AbsoluteConstraints(370, 230, -1, 20));\n jLabel10.getAccessibleContext().setAccessibleDescription(\"\");\n\n htPupilImage.setBackground(new java.awt.Color(204, 204, 204));\n htPupilImage.setBorder(javax.swing.BorderFactory.createTitledBorder(\"\"));\n getContentPane().add(htPupilImage, new org.netbeans.lib.awtextra.AbsoluteConstraints(600, 260, 256, 160));\n\n jLabel12.setFont(new java.awt.Font(\"Times New Roman\", 1, 18)); // NOI18N\n jLabel12.setForeground(new java.awt.Color(0, 51, 153));\n jLabel12.setText(\"hough transformed pupil\");\n getContentPane().add(jLabel12, new org.netbeans.lib.awtextra.AbsoluteConstraints(620, 230, 210, -1));\n\n eyeDetectedImage.setBorder(javax.swing.BorderFactory.createTitledBorder(\"\"));\n getContentPane().add(eyeDetectedImage, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 260, 256, 160));\n\n jButton1.setText(\"Insert in database\");\n jButton1.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jButton1MouseClicked(evt);\n }\n });\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 580, -1, -1));\n\n jButton2.setText(\"Compare with database images\");\n jButton2.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jButton2MouseClicked(evt);\n }\n });\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton2, new org.netbeans.lib.awtextra.AbsoluteConstraints(570, 580, -1, -1));\n\n editedImage.setBorder(javax.swing.BorderFactory.createTitledBorder(\"\"));\n getContentPane().add(editedImage, new org.netbeans.lib.awtextra.AbsoluteConstraints(890, 50, 256, 160));\n\n jLabel15.setFont(new java.awt.Font(\"Times New Roman\", 3, 18)); // NOI18N\n jLabel15.setForeground(new java.awt.Color(0, 51, 153));\n jLabel15.setText(\"Radius: \\n\");\n getContentPane().add(jLabel15, new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 520, 760, 50));\n\n userData.setFont(new java.awt.Font(\"Times New Roman\", 3, 18)); // NOI18N\n getContentPane().add(userData, new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 460, 950, 40));\n\n jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/resources/hi-tech-tehnologii-glaz.jpg\"))); // NOI18N\n jLabel1.setMaximumSize(new java.awt.Dimension(1024, 680));\n jLabel1.setMinimumSize(new java.awt.Dimension(1024, 680));\n getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(-10, 10, 1450, 840));\n\n jMenu1.setText(\"File\");\n jMenuBar1.add(jMenu1);\n\n jMenu2.setText(\"Edit\");\n jMenuBar1.add(jMenu2);\n\n jMenu3.setText(\"help\");\n jMenuBar1.add(jMenu3);\n\n setJMenuBar(jMenuBar1);\n\n pack();\n }", "@FXML\n void allSelected(ActionEvent event) {\n //Gets all auctions not being sold by you.\n String sqlSelect = \"Select * from artwork, auction where auction.auctionid = artwork.artworkid and auctioncomp = 0 and auction.seller <> '\" + this.username + \"';\";\n artworkTilePane.getChildren().clear(); //delete all previous artworks.\n getImages(FXCollections.observableArrayList(artworkDatabaseManager.getAllArtworks(sqlSelect)));\n }", "public UsuariosSelected(Permisos u) {\n initComponents();\n this.u=u;\n setIconImage(new ImageIcon(getClass().getResource(\"/imagenes/Logo_JAR.png\")).getImage());\n this.getContentPane().setBackground(Color.RED);\n this.setLocationRelativeTo(this);\n loadData();\n \n }", "private void btnMostrarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnMostrarActionPerformed\n if (libCancion.getSelectedIndex()<0){\n \n }\n else{\n informacion = new mostrarInformacion();\n informacion.setVisible(true);\n e=libCancion.getSelectedIndex();\n String[] test=cancion.mostrarCancion(e);\n mostrarInformacion.jLabel3.setText(test[1]);\n mostrarInformacion.jLabel5.setText(test[2]);\n mostrarInformacion.jLabel7.setText(test[3]);\n mostrarInformacion.jLabel9.setText(test[4]+\"secs\");\n mostrarInformacion.lblImg.setIcon(new ImageIcon(test[6]));\n \n \n \n }\n }", "@Override\r\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\r\n Bitmap b=(Bitmap)data.getExtras().get(\"data\");\r\n i1.setImageBitmap(b);\r\n\r\n }", "private int seleccionarImagenPago(int position){\n if(pedido.get(position).getCategoria().equalsIgnoreCase(\"dinero\")){\n return R.drawable.amigos;\n }else if (pedido.get(position).getCategoria().equalsIgnoreCase(\"favor\")){\n return R.drawable.herramientas;\n }\n\n return 0;\n }", "public void camara(){\n Intent fotoPick = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);\n String fecha = new SimpleDateFormat(\"yyyy_MM_dd_HH_mm_ss\").format(new Date());\n Uri uriSavedImage=Uri.fromFile(new File(getExternalFilesDir(Environment.DIRECTORY_DCIM),\"inmueble_\"+id+\"_\"+fecha+\".jpg\"));\n fotoPick.putExtra(MediaStore.EXTRA_OUTPUT, uriSavedImage);\n startActivityForResult(fotoPick,TAKE_PICTURE);\n\n }", "private void imagePic(){\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, \"Select Picture\"),1);\n\n }", "public void copiaImg() {\r\n\t\t\r\n\t\ttry {\r\n\t\t\tString tipo = caminhoImagem.replaceAll(\".*\\\\.\", \"\");\r\n\t\t\tSystem.out.println(tipo);\r\n\t\t\tString l = caminhoImagem;\r\n\t\t\tString i = \"../MASProject/imagens/\" + idObra.getText() + \".\" + tipo;\r\n\t\t\tcaminhoImagem = i;\r\n\t\t\t@SuppressWarnings(\"resource\")\r\n\t\t\tFileInputStream fisDe = new FileInputStream(l);\r\n\t\t\t@SuppressWarnings(\"resource\")\r\n\t\t\tFileOutputStream fisPara = new FileOutputStream(i);\r\n\t\t\tFileChannel fcPara = fisDe.getChannel();\r\n\t\t\tFileChannel fcDe = fisPara.getChannel();\r\n\t\t\tif (fcPara.transferTo(0, fcPara.size(), fcDe) == 0L) {\r\n\t\t\t\tfcPara.close();\r\n\t\t\t\tfcDe.close();\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tJOptionPane.showMessageDialog(null, e);\r\n\t\t}\r\n\t}", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == TAKE_IMAGE && resultCode == RESULT_OK) {\n Bundle extra = data.getExtras();\n bitmap = (Bitmap) extra.get(\"data\");\n saveImage(bitmap);\n imageView.setImageBitmap(bitmap);\n } else if (requestCode == SELECT_IMAGE && resultCode == RESULT_OK) {\n Uri targetUri = data.getData();\n Toast.makeText(getApplicationContext(), targetUri.toString(), Toast.LENGTH_LONG).show();\n Bitmap bitmap;\n try {\n\n bitmap = BitmapFactory.decodeStream(getContentResolver().openInputStream(targetUri));\n\n imageView.setImageBitmap(bitmap);\n } catch (FileNotFoundException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }\n }", "@Override\r\n\tpublic ArrayList<theaterImageVo> selectImageView(int bnum) {\n\t\treturn theaterRentalDaoImpl.selectImageView(bnum);\r\n\t}", "public void handleActionChosenImageView(MouseEvent event){\n Integer actionSelected = buttonAction.get(event.getSource());\n System.out.println(\"input sent from gameboard Controller : execute action \" + actionSelected.toString());\n sender.sendInput(\"execute action \" + actionSelected.toString());\n\n for (Map.Entry<Integer, ImageView> entry : coverImages.entrySet()) {\n\n entry.getValue().setVisible(false);\n }\n\n }", "@FXML\n private void getMedicoSelecionado() throws IOException {\n medicoSelecionado = tabelaMedicos.getSelectionModel().getSelectedItem();\n }", "@Override\n public void onClick(View v) {\n Intent i = new Intent(\n Intent.ACTION_PICK,\n android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n startActivityForResult(i, SELECTED_PICTURE);\n }", "void imageChooser() {\n\n\n Intent i = new Intent();\n i.setType(\"image/*\");\n i.setAction(Intent.ACTION_GET_CONTENT);\n\n\n startActivityForResult(Intent.createChooser(i, \"Select Picture\"), SELECT_PICTURE);\n }", "@Override\n public void onClick(View v) {\n Intent i = new Intent(\n Intent.ACTION_PICK,\n android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n startActivityForResult(i , RESULT_LOAD_IMAGE);\n\n\n }", "private void prepararImagenYStorage() {\n mImageBitmap = null;\n\n //this.capturarFotoButton = (Button) findViewById(R.id.capturarFotoButton);\n// setBtnListenerOrDisable(\n// this.capturarFotoButton,\n// mTakePicSOnClickListener,\n// MediaStore.ACTION_IMAGE_CAPTURE\n// );\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.FROYO) {\n mAlbumStorageDirFactory = new FroyoAlbumDirFactory();\n } else {\n mAlbumStorageDirFactory = new BaseAlbumDirFactory();\n }\n }", "@Override\n public void onClick(View v) {\n\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent,\n \"Select Picture\"), IMG_RESULT);\n\n }", "public void crearImagenes() {\n try {\n fondoJuego1 = new Imagenes(\"/fondoJuego1.png\",39,-150,-151);\n fondoJuego2 = new Imagenes(\"/fondoJuego2.png\",40,150,149);\n regresar = new Imagenes(\"/regresar.png\",43,90,80);\n highLight = new Imagenes(\"/cursorSubmenus.png\",43,90,80);\n juegoNuevo = new Imagenes(\"/juegoNuevo.png\",44,90,80);\n continuar = new Imagenes(\"/continuar.png\",45,90,80);\n tituloJuegoNuevo = new Imagenes(\"/tituloJuegoNuevo.png\",200,100,165);\n tituloContinuar = new Imagenes(\"/tituloContinuar.png\",201,100,40);\n tituloRegresar = new Imagenes(\"/tituloRegresar.png\",202,20,100);\n\t} catch(IOException e){\n e.printStackTrace();\n }\n }", "private void selectImage(){\n final CharSequence[] options = { \"Choose from Gallery\",\"Cancel\" };\n AlertDialog.Builder builder = new AlertDialog.Builder(activity);\n builder.setItems(options, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int item) {\n if (options[item].equals(\"Choose from Gallery\"))\n {\n Intent intent = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);\n startActivityForResult(intent, 2);\n }\n else if (options[item].equals(\"Cancel\")) {\n dialog.dismiss();\n }\n }\n });\n builder.show();\n }", "private void initialize() throws IOException {\r\n\t\tfrmSelectAreaIn = new JFrame();\r\n\t\tfrmSelectAreaIn.setTitle(\"Select Area In Image\");\r\n\t\tfrmSelectAreaIn.setBounds(100, 100, 2000, 2000);\r\n\t\tfrmSelectAreaIn.setDefaultCloseOperation(DISPOSE_ON_CLOSE);\r\n\t\tfrmSelectAreaIn.getContentPane().setLayout(null);\r\n\t\t\r\n\t\tdeneme2 x= new deneme2();\r\n\t\r\n\t\t// Image Panel display image with graphics\r\n\t\tJPanel mainPanel = new ImagePanel( x.o, this);\r\n\t\tmainPanel.setBounds(10, 11, 1270, 718);\r\n\t\tfrmSelectAreaIn.getContentPane().add(mainPanel); \r\n\t\t\r\n\t\tJLabel lblSelectedArea = new JLabel(\"Selected Area\");\r\n\t\tlblSelectedArea.setBounds(1330, 11, 221, 14);\r\n\t\tlblSelectedArea.setFont(new Font(\"Tahoma\", Font.BOLD, 15));\r\n\t\tlblSelectedArea.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tfrmSelectAreaIn.getContentPane().add(lblSelectedArea);\r\n\t\t\r\n\t\t\r\n\t\tJButton btnAdd = new JButton(\"Add to 1\");\r\n\t\tbtnAdd.setBounds(1674, 49, 89, 23);\r\n\t\tbtnAdd.addActionListener(new ActionListener() {\r\n\t\t\t\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\r\n\tupdateSelectedRegion1(ImagePanel.nb);\r\n\tx1=ImagePanel.nb;\r\n\r\n//\tSystem.out.println(x1.getRGB(0, 0));\r\n//\tSystem.out.println(x1.getRGB(10, 10));\r\n//\tSystem.out.println(x1.getWidth());\r\n//\tSystem.out.println(x1.getHeight());\r\n\r\n\r\ndouble r=0;\r\ndouble gr=0;\r\ndouble b=0;\r\ndouble sum=0;\r\nfinal double gw=x1.getWidth();\r\nfinal double gh = x1.getHeight();\r\ndouble list1[][]=new double [(int) gw][(int) gh];\r\n//System.out.println(gh);\r\n//System.out.println(gw);\r\n\r\n\tfor(int i=0;i<gw-1;i++) {\r\n\t\tfor(int ii= (int) (gh-1);ii>0;ii--) {\r\n \tColor c=new Color(x1.getRGB(i, ii));\r\n\t\t r=c.getRed();\r\n\t\t\t gr=c.getGreen();\r\n\t\t\t b=c.getBlue();\r\n\t\t\tgrey=(r+gr+b)/3;\r\n// \t System.out.print(r+\" \");\r\n//\t\t\t System.out.print(b+\" \");\r\n//\t\t\t System.out.print(gr+\" \");\r\n//\t\t\t System.out.println();\r\n\t\t\t\r\n\t\t\tlist1[i][ii]=grey;\r\n\t\t\tsum+=grey; \r\n\t\t\t\r\n\r\n\t\t}\r\n\t}\r\n\t\r\n\tint x = 0;\r\n int y = 0;\r\n int x1=0;\r\n int y1=0;\r\nSystem.out.println(getMaxValue(list1)+\"asdasf\");\r\n\tfor(int i=10;i<gw-10;i++) {\r\n\t\tfor(int ii=10;ii<gh-10;ii++) {\r\n\t\tif(list1[i][ii]==getMaxValue(list1)) {\r\n\t\t\t x=i;\r\n\t\t y=ii;\r\n\t\t}\r\n\t\t}\r\n\t\t}\r\n\t\r\n\tfor(int i=15;i<gw-15;i++) {\r\n\t\tfor(int ii=15;ii<gh-15;ii++) {\r\n\t\t\tSystem.out.println(\"aaaaa\");\r\n\t\tif(list1[i][ii]>0 &&list1[i][ii]<50) {\r\n\t\t\t x1=i;\r\n\t\t y1=ii;\r\n\t\t}\r\n\t\t}\r\n\t\t}\r\n\tSystem.out.println(getMinValue(list1)+\"min\");\r\n\tSystem.out.println(x1);\r\n\tSystem.out.println(y1);\r\n\tSystem.out.println();\r\nSystem.out.println(x);\r\nSystem.out.println(y);\r\n\tSystem.out.println(\"-------\"+sum/(gw*gh)+\"----------------\");\r\nvalues[0]=sum/(gw*gh);\r\nmaxSelectedRegion1(selected1,x,y);\r\nminSelectedRegion1(selected1,x1,y1);\r\n\t\t\t}\r\n\t\t});\r\n\t\tfrmSelectAreaIn.getContentPane().add(btnAdd);\r\n\t\t\r\n\t\tbtnAddTo = new JButton(\"Add to 2\");\r\n\t\tbtnAddTo.setBounds(1674, 83, 89, 23);\r\n\t\tbtnAddTo.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\tupdateSelectedRegion2(ImagePanel.nb);\r\n\t\t\tx2=ImagePanel.nb;\r\n\t\t\tdouble r=0;\r\n\t\t\tdouble gr=0;\r\n\t\t\tdouble b=0;\r\n\t\t\tdouble sum=0;\r\n\t\t\tfinal int gw=x2.getWidth();\r\n\t\t\tfinal int gh = x2.getHeight();\r\n\t\t\tdouble list1[][]=new double [(int) gw][(int) gh];\r\n\t\t\t\tfor(int i=0;i<gw-1;i++) {\r\n\t\t\t\t\tfor(int ii= gh-1;ii>0;ii--) {\r\n\t\t\t \tColor c=new Color(x2.getRGB(i, ii));\r\n\t\t\t\t\t r=c.getRed();\r\n\t\t\t\t\t\t gr=c.getGreen();\r\n\t\t\t\t\t\t b=c.getBlue();\r\n\t\t\t\t\t\t System.out.print(r+\" \");\r\n\t\t\t\t\t\t System.out.print(b+\" \");\r\n\t\t\t\t\t\t System.out.print(gr+\" \");\r\n\t\t\t\t\t\t System.out.println();\r\n\t\t\t\t\t\tgrey=(r+gr+b)/3;\r\n\t\t\t\t\t\tlist1[i][ii]=grey;\r\n\t\t\t\t\t\tsum+=grey; \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\tint x = 0;\r\n\t\t\t int y = 0;\r\n\t\t\t int x1=0;\r\n\t\t\t int y1=0;\r\n\t\t\tSystem.out.println(getMaxValue(list1)+\"asdasf\");\r\n\t\t\t\tfor(int i=10;i<gw-10;i++) {\r\n\t\t\t\t\tfor(int ii=10;ii<gh-10;ii++) {\r\n\t\t\t\t\tif(list1[i][ii]==getMaxValue(list1)) {\r\n\t\t\t\t\t\t x=i;\r\n\t\t\t\t\t y=ii;\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\r\n\t\t\t\tfor(int i=15;i<gw-15;i++) {\r\n\t\t\t\t\tfor(int ii=15;ii<gh-15;ii++) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tif(list1[i][ii]>0 &&list1[i][ii]<50) {\r\n\t\t\t\t\t\t x1=i;\r\n\t\t\t\t\t y1=ii;\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\tSystem.out.println(getMinValue(list1)+\"min\");\r\n\t\t\t\tSystem.out.println(x1);\r\n\t\t\t\tSystem.out.println(y1);\r\n\t\t\t\tSystem.out.println();\r\n\t\t\tSystem.out.println(x);\r\n\t\t\tSystem.out.println(y);\r\n\t\t\t\t\r\n\t\t\tmaxSelectedRegion2(selected2,x,y);\r\n\t\t\tminSelectedRegion2(selected2,x1,y1);\r\n\t\r\n\t\t\t\tSystem.out.println(\"-------\"+sum/(gw*gh)+\"----------------\");\r\n\t\t\t\tvalues[1]=sum/(gw*gh);\r\n\t\t\t}\r\n\t\t});\r\n\t\tfrmSelectAreaIn.getContentPane().add(btnAddTo);\r\n\t\t\r\n\t\tbtnAddTo_1 = new JButton(\"Add to 3\");\r\n\t\tbtnAddTo_1.setBounds(1674, 117, 89, 23);\r\n\t\tbtnAddTo_1.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tupdateSelectedRegion3(ImagePanel.nb);\r\n\t\t\t\tx3=ImagePanel.nb;\r\n\t\t\t\tdouble r=0;\r\n\t\t\t\tdouble gr=0;\r\n\t\t\t\tdouble b=0;\r\n\t\t\t\tdouble sum=0;\r\n\t\t\t\tfinal int gw=x3.getWidth();\r\n\t\t\t\tfinal int gh = x3.getHeight();\r\n\t\t\t\tdouble list1[][]=new double [(int) gw][(int) gh];\r\n\t\t\t\t\tfor(int i=0;i<gw-1;i++) {\r\n\t\t\t\t\t\tfor(int ii= gh-1;ii>0;ii--) {\r\n\t\t\t\t \tColor c=new Color(x3.getRGB(i, ii));\r\n\t\t\t\t\t\t r=c.getRed();\r\n\t\t\t\t\t\t\t gr=c.getGreen();\r\n\t\t\t\t\t\t\t b=c.getBlue();\r\n\t\t\t\t\t\t\t System.out.print(r+\" \");\r\n\t\t\t\t\t\t\t System.out.print(b+\" \");\r\n\t\t\t\t\t\t\t System.out.print(gr+\" \");\r\n\t\t\t\t\t\t\t System.out.println();\r\n\t\t\t\t\t\t\tgrey=(r+gr+b)/3;\r\n\t\t\t\t\t\t\tlist1[i][ii]=grey;\r\n\t\t\t\t\t\t\tsum+=grey; \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tint x = 0;\r\n\t\t\t\t int y = 0;\r\n\t\t\t\t int x1=0;\r\n\t\t\t\t int y1=0;\r\n\t\t\t\tSystem.out.println(getMaxValue(list1)+\"asdasf\");\r\n\t\t\t\t\tfor(int i=10;i<gw-10;i++) {\r\n\t\t\t\t\t\tfor(int ii=10;ii<gh-10;ii++) {\r\n\t\t\t\t\t\tif(list1[i][ii]==getMaxValue(list1)) {\r\n\t\t\t\t\t\t\t x=i;\r\n\t\t\t\t\t\t y=ii;\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\r\n\t\t\t\t\tfor(int i=15;i<gw-15;i++) {\r\n\t\t\t\t\t\tfor(int ii=15;ii<gh-15;ii++) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(list1[i][ii]>0 &&list1[i][ii]<50) {\r\n\t\t\t\t\t\t\t x1=i;\r\n\t\t\t\t\t\t y1=ii;\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\tSystem.out.println(getMinValue(list1)+\"min\");\r\n\t\t\t\t\tSystem.out.println(x1);\r\n\t\t\t\t\tSystem.out.println(y1);\r\n\t\t\t\t\tSystem.out.println();\r\n\t\t\t\tSystem.out.println(x);\r\n\t\t\t\tSystem.out.println(y);\r\n\t\t\t\t\t\r\n\t\t\t\tmaxSelectedRegion3(selected3,x,y);\r\n\t\t\t\tminSelectedRegion3(selected3,x1,y1);\r\n\t\t\t\t\t\r\n\t\t\r\n\t\t\t\t\tSystem.out.println(\"-------\"+sum/(gw*gh)+\"----------------\");\r\n\t\t\t\t\tvalues[2]=sum/(gw*gh);\r\n\t\t\t}\r\n\t\t});\r\n\t\tfrmSelectAreaIn.getContentPane().add(btnAddTo_1);\r\n\t\t\r\n\t\tbtnAddTo_2 = new JButton(\"Add to 4\");\r\n\t\tbtnAddTo_2.setBounds(1674, 151, 89, 23);\r\n\t\tbtnAddTo_2.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tupdateSelectedRegion4(ImagePanel.nb);\r\n\t\t\t\tx4=ImagePanel.nb;\r\n\t\t\t\tdouble r=0;\r\n\t\t\t\tdouble gr=0;\r\n\t\t\t\tdouble b=0;\r\n\t\t\t\tdouble sum=0;\r\n\t\t\t\tfinal int gw=x4.getWidth();\r\n\t\t\t\tfinal int gh = x4.getHeight();\r\n\t\t\t\tdouble list1[][]=new double [(int) gw][(int) gh];\r\n\t\t\t\t\tfor(int i=0;i<gw-1;i++) {\r\n\t\t\t\t\t\tfor(int ii= gh-1;ii>0;ii--) {\r\n\t\t\t\t \tColor c=new Color(x4.getRGB(i, ii));\r\n\t\t\t\t\t\t r=c.getRed();\r\n\t\t\t\t\t\t\t gr=c.getGreen();\r\n\t\t\t\t\t\t\t b=c.getBlue();\r\n\t\t\t\t\t\t\t System.out.print(r+\" \");\r\n\t\t\t\t\t\t\t System.out.print(b+\" \");\r\n\t\t\t\t\t\t\t System.out.print(gr+\" \");\r\n\t\t\t\t\t\t\t System.out.println();\r\n\t\t\t\t\t\t\t list1[i][ii]=grey;\r\n\t\t\t\t\t\t\tgrey=(r+gr+b)/3;\r\n\t\t\t\t\t\t\tsum+=grey; \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tint x = 0;\r\n\t\t\t\t int y = 0;\r\n\t\t\t\t int x1=0;\r\n\t\t\t\t int y1=0;\r\n\t\t\t\tSystem.out.println(getMaxValue(list1)+\"asdasf\");\r\n\t\t\t\t\tfor(int i=10;i<gw-10;i++) {\r\n\t\t\t\t\t\tfor(int ii=10;ii<gh-10;ii++) {\r\n\t\t\t\t\t\tif(list1[i][ii]==getMaxValue(list1)) {\r\n\t\t\t\t\t\t\t x=i;\r\n\t\t\t\t\t\t y=ii;\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\r\n\t\t\t\t\tfor(int i=15;i<gw-15;i++) {\r\n\t\t\t\t\t\tfor(int ii=15;ii<gh-15;ii++) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(list1[i][ii]>0 &&list1[i][ii]<50) {\r\n\t\t\t\t\t\t\t x1=i;\r\n\t\t\t\t\t\t y1=ii;\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\tSystem.out.println(getMinValue(list1)+\"min\");\r\n\t\t\t\t\tSystem.out.println(x1);\r\n\t\t\t\t\tSystem.out.println(y1);\r\n\t\t\t\t\tSystem.out.println();\r\n\t\t\t\tSystem.out.println(x);\r\n\t\t\t\tSystem.out.println(y);\r\n\t\t\t\t\t\r\n\t\t\t\tmaxSelectedRegion4(selected4,x,y);\r\n\t\t\t\tminSelectedRegion4(selected4,x1,y1);\r\n\t\t\r\n\t\t\t\t\tSystem.out.println(\"-------\"+sum/(gw*gh)+\"----------------\");\r\n\t\t\t\t\tvalues[3]=sum/(gw*gh);\r\n\t\t\t}\r\n\t\t});\r\n\t\tfrmSelectAreaIn.getContentPane().add(btnAddTo_2);\r\n\t\tSystem.out.println(x1);\r\n\t\tSystem.out.println(values[0]);\r\n\t\tbtnAnalyse = new JButton(\"Analyse\");\r\n\t\tbtnAnalyse.setForeground(Color.WHITE);\r\n\t\tbtnAnalyse.setBackground(Color.BLACK);\r\n\t\tbtnAnalyse.setBounds(1732, 185, 89, 23);\r\n\t\tbtnAnalyse.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\tAnalyze.main(null);\r\n\t\t\t\t\r\n\r\n\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\tfrmSelectAreaIn.getContentPane().add(btnAnalyse);\r\n\t\t\r\n\t\tJButton btnColor = new JButton(\"Color 1\");\r\n\t\tbtnColor.setBounds(1783, 49, 89, 23);\r\n\t\tbtnColor.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\r\n\t\t\t\tdouble r = 0;\r\n\t\t\t\tdouble gr = 0;\r\n\t\t\t\tdouble b = 0;\r\n\t\t\t\tdouble sum = 0;\r\n\t\t\t\tfinal int gw1 = x1.getWidth();\r\n\t\t\t\tfinal int gh1 = x1.getHeight();\r\n\r\n\t\t\t\tfor (int i = 0; i < gw1 - 1; i++) {\r\n\t\t\t\t\tfor (int ii = gh1 - 1; ii > 0; ii--) {\r\n\t\t\t\t\t\tColor c = new Color(x1.getRGB(i, ii));\r\n\t\t\t\t\t\tr = c.getRed();\r\n\t\t\t\t\t\tgr = c.getGreen();\r\n\t\t\t\t\t\tb = c.getBlue();\r\n\t\t\t\t\t\tgrey = (r + gr + b) / 3;\r\n\t\t\t\t\t\tif (grey < 86) {\r\n\r\n\t\t\t\t\t\t\tint p = x1.getRGB(i, ii);\r\n\r\n\t\t\t\t\t\t\tint a = (p >> 24) & 0xff;\r\n\t\t\t\t\t\t\tint g = (p >> 8) & 0xff;\r\n\t\t\t\t\t\t\tp = (a << 24) | (0 << 16) | (g << 8) | 0;\r\n\t\t\t\t\t\t\tx1.setRGB(i, ii, p);\r\n\t\t\t\t\t\t\tupdateSelectedRegion11(x1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (grey > 85 && grey < 171) {\r\n\t\t\t\t\t\t\tint p = x1.getRGB(i, ii);\r\n\t\t\t\t\t\t\tint a = (p >> 24) & 0xff;\r\n\t\t\t\t\t\t\tint rr = (p >> 16) & 0xff;\r\n\t\t\t\t\t\t\tp = (a << 24) | (rr << 16) | (0 << 8) | 0;\r\n\t\t\t\t\t\t\tx1.setRGB(i, ii, p);\r\n\r\n\t\t\t\t\t\t\tupdateSelectedRegion11(x1);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (grey > 170 && grey < 260) {\r\n\r\n\t\t\t\t\t\t\tint p = x1.getRGB(i, ii);\r\n\r\n\t\t\t\t\t\t\tint a = (p >> 24) & 0xff;\r\n\t\t\t\t\t\t\tint bb = (p >> 16) & 0xff;\r\n\t\t\t\t\t\t\tp = (a << 24) | (0 << 16) | (0 << 8) | bb;\r\n\r\n\t\t\t\t\t\t\tx1.setRGB(i, ii, p);\r\n\t\t\t\t\t\t\tupdateSelectedRegion11(x1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tfrmSelectAreaIn.getContentPane().add(btnColor);\r\n\t\t\r\n\t\tbtnColor_1 = new JButton(\"Color 2\");\r\n\t\tbtnColor_1.setBounds(1783, 83, 89, 23);\r\n\t\tbtnColor_1.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\t\r\n\t\t\t\tdouble r = 0;\r\n\t\t\t\tdouble gr = 0;\r\n\t\t\t\tdouble b = 0;\r\n\t\t\t\tdouble sum = 0;\r\n\t\t\t\tfinal int gw2 = x2.getWidth();\r\n\t\t\t\tfinal int gh2 = x2.getHeight();\r\n\r\n\t\t\t\tfor (int i = 0; i < gw2 - 1; i++) {\r\n\t\t\t\t\tfor (int ii = gh2 - 1; ii > 0; ii--) {\r\n\t\t\t\t\t\tColor c = new Color(x2.getRGB(i, ii));\r\n\t\t\t\t\t\tr = c.getRed();\r\n\t\t\t\t\t\tgr = c.getGreen();\r\n\t\t\t\t\t\tb = c.getBlue();\r\n\t\t\t\t\t\tgrey = (r + gr + b) / 3;\r\n\t\t\t\t\t\tif (grey < 86) {\r\n\r\n\t\t\t\t\t\t\tint p = x2.getRGB(i, ii);\r\n\r\n\t\t\t\t\t\t\tint a = (p >> 24) & 0xff;\r\n\t\t\t\t\t\t\tint g = (p >> 8) & 0xff;\r\n\t\t\t\t\t\t\tp = (a << 24) | (0 << 16) | (g << 8) | 0;\r\n\t\t\t\t\t\t\tx2.setRGB(i, ii, p);\r\n\t\t\t\t\t\t\tupdateSelectedRegion22(x2);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (grey > 85 && grey < 171) {\r\n\t\t\t\t\t\t\tint p = x2.getRGB(i, ii);\r\n\t\t\t\t\t\t\tint a = (p >> 24) & 0xff;\r\n\t\t\t\t\t\t\tint rr = (p >> 16) & 0xff;\r\n\t\t\t\t\t\t\tp = (a << 24) | (rr << 16) | (0 << 8) | 0;\r\n\t\t\t\t\t\t\tx2.setRGB(i, ii, p);\r\n\r\n\t\t\t\t\t\t\tupdateSelectedRegion22(x2);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (grey > 170 && grey < 260) {\r\n\r\n\t\t\t\t\t\t\tint p = x2.getRGB(i, ii);\r\n\r\n\t\t\t\t\t\t\tint a = (p >> 24) & 0xff;\r\n\t\t\t\t\t\t\tint bb = (p >> 16) & 0xff;\r\n\t\t\t\t\t\t\tp = (a << 24) | (0 << 16) | (0 << 8) | bb;\r\n\r\n\t\t\t\t\t\t\tx2.setRGB(i, ii, p);\r\n\t\t\t\t\t\t\tupdateSelectedRegion22(x2);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\tfrmSelectAreaIn.getContentPane().add(btnColor_1);\r\n\t\t\r\n\t\tbtnColor_2 = new JButton(\"Color 3\");\r\n\t\tbtnColor_2.setBounds(1783, 117, 89, 23);\r\n\t\tbtnColor_2.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t\r\n\t\t\t\tdouble r = 0;\r\n\t\t\t\tdouble gr = 0;\r\n\t\t\t\tdouble b = 0;\r\n\t\t\t\tdouble sum = 0;\r\n\t\t\t\tfinal int gw3 = x3.getWidth();\r\n\t\t\t\tfinal int gh3 = x3.getHeight();\r\n\r\n\t\t\t\tfor (int i = 0; i < gw3 - 1; i++) {\r\n\t\t\t\t\tfor (int ii = gh3 - 1; ii > 0; ii--) {\r\n\t\t\t\t\t\tColor c = new Color(x3.getRGB(i, ii));\r\n\t\t\t\t\t\tr = c.getRed();\r\n\t\t\t\t\t\tgr = c.getGreen();\r\n\t\t\t\t\t\tb = c.getBlue();\r\n\t\t\t\t\t\tgrey = (r + gr + b) / 3;\r\n\t\t\t\t\t\tif (grey < 86) {\r\n\r\n\t\t\t\t\t\t\tint p = x3.getRGB(i, ii);\r\n\r\n\t\t\t\t\t\t\tint a = (p >> 24) & 0xff;\r\n\t\t\t\t\t\t\tint g = (p >> 8) & 0xff;\r\n\t\t\t\t\t\t\tp = (a << 24) | (0 << 16) | (g << 8) | 0;\r\n\t\t\t\t\t\t\tx3.setRGB(i, ii, p);\r\n\t\t\t\t\t\t\tupdateSelectedRegion33(x3);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (grey > 85 && grey < 171) {\r\n\t\t\t\t\t\t\tint p = x3.getRGB(i, ii);\r\n\t\t\t\t\t\t\tint a = (p >> 24) & 0xff;\r\n\t\t\t\t\t\t\tint rr = (p >> 16) & 0xff;\r\n\t\t\t\t\t\t\tp = (a << 24) | (rr << 16) | (0 << 8) | 0;\r\n\t\t\t\t\t\t\tx3.setRGB(i, ii, p);\r\n\r\n\t\t\t\t\t\t\tupdateSelectedRegion33(x3);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (grey > 170 && grey < 260) {\r\n\r\n\t\t\t\t\t\t\tint p = x3.getRGB(i, ii);\r\n\r\n\t\t\t\t\t\t\tint a = (p >> 24) & 0xff;\r\n\t\t\t\t\t\t\tint bb = (p >> 16) & 0xff;\r\n\t\t\t\t\t\t\tp = (a << 24) | (0 << 16) | (0 << 8) | bb;\r\n\r\n\t\t\t\t\t\t\tx3.setRGB(i, ii, p);\r\n\t\t\t\t\t\t\tupdateSelectedRegion33(x3);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\tfrmSelectAreaIn.getContentPane().add(btnColor_2);\r\n\t\t\r\n\t\tbtnColor_3 = new JButton(\"Color 4\");\r\n\t\tbtnColor_3.setBounds(1783, 151, 89, 23);\r\n\t\tbtnColor_3.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t\r\n\t\t\t\tdouble r = 0;\r\n\t\t\t\tdouble gr = 0;\r\n\t\t\t\tdouble b = 0;\r\n\t\t\t\tdouble sum = 0;\r\n\t\t\t\tfinal int gw4 = x4.getWidth();\r\n\t\t\t\tfinal int gh4 = x4.getHeight();\r\n\r\n\t\t\t\tfor (int i = 0; i < gw4 - 1; i++) {\r\n\t\t\t\t\tfor (int ii = gh4 - 1; ii > 0; ii--) {\r\n\t\t\t\t\t\tColor c = new Color(x4.getRGB(i, ii));\r\n\t\t\t\t\t\tr = c.getRed();\r\n\t\t\t\t\t\tgr = c.getGreen();\r\n\t\t\t\t\t\tb = c.getBlue();\r\n\t\t\t\t\t\tgrey = (r + gr + b) / 3;\r\n\t\t\t\t\t\tif (grey < 86) {\r\n\r\n\t\t\t\t\t\t\tint p = x4.getRGB(i, ii);\r\n\r\n\t\t\t\t\t\t\tint a = (p >> 24) & 0xff;\r\n\t\t\t\t\t\t\tint g = (p >> 8) & 0xff;\r\n\t\t\t\t\t\t\tp = (a << 24) | (0 << 16) | (g << 8) | 0;\r\n\t\t\t\t\t\t\tx4.setRGB(i, ii, p);\r\n\t\t\t\t\t\t\tupdateSelectedRegion44(x4);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (grey > 85 && grey < 171) {\r\n\t\t\t\t\t\t\tint p = x4.getRGB(i, ii);\r\n\t\t\t\t\t\t\tint a = (p >> 24) & 0xff;\r\n\t\t\t\t\t\t\tint rr = (p >> 16) & 0xff;\r\n\t\t\t\t\t\t\tp = (a << 24) | (rr << 16) | (0 << 8) | 0;\r\n\t\t\t\t\t\t\tx4.setRGB(i, ii, p);\r\n\r\n\t\t\t\t\t\t\tupdateSelectedRegion44(x4);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (grey > 170 && grey < 260) {\r\n\r\n\t\t\t\t\t\t\tint p = x4.getRGB(i, ii);\r\n\r\n\t\t\t\t\t\t\tint a = (p >> 24) & 0xff;\r\n\t\t\t\t\t\t\tint bb = (p >> 16) & 0xff;\r\n\t\t\t\t\t\t\tp = (a << 24) | (0 << 16) | (0 << 8) | bb;\r\n\r\n\t\t\t\t\t\t\tx4.setRGB(i, ii, p);\r\n\t\t\t\t\t\t\tupdateSelectedRegion44(x4);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\tfrmSelectAreaIn.getContentPane().add(btnColor_3);\r\n\t\t\r\n\t\tlblcoloredTypesOf = new JLabel(\"--------------- Colored Types of Selected Areas ---------------\");\r\n\t\tlblcoloredTypesOf.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblcoloredTypesOf.setBounds(889, 776, 745, 25);\r\n\t\tlblcoloredTypesOf.setFont(new Font(\"Tahoma\", Font.BOLD, 18));\r\n\t\tfrmSelectAreaIn.getContentPane().add(lblcoloredTypesOf);\r\n\t\t\r\n\t\tpanel_5 = new JPanel();\r\n\t\tpanel_5.setToolTipText(\"\");\r\n\t\tpanel_5.setBorder(new TitledBorder(new LineBorder(new Color(0, 0, 0)), \"1\", TitledBorder.LEFT, TitledBorder.TOP, null, new Color(0, 0, 0)));\r\n\t\tpanel_5.setBounds(1306, 232, 249, 228);\r\n\t\tfrmSelectAreaIn.getContentPane().add(panel_5);\r\n\t\tpanel_5.setLayout(new BorderLayout(0, 0));\r\n\t\t\r\n\t\tselected1 = new JPanel();\r\n\t\tselected1.setBorder(new BevelBorder(BevelBorder.LOWERED, null, null, null, null));\r\n\t\tpanel_5.add(selected1, BorderLayout.CENTER);\r\n\t\tselected1.setToolTipText(\"\");\r\n\t\tselected1.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));\r\n\t\tComponent[] components = selected1.getComponents(); \r\n\t\t\r\n\t\tpanel_6 = new JPanel();\r\n\t\tpanel_6.setToolTipText(\"\");\r\n\t\tpanel_6.setBorder(new TitledBorder(new LineBorder(new Color(0, 0, 0)), \"3\", TitledBorder.LEFT, TitledBorder.TOP, null, new Color(0, 0, 0)));\r\n\t\tpanel_6.setBounds(1623, 232, 249, 228);\r\n\t\tfrmSelectAreaIn.getContentPane().add(panel_6);\r\n\t\tpanel_6.setLayout(new BorderLayout(0, 0));\r\n\t\t\r\n\t\tselected3 = new JPanel();\r\n\t\tpanel_6.add(selected3, BorderLayout.CENTER);\r\n\t\tselected3.setBorder(new BevelBorder(BevelBorder.LOWERED, null, null, null, null));\r\n\t\t\r\n\t\tpanel_7 = new JPanel();\r\n\t\tpanel_7.setToolTipText(\"\");\r\n\t\tpanel_7.setBorder(new TitledBorder(new LineBorder(new Color(0, 0, 0)), \"2\", TitledBorder.LEFT, TitledBorder.TOP, null, new Color(0, 0, 0)));\r\n\t\tpanel_7.setBounds(1306, 501, 249, 228);\r\n\t\tfrmSelectAreaIn.getContentPane().add(panel_7);\r\n\t\tpanel_7.setLayout(new BorderLayout(0, 0));\r\n\t\tselected2 = new JPanel();\r\n\t\tpanel_7.add(selected2, BorderLayout.CENTER);\r\n\t\tselected2.setBorder(new BevelBorder(BevelBorder.LOWERED, null, null, null, null));\r\n\t\t\r\n\t\tpanel_8 = new JPanel();\r\n\t\tpanel_8.setToolTipText(\"\");\r\n\t\tpanel_8.setBorder(new TitledBorder(new LineBorder(new Color(0, 0, 0)), \"4\", TitledBorder.LEFT, TitledBorder.TOP, null, new Color(0, 0, 0)));\r\n\t\tpanel_8.setBounds(1623, 501, 249, 228);\r\n\t\tfrmSelectAreaIn.getContentPane().add(panel_8);\r\n\t\tpanel_8.setLayout(new BorderLayout(0, 0));\r\n\t\t\r\n\t\tselected4 = new JPanel();\r\n\t\tpanel_8.add(selected4, BorderLayout.CENTER);\r\n\t\tselected4.setBorder(new BevelBorder(BevelBorder.LOWERED, null, null, null, null));\r\n\t\t\r\n\t\tpanel_9 = new JPanel();\r\n\t\tpanel_9.setToolTipText(\"\");\r\n\t\tpanel_9.setBorder(new TitledBorder(new LineBorder(new Color(0, 0, 0)), \"1\", TitledBorder.LEFT, TitledBorder.TOP, null, new Color(0, 0, 0)));\r\n\t\tpanel_9.setBounds(622, 814, 249, 228);\r\n\t\tfrmSelectAreaIn.getContentPane().add(panel_9);\r\n\t\tpanel_9.setLayout(new BorderLayout(0, 0));\r\n\t\t\r\n\t\tpanel_1 = new JPanel();\r\n\t\tpanel_9.add(panel_1, BorderLayout.CENTER);\r\n\t\tpanel_1.setToolTipText(\"\");\r\n\t\tpanel_1.setBorder(new BevelBorder(BevelBorder.LOWERED, null, null, null, null));\r\n\t\t\r\n\t\tpanel_10 = new JPanel();\r\n\t\tpanel_10.setToolTipText(\"\");\r\n\t\tpanel_10.setBorder(new TitledBorder(new LineBorder(new Color(0, 0, 0)), \"2\", TitledBorder.LEFT, TitledBorder.TOP, null, new Color(0, 0, 0)));\r\n\t\tpanel_10.setBounds(968, 814, 249, 228);\r\n\t\tfrmSelectAreaIn.getContentPane().add(panel_10);\r\n\t\tpanel_10.setLayout(new BorderLayout(0, 0));\r\n\t\t\r\n\t\tpanel_2 = new JPanel();\r\n\t\tpanel_10.add(panel_2, BorderLayout.CENTER);\r\n\t\tpanel_2.setToolTipText(\"\");\r\n\t\tpanel_2.setBorder(new BevelBorder(BevelBorder.LOWERED, null, null, null, null));\r\n\t\t\r\n\t\tpanel_11 = new JPanel();\r\n\t\tpanel_11.setToolTipText(\"\");\r\n\t\tpanel_11.setBorder(new TitledBorder(new LineBorder(new Color(0, 0, 0)), \"3\", TitledBorder.LEFT, TitledBorder.TOP, null, new Color(0, 0, 0)));\r\n\t\tpanel_11.setBounds(1302, 814, 249, 228);\r\n\t\tfrmSelectAreaIn.getContentPane().add(panel_11);\r\n\t\tpanel_11.setLayout(new BorderLayout(0, 0));\r\n\t\t\r\n\t\tpanel_3 = new JPanel();\r\n\t\tpanel_11.add(panel_3, BorderLayout.CENTER);\r\n\t\tpanel_3.setToolTipText(\"\");\r\n\t\tpanel_3.setBorder(new BevelBorder(BevelBorder.LOWERED, null, null, null, null));\r\n\t\t\r\n\t\tpanel_12 = new JPanel();\r\n\t\tpanel_12.setToolTipText(\"\");\r\n\t\tpanel_12.setBorder(new TitledBorder(new LineBorder(new Color(0, 0, 0)), \"4\", TitledBorder.LEFT, TitledBorder.TOP, null, new Color(0, 0, 0)));\r\n\t\tpanel_12.setBounds(1623, 814, 249, 228);\r\n\t\tfrmSelectAreaIn.getContentPane().add(panel_12);\r\n\t\tpanel_12.setLayout(new BorderLayout(0, 0));\r\n\t\t\r\n\t\tpanel_4 = new JPanel();\r\n\t\tpanel_12.add(panel_4, BorderLayout.CENTER);\r\n\t\tpanel_4.setToolTipText(\"\");\r\n\t\tpanel_4.setBorder(new BevelBorder(BevelBorder.LOWERED, null, null, null, null));\r\n\t\t\r\n\t\tpanel_13 = new JPanel();\r\n\t\tpanel_13.setBorder(new SoftBevelBorder(BevelBorder.LOWERED, null, null, null, null));\r\n\t\tpanel_13.setBounds(1306, 36, 321, 172);\r\n\t\tfrmSelectAreaIn.getContentPane().add(panel_13);\r\n\t\tpanel_13.setLayout(new BorderLayout(0, 0));\r\n\t\t\r\n\t\r\n\t\t\r\n\t\t\r\n\t\t// Image Panel display selected area of the image\r\n\t\tselectedAreaPanel = new JPanel();\r\n\t\tpanel_13.add(selectedAreaPanel, BorderLayout.CENTER);\r\n\t\tselectedAreaPanel.setBorder(new SoftBevelBorder(BevelBorder.LOWERED, null, null, null, null));\r\n\t\t\r\n\t\tJLabel lblForGraph = new JLabel(\"--------------- Intensity Values ---------------\");\r\n\t\tlblForGraph.setHorizontalAlignment(SwingConstants.LEFT);\r\n\t\tlblForGraph.setFont(new Font(\"Tahoma\", Font.BOLD, 18));\r\n\t\tlblForGraph.setBounds(86, 781, 523, 14);\r\n\t\tfrmSelectAreaIn.getContentPane().add(lblForGraph);\r\n\t\t\r\n\t\tJLabel lblBlack = new JLabel(\"0 --> BLACK\");\r\n\t\tlblBlack.setHorizontalAlignment(SwingConstants.LEFT);\r\n\t\tlblBlack.setFont(new Font(\"Times New Roman\", Font.BOLD | Font.ITALIC, 15));\r\n\t\tlblBlack.setBounds(254, 839, 221, 14);\r\n\t\tfrmSelectAreaIn.getContentPane().add(lblBlack);\r\n\t\t\r\n\t\tJLabel lblWhte = new JLabel(\"255 --> WHITE\");\r\n\t\tlblWhte.setBackground(Color.BLACK);\r\n\t\tlblWhte.setForeground(new Color(128, 128, 128));\r\n\t\tlblWhte.setHorizontalAlignment(SwingConstants.LEFT);\r\n\t\tlblWhte.setFont(new Font(\"Times New Roman\", Font.BOLD | Font.ITALIC, 15));\r\n\t\tlblWhte.setBounds(254, 866, 221, 14);\r\n\t\tfrmSelectAreaIn.getContentPane().add(lblWhte);\r\n\t\t\r\n\t\tJLabel lblForColoredTypes = new JLabel(\"For Colored Types:\");\r\n\t\tlblForColoredTypes.setHorizontalAlignment(SwingConstants.LEFT);\r\n\t\tlblForColoredTypes.setFont(new Font(\"Tahoma\", Font.BOLD, 15));\r\n\t\tlblForColoredTypes.setBounds(254, 924, 221, 23);\r\n\t\tfrmSelectAreaIn.getContentPane().add(lblForColoredTypes);\r\n\t\t\r\n\t\tJLabel lblGreen = new JLabel(\"0-85 --> GREEN\");\r\n\t\tlblGreen.setForeground(Color.GREEN);\r\n\t\tlblGreen.setHorizontalAlignment(SwingConstants.LEFT);\r\n\t\tlblGreen.setFont(new Font(\"Times New Roman\", Font.BOLD | Font.ITALIC, 15));\r\n\t\tlblGreen.setBounds(254, 951, 221, 14);\r\n\t\tfrmSelectAreaIn.getContentPane().add(lblGreen);\r\n\t\t\r\n\t\tJLabel lblRed = new JLabel(\"86-170 --> RED\");\r\n\t\tlblRed.setForeground(Color.RED);\r\n\t\tlblRed.setHorizontalAlignment(SwingConstants.LEFT);\r\n\t\tlblRed.setFont(new Font(\"Times New Roman\", Font.BOLD | Font.ITALIC, 15));\r\n\t\tlblRed.setBounds(254, 978, 221, 14);\r\n\t\tfrmSelectAreaIn.getContentPane().add(lblRed);\r\n\t\t\r\n\t\tJLabel lblBlue = new JLabel(\"171-255 --> BLUE\");\r\n\t\tlblBlue.setForeground(Color.BLUE);\r\n\t\tlblBlue.setHorizontalAlignment(SwingConstants.LEFT);\r\n\t\tlblBlue.setFont(new Font(\"Times New Roman\", Font.BOLD | Font.ITALIC, 15));\r\n\t\tlblBlue.setBounds(254, 1005, 221, 14);\r\n\t\tfrmSelectAreaIn.getContentPane().add(lblBlue);\r\n\t\t\r\n\t}", "private void foto1MouseClicked(java.awt.event.MouseEvent evt) {\n boolean r = insertarImagenCrear(foto1, lista1, 0);\n //SI ES TRUE PONEMOS LA VARIABLE F1 EN TRUE, HACIENDO REFERENCIA A QUE EL CUADRO DE LA FOTO SE ENCUENTRA OCUPADO\n if (r) {\n btnEliminar1.setVisible(true);\n btnGuardar.setEnabled(true);\n btnLimpiarLabel.setEnabled(true);\n }\n }", "private void change_im_tool4(int boo){\r\n if(boo == 0){ //IMAGEN SI EL USUARIO ESTA INHABILITADO\r\n im_tool4.setImage(new Image(getClass().getResourceAsStream(\"/Images/img07.png\")));\r\n }else{ //IMAGEN PARA HABILITAR AL USUARIO\r\n im_tool4.setImage(new Image(getClass().getResourceAsStream(\"/Images/img06.png\")));\r\n }\r\n }", "private void helperDisplayInputImage()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//---- Get currently selected file index in the combo box\r\n\t\t\tint index = mainFormLink.getComponentPanelLeft().getComponentComboboxFileName().getSelectedIndex();\r\n\r\n\t\t\t//---- Check the index if the action is invoked by image deletion then causes error\r\n\t\t\tint imageCount = DataController.getTable().getTableSize();\r\n\r\n\t\t\tif (index >= 0 && index < imageCount)\r\n\t\t\t{\r\n\t\t\t\t//---- Get file path of the table\r\n\r\n\t\t\t\tString filePath = DataController.getTable().getElement(index).getDataFile().getFilePath();\r\n\r\n\t\t\t\tmainFormLink.getComponentPanelCenter().getComponentPanelImageView().displayPolygonStop();\r\n\t\t\t\tmainFormLink.getComponentPanelCenter().getComponentPanelImageView().loadImage(filePath);\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (ExceptionMessage e)\r\n\t\t{\r\n\t\t\tExceptionHandler.processException(e);\r\n\t\t}\r\n\t}", "private void choseImage() {\n Intent intent = new Intent(Intent.ACTION_GET_CONTENT);\n intent.setType(\"image/*\");\n\n if (intent.resolveActivity(getPackageManager()) != null) {\n startActivityForResult(intent, GALLERY_REQ_CODE);\n } else {\n Toast.makeText(this, R.string.no_image_picker, Toast.LENGTH_SHORT).show();\n }\n }", "public void selectAndConvert() {\n // Used to select multiple files\n DirectoryResource dr = new DirectoryResource();\n // For each file in the selected files\n for (File f : dr.selectedFiles()) {\n ImageResource inputImg = new ImageResource(f);\n // Converting image in the input file to gray image\n ImageResource outputImg = makeInversion(inputImg);\n // Used to get the name of the file selected\n String inputImgFileName = inputImg.getFileName();\n String outputImgFileName = \"inverted-\" + inputImgFileName;\n // Creating file name to the outputImg with the help of absolute path of the inputImgFileName\n outputImg.setFileName(\"src/java_assignments/coursera1/image_inversion/\"+outputImgFileName);\n outputImg.draw();\n outputImg.save();\n }\n }", "public void showimg()\n {\n try{\n String s1=VoterSignUpForm.id;\n System.out.println(s1);\n Class.forName(\"com.mysql.jdbc.Driver\");//.newInstance();\n Connection conn = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/votingsystem\", \"root\", \"\" );\n Statement st=conn.createStatement();\n ResultSet rs=st.executeQuery(\"select image from voterimg where id='\"+s1+\"'\");\n byte[] bytes = null;\n if(rs.next()){\n //String name=rs.getString(\"name\");\n //text1.setText(name);\n //String address=rs.getString(\"address\");\n //text2.setText(address);\n // name.setText(rs.getString(\"name\"));\n bytes = rs.getBytes(\"image\");\n Image image = img.getToolkit().createImage(bytes);\n ImageIcon icon=new ImageIcon(image);\n img.setIcon(icon);\n }\n }catch(Exception e)\n {}\n }", "public VentanaListado(DataBase db) {\r\n this.db=db;\r\n almacenes = new ArrayList<>();\r\n try { \r\n myImage = ImageIO.read(new File(\"imagenes/fondo2.jpg\"));\r\n } catch (IOException ex) {\r\n System.out.println(\"No se ha encontrado imagen\");\r\n }\r\n this.setContentPane(new ImagePanel(myImage));\r\n this.setTitle(\"Listado Almacenes\");\r\n this.setVisible(true);\r\n initComponents(); \r\n this.pack();\r\n this.setLocation(800, 100);\r\n this.setSize(350,250);\r\n }", "private void btnBrowseActionPerformed(java.awt.event.ActionEvent evt) {\n String []imageTypes = new String[]{\".jpg\", \".png\", \".gif\"};\n\n if (imageFileChooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) {\n getFileLocation = imageFileChooser.getSelectedFile();\n\n String getImageType = getFileLocation.getName();\n getImageType = getImageType.substring(getImageType.indexOf(\".\"));\n\n if (checkImageType(getImageType, imageTypes)) {\n\n lblImage.setIcon( new ImageIcon(new ImageIcon(getFileLocation.getAbsolutePath()).getImage().getScaledInstance(lblImage.getWidth(), lblImage.getHeight(), Image.SCALE_DEFAULT)));\n txtfImageLocation2.setText(getFileLocation.getName());\n\n } else {\n JOptionPane.showMessageDialog(this, \"invalid file type\", \"upload\", JOptionPane.ERROR_MESSAGE);\n }\n } else {\n JOptionPane.showMessageDialog(this, \"upload an image\", \"upload \", JOptionPane.ERROR_MESSAGE);\n }\n }", "private void selectImagesDeviceSerialNubmer() {\n Intent galleryIntent = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.INTERNAL_CONTENT_URI);\n startActivityForResult(galleryIntent, GALLERY_DEVICE_SERIAL_NUMBER);\n }", "private void ReiniciarSeleccion()\n {\n if(Estado!=TURNOENEMIGO && Estado!=HUYENDO && Estado!=FINTURNO)\n {\n if(input.isKeyPressed(Input.KEY_ESCAPE))\n {\n estadoAnterior=OPCIONESBASE;\n Estado=OPCIONESBASE;\n sonidoSelect.play(1, 0.2f);\n }/**/\n }/*if(Estado!=TURNOENEMIGO && Estado!=HUYENDO && Estado!=FINTURNO)*/\n }", "public void pone_imagen(Image imagen) {\n if (imagen != null) {\n this.imagen = imagen;\n } else {\n this.imagen = null;\n }\n repaint();\n }", "@Override\n public void onClick(View v) {\n\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n Intent pickIntent = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n pickIntent.setType(\"image/*\");\n Intent chooserIntent = Intent.createChooser(intent, \"Select Image\");\n chooserIntent.putExtra(Intent.EXTRA_INITIAL_INTENTS, new Intent[] {pickIntent});\n startActivityForResult(chooserIntent,PICK_IMAGE_REQUEST);\n }", "private void botonImagen() {\n ImageIcon guardar = new ImageIcon(getClass().getResource(\"/Img/saveIcon.png\"));\n btnGuardar.setIcon(new ImageIcon(guardar.getImage().getScaledInstance(btnGuardar.getWidth(), btnGuardar.getHeight(), Image.SCALE_SMOOTH)));\n \n //ImageIcon eliminar = new ImageIcon(\"src/Img/Delete.png\");\n ImageIcon eliminar = new ImageIcon(getClass().getResource(\"/Img/Delete.png\"));\n btnEliminar.setIcon(new ImageIcon(eliminar.getImage().getScaledInstance(btnEliminar.getWidth(), btnEliminar.getHeight(), Image.SCALE_SMOOTH)));\n \n //ImageIcon regresar = new ImageIcon(\"src/Img/arrow.png\");\n ImageIcon regresar = new ImageIcon(getClass().getResource(\"/Img/arrow.png\"));\n btnRegresar.setIcon(new ImageIcon(regresar.getImage().getScaledInstance(btnRegresar.getWidth(), btnRegresar.getHeight(), Image.SCALE_SMOOTH)));\n \n //ImageIcon cancelar = new ImageIcon(\"src/Img/deleteIcon.png\");\n ImageIcon cancelar = new ImageIcon(getClass().getResource(\"/Img/deleteIcon.png\"));\n btnCancelar.setIcon(new ImageIcon(cancelar.getImage().getScaledInstance(btnCancelar.getWidth(), btnCancelar.getHeight(), Image.SCALE_SMOOTH)));\n\n }", "public void prepareImagenes(){\n\t\tpreparePersonajes();\n\t\tprepareSorpresas();\n\t\tprepareObjetivos();\n\t\tprepareBloque();\n\t\t\n\t}", "private boolean insertarImagenCrear(JLabel foto, List<Integer> listaFoto, int key) {\n\n listaFoto = new ArrayList<>();\n\n JFileChooser chooser = new JFileChooser();\n chooser.showOpenDialog(null);\n\n String ruta = \"\";\n try {\n ruta += chooser.getSelectedFile().getPath();\n } catch (Exception e) {\n }\n\n if (!ruta.isEmpty() && (ruta.contains(\".jpg\") || ruta.contains(\".png\"))) {\n try {\n FileInputStream fis = new FileInputStream(new File(ruta));\n\n int r = fis.read();\n while (r != -1) {\n listaFoto.add(r);\n r = fis.read();\n }\n\n contenedorLista.put(key, listaFoto);\n\n ImageIcon image = new ImageIcon(ruta);\n Icon icono = new ImageIcon(image.getImage().getScaledInstance(foto1.getWidth() + 20, foto1.getHeight(), Image.SCALE_DEFAULT));\n foto.setIcon(icono);\n\n fis.close();\n return true;\n\n } catch (FileNotFoundException ex) {\n Logger.getLogger(SubirFotos.class.getName()).log(Level.SEVERE, null, ex);\n } catch (IOException ex) {\n Logger.getLogger(SubirFotos.class.getName()).log(Level.SEVERE, null, ex);\n }\n } else {\n JOptionPane.showMessageDialog(this, \"El formato que desea subir no es permitido.\");\n }\n\n return false;\n }" ]
[ "0.6841472", "0.66757727", "0.6289243", "0.62529516", "0.6214377", "0.6189373", "0.61793447", "0.60735935", "0.605882", "0.603995", "0.5975507", "0.596763", "0.59496444", "0.59163344", "0.5905652", "0.5898662", "0.5885543", "0.5798949", "0.579627", "0.5789179", "0.57844377", "0.57778096", "0.5772147", "0.5767551", "0.574751", "0.5747472", "0.57240635", "0.5690867", "0.56691533", "0.56686276", "0.5636691", "0.5627635", "0.56247014", "0.5620069", "0.56135166", "0.56112033", "0.56030077", "0.56000054", "0.5574218", "0.55642974", "0.5547099", "0.5545511", "0.5540272", "0.55396944", "0.5533174", "0.55321217", "0.5527865", "0.5523059", "0.552213", "0.55196625", "0.5511786", "0.5510907", "0.5501079", "0.54994005", "0.54984844", "0.54984236", "0.5495836", "0.54943633", "0.5492663", "0.5492663", "0.54852134", "0.5484342", "0.5481103", "0.5475068", "0.5474463", "0.54736394", "0.5468992", "0.546584", "0.54636633", "0.5463372", "0.5462299", "0.54595566", "0.54592115", "0.5455276", "0.5448454", "0.54466945", "0.54452735", "0.54447085", "0.5432804", "0.5432544", "0.5431848", "0.542498", "0.5422716", "0.54218304", "0.54201376", "0.5411068", "0.5402443", "0.53940773", "0.538887", "0.53876954", "0.5375594", "0.53646904", "0.53583175", "0.53575647", "0.5356598", "0.5350538", "0.53457904", "0.53449225", "0.53442544", "0.5342301" ]
0.54035646
86
TODO cambiar a controlador?
@Override public void mouseClicked(MouseEvent ev) { if(ev.getSource() instanceof PanelImagenRes) { cambiarImagenGrande(((PanelImagenRes)ev.getSource()).getImagenTemp()); imagenTempSeleccionada = ((PanelImagenRes)ev.getSource()).getImagenTemp(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void iniciar() {\n\t\t\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tpublic void conferenceroom() {\n\t\t\n\t}", "public contrustor(){\r\n\t}", "public ControladorCoche() {\n\t}", "protected void aktualisieren() {\r\n\r\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "public void initControles(){\n\n }", "public void buscarGestor(){\r\n\t\t\r\n\t}", "private void limpiarDatos() {\n\t\t\n\t}", "@Override\n\tpublic void credite() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "protected abstract void iniciarModo();", "private stendhal() {\n\t}", "private void getBaseDatos() {\r\n java.awt.EventQueue.invokeLater(new Runnable() {\r\n @Override\r\n public void run() {\r\n new IngresoBaseDeDatos(isAdministrador()).setVisible(true);\r\n }\r\n });\r\n }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "protected void accionUsuario() {\n\t\t\r\n\t}", "private RepositorioOrdemServicoHBM() {\n\n\t}", "public ControladorPanel() { }", "protected void agregarUbicacion(){\n\n\n\n }", "@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}", "private static void cajas() {\n\t\t\n\t}", "protected void onFirstUse() {}", "private RESTBackend()\n\t\t{\n\t\t\t\n\t\t}", "public void reiniciar() {\n // TODO implement here\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}", "public void selecao () {}", "@Override\n\tpublic void iniciarLabores() {\n\t\t\n\t}", "@Override\n\tpublic void iniciarLabores() {\n\t\t\n\t}", "private RefereesInLeagueDBAccess() {\n\n }", "@Override\n\t\tprotected void onPreExecute() \n\t\t{\n\t\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n\tpublic void registrarLlegada() {\n\t\t\n\t}", "@Override\r\n\tpublic void manage() {\n\t\t\r\n\t}", "@Override\n public void memoria() {\n \n }", "private void inizia() throws Exception {\n }", "public void inicializa_controles() {\n bloquea_campos();\n bloquea_botones();\n carga_fecha();\n ocultar_labeles();\n }", "@Override\n\tpublic void ejecutar() {\n\t\tcontrolador.resetPartida();\n\n\t}", "public ControladorPrueba() {\r\n }", "private ConexionBD() {\n\t\testablecerConexion();\n\t}", "public void aplicarDescuento();", "@Override\n public void onStart() {\n \n }", "@Override\n public void onStart() {\n \n }", "private void controladorInicio(Controlador controlador){\n this.inicioRegistro = controlador.getInicioRegistro();\n inicio.setControlRegistro(inicioRegistro);\n this.inicioLogin = controlador.getInicioLogin();\n inicio.setControlLogin(inicioLogin);\n }", "@Override\n protected void execute() {\n \n }", "@Override\n protected void execute() {\n \n }", "private void start() {\n\n\t}", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\t\r\n\t\t\t}", "private ControleurAcceuil(){ }", "public void run() {\n controlador = new Controlador();\n createGUI();\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tpublic void coba() {\n\t\t\n\t}", "public void inizializza() {\n\n /* invoca il metodo sovrascritto della superclasse */\n super.inizializza();\n\n }", "private ControlloFile() {\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\r\n\tprotected void execute() {\r\n\t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t}", "@Override\n\t\t\tpublic void onPreExecute() {\n\t\t\t\t\n\t\t\t}", "public void activar(){\n\n }", "@Override\r\n\tpublic void runn() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "private FlyWithWings(){\n\t\t\n\t}", "@Override\n\t\t\tprotected void onPreExecute()\n\t\t\t{\n\n\t\t\t}", "public void iniciar()\n {\n }", "@Override\n\t\t\tpublic void run() {\n\n\t\t\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n public void execute() {\n \n \n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "private void controladorLogin(Controlador controlador){\n this.contLogin = controlador.getLogin();\n login.setControlContinuar(contLogin);\n }", "@Override\n protected void execute() {\n }", "@Override\n protected void execute() {\n }", "@Override\n protected void execute() {\n }", "@Override\n\tpublic void registrarLlegada() {\n\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n\t\t\t\tpublic void onStart() {\n\t\t\t\t}", "public void inicia() { \r\n\t\tventana=new VentanaMuestraServicios(this);\r\n\t\tventana.abre();\r\n\t}", "public void run() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "public InventarioControlador() {\n }", "private void controladorAdmin(Controlador controlador){\n this.contAdminUsuarios = controlador.getAdminUsuarios();\n inicioAdmin.setControlAdminUsuarios(contAdminUsuarios);\n \n this.contAdminConfig = controlador.getAdminConfig();\n inicioAdmin.setControlAdminConfig(contAdminConfig);\n \n this.contAdminProyectosGuardar = controlador.getAdminProyectosGuardar();\n inicioAdmin.setControlAdminGuardar(contAdminProyectosGuardar);\n }", "@Override\r\n\tprotected void onPreExecute() {\n\t}", "@Override\r\n public void parar(Conexion conexion){\n }", "@Override\r\n\tpublic void start() {\n\t\t\r\n\t}", "public IntroducereDisponibiltate() {\n initComponents();\n \n \n \n \n }", "@Override\n\t\t\tpublic void contectStarted() {\n\n\t\t\t}", "public cambiarContrasenna() {\n initComponents();\n txtNombreUsuario.setEnabled(false);\n inicializarComponentes();\n cargarUsuarios();\n }", "@Override\n\t\tpublic void run() {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void run() {\n\t\t\t\n\t\t}", "Consumable() {\n\t}", "public void logon ()\n {\n ClientResolutionListener clr = new ClientResolutionListener() {\n public void clientResolved (Name username, ClientObject clobj) {\n // fake up a bootstrap; I need to expose the mechanisms in\n // Presents that create it in a network environment\n BootstrapData data = new BootstrapData();\n data.clientOid = clobj.getOid();\n data.services = EditorServer.invmgr.bootlist;\n\n // and configure the client to operate using the server's\n // distributed object manager\n _client.getContext().getClient().gotBootstrap(\n data, EditorServer.omgr);\n }\n\n public void resolutionFailed (Name username, Exception reason) {\n log.log(Level.WARNING, \"Failed to resolve client [who=\" +\n username + \"].\", reason);\n // TODO: display this error\n }\n };\n EditorServer.clmgr.resolveClientObject(new Name(\"editor\"), clr);\n }", "@Override\r\n\t\tprotected void onPreExecute() {\n\t\t}", "public void inizializza() {\n Navigatore nav;\n Portale portale;\n\n super.inizializza();\n\n try { // prova ad eseguire il codice\n\n Modulo modulo = getModuloRisultati();\n modulo.inizializza();\n// Campo campo = modulo.getCampoChiave();\n// campo.setVisibileVistaDefault(false);\n// campo.setPresenteScheda(false);\n// Vista vista = modulo.getVistaDefault();\n// vista.getElement\n// Campo campo = vista.getCampo(modulo.getCampoChiave());\n\n\n\n /* aggiunge il Portale Navigatore al pannello placeholder */\n nav = this.getNavigatore();\n portale = nav.getPortaleNavigatore();\n this.getPanNavigatore().add(portale);\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n }", "protected Doodler() {\n\t}", "@Override\n\t\t\t\t\tpublic void onStart() {\n\n\t\t\t\t\t}", "@Override\n\t protected void onPreExecute() {\n\t }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}" ]
[ "0.6519406", "0.6437212", "0.6357479", "0.6243095", "0.6185739", "0.6151751", "0.6057548", "0.6051332", "0.6034021", "0.59843194", "0.5964827", "0.59464437", "0.5923156", "0.5915548", "0.58616674", "0.5859995", "0.5859995", "0.5830067", "0.5811262", "0.5803135", "0.58022565", "0.5789814", "0.5783912", "0.57762843", "0.5770261", "0.5766176", "0.57654476", "0.575081", "0.575081", "0.5733811", "0.57296735", "0.57296735", "0.57213753", "0.57189", "0.5714325", "0.56845367", "0.5683429", "0.56813955", "0.5671607", "0.5650675", "0.5627449", "0.56260914", "0.56252414", "0.5624979", "0.5608863", "0.5608863", "0.5605877", "0.56044513", "0.55943316", "0.55847156", "0.5579426", "0.5579426", "0.5579252", "0.5578647", "0.557629", "0.5574992", "0.5573415", "0.55705523", "0.5568418", "0.5558632", "0.55577856", "0.55562514", "0.55545956", "0.55542725", "0.5553748", "0.5552466", "0.55503374", "0.5547303", "0.5545507", "0.55443203", "0.55412143", "0.55333596", "0.5529928", "0.55296034", "0.55295646", "0.55295646", "0.55295646", "0.5525405", "0.5522518", "0.55171573", "0.55138266", "0.55137366", "0.5513212", "0.5510107", "0.55031955", "0.5500157", "0.54941475", "0.54941", "0.5485965", "0.548462", "0.54819006", "0.5480034", "0.5480034", "0.54789376", "0.5477918", "0.5475204", "0.5472682", "0.5471071", "0.54710245", "0.5470673", "0.5469942" ]
0.0
-1
Activa y desactiva componentes en base a los checkboxes que se pulsen
@Override public void stateChanged(ChangeEvent ev) { if(ev.getSource()==opFechaDespues) { if(opFechaDespues.isSelected()) { opDiaDespues.setEnabled(true); opMesDespues.setEnabled(true); opAnoDespues.setEnabled(true); }else { opDiaDespues.setEnabled(false); opMesDespues.setEnabled(false); opAnoDespues.setEnabled(false); } }else if(ev.getSource()==opFechaAntes) { if(opFechaAntes.isSelected()) { opDiaAntes.setEnabled(true); opMesAntes.setEnabled(true); opAnoAntes.setEnabled(true); }else { opDiaAntes.setEnabled(false); opMesAntes.setEnabled(false); opAnoAntes.setEnabled(false); } }else if(ev.getSource()==opBuscarSinEtiqueta) { setEnabledParaBusquedaSinEtiquetas(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@FXML\n protected void onCheckBoxSelect(){\n damping.setDisable(schwingungstyp.isSelected());\n dampingFunc.setDisable(schwingungstyp.isSelected());\n }", "private void habilitaCampos() {\n for(java.util.ArrayList<JCheckBox> hijosAux: hijos)\n for(JCheckBox hijo: hijosAux)\n if(!hijo.isSelected())\n hijo.setSelected(true);\n \n }", "@Override\n public void onClick(View v) {\n if(custActiveInactive.isChecked()){\n custHardwareReturned.setChecked(false);\n custHardwareReturned.setEnabled(false);\n custHardwareInstalled.setEnabled(true);\n cust.custActiveInActive = 1;\n }else{\n custHardwareInstalled.setChecked(false);\n custHardwareInstalled.setEnabled(false);\n custHardwareReturned.setEnabled(true);\n cust.custActiveInActive = 0;\n }\n }", "private void activateButtons(){\n limiteBoton.setEnabled(true);\n derivadaBoton.setEnabled(true);\n integralBoton.setEnabled(true);\n}", "private void enableComponents(boolean input){\n jButton11.setEnabled(input);\n jButton12.setEnabled(input);\n jButton13.setEnabled(input);\n jButton21.setEnabled(input);\n jButton22.setEnabled(input);\n jButton23.setEnabled(input);\n jButton31.setEnabled(input);\n jButton32.setEnabled(input);\n jButton33.setEnabled(input);\n jButton2.setEnabled(!input);\n jTextNome.setEditable(!input);\n }", "public void enableCheckBoxes(){\n fallSemCheckBox.setDisable(false);\n springSemCheckBox.setDisable(false);\n summerSemCheckBox.setDisable(false);\n allQtrCheckBox.setDisable(false);\n allMbaCheckBox.setDisable(false);\n allHalfCheckBox.setDisable(false);\n allCampusCheckBox.setDisable(false);\n allHolidayCheckBox.setDisable(false);\n fallSemCheckBox.setDisable(false);\n// allTraTrbCheckBox.setDisable(false);\n selectAllCheckBox.setDisable(false);\n //Set selection for select all check box to true\n selectAllCheckBox.setSelected(true);\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 lblCuerpo = new javax.swing.JLabel();\n jPanel2 = new javax.swing.JPanel();\n ckCabeza = new javax.swing.JCheckBox();\n ckCuello = new javax.swing.JCheckBox();\n ckHombros = new javax.swing.JCheckBox();\n ckBrazos = new javax.swing.JCheckBox();\n ckCodos = new javax.swing.JCheckBox();\n ckManos = new javax.swing.JCheckBox();\n ckPecho = new javax.swing.JCheckBox();\n ckEstomago = new javax.swing.JCheckBox();\n ckEspalda = new javax.swing.JCheckBox();\n ckPiernas = new javax.swing.JCheckBox();\n ckRodillas = new javax.swing.JCheckBox();\n ckPies = new javax.swing.JCheckBox();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setExtendedState(javax.swing.JFrame.MAXIMIZED_BOTH);\n addWindowListener(new java.awt.event.WindowAdapter() {\n public void windowOpened(java.awt.event.WindowEvent evt) {\n formWindowOpened(evt);\n }\n });\n getContentPane().setLayout(new java.awt.BorderLayout());\n\n jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(\"Cuerpo Humano\"));\n jPanel1.setLayout(new java.awt.BorderLayout());\n\n lblCuerpo.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jPanel1.add(lblCuerpo, java.awt.BorderLayout.CENTER);\n\n getContentPane().add(jPanel1, java.awt.BorderLayout.CENTER);\n\n jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(\"Opciones\"));\n jPanel2.setLayout(new java.awt.GridLayout(7, 2, 5, 2));\n\n ckCabeza.setText(\"Cabeza\");\n ckCabeza.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n ckCabezaItemStateChanged(evt);\n }\n });\n jPanel2.add(ckCabeza);\n\n ckCuello.setText(\"Cuello\");\n ckCuello.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n ckCuelloItemStateChanged(evt);\n }\n });\n jPanel2.add(ckCuello);\n\n ckHombros.setText(\"Hombros\");\n ckHombros.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n ckHombrosItemStateChanged(evt);\n }\n });\n jPanel2.add(ckHombros);\n\n ckBrazos.setText(\"Brazos\");\n ckBrazos.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n ckBrazosItemStateChanged(evt);\n }\n });\n jPanel2.add(ckBrazos);\n\n ckCodos.setText(\"Codos\");\n ckCodos.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n ckCodosItemStateChanged(evt);\n }\n });\n jPanel2.add(ckCodos);\n\n ckManos.setText(\"Manos\");\n ckManos.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n ckManosItemStateChanged(evt);\n }\n });\n jPanel2.add(ckManos);\n\n ckPecho.setText(\"Pecho\");\n ckPecho.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n ckPechoItemStateChanged(evt);\n }\n });\n jPanel2.add(ckPecho);\n\n ckEstomago.setText(\"Estomago\");\n ckEstomago.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n ckEstomagoItemStateChanged(evt);\n }\n });\n jPanel2.add(ckEstomago);\n\n ckEspalda.setText(\"Espalda\");\n ckEspalda.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n ckEspaldaItemStateChanged(evt);\n }\n });\n jPanel2.add(ckEspalda);\n\n ckPiernas.setText(\"Piernas\");\n ckPiernas.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n ckPiernasItemStateChanged(evt);\n }\n });\n jPanel2.add(ckPiernas);\n\n ckRodillas.setText(\"Rodillas\");\n ckRodillas.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n ckRodillasItemStateChanged(evt);\n }\n });\n jPanel2.add(ckRodillas);\n\n ckPies.setText(\"Pies\");\n ckPies.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n ckPiesItemStateChanged(evt);\n }\n });\n jPanel2.add(ckPies);\n\n getContentPane().add(jPanel2, java.awt.BorderLayout.EAST);\n\n setSize(new java.awt.Dimension(598, 480));\n setLocationRelativeTo(null);\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n if (jcb_Actividad.getSelectedIndex() == 1) {\n jcb_Maestro.setEnabled(true);\n jcb_Hora_Clase.setEnabled(true);\n jcb_razones.setEnabled(false);\n Limpiar_Maestros();\n Consultar_Maestros();\n\n }\n if (jcb_Actividad.getSelectedIndex() == 0) {\n jcb_Maestro.setEnabled(false);\n jcb_Hora_Clase.setEnabled(false);\n jcb_razones.setEnabled(false);\n Limpiar_Maestros();\n Limpiar_Aulas_Y_Materias();\n }\n if (jcb_Actividad.getSelectedIndex() == 2) {\n\n jcb_Maestro.setEnabled(false);\n jcb_Hora_Clase.setEnabled(false);\n Limpiar_Maestros();\n Limpiar_Aulas_Y_Materias();\n Alumno.Comentarios = jcb_Actividad.getSelectedItem().toString();\n btnEntrar.setEnabled(true);\n }\n if (jcb_Actividad.getSelectedIndex() == 3) {\n\n jcb_Maestro.setEnabled(false);\n jcb_Hora_Clase.setEnabled(false);\n Limpiar_Maestros();\n Limpiar_Aulas_Y_Materias();\n Alumno.Comentarios = jcb_Actividad.getSelectedItem().toString();\n btnEntrar.setEnabled(true);\n }\n\n if (jcb_Actividad.getSelectedIndex() == 4) {\n jcb_razones.setEnabled(true);\n jcb_Maestro.setEnabled(false);\n jcb_Hora_Clase.setEnabled(false);\n Limpiar_Maestros();\n Limpiar_Aulas_Y_Materias();\n// btnEntrar.setEnabled(true);\n }\n }", "@Override\n public void loadPanel () {\n\n // do we need these??\n out_top.load_selected_tab_panel();\n out_bottom.load_selected_tab_panel();\n\n // Q: should do setState on the checkboxes?\n // A: only if flags were changed programatically without doing that,,,,\n\n // old ways....\n //\n // switch (stall_model_type) {\n // case STALL_MODEL_IDEAL_FLOW: \n // bt3.setBackground(Color.yellow);\n // bt4_1.setBackground(Color.white);\n // bt4_2.setBackground(Color.white);\n // break;\n // case STALL_MODEL_DFLT: \n // bt3.setBackground(Color.white);\n // bt4_2.setBackground(Color.white);\n // bt4_1.setBackground(Color.yellow);\n // break;\n // case STALL_MODEL_REFINED: \n // bt3.setBackground(Color.white);\n // bt4_1.setBackground(Color.white);\n // bt4_2.setBackground(Color.yellow);\n // break;\n // }\n // if (ar_lift_corr) {\n // bt6.setBackground(Color.white);\n // bt5.setBackground(Color.yellow);\n // } else {\n // bt5.setBackground(Color.white);\n // bt6.setBackground(Color.yellow);\n // }\n // if (induced_drag_on) {\n // bt8.setBackground(Color.white);\n // bt7.setBackground(Color.yellow);\n // } else {\n // bt7.setBackground(Color.white);\n // bt8.setBackground(Color.yellow);\n // }\n // if (re_corr) {\n // bt10.setBackground(Color.white);\n // bt9.setBackground(Color.yellow);\n // } else {\n // bt9.setBackground(Color.white);\n // bt10.setBackground(Color.yellow);\n // }\n // switch (bdragflag) {\n // case 1: \n // cbt1.setBackground(Color.yellow);\n // cbt2.setBackground(Color.white);\n // cbt3.setBackground(Color.white);\n // break;\n // case 2:\n // cbt2.setBackground(Color.yellow);\n // cbt1.setBackground(Color.white);\n // cbt3.setBackground(Color.white);\n // break;\n // case 3:\n // cbt3.setBackground(Color.yellow);\n // cbt2.setBackground(Color.white);\n // cbt1.setBackground(Color.white);\n // break;\n // }\n // if (stab_aoa_correction) \n // stab_bt_aoa.setBackground(Color.yellow);\n // else\n // stab_bt_aoa.setBackground(Color.white);\n\n // do nto do this, ause stack overflow\n // computeFlowAndRegenPlotAndAdjust();\n // recomp_all_parts();\n }", "@FXML\n void selectChecking(ActionEvent event) {\n \tdirectDep.setSelected(false);\n \tisLoyal.setSelected(false);\n \tdirectDep.setDisable(false);\n \tisLoyal.setDisable(true);\n }", "public void setCheckBoxes() {\n\t\tdeliveredCheckBox.setSelected(order.isDelivered());\n\t\tif (deliveredCheckBox.isSelected() || (!order.isPrepared())) {\n\t\t\tdeliveredCheckBox.setDisable(true);\n\t\t}\n\t}", "private void activarControles(boolean estado) {\n this.panPrincipioActivo.setEnabled(estado);\n this.lblNombre.setEnabled(estado);\n this.txtNombre.setEditable(estado);\n this.lblDescripcion.setEnabled(estado);\n this.txtDescripcion.setEditable(estado);\n this.chkVigente.setEnabled(estado);\n this.btnAceptar.setEnabled(estado);\n this.btnCancelar.setEnabled(estado);\n \n this.panListadoPA.setEnabled(! estado);\n this.tblListadoPA.setEnabled(! estado);\n this.btnNuevo.setEnabled(! estado);\n this.btnModificar.setEnabled(! estado);\n \n if(estado == true){\n this.txtNombre.requestFocusInWindow();\n }else{\n this.tblListadoPA.requestFocusInWindow();\n }\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tif(checkBoxActualizar.isSelected()){\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\ttextnodo.setEnabled(true);\n\t\t\t\t\tcheckBoxEliminar.setEnabled(false);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t\n\t\t\t\t\ttextnodo.setEnabled(false);\n\t\t\t\t\tcheckBoxEliminar.setEnabled(true);\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t}", "private void deActivateButtons(){\n limiteBoton.setEnabled(false);\n derivadaBoton.setEnabled(false);\n integralBoton.setEnabled(false);\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 gripeSim = new javax.swing.JCheckBox();\n gripeNao = new javax.swing.JCheckBox();\n jLabel2 = new javax.swing.JLabel();\n bebidaSim = new javax.swing.JCheckBox();\n bebidaNao = new javax.swing.JCheckBox();\n jLabel3 = new javax.swing.JLabel();\n tatuagemSim = new javax.swing.JCheckBox();\n tatuagemNao = new javax.swing.JCheckBox();\n jLabel4 = new javax.swing.JLabel();\n vacinaSim = new javax.swing.JCheckBox();\n vacinaNao = new javax.swing.JCheckBox();\n jLabel5 = new javax.swing.JLabel();\n herpesSim = new javax.swing.JCheckBox();\n herpesNao = new javax.swing.JCheckBox();\n jLabel6 = new javax.swing.JLabel();\n faSim = new javax.swing.JCheckBox();\n faNao = new javax.swing.JCheckBox();\n jLabel7 = new javax.swing.JLabel();\n jSeparator1 = new javax.swing.JSeparator();\n concluir = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jPanel1.setBackground(new java.awt.Color(255, 255, 255));\n\n jLabel1.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n jLabel1.setText(\"Teve resfriado na semana anterior a doação : \");\n\n gripeSim.setBackground(new java.awt.Color(255, 255, 255));\n gripeSim.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n gripeSim.setText(\"Sim\");\n gripeSim.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n gripeSimActionPerformed(evt);\n }\n });\n\n gripeNao.setBackground(new java.awt.Color(255, 255, 255));\n gripeNao.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n gripeNao.setText(\"Não\");\n gripeNao.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n gripeNaoActionPerformed(evt);\n }\n });\n\n jLabel2.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n jLabel2.setText(\"Ingeriu bebida alcóolica nas últimas 12 horas :\");\n\n bebidaSim.setBackground(new java.awt.Color(255, 255, 255));\n bebidaSim.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n bebidaSim.setText(\"Sim\");\n bebidaSim.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n bebidaSimActionPerformed(evt);\n }\n });\n\n bebidaNao.setBackground(new java.awt.Color(255, 255, 255));\n bebidaNao.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n bebidaNao.setText(\"Não\");\n bebidaNao.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n bebidaNaoActionPerformed(evt);\n }\n });\n\n jLabel3.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n jLabel3.setText(\"Fez tatuagem permanente no último ano :\");\n\n tatuagemSim.setBackground(new java.awt.Color(255, 255, 255));\n tatuagemSim.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n tatuagemSim.setText(\"Sim\");\n tatuagemSim.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n tatuagemSimActionPerformed(evt);\n }\n });\n\n tatuagemNao.setBackground(new java.awt.Color(255, 255, 255));\n tatuagemNao.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n tatuagemNao.setText(\"Não\");\n tatuagemNao.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n tatuagemNaoActionPerformed(evt);\n }\n });\n\n jLabel4.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n jLabel4.setText(\"Tomou vacina para gripe nas últimas 48 horas :\");\n\n vacinaSim.setBackground(new java.awt.Color(255, 255, 255));\n vacinaSim.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n vacinaSim.setText(\"Sim\");\n vacinaSim.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n vacinaSimActionPerformed(evt);\n }\n });\n\n vacinaNao.setBackground(new java.awt.Color(255, 255, 255));\n vacinaNao.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n vacinaNao.setText(\"Não\");\n vacinaNao.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n vacinaNaoActionPerformed(evt);\n }\n });\n\n jLabel5.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n jLabel5.setText(\"Possui herpes labial ou genital :\");\n\n herpesSim.setBackground(new java.awt.Color(255, 255, 255));\n herpesSim.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n herpesSim.setText(\"Sim\");\n herpesSim.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n herpesSimActionPerformed(evt);\n }\n });\n\n herpesNao.setBackground(new java.awt.Color(255, 255, 255));\n herpesNao.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n herpesNao.setText(\"Não\");\n herpesNao.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n herpesNaoActionPerformed(evt);\n }\n });\n\n jLabel6.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n jLabel6.setText(\"Esteve atualmente em (AC AM AP RO RR MA MG PA TO) :\");\n\n faSim.setBackground(new java.awt.Color(255, 255, 255));\n faSim.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n faSim.setText(\"Sim\");\n faSim.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n faSimActionPerformed(evt);\n }\n });\n\n faNao.setBackground(new java.awt.Color(255, 255, 255));\n faNao.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n faNao.setText(\"Não\");\n faNao.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n faNaoActionPerformed(evt);\n }\n });\n\n jLabel7.setFont(new java.awt.Font(\"Georgia\", 0, 18)); // NOI18N\n jLabel7.setText(\"Triagem\");\n\n concluir.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n concluir.setText(\"Concluir\");\n concluir.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n concluirActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(jLabel7)\n .addGap(206, 206, 206))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel3)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 273, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel6)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 16, Short.MAX_VALUE)\n .addComponent(faSim, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(faNao))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel5)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(herpesSim, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(herpesNao))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(gripeSim, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(gripeNao))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(vacinaSim, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(vacinaNao))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(tatuagemSim, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(tatuagemNao))))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addComponent(bebidaSim, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(bebidaNao))))\n .addGap(0, 1, Short.MAX_VALUE))\n .addComponent(jSeparator1, javax.swing.GroupLayout.Alignment.TRAILING))\n .addContainerGap())))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(concluir, javax.swing.GroupLayout.PREFERRED_SIZE, 84, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(195, 195, 195))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel7)\n .addGap(14, 14, 14)\n .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(1, 1, 1)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(gripeSim)\n .addComponent(gripeNao))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(bebidaSim)\n .addComponent(bebidaNao))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(tatuagemSim)\n .addComponent(tatuagemNao))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(vacinaSim)\n .addComponent(vacinaNao))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(herpesSim)\n .addComponent(herpesNao))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(faSim)\n .addComponent(faNao))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(concluir, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(17, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif(cb_EN.isChecked()) {\n\t\t\t\t\tcb_EN.setChecked(true);\n\t\t\t\t\tcb_EN.setClickable(false);\n\t\t\t\t\t\n\t\t\t\t\tcb_VN.setChecked(false);\n\t\t\t\t\tcb_VN.setClickable(true);\n\t\t\t\t} else {\n\t\t\t\t\tcb_EN.setChecked(true);\n\t\t\t\t\tcb_EN.setClickable(false);\n\t\t\t\t\t\n\t\t\t\t\tcb_VN.setChecked(false);\n\t\t\t\t\tcb_VN.setClickable(true);\n\t\t\t\t}\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\n\t\t\t\t\n\t\t\t\tif(cb_VN.isChecked()) {\n\t\t\t\t\tcb_VN.setChecked(true);\n\t\t\t\t\tcb_VN.setClickable(false);\n\t\t\t\t\t\n\t\t\t\t\tcb_EN.setChecked(false);\n\t\t\t\t\tcb_EN.setClickable(true);\n\t\t\t\t} else {\n\t\t\t\t\tcb_VN.setChecked(true);\n\t\t\t\t\tcb_VN.setClickable(false);\n\t\t\t\t\t\n\t\t\t\t\tcb_EN.setChecked(false);\n\t\t\t\t\tcb_EN.setClickable(true);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}", "private void cambiarBloqueoCampos(boolean bloqueo) {\n btnNuevoCliente.setEnabled(!bloqueo);\n btnEditarCliente.setEnabled(!bloqueo);\n cmbDatosCliente.setEnabled(!bloqueo);\n btnGuardarCliente.setEnabled(bloqueo);\n btnCancelar.setEnabled(bloqueo);\n\n\n\n for (int i = 0; i < pnlIzquierdo.getComponentCount(); i++) {\n WebPanel pnlIz = (WebPanel) pnlIzquierdo.getComponent(i);\n for (Component c : pnlIz.getComponents()) {\n c.setEnabled(bloqueo);\n }\n }\n for (int i = 0; i < pnlDerecho.getComponentCount(); i++) {\n WebPanel pnlIz = (WebPanel) pnlDerecho.getComponent(i);\n for (Component c : pnlIz.getComponents()) {\n c.setEnabled(bloqueo);\n }\n }\n }", "public void itemStateChanged(ItemEvent check) {\r\n\r\n // Process the reaction class checkboxes. First\r\n // get the components of the relevant panels\r\n // and store in Component arrays (Note: the method\r\n // getComponents() is inherited from the Container\r\n // class by the subclass Panel).\r\n\r\n Component [] components4 = panel4.getComponents();\r\n Component [] components5 = panel5.getComponents();\r\n\r\n // Now process these components that are checkboxes\r\n // (only the first element of each array is). First cast the\r\n // Component to a Checkbox. Then use the getState()\r\n // method of Checkbox to return boolean true if\r\n // checked and false otherwise.\r\n\r\n Checkbox cb4 = (Checkbox)components4[0]; // Checkbox for panel4\r\n Checkbox cb5 = (Checkbox)components5[0]; // Checkbox for panel5\r\n\r\n // Then use the getState() method of Checkbox to\r\n // return boolean true if checked and false otherwise.\r\n // Use this logic to disable one or the other sets of\r\n // choices for temperature and density input.\r\n\r\n if( cb4.getState() ) {\r\n checkBox[1].setState(false); // Seems needed despite CheckBoxGroup\r\n rho.disable();\r\n rho.setBackground(disablebgColor);\r\n rhoL.setForeground(disablefgColor);\r\n T9.disable();\r\n T9.setBackground(disablebgColor);\r\n T9L.setForeground(disablefgColor);\r\n profile.enable();\r\n profile.setBackground(panelBackColor);\r\n profileL.setForeground(panelForeColor);\r\n } else if ( cb5.getState() ) {\r\n checkBox[0].setState(false);\r\n rho.enable();\r\n rho.setBackground(panelBackColor);\r\n rhoL.setForeground(panelForeColor);\r\n T9.enable();\r\n T9.setBackground(panelBackColor);\r\n T9L.setForeground(panelForeColor);\r\n profile.disable();\r\n profile.setBackground(disablebgColor);\r\n profileL.setForeground(disablefgColor);\r\n }\r\n }", "public void enable(){\r\n\t\tthis.activ = true;\r\n\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t\tif(cb_EN.isChecked()) {\n\t\t\t\t\tcb_EN.setChecked(true);\n\t\t\t\t\tcb_EN.setClickable(false);\n\t\t\t\t\t\n\t\t\t\t\tcb_VN.setChecked(false);\n\t\t\t\t\tcb_VN.setClickable(true);\n\t\t\t\t} else {\n\t\t\t\t\tcb_EN.setChecked(true);\n\t\t\t\t\tcb_EN.setClickable(false);\n\t\t\t\t\t\n\t\t\t\t\tcb_VN.setChecked(false);\n\t\t\t\t\tcb_VN.setClickable(true);\n\t\t\t\t}\n\t\t\t}", "public void DisableCheckBox(ActionEvent event) throws Exception {\n\n if (!SavingRB.isSelected()) {//if savings is not selected than disable specials acc check box\n SpecialSavingAccCB.setSelected(false);\n SpecialSavingAccCB.setDisable(true);\n } else SpecialSavingAccCB.setDisable(false);\n\n if (!CheckingRB.isSelected()) {//if checkings is not selected than disable direct deposit check boc\n DirectDepositCheckingsCB.setSelected(false);\n DirectDepositCheckingsCB.setDisable(true);\n } else DirectDepositCheckingsCB.setDisable(false);\n\n if (CloseAccRB.isSelected()) {//if and else if to disable textfields based on bank options\n AmountInput.setDisable(true);\n DateInput.setDisable(true);\n } else if (DepositRB.isSelected() || WithdrawAccRB.isSelected()) {\n AmountInput.setDisable(false);\n DateInput.setDisable(true);\n } else {\n AmountInput.setDisable(false);\n DateInput.setDisable(false);\n }\n\n\n }", "private void moikhoacontrol(boolean b) {\n\t\tbtnSua.setEnabled(b);\n\t\tbtnluu.setEnabled(b);\n\t\tbtnxoa.setEnabled(b);\n\t\tbtnThoat.setEnabled(b);\n\t\tbtnTim.setEnabled(b);\n\t\t\n\t}", "private void initComponents() {//GEN-BEGIN:initComponents\r\n jPanel1 = new javax.swing.JPanel();\r\n jLabel1 = new javax.swing.JLabel();\r\n jPanel2 = new javax.swing.JPanel();\r\n cgCheckBox = new javax.swing.JCheckBox();\r\n auCheckBox = new javax.swing.JCheckBox();\r\n guCheckBox = new javax.swing.JCheckBox();\r\n jPanel4 = new javax.swing.JPanel();\r\n aaCheckBox = new javax.swing.JCheckBox();\r\n acCheckBox = new javax.swing.JCheckBox();\r\n agCheckBox = new javax.swing.JCheckBox();\r\n ccCheckBox = new javax.swing.JCheckBox();\r\n cuCheckBox = new javax.swing.JCheckBox();\r\n ggCheckBox = new javax.swing.JCheckBox();\r\n uuCheckBox = new javax.swing.JCheckBox();\r\n\r\n getContentPane().setLayout(new javax.swing.BoxLayout(getContentPane(), javax.swing.BoxLayout.Y_AXIS));\r\n\r\n jPanel1.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));\r\n\r\n jLabel1.setText(\"Basepairs to include:\");\r\n jPanel1.add(jLabel1);\r\n\r\n getContentPane().add(jPanel1);\r\n\r\n cgCheckBox.setSelected(true);\r\n cgCheckBox.setText(\"C-G\");\r\n jPanel2.add(cgCheckBox);\r\n\r\n auCheckBox.setSelected(true);\r\n auCheckBox.setText(\"A-U\");\r\n jPanel2.add(auCheckBox);\r\n\r\n guCheckBox.setSelected(true);\r\n guCheckBox.setText(\"G-U\");\r\n jPanel2.add(guCheckBox);\r\n\r\n getContentPane().add(jPanel2);\r\n\r\n aaCheckBox.setText(\"A-A\");\r\n jPanel4.add(aaCheckBox);\r\n\r\n acCheckBox.setText(\"A-C\");\r\n jPanel4.add(acCheckBox);\r\n\r\n agCheckBox.setText(\"A-G\");\r\n jPanel4.add(agCheckBox);\r\n\r\n ccCheckBox.setText(\"C-C\");\r\n jPanel4.add(ccCheckBox);\r\n\r\n cuCheckBox.setText(\"C-U\");\r\n jPanel4.add(cuCheckBox);\r\n\r\n ggCheckBox.setText(\"G-G\");\r\n jPanel4.add(ggCheckBox);\r\n\r\n uuCheckBox.setText(\"U-U\");\r\n jPanel4.add(uuCheckBox);\r\n\r\n getContentPane().add(jPanel4);\r\n }", "public void actualizarVista() {\n /*CheckBox cbxTiempoMeteorologico = (CheckBox) findViewById(R.id.cbxTiempoMeteorologicoprefRest);\n if (generalPreference.getWeather() == 1)\n cbxTiempoMeteorologico.setChecked(true);*/\n CheckBox cbxTerraza = (CheckBox) findViewById(R.id.cbxPoseeTerrazapref);\n if (generalPreference.getTerrace() == 1)\n cbxTerraza.setChecked(true);\n CheckBox cbxFreshFood = (CheckBox) findViewById(R.id.cbxFreshFoodPref);\n if (generalPreference.getFreshFood() == 1)\n cbxFreshFood.setChecked(true);\n CheckBox cbxCleaning = (CheckBox) findViewById(R.id.cbxCleaningPref);\n if (generalPreference.getCleaning() == 1)\n cbxCleaning.setChecked(true);\n }", "private void eventoSuperficie(){\n s1.setChecked(true);\n s2.setChecked(false);\n s3.setChecked(false);\n esquema.setImageDrawable(getResources().getDrawable(R.drawable.np3));\n PosicionBarrasReactor.setPosicionActual(PosicionBarrasReactor.SUPERFICIE);\n }", "private void setActiveActions() {\n\t\tnewBinaryContext.setEnabled(true);\n\t\tnewValuedContext.setEnabled(true);\n\t\tnewNestedContext.setEnabled(true);\n\t\topenContext.setEnabled(true);\n\t\tsaveContext.setEnabled(true);\n\t\tsaveAsContext.setEnabled(true);\n\t\tsaveAllContexts.setEnabled(true);\n\t\tcloseContext.setEnabled(true);\n\t\tcloseAllContexts.setEnabled(true);\n\t\tquitViewer.setEnabled(true);\n\n\t\tif (contextPanes.size() == 0) {\n\t\t\t/* Boutons de la toolbar */\n\t\t\tsaveBtn.setEnabled(false);\n\t\t\topenBtn.setEnabled(true);\n\t\t\tnewBinCtxBtn.setEnabled(true);\n\t\t\tremoveCtxBtn.setEnabled(false);\n\t\t\tnewAttributeBtn.setEnabled(false);\n\t\t\tnewObjectBtn.setEnabled(false);\n\t\t\tdelAttributeBtn.setEnabled(false);\n\t\t\tdelObjectBtn.setEnabled(false);\n\t\t\tshowLatBtn.setEnabled(false);\n\t\t\tshowRulesBtn.setEnabled(false);\n\n\t\t\t/* Elements du menu \"Edit\" */\n\t\t\taddEmptyLevel.setEnabled(false);\n\t\t\taddContextLevel.setEnabled(false);\n\t\t\tremoveLevel.setEnabled(false);\n\t\t\torderLevels.setEnabled(false);\n\t\t\taddObject.setEnabled(false);\n\t\t\taddAttribute.setEnabled(false);\n\t\t\tmergeAttributes.setEnabled(false);\n\t\t\tlogicalAttribute.setEnabled(false);\n\t\t\tcompareAttributes.setEnabled(false);\n\t\t\tremoveObject.setEnabled(false);\n\t\t\tremoveAttribute.setEnabled(false);\n\t\t\tcreateClusters.setEnabled(false);\n\t\t\tconvertToBinary.setEnabled(false);\n\t\t\tconvertToNested.setEnabled(false);\n\n\t\t\t/* Elements du menu \"Lattice\" */\n\t\t\tshowLatticeMenu.setEnabled(false);\n\n\t\t\t/* Elements du menu \"Rules\" */\n\t\t\tshowRulesMenu.setEnabled(false);\n\t\t\treturn;\n\t\t}\n\n\t\tContextTableScrollPane selectedPane = contextPanes\n\t\t\t\t.elementAt(currentContextIdx);\n\t\tContext currentContext = ((ContextTableModel) selectedPane\n\t\t\t\t.getContextTable().getModel()).getContext();\n\n\t\tif (currentContext instanceof NestedContext) {\n\t\t\t/* Boutons de la toolbar */\n\t\t\tsaveBtn.setEnabled(true);\n\t\t\topenBtn.setEnabled(true);\n\t\t\tnewBinCtxBtn.setEnabled(true);\n\t\t\tremoveCtxBtn.setEnabled(true);\n\t\t\tnewAttributeBtn.setEnabled(false);\n\t\t\tnewObjectBtn.setEnabled(false);\n\t\t\tdelAttributeBtn.setEnabled(false);\n\t\t\tdelObjectBtn.setEnabled(false);\n\t\t\tshowLatBtn.setEnabled(true);\n\t\t\tshowRulesBtn.setEnabled(true);\n\n\t\t\t/* Elements du menu \"Edit\" */\n\t\t\taddEmptyLevel.setEnabled(true);\n\t\t\taddContextLevel.setEnabled(true);\n\t\t\tremoveLevel.setEnabled(true);\n\t\t\torderLevels.setEnabled(true);\n\t\t\taddObject.setEnabled(false);\n\t\t\taddAttribute.setEnabled(false);\n\t\t\tmergeAttributes.setEnabled(false);\n\t\t\tlogicalAttribute.setEnabled(false);\n\t\t\tcompareAttributes.setEnabled(false);\n\t\t\tremoveObject.setEnabled(false);\n\t\t\tremoveAttribute.setEnabled(false);\n\t\t\tcreateClusters.setEnabled(false);\n\t\t\tconvertToBinary.setEnabled(true);\n\t\t\tconvertToNested.setEnabled(false);\n\n\t\t\t/* Elements du menu \"Lattice\" */\n\t\t\tshowLatticeMenu.setEnabled(true);\n\n\t\t\t/* Elements du menu \"Rules\" */\n\t\t\tshowRulesMenu.setEnabled(true);\n\t\t}\n\n\t\telse if (currentContext instanceof BinaryContext) {\n\t\t\t/* Boutons de la toolbar */\n\t\t\tsaveBtn.setEnabled(true);\n\t\t\topenBtn.setEnabled(true);\n\t\t\tnewBinCtxBtn.setEnabled(true);\n\t\t\tremoveCtxBtn.setEnabled(true);\n\t\t\tnewAttributeBtn.setEnabled(true);\n\t\t\tnewObjectBtn.setEnabled(true);\n\t\t\tdelAttributeBtn.setEnabled(true);\n\t\t\tdelObjectBtn.setEnabled(true);\n\t\t\tshowLatBtn.setEnabled(true);\n\t\t\tshowRulesBtn.setEnabled(true);\n\n\t\t\t/* Elements du menu \"Edit\" */\n\t\t\taddEmptyLevel.setEnabled(false);\n\t\t\taddContextLevel.setEnabled(false);\n\t\t\tremoveLevel.setEnabled(false);\n\t\t\torderLevels.setEnabled(false);\n\t\t\taddObject.setEnabled(true);\n\t\t\taddAttribute.setEnabled(true);\n\t\t\tmergeAttributes.setEnabled(true);\n\t\t\tlogicalAttribute.setEnabled(true);\n\t\t\tremoveObject.setEnabled(true);\n\t\t\tremoveAttribute.setEnabled(true);\n\t\t\tcreateClusters.setEnabled(true);\n\t\t\tcompareAttributes.setEnabled(true);\n\t\t\tconvertToBinary.setEnabled(false);\n\t\t\tconvertToNested.setEnabled(true);\n\n\t\t\t/* Elements du menu \"Lattice\" */\n\t\t\tshowLatticeMenu.setEnabled(true);\n\n\t\t\t/* Elements du menu \"Rules\" */\n\t\t\tshowRulesMenu.setEnabled(true);\n\t\t}\n\n\t\telse if (currentContext instanceof ValuedContext) {\n\t\t\t/* Boutons de la toolbar */\n\t\t\tsaveBtn.setEnabled(true);\n\t\t\topenBtn.setEnabled(true);\n\t\t\tnewBinCtxBtn.setEnabled(true);\n\t\t\tremoveCtxBtn.setEnabled(true);\n\t\t\tnewAttributeBtn.setEnabled(true);\n\t\t\tnewObjectBtn.setEnabled(true);\n\t\t\tdelAttributeBtn.setEnabled(true);\n\t\t\tdelObjectBtn.setEnabled(true);\n\t\t\tshowLatBtn.setEnabled(false);\n\t\t\tshowRulesBtn.setEnabled(false);\n\n\t\t\t/* Elements du menu \"Edit\" */\n\t\t\taddEmptyLevel.setEnabled(false);\n\t\t\taddContextLevel.setEnabled(false);\n\t\t\tremoveLevel.setEnabled(false);\n\t\t\torderLevels.setEnabled(false);\n\t\t\taddObject.setEnabled(true);\n\t\t\taddAttribute.setEnabled(true);\n\t\t\tmergeAttributes.setEnabled(true);\n\t\t\tlogicalAttribute.setEnabled(false);\n\t\t\tcompareAttributes.setEnabled(false);\n\t\t\tremoveObject.setEnabled(true);\n\t\t\tremoveAttribute.setEnabled(true);\n\t\t\tcreateClusters.setEnabled(false);\n\t\t\tconvertToBinary.setEnabled(true);\n\t\t\tconvertToNested.setEnabled(false);\n\n\t\t\t/* Elements du menu \"Lattice\" */\n\t\t\tshowLatticeMenu.setEnabled(false);\n\n\t\t\t/* Elements du menu \"Rules\" */\n\t\t\tshowRulesMenu.setEnabled(false);\n\t\t}\n\n\t\telse {\n\t\t\t/* Boutons de la toolbar */\n\t\t\tsaveBtn.setEnabled(false);\n\t\t\topenBtn.setEnabled(false);\n\t\t\tnewBinCtxBtn.setEnabled(false);\n\t\t\tremoveCtxBtn.setEnabled(false);\n\t\t\tnewAttributeBtn.setEnabled(false);\n\t\t\tnewObjectBtn.setEnabled(false);\n\t\t\tdelAttributeBtn.setEnabled(false);\n\t\t\tdelObjectBtn.setEnabled(false);\n\t\t\tshowLatBtn.setEnabled(false);\n\t\t\tshowRulesBtn.setEnabled(false);\n\n\t\t\t/* Elements du menu \"Edit\" */\n\t\t\taddEmptyLevel.setEnabled(false);\n\t\t\taddContextLevel.setEnabled(false);\n\t\t\tremoveLevel.setEnabled(false);\n\t\t\torderLevels.setEnabled(false);\n\t\t\taddObject.setEnabled(false);\n\t\t\taddAttribute.setEnabled(false);\n\t\t\tmergeAttributes.setEnabled(false);\n\t\t\tlogicalAttribute.setEnabled(false);\n\t\t\tcompareAttributes.setEnabled(false);\n\t\t\tremoveObject.setEnabled(false);\n\t\t\tremoveAttribute.setEnabled(false);\n\t\t\tcreateClusters.setEnabled(false);\n\t\t\tconvertToBinary.setEnabled(false);\n\t\t\tconvertToNested.setEnabled(false);\n\n\t\t\t/* Elements du menu \"Lattice\" */\n\t\t\tshowLatticeMenu.setEnabled(false);\n\n\t\t\t/* Elements du menu \"Rules\" */\n\t\t\tshowRulesMenu.setEnabled(false);\n\t\t}\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jButton1 = new javax.swing.JButton();\n screenControlBox = new javax.swing.JCheckBox();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);\n setName(\"Form\"); // NOI18N\n setResizable(false);\n\n org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(com.ben.chat.client.views.ClientChatApp.class).getContext().getResourceMap(ScreenSharingPrefView.class);\n jButton1.setText(resourceMap.getString(\"jButton1.text\")); // NOI18N\n jButton1.setName(\"jButton1\"); // NOI18N\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n screenControlBox.setText(resourceMap.getString(\"screenControlBox.text\")); // NOI18N\n screenControlBox.setName(\"screenControlBox\"); // NOI18N\n screenControlBox.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n screenControlBoxActionPerformed(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(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(screenControlBox, javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(24, 24, 24))))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap(15, Short.MAX_VALUE)\n .addComponent(screenControlBox)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE))\n );\n\n pack();\n }", "private void configureEnableButtons() {\r\n\t\ttglbtnBirthdays.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tif (e.getSource() == tglbtnBirthdays) {\r\n\t\t\t\t\tif (tglbtnBirthdays.isSelected()) {\r\n\t\t\t\t\t\ttglbtnBirthdays.setText(\"Disable\");\r\n\t\t\t\t\t\ttheSender.setBirthdayTemplate(emailStorage.getTemplate(templateBirthday));\r\n\t\t\t\t\t\ttheSender.runBirthdaySetUp();\r\n\t\t\t\t\t\ttheSender.resumeSendingBirthdays();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!tglbtnBirthdays.isSelected()) {\r\n\t\t\t\t\t\ttglbtnBirthdays.setText(\"Enable\");\r\n\t\t\t\t\t\ttheSender.stopSendingBirthdays();\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\ttglbtnAnniv.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tif (e.getSource() == tglbtnAnniv) {\r\n\t\t\t\t\tif (tglbtnAnniv.isSelected()) {\r\n\t\t\t\t\t\ttglbtnAnniv.setText(\"Disable\");\r\n\t\t\t\t\t\ttheSender.setAnnivTemplate(emailStorage.getTemplate(templateAnniv));\r\n\t\t\t\t\t\ttheSender.runAnnivSetUp();\r\n\t\t\t\t\t\ttheSender.resumeSendingAnniv();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!tglbtnAnniv.isSelected()) {\r\n\t\t\t\t\t\ttglbtnAnniv.setText(\"Enable\");\r\n\t\t\t\t\t\ttheSender.stopSendingAnniv();\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}", "private void setButton(boolean a) {\n//Vo hieu hoac co hieu luc cho cac JButton\n this.btnCourseAdd.setEnabled(a);\n this.btnCourseDelete.setEnabled(a);\n this.btnCourseEdit.setEnabled(a);\n this.btnCourseSave.setEnabled(!a);\n this.btnCourseReport.setEnabled(!a);\n this.btnCourseReset.setEnabled(!a);\n this.btnCourseClose.setEnabled(a);\n }", "public void inhabilitaPanel() {\n\n\t\t//comboNombreCarta.setEnabled(false);\n\t\tjScrollPane1.setEnabled(false);\n\t\tjScrollPane1.getVerticalScrollBar().setEnabled(false);\n\t\tjScrollPane1.getHorizontalScrollBar().setEnabled(false);\n\t\tjScrollPane2.setEnabled(false);\n\t\tjScrollPane2.getVerticalScrollBar().setEnabled(false);\n\t\tjScrollPane2.getHorizontalScrollBar().setEnabled(false);\n\t\tlistaSeleccionadas.setEnabled(false);\n\t\tlistaDisponibles.setEnabled(false);\n\t\tlabelFondo.setEnabled(false);\n\t\ttextoNumeroCartas.setEnabled(false);\n\t\ttextoRaza.setEnabled(false);\n\t\tbotCargar.setEnabled(false);\n\t\tbotGuardar.setEnabled(false);\n\t\tbotGuardarComo.setEnabled(false);\n\t\tbotSalir.setEnabled(false);\n\t\tbotAyuda.setEnabled(false);\n\t\tbotNuevaBaraja.setEnabled(false);\n\t\ttextoBarajaCargada.setEnabled(false);\n\t\tthis.panelFondo.setEnabled(false);\n\t\tlabelImagen.setEnabled(false);\n this.NumeroPuntos.setEnabled(false);\n\n\t}", "public void actionPerformed(ActionEvent evt) {\n Object source = evt.getSource();\n\n if (source instanceof JCheckBoxMenuItem) {\n if ((JCheckBoxMenuItem) source == disableAll) {\n if (disableAll.isSelected()) {\n allocation.setSelected(false);\n remaining.setSelected(false);\n observability.setSelected(false);\n zoneOfAvoidance.setSelected(false);\n } else {\n allocation.setSelected(true);\n remaining.setSelected(true);\n observability.setSelected(true);\n zoneOfAvoidance.setSelected(true);\n }\n } else {\n disableAll.setSelected(false);\n }\n\n localQuerytool.setAllocationConstraint(!allocation.isSelected());\n localQuerytool.setRemainingConstraint(!remaining.isSelected());\n localQuerytool.setObservabilityConstraint(\n !observability.isSelected());\n localQuerytool.setZoneOfAvoidanceConstraint(\n !zoneOfAvoidance.isSelected());\n if (allocation.isSelected() && remaining.isSelected()\n && observability.isSelected()\n && zoneOfAvoidance.isSelected()) {\n // If all selected - set to green light\n URL url = ClassLoader.getSystemResource(\"green_light1.gif\");\n ImageIcon icon = new ImageIcon(url);\n InfoPanel.searchButton.setIcon(icon);\n table.setBackground(Color.WHITE);\n\n } else if (!allocation.isSelected() && !remaining.isSelected()\n && !observability.isSelected()\n && !zoneOfAvoidance.isSelected()) {\n // No constraints disabled - set to red\n URL url = ClassLoader.getSystemResource(\"red_light1.gif\");\n ImageIcon icon = new ImageIcon(url);\n InfoPanel.searchButton.setIcon(icon);\n table.setBackground(Color.RED.darker());\n\n } else {\n // Some constraints disabled - set to amber\n URL url = ClassLoader.getSystemResource(\"amber_light1.gif\");\n ImageIcon icon = new ImageIcon(url);\n InfoPanel.searchButton.setIcon(icon);\n table.setBackground(Color.YELLOW.darker());\n }\n } else if (source instanceof JMenuItem) {\n JMenuItem thisItem = (JMenuItem) source;\n String thisText = thisItem.getText();\n\n if (INDEX.equalsIgnoreCase(thisText)) {\n new HelpPage();\n\n } else if (ABOUT.equalsIgnoreCase(thisText)) {\n String version = System.getProperty(\"version\", \"unknown\");\n JOptionPane.showMessageDialog(null,\n \"Build corresponds to Git commit : \\n\" + version);\n\n } else if (RELOAD_CAL.equalsIgnoreCase(thisText)) {\n calibrationMenu.reload();\n\n } else if (EXIT.equalsIgnoreCase(thisText)) {\n exitQT();\n\n } else if (COLUMNS.equalsIgnoreCase(thisText)) {\n new ColumnSelector(this);\n\n } else if (LOG.equalsIgnoreCase(thisText)) {\n LogViewer viewer = new LogViewer();\n viewer.showLog(System.getProperty(\"QT_LOG_DIR\") + \"/QT.log\");\n\n } else if (INFRA_RED.equalsIgnoreCase(thisText)) {\n infoPanel.getSatPanel().setDisplay(thisItem.getText());\n\n } else if (WATER_VAPOUR.equalsIgnoreCase(thisText)) {\n infoPanel.getSatPanel().setDisplay(thisItem.getText());\n }\n } else if (source instanceof JButton) {\n JButton thisButton = (JButton) source;\n\n if (thisButton.getText().equals(EXIT)) {\n exitQT();\n } else {\n logger.debug(\"Popup send MSB\");\n performSendToStagingArea();\n }\n }\n }", "@Override\n\tpublic void BloquerCasesPlateau()\n\t{\n\t\tfor (Component bouton : this.unTableau.getComponents())\n\t\t\tbouton.setEnabled(false);\n\t\t\n\t\tthis.unTableau.updateUI();\n\t\t\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tcheckboxsActionPerformed(evt);\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t\tif(cb_VN.isChecked()) {\n\t\t\t\t\tcb_VN.setChecked(true);\n\t\t\t\t\tcb_VN.setClickable(false);\n\t\t\t\t\t\n\t\t\t\t\tcb_EN.setChecked(false);\n\t\t\t\t\tcb_EN.setClickable(true);\n\t\t\t\t} else {\n\t\t\t\t\tcb_VN.setChecked(true);\n\t\t\t\t\tcb_VN.setClickable(false);\n\t\t\t\t\t\n\t\t\t\t\tcb_EN.setChecked(false);\n\t\t\t\t\tcb_EN.setClickable(true);\n\t\t\t\t}\n\t\t\t}", "public void lockCheckboxes(ArrayList<CheckBox> boxes){\n for(CheckBox box: this.boxes){\n box.disableProperty().set(true);\n }\n }", "public void actionPerformed(ActionEvent arg0) {\n if (chckbxNewCheckBox.isSelected() == true) {\r\n // set the other checkbox to unchecked\r\n chckbxNewCheckBox_1.setSelected(false);\r\n // enable the combox box drop down\r\n comboBox.setEnabled(true);\r\n // disable the textfield for the user input\r\n textField_3.setEnabled(false);\r\n textField_3.setText(\"\");\r\n // enable the refresh rooms button\r\n btnNewButton.setEnabled(true);\r\n }\r\n }", "@Override\n public void toggle() {\n checkBox.toggle();\n }", "public void habilitaPanel() {\n\n\t\tthis.panelFondo.setEnabled(true);\n\t\tlabelImagen.setEnabled(true);\n\t\t//comboNombreCarta.setEnabled(true);\n\t\tthis.jScrollPane1.setEnabled(true);\n\t\tthis.jScrollPane1.getVerticalScrollBar().setEnabled(true);\n\t\tjScrollPane1.getHorizontalScrollBar().setEnabled(true);\n\t\tthis.jScrollPane2.setEnabled(true);\n\t\tthis.jScrollPane2.getVerticalScrollBar().setEnabled(true);\n\t\tjScrollPane2.getHorizontalScrollBar().setEnabled(true);\n\t\tlistaSeleccionadas.setEnabled(true);\n\t\tlistaDisponibles.setEnabled(true);\n\t\tthis.labelFondo.setEnabled(true);\n\t\ttextoNumeroCartas.setEnabled(true);\n\t\ttextoRaza.setEnabled(true);\n\t\tbotCargar.setEnabled(true);\n\t\tbotGuardar.setEnabled(true);\n\t\tbotGuardarComo.setEnabled(true);\n\t\tbotSalir.setEnabled(true);\n\t\tbotAyuda.setEnabled(true);\n\t\tbotNuevaBaraja.setEnabled(true);\n\t\ttextoBarajaCargada.setEnabled(true);\n\t\tthis.setEnabled(true);\n this.NumeroPuntos.setEnabled(true);\n\n\t}", "private void enableControls(boolean b) {\n\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jb_exit = new javax.swing.JButton();\n jPanel1 = new javax.swing.JPanel();\n jcb_showAxes = new javax.swing.JCheckBox();\n jPanel3 = new javax.swing.JPanel();\n jcb_spotLight = new javax.swing.JCheckBox();\n jcb_directionalLight = new javax.swing.JCheckBox();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jb_exit.setMnemonic('X');\n jb_exit.setText(\"Exit\");\n jb_exit.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jb_exitActionPerformed(evt);\n }\n });\n\n jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)), \"Axes\"));\n\n jcb_showAxes.setSelected(true);\n jcb_showAxes.setText(\"Show Axes\");\n jcb_showAxes.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jcb_showAxesActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jcb_showAxes)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jcb_showAxes)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)), \"Lights\"));\n\n jcb_spotLight.setSelected(true);\n jcb_spotLight.setText(\"Spot\");\n jcb_spotLight.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jcb_spotLightActionPerformed(evt);\n }\n });\n\n jcb_directionalLight.setSelected(true);\n jcb_directionalLight.setText(\"Directional\");\n jcb_directionalLight.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jcb_directionalLightActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);\n jPanel3.setLayout(jPanel3Layout);\n jPanel3Layout.setHorizontalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jcb_spotLight)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jcb_directionalLight)\n .addContainerGap(13, Short.MAX_VALUE))\n );\n jPanel3Layout.setVerticalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jcb_spotLight)\n .addComponent(jcb_directionalLight))\n .addContainerGap())\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jb_exit)\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(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(135, 135, 135)\n .addComponent(jb_exit)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n pack();\n }", "private void advancedClicked()\r\n {\r\n if (advancedBox.isSelected() == false)\r\n {\r\n putWizardData(\"UsingBlackList\", \"false\");\r\n saveButton.setEnabled(false);\r\n whiteLabel.setEnabled(false);\r\n blackWords.setEnabled(false);\r\n blackWords.setOpaque(false);\r\n btnLoad.setEnabled(false);\r\n btnSave.setEnabled(false); \r\n }\r\n if (advancedBox.isSelected() == true)\r\n {\r\n putWizardData(\"UsingBlackList\", \"true\");\r\n \r\n // Reset the state \"saved\" in the wizard to false\r\n putWizardData(\"blacksaved\", \"false\");\r\n saveButton.setEnabled(true);\r\n whiteLabel.setEnabled(true);\r\n blackWords.setEnabled(true);\r\n blackWords.setOpaque(true);\r\n btnLoad.setEnabled(true);\r\n btnSave.setEnabled(true); \r\n }\r\n }", "private void setMultipleChecks() {\r\n\r\n checkNemenyi.setEnabled(true);\r\n checkShaffer.setEnabled(true);\r\n checkBergman.setEnabled(true);\r\n\r\n checkIman.setEnabled(true);\r\n checkHolm.setEnabled(true);\r\n }", "public void actionPerformed(ActionEvent arg0) {\n if (chckbxNewCheckBox_1.isSelected() == true) {\r\n // set the other checkbox to unchecked\r\n chckbxNewCheckBox.setSelected(false);\r\n // disable the combox box drop down\r\n comboBox.setEnabled(false);\r\n // enable the textfield for the user input\r\n textField_3.setEnabled(true);\r\n textField_3.setText(\"\");\r\n // disable the refresh rooms button\r\n btnNewButton.setEnabled(false);\r\n }\r\n }", "private void initComponents() {\n\n buttonGroup1 = new javax.swing.ButtonGroup();\n buttonGroup2 = new javax.swing.ButtonGroup();\n jPanel1 = new javax.swing.JPanel();\n bct1 = new javax.swing.JCheckBox();\n bct2 = new javax.swing.JCheckBox();\n bct3 = new javax.swing.JCheckBox();\n bct4 = new javax.swing.JCheckBox();\n bct5 = new javax.swing.JCheckBox();\n bct6 = new javax.swing.JCheckBox();\n bct7 = new javax.swing.JCheckBox();\n bct8 = new javax.swing.JCheckBox();\n bct9 = new javax.swing.JCheckBox();\n bct10 = new javax.swing.JCheckBox();\n bct27 = new javax.swing.JCheckBox();\n bct28 = new javax.swing.JCheckBox();\n bct11 = new javax.swing.JCheckBox();\n bct12 = new javax.swing.JCheckBox();\n bct13 = new javax.swing.JCheckBox();\n bct14 = new javax.swing.JCheckBox();\n bct16 = new javax.swing.JCheckBox();\n bct15 = new javax.swing.JCheckBox();\n bct17 = new javax.swing.JCheckBox();\n bct18 = new javax.swing.JCheckBox();\n bct19 = new javax.swing.JCheckBox();\n bct26 = new javax.swing.JCheckBox();\n bct25 = new javax.swing.JCheckBox();\n bct21 = new javax.swing.JCheckBox();\n bct20 = new javax.swing.JCheckBox();\n bct24 = new javax.swing.JCheckBox();\n bct23 = new javax.swing.JCheckBox();\n bct22 = new javax.swing.JCheckBox();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jPanel3 = new javax.swing.JPanel();\n jScrollPane2 = new javax.swing.JScrollPane();\n jList1 = new javax.swing.JList<>();\n jPanel4 = new javax.swing.JPanel();\n jScrollPane3 = new javax.swing.JScrollPane();\n jList2 = new javax.swing.JList<>();\n jScrollPane1 = new javax.swing.JScrollPane();\n jTable1 = new javax.swing.JTable();\n jLabel1 = new javax.swing.JLabel();\n day1 = new javax.swing.JRadioButton();\n day2 = new javax.swing.JRadioButton();\n day3 = new javax.swing.JRadioButton();\n day4 = new javax.swing.JRadioButton();\n day5 = new javax.swing.JRadioButton();\n day6 = new javax.swing.JRadioButton();\n day7 = new javax.swing.JRadioButton();\n jComboBox1 = new javax.swing.JComboBox<>();\n\n buttonGroup1.add(day1);\n buttonGroup1.add(day2);\n buttonGroup1.add(day3);\n buttonGroup1.add(day4);\n buttonGroup1.add(day5);\n buttonGroup1.add(day6);\n buttonGroup1.add(day7);\n\n buttonGroup2.add(bct1);\n buttonGroup2.add(bct2);\n buttonGroup2.add(bct3);\n buttonGroup2.add(bct4);\n buttonGroup2.add(bct5);\n buttonGroup2.add(bct6);\n buttonGroup2.add(bct7);\n buttonGroup2.add(bct8);\n buttonGroup2.add(bct9);\n buttonGroup2.add(bct10);\n buttonGroup2.add(bct11);\n buttonGroup2.add(bct12);\n buttonGroup2.add(bct13);\n buttonGroup2.add(bct14);\n buttonGroup2.add(bct15);\n buttonGroup2.add(bct16);\n buttonGroup2.add(bct17);\n buttonGroup2.add(bct18);\n buttonGroup2.add(bct19);\n buttonGroup2.add(bct20);\n buttonGroup2.add(bct21);\n buttonGroup2.add(bct22);\n buttonGroup2.add(bct23);\n buttonGroup2.add(bct24);\n buttonGroup2.add(bct25);\n buttonGroup2.add(bct26);\n buttonGroup2.add(bct27);\n buttonGroup2.add(bct28);\n \n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"Yelp Tool\");\n\n bct1.setText(\"Active Life\");\n bct1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n bct1ActionPerformed(evt);\n }\n });\n\n bct2.setText(\"Arts & Entertainment\");\n bct2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n bct2ActionPerformed(evt);\n }\n });\n\n bct3.setText(\"Automotive\");\n bct3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n bct3ActionPerformed(evt);\n }\n });\n\n bct4.setText(\"Car Rental\");\n bct4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n bct4ActionPerformed(evt);\n }\n });\n\n bct5.setText(\"Cafes\");\n bct5.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n bct5ActionPerformed(evt);\n }\n });\n\n bct6.setText(\"Beauty & Spas\");\n bct6.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n bct6ActionPerformed(evt);\n }\n });\n\n bct7.setText(\"Convenience Stores\");\n bct7.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n bct7ActionPerformed(evt);\n }\n });\n \n bct8.setText(\"Dentists\");\n bct8.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n bct8ActionPerformed(evt);\n }\n });\n \n bct9.setText(\"Doctors\");\n bct9.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n bct9ActionPerformed(evt);\n }\n });\n \n bct10.setText(\"Drugstores\");\n bct10.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n bct10ActionPerformed(evt);\n }\n });\n\n\n bct11.setText(\"Department Stores\");\n bct11.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n bct11ActionPerformed(evt);\n }\n });\n\n bct12.setText(\"Education\");\n bct12.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n bct12ActionPerformed(evt);\n }\n });\n \n bct13.setText(\"Event Planning & Services\");\n bct13.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n bct13ActionPerformed(evt);\n }\n });\n \n bct14.setText(\"Flowers & Gifts\");\n bct14.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n bct14ActionPerformed(evt);\n }\n });\n \n bct15.setText(\"Food\");\n bct15.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n bct15ActionPerformed(evt);\n }\n });\n \n bct16.setText(\"Health & Medical\");\n bct16.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n bct16ActionPerformed(evt);\n }\n });\n \n bct17.setText(\"Home Services\");\n bct17.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n bct17ActionPerformed(evt);\n }\n });\n \n bct18.setText(\"Home & Garden\");\n bct18.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n bct18ActionPerformed(evt);\n }\n });\n \n bct19.setText(\"Hospitals\");\n bct19.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n bct19ActionPerformed(evt);\n }\n });\n \n bct20.setText(\"Hotels & Travel\");\n bct20.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n bct20ActionPerformed(evt);\n }\n });\n \n bct21.setText(\"Hardware Stores\");\n bct21.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n bct21ActionPerformed(evt);\n }\n });\n \n bct22.setText(\"Grocery\");\n bct22.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n bct22ActionPerformed(evt);\n }\n });\n \n bct23.setText(\"Medical Centers\");\n bct23.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n bct23ActionPerformed(evt);\n }\n });\n \n bct24.setText(\"Nurseries & Gardening\");\n bct24.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n bct24ActionPerformed(evt);\n }\n });\n \n bct25.setText(\"Nightlife\");\n bct25.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n bct25ActionPerformed(evt);\n }\n });\n \n bct26.setText(\"Restaurants\");\n bct26.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n bct26ActionPerformed(evt);\n }\n });\n \n bct27.setText(\"Shopping\");\n bct27.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n bct27ActionPerformed(evt);\n }\n });\n \n bct28.setText(\"Transportation\");\n bct28.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n bct28ActionPerformed(evt);\n }\n });\n\n \n org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(bct1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .add(bct2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .add(bct3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .add(bct4, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .add(bct5, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .add(bct6, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .add(bct7, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .add(bct8, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .add(bct9, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .add(bct10, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .add(bct27, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .add(bct28, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .add(bct11, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .add(bct12, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .add(bct13, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .add(bct14, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .add(bct16, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .add(bct15, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .add(bct17, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .add(bct18, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .add(bct19, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .add(bct26, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .add(bct25, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .add(bct21, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .add(bct20, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .add(bct24, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .add(bct23, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .add(bct22, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addContainerGap())\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(jPanel1Layout.createSequentialGroup()\n .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .add(bct1)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(bct2)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(bct3)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(bct4)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(bct5)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(bct6)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(bct7)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(bct8)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(bct9)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(bct10)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(bct11)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(bct12)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(bct13)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(bct14)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(bct15)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(bct16)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(bct17)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(bct18)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(bct19)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(bct20)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(bct21)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(bct22)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(bct23)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(bct24)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(bct25)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(bct26)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(bct27)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(bct28))\n );\n\n jButton1.setText(\"Close\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jButton2.setText(\"I'm feeling lucky!\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n jPanel3.setLayout(new java.awt.BorderLayout());\n\n jList1.addListSelectionListener(new javax.swing.event.ListSelectionListener() {\n public void valueChanged(javax.swing.event.ListSelectionEvent evt) {\n jList1ValueChanged(evt);\n }\n });\n \n jScrollPane2.setViewportView(jList1);\n\n jPanel3.add(jScrollPane2, java.awt.BorderLayout.LINE_START);\n\n jScrollPane3.setViewportView(jList2);\n \n jList2.addListSelectionListener(new javax.swing.event.ListSelectionListener() {\n public void valueChanged(javax.swing.event.ListSelectionEvent evt) {\n jList2ValueChanged(evt);\n }\n });\n\n org.jdesktop.layout.GroupLayout jPanel4Layout = new org.jdesktop.layout.GroupLayout(jPanel4);\n jPanel4.setLayout(jPanel4Layout);\n jPanel4Layout.setHorizontalGroup(\n jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(jScrollPane3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 318, Short.MAX_VALUE)\n );\n jPanel4Layout.setVerticalGroup(\n jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(jScrollPane3)\n );\n\n jTable1.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n \"Business ID\", \"Business Name\", \"City\", \"State\", \"Rating\"\n }\n ) {\n Class[] types = new Class [] {\n \t\tjava.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.Double.class\n };\n\n public Class getColumnClass(int columnIndex) {\n return types [columnIndex];\n }\n });\n jScrollPane1.setViewportView(jTable1);\n jTable1.getSelectionModel().addListSelectionListener( new javax.swing.event.ListSelectionListener() {\n public void valueChanged(javax.swing.event.ListSelectionEvent evt) {\n jTable1ValueChanged(evt);\n }\n });\n jTable1.removeColumn(jTable1.getColumnModel().getColumn(0));\n\n jLabel1.setText(\"Day Open:\");\n\n day1.setText(\"Monday\");\n day1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n day1ActionPerformed(evt);\n }\n });\n\n day2.setText(\"Tuesday\");\n day2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n day2ActionPerformed(evt);\n }\n });\n\n day3.setText(\"Wednesday\");\n day3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n day3ActionPerformed(evt);\n }\n });\n\n day4.setText(\"Thursday\");\n day4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n day4ActionPerformed(evt);\n }\n });\n\n day5.setText(\"Friday\");\n day5.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n day5ActionPerformed(evt);\n }\n });\n \n day6.setText(\"Saturday\");\n day6.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n day6ActionPerformed(evt);\n }\n });\n \n day7.setText(\"Sunday\");\n day7.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n day7ActionPerformed(evt);\n }\n });\n\n jComboBox1.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Any Attribute\", \"All Attributes\" }));\n jComboBox1.addActionListener(new java.awt.event.ActionListener() {\n \tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n \t\tjComboBox1ActionPerformed(evt);\n \t}\n });\n \n org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(layout.createSequentialGroup()\n .addContainerGap()\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(layout.createSequentialGroup()\n .add(jLabel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 101, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)\n .add(day1)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(day2)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(day3)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(day4)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(day5)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(day6)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(day7)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .add(jComboBox1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(136, 136, 136)\n .add(jButton2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 121, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(18, 18, 18)\n .add(jButton1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 118, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(19, 19, 19))\n .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()\n .add(jPanel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(jPanel3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)\n .add(jPanel4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 619, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(layout.createSequentialGroup()\n .addContainerGap()\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(jPanel3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .add(layout.createSequentialGroup()\n .add(jPanel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(0, 78, Short.MAX_VALUE))\n .add(jScrollPane1)\n .add(jPanel4, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(day1)\n .add(day2)\n .add(day3)\n .add(day4)\n .add(day5)\n .add(day6)\n .add(day7)\n .add(jLabel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .add(jComboBox1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(5, 5, 5))\n .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(jButton1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 45, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(jButton2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 45, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap())\n );\n\n pack();\n }", "public void selectCheckBoxes(){\n fallSemCheckBox.setSelected(true);\n springSemCheckBox.setSelected(true);\n summerSemCheckBox.setSelected(true);\n allQtrCheckBox.setSelected(true);\n allMbaCheckBox.setSelected(true);\n allHalfCheckBox.setSelected(true);\n allCampusCheckBox.setSelected(true);\n allHolidayCheckBox.setSelected(true);\n fallSemCheckBox.setSelected(true);\n// allTraTrbCheckBox.setSelected(true);\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tJToggleButton x = (JToggleButton) e.getSource();\n\t\t\t\tif(x.isSelected()){\n\t\t\t\t\tif(host_txtfield.getText().trim().isEmpty()){\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please provide a hostname\", \"Lock Settings\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tif(port_txtfield.getText().trim().isEmpty()){\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please provide a port\", \"Lock Settings\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tif(dbname_txtfield.getText().trim().isEmpty()){\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please provide a database name\", \"Lock Settings\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\thost_txtfield.setEnabled(false);\n\t\t\t\t\tport_txtfield.setEnabled(false);\n\t\t\t\t\tdbname_txtfield.setEnabled(false);\n\t\t\t\t\tuseLocalSettings_checkBox.setEnabled(false);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tif(!useLocalSettings_checkBox.isSelected()){\n\t\t\t\t\t\thost_txtfield.setEnabled(true);\n\t\t\t\t\t\tport_txtfield.setEnabled(true);\n\t\t\t\t\t}\n\t\t\t\t\tdbname_txtfield.setEnabled(true);\n\t\t\t\t\tuseLocalSettings_checkBox.setEnabled(true);\n\t\t\t\t}\n\t\t\t}", "public void setActive(){\n paycheckController.setActive();\n }", "private void ctrlPuasar() {\n btnIniciar.setEnabled(true);\n btnPausar.setEnabled(false);\n\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jifCotizarPrecios = new javax.swing.JInternalFrame();\n jifServicios = new javax.swing.JInternalFrame();\n chcBaño = new java.awt.Checkbox();\n chcMotilada = new java.awt.Checkbox();\n chcProfilaxis = new java.awt.Checkbox();\n jifTamaños = new javax.swing.JInternalFrame();\n chcPequeño = new java.awt.Checkbox();\n chcMediano = new java.awt.Checkbox();\n chcGrande = new java.awt.Checkbox();\n btnCotizacion = new javax.swing.JButton();\n jMenuBar1 = new javax.swing.JMenuBar();\n mnuInicio = new javax.swing.JMenu();\n mnuSalir = new javax.swing.JMenuItem();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jifCotizarPrecios.setResizable(true);\n jifCotizarPrecios.setTitle(\"COTIZACIÓN DE PRECIOS\");\n jifCotizarPrecios.setVisible(true);\n\n jifServicios.setResizable(true);\n jifServicios.setTitle(\"LISTADO DE SERVICIOS\");\n jifServicios.setVisible(true);\n\n chcBaño.setLabel(\"BAÑO\");\n\n chcMotilada.setLabel(\"MOTILADO\");\n\n chcProfilaxis.setLabel(\"PROFILAXIS\");\n\n javax.swing.GroupLayout jifServiciosLayout = new javax.swing.GroupLayout(jifServicios.getContentPane());\n jifServicios.getContentPane().setLayout(jifServiciosLayout);\n jifServiciosLayout.setHorizontalGroup(\n jifServiciosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jifServiciosLayout.createSequentialGroup()\n .addGap(25, 25, 25)\n .addGroup(jifServiciosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(chcProfilaxis, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(chcMotilada, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(chcBaño, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addContainerGap(30, Short.MAX_VALUE))\n );\n jifServiciosLayout.setVerticalGroup(\n jifServiciosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jifServiciosLayout.createSequentialGroup()\n .addGap(26, 26, 26)\n .addComponent(chcBaño, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(chcMotilada, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(chcProfilaxis, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(96, Short.MAX_VALUE))\n );\n\n jifTamaños.setResizable(true);\n jifTamaños.setTitle(\"LISTADO DE TAMAÑOS\");\n jifTamaños.setVisible(true);\n\n chcPequeño.setLabel(\"PEQUEÑO\");\n\n chcMediano.setLabel(\"MEDIANO\");\n\n chcGrande.setLabel(\"GRANDE\");\n\n javax.swing.GroupLayout jifTamañosLayout = new javax.swing.GroupLayout(jifTamaños.getContentPane());\n jifTamaños.getContentPane().setLayout(jifTamañosLayout);\n jifTamañosLayout.setHorizontalGroup(\n jifTamañosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jifTamañosLayout.createSequentialGroup()\n .addContainerGap(29, Short.MAX_VALUE)\n .addGroup(jifTamañosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(chcGrande, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(chcMediano, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(chcPequeño, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(26, 26, 26))\n );\n jifTamañosLayout.setVerticalGroup(\n jifTamañosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jifTamañosLayout.createSequentialGroup()\n .addGap(25, 25, 25)\n .addComponent(chcPequeño, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(chcMediano, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(chcGrande, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n btnCotizacion.setText(\"COTIZAR\");\n btnCotizacion.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnCotizacionActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jifCotizarPreciosLayout = new javax.swing.GroupLayout(jifCotizarPrecios.getContentPane());\n jifCotizarPrecios.getContentPane().setLayout(jifCotizarPreciosLayout);\n jifCotizarPreciosLayout.setHorizontalGroup(\n jifCotizarPreciosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jifCotizarPreciosLayout.createSequentialGroup()\n .addGap(87, 87, 87)\n .addComponent(jifServicios, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(65, 65, 65)\n .addComponent(jifTamaños, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(84, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jifCotizarPreciosLayout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btnCotizacion, javax.swing.GroupLayout.PREFERRED_SIZE, 111, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(215, 215, 215))\n );\n jifCotizarPreciosLayout.setVerticalGroup(\n jifCotizarPreciosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jifCotizarPreciosLayout.createSequentialGroup()\n .addGap(43, 43, 43)\n .addGroup(jifCotizarPreciosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jifTamaños)\n .addComponent(jifServicios))\n .addGap(27, 27, 27)\n .addComponent(btnCotizacion, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(85, Short.MAX_VALUE))\n );\n\n mnuInicio.setText(\"INICIO\");\n\n mnuSalir.setText(\"SALIR\");\n mnuSalir.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n mnuSalirActionPerformed(evt);\n }\n });\n mnuInicio.add(mnuSalir);\n\n jMenuBar1.add(mnuInicio);\n\n setJMenuBar(jMenuBar1);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(66, Short.MAX_VALUE)\n .addComponent(jifCotizarPrecios, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(71, 71, 71))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(52, 52, 52)\n .addComponent(jifCotizarPrecios, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jCheckBox13 = new javax.swing.JCheckBox();\n jCheckBox5 = new javax.swing.JCheckBox();\n jCheckBox3 = new javax.swing.JCheckBox();\n jCheckBox4 = new javax.swing.JCheckBox();\n jCheckBox15 = new javax.swing.JCheckBox();\n jCheckBox14 = new javax.swing.JCheckBox();\n jCheckBox17 = new javax.swing.JCheckBox();\n jCheckBox9 = new javax.swing.JCheckBox();\n jButton1 = new javax.swing.JButton();\n jCheckBox16 = new javax.swing.JCheckBox();\n jCheckBox8 = new javax.swing.JCheckBox();\n jLabel2 = new javax.swing.JLabel();\n jCheckBox19 = new javax.swing.JCheckBox();\n jCheckBox7 = new javax.swing.JCheckBox();\n jCheckBox1 = new javax.swing.JCheckBox();\n jCheckBox18 = new javax.swing.JCheckBox();\n jCheckBox6 = new javax.swing.JCheckBox();\n jCheckBox2 = new javax.swing.JCheckBox();\n jLabel3 = new javax.swing.JLabel();\n jCheckBox12 = new javax.swing.JCheckBox();\n jCheckBox11 = new javax.swing.JCheckBox();\n jCheckBox10 = new javax.swing.JCheckBox();\n jLabel1 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setName(\"Form\"); // NOI18N\n\n org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(carparkaplication.CarParkAplicationApp.class).getContext().getResourceMap(SetopenTimeD.class);\n jCheckBox13.setText(resourceMap.getString(\"jCheckBox13.text\")); // NOI18N\n jCheckBox13.setName(\"jCheckBox13\"); // NOI18N\n\n jCheckBox5.setText(resourceMap.getString(\"jCheckBox5.text\")); // NOI18N\n jCheckBox5.setName(\"jCheckBox5\"); // NOI18N\n\n jCheckBox3.setText(resourceMap.getString(\"jCheckBox3.text\")); // NOI18N\n jCheckBox3.setName(\"jCheckBox3\"); // NOI18N\n\n jCheckBox4.setText(resourceMap.getString(\"jCheckBox4.text\")); // NOI18N\n jCheckBox4.setName(\"jCheckBox4\"); // NOI18N\n\n jCheckBox15.setText(resourceMap.getString(\"jCheckBox15.text\")); // NOI18N\n jCheckBox15.setName(\"jCheckBox15\"); // NOI18N\n\n jCheckBox14.setText(resourceMap.getString(\"jCheckBox14.text\")); // NOI18N\n jCheckBox14.setName(\"jCheckBox14\"); // NOI18N\n\n jCheckBox17.setText(resourceMap.getString(\"jCheckBox17.text\")); // NOI18N\n jCheckBox17.setName(\"jCheckBox17\"); // NOI18N\n\n jCheckBox9.setText(resourceMap.getString(\"jCheckBox9.text\")); // NOI18N\n jCheckBox9.setName(\"jCheckBox9\"); // NOI18N\n\n javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(carparkaplication.CarParkAplicationApp.class).getContext().getActionMap(SetopenTimeD.class, this);\n jButton1.setAction(actionMap.get(\"ok_clicked\")); // NOI18N\n jButton1.setText(resourceMap.getString(\"jButton1.text\")); // NOI18N\n jButton1.setName(\"jButton1\"); // NOI18N\n\n jCheckBox16.setText(resourceMap.getString(\"jCheckBox16.text\")); // NOI18N\n jCheckBox16.setName(\"jCheckBox16\"); // NOI18N\n\n jCheckBox8.setText(resourceMap.getString(\"jCheckBox8.text\")); // NOI18N\n jCheckBox8.setName(\"jCheckBox8\"); // NOI18N\n\n jLabel2.setText(resourceMap.getString(\"jLabel2.text\")); // NOI18N\n jLabel2.setName(\"jLabel2\"); // NOI18N\n\n jCheckBox19.setText(resourceMap.getString(\"jCheckBox19.text\")); // NOI18N\n jCheckBox19.setName(\"jCheckBox19\"); // NOI18N\n\n jCheckBox7.setText(resourceMap.getString(\"jCheckBox7.text\")); // NOI18N\n jCheckBox7.setName(\"jCheckBox7\"); // NOI18N\n\n jCheckBox1.setText(resourceMap.getString(\"jCheckBox1.text\")); // NOI18N\n jCheckBox1.setName(\"jCheckBox1\"); // NOI18N\n\n jCheckBox18.setText(resourceMap.getString(\"jCheckBox18.text\")); // NOI18N\n jCheckBox18.setName(\"jCheckBox18\"); // NOI18N\n\n jCheckBox6.setText(resourceMap.getString(\"jCheckBox6.text\")); // NOI18N\n jCheckBox6.setName(\"jCheckBox6\"); // NOI18N\n\n jCheckBox2.setText(resourceMap.getString(\"jCheckBox2.text\")); // NOI18N\n jCheckBox2.setName(\"jCheckBox2\"); // NOI18N\n\n jLabel3.setText(resourceMap.getString(\"jLabel3.text\")); // NOI18N\n jLabel3.setName(\"jLabel3\"); // NOI18N\n\n jCheckBox12.setText(resourceMap.getString(\"jCheckBox12.text\")); // NOI18N\n jCheckBox12.setName(\"jCheckBox12\"); // NOI18N\n\n jCheckBox11.setText(resourceMap.getString(\"jCheckBox11.text\")); // NOI18N\n jCheckBox11.setName(\"jCheckBox11\"); // NOI18N\n\n jCheckBox10.setText(resourceMap.getString(\"jCheckBox10.text\")); // NOI18N\n jCheckBox10.setName(\"jCheckBox10\"); // NOI18N\n\n jLabel1.setFont(resourceMap.getFont(\"jLabel1.font\")); // NOI18N\n jLabel1.setText(resourceMap.getString(\"jLabel1.text\")); // NOI18N\n jLabel1.setName(\"jLabel1\"); // 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 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jCheckBox8)\n .addComponent(jCheckBox1)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jCheckBox13)\n .addComponent(jLabel3)\n .addComponent(jCheckBox18))\n .addGap(1, 1, 1)))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(25, 25, 25)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jCheckBox2)\n .addComponent(jCheckBox11)))\n .addGroup(layout.createSequentialGroup()\n .addGap(18, 18, 18)\n .addComponent(jCheckBox19))\n .addGroup(layout.createSequentialGroup()\n .addGap(18, 18, 18)\n .addComponent(jCheckBox14)))\n .addGap(21, 21, 21)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addComponent(jCheckBox15)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jCheckBox16))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jCheckBox3)\n .addGap(18, 18, 18)\n .addComponent(jCheckBox4))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jCheckBox12)\n .addGap(18, 18, 18)\n .addComponent(jCheckBox9))))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jCheckBox5)\n .addComponent(jCheckBox10))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jCheckBox7)\n .addComponent(jCheckBox6)))\n .addComponent(jCheckBox17)))))))\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 .addContainerGap()\n .addComponent(jLabel1)\n .addGap(28, 28, 28)\n .addComponent(jLabel2)\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jCheckBox2)\n .addComponent(jCheckBox3)\n .addComponent(jCheckBox4)\n .addComponent(jCheckBox5)\n .addComponent(jCheckBox6)\n .addComponent(jCheckBox1))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jCheckBox10)\n .addComponent(jCheckBox7)\n .addComponent(jCheckBox8)\n .addComponent(jCheckBox11)\n .addComponent(jCheckBox12)\n .addComponent(jCheckBox9))\n .addGap(18, 18, 18)\n .addComponent(jLabel3)\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jCheckBox13)\n .addComponent(jCheckBox15)\n .addComponent(jCheckBox16)\n .addComponent(jCheckBox17)\n .addComponent(jCheckBox14))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 16, Short.MAX_VALUE)\n .addComponent(jButton1)\n .addGap(34, 34, 34))\n .addGroup(layout.createSequentialGroup()\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jCheckBox18)\n .addComponent(jCheckBox19))\n .addContainerGap())))\n );\n\n pack();\n }", "public static void setEnabled(JPanel jpanel, boolean boo) {\n for (int i = 0; i < jpanel.getComponentCount(); i++) {\n if (jpanel.getComponent(i).getClass().equals(txtTexto.class)) {\n jpanel.getComponent(i).setEnabled(boo);\n continue;\n }\n if (jpanel.getComponent(i).getClass().equals(txtCodigo.class)) {\n jpanel.getComponent(i).setEnabled(boo);\n continue;\n }\n if (jpanel.getComponent(i).getClass().equals(txtNumeros.class)) {\n jpanel.getComponent(i).setEnabled(boo);\n continue;\n }\n if (jpanel.getComponent(i).getClass().equals(txtFecha.class)) {\n jpanel.getComponent(i).setEnabled(boo);\n continue;\n }\n if (jpanel.getComponent(i).getClass().equals(txtCelular.class)) {\n jpanel.getComponent(i).setEnabled(boo);\n continue;\n }\n if (jpanel.getComponent(i).getClass().equals(txtTelefono.class)) {\n jpanel.getComponent(i).setEnabled(boo);\n continue;\n }\n if (jpanel.getComponent(i).getClass().equals(txtNumerosFormato.class)) {\n jpanel.getComponent(i).setEnabled(boo);\n continue;\n }\n if (jpanel.getComponent(i).getClass().equals(combo.class)) {\n jpanel.getComponent(i).setEnabled(boo);\n continue;\n }\n if (jpanel.getComponent(i).getClass().equals(JComboBox.class)) {\n jpanel.getComponent(i).setEnabled(boo);\n continue;\n }\n if (jpanel.getComponent(i).getClass().equals(JRadioButton.class)) {\n jpanel.getComponent(i).setEnabled(boo);\n continue;\n }\n if (jpanel.getComponent(i).getClass().equals(JCheckBox.class)) {\n jpanel.getComponent(i).setEnabled(boo);\n continue;\n }\n if (jpanel.getComponent(i).getClass().equals(txtHoraHMS.class)) {\n jpanel.getComponent(i).setEnabled(boo);\n continue;\n }\n if (jpanel.getComponent(i).getClass().equals(txtPassword.class)) {\n jpanel.getComponent(i).setEnabled(boo);\n continue;\n }\n\n if (jpanel.getComponent(i).getClass().equals(JButton.class)) {\n jpanel.getComponent(i).setEnabled(boo);\n continue;\n }\n if (jpanel.getComponent(i).getClass().equals(JTextField.class)) {\n jpanel.getComponent(i).setEnabled(boo);\n continue;\n }\n if (jpanel.getComponent(i).getClass().equals(JPasswordField.class)) {\n jpanel.getComponent(i).setEnabled(boo);\n continue;\n }\n if (jpanel.getComponent(i).getClass().equals(JFormattedTextField.class)) {\n jpanel.getComponent(i).setEnabled(boo);\n }\n }\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(checkBoxEliminar.isSelected()){\t\t\t\t\t\n\t\t\t\t\ttextnodo.setEnabled(true);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tcheckBoxActualizar.setEnabled(false);\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t\n\t\t\t\t\ttextnodo.setEnabled(false);\n\t\t\t\t\t\n\t\t\t\t\tcheckBoxActualizar.setEnabled(true);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t}", "private void setEnableComponents(){\r\n awardAddDocumentForm.cmbDocumentType.setEnabled(true);\r\n awardAddDocumentForm.txtDescription.setEditable(true);\r\n awardAddDocumentForm.txtFileName.setEditable(false);\r\n awardAddDocumentForm.btnUpload.setEnabled(true);\r\n awardAddDocumentForm.btnOk.setEnabled(true);\r\n awardAddDocumentForm.btnCancel.setEnabled(true);\r\n awardAddDocumentForm.btnView.setEnabled(false);\r\n }", "private void disableComponents() {\r\n maintainSponsorHierarchyBaseWindow.btnChangeGroupName.setEnabled(false);\r\n maintainSponsorHierarchyBaseWindow.btnCreateNewGroup.setEnabled(false);\r\n maintainSponsorHierarchyBaseWindow.btnDelete.setEnabled(false);\r\n maintainSponsorHierarchyBaseWindow.btnMoveDown.setEnabled(false);\r\n maintainSponsorHierarchyBaseWindow.btnMoveUp.setEnabled(false);\r\n maintainSponsorHierarchyBaseWindow.btnSave.setEnabled(false);\r\n maintainSponsorHierarchyBaseWindow.btnPanel.setEnabled(false);\r\n maintainSponsorHierarchyBaseWindow.btnPanel.setSelected(false);\r\n maintainSponsorHierarchyBaseWindow.mnuItmChangeGroupName.setEnabled(false);\r\n maintainSponsorHierarchyBaseWindow.mnuItmCreateNewGroup.setEnabled(false);\r\n maintainSponsorHierarchyBaseWindow.mnuItmDelete.setEnabled(false);\r\n maintainSponsorHierarchyBaseWindow.mnuItmMoveDown.setEnabled(false);\r\n maintainSponsorHierarchyBaseWindow.mnuItmMoveUp.setEnabled(false);\r\n maintainSponsorHierarchyBaseWindow.mnuItmSave.setEnabled(false);\r\n maintainSponsorHierarchyBaseWindow.mnuItmPanel.setEnabled(false);\r\n maintainSponsorHierarchyBaseWindow.mnuItmPanel.setSelected(false);\r\n }", "public void inhabilitaPanel() {\n\t\t// contentPane.setEnabled(false);\n\t\tpanelPrincipal.setEnabled(false);\n\t\tpanelBotones.setEnabled(false);\n\t\tboton1Jugador.setEnabled(false);\n\t\tbotonJuegoRed.setEnabled(false);\n\t\tbotonEditar.setEnabled(false);\n\t\tbotonDemo.setEnabled(false);\n\t\tbotonReglas.setEnabled(false);\n\t\tbotonAyuda.setEnabled(false);\n\t\tbotonRecibir.setEnabled(false);\n\t\tbotonEnviar.setEnabled(false);\n\t\tbotonDescargaSobre.setEnabled(false);\n\t\tbotonSalir.setEnabled(false);\n\t\tlabelFondo.setEnabled(false);\n\t\tlabelDibujo.setEnabled(false);\n\n\t}", "public gui() {\n initComponents();\n jCheckBox1.setVisible(false);\n jCheckBox10.setVisible(false);\n jCheckBox2.setVisible(false);\n jCheckBox3.setVisible(false);\n jCheckBox4.setVisible(false);\n jCheckBox5.setVisible(false);\n jCheckBox6.setVisible(false);\n jCheckBox7.setVisible(false);\n jCheckBox8.setVisible(false);\n jCheckBox9.setVisible(false);\n \n }", "@FXML\n void checkboxManualAutomatic(ActionEvent event) {\n \tif (autoModeAlgo == null) {\n \t\tthrow new NullPointerException(\"MainGuiController.checkboxManualAutomatic() autoModeAlgo == null\");\n \t}\n \t\n \t//check checkbox state, if checked enable button, otherwise disable. The elevator can only be sent to a floor if in manual mode. \n \tif(checkbox_manual_mode.isSelected()) {\n \t\t//disable the automatic mode -> enable manual mode\n \t\tautoModeAlgo.disable(selectedElevator);\n \t\tbutton_send_to_floor.setDisable(false);\n \t}\n \telse {\n \t\tautoModeAlgo.enable(selectedElevator);\n \t\tbutton_send_to_floor.setDisable(true);\n \t}\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 cb_editar = new javax.swing.JCheckBox();\n jPanel2 = new javax.swing.JPanel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {\n public void mouseDragged(java.awt.event.MouseEvent evt) {\n formMouseDragged(evt);\n }\n });\n addMouseListener(new java.awt.event.MouseAdapter() {\n public void mousePressed(java.awt.event.MouseEvent evt) {\n formMousePressed(evt);\n }\n });\n\n jPanel1.setLayout(new javax.swing.BoxLayout(jPanel1, javax.swing.BoxLayout.LINE_AXIS));\n\n cb_editar.setText(\"Editar\");\n cb_editar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cb_editarActionPerformed(evt);\n }\n });\n jPanel1.add(cb_editar);\n\n getContentPane().add(jPanel1, java.awt.BorderLayout.PAGE_END);\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 682, Short.MAX_VALUE)\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 580, Short.MAX_VALUE)\n );\n\n getContentPane().add(jPanel2, java.awt.BorderLayout.CENTER);\n\n pack();\n }", "public void checkbox() {\r\n\t\tcheckBox.click();\r\n\t}", "final void habilitarcampos(boolean valor){\n TXT_CodCliente.setEnabled(valor);\n TXT_Aparelho.setEnabled(valor);\n TXT_Valor.setEnabled(valor);\n TXT_Informacao.setEnabled(valor); \n TXT_CodServico.setEnabled(valor); \n TXT_Clientes.setEnabled(valor); \n TXT_Serial.setEnabled(valor);\n TXT_Data.setEnabled(valor);\n}", "private void buttonEnable(){\n\t\t\taddC1.setEnabled(true);\n\t\t\taddC2.setEnabled(true);\n\t\t\taddC3.setEnabled(true);\n\t\t\taddC4.setEnabled(true);\n\t\t\taddC5.setEnabled(true);\n\t\t\taddC6.setEnabled(true);\n\t\t\taddC7.setEnabled(true);\n\t\t}", "public void habilitaPanel() {\n\t\t// contentPane.setEnabled(true);\n\t\tpanelPrincipal.setEnabled(true);\n\t\tpanelBotones.setEnabled(true);\n\t\tboton1Jugador.setEnabled(true);\n\t\tbotonJuegoRed.setEnabled(true);\n\t\tbotonEditar.setEnabled(true);\n\t\tbotonDemo.setEnabled(true);\n\t\tbotonReglas.setEnabled(true);\n\t\tbotonAyuda.setEnabled(true);\n\t\tbotonRecibir.setEnabled(true);\n\t\tbotonEnviar.setEnabled(true);\n\t\tbotonDescargaSobre.setEnabled(true);\n\t\tbotonSalir.setEnabled(true);\n\t\tlabelFondo.setEnabled(true);\n\t\tlabelDibujo.setEnabled(true);\n\n\t}", "private void setButtonsEnable(boolean b){\n addButton.setEnabled(b);\n clearButton.setEnabled(b);\n peelOffButton.setEnabled(b);\n buttonControlPanel.setEnabled(b);\n progressCheckBox.setEnabled(b);\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n txtNome = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n cxSimples = new javax.swing.JCheckBox();\n cxCompleta = new javax.swing.JCheckBox();\n jLabel3 = new javax.swing.JLabel();\n cxSim = new javax.swing.JCheckBox();\n cxNao = new javax.swing.JCheckBox();\n btnAgendar = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setResizable(false);\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n jLabel1.setText(\"NOME\");\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n jLabel2.setText(\"TIPO DE LAVAGEM\");\n\n cxSimples.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n cxSimples.setText(\"SIMPLES\");\n cxSimples.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cxSimplesActionPerformed(evt);\n }\n });\n\n cxCompleta.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n cxCompleta.setText(\"COMPLETA\");\n cxCompleta.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cxCompletaActionPerformed(evt);\n }\n });\n\n jLabel3.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n jLabel3.setText(\"CERA\");\n\n cxSim.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n cxSim.setText(\"SIM\");\n cxSim.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cxSimActionPerformed(evt);\n }\n });\n\n cxNao.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n cxNao.setText(\"NÃO\");\n cxNao.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cxNaoActionPerformed(evt);\n }\n });\n\n btnAgendar.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n btnAgendar.setText(\"AGENDAR\");\n btnAgendar.setDefaultCapable(false);\n btnAgendar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnAgendarActionPerformed(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 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(32, 32, 32)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(txtNome, javax.swing.GroupLayout.PREFERRED_SIZE, 194, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(cxSim)))\n .addGap(34, 34, 34)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(cxNao)\n .addGroup(layout.createSequentialGroup()\n .addComponent(cxSimples)\n .addGap(43, 43, 43)\n .addComponent(cxCompleta))))))\n .addGroup(layout.createSequentialGroup()\n .addGap(197, 197, 197)\n .addComponent(btnAgendar, javax.swing.GroupLayout.PREFERRED_SIZE, 132, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(122, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(78, 78, 78)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtNome, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(45, 45, 45)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(cxSimples, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addComponent(cxCompleta))\n .addGap(55, 55, 55)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(cxSim)\n .addComponent(cxNao))\n .addGap(42, 42, 42)\n .addComponent(btnAgendar, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(122, Short.MAX_VALUE))\n );\n\n pack();\n }", "@Override\n public void onClick(View v) {\n boolean enable = true;\n if(nextPhysicianAvailableCheckbox.isChecked()) {\n enable = false;\n }\n for (int i = 0; i < nearbyPhysicianListLayout.getChildCount(); i++) {\n nearbyPhysicianListLayout.getChildAt(i).setEnabled(enable);\n }\n }", "private void initComponents() {\n jComboBox1 = new javax.swing.JComboBox();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jCheckBox1 = new javax.swing.JCheckBox();\n jCheckBox2 = new javax.swing.JCheckBox();\n jCheckBox3 = new javax.swing.JCheckBox();\n jButton1 = new javax.swing.JButton();\n jLabel4 = new javax.swing.JLabel();\n jCheckBox4 = new javax.swing.JCheckBox();\n\n jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n\n jLabel2.setText(\"Choose applications\");\n\n jLabel3.setText(\"League\");\n\n jCheckBox1.setText(\"jCheckBox1\");\n jCheckBox1.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));\n jCheckBox1.setMargin(new java.awt.Insets(0, 0, 0, 0));\n\n jCheckBox2.setText(\"jCheckBox2\");\n jCheckBox2.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));\n jCheckBox2.setMargin(new java.awt.Insets(0, 0, 0, 0));\n\n jCheckBox3.setText(\"jCheckBox3\");\n jCheckBox3.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));\n jCheckBox3.setMargin(new java.awt.Insets(0, 0, 0, 0));\n\n jButton1.setText(\"OK\");\n jButton1.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jButton1MouseClicked(evt);\n }\n });\n\n jLabel4.setText(\"Launch applications\");\n\n jCheckBox4.setText(\"jCheckBox4\");\n jCheckBox4.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));\n jCheckBox4.setMargin(new java.awt.Insets(0, 0, 0, 0));\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 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jButton1))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(27, 27, 27)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel3)\n .addComponent(jCheckBox1)\n .addComponent(jCheckBox2)\n .addComponent(jCheckBox3)\n .addComponent(jLabel2)\n .addComponent(jCheckBox4)))\n .addGroup(layout.createSequentialGroup()\n .addGap(22, 22, 22)\n .addComponent(jLabel1)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 88, Short.MAX_VALUE)\n .addComponent(jLabel4)))\n .addGap(37, 37, 37))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(25, 25, 25)\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jCheckBox1)\n .addGap(18, 18, 18)\n .addComponent(jCheckBox2)\n .addGap(16, 16, 16)\n .addComponent(jCheckBox3)\n .addGap(15, 15, 15)\n .addComponent(jCheckBox4)\n .addGap(37, 37, 37)\n .addComponent(jLabel3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(jLabel1))\n .addGap(51, 51, 51))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(229, Short.MAX_VALUE)\n .addComponent(jLabel4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton1)\n .addGap(25, 25, 25))\n );\n }", "private void deshabilitarFuncionalidades()\r\n\t{\r\n\t\t\r\n\t\tthis.lbMantenimientos.setVisible(false);\r\n\t\t\r\n\t\t\r\n\t\tthis.lbAdministracion.setVisible(false);\r\n\t\t\r\n\t\t\r\n\t\tthis.userButton.setVisible(false);\r\n\t\tthis.userButton.setEnabled(false);\r\n\t\t\r\n\t\tthis.gruposButton.setVisible(false);\r\n\t\tthis.gruposButton.setEnabled(false);\r\n\t\t\r\n\t\tthis.impuestoButton.setVisible(false);\r\n\t\tthis.impuestoButton.setEnabled(false);\r\n\t\t\r\n\t\tthis.empresaButton.setVisible(false);\r\n\t\tthis.empresaButton.setEnabled(false);\r\n\t\t\r\n\t\tthis.monedasButton.setVisible(false);\r\n\t\tthis.monedasButton.setEnabled(false);\r\n\t\t\r\n\t\tthis.rubros.setVisible(false);\r\n\t\tthis.rubros.setEnabled(false);\r\n\t\t\r\n\t\tthis.codigosGeneralizados.setVisible(false);\r\n\t\tthis.codigosGeneralizados.setEnabled(false);\r\n\t\t\r\n\t\tthis.documentosButton.setVisible(false);\r\n\t\tthis.documentosButton.setEnabled(false);\r\n\t\t\r\n\t\tthis.clientesButton.setVisible(false);\r\n\t\tthis.clientesButton.setEnabled(false);\r\n\t\t\r\n\t\tthis.funcionariosButton.setVisible(false);\r\n\t\tthis.funcionariosButton.setEnabled(false);\r\n\t\t\r\n\t\tthis.cotizaciones.setVisible(false);\r\n\t\tthis.cotizaciones.setEnabled(false);\r\n\t\t\r\n\t\tthis.tipoRubros.setVisible(false);\r\n\t\tthis.tipoRubros.setEnabled(false);\r\n\t\t\r\n\t\tthis.cuentas.setVisible(false);\r\n\t\tthis.cuentas.setEnabled(false);\r\n\t\t\r\n\t\tthis.bancos.setVisible(false);\r\n\t\tthis.bancos.setEnabled(false);\r\n\t\t\r\n\t\tthis.procesos.setVisible(false);\r\n\t\tthis.procesos.setEnabled(false);\r\n\t\t\r\n\t\tthis.gastos.setVisible(false);\r\n\t\tthis.gastos.setEnabled(false);\r\n\t\t\r\n\t\tthis.ingCobro.setVisible(false);\r\n\t\tthis.ingCobro.setEnabled(false);\r\n\t\t\r\n\t\tthis.ingEgreso.setVisible(false);\r\n\t\tthis.ingEgreso.setEnabled(false);\r\n\t\t\r\n\t\tthis.otroCobro.setVisible(false);\r\n\t\tthis.otroCobro.setEnabled(false);\r\n\t\t\r\n\t\tthis.otroEgreso.setVisible(false);\r\n\t\tthis.otroEgreso.setEnabled(false);\r\n\t\t\r\n\t\tthis.resumenProc.setVisible(false);\r\n\t\tthis.resumenProc.setEnabled(false);\r\n\t\t\r\n\t\tthis.periodo.setVisible(false);\r\n\t\tthis.periodo.setEnabled(false);\r\n\t\t\r\n\t\tthis.deposito.setVisible(false);\r\n\t\tthis.deposito.setEnabled(false);\r\n\t\t\r\n\t\tthis.factura.setVisible(false);\r\n\t\tthis.factura.setEnabled(false);\r\n\t\t\r\n\t\tthis.recibo.setVisible(false);\r\n\t\tthis.recibo.setEnabled(false);\r\n\t\t\r\n\t\tthis.notaCredito.setVisible(false);\r\n\t\tthis.notaCredito.setEnabled(false);\r\n\t\t\r\n\t\tthis.conciliacion.setVisible(false);\r\n\t\tthis.conciliacion.setEnabled(false);\r\n\t\t\r\n\t\tthis.btnRepGastosPendCobro.setVisible(false);\r\n\t\tthis.btnRepGastosPendCobro.setEnabled(false);\r\n\t\t\r\n\t\tthis.btnRepCheque.setVisible(false);\r\n\t\tthis.btnRepCheque.setEnabled(false);\r\n\t\t\r\n\t\tthis.btnCheqADepositar.setVisible(false);\r\n\t\tthis.btnCheqADepositar.setEnabled(false);\r\n\t\t\r\n\t\tthis.btnRepIva.setVisible(false);\r\n\t\tthis.btnRepIva.setEnabled(false);\r\n\t\t\r\n\t\tthis.btnEstadoCuenta.setVisible(false);\r\n\t\tthis.btnEstadoCuenta.setEnabled(false);\r\n\t\t\r\n\t\tthis.btnEstadoCuentaTotales.setVisible(false);\r\n\t\tthis.btnEstadoCuentaTotales.setEnabled(false);\r\n\t\t\r\n\t\tthis.btnMovPorCuenta.setVisible(false);\r\n\t\tthis.btnMovPorCuenta.setEnabled(false);\r\n\t\t\r\n\t\tthis.btnMovPorRubro.setVisible(false);\r\n\t\tthis.btnMovPorRubro.setEnabled(false);\r\n\t\t\r\n\t\tthis.btnMovCaja.setVisible(false);\r\n\t\tthis.btnMovCaja.setEnabled(false);\r\n\t\t\r\n\t\tthis.btnMovBco.setVisible(false);\r\n\t\tthis.btnMovBco.setEnabled(false);\r\n\t\t\r\n\t\t\r\n\t\tthis.btnRepGastosxProceso.setVisible(false);\r\n\t\tthis.btnRepGastosxProceso.setEnabled(false);\r\n\t}", "public void toggleEnable();", "private void setUpCheckBox(final int flag, CheckBox checkBox, LinearLayout llCheckBox) {\n if ((movie.getAvailableExtras() & flag) != 0) {\n checkBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {\n @Override\n public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n flagsApplied = flagsApplied ^ flag;\n updatePriceAndSaving();\n }\n });\n } else {\n llCheckBox.setVisibility(View.GONE);\n }\n }", "public void menu() {\n\t\tsuper.menu();\n\n\t\tfor(JCheckBox cb : arrayCompo){\n\t\t\tcb.setPreferredSize(new Dimension(largeur-30, hauteur));\n\t\t\tgbc.gridy++;\n\t\t\tpan.add(cb, gbc);\n\t\t}\n\t}", "private void lockButton(){\n\t\tconversionPdf_Txt.setEnabled(false);\n\t\tavisJury.setEnabled(false);\n\t\tstatistique.setEnabled(false);\n\t\tbData.setEnabled(false);\n\t\tbDataTraining.setEnabled(false);\n\t\tbCompare.setEnabled(false);\n\t}", "private void toggle(int a) {\n\t\ttry {\r\n\t\t\tfor (int i = 0; i < et.size(); i++) {\r\n\t\t\t\ttoogleOne(et.get(i), el.get(i), false);\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < toggle; i++) {\r\n\t\t\t\ttoogleOne(et.get(i), el.get(i), true);\r\n\t\t\t}\r\n\t\t\tlogp(INFO, getClassName(GraphicalUserInterface.class), \"toggle\", String.join(getSpace(), \"T\".concat(Library.toString(a)), \"Activated\"));\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\tlogp(INFO, getClassName(GraphicalUserInterface.class), \"toggle\", String.join(getSpace(), \"Error\", \"Activated\"));\r\n\t\t}\r\n\t}", "final void refreshCheckBoxes() {\r\n\r\n logger.entering(this.getClass().getName(), \"refreshCheckBoxes\");\r\n\r\n for (MicroSensorDataType msdt : this.msdtFilterMap.keySet()) {\r\n if (this.msdtFilterMap.get(msdt) == Boolean.TRUE) {\r\n this.chkMsdtSelection.get(msdt).setSelected(false);\r\n } else {\r\n this.chkMsdtSelection.get(msdt).setSelected(true);\r\n }\r\n\r\n }\r\n\r\n logger.exiting(this.getClass().getName(), \"refreshCheckBoxes\");\r\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel7 = new javax.swing.JLabel();\n jCheckBox2 = new javax.swing.JCheckBox();\n jCheckBox1 = new javax.swing.JCheckBox();\n jLabel6 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jTextField2 = new javax.swing.JTextField();\n jTextField1 = new javax.swing.JTextField();\n jLabel3 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel1 = new javax.swing.JLabel();\n btn_begin = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(null);\n\n jLabel7.setFont(new java.awt.Font(\"Tahoma\", 0, 36)); // NOI18N\n jLabel7.setForeground(new java.awt.Color(255, 255, 51));\n jLabel7.setText(\"BEGIN\");\n getContentPane().add(jLabel7);\n jLabel7.setBounds(890, 420, 110, 50);\n\n jCheckBox2.setFont(new java.awt.Font(\"Tahoma\", 0, 24)); // NOI18N\n jCheckBox2.setText(\"READY..??\");\n jCheckBox2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBox2ActionPerformed(evt);\n }\n });\n getContentPane().add(jCheckBox2);\n jCheckBox2.setBounds(1550, 540, 150, 30);\n\n jCheckBox1.setFont(new java.awt.Font(\"Tahoma\", 0, 24)); // NOI18N\n jCheckBox1.setText(\"READY..??\");\n jCheckBox1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBox1ActionPerformed(evt);\n }\n });\n getContentPane().add(jCheckBox1);\n jCheckBox1.setBounds(300, 480, 140, 30);\n\n jLabel6.setFont(new java.awt.Font(\"Tempus Sans ITC\", 3, 36)); // NOI18N\n jLabel6.setForeground(new java.awt.Color(255, 51, 0));\n jLabel6.setText(\"PLAYER-2\");\n getContentPane().add(jLabel6);\n jLabel6.setBounds(1570, 140, 190, 110);\n\n jLabel5.setFont(new java.awt.Font(\"Tempus Sans ITC\", 3, 36)); // NOI18N\n jLabel5.setForeground(new java.awt.Color(255, 51, 0));\n jLabel5.setText(\"PLAYER-1\");\n getContentPane().add(jLabel5);\n jLabel5.setBounds(200, 140, 190, 110);\n\n jLabel4.setFont(new java.awt.Font(\"Viner Hand ITC\", 3, 24)); // NOI18N\n jLabel4.setForeground(new java.awt.Color(0, 0, 204));\n jLabel4.setText(\"ENTER YOUR NAME :\");\n getContentPane().add(jLabel4);\n jLabel4.setBounds(1320, 380, 290, 60);\n\n jTextField2.setFont(new java.awt.Font(\"Segoe Script\", 0, 24)); // NOI18N\n jTextField2.setText(\"PLAYER2\");\n jTextField2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField2ActionPerformed(evt);\n }\n });\n getContentPane().add(jTextField2);\n jTextField2.setBounds(1600, 390, 280, 40);\n\n jTextField1.setFont(new java.awt.Font(\"Segoe Script\", 0, 24)); // NOI18N\n jTextField1.setText(\"PLAYER1\");\n jTextField1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField1ActionPerformed(evt);\n }\n });\n getContentPane().add(jTextField1);\n jTextField1.setBounds(290, 380, 280, 40);\n\n jLabel3.setFont(new java.awt.Font(\"Viner Hand ITC\", 3, 24)); // NOI18N\n jLabel3.setForeground(new java.awt.Color(255, 51, 0));\n jLabel3.setText(\"ENTER YOUR NAME :\");\n getContentPane().add(jLabel3);\n jLabel3.setBounds(10, 370, 290, 60);\n\n jLabel2.setFont(new java.awt.Font(\"Segoe Script\", 3, 24)); // NOI18N\n jLabel2.setForeground(new java.awt.Color(51, 204, 255));\n jLabel2.setText(\"WELCOME TO POKE WORLD\");\n getContentPane().add(jLabel2);\n jLabel2.setBounds(770, 20, 400, 50);\n\n jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Images/login.jpg\"))); // NOI18N\n getContentPane().add(jLabel1);\n jLabel1.setBounds(0, 0, 1920, 1080);\n\n btn_begin.setText(\"jButton2\");\n btn_begin.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btn_beginActionPerformed(evt);\n }\n });\n getContentPane().add(btn_begin);\n btn_begin.setBounds(870, 390, 150, 100);\n\n pack();\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tiv_operate.setSelected(!iv_operate.isSelected());\n\t\t\t\tiv_shuohua.setSelected(!iv_shuohua.isSelected());\n\t\t\t}", "private void eventoSemiSumergido(){\n s1.setChecked(false);\n s2.setChecked(true);\n s3.setChecked(false);\n esquema.setImageDrawable(getResources().getDrawable(R.drawable.np2));\n PosicionBarrasReactor.setPosicionActual(PosicionBarrasReactor.SEMI_SUMERGIDO);\n }", "public void setBoton() {\n SharedPreferences preferences = getSharedPreferences(STRING_PREFERENCES,MODE_PRIVATE);\n preferences.edit().putBoolean(PREFERENCE_ESTADO_BUTTON_SESION,checkBox.isChecked()).apply();\n\n }", "private void toogleOne(JTextField a, JLabel b, boolean c) {\n\t\tsetEnabled(a, get(c));\r\n\t\tsetVisible(a, get(c));\r\n\t\tsetEnabled(b, get(c));\r\n\t\tsetVisible(b, get(c));\r\n\t}", "private void enableAutosaveCheckboxItemStateChanged(java.awt.event.ItemEvent evt)\n {\n if (!autosave.isLoadingDialog())\n {\n enableDisableComponents();\n }\n }", "final void initializeCheckBoxes() {\r\n\r\n logger.entering(this.getClass().getName(), \"initializeCheckBoxes\");\r\n\r\n this.chkMsdtSelection = new HashMap < MicroSensorDataType, JCheckBox >();\r\n\r\n for (MicroSensorDataType msdt : this.msdtFilterMap.keySet()) {\r\n if (this.msdtFilterMap.get(msdt) == Boolean.TRUE) {\r\n\t\t\t\tthis.chkMsdtSelection.put(msdt, new JCheckBox(msdt.getName(),\r\n false));\r\n } else {\r\n this.chkMsdtSelection.put(msdt, new JCheckBox(msdt.getName(),\r\n true));\r\n }\r\n\r\n }\r\n\r\n logger.exiting(this.getClass().getName(), \"initializeCheckBoxes\");\r\n }", "private VBox checkBox(){\n //creation\n VBox checkbox = new VBox();\n CheckBox deliver = new CheckBox();\n CheckBox pick_up = new CheckBox();\n CheckBox reservation = new CheckBox();\n deliver.setText(\"Deliver\");\n pick_up.setText(\"Pick Up\");\n reservation.setText(\"Reservation\");\n\n //listener for 3 checkboxes\n deliver.selectedProperty().addListener(new ChangeListener<Boolean>() {\n @Override\n public void changed(ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue) {\n pick_up.setSelected(false);\n reservation.setSelected(false);\n }\n });\n pick_up.selectedProperty().addListener(new ChangeListener<Boolean>() {\n @Override\n public void changed(ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue) {\n deliver.setSelected(false);\n reservation.setSelected(false);\n }\n });\n reservation.selectedProperty().addListener(new ChangeListener<Boolean>() {\n @Override\n public void changed(ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue) {\n deliver.setSelected(false);\n pick_up.setSelected(false);\n\n }\n });\n\n //add all\n checkbox.getChildren().addAll(deliver,pick_up,reservation);\n return checkbox;\n }", "private void eventoSumergido(){\n s1.setChecked(false);\n s2.setChecked(false);\n s3.setChecked(true);\n esquema.setImageDrawable(getResources().getDrawable(R.drawable.np1));\n PosicionBarrasReactor.setPosicionActual(PosicionBarrasReactor.SUMERGIDO);\n }", "private void jCheckBox1ActionPerformed(java.awt.event.ActionEvent evt) {\n if(price.isEnabled()){\n price.setEnabled(false);\n \n }else{\n price.setEnabled(true);\n }\n \n ;\n // if(price.enabled(true))\n // {}\n \n \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 jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n chexboxRespuesta1 = new javax.swing.JCheckBox();\n chexboxRespuesta2 = new javax.swing.JCheckBox();\n chexboxRespuesta3 = new javax.swing.JCheckBox();\n btnsiguiente = new javax.swing.JButton();\n btnsalir = new javax.swing.JButton();\n fondo = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 3, 18)); // NOI18N\n jLabel2.setForeground(new java.awt.Color(255, 255, 255));\n jLabel2.setText(\"Pregunta 5 Parte 2\");\n getContentPane().add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(530, 20, 180, -1));\n\n jLabel3.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Imagenes/codificacion.jpg\"))); // NOI18N\n getContentPane().add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(320, 40, 230, 170));\n\n jLabel4.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n jLabel4.setForeground(new java.awt.Color(255, 255, 255));\n jLabel4.setText(\"¿Qué es la codificacion?\");\n getContentPane().add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(320, 230, -1, -1));\n\n buttonGroup1.add(chexboxRespuesta1);\n chexboxRespuesta1.setForeground(new java.awt.Color(255, 255, 255));\n chexboxRespuesta1.setText(\"Proceso por el cual la informacion de una fuente es convertida en simbolos para ser comunicada.\");\n getContentPane().add(chexboxRespuesta1, new org.netbeans.lib.awtextra.AbsoluteConstraints(70, 340, -1, -1));\n\n buttonGroup1.add(chexboxRespuesta2);\n chexboxRespuesta2.setForeground(new java.awt.Color(255, 255, 255));\n chexboxRespuesta2.setText(\"Consiste en uno o más archivos que contienen las instrucciones de programación con las cuales un desarrollador de software ha creado determinado programa o aplicación.\");\n getContentPane().add(chexboxRespuesta2, new org.netbeans.lib.awtextra.AbsoluteConstraints(70, 290, -1, -1));\n\n buttonGroup1.add(chexboxRespuesta3);\n chexboxRespuesta3.setForeground(new java.awt.Color(255, 255, 255));\n chexboxRespuesta3.setText(\"Consiste en las actualizaciones que deban aplicarse al programa cuando las circunstancias así lo requieran.\");\n getContentPane().add(chexboxRespuesta3, new org.netbeans.lib.awtextra.AbsoluteConstraints(70, 390, -1, 20));\n\n btnsiguiente.setBackground(new java.awt.Color(0, 0, 0));\n btnsiguiente.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n btnsiguiente.setForeground(new java.awt.Color(255, 255, 255));\n btnsiguiente.setText(\"Siguiente\");\n btnsiguiente.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnsiguienteActionPerformed(evt);\n }\n });\n getContentPane().add(btnsiguiente, new org.netbeans.lib.awtextra.AbsoluteConstraints(200, 450, -1, -1));\n\n btnsalir.setBackground(new java.awt.Color(0, 0, 0));\n btnsalir.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n btnsalir.setForeground(new java.awt.Color(255, 255, 255));\n btnsalir.setText(\"Salir\");\n btnsalir.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnsalirActionPerformed(evt);\n }\n });\n getContentPane().add(btnsalir, new org.netbeans.lib.awtextra.AbsoluteConstraints(400, 450, 70, 30));\n\n fondo.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Imagenes/fondo.jpg\"))); // NOI18N\n getContentPane().add(fondo, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 950, 510));\n\n pack();\n }", "private void habilitar() {\n\n if (i <= 0) {\n jButton4.setEnabled(false);\n } else {\n jButton4.setEnabled(true);\n }\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n buttonGroup = new javax.swing.ButtonGroup();\n jPanel1 = new javax.swing.JPanel();\n allCheck = new javax.swing.JCheckBox();\n blueCheck = new javax.swing.JCheckBox();\n redCheck = new javax.swing.JCheckBox();\n greenCheck = new javax.swing.JCheckBox();\n jLabel1 = new javax.swing.JLabel();\n supIzqRadio = new javax.swing.JRadioButton();\n supDchaRadio = new javax.swing.JRadioButton();\n infIzqRadio = new javax.swing.JRadioButton();\n infDchaRadio = new javax.swing.JRadioButton();\n jLabel2 = new javax.swing.JLabel();\n jPanel2 = new javax.swing.JPanel();\n try {\n lienzo = new filtrarimagen.Lienzo();\n } catch (java.net.MalformedURLException e1) {\n e1.printStackTrace();\n }\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED, null, null, new java.awt.Color(0, 0, 0), new java.awt.Color(0, 0, 0)), \"Configuración\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Tahoma\", 1, 10))); // NOI18N\n\n allCheck.setSelected(true);\n allCheck.setText(\"Todos\");\n allCheck.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n allCheckActionPerformed(evt);\n }\n });\n\n blueCheck.setSelected(true);\n blueCheck.setText(\"Azul\");\n blueCheck.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n blueCheckActionPerformed(evt);\n }\n });\n\n redCheck.setSelected(true);\n redCheck.setText(\"Rojo\");\n redCheck.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n redCheckActionPerformed(evt);\n }\n });\n\n greenCheck.setSelected(true);\n greenCheck.setText(\"Verde\");\n greenCheck.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n greenCheckActionPerformed(evt);\n }\n });\n\n jLabel1.setText(\"Canales de color:\");\n\n buttonGroup.add(supIzqRadio);\n supIzqRadio.setText(\"Superior izquierda\");\n supIzqRadio.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n supIzqRadioItemStateChanged(evt);\n }\n });\n\n buttonGroup.add(supDchaRadio);\n supDchaRadio.setSelected(true);\n supDchaRadio.setText(\"Superior derecha\");\n supDchaRadio.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n supDchaRadioItemStateChanged(evt);\n }\n });\n\n buttonGroup.add(infIzqRadio);\n infIzqRadio.setText(\"Inferior izquierda\");\n infIzqRadio.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n infIzqRadioItemStateChanged(evt);\n }\n });\n\n buttonGroup.add(infDchaRadio);\n infDchaRadio.setText(\"Inferior derecha\");\n infDchaRadio.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n infDchaRadioItemStateChanged(evt);\n }\n });\n\n jLabel2.setText(\"Posición del logo (Esquina):\");\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 .addGap(45, 45, 45)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(supIzqRadio)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(supDchaRadio))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(infIzqRadio)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(infDchaRadio))\n .addComponent(jLabel2))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(blueCheck, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(greenCheck, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(allCheck, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(redCheck, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addGap(81, 81, 81)))\n .addGap(31, 31, 31))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(jLabel2))\n .addGap(8, 8, 8)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(allCheck)\n .addComponent(redCheck)\n .addComponent(supIzqRadio)\n .addComponent(supDchaRadio))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(blueCheck)\n .addComponent(greenCheck)\n .addComponent(infIzqRadio)\n .addComponent(infDchaRadio))\n .addContainerGap(44, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 1200, Short.MAX_VALUE)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(lienzo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE)))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 652, Short.MAX_VALUE)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(lienzo, javax.swing.GroupLayout.PREFERRED_SIZE, 652, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE)))\n );\n\n jLabel3.setText(\"Jorge Santana Lorenzo\");\n\n jLabel4.setText(\"Francisco Javier Sánchez González\");\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 .addComponent(jPanel2, 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.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel3)\n .addGap(0, 0, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .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 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel4)))\n .addContainerGap(52, Short.MAX_VALUE))\n );\n\n pack();\n }", "public void setBlue1(JTextField num, JCheckBox bypass, JTextField voltage, JLabel robCom, JLabel dsCom) {\n blueTeamNumber1 = num;\n blueTeamNumber1.addActionListener(new java.awt.event.ActionListener() {\n @Override\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n setTeamInfo_Blue1();\n }\n });\n blueTeamNumber1.addFocusListener(new java.awt.event.FocusAdapter() {\n @Override\n public void focusLost(FocusEvent e) {\n setTeamInfo_Blue1();\n }\n });\n blueTeamNumber1.addFocusListener(new java.awt.event.FocusAdapter() {\n @Override\n public void focusGained(FocusEvent e) {\n if (blueTeamNumber1.isEditable()) {\n blueTeamNumber1.setBackground(EDITING);\n }\n }\n });\n blueTeamBypass1 = bypass;\n blueTeamBypass1.addActionListener(new java.awt.event.ActionListener() {\n @Override\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n Color temp;\n if (blueTeamBypass1.isSelected()) {\n temp = BYPASSED;\n FieldAndRobots.getInstance().actOnRobot(FieldAndRobots.BLUE,\n FieldAndRobots.ONE, FieldAndRobots.SpecialState.BYPASS);\n } else {\n temp = NOT_READY;\n FieldAndRobots.getInstance().actOnRobot(FieldAndRobots.BLUE,\n FieldAndRobots.ONE, FieldAndRobots.SpecialState.UNBYPASS);\n }\n robotComStatusBlueTeam1.setBackground(temp);\n dsComStatusBlueTeam1.setBackground(temp);\n }\n });\n //\n voltageBlueTeam1 = voltage; // Initializing is good enough\n robotComStatusBlueTeam1 = robCom; // Initializing is good enough\n dsComStatusBlueTeam1 = dsCom; // Initializing is good enough\n }", "@Override\n\tprotected void setControlListeners() {\n\t\tcheckBox.selectedProperty().addListener(new ChangeListener<Boolean>() {\n\t\t\t@Override\n\t\t\tpublic void changed(\n\t\t\t\t\tObservableValue<? extends Boolean> observable,\n\t\t\t\t\tBoolean oldValue, Boolean newValue) {\n\t\t\t\tif (!settingsPane.isExperimentRunning()) {\n\t\t\t\t\tparameter.set(newValue);\n\t\t\t\t\tsettingsPane.revalidateParameters();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "private void initComponents() {\n\n activeCheck = new javax.swing.JCheckBox();\n descriptionLabel = new javax.swing.JLabel();\n valueLabel = new javax.swing.JLabel();\n valueText = new javax.swing.JTextField();\n buttonPanel = new javax.swing.JPanel();\n upButton = new javax.swing.JButton();\n downButton = new javax.swing.JButton();\n\n activeCheck.setPreferredSize(new java.awt.Dimension(18, 18));\n activeCheck.addChangeListener(new javax.swing.event.ChangeListener() {\n public void stateChanged(javax.swing.event.ChangeEvent evt) {\n activeCheckStateChanged(evt);\n }\n });\n\n descriptionLabel.setFont(new java.awt.Font(\"Arial\", 0, (int) (22 * GlobalFontSettings.SizeMagnification)));\n descriptionLabel.setText(\"description\");\n\n valueLabel.setFont(new java.awt.Font(\"Arial\", 0, (int) (22 * GlobalFontSettings.SizeMagnification)));\n valueLabel.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n valueLabel.setText(\"value\");\n valueLabel.setMinimumSize(new java.awt.Dimension(38, 14));\n valueLabel.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n valueLabelMouseClicked(evt);\n }\n });\n\n valueText.setHorizontalAlignment(javax.swing.JTextField.RIGHT);\n valueText.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n valueTextActionPerformed(evt);\n }\n });\n valueText.addFocusListener(new java.awt.event.FocusAdapter() {\n public void focusLost(java.awt.event.FocusEvent evt) {\n valueTextFocusLost(evt);\n }\n });\n\n buttonPanel.setPreferredSize(new java.awt.Dimension(15, 18));\n buttonPanel.setLayout(new javax.swing.BoxLayout(buttonPanel, javax.swing.BoxLayout.Y_AXIS));\n\n upButton.setBorderPainted(false);\n upButton.setContentAreaFilled(false);\n upButton.setFocusPainted(false);\n upButton.setPreferredSize(new java.awt.Dimension(13, 9));\n upButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n upButtonActionPerformed(evt);\n }\n });\n buttonPanel.add(upButton);\n\n downButton.setBorderPainted(false);\n downButton.setContentAreaFilled(false);\n downButton.setFocusPainted(false);\n downButton.setPreferredSize(new java.awt.Dimension(13, 9));\n downButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n downButtonActionPerformed(evt);\n }\n });\n buttonPanel.add(downButton);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(activeCheck, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(6, 6, 6)\n .addComponent(descriptionLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 93, Short.MAX_VALUE)\n .addGap(0, 0, 0)\n .addComponent(valueLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(valueText, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, 0)\n .addComponent(buttonPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(activeCheck, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(valueLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(descriptionLabel)\n .addComponent(valueText, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(buttonPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE)\n );\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n Gruposino = new javax.swing.ButtonGroup();\n jLabel1 = new javax.swing.JLabel();\n panelopciones = new javax.swing.JPanel();\n cbCultural = new javax.swing.JCheckBox();\n cbDeportivo = new javax.swing.JCheckBox();\n cbEduambiental = new javax.swing.JCheckBox();\n cbEducativo = new javax.swing.JCheckBox();\n cbGastronomia = new javax.swing.JCheckBox();\n cbPlaticasformativas = new javax.swing.JCheckBox();\n cbRecreativas = new javax.swing.JCheckBox();\n cbManualidades = new javax.swing.JCheckBox();\n cbSaludyprevencion = new javax.swing.JCheckBox();\n cbServiciosprofesionales = new javax.swing.JCheckBox();\n cbOficios = new javax.swing.JCheckBox();\n cbSaludimagen = new javax.swing.JCheckBox();\n jButton1 = new javax.swing.JButton();\n jLabel2 = new javax.swing.JLabel();\n jPanel2 = new javax.swing.JPanel();\n rdbSI = new javax.swing.JRadioButton();\n rdbNO = new javax.swing.JRadioButton();\n btnSound1 = new javax.swing.JToggleButton();\n\n setBackground(new java.awt.Color(0, 0, 102));\n\n jLabel1.setFont(new java.awt.Font(\"Arial\", 0, 18)); // NOI18N\n jLabel1.setForeground(new java.awt.Color(255, 255, 255));\n jLabel1.setText(\"5. ¿Has participado en un taller, curso o alguna otra actividad de los centros comunitarios?\");\n\n panelopciones.setBackground(new java.awt.Color(0, 0, 153));\n panelopciones.setBorder(javax.swing.BorderFactory.createMatteBorder(1, 1, 1, 1, new java.awt.Color(0, 255, 255)));\n panelopciones.setEnabled(false);\n\n cbCultural.setBackground(new java.awt.Color(0, 0, 153));\n cbCultural.setFont(new java.awt.Font(\"Arial\", 1, 12)); // NOI18N\n cbCultural.setForeground(new java.awt.Color(255, 255, 255));\n cbCultural.setText(\"Cultural\");\n cbCultural.setEnabled(false);\n\n cbDeportivo.setBackground(new java.awt.Color(0, 0, 153));\n cbDeportivo.setFont(new java.awt.Font(\"Arial\", 1, 12)); // NOI18N\n cbDeportivo.setForeground(new java.awt.Color(255, 255, 255));\n cbDeportivo.setText(\"Deportivo\");\n cbDeportivo.setEnabled(false);\n\n cbEduambiental.setBackground(new java.awt.Color(0, 0, 153));\n cbEduambiental.setFont(new java.awt.Font(\"Arial\", 1, 12)); // NOI18N\n cbEduambiental.setForeground(new java.awt.Color(255, 255, 255));\n cbEduambiental.setText(\"Educacion ambiental\");\n cbEduambiental.setEnabled(false);\n\n cbEducativo.setBackground(new java.awt.Color(0, 0, 153));\n cbEducativo.setFont(new java.awt.Font(\"Arial\", 1, 12)); // NOI18N\n cbEducativo.setForeground(new java.awt.Color(255, 255, 255));\n cbEducativo.setText(\"Educativo\");\n cbEducativo.setEnabled(false);\n\n cbGastronomia.setBackground(new java.awt.Color(0, 0, 153));\n cbGastronomia.setFont(new java.awt.Font(\"Arial\", 1, 12)); // NOI18N\n cbGastronomia.setForeground(new java.awt.Color(255, 255, 255));\n cbGastronomia.setText(\"Gastronomia\");\n cbGastronomia.setEnabled(false);\n\n cbPlaticasformativas.setBackground(new java.awt.Color(0, 0, 153));\n cbPlaticasformativas.setFont(new java.awt.Font(\"Arial\", 1, 12)); // NOI18N\n cbPlaticasformativas.setForeground(new java.awt.Color(255, 255, 255));\n cbPlaticasformativas.setText(\"Platicas formativas\");\n cbPlaticasformativas.setEnabled(false);\n\n cbRecreativas.setBackground(new java.awt.Color(0, 0, 153));\n cbRecreativas.setFont(new java.awt.Font(\"Arial\", 1, 12)); // NOI18N\n cbRecreativas.setForeground(new java.awt.Color(255, 255, 255));\n cbRecreativas.setText(\"Recreativas\");\n cbRecreativas.setEnabled(false);\n\n cbManualidades.setBackground(new java.awt.Color(0, 0, 153));\n cbManualidades.setFont(new java.awt.Font(\"Arial\", 1, 12)); // NOI18N\n cbManualidades.setForeground(new java.awt.Color(255, 255, 255));\n cbManualidades.setText(\"Manualidades\");\n cbManualidades.setEnabled(false);\n\n cbSaludyprevencion.setBackground(new java.awt.Color(0, 0, 153));\n cbSaludyprevencion.setFont(new java.awt.Font(\"Arial\", 1, 12)); // NOI18N\n cbSaludyprevencion.setForeground(new java.awt.Color(255, 255, 255));\n cbSaludyprevencion.setText(\"Salud y prevencion\");\n cbSaludyprevencion.setEnabled(false);\n\n cbServiciosprofesionales.setBackground(new java.awt.Color(0, 0, 153));\n cbServiciosprofesionales.setFont(new java.awt.Font(\"Arial\", 1, 12)); // NOI18N\n cbServiciosprofesionales.setForeground(new java.awt.Color(255, 255, 255));\n cbServiciosprofesionales.setText(\"Servicios profesionales voluntarios\");\n cbServiciosprofesionales.setEnabled(false);\n\n cbOficios.setBackground(new java.awt.Color(0, 0, 153));\n cbOficios.setFont(new java.awt.Font(\"Arial\", 1, 12)); // NOI18N\n cbOficios.setForeground(new java.awt.Color(255, 255, 255));\n cbOficios.setText(\"Oficios\");\n cbOficios.setEnabled(false);\n\n cbSaludimagen.setBackground(new java.awt.Color(0, 0, 153));\n cbSaludimagen.setFont(new java.awt.Font(\"Arial\", 1, 12)); // NOI18N\n cbSaludimagen.setForeground(new java.awt.Color(255, 255, 255));\n cbSaludimagen.setText(\"Salud, imagen y bienestar personal\");\n cbSaludimagen.setEnabled(false);\n\n javax.swing.GroupLayout panelopcionesLayout = new javax.swing.GroupLayout(panelopciones);\n panelopciones.setLayout(panelopcionesLayout);\n panelopcionesLayout.setHorizontalGroup(\n panelopcionesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(panelopcionesLayout.createSequentialGroup()\n .addContainerGap(17, Short.MAX_VALUE)\n .addGroup(panelopcionesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(cbGastronomia)\n .addComponent(cbCultural)\n .addComponent(cbPlaticasformativas))\n .addGap(21, 21, 21)\n .addGroup(panelopcionesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(cbDeportivo)\n .addComponent(cbEducativo)\n .addComponent(cbSaludyprevencion))\n .addGap(18, 18, 18)\n .addGroup(panelopcionesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(cbRecreativas)\n .addComponent(cbSaludimagen)\n .addComponent(cbEduambiental))\n .addGap(18, 18, 18)\n .addGroup(panelopcionesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(cbOficios)\n .addComponent(cbServiciosprofesionales)\n .addComponent(cbManualidades)))\n );\n panelopcionesLayout.setVerticalGroup(\n panelopcionesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(panelopcionesLayout.createSequentialGroup()\n .addGap(20, 20, 20)\n .addGroup(panelopcionesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(cbCultural)\n .addComponent(cbEducativo)\n .addComponent(cbEduambiental)\n .addComponent(cbManualidades))\n .addGap(28, 28, 28)\n .addGroup(panelopcionesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(cbRecreativas)\n .addComponent(cbOficios)\n .addComponent(cbDeportivo)\n .addComponent(cbGastronomia))\n .addGap(28, 28, 28)\n .addGroup(panelopcionesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(cbPlaticasformativas)\n .addComponent(cbSaludyprevencion)\n .addComponent(cbSaludimagen)\n .addComponent(cbServiciosprofesionales))\n .addContainerGap(31, Short.MAX_VALUE))\n );\n\n jButton1.setBackground(new java.awt.Color(0, 0, 153));\n jButton1.setFont(new java.awt.Font(\"Arial\", 1, 18)); // NOI18N\n jButton1.setForeground(new java.awt.Color(255, 255, 255));\n jButton1.setText(\"SIGUIENTE\");\n jButton1.setBorder(javax.swing.BorderFactory.createMatteBorder(1, 1, 1, 1, new java.awt.Color(0, 255, 255)));\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jLabel2.setFont(new java.awt.Font(\"Arial\", 0, 18)); // NOI18N\n jLabel2.setForeground(new java.awt.Color(255, 255, 255));\n jLabel2.setText(\"si tu respuesta fue si, selecciona las actividades:\");\n\n jPanel2.setBackground(new java.awt.Color(0, 0, 153));\n jPanel2.setBorder(javax.swing.BorderFactory.createMatteBorder(1, 1, 1, 1, new java.awt.Color(0, 255, 255)));\n\n rdbSI.setBackground(new java.awt.Color(0, 0, 153));\n Gruposino.add(rdbSI);\n rdbSI.setFont(new java.awt.Font(\"Arial\", 1, 18)); // NOI18N\n rdbSI.setForeground(new java.awt.Color(255, 255, 255));\n rdbSI.setText(\"SI\");\n rdbSI.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n rdbSIActionPerformed(evt);\n }\n });\n\n rdbNO.setBackground(new java.awt.Color(0, 0, 153));\n Gruposino.add(rdbNO);\n rdbNO.setFont(new java.awt.Font(\"Arial\", 1, 18)); // NOI18N\n rdbNO.setForeground(new java.awt.Color(255, 255, 255));\n rdbNO.setText(\"NO\");\n rdbNO.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n rdbNOActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(89, 89, 89)\n .addComponent(rdbSI)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 32, Short.MAX_VALUE)\n .addComponent(rdbNO)\n .addGap(91, 91, 91))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(rdbSI)\n .addComponent(rdbNO))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n btnSound1.setBackground(new java.awt.Color(0, 0, 153));\n btnSound1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/iconos/sonido.png\"))); // NOI18N\n btnSound1.setBorder(javax.swing.BorderFactory.createMatteBorder(1, 1, 1, 1, new java.awt.Color(0, 255, 255)));\n btnSound1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnSound1ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(24, 24, 24)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel2)\n .addGap(28, 28, 28)\n .addComponent(btnSound1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel1)\n .addComponent(panelopciones, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(14, 29, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(15, 15, 15)\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2)\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnSound1))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(panelopciones, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n }", "@FXML\n public void isSelectedOn() {\n reset();\n off.setSelected(false);\n // off.\n lab4.setVisible(true);\n txt4.setVisible(true);\n lab5.setVisible(true);\n txt5.setVisible(true);\n lab6.setVisible(true);\n txt6.setVisible(true);\n }", "public InitialiseJCheckBox(){ \n new JCheckBoxDrinkList();\n new JCheckBoxPreOrderMenuList();\n new JRadioSeatSelectionList();\n }", "public void setActivo(Boolean activo) {\n this.activo = activo;\n }", "private void setOneAllChecks() {\r\n\r\n checkIman.setEnabled(true);\r\n checkBonferroni.setEnabled(true);\r\n checkHolm.setEnabled(true);\r\n checkHochberg.setEnabled(true);\r\n checkHommel.setEnabled(true);\r\n checkHolland.setEnabled(true);\r\n checkRom.setEnabled(true);\r\n checkFinner.setEnabled(true);\r\n checkLi.setEnabled(true);\r\n\r\n }", "public SettingsPanel(WarehouseBoss wb, Models models) {\n this.models = models;\n this.wb = wb;\n this.setLayout(new BorderLayout());\n\n // Make new check boxes and button\n JCheckBox musicBox = new JCheckBox(BUTTON_TEXT[0]);\n JCheckBox SFXBox = new JCheckBox(BUTTON_TEXT[1]);\n JButton backBtn = new JButton(BUTTON_TEXT[2]);\n\n // Make checkBox selected initially if settings say it is\n musicBox.setSelected(models.isEnableMusic());\n SFXBox.setSelected(models.isEnableSFX());\n\n // Set the location of each button\n int btnWidth = 200;\n int btnHeight = 50;\n int startXPos = 400 - btnWidth / 2;\n int startYPos = 150;\n musicBox.setBounds(startXPos, startYPos, btnWidth, btnHeight - 15);\n SFXBox.setBounds(startXPos, startYPos + 65, btnWidth, btnHeight - 15);\n backBtn.setBounds(startXPos, startYPos + 290, btnWidth, btnHeight);\n\n // Set button fonts\n Font gameFont = new Font(\"Myriad Pro Light\", Font.BOLD, 20);\n musicBox.setFont(gameFont);\n SFXBox.setFont(gameFont);\n backBtn.setFont(gameFont);\n\n // Set button border\n Border buttonBorder = new LineBorder(Color.BLUE, 2);\n backBtn.setBorder(buttonBorder);\n\n // Set button actions\n musicBox.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n if (musicBox.isSelected()) {\n \tSettingsPanel.this.models.setEnableMusic(true);\n String skin = SettingsPanel.this.models.getSpriteSet();\n wb.changeSound(skin);\n } else {\n \tSettingsPanel.this.models.setEnableMusic(false);\n try {\n \tSettingsPanel.this.wb.stopClip();\n } catch (Exception e1) {\n\n }\n }\n }\n });\n\n SFXBox.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n if (SFXBox.isSelected()) {\n \tSettingsPanel.this.models.setEnableSFX(true);\n } else {\n \tSettingsPanel.this.models.setEnableSFX(false);\n }\n\n }\n });\n\n backBtn.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n try {\n SaveLoad.saveSettings(SettingsPanel.this.models.getSettings());\n } catch (IOException e1) {\n }\n wb.swapPanel(\"Menu\");\n }\n });\n\n // Add buttons to this\n this.add(musicBox);\n this.add(SFXBox);\n this.add(backBtn);\n\n // Create spriteSet selection drop down box\n JComboBox<String> spriteSetList = new JComboBox<String>(SPRITE_SETS);\n spriteSetList.setBounds(startXPos, startYPos + 130, btnWidth, 25);\n\n // Set active spriteSet to selected\n int i = 0;\n for (String s : SPRITE_SETS) {\n if (models.getSpriteSet().equals(s + \"/\"))\n spriteSetList.setSelectedIndex(i);\n i++;\n }\n\n // Add listener to comboBox\n spriteSetList.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n JComboBox<String> combo = (JComboBox<String>) e.getSource();\n String selectedSkin = (String) combo.getSelectedItem();\n SettingsPanel.this.models.setSpriteSet(selectedSkin + \"/\");\n try {\n \tSettingsPanel.this.wb.stopClip();\n } catch (Exception e1) {\n\n }\n if (SettingsPanel.this.models.isEnableMusic()) {\n \tSettingsPanel.this.wb.changeSound(selectedSkin + \"/\");\n }\n \n // Updates all panels to the new skin set\n wb.addPanel(new MenuPanel(wb, models), \"Menu\");\n wb.addPanel(new StoryLevelSelector(wb, models), \"Story\");\n wb.addPanel(new RandomLevelSelector(wb, models), \"Random\");\n wb.addPanel(new SettingsPanel(wb, models), \"Settings\");\n wb.swapPanel(\"Settings\");\n }\n });\n\n this.add(spriteSetList);\n\n String spriteSet = \"image/\" + models.getSpriteSet();\n\n // Display player skins\n ImageIcon skin1Image = new ImageIcon(spriteSet + \"Player1.png\");\n JLabel skin1Label = new JLabel(\"\", skin1Image, JLabel.CENTER);\n skin1Label.setBounds(startXPos, startYPos + 175, 100, 100);\n\n ImageIcon skin2Image = new ImageIcon(spriteSet + \"Player2.png\");\n JLabel skin2Label = new JLabel(\"\", skin2Image, JLabel.CENTER);\n skin2Label.setBounds(startXPos + 100, startYPos + 175, 100, 100);\n\n // Set active skin to selected\n if (models.isSkin1()) {\n skin1Label.setBorder(BorderFactory.createLineBorder(Color.BLUE, 3));\n } else {\n skin2Label.setBorder(BorderFactory.createLineBorder(Color.BLUE, 3));\n }\n\n // Add listeners\n skin1Label.addMouseListener(new MouseAdapter() {\n @Override\n public void mousePressed(MouseEvent e) {\n skin1Label.setBorder(BorderFactory.createLineBorder(Color.BLUE, 3));\n skin2Label.setBorder(null);\n SettingsPanel.this.models.setSkin(true);\n }\n });\n\n skin2Label.addMouseListener(new MouseAdapter() {\n @Override\n public void mousePressed(MouseEvent e) {\n skin2Label.setBorder(BorderFactory.createLineBorder(Color.BLUE, 3));\n skin1Label.setBorder(null);\n SettingsPanel.this.models.setSkin(false);\n }\n });\n\n this.add(skin1Label);\n this.add(skin2Label);\n\n // Add bg\n ImageIcon titleImage = new ImageIcon(spriteSet + \"Menu_Bg.png\");\n JLabel titleLabel = new JLabel(\"\", titleImage, JLabel.CENTER);\n this.add(titleLabel);\n titleLabel.setBounds(0, 0, 800, 600);\n }", "private void initComponents() {\n\n panel1 = new java.awt.Panel();\n label1 = new java.awt.Label();\n label2 = new java.awt.Label();\n TFNombre = new java.awt.TextField();\n ChoicePro = new java.awt.Choice();\n checkboxEsp = new java.awt.Checkbox();\n checkboxBas = new java.awt.Checkbox();\n BOk = new java.awt.Button();\n listaEventos = new java.awt.List();\n jSeparator1 = new javax.swing.JSeparator();\n TFHeroe = new java.awt.TextField();\n TFAtaque = new java.awt.TextField();\n TFVida = new java.awt.TextField();\n label3 = new java.awt.Label();\n label4 = new java.awt.Label();\n label5 = new java.awt.Label();\n label6 = new java.awt.Label();\n TFNivel = new java.awt.TextField();\n label7 = new java.awt.Label();\n TFExp = new java.awt.TextField();\n BLvl = new java.awt.Button();\n BDañar = new java.awt.Button();\n BEliminar = new java.awt.Button();\n TFProfecion = new java.awt.TextField();\n jLabel1 = new javax.swing.JLabel();\n LabelExp = new javax.swing.JLabel();\n menuBar1 = new java.awt.MenuBar();\n menu1 = new java.awt.Menu();\n menu2 = new java.awt.Menu();\n\n addWindowListener(new java.awt.event.WindowAdapter() {\n public void windowClosing(java.awt.event.WindowEvent evt) {\n exitForm(evt);\n }\n });\n\n panel1.setBackground(new java.awt.Color(0, 0, 0));\n\n label1.setFont(new java.awt.Font(\"Felix Titling\", 0, 12)); // NOI18N\n label1.setForeground(new java.awt.Color(255, 255, 255));\n label1.setText(\"Nombre:\");\n\n label2.setForeground(new java.awt.Color(255, 255, 255));\n label2.setText(\"Profesion:\");\n\n checkboxEsp.setForeground(new java.awt.Color(255, 255, 255));\n checkboxEsp.setLabel(\"Espada\");\n\n checkboxBas.setForeground(new java.awt.Color(255, 255, 255));\n checkboxBas.setLabel(\"Baston\");\n\n BOk.setLabel(\"OK\");\n BOk.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n BOkActionPerformed(evt);\n }\n });\n\n TFHeroe.setEditable(false);\n\n TFAtaque.setEditable(false);\n\n TFVida.setEditable(false);\n\n label3.setFont(new java.awt.Font(\"Felix Titling\", 1, 12)); // NOI18N\n label3.setForeground(new java.awt.Color(255, 255, 255));\n label3.setText(\"HEROE:\");\n\n label4.setForeground(new java.awt.Color(255, 255, 255));\n label4.setText(\"Ataque:\");\n\n label5.setForeground(new java.awt.Color(255, 0, 0));\n label5.setText(\"Vida:\");\n\n label6.setForeground(new java.awt.Color(255, 255, 255));\n label6.setText(\"Nivel:\");\n\n TFNivel.setEditable(false);\n\n label7.setForeground(new java.awt.Color(255, 255, 255));\n label7.setText(\"Experiencia:\");\n\n TFExp.setEditable(false);\n TFExp.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n TFExpActionPerformed(evt);\n }\n });\n\n BLvl.setLabel(\"Lvl\");\n BLvl.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n BLvlActionPerformed(evt);\n }\n });\n\n BDañar.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n BDañar.setLabel(\"Dañar\");\n BDañar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n BDañarActionPerformed(evt);\n }\n });\n\n BEliminar.setLabel(\"Nuevo Heroe\");\n BEliminar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n BEliminarActionPerformed(evt);\n }\n });\n\n TFProfecion.setEditable(false);\n\n jLabel1.setForeground(new java.awt.Color(255, 255, 255));\n jLabel1.setText(\"Profesion:\");\n\n LabelExp.setForeground(new java.awt.Color(255, 255, 255));\n LabelExp.setText(\"100\");\n\n javax.swing.GroupLayout panel1Layout = new javax.swing.GroupLayout(panel1);\n panel1.setLayout(panel1Layout);\n panel1Layout.setHorizontalGroup(\n panel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(panel1Layout.createSequentialGroup()\n .addGroup(panel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(listaEventos, javax.swing.GroupLayout.PREFERRED_SIZE, 360, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(panel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(panel1Layout.createSequentialGroup()\n .addGap(22, 22, 22)\n .addGroup(panel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(panel1Layout.createSequentialGroup()\n .addGroup(panel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(label1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(label2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(22, 22, 22)\n .addGroup(panel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(TFNombre, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(ChoicePro, javax.swing.GroupLayout.DEFAULT_SIZE, 146, Short.MAX_VALUE))\n .addGap(34, 34, 34)\n .addGroup(panel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(checkboxBas, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(checkboxEsp, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addComponent(BOk, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(panel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(panel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jSeparator1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 368, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, panel1Layout.createSequentialGroup()\n .addGroup(panel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(BEliminar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(panel1Layout.createSequentialGroup()\n .addGroup(panel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(panel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(TFAtaque, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(label3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(label4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(BLvl, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(panel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(TFHeroe, javax.swing.GroupLayout.PREFERRED_SIZE, 86, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(panel1Layout.createSequentialGroup()\n .addGap(10, 10, 10)\n .addGroup(panel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(TFVida, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(BDañar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(label5, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addGap(35, 35, 35)\n .addGroup(panel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(label7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(panel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(TFProfecion, 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, panel1Layout.createSequentialGroup()\n .addComponent(label6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(TFNivel, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addComponent(jLabel1)\n .addComponent(TFExp, javax.swing.GroupLayout.PREFERRED_SIZE, 96, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(LabelExp))))))\n .addContainerGap(21, Short.MAX_VALUE))\n );\n panel1Layout.setVerticalGroup(\n panel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(panel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(panel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(label1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(TFNombre, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(checkboxEsp, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(panel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(label2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(ChoicePro, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(checkboxBas, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(BOk, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(panel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(panel1Layout.createSequentialGroup()\n .addGap(150, 150, 150)\n .addComponent(LabelExp)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panel1Layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(panel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(label3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(TFHeroe, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(label6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(TFNivel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(panel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(label4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(label5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel1))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(panel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(panel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(TFAtaque, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(TFVida, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(TFProfecion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(20, 20, 20)\n .addGroup(panel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(label7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(BLvl, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(BDañar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(TFExp, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)))\n .addComponent(BEliminar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(listaEventos, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(34, 34, 34))\n );\n\n menu1.setLabel(\"File\");\n menuBar1.add(menu1);\n\n menu2.setLabel(\"Edit\");\n menuBar1.add(menu2);\n\n setMenuBar(menuBar1);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(panel1, 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(panel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n }", "protected void setCheckedBoxes() {\n checkBoxIfInPreference(findViewById(R.id.concordiaShuttle));\n checkBoxIfInPreference(findViewById(R.id.elevators));\n checkBoxIfInPreference(findViewById(R.id.escalators));\n checkBoxIfInPreference(findViewById(R.id.stairs));\n checkBoxIfInPreference(findViewById(R.id.accessibilityInfo));\n checkBoxIfInPreference(findViewById(R.id.stepFreeTrips));\n }", "private void setCurrentOperation(){ \r\n boolean isNamesVisible = true; //Valor logico si los campos de nombres y apellidos seran visibles\r\n Integer[] disables; //Se declara el arreglo que contendra las posiciones de la TOOLBAR que seran DESHABILITADOS para cada operacion\r\n loadToolBar(); //Se Refresca la barra de Herramientas\r\n lb_Title.setText(\"\"); //Se deja en blanco la etiqueta del Titulo\r\n //Se evalua el tipo de Operacion\r\n switch(tipoOperacion){\r\n case 0: //SOLO LECTURA \r\n tf_nroguia.setEditable(true);\r\n tf_nrorguia.setEditable(false);\r\n tf_chofer.setEditable(false);\r\n tf_veh1.setEditable(false);\r\n tf_veh2.setEditable(false);\r\n tf_ayud1.setEditable(false);\r\n tf_ayud2.setEditable(false);\r\n tf_cheqp.setEditable(false);\r\n tf_supruta.setEditable(false);\r\n\r\n dt_fcarga.setDisable(true);\r\n dt_relacion.setDisable(true);\r\n\r\n im_check.setVisible(false);\r\n im_val.setVisible(false);\r\n\r\n bt_c1.setDisable(true);\r\n bt_c2.setDisable(true);\r\n bt_c3.setDisable(true);\r\n bt_c4.setDisable(true);\r\n bt_c5.setDisable(true);\r\n bt_c6.setDisable(true);\r\n bt_c7.setDisable(true);\r\n\r\n //SE PERMITE: NUEVO, CANCELAR Y BUSCAR\r\n disables = new Integer[]{2,5,6,9,10};\r\n disableAllToolBar(disables); \r\n hb_1.setVisible(true);\r\n break;\r\n case 1: //NUEVO\r\n lb_Title.setText(\"NUEVO\");\r\n\r\n tf_nroguia.setEditable(false);\r\n tf_nrorguia.setEditable(true);\r\n\r\n dt_relacion.setDisable(false);\r\n\r\n im_check.setVisible(true);\r\n im_val.setVisible(false);\r\n\r\n //SE PERMITE: NUEVO,GUARDAR Y CANCELAR \r\n disables = new Integer[]{0,1,3,4,6,7,8,9,10,11};\r\n disableAllToolBar(disables); \r\n break;\r\n case 2: //EDITAR\r\n lb_Title.setText(\"EDITAR\");\r\n\r\n tf_nroguia.setEditable(false);\r\n tf_nrorguia.setEditable(true);\r\n\r\n dt_relacion.setDisable(false);\r\n \r\n im_check.setVisible(true);\r\n im_val.setVisible(false);\r\n \r\n //SE PERMITE: EDITAR,GUARDAR Y CANCELAR\r\n disables = new Integer[]{0,1,3,4,6,7,8,9,10,11};\r\n disableAllToolBar(disables); \r\n break;\r\n case 3: //GUARDAR\r\n tf_nroguia.setEditable(true);\r\n tf_nrorguia.setEditable(false);\r\n\r\n dt_relacion.setDisable(true);\r\n \r\n im_check.setVisible(false);\r\n im_val.setVisible(false);\r\n\r\n //SE PERMITE: GUARDAR Y CANCELAR\r\n disables = new Integer[]{0,1,3,4,6,7,8,9,10,11};\r\n disableAllToolBar(disables); \r\n break;\r\n case 4: //CAMBIAR STATUS \r\n tf_nroguia.setEditable(true);\r\n tf_nrorguia.setEditable(false);\r\n\r\n dt_relacion.setDisable(true);\r\n \r\n im_check.setVisible(false);\r\n im_val.setVisible(false);\r\n\r\n //SE PERMITE: GUARDAR,CAMBIO STATUS Y CANCELAR\r\n disables = new Integer[]{2,5,6,7,8,9,10};\r\n disableAllToolBar(disables); \r\n break;\r\n } \r\n init_FocusArray(tipoOperacion); \r\n Gui.getInstance().setTipoOperacion(tipoOperacion);\r\n }", "private void setComponents() throws SQLException {\n switch (this.pStatus) {\n case View:\n tblContacts.setEnabled(true);\n fillContactsTable();\n txtFirstName.setEnabled(false);\n txtMiddleName.setEnabled(false);\n txtLastName.setEnabled(false);\n dtpBirthday.setEnabled(false);\n rdoMale.setEnabled(false);\n rdoFemale.setEnabled(false);\n rdoUndefined.setEnabled(false);\n txtStreet.setEnabled(false);\n txtPostcode.setEnabled(false);\n txtCity.setEnabled(false);\n txtCountry.setEnabled(false);\n txtAvailability.setEnabled(false);\n txtComment.setEnabled(false);\n btnSave.setEnabled(false);\n btnNew.setEnabled(true);\n if (getRowCount() > 0) {\n btnEdit.setEnabled(true);\n btnDelete.setEnabled(true);\n } else {\n btnEdit.setEnabled(false);\n btnDelete.setEnabled(false);\n }\n btnCancel.setEnabled(false);\n break;\n case New:\n case Modify:\n tblContacts.setEnabled(false);\n txtFirstName.setEnabled(true);\n txtMiddleName.setEnabled(true);\n txtLastName.setEnabled(true);\n dtpBirthday.setEnabled(true);\n rdoMale.setEnabled(true);\n rdoFemale.setEnabled(true);\n rdoUndefined.setEnabled(true);\n txtStreet.setEnabled(true);\n txtPostcode.setEnabled(true);\n txtCity.setEnabled(true);\n txtCountry.setEnabled(true);\n txtAvailability.setEnabled(true);\n txtComment.setEnabled(true);\n btnSave.setEnabled(true);\n btnNew.setEnabled(false);\n btnEdit.setEnabled(false);\n btnDelete.setEnabled(false);\n btnCancel.setEnabled(true);\n break;\n }\n }", "private void switches() {\n finland.setChecked(true);\n chosenArea = \"Finland\";\n wholeWorld.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {\n @Override\n public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n if (isChecked) {\n europe.setChecked(false);\n nordic.setChecked(false);\n finland.setChecked(false);\n chosenArea = \"Whole world\";\n }\n }\n });\n europe.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {\n @Override\n public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n if (isChecked) {\n wholeWorld.setChecked(false);\n nordic.setChecked(false);\n finland.setChecked(false);\n chosenArea = \"Europe\";\n\n }\n }\n });\n nordic.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {\n @Override\n public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n if (isChecked) {\n wholeWorld.setChecked(false);\n europe.setChecked(false);\n finland.setChecked(false);\n chosenArea = \"Nordic countries and Estonia\";\n }\n }\n });\n finland.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {\n @Override\n public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n if (isChecked) {\n wholeWorld.setChecked(false);\n europe.setChecked(false);\n nordic.setChecked(false);\n chosenArea = \"Finland\";\n }\n }\n });\n }" ]
[ "0.6774596", "0.6772656", "0.6696953", "0.66358984", "0.6554223", "0.645244", "0.6415466", "0.6378724", "0.6371889", "0.63418084", "0.6317631", "0.63165414", "0.62956077", "0.629318", "0.62133217", "0.6155518", "0.61426073", "0.61399025", "0.6137014", "0.61235726", "0.6123308", "0.611232", "0.6094559", "0.608444", "0.606997", "0.60602087", "0.6050319", "0.60432494", "0.6037942", "0.6037641", "0.60333735", "0.6025193", "0.60018724", "0.6000511", "0.5996378", "0.5994672", "0.5991598", "0.59814334", "0.5980718", "0.5980324", "0.5973285", "0.5965639", "0.59656024", "0.59632015", "0.59537655", "0.5948381", "0.5941077", "0.5936067", "0.59314495", "0.59255767", "0.5924728", "0.5924351", "0.5918168", "0.59102356", "0.5907072", "0.58966756", "0.58966684", "0.5892927", "0.5872768", "0.5872329", "0.5864274", "0.5861646", "0.5857879", "0.5857444", "0.58551353", "0.5853138", "0.5848006", "0.5846798", "0.58460164", "0.58333194", "0.5827815", "0.5826709", "0.58245134", "0.5821037", "0.5798772", "0.57984924", "0.57969123", "0.5790786", "0.57903683", "0.57886386", "0.57801116", "0.5774393", "0.57738113", "0.5767229", "0.5765449", "0.5760995", "0.57605195", "0.5759255", "0.5755982", "0.57432956", "0.5740614", "0.57280093", "0.57256186", "0.57249707", "0.57229215", "0.571523", "0.570801", "0.57055384", "0.5701007", "0.56989735", "0.56974447" ]
0.0
-1
Creates a new Level Pack, having the given name and the first specified author. The transition script will simple be a default script, and the first World will be a default first World.
public LevelPack(String name, User author, World... worlds) { this.name = name; this.transitionScript = new UserScript("onTransition", "--This script will be run to return an LuaInt specifying the next world to proceed to, given the current world state.", SecurityLevel.AUTHOR); if (worlds.length == 0) worlds = new World[] { new World() }; this.levels = new WorldList(); this.levels.addAll(Arrays.asList(worlds)); this.levelIndex = 0; this.levelCount = worlds.length; this.levelEmblems = new ImageList(); this.levelTitles = new ArrayList<String>(); this.levelDescriptions = new ArrayList<String>(); this.authors = new ArrayList<>(); this.originalAuthor = author; this.mainEmblem = new ImageList(); this.mainEmblem.add((BufferedImage) UIBuilder.getImage(DEFAULT_MAIN_EMBLEM_FILE)); if (author != null) addAuthor(author); creationDate = LocalDateTime.now(); publishStart = LocalDateTime.now(); publishEnd = publishStart.plusYears(1); audienceUsers = new ArrayList<>(); audienceGroups = new ArrayList<>(); feedbackModel = FeedbackModel.RATING_AND_COMMENTS; currentPlayer = null; playerVisible = new HashSet<>(); playerVisible.add(0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Level(String name) {\n\t\t\n\t\tthis.name = name;\n\t\t\n\t\ttry {\n\t\t\tlevelType = new LevelType(DEFAULT_LEVEL_TYPE, true);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(0);\n\t\t}\n//\t\tscreen = new Screen(300*3/SCREEN_SCALE, 168*3/SCREEN_SCALE, SCREEN_SCALE);\n\t\tscreen = new Screen(Game.width/SCREEN_SCALE, Game.height/SCREEN_SCALE, SCREEN_SCALE);\n\t\t\n\t\twidth = 800;\n//\t\theight = 500;\n\t\theight = 200;\n\t\t\n\t\tWall wall0 = new Wall(100,80,30,40);\n\t\tWall wall1 = new Wall(166,80,16,40);\n\t\t\n\t\t//Construct a default level\n\t\tFloor defaultFloor0 = new Floor(1,44,62, \"Floor 0\");\n\t\tFloor defaultFloor1 = new Floor(53,60,96, \"Floor 1\");\n\t\tFloor defaultFloor2 = new Floor(70,50,96, \"Floor 2\");\n\t\tFloor defaultFloor3 = new Floor(90,40,96, \"Floor 3\");\n\t\t\n\t\tPlatform pf0 = new Platform(186,40,100);\n\t\tPlatform pf1 = new Platform(130,80,36);\n\t\t\n\t\tBackground bg = new Background();\n\t\tadd(bg);\n\t\t\n\t\t//Background scrolling slower is probably going to have to wait a bit\n//\t\tBackgroundObject bgo = new BackgroundObject(100,25, 2);\n//\t\tadd(bgo);\n\t\t\n\t\tCoin c0 = new Coin(10, 44);\n\t\t\n\t\t\n\t\t//Note well- floors should be added in decreasing order of height, starting with the tallest.\n\t\t//\tWay to sort objects by a variable?\n\t\tadd(defaultFloor1);\n\t\tadd(defaultFloor2);\n\t\tadd(defaultFloor3);\n\t\tadd(defaultFloor0);\n\t\t\n\t\tadd(wall0);\n\t\tadd(wall1);\n\t\tadd(pf0);\n\t\tadd(pf1);\n\t\t\n\t\tadd(c0);\n\t\t\n\t}", "public void level1() {\n\t\tlevel = new Level(1); //Create Level object, passing 1 to constructor for level 1\n\t\tplayer = new Player(100, 100); //Set player y position); //Create player object, place in middle of screen, position will later be determined by level png\n\t}", "Level makeLevel(String levelName) {\r\n return new Level(levelName);\r\n }", "public Level(String levelToEdit)\r\n\t{\r\n\t\tmakeCommonObjects();\r\n\t\tgrid = new Grid(levelToEdit);//CHANGE GRID COORDINATES WHILE MAKING A NEW LEVEL\r\n\t\tmakeButton = new GameSprite(Player.filename);\r\n\t\tmakeButton.setPosition(0,0);\r\n\t\tplayer = new Player(100, 420);\r\n\t\tbackground = new Background(1, grid);\r\n\t}", "void createNewLevel(int level);", "public PoisonPack(Battle battle, String name){\n\t\t//calls the ItemDrop constructor\n\t\tsuper(true, 200, 0, false, battle);\n\t\tthis.name = name;\n\t\tthis.imageName = \"poison.png\";\n\t}", "public int createPack(String name)\n {\n dbObj=new dbFlashCards(userId);\n if(dbObj.packExists(name)!=-1)\n return -1;\n else\n {\n //no such pack exists ..creates a new pack and returns its packid\n return dbObj.addPack(name);\n \n }\n \n }", "@Override\n protected void createCreature() {\n Sphere sphere = new Sphere(32,32, 0.4f);\n pacman = new Geometry(\"Pacman\", sphere);\n Material mat = new Material(assetManager, \"Common/MatDefs/Misc/Unshaded.j3md\");\n mat.setColor(\"Color\", ColorRGBA.Yellow);\n pacman.setMaterial(mat);\n this.attachChild(pacman); \n }", "public void createGroup() {\n\t\tString name = JOptionPane\n\t\t\t\t.showInputDialog(\"Please Enter a new group name:\");\n\t\tif (name.equals(\"\"))\n\t\t\treturn;\n\n\t\tDefaultMutableTreeNode node = (DefaultMutableTreeNode) getLastSelectedPathComponent();\n\t\tEllowFile pfile = (EllowFile) node.getUserObject(), file;\n\t\tif (pfile.isDirectory()) {\n\t\t\tfile = new EllowFile(pfile.getAbsolutePath() + \"\\\\\\\\\" + name);\n\t\t\tfile.mkdirs();\n\t\t\tmodel.insertNodeInto(new DefaultMutableTreeNode(file), node,\n\t\t\t\t\tnode.getChildCount());\n\t\t} else {\n\t\t\tfile = new EllowFile(pfile.getParent() + \"\\\\\\\\\" + name);\n\t\t\tfile.mkdirs();\n\t\t\tnode = ((DefaultMutableTreeNode) node.getParent());\n\t\t\tmodel.insertNodeInto(new DefaultMutableTreeNode(file), node,\n\n\t\t\tnode.getChildCount());\n\t\t}\n\t\tfile.parentProject = pfile.parentProject;\n\t\tpfile.parentProject.rebuild();\n\t\tmodel.nodeChanged(root);\n\t}", "public Archer(String archerName) {\n\tname = archerName;\n\thealth = 100;\n\tstrength = 100;\n\tdefense = 20;\n\tattack = 2.5;\n }", "public Player(String name)\n {\n // initialise instance variables\n this.name = name;\n // start out with $100 in your wallet\n wallet = new Wallet(100);\n inventory = new HashMap<String, Item>();\n currentRoom = null;\n olcc = new OLCC();\n\n }", "Lehrkraft createLehrkraft();", "public Punter(String name)\n {\n super(name);\n }", "public flashCardPack viewPack(String name)\n {\n dbObj=new dbFlashCards(userId);\n int packId=dbObj.packExists(name);\n pack=new flashCardPack(userId,packId);\n \n return pack;\n \n }", "public \n UnpackExtFactory\n (\n Path bundlePath, \n String author, \n String view, \n boolean releaseOnError, \n ActionOnExistence actOnExist,\n TreeMap<String,String> toolsetRemap,\n TreeMap<String,String> selectionKeyRemap,\n TreeMap<String,String> licenseKeyRemap,\n TreeMap<String,String> hardwareKeyRemap,\n NodeBundle bundle\n ) \n {\n pPath = bundlePath;\n\n pAuthor = author; \n pView = view; \n\n pReleaseOnError = releaseOnError;\n pActionOnExistence = actOnExist;\n pToolsetRemap = toolsetRemap;\n pSelectionKeyRemap = selectionKeyRemap;\n pLicenseKeyRemap = licenseKeyRemap;\n pHardwareKeyRemap = hardwareKeyRemap;\n\n pBundle = bundle;\n }", "public void addAuthorAction()\n\t{\n\t\tViewNavigator.loadScene(\"Add Author\", ViewNavigator.ADD_AUTHOR_SCENE);\n\t}", "public static LevelPack fromFile(String filename) {\n\t\tString json = Serializer.readStringFromFile(filename);\n\t\tLevelPack lp = fromJson(json);\n\t\tstandardize(lp);\n\t\treturn lp;\n\t}", "public void constructPlayerNamesMenu(int num){\r\n\t\tnamesMenu.createLabels(num);\r\n\t\tnamesMenu.createTextFields(num);\r\n\t\tnamesMenu.buildPanel(num);\r\n\t}", "public void createLevel() {\n room = 1;\n currentLevelFinish = false;\n createRoom();\n }", "public Level createPlayableLevel(String name, int numberOfBricks, double probOfGlass, double probOfMetal, int seed){\r\n return new PlayableLevel(name, numberOfBricks, probOfGlass, probOfMetal, seed);\r\n }", "public DouaneHal(World firstWorld){\n super(800, 400, 1);\n this.firstWorld = firstWorld;\n \n addObject(new Bericht(3), 400, 200);\n }", "public static void createNewLevel(int sizeX, int sizeY, String displayname, List<Coordinate> blockedCoordinates, double speedModifier, int startLength) {\r\n\t\tLevelFileManager lfm = new LevelFileManager();\r\n\t\tlfm.writeLevelToStorage(sizeX, sizeY, displayname, blockedCoordinates, speedModifier, startLength);\r\n\t}", "public void setAuthor(Player author){\n this.playerAuthor = author;\n }", "public StoryMakerStory(String title, String author) {\n\t\tif (title == null) {\n\t\t\tthrow new IllegalArgumentException(ExceptionMessages.NULL_TITLE);\n\t\t}\n\t\tif (title.isEmpty()) {\n\t\t\tthrow new IllegalArgumentException(ExceptionMessages.EMPTY_TITLE);\n\t\t}\n\t\tif (author == null) {\n\t\t\tthrow new IllegalArgumentException(ExceptionMessages.NULL_AUTHOR);\n\t\t}\n\t\tif (author.isEmpty()) {\n\t\t\tthrow new IllegalArgumentException(ExceptionMessages.EMPTY_AUTHOR);\n\t\t}\n\n\t\tthis.title = title;\n\t\tthis.author = author;\n\t\tthis.pages = new ArrayList<Page>();\n\t\tthis.setting = new DisplaySetting();\n\t}", "public Publisher createHierarchicalTopicPublisher(String topicName) {\n validateTopicName(topicName, true);\n\n String topicRootName;\n int pos = topicName.indexOf('.');\n if (pos == -1) {\n topicRootName = topicName;\n } else {\n topicRootName = topicName.substring(0, pos);\n }\n\n String source = String.format(\"%s.%s\", endpointId, topicRootName);\n CAMQPEndpointPolicy endpointPolicy = new CAMQPEndpointPolicy();\n endpointPolicy.setEndpointType(EndpointType.TOPIC);\n endpointPolicy.setTopicRouterType(TopicRouterType.Hierarchical);\n CAMQPSourceInterface sender = CAMQPEndpointManager.createSource(session, source, topicRootName, endpointPolicy);\n return new Publisher(topicName, sender);\n }", "public static LevelPack fromFilePartial(String filename) {\n\n\t\t// Read everything from the LevelPack, but don't bother deserializing\n\t\t// the Worlds.\n\t\tString json = Serializer.readStringFromFile(filename);\n\t\treturn fromJsonPartial(json);\n\t}", "public static void main(String[] args) throws IOException {\n //Terrain \n \tterrain = LevelIO.load(new File(args[0]));\n World world = new World(terrain); \n \n // set parent for each object in world \n terrain.setParent(root);\n for (int i = 0; i < terrain.trees().size(); i++) // set each tree parent to root \n \tterrain.trees().get(i).setParent(root);\n for (int i = 0; i < terrain.roads().size(); i++) // set each road parent to root \n \tterrain.roads().get(i).setParent(root);\n \n //camera.getPerson().setTerrain(terrain);\n // person = new Person(root);\n //person = new Person(camera);\n //camera.addChild(person);\n world.start();\n }", "public BattleWorld(String pokemonName, int level)\r\n {\r\n wildPokemon = true;\r\n isBattleOver = false;\r\n initWorld(pokemonName, level, 0);\r\n }", "public MainModel(String levelname) {\r\n LevelData level = LevelData.parseLevelFromName(levelname);\r\n\r\n this.history = new ModelHistory(levelname);\r\n\r\n this.jumper = new Jumper(level.getPlayerPosition());\r\n\r\n this.blocks = new ArrayList<>();\r\n for (Quad quad : level.getQuadData()) {\r\n blocks.add(Block.fromQuad(quad, BlockType.STICKY));\r\n }\r\n blocks.add(Block.fromQuad(level.getFinishQuad(), BlockType.FINISH));\r\n\r\n }", "public Builder setLevelName(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n levelName_ = value;\n onChanged();\n return this;\n }", "public Builder setLevelName(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n levelName_ = value;\n onChanged();\n return this;\n }", "public Builder setLevelName(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n levelName_ = value;\n onChanged();\n return this;\n }", "public static void main(String[] args) {\n String level = getLevel(\"./levels/original/lvl-1.txt\");\n MarioWorld setupWorld = new MarioWorld(null);\n setupWorld.visuals = false;\n setupWorld.initializeLevel(level, 1000 * 200);\n setupWorld.mario.isLarge = false;\n setupWorld.mario.isFire = false;\n setupWorld.update(new boolean[MarioActions.numberOfActions()]);\n\n // set level cutout width (0 means it will be set automatically)\n int levelCutoutTileWidth = 0;\n\n // create original OOP forward model\n MarioForwardModel originalModel = new MarioForwardModel(setupWorld.clone());\n\n // convert to slim OOP forward model\n MarioForwardModelSlim slimModel = Converter.originalToSlim(originalModel, levelCutoutTileWidth);\n\n // convert to bin model\n MarioForwardModelBin binModel = Converter.slimToBin(slimModel);\n }", "public Level1()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(560, 560, 1); \n prepare();\n gfs_level1 = new GreenfootSound(\"main.wav\");\n\n }", "public Level(int width, int height)\r\n\t{\r\n\t\tmakeCommonObjects();\r\n\t\tgrid = new Grid(width,height);//CHANGE GRID COORDINATES WHILE MAKING A NEW LEVEL\r\n\t\tmakeButton = new GameSprite(Player.filename);\r\n\t\tmakeButton.setPosition(0,0);\r\n\t\tplayer = new Player(100, 420);\r\n\t\tbackground = new Background(1, grid);\r\n\t}", "public abstract World create(World world);", "public ProgramModule createRootModule(String treeName) throws DuplicateNameException;", "public Lesson(String name)\r\n { this.name = name;\r\n layer = 1; \r\n }", "public Human(String name) { // constructor method for set values on the variables while object is initialized.\r\n\t\t\r\n\t\tRandom _rand = new Random();\r\n\t\t\r\n\t\t_weight = _rand.nextInt((5 - 2) + 1) + 2 + ( _rand.nextInt(99) / 100 );\r\n\t\t_height = _rand.nextInt((25 - 15) + 1) + 15 + ( _rand.nextInt(99) / 100 );\r\n\t\t_fullname = name;\r\n\t\tSystem.out.println(\"Hello everyone, i am \" + _fullname + \" it is nice to meet you all.\");\r\n\t\tSystem.out.println(\"My height is \" + _height);\r\n\t\tSystem.out.println(\"My weight is \" + _weight);\r\n\t\r\n\t}", "public LevelLoader(GameStateManager gsm, String worldName, String map_name) {\n\t\tsuper(gsm);\n\t\tthis.worldName = worldName;\n\t\tthis.map_name = map_name;\n\t}", "public Player(String name){\r\n\t\tthis.name = name;\r\n\t\tDie die = new Die();\r\n\t\tthis.die = die;\r\n\t}", "public LevelName(String levelName) {\n this.levelName = levelName;\n }", "public Paper(String name, Author author, String data) {\n\t\tthis.name = name;\n\t\tthis.author = author;\n\t\tthis.data = data;\n\t}", "public void inicializar(String name,Pane paneContenido) {\n\t\t\n\t\tthis.paneContenido = paneContenido;\n\t\tstage=new Stage();\n\t\tstage.setScene(new Scene(paneContenido));\n\t\tstage.setTitle(name);\n\t\tnodos=new HashMap<>();\n\t\tmodificarBanner(\"views/imagenes/banner.jpg\");\n\t}", "private void populateLevel() {\r\n\r\n\r\n\t\t// Setup Goal\r\n\t\tJsonValue goalVal = levelAssets.get(\"goal\");\r\n\t\tfloat gWidth = goalTile.getRegionWidth()/scale.x;\r\n\t\tfloat gHeight = goalTile.getRegionHeight()/scale.y;\r\n\t\tfloat gX = goalVal.get(\"pos\").getFloat(0) + gWidth / 2;\r\n\t\tfloat gY = goalVal.get(\"pos\").getFloat(1) + gHeight / 2;\r\n\t\tgoalDoor = new DoorModel(gX, gY, gWidth, gHeight);\r\n\t\tgoalDoor.setBodyType(BodyDef.BodyType.StaticBody);\r\n\t\tgoalDoor.setDensity(constants.get(\"goal\").getFloat(\"density\", 0));\r\n\t\tgoalDoor.setFriction(constants.get(\"goal\").getFloat(\"friction\", 0));\r\n\t\tgoalDoor.setRestitution(constants.get(\"goal\").getFloat(\"restitution\", 0));\r\n\t\tgoalDoor.setSensor(true);\r\n\t\tgoalDoor.setDrawScale(scale);\r\n\t\tgoalDoor.setTexture(goalTile);\r\n\t\tgoalDoor.setName(\"goal\");\r\n\t\taddObject(goalDoor);\r\n\t\taddObjectTo(goalDoor, LevelCreator.allTag);\r\n\r\n\t\t// Get default values\r\n\t\tJsonValue defaults = constants.get(\"defaults\");\r\n\t\tJsonValue objs = levelAssets.get(\"objects\");\r\n\r\n\t\t//group platform constants together for access in following for-loop\r\n\t\tTextureRegion[] xTexture = {lightTexture, darkTexture, allTexture,\r\n\t\t\tlightningLightTexture, lightningDarkTexture, lightningAllTexture,\r\n\t\t\trainLightTexture, rainDarkTexture, rainAllTexture,\r\n\t\t\t\tcrumbleLightTexture, crumbleDarkTexture, crumbleAllTexture};\r\n\r\n\t\tTextureRegion[] reducedXTexture = {lightTexture, darkTexture, allTexture,\r\n\t\t\t\tlightningLightTextureReduced, lightningDarkTextureReduced, lightningAllTextureReduced,\r\n\t\t\t\trainLightTextureReduced, rainDarkTextureReduced, rainAllTextureReduced,\r\n\t\t\t\tcrumbleLightTextureReduced, crumbleDarkTextureReduced, crumbleAllTextureReduced};\r\n\r\n\r\n\t\t// Setup platforms\r\n\t\tfor(int i=0; i < (objs != null ? objs.size : 0); i++)\r\n\t\t{\r\n\t\t\tJsonValue obj = objs.get(i);\r\n\r\n\t\t\t// Get platform attributes\r\n\t\t\tint platformType = obj.get(\"type\").asInt();\r\n\t\t\tint property = obj.get(\"property\") == null ? 0: obj.get(\"property\").asInt();\r\n\t\t\tJsonValue platformArgs = obj.get(\"positions\");\r\n\t\t\tJsonValue pathsArgs = obj.get(\"paths\");\r\n\r\n\t\t\tfor (int j = 0; j < platformArgs.size; j++) {\r\n\t\t\t\tfloat[] bounds = platformArgs.get(j).asFloatArray();\r\n\t\t\t\tfloat x = bounds[0], y = bounds[1], width = bounds[2], height = bounds[3];\r\n\t\t\t\tTextureRegion newXTexture;\r\n\t\t\t\tTextureRegion crumbleTexture = null;\r\n\t\t\t\tTexture originalTexture = null;\r\n\t\t\t\ttry {\r\n\t\t\t\t\t// temporary - need to refactor asset directory\r\n\t\t\t\t\tJsonValue assetName = obj.get(\"assetName\");\r\n\t\t\t\t\tint assetIndex = assetName.asInt();\r\n\t\t\t\t\tnewXTexture = new TextureRegion(tutorial_signs[assetIndex]);\r\n\t\t\t\t} catch(Exception e) {\r\n\t\t\t\t\tint platIdx = platformType-1+(property - 1)*3;\r\n\t\t\t\t\tint crumbleIdx = platIdx + 3;\r\n\t\t\t\t\tnewXTexture = new TextureRegion(xTexture[platIdx]);\r\n\t\t\t\t\toriginalTexture = newXTexture.getTexture();\r\n\t\t\t\t\t// For crumble animation\r\n\t\t\t\t\tif (platIdx > 5) {\r\n\t\t\t\t\t\tcrumbleTexture = new TextureRegion(xTexture[crumbleIdx]);\r\n//\t\t\t\t\t\tcrumbleTexture.setRegion(0, 0, width, height);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// If the platform size is the same as the spritesheet size\r\n\t\t\t\t\tif (originalTexture.getWidth() > 32 && width%(originalTexture.getWidth()/32) == 0) {\r\n\t\t\t\t\t\tnewXTexture = new TextureRegion(reducedXTexture[platIdx]);\r\n\t\t\t\t\t\toriginalTexture = newXTexture.getTexture();\r\n\t\t\t\t\t\tif (platIdx > 5) {\r\n\t\t\t\t\t\t\tcrumbleTexture = new TextureRegion(reducedXTexture[crumbleIdx]);\r\n//\t\t\t\t\t\t\tcrumbleTexture.setRegion(0, 0, width, height);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n//\t\t\t\t\tnewXTexture.setRegion(0, 0, width, height);\r\n\t\t\t\t}\r\n\t\t\t\tPlatformModel platformModel = new PlatformModel(bounds, platformType, property, newXTexture, scale,\r\n\t\t\t\t\t\tdefaults.getFloat( \"density\", 0.0f ), defaults.getFloat( \"friction\", 0.0f ) ,\r\n\t\t\t\t\t\tdefaults.getFloat( \"restitution\", 0.0f ), originalTexture, crumbleTexture);\r\n\t\t\t\tplatformModel.setTag(platformType);\r\n\t\t\t\tplatformModel.setProperty(property);\r\n\t\t\t\taddObject(platformModel);\r\n\t\t\t\taddObjectTo(platformModel, platformType);\r\n\t\t\t\t//TODO: Moving platforms\r\n\r\n\r\n\t\t\t\tif (pathsArgs != null) {\r\n\t\t\t\t\tfloat[] paths = pathsArgs.get(j).asFloatArray();\r\n\r\n\t\t\t\t\t//** Moving platform if > 1 path or different path from starting position\r\n\t\t\t\t\tif (hasValidPath(x, y, paths)) {\r\n\t\t\t\t\t\tplatformModel.setBodyType(BodyDef.BodyType.KinematicBody);\r\n\t\t\t\t\t\tmovingObjects.add(platformModel);\r\n\r\n\t\t\t\t\t\tPooledList<Vector2> pathList = new PooledList<>();\r\n\t\t\t\t\t\tfor (int k = 0; k < paths.length; k+=2) {\r\n\t\t\t\t\t\t\tpathList.add(new Vector2(paths[k], paths[k+1]));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tfloat velocity = 3;\r\n\r\n\t\t\t\t\t\tplatformModel.setGravityScale(0);\r\n\t\t\t\t\t\tplatformModel.setPaths(pathList);\r\n\t\t\t\t\t\tplatformModel.setVelocity(velocity);\r\n\r\n\t\t\t\t\t\tmovingObjects.add(platformModel);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// This world is heavier\r\n\t\tworld.setGravity( new Vector2(0,defaults.getFloat(\"gravity\",0)) );\r\n\r\n\t\t// Set level background index\r\n\t\tint backgroundTextureIndex = levelAssets.get(\"background\").asInt();\r\n\t\tbackgroundLightTexture = backgrounds[backgroundTextureIndex - 1];\r\n\t\tbackgroundDarkTexture = backgrounds[backgroundTextureIndex];\r\n\t\tbackgroundTexture = backgroundLightTexture;\r\n\r\n\t\t// Initialize background animations\r\n\t\tactualBackgroundTexture = backgroundTexture.getTexture();\r\n\t\tbackgroundEntirePixelWidth = actualBackgroundTexture.getWidth();\r\n\t\tbackgroundNumAnimFrames = (int)(backgroundEntirePixelWidth/backgroundFramePixelWidth);\r\n\t\tbackgroundAnimator = new FilmStrip(backgroundTexture,1, backgroundNumAnimFrames, backgroundNumAnimFrames);\r\n\t\tbackgroundAnimator.setFrame(0);\r\n\t\tbackgroundAnimeframe = 0;\r\n\t\tbackgroundOrigin = new Vector2(backgroundAnimator.getRegionWidth()/2.0f, backgroundAnimator.getRegionHeight()/2.0f);\r\n\r\n\t\t// Set level bounds\r\n\t\twidthUpperBound = levelAssets.get(\"dimensions\").getInt(0);\r\n\t\theightUpperBound = levelAssets.get(\"dimensions\").getInt(1);\r\n\r\n\t\t// Setup Somni\r\n\r\n\t\tJsonValue somniVal = levelAssets.get(\"somni\");\r\n\t\tfloat sWidth = somniTexture.getRegionWidth()/scale.x;\r\n\t\tfloat sHeight = somniTexture.getRegionHeight()/scale.y;\r\n\t\tfloat sX = somniVal.get(\"pos\").getFloat(0) + sWidth / 2;\r\n\t\tfloat sY = somniVal.get(\"pos\").getFloat(1) + sHeight / 2;\r\n\t\tsomni = new CharacterModel(constants.get(\"somni\"), sX, sY, sWidth, sHeight, platformController.somnif, CharacterModel.LIGHT);\r\n\t\tsomni.setDrawScale(scale);\r\n\t\tsomni.setTexture(somniIdleTexture);\r\n\t\tsomni.setFilterData(platformController.somnif);\r\n\t\tsomni.setActive(true);\r\n\t\taddObject(somni);\r\n\t\taddObjectTo(somni, LevelCreator.allTag);\r\n\r\n\r\n\t\t// Setup Phobia\r\n\r\n\t\tJsonValue phobiaVal = levelAssets.get(\"phobia\");\r\n\t\tfloat pWidth = phobiaTexture.getRegionWidth()/scale.x;\r\n\t\tfloat pHeight = phobiaTexture.getRegionHeight()/scale.y;\r\n\t\tfloat pX = phobiaVal.get(\"pos\").getFloat(0) + pWidth / 2;\r\n\t\tfloat pY = phobiaVal.get(\"pos\").getFloat(1) + pHeight / 2;\r\n\t\tphobia = new CharacterModel(constants.get(\"phobia\"), pX, pY, pWidth, pHeight, platformController.phobiaf, CharacterModel.DARK);\r\n\t\tphobia.setDrawScale(scale);\r\n\t\tphobia.setTexture(phobiaIdleTexture);\r\n\t\tphobia.setFilterData(platformController.phobiaf);\r\n\t\taddObject(phobia);\r\n\t\taddObjectTo(phobia, LevelCreator.allTag);\r\n\t\tphobia.setActive(true);\r\n\r\n\t\t// Setup Combined\r\n\r\n\t\tfloat cWidth = combinedTexture.getRegionWidth()/scale.x;\r\n\t\tfloat cHeight = combinedTexture.getRegionHeight()/scale.y;\r\n\r\n\t\tcombined = new CharacterModel(constants.get(\"combined\"), 0, 0, cWidth, cHeight, platformController.combinedf, CharacterModel.DARK);\r\n\t\tcombined.setDrawScale(scale);\r\n\t\tcombined.setTexture(somniPhobiaTexture);\r\n\t\t//combined.setTag();\r\n\t\tcombined.setFilterData(platformController.combinedf);\r\n\t\taddObject(combined);\r\n\t\taddObjectTo(combined, LevelCreator.allTag);\r\n\t\tcombined.setActive(true);\r\n\r\n\t\t//Remove combined\r\n\t\tobjects.remove(combined);\r\n\t\tsharedObjects.remove(combined);\r\n\t\tcombined.setActive(false);\r\n\r\n\t\taction = 0;\r\n\r\n\t\tPreferences prefs = GDXRoot.getPreferences();\r\n\t\tvolume = prefs.contains(\"volume\") ? prefs.getFloat(\"volume\") : defaults.getFloat(\"volume\",\r\n\t\t\t\t1.0f);\r\n//\t\tSystem.out.println(volume);\r\n\r\n\t\tplatformController.applyFilters(objects);\r\n\t}", "public Level(String levelFile,Scene gameS){\n levelCreator = new TileFactory();\n this.levelFile = levelFile;\n initLevel();\n gameScene = gameS;\n enableInput(gameScene);\n }", "Stone create();", "public Human(String playerName) {\n\t\tsuper(playerName, NAME, FACTION_NUM, initialResource,\n\t\t\t\tmaxResource, resourceRate);\n\t}", "public Player(Integer nameKey){\n\t\thand = new HashSet<Card>();\n\t\tswitch(nameKey){\n\t\tcase 0:\n\t\t\tname = \"Kasandra Scarlet\"; break;\n\t\tcase 1:\n\t\t\tname = \"Jack Mustard\"; break;\n\t\tcase 2:\n\t\t\tname = \"Diane White\"; break;\n\t\tcase 3:\n\t\t\tname = \"Jacob Green\"; break;\n\t\tcase 4:\n\t\t\tname = \"Eleanor Peacock\"; break;\n\t\tcase 5:\n\t\t\tname = \"Victor Plum\"; break;\n\t\t}\n\t}", "public Shield(String name,int levelRequired){\n\t\tsuper(name,levelRequired);\n\t\titemId = 2;\n\t\tprice = (levelRequired*50)/40*60;\n\t\tsalePrice = (int)(price*0.75);\n\t\tprimaryStat = levelRequired*3/5 + (int)(Math.random()*5+1);\n\t}", "public Player(String name){\n\t\tthis.name = name;\n\t\t//this.deck = new Deck(1);\n\t\t((Deck) this.deck).buildDeck();\n\t\t//this.inhand = new CardsGroup();\n\t\tthis.bench = new CardsGroup();\n\t\tthis.userDiscardPile = new CardsGroup();\n\t}", "void create(int id, int authorId, String title);", "public Creator(String score_name) {\n this.score_name = score_name;\n\n this.bukkitScoreboard = Bukkit.getScoreboardManager().getNewScoreboard();\n this.obj = this.bukkitScoreboard.registerNewObjective(randomString(), \"dummy\", \"test\");\n\n this.obj.setDisplaySlot(DisplaySlot.SIDEBAR);\n this.obj.setDisplayName(color(score_name));\n }", "public void construct(Player player) throws IOException, URISyntaxException {\n builder.init();\n builder.buildTitle(player);\n builder.buildMapView(player);\n builder.buildMoves(player);\n builder.buildWinner(player);\n }", "public Shelf(String name) {\r\n\t\tsuper();\r\n\t\tthis.name = name;\r\n\t}", "private IWorld worldCreator(){\n if (gameWorld == GameWorld.NORMAL) return\n new Normal();\n else return\n new Nether();\n }", "A create(\n String name,\n AbilityType abilityType,\n int level,\n int manaCost,\n ExpandableCloud effectCloud,\n boolean canBeCloudBoosted,\n int castDist,\n List<Class<? extends Unit>> affectedUnitTypes,\n boolean appliesToAllied,\n boolean appliesToFoe,\n String description,\n List<AbilityEffect> effects);", "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 Level(String levelName, int levelNo, String backgroundSound, Color skyColor) {\n //Save the scene file to load.\n super(levelName + \".j3o\");\n this.levelName = levelName;\n this.levelNo = levelNo;\n this.backgroundSound = backgroundSound;\n this.skyColor = skyColor;\n }", "public void setAuthorName(String authorName) {\n this.authorName = authorName;\n }", "public void setAuthorName(String authorName) {\n this.authorName = authorName;\n }", "private final void createAndAddNode(String name) {\n\t}", "public SimpleOre(int par1, Material material, String mod, CreativeTabs tab) \n\t{\n\t\tsuper(par1, material);\n\t\tthis.modName = mod;\n\t\t\n\t}", "public static void setupResourcePack() {\n try {\n FileWriter writer = new FileWriter(Paths.get(FMLPaths.CONFIGDIR.get().toAbsolutePath().toString(),WingTech.MODID, \"resources\", \"pack.mcmeta\").toFile());\n writer.write(\"{\\\"pack\\\":{\\\"pack_format\\\":6,\\\"description\\\":\\\"WingTech resource pack used for lang purposes for the user to add lang for teas.\\\"}}\");\n writer.close();\n }\n catch (Exception e){\n WingTech.LOGGER.error(\"Error creating pack.mcmeta\", e);\n }\n Minecraft.getInstance().getResourcePackRepository().addPackFinder((consumer, factory) -> {\n final ResourcePackInfo packInfo = ResourcePackInfo.create(\n WingTech.MODID,\n true,\n () -> new FolderPack(Paths.get(FMLPaths.CONFIGDIR.get().toAbsolutePath().toString(),WingTech.MODID, \"resources\").toFile()) {\n @Override\n public boolean isHidden() {\n return true;\n }\n },\n factory,\n ResourcePackInfo.Priority.TOP,\n IPackNameDecorator.BUILT_IN\n );\n if (packInfo == null) {\n WingTech.LOGGER.error(\"Failed to load tea resource pack!\");\n return;\n }\n consumer.accept(packInfo);\n });\n }", "private static void standardize(LevelPack pack) {\n\t\t// TODO: kill this once we have the LevelPacks stored at a standardized\n\t\t// state.\n\n\t\t// If level header info was not stored originally, check to make sure\n\t\t// there are not nulls after the deserialization.\n\t\tif (pack.levels == null)\n\t\t\tpack.levels = new WorldList();\n\t\tif (pack.levelTitles == null)\n\t\t\tpack.levelTitles = new ArrayList<String>();\n\t\tif (pack.levelDescriptions == null)\n\t\t\tpack.levelDescriptions = new ArrayList<String>();\n\t\tif (pack.levelEmblems == null)\n\t\t\tpack.levelEmblems = new ImageList();\n\n\t\t// If the level header stuff wasn't originally stored, it may be\n\t\t// necessary to populate header info with dummy data. There will always\n\t\t// be at least one level title/description/emblem, even if the levels\n\t\t// themselves don't exist.\n\t\tpack.levelCount = Math.max(1, Math.max(pack.levels.size(),\n\t\t\t\tMath.max(pack.levelTitles.size(), Math.max(pack.levelDescriptions.size(), pack.levelEmblems.size()))));\n\t\twhile (pack.levelTitles.size() < pack.levelCount)\n\t\t\tpack.levelTitles.add(\"Unnamed level.\");\n\t\twhile (pack.levelDescriptions.size() < pack.levelCount)\n\t\t\tpack.levelDescriptions.add(\"No description.\");\n\t\twhile (pack.levelEmblems.size() < pack.levelCount)\n\t\t\tpack.levelEmblems.add((BufferedImage) UIBuilder.getImage(\"images/ice_cave.jpg\"));\n\n\t\t// The lock is something new added, but it defaults to false anyway.\n\n\t}", "public void createWorld(){\n\n }", "private void createWarrior(String persoName, String persoImage, int persoLife, int attack) {\n\t\tpersoList.add(new Warrior(persoName, persoImage, persoLife, attack));\n\t}", "public Mission(String name, int nutzlast) {\r\n\t\tthis.name = name;\r\n\t\tthis.raumsonde = new Raumsonde(nutzlast);\r\n\r\n\t\tthis.aktuelleLast = 0;\r\n\t\tthis.ladung = new HashMap<Himmelskoerper, Modul>();\r\n\t\tthis.schwerstesModul = null;\r\n\t}", "public void initWorld(String inName, int inLevel, int id)\r\n {\r\n setBackground(248);\r\n\r\n addObject(playerPkmnInfoBox, 334, 229);\r\n addObject(enemyPkmnInfoBox, 144, 49);\r\n\r\n currentEnemyPokemon = id;\r\n\r\n addNewPokemon(\"Player\", currentPlayerPokemon, \"\", 0);\r\n if(wildPokemon)\r\n {\r\n addNewPokemon(\"Enemy\", currentEnemyPokemon, inName, inLevel);\r\n }\r\n else\r\n {\r\n addNewPokemon(\"Enemy\", currentEnemyPokemon, \"\", 0);\r\n }\r\n\r\n this.textInfoBox = new TextInfoBox(\"BattleSelectBox\", \"BattleBar\", currentPlayerPokemon);\r\n addObject(textInfoBox, getWidth() / 2, getHeight() - 69); //Battle Text Box\r\n\r\n newMusic(\"Battle\");\r\n Greenfoot.setSpeed(50);\r\n setPaintOrder(Blackout.class, TextInfoBox.class, PkmnInfoBox.class, Pokemon.class);\r\n }", "protected Item(String name, int level, String location){\r\n this.name = name;\r\n this.level = level;\r\n this.location = location;\r\n }", "public MiniBossLevel() {\r\n super(\"background_final.png\");\r\n setStatDisplay();\r\n generateWorld(world);\r\n }", "private Level produce() {\n\t\tint[][]grid = new int[row][column];\n\t\tArrayList<Point> goals = new ArrayList<Point>();\n\t\tint newRand = 0;\n\t\tfor (int x = 0; x < row; x++)\t{\n\t\t\tfor (int y = 0; y < column; y++)\t{\n\t\t\t\tnewRand = rand.nextInt(TOTAL);\n\t\t\t\tif (newRand < CAT_1)\t{\n\t\t\t\t\tgrid[x][y] = 1;\n\t\t\t\t} else if (newRand < CAT_2)\t{\n\t\t\t\t\tgrid[x][y] = 2;\n\t\t\t\t} else if (newRand < CAT_3)\t{\n\t\t\t\t\tgrid[x][y] = 3;\n\t\t\t\t} else if (newRand < CAT_4)\t{\n\t\t\t\t\tgrid[x][y] = 4;\n\t\t\t\t} else if (newRand < CAT_5)\t{\n\t\t\t\t\tgoals.add(new Point(x,y));\n\t\t\t\t} else if (newRand < TOTAL)\t{\n\t\t\t\t\tgrid[x][y] = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn new Level(grid, row, column, goals);\n\t}", "public void createPartyPanel()\n {\n setPartyLabel(game.getPartyPane(), 0);\n //setPartyLabel(\"EMPTY\", 1);\n //setPartyLabel(\"EMPTY\", 2);\n //setPartyLabel(\"EMPTY\", 3);\n reloadPartyPanel();\n }", "Authorizor createAuthorizor();", "public void makeProfile(String name){\r\n try{\r\n PrintWriter out = new PrintWriter(new FileWriter(\"../profiles/\" + name + \".profile\"));\r\n out.println(\"HORATIU INCORPORATED PROTECTED\"); //Header\r\n out.println(name); //Player name\r\n out.println(0); //Score\r\n \r\n //UNLOCK CODES\r\n //-1 if not unlocked\r\n //0 if unlocked but not completed\r\n //1 if completed\r\n out.println(0); //Initial level is unlocked by default\r\n for(int i = 0; i < 5; i++){\r\n out.println(-1); //\r\n }\r\n out.close();\r\n }\r\n catch(IOException e){\r\n }\r\n Player.playerName = name;\r\n Player.playerScore = 0; //Score\r\n Player.scores[0] = 0;\r\n for(int i = 1; i < 6; i++){ //1 to 6 so it does not overwrite the first 0\r\n Player.scores[i] = -1;\r\n }\r\n GameApp.makeToView(name);\r\n }", "public void createMainInventor() {\n String name = _plugin.getConfigManager().getGeneralSettingsMap().get(\"Name\");\r\n String colorizedName = _plugin.getUtilsManager().colorizeString(name);\r\n //Size of the Inventory;\r\n int inventorySize = Integer.valueOf(_plugin.getConfigManager().getGeneralSettingsMap().get(\"InventorySize\"));\r\n //Initialize Inventory;\r\n mainInventory = _plugin.getServer().createInventory(null, inventorySize, colorizedName);\r\n //Retrieve the HashMaps for the plugin;\r\n HashMap<Integer, CategoryItem> categoryInformationMap = _plugin.getConfigManager().getCategoryInformationMap();\r\n HashMap<String, String> languageInformation = _plugin.getConfigManager().getLanguageInformationMap();\r\n //Add items to Inventory;\r\n for (Integer i : categoryInformationMap.keySet()) {\r\n CategoryItem categoryItem = categoryInformationMap.get(i);\r\n ItemStack item = categoryItem.getItem();\r\n ItemMeta itemMeta = item.getItemMeta();\r\n itemMeta.setDisplayName(_plugin.getUtilsManager().colorizeString(languageInformation.get(\"CategoryName\").replace(\"%cat%\", categoryItem.getName())));\r\n List<String> lore = new ArrayList<>();\r\n lore.add(_plugin.getUtilsManager().colorizeString(categoryItem.getDescription()));\r\n item.setItemMeta(itemMeta);\r\n mainInventory.addItem(item);\r\n }\r\n }", "@Override\n protected void initGame() {\n getGameWorld().setEntityFactory(new PlatformerFactory());\n getGameWorld().setLevelFromMap(\"Platformergame1.json\");\n\n // Sets spawnloction of the player\n player = getGameWorld().spawn(\"player\", 50, 50);\n }", "private void init(){\n stage = new Stage();\n inventory = Warrior.getInventory();\n\n Skin skin = new Skin(Gdx.files.internal(\"assets/skins/uiskin.json\"));\n\n dragAndDrop = new DragAndDrop();\n dragAndDrop.setDragActorPosition(-25,25); //offset of dragable item\n\n lootWindow = createView(skin);\n\n stage.addActor(lootWindow); // add window to stage\n }", "protected String getBookAuthorBlock( String author )\n {\n return \"<bookinfo><corpauthor>\" + author + \"</corpauthor>\";\n }", "public Levels()\r\n { \r\n super(1070, 570, 1);\r\n \r\n //Add the bottom platform in the menu screen\r\n platforms = new Platforms[7]; \r\n for (int i = 0; i < platforms.length; i++)\r\n {\r\n platforms[i] = new Platforms();\r\n }\r\n bottomPlatform();\r\n\r\n //Add the Potato (player)\r\n player = new Player();\r\n addObject (player, 100, 512); \r\n\r\n setBackground(\"menu.png\");\r\n }", "public Level(int levelNumber)\r\n\t{\t\r\n\t\tlevelNum = levelNumber;\r\n\t\tlevelFileName = \"level\"+levelNum+\".txt\";\r\n\t\tlistFileName = \"level\"+levelNum+\"items.txt\";\r\n\t\tmakeCommonObjects();\r\n\t\tgrid = new Grid(levelFileName);\r\n\t\tGridSquare startSquare = grid.startLocation();\r\n\t\tplayer = new Player((int)startSquare.rect.x,(int)startSquare.platform.getBoundingRectangle().y+3);\r\n\t\tAndroidGame.camera.position.x = player.getX();\r\n\t\tAndroidGame.camera.position.y = player.getY();\r\n\t\tbackground = new Background(levelNumber, grid);\r\n\t\tdoorBubble = new OffScreenBubble(grid.getFinish());\r\n\t\tif(grid.getKey()!=null)\r\n\t\t{\r\n\t\t\thasKey = true;\r\n\t\t\tkeyBubble = new OffScreenBubble(grid.getKey());\r\n\t\t}\r\n\t\tplayer.reset(grid);\r\n\t}", "public Level(){\n\t\tlevel_image_pattern = \"default\";\n\t\t\n\t\timages = new HashMap <String, Image>();\n\t\tpickables = new ArrayList<Pickable>();\n\t\tplayer_initial_position = new int[2];\n\t\tplayer_initial_position[0] = 0;\n\t\tplayer_initial_position[1] = 0;\n\t\t\n\t\tconfig = Config.getInstance();\n\t\t\n\t}", "public Pokemon() { // if nothing was provided i'm just gonna give \n\t\tthis.name = \"\"; //its name empty String\n\t\tthis.level = 1; // and level is level 1\n\t}", "public ShamWorld(WorldSettings settings) {\n super(null, name, null, settings, null);\n }", "public PromoSetPack(String description, String name, double price){ \r\n\t\tthis.Type = type.PROMO; \r\n\t\tthis.description = description;\r\n\t\tthis.name = name;\r\n\t\tthis.price = price;\r\n\t\tthis.promo = new ArrayList<MenuItem>();\r\n\t}", "public static void main(String[] args) {\n System.out.println(\"Create the player.\");\n }", "public int createWar(String name, String desc) {\n\t\treturn 0;\n\t}", "public static void createGame(Player admin, String name, String baseName, boolean createWorlds) {\n\t\t\n\t\tWorldSet worldSet = new WorldSet(baseName, createWorlds);\n\t\t\n\t\t// create new game\n\t\tGame game = new Game(admin, name, worldSet, createWorlds);\n\t\tgames.add(game);\n\t\t\n\t\tPreGame preGame = new PreGame(admin.getUniqueId(), name);\n\t\tpreGames.remove(preGame);\n\t\t\n\t\tadmin.sendMessage(AQUA + \"A game has been successfully created with the name of \" + WHITE + name + AQUA + \n\t\t\t\t\". The admin of the game is \" + WHITE + admin.getName() + AQUA + \".\");\n\t\t\n\t}", "public UserPack(String id) {\n\t\t\tdesc = new PackDesc(id);\n\t\t\tsource = new Workspace(id);\n\t\t\tcastles = new PackCasList(this);\n\t\t\tmc = new PackMapColc(this);\n\t\t\teditable = true;\n\t\t\tloaded = true;\n\t\t}", "public Builder setLevelNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n levelName_ = value;\n onChanged();\n return this;\n }", "public Builder setLevelNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n levelName_ = value;\n onChanged();\n return this;\n }", "public Builder setLevelNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n levelName_ = value;\n onChanged();\n return this;\n }", "public Man(String Name) {\n\t\tsuper(Name);\n\t}", "public Player(String name)\n\t{\n\t\tthis.money = START_MONEY;\n\t\tthis.name = name;\n\t}", "private void createWizard(String persoName, String persoImage, int persoLife, int attack) {\n\t\tpersoList.add(new Wizard(persoName, persoImage, persoLife, attack));\n\t}", "public EmployeeLanguage(Language name, LanguageLevel level) {\n this.name=name;\n this.level=level;\n }", "private void createNameSubScene() {\n\t\tnameSubScene = new ViewSubScene();\n\t\tthis.mainPane.getChildren().add(nameSubScene);\n\t\tInfoLabel enterName = new InfoLabel(\"ENTER YOU NAME\");\n\t\tenterName.setLayoutX(20);\n\t\tenterName.setLayoutY(40);\n\t\t\n\t\tinputName = new TextField();\n\t\tinputName.setLayoutX(120);\n\t\tinputName.setLayoutY(150);\n\t\t\n\t\tnameSubScene.getPane().getChildren().add(enterName);\n\t\tnameSubScene.getPane().getChildren().add(inputName);\n\t\tnameSubScene.getPane().getChildren().add(createLinkButton());\n\t}", "TopLevel createTopLevel();", "public void createLevel(){\n for(LevelController rc: rooms ) {\n rc.loadContent();\n rc.setScreenListener(listener);\n rc.setCanvas(canvas);\n }\n }", "private PaletteContainer createDefault1Group() {\r\n\t\tPaletteGroup paletteContainer = new PaletteGroup(\r\n\t\t\t\tMessages.Default1Group_title);\r\n\t\tpaletteContainer.setId(\"createDefault1Group\"); //$NON-NLS-1$\r\n\t\tpaletteContainer.setDescription(Messages.Default1Group_desc);\r\n\t\tpaletteContainer.add(createDocTopic1CreationTool());\r\n\t\treturn paletteContainer;\r\n\t}" ]
[ "0.5198652", "0.5193741", "0.51804036", "0.50875556", "0.5052115", "0.49801686", "0.49767473", "0.48112413", "0.47652492", "0.47628146", "0.4717628", "0.47055915", "0.4699281", "0.46847102", "0.46794653", "0.46786302", "0.46753109", "0.46611768", "0.4656833", "0.46544927", "0.46494186", "0.46435642", "0.46399692", "0.46230334", "0.46213353", "0.46190354", "0.46189797", "0.46126297", "0.4591324", "0.45887274", "0.45887274", "0.45887274", "0.45797157", "0.4574181", "0.45690972", "0.45606467", "0.45453492", "0.45382297", "0.45381784", "0.45172244", "0.45152673", "0.45130733", "0.451301", "0.45097673", "0.45045874", "0.44942316", "0.44856125", "0.44737193", "0.44640374", "0.4456686", "0.445654", "0.44549525", "0.44504544", "0.44500127", "0.4448909", "0.44418117", "0.44414848", "0.44331518", "0.44290203", "0.44257462", "0.44257462", "0.44247434", "0.4409642", "0.44088838", "0.4405574", "0.43990654", "0.43940726", "0.43868428", "0.4378533", "0.43752092", "0.43749818", "0.43668026", "0.4362417", "0.43443045", "0.43431655", "0.43334383", "0.4330962", "0.43298128", "0.4329334", "0.4329197", "0.4324221", "0.43213597", "0.4321033", "0.43155342", "0.4296837", "0.42958513", "0.42936242", "0.42932495", "0.42897454", "0.42882025", "0.42882025", "0.42882025", "0.42786548", "0.4277747", "0.42773315", "0.42762667", "0.42651635", "0.42644206", "0.42636442", "0.42635527" ]
0.75062346
0
Gets the Level Pack's name.
public String getName() { return this.name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getLevelName() {\n Object ref = levelName_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n levelName_ = s;\n return s;\n }\n }", "public String getLevelName() {\n Object ref = levelName_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n levelName_ = s;\n return s;\n }\n }", "public String getLevelName() {\n Object ref = levelName_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n levelName_ = s;\n return s;\n }\n }", "public String getLevelName() {\n Object ref = levelName_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n levelName_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }", "public String getLevelName() {\n Object ref = levelName_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n levelName_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }", "public String getLevelName() {\n Object ref = levelName_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n levelName_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }", "String getLevelName();", "String getLevelName();", "String getLevelName();", "com.google.protobuf.ByteString\n getLevelNameBytes();", "com.google.protobuf.ByteString\n getLevelNameBytes();", "com.google.protobuf.ByteString\n getLevelNameBytes();", "public String getName() {\n return level;\n }", "String levelName();", "public com.google.protobuf.ByteString\n getLevelNameBytes() {\n Object ref = levelName_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n levelName_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getLevelNameBytes() {\n Object ref = levelName_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n levelName_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getLevelNameBytes() {\n Object ref = levelName_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n levelName_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getLevelNameBytes() {\n Object ref = levelName_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n levelName_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getLevelNameBytes() {\n Object ref = levelName_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n levelName_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getLevelNameBytes() {\n Object ref = levelName_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n levelName_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getLevelName() {\n return levelName;\n }", "public String getLevelName() {\r\n return (String) getAttributeInternal(LEVELNAME);\r\n }", "public String getLevelName(){\n return levelName;\n }", "public String levelName() {\r\n return new String(\"Final Four\");\r\n }", "public String getWorldName()\n {\n return levelName;\n }", "public String levelName() {\n return \"Wide Easy\";\n }", "@Override\n\tpublic String GetLayerName() {\n\t\treturn pLayerName;\n\t}", "public static String getLogLevelName(int level) {\n\t\tif( BackupLogger.LogLevels.containsKey(level) ) {\n\t\t\treturn BackupLogger.LogLevels.get(level).logLevelName;\n\t\t} else {\n\t\t\treturn \"Unknown\";\n\t\t}\n\t}", "java.lang.String getGameName();", "java.lang.String getGameName();", "public java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "String getName() {\n return getStringStat(playerName);\n }", "public String getUnlocalizedName(ItemStack stack) {\n/* 59 */ return String.valueOf(getUnlocalizedName()) + \".\" + (String)this.nameFunction.apply(stack);\n/* */ }", "private static String buildName(String name, PackageHolder pack) {\n StringBuffer buff = new StringBuffer();\n buff.append(pack.getName());\n if (buff.length() > 0) {\n buff.append('.');\n }\n buff.append(name);\n return buff.toString();\n }", "public String getName() {\r\n\t\treturn name.get();\r\n\t}", "String getName() ;", "public String getName() {\n return Utility.getInstance().getPackageName();\n }", "public final String getName() {\n\treturn name.getName();\n }", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();" ]
[ "0.7688045", "0.7688045", "0.7688045", "0.7673396", "0.7673396", "0.7673396", "0.75338906", "0.75338906", "0.75338906", "0.74130446", "0.74130446", "0.74130446", "0.73896486", "0.73331565", "0.72515106", "0.72515106", "0.72515106", "0.7245354", "0.7245354", "0.7245354", "0.71499103", "0.6970747", "0.6951598", "0.6862685", "0.6558127", "0.6467526", "0.64295954", "0.6225883", "0.62206364", "0.62206364", "0.6197047", "0.6129174", "0.6129174", "0.6129174", "0.6129174", "0.6129174", "0.6129174", "0.6129174", "0.6129174", "0.6129174", "0.6129174", "0.6129174", "0.6129174", "0.6129174", "0.6129174", "0.6129174", "0.6129174", "0.6129174", "0.6129174", "0.6129174", "0.6129174", "0.6129174", "0.6129174", "0.6129174", "0.6129174", "0.6129174", "0.6129174", "0.6129174", "0.6129174", "0.6129174", "0.6129174", "0.6129174", "0.6129174", "0.6129174", "0.6129174", "0.6129174", "0.6129174", "0.6129174", "0.6129174", "0.6129174", "0.6129174", "0.6129174", "0.6129174", "0.6129174", "0.6129174", "0.6129174", "0.6129174", "0.6129174", "0.6129174", "0.6129174", "0.6129174", "0.6129174", "0.6129174", "0.6103716", "0.6076599", "0.6073801", "0.60709447", "0.60477966", "0.60295606", "0.60287774", "0.60137206", "0.60137206", "0.60137206", "0.60137206", "0.60137206", "0.60137206", "0.60137206", "0.60137206", "0.60137206", "0.60137206", "0.60137206" ]
0.0
-1
Sets the Level Pack's name.
public void setName(String name) { this.name = name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setLevelName(String value) {\r\n setAttributeInternal(LEVELNAME, value);\r\n }", "public Builder setLevelName(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n levelName_ = value;\n onChanged();\n return this;\n }", "public Builder setLevelName(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n levelName_ = value;\n onChanged();\n return this;\n }", "public Builder setLevelName(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n levelName_ = value;\n onChanged();\n return this;\n }", "public LevelName(String levelName) {\n this.levelName = levelName;\n }", "public void setLevelName(String levelName) {\n this.levelName = levelName;\n }", "public void setName(String name) {\n internalGroup.setName(name);\n }", "public void setStandNAME(ItemStack stack, String name) {\n/* 314 */ NBTTagCompound nbttagcompound = stack.getTagCompound();\n/* */ \n/* 316 */ if (nbttagcompound == null) {\n/* */ \n/* 318 */ nbttagcompound = new NBTTagCompound();\n/* 319 */ stack.setTagCompound(nbttagcompound);\n/* */ } \n/* */ \n/* 322 */ NBTTagCompound nbttagcompound1 = nbttagcompound.getCompoundTag(this.standInfo);\n/* */ \n/* 324 */ if (!nbttagcompound.hasKey(this.standInfo))\n/* */ {\n/* 326 */ nbttagcompound.setTag(this.standInfo, nbttagcompound1);\n/* */ }\n/* */ \n/* 329 */ nbttagcompound1.setString(this.standName, name);\n/* */ }", "void setName(String name) {\n setStringStat(name, playerName);\n }", "public void setName(String name) {\n this.name = name;\n incModCount();\n }", "public void setName (String n) {\n name = n;\n }", "public void setName (String n){\n\t\tname = n;\n\t}", "public void setName(String n) {\r\n name = n;\r\n }", "public void setName( String pName )\n {\n name = pName;\n }", "public void setName(String n) {\n this.name = n;\n }", "public void setName(String n) {\r\n\t\tthis.name = n;\r\n\t}", "public void setName(String name) {\n mBundle.putString(KEY_NAME, name);\n }", "public Builder setLevelNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n levelName_ = value;\n onChanged();\n return this;\n }", "public Builder setLevelNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n levelName_ = value;\n onChanged();\n return this;\n }", "public Builder setLevelNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n levelName_ = value;\n onChanged();\n return this;\n }", "public void setName(String name) {\r\n\t\t_name = name;\r\n\t}", "public void setName(String grade) {\r\n\t\tname = grade;\r\n\t\t\r\n\t}", "public void setName(String name)\r\n\t{\r\n\t\tthis.playerName = name;\r\n\t}", "private void setName(String nameIn){\r\n\t\tplayerName = nameIn;\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}", "public void setName(String name){\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\n \tthis.name = name;\n }", "public void setName(String name) {\n \tthis.name = name;\n }", "public void setName(String name) {\n _name = name;\n }", "public static void setName(String n){\n\t\tname = n;\n\t}", "public void setName(String name){\n \t\tthis.name = name;\n \t}", "@Override\r\n\tpublic void setName(String name) {\n\t\tthis.name = name;\r\n\t}", "public final void setName(String name) {_name = name;}", "public void setName(String name)\n\t{\n\t\tthis._name=name;\n\t}", "public String getLevelName() {\n Object ref = levelName_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n levelName_ = s;\n return s;\n }\n }", "public String getLevelName() {\n Object ref = levelName_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n levelName_ = s;\n return s;\n }\n }", "public String getLevelName() {\n Object ref = levelName_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n levelName_ = s;\n return s;\n }\n }", "public void setName(String name) {\r\n this._name = name;\r\n }", "public void setName(String name){\n\t\tthis.name = name;\n\t}", "public void setName(String name){\n\t\tthis.name = name;\n\t}", "public void setName(String name){\n\t\tthis.name = name;\n\t}", "@Override\n\tpublic void setName(String name) {\n\t\tsuper.setName(name);\n\t}", "@Override\n\tpublic void setName(String name) {\n\t\tsuper.setName(name);\n\t}", "@Override\n\tpublic void setName( final String name )\n\t{\n\t\tsuper.setName( name );\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}", "public void setName(String name) {\t\t\r\n\t\tthis.name = name;\t\t\r\n\t}", "public void setName(String name) {\n\t\tName = name;\n\t}", "@Override\n\tpublic void setName(String name) {\n\t\tthis.name = name;\n\t}", "@Override\n\tpublic void setName(String name) {\n\t\t\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; }", "@Override\n public void setName(String name) {\n this.name = name;\n }", "@Override\n public void setName(String name) {\n this.name = name;\n }", "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}", "public void setName(String name)\r\n\t{\t\t\r\n\t\tthis.name = name;\r\n\t}", "public static void setName(String name) {\n catalogue.name = name;\n }", "public void setName(String n){ name=n; }", "public void setName(String name) {\n \t\tthis.name = name;\n \t}", "public void setName(String newname)\n {\n name = newname;\n \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}", "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}", "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}", "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}", "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}", "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}", "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}", "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}", "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}", "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}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "@Override\r\n public void setName(String name) {\n }", "public void setName(String name)\n \t{\n \t\tthis.name = name;\n \t}", "@Override\n public void setName(String name) {\n this.name = name;\n }", "@Override\n public void setName(String name) {\n this.name = name;\n }", "void setName(String name_);", "public void setName(final String name);", "public void setName(String name) {\r\r\n\t\tthis.name = name;\r\r\n\t}" ]
[ "0.7025662", "0.68794227", "0.68794227", "0.68794227", "0.68758285", "0.6768815", "0.65532255", "0.6397163", "0.6372928", "0.6318654", "0.6306125", "0.6303392", "0.6286595", "0.6243852", "0.62287617", "0.62215424", "0.6194907", "0.6184363", "0.6184363", "0.6184363", "0.61745375", "0.61708754", "0.61649877", "0.61524564", "0.61451346", "0.61451346", "0.61451346", "0.6137571", "0.6137571", "0.61239517", "0.6122798", "0.6121702", "0.6121039", "0.6120931", "0.61204964", "0.6105718", "0.6105718", "0.6105718", "0.6105304", "0.60994357", "0.60994357", "0.60994357", "0.6098674", "0.6098674", "0.60978216", "0.6095996", "0.60927343", "0.60905117", "0.60874295", "0.60831213", "0.60787964", "0.6077896", "0.6077896", "0.6077896", "0.6077896", "0.6074853", "0.6074853", "0.60744697", "0.6070364", "0.6066329", "0.6064892", "0.60642165", "0.606235", "0.60623103", "0.60623103", "0.60623103", "0.60623103", "0.60623103", "0.60623103", "0.60623103", "0.60623103", "0.60623103", "0.60623103", "0.60623103", "0.60623103", "0.60623103", "0.60623103", "0.60623103", "0.60623103", "0.60623103", "0.60623103", "0.60623103", "0.60623103", "0.60623103", "0.60623103", "0.60623103", "0.60623103", "0.60623103", "0.60623103", "0.60623103", "0.60623103", "0.60623103", "0.60623103", "0.60623103", "0.60614055", "0.6060734", "0.6059124", "0.6059124", "0.60579735", "0.60568964", "0.605662" ]
0.0
-1
The transition script is the script by which one level leads to another.
public UserScript getTransitionScript() { return this.transitionScript; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setTransitionScript(UserScript script) {\n\t\tthis.transitionScript = script;\n\t}", "@Override\n\tpublic void processTransition() {\n\t\tinit();\n\t\tMusicPlayer.playLoop(\"level2\");\n\n\t\t// show level title\n\t\taddPopup(levelPopup);\n\t\tsetAlpha(10 * 60 * 3 + 100);\n\t\tsetFadeRate(10);\n\n\t\t// show introduction text\n\t\tgameText.setText(\"Carnegie: Hmm... these tunnels were probably what \"\n\t\t\t\t+ \"the mayor was talking about. Maybe searching them will \"\n\t\t\t\t+ \"give me a lead as to where Sinclair is going! However, \"\n\t\t\t\t+ \"I have to be careful. Iím sure that Sinclair has left \"\n\t\t\t\t+ \"plenty of enemies and traps in my way, and if what the \"\n\t\t\t\t+ \"mayor said was correct, exploring wonít be easy!\"\n\t\t\t\t+ \"\\nInstructions: Explore the tunnels using the WASD or \"\n\t\t\t\t+ \"arrow keys for movement. Be careful to not fall \"\n\t\t\t\t+ \"into the lava. Press the space bar to shoot, \"\n\t\t\t\t+ \"and avoid being hit by enemies who will attack you on \"\n\t\t\t\t+ \"sight. But if you choose to confront these enemies \"\n\t\t\t\t+ \"and defeat them, they will ask you a question after \"\n\t\t\t\t+ \"they are defeated. Answering this question correctly \"\n\t\t\t\t+ \"results in a reward of of 10 gold, while other \"\n\t\t\t\t+ \"answers result in a reward of 5 gold. Click on \"\n\t\t\t\t+ \"the shop in this level to buy upgrades with the \"\n\t\t\t\t+ \"gold you have amassed.\");\n\t\tgameText.addFinishedListener(this);\n\t}", "public abstract Etat transition();", "private String transitionGenerate( String oldguard,String newguard,String markguard,List<Statement> statements, int previousmark,Automaton a,Map<String, Type> b,String pre ,int layer, boolean Else) throws PrismGeneratorException, ValidationException {\n String transition = \"\";\n //The lable of the current statement\n int statlable =0;\n //The lable of the current transition\n int layermark = transitionmark;\n String guard = oldguard;\n if(!newguard.isEmpty()){\n guard += (\" & \" + newguard);\n if(!markguard.isEmpty()){\n guard += ( \" & \" + markguard);\n }\n }\n\n String newpre = \"v\"+pre;\n //The define of the virtual variables used in this level\n String transitionend = pre+\"transitionend\";\n if(layer > maxlayer) {\n\n globalDeclarations += pre+\"transitionend : bool init true;\\n\";\n maxlayer = layer;\n for (Declaration var : a.getLocalVars().getDeclarationList()) {\n assert var instanceof VariableDeclaration;\n Type newtype = null;\n\n if(!(b==null)){\n\n if (b.containsKey(((VariableDeclaration) var).getType().toString())){\n newtype = b.get(((VariableDeclaration) var).getType().toString());\n }else{\n newtype = ((VariableDeclaration) var).getType();\n }\n }else{\n newtype = ((VariableDeclaration) var).getType();\n }\n String strType = typeGenerate(newtype);\n\n for (String name : var.getIdentifiers()) {\n\n switch (strType){\n case \"init\":\n Type inibasetype = ((InitType) newtype).getBaseType();\n String basestrtype = typeGenerate(inibasetype);\n switch (basestrtype){\n case \"int\":\n\n globalDeclarations += (newpre + name + \" : \"+typeGenerate(inibasetype)+\n String.format(\" init %s\",((InitType)(newtype)).getInitValue()) +\";\\n\");\n break;\n case \"[%s..%s]\":\n BoundedIntType boundedtype = (BoundedIntType) inibasetype;\n String upper = boundedtype.getUpperBound().toString();\n String lower = boundedtype.getLowerBound().toString();\n globalDeclarations +=(newpre + name + \":\"+String.format(basestrtype,lower,upper )+\n String.format(\" init %s\",((InitType)(newtype)).getInitValue()) +\";\\n\");\n break;\n case \"bool\":\n globalDeclarations +=(newpre + name + \":\"+strType+\n String.format(\" init %s\",((InitType)(newtype)).getInitValue())+\";\\n\");\n break;\n }\n break;\n case \"int\":\n\n globalDeclarations += (newpre + name + \":\"+strType+\";\\n\");\n break;\n case \"[%s..%s]\":\n BoundedIntType boundedtype = (BoundedIntType) newtype;\n String upper = boundedtype.getUpperBound().toString();\n String lower = boundedtype.getLowerBound().toString();\n globalDeclarations +=(newpre + name + \":\"+String.format(strType,lower, upper)+\";\\n\");\n\n break;\n case \"bool\":\n globalDeclarations +=(newpre + name + \":\"+strType+\";\\n\");\n\n break;\n case \"enum\":\n int i = 0;\n for(String item : ((EnumType)(newtype)).getItems()){\n globalDeclarations +=(newpre + item+String.format(\" : int init %d;\", i)+\"\\n\");\n i++;\n\n }\n globalDeclarations +=(newpre + name+\" : int;\"+\"\\n\");\n\n break;\n case \"list\":\n Type basetype = ((ListType)(newtype)).getBaseType();\n Term key = ((ListType)(newtype)).getCapacity();\n if((!(basetype instanceof IntType))||(!(basetype instanceof BoolType))||(!((key instanceof IntValue)))){\n java.lang.System.err.println(\"The type of the list is not supported.\");\n }\n if((((IntValue)((IntValue) key)).getValue()==0)){\n java.lang.System.err.println(\"The length of the list must greater than 0.\");\n }\n for(int j=0 ; j < (((IntValue)((IntValue) key)).getValue()); j++){\n globalDeclarations +=(newpre + String.format(\"%s%d\",name,j)+\" : int;\\n\");\n\n }\n break;\n }\n }\n }\n }\n\n // assign the virtual variables\n String rel = \"\";\n for (String var: variables){\n rel += ( String.format(\"(%s' = %s)&\", newpre + var, pre + var ) );\n }\n rel = (rel.substring(0, rel.length()-1));\n transition += (\"[] \" +guard +\" & \"+ String.format(\"transitionmark%d=%d\", layermark,statlable)+ \" & \" + transitionend +\" = true\"+ \" -> \" + rel +\n \"&\"+ String.format(\"(transitionmark%d' = transitionmark%d + 1)\", layermark,layermark)+\n \"&\"+\"(\"+ transitionend + \"' = false);\"+ \"\\n\");\n ++statlable;\n\n for (Statement s : statements) {\n if (s instanceof SynchronizingStatement) {\n java.lang.System.err.println(\"A sync statement is not supposed to show up when generating codes.\");\n } else if (s instanceof AssignmentStatement) {\n rel = \"\";\n\n rel += virtualtermGenerate(((AssignmentStatement) s).getTarget(), 0,newpre,b) +\"'\"+\n \" = \" + virtualtermGenerate(((AssignmentStatement) s).getExpr(), 0,newpre,b);\n transition += (\"[] \" +guard +\" & \"+ String.format(\"transitionmark%d=%d\", layermark,statlable) + \" -> \" + \"(\"+ rel +\")\" +\n \"&\"+ String.format(\"(transitionmark%d' = transitionmark%d + 1);\", layermark,layermark)+ \"\\n\");\n ++statlable;\n\n }else if(s instanceof IteStatement){\n ++transitionmark;\n globalDeclarations += String.format(\"transitionmark%d :int init 0;\\n\", transitionmark);\n String newguard_ = virtualtermGenerate(((IteStatement) s).getCondition(), 0,newpre,b);\n String markguard_ = String.format(\"transitionmark%d=%d\", layermark,statlable);\n List newstatements = ((IteStatement) s).getThenStmts();\n List elstatements = ((IteStatement) s).getElseStmts();\n if(elstatements != null){\n transition += transitionGenerate(guard,newguard_,markguard_,newstatements,layermark,a,b,newpre,layer+1,true);\n ++transitionmark;\n globalDeclarations += String.format(\"transitionmark%d :int init 0;\\n\", transitionmark);\n transition += transitionGenerate(guard,\"!(\"+newguard_+\")\",markguard_,elstatements,layermark,a,b,newpre,layer+1,true);\n ++statlable;\n }else{\n transition += transitionGenerate(guard,newguard_,markguard_,newstatements,layermark,a,b,newpre,layer+1,false);\n ++statlable;\n }\n }\n else {\n throw PrismGeneratorException.UnhandledStatement(s);\n }\n }\n\n\n int max = 0;\n for(Statement s : statements){\n ++max;\n }\n ++max;\n\n\n if(layer > 1){\n //if the IteStatement is not implemented then change the transitionmark to the max\n if(Else == false) {\n transition += (\"[] \" + oldguard + \" & \" + \"!(\" + newguard + \")\" + \" & \" + markguard + \" & \" + String.format(\"transitionmark%d=%d\", layermark, 0) + \" -> \" +\n String.format(\"(transitionmark%d' = %d);\", layermark, max) + \"\\n\");\n }\n // assign the variables\n rel = \"\";\n for (String var: variables){\n rel += ( String.format(\"(%s' = %s)&\", pre + var, newpre + var ) );\n }\n rel = (rel.substring(0, rel.length()-1));\n transition += (\"[] \" +guard +\" & \"+ String.format(\"transitionmark%d=%d\",layermark, max) + \" -> \" + rel +\n \"&\"+ String.format(\"(transitionmark%d' = transitionmark%d + 1);\", layermark,layermark)+ \"\\n\");\n ++statlable;\n\n //Prevent label duplication\n transition += (\"[] \" +markguard+ String.format(\" & transitionmark%d=%d\", layermark,max+1) + \" -> \" +\n String.format(\"(transitionmark%d' = transitionmark%d + 1)&\", previousmark,previousmark)+\n String.format(\"(transitionmark%d' = transitionmark%d + 1)\", layermark,layermark)+\n \"&\"+\"(\"+transitionend+\"' = true)\"+\";\\n\");\n }else{\n\n // assign the variables\n rel = \"\";\n for (String var: variables){\n rel += ( String.format(\"(%s' = %s)&\", pre + var, newpre + var ) );\n }\n rel = (rel.substring(0, rel.length()-1));\n transition += (\"[] \" +guard +\" & \"+ String.format(\"transitionmark%d=%d\",layermark, max) + \" -> \" + rel +\n \"&\"+ String.format(\"(transitionmark%d' = transitionmark%d + 1)\", layermark,layermark)+\n \";\\n\");\n ++statlable;\n\n //initialize all the transitionmarks we had used\n rel = \"\";\n for(int i = 0 ; i<=transitionmark;i++){\n rel += String.format(\"(transitionmark%d' = 0)\", i)+\"&\";\n }\n rel = (rel.substring(0,rel.length()-1));\n transition += (\"[] \" + String.format(\"transitionmark%d=%d\", layermark,max+1)+ \" -> \" + rel +\n \"&\"+\"(\"+transitionend+\"' = true)\"+\";\\n\");\n }\n\n return transition;\n }", "@Override\n\t\tprotected void doTransition() {\n\t\t\t\n\t\t}", "protected Transition addTransition(Transition transition,\n InternalSystemEntryDelta entryDelta,\n Object fromState,\n Object toState)\n {\n // nothing to do if both states are equal!\n if(LangUtils.isEqual(fromState, toState))\n return null;\n \n if(fromState == null)\n {\n Transition installScript =\n addTransition(entryDelta,\n SingleStepTransition.INSTALL_SCRIPT_ACTION,\n (String) StateMachine.NONE,\n 1);\n installScript.executeAfter(transition);\n transition = installScript;\n }\n \n transition = addTransitionSteps(transition,\n entryDelta,\n fromState,\n toState);\n \n if(toState == null)\n {\n Transition uninstallScript = addTransition(entryDelta,\n SingleStepTransition.UNINSTALL_SCRIPT_ACTION,\n null,\n -1);\n uninstallScript.executeAfter(transition);\n transition = uninstallScript;\n }\n \n return transition;\n }", "void transit();", "private void transitionTo(Scene scene) {\n for (EmptyGraphBoardFX g : toAnimate)\n g.stopAnimating();\n toAnimate.clear();\n theStage.setScene(scene);\n if (scene == mainGame)\n toAnimate.add(mGSelfBoard);\n if (scene == attackScene) {\n toAnimate.add(ene1.b);\n toAnimate.add(ene2.b);\n }\n if (scene == setShips)\n toAnimate.add(sSboard);\n if (scene == AIScene) {\n toAnimate.add(selfvsAI);\n toAnimate.add(ai.b);\n }\n for (EmptyGraphBoardFX g : toAnimate)\n g.startAnimating();\n }", "public double getTransition(){\n\t\treturn transition;\n\t}", "public native final Transition transition()/*-{\n\t\treturn this.transition();\n\t}-*/;", "private void updateHighLevelInfo() {\n\t\t// update activities mapping at high level petri net\n\t\tfor (HLActivity activity : process.getActivities()) {\n\t\t\t// update the choice node itself\n\t\t\tTransition transNode = (Transition) highLevelPN.findModelGraphVertexForActivity(activity.getID());\n\t\t\tColoredTransition transNsim = (ColoredTransition) this.findTransition(transNode);\n\t\t\thighLevelPN.replaceModelGraphVertexForActivity(transNode, transNsim);\n\t\t}\n\t\t// update choices mapping at high level petri net\n\t\tfor (HLChoice choice : process.getChoices()) {\n\t\t\t// update the choice node itself\n\t\t\tPlace choiceNode = (Place) highLevelPN.findModelGraphVertexForChoice(choice.getID());\n\t\t\tColoredPlace choiceNsim = (ColoredPlace) this.findPlace(choiceNode.getIdentifier());\n\t\t\thighLevelPN.replaceModelGraphVertexForChoice(choiceNode, choiceNsim);\n\t\t}\n\t\t// update the hlActivity links at the ColoredTransition\n\t\tIterator it = this.getTransitions().iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tColoredTransition simTrans = (ColoredTransition) it.next();\n\t\t\tHLActivity hlTrans = highLevelPN.findActivity(simTrans);\n\t\t\tsimTrans.setHighLevelTransition(hlTrans);\n\t\t}\n\t\t\n\t\t// Add the group for all resources to each transition and to the process\n\t\t// the group for all resources may only be attached to a transition in the case\n\t\t// that no group has been defined for that transition\n\t\tArrayList<HLID> allResourceIDs = new ArrayList<HLID>();\n\t\tIterator<HLResource> resourceIt = process.getResources().iterator();\n\t\twhile (resourceIt.hasNext()) {\n\t\t\tallResourceIDs.add(resourceIt.next().getID());\n\t\t}\n\t}", "protected Transition addTransitionSteps(Transition transition,\n InternalSystemEntryDelta entryDelta,\n Object fromState,\n Object toState)\n {\n // nothing to do if both states are equal!\n if(LangUtils.isEqual(fromState, toState))\n return transition;\n \n if(fromState == null)\n fromState = StateMachine.NONE;\n \n if(toState == null)\n toState = StateMachine.NONE;\n \n // when no state machine (empty agents) nothing to do...\n StateMachine stateMachine = entryDelta.getStateMachine();\n if(stateMachine == null)\n return transition;\n\n int distance = stateMachine.getDistance(fromState, toState);\n \n @SuppressWarnings(\"unchecked\")\n Collection<Map<String,String>> path =\n (Collection<Map<String,String>>) entryDelta.getStateMachine().findShortestPath(fromState,\n toState);\n for(Map<String, String> p : path)\n {\n Transition newTransition =\n addTransition(entryDelta, p.get(\"action\"), p.get(\"to\"), distance);\n newTransition.executeAfter(transition);\n transition = newTransition;\n }\n \n return transition;\n }", "public void levelUp2()\r\n {\r\n this.health = 1200;\r\n Story.levelUp2Text();\r\n }", "public boolean isTransition() {\n/* 4839 */ return this.isTransition;\n/* */ }", "String convertTransition(Transition instanceValue);", "private void performTransition() {\r\n\t\t// Do something only if the time has been reached\r\n\t\tif (transitionTime <= System.currentTimeMillis()) {\r\n\t\t\t// Clear the transition time\r\n\t\t\ttransitionTime = Long.MAX_VALUE;\r\n\r\n\t\t\t// If there are no lives left, the game is over. Show the final\r\n\t\t\t// screen.\r\n\t\t\tif (lives <= 0) {\r\n\t\t\t\t// Updates the highScore\r\n\t\t\t\tif (numScore > highScore) {\r\n\t\t\t\t\thighScore = numScore;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Updates the HighScore label in enhanced mode\r\n\t\t\t\tif (enhanced == true) {\r\n\t\t\t\t\tdisplay.setHighScore(highScore);\r\n\t\t\t\t}\r\n\t\t\t\t// Brings up the final screen\r\n\t\t\t\tfinalScreen();\r\n\t\t\t\t// JOptionPane.showMessageDialog(null, numLiveUpdated);\r\n\t\t\t}\r\n\r\n\t\t\t// If the ship was destroyed, place a new one and continue\r\n\t\t\telse if (ship == null) {\r\n\t\t\t\tplaceShip();\r\n\t\t\t}\r\n\t\t\tif (pstate.countAsteroids() == 0) {\r\n\r\n\t\t\t\t// increase the level and speed markers\r\n\t\t\t\tnumLevel += 1;\r\n\t\t\t\tspeed += 0.5;\r\n\r\n\t\t\t\t// Update the level display\r\n\t\t\t\tdisplay.setLevel(numLevel);\r\n\t\t\t\tParticipant.expire(alien);\r\n\t\t\t\tplaceAsteroids();\r\n\r\n\t\t\t}\r\n\r\n\t\t\t// Place a new alien when one has been destroyed\r\n\t\t\tif (pstate.countAliens() == 0 && ship != null) {\r\n\t\t\t\tif (numLevel == 2) {\r\n\t\t\t\t\tplaceAlien(1);\r\n\r\n\t\t\t\t} else if (numLevel >= 3) {\r\n\t\t\t\t\tplaceAlien(0);\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tclipAlienDestroyed.stop();\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}", "@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 }", "public void levelUp1()\r\n {\r\n this.health = 900;\r\n Story.levelUp1Text();\r\n }", "Transition createTransition();", "Transition createTransition();", "public void addTransition(String state1, String state2, String input1, String input2, String dir){\n Tuple t = new Tuple(state1, input1);\n Node<String> child = new Node<String>(state2, input2);\n child.setDir(dir);\n if(tree.containsKey(t)){\n Node<String> parent = tree.get(t);\n child.setParent(parent);\n parent.addChild(child);\n tree.put(t, parent);\n }\n else{\n Node<String> n = new Node<String>(state1, input1);\n child.setParent(n);\n n.addChild(child);\n tree.put(t, n);\n }\n\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 void onAdd2Scene() {\n\t\tAnimation src = getSourceAnimation();\n\t\tif( src != null ) {\n\t\t\tadd2Scene(src, getSourceAnimation().actFrame);\n\t\t\tlog.info(\" adding frame from {}\", vm.cutInfo);\n\t\t}\n\t\t\n\t}", "@Override\r\n public void onAction(String name, boolean isPressed, float tpf)\r\n {\n mainPanel.addTransition(new DirectTransition(panel1, panel2));\r\n }", "public Scriptable getTransitions()\n\t{\n\t\tScriptable transitionsScriptable = (Scriptable)new ValueConverter().convertValueForScript(\n\t\t\tthis.serviceRegistry, this.scope, null, this.transitions);\n\t\t\n\t\treturn transitionsScriptable;\n\t}", "public final EObject ruleTransitionRoot() throws RecognitionException {\r\n EObject current = null;\r\n\r\n Token otherlv_0=null;\r\n EObject lv_def_1_0 = null;\r\n\r\n\r\n enterRule(); \r\n \r\n try {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:255:28: ( (otherlv_0= '@@transition@@' ( (lv_def_1_0= ruleTransitionSpecification ) ) ) )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:256:1: (otherlv_0= '@@transition@@' ( (lv_def_1_0= ruleTransitionSpecification ) ) )\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:256:1: (otherlv_0= '@@transition@@' ( (lv_def_1_0= ruleTransitionSpecification ) ) )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:256:3: otherlv_0= '@@transition@@' ( (lv_def_1_0= ruleTransitionSpecification ) )\r\n {\r\n otherlv_0=(Token)match(input,16,FOLLOW_16_in_ruleTransitionRoot567); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \tnewLeafNode(otherlv_0, grammarAccess.getTransitionRootAccess().getTransitionKeyword_0());\r\n \r\n }\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:260:1: ( (lv_def_1_0= ruleTransitionSpecification ) )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:261:1: (lv_def_1_0= ruleTransitionSpecification )\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:261:1: (lv_def_1_0= ruleTransitionSpecification )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:262:3: lv_def_1_0= ruleTransitionSpecification\r\n {\r\n if ( state.backtracking==0 ) {\r\n \r\n \t newCompositeNode(grammarAccess.getTransitionRootAccess().getDefTransitionSpecificationParserRuleCall_1_0()); \r\n \t \r\n }\r\n pushFollow(FOLLOW_ruleTransitionSpecification_in_ruleTransitionRoot588);\r\n lv_def_1_0=ruleTransitionSpecification();\r\n\r\n state._fsp--;\r\n if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \t if (current==null) {\r\n \t current = createModelElementForParent(grammarAccess.getTransitionRootRule());\r\n \t }\r\n \t\tset(\r\n \t\t\tcurrent, \r\n \t\t\t\"def\",\r\n \t\tlv_def_1_0, \r\n \t\t\"TransitionSpecification\");\r\n \t afterParserOrEnumRuleCall();\r\n \t \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 if ( state.backtracking==0 ) {\r\n leaveRule(); \r\n }\r\n }\r\n \r\n catch (RecognitionException re) { \r\n recover(input,re); \r\n appendSkippedTokens();\r\n } \r\n finally {\r\n }\r\n return current;\r\n }", "@Override\n public void onwards() {\n if (log.isDebugEnabled()) {\n log.debug(\"Onwards \"+this);\n }\n \n // First we end the activity instance. \n // Subsequent invocations to end will be ignored.\n end();\n\n boolean isTransitionTaken = false;\n \n // Take each outgoing transition 'in parallel'\n // Note that process concurrency is not the same as java multithreaded computation\n if (activity.hasOutgoingTransitions()) {\n for (TransitionImpl transition: activity.outgoingTransitions) {\n // Only take a transition if there is no condition or if the condition resolves to true.\n ConditionImpl condition = transition.condition;\n if (condition!=null ? condition.eval(this) : true) {\n isTransitionTaken = true;\n takeTransition(transition);\n }\n }\n } \n\n // if there were no outgoing transitions or none of them could be taken, \n if (!isTransitionTaken) {\n // propagate the execution flow upwards to the parent\n propagateToParent();\n }\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 }", "public void nextLevel() {\n // stops the game\n world.stop();\n level++;\n switch (level) {\n case 2:\n // get a new world\n world = new Level2();\n // populates new world with Level2()\n world.populate(this);\n \n move.setObstacle(world.getObstacle());\n move2.setObstacle2(world.getObstacle2());\n drop.setBallDrop(world.getBallPlatform());\n view.setWorld(world);\n \n try {\n gameMusicL2 = new SoundClip(\"data/music2.wav\");\n gameMusicL2.loop();\n gameMusicL1.stop();\n } catch (UnsupportedAudioFileException|IOException|LineUnavailableException e) {\n System.out.println(e);\n }\n \n //JFrame debugView = new DebugViewer(world, 500, 500);\n break;\n case 3:\n // get a new world\n world = new Level3();\n // populates new world with Level3()\n world.populate(this);\n \n move.setObstacle(world.getObstacle());\n drop.setBallDrop(world.getBallPlatform());\n world.addStepListener(new MovingBlock(world.getBlock()));\n view.setWorld(world);\n \n try {\n gameMusicL3 = new SoundClip(\"data/music3.wav\");\n gameMusicL3.loop();\n gameMusicL2.stop();\n } catch (UnsupportedAudioFileException|IOException|LineUnavailableException e) {\n System.out.println(e);\n }\n \n //JFrame debugView = new DebugViewer(world, 500, 500); \n break;\n default:\n System.out.println(\"Congratulations, you have completed the game!\");\n System.exit(0);\n }\n world.start();\n }", "@Override\r\n\tpublic void transitOut(BasicScene tScene) {\n\t\t\r\n\t}", "public IBusinessObject doTransition(IRTransition trans)\n throws OculusException;", "public interface Transition extends Node {\n}", "public void goNextLevel() {\r\n world.stop();\r\n levelMusic.close();\r\n if(level == 1) {\r\n level++;\r\n world = new Level2();\r\n world.populate(this);\r\n keyHandler.setBody(world.getPlayer());\r\n view.setWorld(world);\r\n controlPanel.setWorld(world);\r\n audioManager = new AudioManager();\r\n levelMusic = audioManager.getLevel2Sound();\r\n levelMusic.loop();\r\n world.start();\r\n }\r\n else if(level == 2) {\r\n level++;\r\n world = new Level3();\r\n world.populate(this);\r\n keyHandler.setBody(world.getPlayer());\r\n view.setWorld(world);\r\n controlPanel.setWorld(world);\r\n audioManager = new AudioManager();\r\n levelMusic = audioManager.getLevel3Sound();\r\n levelMusic.loop();\r\n world.start();\r\n }\r\n else {\r\n System.out.println(\"PLAYER SURVIVED\");\r\n System.exit(0);\r\n }\r\n }", "public void levelUp3()\r\n {\r\n this.health = 1600;\r\n Story.levelUp3Text();\r\n }", "@Override\r\n public void drawEntrance()\r\n {\r\n\tdraw();\r\n\tif (_transition != null)\r\n\t _transition.draw();\r\n }", "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 }", "private void weakenPlayerAnimation(int player) {\n\t\t//red stat decrease arrow\n\t\tImage decreaseArrowImage = new Image(\"res/images/Red Down Arrow.png\");\n\t\tImageView decreaseArrow = new ImageView(decreaseArrowImage);\n\t\t\n\t\tdecreaseArrow.setTranslateX(100);\n\t\tdecreaseArrow.setTranslateY(100);\n\t\t\n\t\tdecreaseArrow.setFitWidth(40);\n\t\tdecreaseArrow.setPreserveRatio(true);\n\t\tdecreaseArrow.setSmooth(true);\n\t\t\n\t\tScaleTransition arrowScaleTrans = new ScaleTransition(Duration.millis(500),decreaseArrow);\n\t\tarrowScaleTrans.setToX(1.5f);\n\t\tarrowScaleTrans.setToY(1.5f);\n\t\tarrowScaleTrans.setCycleCount(1);\n\t\t\n\t\tFadeTransition arrowFadeTrans = new FadeTransition(Duration.millis(1000),decreaseArrow);\n\t\tarrowFadeTrans.setFromValue(1.0f);\n\t\tarrowFadeTrans.setToValue(0.0f);\n\t\tarrowFadeTrans.setCycleCount(1);\n\t\t\n\t\t//Left dust cloud\n\t\tImage dust1Image = new Image(\"res/images/Dust #1.png\");\n\t\tImageView dust1 = new ImageView(dust1Image);\n\t\t\n\t\tdust1.setTranslateX(50);\n\t\tdust1.setTranslateY(250);\n\t\t\n\t\tdust1.setFitWidth(20);\n\t\tdust1.setPreserveRatio(true);\n\t\tdust1.setSmooth(true);\n\t\t\n\t\tFadeTransition dust1transIn = new FadeTransition(Duration.millis(200),dust1);\n\t\tdust1transIn.setFromValue(0.0f);\n\t\tdust1transIn.setToValue(1.0f);\n\t\tdust1transIn.setCycleCount(1);\n\t\t\n\t\tFadeTransition dust1transOut = new FadeTransition(Duration.millis(500),dust1);\n\t\tdust1transOut.setFromValue(1.0f);\n\t\tdust1transOut.setToValue(0.0f);\n\t\tdust1transOut.setCycleCount(1);\n\t\t\n\t\tImage dust2Image = new Image(\"res/images/Dust #2.png\");\n\t\tImageView dust2 = new ImageView(dust2Image);\n\t\t\n\t\tdust2.setTranslateX(150);\n\t\tdust2.setTranslateY(250);\n\t\t\n\t\tdust2.setFitWidth(20);\n\t\tdust2.setPreserveRatio(true);\n\t\tdust2.setSmooth(true);\n\t\t\n\t\tFadeTransition dust2transIn = new FadeTransition(Duration.millis(200),dust2);\n\t\tdust2transIn.setFromValue(0.0f);\n\t\tdust2transIn.setToValue(1.0f);\n\t\tdust2transIn.setCycleCount(1);\n\t\t\n\t\tFadeTransition dust2transOut = new FadeTransition(Duration.millis(500),dust2);\n\t\tdust2transOut.setFromValue(1.0f);\n\t\tdust2transOut.setToValue(0.0f);\n\t\tdust2transOut.setCycleCount(1);\n\t\t\n\t\tif (player == LOCAL) {\n\t\t\tlocPane.getChildren().addAll(decreaseArrow,dust1,dust2);\n\t\t} else if (player == OPPONENT) {\n\t\t\toppPane.getChildren().addAll(decreaseArrow,dust1,dust2);\n\t\t}\n\t\t\n\t\tSequentialTransition sequencer = new SequentialTransition();\n\t\tsequencer.getChildren().addAll(arrowScaleTrans,\n\t\t\t\t\t\t\t\t\t dust1transIn,\n\t\t\t\t\t\t\t\t\t dust2transIn,\n\t\t\t\t\t\t\t\t\t dust1transOut,\n\t\t\t\t\t\t\t\t\t dust2transOut,\n\t\t\t\t\t\t\t\t\t arrowFadeTrans);\n\t\tsequencer.setCycleCount(1);\n\t\tsequencer.play();\n\t\t\n\t\t\n\t}", "public void execute() {\r\n\t\tif(policy.moveByPolicy(level2d))\r\n\t\titem.move_up(level2d);\r\n\t\telse\r\n\t\t\tSystem.out.println(\"cant do the action\");\r\n\t\t\r\n\t}", "public void masterProg() {\n\t\tmoveObjsToGoals();\r\n\t}", "private void updateArtifactState(ArrayList<TransitionRule> transitionRules , ArrayList<ArtifactInstance> Artifacts)\r\n\t{\r\n\t\t\r\n\t\t\r\n\t\tListIterator<TransitionRule> TrasitionIterator = transitionRules.listIterator();\r\n\t\t\r\n\t\t//System.out.println(\"size of transition Rule:\" + transitionRules.size());\r\n\t\t\r\n\t\twhile(TrasitionIterator.hasNext())\r\n\t\t{\r\n\t\t\tTransitionRule currentTransitionRule = TrasitionIterator.next();\r\n\t\t\tString targetArtifact = currentTransitionRule.getArtifact();\r\n\t\t\tString fromState = currentTransitionRule.getFromState();\r\n\t\t\tString toState = currentTransitionRule.getToState();\r\n\t\t\t\r\n\t\t\t//System.out.println(targetArtifact);\r\n\t\t\t//System.out.println(fromState);\r\n\t\t\t//System.out.println(toState);\r\n\t\t\t\r\n\t\t\tListIterator<ArtifactInstance> ArtifactIterator = Artifacts.listIterator();\r\n\t\t\t\r\n\t\t\twhile(ArtifactIterator.hasNext())\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\tArtifactInstance CurrentArtifact = ArtifactIterator.next();\r\n\t\t\t\tString ArtifactName = CurrentArtifact.getArtifactName();\r\n\t\t\t//\tSystem.out.println(ArtifactName);\r\n\t\t\t\tString CurrentArtifactState = CurrentArtifact.getCurrentState();\r\n\t\t\t\tArrayList<StateInstance> StateList = CurrentArtifact.getStateList();\r\n\t\t\t\t\r\n\t\t\t // to be continue state transiton\r\n\t\t\t\tif(ArtifactName.equalsIgnoreCase(targetArtifact) && CurrentArtifactState.equalsIgnoreCase(fromState) ) //&& this.checkState(StateList, fromState, toState)\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\tCurrentArtifact.setCurrentState(toState);\r\n\t\t\t\t\t//System.out.println(CurrentArtifact.getArtifactName()+\":\"+CurrentArtifact.getCurrentState());\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "public Transition getCurrentTransition () {\n return ttb.getCurrentTransition();\n }", "ComponentAgent getNextSibling();", "public void setWaitScene2()\n {\n printOut(cliToolsManager.sceneInitializer(width));\n printOut(printerMaker.waitingForLobbyScene());\n printOut(cliToolsManager.sceneEnder(width));\n }", "@OutVertex\n ActionTrigger getSource();", "public void transitionStates () {\n myCurrentState = myNextState;\n myNextState = null;\n }", "private void rerunAnimation() {\n transition.playFromStart();\r\n}", "public TransitionElements getTransitionAccess() {\r\n\t\treturn pTransition;\r\n\t}", "public void executeAppTransition() {\n if (this.mAppTransition.isTransitionSet()) {\n if (WindowManagerDebugConfig.DEBUG_APP_TRANSITIONS) {\n Slog.w(TAG, \"Execute app transition: \" + this.mAppTransition + \", displayId: \" + this.mDisplayId + \" Callers=\" + Debug.getCallers(5));\n }\n this.mAppTransition.setReady();\n this.mWmService.mWindowPlacerLocked.requestTraversal();\n }\n }", "protected Class<? extends edu.duke.cs.jflap.automata.Transition> getTransitionClass() {\n\t\treturn edu.duke.cs.jflap.automata.Transition.class;\n\t}", "@Override\r\n public void publishTransition(Publisher publisher) {\n }", "public static void main(String argv[]) {\n\n\tRandomIntGenerator rand = new RandomIntGenerator(5,10);\n\tRandomIntGenerator rand2 = new RandomIntGenerator(10,15);\n\tRandomIntGenerator rand3 = new RandomIntGenerator(1,2);\n\n\tint vertices = rand.nextInt();\n\tSystem.out.println(\"vertices=\"+vertices);\n\t\n\tRandomIntGenerator rand4 = new RandomIntGenerator(0,vertices-1);\n\n\tTrAnchor[] vertex = new TrAnchor[vertices];\n\tfor (int i=0;i<vertices;i++) {\n\t int t=rand3.nextInt();\n\t if (t==1) {\n\t\tvertex[i] = new Statename(\"S\"+i);\n\t } else if (t==2) {\n\t\tvertex[i] = new Conname(\"C\"+i);\n\t } else {\n\t\tvertex[i] = new UNDEFINED();\n\t }\n\t}\n\n\tint edges = rand2.nextInt();\n\tSystem.out.println(\"edges=\"+edges);\n\t\n\tTr[] transition = new Tr[edges];\n\tfor (int i=0;i<edges;i++) {\n\t int si = rand4.nextInt();\n\t int ti = rand4.nextInt();\n\t \n\t TrAnchor source = vertex[si];\n\t TrAnchor target = vertex[ti];\n\t transition[i] = new Tr(source,target,null);\n\t}\n\t \n\tSystem.out.println();\n\tSystem.out.println(\"Ausgabe:\");\n\n\tfor (int i=0;i<edges;i++) \n\t new PrettyPrint().start(transition[i]);\n\t\n\ttesc2.ProperMap properMap = new tesc2.ProperMap(vertex,transition);\n\n\tfor (int i=0;i<properMap.getHeight();i++) {\n\t System.out.print(properMap.getWidthOfRow(i));\n\t \n\t for (int j=0;j<properMap.getWidthOfRow(i);j++) {\n\t\tSystem.out.print(properMap.getElement(i,j)+\" \");\n\t }\n\t System.out.println();\n\t}\n\n\ttesc2.MapTransition[] mt = properMap.getMapTransitions();\n\tfor (int i=0;i<mt.length;i++)\n\t System.out.println(mt[i]);\n\n }", "public void goNextLevel(){\r\n setCurrentLevel(currentLevel.getNextLevel());\r\n }", "protected TransitionFunction transitionFunction() {\n\t\treturn (TransitionFunction) this.transitions;\n\t}", "private void populateLevel() {\r\n\r\n\r\n\t\t// Setup Goal\r\n\t\tJsonValue goalVal = levelAssets.get(\"goal\");\r\n\t\tfloat gWidth = goalTile.getRegionWidth()/scale.x;\r\n\t\tfloat gHeight = goalTile.getRegionHeight()/scale.y;\r\n\t\tfloat gX = goalVal.get(\"pos\").getFloat(0) + gWidth / 2;\r\n\t\tfloat gY = goalVal.get(\"pos\").getFloat(1) + gHeight / 2;\r\n\t\tgoalDoor = new DoorModel(gX, gY, gWidth, gHeight);\r\n\t\tgoalDoor.setBodyType(BodyDef.BodyType.StaticBody);\r\n\t\tgoalDoor.setDensity(constants.get(\"goal\").getFloat(\"density\", 0));\r\n\t\tgoalDoor.setFriction(constants.get(\"goal\").getFloat(\"friction\", 0));\r\n\t\tgoalDoor.setRestitution(constants.get(\"goal\").getFloat(\"restitution\", 0));\r\n\t\tgoalDoor.setSensor(true);\r\n\t\tgoalDoor.setDrawScale(scale);\r\n\t\tgoalDoor.setTexture(goalTile);\r\n\t\tgoalDoor.setName(\"goal\");\r\n\t\taddObject(goalDoor);\r\n\t\taddObjectTo(goalDoor, LevelCreator.allTag);\r\n\r\n\t\t// Get default values\r\n\t\tJsonValue defaults = constants.get(\"defaults\");\r\n\t\tJsonValue objs = levelAssets.get(\"objects\");\r\n\r\n\t\t//group platform constants together for access in following for-loop\r\n\t\tTextureRegion[] xTexture = {lightTexture, darkTexture, allTexture,\r\n\t\t\tlightningLightTexture, lightningDarkTexture, lightningAllTexture,\r\n\t\t\trainLightTexture, rainDarkTexture, rainAllTexture,\r\n\t\t\t\tcrumbleLightTexture, crumbleDarkTexture, crumbleAllTexture};\r\n\r\n\t\tTextureRegion[] reducedXTexture = {lightTexture, darkTexture, allTexture,\r\n\t\t\t\tlightningLightTextureReduced, lightningDarkTextureReduced, lightningAllTextureReduced,\r\n\t\t\t\trainLightTextureReduced, rainDarkTextureReduced, rainAllTextureReduced,\r\n\t\t\t\tcrumbleLightTextureReduced, crumbleDarkTextureReduced, crumbleAllTextureReduced};\r\n\r\n\r\n\t\t// Setup platforms\r\n\t\tfor(int i=0; i < (objs != null ? objs.size : 0); i++)\r\n\t\t{\r\n\t\t\tJsonValue obj = objs.get(i);\r\n\r\n\t\t\t// Get platform attributes\r\n\t\t\tint platformType = obj.get(\"type\").asInt();\r\n\t\t\tint property = obj.get(\"property\") == null ? 0: obj.get(\"property\").asInt();\r\n\t\t\tJsonValue platformArgs = obj.get(\"positions\");\r\n\t\t\tJsonValue pathsArgs = obj.get(\"paths\");\r\n\r\n\t\t\tfor (int j = 0; j < platformArgs.size; j++) {\r\n\t\t\t\tfloat[] bounds = platformArgs.get(j).asFloatArray();\r\n\t\t\t\tfloat x = bounds[0], y = bounds[1], width = bounds[2], height = bounds[3];\r\n\t\t\t\tTextureRegion newXTexture;\r\n\t\t\t\tTextureRegion crumbleTexture = null;\r\n\t\t\t\tTexture originalTexture = null;\r\n\t\t\t\ttry {\r\n\t\t\t\t\t// temporary - need to refactor asset directory\r\n\t\t\t\t\tJsonValue assetName = obj.get(\"assetName\");\r\n\t\t\t\t\tint assetIndex = assetName.asInt();\r\n\t\t\t\t\tnewXTexture = new TextureRegion(tutorial_signs[assetIndex]);\r\n\t\t\t\t} catch(Exception e) {\r\n\t\t\t\t\tint platIdx = platformType-1+(property - 1)*3;\r\n\t\t\t\t\tint crumbleIdx = platIdx + 3;\r\n\t\t\t\t\tnewXTexture = new TextureRegion(xTexture[platIdx]);\r\n\t\t\t\t\toriginalTexture = newXTexture.getTexture();\r\n\t\t\t\t\t// For crumble animation\r\n\t\t\t\t\tif (platIdx > 5) {\r\n\t\t\t\t\t\tcrumbleTexture = new TextureRegion(xTexture[crumbleIdx]);\r\n//\t\t\t\t\t\tcrumbleTexture.setRegion(0, 0, width, height);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// If the platform size is the same as the spritesheet size\r\n\t\t\t\t\tif (originalTexture.getWidth() > 32 && width%(originalTexture.getWidth()/32) == 0) {\r\n\t\t\t\t\t\tnewXTexture = new TextureRegion(reducedXTexture[platIdx]);\r\n\t\t\t\t\t\toriginalTexture = newXTexture.getTexture();\r\n\t\t\t\t\t\tif (platIdx > 5) {\r\n\t\t\t\t\t\t\tcrumbleTexture = new TextureRegion(reducedXTexture[crumbleIdx]);\r\n//\t\t\t\t\t\t\tcrumbleTexture.setRegion(0, 0, width, height);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n//\t\t\t\t\tnewXTexture.setRegion(0, 0, width, height);\r\n\t\t\t\t}\r\n\t\t\t\tPlatformModel platformModel = new PlatformModel(bounds, platformType, property, newXTexture, scale,\r\n\t\t\t\t\t\tdefaults.getFloat( \"density\", 0.0f ), defaults.getFloat( \"friction\", 0.0f ) ,\r\n\t\t\t\t\t\tdefaults.getFloat( \"restitution\", 0.0f ), originalTexture, crumbleTexture);\r\n\t\t\t\tplatformModel.setTag(platformType);\r\n\t\t\t\tplatformModel.setProperty(property);\r\n\t\t\t\taddObject(platformModel);\r\n\t\t\t\taddObjectTo(platformModel, platformType);\r\n\t\t\t\t//TODO: Moving platforms\r\n\r\n\r\n\t\t\t\tif (pathsArgs != null) {\r\n\t\t\t\t\tfloat[] paths = pathsArgs.get(j).asFloatArray();\r\n\r\n\t\t\t\t\t//** Moving platform if > 1 path or different path from starting position\r\n\t\t\t\t\tif (hasValidPath(x, y, paths)) {\r\n\t\t\t\t\t\tplatformModel.setBodyType(BodyDef.BodyType.KinematicBody);\r\n\t\t\t\t\t\tmovingObjects.add(platformModel);\r\n\r\n\t\t\t\t\t\tPooledList<Vector2> pathList = new PooledList<>();\r\n\t\t\t\t\t\tfor (int k = 0; k < paths.length; k+=2) {\r\n\t\t\t\t\t\t\tpathList.add(new Vector2(paths[k], paths[k+1]));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tfloat velocity = 3;\r\n\r\n\t\t\t\t\t\tplatformModel.setGravityScale(0);\r\n\t\t\t\t\t\tplatformModel.setPaths(pathList);\r\n\t\t\t\t\t\tplatformModel.setVelocity(velocity);\r\n\r\n\t\t\t\t\t\tmovingObjects.add(platformModel);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// This world is heavier\r\n\t\tworld.setGravity( new Vector2(0,defaults.getFloat(\"gravity\",0)) );\r\n\r\n\t\t// Set level background index\r\n\t\tint backgroundTextureIndex = levelAssets.get(\"background\").asInt();\r\n\t\tbackgroundLightTexture = backgrounds[backgroundTextureIndex - 1];\r\n\t\tbackgroundDarkTexture = backgrounds[backgroundTextureIndex];\r\n\t\tbackgroundTexture = backgroundLightTexture;\r\n\r\n\t\t// Initialize background animations\r\n\t\tactualBackgroundTexture = backgroundTexture.getTexture();\r\n\t\tbackgroundEntirePixelWidth = actualBackgroundTexture.getWidth();\r\n\t\tbackgroundNumAnimFrames = (int)(backgroundEntirePixelWidth/backgroundFramePixelWidth);\r\n\t\tbackgroundAnimator = new FilmStrip(backgroundTexture,1, backgroundNumAnimFrames, backgroundNumAnimFrames);\r\n\t\tbackgroundAnimator.setFrame(0);\r\n\t\tbackgroundAnimeframe = 0;\r\n\t\tbackgroundOrigin = new Vector2(backgroundAnimator.getRegionWidth()/2.0f, backgroundAnimator.getRegionHeight()/2.0f);\r\n\r\n\t\t// Set level bounds\r\n\t\twidthUpperBound = levelAssets.get(\"dimensions\").getInt(0);\r\n\t\theightUpperBound = levelAssets.get(\"dimensions\").getInt(1);\r\n\r\n\t\t// Setup Somni\r\n\r\n\t\tJsonValue somniVal = levelAssets.get(\"somni\");\r\n\t\tfloat sWidth = somniTexture.getRegionWidth()/scale.x;\r\n\t\tfloat sHeight = somniTexture.getRegionHeight()/scale.y;\r\n\t\tfloat sX = somniVal.get(\"pos\").getFloat(0) + sWidth / 2;\r\n\t\tfloat sY = somniVal.get(\"pos\").getFloat(1) + sHeight / 2;\r\n\t\tsomni = new CharacterModel(constants.get(\"somni\"), sX, sY, sWidth, sHeight, platformController.somnif, CharacterModel.LIGHT);\r\n\t\tsomni.setDrawScale(scale);\r\n\t\tsomni.setTexture(somniIdleTexture);\r\n\t\tsomni.setFilterData(platformController.somnif);\r\n\t\tsomni.setActive(true);\r\n\t\taddObject(somni);\r\n\t\taddObjectTo(somni, LevelCreator.allTag);\r\n\r\n\r\n\t\t// Setup Phobia\r\n\r\n\t\tJsonValue phobiaVal = levelAssets.get(\"phobia\");\r\n\t\tfloat pWidth = phobiaTexture.getRegionWidth()/scale.x;\r\n\t\tfloat pHeight = phobiaTexture.getRegionHeight()/scale.y;\r\n\t\tfloat pX = phobiaVal.get(\"pos\").getFloat(0) + pWidth / 2;\r\n\t\tfloat pY = phobiaVal.get(\"pos\").getFloat(1) + pHeight / 2;\r\n\t\tphobia = new CharacterModel(constants.get(\"phobia\"), pX, pY, pWidth, pHeight, platformController.phobiaf, CharacterModel.DARK);\r\n\t\tphobia.setDrawScale(scale);\r\n\t\tphobia.setTexture(phobiaIdleTexture);\r\n\t\tphobia.setFilterData(platformController.phobiaf);\r\n\t\taddObject(phobia);\r\n\t\taddObjectTo(phobia, LevelCreator.allTag);\r\n\t\tphobia.setActive(true);\r\n\r\n\t\t// Setup Combined\r\n\r\n\t\tfloat cWidth = combinedTexture.getRegionWidth()/scale.x;\r\n\t\tfloat cHeight = combinedTexture.getRegionHeight()/scale.y;\r\n\r\n\t\tcombined = new CharacterModel(constants.get(\"combined\"), 0, 0, cWidth, cHeight, platformController.combinedf, CharacterModel.DARK);\r\n\t\tcombined.setDrawScale(scale);\r\n\t\tcombined.setTexture(somniPhobiaTexture);\r\n\t\t//combined.setTag();\r\n\t\tcombined.setFilterData(platformController.combinedf);\r\n\t\taddObject(combined);\r\n\t\taddObjectTo(combined, LevelCreator.allTag);\r\n\t\tcombined.setActive(true);\r\n\r\n\t\t//Remove combined\r\n\t\tobjects.remove(combined);\r\n\t\tsharedObjects.remove(combined);\r\n\t\tcombined.setActive(false);\r\n\r\n\t\taction = 0;\r\n\r\n\t\tPreferences prefs = GDXRoot.getPreferences();\r\n\t\tvolume = prefs.contains(\"volume\") ? prefs.getFloat(\"volume\") : defaults.getFloat(\"volume\",\r\n\t\t\t\t1.0f);\r\n//\t\tSystem.out.println(volume);\r\n\r\n\t\tplatformController.applyFilters(objects);\r\n\t}", "State getTarget();", "public void win() {\n\n\t\t// exist next level?\n\t\tif (Project.project.getMaps().get(maptyp).size() > id + 1) {\n\t\t\tProject.project.startLevel(maptyp, id + 1);\n\n\t\t\t// save it\n\t\t\tif (Project.project.getMapLevel(maptyp) < id + 1) {\n\t\t\t\tProject.project.setMapLevel(maptyp, id + 1);\n\t\t\t}\n\t\t} else {\n\t\t\tPWindow.window.setActScene(new MessageScene(\"Gewonnen\", \"\", new MenuMainScene()));\n\t\t}\n\t}", "void walkToQueue(LinkedList<Rider> startFloorQueue){\n riderAni.setImage(image);\r\n final int beginningQueueSize = startFloorQueue.size();\r\n TranslateTransition tt = new TranslateTransition();\r\n tt.setNode(riderAni);\r\n tt.setToX(250-Controller.queueOffsets.get(startFloor-1));\r\n tt.setDuration(Duration.seconds(4));\r\n TranslateTransition fl = new TranslateTransition();\r\n fl.setNode(floorLabel);\r\n fl.setToX(245-Controller.queueOffsets.get(startFloor-1));\r\n fl.setDuration(Duration.seconds(4));\r\n TranslateTransition tl = new TranslateTransition();\r\n tl.setNode(timerLabel);\r\n tl.setToX(245-Controller.queueOffsets.get(startFloor-1));\r\n tl.setDuration(Duration.seconds(4));\r\n ParallelTransition pt = new ParallelTransition(tt,fl,tl);\r\n pt.play();\r\n final int offset= Controller.queueOffsets.get(startFloor-1);\r\n\r\n pt.onFinishedProperty().set(new EventHandler<ActionEvent>() {\r\n public void handle(ActionEvent event) {\r\n //fires once person stops walking\r\n if (timer==null){\r\n startTimer();\r\n }\r\n riderAni.setImage(image2);\r\n if (beginningQueueSize==1 || offset==0||(! Controller.floorDirectionCalled.get(startFloor-1).equals(direction)&&!Controller.floorDirectionCalled.get(startFloor-1).equals(\"BOTH\"))){\r\n Controller.getElevator(startFloor,direction);\r\n }\r\n }\r\n });\r\n }", "@Override\n\tprotected void enterEffect() {\n\t\t\n\t}", "@Override\n protected void processPathAction(GridNode start, GridNode goal, Stack<GridNode> path) {\n path.pop();\n\n // Make the robot follow the path\n Mover mover = new Mover(\n robot.getDifferentialPilot(),\n new LightSensor(leftSensorPort),\n new LightSensor(rightSensorPort),\n path,\n initialDirection);\n mover.run();\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tLevel1();\t\t\t\n\t\t\t\t}", "public void addTransition(String source, String target, Action action) {\r\n \t\tState tgtState = states.get(target);\r\n \r\n\t\tTransition transition = transitions.get(source);\r\n \t\tList<NextStateInfo> nextState = transition.getNextStateInfo();\r\n \t\tnextState.add(new NextStateInfo(action, tgtState));\r\n \t}", "private void react_mainRegion_State1() {\n\t\tif (check_mainRegion_State1_tr0_tr0()) {\n\t\t\teffect_mainRegion_State1_tr0();\n\t\t}\n\t}", "private static void phase2StateChange(){\n addPanel.removeFromParent();\n addPlayerButton.removeFromParent();\n resetRosterButton.removeFromParent();\n matchmakingBy5.removeFromParent();\n matchmakingBy3.removeFromParent();\n String phase2HeaderHTML = \"<div class=\\\"panel panel-info\\\"><div class=\\\"panel-heading\\\"><h4>LTournament Information</h4></div><div class=\\\"panel-body\\\">This is the team selection phase. <strong>Click on two players to swap them.</strong> When you are ready, click the proceed button to begin the tournament.</div></div>\";\n controlPanelHeaderHTML.setHTML(phase2HeaderHTML);\n GUI.middleMainPanel.remove(GUI.playerPanel);\n GUI.middleMainPanel.setWidth(\"100%\");\n setBootstrapAlert(bootstrapAlerts.SUCCESSFUL_TEAM_CREATION);\n\n resetTradeButton.addClickHandler(tradeResetButtonHandler);\n controlPanel.add(resetTradeButton);\n\n tradeButton.addClickHandler(tradeClickHandler);\n controlPanel.add(tradeButton);\n\n moveToBracketPhaseButton.addClickHandler(moveToPhase3Handler);\n controlPanel.add(moveToBracketPhaseButton);\n\n resetTradeButton.addStyleName(\"btn btn-default\");\n tradeButton.addStyleName(\"btn btn-default\");\n moveToBracketPhaseButton.addStyleName(\"btn btn-default\");\n }", "@Override\n public void goToMenu(int chosenMenu2) {\n Perso personnage = Perso.getCurrentCharacter();\n \n switch (chosenMenu2){\n \n case 1:\n AdventureMenu adventureMenu = new AdventureMenu();\n adventureMenu.runMenu();\n break;\n case 2:\n goToShop();\n shopMenu = new ShopMenu();\n personnage.UseMoney(1);\n break;\n \n case 3:\n \tpersonnage.restauSante(10);\n \tpersonnage.UseMoney(10);\n break;\n \n case 4:\n toExitTown = true;\n break;\n \n default:\n toExitTown = false;\n break;\n }\n }", "@EventHandler\n\tpublic void onTravelToNether(PlayerPortalEvent e) {\n\t\tPlayerTR trPlayer = TaskRun.getPlayer(e.getPlayer());\n\t\tif (e.getTo().getWorld().getEnvironment() == Environment.NETHER) {\n\t\t\ttrPlayer.completeTask(1);\n\t\t}\n\t}", "public interface MonsterStateTransitions {\n //state transitions\n void toVulnerableState();\n void toProtectedState();\n\n //actions\n void init();\n\n}", "ComponentAgent getPreviousSibling();", "private void addWorkerLostTransitions() {\n List<ReplicateStatus> defaultStatuses = getWorkflowStatuses();\n List<ReplicateStatus> defaultNonFinal = getNonFinalWorkflowStatuses();\n\n addTransition(defaultNonFinal, WORKER_LOST);\n addTransition(RECOVERING, WORKER_LOST);\n addTransition(ABORTED, WORKER_LOST);\n\n addTransition(WORKER_LOST, defaultStatuses);\n addTransition(WORKER_LOST, RECOVERING);\n addTransition(WORKER_LOST, ABORTED);\n }", "int getParentMonsterIndex();", "protected void levelUp() {\n\t\tlevel++;\n\t\t// set up floors for next level\n\t\tint[] nextFloors = floors[level];\n\t\tint[] nextFurnishing = furnishings[level];\n\t\tfor(int i = 0; i < nextFloors.length; i++) {\n\t\t\tFloor newFloor = game.getFloorByKey(nextFloors[i]);\n\t\t\ttiles[i].setFloor(newFloor);\n\t\t\tif(nextFurnishing[i] != 0) {\n\t\t\t\tFurnishingDirectory newFurn = game.getFurnishingByKey(nextFurnishing[i]);\n\t\t\t\tnew Furnishing(newFurn, tiles[i]);\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void onItemClick(View view, int position) {\n setSharedElementReturnTransition(TransitionInflater.from(getActivity()).inflateTransition(R.transition.trans_move));\n setExitTransition(TransitionInflater.from(getActivity()).inflateTransition(android.R.transition.explode));\n\n View orange = view.findViewById(R.id.orange_bar);\n View blue = view.findViewById(R.id.blue_bar);\n\n SecondFragment secondFragment = new SecondFragment();\n // Set shared and scene transitions on 2nd fragment\n secondFragment.setSharedElementEnterTransition(TransitionInflater.from(getActivity()).inflateTransition(R.transition.trans_move));\n secondFragment.setEnterTransition(TransitionInflater.from(getActivity()).inflateTransition(android.R.transition.explode));\n\n // You need to make sure the transitionName is both unique to each instance of the view you\n // want to animate as well as known to the 2nd fragment. Since these views are inside\n // a RecyclerView or ListView, they can have many instances. In your adapter you need to\n // set a transitionName dynamically (I use the position), then pass that unique transitionName\n // to the 2nd fragment before you animate\n secondFragment.setBlueId(blue.getTransitionName());\n secondFragment.setOrangeId(orange.getTransitionName());\n android.app.FragmentTransaction trans = getFragmentManager().beginTransaction();\n trans.replace(R.id.main_container, secondFragment);\n trans.addToBackStack(null);\n trans.addSharedElement(blue, blue.getTransitionName());\n trans.addSharedElement(orange, orange.getTransitionName());\n trans.commit();\n }", "@Override\n\tpublic void aiStep() {\n\t\tsuper.aiStep();\n\t\tif (!this.level.isClientSide) {\n\t\t\tthis.updatePersistentAnger((ServerWorld) this.level, true);\n\t\t}\n\t}", "TransitionType createTransitionType();", "private static void postProcess() {\n Set<Transition> ts = petrinet.getTransitions();\n for(Transition t : ts) {\n List<Flow> outEdges = new ArrayList<Flow>(t.getPostsetEdges());\n List<Flow> inEdges = new ArrayList<Flow>(t.getPresetEdges());\n try {\n Flow f = petrinet.getFlow(t.getId(), \"void\");\n System.out.println(\"contain void!\");\n assert(f.getWeight() == 1);\n //if (outEdges.size() == 1) { // Delete the transition.\n f.setWeight(0);\n //}\n } catch (NoSuchEdgeException e) {}\n }\n }", "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 }", "@FXML private void transitionView(ActionEvent event) {\n\t\t// id button caller\n\t\tString btn = ((Button) event.getSource()).getId();\n\t\tNavigationController.PREVIOUS = NavigationController.STARTMENU;\n\t\t// send load request\n\t\tif (btn.equals(\"newgame\"))\n\t\t\tNavigationController.loadView(NavigationController.GAMECREATION);\n\t\tif (btn.equals(\"loadgame\"))\n\t\t\tNavigationController.loadView(NavigationController.SAVELOAD);\n\n\t\t// if this spot is reached: do nothing\n\t}", "public void act() \n {\n movegas();\n \n atingido2(); \n \n }", "@Step\n public static void fire(final Transition _self) {\n fr.inria.diverse.k3.al.annotationprocessor.stepmanager.StepCommand command = new fr.inria.diverse.k3.al.annotationprocessor.stepmanager.StepCommand() {\n \t@Override\n \tpublic void execute() {\n \t\tfr.inria.diverse.sample.petrinetv2.semantics.TransitionAspectTransitionAspectProperties _self_ = fr.inria.diverse.sample.petrinetv2.semantics.TransitionAspectTransitionAspectContext.getSelf(_self);\n \t\t_privk3_fire(_self_, _self);\n \t}\n };\n fr.inria.diverse.k3.al.annotationprocessor.stepmanager.IStepManager manager = fr.inria.diverse.k3.al.annotationprocessor.stepmanager.StepManagerRegistry.getInstance().findStepManager(_self);\n if (manager != null) {\n \tmanager.executeStep(_self,command,\"Transition\",\"fire\");\n } else {\n \tcommand.execute();\n }\n }", "public interface Transition {\n\n File transition(File current);\n\n}", "public void goUp();", "public default void enter(Scene from) {\n }", "public StateTransition getStateTransition() {\n\t\treturn (sb);\n\t}", "@Override\r\n\tpublic void update(float dt) {\r\n\t\thandleInput();\r\n\r\n\t\tworld.step(dt / 5, 8, 3);\r\n\r\n\t\tlevel1.update(dt);\r\n\t\tlevel2.update(dt);\r\n\t\tlevel3.update(dt);\r\n\t\tmainMenuB.update(dt);\r\n\t}", "void link(Portal portal1, Portal portal2);", "private void setWindowTransitions() {\n Transition returnTrans = new Slide(Gravity.RIGHT);\n returnTrans.setDuration(250);\n getWindow().setReturnTransition(returnTrans);\n getWindow().setEnterTransition(returnTrans);\n }", "private void checkFlowFromTo(\n NodeAdaptor source, NodeAdaptor target) {\n if (source.isChoreographyActivity() && target.isChoreographyActivity()) {\n Collection<NodeAdaptor> nodesWithoutParticipation =\n getFinalTasksWithoutParticipant(source,\n ((ChoreographyNodeAdaptor) target).getActiveParticipant());\n if (!nodesWithoutParticipation.isEmpty()) {\n validator.addMessage(\n \"initiatorOfChoreographyActivityNotParticipantInPriorActivity\",\n target, nodesWithoutParticipation);\n }\n }\n }", "public void executeLeftGame() {\r\n //COME BACK TO THIS\r\n }", "public void uturn() {\n\t\tthis.turnLeft(2);\n\t}", "public final void mT__96() throws RecognitionException {\n try {\n int _type = T__96;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // InternalEsm.g:90:7: ( 'transition' )\n // InternalEsm.g:90:9: 'transition'\n {\n match(\"transition\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "@Override\n public void levelUp(){\n //System.out.println(\"Level: \" + getLevel());\n if (getLevel() > 5) return;\n\n /* System.out.println(\"\\n-------\");\n System.out.println(\"Level: \" + getLevel());\n System.out.println(\"Se va a aumentar: \" + getName() + \"Stacks actuales: Health\" + getHealth() + \" range: \" + range + \" stroke\" + strokePerTime+ \" speed: \" + getSeep());\n*/\n double percentage = growth(getLevel()) + growthRate;\n\n setHealth((int) (getHealth() + getHealth() * percentage));\n strokePerTime = (int) (strokePerTime + strokePerTime * percentage);\n\n // Aumenta el rango si el nivel es 3 o 5\n // Luego quedan muy rotos xD\n if (getLevel() % 2 != 0) range++;\n setLevel(getLevel() + 1);\n\n /* System.out.println(\"resultado: \" + getName() + \"Stacks actuales: Health\" + getHealth() + \" range: \" + range + \" stroke\" + strokePerTime+ \" speed: \" + getSeep());\n System.out.println(\"-------\\n\");*/\n }", "public void setNewScene() {\n switch (game.getCurrentRoomId()) {\n case 14:\n WizardOfTreldan.setFinishScene();\n break;\n\n }\n }", "public void interactWhenLeaving() {\r\n\t\t\r\n\t}", "@Test\n public void randomTransitionsReturnsSingleEligibleTransition() throws PetriNetComponentException {\n \tPetriNet petriNet = APetriNet.with(AToken.called(\"Default\").withColor(Color.BLACK)).and(\n \t\t\tAPlace.withId(\"P1\").containing(1, \"Default\").token()).\n \t\t\tand(APlace.withId(\"P2\")).\n \t\t\tand(AnImmediateTransition.withId(\"T1\")).and(\n \t\t\tANormalArc.withSource(\"P1\").andTarget(\"T1\").with(\"1\", \"Default\").token()).andFinally(\n \t\t\tANormalArc.withSource(\"T1\").andTarget(\"P2\").with(\"1\", \"Default\").token());\n \t\n \tAnimator animator = new PetriNetAnimator(petriNet);\n// \tanimator.setRandom(new Random(123456l)); \n \tTransition t = animator.getRandomEnabledTransition(); \n \tassertEquals(\"T1\", t.getId()); \n }", "public T caseTransition(Transition object) {\n\t\treturn null;\n\t}", "private void prepareTransitions() {\n setExitTransition(TransitionInflater.from(getContext())\n .inflateTransition(R.transition.grid_exit_transition));\n\n // A similar mapping is set at the ImagePagerFragment with a setEnterSharedElementCallback.\n setExitSharedElementCallback(\n new SharedElementCallback() {\n @Override\n public void onMapSharedElements(List<String> names, Map<String, View> sharedElements) {\n // Locate the ViewHolder for the clicked position.\n RecyclerView.ViewHolder selectedViewHolder = mPhotosListView\n .findViewHolderForAdapterPosition(MainActivity.currentPosition);\n if (selectedViewHolder == null) {\n return;\n }\n\n // Map the first shared element name to the child ImageView.\n sharedElements\n .put(names.get(0), selectedViewHolder.itemView.findViewById(R.id.ivPhoto));\n }\n });\n }", "@Override\n\tpublic void levelUp() {\n\n\t}", "public abstract boolean levelUp();", "public static void buildStage2 ()\r\n {\r\n \r\n lgt.findParent(); //4\r\n lgt.findChild(0); //6\r\n lgt.insert(12);\r\n lgt.findParent();\r\n lgt.insert(13);\r\n lgt.findParent();\r\n lgt.insert(14);\r\n \r\n lgt.findRoot();\r\n lgt.findChild(0);//2\r\n lgt.findChild(0);//5\r\n lgt.insert(8);\r\n lgt.findParent();\r\n lgt.insert(9);\r\n lgt.findParent();\r\n lgt.insert(10);\r\n lgt.findParent();\r\n lgt.insert(11);\r\n \r\n }", "public void readyToGoAnimation() {\n TranslateTransition leave = new TranslateTransition(Duration.millis(600), syncBox);\n leave.setByY(80.0);\n // Buttons slide in and clickable address appears simultaneously.\n TranslateTransition arrive = new TranslateTransition(Duration.millis(600), controlsBox);\n arrive.setToY(0.0);\n FadeTransition reveal = new FadeTransition(Duration.millis(500), addressControl);\n reveal.setToValue(1.0);\n ParallelTransition group = new ParallelTransition(arrive, reveal);\n // Slide out happens then slide in/fade happens.\n SequentialTransition both = new SequentialTransition(leave, group);\n both.setCycleCount(1);\n both.setInterpolator(Interpolator.EASE_BOTH);\n both.play();\n }", "public static void stageTwo() {\n status.recount();\n if (play) {\n coar_maze1.ending1();\n }\n while (status.getCounter() < 6 && play) {\n coar_maze1.direction();\n if (coar_maze1.china) {\n china_maze.china_orbs();\n china_maze.china_enemies();\n } else if (coar_maze1.amazon_forest) {\n amazon_jungle.amazon_river_orbs();\n amazon_jungle.amazon_river_enemies();\n }\n status.addCounter();\n quit();\n }\n status.recount();\n }" ]
[ "0.5844882", "0.58264804", "0.5759491", "0.5399135", "0.53403395", "0.53296465", "0.5291044", "0.516396", "0.5150034", "0.51331496", "0.50969386", "0.50969344", "0.5066871", "0.5060199", "0.5056714", "0.50529194", "0.503906", "0.50344914", "0.50210744", "0.50210744", "0.5019087", "0.50103", "0.49842417", "0.49601382", "0.4956856", "0.4947498", "0.49321336", "0.49233192", "0.49228418", "0.49082395", "0.489804", "0.4889046", "0.48803785", "0.48234951", "0.48142925", "0.48080575", "0.4772287", "0.47676748", "0.47616494", "0.47576144", "0.47554448", "0.4726903", "0.4719246", "0.4706496", "0.4702069", "0.46944866", "0.4677551", "0.46683705", "0.46628523", "0.46607247", "0.4658812", "0.46588045", "0.46492836", "0.46407503", "0.4622947", "0.46134013", "0.46072057", "0.4605194", "0.459326", "0.45923722", "0.4583858", "0.4582812", "0.45749462", "0.4569996", "0.45583317", "0.45565054", "0.4553785", "0.4552844", "0.4552184", "0.45508635", "0.45499924", "0.45433608", "0.4535947", "0.4527024", "0.45247293", "0.45236686", "0.4514566", "0.4514398", "0.4513961", "0.45114225", "0.45103377", "0.45084983", "0.45032862", "0.44962984", "0.4494897", "0.44898927", "0.44881958", "0.44876394", "0.44853613", "0.4480845", "0.4479739", "0.44787446", "0.44779354", "0.4477576", "0.4466739", "0.44636115", "0.44576225", "0.44559494", "0.44528192", "0.4449095" ]
0.6139879
0
The transition script is the script by which one level leads to another. It should return an integer value given a particular world state.
public void setTransitionScript(UserScript script) { this.transitionScript = script; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getStateValue2();", "int getStateValue();", "int getStateValue();", "int getStateValue();", "int getStateValue3();", "int getStateValue1();", "public UserScript getTransitionScript() {\n\t\treturn this.transitionScript;\n\t}", "int getExecutionStageStateValue();", "public int getStateOfMovement(){ return stateOfMovement; }", "public double getTransition(){\n\t\treturn transition;\n\t}", "int getGoalConfigLevelValue();", "protected abstract int newState();", "int getAbilityValue(Unit source);", "long getNumExecutionsByTransition(StateT state, ConditionT condition);", "int getState();", "int getState();", "int getState();", "int getState();", "int getState();", "int getState();", "@Override\n public double getTransitionValue() {\n return value.doubleValue();\n }", "private int getGoalValue(Proposition goalProposition) {\r\n \tGdlRelation relation = (GdlRelation) goalProposition.getName();\r\n GdlConstant constant = (GdlConstant) relation.get(1);\r\n return Integer.parseInt(constant.toString());\r\n }", "public abstract Etat transition();", "public int getGoal() {\n\t\treturn this.map.getGoal();\n\t}", "int getMove3Value();", "public Integer value(State state) {\n return state.lookup(variableName);\n }", "int getLeftMonster();", "public int getTextureState() {\n return MathHelper.clamp(MAX_TEXTURE_STATE * aggro / MAX_AGGRO, 0, MAX_TEXTURE_STATE);\n }", "int getParentMonsterIndex();", "public int getNombreTransitions()\n {\n return nombreTransitions;\n }", "public int getTransitionConstraint(Scope<?> scope, StateModelDefId stateModelDefId,\n Transition transition) {\n // set up attributes to match based on the scope\n ClusterConstraints transitionConstraints =\n getConstraintMap().get(ConstraintType.MESSAGE_CONSTRAINT);\n Map<ConstraintAttribute, String> matchAttributes = Maps.newHashMap();\n matchAttributes.put(ConstraintAttribute.STATE_MODEL, stateModelDefId.toString());\n matchAttributes.put(ConstraintAttribute.MESSAGE_TYPE, MessageType.STATE_TRANSITION.toString());\n matchAttributes.put(ConstraintAttribute.TRANSITION, transition.toString());\n switch (scope.getType()) {\n case CLUSTER:\n // cluster is implicit\n break;\n case RESOURCE:\n matchAttributes.put(ConstraintAttribute.RESOURCE, scope.getScopedId().stringify());\n break;\n case PARTICIPANT:\n matchAttributes.put(ConstraintAttribute.INSTANCE, scope.getScopedId().stringify());\n break;\n default:\n LOG.error(\"Unsupported scope for transition constraints: \" + scope);\n return Integer.MAX_VALUE;\n }\n Set<ConstraintItem> matches = transitionConstraints.match(matchAttributes);\n int value = Integer.MAX_VALUE;\n for (ConstraintItem item : matches) {\n String constraintValue = item.getConstraintValue();\n if (constraintValue != null) {\n try {\n int current = Integer.parseInt(constraintValue);\n if (current < value) {\n value = current;\n }\n } catch (NumberFormatException e) {\n LOG.error(\"Invalid in-flight transition cap: \" + constraintValue);\n }\n }\n }\n return value;\n }", "public static int run(State curr_state, char player) {\n\t\tint result = 0;\r\n\t\t//Calls the max_value part because dark plays first, wants max value\r\n\t\tif(player == '1'){\r\n\t\t\t//Returns number of times the max function runs\r\n\t\t\tresult = max_value(curr_state);\r\n\t\t}\r\n\t\t//Start at min, as light's turn, and it wants min value and\r\n\t\t//therefore subsequently will call min_value nd return\r\n\t\telse if(player == '2'){\r\n\t\t\tresult = min_value(curr_state);\t\r\n\t\t}\r\n\t\t//Return the number of states , i.e., minCounter + max Counter\r\n\t\t//Return minCounter + maxCounter;\r\n\t\treturn result;\r\n\t}", "@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 }", "public int getStateValue1() {\n return stateValue1_;\n }", "@Override\r\n public int getSpecialValue() {\n int num = this.getCombatLevel();\r\n num += this.levelChangeAgainstCultistPlayer;\r\n \r\n return num;\r\n }", "int getMove1Value();", "public double getTargetValue(StateTransition nextStateTransition) {\n return nextStateTransition.tdTarget;\n }", "int getRightMonster();", "int getDeploymentStateValue();", "int getMove2Value();", "String convertTransition(Transition instanceValue);", "private int getLevel() {\n return getStat(currentLevel);\n }", "int getLeftMonsterIndex();", "public int getStateValue1() {\n return stateValue1_;\n }", "public int getState();", "public int getState();", "public int getState();", "public int getState();", "public int getStateSwitchPosition();", "@Override public double stateTransitionWeight(int state1, int state2) {\n return 1 / (1 + benchmark.distance(state1, state2));\n }", "int getMonsterIndex();", "int getMonsterIndex();", "int getResultMonster();", "public static int getValue(int states, int field) throws IllegalArgumentEvent {\r\n\t\tswitch(field){\r\n\t\t//command\r\n\t\tcase 0:\r\n\t\t\treturn 8;\r\n\t\t//senseDir\r\n\t\tcase 1:\r\n\t\t\treturn 4;\r\n\t\t//turnDir\r\n\t\tcase 2:\r\n\t\t\treturn 2;\r\n\t\t//marker\r\n\t\tcase 3:\r\n\t\t\treturn 6;\r\n\t\t//p\r\n\t\tcase 4:\r\n\t\t\treturn 10;\r\n\t\t//st1\r\n\t\tcase 5:\r\n\t\t\treturn states;\r\n\t\t//st2\r\n\t\tcase 6:\r\n\t\t\treturn states;\r\n\t\t//condition\r\n\t\tcase 7:\r\n\t\t\treturn 10;\r\n\t\t//senseMarker\r\n\t\tcase 8:\r\n\t\t\treturn 6;\r\n\t\tdefault:\r\n\t\t\tthrow new IllegalArgumentEvent(\"Illegal field \" +\r\n\t\t\t\t\"argument in State constructor\");\r\n\t\t}\r\n\t}", "public double getTransitionProbability(Integer startStateIndex, Integer endStateIndex) {\n assert startStateIndex < endStateIndex;\n double probability = 1;\n String debugStr = \"\";\n for (int i = startStateIndex; i < endStateIndex; i++) {\n int startState = states.get(i);\n int nextState = states.get(i+1);\n probability = probability * transitionProbabilityMatrix[startState][nextState];\n //debugStr += String.format(\"%s * \", transitionProbabilityMatrix[startState][nextState]);\n }\n return probability;\n }", "long getStateChange();", "@Override\r\n public int getGoal(MachineState state, Role role) throws GoalDefinitionException {\r\n \tclearpropnet();\r\n \tmarkbases(state.getContents());\r\n \tSet<Proposition> goals = propNet.getGoalPropositions().get(role);\r\n\r\n \tfor (Proposition p : goals) {\r\n\t\t\tif (p.propmark())\r\n\t\t\t\treturn getGoalValue(p);\r\n\t\t}\r\n\t\tthrow new GoalDefinitionException(state, role);\r\n }", "public static int getEnemyLives(){\n return 1 + currentLvl * 2;\n\n }", "int getTurn();", "public int getGoal()\n {\n return goal;\n }", "public int getStateValue2() {\n return stateValue2_;\n }", "public static int activityStateToProcessState( int newState )\r\n {\r\n // The states actually have the same ordinals.\r\n return newState;\r\n }", "int getOnLevel();", "int getStep();", "int getStep();", "int getStep();", "protected abstract int getTurn();", "public native final Transition transition()/*-{\n\t\treturn this.transition();\n\t}-*/;", "public static int getAlterOutcome() {\r\n return alterOutcome;\r\n }", "public int getState() {\n return state.getValue();\n }", "public abstract State getDestinationState ();", "public int getStateValue2() {\n return stateValue2_;\n }", "public abstract int getReward(int initialState, int initialAction);", "public int getDifficulty()\n\t{\n\t\treturn (int) plannedDifficultyLevels.get(currentLevelSegment);\n\t}", "public String getTransition(int subsystem) {\n return _avTable.get(ATTR_TRANSITION, subsystem);\n }", "public int getLand();", "public State step(int c) {\n assert c >= 0;\n for (int i=0;i<numTransitions;i++) {\n final Transition t = transitionsArray[i];\n if (t.min <= c && c <= t.max) return t.to;\n }\n return null;\n }", "private int handleStateTransition(int r18, int r19, java.lang.String r20, java.lang.String r21) {\n /*\n r17 = this;\n r1 = r17\n r0 = r18\n r2 = r19\n r3 = r20\n r4 = r21\n com.thoughtworks.xstream.core.util.FastStack r5 = r1.stack\n int r5 = r5.size()\n com.thoughtworks.xstream.core.util.FastStack r6 = r1.stack\n java.lang.Object r6 = r6.peek()\n com.thoughtworks.xstream.io.json.AbstractJsonWriter$StackElement r6 = (com.thoughtworks.xstream.io.json.AbstractJsonWriter.StackElement) r6\n java.lang.Class r6 = r6.type\n r7 = 0\n r8 = 1\n if (r5 <= r8) goto L_0x0026\n boolean r9 = r1.isArray(r6)\n if (r9 == 0) goto L_0x0026\n r9 = 1\n goto L_0x0027\n L_0x0026:\n r9 = 0\n L_0x0027:\n if (r5 <= r8) goto L_0x003c\n com.thoughtworks.xstream.core.util.FastStack r10 = r1.stack\n int r11 = r5 + -2\n java.lang.Object r10 = r10.get(r11)\n com.thoughtworks.xstream.io.json.AbstractJsonWriter$StackElement r10 = (com.thoughtworks.xstream.io.json.AbstractJsonWriter.StackElement) r10\n java.lang.Class r10 = r10.type\n boolean r10 = r1.isArray(r10)\n if (r10 == 0) goto L_0x003c\n r7 = 1\n L_0x003c:\n r10 = 64\n r11 = 4\n if (r0 == r8) goto L_0x0353\n r13 = 128(0x80, float:1.794E-43)\n r14 = 2\n if (r0 == r14) goto L_0x0326\n r15 = 8\n r14 = 32\n r12 = 16\n r8 = 512(0x200, float:7.175E-43)\n if (r0 == r11) goto L_0x02c9\n java.lang.String r16 = \"@\"\n java.lang.String r11 = \"\"\n if (r0 == r15) goto L_0x01e9\n if (r0 == r12) goto L_0x01eb\n r12 = 256(0x100, float:3.59E-43)\n if (r0 == r14) goto L_0x01ca\n if (r0 == r10) goto L_0x0111\n if (r0 == r13) goto L_0x00b5\n if (r0 == r12) goto L_0x009c\n if (r0 != r8) goto L_0x0096\n r4 = 1\n if (r2 == r4) goto L_0x0087\n if (r2 == r13) goto L_0x007d\n if (r2 != r12) goto L_0x0077\n int r0 = r1.mode\n r3 = 4\n r0 = r0 & r3\n if (r0 != 0) goto L_0x0076\n if (r9 == 0) goto L_0x0076\n r17.endArray()\n L_0x0076:\n return r2\n L_0x0077:\n com.thoughtworks.xstream.io.json.AbstractJsonWriter$IllegalWriterStateException r4 = new com.thoughtworks.xstream.io.json.AbstractJsonWriter$IllegalWriterStateException\n r4.<init>(r0, r2, r3)\n throw r4\n L_0x007d:\n r3 = 0\n int r0 = r1.handleStateTransition(r0, r12, r3, r3)\n r4 = 2\n r1.handleStateTransition(r0, r4, r3, r3)\n return r2\n L_0x0087:\n r3 = 0\n r4 = 2\n int r0 = r1.handleStateTransition(r0, r12, r3, r3)\n int r0 = r1.handleStateTransition(r0, r4, r3, r3)\n r4 = 1\n r1.handleStateTransition(r0, r4, r3, r3)\n return r2\n L_0x0096:\n com.thoughtworks.xstream.io.json.AbstractJsonWriter$IllegalWriterStateException r4 = new com.thoughtworks.xstream.io.json.AbstractJsonWriter$IllegalWriterStateException\n r4.<init>(r0, r2, r3)\n throw r4\n L_0x009c:\n r4 = 2\n if (r2 != r4) goto L_0x00af\n int r0 = r1.mode\n r3 = 4\n r0 = r0 & r3\n if (r0 == 0) goto L_0x00ae\n r17.endArray()\n r17.endArray()\n r17.endObject()\n L_0x00ae:\n return r2\n L_0x00af:\n com.thoughtworks.xstream.io.json.AbstractJsonWriter$IllegalWriterStateException r4 = new com.thoughtworks.xstream.io.json.AbstractJsonWriter$IllegalWriterStateException\n r4.<init>(r0, r2, r3)\n throw r4\n L_0x00b5:\n r10 = 1\n if (r2 == r10) goto L_0x0106\n r10 = 2\n if (r2 == r10) goto L_0x00d3\n r10 = 4\n if (r2 == r10) goto L_0x00d5\n if (r2 == r13) goto L_0x00d3\n if (r2 != r12) goto L_0x00cd\n int r0 = r1.mode\n r0 = r0 & r10\n if (r0 != 0) goto L_0x00cc\n if (r9 == 0) goto L_0x00cc\n r17.endArray()\n L_0x00cc:\n return r2\n L_0x00cd:\n com.thoughtworks.xstream.io.json.AbstractJsonWriter$IllegalWriterStateException r4 = new com.thoughtworks.xstream.io.json.AbstractJsonWriter$IllegalWriterStateException\n r4.<init>(r0, r2, r3)\n throw r4\n L_0x00d3:\n r3 = 0\n goto L_0x00f2\n L_0x00d5:\n r17.nextElement()\n if (r7 != 0) goto L_0x0111\n int r10 = r1.mode\n r14 = 4\n r10 = r10 & r14\n if (r10 != 0) goto L_0x0111\n java.lang.String r0 = r1.encodeNode(r3)\n r1.addLabel(r0)\n int r0 = r1.mode\n r0 = r0 & r14\n if (r0 != 0) goto L_0x00f1\n if (r9 == 0) goto L_0x00f1\n r17.startArray()\n L_0x00f1:\n return r2\n L_0x00f2:\n int r0 = r1.handleStateTransition(r0, r12, r3, r3)\n r10 = 2\n r1.handleStateTransition(r0, r10, r3, r3)\n int r0 = r1.mode\n r3 = 4\n r0 = r0 & r3\n if (r0 != 0) goto L_0x0105\n if (r9 != 0) goto L_0x0105\n r17.endObject()\n L_0x0105:\n return r2\n L_0x0106:\n r3 = 0\n r10 = 2\n int r0 = r1.handleStateTransition(r0, r10, r3, r3)\n r4 = 1\n r1.handleStateTransition(r0, r4, r3, r3)\n return r2\n L_0x0111:\n r10 = 2\n r14 = 4\n if (r2 == r14) goto L_0x0192\n if (r2 == r13) goto L_0x0182\n if (r2 == r12) goto L_0x0182\n if (r2 != r8) goto L_0x017c\n int r0 = r1.mode\n r0 = r0 & r10\n if (r0 == 0) goto L_0x012b\n if (r5 == r10) goto L_0x0123\n goto L_0x012b\n L_0x0123:\n com.thoughtworks.xstream.converters.ConversionException r0 = new com.thoughtworks.xstream.converters.ConversionException\n java.lang.String r2 = \"Single value cannot be root element\"\n r0.<init>((java.lang.String) r2)\n throw r0\n L_0x012b:\n if (r4 != 0) goto L_0x0148\n java.lang.Class<com.thoughtworks.xstream.mapper.Mapper$Null> r0 = com.thoughtworks.xstream.mapper.Mapper.Null.class\n if (r6 != r0) goto L_0x0139\n com.thoughtworks.xstream.io.json.AbstractJsonWriter$Type r0 = com.thoughtworks.xstream.io.json.AbstractJsonWriter.Type.NULL\n java.lang.String r3 = \"null\"\n r1.addValue(r3, r0)\n goto L_0x017b\n L_0x0139:\n int r0 = r1.mode\n r3 = 4\n r0 = r0 & r3\n if (r0 != 0) goto L_0x017b\n if (r9 != 0) goto L_0x017b\n r17.startObject()\n r17.endObject()\n goto L_0x017b\n L_0x0148:\n int r0 = r1.mode\n r0 = r0 & r15\n if (r0 == 0) goto L_0x0174\n java.lang.Class r0 = java.lang.Long.TYPE\n if (r6 == r0) goto L_0x0155\n java.lang.Class<java.lang.Long> r0 = java.lang.Long.class\n if (r6 != r0) goto L_0x0174\n L_0x0155:\n long r7 = java.lang.Long.parseLong(r21)\n r9 = 9007199254740992(0x20000000000000, double:4.450147717014403E-308)\n int r0 = (r7 > r9 ? 1 : (r7 == r9 ? 0 : -1))\n if (r0 > 0) goto L_0x016e\n r9 = -9007199254740992(0xffe0000000000000, double:-8.98846567431158E307)\n int r0 = (r7 > r9 ? 1 : (r7 == r9 ? 0 : -1))\n if (r0 >= 0) goto L_0x0166\n goto L_0x016e\n L_0x0166:\n com.thoughtworks.xstream.io.json.AbstractJsonWriter$Type r0 = r1.getType(r6)\n r1.addValue(r4, r0)\n goto L_0x017b\n L_0x016e:\n com.thoughtworks.xstream.io.json.AbstractJsonWriter$Type r0 = com.thoughtworks.xstream.io.json.AbstractJsonWriter.Type.STRING\n r1.addValue(r4, r0)\n goto L_0x017b\n L_0x0174:\n com.thoughtworks.xstream.io.json.AbstractJsonWriter$Type r0 = r1.getType(r6)\n r1.addValue(r4, r0)\n L_0x017b:\n return r2\n L_0x017c:\n com.thoughtworks.xstream.io.json.AbstractJsonWriter$IllegalWriterStateException r4 = new com.thoughtworks.xstream.io.json.AbstractJsonWriter$IllegalWriterStateException\n r4.<init>(r0, r2, r3)\n throw r4\n L_0x0182:\n int r0 = r1.mode\n r3 = 4\n r0 = r0 & r3\n if (r0 != 0) goto L_0x0191\n if (r9 == 0) goto L_0x018e\n r17.endArray()\n goto L_0x0191\n L_0x018e:\n r17.endObject()\n L_0x0191:\n return r2\n L_0x0192:\n int r0 = r1.mode\n r6 = 1\n r0 = r0 & r6\n if (r0 == 0) goto L_0x019e\n r0 = 2\n if (r5 <= r0) goto L_0x019c\n goto L_0x019e\n L_0x019c:\n r3 = 4\n goto L_0x01bf\n L_0x019e:\n if (r7 == 0) goto L_0x01a6\n int r0 = r1.mode\n r5 = 4\n r0 = r0 & r5\n if (r0 == 0) goto L_0x01b6\n L_0x01a6:\n boolean r0 = r11.equals(r4)\n if (r0 != 0) goto L_0x01af\n r17.startObject()\n L_0x01af:\n java.lang.String r0 = r1.encodeNode(r3)\n r1.addLabel(r0)\n L_0x01b6:\n int r0 = r1.mode\n r3 = 4\n r0 = r0 & r3\n if (r0 == 0) goto L_0x01bf\n r17.startArray()\n L_0x01bf:\n int r0 = r1.mode\n r0 = r0 & r3\n if (r0 != 0) goto L_0x01c9\n if (r9 == 0) goto L_0x01c9\n r17.startArray()\n L_0x01c9:\n return r2\n L_0x01ca:\n r4 = 2\n if (r2 == r4) goto L_0x01df\n if (r2 != r10) goto L_0x01d9\n int r0 = r1.mode\n r3 = 4\n r0 = r0 & r3\n if (r0 != 0) goto L_0x01e8\n r17.nextElement()\n goto L_0x01e8\n L_0x01d9:\n com.thoughtworks.xstream.io.json.AbstractJsonWriter$IllegalWriterStateException r4 = new com.thoughtworks.xstream.io.json.AbstractJsonWriter$IllegalWriterStateException\n r4.<init>(r0, r2, r3)\n throw r4\n L_0x01df:\n r0 = 0\n int r3 = r1.handleStateTransition(r10, r12, r0, r0)\n r4 = 2\n r1.handleStateTransition(r3, r4, r0, r0)\n L_0x01e8:\n return r2\n L_0x01e9:\n if (r2 == r12) goto L_0x02a0\n L_0x01eb:\n r5 = 1\n if (r2 == r5) goto L_0x0291\n r5 = 4\n if (r2 == r5) goto L_0x01f9\n if (r2 == r12) goto L_0x0220\n if (r2 == r14) goto L_0x020b\n if (r2 == r13) goto L_0x0201\n if (r2 != r8) goto L_0x01fb\n L_0x01f9:\n r5 = 0\n goto L_0x0250\n L_0x01fb:\n com.thoughtworks.xstream.io.json.AbstractJsonWriter$IllegalWriterStateException r4 = new com.thoughtworks.xstream.io.json.AbstractJsonWriter$IllegalWriterStateException\n r4.<init>(r0, r2, r3)\n throw r4\n L_0x0201:\n r3 = 0\n int r0 = r1.handleStateTransition(r0, r14, r3, r3)\n r4 = 2\n r1.handleStateTransition(r0, r4, r3, r3)\n return r2\n L_0x020b:\n int r3 = r1.mode\n r4 = 4\n r3 = r3 & r4\n if (r3 == 0) goto L_0x021f\n if (r0 != r12) goto L_0x0216\n r17.endObject()\n L_0x0216:\n r17.endArray()\n r17.nextElement()\n r17.startArray()\n L_0x021f:\n return r2\n L_0x0220:\n if (r9 == 0) goto L_0x0229\n int r0 = r1.mode\n r5 = 4\n r0 = r0 & r5\n if (r0 == 0) goto L_0x024f\n goto L_0x022a\n L_0x0229:\n r5 = 4\n L_0x022a:\n r17.nextElement()\n java.lang.StringBuilder r0 = new java.lang.StringBuilder\n r0.<init>()\n int r6 = r1.mode\n r5 = r5 & r6\n if (r5 != 0) goto L_0x0239\n r11 = r16\n L_0x0239:\n r0.append(r11)\n r0.append(r3)\n java.lang.String r0 = r0.toString()\n java.lang.String r0 = r1.encodeAttribute(r0)\n r1.addLabel(r0)\n com.thoughtworks.xstream.io.json.AbstractJsonWriter$Type r0 = com.thoughtworks.xstream.io.json.AbstractJsonWriter.Type.STRING\n r1.addValue(r4, r0)\n L_0x024f:\n return r2\n L_0x0250:\n int r0 = r1.handleStateTransition(r0, r14, r5, r5)\n int r0 = r1.handleStateTransition(r0, r10, r5, r5)\n r5 = 2\n if (r2 == r5) goto L_0x0287\n r5 = 4\n if (r2 == r5) goto L_0x027c\n if (r2 == r8) goto L_0x0261\n goto L_0x0290\n L_0x0261:\n int r3 = r1.mode\n r3 = r3 & r5\n if (r3 != 0) goto L_0x026f\n java.lang.String r3 = \"$\"\n java.lang.String r3 = r1.encodeNode(r3)\n r1.addLabel(r3)\n L_0x026f:\n r3 = 0\n r1.handleStateTransition(r0, r8, r3, r4)\n int r0 = r1.mode\n r0 = r0 & r5\n if (r0 != 0) goto L_0x0290\n r17.endObject()\n goto L_0x0290\n L_0x027c:\n int r4 = r1.mode\n r4 = r4 & r5\n if (r4 != 0) goto L_0x0282\n goto L_0x0283\n L_0x0282:\n r11 = 0\n L_0x0283:\n r1.handleStateTransition(r0, r5, r3, r11)\n goto L_0x0290\n L_0x0287:\n r3 = 0\n int r0 = r1.handleStateTransition(r0, r8, r3, r3)\n r4 = 2\n r1.handleStateTransition(r0, r4, r3, r3)\n L_0x0290:\n return r2\n L_0x0291:\n r3 = 0\n r4 = 2\n int r0 = r1.handleStateTransition(r0, r14, r3, r3)\n int r0 = r1.handleStateTransition(r0, r4, r3, r3)\n r4 = 1\n r1.handleStateTransition(r0, r4, r3, r3)\n return r2\n L_0x02a0:\n if (r3 == 0) goto L_0x02c8\n java.lang.StringBuilder r0 = new java.lang.StringBuilder\n r0.<init>()\n int r5 = r1.mode\n r6 = 4\n r5 = r5 & r6\n if (r5 != 0) goto L_0x02af\n r11 = r16\n L_0x02af:\n r0.append(r11)\n r0.append(r3)\n java.lang.String r0 = r0.toString()\n r17.startObject()\n java.lang.String r0 = r1.encodeAttribute(r0)\n r1.addLabel(r0)\n com.thoughtworks.xstream.io.json.AbstractJsonWriter$Type r0 = com.thoughtworks.xstream.io.json.AbstractJsonWriter.Type.STRING\n r1.addValue(r4, r0)\n L_0x02c8:\n return r2\n L_0x02c9:\n r5 = 1\n if (r2 == r5) goto L_0x02f9\n r6 = 4\n if (r2 == r6) goto L_0x02fa\n if (r2 == r15) goto L_0x02f0\n if (r2 == r12) goto L_0x02de\n if (r2 == r13) goto L_0x02fa\n if (r2 != r8) goto L_0x02d8\n goto L_0x02fa\n L_0x02d8:\n com.thoughtworks.xstream.io.json.AbstractJsonWriter$IllegalWriterStateException r4 = new com.thoughtworks.xstream.io.json.AbstractJsonWriter$IllegalWriterStateException\n r4.<init>(r0, r2, r3)\n throw r4\n L_0x02de:\n int r5 = r1.mode\n r5 = r5 & r6\n if (r5 != 0) goto L_0x02e7\n if (r9 != 0) goto L_0x02e6\n goto L_0x02e7\n L_0x02e6:\n return r6\n L_0x02e7:\n r5 = 0\n int r0 = r1.handleStateTransition(r0, r15, r5, r5)\n r1.handleStateTransition(r0, r12, r3, r4)\n return r2\n L_0x02f0:\n int r0 = r1.mode\n r0 = r0 & r6\n if (r0 == 0) goto L_0x02f8\n r17.startArray()\n L_0x02f8:\n return r2\n L_0x02f9:\n r6 = 4\n L_0x02fa:\n if (r7 == 0) goto L_0x0304\n int r5 = r1.mode\n r5 = r5 & r6\n if (r5 == 0) goto L_0x0302\n goto L_0x0304\n L_0x0302:\n r5 = 0\n goto L_0x030c\n L_0x0304:\n r5 = 0\n int r0 = r1.handleStateTransition(r0, r15, r5, r5)\n r1.handleStateTransition(r0, r14, r5, r5)\n L_0x030c:\n r0 = 1\n if (r2 == r0) goto L_0x031e\n if (r2 == r6) goto L_0x031a\n if (r2 == r13) goto L_0x031e\n if (r2 == r8) goto L_0x0316\n goto L_0x0325\n L_0x0316:\n r1.handleStateTransition(r10, r8, r5, r4)\n goto L_0x0325\n L_0x031a:\n r1.handleStateTransition(r10, r6, r3, r5)\n goto L_0x0325\n L_0x031e:\n int r0 = r1.handleStateTransition(r10, r8, r5, r5)\n r1.handleStateTransition(r0, r2, r5, r5)\n L_0x0325:\n return r2\n L_0x0326:\n r6 = 4\n r4 = 1\n if (r2 == r4) goto L_0x0341\n if (r2 == r6) goto L_0x0338\n if (r2 != r13) goto L_0x0332\n r17.nextElement()\n return r2\n L_0x0332:\n com.thoughtworks.xstream.io.json.AbstractJsonWriter$IllegalWriterStateException r4 = new com.thoughtworks.xstream.io.json.AbstractJsonWriter$IllegalWriterStateException\n r4.<init>(r0, r2, r3)\n throw r4\n L_0x0338:\n r4 = 0\n int r0 = r1.handleStateTransition(r0, r13, r4, r4)\n r1.handleStateTransition(r0, r6, r3, r4)\n return r2\n L_0x0341:\n int r0 = r1.mode\n r3 = 1\n r0 = r0 & r3\n if (r0 == 0) goto L_0x034a\n r0 = 2\n if (r5 <= r0) goto L_0x0352\n L_0x034a:\n int r0 = r1.mode\n r0 = r0 & r6\n if (r0 != 0) goto L_0x0352\n r17.endObject()\n L_0x0352:\n return r2\n L_0x0353:\n r6 = 4\n if (r2 != r6) goto L_0x035b\n r0 = 0\n r1.handleStateTransition(r10, r6, r3, r0) // Catch:{ Throwable -> 0x0361 }\n return r2\n L_0x035b:\n com.thoughtworks.xstream.io.json.AbstractJsonWriter$IllegalWriterStateException r4 = new com.thoughtworks.xstream.io.json.AbstractJsonWriter$IllegalWriterStateException\n r4.<init>(r0, r2, r3)\n throw r4\n L_0x0361:\n r0 = move-exception\n r2 = r0\n throw r2\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.thoughtworks.xstream.io.json.AbstractJsonWriter.handleStateTransition(int, int, java.lang.String, java.lang.String):int\");\n }", "int getFromValue();", "private void int_to_int_step( ExpressionNode nd, VMState vms ) {\n Assert.check( vms.top().at( nd ) == null ) ;\r\n \r\n // Clear the selection\r\n vms.top().setSelected( null ) ;\r\n \r\n // Get the operand value\r\n long x = getIntOperand( nd, vms, 0 ) ;\r\n \r\n // Compute the value\r\n Assert.check( op_code == IABS ) ;\r\n long value = x < 0 ? -x : x ;\r\n \r\n putIntResult(nd, vms, value ) ;\r\n }", "int getRaidLevelValue();", "@Override\n public int getMetaFromState(IBlockState state)\n {\n return state.getValue(LAYERS) - 1;\n }", "public int level();", "@Override\n public int calculateBattleValue() {\n return calculateBattleValue(false, false);\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}", "int getCurrentTurn();", "public int fight() {\r\n\t\treturn -this.randomObject.nextInt(50);\r\n\t}", "public int getGoalIndex(){\n return goalIndex;\n }", "public synchronized int getLevel(int actId) {\n/* 69 */ return this.component.getLevel(actId);\n/* */ }", "public int getValue(State state) {\n if (state.isGoal())\n return 0;\n\n int count = 1;\n int cx = state.getVariablePosition(0);\n int cy = puzzle.getFixedPosition(0);\n\n int grid[][] = state.getGrid();\n int gn = puzzle.getGridSize();\n\n for (int i = cx; i < gn; i++) {\n for (int j = 0; j < gn; j++) {\n if (grid[i][j] != -1)\n count++;\n }\n }\n\n return count;\n }", "PowerState getState();", "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 }", "private String transitionGenerate( String oldguard,String newguard,String markguard,List<Statement> statements, int previousmark,Automaton a,Map<String, Type> b,String pre ,int layer, boolean Else) throws PrismGeneratorException, ValidationException {\n String transition = \"\";\n //The lable of the current statement\n int statlable =0;\n //The lable of the current transition\n int layermark = transitionmark;\n String guard = oldguard;\n if(!newguard.isEmpty()){\n guard += (\" & \" + newguard);\n if(!markguard.isEmpty()){\n guard += ( \" & \" + markguard);\n }\n }\n\n String newpre = \"v\"+pre;\n //The define of the virtual variables used in this level\n String transitionend = pre+\"transitionend\";\n if(layer > maxlayer) {\n\n globalDeclarations += pre+\"transitionend : bool init true;\\n\";\n maxlayer = layer;\n for (Declaration var : a.getLocalVars().getDeclarationList()) {\n assert var instanceof VariableDeclaration;\n Type newtype = null;\n\n if(!(b==null)){\n\n if (b.containsKey(((VariableDeclaration) var).getType().toString())){\n newtype = b.get(((VariableDeclaration) var).getType().toString());\n }else{\n newtype = ((VariableDeclaration) var).getType();\n }\n }else{\n newtype = ((VariableDeclaration) var).getType();\n }\n String strType = typeGenerate(newtype);\n\n for (String name : var.getIdentifiers()) {\n\n switch (strType){\n case \"init\":\n Type inibasetype = ((InitType) newtype).getBaseType();\n String basestrtype = typeGenerate(inibasetype);\n switch (basestrtype){\n case \"int\":\n\n globalDeclarations += (newpre + name + \" : \"+typeGenerate(inibasetype)+\n String.format(\" init %s\",((InitType)(newtype)).getInitValue()) +\";\\n\");\n break;\n case \"[%s..%s]\":\n BoundedIntType boundedtype = (BoundedIntType) inibasetype;\n String upper = boundedtype.getUpperBound().toString();\n String lower = boundedtype.getLowerBound().toString();\n globalDeclarations +=(newpre + name + \":\"+String.format(basestrtype,lower,upper )+\n String.format(\" init %s\",((InitType)(newtype)).getInitValue()) +\";\\n\");\n break;\n case \"bool\":\n globalDeclarations +=(newpre + name + \":\"+strType+\n String.format(\" init %s\",((InitType)(newtype)).getInitValue())+\";\\n\");\n break;\n }\n break;\n case \"int\":\n\n globalDeclarations += (newpre + name + \":\"+strType+\";\\n\");\n break;\n case \"[%s..%s]\":\n BoundedIntType boundedtype = (BoundedIntType) newtype;\n String upper = boundedtype.getUpperBound().toString();\n String lower = boundedtype.getLowerBound().toString();\n globalDeclarations +=(newpre + name + \":\"+String.format(strType,lower, upper)+\";\\n\");\n\n break;\n case \"bool\":\n globalDeclarations +=(newpre + name + \":\"+strType+\";\\n\");\n\n break;\n case \"enum\":\n int i = 0;\n for(String item : ((EnumType)(newtype)).getItems()){\n globalDeclarations +=(newpre + item+String.format(\" : int init %d;\", i)+\"\\n\");\n i++;\n\n }\n globalDeclarations +=(newpre + name+\" : int;\"+\"\\n\");\n\n break;\n case \"list\":\n Type basetype = ((ListType)(newtype)).getBaseType();\n Term key = ((ListType)(newtype)).getCapacity();\n if((!(basetype instanceof IntType))||(!(basetype instanceof BoolType))||(!((key instanceof IntValue)))){\n java.lang.System.err.println(\"The type of the list is not supported.\");\n }\n if((((IntValue)((IntValue) key)).getValue()==0)){\n java.lang.System.err.println(\"The length of the list must greater than 0.\");\n }\n for(int j=0 ; j < (((IntValue)((IntValue) key)).getValue()); j++){\n globalDeclarations +=(newpre + String.format(\"%s%d\",name,j)+\" : int;\\n\");\n\n }\n break;\n }\n }\n }\n }\n\n // assign the virtual variables\n String rel = \"\";\n for (String var: variables){\n rel += ( String.format(\"(%s' = %s)&\", newpre + var, pre + var ) );\n }\n rel = (rel.substring(0, rel.length()-1));\n transition += (\"[] \" +guard +\" & \"+ String.format(\"transitionmark%d=%d\", layermark,statlable)+ \" & \" + transitionend +\" = true\"+ \" -> \" + rel +\n \"&\"+ String.format(\"(transitionmark%d' = transitionmark%d + 1)\", layermark,layermark)+\n \"&\"+\"(\"+ transitionend + \"' = false);\"+ \"\\n\");\n ++statlable;\n\n for (Statement s : statements) {\n if (s instanceof SynchronizingStatement) {\n java.lang.System.err.println(\"A sync statement is not supposed to show up when generating codes.\");\n } else if (s instanceof AssignmentStatement) {\n rel = \"\";\n\n rel += virtualtermGenerate(((AssignmentStatement) s).getTarget(), 0,newpre,b) +\"'\"+\n \" = \" + virtualtermGenerate(((AssignmentStatement) s).getExpr(), 0,newpre,b);\n transition += (\"[] \" +guard +\" & \"+ String.format(\"transitionmark%d=%d\", layermark,statlable) + \" -> \" + \"(\"+ rel +\")\" +\n \"&\"+ String.format(\"(transitionmark%d' = transitionmark%d + 1);\", layermark,layermark)+ \"\\n\");\n ++statlable;\n\n }else if(s instanceof IteStatement){\n ++transitionmark;\n globalDeclarations += String.format(\"transitionmark%d :int init 0;\\n\", transitionmark);\n String newguard_ = virtualtermGenerate(((IteStatement) s).getCondition(), 0,newpre,b);\n String markguard_ = String.format(\"transitionmark%d=%d\", layermark,statlable);\n List newstatements = ((IteStatement) s).getThenStmts();\n List elstatements = ((IteStatement) s).getElseStmts();\n if(elstatements != null){\n transition += transitionGenerate(guard,newguard_,markguard_,newstatements,layermark,a,b,newpre,layer+1,true);\n ++transitionmark;\n globalDeclarations += String.format(\"transitionmark%d :int init 0;\\n\", transitionmark);\n transition += transitionGenerate(guard,\"!(\"+newguard_+\")\",markguard_,elstatements,layermark,a,b,newpre,layer+1,true);\n ++statlable;\n }else{\n transition += transitionGenerate(guard,newguard_,markguard_,newstatements,layermark,a,b,newpre,layer+1,false);\n ++statlable;\n }\n }\n else {\n throw PrismGeneratorException.UnhandledStatement(s);\n }\n }\n\n\n int max = 0;\n for(Statement s : statements){\n ++max;\n }\n ++max;\n\n\n if(layer > 1){\n //if the IteStatement is not implemented then change the transitionmark to the max\n if(Else == false) {\n transition += (\"[] \" + oldguard + \" & \" + \"!(\" + newguard + \")\" + \" & \" + markguard + \" & \" + String.format(\"transitionmark%d=%d\", layermark, 0) + \" -> \" +\n String.format(\"(transitionmark%d' = %d);\", layermark, max) + \"\\n\");\n }\n // assign the variables\n rel = \"\";\n for (String var: variables){\n rel += ( String.format(\"(%s' = %s)&\", pre + var, newpre + var ) );\n }\n rel = (rel.substring(0, rel.length()-1));\n transition += (\"[] \" +guard +\" & \"+ String.format(\"transitionmark%d=%d\",layermark, max) + \" -> \" + rel +\n \"&\"+ String.format(\"(transitionmark%d' = transitionmark%d + 1);\", layermark,layermark)+ \"\\n\");\n ++statlable;\n\n //Prevent label duplication\n transition += (\"[] \" +markguard+ String.format(\" & transitionmark%d=%d\", layermark,max+1) + \" -> \" +\n String.format(\"(transitionmark%d' = transitionmark%d + 1)&\", previousmark,previousmark)+\n String.format(\"(transitionmark%d' = transitionmark%d + 1)\", layermark,layermark)+\n \"&\"+\"(\"+transitionend+\"' = true)\"+\";\\n\");\n }else{\n\n // assign the variables\n rel = \"\";\n for (String var: variables){\n rel += ( String.format(\"(%s' = %s)&\", pre + var, newpre + var ) );\n }\n rel = (rel.substring(0, rel.length()-1));\n transition += (\"[] \" +guard +\" & \"+ String.format(\"transitionmark%d=%d\",layermark, max) + \" -> \" + rel +\n \"&\"+ String.format(\"(transitionmark%d' = transitionmark%d + 1)\", layermark,layermark)+\n \";\\n\");\n ++statlable;\n\n //initialize all the transitionmarks we had used\n rel = \"\";\n for(int i = 0 ; i<=transitionmark;i++){\n rel += String.format(\"(transitionmark%d' = 0)\", i)+\"&\";\n }\n rel = (rel.substring(0,rel.length()-1));\n transition += (\"[] \" + String.format(\"transitionmark%d=%d\", layermark,max+1)+ \" -> \" + rel +\n \"&\"+\"(\"+transitionend+\"' = true)\"+\";\\n\");\n }\n\n return transition;\n }", "int getValue();", "int getValue();", "int getValue();", "int getValue();", "int getValue();", "int getCauseValue();", "public static int processStateToActivityState(int newState) {\r\n // The states actually have the same ordinals.\r\n return newState;\r\n }", "public int moves() {\r\n if (!isSolvable) return -1;\r\n return goal.previousMoves;\r\n }" ]
[ "0.5836413", "0.5825011", "0.5825011", "0.5825011", "0.57804114", "0.57224655", "0.55433655", "0.546735", "0.5360944", "0.5334804", "0.5257184", "0.5238542", "0.52252644", "0.52188003", "0.51997775", "0.51997775", "0.51997775", "0.51997775", "0.51997775", "0.51997775", "0.51685023", "0.5156408", "0.514735", "0.51431215", "0.51318645", "0.51073873", "0.5091875", "0.50626224", "0.5058462", "0.5049517", "0.50297457", "0.5023907", "0.5022771", "0.50174826", "0.5015647", "0.49978513", "0.4994749", "0.49786198", "0.497769", "0.49711278", "0.49707118", "0.49686903", "0.49622917", "0.49590933", "0.49567777", "0.49567777", "0.49567777", "0.49567777", "0.49559224", "0.4948051", "0.49312073", "0.49312073", "0.4929261", "0.4924482", "0.49176276", "0.49156162", "0.48690447", "0.48653263", "0.48580495", "0.48526567", "0.4851982", "0.48519063", "0.48430872", "0.4822818", "0.4822818", "0.4822818", "0.4817691", "0.48121452", "0.48093122", "0.4806024", "0.47986734", "0.47976786", "0.47809398", "0.47767183", "0.47725973", "0.47571802", "0.47567916", "0.47458464", "0.47447783", "0.47410166", "0.47297", "0.47253162", "0.4712994", "0.4711718", "0.47091275", "0.47073278", "0.47055143", "0.47045106", "0.47036895", "0.46983865", "0.46963108", "0.46957257", "0.46941155", "0.46938136", "0.46938136", "0.46938136", "0.46938136", "0.46938136", "0.46936873", "0.46879163", "0.46871334" ]
0.0
-1
============================================================ ========= LevelPack PLAYER VIEW MANAGEMENT STUFF =========== ============================================================
public World getWorld(int i) { return levels.get(i); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void makeVisible(Player viewer) {\n \n }", "public void enterPlayerView(){\n\t\tplayerSeen=true;\r\n\t\tplayerMapped=true;\r\n\t}", "void setPlayerView(View v);", "private void showPlayerOptions() {\n playStartLinearLayout.setVisibility(View.INVISIBLE);\n timeInfoLinearLayout.setVisibility(View.INVISIBLE);\n gsOpenPlayImage.setVisibility(View.VISIBLE);\n\n\n }", "private void doLayout() {\n\t\tLinearLayout.LayoutParams playerParams =\n\t\t (LinearLayout.LayoutParams) playerView.getLayoutParams();\n\t\tif (isFullScreen) {\n\t\t // When in fullscreen, the visibility of all other views than the player should be set to\n\t\t // GONE and the player should be laid out across the whole screen.\n\t\t playerParams.width = LayoutParams.MATCH_PARENT;\n\t\t playerParams.height = LayoutParams.MATCH_PARENT;\n\t\t otherViews.setVisibility(View.GONE);\n\t\t}else{\n\t\t\t\n\t\t\tif (getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) {\n\t\t playerParams.width = 0;\n\t\t playerParams.height = MATCH_PARENT;\n\t\t otherViews.setVisibility(View.VISIBLE);\n\t\t playerParams.weight = 1;\n\t\t \n\t\t }else{\n\t\t \totherViews.setVisibility(View.VISIBLE);\n\t\t \tplayerParams.width = MATCH_PARENT;\n\t\t playerParams.height = WRAP_CONTENT;\n\t\t getActionBar().show();\n\t\t }\t\t\t\n\t\t} \n\t}", "void setVisiblePlayers() {\n\n switch (team1Players) {\n\n case 6:\n\n tvt1p6.setVisibility(View.VISIBLE);\n\n spnPlayer6.setVisibility(View.VISIBLE);\n\n case 5:\n\n tvt1p5.setVisibility(View.VISIBLE);\n\n spnPlayer5.setVisibility(View.VISIBLE);\n\n case 4:\n\n tvt1p4.setVisibility(View.VISIBLE);\n\n spnPlayer4.setVisibility(View.VISIBLE);\n\n case 3:\n\n tvt1p3.setVisibility(View.VISIBLE);\n\n spnPlayer3.setVisibility(View.VISIBLE);\n\n case 2:\n\n tvt1p2.setVisibility(View.VISIBLE);\n\n spnPlayer2.setVisibility(View.VISIBLE);\n\n case 1:\n\n tvt1p1.setVisibility(View.VISIBLE);\n\n spnPlayer1.setVisibility(View.VISIBLE);\n\n break;\n\n }\n\n }", "private void viewPlayer(Command command)\n { if(!command.hasSecondWord()) { \n // if there is no second word, we don't know where to go... \n Logger.Log(\"What do you want to view?\"); \n return; \n } \n \n String thingToView = command.getSecondWord();\n String inventory = \"inventory\";\n String companions = \"companions\";\n \n if (!thingToView.equals(inventory)&&!thingToView.equals(companions)){\n Logger.Log(\"You can only view your inventory or your current companions\");\n }\n else if (thingToView.equals(inventory)&&!player.inventory.isEmpty()) {\n Logger.Log(\"~*\" + player.playerName + \"'s Backpack *~\");\n player.viewInventory();\n Logger.Log(\"~*~*~*~*~*~\");\n }\n else if (thingToView.equals(inventory)&&player.inventory.isEmpty()){\n Logger.Log(\"There is nothing in your backpack...\");\n }\n else if (thingToView.equals(companions)&&!player.friends.isEmpty()) {\n Logger.Log(\"~*\" + player.playerName + \"'s Companions *~\");\n player.viewCompanions();\n Logger.Log(\"~*~*~*~*~*~\");\n }\n else if (thingToView.equals(companions)&&player.friends.isEmpty()) {\n Logger.Log(\"You don't have any companions at the moment :(\");\n }\n \n \n }", "public void singlePlayerChosen(){\n DifficultyViewController dif = new DifficultyViewController(this);\n dif.showView();\n this.hideView();\n }", "private void setupPlayerControls() {\n ExtendableScene currScene = SceneManager.getSceneParent();\n\n // Controls for the player\n // Delegated to player controller\n currScene.setOnKeyPressed(PlayerController.get()::onKeyPressed);\n currScene.setOnKeyReleased(PlayerController.get()::onKeyReleased);\n\n // All mouse movement events (for turret rotation)\n view.getPane().setOnMouseMoved(view::changeMouseEvent);\n view.getPane().setOnMouseDragged(view::changeMouseEvent);\n\n // Setup player shooting\n view.getPane().setOnMousePressed(view::createBullet);\n }", "public PlayerView2() {\n initComponents();\n }", "private void setupPlayerUI() {\r\n // for now hide the player\r\n setPlayerVisible(false);\r\n\r\n // disable unnecesary buttons\r\n setButtonEnabled(mButtonPlayerSeekBackward, false);\r\n setButtonEnabled(mButtonPlayerSeekForward, false);\r\n setButtonEnabled(mButtonPlayerSkipBackward, false);\r\n\r\n setButtonEnabled(mButtonPlayerRepeat, false);\r\n }", "public PlayerView getPlayerView() {\n return playerView;\n }", "private void initPlayModeView() {\n playMode = new Label(\"PLAY\");\n playMode.setPrefSize(200,100);\n playMode.setFont(Font.font(null, FontWeight.BOLD, 30));\n playMode.setTextFill(Color.BLUE);\n playMode.setEffect(getDropShadow());\n }", "private void showPlayerButtons() {\n\n\t\tprevious.setVisibility(View.VISIBLE);\n\t\tplay.setVisibility(View.VISIBLE);\n\t\tnext.setVisibility(View.VISIBLE);\n\t}", "private void displayPlayers() {\n\t\tfor (Player p: game.getPlayers()) {\n\t\t\tview.updateDisplay(p.getId(), p.getDeck().getNumberOfCards());\n\t\t}\n\t}", "public void updatePlayerPanel()\n {\n playerInfoPanel.updateLabel();\n }", "private void displayPlayerMenu () {\n System.out.println();\n System.out.println(\"Player Selection Menu:\");\n System.out.println(\n \"Timid player...........\" + TIMID);\n System.out.println(\n \"Greedy player..........\" + GREEDY);\n System.out.println(\n \"Clever player..........\" + CLEVER);\n System.out.println(\n \"Interactive player.....\" + INTERACTIVE);\n }", "private void getViewComponents() {\n _gameView = (GameView) findViewById(R.id.game_cv_gameview);\n _levelView = (TextView) findViewById(R.id.game_tv_curlevel);\n _scoreView = (TextView) findViewById(R.id.game_tv_curscore);\n _startBtn = (Button) findViewById(R.id.game_btn_start);\n _gestureOverlay = (GestureOverlayView) findViewById(R.id.game_gov_gestures);\n\n }", "private void setInfoPlayers() {\n\n\t\t//PLAYER 1\n\t\tlblPlayer1name.setText(players.get(0).getName());\n\t\tlblCashP1.setText(\"\" + players.get(0).getMoney());\n\t\tlblBuildP1.setText(\"\" + players.get(0).getNumberBuildings());\n\t\tlblPropP1.setText(\"\" + players.get(0).getOwnproperties().size());\n\t\tlblPosP1.setText(\"\"+ players.get(0).getPosition());\n\n\t\t//PLAYER 2\n\t\tlblPlayer2name.setText(players.get(1).getName());\n\t\tlblCashP2.setText(\"\" + players.get(1).getMoney());\n\t\tlblBuildP2.setText(\"\" + players.get(1).getNumberBuildings());\n\t\tlblPropP2.setText(\"\" + players.get(1).getOwnproperties().size());\n\t\tlblPosP2.setText(\"\"+ players.get(1).getPosition());\n\t\t\n\t\tif(players.size() > 2){\n\t\t\t//PLAYER 3\n\t\t\tlblPlayerName3.setText(players.get(2).getName());\n\t\t\tlblCashP3.setText(\"\" + players.get(2).getMoney());\n\t\t\tlblBuildP3.setText(\"\" + players.get(2).getNumberBuildings());\n\t\t\tlblPropP3.setText(\"\" + players.get(2).getOwnproperties().size());\n\t\t\tlblPosP3.setText(\"\"+ players.get(2).getPosition());\n\n\t\t\tif(players.size() > 3){\n\t\t\t\t//PLAYER 4\n\t\t\t\tlblPlayerName4.setText(players.get(3).getName());\n\t\t\t\tlblCashP4.setText(\"\" + players.get(3).getMoney());\n\t\t\t\tlblBuildP4.setText(\"\" + players.get(3).getNumberBuildings());\n\t\t\t\tlblPropP4.setText(\"\" + players.get(3).getOwnproperties().size());\n\t\t\t\tlblPosP4.setText(\"\"+ players.get(3).getPosition());\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public void addPlayerData() {\n\t\tStackPane root = (StackPane) GameLogic.getRoot();\n\t\t//VBox info = new VBox();\n\t\t//info.setAlignment(Pos.TOP_LEFT);\n\t\tLabel playerInfo = new Label();\n\t\tplayerInfo.setBackground(new Background(new BackgroundFill(Color.LIGHTGOLDENRODYELLOW, CornerRadii.EMPTY, Insets.EMPTY)));\n\t\t//playerInfo.setGraphic(new ImageView(BackgroundImageHolder.textBackground));\n\t\tplayerInfo.setText(\" Player :\"+GameSaved.getPlayer_name()+\"\\n Level : \"+GameSaved.getPlayer_level()+\"\\n Experience point : \"+GameSaved.getExperiencePoint()+\"/\"+GameSaved.getExperiencePoint_Max()+\" \");\n\t\t//playerInfo.setAlignment(Pos.TOP_LEFT);\n\t\t//info.getChildren().add(playerInfo);\n\t\troot.getChildren().add(playerInfo);\n\t\tStackPane.setAlignment(playerInfo,Pos.TOP_LEFT);\n\t}", "private void initPlayerUI() {\n if (playableMediaItem instanceof Podcast) {\n tvPlayerTitle.setText(((Podcast) playableMediaItem).getSelectedTrack().getTitle().trim());\n } else {\n tvPlayerTitle.setText(playableMediaItem.getName().trim());\n }\n tvPlayserSubtitle.setText(playableMediaItem.getSubHeader().trim());\n if (playableMediaItem.getCoverImageUrl() == null) {\n final LetterBitmap letterBitmap = new LetterBitmap(getActivity());\n Bitmap letterTile = letterBitmap.getLetterTile(playableMediaItem.getName(), playableMediaItem.getName(), COVER_IMAGE_SIZE, COVER_IMAGE_SIZE);\n imgPlayerCover.setImageBitmap(letterTile);\n int dominantColor = UIHelper.getDominantColor(letterTile);\n rlTopSectionBckg.setBackgroundColor(dominantColor);\n } else {\n Glide.with(getActivity()).load(playableMediaItem.getCoverImageUrl()).crossFade().into(new GlideDrawableImageViewTarget(imgPlayerCover) {\n @Override\n public void onResourceReady(GlideDrawable drawable, GlideAnimation anim) {\n super.onResourceReady(drawable, anim);\n Bitmap bitmap = ((GlideBitmapDrawable) drawable).getBitmap();\n int dominantColor = UIHelper.getDominantColor(bitmap);\n rlTopSectionBckg.setBackgroundColor(dominantColor);\n }\n });\n }\n if (playableMediaItem instanceof Podcast) {\n Track selectedTrack = ((Podcast) playableMediaItem).getSelectedTrack();\n tvTrackDuration.setText(selectedTrack.getDuration());\n sbPlayerProgress.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {\n @Override\n public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {\n\n }\n\n @Override\n public void onStartTrackingTouch(SeekBar seekBar) {\n isChangingProgress = true;\n }\n\n @Override\n public void onStopTrackingTouch(SeekBar seekBar) {\n isChangingProgress = false;\n int progress = seekBar.getProgress();\n int position = (int) ((maxDuration * progress) / 100);\n seekBar.setProgress(progress);\n universalPlayer.seekTo(position);\n }\n });\n }\n if (playableMediaItem instanceof RadioItem) {\n sbPlayerProgress.setOnTouchListener(new View.OnTouchListener() {\n @Override\n public boolean onTouch(View v, MotionEvent event) {\n return true;\n }\n });\n }\n\n //playableMediaItem.syncWithDB();\n if (playableMediaItem.isSubscribed) {\n itemFavorites.setIcon(getResources().getDrawable(R.drawable.ic_heart_black_24dp));\n } else {\n itemFavorites.setIcon(getResources().getDrawable(R.drawable.ic_heart_white_24dp));\n }\n }", "public void attachPlayerView() {\n simpleExoPlayerView.setPlayer(player);\n }", "void showUI(Player player) {\n\t\tString title = (this.range!=-1 ? \"BCL:\"+this.getOwnerName()+\"@\"+this.getLoc() : \"New \"+(this.isAdminChunkLoader()?\"Admin \":\"\")+\"BetterChunkLoader\");\n\t\tif (title.length()>32) {\n\t\t\ttitle=title.substring(0, 32);\n\t\t}\n\t\tInventory inventory = Bukkit.createInventory(this, 9, title);\n\n\t\taddInventoryOption(inventory, 0, Material.REDSTONE_TORCH_ON, \"Remove\");\n\t\t\n\t\tfor (byte i=0; i<5; i++) {\n\t\t\taddInventoryOption(inventory, i+2, Material.MAP, \"Size \"+this.sizeX(i)+(this.getRange()==i?\" [selected]\":\"\"));\n\t\t}\n\t\t\n\t\tplayer.openInventory(inventory);\n\t}", "private void setInfoPanel()\r\n {\r\n //set up info panel\r\n unitPanel.setPlayer(worldPanel.getCurrentPlayer());\r\n\t\t\t\tunitPanel.setYear(year);\r\n int tempUnit = worldPanel.getCurrentUnit();\r\n\r\n if(worldPanel.getCurrentPlayer() == 1)\r\n {\r\n unitPanel.setImageIcon(worldPanel.player1.units[tempUnit - 1].getImage());\r\n unitPanel.setAttack(worldPanel.player1.units[tempUnit - 1].getAttack());\r\n unitPanel.setDefence(worldPanel.player1.units[tempUnit - 1].getDefence());\r\n unitPanel.setMovement(worldPanel.player1.units[tempUnit - 1].getMovementsLeft());\r\n }\r\n else\r\n {\r\n unitPanel.setImageIcon(worldPanel.player2.units[tempUnit - 1].getImage());\r\n unitPanel.setAttack(worldPanel.player2.units[tempUnit - 1].getAttack());\r\n unitPanel.setDefence(worldPanel.player2.units[tempUnit - 1].getDefence());\r\n unitPanel.setMovement(worldPanel.player2.units[tempUnit - 1].getMovementsLeft());\r\n }\r\n }", "public YahtzeeView(){\n setLayout(null);\n cardLayout_Action = new CardLayout();\n gameCon_Layout = new FixSizeCardLayout();\n //panel used to house the cardLayout manager.\n mainBackGroundPanel = new MainSlot_JPanel();\n mainBackGroundPanel.setLayout(null);\n \n mainActionPanel = new JPanel(cardLayout_Action); \n mainActionPanel.setBounds(100, 48, 600, 434);\n gameControlPanel = new JPanel(gameCon_Layout);\n gameControlPanel.setBounds(120, 510, 540, 50);\n \n mainBackGroundPanel.add(mainActionPanel);\n mainBackGroundPanel.add(gameControlPanel);\n\n gameControlPanel.add(emptyGameControllerView(),\n \"Player-1GameController\");\n gameControlPanel.setOpaque(false);\n \n mainBackGroundPanel.setBounds(0,0,800,600);\n \n add(mainBackGroundPanel);\n setVisible(true);\n \n currentPage_ActionPanel = \"\";\n currentPage_ControlPanel = \"\";\n }", "List<Player> getViewers();", "private void changeView(){\r\n\t\t\tm.changeView(Views.GAME, gameType, game);\r\n\t}", "public void initUI(){\n\n playerSprite = new PlayerSprite(context, 150 * MainView.SCALE_WIDTH, background.getBottom(), 0.3f * MainView.SCALE_WIDTH, 0.30f * MainView.SCALE_WIDTH);\n enemySprite = new EnemySprite(context, (MainView.WIDTH - 150) * MainView.SCALE_WIDTH, background.getBottom(), 0.3f * MainView.SCALE_WIDTH, 0.30f * MainView.SCALE_WIDTH);\n if(encountered)\n enemySprite.setEnemySprite(enemy.getId());\n\n /*\n create header here\n */\n playerStatus = new PlayerStatus(context,player, 0, background.getBottom());\n }", "public void setPlayerView(PlayerView playerView) {\n this.playerView = playerView;\n }", "View(Stage stage, Model model,Player player) {\n this.model = model;\n this.stage = stage;\n battleRoot = new BattleRoot(SCREEN_SIZE_X, SCREEN_SIZE_Y,player);\n playingScene = new Scene(battleRoot);\n this.stage.setScene(this.playingScene);\n// battleRoot.getChildren().addAll(textFieldRoot, enemysPlayFieldRoot, playFieldRoot, handCommand);\n }", "public void playerView(View view) {\n PlayerCapabilityFacade pcf = new PlayerCapabilityFacade();\n Intent intent;\n if(pcf.isTournamentActive()) {\n intent = new Intent(ModeSelectionActivity.this, PlayerTourneyActivity.class);\n } else {\n intent = new Intent(ModeSelectionActivity.this, PlayerTotalsActivity.class);\n }\n\n startActivity(intent);\n\n //else onclick go to PlayerTourneyActivity\n }", "private void loadPlayerPanel(Player player) {\n\t\tCustomButton nullButton = new CustomButton() {\n\t\t\tprivate static final long serialVersionUID = 1L;\n\t\t\tpublic void buttonPressed() {}\n\t\t};\n\t\tnullButton.setVisible(false);\n\t\t\n\t\tLinkedList<Card> cards = new LinkedList<Card>();\n\t\tcards.addAll(player.getAllItems());\n\t\tMultiSelectCardPanel playerPanel = new MultiSelectCardPanel(cards, 3, nullButton, null) {\n\t\t\tprivate static final long serialVersionUID = 1L;\n\t\t\tpublic void setCheckedInfoText() {}\n\t\t};\n\t\tplayerPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createLineBorder(Color.BLACK), player.getName()));\n\t\t\n\t\tif (player == initiator) {\n\t\t\tif (initiatorPanel != null)\n\t\t\t\tgetContentPane().remove(initiatorPanel);\n\t\t\t\n\t\t\tc.gridx = 0;\n\t\t\tinitiatorPanel = playerPanel;\n\t\t}\n\t\telse {\n\t\t\tif (otherPlayerPanel != null)\n\t\t\t\tgetContentPane().remove(otherPlayerPanel);\n\t\t\t\n\t\t\tc.gridx = 2;\n\t\t\totherPlayerPanel = playerPanel;\n\t\t}\n\t\t\n\t\tc.gridheight = 3;\n\t\tc.gridy = 0;\n\t\tgetContentPane().add(playerPanel, c);\n\t\trefresh();\n\t\tc.gridheight = 1;\n\t}", "private void customUpdateView() {\n\t\tpbrLoading.setVisibility(View.GONE);\n\t\tif (isPlaying()) {\n\t\t\tgifVoiceLoader.setVisibility(View.VISIBLE);\n\t\t\timgPlay.setVisibility(View.GONE);\n\t\t} else {\n\t\t\tgifVoiceLoader.setVisibility(View.GONE);\n\t\t\timgPlay.setVisibility(View.VISIBLE);\n\t\t}\n\t\timgPlay.setImageResource(getPlayImageResId());\n\t\tgifVoiceLoader.setGifImageResourceID(getVoiceLoderGif());\n\t\ttxtButtonCaption.setText(getText());\n\n\t}", "private static void showPlayerDeckInfo() {\n }", "@Override\n public void showPlayerWon() {\n if (isEnglish) {\n Toast.makeText(this, WIN, Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(this, WIN_CHINESE, Toast.LENGTH_SHORT).show();\n }\n\n\n //Set visibility for replayButton to visible\n replayButton.setVisibility(View.VISIBLE);\n retryButton.setVisibility(View.VISIBLE);\n scoreboardButton.setVisibility(View.VISIBLE);\n }", "@Override\n public void show() {\n batch = new SpriteBatch();\n stage = createStage();\n\n // create overlays\n hud = new GigagalHUD();\n victoryOverlay = new VictoryOverlay();\n gameoverOverlay = new GameOverOverlay();\n\n // determine input processor\n useOnScreenControl = (Gdx.app.getType() == Application.ApplicationType.Android // on mobile\n || Configs.instance.isDebugOnScreenControlEnabled() // or debugging\n );\n\n if (useOnScreenControl) {\n onscreenControl = new OnscreenControl();\n gameInputProcessor = new TouchProcessor(onscreenControl);\n } else {\n gameInputProcessor = new KeyPressProcessor();\n }\n\n Gdx.input.setInputProcessor(gameInputProcessor);\n\n // load new level\n startNewLevel();\n }", "private void setupPlayer() {\n\n\n\n Video video = createVideoFromUrl(\"https://sonyhdslive-lh.akamaihd.net/i/LIVELINEARCHANNELWAHSD_2@324771/index_100_av-p.m3u8?sd=10&rebase=on&id=AgC2SfL6YBG2JpMHMVl8BkTC0SpVbBy%2frYkaeUHMRu8inYQ3DHLx4I+pRLNhOPyxeLBTSrs2hL4lZw%3d%3d&hdntl=exp=1496471827~acl=%2fi%2f*~data=hdntl~hmac=808df26a60cb28eff4d28a242510d2dba361d9d8658f1e3bbe3090f85e633632\");\n brightcoveVideoView.add(video);\n brightcoveVideoView.start();\n// ImaManager.setupIma(brightcoveVideoView, googleAds);\n\n }", "public Connect4View() {\n\t\tgame = new TilePane();\n\t\tcontroller = new SingleController(game);\n\t\tcontroller.getModel().addObserver(this);\n\t\tgameFinished = false;\n\t}", "public void mo71540w() {\n boolean z;\n VideoItemParams requestId = VideoItemParams.newBuilder().setFragment(this.f73947d).setAweme(this.f73950g).setAwemeFromPage(this.f73953m).setEventType(this.f73944a).setMyProfile(this.f73946c).setPageType(this.f73954n).setEnterMethodValue(this.f74254j).setRequestId(this.f73952l);\n if (this.f74252h != null) {\n this.f74252h.mo60134a(\"video_params\", (Object) requestId);\n }\n mo71773u();\n User author = this.f73950g.getAuthor();\n if (author != null) {\n this.mTitleView.setText(this.f73949f.getString(R.string.b5s, new Object[]{author.getNickname()}));\n this.mTitleView.getPaint().setFakeBoldText(true);\n } else {\n this.mTitleView.setText(\"\");\n }\n if (this.f73950g == null || this.f73950g.isCanPlay()) {\n this.mTitleView.setVisibility(0);\n } else {\n this.mTitleView.setVisibility(4);\n }\n this.tagLayout.setEventType(this.f73944a);\n List videoLabels = this.f73950g.getVideoLabels();\n m91744a(videoLabels);\n if (!RelationLabelHelper.hasDuoShanLabel(this.f73950g)) {\n if (C6319n.m19594a(this.f73944a, \"homepage_hot\")) {\n this.tagLayout.mo61051c(this.f73950g, videoLabels, new C23440a(7, 20));\n } else {\n this.tagLayout.mo61050b(this.f73950g, videoLabels, new C23440a(7, 20));\n }\n }\n if (TextUtils.isEmpty(this.f73950g.getExtra()) || !C6399b.m19928c()) {\n this.mTxtExtra.setVisibility(8);\n } else {\n this.mTxtExtra.setText(this.f73950g.getExtra());\n this.mTxtExtra.setVisibility(0);\n }\n if (this.f73950g.getUserDigg() == 1) {\n z = true;\n } else {\n z = false;\n }\n mo71770a(z);\n if (this.f73953m == 1) {\n mo71533d(m91740N());\n }\n AwemeStatus status = this.f73950g.getStatus();\n if (status == null) {\n this.mAwemeInCheckLayout.setVisibility(8);\n } else if (status.isInReviewing()) {\n this.mAwemeInCheckLayout.setVisibility(0);\n } else {\n this.mAwemeInCheckLayout.setVisibility(8);\n }\n }", "public void showView(){\n this.addObserver(GameView.GameViewNewGame(this));\n }", "private void initPlayersTab() throws IOException {\n // THESE ARE THE CONTROLS FOR THE BASIC SCHEDULE PAGE HEADER INFO\n // WE'LL ARRANGE THEM IN A VBox\n playerTab = new Tab();\n playerWorkspacePane = new VBox();\n playerWorkspacePane.getStyleClass().add(CLASS_DRAFT_PANE);\n \n // PAGE LABEL & BUTTON\n Label playersHeading = new Label();\n playersHeading = initChildLabel(playerWorkspacePane, DraftKit_PropertyType.PLAYER_HEADING_LABEL, CLASS_HEADING_LABEL);\n \n PropertiesManager props = PropertiesManager.getPropertiesManager();\n String imagePath = \"file:\" + PATH_IMAGES + props.getProperty(DraftKit_PropertyType.PLAYER_ICON);\n Image buttonImage = new Image(imagePath);\n playerTab.setGraphic(new ImageView(buttonImage));\n \n // SEARCH AREA\n HBox search = new HBox();\n addPlayer = initHBoxButton(search, DraftKit_PropertyType.ADD_ICON, DraftKit_PropertyType.ADD_PLAYER_TOOLTIP, false);\n removePlayer = initHBoxButton(search, DraftKit_PropertyType.MINUS_ICON, DraftKit_PropertyType.REMOVE_PLAYER_TOOLTIP, false);\n initHBoxLabel(search, DraftKit_PropertyType.SEARCH_LABEL, CLASS_PROMPT_LABEL);\n searchText = initHBoxTextField(search, \"\", true);\n \n // RADIO BUTTONS AREA FUNESS\n group = new ToggleGroup();\n all = new RadioButton(\"All\");\n all.setToggleGroup(group);\n c = new RadioButton(\"C\");\n c.setToggleGroup(group);\n oneB = new RadioButton(\"1B\");\n oneB.setToggleGroup(group);\n ci = new RadioButton(\"CI\");\n ci.setToggleGroup(group);\n threeB = new RadioButton(\"3B\");\n threeB.setToggleGroup(group);\n twoB = new RadioButton(\"2B\");\n twoB.setToggleGroup(group);\n mi = new RadioButton(\"MI\");\n mi.setToggleGroup(group);\n ss = new RadioButton(\"SS\");\n ss.setToggleGroup(group);\n of = new RadioButton(\"OF\");\n of.setToggleGroup(group);\n u = new RadioButton(\"U\");\n u.setToggleGroup(group);\n p = new RadioButton(\"P\");\n p.setToggleGroup(group);\n \n ToolBar radioTool = new ToolBar(\n all, c, oneB, ci, threeB, twoB, mi, ss, of, u, p\n );\n \n // CREATE TABLE FOR PLAYER PAGE\n playerTable = new TableView<>();\n \n first = new TableColumn<>(\"First\");\n first.setCellValueFactory(new PropertyValueFactory<>(\"FirstName\"));\n last = new TableColumn<>(\"Last\");\n last.setCellValueFactory(new PropertyValueFactory<>(\"LastName\"));\n proTeam = new TableColumn<>(\"Pro Team\");\n proTeam.setCellValueFactory(new PropertyValueFactory<>(\"MLBTeam\"));\n positions = new TableColumn<>(\"Positions\");\n positions.setCellValueFactory(new PropertyValueFactory<>(\"position\"));\n yob = new TableColumn<>(\"Year of Birth\");\n yob.setCellValueFactory(new PropertyValueFactory<>(\"YearOfBirth\"));\n rw = new TableColumn<>(\"R/W\");\n rw.setCellValueFactory(new PropertyValueFactory<>(\"RW\"));\n hrsv = new TableColumn<>(\"HR/SV\");\n hrsv.setCellValueFactory(new PropertyValueFactory<>(\"HRSV\"));\n rbik = new TableColumn<>(\"RBI/K\");\n rbik.setCellValueFactory(new PropertyValueFactory<>(\"RBIK\"));\n sbera = new TableColumn<>(\"SB/ERA\");\n sbera.setCellValueFactory(new PropertyValueFactory<>(\"SBERA\"));\n bawhip = new TableColumn<>(\"BA/WHIP\");\n bawhip.setCellValueFactory(new PropertyValueFactory<>(\"BAWHIP\"));\n estimatedValue = new TableColumn<>(\"Estimated Value\");\n estimatedValue.setCellValueFactory(new PropertyValueFactory<>(\"EValue\"));\n // MAKE SURE TO CHANGE ESTIMATED VALUE TO MATCH GETTERS/ SETTERS\n notes = new TableColumn<>(\"Notes\");\n notes.setCellValueFactory(new PropertyValueFactory<>(\"notes\"));\n notes.setCellFactory(TextFieldTableCell.forTableColumn());\n playerTable.setEditable(true);\n notes.setOnEditCommit((CellEditEvent<Player, String> event) -> {\n ((Player) event.getTableView().getItems().get(event.getTablePosition().getRow())).setNotes(event.getNewValue());\n });\n \n // ADD ALL THE COLUMNS TO THE TABLE\n playerTable.getColumns().setAll(first, last, proTeam, positions, yob, rw, hrsv, rbik, sbera, bawhip, estimatedValue, notes);\n \n // SET TOOLTIP\n Tooltip t = new Tooltip(\"Available Players Page\");\n playerTab.setTooltip(t);\n \n // PUT IN TAB PANE\n playerWorkspacePane.getChildren().add(search);\n playerWorkspacePane.getChildren().add(radioTool);\n playerWorkspacePane.getChildren().add(playerTable);\n playerTab.setContent(playerWorkspacePane);\n mainWorkspacePane.getTabs().add(playerTab);\n \n playerTable = resetTable(dataManager.getDraft().getPlayerPool());\n }", "private void updateView() {\n\t\tpbrLoading.setVisibility(View.GONE);\n\t\tif (isPlaying()) {\n\t\t\tgifVoiceLoader.setVisibility(View.VISIBLE);\n\t\t\timgPlay.setVisibility(View.GONE);\n\t\t} else {\n\t\t\tgifVoiceLoader.setVisibility(View.GONE);\n\t\t\timgPlay.setVisibility(View.VISIBLE);\n\t\t}\n\t\timgPlay.setImageResource(getPlayImageResId());\n\t\tgifVoiceLoader.setGifImageResourceID(getVoiceLoderGif());\n\t\ttxtButtonCaption.setText(getText() + \" s\");\n\n\t}", "public Game() {\r\n \r\n level = 1;\r\n \r\n enemyCount = 15;\r\n \r\n // world\r\n world = new Level1();\r\n \r\n world.populate(this);\r\n \r\n // view\r\n view = new MyView(world, this, 1000, 650);\r\n\r\n view.setGridResolution(1);\r\n\r\n // mouse controls\r\n view.addMouseListener(new MouseHandler(view, world.getPlayer()));\r\n \r\n\r\n // display the view in a frame\r\n JFrame frame = new JFrame(\"Multi-Level game\");\r\n\r\n // quit the application when the game window is closed\r\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n frame.setLocationByPlatform(true);\r\n // display the world in the window\r\n frame.add(view);\r\n controlPanel = new ControlPanel(world, this);\r\n frame.add(controlPanel, BorderLayout.WEST);\r\n // don't let the game window be resized\r\n frame.setResizable(false);\r\n // size the game window to fit the world view\r\n frame.pack();\r\n // make the window visible\r\n frame.setVisible(true);\r\n \r\n keyHandler = new KeyHandler(world.getPlayer());\r\n // key controls\r\n frame.addKeyListener(keyHandler);\r\n \r\n // give keyboard focus to the frame whenever the mouse enters the view\r\n view.addMouseListener(new GiveFocus(frame));\r\n \r\n // Invincibility\r\n if(world.getPlayer().getInivincibility() == true) {\r\n world.getPlayer().removeAllCollisionListeners();\r\n } \r\n\r\n // Debugging view\r\n // JFrame debugView = new DebugViewer(gameWorld, 1000, 650);\r\n \r\n // background sound\r\n audioManager = new AudioManager();\r\n levelMusic = audioManager.getLevel1Sound();\r\n levelMusic.loop();\r\n \r\n // start!\r\n world.start();\r\n \r\n }", "public void updateViews() {\n\t\tif (App.isInitialized() && App.getPlayer().isPlaying()) {\r\n\t\t\tactionButton.setImageResource(R.drawable.ic_media_pause);\r\n\t\t} else {\r\n\t\t\tactionButton.setImageResource(R.drawable.ic_media_play);\r\n\t\t}\r\n\t\t\r\n\t\t// Update the seek text\r\n\t\tint seek = App.getPlayer().getSeek();\r\n\t\tint duration = App.getPlayer().getDuration();\r\n\t\tseekText.setText(Utilities.formatTime(seek));\r\n\t\tdurationText.setText(Utilities.formatTime(duration));\r\n\t\t\r\n\t\t// Update the seek progress\r\n\t\tseekBar.setMax(duration);\r\n\t\tif (autoUpdateSeek) {\r\n\t\t\tseekBar.setProgress(seek);\r\n\t\t}\r\n\t}", "public static void viewLeaderBoard()\n\t{\n\t}", "@Override\n\tpublic void listMVP(View view) \n\t{\n\t\tIntent intent = new Intent(this, PlayerRatingPlayerListView.class);\n\t\tintent.putExtra(MainActivity.EXTRA_STATS_TYPE, new MVPListViewAdapter() );\n\t\tthis.startActivity(intent);\n\t}", "private void createTopPanel(){\n computerPaquetView = new ViewDeckVisible(true);\n this.getContentPane().add(computerPaquetView);\n }", "public void onFinishInflate() {\n super.onFinishInflate();\n this.o = getResources().getDimensionPixelSize(R.dimen.view_dimen_1000);\n this.p = getResources().getDimensionPixelSize(R.dimen.view_dimen_561);\n this.f5336c = (TextView) findViewById(R.id.title);\n this.f5337d = (TextView) findViewById(R.id.video_repeat);\n this.e = (RelativeLayout) findViewById(R.id.video_container);\n this.f = (ImageView) findViewById(R.id.banner);\n this.i = (ShowTextCountTextView) findViewById(R.id.content);\n this.m = (ImageView) findViewById(R.id.sounds_btn);\n this.i.setTexColor(getResources().getColor(R.color.color_black_trans_40));\n this.j = (DataNetVideoPlayBtn) findViewById(R.id.video_play_btn);\n this.n = (RelativeLayout) findViewById(R.id.jump_view);\n this.r = (PlayerView) findViewById(R.id.player_view);\n this.r.setControllerVisibilityListener(this);\n this.r.requestFocus();\n if (Build.VERSION.SDK_INT < 26) {\n ((SurfaceView) this.r.getVideoSurfaceView()).getHolder().setFormat(-3);\n }\n this.j.setOnClickListener(this);\n this.m.setOnClickListener(this);\n this.i.setOnClickListener(this);\n this.n.setOnClickListener(this);\n this.f5337d.setOnClickListener(this);\n this.s = a(true);\n this.v = new DefaultTrackSelector.ParametersBuilder().build();\n this.l = (ImageView) findViewById(R.id.loading);\n this.k = ObjectAnimator.ofFloat(this.l, AnimatedProperty.PROPERTY_NAME_ROTATION, new float[]{0.0f, 719.0f});\n this.k.setDuration(3000);\n this.k.setRepeatCount(-1);\n this.k.setInterpolator(new LinearInterpolator());\n }", "public interface View {\n /**\n * Prints that Client lost the connection to Server and quits the application\n */\n void serverLostConnection();\n\n /**\n * Asks User for Server's IP address and Port\n */\n void askServerInfo();\n\n /**\n * Asks User for setting up a Username\n */\n void askUsername();\n\n /**\n * Asks user for Game modality: single player, create a multi player lobby or join to a lobby\n */\n void askMenu();\n\n /**Prints to the lobby members that a Player joined it\n * @param username the new Joiner's username\n */\n void notifyPlayerJoined(String username);\n\n /**\n * runs the waitStartGameString() method\n */\n void askStartGame();\n\n /**\n * Wait for Lobby Owner digit \"START\"/\"start\" and then calls LightController method to start the MultiPlayer Game\n */\n void waitStartGameString();\n\n /**\n * Notifies the Lobby Owner that Server successfully created the Lobby\n */\n void showCreatorWaitingRoom();\n\n /**Notifies the User that successfully joined to the Lobby and prints the list of members\n * @param usernames the Lobby Member's username ArrayList\n */\n void showWaitingRoom(ArrayList<String> usernames);\n\n /**\n * Shows to disconnected User that LightController is trying to reconnect to Server\n */\n void showReconnectionToGame();\n\n /**\n * Shows to User to wait it's turn in a Multi Player Game session\n */\n void waitingForMyTurn();\n\n /**Prints the available Lobby list in Server with their relatives ID\n * @param lobbies a Lobby ArrayList\n */\n void askLobbyID(ArrayList<Lobby> lobbies);\n\n /**Notifies to all others Users that a Player is disconnected\n * @param username the disconnected Player's username\n */\n void notifyPlayerDisconnected(String username);\n\n /**Notifies to all others Users that a Player is reconnected\n * @param username the reconnected Player's username\n */\n void notifyPlayerReconnected(String username);\n\n /**Notifies to all others Users that the Lobby Creator is disconnected\n */\n void notifyCreatorDisconnected();\n\n /**Asks to User to choose 2 of 4 LightLeaderCard received by LightController\n * and eventually 0 to 2 LightResources\n * @param quartet the 4-length LightLeaderCards ArrayList\n * @param numResources the number of Resources user has to choose\n * @param faithPoints true if User's Player has earned a FaithPoint\n */\n void askStartItems(ArrayList<LightLeaderCard> quartet, int numResources, boolean faithPoints);\n\n /**Asks User to do an action in the turn\n */\n void askTurn();\n\n /**\n * Prints the menu to calls LightController method to ask for a LeaderCard activation\n */\n void askLeaderCardActivation();\n\n /**\n * Prints the menu to calls LightController method to ask for a LeaderCard threw\n */\n void askLeaderCardThrowing();\n\n /**\n * Prints the menu to calls LightController method to ask for a Resources purchase at the Market\n */\n void askBuyResources();\n\n /**\n * Prints the menu to calls LightController method to ask for a DevelopmentCard purchase at the Market\n */\n void askBuyDevCards();\n\n /**\n * Prints the menu to calls LightController method to ask for a DevelopmentCard production\n */\n void askDevCardProduction();\n\n /**\n * Prints the menu to calls LightController method to ask for a DevelopmentBoard production\n */\n void askDefaultProduction();\n\n /**\n * Calls the LightController method to end the turn\n */\n void askEndTurn();\n\n /**Notifies the User of the Resources list purchased from the Market that were not added to Warehouse\n * @param threwResources a LightResource ArrayList\n */\n void showThrewResources(ArrayList<LightResource> threwResources);\n\n /**Shows an error message\n * @param message a String containing the message\n */\n void showError(String message);\n\n /**Shows a success message\n * @param message a String containing the message\n */\n void showSuccess(String message);\n\n /**Shows the Multi Player Game session winner, the final rank and quits the application\n * @param winner the winner Player's username\n * @param rank a String containing the final rank\n */\n void showRanking(String winner, String rank);\n\n /**Shows the final message in Single Player session and quit the application\n * @param message a String containing if the User won against Lorenzo or not\n */\n void endSinglePlayerGame(String message);\n\n /**\n * Quits the application\n */\n void endGame();\n\n /**Shows others Player action relatives to turn starting and turn ending\n * @param message a String containing\n */\n void showOthersActions(String message);\n\n /**Shows the Lorenzo actions in the Single player Game session\n * @param lollo the LightLorenzo instance containing all the actions it did in its turn\n */\n void showLorenzoActions(LightLorenzo lollo);\n\n /**Shows the new Player's CardSlots to all Users\n * @param username the LightPlayer's username\n * @param cardSlots the LightPlayer's new LightCardSlots\n */\n void updateCardSlots(String username, LightCardSlots cardSlots);\n\n /**Shows the new Player's WarehouseDepot to all Users\n * @param username the LightPlayer's username\n * @param warehouseDepot the LightPlayer's new LightWarehouseDepot\n */\n void updateWarehouseDepot(String username, LightWarehouseDepot warehouseDepot);\n\n /**Shows the new Player's Strongbox to all Users\n * @param username the LightPlayer's username\n * @param strongbox the LightPlayer's new LightStrongbox\n */\n void updateStrongbox(String username, LightStrongbox strongbox);\n\n /**Shows the new Player's FaithTrack to all Users\n * @param username the LightPlayer's username\n * @param faithTrack the LightPlayer's new LightFaithTrack\n */\n void updateFaithTrack(String username, LightFaithTrack faithTrack);\n\n /**Shows the new Player's LeaderSlot to all Users\n * @param username the LightPlayer's username\n * @param leaderSlot the LightPlayer's new LightLeaderCards\n */\n void updateLeaderSlot(String username, ArrayList<LightLeaderCard> leaderSlot);\n\n /**Shows the new LightDevelopmentBoard\n * @param board a LightDevelopmentBoard instance\n */\n void updateDevBoard(LightDevelopmentBoard board);\n\n /**Shows the new LightMarketBoard\n * @param market a LightMarket instance\n */\n void updateMarketBoard(LightMarketBoard market);\n}", "public void onPlayerLoggedIn() {\n\t\tshowPlayerButtons();\n\t}", "public void onModuleLoad() {\n\t\t//create our main panel\n\t\tfinal DeckPanel panels = new DeckPanel(); \n\t\tRootPanel.get(\"panel\").add(panels);\n\t\t//create our stage panels\n\t\tfinal LoginPanel login = new LoginPanel(panels,wwwordzService);\n\t\tfinal GamePanel game = new GamePanel(panels,wwwordzService); \n\t\tfinal RankingPanel ranking = new RankingPanel(panels,wwwordzService);\n\t\t//add stage panels to main panel\n\t\tpanels.add(login);\n\t\tpanels.add(game);\n\t\tpanels.add(ranking);\n\t\tpanels.showWidget(0);\n\t\t\n\n\t}", "private void findViews() {\n tv_loading_netspeed = findViewById(R.id.tv_loading_netspeed);\n ll_loading = findViewById(R.id.ll_loading);\n media_controller = findViewById(R.id.media_controller);\n llTop = (LinearLayout) findViewById(R.id.ll_top);\n tvName = (TextView) findViewById(R.id.tv_name);\n ivBattery = (ImageView) findViewById(R.id.iv_battery);\n tvSystemItem = (TextView) findViewById(R.id.tv_system_item);\n btnVoice = (Button) findViewById(R.id.btn_voice);\n btnSwichPlayer = (Button) findViewById(R.id.btn_swich_player);\n llBottom = (LinearLayout) findViewById(R.id.ll_bottom);\n tvCurrentItem = (TextView) findViewById(R.id.tv_current_item);\n tvDuration = (TextView) findViewById(R.id.tv_duration);\n btnExit = (Button) findViewById(R.id.btn_exit);\n btnPre = (Button) findViewById(R.id.btn_pre);\n btnVideoStartPause = (Button) findViewById(R.id.btn_video_start_pause);\n btnVideoNext = (Button) findViewById(R.id.btn_video_next);\n btnVideoVideoSwitchScree = (Button) findViewById(R.id.btn_video_video_switch_scree);\n seekbarVideo = findViewById(R.id.seekbarVideo);\n seekbarAudio = findViewById(R.id.seekbarAudio);\n ll_buffer = findViewById(R.id.ll_buffer);\n tv_netspeed = findViewById(R.id.tv_netspeed);\n btnVoice.setOnClickListener(this);\n btnSwichPlayer.setOnClickListener(this);\n btnExit.setOnClickListener(this);\n btnPre.setOnClickListener(this);\n btnVideoStartPause.setOnClickListener(this);\n btnVideoNext.setOnClickListener(this);\n btnVideoVideoSwitchScree.setOnClickListener(this);\n seekbarVideo.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {\n @Override\n public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {\n if (fromUser) {\n videoView.seekTo(progress);\n }\n }\n\n @Override\n public void onStartTrackingTouch(SeekBar seekBar) {\n handler.removeMessages(HIDE_MEDIACONTROLLER);\n }\n\n @Override\n public void onStopTrackingTouch(SeekBar seekBar) {\n handler.sendEmptyMessageDelayed(HIDE_MEDIACONTROLLER, 5000);\n }\n\n\n });\n\n\n }", "public void onStartNewGame(View view) {\n\n grid.setVisibility(View.VISIBLE);\n\n button1.setText(\"·\");\n button2.setText(\"·\");\n button3.setText(\"·\");\n button4.setText(\"·\");\n button5.setText(\"·\");\n button6.setText(\"·\");\n button7.setText(\"·\");\n button8.setText(\"·\");\n button9.setText(\"·\");\n }", "@Override\n public void playerAttributeChange() {\n\n Logger.info(\"HUD Presenter: playerAttributeChange\");\n view.setLives(String.valueOf(player.getLives()));\n view.setMoney(String.valueOf(player.getMoney()));\n setWaveCount();\n }", "@SuppressLint(\"SetTextI18n\")\n @Override\n public View getView(int position, View view, ViewGroup viewGroup) {\n ViewHolder holder;\n if (view == null) {\n view = inflater.inflate(R.layout.scoreboard_layout, viewGroup, false);\n holder = new ViewHolder();\n\n holder.rank = view.findViewById(R.id.rank);\n holder.playerName = view.findViewById(R.id.playerName);\n holder.pokemonNum = view.findViewById(R.id.pokemonNum);\n holder.pokemonLV = view.findViewById(R.id.pokemonLV);\n\n view.setTag(holder);\n } else holder = (ViewHolder) view.getTag();\n\n Player player = playerList.get(position);\n holder.rank.setText(position + 1 + \". \");\n holder.playerName.setText(player.getName() + \" (\" + player.getGender() + \")\");\n holder.pokemonNum.setText(player.getPokemonList().size() + \"\");\n holder.pokemonLV.setText(player.getPlayerPokemonMaxLV() + \"\");\n\n return view;\n }", "private void initViews() {\n TextView textViewPlayer1 = (TextView) findViewById(R.id.textView_player1);\n TextView textViewScorePlayer1 = (TextView) findViewById(R.id.textView_player1_score);\n ProgressBar progressBarPlayer1 = (ProgressBar) findViewById(R.id.progressBar_player1);\n\n TextView textViewPlayer2 = (TextView) findViewById(R.id.textView_player2);\n TextView textViewScorePlayer2 = (TextView) findViewById(R.id.textView_player2_score);\n ProgressBar progressBarPlayer2 = (ProgressBar) findViewById(R.id.progressBar_player2);\n\n ImageView imageViewDie = (ImageView) findViewById(R.id.imageView_die);\n\n TextView textViewAccumulated = (TextView) findViewById(R.id.textView_accumulated);\n TextView textViewPlayerTurn = (TextView) findViewById(R.id.textView_player_turn);\n TextView textViewStartTurn = (TextView) findViewById(R.id.textView_start_turn);\n\n Button buttonCollect = (Button) findViewById(R.id.button_collect);\n Button buttonThrow = (Button) findViewById(R.id.button_throw);\n\n // The views are stored in objects which handle its behaviour //\n BarScore barScorePlayer1 =\n new BarScore(textViewPlayer1, textViewScorePlayer1, progressBarPlayer1);\n BarScore barScorePlayer2 =\n new BarScore(textViewPlayer2, textViewScorePlayer2, progressBarPlayer2);\n ScoreBoard scoreBoard = new ScoreBoard(barScorePlayer1, barScorePlayer2);\n DieView dieView = new DieView(imageViewDie);\n GameInfo gameInfo =\n new GameInfo(textViewAccumulated, textViewPlayerTurn, textViewStartTurn);\n ButtonsToPlay buttons = new ButtonsToPlay(buttonThrow, buttonCollect);\n\n // These objects with views are GameObjects, so they are stored in a global array //\n gameObjects = new GameObject[]{scoreBoard, dieView, gameInfo, buttons};\n\n // The AlertDialog to show the winner message or exit message -> onBackPressed() //\n gameAlertDialog = new GameAlertDialog(this, game, gameObjects);\n\n // Listeners //\n buttonThrow.setOnClickListener(new ThrowListener(game, gameAlertDialog, gameObjects));\n buttonCollect.setOnClickListener(new CollectListener(game, gameObjects));\n textViewStartTurn.setOnClickListener(new StartTurnListener(game, gameObjects));\n }", "private void initView() {\n\t\t//buttonPlayPause = (ImageButton)getView().findViewById(R.id.ButtonTestPlayPause);\n\t\t//buttonPlayPause.setOnClickListener(this);\n\t\t\n\t\t//seekBarProgress = (SeekBar)getView().findViewById(R.id.SeekBarTestPlay);\t\n\t\t//seekBarProgress.setMax(99); // It means 100% .0-99\n\t\t//seekBarProgress.setOnTouchListener(this);\n\t\t//editTextSongURL = (EditText)findViewById(R.id.EditTextSongURL);\n\t\t//editTextSongURL.setText(R.string.testsong_20_sec);\n\t\t\n\t\t//mediaPlayer = new MediaPlayer();\n\t\t//mediaPlayer.setOnBufferingUpdateListener(this);\n\t\t//mediaPlayer.setOnCompletionListener(this);\n\t}", "private void setupGUI(){\r\n\t\t\r\n\t\tfinal GUIFactory guifactory = GUIFactory.instance();\r\n\t\tfinal MTApplication app = (MTApplication)item.getView().getRenderer();\r\n\t\tfinal float leftiness = app.getWidth()*5/6;\r\n\t\tfinal float xPos = leftiness + 5;\r\n\t\t\r\n\t\t\r\n\t\toverlay = new MTOverlayContainer( app);\r\n\t\titem.getView().getRoot().addChild( overlay);\r\n\t\t\r\n\t\t// _THE_ PANEL \r\n\t\t\r\n\t\tpnlPanel = guifactory.createPanel( leftiness, 0, app.getWidth()-leftiness, app.getHeight(),\"pnlPanel\", overlay);\t\t\t\r\n\t\t\r\n\t\t// INTERACTION PANEL\r\n\t\t\r\n\t\tpnlInteraction = guifactory.createPanel(\r\n\t\t\t\tpnlPanel.getPosition( TransformSpace.GLOBAL),\r\n\t\t\t\tpnlPanel.getWidthXY( TransformSpace.GLOBAL),\r\n\t\t\t\tpnlPanel.getHeightXY( TransformSpace.GLOBAL),\r\n\t\t\t\t\"pnlInteraction\",\r\n\t\t\t\tpnlPanel);\r\n\t\tpnlInteraction.setNoFill( true);\r\n\t\t\r\n\t\t// EDIT PANEL\r\n\t\t\r\n\t\tpnlEdit = guifactory.createPanel(\r\n\t\t\t\tpnlPanel.getPosition( TransformSpace.GLOBAL),\r\n\t\t\t\tpnlPanel.getWidthXY( TransformSpace.GLOBAL),\r\n\t\t\t\tpnlPanel.getHeightXY( TransformSpace.GLOBAL),\r\n\t\t\t\t\"pnlEdit\",\r\n\t\t\t\tpnlPanel);\r\n\t\tpnlEdit.setVisible( false);\r\n\t\tpnlEdit.setNoFill( true);\r\n\t\t\r\n\t\t\r\n\t\t// ITEM NAME TEXTAREA\r\n\t\t\r\n\t\tString itemName = item.getName();\r\n\t\tif(itemName == null || itemName.equals( \"\"))\r\n\t\t\titemName = item.getID();\r\n\t\ttxtItemName = guifactory.createTextArea(itemName, \"txtItemName\", pnlPanel);\r\n\t\ttxtItemName.setPositionGlobal(\r\n\t\t\t\tnew Vector3D(\r\n\t\t\t\t\t\txPos,\r\n\t\t\t\t\t\tpnlPanel.getPosition( TransformSpace.GLOBAL).getY() + 10\t\r\n\t\t\t\t));\r\n\r\n\r\n\t\t// PANEL PICTURE\r\n\r\n\t\tVector3D pnlInteractionPos = pnlInteraction.getPosition( TransformSpace.GLOBAL);\r\n\t\tpnlPicture = guifactory.createPanel( pnlInteractionPos.getX()+50, pnlInteractionPos.getY()+50, 100, 100, \"pnlPicture\", pnlInteraction);\r\n\t\tpnlPicture.setAnchor( PositionAnchor.CENTER);\r\n\t\tpnlPicture.setPositionGlobal(\r\n\t\t\t\tnew Vector3D(\r\n\t\t\t\t\t\tpnlInteractionPos.getX() + pnlInteraction.getWidthXY( TransformSpace.GLOBAL)/2,\r\n\t\t\t\t\t\tpnlInteractionPos.getY() + 50 + pnlPicture.getHeightXY( TransformSpace.GLOBAL)/2\r\n\t\t\t\t));\r\n\t\tpnlPicture.setTexture( GUITextures.instance().getByDevice( DeviceType.getDeviceType( device)));\r\n\t\t\r\n\t\t\r\n\t\t// POWER USAGE TEXTAREA\r\n\t\t\r\n\t\tString powerUsage = \"n/a\";\r\n\t\tif( device.getPowerUsage() != null && device.getPowerUsage().getValue() != null){\r\n\t\t\tpowerUsage = device.getPowerUsage().getValue().toString();\r\n\t\t}\r\n\t\t\r\n\t\ttxtPowerUsage = guifactory.createTextArea( \"Power usage: \" + powerUsage + \" Watts\", \"txtPowerUsage\", pnlInteraction);\r\n\t\ttxtPowerUsage.setPositionGlobal(\r\n\t\t\t\tnew Vector3D(\r\n\t\t\t\t\t\txPos,\r\n\t\t\t\t\t\tpnlInteractionPos.getY() + 140\t\t\r\n\t\t\t\t\t\t));\r\n\t\ttxtPowerUsage.setVisible( false);\r\n\t\t\r\n\t\t\r\n\t\t// ON/OFF BUTTON\r\n\t\t\r\n\t\tbtnOnOff = guifactory.createButton( \"Turn device On/Off\", \"btnOnOff\", pnlInteraction);\r\n\t\tbtnOnOff.setPosition( txtPowerUsage.getPosition( TransformSpace.GLOBAL));\r\n\t\tbtnOnOff.addGestureListener( TapProcessor.class, new BtnOnOffListener());\r\n\t\t\r\n\t\t\r\n\t\t// SUBDEVICE BUTTON PANEL\r\n\t\t\r\n\t\tpnlSubDeviceButtons = guifactory.createPanel(\r\n\t\t\t\tpnlPanel.getPosition( TransformSpace.GLOBAL).getX(),\r\n\t\t\t\tbtnOnOff.getVectorNextToComponent( 10, false).getY(),\r\n\t\t\t\tpnlPanel.getWidthXY( TransformSpace.GLOBAL),\r\n\t\t\t\tdevice.getSubDevice().size() * (btnOnOff.getHeight()+10),\r\n\t\t\t\t\"pnlSubDeviceButtons\",\r\n\t\t\t\tpnlInteraction);\r\n\t\t\r\n\t\t// SUB DEVICE BUTTONS\r\n\t\t\r\n\t\tsubDeviceButtons = new LinkedList<MTButton>();\r\n\t\tfor( int i = 0; i < device.getSubDevice().size(); i++){\r\n\t\t\t\r\n\t\t\tPhysicalDevice subDevice = device.getSubDevice().get( i);\r\n\t\t\t\r\n\t\t\t// get button's caption\r\n\t\t\tString caption = subDevice.getName();\r\n\t\t\tif(caption == null || caption.equals( \"\"))\r\n\t\t\t\tcaption = subDevice.getId();\r\n\t\t\t\r\n\t\t\tMTButton btnSubDevice = guifactory.createButton( caption, \"btnSubDevice_\" + subDevice.getId(), pnlSubDeviceButtons);\r\n\t\t\tbtnSubDevice.setPosition(\r\n\t\t\t\t\tnew Vector3D(\r\n\t\t\t\t\t\txPos,\t\r\n\t\t\t\t\t\tpnlSubDeviceButtons.getPosition( TransformSpace.GLOBAL).getY() + i*(btnSubDevice.getHeight() + 10)\r\n\t\t\t\t\t));\r\n\t\t\t\r\n\t\t\tsubDeviceButtons.add( btnSubDevice);\r\n\t\t\tbtnSubDevice.addGestureListener( TapProcessor.class, new BtnSubDeviceListener( subDevice));\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t// EDIT BUTTON\r\n\t\t\r\n\t\tbtnEdit = guifactory.createButton( \"Edit\", \"btnEdit\", pnlInteraction);\r\n\t\tbtnEdit.setPosition( new Vector3D( xPos, app.getHeight() - 2*btnEdit.getHeight() - 30));\r\n\t\tbtnEdit.addGestureListener( TapProcessor.class, new BtnEditListener());\r\n\t\t\r\n\t\t\r\n\t\t// BUTTON HIDE\r\n\t\t\r\n\t\tbtnHide = guifactory.createButton( \"Hide menu\", \"btnHide\", pnlPanel);\r\n\t\tbtnHide.setPosition( new Vector3D( xPos, app.getHeight() - btnHide.getHeight() - 20));\r\n\t\tbtnHide.addGestureListener( TapProcessor.class, new BtnHideListener());\r\n\t\t\r\n\t\t\r\n\t\t///// EDIT-ELEMENTS /////\r\n\r\n\t\tchkMovePlanar = guifactory.createCheckButton( \"Move planar\", \"chkMovePlanar\", pnlEdit);\r\n\t\tchkMovePlanar.setPosition(\r\n\t\t\t\tnew Vector3D(\r\n\t\t\t\t\t\txPos,\r\n\t\t\t\t\t\ttxtItemName.getPosition( TransformSpace.GLOBAL).getY() + txtItemName.getHeightXY( TransformSpace.GLOBAL)+ 20\t\r\n\t\t\t\t));\r\n\t\tchkMovePlanar.addGestureListener( TapProcessor.class, new ChkMovePlanarListener());\r\n\r\n\t\t\r\n\t\tchkMoveY = guifactory.createCheckButton( \"Move up/down\", \"chkMoveY\", pnlEdit);\r\n\t\tchkMoveY.setPosition( chkMovePlanar.getVectorNextToComponent( 10, false));\r\n\t\tchkMoveY.addGestureListener( TapProcessor.class, new ChkMoveYListener());\r\n\r\n\t\t\r\n\t\tchkRotate = guifactory.createCheckButton( \"Rotate\", \"chkRotate\", pnlEdit);\r\n\t\tchkRotate.setPosition( chkMoveY.getVectorNextToComponent( 10, false));\r\n\t\tchkRotate.addGestureListener( TapProcessor.class, new ChkRotateListener());\r\n\r\n\t\t\r\n\t\tchkScale = guifactory.createCheckButton( \"Scale\", \"chkScale\", pnlEdit);\r\n\t\tchkScale.setPosition( chkRotate.getVectorNextToComponent( 10, false));\r\n\t\tchkScale.addGestureListener( TapProcessor.class, new ChkScaleListener());\r\n\r\n\t\t\r\n\t\tbtnChangeVisualisation = guifactory.createButton( \"Change Style\", \"btnChangeVisualisation\", pnlEdit);\r\n\t\tbtnChangeVisualisation.setPosition( chkScale.getVectorNextToComponent( 10, false));\r\n\t\tbtnChangeVisualisation.addGestureListener( TapProcessor.class, new BtnChangeVisualisationListener());\r\n\t\t\r\n\t\t\r\n\t\tbtnSave = guifactory.createButton( \"Save\", \"btnSave\", pnlEdit);\r\n\t\tbtnSave.setPosition( btnEdit.getPosition());\r\n\t\tbtnSave.addGestureListener( TapProcessor.class, new BtnSaveListener());\r\n\t}", "private void addViews() {\n // Add self VideoView\n addSelfView(getVideoView(null));\n\n // Add remote VideoView(s)\n int maxIndex = getNumPeers();\n for (int i = 0; i < maxIndex; i++) {\n // Iterate over the remote Peers only (first Peer is self Peer)\n addRemoteView(getPeerId(i + 1));\n }\n }", "public ViewMain()\n\t{\n\t\tview = new View();\n\t\t\n\t\tcolors = new Color[20][10];\n\t\tfor(int i=0; i < 20; ++i)\n\t\t\tfor(int j=0; j < 10; ++j)\n\t\t\t\tcolors[i][j] = Color.DARK_GRAY;\n\t\t\n\t\tpanel = new BoardGamePanel(colors);\n\t\tpanel.setVisible(true);\n\t\t\n\t\tgameInfo = new GameInfo();\n\t\t\n\t\tactionListenner();\n\t\t\n\t}", "private void setUpOverview() {\n mapInstance = GameData.getInstance();\n //get reference locally for the database\n db = mapInstance.getDatabase();\n\n //retrieve the current player and the current area\n currentPlayer = mapInstance.getPlayer();\n\n }", "public void setPlayer(Player p){\r\n playerModel=p; \r\n jEnemigoDatos.setText(p.getEnemy().getName());\r\n /*if(p.getBadConsequence()==null)\r\n jMalRolloDatos.setText(\"No\");\r\n else\r\n jMalRolloDatos.setText(\"Si\");*/\r\n if(p.isDead())\r\n jMuertoDatos.setText(\"Si\");\r\n else\r\n jMuertoDatos.setText(\"No\");\r\n \r\n jNivelDatos.setText(p.getLevels()+\"\");\r\n jCombatLevelDatos.setText(p.getCombatLevel()+\"\");\r\n jNombreDatos.setText(p.getName());\r\n if(p.canISteal())\r\n jRobarDatos.setText(\"Si\");\r\n else\r\n jRobarDatos.setText(\"No\");\r\n \r\n jNSectDatos.setText(Integer.toString(CultistPlayer.getTotalCultistPlayer()));\r\n \r\n if(playerModel.getClass() == CultistPlayer.class){\r\n jSectarioDatos.setText(\"Si\");\r\n //String text=(CultistPlayer)playerModel.getMyCultist().getGainedLevels()+\"\";\r\n //jSectarioDatos.setText(\"\"+(CultistPlayer)playerModel.getGainedLevels());\r\n \r\n }else\r\n jSectarioDatos.setText(\"No\");\r\n \r\n /*if(playerModel.getBadConsequence().isEmpty())\r\n pendingBadView1.setVisiblePending(false);\r\n else*/\r\n pendingBadView1.setVisiblePending(true);\r\n pendingBadView1.limpiar();\r\n \r\n // A continuación se actualizan sus tesoros \r\n fillTreasurePanel (jpVisibles, playerModel.getVisibleTreasures()); \r\n fillTreasurePanel (jpOcultos, playerModel.getHiddenTreasures()); \r\n btRobar.setEnabled(playerModel.canISteal());\r\n manejarBotones(true);\r\n repaint(); \r\n revalidate();\r\n }", "private void handleTransportControls(View view) {\n String viewName = view.getResources().getResourceName(view.getId());\n\n if (viewName.contains(\"now_playing_previous_button\")) {\n transport_previousSong();\n } else if (viewName.contains(\"now_playing_play_button\")) {\n // Play or pause the current track\n if (playing) {\n transport_pause();\n } else {\n transport_resume();\n }\n } else if (viewName.contains(\"now_playing_next_button\")) {\n transport_nextSong();\n } else {\n displayToast(\"unknown view name: \" + viewName);\n }\n }", "private void initializePresentation() {\r\n viewRankingAttemptFX = new ViewRankingAttemptFX(this);\r\n viewRankingPlayerFX = new ViewRankingPlayerFX(this);\r\n viewLoginFX = new ViewLoginFX(this);\r\n viewRegisterFX = new ViewRegisterFX(this);\r\n viewProblemListFX = new ViewProblemListFX(this);\r\n viewLoginFX = new ViewLoginFX(this);\r\n viewRegisterFX = new ViewRegisterFX(this);\r\n viewMenuFX = new ViewMenuFX(this);\r\n viewSettingsFX = new ViewSettingsFX(this);\r\n viewGenerateFX = new ViewGenerateFX(this);\r\n viewAttemptFX = new ViewAttemptFX(this);\r\n viewAttemptListFX = new ViewAttemptListFX(this);\r\n\r\n viewsFX.add(viewLoginFX);\r\n viewsFX.add(viewRankingAttemptFX);\r\n viewsFX.add(viewRankingPlayerFX);\r\n viewsFX.add(viewRegisterFX);\r\n viewsFX.add(viewProblemListFX);\r\n viewsFX.add(viewMenuFX);\r\n viewsFX.add(viewSettingsFX);\r\n viewsFX.add(viewGenerateFX);\r\n viewsFX.add(viewAttemptFX);\r\n viewsFX.add(viewAttemptListFX);\r\n\r\n }", "public void onClickPlayer() {\n carIcon.setOpacity(1);\n playerIcon.setOpacity(1);\n playerList.getSelectionModel().selectedItemProperty().addListener((observable, oldValue, newValue) -> {\n displayUserInfo(newValue);\n });\n MAIN_MENU_AUDIO.play(Double.parseDouble(getInitData().get(\"SFXVol\")));\n }", "@Override\n\tpublic void showContents() {\n\t\tprogram.add(background);\n\t\tprogram.add(topMatte);\n\t\tprogram.add(bottomMatte);\n\t\tprogram.add(stackLabel);\n\t\t\n\t\tprogram.add(basePurp);\n\t\tprogram.add(currPurp);\n\t\tbasePurp.sendToFront();\n\t\tfor (int i = 0; i < callStack; i++) {\n\t\t\tprogram.add(stackBricks[i]);\n\t\t}\n\n\t\tprogram.add(player.getImage());\n\t\tplayer.move(0, 0);\n\n\t\tAudioPlayer.getInstance().playSound(\"sounds\", \"LevelMusic.mp3\", true);\n\t\tif (portalLeft != null) {\n\t\t\tprogram.add(portalLeft.getImage());\n\t\t}\n\t\tif (portalRight != null) {\n\t\t\tprogram.add(portalRight.getImage());\n\t\t\tprogram.add(portalLabel);\n\t\t}\n\t\tif (next == null || next.payloadRetrieved) {\n\t\t\tprogram.add(payload.getImage());\n\t\t}\n\n\t\tArrayList<Payload> collectedPayload = player.getPayloads();\n\n\t\tprogram.add(psuedocode);\n\n\t\tfor (int i = 0; i < collectedPayload.size(); i++) {\n\t\t\tprogram.add(collectedPayload.get(i).getImage());\n\t\t\tpsuedocode.addRtnLong();\n\t\t}\n\t}", "public UITeam(Object[] data, Account account){\n\n super(account);\n\n list = data;\n\n // Team Location Team Name\n // Manager: \"manager name\"\n // Win/Loss Ratio: xx/xx (xx wins)\n // Players\n // ....\n\n this.account=account;\n\n int rows = 12 + data.length;\n setLayout(new GridLayout(rows,1));\n\n setTitle(\"NHL Analyzer\");\n setSize(400,40*rows);\n\n Panel pnlText = new Panel();\n pnlText.setLayout(new FlowLayout());\n infoBar = new Label(data[1]+\" \"+data[0]);\n pnlText.add(infoBar);\n\n add(pnlText);\n\n Panel pnlText1 = new Panel();\n pnlText1.setLayout(new FlowLayout());\n infoBar1 = new Label(\"Manager: \"+data[2]);\n pnlText1.add(infoBar1);\n\n add(pnlText1);\n\n\n Panel pnlText3 = new Panel();\n pnlText3.setLayout(new FlowLayout());\n infoBar3 = new Label(\"Win/Loss Ratio: \"+data[4]+\" (\"+data[3]+\" wins)\");\n pnlText3.add(infoBar3);\n\n add(pnlText3);\n\n\n Panel pnlText4 = new Panel();\n pnlText4.setLayout(new FlowLayout());\n infoBar4 = new Label(\"Players\");\n pnlText4.add(infoBar4);\n\n add(pnlText4);\n\n buttonList1= new ArrayList<Button>();\n for(int i = 5; i < data.length; i++){\n Object[] player = (Object[])data[i];\n\n Panel pnlPlayer = new Panel();\n pnlPlayer.setLayout(new FlowLayout());\n Label infoBarP = new Label(player[0].toString());\n pnlPlayer.add(infoBarP);\n\n Button btnPlayer = new Button(\"View\");\n\n buttonList1.add(btnPlayer);\n btnPlayer.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent evt) {\n int i = buttonList1.indexOf(evt.getSource());\n playerPress(false,i);\n }\n });\n pnlPlayer.add(btnPlayer);\n\n\n add(pnlPlayer);\n\n }\n\n btnBack = new Button(\"Back\");\n btnBack.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent evt) {\n backPress();\n }\n });\n add(btnBack);\n\n\n addWindowListener(this);\n\n setVisible(true);\n }", "public void multiPlayerChosen(){\n IP = view.ipTF.getText();\n ConnectingViewController connecting = new ConnectingViewController(this, IP);\n connecting.showView();\n this.hideView();\n }", "@Override\n protected String getViewBasePath() {\n return \"/game/\";\n //endregion your codes 2\n }", "private static void displayParty(Player player, Party party) {\n player.openInterface(InterfaceType.MAIN, 507);\n\n /* build the party members statistics */\n StringBuilder leaderInformation = new StringBuilder();\n\n /* team leader information */\n Player partyLeader = party.getLeader();\n leaderInformation.append(\"<col=ffffff>\").append(partyLeader.getName()).append(\"</col>\").append(\"|\");\n leaderInformation.append(partyLeader.getCombat().getLevel()).append(\"|\");\n leaderInformation.append(partyLeader.getStats().totalLevel).append(\"|\");\n for (StatType stat : CLIENT_ORDER)\n leaderInformation.append(partyLeader.getStats().get(stat).fixedLevel).append(\"|\");\n player.getPacketSender().sendClientScript(1517, \"is\", 0, leaderInformation.toString());\n\n /* party members information */\n if (party.getMembers().size() != 0) {\n for (int i = 0; i < party.getMembers().size(); i++) {\n if (party.getMembers().get(i) == party.getLeader())\n continue;\n StringBuilder memberInformation = new StringBuilder();\n memberInformation.append(\"<col=9f9f9f>\").append(party.getMembers().get(i).getName()).append(\"</col>\").append(\"|\");\n memberInformation.append(party.getMembers().get(i).getCombat().getLevel()).append(\"|\");\n memberInformation.append(party.getMembers().get(i).getStats().totalLevel).append(\"|\");\n for (StatType stat : CLIENT_ORDER)\n memberInformation.append(party.getMembers().get(i).getStats().get(stat).fixedLevel).append(\"|\");\n player.getPacketSender().sendClientScript(1517, \"is\", i + 1, memberInformation.toString());\n }\n }\n\n player.getPacketSender().sendClientScript(1524, \"siii\",\n \"Raiding Party of \" + partyLeader.getName() + \" (\" + (party.getMembers().size()) + \")\",\n player == partyLeader ? 2 : player.raidsParty == party ? 1 : 0,\n player.advertisingParty ? 1 : 0,\n player.partyAdvertisementsRemaining);\n\n /* if we're not on a party, set the party we're viewing */\n if (player.raidsParty == null)\n player.viewingParty = party;\n }", "private void loadHUD() {\r\n\r\n\t\tstaticEntities.add(new ButtonEntity(game, \"Pause\", \"hud\",\r\n\t\t\t\"reset-button-idle.png;reset-button-clicked.png\", null, game\r\n\t\t\t\t.getParent().getWidth() - 100,\r\n\t\t\tgame.getParent().getHeight() - 70, 100, 50));\r\n\t\tstaticEntities.add(new ButtonEntity(game, \"Inventory\", \"hud\",\r\n\t\t\t\"inventory-button-idle.png;inventory-button-clicked.png\", null,\r\n\t\t\tgame.getParent().getWidth() - 200,\r\n\t\t\tgame.getParent().getHeight() - 70, 100, 50));\r\n\t}", "private void updateViews() {\n\n\t\tsetContentView(R.layout.activity_members);\n\n\t\t\n\t\tif(cOrg.size()==0 && cProg.size()==0 && cCoord.size()==0){\n\t\t\tTextView view = (TextView) findViewById(R.id.no_results);\n\t\t\tview.setText(this.getString(R.string.NO_INFO));\t\t\t\n\t\t}else{\n\t\t\t\n\t membersView = (ExpandableListView) findViewById(R.id.members_view);\n\t \n\t headers = new ArrayList<String>();\n\t \n\t Map<String, List<Member>> resultsMap = new LinkedHashMap<String, List<Member>>();\n\t \n\t if(cProg.size()>0){\n\t \theaders.add(this.getString(R.string.PROG_COM));\n\t \tresultsMap.put(this.getString(R.string.PROG_COM), cProg);\n\t }\n\t \n\t if(cOrg.size()>0){\n\t \theaders.add(this.getString(R.string.ORG_COM));\n\t \tresultsMap.put(this.getString(R.string.ORG_COM), cOrg);\n\t }\n\t \n\t if(cCoord.size()>0){\n\t \theaders.add(this.getString(R.string.COORD_COM));\n\t \tresultsMap.put(this.getString(R.string.COORD_COM), cCoord);\n\t }\n\t \n\t final MembersListViewAdapter membersViewAdapter = new MembersListViewAdapter(this, headers, resultsMap);\n\t membersView.setAdapter(membersViewAdapter);\n\t \n\t membersView.setOnChildClickListener(new OnChildClickListener() {\n\t\n\t \tpublic boolean onChildClick(ExpandableListView parent, View v,\n\t int groupPosition, int childPosition, long id) {\n\t \t\n\t final Member m = (Member) membersViewAdapter.getChild(\n\t groupPosition, childPosition);\n\t \n\t final Long idElement = m.getId();\n\n\t Intent intent = new Intent(MembersActivity.this, MemberActivity.class);\n\t intent.putExtra(MEMBER_ID, idElement);\n\t \t\t\t\t \n\t \t\t\tstartActivity(intent);\n\t\n\t return true;\n\t }\n\t });\n\t\t}\n\t\t\t\n\t}", "@Override\n public void updateView(UserInteraction userInteraction) {\n userInteraction.getGame().setPlayers(this.players);\n userInteraction.getGame().setDevelopmentCardTable(this.table);\n userInteraction.getGame().setMarket(this.market);\n userInteraction.getGame().setFaithTrack(this.faithTrack);\n if(this.players.get(1).getNickname().equals(\"Lorenzo il Magnifico\"))\n userInteraction.getGame().setGameType(GameType.SINGLEPLAYER);\n else\n userInteraction.getGame().setGameType(GameType.MULTIPLAYER);\n userInteraction.setMessage(this);\n\n this.displayAction(userInteraction);\n }", "private boolean playLevel() {\n // Opens panel of tiles with dimensions appropriate to the current level.\n // Starts the viewer for each model cell.\n // Shows the initial state of all cells in the model.\n for (int l = 0; l < model.getHeight(); l++)\n for (int c = 0; c < model.getWidth(); c++)\n view.setTile(l,c, CellTile.newInstance( model.getCell(l,c) ));\n while ( play() ) // Process one input event (mouse or keyboard)\n status.setMoves( model.getMoves() );\n return winGame(); // Verify win conditions; false: finished without complete\n }", "public GameView() {\n initComponents();\n gameView(30, 30);\n }", "@Override\n\tpublic void listMinutesPerGame(View view) \n\t{\n\t\tIntent intent = new Intent(this, PlayerRatingPlayerListView.class);\n\t\tintent.putExtra(MainActivity.EXTRA_STATS_TYPE, new MinutesPerGameListViewAdapter() );\n\t\tthis.startActivity(intent);\n\t}", "public void DisplayWithMultiTypes() {\n\t\tplayers = new ArrayList<Player>();\n\t\tplayer1 = new Player(\"Nick\");\n\t\tplayer2 = new Player(\"Ausitn\");\n\t\tplayers.add(player1);\n\t\tplayers.add(player2);\n\t\tgame = new GameState();\n\t\tgame.initializeServer(players);\n\t\tRulesEngine.setColour(game, String.valueOf(Type.BLUE));\n\t\t\n\t\tgame.setTurn(0);\n\t\t\n\t\t\n\t\t//create cards to be added to player's hand and target's display\n\t\tCard purpleCard = new Card(Type.PURPLE, 3);\n\t\tCard greenCard = new Card(Type.GREEN, 1);\n\t\tCard yellowCard = new Card(Type.YELLOW, 2);\n\t\tCard blueCard = new Card(Type.BLUE, 3);\n\t\tCard redCard = new Card(Type.RED, 4);\n\t\tCard squire = new Card(Type.WHITE, 2);\n\t\tCard maiden = new Card (Type.WHITE, 6);\n\t\t\n\t\t//Give one of the players a riposte card to play\n\t\tCard riposte = new Card(Type.ACTION, Card.RIPOSTE);\n\t\tgame.getAllPlayers().get(0).getHand().add(riposte);\n\t\t\n\t\t//Give target player a custom display\n\t\tgame.getDisplay(1).add(redCard);\n\t\tgame.getDisplay(1).add(purpleCard);\n\t\tgame.getDisplay(1).add(blueCard);\n\t\tgame.getDisplay(1).add(greenCard);\n\t\tgame.getDisplay(1).add(squire);\n\t\tgame.getDisplay(1).add(yellowCard);\n\t\tgame.getDisplay(1).add(maiden);\n\t}", "public View mo7054a(LayoutInflater layoutInflater, ViewGroup viewGroup) {\n C7707a.m18760a(\"controls:onCreateView\");\n View inflate = layoutInflater.inflate(R.layout.controller_controls, viewGroup, false);\n this.f15636R = (ViewGroup) inflate;\n this.f15637S = (FrameLayout) inflate.findViewById(R.id.button_inbox);\n this.f15638T = (ImageView) inflate.findViewById(R.id.button_inbox_image);\n this.f15639U = (FrameLayout) inflate.findViewById(R.id.button_map);\n this.f15640V = (ImageView) inflate.findViewById(R.id.button_map_image);\n this.f15641W = (FrameLayout) inflate.findViewById(R.id.button_profile);\n this.f15642X = (ImageView) inflate.findViewById(R.id.button_profile_image);\n this.f15643Y = (ViewGroup) inflate.findViewById(R.id.button_dashboard);\n this.f15645a0 = inflate.findViewById(R.id.button_search);\n this.f15646b0 = (ConstraintLayout) inflate.findViewById(R.id.button_discover);\n this.f15650f0 = (TextView) inflate.findViewById(R.id.discover_count);\n this.f15647c0 = (ImageView) inflate.findViewById(R.id.img_button_discover);\n this.f15648d0 = (LottieAnimationView) inflate.findViewById(R.id.lottie_button_discover);\n this.f15649e0.add(this.f15639U);\n this.f15649e0.add(this.f15637S);\n this.f15649e0.add(this.f15643Y);\n this.f15649e0.add(this.f15641W);\n this.f15646b0.setOnClickListener(this);\n this.f15644Z = (ViewGroup) inflate.findViewById(R.id.button_best_friends);\n C7707a.m18759a();\n this.f15664t0.onCreateView(inflate);\n return inflate;\n }", "Player() {\r\n setPlayerType(\"HUMAN\");\r\n\t}", "@Override\r\n public int getCount() {\r\n // contain the expand banner for user click\r\n if(isExpand){\r\n // starters only\r\n return 6;\r\n }else{\r\n // all players\r\n return playerData.size();\r\n }\r\n \r\n }", "private GridPane createPlayerPane(PlayerId pId) {\n\t\t\n\t\tGridPane playerPane = new GridPane();\n\t\t\n\t\tLabel id = new Label(pId.toString());\n\t\tid.setMaxWidth(Double.MAX_VALUE);\n\t\tid.setAlignment(Pos.CENTER);\n\t\t\n\t\t// player type setting\n\t\tGridPane buttons = new GridPane();\n\t\tToggleGroup group = new ToggleGroup();\n\t\t\n\t\tRadioButton human = new RadioButton(\"Human Player\");\n\t\thuman.setToggleGroup(group);\n\t\tbuttons.addRow(0, human);\n\t\t\n\t\tRadioButton simulated = new RadioButton(\"Simulated Player\");\n\t\tsimulated.setToggleGroup(group);\n\t\tbuttons.addRow(1, simulated);\n\t\t\n\t\tRadioButton remote = new RadioButton(\"Remote Player\");\n\t\tremote.setToggleGroup(group);\n\t\tbuttons.addRow(2, remote);\n\t\t\n\t\tgroup.selectedToggleProperty().addListener((a,b,c) -> {\n\t\t\tallButtons.set(pId.ordinal(), (RadioButton) c);\n\t\t});\n\t\t\n\t\t// player name setting\n\t\tLabel nameLabel = new Label(\"Name : \");\n\t\tTextField name = new TextField();\n\t\t\n\t\t// player special settings\n\t\tLabel iteration = new Label(\"Iterations : \");\n\t\titeration.visibleProperty().bind(simulated.selectedProperty());\n\t\t\n\t\tLabel ip = new Label(\"IP Address : \");\n\t\tip.visibleProperty().bind(remote.selectedProperty());\n\t\t\n\t\tTextField entry = new TextField();\n\t\tentry.visibleProperty().bind(remote.selectedProperty().or(simulated.selectedProperty()));\n\t\t\n\t\tplayerPane.add(id, 0, 0, 2, 1);\n\t\tplayerPane.add(buttons, 0, 1, 2, 1);\n\t\tplayerPane.addRow(2, nameLabel, name);\n\t\tStackPane it_ip = new StackPane(iteration, ip);\n\t\tplayerPane.addRow(3, it_ip, entry);\n\t\t\n\t\tplayerPane.setStyle(\"\"\n\t\t\t\t+ \"-fx-border-radius: 25;\"\n\t\t\t\t+ \"-fx-background-radius: 25;\"\n\t\t\t\t+ \"-fx-padding: 10;\"\n\t\t\t\t+ \"-fx-background-color:lightgray;\"\n\t\t\t\t+ \"-fx-border-width: 2;\"\n\t\t\t\t+ \" -fx-border-style: solid;\"\n\t\t\t\t+ \" -fx-border-color: gray;\");\n\t\t\n\t\ttexts.get(pId.ordinal() * 2).textProperty().bind(name.textProperty());\n\t\ttexts.get(pId.ordinal() * 2 + 1).textProperty().bind(entry.textProperty());\n\t\t\t\n\t\treturn playerPane;\n\t}", "public void level1() {\n\t\tlevel = new Level(1); //Create Level object, passing 1 to constructor for level 1\n\t\tplayer = new Player(100, 100); //Set player y position); //Create player object, place in middle of screen, position will later be determined by level png\n\t}", "public void setUpHUDPanel() {\n\n\t\t//Criando e configurando painel que apresenta botoes de acoes\n\t\tthis.playerOptionPanel = new JPanel(null);\n\t\tthis.playerOptionPanel.setBounds(730, 315, 275, 235);\n\t\tthis.playerOptionPanel.setOpaque(false);\n\n\t\t//Criando e configurando botao para jogar/manipular dado\n\t\tthis.moveButton = new JButton(\"JOGAR O DADO\");\n\t\tthis.moveButton.setBounds(45, 25, 175, 45);\n\t\tthis.moveButton.setActionCommand(\"MOVE\");\n\t\tthis.moveButton.setMnemonic(KeyEvent.VK_M);\n\t\tthis.moveButton.setToolTipText(\"Cique aqui para jogar o dado e realizar o movimento\");\n\n\t\t//Adicionando tratador de evento para clique no botao\n\t\tthis.moveButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent event) {\n\t\t\t\tmanipulaDice();\n\t\t\t}\n\t\t});\n\n\t\t//Criando e configurando botao para realizar palpite\n\t\tthis.suggestButton = new JButton(\"REALIZAR PALPITE\");\n\t\tthis.suggestButton.setBounds(45, 90, 175, 45);\n\t\tthis.suggestButton.setActionCommand(\"SUGGEST\");\n\t\tthis.suggestButton.setMnemonic(KeyEvent.VK_S);\n\t\tthis.suggestButton.setEnabled(false);\n\t\tthis.suggestButton.setToolTipText(\"Clique aqui para realizar sugestão\");\n\n\t\t//Criando e configurando botao para realizar acusacao\n\t\tthis.accuseButton = new JButton(\"ACUSAR\");\n\t\tthis.accuseButton.setBounds(45, 160, 175, 45);\n\t\tthis.accuseButton.setActionCommand(\"ACCUSE\");\n\t\tthis.accuseButton.setMnemonic(KeyEvent.VK_A);\n\t\tthis.accuseButton.setToolTipText(\"Clique para fazer acusacao. OBS: Acusacao incorreta poderá te eliminar do jogo.\");\n\n\t\t//Adicionando os botoes corretamente no painel\n\t\tthis.playerOptionPanel.add(this.moveButton);\n\t\tthis.playerOptionPanel.add(this.suggestButton);\n\t\tthis.playerOptionPanel.add(this.accuseButton);\n\n\t\t//Incluindo painel em painel maior\n\t\tthis.add(this.playerOptionPanel);\n\t}", "public void open(Plugin plugin, SpoutPlayer splayer) {\n\n GenericPopup popup = new GenericPopup();\n int width = splayer.getMainScreen().getMaxWidth();\n int height = splayer.getMainScreen().getMaxHeight();\n pluginLeg.log(\"aight\" + width + \"\" + height);\n\n// int width = splayer.getCurrentScreen().getWidth();\n// int height = splayer.getCurrentScreen().getHeight();\n\n //title of the screen\n GenericLabel topLabel = new GenericLabel(\"Clan-Invitation\");\n topLabel.setScale(1);\n\n topLabel.setWidth(topLabel.getText().length() * 8 * (int) topLabel.getScale()).setHeight((int) topLabel.getScale() * 15);\n\n topLabel.setX(width / 2 - topLabel.getWidth() / 2);\n topLabel.setY(topLabel.getHeight() / 2 + 5);\n popup.attachWidget(plugin, topLabel);\n\n //title of the screen\n String questionString = \"&2You are invited to \"+clan.getName()+\". Do you want to join?\";\n GenericLabel questionLabel = new GenericLabel(LegendaryClans.parseColor(questionString));\n questionLabel.setScale(1);\n questionLabel.setWidth(questionLabel.getText().length() * 5 * (int) questionLabel.getScale());\n questionLabel.setHeight((int) questionLabel.getScale() * 15);\n\n questionLabel.setX(width / 2 - questionLabel.getWidth() / 2);\n questionLabel.setY(height / 2 - questionLabel.getHeight() / 2);\n popup.attachWidget(plugin, questionLabel);\n\n //Accept Button\n LegendaryButton acceptButton = new LegendaryButton(LegendaryClans.parseColor(\"&2Accept!\"), popup) {\n\n @Override\n public void onButtonClick(ButtonClickEvent event) {\n if (pluginLeg.getClanManager().getClanByPlayer(clan.getLeaders().get(0)) != null && askedPlayer != null) {\n clan.addMember(askedPlayer);\n } \n getPopup().close();\n }\n };\n\n\n acceptButton.setWidth(acceptButton.getText().length() * 8 * (int) acceptButton.getScale()).setHeight((int) acceptButton.getScale() * 15);;\n acceptButton.setX(width / 2 + width / 4 - acceptButton.getWidth() / 2).setY(height / 2 + height / 4 - acceptButton.getHeight() / 2);\n\n\n popup.attachWidget(plugin, acceptButton);\n //deny button\n LegendaryButton denieButton = new LegendaryButton(LegendaryClans.parseColor(\"&4Deny!\"), popup) {\n\n @Override\n public void onButtonClick(ButtonClickEvent event) {\n clan.broadcastMessage(\"&4\" + askedPlayer.getName() + \" denied invitation!\");\n getPopup().close();\n }\n };\n\n denieButton.setWidth(acceptButton.getText().length() * 8 * (int) acceptButton.getScale());\n denieButton.setHeight((int) denieButton.getScale() * 15);\n// \n// ((LegendaryClans)plugin).log(\"\"+width+\",\"+height);\n// denieButton.setX(denieButton.getX()+denieButton.getWidth()/2 +10);\n\n denieButton.setX(width / 4 - denieButton.getWidth() / 2);\n denieButton.setY(height / 2 + height / 4 - denieButton.getHeight() / 2);\n popup.attachWidget(plugin, denieButton);\n\n splayer.closeActiveWindow();\n splayer.getMainScreen().attachPopupScreen(popup);\n }", "public void initView() {\n JPanel pane= new JPanel();\n panel = new JPanel();\n this.getFile(pane);\n JScrollPane scp = new JScrollPane(pane);\n scp.setPreferredSize(new Dimension(500, 280));\n scp.setVisible(true);\n enter.setPreferredSize(new Dimension(100, 50));\n enter.setVisible(true);\n enter.setActionCommand(\"enter\");\n enter.addActionListener(this);\n send.setPreferredSize(new Dimension(80, 50));\n send.setVisible(true);\n send.setActionCommand(\"sendOptions\");\n send.addActionListener(this);\n send.setEnabled(true);\n back.setVisible(true);\n back.setActionCommand(\"back\");\n back.addActionListener(this);\n back.setPreferredSize(new Dimension(80, 50));\n \n panel.add(scp);\n panel.add(send);\n panel.add(enter);\n panel.add(back);\n Launch.frame.add(panel);\n }", "public void showPlayerStats(Player player) {\n pIcon = new JLabel(player.getName() + \"'s turn\");\n pIcon.setBackground(Color.white);\n pIcon.setBorder(BorderFactory.createEtchedBorder(0));\n pIcon.setBounds(icon.getIconWidth() + 10, 240, 150, 20);\n bPane.add(pIcon, new Integer(2));\n\n //JButton pRank;\n pRank = new JLabel(\"Rank: \" + player.getRank());\n pRank.setBackground(Color.white);\n pRank.setBorder(BorderFactory.createEtchedBorder(0));\n pRank.setBounds(icon.getIconWidth() + 10, 270, 150, 20);\n bPane.add(pRank, new Integer(2));\n\n //JButton pCredits;\n pCredits = new JLabel(\"Credits: \" + player.getCredits());\n pCredits.setBackground(Color.white);\n pCredits.setBorder(BorderFactory.createEtchedBorder(0));\n pCredits.setBounds(icon.getIconWidth() + 10, 300, 150, 20);\n bPane.add(pCredits, new Integer(2));\n\n //JButton pDollars;\n pDollars = new JLabel(\"Dollars: \" + player.getDollars());\n pDollars.setBackground(Color.white);\n pDollars.setBorder(BorderFactory.createEtchedBorder(0));\n pDollars.setBounds(icon.getIconWidth() + 10, 330, 150, 20);\n bPane.add(pDollars, new Integer(2));\n\n //JButton pRehearsalTokens;\n pRehearsalTokens = new JLabel(\"Rehears Toks: \" + player.getRehearsalTokens());\n pRehearsalTokens.setBackground(Color.white);\n pRehearsalTokens.setBorder(BorderFactory.createEtchedBorder(0));\n pRehearsalTokens.setBounds(icon.getIconWidth() + 10, 360, 150, 20);\n bPane.add(pRehearsalTokens, new Integer(2));\n\n //JButton pRoom;\n pRoom = new JLabel(\"Room: \" + player.getRoom());\n pRoom.setBackground(Color.white);\n pRoom.setBorder(BorderFactory.createEtchedBorder(0));\n pRoom.setBounds(icon.getIconWidth() + 10, 390, 150, 20);\n bPane.add(pRoom, new Integer(2));\n\n //JButton pRole;\n if (player.getRole() == null) {\n pRole = new JLabel(\"Role: None\");\n } else {\n pRole = new JLabel(\"Role: \" + player.getRole().getName());\n }\n pRole.setBackground(Color.white);\n pRole.setBorder(BorderFactory.createEtchedBorder(0));\n pRole.setBounds(icon.getIconWidth() + 10, 420, 150, 20);\n bPane.add(pRole, new Integer(2));\n\n pDays = new JLabel(\"Day: \"+Deadwood.getInstance().getDays());\n pDays.setBackground(Color.red);\n pDays.setOpaque(true);\n pDays.setBorder(BorderFactory.createEtchedBorder(0));\n pDays.setBounds(icon.getIconWidth() + 10, 480, 150, 20);\n bPane.add(pDays, new Integer(2));\n }", "private void showPanel()\n {\n currentPanel = this;\n isLiked = thisIsLiked;\n currentActivityId = thisActivityId;\n viewAll.setVisible(false);\n avatarPanel.clear();\n DOM.setStyleAttribute(usersWhoLikedPanelWrapper.getElement(), \"top\", likeCountLink.getAbsoluteTop() + \"px\");\n DOM.setStyleAttribute(usersWhoLikedPanelWrapper.getElement(), \"left\", likeCountLink.getAbsoluteLeft() + \"px\");\n \n for (PersonModelView liker : likers)\n {\n avatarPanel.add(new AvatarLinkPanel(EntityType.PERSON, liker.getUniqueId(), liker.getId(), liker\n .getAvatarId(), Size.VerySmall, liker.getDisplayName()));\n }\n \n if (likeCount > MAXLIKERSSHOWN)\n {\n viewAll.setVisible(true);\n }\n likedLabel.setText(likeCount + \" people liked this\");\n innerLikeCountLink.setText(likeCount.toString());\n }", "private void setPlayerInformations() {\n\t\t\t\n\t\t\t\n\t\t}", "void updateScreen() {\n\t\tZone possibleNewZone = currentZone.getSpace(playerY, playerX).getNextZone();\n\t\tif (possibleNewZone != null) {\n\t\t\tString oldBGMusic = currentZone.getBackgroundMusic();\n\t\t\tcurrentZone = possibleNewZone;\n\t\t\tcurrentZone.enableZoneWarpSpaces();\n\t\t\tplayerX = currentZone.getPlayerStartX();\n\t\t\tplayerY = currentZone.getPlayerStartY();\n\t\t\t\n\n\t\t\tif (!oldBGMusic.equals(currentZone.getBackgroundMusic())) {\n\t\t\t\tmusicPlayer.stop();\n\t\t\t\tmusicPlayer.play(currentZone.getBackgroundMusic(), 100);\n\t\t\t}\n\t\t}\n\n\t\t// Update Panel Colors\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tfor (int a = 0; a < 10; a++) {\n\t\t\t\tpanels[i][a].setBackground(currentZone.getSpace(i, a).getColor());\n\t\t\t}\n\t\t}\n\n\t\t// Update Labels\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tfor (int a = 0; a < 10; a++) {\n\n\t\t\t\tlabels[i][a].setIcon(currentZone.getSpace(i, a).getPic());\n\t\t\t}\n\t\t}\n\t\t// Shows player in the new space\n\t\tlabels[playerY][playerX].setIcon(playerPic);\n\n\t\t// Shows enemy in the new space\n\t\t// labels[enemyY][enemyX].setIcon(enemyPic);\n\t}", "private static void createAndShowGUI() {\n\t\t\t\t// GUIView Moves\n\t\t\t\tGUIViewMoves guiViewMoves = new GUIViewMoves();\n\t\t\t\t\n\t\t\t\t// GUIView Jugs, center the jugs\n\t\t\t\tGUIViewJugs guiViewJug0 = new GUIViewJugs(0);\n\t\t\t\tguiViewJug0.setHorizontalAlignment(JLabel.CENTER);\n\t\t\t\tguiViewJug0.setVerticalAlignment(JLabel.CENTER);; \n\t\t\t \n\t\t\t\tGUIViewJugs guiViewJug1 = new GUIViewJugs(1); \n\t\t\t\tguiViewJug1.setHorizontalAlignment(JLabel.CENTER);\n\t\t\t\tguiViewJug1.setVerticalAlignment(JLabel.CENTER);\n\t\t\t \n\t\t\t\tGUIViewJugs guiViewJug2 = new GUIViewJugs(2); \n\t\t\t\tguiViewJug2.setHorizontalAlignment(JLabel.CENTER);\n\t\t\t\tguiViewJug2.setVerticalAlignment(JLabel.CENTER);\n\t\t\t\n\t\t\t\t// Model\n\t\t\t\tJugPuzzle model = new JugPuzzle();\n\n\t\t\t\t// Hook the model to the view.\n\t\t\t\tmodel.addObserver(guiViewMoves);\n\t\t\t\tmodel.addObserver(guiViewJug0);\n\t\t\t\tmodel.addObserver(guiViewJug1);\n\t\t\t\tmodel.addObserver(guiViewJug2);\n\t\t\t\t\n\t\t\t\t// Create frame.\n\t\t\t\tJFrame frame = new JFrame(\"Jug Game!\");\n\t\t\n\t\t\t\t// Close option.\n\t\t\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\t\t\n\t\t\t\t// Create two panels, one for the moves and the other for the buttons.\n\t\t\t\t// Labels and buttons go on the grid panel and the moves and restart/quit buttons go on the other panel.\n\t\t\t\tJPanel movesAndButtons = new JPanel();\n\t\t\t\tJPanel grid = new JPanel();\n\t\t\t\t\n\t\t\t\t// A container.\n\t\t\t\tContainer c = frame.getContentPane();\n\t\t\t\t\n\t\t\t\t// Layout for the grid.\n\t\t\t\tGridLayout topGrid = new GridLayout(2,3);\n\t\t\t\tgrid.setLayout(topGrid);\n\t\t\t\t\n\t\t\t\t// Layout for the buttons and moves.\n\t\t\t\tmovesAndButtons.setLayout(new BoxLayout(movesAndButtons, FlowLayout.CENTER));\n\n\t\t\t\t// Panels for buttons and moves.\n\t\t\t\tJPanel movesPanel = new JPanel(); // Moves panel, GUI View.\n\t\t\t\tJPanel quitRestartPanel = new JPanel(); // Quit and Restart panel.\n\t\n\t\t\t\t// Add panels to the layout.\n\t\t\t\tmovesAndButtons.add(movesPanel, BorderLayout.SOUTH);\n\t\t\t\tmovesAndButtons.add(quitRestartPanel, BorderLayout.NORTH);\n\t\t\t\tJButton restart, quit, eight, five, three;\n\t\t\t\n\t\t\t // Initialize buttons,\n\t\t\t\teight = new JButton(\"8\");\n\t\t\t five = new JButton(\"5\");\n\t\t\t three = new JButton(\"3\");\n\t\t\t restart = new JButton(\"Restart\");\n\t\t\t quit = new JButton(\"Quit\");\n\t\t\t \n\t\t\t // Add to grid.\n\t\t\t grid.add(guiViewJug0);\n\t\t\t grid.add(guiViewJug1);\n\t\t\t grid.add(guiViewJug2);\n\t\t\t grid.add(eight);\n\t\t\t grid.add(five);\n\t\t\t grid.add(three);\n\t\t\t\t\n\t\t\t\t// Add to the panels.\n\t\t\t movesPanel.add(guiViewMoves);\n\t\t\t\tquitRestartPanel.add(restart);\n\t\t\t\tquitRestartPanel.add(quit);\n\t\t\t\t\n\t\t\t\t// Add the container which adds to the frame.\n\t\t\t\tc.add(grid, BorderLayout.NORTH);\n\t\t\t\tc.add(movesAndButtons, BorderLayout.SOUTH);\n\t\t\t\t\n\t\t\t\t// ActionListeners \n\t\t\t\tJugPuzzleActionListener e = new JugPuzzleActionListener(model);\n\t\t\t\tQuitActionListener end = new QuitActionListener();\n\t\t\t\tRestartActionListener fresh = new RestartActionListener();\n\t\t\t\t\n\t\t\t\teight.addActionListener(e);\n\t\t\t\teight.setActionCommand(\"0\");\n\t\t\t\t\n\t\t\t\tfive.addActionListener(e);\n\t\t\t\tfive.setActionCommand(\"1\");\n\t\t\t\t\n\t\t\t\tthree.addActionListener(e);\n\t\t\t\tthree.setActionCommand(\"2\");\n\t\t\t\t\n\t\t\t\trestart.addActionListener(fresh);\n\t\t\t\tquit.addActionListener(end);\n\t\t\t\t\n\t\t\t\t// Pack and see frame\n\t\t\t\tframe.pack();\n\t\t\t\tframe.setSize(480, 150);\n\t\t\t\tframe.setResizable(false);\n\t\t\t\tframe.setVisible(true);\t\n\t\t\t}", "public void actionListenner()\n\t{\n\t\t// Add action Listener to each JButton.\n\t\t// WelcomePanel\n\t\tview.getFrame().add(view.getWelcomePanel().getWelcomePanel());\t\n\t\tview.getFrame().setVisible(true);\n\t\t\n\t\t// welcomeButton\n\t\tview.getWelcomePanel().getWelcomeButton().addActionListener(event -> view.getFrame().remove(view.getWelcomePanel().getWelcomePanel()));\t\t\n\t\tview.getWelcomePanel().getWelcomeButton().addActionListener(event -> view.getFrame().add(view.getMainPanel().getMainPanel()));\t\t\n\t\tview.getWelcomePanel().getWelcomeButton().addActionListener(event -> view.getFrame().pack());\n\n\t\t// MainPanel\n\t\t// playgameButton\n\t\tview.getMainPanel().getPlaygameButtun().addActionListener(event -> view.getFrame().remove(view.getMainPanel().getMainPanel()));\t\n\t\tview.getMainPanel().getPlaygameButtun().addActionListener(event -> view.getFrame().add(view.getPlayerPanel().getPlayerPanel()));\n\t\tview.getMainPanel().getPlaygameButtun().addActionListener(event -> view.getFrame().repaint());\n\t\tview.getMainPanel().getPlaygameButtun().addActionListener(event -> view.getFrame().setSize(600, 800));\n\t\tview.getMainPanel().getPlaygameButtun().addActionListener(event -> view.getFrame().pack());\n\t\t\n\t\t//leaderboardButton\n\t\tview.getMainPanel().getLeaderboardsButton().addActionListener(event -> view.getFrame().remove(view.getMainPanel().getMainPanel()));\n\t\tview.getMainPanel().getLeaderboardsButton().addActionListener(event -> view.add(view.getLeaderboardPanel().getLeaderboardPanel()));\n\t\tview.getMainPanel().getLeaderboardsButton().addActionListener(event -> view.getFrame().repaint());\n\t\tview.getMainPanel().getLeaderboardsButton().addActionListener(event -> view.getFrame().setSize(600, 800));\n\t\tview.getMainPanel().getLeaderboardsButton().addActionListener(event -> view.getFrame().pack());\n\t\t\n\t\t//quit\n\t\tview.getMainPanel().getQuitButton().addActionListener(event -> view.getFrame().remove(view.getMainPanel().getMainPanel()));\n\t\tview.getMainPanel().getQuitButton().addActionListener(event -> view.getFrame().add(view.getQuitPanel().getQuitPane()));\n\t\tview.getMainPanel().getQuitButton().addActionListener(event -> view.getFrame().repaint());\n\t\tview.getMainPanel().getQuitButton().addActionListener(event -> view.getFrame().setSize(600, 800));\n\t\tview.getMainPanel().getQuitButton().addActionListener(event -> view.getFrame().pack());\n\t\t\n\t\t// PlayerPanel\n\t\t// createButton\n\t\tview.getPlayerPanel().getCreateButton().addActionListener(new ActionListener()\n\t\t{\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tString input = view.getPlayerPanel().getInputBox().getText();\n\t\t\t\tSystem.out.println(input);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tboolean validname = gameInfo.getModel().getLeaderboard().isValidNewPlayers(input);\n\t\t\t\tSystem.out.println(validname);\n\t\t\t\t\n\t\t\t\tif(validname)\n\t\t\t\t{\n\t\t\t\t\tgameInfo.getModel().getLeaderboard().addNewPlayer(input);\n\t\t\t\t\tgameInfo.getModel().getLeaderboard().loadPlayer(input);\n\t\t\t\t\tgameInfo.getModel().getGameRule().setLevel(1);\n\t\t\t\t\t\n\t\t\t\t\tview.getInGamePanel().setPlayerInGamePanel(input);\n\t\t\t\t\tview.getInGamePanel().setLabelName(input);\t\n\t\t\t\t\tview.getInGamePanel().getBoardGamePanel().setPlayerName(input);\n\t\t\t\t\t\n\t\t\t\t\tview.getInGamePanel().setLevelLabel(Integer.toString(1));\n\t\t\t\t\tview.getInGamePanel().getBoardGamePanel().setLevel(1);\n\t\t\t\t\t\n\t\t\t\t\tview.getInGamePanel().setScoreLabel(Integer.toString(0));\n\t\t\t\t\tview.getInGamePanel().getBoardGamePanel().setScores(0);\n\t\t\t\t\t\n\t\t\t\t\tview.getInGamePanel().setGameStart(true);\n\t\t\t\t\tview.getFrame().remove(view.getPlayerPanel().getPlayerPanel());\n\t\t\t\t\tview.getFrame().add(view.getInGamePanel().getInGamePanel());\n\t\t\t\t\tview.getInGamePanel().getInGamePanel().setFocusable(true);\n\t\t\t\t\tview.getInGamePanel().getInGamePanel().requestFocusInWindow();\n\t\t\t\t\tview.getFrame().pack();\n\t\t\t\t\tview.getFrame().setSize(800, 890);\n\t\t\t\t\tview.getFrame().repaint();\t\t\n\t\t\t\t\tview.getFrame().setVisible(true);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(!validname)\n\t\t\t\t{\n\t\t\t\t\tview.getPlayerPanel().getInputBox().setText(\"INVALID NAME\");\n\t\t\t\t\tview.getPlayerPanel().getInputBox().addMouseListener(new MouseAdapter(){\n\t\t\t @Override\n\t\t\t public void mouseClicked(MouseEvent e){\n\t\t\t \tview.getPlayerPanel().getInputBox().setText(\"\");\n\t\t\t }\n\t\t\t });\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\t// loadPlayer\n\t\tint numberOfLoadPlayer = view.getPlayerPanel().getExistPlayerButton().length;\n\t\tfor(int i = 0; i < numberOfLoadPlayer; i++)\n\t\t{\n\t\t\tview.getPlayerPanel().getExistPlayerButton()[i].addMouseListener(new MouseAdapter()\n\t\t\t{\n\t\t\t\tpublic void mousePressed(MouseEvent e)\n\t\t\t\t{\n\t\t\t\t\tObject o = e.getSource();\n\t\t\t\t\tJButton pressedButton = (JButton) o;\n\t\t\t\t\tString text = pressedButton.getText();\n\t\t\t\t\t\n\t\t\t\t\tview.getInGamePanel().setPlayerInGamePanel(text);\n\t\t\t\t\tview.getInGamePanel().setScoreLabel(Integer.toString(gameInfo.getModel().getGameRule().getScores()));\n\t\t\t\t\tview.getInGamePanel().getBoardGamePanel().setScores(gameInfo.getModel().getGameRule().getScores());\n\t\t\t\t\tview.getInGamePanel().setLabelName(text);\n\t\t\t\t\t\n\t\t\t\t\tgameInfo.getModel().getLeaderboard().loadPlayer(text);\n\t\t\t\t\t\n\t\t\t\t\tview.getPlayerPanel().setLoadPlayer(gameInfo.getModel().getLeaderboard().loadPlayer(text));\t\t\t\n\t\t\t\t\tview.setSelectLevelPanel();\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tview.getFrame().remove(view.getPlayerPanel().getPlayerPanel());\t\t\n\t\t\t\t\tview.getFrame().add(view.getSelectLevelPanel().getSelectLevelPanel());\n\t\t\t\t\tview.getFrame().repaint();\n\t\t\t\t\t//view.getFrame().pack();\n\t\t\t\t\tview.getFrame().setVisible(true);\n\t\t\t\t\t\n\t\t\t\t\t// InGamePanel\n\t\t\t\t\t//case select level unlock\n\t\t\t\t\tfor(int i = 1; i <= 5; i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(gameInfo.getModel().getLeaderboard().loadPlayer(text).isLevelUnlocked(i) == true)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tString selectLevel = Integer.toString(i);\n\t\t\t\t\t\t\tint level = i;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tview.getSelectLevelPanel().getLevelButton()[i].addActionListener(event -> view.getInGamePanel().getBoardGamePanel().setPlayerName(gameInfo.getModel().getLeaderboard().loadPlayer(text).getName()));\n\t\t\t\t\t\t\tview.getSelectLevelPanel().getLevelButton()[i].addActionListener(event -> view.getInGamePanel().getBoardGamePanel().setLevel(level));\n\t\t\t\t\t\t\tview.getSelectLevelPanel().getLevelButton()[i].addActionListener(event -> view.getInGamePanel().getBoardGamePanel().setLevel(gameInfo.getModel().getGameRule().getLevel()));\n\t\t\t\t\t\t\tview.getSelectLevelPanel().getLevelButton()[i].addActionListener(event -> gameInfo.getModel().getGameRule().setLevel(level));\n\t\t\t\t\t\t\tview.getSelectLevelPanel().getLevelButton()[i].addActionListener(event -> view.getInGamePanel().setLevelLabel(selectLevel));\n\t\t\t\t\t\t\tview.getSelectLevelPanel().getLevelButton()[i].addActionListener(event -> view.getInGamePanel().setGameStart(true));\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tview.getSelectLevelPanel().getLevelButton()[i].addActionListener(event -> view.getFrame().remove(view.getSelectLevelPanel().getSelectLevelPanel()));\n\t\t\t\t\t\t\tview.getSelectLevelPanel().getLevelButton()[i].addActionListener(event -> view.getFrame().setSize(800, 890));\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tview.getSelectLevelPanel().getLevelButton()[i].addActionListener(event -> view.getFrame().add(view.getInGamePanel().getInGamePanel()));\t\n\t\t\t\t\t\t\tview.getSelectLevelPanel().getLevelButton()[i].addActionListener(event -> view.getInGamePanel().getInGamePanel().requestFocusInWindow());\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tview.getSelectLevelPanel().getLevelButton()[i].addActionListener(event -> view.getInGamePanel().getInGamePanel().setFocusable(true));\n\t\t\t\t\t\t\tview.getSelectLevelPanel().getLevelButton()[i].addActionListener(event -> view.getFrame().repaint());\t\n\t\t\t\t\t\t\tview.getSelectLevelPanel().getLevelButton()[i].addActionListener(event -> view.getFrame().pack());\n\t\t\t\t\t\t\tview.getSelectLevelPanel().getLevelButton()[i].addActionListener(event -> view.getFrame().setVisible(true));\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\t\n\t\t\t\t}\t\n\t\t});\t\t\n\t\t}\n\t\t\n\t\t// back\n\t\tview.getPlayerPanel().getBackButton().addActionListener(event -> view.getFrame().remove(view.getPlayerPanel().getPlayerPanel()));\n\t\tview.getPlayerPanel().getBackButton().addActionListener(event -> view.getFrame().add(view.getMainPanel().getMainPanel()));\t\n\t\tview.getPlayerPanel().getBackButton().addActionListener(event -> view.getFrame().setSize(600, 800));\n\t\tview.getPlayerPanel().getBackButton().addActionListener(event -> view.getFrame().repaint());\n\t\tview.getPlayerPanel().getBackButton().addActionListener(event -> view.getFrame().pack());\n\t\t\n\t\t// LeaderboardPanel\n\t\tview.getLeaderboardPanel().getBackButton().addActionListener(event -> view.getFrame().remove(view.getLeaderboardPanel().getLeaderboardPanel()));\n\t\tview.getLeaderboardPanel().getBackButton().addActionListener(event -> view.getFrame().add(view.getMainPanel().getMainPanel()));\t\n\t\tview.getLeaderboardPanel().getBackButton().addActionListener(event -> view.getFrame().repaint());\n\t\tview.getLeaderboardPanel().getBackButton().addActionListener(event -> view.getFrame().setSize(600, 800));\t\n\t\tview.getLeaderboardPanel().getBackButton().addActionListener(event -> view.getFrame().pack());\n\t\t\n\t\t// QuitPanel\n\t\t// no\n\t\tview.getQuitPanel().getNo().addActionListener(event -> view.getFrame().remove(view.getQuitPanel().getQuitPane()));\n\t\tview.getQuitPanel().getNo().addActionListener(event -> view.getFrame().setSize(600, 800));\n\t\tview.getQuitPanel().getNo().addActionListener(event -> view.getFrame().add(view.getMainPanel().getMainPanel()));\n\t\tview.getQuitPanel().getNo().addActionListener(event -> view.getFrame().repaint());\t\n\t\tview.getQuitPanel().getNo().addActionListener(event -> view.getFrame().pack());\n\t\t\n\t\t// yes\n\t\tview.getQuitPanel().getYes().addActionListener(event -> view.getFrame().dispatchEvent(new WindowEvent(view.getFrame(), WindowEvent.WINDOW_CLOSING)));\n\t\t\n\t\t\n\t\t// InGamePanel\n\t\tview.getInGamePanel().getInGamePanel().addKeyListener(new KeyAdapter() {\n\t\t\tpublic void keyTyped(KeyEvent e) {}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tswitch (e.getKeyCode()) {\n\n\t\t\t\t// Case press esc to pause the game\n\t\t\t\tcase KeyEvent.VK_ESCAPE:\t\n\t\t\t\t\tview.getInGamePanel().setGameStart(false);\n\t\t\t\t\tview.getFrame().remove(view.getInGamePanel().getInGamePanel());\n\t\t\t\t\tview.getFrame().add(view.getPausePanel().getPausePanel());\n\t\t\t\t\tview.getFrame().repaint();\n\t\t\t\t\tview.getFrame().setSize(600, 800);\t\n\t\t\t\t\tview.getFrame().pack();\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase KeyEvent.VK_LEFT:\n\t\t\t\t\tmessage = new Message(Message.ValveResponse.MOVE_LEFT);\n\t\t\t\t\ttry \n\t\t\t\t\t{\n\t\t\t\t\t\tviewToControllerQueue.put(message);\n\t\t\t\t\t} \n\t\t\t\t\tcatch (InterruptedException e1) {}\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase KeyEvent.VK_RIGHT:\n\t\t\t\t\tmessage = new Message(Message.ValveResponse.MOVE_RIGHT);\n\t\t\t\t\ttry \n\t\t\t\t\t{\n\t\t\t\t\t\tviewToControllerQueue.put(message);\n\t\t\t\t\t} \n\t\t\t\t\tcatch (InterruptedException e1) {}\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase KeyEvent.VK_Z:\n\t\t\t\t\tmessage = new Message(Message.ValveResponse.ROTATE_LEFT);\n\t\t\t\t\t\n\t\t\t\t\ttry \n\t\t\t\t\t{\n\t\t\t\t\t\tviewToControllerQueue.put(message);\n\t\t\t\t\t} \n\t\t\t\t\tcatch (InterruptedException e1) {}\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase KeyEvent.VK_SPACE:\n\t\t\t\t\tmessage = new Message(Message.ValveResponse.FASTER);\n\t\t\t\t\t\n\t\t\t\t\ttry \n\t\t\t\t\t{\n\t\t\t\t\t\tviewToControllerQueue.put(message);\n\t\t\t\t\t} \n\t\t\t\t\tcatch (InterruptedException e1) {}\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase KeyEvent.VK_ENTER:\n\t\t\t\t\tif(lost)\n\t\t\t\t\t{\n\t\t\t\t\t\tview.getInGamePanel().setGameStart(true);\n\t\t\t\t\t\tview.getInGamePanel().getBoardGamePanel().setLost(false);\n\t\t\t\t\t\tlost = false;\n\t\t\t\t\t\tmessage = new Message(Message.ValveResponse.RESTART);\n\t\t\t\t\t\ttry \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tviewToControllerQueue.put(message);\n\t\t\t\t\t\t} \n\t\t\t\t\t\tcatch (InterruptedException e1) {}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(winLevel)\n\t\t\t\t\t{\n\t\t\t\t\t\tview.getInGamePanel().setGameStart(true);\n\t\t\t\t\t\tview.getInGamePanel().getBoardGamePanel().setWinLevel(false);\n\t\t\t\t\t\twinLevel = false;\n\t\t\t\t\t\tmessage = new Message(Message.ValveResponse.GET_NEXTLEVEL);\n\t\t\t\t\t\ttry \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tviewToControllerQueue.put(message);\n\t\t\t\t\t\t} \n\t\t\t\t\t\tcatch (InterruptedException e1) {}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tbreak;\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\tpublic void keyReleased(KeyEvent e) {}\n\t\t});\n\t\t\n\t\t// PausePanel\n\t\t// back\n\t\tview.getPausePanel().getBack().addActionListener(event -> view.getInGamePanel().setGameStart(true));\n\t\tview.getPausePanel().getBack().addActionListener(event -> view.getFrame().remove(view.getPausePanel().getPausePanel()));\n\t\tview.getPausePanel().getBack().addActionListener(event -> view.getFrame().setSize(800, 890));\t\n\t\tview.getPausePanel().getBack().addActionListener(event -> view.getFrame().add(view.getInGamePanel().getInGamePanel()));\n\t\tview.getPausePanel().getBack().addActionListener(event -> view.getFrame().repaint());\n\t\tview.getPausePanel().getBack().addActionListener(event -> view.getFrame().pack());\n\t\t\t\t\n\t\t// LeaderBoardInPausePanel\n\t\tview.getPausePanel().getLeaderboardsButton().addActionListener(event -> view.getFrame().remove(view.getPausePanel().getPausePanel()));\n\t\tview.getPausePanel().getLeaderboardsButton().addActionListener(event -> view.getFrame().add(view.getLeaderboardInPausePanel().getLeaderboardPanel()));\n\t\tview.getPausePanel().getLeaderboardsButton().addActionListener(event -> view.getFrame().repaint());\n\t\tview.getPausePanel().getLeaderboardsButton().addActionListener(event -> view.getFrame().setSize(600, 800));\t\n\t\tview.getPausePanel().getLeaderboardsButton().addActionListener(event -> view.getFrame().pack());\n\t\t\n\t\t// ControlsPanel\n\t\tview.getPausePanel().getControlsButton().addActionListener(event -> view.getFrame().remove(view.getPausePanel().getPausePanel()));\n\t\tview.getPausePanel().getControlsButton().addActionListener(event -> view.getFrame().add(view.getControlsPanel().getControlsPanel()));\n\t\tview.getPausePanel().getControlsButton().addActionListener(event -> view.getFrame().repaint());\n\t\tview.getPausePanel().getControlsButton().addActionListener(event -> view.getFrame().setSize(600, 800));\t\n\t\tview.getPausePanel().getControlsButton().addActionListener(event -> view.getFrame().pack());\n\t\t\t\n\t\tview.getPausePanel().getReturnToMainManuButton().addActionListener(new ActionListener()\n\t\t{\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\t\t\t\t\n\t\t\t\tmessage = new Message(Message.ValveResponse.GET_NEWGAME);\n\t\t\t\n\t\t\t\ttry \n\t\t\t\t{\n\t\t\t\t\tviewToControllerQueue.put(message);\n\t\t\t\t} \n\t\t\t\tcatch (InterruptedException e1) {}\n\t\t\t\t\n\t\t\t\tview.getFrame().remove(view.getPausePanel().getPausePanel());\n\t\t\t\tview.getFrame().add(view.getMainPanel().getMainPanel());\t\n\t\t\t\tview.getFrame().pack();\n\t\t\t\tview.getFrame().setSize(600, 800);\t\n\t\t\t\tview.getFrame().repaint();\n\t\t\t\t\n\t\t\t\t//viewAllPanels.getFrame().pack();\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\t// LeaderboardInGame\n\t\tview.getLeaderboardInPausePanel().getBackButton().addActionListener(Event -> view.getFrame().remove(view.getLeaderboardInPausePanel().getLeaderboardPanel()));\n\t\tview.getLeaderboardInPausePanel().getBackButton().addActionListener(event -> view.getFrame().add(view.getPausePanel().getPausePanel()));\t\n\t\tview.getLeaderboardInPausePanel().getBackButton().addActionListener(event -> view.getFrame().repaint());\n\t\tview.getLeaderboardInPausePanel().getBackButton().addActionListener(event -> view.getFrame().setSize(600, 800));\t\n\t\tview.getLeaderboardInPausePanel().getBackButton().addActionListener(event -> view.getFrame().pack());\n\t\t\t\n\t\t// ControlPanel\n\t\tview.getControlsPanel().getBack().addActionListener(event -> view.getFrame().remove(view.getControlsPanel().getControlsPanel()));\n\t\tview.getControlsPanel().getBack().addActionListener(event -> view.getFrame().add(view.getPausePanel().getPausePanel()));\t\n\t\tview.getControlsPanel().getBack().addActionListener(event -> view.getFrame().repaint());\n\t\tview.getControlsPanel().getBack().addActionListener(event -> view.getFrame().setSize(600, 800));\t\n\t\tview.getControlsPanel().getBack().addActionListener(event -> view.getFrame().pack());\n\t}", "public GameMenuView(){\r\n \r\n // super: calls the base class constructor\r\n super(\"\\n\" +\r\n \"********************************************\\n\" +\r\n \"* CITY OF AARON: GAME MENU *\\n\" + \r\n \"********************************************\\n\" +\r\n \"1 - View the map\\n\" +\r\n \"2 - View/Print a list\\n\" +\r\n \"3 - Move to a new location\\n\" +\r\n \"4 - Manage the crops\\n\" +\r\n \"5 - Return to the Main Menu\\n\",\r\n 5);\r\n }", "@Override\r\n\tpublic void showGetPrisonCardMessage(Player player) {\n\t\t\r\n\t}", "public void initPlayerStateUI() {\n if (!playableMediaItem.getBitrate().isEmpty()) {\n tvTrackInfo.setText(playableMediaItem.getBitrate() + getString(R.string.kbps));\n } else {\n tvTrackInfo.setText(\"\");\n }\n\n if (universalPlayer.isPrepaired) {\n ((IToolbarHolder) getActivity()).getToolbar().setTitle(R.string.now_paying);\n if (btnPlay.isPlay() && universalPlayer.isPlaying()) {\n btnPlay.toggle();\n } else if (!btnPlay.isPlay() && !universalPlayer.isPlaying()) {\n btnPlay.toggle();\n }\n\n } else {\n ((IToolbarHolder) getActivity()).getToolbar().setTitle(R.string.buffering);\n if (!btnPlay.isPlay()) {\n btnPlay.toggle();\n }\n }\n }", "public void showDetails (Player player) {\r\n\t\tString \tc\t= Term.COLOR_INACTIVE.get();\r\n\t\t\r\n\t\t// Get the color\r\n\t\tif (getActivity() == Activity.SELL\t\t&& isActive())\r\n\t\t\tc\t= Term.COLOR_SELL.get();\r\n\t\t\r\n\t\telse if (getActivity() == Activity.BUY\t\t&& isActive())\r\n\t\t\tc\t= Term.COLOR_BUY.get();\r\n\t\t\r\n\t\telse if (getActivity() == Activity.EXCHANGE\t&& isActive())\r\n\t\t\tc\t= Term.COLOR_EXCHANGE.get();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tList<String>\tmessage\t= new ArrayList<String>();\r\n\t\t\t\t\t\tmessage.add(Term.INFO_1.get() + c + getActivity().toString() \t+ Term.INFO_2.get() + c +scs.formatCurrency(getPrice())\t\t+ Term.INFO_9.get() + c + getOwner());\r\n\t\t\r\n\t\tString \ttext\t= null;\r\n\t\tString\tname\t= getItemName();\r\n\t\t\r\n\t\tif (!isUnlimited()) {\r\n\t\t\tif (getActivity() == Activity.BUY)\r\n\t\t\t\ttext = getAmount()+ \"/\" + getMaxAmount();\r\n\t\t\telse\r\n\t\t\t\ttext = \"\" + getAmount();\r\n\t\t} else {\r\n\t\t\ttext = Term.INFO_UNLIMITED.get();\r\n\t\t}\r\n\t\t\r\n\t\tif (getItemStack().getType() == Material.WRITTEN_BOOK)\r\n\t\t\tname = getNBTStorage().getBookTitle();\r\n\t\t\r\n\t\tmessage.add(Term.INFO_4.get() + c + name\t\t\t\t+ Term.INFO_3.get() + c + text);\r\n//\t\t\t\t\t\tmessage.add(Term.INFO_4.get() + c + getItemName()\t\t\t\t+ Term.INFO_3.get() + c + (!isUnlimited() ? (getActivity() == Activity.BUY ? getMaxAmount() : getAmount()) : Term.INFO_UNLIMITED.get()));\r\n\t\t\r\n\t\tStringBuffer\tbuffer \t= new StringBuffer();\r\n\t\tString\t\t\tdelim\t= \"\";\r\n\t\r\n\t\tfor (Enchantment en : getEnchantments().keySet()) {\r\n\t\t\tint lvl\t= getEnchantments().get(en);\r\n\t\t\t\r\n\t\t\tbuffer.append(delim + en.getName() + \" lvl \" + lvl);\r\n\t\t\tdelim\t= \", \";\r\n\t\t}\r\n\t\t\r\n\t\tif (buffer.toString().length() > 0)\r\n\t\t\tmessage.add(Term.INFO_8.get() + c + buffer.toString());\r\n\t\t\r\n\t\tif (player.hasPermission(Properties.permAdmin))\r\n\t\t\tmessage.add(c + getSHA1());\r\n\t\t\r\n\t\tMessaging.mlSend(player, message);\r\n\t}", "@Override\n public void makeHidden(Player viewer) {\n \n }", "void show() {\n if (!isDead) {\n for (int i = 0; i < bullets.size(); i++) {//show bullets\n bullets.get(i).show();\n }\n if (immortalityTimer >0) {//no need to decrease immortalityCounter if its already 0\n immortalityTimer--;\n }\n\n if (immortalityTimer >0 && floor(((float)immortalityTimer)/5)%2 ==0) {//needs to appear to be flashing so only show half of the time\n } else {\n\n Constants.processing.pushMatrix();\n Constants.processing.translate(this.position.x, this.position.y);\n Constants.processing.rotate(rotation);\n\n //actually draw the player\n Constants.processing.fill(0);\n Constants.processing.noStroke();\n Constants.processing.beginShape();\n int size = 12;\n\n //black triangle\n Constants.processing.vertex(-size - 2, -size);\n Constants.processing.vertex(-size - 2, size);\n Constants.processing.vertex(2 * size - 2, 0);\n Constants.processing.endShape(CLOSE);\n Constants.processing.stroke(255);\n\n //white out lines\n Constants.processing.line(-size - 2, -size, -size - 2, size);\n Constants.processing.line(2 * size - 2, 0, -22, 15);\n Constants.processing.line(2 * size - 2, 0, -22, -15);\n if (boosting) {//when boosting draw \"flames\" its just a little triangle\n boostCount--;\n if (floor(((float)boostCount)/3)%2 ==0) {//only show it half of the time to appear like its flashing\n Constants.processing.line(-size - 2, 6, -size - 2 - 12, 0);\n Constants.processing.line(-size - 2, -6, -size - 2 - 12, 0);\n }\n }\n Constants.processing.popMatrix();\n }\n }\n for (int i = 0; i < asteroids.size(); i++) {//show asteroids\n asteroids.get(i).show();\n }\n }", "private void Management_Player(){\n\t\t\n\t\t// render the Player\n\t\tswitch(ThisGameRound){\n\t\tcase EndRound:\n\t\t\treturn;\t\t\t\n\t\tcase GameOver:\n\t\t\t// do nothing\n\t\t\tbreak;\n\t\tcase Running:\n\t\t\tif (PauseGame==false){\n\t\t\t\tplayerUser.PlayerMovement();\t\t\t\t\t\t\n\t\t\t}\n\t\t\telse if (PauseGame==true){\n\t\t\t\t// do not update gravity\n\t\t\t}\n\t\t\tbreak;\t\t\n\t\t}\n\t\n\t\tbatch.draw(playerUser.getframe(PauseGame), playerUser.getPosition().x , playerUser.getPosition().y,\n\t \t\tplayerUser.getBounds().width, playerUser.getBounds().height);\n\t\t\n\t\t\n\t\t\n\t\tswitch (playerUser.EquipedToolCycle)\n\t\t{\t\n\t\tcase 0:\n\t\t\tstartTimeTool = System.currentTimeMillis(); \n\t\t\tbreak;\n\t\t\t\n\t\tcase 1: \n\t\t\t\n\t\t\tif (PauseGame==true){\t\t\t\t\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t// tool is grabbed\n\t\t\testimatedTimeEffect = System.currentTimeMillis() - startTimeTool;\t\t\t\t\t\t\t\t\t\t\n\t\t\t\n\t\t\tplayerUser.pe_grab.setPosition(playerUser.getPosition().x + playerUser.getBounds().width/2,\n\t\t\t\t\tplayerUser.getPosition().y + playerUser.getBounds().height/2);\t\n \t\t\n\t\t\t\tplayerUser.pe_grab.update(Gdx.graphics.getDeltaTime());\n\t\t\t\tplayerUser.pe_grab.draw(batch,Gdx.graphics.getDeltaTime()); \t\t\t\t\t\t\t\n\t\t\t\n\t\t\tif (estimatedTimeEffect >= Conf.SYSTIME_MS){\n\t\t\t\testimatedTimeEffect = 0;\n\t\t\t\tplayerUser.ToolEquiped();\n\t\t\t\tstartTimeTool = System.currentTimeMillis(); \n\t\t\t\tplayerUser.EquipedToolCycle++;\n\t\t\t}else{\n\t\t\t\t// do nothing\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\t\t\n\t\tcase 2:\n\t\t\t\n\t\t\tif (PauseGame==true){\t\t\t\t\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\testimatedTimeEffect = (System.currentTimeMillis() - startTimeTool) / 1000;\t\t\t\t\n\t\t\tplayerUser.pe_equip.setPosition(playerUser.getPosition().x + playerUser.getBounds().width/2,\n\t\t\tplayerUser.getPosition().y + playerUser.getBounds().height/2);\t\n\t\t\tplayerUser.pe_equip.update(Gdx.graphics.getDeltaTime());\n\t\t\tplayerUser.pe_equip.draw(batch,Gdx.graphics.getDeltaTime()); \t\t\t\t\n\t\t\tif (estimatedTimeEffect>=Conf.TOOL_TIME_USAGE_LIMIT){\n\t\t\t\tplayerUser.EquipedToolCycle=0;\t\t\n\t\t\t\tplayerUser.color = Color.NONE;\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif (estimatedTimeEffect>=Conf.TOOL_TIME_USAGE_MUSIC_LIMIT){\n\t\t\t\tPhoneDevice.Settings.setMusicValue(true);\n\t\t\t}\n\t\t}\t\t\t\t\n\t}", "private void startGame() {\n hideView(R.id.title);\n hideView(R.id.score);\n gameView.setVisibility(View.VISIBLE);\n level=0;\n totalPoints =0;\n gameView.setTotalPoints(totalPoints);\n startLevel();\n }", "public View getChildView(int groupPosition, final int childPosition,\n boolean isLastChild, View convertView, ViewGroup parent) {\n Player player = (Player) getChild(groupPosition, childPosition);\n\n // Inflate layout\n if (convertView == null) {\n LayoutInflater infalInflater = (LayoutInflater) this.context\n .getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n convertView = infalInflater.inflate(R.layout.item_players_content, parent, false);\n }\n\n // Initialize Views from the layout file\n TextView tvPosition = (TextView) convertView.findViewById(R.id.tv_player_position);\n TextView tvAge = (TextView) convertView.findViewById(R.id.tv_player_age);\n TextView tvAppearances = (TextView) convertView.findViewById(R.id.tv_player_appearances);\n TextView tvGoals = (TextView) convertView.findViewById(R.id.tv_player_goals);\n TextView tvAssists = (TextView) convertView.findViewById(R.id.tv_player_assists);\n TextView tvYellowCards = (TextView) convertView.findViewById(R.id.tv_player_yellow_cards);\n TextView tvRedCards = (TextView) convertView.findViewById(R.id.tv_player_red_cards);\n\n // Set text on each TextView inside the layout\n tvPosition.setText(\"Position: \" + player.getPosition());\n tvAge.setText(\"Age: \" + player.getAge());\n tvAppearances.setText(\"Appearances: \" + player.getAppearances());\n tvGoals.setText(\"Goals: \" + player.getGoals());\n tvAssists.setText(\"Assists: \" + player.getAssists());\n tvYellowCards.setText(\"Yellow cards: \" + player.getYellowCards());\n tvRedCards.setText(\"Red cards: \" + player.getRedCards());\n\n // Get instance of currently logged in user\n user = FirebaseAuth.getInstance().getCurrentUser();\n\n // Get value of logged in user's id\n String userId = user.getUid();\n\n // Point database reference to the users node of Firebase database\n usersDatabase = FirebaseDatabase.getInstance().getReference().child(\"users\");\n\n usersDatabase.child(userId).child(\"subscriptionType\").addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n final String subscriptionType = dataSnapshot.getValue(String.class);\n Log.d(TAG, \"SUBSCRIPTION TYPE\" + subscriptionType);\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError)\n {\n Log.w(TAG, \"Failed to read value.\", databaseError.toException());\n }\n });\n\n return convertView;\n }", "public void startProgram()\r\n\t{\r\n\t\tview.displayPlayerNames();\r\n\t\tview.loadGameData();\r\n\t\tview.displayGame();\r\n\t}" ]
[ "0.6663506", "0.66304886", "0.6564027", "0.64329374", "0.64255863", "0.6393962", "0.63800395", "0.63038343", "0.6241406", "0.6231799", "0.6207627", "0.6191837", "0.6188209", "0.6173826", "0.6165676", "0.61221373", "0.6121143", "0.6070308", "0.6039288", "0.60320646", "0.6027152", "0.6014649", "0.60024357", "0.59844196", "0.59776896", "0.5977632", "0.59764385", "0.59511507", "0.5945736", "0.59432834", "0.5933235", "0.5924243", "0.591809", "0.59178543", "0.5900076", "0.5885027", "0.5880019", "0.5863686", "0.58622503", "0.5854326", "0.58530647", "0.58493125", "0.5838852", "0.58323383", "0.5815832", "0.5799117", "0.57539743", "0.5742287", "0.57422704", "0.574002", "0.57365775", "0.57365733", "0.5733774", "0.5730588", "0.5720734", "0.57081974", "0.570547", "0.57036364", "0.57031614", "0.570149", "0.5701458", "0.56925917", "0.5685407", "0.56786114", "0.5677631", "0.5672991", "0.56717414", "0.56715345", "0.56713504", "0.5664721", "0.5660347", "0.5653218", "0.56498975", "0.5649539", "0.5640149", "0.5638266", "0.56332177", "0.562721", "0.56263494", "0.5624151", "0.5615471", "0.56042343", "0.560117", "0.55956805", "0.55868006", "0.5581847", "0.55788934", "0.5576558", "0.55692536", "0.5568996", "0.5567509", "0.55670273", "0.55631727", "0.5561984", "0.55584013", "0.5551809", "0.5543804", "0.55427104", "0.5542007", "0.5541386", "0.55380124" ]
0.0
-1
Returns the current world.
public World getCurrentWorld() { assert levelIndex >= 0 && levelIndex < levels.size(); return levels.get(levelIndex); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static World getWorld() {\n\t\treturn world;\n\t}", "public World getWorld() {\n return location.getWorld();\n }", "public final World getWorld() {\n\t\treturn location.getWorld();\n\t}", "public World getWorld () {\n\t\treturn world;\n\t}", "public World getWorld() {\n\t\treturn world;\n\t}", "public World getWorld() {\n return world;\n }", "public World getWorld() {\n return world;\n }", "public static World getWorld() {\n\t\treturn ModLoader.getMinecraftInstance().theWorld;\n\t}", "public World getWorld ( ) {\n\t\treturn invokeSafe ( \"getWorld\" );\n\t}", "public String getWorld() {\r\n\t\treturn mainSpawn.getWorld().toString();\r\n\t}", "public GameData getWorld() {\r\n return world;\r\n }", "public World getWorld();", "public World getWorld() {\n\t\treturn Bukkit.getWorld(world);\n\t}", "public World getWorld()\n {\n if (worldData == null)\n {\n return null;\n }\n\n return worldData.getWorld();\n }", "@Basic\n\tpublic World getWorld() {\n\t\treturn this.world;\n\t}", "@Basic\n\tpublic World getWorld() {\n\t\treturn this.world;\n\t}", "public HashMap<String, Location> getWorld() {\r\n\t\treturn this.world;\r\n\t}", "World getWorld();", "@Override\n\tpublic World getWorld() { return world; }", "public final World getWorld() {\n\t\treturn baseTile.getWorld();\n\t}", "public ThingNode getWorld()\n {\n return world;\n }", "@NotNull\r\n World getWorld();", "public static World getWorld(){\n Optional<World> worldOptional = Sponge.getServer().getWorld(\"world\");\n if(worldOptional.isPresent()){\n return worldOptional.get();\n }\n return null;\n }", "public String getWorldName() {\n\t\treturn world;\n\t}", "public static World readWorld() {\n\t\treturn null;\n\t}", "public static World getMainWorld() {\n\t\tif (!mainWorld.isEmpty()) {\n\t\t\tWorld world = Bukkit.getWorld(mainWorld);\n\t\t\tif (world != null) {\n\t\t\t\treturn world;\n\t\t\t}\n\t\t}\n\t\treturn WorldUtil.getWorlds().iterator().next();\n\t}", "public Level getWorld() {\r\n return this;\r\n }", "public static World getInstance() {\n return instance;\n }", "public World getClientWorld()\n {\n return null;\n }", "public World getWorld(String worldName);", "public OdorWorldPanel getWorldPanel() {\n return worldPanel;\n }", "public static List<World> getWorlds() {\n\t\treturn worlds;\n\t}", "public static World getInstance() {\n\t\tif (world == null) {\n\t\t\tworld = new World();\n\t\t}\n\t\treturn world;\n\t}", "private GameWorld getGameWorld(){\n\t\tHashMap<String, Location> locations = new HashMap<String, Location>();\n\t\tHashMap<Avatar, Location> avatarLocations = new HashMap<Avatar, Location>();\n\t\tArrayList<Avatar> avatars = new ArrayList<Avatar>();\n\t\t\n\t\tLocation testLocation = new Location(\"Test Location\");\n\t\tAvatar testAvatar = new Avatar(\"Slim\", 1);\n\t\t\n\t\tlocations.put(\"testLocation\", testLocation);\n\t\tavatarLocations.put(testAvatar, testLocation);\n\t\tavatars.add(testAvatar);\n\t\t\n\t\treturn new GameWorld(locations, avatarLocations, avatars);\n\t}", "public WorldServer getWorldServer()\r\n {\r\n return this.theWorldServer;\r\n }", "public int getCurrentWorldIndex() {\n\t\treturn levelIndex;\n\t}", "public long getWorldId() {\n return worldId_;\n }", "public long getWorldId() {\n return worldId_;\n }", "public static synchronized World getWorld() {\n\t\tif (worldInstance == null) {\n\t\t\tworldInstance = new World();\n\t\t\ttry {\n\t\t\t\tworldInstance.wl = new WorldLoader();\n\t\t\t\ttry {\n\t\t\t\t\tServer.print(\"Loading World Data\", false);\n\t\t\t\t\tworldInstance.wl.loadWorld(worldInstance);\n\t\t\t\t\tworldInstance.loadScripts();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tServer.print(\"ERROR\", true);\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} finally {\n\t\t\t\t\tServer.print(\"COMPLETE\", true);\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tServer.print(\"Loading Objects\", false);\n\t\t\t\t\tworldInstance.getDB().loadObjects(worldInstance);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tServer.print(\"ERROR\", true);\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} finally {\n\t\t\t\t\tServer.print(\"COMPLETE\", true);\n\t\t\t\t}\n\n\n\t\t\t} catch (Exception e) {\n\t\t\t\tLogger.error(e);\n\t\t\t}\n\t\t}\n\t\treturn worldInstance;\n\t}", "public MBMWorld getWorld(int num){\n return worlds.get(num);\n }", "public static World getWorld(NetworkManager network) {\n\t\treturn getWorld();\n\t}", "public Vector2F getWorldLocation() {\n\t\treturn new Vector2F(xPos, yPos);\n\t}", "public Pane getWorldDisplay() {\n return worldDisplay;\n }", "public long getWorldTime()\n {\n return worldTime;\n }", "public mat4 getMatrix() {\n return worldMatrix;\n }", "public StarSystem getCurrentLocation() {\n\t\treturn player.getLocation();\n\t}", "public long getWorldid() {\n return worldid_;\n }", "public long getWorldid() {\n return worldid_;\n }", "public long getWorldid() {\n return worldid_;\n }", "public long getWorldid() {\n return worldid_;\n }", "public World getWorld(String name) {\n String world = cfg.getString(name + \".World\");\n if (world != null)\n return Bukkit.getWorld(world);\n return null;\n }", "public ArrayList<MBMWorld> getWorldList(){\n return worlds;\n }", "public WorldLoader getWorldLoader() {\n\t\treturn loader;\n\t}", "public int[][] getworld(){\n return world;\n }", "public Location getLocation(){\n\t\tWorld w = Bukkit.getWorld(worldName);\n\t\tif(w==null){\n\t\t\tSystem.out.println(\"Error, null world in Location from SQL\");\n\t\t\treturn null;\n\t\t}\n\t\treturn new Location(w, x+0.5, y, z+0.5);\n\t\t\n\t}", "public World getWorld(int dim) {\n\t\treturn DimensionManager.getWorld(dim);\n\t}", "public WorldConfig getSingleWorldConfiguration() {\n\t\treturn SingleWorldConfig;\n\t}", "public World getParent() {\r\n return ocean;\r\n }", "public String getWorldName() {\n\t\treturn MinecraftServer.getServer().worldServers[0].getSaveHandler()\n\t\t\t\t.getWorldDirectoryName();\n\t}", "public World[] getAllWorlds() {\n\t\treturn levels.toArray(new World[levels.size()]);\n\t}", "@Nonnull\n Texture getWorldMap();", "WorldGenerator getForWorld(World world);", "public static World getInstance() {\n try {\n mWorldLock.acquire();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n if (instance == null) {\n ObjectInputStream ois;\n try {\n ois = new ObjectInputStream(new FileInputStream(\"world.save\"));\n try {\n instance = (World) ois.readObject();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (instance == null) {\n instance = new World();\n }\n }\n mWorldLock.release();\n return instance;\n }", "long getWorldId();", "public World makeWorld() {\n World world = new World(1000, 1000);\n world.createEntity().addComponent(new CursorComponent());\n \n ProjectileSystem projectileSystem = new ProjectileSystem();\n world.addSystem(projectileSystem, 1);\n \n return world;\n }", "public long getTime(){\r\n\t\treturn world.getWorldTime();\r\n\t}", "public Vector getWorldPosition(){\n\t\treturn this.absPos;\n\t}", "public World getWorld(int i) {\n\t\treturn levels.get(i);\n\t}", "public byte getWorldId()\r\n\t{\r\n\t\treturn mWorldId;\r\n\t}", "@Basic @Raw\n\tpublic World getSuperWorld() {\n\t\treturn this.superWorld;\n\t}", "public static World readWorld(GlowServer server, CompoundTag compound) {\n World world = compound\n .tryGetUniqueId(\"WorldUUIDMost\", \"WorldUUIDLeast\")\n .map(server::getWorld)\n .orElseGet(() -> compound.tryGetString(\"World\")\n .map(server::getWorld)\n .orElse(null));\n if (world == null) {\n world = compound\n .tryGetInt(\"Dimension\")\n .map(World.Environment::getEnvironment)\n .flatMap(env -> server.getWorlds().stream()\n .filter(serverWorld -> env == serverWorld.getEnvironment())\n .findFirst())\n .orElse(null);\n }\n return world;\n }", "public Location getLocation()\n {\n if (worldData == null || position == null)\n {\n // Must have a world and position to make a location;\n return null;\n }\n\n if (orientation == null)\n {\n return new Location(worldData.getWorld(), position.getX(), position.getY(), position.getZ());\n }\n\n return new Location(worldData.getWorld(), position.getX(), position.getY(), position.getZ(), orientation.getYaw(), orientation.getPitch());\n }", "WorldCoordinates getWCSCenter();", "long getWorldid();", "long getWorldid();", "public String getPassworld() {\n return passworld;\n }", "public Location getCurrentLocation()\n\t{\n\t\treturn currentLocation;\n\t}", "public Location getCurrentLocation() { return entity.getLocation(); }", "public String getWorldName()\n {\n return levelName;\n }", "public Map<String, WorldConfig> getWorldConfigs() {\n\t\treturn Collections.unmodifiableMap(WorldCfg);\n\n\t}", "public WorldRegions getWorldRegions()\n {\n return regions;\n }", "public World setCurrentWorld(int index) {\n\t\tassert index >= 0 && index < levels.size();\n\t\treturn levels.get(levelIndex = index);\n\t}", "public void setWorld(World world) {\n this.world = world;\n }", "public Location getCurrentLocation();", "public Texture getWorldTexture() {\n return frameBuffer.getTexture(0);\n }", "public String getWorldName() {\n String worldname = getMapName();\n if (worldname.equals(\"MpServer\")) {\n //This removes the port\n String[] split = getServerName().toLowerCase().split(\":\");\n worldname = split[0];\n }\n return worldname;\n }", "@Override\n public void world() {\n super.world();\n }", "public GuiPositions getPosWorldAge() {\r\n\t\treturn posWorldAge;\r\n\t}", "public static Site getLocal() {\r\n return _local;\r\n }", "public Room getCurrentRoom() {\r\n return player.getCurrentRoom();\r\n }", "public String getCurrentLocation() {\n return currentLocation;\n }", "public void setWorld(GameData world) {\r\n this.world = world;\r\n }", "public static MapLocation myLocation() {\n return RC.getLocation();\n }", "public World() {\n\t\tblockIDArray = new byte[WORLD_SIZE][WORLD_HEIGHT][WORLD_SIZE];\n\t\tentities\t = new ArrayList<Entity>();\n\t\trand\t\t = new Random();\n\t\t\n new GravityThread(this);\n\t\t\t\t\n\t\tgenerateWorld();\n\t}", "public Location getLobbyLocation() {\n return gameLocations.get(GameLocation.LOBBY);\n }", "private IWorld worldCreator(){\n if (gameWorld == GameWorld.NORMAL) return\n new Normal();\n else return\n new Nether();\n }", "@PersistField\n public WorldData getWorldData()\n {\n return worldData;\n }", "public int getWorldLimit() {\n\t\treturn worldLimit;\n\t}", "public static World getWorld(CommandContext<?> ctx, String argName) throws CommandSyntaxException {\n if(BrigadierWrapper.useFallbackDimensionArgument()) {\n return INSTANCE.dynamicStringToWorld(ctx, argName);\n } else {\n return INSTANCE.getDimension(ctx, argName);\n }\n }", "public File getWorldFolder(String worldName);" ]
[ "0.8621828", "0.83927363", "0.8390855", "0.83692634", "0.835664", "0.8346145", "0.8346145", "0.831776", "0.8264259", "0.82457876", "0.8200971", "0.8123475", "0.81173944", "0.80552137", "0.80451137", "0.80451137", "0.8007668", "0.7987838", "0.79072875", "0.7881896", "0.780886", "0.77908003", "0.76809025", "0.75558406", "0.7497631", "0.7436027", "0.74232274", "0.73223245", "0.7309454", "0.7296769", "0.7207856", "0.72006863", "0.71620375", "0.70532054", "0.70483214", "0.69982463", "0.69838476", "0.69562453", "0.69219184", "0.69131076", "0.6906376", "0.68537766", "0.6821739", "0.6783806", "0.67740047", "0.67531043", "0.67520773", "0.67520773", "0.6736236", "0.6736236", "0.6729066", "0.6654962", "0.6587777", "0.655963", "0.65556765", "0.653552", "0.6512982", "0.6461291", "0.6454595", "0.63999826", "0.63803184", "0.6376023", "0.6362727", "0.634986", "0.6340896", "0.6326814", "0.63173056", "0.6317078", "0.62944084", "0.6270674", "0.6252237", "0.6186511", "0.6158274", "0.6127721", "0.6127721", "0.61267954", "0.6109968", "0.61064637", "0.609131", "0.60910404", "0.60677433", "0.6066333", "0.60584944", "0.6058395", "0.60178345", "0.60169375", "0.6003615", "0.6001085", "0.5978653", "0.5967015", "0.59542435", "0.5946728", "0.59374917", "0.5932882", "0.5931304", "0.5930756", "0.59277815", "0.59105414", "0.5903222", "0.5867647" ]
0.8148732
11
Returns the index of the current World.
public int getCurrentWorldIndex() { return levelIndex; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public World getCurrentWorld() {\n\t\tassert levelIndex >= 0 && levelIndex < levels.size();\n\t\treturn levels.get(levelIndex);\n\t}", "public long getWorldId() {\n return worldId_;\n }", "public long getWorldId() {\n return worldId_;\n }", "long getWorldId();", "public int getIndex() {\n return _siteIndex;\n }", "public long getWorldid() {\n return worldid_;\n }", "public long getWorldid() {\n return worldid_;\n }", "public long getWorldid() {\n return worldid_;\n }", "public long getWorldid() {\n return worldid_;\n }", "int getMonsterIndex();", "int getMonsterIndex();", "public byte getWorldId()\r\n\t{\r\n\t\treturn mWorldId;\r\n\t}", "public int numWorlds(){\n return worlds.size();\n }", "public int getIndex() {\n return index_;\n }", "public int getIndex() {\n return index_;\n }", "public int getIndex() {\n return index_;\n }", "public int getIndex() {\n return index_;\n }", "public int getIndex() {\n return index_;\n }", "public int getIndex() {\n return index_;\n }", "public int getIndex() {\n\t\treturn index;\n\t}", "public int getIndex() {\n\t\treturn index;\n\t}", "public int getIndex() {\n\t\treturn index;\n\t}", "public int getIndex() {\r\n\t\treturn index;\r\n\t}", "public Integer getIndex() {\n return index;\n }", "int getIndex() {\n\t\treturn index;\n\t}", "public MBMWorld getWorld(int num){\n return worlds.get(num);\n }", "long getWorldid();", "long getWorldid();", "public int getIndex() {\n \t\treturn index;\n \t}", "public int getIndex() {\n return index_;\n }", "public int getIndex() {\n return index_;\n }", "public int getIndex() {\n return index_;\n }", "public int getIndex() {\n return index_;\n }", "public int getIndex() {\n return index_;\n }", "public int getIndex() {\n return index_;\n }", "public int getIndex()\n {\n return getInt(\"Index\");\n }", "public int getIndex() {\n return index;\n }", "public int getIndex() {\n return index;\n }", "public int getIndex() {\n return index;\n }", "public int getIndex() {\n return index;\n }", "public int getIndex() {\n return index;\n }", "public int getIndex()\n {\n return index;\n }", "public int getIndex() {\r\n return index;\r\n }", "public int getIndex() {\n return index;\n }", "public int getIndex() {\n\t\treturn 0;\n\t}", "public int getIndex() {\r\n \t\t\treturn index;\r\n \t\t}", "public int getIndex()\n {\n return index;\n }", "public final int getIndex(){\n return index_;\n }", "public World getWorld() {\n return location.getWorld();\n }", "public int getIndex() {\n return index;\n }", "public final World getWorld() {\n\t\treturn location.getWorld();\n\t}", "public World getWorld() {\n\t\treturn world;\n\t}", "public String getWorldName() {\n\t\treturn world;\n\t}", "private int getIndex() {\n\t\treturn this.index;\r\n\t}", "public int getIndex() {\n\t\treturn index & 0xffff;\n\t}", "public int getCurrentIdx() {\n\t\treturn this.currentIdx;\n\t}", "public int getIndex() {\n\t\treturn this.index;\n\t}", "public int getIndex() { \n\t\t\treturn currIndex;\n\t\t}", "public int getIndex() {\r\n return ordinal();\r\n }", "public static World getWorld() {\n\t\treturn world;\n\t}", "public int getIndex(){\n\t\treturn index;\n\t}", "public int getIndex(){\n\t\treturn index;\n\t}", "public int getIndex(){\n\t\treturn index;\n\t}", "public short getIndex()\n {\n return index;\n }", "public int getIndex() {\r\n return _index;\r\n }", "public int getIndex() {\r\n return _index;\r\n }", "public int getIndex() {\n return this.index;\n }", "public int getIndex() {\n return this.index;\n }", "public GameData getWorld() {\r\n return world;\r\n }", "public Integer getIdx() {\r\n\t\treturn idx;\r\n\t}", "public World getWorld() {\n return world;\n }", "public World getWorld() {\n return world;\n }", "public int getIdx() {\n return idx;\n }", "public int getIndex() {\n\t\treturn this.mIndex;\n\t}", "public World setCurrentWorld(int index) {\n\t\tassert index >= 0 && index < levels.size();\n\t\treturn levels.get(levelIndex = index);\n\t}", "public World getWorld () {\n\t\treturn world;\n\t}", "protected final int getIndex() {\n return index;\n }", "public String getConcreteIndex() {\n return getCurrentItem().index();\n }", "public int getCurrentIdx() {\n\t\treturn currentIdx;\n\t}", "public int getIndex();", "public int getIndex();", "public int getIndex();", "public int getIndex() {\n return mIndex;\n }", "public int getIndex(){\r\n \treturn index;\r\n }", "public int getMonsterIndex() {\n return monsterIndex_;\n }", "public int getMonsterIndex() {\n return monsterIndex_;\n }", "public World getWorld(int i) {\n\t\treturn levels.get(i);\n\t}", "public synchronized final int getIndex() {\r\n return f_index;\r\n }", "public int index() {\n\t\treturn this.index;\n\t}", "@JsOverlay\n\tpublic final int getIndex() {\n\t\t// checks if there is the property\n\t\tif (ObjectType.UNDEFINED.equals(JsHelper.get().typeOf(this, \"index\"))) {\n\t\t\treturn Undefined.INTEGER;\n\t\t}\n\t\treturn getNativeIndex();\n\t}", "public int getIndex(){\n return index;\n }", "public int getIndex(){\n return index;\n }", "public int getIndex()\n {\n return m_index;\n }", "public Integer index() {\n return this.index;\n }", "public String getWorld() {\r\n\t\treturn mainSpawn.getWorld().toString();\r\n\t}", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();" ]
[ "0.6819154", "0.67100495", "0.66749537", "0.66400117", "0.66228014", "0.657099", "0.657099", "0.654648", "0.654648", "0.6512717", "0.6512717", "0.65073746", "0.6470073", "0.64067245", "0.64067245", "0.64067245", "0.64067245", "0.64067245", "0.64067245", "0.6401921", "0.6401921", "0.6401921", "0.6389129", "0.6377237", "0.63717693", "0.6370624", "0.6369489", "0.6369489", "0.63637596", "0.6352162", "0.6352162", "0.6352162", "0.6352162", "0.6352162", "0.6352162", "0.6346207", "0.63424456", "0.63424456", "0.63424456", "0.63424456", "0.63424456", "0.6340221", "0.63293666", "0.6324897", "0.6322582", "0.6317893", "0.63055444", "0.62905395", "0.628909", "0.6288767", "0.6254426", "0.6243177", "0.6242451", "0.6241354", "0.6238647", "0.6223871", "0.62230784", "0.6205977", "0.62052405", "0.62019914", "0.6191969", "0.6191969", "0.6191969", "0.6191026", "0.61866677", "0.61866677", "0.61866343", "0.61866343", "0.6182279", "0.61683553", "0.61668533", "0.61668533", "0.61514086", "0.61494946", "0.6142728", "0.61414295", "0.6139099", "0.6138172", "0.6133226", "0.61324745", "0.61324745", "0.61324745", "0.61256176", "0.6099237", "0.60955226", "0.60952777", "0.607733", "0.6063657", "0.6061849", "0.6059455", "0.605864", "0.605864", "0.6056044", "0.60539633", "0.6051065", "0.6047751", "0.6047751", "0.6047751", "0.6047751", "0.6047751" ]
0.8155959
0
Returns an array of all Worlds in this LevelPack.
public World[] getAllWorlds() { return levels.toArray(new World[levels.size()]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static List<World> getWorlds() {\n\t\treturn worlds;\n\t}", "public ArrayList<MBMWorld> getWorldList(){\n return worlds;\n }", "public Collection<String> getLoadableWorlds();", "public int numWorlds(){\n return worlds.size();\n }", "public int[][] getworld(){\n return world;\n }", "public List<String> getDisabledWorlds() {\n return disabledWorlds;\n }", "public GameData getWorld() {\r\n return world;\r\n }", "public World getWorld() {\n return world;\n }", "public World getWorld() {\n return world;\n }", "public WorldRegions getWorldRegions()\n {\n return regions;\n }", "public World getWorld(int i) {\n\t\treturn levels.get(i);\n\t}", "public HashMap<String, Location> getWorld() {\r\n\t\treturn this.world;\r\n\t}", "public static World getWorld() {\n\t\treturn world;\n\t}", "public World getWorld() {\n\t\treturn world;\n\t}", "public MBMWorld getWorld(int num){\n return worlds.get(num);\n }", "public World getWorld () {\n\t\treturn world;\n\t}", "public Map<String, WorldConfig> getWorldConfigs() {\n\t\treturn Collections.unmodifiableMap(WorldCfg);\n\n\t}", "public World getWorld();", "public Level getWorld() {\r\n return this;\r\n }", "public World getWorld() {\n return location.getWorld();\n }", "public World getWorld()\n {\n if (worldData == null)\n {\n return null;\n }\n\n return worldData.getWorld();\n }", "public void loadDisabledWorlds() {\n disabledWorlds = ConfigManager.getInstance().getDisabledWorlds();\n }", "public World getWorld(String worldName);", "public static World getWorld() {\n\t\treturn ModLoader.getMinecraftInstance().theWorld;\n\t}", "@Basic\n\tpublic World getWorld() {\n\t\treturn this.world;\n\t}", "@Basic\n\tpublic World getWorld() {\n\t\treturn this.world;\n\t}", "@Override\n\tpublic World getWorld() { return world; }", "public World getWorld() {\n\t\treturn Bukkit.getWorld(world);\n\t}", "public ArrayList<Country> getWorldPopulation() {\n try {\n Statement stmt = con.createStatement();\n\n //population of people in the world\n String strSelect =\n \" SELECT SUM(country.Population) AS wPopulation\" +\n \" FROM country\";\n\n ResultSet rset = stmt.executeQuery(strSelect);\n System.out.println(\"26. Population of the world.\");\n ArrayList<Country> country = new ArrayList<Country>();\n\n while (rset.next()) {\n Country cnt = new Country();\n cnt.Population = rset.getLong(\"wPopulation\");\n\n System.out.println(\"World Population\" + \" | \" + cnt.Population);\n country.add(cnt);\n }\n return country;\n } catch (Exception e) {\n System.out.println(e.getMessage());\n System.out.println(\"26. Failed to get world population\");\n\n return null;\n }\n }", "public final World getWorld() {\n\t\treturn location.getWorld();\n\t}", "@Nonnull\n Texture getWorldMap();", "public List<Warehouse> findWarehouseAll() {\n\t\t return warehouseDAO.findWarehouseAll();\r\n\t}", "public void load() {\n loadDisabledWorlds();\n chunks.clear();\n for (World world : ObsidianDestroyer.getInstance().getServer().getWorlds()) {\n for (Chunk chunk : world.getLoadedChunks()) {\n loadChunk(chunk);\n }\n }\n }", "public void loadWorld() {\n\t\tint[][] tileTypes = new int[100][100];\n\t\tfor (int x = 0; x < 100; x++) {\n\t\t\tfor (int y = 0; y < 100; y++) {\n\t\t\t\ttileTypes[x][y] = 2;\n\t\t\t\tif (x > 40 && x < 60 && y > 40 && y < 60) {\n\t\t\t\t\ttileTypes[x][y] = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tEntityList entities = new EntityList(0);\n\t\tPlayer player = new Player(Direction.SOUTH_WEST, 50, 50);\n\t\tentities.addEntity(player);\n\t\tentities.addEntity(new Tree(Direction.SOUTH_WEST,49, 49));\n\t\tworld = new World(new Map(tileTypes), player, entities);\n\t}", "World getWorld();", "public OdorWorldPanel getWorldPanel() {\n return worldPanel;\n }", "public ThingNode getWorld()\n {\n return world;\n }", "public Level[] makeLevels() {\n final int nbrLevels = 4;\n Level[] levels = new Level[nbrLevels];\n\n for (int i = 0; i < maps.length; i++) {\n try {\n levels[i] = getMapParser().parseMap(maps[i]);\n } catch (IOException e) {\n throw new PacmanConfigurationException(\n \"Unable to create level, name = \" + getLevelMap(), e);\n }\n }\n\n return levels;\n }", "public final World getWorld() {\n\t\treturn baseTile.getWorld();\n\t}", "public List<OwnedWarp> getAll() {\n List<OwnedWarp> ret = new ArrayList<OwnedWarp>();\n Set<String> keyset = warps.keySet();\n for(String key : keyset)\n ret.addAll(warps.get(key));\n return ret;\n }", "public World getWorld ( ) {\n\t\treturn invokeSafe ( \"getWorld\" );\n\t}", "public String getWorldName() {\n\t\treturn world;\n\t}", "public Weet[] getWeets() {\n return array.getWeetsFromStore();\n //return tree.toArray();\n }", "public static World readWorld() {\n\t\treturn null;\n\t}", "public Iterable<WorldState> solution() {\n return solution;\n }", "public World getCurrentWorld() {\n\t\tassert levelIndex >= 0 && levelIndex < levels.size();\n\t\treturn levels.get(levelIndex);\n\t}", "public java.util.List<Dimension> getDimensionsAll();", "public Collection<OsmDataLayer> getAllLayers() {\n\t\treturn null;\n\t}", "@NotNull\r\n World getWorld();", "public mat4 getMatrix() {\n return worldMatrix;\n }", "public synchronized List<SampleProject> getAll() {\n\t\tif (samples==null) {\n\t\t\tsamples = new ArrayList<SampleProject>();\n\t\t\tregisterLocalSamples();\n\t\t}\n\t\treturn samples;\n\t}", "public ArrayList<Location> getLocations()\n {\n ArrayList<Location> locs = new ArrayList<>();\n for (int row = 0; row < squares.length; row++)\n {\n for (int col = 0; col < squares[0].length; col++)\n {\n locs.add(new Location(row,col));\n }\n }\n return locs;\n }", "public Collection<RegionLocations> getAll() {\n return Collections.unmodifiableCollection(cache.values());\n }", "public String getWorld() {\r\n\t\treturn mainSpawn.getWorld().toString();\r\n\t}", "@Override\r\n\tpublic List<Warehouse> selectAll() {\n\t\treturn warehouseDao.selectAll();\r\n\t}", "private GameWorld getGameWorld(){\n\t\tHashMap<String, Location> locations = new HashMap<String, Location>();\n\t\tHashMap<Avatar, Location> avatarLocations = new HashMap<Avatar, Location>();\n\t\tArrayList<Avatar> avatars = new ArrayList<Avatar>();\n\t\t\n\t\tLocation testLocation = new Location(\"Test Location\");\n\t\tAvatar testAvatar = new Avatar(\"Slim\", 1);\n\t\t\n\t\tlocations.put(\"testLocation\", testLocation);\n\t\tavatarLocations.put(testAvatar, testLocation);\n\t\tavatars.add(testAvatar);\n\t\t\n\t\treturn new GameWorld(locations, avatarLocations, avatars);\n\t}", "public String getWorldName()\n {\n return levelName;\n }", "public static ArrayList<Level> loadAll(){\n\t\tArrayList<Level> all = new ArrayList<Level>();\n\t\tboolean unlocked =false;\n\t\ttry{\n\t\t\tFile dir = new File(\"levels/\");\n\t\t\tFile[] directoryListing = dir.listFiles();\n\t\t\tif(directoryListing != null){ // Use default level directory to create buttons\n\t\t\t\tfor(File child : directoryListing){\n\t\t\t\t\tif (child.getName().equals(\".DS_Store\")) continue;\n\t\t\t\t\tLevelState tmp = new LevelState();\n\t\t\t\t\ttmp.loadState(child.getName());\n\t\t\t\t\tString levelType = tmp.getLevelType();\n\t\t\t\t\tif(levelType != null){\n\t\t\t\t\t\tLevel newLevel = null;\n\t\t\t\t\t\tif(levelType.equals(LevelEditorState.PUZZLE)){\n\t\t\t\t\t\t\tnewLevel = new PuzzleLevel(tmp);\n\t\t\t\t\t\t} else if(levelType.equals(LevelEditorState.LIGHTNING)) {\n\t\t\t\t\t\t\tnewLevel = new LightningLevel(tmp);\n\t\t\t\t\t\t} else if(levelType.equals(LevelEditorState.RELEASE)) {\n\t\t\t\t\t\t\tnewLevel = new ReleaseLevel(tmp);\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(newLevel.getAchievement().getAchievement()>0){\n\t\t\t\t\t\t\tunlocked = true;\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\tunlocked = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(unlocked){\n\t\t\t\t\t\t\tnewLevel.setLocked(false);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tnewLevel.setLocked(true);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tall.add(newLevel);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn all;\n\n\t}", "public Collection<Layer> getAllLayers() {\n return Collections.unmodifiableCollection(layers.values());\n }", "public Collection getLevels(){\n List<String> levels = new ArrayList<>();\n File directoryPath = new File(DATA_PATH+gameName+\"/\");\n for (String s : directoryPath.list()) {\n if (isLevelFile(s)){\n levels.add(getLevelName(s));\n }\n }\n Collections.sort(levels);\n return Collections.unmodifiableList(levels);\n }", "@PersistField\n public WorldData getWorldData()\n {\n return worldData;\n }", "public World(){\r\n locations = new Location[3][3];\r\n for(int r=0; r<3; r+=1){\r\n for(int c=0; c<3; c+=1){\r\n locations[r][c] = new EmptyLocation(new Position(r,c), \"Nothing here to see.\");\r\n }\r\n }\r\n home = locations[0][0];\r\n players = new ArrayList<Player>();\r\n }", "private void generateWorld() {\n\t\t// Loop through all block locations where a block needs to be generated\n\t\tfor(int x=0; x<WORLD_SIZE; x++) {\n\t\t\tfor(int z=0; z<WORLD_SIZE; z++) {\n\t\t\t\tfor(int y=0; y<WORLD_HEIGHT/2; y++) {\n\t\t\t\t\tsetBlockAt(x, y, z, BlockType.STONE);\n\t\t\t\t\tif(y > (WORLD_HEIGHT/2) - 5)\n\t\t\t\t\t\tsetBlockAt(x, y, z, BlockType.DIRT);\n\t\t\t\t\tif(y == (WORLD_HEIGHT/2) -1)\n\t\t\t\t\t\tsetBlockAt(x, y, z, BlockType.GRASS);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\t// Generate NUM_DIAMONDS of diamonds in random locations\n\t\tfor(int i=0; i<NUM_DIAMONDS; i++)\n\t\t\tsetBlockAt(getRandomLocation(), BlockType.DIAMOND);\t\n\t}", "public static synchronized World getWorld() {\n\t\tif (worldInstance == null) {\n\t\t\tworldInstance = new World();\n\t\t\ttry {\n\t\t\t\tworldInstance.wl = new WorldLoader();\n\t\t\t\ttry {\n\t\t\t\t\tServer.print(\"Loading World Data\", false);\n\t\t\t\t\tworldInstance.wl.loadWorld(worldInstance);\n\t\t\t\t\tworldInstance.loadScripts();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tServer.print(\"ERROR\", true);\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} finally {\n\t\t\t\t\tServer.print(\"COMPLETE\", true);\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tServer.print(\"Loading Objects\", false);\n\t\t\t\t\tworldInstance.getDB().loadObjects(worldInstance);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tServer.print(\"ERROR\", true);\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} finally {\n\t\t\t\t\tServer.print(\"COMPLETE\", true);\n\t\t\t\t}\n\n\n\t\t\t} catch (Exception e) {\n\t\t\t\tLogger.error(e);\n\t\t\t}\n\t\t}\n\t\treturn worldInstance;\n\t}", "public String[] getAllLocations() {\n // STUB: Return the list of source names\n return null;\n }", "public void printWorld()\n\t{\n\t\tSystem.out.println(\"***********************World Info*************************\");\n\t\tfor(int i = 0; i<gameObj.length; i++)\n\t\t{\n\t\t\tfor(int j = 0; j < gameObj[i].size(); j++)\n\t\t\t\tSystem.out.println(gameObj[i].get(j).toString());\n\t\t}\n\t\tSystem.out.println(\"***********************World Info*************************\");\n\t}", "public @RequestMapping(\n\t\t\tvalue = \"/party/all\",\n\t\t\tmethod = GET,\n\t\t\tproduces = JSON\n\t) Party[] getAllParties() {\n\t\treturn partyService.getAllParties();\n\t}", "public World() {\n\t\tblockIDArray = new byte[WORLD_SIZE][WORLD_HEIGHT][WORLD_SIZE];\n\t\tentities\t = new ArrayList<Entity>();\n\t\trand\t\t = new Random();\n\t\t\n new GravityThread(this);\n\t\t\t\t\n\t\tgenerateWorld();\n\t}", "private static void generateWorld(){\n for(int i = 0; i < SIZE*SIZE; i++){\n new Chunk();\n }\n }", "public List<WorldStateProperty> getValues ()\n\t{\n\t\treturn new ArrayList<WorldStateProperty>(properties.values());\n\t}", "java.util.List<CoordinateSystem> getCoordinateSystems();", "public static World getInstance() {\n return instance;\n }", "public ImmutableList<CoordinateSystem> getCoordinateSystems() {\n return (coordSys == null) ? ImmutableList.of() : ImmutableList.copyOf(coordSys);\n }", "public long getWorldId() {\n return worldId_;\n }", "public int getCurrentWorldIndex() {\n\t\treturn levelIndex;\n\t}", "public byte [][] getUniverse()\n\t{\n\t\t//creates a byte array that is used for returning the array\n\t\tbyte [][] currentUniverseCopy = new byte [this.height][this.width];\n\t\t//for loop for the row\n\t\tfor (int row =0; row < this.currentVersion.length; row++)\n\t\t{\t//for loop for the column\n\t\t\tfor(int column = 0; column < this.currentVersion[row].length; column++)\n\t\t\t{\n\t\t\t\t//assigning the value from currentVersion to copy array\n\t\t\t\tcurrentUniverseCopy[row][column] = this.currentVersion[row][column];\n\t\t\t}\n\t\t}\n\t\t//return a copy of the array\n\t\treturn currentUniverseCopy; \n\t}", "private TETile[][] initialize() {\n int width = size.width;\n int height = size.height;\n world = new TETile[width][height];\n for (int w = 0; w < width; w++) {\n for (int h = 0; h < height; h++) {\n world[w][h] = Tileset.NOTHING;\n }\n }\n return world;\n }", "public double[][] getLevelSet() {\r\n\t\treturn _levelSet;\r\n\t}", "@Override\n public List<Area> getAllAreas() {\n return new ArrayList<>(areas.values());\n }", "public static void clearWorld() {\r\n \tbabies.clear();\r\n \tpopulation.clear();\r\n }", "public List<Level> getLevels() {\n return levels;\n }", "public WorldServer getWorldServer()\r\n {\r\n return this.theWorldServer;\r\n }", "public static World getWorld(NetworkManager network) {\n\t\treturn getWorld();\n\t}", "public long getWorldId() {\n return worldId_;\n }", "public Set<Location> getPlayerLocations()\n\t{\n\t\tSet<Location> places = new HashSet<Location>();\n\t\tfor(Location place: playerLocations.values())\n\t\t{\n\t\t\tplaces.add(place);\n\t\t}\n\t\treturn places;\n\t}", "public static void clearWorld() {\n\t\tpopulation.clear();\n\t}", "WorldMaterialMap getMaterialMap();", "public ArrayList<ArrayList<Product>> getProductsFromEachWarehouse() {\n ArrayList<ArrayList<Product>> allProducts = new ArrayList<>();\n for (int i = 1; i <= db.maxWarehouses(); i++) {\n allProducts.add(getProducts(i));\n }\n return allProducts;\n }", "public List<SolarSystem> getAllSolarSystems() {\n return interactor.getAllSolarSystems();\n }", "Layer[] getLayers();", "public World makeWorld() {\n World world = new World(1000, 1000);\n world.createEntity().addComponent(new CursorComponent());\n \n ProjectileSystem projectileSystem = new ProjectileSystem();\n world.addSystem(projectileSystem, 1);\n \n return world;\n }", "private void configureWorlds(){\n switch (gameWorld){\n case NORMAL:\n world.setPVP(true);\n world.setKeepSpawnInMemory(false);\n world.setAutoSave(false);\n world.setStorm(false);\n world.setThundering(false);\n world.setAnimalSpawnLimit((int) (mobLimit * 0.45));\n world.setMonsterSpawnLimit((int) (mobLimit * 0.45));\n world.setWaterAnimalSpawnLimit((int) (mobLimit * 0.1));\n world.setDifficulty(Difficulty.HARD);\n break;\n case NETHER:\n world.setPVP(true);\n world.setAutoSave(false);\n world.setKeepSpawnInMemory(false);\n world.setStorm(false);\n world.setThundering(false);\n world.setMonsterSpawnLimit((int) (mobLimit * 0.45));\n world.setAnimalSpawnLimit((int) (mobLimit * 0.45));\n world.setWaterAnimalSpawnLimit((int) (mobLimit * 0.1));\n world.setDifficulty(Difficulty.HARD);\n break;\n }\n }", "@Override @Basic\r\n\tpublic List<SquareDungeon> getLevelsAndShafts() {\r\n\t\tArrayList<SquareDungeon> res = new ArrayList<SquareDungeon>(1);\r\n\t\tres.add(this);\r\n\t\treturn res;\r\n\t}", "public ArrayList<TileSet> getTilesets() {\r\n return this.tileSets;\r\n }", "public Tile[][] getTiles() {\n return tiles;\n }", "public WorldLoader getWorldLoader() {\n\t\treturn loader;\n\t}", "@NotNull\r\n BlockState[] getTileEntities();", "public File getWorldRegionFolder(String worldName);", "public Tile[][] getTiles() {\n return tiles;\n }", "public String[] getGeoSystem();" ]
[ "0.7823441", "0.7306771", "0.67985183", "0.64502203", "0.62968147", "0.61194515", "0.60721534", "0.59929883", "0.59929883", "0.59790677", "0.5971409", "0.5927156", "0.59111005", "0.5868203", "0.5849005", "0.5834432", "0.57999426", "0.5759606", "0.57201284", "0.5696522", "0.56766945", "0.5673955", "0.56620294", "0.5632157", "0.56137735", "0.56137735", "0.55910677", "0.55606806", "0.5553782", "0.5529346", "0.55200195", "0.5518679", "0.54875904", "0.54657346", "0.5457461", "0.54412925", "0.54316205", "0.54289854", "0.54137164", "0.53858817", "0.5376682", "0.5341573", "0.53059375", "0.52460456", "0.52405906", "0.523441", "0.5219445", "0.5207098", "0.5200012", "0.51979584", "0.5196452", "0.5185268", "0.5185142", "0.51821977", "0.5172524", "0.5170716", "0.5149007", "0.51408947", "0.51325846", "0.51265156", "0.5122649", "0.51180524", "0.5085939", "0.5076254", "0.50686395", "0.50571775", "0.50308365", "0.5025368", "0.50138587", "0.49807262", "0.4978354", "0.49780074", "0.4961435", "0.4952719", "0.495239", "0.4944958", "0.4936967", "0.49271756", "0.4924235", "0.49196196", "0.4918413", "0.491602", "0.49149048", "0.49137324", "0.4910804", "0.49094495", "0.49089032", "0.4907286", "0.49056268", "0.49001342", "0.48975208", "0.4889689", "0.4889148", "0.4879059", "0.4876271", "0.4868112", "0.48551464", "0.48507535", "0.4846439", "0.48385403" ]
0.8635757
0