query
stringlengths 7
33.1k
| document
stringlengths 7
335k
| metadata
dict | negatives
sequencelengths 3
101
| negative_scores
sequencelengths 3
101
| document_score
stringlengths 3
10
| document_rank
stringclasses 102
values |
---|---|---|---|---|---|---|
Setter for property defaultAccount. | public void setDefaultAccount(String defaultAccount) {
this.defaultAccount = defaultAccount;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getDefaultAccount() {\n\n return this.defaultAccount;\n }",
"public Account getDefaultAccount() {\n return getNemesisAccount1();\n }",
"public void setDefaultHackystatAccount(String defaultHackystatAccount) {\r\n this.defaultHackystatAccount = defaultHackystatAccount;\r\n }",
"public static Account defaultAccount() {\n return Account.fromHexString(\n \"0xe05d9e08a18cf5573a92d030342c3b45395cd952e02346ba78e16421ee9dad88\");\n }",
"public void setDefaultAccountAndContactAccess(java.lang.String defaultAccountAndContactAccess) {\n this.defaultAccountAndContactAccess = defaultAccountAndContactAccess;\n }",
"public void setDefaultFixedCostAccrual(AccrueType defaultFixedCostAccrual)\r\n {\r\n m_defaultFixedCostAccrual = defaultFixedCostAccrual;\r\n }",
"public void setDefaultLeadAccess(java.lang.String defaultLeadAccess) {\n this.defaultLeadAccess = defaultLeadAccess;\n }",
"public static void setCurrentAccount(Account currentAccount) {\r\n\t\tAccount.currentAccount = currentAccount;\r\n\t}",
"public void setDefault(String defaultValue) {\n this.defaultValue = defaultValue;\n }",
"public java.lang.String getDefaultAccountAndContactAccess() {\n return defaultAccountAndContactAccess;\n }",
"protected void SetDefault() {\r\n\t\tBrickFinder.getDefault().setDefault();\t\t\r\n\t}",
"protected String getDefaultUserName()\n {\n return \"admin\";\n }",
"public void setDefaultValue (String defaultValue) {\n this.defaultValue = defaultValue;\n }",
"public void setDefaultValue(final Object defaultValue);",
"public final DefaultAccount mo17151a() {\n return this.f12933a;\n }",
"public void setCurrentUserAccount(String currentUserAccount);",
"public void setDefaultOwner(boolean defaultOwner) {\r\n\t\tthis.defaultOwner = defaultOwner;\r\n\t}",
"public void setDefaultNumber(Integer defaultNumber) {\n this.defaultNumber = defaultNumber;\n }",
"public final void setDefaultEnvProfile(final String defaultEnvProfile) {\r\n\t\tthis.defaultEnvProfile = defaultEnvProfile;\r\n\t}",
"public static void resetDefaultWallet() {\n\n }",
"public void setDefaultValue(String defaultValue) {\n this.defaultValue = defaultValue;\n }",
"public String getDefaultValue() {\n return defaultValue;\n }",
"public void setDefaultValue(String defaultValue) {\n this.defaultValue = defaultValue;\n }",
"public String getDefaultValue () {\n return defaultValue;\n }",
"public static final Account createDefaultAdminAccount() {\n Name name = new Name(\"Alice\");\n Credential credential = new Credential(\"admin\", \"admin\");\n MatricNumber matricNumber = new MatricNumber(\"A0123456X\");\n PrivilegeLevel privilegeLevel = new PrivilegeLevel(2);\n Account admin = new Account(name, credential, matricNumber, privilegeLevel);\n return admin;\n }",
"public void setDefaultValue(String defaultValue){\n m_defaultValue = defaultValue;\n }",
"public String getDefaultValue() {\n return defaultValue;\n }",
"public void setAccount(Account account) {\n this.account = account;\n }",
"public void setDefaultOpportunityAccess(java.lang.String defaultOpportunityAccess) {\n this.defaultOpportunityAccess = defaultOpportunityAccess;\n }",
"void setAccount(final Account account);",
"PreferenceDefaultValueAttribute getDefaultValue();",
"public void setDefaultProperties(ResourceProperties defaultProperties) {\n this.defaultProperties = defaultProperties;\n update();\n }",
"public void setAccount(String account) {\r\n this.account = account == null ? null : account.trim();\r\n }",
"public String getLoginAccount() {\n return loginAccount;\n }",
"public void setDefaultPricebookAccess(java.lang.String defaultPricebookAccess) {\n this.defaultPricebookAccess = defaultPricebookAccess;\n }",
"public void setAccount(String account) {\r\n\t\tthis.account = account;\r\n\t}",
"public String getAccount() {\r\n\t\treturn account;\r\n\t}",
"static public void setDefaultObject (Object obj) {\n defaultObject = obj;\n }",
"public void setAccount(String account) {\n this.account = account == null ? null : account.trim();\n }",
"public void setAccount(String account) {\n this.account = account == null ? null : account.trim();\n }",
"public void setAccount(String account) {\n this.account = account == null ? null : account.trim();\n }",
"public void setAccount(String account) {\n this.account = account == null ? null : account.trim();\n }",
"public void setAccount(String account) {\n this.account = account == null ? null : account.trim();\n }",
"protected void setToDefault(){\n\n\t}",
"public void setDefaultHackystatPassword(String defaultHackystatPassword) {\r\n this.defaultHackystatPassword = defaultHackystatPassword;\r\n }",
"public String getDefault(){\n return _default;\n }",
"public void setDefaultAssignee(Integer defaultAssignee) {\n this.defaultAssignee = defaultAssignee;\n }",
"public void setAccount(String account) {\n this.account = account;\n }",
"public void setAccount(String account) {\n this.account = account;\n }",
"public void setAccount(String account) {\n this.account = account;\n }",
"public void setAccount(String account) {\n this.account = account;\n }",
"public final Account mo1683b() {\n return this.f1349a != null ? this.f1349a : new Account(\"<<default account>>\", \"com.google\");\n }",
"public void setDefault(boolean aDefault) {\n m_Default = aDefault;\n }",
"public void setLogin(String login) {\n Logger.getGlobal().log(Level.INFO, \"Account: \" +login +\" creating\");\r\n this.login = login;\r\n }",
"public void setDefaultPortConfig(com.vmware.converter.DVPortSetting defaultPortConfig) {\r\n this.defaultPortConfig = defaultPortConfig;\r\n }",
"public void setDefault(String key){\n _default = key;\n }",
"public void setDefaultChoice(final boolean defaultChoice)\r\n\t{\r\n\t\tthis.defaultChoice = defaultChoice;\r\n\t}",
"public String getAccount(){\n\t\treturn account;\n\t}",
"void setDefaultPreference(String preferenceName, String value) throws OntimizeJEERuntimeException;",
"public String getAccount() {\r\n return account;\r\n }",
"public void setDefaultPaymentGroupName(String pDefaultPaymentGroupName);",
"public void SetCurrent(Account a)\n\t{\n\t\tif(current != null)\n\t\t\tcurrent.SetStatus(AccountStatus.LOGOFF);\n\t\t//log in current\n\t\tcurrent = a;\n\t\tcurrent.SetStatus(AccountStatus.LOGIN);\n\t}",
"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 Address getDefaultBillingAddress();",
"public static final Account createDefaultStudentAccount() {\n Name name = new Name(\"Bob\");\n Credential credential = new Credential(\"student\", \"student\");\n MatricNumber matricNumber = new MatricNumber(\"A0123456X\");\n PrivilegeLevel privilegeLevel = new PrivilegeLevel(1);\n Account student = new Account(name, credential, matricNumber, privilegeLevel);\n return student;\n }",
"@Override\n\tpublic void setDefaultAvatar(String userName) {\n\n\t}",
"public void setDefaultTemp(Integer defaultTemp) {\n this.defaultTemp = defaultTemp;\n }",
"public final void setMxSheet_DefaultStyle(com.mendix.systemwideinterfaces.core.IContext context, xlsreport.proxies.MxCellStyle mxsheet_defaultstyle)\r\n\t{\r\n\t\tif (mxsheet_defaultstyle == null)\r\n\t\t\tgetMendixObject().setValue(context, MemberNames.MxSheet_DefaultStyle.toString(), null);\r\n\t\telse\r\n\t\t\tgetMendixObject().setValue(context, MemberNames.MxSheet_DefaultStyle.toString(), mxsheet_defaultstyle.getMendixObject().getId());\r\n\t}",
"public CustomerAddressQuery defaultBilling() {\n startField(\"default_billing\");\n\n return this;\n }",
"public void setToDefault();",
"public final void setMxSheet_DefaultStyle(xlsreport.proxies.MxCellStyle mxsheet_defaultstyle)\r\n\t{\r\n\t\tsetMxSheet_DefaultStyle(getContext(), mxsheet_defaultstyle);\r\n\t}",
"public Builder setLoginAccount(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n loginAccount_ = value;\n onChanged();\n return this;\n }",
"public Builder setLoginAccount(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n loginAccount_ = value;\n onChanged();\n return this;\n }",
"public static Account getCurrentAccount() {\r\n\t\treturn currentAccount;\r\n\t}",
"@Test\n public void test_setDefaultTabAccountId() {\n Long value = 1L;\n instance.setDefaultTabAccountId(value);\n\n assertSame(\"'setDefaultTabAccountId' should be correct.\",\n value, TestsHelper.getField(instance, \"defaultTabAccountId\"));\n }",
"public String getDefaultValue() {\n return this.defaultValue;\n }",
"public void setDefaultText(String defaultText) {\n\t\tthis.defaultText = defaultText;\n\t\thandleConfig(\"defaultText\", defaultText);\n\t}",
"public void setDefault(Type defaultType)\n\t{\n\t\tm_default = defaultType;\n\t}",
"public void setLoginAccount(String loginAccount) {\n this.loginAccount = loginAccount == null ? null : loginAccount.trim();\n }",
"public\n void\n setAccount(Account account)\n {\n itsAccount = account;\n }",
"java.lang.String getLoginAccount();",
"java.lang.String getLoginAccount();",
"public org.xms.g.common.AccountPicker.AccountChooserOptions.Builder setSelectedAccount(android.accounts.Account param0) {\n throw new java.lang.RuntimeException(\"Not Supported\");\n }",
"public void setBasicAccount(BigDecimal basicAccount) {\r\n this.basicAccount = basicAccount;\r\n }",
"protected void setAccountName(final String account) {\n this.account = account;\n }",
"public static void setDefault(BitmapFont font) {\r\n\t\tdefaultFont = font;\r\n\t}",
"public String getDefaultValue() {\n\t\t\treturn this.defaultValue;\n\t\t}",
"public void setDefaultImg(YuiImage defaultImg) {\r\n\t\tthis.defaultImg = defaultImg;\r\n\t}",
"public double getDefaultValue() {\n return defaultValue;\n }",
"public String getDefaultValue() {\n return m_defaultValue;\n }",
"@Generated(hash = 121514453)\n public synchronized void resetAccounts() {\n accounts = null;\n }"
] | [
"0.76759416",
"0.72294736",
"0.72265005",
"0.69693464",
"0.62973344",
"0.58461887",
"0.57954586",
"0.5675055",
"0.56593126",
"0.55833465",
"0.5417761",
"0.5416388",
"0.54004407",
"0.53948385",
"0.5357903",
"0.53552634",
"0.5354253",
"0.5335927",
"0.5327332",
"0.53182596",
"0.5314749",
"0.5313741",
"0.5308393",
"0.5302579",
"0.5295311",
"0.52899474",
"0.52870035",
"0.5267852",
"0.5259315",
"0.5248408",
"0.5246027",
"0.5224228",
"0.5217652",
"0.52111685",
"0.52054334",
"0.5179295",
"0.5166256",
"0.51639587",
"0.51607484",
"0.51607484",
"0.51607484",
"0.51607484",
"0.51607484",
"0.51534784",
"0.5142787",
"0.5128403",
"0.51207",
"0.51158786",
"0.51158786",
"0.51158786",
"0.51158786",
"0.5110504",
"0.51078594",
"0.5097269",
"0.5096855",
"0.5089481",
"0.5066073",
"0.5047363",
"0.50434244",
"0.50278693",
"0.5020605",
"0.5015359",
"0.5013509",
"0.5013509",
"0.5013509",
"0.5013509",
"0.5013509",
"0.5013509",
"0.5013509",
"0.5013509",
"0.5013509",
"0.5013509",
"0.5002371",
"0.49985635",
"0.49928612",
"0.49776873",
"0.49748084",
"0.4971182",
"0.4958711",
"0.49575314",
"0.49529207",
"0.49529207",
"0.49370933",
"0.49252585",
"0.4921458",
"0.49192634",
"0.4916871",
"0.49078977",
"0.49076962",
"0.4907393",
"0.4907393",
"0.49072582",
"0.4906516",
"0.48937774",
"0.4873314",
"0.48632267",
"0.4857422",
"0.48541483",
"0.48541054",
"0.48397952"
] | 0.847193 | 0 |
Getter for property parentKey. | public String getParentKey() {
return this.parentKey;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public long getParentKey() {\n\t\treturn parentKey;\n\t}",
"public String getParentId() {\n return getProperty(Property.PARENT_ID);\n }",
"public String getParentId() {\n return parentId;\n }",
"public String getParentId() {\n return parentId;\n }",
"public String getParentId() {\n return parentId;\n }",
"public String getParentId() {\n return parentId;\n }",
"public String getParentId() {\n return parentId;\n }",
"public String getParentId() {\n return parentId;\n }",
"public String getParentId() {\n return parentId;\n }",
"public String getParentId() {\n return parentId;\n }",
"public String getParentId() {\n return parentId;\n }",
"public Integer getParentId() {\n return parentId;\n }",
"public Integer getParentId() {\n return parentId;\n }",
"public Integer getParentId() {\n return parentId;\n }",
"public Integer getParentid() {\n\t\treturn parentid;\n\t}",
"public void setParentKey(String parentKey) {\n\n this.parentKey = parentKey;\n }",
"public long getParentId()\n {\n return parentId;\n }",
"public String getParentName() {\n return getProperty(Property.PARENT_NAME);\n }",
"public int getParent_id() {\n return this.parent_id;\n }",
"public BinomialTree<KEY, ITEM> parent()\n\t{\n\t\treturn _parent;\n\t}",
"public Long getParentId() {\n return parentId;\n }",
"public Long getParentId() {\n return parentId;\n }",
"public Long getParentId() {\n return parentId;\n }",
"public Long getParentId() {\n return parentId;\n }",
"public java.lang.Long getParentId() {\n return parentId;\n }",
"@Override\r\n\tprotected Object getParentKey(String parentWebSafeKey) {\n\t\treturn null;\r\n\t}",
"public int getParentID() {\n\t\treturn parentID;\n\t}",
"public Long getParentId() {\n return this.parentId;\n }",
"public int getParentId() {\r\n\t\treturn parentId;\r\n\t}",
"public java.lang.Integer getParentId();",
"public int getParentID() {\n\t\treturn _parentID;\n\t}",
"public String getParentId() {\n return getParent() != null ? getParent().getId() : null;\n }",
"public K accessParentKey(T obj);",
"public long getParentCode() {\n return parentCode;\n }",
"public String getParentName() {\n return parentName;\n }",
"public String getParentName() {\n return parentName;\n }",
"public Integer getParentLocationId() {\n return parentLocationId;\n }",
"public String getParent() {\n return _parent;\n }",
"IGLProperty getParent();",
"public void setParentKey(long value) {\n\t\tthis.parentKey = value;\n\t}",
"public String getParent() {\r\n return this.parent;\r\n }",
"@XmlElement\n @Nullable\n public String getParentDocumentId() {\n return this.parentDocumentId;\n }",
"public String getParent() {\n return _theParent;\n }",
"public String getParent() {\r\n return parent;\r\n }",
"public String getParentName() {\n\t\treturn parentName;\n\t}",
"private String getParentKey(IMember member) {\n\t\tIType parent = getParent(member);\n\t\treturn parent.getHandleIdentifier();\n\t}",
"public Long getParentHsCodeId() {\r\n return this.parentHsCodeId;\r\n }",
"@Override\n @Transient\n public Integer getParentId()\n {\n return parentTblId;\n }",
"public String getParent() {\n return parent;\n }",
"public Integer getParentTid() {\r\n return parentTid;\r\n }",
"public int Parent() { return this.Parent; }",
"@Override\n\tpublic String findParentKeyColumnName()\n\t{\n\t\treturn null;\n\t}",
"public java.lang.String getContainingParentId() {\n return containingParentId;\n }",
"public Optional<NamespaceId> getParentId() {\n return parentId;\n }",
"public StructuredId getParent()\r\n {\r\n return parent;\r\n }",
"public Integer getnParentid() {\n return nParentid;\n }",
"@Override\n\t\tpublic String getParentPKFieldName() {\n\t\t\treturn null;\n\t\t}",
"public java.lang.String getContainingParentId() {\n return containingParentId;\n }",
"public String getParentTitle() {\n return getProperty(Property.PARENT_TITLE);\n }",
"public String getParent() {\r\n return (String) getAttributeInternal(PARENT);\r\n }",
"public Long getParentConversationId()\r\n\t{\r\n\t\treturn parentConversationId;\r\n\t}",
"public E getParentEntity() {\n return parentEntity;\n }",
"public Object getParent() {\r\n return this.parent;\r\n }",
"public char parentSide() {\n\t\t\tif (this.getParent().getKey() == -1) {\n\t\t\t\treturn 'N';\n\t\t\t}\n\t\t\tif (this.key == this.parent.getRight().getKey()) {\n\t\t\t\treturn 'R';\n\t\t\t}\n\t\t\treturn 'L';\n\t\t}",
"@ApiModelProperty(example = \"null\", value = \"The backend that is used for when properties are not set. This allows credentials to be set at one backend and used by multiple backends.\")\n public String getParentId() {\n return parentId;\n }",
"final MenuContainer getParent_NoClientCode() {\n return parent;\n }",
"public java.lang.String getContainingParentLevel() {\n return containingParentLevel;\n }",
"public PropertySelector getParent() {\n return parent;\n }",
"public HtmlMap<T> getParent()\n\t{\n\t\treturn this.m_parent;\n\t}",
"public java.lang.String getContainingParentLevel() {\n return containingParentLevel;\n }",
"@DISPID(53)\r\n\t// = 0x35. The runtime will prefer the VTID if present\r\n\t@VTID(58)\r\n\tint parentID();",
"public Object getParent() {\n return this.parent;\n }",
"public Object getParent() {\n return this.parent;\n }",
"public Object getParent() {\n return this.parent;\n }",
"public Foo getParent() {\n return parent;\n }",
"public String getParentFolderId() {\n return parentFolderId;\n }",
"public String propKey() {\n return propKey;\n }",
"public String getParentParamCode() {\n return parentParamCode;\n }",
"@Override\n protected final Object getKey()\n {\n return this;\n }",
"public String getPropKey() {\n return propKey;\n }",
"public String getParentLabel(){\n\t\treturn this.parentLabel;\n\t}",
"@DISPID(84)\r\n\t// = 0x54. The runtime will prefer the VTID if present\r\n\t@VTID(82)\r\n\tint parentID();",
"public int getParentOne()\n\t{\n\t\treturn parentSetOne;\n\t}",
"public Long getParentFolderId() {\n return parentFolderId;\n }",
"public Kit getParent() {\n return this.parent;\n }",
"public String getParentTitle() {\n return parentTitle;\n }",
"public Entity getParent() {\n return parent;\n }",
"public long getParentGroupId() {\n return parentGroupId;\n }",
"public IntColumn getParentId() {\n return delegate.getColumn(\"parent_id\", DelegatingIntColumn::new);\n }",
"public TreeNode getParent ()\r\n {\r\n return parent;\r\n }",
"public Long getParentFolderId() {\r\n\t\treturn parentFolderId;\r\n\t}",
"public Path getParent(\n ) {\n return this.parent;\n }",
"public CUser getParent() {\n return this.parent;\n }",
"public XMLPath getParent() {\r\n return this.parent == null ? null : this.parent.get();\r\n }",
"public com.vmware.converter.ManagedObjectReference getParentFolder() {\r\n return parentFolder;\r\n }",
"public BigDecimal getWtIdParent() {\r\n\t\tif (oldEntrust != null) {\r\n\t\t\treturn oldEntrust.getEntrustId();\r\n\t\t}\r\n\t\treturn wtIdParent;\r\n\t}",
"NestedListKey getKey();",
"public int getParent();",
"public Resource getParent()\n {\n if(parent == null)\n {\n if(parentId != -1)\n {\n try\n {\n parent = new ResourceRef(coral.getStore().getResource(parentId), coral);\n }\n catch(EntityDoesNotExistException e)\n {\n throw new BackendException(\"corrupted data parent resource #\"+parentId+\n \" does not exist\", e);\n }\n }\n else\n {\n parent = new ResourceRef(null, coral);\n }\n }\n try\n {\n return parent.get();\n }\n catch(EntityDoesNotExistException e)\n {\n throw new BackendException(\"in-memory data incosistency\", e);\n }\n }",
"@JsonProperty(\"parent\")\n @ApiModelProperty(value = \"The ID of the parent dialog node (if any).\")\n public String getParent() {\n return parent;\n }"
] | [
"0.8472056",
"0.7580876",
"0.7199181",
"0.7199181",
"0.7199181",
"0.7199181",
"0.7199181",
"0.7199181",
"0.7199181",
"0.7199181",
"0.7199181",
"0.71818656",
"0.71818656",
"0.71818656",
"0.71722144",
"0.7169861",
"0.7152403",
"0.7113205",
"0.70942086",
"0.70913076",
"0.7084989",
"0.7084989",
"0.7084989",
"0.7084989",
"0.7050913",
"0.7010533",
"0.69985807",
"0.6989222",
"0.6985616",
"0.6979157",
"0.6975625",
"0.69370455",
"0.69331133",
"0.69091177",
"0.6883823",
"0.68775153",
"0.6872832",
"0.68711346",
"0.6843911",
"0.68143094",
"0.67979527",
"0.6796812",
"0.6794",
"0.6754778",
"0.67545176",
"0.6729503",
"0.67269284",
"0.66969585",
"0.66690624",
"0.6667735",
"0.6656881",
"0.6623002",
"0.6613275",
"0.6597726",
"0.65882057",
"0.656558",
"0.65603364",
"0.65567243",
"0.65548116",
"0.6547486",
"0.6540215",
"0.6528637",
"0.6507808",
"0.6505771",
"0.64962935",
"0.6489664",
"0.6475434",
"0.6472108",
"0.6463174",
"0.6457227",
"0.644571",
"0.64358306",
"0.64358306",
"0.64358306",
"0.6432066",
"0.6428292",
"0.6427774",
"0.64178693",
"0.6402642",
"0.6389095",
"0.6385053",
"0.6361749",
"0.6360122",
"0.6355709",
"0.6342336",
"0.6336859",
"0.6323451",
"0.63205004",
"0.63061976",
"0.6298503",
"0.6295768",
"0.6288092",
"0.62642974",
"0.62460446",
"0.6242957",
"0.6242242",
"0.62409896",
"0.62270594",
"0.6222573",
"0.6220714"
] | 0.85881 | 0 |
Setter for property parentKey. | public void setParentKey(String parentKey) {
this.parentKey = parentKey;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setParentKey(long value) {\n\t\tthis.parentKey = value;\n\t}",
"public String getParentKey() {\n\n return this.parentKey;\n }",
"public long getParentKey() {\n\t\treturn parentKey;\n\t}",
"public void setParent(String parent) {\n _parent = parent;\n }",
"public void setParent(String parent) {\r\n this.parent = parent;\r\n }",
"public void setParent(String parent) {\n this.parent = parent;\n }",
"void setParent(IGLProperty parent);",
"@Override\r\n\tprotected Object getParentKey(String parentWebSafeKey) {\n\t\treturn null;\r\n\t}",
"private void createSetFKParent(){\n Hashtable table=sqlTagsGeneratorTable.getImportedForeignKeyHash();\n Enumeration enum=table.keys();\n\n buffer.append(\" /**\\n\");\n buffer.append(\" * The <b><code>setFKParent</code></b> method is \");\n buffer.append(\"used to initializes Foreign\\n\");\n buffer.append(\" * Key columns within the HCYP_EVENTS table.\\n\");\n buffer.append(\" * @author Booker Northington II\\n\");\n buffer.append(\" * @version 1.0\\n\");\n buffer.append(\" * @param depth how many levels to initialize.\\n\");\n buffer.append(\" * @return none\\n\");\n buffer.append(\" * @since JDK1.3\\n\");\n buffer.append(\" */\\n\");\n buffer.append(spacer);\n buffer.append(\" public void setFKParent(int depth){\\n\");\n buffer.append(spacer);\n buffer.append(\" if(depth>0){\\n\");\n\n for(;enum.hasMoreElements();){\n String key=(String)enum.nextElement();\n SQLTagsGeneratorForeignKey object=(SQLTagsGeneratorForeignKey)\n table.get(key);\n String fkName=object.getFkName();\n buffer.append(\" \"+fkName+\"_PARENT=get\"+fkName+\"_PARENT\");\n buffer.append(\"(depth-1);\\n\");\n }\n buffer.append(\" }\\n\");\n buffer.append(\" return;\\n\");\n buffer.append(\" }// setFKParent() ENDS\\n\");\n }",
"public void setParent(String aParent) {\n _theParent = aParent;\n }",
"public void setParent(HtmlMap<T> parent)\n\t{\n\t\tthis.m_parent = parent;\n\t}",
"protected void setParent(CodeItem codeItem) {\n this.parent = codeItem;\n }",
"public void setParent(Kit parentKit) {\n this.parent = parentKit;\n }",
"void setParent(Resource parent)\n {\n this.parent = new ResourceRef(parent, coral);\n if(parent != null)\n {\n \tparentId = parent.getId();\n }\n else\n {\n \tparentId = -1;\n }\n }",
"public String getParentId() {\n return parentId;\n }",
"public String getParentId() {\n return parentId;\n }",
"public String getParentId() {\n return parentId;\n }",
"public String getParentId() {\n return parentId;\n }",
"public String getParentId() {\n return parentId;\n }",
"public String getParentId() {\n return parentId;\n }",
"public String getParentId() {\n return parentId;\n }",
"public String getParentId() {\n return parentId;\n }",
"public String getParentId() {\n return parentId;\n }",
"public final synchronized void setParent(final ICache<K, V, D> parent) {\n ICache<K, V, D> current = parent;\n while (current != null) {\n if (current == this)\n throw new IllegalArgumentException(\"Cycle detected, cannot set parent to \" + parent);\n current = current.getParent();\n }\n this.parent = parent;\n }",
"public void setParentID(int parentID) {\n\t\tthis.parentID = parentID;\n\t}",
"public Integer getParentId() {\n return parentId;\n }",
"public Integer getParentId() {\n return parentId;\n }",
"public Integer getParentId() {\n return parentId;\n }",
"public String getParentId() {\n return getProperty(Property.PARENT_ID);\n }",
"void setParentInstId(String parentInstId);",
"public int getParentId() {\r\n\t\treturn parentId;\r\n\t}",
"public long getParentId()\n {\n return parentId;\n }",
"public boolean setParent (\n\t\tfinal BinomialTree<KEY, ITEM> parent)\n\t{\n\t\t_parent = parent;\n\t\treturn true;\n\t}",
"public void setParentId(java.lang.Integer parentId);",
"public Long getParentId() {\n return parentId;\n }",
"public Long getParentId() {\n return parentId;\n }",
"public Long getParentId() {\n return parentId;\n }",
"public Long getParentId() {\n return parentId;\n }",
"public Token setParent_id(int parent_id) {\n this.parent_id = parent_id;\n setParent_idIsSet(true);\n return this;\n }",
"public Integer getParentid() {\n\t\treturn parentid;\n\t}",
"private void setParent(Node<T> parent) {\n this.parent = parent;\n }",
"public java.lang.Long getParentId() {\n return parentId;\n }",
"public void setParentid(Integer parentid) {\n\t\tthis.parentid = parentid;\n\t}",
"public void setParentCode(long value) {\n this.parentCode = value;\n }",
"public void setParent(MenuTree parent){\n this.parentMenuTree = parent;\n }",
"public void setParent(int id);",
"public void setParent(Node parent){\n this.parent = parent;\n }",
"public void setParentOne(int parent)\n\t{\n\t\tparentSetOne = parent;\n\t}",
"void setParent(TestResultTable.TreeNode p) {\n parent = p;\n }",
"public void setParentName(String name) { m_parentName = name; }",
"public int getParentID() {\n\t\treturn parentID;\n\t}",
"public void setParent(Glyph parent) {\n this.parent = parent;\n }",
"<E extends CtElement> E setParent(E parent);",
"public void setParent(PafDimMember parent) {\r\n\t\tthis.parent = parent;\r\n\t}",
"public void setParentTid(Integer parentTid) {\r\n this.parentTid = parentTid;\r\n }",
"@Override\n\tpublic void setParent(WhereNode parent) {\n\t\tthis.parent = parent;\n\t}",
"@Override\n @Transient\n public Integer getParentId()\n {\n return parentTblId;\n }",
"public void setParentHsCodeId(Long value) {\r\n this.parentHsCodeId = value;\r\n }",
"public void setParentLabel(String parentLabel){\n\t\tthis.parentLabel = parentLabel;\n\t}",
"@ApiModelProperty(example = \"null\", value = \"The backend that is used for when properties are not set. This allows credentials to be set at one backend and used by multiple backends.\")\n public String getParentId() {\n return parentId;\n }",
"public Long getParentId() {\n return this.parentId;\n }",
"public void setParent(String value) {\r\n setAttributeInternal(PARENT, value);\r\n }",
"public void setParent(Node parent) {\n this.parent = parent;\n }",
"public static void setParentEventId(ExtendedRecord er, ALATaxonRecord tr) {\n extractOptValue(er, DwcTerm.parentEventID).ifPresent(tr::setParentId);\n }",
"public void setParent(Node<T> parent) {\n this.parent = parent;\n }",
"public void setParent(AbstractConfigNode parent) {\n this.parent = parent;\n }",
"public void setParentName(String parentName) {\n this.parentName = parentName == null ? null : parentName.trim();\n }",
"public void setParent (CompoundExpression parent){\n _parent = parent;\n }",
"public K accessParentKey(T obj);",
"public void setParent(ASTNeoNode parent) {\r\n \t\tassertTrue(parent != null);\r\n \t\tassertTrue(this.parent == null); // Can only set parent once\r\n \t\tthis.parent = parent;\r\n \t}",
"public void setParent (CompoundExpression parent)\r\n\t\t{\r\n\t\t\t_parent = parent;\r\n\t\t}",
"IGLProperty getParent();",
"public int getParentID() {\n\t\treturn _parentID;\n\t}",
"public DiscoveryItem addParent(String key) {\n this.parents.add(key);\n return this;\n }",
"public int getParent_id() {\n return this.parent_id;\n }",
"public void setParentParamCode(String parentParamCode) {\n this.parentParamCode = parentParamCode;\n }",
"public String getParent() {\n return _parent;\n }",
"public String getParent() {\r\n return parent;\r\n }",
"@Override\n\t\tpublic String getParentPKFieldName() {\n\t\t\treturn null;\n\t\t}",
"public void setParent(Instance parent) {\r\n \t\tthis.parent = parent;\r\n \t}",
"public String getParentName() {\n return parentName;\n }",
"public void setParent(@CheckForNull final OtuSet parent) {\n\t\tthis.parent = parent;\n\t}",
"public String getParentName() {\n return parentName;\n }",
"public void setParent(FileNode parent) {\r\n this.parent = parent;\r\n }",
"@Override\n\tpublic String findParentKeyColumnName()\n\t{\n\t\treturn null;\n\t}",
"public StructuredId getParent()\r\n {\r\n return parent;\r\n }",
"public BinomialTree<KEY, ITEM> parent()\n\t{\n\t\treturn _parent;\n\t}",
"@Override\n\tpublic void setParent(Tag parentTag) {\n\t\tthis.parentTag = parentTag;\n\n\t}",
"public void setParentConversationId(Long parentConversationId)\r\n\t{\r\n\t\tthis.parentConversationId = parentConversationId;\r\n\t}",
"public java.lang.Integer getParentId();",
"public String getParentName() {\n return getProperty(Property.PARENT_NAME);\n }",
"public void setParentLayer(EObject newValue);",
"public void setParentLocationId(Integer parentLocationId) {\n this.parentLocationId = parentLocationId;\n }",
"public String getParentName() {\n\t\treturn parentName;\n\t}",
"public String getParent() {\n return parent;\n }",
"public void setParent(Concept _parent) { parent = _parent; }",
"@Override\n public void setParentNode(ConfigurationNode parent)\n {\n this.parent = parent;\n }",
"public void setParent (com.redsaga.hibnatesample.step2.Board _parent) {\n\t\tthis._parent = _parent;\n\t}",
"public long getParentCode() {\n return parentCode;\n }",
"public void setParentDocumentId(@Nullable String parentDocumentId) {\n this.parentDocumentId = parentDocumentId;\n }"
] | [
"0.79322463",
"0.7628721",
"0.7598346",
"0.68272096",
"0.6823095",
"0.6770567",
"0.67478967",
"0.67458993",
"0.6652806",
"0.6626024",
"0.6601961",
"0.6492538",
"0.6489202",
"0.6463157",
"0.64445037",
"0.64445037",
"0.64445037",
"0.64445037",
"0.64445037",
"0.64445037",
"0.64445037",
"0.64445037",
"0.64445037",
"0.64200044",
"0.6389863",
"0.6389197",
"0.6389197",
"0.6389197",
"0.6369064",
"0.6353984",
"0.6346954",
"0.633349",
"0.63289654",
"0.6327248",
"0.63161397",
"0.63161397",
"0.63161397",
"0.63161397",
"0.6306469",
"0.6300254",
"0.628861",
"0.62837166",
"0.62633103",
"0.6260991",
"0.62603515",
"0.62526274",
"0.6230394",
"0.62291396",
"0.62002677",
"0.61992043",
"0.6190109",
"0.61898345",
"0.61726373",
"0.61695606",
"0.61635613",
"0.614515",
"0.6142963",
"0.6135644",
"0.613088",
"0.6129661",
"0.6127768",
"0.6118336",
"0.6116898",
"0.6115252",
"0.6109565",
"0.61057925",
"0.61043465",
"0.6099894",
"0.6096705",
"0.6079222",
"0.6069161",
"0.6068451",
"0.6053612",
"0.6049341",
"0.6041768",
"0.6039694",
"0.6036654",
"0.6035776",
"0.6031328",
"0.60310966",
"0.60308975",
"0.60291886",
"0.6021412",
"0.60105366",
"0.6006691",
"0.6004169",
"0.6003385",
"0.5993659",
"0.59842825",
"0.5980385",
"0.5970609",
"0.5966798",
"0.596021",
"0.5957305",
"0.59563965",
"0.5951977",
"0.5938469",
"0.5932646",
"0.592743",
"0.5926814"
] | 0.8456948 | 0 |
Getter for property balanceSheet. | public String getBalanceSheet() {
return this.balanceSheet;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getBalanceSheetName() {\n\n return this.balanceSheetName;\n }",
"public void setBalanceSheet(String balanceSheet) {\n\n this.balanceSheet = balanceSheet;\n }",
"public int getSheetNumber(){\n return sheetNumber;\n }",
"public int getPropertyBalance()\n {\n return iPropertyBalance.getValue();\n }",
"public DoubleProperty balanceProperty() {\n return balance;\n }",
"public java.math.BigDecimal getBalance() {\n return balance;\n }",
"public BigDecimal getBalance() {\n return balance;\n }",
"public BigDecimal getBalance() {\n return balance;\n }",
"public double getBalance()\n {\n return balance;\n }",
"public String getSheetName(){\n return sheetName;\n }",
"public int getBalance() {\n return balance;\n }",
"public int getBalance() {\n return balance;\n }",
"public double getBalance() {\n return balance;\n }",
"public double getBalance() {\n return balance;\n }",
"public double getBalance() {\n return balance;\n }",
"public double getBalance() {\n return balance;\n }",
"public double getBalance() {\n return balance;\n }",
"public Integer getBalance() {\n return balance;\n }",
"public Integer getBalance() {\n return balance;\n }",
"public double getBalance() {\n return this.balance;\n }",
"public int getBalance() {\n return this.balance;\n\n }",
"public double getBankroll() {\n return bankroll;\n }",
"public int getBalance()\n {\n return balance;\n }",
"public int getPropertyBalance();",
"double getBalance() {\n\t\treturn balance;\n\t}",
"public String getBalance() {\n return this.balance;\n }",
"public double getAmountBank() {\n return this.amountBank;\n }",
"public double getBalance(){\n return this.balance;\r\n }",
"public Double getBalance() {\r\n return balance;\r\n }",
"public String getBalance() {\n return balance;\n }",
"public float getBalance() {\n return balance;\n }",
"public double getBalance()\r\n\t{\r\n\t\treturn balance;\t\t\r\n\t}",
"public double getBalance()\t{\n\t\treturn balance;\n\t}",
"public double getBalance(){\n return balance;\n }",
"public double getBalance() {\n\t\treturn balance;\n\t}",
"public double getBalance() {\n\t\treturn balance;\n\t}",
"public double getBalance() {\n\t\treturn balance;\n\t}",
"public double getBalance() {\n\t\treturn balance;\n\t}",
"public double getBalance() {\n\t\treturn balance;\n\t}",
"public double getBalance(){\n\t\treturn balance;\n\t}",
"public int getBalance() {\n\t\treturn balance;\n\t}",
"public double getBalance(){\n return balance;\n }",
"public double getBalance()\n \n {\n \n return balance;\n \n }",
"public double getBalance() {\r\n\t\t\r\n\t\treturn balance;\r\n\t\t\r\n\t}",
"public double getBalance(){\n return balance;\n }",
"public double getBalance(){\r\n\t\treturn balance;\r\n\t}",
"public double getBal() {\n\t\t return balance;\r\n\t }",
"public double getBalance() \n\t{\n\t\treturn balance;\n\t\t\n\t}",
"public double getBalance(){\n return balance.getBalance();\n }",
"public int getSheetIndex() {\r\n return sheetIndex;\r\n }",
"public String getSheetName() {\n return sheetName;\n }",
"public double getBalance(){\n return balance;\r\n }",
"public final float getBalance() {\n return balance;\n }",
"private double getBalance() { return balance; }",
"public double getBalance() {\n\n double balance = 0;\n balance = overDraftLimit;\n return balance;\n\n }",
"public double getBalance()\n {\n return startingBalance;\n }",
"public int getBankAccount() {\n return bankAccount;\n }",
"public void getBalance() {\n\t\tSystem.out.println(\"Balance in Savings account is\" + balance);\n\t\t//return balance;\n\t}",
"@java.lang.Override\n public com.google.protobuf.ByteString\n getBalanceBytes() {\n java.lang.Object ref = balance_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n balance_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public com.redknee.util.crmapi.soap.subscriptions.xsd._2009._04.SubscriptionBundleBalance[] getBalances(){\n return localBalances;\n }",
"@java.lang.Override\n public java.lang.String getBalance() {\n java.lang.Object ref = balance_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n balance_ = s;\n return s;\n }\n }",
"public Bank getBank() {\r\n return bank;\r\n }",
"public int getBalance() {\n return total_bal;\n }",
"public long getBalance() {\n return this.balance;\n }",
"public long getBalance() {\n\t\n\treturn balance;\n}",
"public AmountOfMoney getCashRegisterBalance(){\n return cashRegister.getBalance();\n }",
"public int getBankAccountNumber() {\n return bankAccountNumber;\n }",
"@Override\npublic Currency getCurrency() {\n\treturn balance.getCurrency();\n}",
"public Money getAvailableCash(){\n\t\treturn availableCash;\n\t}",
"public com.token.vl.service.MoneyWs getAvailable_Balance() {\n return available_Balance;\n }",
"@Override\npublic Money getBalance(Enterprise enterprise, Clerk clerk)\n\t\tthrows PermissionsException {\n\treturn balance;\n}",
"public void setBalanceSheetName(String balanceSheetName) {\n\n this.balanceSheetName = balanceSheetName;\n }",
"public String getBank() {\n return bank;\n }",
"public String getBank() {\r\n return bank;\r\n }",
"public String getBank() {\r\n return bank;\r\n }",
"public long getSheetId() {\r\n return sheetId;\r\n }",
"public com.google.protobuf.ByteString\n getBalanceBytes() {\n java.lang.Object ref = balance_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n balance_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public java.lang.String getBalance() {\n java.lang.Object ref = balance_;\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 balance_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public String balance() {\n\t\treturn this.apiCall(\"balance\", \"\", \"\", true);\n\t}",
"public double getBungaBank() {\n return this.bungaBank;\n }",
"public double getSaldoBank() {\n return this.saldoBank;\n }",
"public Double getBalance() {\n return null;\n }",
"public double getTotalBank() {\n return this.totalBank;\n }",
"public Money getTotalBalance();",
"double getBalance();",
"double getBalance();",
"public java.lang.String getBankNumber() {\n return bankNumber;\n }",
"BalanceSheetDTO findOne(Long id);",
"public Sheet getSheet()\n {\n return ( cells != null & cells.length >= 1\n & cells[0] != null & cells[0].length >= 1\n & cells[0][0] != null\n ? cells[0][0].getSheet() : null );\n }",
"public double getSavingBalance(){\n return this.savingsBalance;\n }",
"public int getSheetOrder() {\n return sheetOrder;\n }",
"ISheet getSheet(int index);",
"@Override\n\tpublic Sheet getSheet() {\n\t\treturn null;\n\t}",
"public BigDecimal getCashMoney() {\n return cashMoney;\n }",
"public java.lang.String getBankaccount() {\r\n return localBankaccount;\r\n }",
"public static Bank getBank() {\n return Bank;\n }",
"public String getBank() {\n\t\tthis.setBank(this.bank);\n\t\treturn this.bank;\n\t}",
"public String getSupAcctBank() {\n return supAcctBank;\n }",
"public java.lang.String getBankNo() {\r\n return localBankNo;\r\n }",
"public java.lang.String getBankNo() {\r\n return localBankNo;\r\n }"
] | [
"0.744322",
"0.6299696",
"0.6197952",
"0.60458875",
"0.60009474",
"0.5921468",
"0.59126747",
"0.59126747",
"0.589234",
"0.5889948",
"0.5886516",
"0.5886516",
"0.58854824",
"0.58827174",
"0.58827174",
"0.58827174",
"0.58827174",
"0.58794934",
"0.58794934",
"0.58783853",
"0.58767295",
"0.587572",
"0.58683676",
"0.5842791",
"0.5829853",
"0.58190584",
"0.5814208",
"0.5807087",
"0.5793093",
"0.57857823",
"0.5784609",
"0.5779614",
"0.5775873",
"0.5771706",
"0.5766606",
"0.5766606",
"0.5766606",
"0.5766606",
"0.5766606",
"0.5750094",
"0.57498527",
"0.5747672",
"0.57461864",
"0.5722636",
"0.57215446",
"0.57205653",
"0.5703169",
"0.56978714",
"0.56974685",
"0.56773376",
"0.5663859",
"0.56571645",
"0.5645532",
"0.56444776",
"0.5637774",
"0.5596411",
"0.55751115",
"0.5535419",
"0.5526469",
"0.5503912",
"0.54709685",
"0.54537296",
"0.54490596",
"0.54345787",
"0.5427141",
"0.541829",
"0.5412444",
"0.54002",
"0.5394053",
"0.5389707",
"0.5386759",
"0.5384935",
"0.53722346",
"0.53341705",
"0.53341705",
"0.53247803",
"0.530055",
"0.52723634",
"0.527186",
"0.52657884",
"0.525952",
"0.5247326",
"0.52446365",
"0.524118",
"0.5240889",
"0.5240889",
"0.522374",
"0.52230936",
"0.52116",
"0.5209307",
"0.5188226",
"0.51825935",
"0.51733303",
"0.5152049",
"0.5135258",
"0.5121777",
"0.509787",
"0.50969476",
"0.5082527",
"0.5082527"
] | 0.81792957 | 0 |
Setter for property balanceSheet. | public void setBalanceSheet(String balanceSheet) {
this.balanceSheet = balanceSheet;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getBalanceSheet() {\n\n return this.balanceSheet;\n }",
"public void setBalanceSheetName(String balanceSheetName) {\n\n this.balanceSheetName = balanceSheetName;\n }",
"public String getBalanceSheetName() {\n\n return this.balanceSheetName;\n }",
"public void setBalance(){\n balance.setBalance();\n }",
"private void setBalance(double balance) {\n this.balance = balance;\n }",
"public void setBalance(Integer balance) {\n this.balance = balance;\n }",
"public void setBalance(Integer balance) {\n this.balance = balance;\n }",
"public void setBalance(double balance){\n\t\tthis.balance = balance;\n\t}",
"public void setBalance(double bal){\n balance = bal;\r\n }",
"public void setBalance(float balance) {\n this.balance = balance;\n }",
"public void setBalance(final int balance)\n {\n this.balance = balance;\n }",
"public void setBalance(BigDecimal balance) {\n this.balance = balance;\n }",
"public void setBalance(BigDecimal balance) {\n this.balance = balance;\n }",
"public void setBalance(double balance)\n {\n startingBalance = balance;\n }",
"public void setBalance(double balance) {\n\t\tthis.balance = balance;\n\t}",
"public synchronized void setBalance(double balance) {\n this.balance = balance;\n }",
"public void setBalance(java.math.BigDecimal balance) {\n this.balance = balance;\n }",
"void setManageTransactionBalance(String balance);",
"public void setBalance(Double balance) {\r\n this.balance = balance;\r\n }",
"void setBalance(double value);",
"public void setBalance(int balance) {\r\n\t\tif(0<=balance&&balance<=1000000) {\r\n\t\tthis.balance = balance;\r\n\t}else{\r\n\t\t System.out.println(\"잘못 입력하셨습니다. 현재 잔고는 \"+this.balance+\"입니다\");\r\n\t}\r\n \r\n}",
"public void setSheetNumber(int number){\n this.sheetNumber = number;\n }",
"protected void setTotalBalance(double balance)\r\n {\r\n totalBalance = balance;\r\n }",
"public void setSheetNumberForGermplasm(Integer sheetNumber);",
"public boolean setPropertyBalance(int aValue);",
"public boolean setBalance(float balance) {\r\n\t\tif(isValidBalance(balance)){\r\n\t\t\tthis.balance = balance;\r\n\t\t\treturn true;\r\n\t\t}else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"public int getSheetNumber(){\n return sheetNumber;\n }",
"public void setBalance( long balance ) {\r\n this.balance = balance;\r\n }",
"public void setSheetIndex(int sheetIndex) {\r\n this.sheetIndex = sheetIndex;\r\n }",
"public boolean setPropertyBalance(int aValue)\n {\n return setPropertyInt(iPropertyBalance, aValue);\n }",
"Account(int balance) {\n if(balance <0) this.balance=0;\n this.balance = balance;\n }",
"public void setBank(Bank bank) {\r\n this.bank = bank;\r\n }",
"public DoubleProperty balanceProperty() {\n return balance;\n }",
"@Override\n public void setBean(TimeSheet t)\n {\n \n }",
"public void setBalance(float value)\n {\n balanceCtrl.setValue(value);\n }",
"public void setAmountBank(double amountBank) {\n this.amountBank = amountBank;\n }",
"public void setSheetId(long value) {\r\n this.sheetId = value;\r\n }",
"public void setSheetName(String name){\n this.sheetName = name;\n }",
"@Override\n protected void setBankNum(int bankNum) {\n }",
"public String getSheetName(){\n return sheetName;\n }",
"public BigDecimal getBalance() {\n return balance;\n }",
"public BigDecimal getBalance() {\n return balance;\n }",
"public BankAccount(int balance) {\n\n this.balance = balance;\n\n }",
"public void setCurrentCash(double value) {\r\n this.currentCash = value;\r\n }",
"void updateBalance(int amount){ \n\t\tbalance = amount;\n\t}",
"@ZAttr(id=355)\n public void setPrefSkin(String zimbraPrefSkin) throws com.zimbra.common.service.ServiceException {\n HashMap<String,Object> attrs = new HashMap<String,Object>();\n attrs.put(Provisioning.A_zimbraPrefSkin, zimbraPrefSkin);\n getProvisioning().modifyAttrs(this, attrs);\n }",
"void setBank(shared.data.Bank bank);",
"public void setWorkbook(Workbook workbook){\n this.workbook = workbook;\n }",
"public double getBalance(){\r\n\t\treturn balance;\r\n\t}",
"public void enablePropertyBalance()\n {\n iPropertyBalance = new PropertyInt(new ParameterInt(\"Balance\"));\n addProperty(iPropertyBalance);\n }",
"public void setBalance() {\n System.out.print(\"Set the balance of your credit card: \");\n this.balance = Double.parseDouble(scanner.nextLine());\n }",
"public void setBalance(double newBalance) {\n\t\tbalance = newBalance;\n\t\tbalance = Math.round(balance * 100.0) / 100.0;\n\t}",
"public void setActiveSheet(int arg0) {\n\n\t}",
"public int getSheetIndex() {\r\n return sheetIndex;\r\n }",
"public double getBalance(){\n\t\treturn balance;\n\t}",
"public void setBalance(T balance) {\n transactions = new ArrayList<Transaction>();\n\t\ttransactions.add(new Transaction<T>('+', balance));\n }",
"public double getBal() {\n\t\t return balance;\r\n\t }",
"public double getBalance() {\n return balance;\n }",
"public double getAmountBank() {\n return this.amountBank;\n }",
"public void setSaldoBank(double saldoBank) {\n this.saldoBank = saldoBank;\n }",
"public float getBalance() {\n return balance;\n }",
"public int getBalance() {\n\t\treturn balance;\n\t}",
"public int getBalance() {\n return balance;\n }",
"public int getBalance() {\n return balance;\n }",
"public void setBankroll(double money) {\n bankroll += money;\n if (bankroll <= 0){\n activePlayer = false;\n }\n }",
"public void setSheetName(String sheetName) {\n this.sheetName = sheetName;\n }",
"public void setSheetNameForGermplasm(String sheetName);",
"public Person balance(Integer balance) throws InvalidValueException\n {\n if(balance != null) NotNegIntImpl.edma_validate(balance);\n if(balance == null) throw new NullPointerException(\"The field balance in the Person ValueDomain may not be null\");\n edma_value[4] = NotNegIntImpl.edma_create(balance);\n return new PersonImpl(PersonImpl.edma_create(edma_value));\n }",
"public double getBalance() {\n return balance;\n }",
"public double getBalance() {\n return balance;\n }",
"public double getBalance() {\n return balance;\n }",
"public double getBalance() {\n return balance;\n }",
"public double getBalance(){\n return balance;\n }",
"public void setSheetSelected(int posSheet) {\n try {\n workbook.setActiveSheet(posSheet);\n } catch (IllegalArgumentException ex) {\n workbook.setActiveSheet(0);\n }\n }",
"public double getBankroll() {\n return bankroll;\n }",
"public java.math.BigDecimal getBalance() {\n return balance;\n }",
"public void setBalance( Integer account_id, double balance ){\r\n\r\n Map<String, String> params = new HashMap<>();\r\n params.put(\"account_id\", String.valueOf(account_id));\r\n params.put(\"balance\", String.valueOf(balance));\r\n String url = API_DOMAIN + ACCOUNT_EXT + SET_BALANCE;\r\n this.makeVolleyRequest( url, params );\r\n }",
"public int getBalance() {\n return this.balance;\n\n }",
"public double getBalance(){\n return balance;\r\n }",
"public Integer getBalance() {\n return balance;\n }",
"public Integer getBalance() {\n return balance;\n }",
"public String getSheetName() {\n return sheetName;\n }",
"public double getBalance(){\n return balance;\n }",
"public String getBalance() {\n return this.balance;\n }",
"public double getBalance()\n {\n return balance;\n }",
"public void setNewBalance() {\n\t\tacc.setBankBalance(acc.getBalance() - keyboard.getAmt());\r\n\t}",
"public void setInitilaCash(int noOfBills) throws java.lang.Exception;",
"public Double getBalance() {\r\n return balance;\r\n }",
"public double getBalance(){\n return this.balance;\r\n }",
"public double getBalance() {\n\t\treturn balance;\n\t}",
"public double getBalance() {\n\t\treturn balance;\n\t}",
"public double getBalance() {\n\t\treturn balance;\n\t}",
"public double getBalance() {\n\t\treturn balance;\n\t}",
"public double getBalance() {\n\t\treturn balance;\n\t}",
"public String getBalance() {\n return balance;\n }",
"public int getBalance()\n {\n return balance;\n }",
"public Object putSheetOverlay(String sheetName, String beanPath, Object value) {\n Sheet sheet = getOrCreateSheet(sheetName); \n Object prevVal = sheet.getMap().put(beanPath, value);\n try {\n sheet.prime(); \n } catch (TypeMismatchException tme) {\n // revert to presumably non-damaging value\n sheet.getMap().put(beanPath, prevVal);\n throw tme;\n }\n return prevVal; \n }",
"public double getBalance()\n \n {\n \n return balance;\n \n }",
"public Builder setBalance(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n balance_ = value;\n onChanged();\n return this;\n }",
"@java.lang.Override\n public com.google.protobuf.ByteString\n getBalanceBytes() {\n java.lang.Object ref = balance_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n balance_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }"
] | [
"0.6625287",
"0.62178606",
"0.6105502",
"0.5845823",
"0.572289",
"0.5654274",
"0.5654274",
"0.56294125",
"0.5626554",
"0.56137294",
"0.56129533",
"0.55746204",
"0.55746204",
"0.5559323",
"0.55185705",
"0.54869115",
"0.547452",
"0.54459906",
"0.54367095",
"0.5400039",
"0.5399019",
"0.5352107",
"0.52172697",
"0.51904947",
"0.518797",
"0.5163676",
"0.5146474",
"0.5137478",
"0.5035285",
"0.5019457",
"0.49641",
"0.49594343",
"0.48879424",
"0.48841265",
"0.48791826",
"0.48753867",
"0.48660854",
"0.4865607",
"0.48589122",
"0.47946006",
"0.47451115",
"0.47451115",
"0.47435772",
"0.4730954",
"0.4725313",
"0.4723366",
"0.4722118",
"0.47012505",
"0.46846965",
"0.46755376",
"0.46681976",
"0.46658465",
"0.46627733",
"0.46597937",
"0.46597737",
"0.46590677",
"0.46578535",
"0.4648784",
"0.46451202",
"0.46420503",
"0.46381518",
"0.46353558",
"0.46314037",
"0.46314037",
"0.4628196",
"0.4623969",
"0.46158502",
"0.46131912",
"0.4609302",
"0.4609302",
"0.4609302",
"0.4609302",
"0.46083984",
"0.4604438",
"0.46036696",
"0.4591881",
"0.45903006",
"0.45858064",
"0.45815414",
"0.4578251",
"0.4578251",
"0.4577274",
"0.45751294",
"0.45728946",
"0.45722854",
"0.4569498",
"0.45689067",
"0.45688736",
"0.45680612",
"0.45673516",
"0.45673516",
"0.45673516",
"0.45673516",
"0.45673516",
"0.45654124",
"0.45638087",
"0.45624566",
"0.4561001",
"0.4560633",
"0.45477858"
] | 0.75847566 | 0 |
Getter for property balanceSheetName. | public String getBalanceSheetName() {
return this.balanceSheetName;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getSheetName(){\n return sheetName;\n }",
"public String getSheetName() {\n return sheetName;\n }",
"public String getBalanceSheet() {\n\n return this.balanceSheet;\n }",
"public void setBalanceSheetName(String balanceSheetName) {\n\n this.balanceSheetName = balanceSheetName;\n }",
"java.lang.String getBankName();",
"public String getUs1120sheetName() {\n\n return this.us1120sheetName;\n }",
"@Nullable\n protected final String getBeanName() {\n return this.beanName;\n }",
"public java.lang.String getBankName() {\n java.lang.Object ref = bankName_;\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 bankName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public void setSheetName(String name){\n this.sheetName = name;\n }",
"public String getBankName() {\n return bankName;\n }",
"@Nullable\n public String getBankName() {\n return bankName;\n }",
"public java.lang.String getBankName() {\n java.lang.Object ref = bankName_;\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 bankName_ = s;\n return s;\n }\n }",
"public String getSheetName(int arg0) {\n\t\treturn null;\n\t}",
"public void setBalanceSheet(String balanceSheet) {\n\n this.balanceSheet = balanceSheet;\n }",
"public int getSheetNumber(){\n return sheetNumber;\n }",
"public com.google.protobuf.ByteString\n getBankNameBytes() {\n java.lang.Object ref = bankName_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n bankName_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public String getBookName()\r\n {\r\n\treturn bookName;\r\n }",
"public String getWardsName() {\r\n return wardsName;\r\n }",
"public com.google.protobuf.ByteString\n getBankNameBytes() {\n java.lang.Object ref = bankName_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n bankName_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public String getBeanName() {\r\n\t\treturn beanName;\r\n\t}",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getBookName();",
"com.google.protobuf.ByteString\n getBankNameBytes();",
"public final String getName() {\n/* 231 */ return \"sheet-collate\";\n/* */ }",
"public String getCellname() {\r\n return cellname;\r\n }",
"java.lang.String getEmployeeName();",
"String getAbsoluteName() {\n return absoluteName;\n }",
"public void setSheetName(String sheetName) {\n this.sheetName = sheetName;\n }",
"public java.lang.String getBsifbookname()\r\n {\r\n return _bsifbookname;\r\n }",
"public void setSheetNameForGermplasm(String sheetName);",
"public String getName() {\n LOGGER.trace(\"Called the AccountCashBalance getName() with no parameters.\");\n\n LOGGER.trace(\"Leaving the AccountCashBalance getName().\");\n LOGGER.trace(RETURNING + NAME + \">\");\n\n return NAME;\n }",
"public String getBankName()\n\t{\n\t\tif(response.containsKey(\"BANK_NAME\")) {\n\t\t\treturn response.get(\"BANK_NAME\");\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}",
"ISheet getSheet(String name);",
"public String getBookname() {\n return bookname;\n }",
"public String getName()\n {\n ensureLoaded();\n return m_clzName.getValue();\n }",
"public String getUs1120sheet() {\n\n return this.us1120sheet;\n }",
"public String getBookNameCn() {\n return bookNameCn;\n }",
"public String getter() {\n\t\treturn name;\n\t}",
"public int getSheetIndex() {\r\n return sheetIndex;\r\n }",
"public String getBName() {\n\t\tif (getAbsoluteName)\n\t\t\treturn absoluteName;\n\t\telse\n\t\t\treturn shortName;\n\t}",
"public String getAddressBookName() {\n return addressBookName;\n }",
"public String getCardName() {\n \t\treturn cardName;\n \t}",
"public String getsName() {\n return sName;\n }",
"public String getName() { return name.get(); }",
"public String getBookName() {\n return (String)getAttributeInternal(BOOKNAME);\n }",
"public String getAccountHolderName() {\n return mAccountHolderName;\n }",
"public java.lang.String getName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(NAME$0, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }",
"public java.lang.String getName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(NAME$0, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }",
"String getBrickName();",
"public String getBName()\n\t{\n\t\treturn bName;\n\t}",
"private String name() {\n return Strings.concat(Token.DOLLAR, name.string());\n }",
"public java.lang.String getName()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(NAME$0, 0);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getStringValue();\r\n }\r\n }",
"String getPropertyName();",
"@Basic( optional = true )\n\t@Column( name = \"book_name\", length = 2147483647 )\n\tpublic String getBookName() {\n\t\treturn this.bookName;\n\t\t\n\t}",
"public String getName() { //declare public type, return type: String\r\n\t\treturn mName; //return mName value\r\n\t}",
"public String getCardName(){\n return type.getType() + \" of \" + suit.getSuit();\n }",
"public String getBartenderName()\n {\n return bartenderName;\n }",
"@Internal(\"Represented as part of archiveName\")\n public String getBaseName() {\n return baseName;\n }",
"public String getRacerName() {\n return myName;\n }",
"public String getCardName() {\r\n\t\treturn cardName;\r\n\t}",
"public Map<String,Sheet> getSheetsByName() {\n return this.sheetsByName;\n }",
"public String getStrName() {\n return strName;\n }",
"public String getStyleSheetName()\n {\n return _styleSheetName;\n }",
"public String getBucketName() {\n return getProperty(BUCKET_NAME);\n }",
"public final String getBname() {\n return bname;\n }",
"@JsonProperty(\"backupName\")\n public String getBackupName() {\n return backupName;\n }",
"public String getAccountName() {\r\n return accountName;\r\n }",
"public String getAccountName() {\n return accountName;\n }",
"public String getAccountName() {\n return accountName;\n }",
"public String getAccountName() {\n return accountName;\n }",
"@Override\n\t@Transient\n\t @JSON(serialize=false) \n\tpublic String getFoldName() {\n\t\treturn bookName+\"-\"+author;\n\t}",
"public java.lang.String getFromName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(FROMNAME$4, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }",
"String getCardLastName(String bookingRef);",
"PropertyName getName();",
"public String backupName() {\n return this.backupName;\n }",
"public String getName() {\n return name.get();\n }",
"public String getName() {\n return (this.name);\n }",
"public java.lang.String getName()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NAME$26);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getStringValue();\r\n }\r\n }",
"@JsonProperty(PROP_NAME)\n @Nonnull\n public String getName() {\n return _name;\n }",
"public String getName() {\r\n\t\treturn name.get();\r\n\t}",
"public String getBairro() {//Retorna o nome do bairro.\r\n\t\treturn bairro;\r\n\t}",
"@Override\n public String getBorrowerName() {\n return borrower.getUsername();\n }",
"public String getAccountName() {\n return this.accountName;\n }",
"public java.lang.String getName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NAME$4);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }",
"public String getName() { return (String)get(\"Name\"); }",
"public String getName()\n {\n return (this.name);\n }",
"public String getName() {\n return (String) getValue(NAME);\n }",
"public String getBucketName() {\n\treturn _bucketName;\n }",
"public java.lang.String getBranchName() {\n return branchName;\n }",
"Object getName() {\n return name;\n }",
"public String getName() \n {\n return m_sName;\n }",
"java.lang.String getExchangeName();",
"public java.lang.String getName()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NAME$6);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getStringValue();\r\n }\r\n }",
"public String getBranchName() {\n return branchName;\n }",
"public String getBranchName() {\r\n return branchName;\r\n }",
"public NavigableMap<String,List<String>> getSheetsNamesBySurt() {\n return this.sheetNamesBySurt;\n }",
"java.lang.String getBusinessName();",
"@Override\n public String getName() {\n final String name = getClass().getName();\n final int lastDollar = name.lastIndexOf('$');\n return name.substring(lastDollar + 1);\n }",
"public String getCustomName ( ) {\n\t\treturn extract ( handle -> handle.getCustomName ( ) );\n\t}",
"public String getName() {\r\n return myName;\r\n }",
"public String getName() \r\n {\r\n return studentName;\r\n }"
] | [
"0.74961305",
"0.74940383",
"0.7320977",
"0.666527",
"0.6365567",
"0.6298364",
"0.6016298",
"0.60134673",
"0.60055983",
"0.5967524",
"0.596336",
"0.59284",
"0.58819634",
"0.58302873",
"0.5785034",
"0.57278985",
"0.57224935",
"0.5714143",
"0.57064444",
"0.5687439",
"0.56760967",
"0.565806",
"0.563386",
"0.56231993",
"0.5606333",
"0.560612",
"0.5593168",
"0.5584628",
"0.55792683",
"0.55460036",
"0.5517614",
"0.5514097",
"0.5502614",
"0.5497814",
"0.5496961",
"0.54959184",
"0.5493",
"0.54844934",
"0.5482165",
"0.54818237",
"0.5481052",
"0.54750085",
"0.54632795",
"0.54531217",
"0.54521096",
"0.5444664",
"0.5444664",
"0.5442605",
"0.5439576",
"0.5437996",
"0.54223806",
"0.5422112",
"0.5418933",
"0.5401842",
"0.53962165",
"0.53826046",
"0.5375136",
"0.5374731",
"0.53734815",
"0.5372298",
"0.53716326",
"0.5366517",
"0.5363851",
"0.536334",
"0.53625554",
"0.5355968",
"0.5344649",
"0.5344649",
"0.5344649",
"0.53301567",
"0.5327714",
"0.5318044",
"0.5317195",
"0.53129554",
"0.5311323",
"0.5306261",
"0.5292758",
"0.52886945",
"0.5287746",
"0.52848315",
"0.5280191",
"0.52662134",
"0.5265386",
"0.5265009",
"0.5263963",
"0.52589166",
"0.52545214",
"0.5250944",
"0.5250444",
"0.52476573",
"0.5232888",
"0.52315354",
"0.5227351",
"0.5225883",
"0.5225187",
"0.52246493",
"0.5219901",
"0.5219579",
"0.5218519",
"0.52140915"
] | 0.8568212 | 0 |
Setter for property balanceSheetName. | public void setBalanceSheetName(String balanceSheetName) {
this.balanceSheetName = balanceSheetName;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getBalanceSheetName() {\n\n return this.balanceSheetName;\n }",
"public void setBalanceSheet(String balanceSheet) {\n\n this.balanceSheet = balanceSheet;\n }",
"public void setSheetName(String name){\n this.sheetName = name;\n }",
"public void setSheetNameForGermplasm(String sheetName);",
"public String getSheetName() {\n return sheetName;\n }",
"public void setSheetName(String sheetName) {\n this.sheetName = sheetName;\n }",
"public String getSheetName(){\n return sheetName;\n }",
"public void setSheetName(int arg0, String arg1) {\n\n\t}",
"private void setExcelName(String excelName) {\n this.excelName = excelName;\n }",
"public String getBalanceSheet() {\n\n return this.balanceSheet;\n }",
"public SpriteSheetSplitter setName(String name) {\n this.name = name;\n return this;\n }",
"public String getUs1120sheetName() {\n\n return this.us1120sheetName;\n }",
"public java.lang.String getBankName() {\n java.lang.Object ref = bankName_;\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 bankName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public void setBookName(java.lang.String value);",
"public void setAccountName(String accountName){\n if(checkAccountClosed()){\n System.out.println(\"This transaction could not be processed. Please check your account status.\");\n }\n this.accountName = accountName;\n }",
"public Builder setBankName(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n bankName_ = value;\n onChanged();\n return this;\n }",
"public com.google.protobuf.ByteString\n getBankNameBytes() {\n java.lang.Object ref = bankName_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n bankName_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public void setTabName(String value) {\n this.tabName = value;\n }",
"public java.lang.String getBankName() {\n java.lang.Object ref = bankName_;\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 bankName_ = s;\n return s;\n }\n }",
"public void setName (String n) {\n name = n;\n }",
"java.lang.String getBankName();",
"public void setBookName(String value) {\n setAttributeInternal(BOOKNAME, value);\n }",
"void xsetName(org.apache.xmlbeans.XmlString name);",
"void xsetName(org.apache.xmlbeans.XmlString name);",
"public void setName(String n) {\r\n name = n;\r\n }",
"public com.google.protobuf.ByteString\n getBankNameBytes() {\n java.lang.Object ref = bankName_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n bankName_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public String getBankName() {\n return bankName;\n }",
"private void setName(String name) {\n name = name.trim().replaceAll(\"\\\"\", \"\");\n name = name.substring(0,1).toUpperCase() + name.substring(1);\n\n this.name = name;\n }",
"public void setName (String n){\n\t\tname = n;\n\t}",
"public void setName(AXValue name) {\n this.name = name;\n }",
"public final void setName(final String inName) {\n mName = inName;\n }",
"@Override\n\tpublic void setBeanName(String beanname) {\n\t\t\n\t\tSystem.out.println(\"Bean name is : \" + beanname);\n\t\t\n\t}",
"@Override\n\tpublic void setBeanName(String beanName) {\n\t\tSystem.out.println(\"Bean Name:\"+beanName);\n\t\t\n\t}",
"public void setName(String name) {\r\n this.name = name.trim();\r\n }",
"private void setName(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n name_ = value;\n }",
"public void setsName(String sName) {\n this.sName = sName == null ? null : sName.trim();\n }",
"@Override\n public void setBeanName(String name) {\n System.out.println(\"## setBeanName(name) My bean Name is : \" + name);\n }",
"public void setBankName(String bankName) {\n this.bankName = bankName;\n }",
"public void setName (String name){\n \n boyName = name;\n }",
"private void updateDisplayName() {\n String path;\n FileObject webRoot = ProjectWebRootQuery.getWebRoot(styleSheet);\n if(webRoot == null) {\n path = styleSheet.getNameExt();\n } else {\n path = FileUtil.getRelativePath(webRoot, styleSheet);\n }\n setDisplayName(path);\n }",
"@Override\n public void setName(String name)\n {\n checkState();\n this.name = name;\n }",
"private void setName(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n name_ = value;\n }",
"private void setName(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n name_ = value;\n }",
"private void setName(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n name_ = value;\n }",
"private void setName(String nameIn){\r\n\t\tplayerName = nameIn;\r\n\t}",
"public void setName(String name)\n {\n this.name = name.trim();\n }",
"@Nullable\n public String getBankName() {\n return bankName;\n }",
"public void setNameString(String s) {\n nameString = s;\r\n }",
"public void adjustName() {\n Item item = getItem();\n if (!item.isFixedName()) {\n if (item.getSchemaComponent().type() == SchemaBase.SEQUENCE_TYPE) {\n if (m_values.size() > 0) {\n Item childitem = ((DataNode)m_values.get(0)).getItem();\n if (item != childitem) {\n item.setName(childitem.getEffectiveName());\n }\n }\n }\n }\n }",
"public void setName(final String nameValue) {\n this.name = nameValue;\n }",
"public void setName(final String nameValue) {\n this.name = nameValue;\n }",
"public void setName(final String nameValue) {\n this.name = nameValue;\n }",
"public void setName(String n) {\r\n\t\tthis.name = n;\r\n\t}",
"public void setBankName(String bankName) {\n this.bankName = bankName == null ? null : bankName.trim();\n }",
"public void setName(java.lang.String name)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(NAME$0, 0);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(NAME$0);\r\n }\r\n target.setStringValue(name);\r\n }\r\n }",
"public void setName(java.lang.String name)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(NAME$0, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(NAME$0);\n }\n target.setStringValue(name);\n }\n }",
"public void setName(java.lang.String name)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(NAME$0, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(NAME$0);\n }\n target.setStringValue(name);\n }\n }",
"public String getSheetName(int arg0) {\n\t\treturn null;\n\t}",
"public void setName(final String nameValue) {\n this.name = nameValue;\n }",
"public void setName(final String nameValue) {\n this.name = nameValue;\n }",
"public void setName(final String nameValue) {\n this.name = nameValue;\n }",
"public Binding setName(StringDt theValue) {\n\t\tmyName = theValue;\n\t\treturn this;\n\t}",
"public void setName(String n) {\n this.name = n;\n }",
"public void setName(String nameIn) {\n name = nameIn;\n }",
"public void setName(java.lang.String name)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NAME$26);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(NAME$26);\r\n }\r\n target.setStringValue(name);\r\n }\r\n }",
"protected void setName(final String theName)\r\n {\r\n _theName = theName;\r\n }",
"public void setName(String s) {\n\t\t\n\t\tname = s;\n\t}",
"protected void setBaseNameFromName(String name) {\n int lastDot = name.lastIndexOf(\".\");\n this.baseName = (lastDot == -1) ? name : name.substring(0, lastDot);\n }",
"public void setName(String s) {\n this.name = s;\n }",
"public void setName(String value) {\n this.name = value;\n }",
"public void setName(String n)\n\t{\n\t\tfullName=n;\n\t}",
"protected void setName(String name) {\n this._name = name;\n }",
"private void setNewName(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n newName_ = value;\n }",
"public void setSheetIndex(int sheetIndex) {\r\n this.sheetIndex = sheetIndex;\r\n }",
"public void setName(java.lang.String name)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NAME$4);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(NAME$4);\n }\n target.setStringValue(name);\n }\n }",
"public void setName(String inName)\n {\n name = inName;\n }",
"public void setName(String inName)\n {\n\tname = inName;\n }",
"public String setName(String name) {\r\n String oldName = myName;\r\n myName = (name == null ? \"\" : name);\r\n return oldName;\r\n }",
"public void setName(final String pName){this.aName = pName;}",
"public void setName(final String name) {\n mName = name;\n }",
"public void setName(String aName)\n{\n if(RMUtils.equals(aName, getName())) return; // If value already set, just return\n Object oldValue = put(\"Name\", RMStringUtils.min(aName)); // Cache old value\n firePropertyChange(\"Name\", oldValue, RMStringUtils.min(aName), -1); // Set new value and fire PropertyChange\n}",
"public void setName(java.lang.String name)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NAME$6);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(NAME$6);\r\n }\r\n target.setStringValue(name);\r\n }\r\n }",
"public void setName(java.lang.String name)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NAME$8);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(NAME$8);\r\n }\r\n target.setStringValue(name);\r\n }\r\n }",
"public void setName(String n){ name=n; }",
"public void setName(final String name);",
"public void setName(String name) {\n\t\tmName = name;\n\t}",
"public void setName( String pName )\n {\n name = pName;\n }",
"public void setUs1120sheetName(String us1120sheetName) {\n\n this.us1120sheetName = us1120sheetName;\n }",
"public void setName(String name) {\n m_Name = name;\n }",
"public void setName(String name) {\n _name = name;\n }",
"public void setBaseName(String baseName) {\n this.baseName = baseName == null ? null : baseName.trim();\n }",
"public void setName(String name) {\r\n\t\t_name = name;\r\n\t}",
"public final String getName() {\n/* 231 */ return \"sheet-collate\";\n/* */ }",
"public final void setName(String name) {_name = name;}",
"public void setSheetNumber(int number){\n this.sheetNumber = number;\n }",
"protected void setName(final String name) {\r\n\t\tthis.name = name;\r\n\t}",
"public void setName(String name) {\r\n this._name = name;\r\n }",
"protected final void setName(final String name) {\n this.name = name;\n }",
"public void setName(String value) {\n\t\tname = value;\n\t}",
"void setName(String name_);"
] | [
"0.7303464",
"0.686376",
"0.68301433",
"0.65403235",
"0.64787143",
"0.6475427",
"0.6450952",
"0.6235548",
"0.6064914",
"0.5619939",
"0.55555433",
"0.551723",
"0.5391405",
"0.5359137",
"0.53474385",
"0.5326825",
"0.53206456",
"0.5320153",
"0.5303874",
"0.52620524",
"0.5257232",
"0.52525854",
"0.52400935",
"0.52400935",
"0.5230966",
"0.5229889",
"0.5226987",
"0.52170825",
"0.5215105",
"0.5213184",
"0.5194296",
"0.51914215",
"0.51886827",
"0.5187816",
"0.5180033",
"0.5173645",
"0.5173625",
"0.51663226",
"0.51620466",
"0.5158173",
"0.5156042",
"0.51516306",
"0.51516306",
"0.51516306",
"0.5150145",
"0.5149804",
"0.5146282",
"0.5146262",
"0.5138732",
"0.51350075",
"0.51350075",
"0.51350075",
"0.51317227",
"0.51307505",
"0.5127703",
"0.5122658",
"0.5122658",
"0.51020724",
"0.50930697",
"0.50930697",
"0.50930697",
"0.50831896",
"0.508195",
"0.5079308",
"0.5063604",
"0.5063231",
"0.50600696",
"0.50558996",
"0.50554425",
"0.50501853",
"0.5050103",
"0.5046492",
"0.50379646",
"0.5037089",
"0.50351167",
"0.5034654",
"0.5031029",
"0.50263214",
"0.5017846",
"0.5017213",
"0.50153583",
"0.50150365",
"0.5011267",
"0.5008678",
"0.50030637",
"0.5002993",
"0.5002445",
"0.49946967",
"0.49923068",
"0.4991376",
"0.49866125",
"0.49847028",
"0.4983841",
"0.4983116",
"0.49813882",
"0.49809787",
"0.49801165",
"0.4977019",
"0.4976472",
"0.49721718"
] | 0.7637952 | 0 |
Getter for property us1120sheet. | public String getUs1120sheet() {
return this.us1120sheet;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getUs1120sheetName() {\n\n return this.us1120sheetName;\n }",
"public int getSheetNumber(){\n return sheetNumber;\n }",
"public String getSheetName(){\n return sheetName;\n }",
"public String getSheetName() {\n return sheetName;\n }",
"public long getSheetId() {\r\n return sheetId;\r\n }",
"public int getSheetIndex() {\r\n return sheetIndex;\r\n }",
"public void setUs1120sheet(String us1120sheet) {\n\n this.us1120sheet = us1120sheet;\n }",
"public Sheet getSheet()\n {\n return ( cells != null & cells.length >= 1\n & cells[0] != null & cells[0].length >= 1\n & cells[0][0] != null\n ? cells[0][0].getSheet() : null );\n }",
"@Override\n\tpublic Sheet getSheet() {\n\t\treturn null;\n\t}",
"public String getBalanceSheet() {\n\n return this.balanceSheet;\n }",
"ISheet getSheet(String name);",
"public void setSheetNumber(int number){\n this.sheetNumber = number;\n }",
"public String getBalanceSheetName() {\n\n return this.balanceSheetName;\n }",
"public Map<String,Sheet> getSheetsByName() {\n return this.sheetsByName;\n }",
"@DISPID(148)\n @PropGet\n com.exceljava.com4j.excel._Application getApplication();",
"ISheet getSheet(int index);",
"public Sheet getSheet(String arg0) {\n\t\treturn null;\n\t}",
"public String getSsxl() {\n return ssxl;\n }",
"public int getActiveSheetIndex() {\n\t\treturn 0;\n\t}",
"public StrColumn getSheetId() {\n return delegate.getColumn(\"sheet_id\", DelegatingStrColumn::new);\n }",
"public Sheet getSheetAt(int arg0) {\n\t\treturn null;\n\t}",
"public Iterator<Sheet> sheetIterator() {\n\t\treturn null;\n\t}",
"public final File getExcelFile() {\n\t\treturn excelFile;\n\t}",
"public int getSheetOrder() {\n return sheetOrder;\n }",
"public void setSheetName(String name){\n this.sheetName = name;\n }",
"@DISPID(148)\n @PropGet\n excel._Application getApplication();",
"private Sheet getActualSheet() throws IOException{\r\n File file = new File(\"evidence.ods\");\r\n SpreadSheet spreadSheet = SpreadSheet.createFromFile(file);\r\n return spreadSheet.getSheet(spreadSheet.getSheetCount()-1);\r\n }",
"public void setSheetNumberForGermplasm(Integer sheetNumber);",
"public final String getName() {\n/* 231 */ return \"sheet-collate\";\n/* */ }",
"public void setUs1120sheetName(String us1120sheetName) {\n\n this.us1120sheetName = us1120sheetName;\n }",
"public String getSheetName(int arg0) {\n\t\treturn null;\n\t}",
"private XSSFSheet getExcelSheet(String filename) throws IOException {\n\tFile excelFile = new File(filename);\n\tFileInputStream excelInputStream = new FileInputStream(excelFile);\n\tXSSFWorkbook workBook = new XSSFWorkbook(excelInputStream);\n\tXSSFSheet hssfSheet = workBook.getSheetAt(FIRST_SHEET_ON_BOOK);\n\treturn hssfSheet;\n }",
"public List<FileRow> getExcel_file() {\r\n\t\treturn excel_file;\r\n\t}",
"@Override\n protected Sheet createSheet() {\n Sheet sheet = Sheet.createDefault();\n // Create a set of properties\n Sheet.Set set = Sheet.createPropertiesSet();\n\n set.put(getNameProperty());\n set.put(getMajorProperty());\n set.put(getMinorProperty());\n set.put(getPatchProperty());\n set.put(getDescriptionProperty());\n set.put( getGitProperty());\n set.put( getBranchProperty());\n\n // Add the set of properties to the sheet\n sheet.put(set);\n\n return sheet;\n }",
"int getSheetCount();",
"Excel getExcelInst();",
"public static SheetDef getSheetDef(long sheetDefNum) throws Exception {\n //No need to check RemotingRole; no call to db.\n SheetDef sheetdef = null;\n for (int i = 0;i < SheetDefC.getListt().Count;i++)\n {\n if (SheetDefC.getListt()[i].SheetDefNum == sheetDefNum)\n {\n sheetdef = SheetDefC.getListt()[i].Copy();\n break;\n }\n \n }\n //if sheetdef is null, it will crash, just as it should.\n getFieldsAndParameters(sheetdef);\n return sheetdef;\n }",
"public void setSheetId(long value) {\r\n this.sheetId = value;\r\n }",
"public int getSheetIndex(Sheet arg0) {\n\t\treturn 0;\n\t}",
"public static XSSFSheet setExcelFile() throws Exception {\n\n XSSFSheet ExcelWSheet;\n XSSFWorkbook ExcelWBook;\n XSSFRow Row;\n String Path;\n String SheetName;\n\n try {\n // Open the Excel file\n Path = fetchMyProperties(\"spreadsheet_path\");\n SheetName= fetchMyProperties(\"sheet_name\");\n FileInputStream ExcelFile = new FileInputStream(Path);\n\n // Access the required test data sheet\n ExcelWBook = new XSSFWorkbook(ExcelFile);\n ExcelWSheet = ExcelWBook.getSheet(SheetName);\n\n } catch (Exception e){\n throw (e);\n }\n return ExcelWSheet;\n }",
"public int getNumberOfSheets() {\n\t\treturn 0;\n\t}",
"public int getSheetIndex(String arg0) {\n\t\treturn 0;\n\t}",
"public String getVsheetId() {\n return vsheetId;\n }",
"@Override\n\t\tpublic AbstractCSSStyleSheet getSheet() {\n\t\t\tif (needsUpdate) {\n\t\t\t\tString type = getAttribute(\"type\");\n\t\t\t\tif (!\"text/css\".equalsIgnoreCase(type) && type.length() != 0) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\tdefinedSheet = parseEmbeddedStyleSheet(definedSheet, getTextContent().trim(), getAttribute(\"title\"),\n\t\t\t\t\t\tgetAttribute(\"media\"), this);\n\t\t\t\tif (definedSheet != null) {\n\t\t\t\t\tneedsUpdate = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn definedSheet;\n\t\t}",
"public ArrayList<String> getData(String testcaseName) throws IOException\n{\n//fileInputStream argument\nArrayList<String> a=new ArrayList<String>();\n\nFileInputStream fis=new FileInputStream(\"D://TestCases.xlsx\");\nXSSFWorkbook workbook=new XSSFWorkbook(fis);\n\nint sheets=workbook.getNumberOfSheets();\n}",
"@VTID(7)\n com.exceljava.com4j.excel._Application getApplication();",
"@VTID(7)\n com.exceljava.com4j.excel._Application getApplication();",
"@VTID(7)\n com.exceljava.com4j.excel._Application getApplication();",
"@VTID(7)\n com.exceljava.com4j.excel._Application getApplication();",
"@DISPID(149)\n @PropGet\n com.exceljava.com4j.excel.XlCreator getCreator();",
"public static Sheet getExcelSheet_total_Qty(int sheetIndex) {\n\t\tString dataFilePath = \"Resources/Total_Qty_Calculation.xlsx\";\n\t\tFile datafile = new File(dataFilePath);\n\t\tString fullpath = datafile.getAbsolutePath();\n\t\tSheet firstSheet = null;\n\n\t\ttry {\n\t\t\t//System.out.println(\"full path \" + datafile.getAbsolutePath() + \" con \" + datafile.getCanonicalPath());\n\t\t\tFileInputStream inputStream = new FileInputStream(new File(fullpath));\n\t\t\tWorkbook workbook = new XSSFWorkbook(inputStream);\n\t\t\tfirstSheet = workbook.getSheetAt(sheetIndex);\n\t\t\tworkbook.close();\n\t\t\tinputStream.close();\n\t\t} catch (Exception e) {\n\t\t}\n\t\treturn firstSheet;\n\t}",
"@DISPID(149)\n @PropGet\n excel.XlCreator getCreator();",
"private static Spreadsheet findSpreadsheet(RubyProject rubyProject, String sheetName) {\r\n \t\tfor (RubyProjectElement rubyElement : rubyProject.getRubyElementsInternal()) {\r\n \t\t\tif (rubyElement.getFileExtension().equals(\"uss\")) {\r\n \t\t\t\tif (rubyElement.getName().equals(sheetName)) {\r\n \t\t\t\t\treturn (Spreadsheet)rubyElement;\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn null;\r\n \t}",
"public Sheet createSheet() {\n\t\treturn null;\n\t}",
"public static void main(String[] args) throws IOException {\nFileInputStream f=new FileInputStream(\"D:\\\\AccuSelenium\\\\Ram\\\\TEST\\\\TestData\\\\LoginData.xls\");\nHSSFWorkbook w=new HSSFWorkbook(f);\nHSSFSheet s=w.getSheet(\"sheet1\");\nSystem.out.println(s.getRow(1));\n}",
"public List<String> getSheetTabs() {\r\n return sheetTabs;\r\n }",
"public String getCellname() {\r\n return cellname;\r\n }",
"@Override\n\tpublic SheetDesignSql[] getBySheetNo(int sheetNo) {\n\t\treturn null;\n\t}",
"@Override\n public TimeSheet getBean()\n {\n return null;\n }",
"@VTID(7)\n excel._Application getApplication();",
"public void setSheetNameForGermplasm(String sheetName);",
"public byte[] getMedicationInfoSheet() {\n return medicationInfoSheet;\n }",
"public static String getHeadless() {\n\t\ttry {\n\t\t\treturn getExcelSheet(0).getRow(4).getCell(1).getStringCellValue();\n\t\t} catch (Exception e) {\n\t\t\treturn \"No\";\n\t\t}\n\t}",
"public Iterator<Sheet> iterator() {\n\t\treturn null;\n\t}",
"public IPropertySheetPage getPropertySheetPage() {\r\n\t\tif (propertySheetPage == null) {\r\n\t\t\tpropertySheetPage = new TabbedPropertySheetPage(this);\r\n\t\t\t/*\r\n\t\t\tpropertySheetPage = new TabbedPropertySheetPage(this) {\r\n\t\t\t\t\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void setSelectionToViewer(List<?> selection) {\r\n\t\t\t\t\tConfmlEditor.this.setSelectionToViewer(selection);\r\n\t\t\t\t\tConfmlEditor.this.setFocus();\r\n\t\t\t\t}\r\n\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void setActionBars(IActionBars actionBars) {\r\n\t\t\t\t\tsuper.setActionBars(actionBars);\r\n\t\t\t\t\tgetActionBarContributor().shareGlobalActions(this,\r\n\t\t\t\t\t\t\tactionBars);\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t\tpropertySheetPage\r\n\t\t\t\t\t.setPropertySourceProvider(new AdapterFactoryContentProvider(\r\n\t\t\t\t\t\t\tadapterFactory));\r\n\t\t\t*/\r\n\t\t}\r\n\r\n\t\treturn propertySheetPage;\r\n\t}",
"private int actualYear() throws IOException{\r\n try {\r\n return Integer.parseInt(getActualSheet().getName());\r\n } catch (NumberFormatException e) {\r\n System.err.println(\"You have to start year first\");\r\n return 0;\r\n }\r\n }",
"@VTID(15)\n excel.Range getLocation();",
"public SheetVisibility getSheetVisibility(int arg0) {\n\t\treturn null;\n\t}",
"public Timesheet getCurrentTimesheet() {\n\t\treturn currentTimesheet;\n\t}",
"public List<Sheet> getSheets() {\n\n List<Sheet> sheets = new ArrayList<>();\n for (int i=0; i<workbook.getNumberOfSheets(); i++) {\n sheets.add( workbook.getSheetAt(i) );\n }\n return sheets;\n }",
"@VTID(7)\r\n excel._Application getApplication();",
"@Override\n\t\tpublic AbstractCSSStyleSheet getSheet() {\n\t\t\tif (needsUpdate) {\n\t\t\t\tString rel = getAttribute(\"rel\");\n\t\t\t\tString type = getAttribute(\"type\");\n\t\t\t\tint typelen = type.length();\n\t\t\t\tif (typelen == 0) {\n\t\t\t\t\tif (rel.length() == 0) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t} else if (!\"text/css\".equalsIgnoreCase(type)) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\tbyte relAttr = AbstractCSSStyleSheet.parseRelAttribute(rel);\n\t\t\t\tif (relAttr != -1) {\n\t\t\t\t\tString title = getAttribute(\"title\");\n\t\t\t\t\tif (title.length() == 0) {\n\t\t\t\t\t\ttitle = null;\n\t\t\t\t\t}\n\t\t\t\t\tString href = getAttribute(\"href\");\n\t\t\t\t\tif (href.length() != 0) {\n\t\t\t\t\t\tif (relAttr == 0) {\n\t\t\t\t\t\t\tif (loadDefinedSheet(href, title)) {\n\t\t\t\t\t\t\t\tneedsUpdate = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (title != null) {\n\t\t\t\t\t\t\t\tif (href.length() != 0) {\n\t\t\t\t\t\t\t\t\t// Disable this alternate sheet if it is a new sheet\n\t\t\t\t\t\t\t\t\t// or is not the selected set\n\t\t\t\t\t\t\t\t\tboolean disable = definedSheet == null\n\t\t\t\t\t\t\t\t\t\t\t|| !title.equalsIgnoreCase(getSelectedStyleSheetSet());\n\t\t\t\t\t\t\t\t\tif (loadDefinedSheet(href, title)) {\n\t\t\t\t\t\t\t\t\t\t// It is an alternate sheet\n\t\t\t\t\t\t\t\t\t\tif (disable) {\n\t\t\t\t\t\t\t\t\t\t\tdefinedSheet.setDisabled(true);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tneedsUpdate = false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tgetErrorHandler().linkedStyleError(this,\n\t\t\t\t\t\t\t\t\t\t\"Alternate sheet without title.\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tgetErrorHandler().linkedStyleError(this, \"Missing or void href attribute.\");\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tdefinedSheet = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn definedSheet;\n\t\t}",
"@Test\n public void test(){\n ExcelUtil qa3Sheet = new ExcelUtil(\"src/test/resources/Vytrack testusers.xlsx\", \"QA3-short\");\n // 1 based , not 0 based\n int rowCount = qa3Sheet.rowCount();\n // 1 based, not 0 based\n int colCount = qa3Sheet.columnCount();\n System.out.println(\"rowCount = \" + rowCount);\n System.out.println(\"colCount = \" + colCount);\n\n List<String> columnsNames = qa3Sheet.getColumnsNames();\n System.out.println(\"columnsNames = \" + columnsNames);\n // 0 based, get specific cell value based on index\n String cellData = qa3Sheet.getCellData(2, 3);\n System.out.println(\"cellData = \" + cellData);\n\n // get all table values in a list\n List<Map<String, String>> dataList = qa3Sheet.getDataList();\n\n System.out.println(dataList.get(5).get(\"firstname\"));\n\n String[][] dataArray = qa3Sheet.getDataArray();\n\n System.out.println(dataArray[1][1]);\n\n }",
"public interface IExcelProfile {\n /**\n * The values that will be used to create an excel worksheet for the domain object\n *\n * @return a List (could be nested) of values\n */\n List getValues();\n}",
"public String getUserCell() {\n\t\treturn userCell;\n\t}",
"public NavigableMap<String,List<String>> getSheetsNamesBySurt() {\n return this.sheetNamesBySurt;\n }",
"List<? extends ISheet> getSheetList();",
"public void setBalanceSheet(String balanceSheet) {\n\n this.balanceSheet = balanceSheet;\n }",
"@Override\n\tpublic String toString() {\n\t\treturn \"ExcelObject { excelPath : \" + excelPath + \" , excelReference : \" + excelReference + \" , wb : \" + wb + \" , sh : \" + sh + \" }\";\n\t}",
"public void setSheetName(int arg0, String arg1) {\n\n\t}",
"public static Worksheet getSourceSheet(Spreadsheet ss) {\r\n \t\treturn (Worksheet)ss.getAttribute(KEY_SRC_SHEET);\r\n \t}",
"public void setSheetName(String sheetName) {\n this.sheetName = sheetName;\n }",
"private void loadSheet() {\n\t\ttry {\n\t\t\tBufferedImage image = ImageIO.read(SpriteSheet.class\n\t\t\t\t\t.getResource(path));\n\t\t\tint w = image.getWidth();\n\t\t\tint h = image.getHeight();\n\t\t\timage.getRGB(0, 0, w, h, sheetPixles, 0, w);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@VTID(13)\n com.exceljava.com4j.excel.WorkbookConnection getWorkbookConnection();",
"private XSSFSheet openFirstSheet(File file){\n\t\t\n\t\tFileInputStream fileIS=null;\n\t\ttry {\n\t\t\tfileIS = new FileInputStream(file);\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t//Get the workbook instance for XLS file\n\t\ttry {\n\t\t\tXSSFWorkbook workbook = new XSSFWorkbook (fileIS);\n\t\t\treturn workbook.getSheetAt(0);\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t\t\n\t}",
"public interface DataSheet\n{\n /** @return the names of the columns in this table or an empty list if no columns have been defined, never null */\n List<String> getColumns();\n\n /** @return the names of the columns in this table or an empty array if no columns have been defined, never null */\n String[] getHeaders();\n\n /**\n * Determine the name of a column if the position is known.\n *\n * @param index the position in the header starting with 0\n * @return the column name at the given position, null if unknown\n */\n String getColumn(int index);\n\n /**\n * Determine the index of a column if the name is known.\n *\n * @param column the case insensitive name of the respective column\n * @return the index of the column in the headings, -1 if the column is unknown\n */\n int indexOf(String column);\n\n /**\n * Access the given row.\n *\n * @param index the row number, the first row is 0\n * @return the data of the row or an empty array if the row is out of bounds, never null\n */\n Object[] getDataRow(final int index);\n\n /**\n * Access all rows.\n *\n * @return the data of all rows or an empty array no row exist, never null\n */\n Object[][] getDataRows();\n\n /**\n * Retrieve the value of the given row and column.\n *\n * If the row is out of bounds or the column is unknown will simply return <code>null</code> to indicate that no value\n * has been set.\n *\n * @param column the column name in the table\n * @param row the row number in the table starting with 0\n * @return the associated value of that cell, can be null\n */\n Object getDataValue(String column, int row);\n\n /**\n * Retrieve the value of the given row and column.\n *\n * If row or column are out of bounds will simply return <code>null</code> to indicate that no value has been set.\n *\n * @param row the row number in the table starting with 0\n * @param column the column number in the table starting with 0\n * @return the associated value of that cell, can be null\n */\n Object getDataValue(final int row, final int column);\n\n /** @return the number of current rows of this table */\n int size();\n}",
"@NoProxy\n public String getCalSuite() {\n return getXproperty(BwXproperty.bedeworkCalsuite);\n }",
"public String getWorkbookId() {\n return this.workbookId;\n }",
"@JSProperty(\"startOfWeek\")\n double getStartOfWeek();",
"public String getCellData(String sheetName, int colNum, int rowNum) {\n try {\n int index = excelWorkbook.getSheetIndex(sheetName);\n excelSheet = excelWorkbook.getSheetAt(index);\n row = excelSheet.getRow(rowNum);\n cell = row.getCell(colNum);\n if (cell.getCellType() == CellType.STRING)\n return cell.getStringCellValue();\n else if (cell.getCellType() == CellType.NUMERIC\n || cell.getCellType() == CellType.FORMULA) {\n String cellText = String.valueOf(cell.getNumericCellValue());\n return cellText;\n } else if (cell.getCellType() == CellType.STRING) {\n return \"\";\n\n } else\n return String.valueOf(cell.getBooleanCellValue());\n\n } catch (Exception e) {\n e.printStackTrace();\n return \"row \" + rowNum + \" or column \" + colNum\n + \" does not exist in xls\";\n }\n }",
"public String excelScrFold() throws Exception \r\n\t\r\n\t{\n\t\t\t try{\t\t\t\t \r\n\t\t\t\t InputStream ExcelFileToRead = new FileInputStream(excelFilePath);\r\n\t\t\t\t\tXSSFWorkbook wb = new XSSFWorkbook(ExcelFileToRead);\r\n\t\t\t\t\t//XSSFWorkbook test = new XSSFWorkbook(); \r\n\t\t\t\t XSSFSheet sheet = wb.getSheetAt(0);\r\n\t\t\t\t XSSFRow row,rowvalue;\r\n\t\t\t\t Iterator<Row> rows = sheet.rowIterator();\r\n\t\t\t\t row = sheet.getRow(0);\r\n\t\t\t\t int i=0;\r\n\t\t\t\t int j=0;\r\n\t\t\t\t try {\r\n\t\t\t\t \t\r\n\t\t\t\t\t\t\tif(row.getCell(0).toString().equalsIgnoreCase(\"Release Number=\")){\r\n\t\t\t\t\t\t\tReleaseNum = row.getCell(1).toString().trim();\r\n\t\t\t\t\t\t\t//System.out.println(ReleaseNum);\r\n\t\t\t\t\t\t\t}else {\r\n\t\t\t\t\t\t\tSystem.out.println(\"Incorrect format\");\r\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\r\n\t\t\t\t\t } \r\n\t\t\t\t\t catch (NullPointerException e) \r\n\t\t\t\t\t {\r\n\t\t\t\t\t \tlogger.info(\"System Error: \"+e.toString());\r\n\t\t\t\t\t } \r\n\t\t\t\t }\r\n\t\t\t \r\n\t\t\t \r\n\t\t\t catch(Exception ioe) \r\n\t\t\t {\r\n\t\t\t\t logger.info(\"System Error: \"+ioe.toString());\r\n\t\t\t\t ioe.printStackTrace();\r\n\t\t\t }\t\t\t \r\n\t\t\t return ReleaseNum;\t \r\n\t}",
"public Sheet getSheet(File excelFile, int sheetNumber)\r\n throws BiffException, IOException {\r\n\r\n Workbook reportWorkBook;\r\n\r\n reportWorkBook = Workbook.getWorkbook(excelFile);\r\n\r\n // Get the first sheet\r\n return reportWorkBook.getSheet(sheetNumber);\r\n }",
"public String user_id(int a) throws IOException {\r\n\t\t\t \r\n\t\t\t FileInputStream fil = new FileInputStream(new File(\"\"));\r\n\t\t\t XSSFWorkbook workbook = new XSSFWorkbook(fil);\r\n\t\t\t XSSFSheet sheet=workbook.getSheet(\"Sheet1\");\r\n\t\t\t int count=sheet.getLastRowNum();\r\n\t\t\t System.out.println(count);\r\n\t\t\t \r\n\t\t\t\t XSSFRow row =sheet.getRow(a);\r\n\t\t\t\t XSSFCell cell=row.getCell(0);\r\n\t\t\t\t String un=cell.getStringCellValue();\r\n\t\t\t\t \r\n\t \r\n\t\t\treturn un;\r\n\t}",
"public String getCellData(String sheetname, String colName, int rowNum) {\r\n\t\ttry {\r\n\t\t\tint col_Num = -1;\r\n\t\t\tsheet = workbook.getSheet(sheetname);\r\n\t\t\trow = sheet.getRow(0); \t\r\n\t\t\tfor(int i=0; i<row.getLastCellNum(); i++) {\r\n\t\t\t\t\r\n\t\t\t\tif(row.getCell(i).getStringCellValue().trim().equalsIgnoreCase(colName)) \r\n\t\t\t\t\tcol_Num = i;\t\t\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t row = sheet.getRow(rowNum-1);\r\n\t\t cell = row.getCell(col_Num);\r\n\t\t\t\r\n\t\t \r\n\t\t if(cell.getCellType() == CellType.STRING) \r\n\t\t\t \r\n\t\treturn cell.getStringCellValue();\r\n\t\t \r\n\t\telse if (cell.getCellTypeEnum() == CellType.NUMERIC || cell.getCellTypeEnum() == CellType.FORMULA) {\r\n\t\t\t\r\n\t\t\tString cellValue =String.valueOf(cell.getNumericCellValue());\r\n\t\t\tif (HSSFDateUtil.isCellDateFormatted(cell)) {\r\n\t\t\t\tDateFormat df = new SimpleDateFormat(\"dd/mm/yyyy\");\r\n\t\t\t\tDate date = cell.getDateCellValue();\r\n\t\t\t\tcellValue = df.format(date);\r\n\t\t\t}\r\n\t\t\treturn cellValue;\r\n\t\t}else if (cell.getCellTypeEnum() == CellType.BLANK)\r\n\t\t\treturn \"\";\r\n\t\telse \r\n\t\t\t\r\n\t\t // return cell.getStringCellValue();\r\n\t\t return String.valueOf(cell.getBooleanCellValue());\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn \"row \"+rowNum+\" or columnName \"+colName +\" does not exist in Excel\";\r\n\t\t\t \r\n\t }\r\n\t}",
"int getProperty0();",
"public String getAuthyCell() {\n\t\treturn this.authyCell;\n\t}",
"@Override\n\tpublic SheetDesignSql[] getBySheetNo(int sheetNo, int version) {\n\t\treturn null;\n\t}",
"public String getStyleSheetName()\n {\n return _styleSheetName;\n }",
"public String getHomeworkfilename() {\n return homeworkfilename;\n }",
"@Override\n protected void check(Workbook workbook)\n {\n Sheet ana = workbook.getSheetAt(0);\n assertEquals(\"California\", TestUtility.getStringCellValue(ana, 2, 0));\n assertEquals(\"Los Angeles\", TestUtility.getStringCellValue(ana, 2, 1));\n assertEquals(10363850.0 / 38070496.0, TestUtility.getNumericCellValue(ana, 2, 3), DELTA);\n assertEquals(10515.0 / 404224.0 , TestUtility.getNumericCellValue(ana, 2, 5), DELTA);\n\n assertEquals(\"California\", TestUtility.getStringCellValue(ana, 59, 0));\n assertEquals(\"Alpine\", TestUtility.getStringCellValue(ana, 59, 1));\n assertEquals(1222.0 / 38070496.0, TestUtility.getNumericCellValue(ana, 59, 3), DELTA);\n assertEquals(1914.0 / 404224.0 , TestUtility.getNumericCellValue(ana, 59, 5), DELTA);\n\n assertEquals(\"Nevada\", TestUtility.getStringCellValue(ana, 60, 0));\n assertEquals(\"Clark\", TestUtility.getStringCellValue(ana, 60, 1));\n assertEquals(1375765.0 / 1998257.0 , TestUtility.getNumericCellValue(ana, 60, 3), DELTA);\n assertEquals(20489.0 / 284401.0 , TestUtility.getNumericCellValue(ana, 60, 5), DELTA);\n\n assertEquals(\"Nevada\", TestUtility.getStringCellValue(ana, 76, 0));\n assertEquals(\"Esmeralda\", TestUtility.getStringCellValue(ana, 76, 1));\n assertEquals(971.0 / 1998257.0 , TestUtility.getNumericCellValue(ana, 76, 3), DELTA);\n assertEquals(9295.0 / 284401.0 , TestUtility.getNumericCellValue(ana, 76, 5), DELTA);\n }"
] | [
"0.77453774",
"0.75290823",
"0.72247636",
"0.6915486",
"0.68116826",
"0.66999793",
"0.66597944",
"0.645321",
"0.6340812",
"0.6292097",
"0.6202143",
"0.61495864",
"0.6079159",
"0.6060135",
"0.6006497",
"0.5930784",
"0.5910377",
"0.5900406",
"0.58462685",
"0.5815537",
"0.57621527",
"0.5733232",
"0.56916595",
"0.56869775",
"0.5655936",
"0.56453896",
"0.5629616",
"0.5609547",
"0.56056774",
"0.559234",
"0.5585632",
"0.5576903",
"0.5574823",
"0.5561051",
"0.55509824",
"0.55467427",
"0.55268866",
"0.5522452",
"0.552229",
"0.5451266",
"0.54397094",
"0.54202837",
"0.5416772",
"0.540454",
"0.5397557",
"0.53383905",
"0.53383905",
"0.53383905",
"0.53383905",
"0.5322844",
"0.53105366",
"0.52953357",
"0.5290582",
"0.52731013",
"0.5262276",
"0.52395606",
"0.52358395",
"0.5228191",
"0.5206162",
"0.5201722",
"0.5189814",
"0.51880616",
"0.51707166",
"0.5164497",
"0.5158192",
"0.515686",
"0.5144689",
"0.5139982",
"0.5138985",
"0.51175684",
"0.5117386",
"0.5111229",
"0.5098494",
"0.50926757",
"0.50871384",
"0.50787306",
"0.5070548",
"0.5066491",
"0.5056364",
"0.50352424",
"0.502133",
"0.5007228",
"0.5004449",
"0.5001332",
"0.49981344",
"0.49765965",
"0.49626756",
"0.4961592",
"0.49597648",
"0.49518806",
"0.49346316",
"0.49178734",
"0.49171954",
"0.4911021",
"0.49108076",
"0.49076056",
"0.49066895",
"0.4897874",
"0.48829058",
"0.488275"
] | 0.8473145 | 0 |
Setter for property us1120sheet. | public void setUs1120sheet(String us1120sheet) {
this.us1120sheet = us1120sheet;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getUs1120sheet() {\n\n return this.us1120sheet;\n }",
"public String getUs1120sheetName() {\n\n return this.us1120sheetName;\n }",
"public void setSheetNumber(int number){\n this.sheetNumber = number;\n }",
"public void setUs1120sheetName(String us1120sheetName) {\n\n this.us1120sheetName = us1120sheetName;\n }",
"public int getSheetNumber(){\n return sheetNumber;\n }",
"public void setSheetId(long value) {\r\n this.sheetId = value;\r\n }",
"public void setSheetNumberForGermplasm(Integer sheetNumber);",
"public String getSheetName(){\n return sheetName;\n }",
"public void setSheetName(String name){\n this.sheetName = name;\n }",
"public void setSheetName(int arg0, String arg1) {\n\n\t}",
"public String getSheetName() {\n return sheetName;\n }",
"public long getSheetId() {\r\n return sheetId;\r\n }",
"public void setSheetNameForGermplasm(String sheetName);",
"public void setBalanceSheet(String balanceSheet) {\n\n this.balanceSheet = balanceSheet;\n }",
"public void setActiveSheet(int arg0) {\n\n\t}",
"public int getSheetIndex() {\r\n return sheetIndex;\r\n }",
"public static void setExcelFile(String filePath, String shName)\n\t{\n\t\t//open excel file\n\t\ttry {\n\t\t\tlogger.info(\"creating file inputstream object and setting up file path and sheet\");\n\t\t\tFileInputStream fis = new FileInputStream(filePath);\n\t\t\t\n\t\t\tlogger.debug(\"creating new object for workbook\");\n\t\t\t\n\t\t\txlWBook = new XSSFWorkbook(fis); \n\t\t\t\n\t\t\tlogger.debug(\"get sheet from workbook object\");\n\t\t\txlSheet = xlWBook.getSheet(shName);\n\t\t\tlogger.info(\"created xl sheet object\");\n\t\t\t\t\t\t\n\t\t\t\n\t\t} catch (FileNotFoundException e) {\n\t\t\t\n\t\t\tlogger.error(\"Function - setExcelFile: file not found\", e);\n\t\t\te.printStackTrace();\n\t\t}\n\t\tcatch(IOException e)\n\t\t{\n\t\t\tlogger.error(\"Function - setExcelFile: IO exception occured\", e);\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t}",
"public void setSheetOrder(String arg0, int arg1) {\n\n\t}",
"public void setSheetIndex(int sheetIndex) {\r\n this.sheetIndex = sheetIndex;\r\n }",
"public void setSheetName(String sheetName) {\n this.sheetName = sheetName;\n }",
"public static XSSFSheet setExcelFile() throws Exception {\n\n XSSFSheet ExcelWSheet;\n XSSFWorkbook ExcelWBook;\n XSSFRow Row;\n String Path;\n String SheetName;\n\n try {\n // Open the Excel file\n Path = fetchMyProperties(\"spreadsheet_path\");\n SheetName= fetchMyProperties(\"sheet_name\");\n FileInputStream ExcelFile = new FileInputStream(Path);\n\n // Access the required test data sheet\n ExcelWBook = new XSSFWorkbook(ExcelFile);\n ExcelWSheet = ExcelWBook.getSheet(SheetName);\n\n } catch (Exception e){\n throw (e);\n }\n return ExcelWSheet;\n }",
"@Override\n\tpublic Sheet getSheet() {\n\t\treturn null;\n\t}",
"@Autowired(required=false)\n public void setSheetsByName(Map<String,Sheet> map) {\n this.sheetsByName = map;\n }",
"public void setExcelFile(String excelfilepath,String Sheetname) throws IOException {\n\t\t File file=new File(excelfilepath);\n\t\t FileInputStream inputstream=new FileInputStream(file);\n\t\t workbook =new XSSFWorkbook(inputstream);\n\t\t sheet =workbook.getSheet(Sheetname);\n\n\t}",
"private void setSheet(String sheet, double width, double height) {\n setImage(new Image(getClass().getResource(sheet).toExternalForm()), width, height);\n }",
"@Override\n public void setBean(TimeSheet t)\n {\n \n }",
"public static void setExcelFileSheet(String sheetName) throws IOException {\n\t testDataExcelPath = currentDir+\"\\\\src\\\\example\\\\trademeSellAndBuy\\\\testData\\\\\";\n\t // Open the Excel file\n FileInputStream excelFile = new FileInputStream(new File(testDataExcelPath + testDataExcelFileName));\n excelWBook = new XSSFWorkbook(excelFile);\n excelWSheet = (XSSFSheet) excelWBook.getSheet(sheetName);\n }",
"private void setExcelName(String excelName) {\n this.excelName = excelName;\n }",
"public final void setMxSheet_Template(xlsreport.proxies.MxTemplate mxsheet_template)\r\n\t{\r\n\t\tsetMxSheet_Template(getContext(), mxsheet_template);\r\n\t}",
"public static void setUp(String fileLocation, String sheetName,String myClassName) {\n\t\t\t\n\t\t\ttry {\n\t\t\t\txlsFile=new excelReader(fileLocation);\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\ttestName=sheetName;\n\t\t\tclassName=myClassName;\t\t\n\t\t\t//logger.log(LogStatus.INFO, \"Excel Program parameter set up successfully\");\n\t\t}",
"public void setSsxl(String ssxl) {\n this.ssxl = ssxl == null ? null : ssxl.trim();\n }",
"public void setSheetVisibility(int arg0, SheetVisibility arg1) {\n\n\t}",
"public void setWorkbook(Workbook workbook){\n this.workbook = workbook;\n }",
"public void setExcelFile(String excelFile) {\r\n this.excelFile = excelFile;\r\n }",
"@VTID(16)\n void setLocation(\n excel.Range rhs);",
"public int getNumberOfSheets() {\n\t\treturn 0;\n\t}",
"ISheet getSheet(String name);",
"@Override\n protected Sheet createSheet() {\n Sheet sheet = Sheet.createDefault();\n // Create a set of properties\n Sheet.Set set = Sheet.createPropertiesSet();\n\n set.put(getNameProperty());\n set.put(getMajorProperty());\n set.put(getMinorProperty());\n set.put(getPatchProperty());\n set.put(getDescriptionProperty());\n set.put( getGitProperty());\n set.put( getBranchProperty());\n\n // Add the set of properties to the sheet\n sheet.put(set);\n\n return sheet;\n }",
"public static void setCoulmnData( String xlFilePath, String xlFileName, String xlSheetName, int rowNum , int colNum , String cellValue) throws IOException {\n\t\tFile file = new File( xlFilePath + \"\\\\\" + xlFileName);\n\t\t\n\t\t// create an Obj of FileInputStream class to read the excel file\n\t\tFileInputStream inputStream = new FileInputStream( file);\n\t\t\n\t\tWorkbook myworkbook = null;\n\t\t\n\t\t// find the file name extension by spilitting the file at . and finding only the extension\n\t\tString fileNameExtension = xlFileName.substring( xlFileName.indexOf('.'));\n\t\t\n\t\tif( fileNameExtension.equals(\".xlsx\")) {\n\t\t\t\n\t\t\tmyworkbook = new XSSFWorkbook(inputStream);\n\t\t\t\n\t\t}\n\t\telse if( fileNameExtension.equals(\".xls\")) {\n\t\t\tmyworkbook = new HSSFWorkbook( inputStream);\n\t\t}\n\t\t\n\t\tSheet mySheet = myworkbook.getSheet(xlSheetName);\n\t\t\n\t\tint rowsCount = mySheet.getLastRowNum() - mySheet.getFirstRowNum();\n\t\n\t\tRow row = null;\n\t\tif( rowNum > rowsCount) {\n\t\t\trow = mySheet.createRow(rowNum);\n\t\t}\n\t\telse {\n\t\t\trow = mySheet.getRow(rowNum);\n\t\t}\n\t\t\n\t\tCell cell = row.createCell(rowsCount);\n\t\tcell.setCellValue(cellValue);\n\n\t\t\n\t\t// create an Obj of OutputFileStream class to write data to file\n\t\tFileOutputStream outputStream = new FileOutputStream( file);\n\t\t\n\t\t// write workbook to the file\n\t\tmyworkbook.write(outputStream);\n\t\t\n\t\tmyworkbook.close();\n\n\t\t// close input Stream\n\t\tinputStream.close();\n\n\t\t// close the output stream\n\t\toutputStream.close();\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}",
"public void setMedicationInfoSheet(byte[] value) {\n this.medicationInfoSheet = value;\n }",
"public void setSheetSelected(int posSheet) {\n try {\n workbook.setActiveSheet(posSheet);\n } catch (IllegalArgumentException ex) {\n workbook.setActiveSheet(0);\n }\n }",
"public final String getName() {\n/* 231 */ return \"sheet-collate\";\n/* */ }",
"public ExcelSheet(HSSFWorkbook wb, String _sheetName) {\n\t\t// create a sheet with the provided name \n\t\t// in the provided workbook\n\t\t// limit to the 31 first characters\n\t\tif (_sheetName.length() > 31) {\n\t\t\tthis.SheetName = _sheetName.substring(0, 31);\n\t\t} else {\n\t\t\tthis.SheetName = _sheetName;\n\t\t}\n\t\tsheet = wb.createSheet(SuppressForbiddenChar(this.SheetName));\n\t\trowIndex = 0 ;\n\t\tcellStyles = new CellStyles(wb);\n\t}",
"public void loadSheet(String sheetName) {\n\t\tsheet = excelWBook.getSheet(sheetName);\n\t}",
"public void setSheetOrder(int sheetOrder) {\n this.sheetOrder = sheetOrder;\n }",
"public int getActiveSheetIndex() {\n\t\treturn 0;\n\t}",
"public static void writeInFile(String fileName,String sheetName, String cntry, String menu,String subMenu,String subMenu_1,String ActualEng_Title,String Overridden_Title,String xmlURL) throws IOException {\n\r\n\t\tFile myFile = new File(\"./\" + fileName);\r\n\r\n\t\t//Create an object of FileInputStream class to read excel file\r\n\r\n\t\tFileInputStream inputStream = new FileInputStream(myFile);\r\n\r\n\t\tWorkbook myWorkbook = null;\r\n\r\n\t\t//Find the file extension by spliting file name in substring and getting only extension name\r\n\r\n\t\tString fileExtensionName = fileName.substring(fileName.indexOf(\".\"));\r\n\r\n\t\t//Check condition if the file is xlsx file\t\r\n\r\n\t\tif(fileExtensionName.equals(\".xlsx\")){\r\n\r\n\t\t\t//If it is xlsx file then create object of XSSFWorkbook class\r\n\r\n\t\t\tmyWorkbook = new XSSFWorkbook(inputStream);\r\n\t\t\tSystem.out.println(\"Extension of file \"+fileName +\" is .xlsx\");\r\n\r\n\t\t}\r\n\r\n\t\t//Check condition if the file is xls file\r\n\r\n\t\telse if(fileExtensionName.equals(\".xls\")){\r\n\r\n\t\t\t//If it is xls file then create object of XSSFWorkbook class\r\n\r\n\t\t\tmyWorkbook = new HSSFWorkbook(inputStream);\r\n\t\t\tSystem.out.println(\"Extension of file \"+fileName +\" is .xlx\");\r\n\r\n\t\t}\r\n\r\n\t\t//Read sheet inside the workbook by its name\r\n\r\n\t\tSheet mySheet = myWorkbook.getSheet(sheetName);\r\n\r\n\t\t//Find number of rows in excel file\r\n\r\n\t\tint rowCount = mySheet.getLastRowNum() - mySheet.getFirstRowNum();\r\n\r\n\r\n\t\tRow row = mySheet.getRow(0);\r\n\r\n\t\t//Create a new row and append it at last of sheet\r\n\r\n\t\tRow newRow = mySheet.createRow(rowCount+1);\r\n\r\n\r\n\t\t//Create a loop over the cell of newly created Row\r\n\t\tfor(int colCnt=0;colCnt<=6;colCnt++)\r\n\t\t{ \r\n\t\t\tCell cell = newRow.createCell(colCnt);\r\n\r\n\t\t\tif(colCnt==0)\r\n\t\t\t{\r\n\t\t\t\tcell.setCellValue(cntry);\r\n\t\t\t}\r\n\t\t\telse if(colCnt==1)\r\n\t\t\t{\r\n\t\t\t\tcell.setCellValue(menu);\r\n\t\t\t}\r\n\t\t\telse if(colCnt==2)\r\n\t\t\t{\r\n\t\t\t\tcell.setCellValue(subMenu);\r\n\t\t\t}\r\n\t\t\telse if(colCnt==3)\r\n\t\t\t{\r\n\t\t\t\tcell.setCellValue(subMenu_1);\r\n\t\t\t}\r\n\t\t\telse if(colCnt==4)\r\n\t\t\t{\r\n\t\t\t\tcell.setCellValue(ActualEng_Title);\r\n\t\t\t}\r\n\t\t\telse if(colCnt==5)\r\n\t\t\t{\r\n\t\t\t\tcell.setCellValue(Overridden_Title);\r\n\t\t\t}\r\n\t\t\telse if(colCnt==6)\r\n\t\t\t{\r\n\t\t\t\tcell.setCellValue(xmlURL);\r\n\t\t\t}\r\n\t\t}\r\n\t\t/* for(int j = 0; j < row.getLastCellNum(); j++){\r\n\r\n\t //Fill data in row\r\n\r\n\t Cell cell = newRow.createCell(j);\r\n\r\n\t cell.setCellValue(\"test\");\r\n\r\n\t }*/\r\n\r\n\t\t//Close input stream\r\n\r\n\t\tinputStream.close();\r\n\r\n\t\t//Create an object of FileOutputStream class to create write data in excel file\r\n\r\n\t\tFileOutputStream opStream = new FileOutputStream(myFile);\r\n\r\n\t\t//write data in the excel file\r\n\r\n\t\tmyWorkbook.write(opStream);\r\n\t\t//close output stream\r\n\t\topStream.close();\r\n\t\t//\tfor(int i = 0;i<=objectArr.length-1;i++ ){\r\n\r\n\t\t// Cell cell = row.createCell(i);\r\n\t\t// cell.setCellValue(objectArr[i]);\r\n\r\n\t\t// }\r\n\r\n\t\t//File myFile = new File(\"./Controller.xlsx\");\r\n\t\t// FileOutputStream os = new FileOutputStream(myFile);\r\n\t\t//\tmyWorkBook.write(os);\r\n\t\tSystem.out.println(\"Controller Sheet Creation finished ...\");\r\n\t\t//\tos.close();\r\n\r\n\r\n\t}",
"private void initSpreadSheet()\n {\n if (documentFile != null && (documentFile.getName().endsWith(\".docx\") || documentFile.getName().endsWith(\".odt\")))\n {\n setIsSpreadsheet(false);\n }\n else\n {\n setIsSpreadsheet(true);\n }\n }",
"private void loadSheet() {\n\t\ttry {\n\t\t\tBufferedImage image = ImageIO.read(SpriteSheet.class\n\t\t\t\t\t.getResource(path));\n\t\t\tint w = image.getWidth();\n\t\t\tint h = image.getHeight();\n\t\t\timage.getRGB(0, 0, w, h, sheetPixles, 0, w);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public Sheet getSheet(String arg0) {\n\t\treturn null;\n\t}",
"public Object putSheetOverlay(String sheetName, String beanPath, Object value) {\n Sheet sheet = getOrCreateSheet(sheetName); \n Object prevVal = sheet.getMap().put(beanPath, value);\n try {\n sheet.prime(); \n } catch (TypeMismatchException tme) {\n // revert to presumably non-damaging value\n sheet.getMap().put(beanPath, prevVal);\n throw tme;\n }\n return prevVal; \n }",
"public Sheet getSheetAt(int arg0) {\n\t\treturn null;\n\t}",
"public void WriteDataToExcel(String SheetName,int RowNumber,int ColumnNumber,String Value)\n\t{\t \n\t\tDate dNow = new Date( );\n\t\tSimpleDateFormat ft =new SimpleDateFormat (\"MMddYYYY\");\n\t\t\n\t\t try\n\t\t {\n\t\t\t FileInputStream fstream = new FileInputStream(System.getProperty(\"user.dir\")+\"//TestResult_\"+ft.format(dNow)+\".xls\");\n\t\t\t org.apache.poi.ss.usermodel.Workbook wb = (org.apache.poi.ss.usermodel.Workbook)WorkbookFactory.create(fstream); \n\t\t\t Sheet sheet =(Sheet)wb.getSheetAt(0); \n\t\t\t Row row = (Row)((org.apache.poi.ss.usermodel.Sheet)sheet).getRow(RowNumber); \n\t\t\t Cell cell=row.createCell(ColumnNumber);\n\t\t\t cell.setCellValue(Value);\n\t\t\t FileOutputStream fileout=new FileOutputStream(System.getProperty(\"user.dir\")+\"//PG HealthCheck List_\"+ft.format(dNow)+\".xls\");\n\t\t\t wb.write(fileout);\n\t\t\t fileout.close();\n\t\t }\n\t\t catch (Exception e){//Catch exception if any\n\t\t\t assertTrue(false);\n\t\t }\t\t\n\t}",
"public PoiSheet(final org.apache.poi.ss.usermodel.Sheet delegate) {\n super();\n this.delegate = delegate;\n this.numberOfRows = this.delegate.getLastRowNum() + 1;\n this.name=this.delegate.getSheetName();\n }",
"public String getSheetName(int arg0) {\n\t\treturn null;\n\t}",
"public int getSheetIndex(Sheet arg0) {\n\t\treturn 0;\n\t}",
"public void setCurrentTimesheet(Timesheet currentTimesheet) {\n\t\tthis.currentTimesheet = currentTimesheet;\n\t}",
"public Sheet createSheet() {\n\t\treturn null;\n\t}",
"public final void setMxSheet_Template(com.mendix.systemwideinterfaces.core.IContext context, xlsreport.proxies.MxTemplate mxsheet_template)\r\n\t{\r\n\t\tif (mxsheet_template == null)\r\n\t\t\tgetMendixObject().setValue(context, MemberNames.MxSheet_Template.toString(), null);\r\n\t\telse\r\n\t\t\tgetMendixObject().setValue(context, MemberNames.MxSheet_Template.toString(), mxsheet_template.getMendixObject().getId());\r\n\t}",
"public Map<String,Sheet> getSheetsByName() {\n return this.sheetsByName;\n }",
"public static void setExcelFile(String path, String sheetName) throws Exception {\r\n\t\ttry {\r\n\t\t\tFileInputStream excelFile = new FileInputStream(path);\r\n\t\t\tworkBook = new HSSFWorkbook(excelFile);\r\n\t\t\tsheet = workBook.getSheet(sheetName);\r\n\t\t\tformatter = new DataFormatter();\r\n\t\t} catch (Exception e) {\r\n\t\t\tthrow (e);\r\n\t\t}\r\n\t//---------------------------------------------------------------------------------\r\n\r\n\t}",
"public int getSheetOrder() {\n return sheetOrder;\n }",
"public static void writeExcelFileForSingleFields(String ruleDataExcelSheetFilePath, List rowDataArr_ForIndividual,String editionYear,int fieldNumber,String state,String realPath,String fieldName,int recentRuleId) throws InvalidFormatException {\n int rowCount = 1;\r\n boolean sheetDupCheck=false;\r\n String fieldNames[]=fieldName.split(\"-\");\r\n String fieldNameValue=fieldNames[0];\r\n try {\r\n \t XSSFWorkbook workbook ;\r\n // \tFile file = new File(\"D:\\\\latest\\\\SOUTH DAKOTA_BUFFALO_5_5.xlsx\");\r\n \t File file = new File(realPath+MappingConstants.EXCELFULEFORRULESCREATION+\".xlsx\"); \r\n \tif (file.exists() == false) {\r\n \t\tworkbook = new XSSFWorkbook();\r\n \t\t XSSFSheet sheet = workbook.createSheet(state+\"_\"+editionYear+\"_\"+fieldNumber);\r\n\t\t//\t Row row1 = sheet.createRow(0);\r\n\t\t//\t Cell cell1 = row1.createCell(0);\r\n\t\t//\t cell1.setCellValue(\"Rule Id:\"+recentRuleId);\r\n \t\t\tfor (int i=0; i<rowDataArr_ForIndividual.size(); i++) {\r\n \t\t\t\tList rowDataList = (ArrayList)rowDataArr_ForIndividual.get(i);\r\n \t\t\t Row row = sheet.createRow(rowCount);\r\n \t\t\t int columnCount = 0;\r\n \t\t\t for (int j = 0; j < rowDataList.size(); j++) {\r\n \t\t\t \tObject colObj = rowDataList.get(j);\r\n \t\t\t Cell cell = row.createCell(columnCount);\r\n \t\t\t CellUtil.setAlignment(cell, workbook, CellStyle.ALIGN_CENTER);\r\n \t\t\t if (colObj instanceof String) {\r\n \t\t\t cell.setCellValue((String) colObj);\r\n \t\t\t } else if (colObj instanceof Integer) {\r\n \t\t\t cell.setCellValue((Integer) colObj);\r\n \t\t\t }\r\n \t\t\t columnCount++;\r\n \t\t\t }\r\n \t\t\t rowCount++;\r\n \t\t\t}\r\n \t\t\tFileOutputStream outputStream = new FileOutputStream(file);\r\n \t\t\tworkbook.write(outputStream);\r\n \t}\r\n \telse{\r\n \t\tint sheetOfDup=0;\r\n \t\tint lastRowInSheet=0;\r\n \t\tfinal InputStream is = new FileInputStream(file);\r\n \t\tworkbook = new XSSFWorkbook(is);\r\n \t\tint noOfSheets=workbook.getNumberOfSheets();\r\n \t\tfor(int sheetCount=0;noOfSheets>sheetCount;sheetCount++){\r\n \t\t\tString sheetOfType = workbook.getSheetAt(sheetCount).getSheetName();\r\n \t\t\tlastRowInSheet = workbook.getSheetAt(sheetCount).getLastRowNum();\r\n \t\t\tif(sheetOfType.equals(state+\"_\"+editionYear+\"_\"+fieldNumber)){\r\n \t\t\t\t sheetDupCheck=true;\r\n \t\t\t\tsheetOfDup=sheetCount;\r\n \t\t\t\tlastRowInSheet=lastRowInSheet+1;\r\n \t\t\t\t break;\r\n \t\t\t}\r\n \t\t\telse{\r\n \t\t\t\tsheetDupCheck=false;\r\n \t\t\t}\r\n \t\t}\r\n \t\t if(sheetDupCheck){\r\n \t\t\tXSSFSheet sheetToAddData= workbook.getSheetAt(sheetOfDup);\r\n\t \t\t\t Row row1 = sheetToAddData.createRow(lastRowInSheet);\r\n\t \t\t\t Cell cell1 = row1.createCell(0);\r\n\t \t\t\t cell1.setCellValue(MappingConstants.ruleIdInExcel+recentRuleId);\r\n\t \t\t\t lastRowInSheet++;\r\n\t\t\t\tfor (int i=0; i<rowDataArr_ForIndividual.size(); i++) {\r\n\t\t\t\t\t\tList rowDataList = (ArrayList)rowDataArr_ForIndividual.get(i);\r\n\t\t\t\t\t\t/*int colOfLastInserted= workbook.getSheetAt(sheetOfDup).;*/\r\n\t\t\t\t\t Row row = sheetToAddData.createRow(lastRowInSheet);\r\n\t\t\t\t\t int columnCount = 0;\r\n\t\t\t\t\t\t for (int j = 0; j < rowDataList.size(); j++) {\r\n\t\t\t\t\t\t \tObject colObj = rowDataList.get(j);\r\n\t\t\t\t\t\t Cell cell = row.createCell(columnCount);\r\n\t\t\t\t\t\t CellUtil.setAlignment(cell, workbook, CellStyle.ALIGN_CENTER);\r\n\t\t\t\t\t\t if (colObj instanceof String) {\r\n\t\t\t\t\t\t cell.setCellValue((String) colObj);\r\n\t\t\t\t\t\t } else if (colObj instanceof Integer) {\r\n\t\t\t\t\t\t cell.setCellValue((Integer) colObj);\r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t\t columnCount++;\r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t\t lastRowInSheet++;\r\n\t\t\t\t}\r\n\t\t\t\tFileOutputStream outputStream = new FileOutputStream(file);\r\n\t\t\t\tworkbook.write(outputStream);\r\n \t\t}\r\n \t\telse{\r\n \t\t\tXSSFSheet sheet = workbook.createSheet(state+\"_\"+editionYear+\"_\"+fieldNumber);\r\n \t\t Row row1 = sheet.createRow(0);\r\n\t \t\t\t Cell cell1 = row1.createCell(0);\r\n\t \t\t\t cell1.setCellValue(\"Rule Id:\"+recentRuleId);\r\n\t\t\t\tfor (int i=0; i<rowDataArr_ForIndividual.size(); i++) {\r\n\t\t\t\t\t\tList rowDataList = (ArrayList)rowDataArr_ForIndividual.get(i);\r\n\t\t\t\t\t Row row = sheet.createRow(rowCount);\r\n\t\t\t\t\t int columnCount = 0;\r\n\t\t\t\t\t\t for (int j = 0; j < rowDataList.size(); j++) {\r\n\t\t\t\t\t\t \tObject colObj = rowDataList.get(j);\r\n\t\t\t\t\t\t Cell cell = row.createCell(columnCount);\r\n\t\t\t\t\t\t CellUtil.setAlignment(cell, workbook, CellStyle.ALIGN_CENTER);\r\n\t\t\t\t\t\t if (colObj instanceof String) {\r\n\t\t\t\t\t\t cell.setCellValue((String) colObj);\r\n\t\t\t\t\t\t } else if (colObj instanceof Integer) {\r\n\t\t\t\t\t\t cell.setCellValue((Integer) colObj);\r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t\t columnCount++;\r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t rowCount++;\r\n\t\t\t\t}\r\n\t\t\t\tFileOutputStream outputStream = new FileOutputStream(file);\r\n\t\t\t\tworkbook.write(outputStream);\r\n \t\t}\r\n \t}\r\n \t\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n \r\n\t}",
"ISheet getSheet(int index);",
"public StrColumn getSheetId() {\n return delegate.getColumn(\"sheet_id\", DelegatingStrColumn::new);\n }",
"public String getBalanceSheet() {\n\n return this.balanceSheet;\n }",
"public static void setExcelFile(String Path,String SheetName) throws Exception {\n\n\t\t\ttry {\n\n \t\t\t// Open the Excel file\n\n\t\t\tFileInputStream ExcelFile = new FileInputStream(Path);\n\n\t\t\t// Access the required test data sheet\n\n\t\t\tExcelWBook = new XSSFWorkbook(ExcelFile);\n\n\t\t\tExcelWSheet = ExcelWBook.getSheet(SheetName);\n\n\t\t\t} catch (Exception e){\n\n\t\t\t\tthrow (e);\n\n\t\t\t}\n\t\t\t\n\n\t}",
"public final void setMxSheet_MxObjectReference(mxmodelreflection.proxies.MxObjectReference mxsheet_mxobjectreference)\r\n\t{\r\n\t\tsetMxSheet_MxObjectReference(getContext(), mxsheet_mxobjectreference);\r\n\t}",
"public SpriteSheet(BufferedImage sheet){\n this.sheet = sheet;\n }",
"public static void setExcelFile(String Path, String SheetName) throws Exception\r\n\t{\r\n\t\t// FileInputStream ExcelFile = new FileInputStream(Path);\r\n\t\tFileInputStream excelFile = null;\r\n\t\ttry{\r\n\t\texcelFile = new FileInputStream(Path);\r\n\t\texcelWBook = new HSSFWorkbook(excelFile);\r\n\t\texcelWSheet = excelWBook.getSheet(SheetName);\r\n\t\t}catch(Exception e){\r\n\t\t\te.printStackTrace();\r\n\t\t} finally{\r\n\t\t\tif(excelFile!=null)\r\n\t\t\t\texcelFile.close();\r\n\t\t\t\t\r\n\t\t}\r\n\t\t\t\r\n\t\t\r\n\t}",
"ISheet addSheet();",
"public String getBalanceSheetName() {\n\n return this.balanceSheetName;\n }",
"public void test47026_1() {\n Workbook source = _testDataProvider.openSampleWorkbook(\"47026.xlsm\");\n Sheet sheet = source.getSheetAt(0);\n Row row = sheet.getRow(0);\n Cell cell = row.getCell(0);\n cell.setCellType(Cell.CELL_TYPE_STRING);\n cell.setCellValue(\"456\");\n }",
"public Iterator<Sheet> sheetIterator() {\n\t\treturn null;\n\t}",
"public Sheet getSheet()\n {\n return ( cells != null & cells.length >= 1\n & cells[0] != null & cells[0].length >= 1\n & cells[0][0] != null\n ? cells[0][0].getSheet() : null );\n }",
"public int getSheetIndex(String arg0) {\n\t\treturn 0;\n\t}",
"public String getSsxl() {\n return ssxl;\n }",
"public ArrayList<String> getData(String testcaseName) throws IOException\n{\n//fileInputStream argument\nArrayList<String> a=new ArrayList<String>();\n\nFileInputStream fis=new FileInputStream(\"D://TestCases.xlsx\");\nXSSFWorkbook workbook=new XSSFWorkbook(fis);\n\nint sheets=workbook.getNumberOfSheets();\n}",
"@DISPID(148)\n @PropGet\n com.exceljava.com4j.excel._Application getApplication();",
"public void setSheetHidden(int arg0, int arg1) {\n\n\t}",
"default Object assignmentBefore(Sheet sheet, Row row, Cell cell, ExcelField excelField, Field field, int index, int colIndex, boolean isHead, Object value) {\n return value;\n }",
"void setOssHomepage(String ossHomepage);",
"public SheetEditor(Sheet sheet, ExcelContext context) {\n\t\tsuper(context);\n\t\tthis.sheet = sheet;\n\t\tsheetIndex = workBook.getSheetIndex(this.sheet);\n\t}",
"private static void setSource(Spreadsheet ss) {\r\n \t\tss.setAttribute(KEY_SRC_SHEET, ss.getSelectedSheet());\r\n \t\tss.setAttribute(KEY_SRC_RANGE, ss.getSelection());\r\n \t\t\r\n \t\tRect sel = ss.getSelection();\r\n \t\tif (sel.getBottom() >= ss.getMaxrows())\r\n \t\t\tsel.setBottom(ss.getMaxrows() - 1);\r\n \t\tif (sel.getRight() >= ss.getMaxcolumns())\r\n \t\t\tsel.setRight(ss.getMaxcolumns() - 1);\r\n \t\tss.setHighlight(sel);\r\n \t\tss.smartUpdate(\"copysrc\", true);\r\n \t}",
"public void setCell(Cell cell)\n {\n myCell = cell;\n }",
"public void setBalanceSheetName(String balanceSheetName) {\n\n this.balanceSheetName = balanceSheetName;\n }",
"void setOfficeVersion(java.lang.String officeVersion);",
"public WriteExcelXLS(String filePath) {\n\t\tsuper(filePath);\n\t\tthis.book = new HSSFWorkbook();\n\t\tthis.sheet = book.createSheet(\"Teste\");\n\t\tthis.cstyle = new CellStyleList(book);\n\t}",
"public Sheet() {\n gearRatio = 4;\n }",
"public ImportExcelData (ASPManager mgr, String page_path)\n {\n super(mgr,page_path);\n }",
"public final void setExcelFile(final File cExcelFile) {\n\t\tthis.excelFile = cExcelFile;\n\t}",
"public WorksheetBuilderImpl() {\n model = new BasicWorksheet();\n }",
"public String getVsheetId() {\n return vsheetId;\n }",
"@IcalProperty(pindex = PropertyInfoIndex.CALSUITE,\n jname = \"calSuite\",\n eventProperty = true,\n todoProperty = true,\n vpollProperty = true\n )\n @NoProxy\n public void setCalSuite(final String val) {\n replaceXproperty(BwXproperty.bedeworkCalsuite, val);\n }",
"public void setHOUSE_NUM1(java.lang.String value)\n {\n if ((__HOUSE_NUM1 == null) != (value == null) || (value != null && ! value.equals(__HOUSE_NUM1)))\n {\n _isDirty = true;\n }\n __HOUSE_NUM1 = value;\n }",
"public static void setCellData(String value, int RowNum, int ColNum) throws IOException {\n\t row = excelWSheet.getRow(RowNum);\n\t cell =row.getCell(ColNum);\n\t if (cell == null) {\n\t \tcell = row.createCell(ColNum);\n\t \tcell.setCellValue(value);\n\t }else {\n\t \tcell.setCellValue(value);\n\t }\n\t // Constant variables Test Data path and Test Data file name\n\t FileOutputStream fileOut = new FileOutputStream(testDataExcelPath + testDataExcelFileName);\n excelWBook.write(fileOut);\n fileOut.flush();\n fileOut.close();\n \n }",
"int getSheetCount();",
"public Excel(Workbook workbook){\n this.workbook = workbook;\n isValid = false;\n initialized = false;\n }",
"public final void setMxSheet_RowObject(mxmodelreflection.proxies.MxObjectType mxsheet_rowobject)\r\n\t{\r\n\t\tsetMxSheet_RowObject(getContext(), mxsheet_rowobject);\r\n\t}",
"public void is3XLConfiguration(Sheet sheet) {\r\n if (sheet.getSheetName().startsWith(\"3XL\")) {\r\n is3XL = true;\r\n } else {\r\n is3XL = false;\r\n }\r\n\r\n }"
] | [
"0.7537785",
"0.7104956",
"0.6838251",
"0.6580224",
"0.65270376",
"0.6520085",
"0.63763875",
"0.62883955",
"0.62704355",
"0.6205091",
"0.59859186",
"0.5982495",
"0.59097296",
"0.5854271",
"0.5728556",
"0.5726734",
"0.5647485",
"0.5602705",
"0.5596614",
"0.5587486",
"0.54976535",
"0.54730755",
"0.5469806",
"0.546882",
"0.5460901",
"0.5430667",
"0.54247934",
"0.5373208",
"0.53562987",
"0.5303986",
"0.52240646",
"0.52146876",
"0.51680326",
"0.51602715",
"0.5151405",
"0.5137084",
"0.5108727",
"0.51004624",
"0.50208104",
"0.50027454",
"0.50003415",
"0.4992908",
"0.49700975",
"0.4961697",
"0.49454805",
"0.49275193",
"0.49154425",
"0.49025765",
"0.48681358",
"0.48614192",
"0.48505",
"0.48294896",
"0.48267218",
"0.48132625",
"0.48132548",
"0.48112586",
"0.4803469",
"0.47945017",
"0.47935808",
"0.4792154",
"0.4786849",
"0.47805884",
"0.47642604",
"0.47613367",
"0.47599885",
"0.47583762",
"0.47557473",
"0.47532886",
"0.4747509",
"0.47415343",
"0.47386524",
"0.4733855",
"0.47279122",
"0.47127268",
"0.4691999",
"0.4687389",
"0.46853948",
"0.46797878",
"0.4675798",
"0.46754757",
"0.465639",
"0.46510282",
"0.46464506",
"0.46433222",
"0.4641726",
"0.46319392",
"0.46247023",
"0.46182084",
"0.46159634",
"0.46142736",
"0.4605704",
"0.4604356",
"0.46024135",
"0.4602049",
"0.4580784",
"0.45761883",
"0.4572747",
"0.45708394",
"0.45420727",
"0.45366067"
] | 0.7846468 | 0 |
Getter for property us1120sheetName. | public String getUs1120sheetName() {
return this.us1120sheetName;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getSheetName(){\n return sheetName;\n }",
"public String getSheetName() {\n return sheetName;\n }",
"public String getUs1120sheet() {\n\n return this.us1120sheet;\n }",
"public String getBalanceSheetName() {\n\n return this.balanceSheetName;\n }",
"public String getSheetName(int arg0) {\n\t\treturn null;\n\t}",
"public void setSheetName(String name){\n this.sheetName = name;\n }",
"public int getSheetNumber(){\n return sheetNumber;\n }",
"public final String getName() {\n/* 231 */ return \"sheet-collate\";\n/* */ }",
"public void setSheetNameForGermplasm(String sheetName);",
"ISheet getSheet(String name);",
"public void setUs1120sheetName(String us1120sheetName) {\n\n this.us1120sheetName = us1120sheetName;\n }",
"public long getSheetId() {\r\n return sheetId;\r\n }",
"public void setUs1120sheet(String us1120sheet) {\n\n this.us1120sheet = us1120sheet;\n }",
"public int getSheetIndex() {\r\n return sheetIndex;\r\n }",
"public void setSheetName(String sheetName) {\n this.sheetName = sheetName;\n }",
"public String getCellname() {\r\n return cellname;\r\n }",
"public Map<String,Sheet> getSheetsByName() {\n return this.sheetsByName;\n }",
"java.lang.String getEmployeeName();",
"public NavigableMap<String,List<String>> getSheetsNamesBySurt() {\n return this.sheetNamesBySurt;\n }",
"public StrColumn getSheetId() {\n return delegate.getColumn(\"sheet_id\", DelegatingStrColumn::new);\n }",
"public void setSheetName(int arg0, String arg1) {\n\n\t}",
"public String getStyleSheetName()\n {\n return _styleSheetName;\n }",
"public String getBalanceSheet() {\n\n return this.balanceSheet;\n }",
"public Sheet getSheet(String arg0) {\n\t\treturn null;\n\t}",
"private void setExcelName(String excelName) {\n this.excelName = excelName;\n }",
"static String getSheetName(String mandantName,String location)\n {\n StringBuilder b = new StringBuilder(mandantName);\n String shortLoc = location.substring(0,Math.min(location.length(),\n maxSheetNameLength/2)); /* up to maxlen/2 chars for location */\n if(b.length()+1+shortLoc.length()>maxSheetNameLength)\n {\n b.replace(maxSheetNameLength-shortLoc.length(),\n maxSheetNameLength,shortLoc);\n b.setCharAt(maxSheetNameLength-1-shortLoc.length(),'_');\n if(b.length()>maxSheetNameLength) b.delete(maxSheetNameLength,b.length());\n }\n else\n {\n b.append('_').append(shortLoc);\n }\n return WorkbookUtil.createSafeSheetName(b.toString());\n }",
"public java.lang.String getFromName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(FROMNAME$4, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }",
"@Override\n\tpublic Sheet getSheet() {\n\t\treturn null;\n\t}",
"java.lang.String getSchoolName();",
"public Sheet getSheet()\n {\n return ( cells != null & cells.length >= 1\n & cells[0] != null & cells[0].length >= 1\n & cells[0][0] != null\n ? cells[0][0].getSheet() : null );\n }",
"@Nullable\n protected final String getBeanName() {\n return this.beanName;\n }",
"public String getSchoolName() {\r\n return tfSchoolName.getText().trim();\r\n }",
"public void setSheetNumber(int number){\n this.sheetNumber = number;\n }",
"public String getaWorkName() {\n return aWorkName;\n }",
"java.lang.String getCompanyName();",
"java.lang.String getCompanyName();",
"protected String getComponentName() {\n return (component == null) ? \"*No Name*\" : component.toString();\n }",
"public String getSsxl() {\n return ssxl;\n }",
"public java.lang.String getName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(NAME$0, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }",
"public java.lang.String getName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(NAME$0, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }",
"public String getEmployeeName();",
"public String getStrName() {\n return strName;\n }",
"public String getBookNameCn() {\n return bookNameCn;\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getBookName();",
"public java.lang.String getName()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(NAME$0, 0);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getStringValue();\r\n }\r\n }",
"public String getSCompanyName() {\n return sCompanyName;\n }",
"String getAbsoluteName() {\n return absoluteName;\n }",
"public String getVsheetId() {\n return vsheetId;\n }",
"public java.lang.String getName()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NAME$26);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getStringValue();\r\n }\r\n }",
"public String getStrappname() {\n return strappname;\n }",
"public String getBoardName(){\n return boardNameLbl.getText();\n }",
"private XSSFSheet getExcelSheet(String filename) throws IOException {\n\tFile excelFile = new File(filename);\n\tFileInputStream excelInputStream = new FileInputStream(excelFile);\n\tXSSFWorkbook workBook = new XSSFWorkbook(excelInputStream);\n\tXSSFSheet hssfSheet = workBook.getSheetAt(FIRST_SHEET_ON_BOOK);\n\treturn hssfSheet;\n }",
"public String getHomeworkfilename() {\n return homeworkfilename;\n }",
"public ComponentName getComponentName() {\n return mInternal.getComponentName();\n }",
"public int getSheetIndex(String arg0) {\n\t\treturn 0;\n\t}",
"public String getEmployeeName() {\n return employeeName;\n }",
"String getSupName();",
"public String getScoreboardName() {\n/* 1999 */ return getGameProfile().getName();\n/* */ }",
"@Override\n\tpublic java.lang.String getUserName() {\n\t\treturn _employee.getUserName();\n\t}",
"public String getEmployeeName() {\r\n\t\r\n\t\treturn employeeName;\r\n\t}",
"public void setBalanceSheetName(String balanceSheetName) {\n\n this.balanceSheetName = balanceSheetName;\n }",
"String getIssueName();",
"public String getStrDashboardName() {\n return strDashboardName;\n }",
"public java.lang.String getUniqueName()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(UNIQUENAME$10, 0);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getStringValue();\r\n }\r\n }",
"public String getCustomName ( ) {\n\t\treturn extract ( handle -> handle.getCustomName ( ) );\n\t}",
"public int getActiveSheetIndex() {\n\t\treturn 0;\n\t}",
"public java.lang.String getEmployeeName() {\n java.lang.Object ref = employeeName_;\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 employeeName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"ISheet getSheet(int index);",
"public String getWorkerName(){\r\n\t\ttry {\r\n\t\t\treturn this.workerobj.getString(WorkerController.NAME);\r\n\t\t} catch (JSONException e) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}",
"public java.lang.String getStudent_name() {\n\t\treturn _primarySchoolStudent.getStudent_name();\n\t}",
"public String getEmployeeName() {\r\n\t\treturn employeeName;\r\n\t}",
"public java.lang.String getName()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NAME$6);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getStringValue();\r\n }\r\n }",
"@VisibleForTesting\n ComponentName getComponentName() {\n return mComponentName;\n }",
"public static String getAppName(){\r\n return getProperty(\"name\", \"Jin\");\r\n }",
"BaseComponent getComponentName();",
"public String getStrdisplayname() {\n return strdisplayname;\n }",
"public java.lang.String getName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NAME$4);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }",
"private static Spreadsheet findSpreadsheet(RubyProject rubyProject, String sheetName) {\r\n \t\tfor (RubyProjectElement rubyElement : rubyProject.getRubyElementsInternal()) {\r\n \t\t\tif (rubyElement.getFileExtension().equals(\"uss\")) {\r\n \t\t\t\tif (rubyElement.getName().equals(sheetName)) {\r\n \t\t\t\t\treturn (Spreadsheet)rubyElement;\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn null;\r\n \t}",
"public String getBeanName() {\r\n\t\treturn beanName;\r\n\t}",
"public abstract String getWorkerName();",
"@DISPID(148)\n @PropGet\n com.exceljava.com4j.excel._Application getApplication();",
"public java.lang.String getWorkername() {\n\treturn workername;\n}",
"public String name() {\n return myStrVal;\n }",
"public QName getComponentName() {\n return _componentName;\n }",
"public String getScoreboardName()\n {\n return name;\n }",
"public org.apache.xmlbeans.XmlString xgetFromName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(FROMNAME$4, 0);\n return target;\n }\n }",
"public String getFileName() {\n return getCellContent(FILE).split(FILE_LINE_SEPARATOR)[0];\n }",
"public java.lang.String getName()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NAME$8);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getStringValue();\r\n }\r\n }",
"public String getReportname() {\n return reportname;\n }",
"public java.lang.String getEmployeeName() {\n java.lang.Object ref = employeeName_;\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 employeeName_ = s;\n return s;\n }\n }",
"public java.lang.String getSchoolName() {\n java.lang.Object ref = schoolName_;\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 schoolName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public String getBookName()\r\n {\r\n\treturn bookName;\r\n }",
"public boolean isSheetExist(String sheetName){\n\t\tint index = workbook.getSheetIndex(sheetName);\n\t\tif(index==-1){\n\t\t\tindex=workbook.getSheetIndex(sheetName.toUpperCase());\n\t\t\t\tif(index==-1)\n\t\t\t\t\treturn false;\n\t\t\t\telse\n\t\t\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t\treturn true;\n\t}",
"public String getSrsName() {\n\t\treturn this.srsName;\n\t}",
"public String getTheName() {\n\t\treturn name.getText();\n\t}",
"public JTextPane getHomeName() {\n return this.homeName;\n }",
"public String asName() {\n return this.name().toLowerCase(Locale.getDefault());\n }",
"public String getReportName() {\r\n return reportName;\r\n }",
"public void loadSheet(String sheetName) {\n\t\tsheet = excelWBook.getSheet(sheetName);\n\t}",
"String getComponentName();"
] | [
"0.80172735",
"0.79731107",
"0.78372526",
"0.70568836",
"0.67012674",
"0.6684845",
"0.65766954",
"0.647856",
"0.62954175",
"0.62684",
"0.6241429",
"0.61933136",
"0.6112999",
"0.60939443",
"0.60305285",
"0.59830666",
"0.5967288",
"0.5922334",
"0.59123707",
"0.5904499",
"0.587905",
"0.580354",
"0.5793367",
"0.5750157",
"0.57060355",
"0.56694907",
"0.5666929",
"0.5641554",
"0.55881435",
"0.55547446",
"0.55362576",
"0.550763",
"0.55038965",
"0.547933",
"0.5468087",
"0.5468087",
"0.54666543",
"0.54628927",
"0.544612",
"0.544612",
"0.54448485",
"0.54392684",
"0.54230165",
"0.54184395",
"0.54130757",
"0.53911066",
"0.53820306",
"0.5379705",
"0.5373864",
"0.53679264",
"0.5364674",
"0.5360418",
"0.53413445",
"0.53377676",
"0.53308207",
"0.5329683",
"0.53296787",
"0.53286326",
"0.53283155",
"0.53252125",
"0.5299484",
"0.5298532",
"0.52976966",
"0.5297016",
"0.5296978",
"0.52910364",
"0.5290165",
"0.52849644",
"0.5284276",
"0.5275145",
"0.527285",
"0.5268264",
"0.5260286",
"0.52600527",
"0.52575344",
"0.525114",
"0.5243849",
"0.5240345",
"0.52395564",
"0.52359766",
"0.5233501",
"0.5228378",
"0.52239317",
"0.52215344",
"0.52190894",
"0.52140987",
"0.5211566",
"0.52068025",
"0.52044785",
"0.52023906",
"0.52005064",
"0.5198446",
"0.5195611",
"0.518462",
"0.51822525",
"0.5175432",
"0.51748484",
"0.51686794",
"0.51667714",
"0.51479"
] | 0.8396031 | 0 |
Setter for property us1120sheetName. | public void setUs1120sheetName(String us1120sheetName) {
this.us1120sheetName = us1120sheetName;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getUs1120sheetName() {\n\n return this.us1120sheetName;\n }",
"public void setSheetName(String name){\n this.sheetName = name;\n }",
"public void setUs1120sheet(String us1120sheet) {\n\n this.us1120sheet = us1120sheet;\n }",
"public void setSheetNameForGermplasm(String sheetName);",
"public String getSheetName(){\n return sheetName;\n }",
"public void setSheetName(int arg0, String arg1) {\n\n\t}",
"public String getSheetName() {\n return sheetName;\n }",
"public void setSheetName(String sheetName) {\n this.sheetName = sheetName;\n }",
"public String getUs1120sheet() {\n\n return this.us1120sheet;\n }",
"private void setExcelName(String excelName) {\n this.excelName = excelName;\n }",
"private void updateDisplayName() {\n String path;\n FileObject webRoot = ProjectWebRootQuery.getWebRoot(styleSheet);\n if(webRoot == null) {\n path = styleSheet.getNameExt();\n } else {\n path = FileUtil.getRelativePath(webRoot, styleSheet);\n }\n setDisplayName(path);\n }",
"public String getSheetName(int arg0) {\n\t\treturn null;\n\t}",
"public void setBalanceSheetName(String balanceSheetName) {\n\n this.balanceSheetName = balanceSheetName;\n }",
"public void setSheetNumber(int number){\n this.sheetNumber = number;\n }",
"public final String getName() {\n/* 231 */ return \"sheet-collate\";\n/* */ }",
"public String getBalanceSheetName() {\n\n return this.balanceSheetName;\n }",
"public void setName(String n) {\r\n this.weekName = n;\r\n }",
"@Test\n void renameSheetWithNamedRangeReferringToUnicodeSheetName() throws IOException {\n String unicodeName = \"Sheet\\u30FB201\";\n String asciiName = \"Sheet 1\";\n String rangeName = \"test_named_range\";\n try (Workbook wb1 = _testDataProvider.createWorkbook()) {\n wb1.createSheet(unicodeName);\n\n Name name1 = wb1.createName();\n name1.setNameName(rangeName);\n name1.setRefersToFormula(\"'\"+unicodeName+\"'!A1:A6\");\n\n wb1.setSheetName(0, asciiName);\n assertEquals(asciiName, name1.getSheetName());\n\n try (Workbook wb2 = _testDataProvider.writeOutAndReadBack(wb1)) {\n Name name2 = wb2.getName(rangeName);\n assertNotNull(name2);\n // Eventually this will be updated, but currently we don't update the sheet name\n assertEquals(asciiName, name2.getSheetName());\n }\n }\n }",
"public SpriteSheetSplitter setName(String name) {\n this.name = name;\n return this;\n }",
"public void setSheetId(long value) {\r\n this.sheetId = value;\r\n }",
"@Override\n public String setName(int numSat, SatelliteSystem sys) {\n return super.setName(numSat, sys);\n }",
"public void setCalSuiteName(final String val) {\n calSuiteName = val;\n }",
"public static void setExcelFileSheet(String sheetName) throws IOException {\n\t testDataExcelPath = currentDir+\"\\\\src\\\\example\\\\trademeSellAndBuy\\\\testData\\\\\";\n\t // Open the Excel file\n FileInputStream excelFile = new FileInputStream(new File(testDataExcelPath + testDataExcelFileName));\n excelWBook = new XSSFWorkbook(excelFile);\n excelWSheet = (XSSFSheet) excelWBook.getSheet(sheetName);\n }",
"public void setSheetNumberForGermplasm(Integer sheetNumber);",
"public void setName (String n){\n\t\tname = n;\n\t}",
"public void setBalanceSheet(String balanceSheet) {\n\n this.balanceSheet = balanceSheet;\n }",
"public void setNameString(String s) {\n nameString = s;\r\n }",
"static String getSheetName(String mandantName,String location)\n {\n StringBuilder b = new StringBuilder(mandantName);\n String shortLoc = location.substring(0,Math.min(location.length(),\n maxSheetNameLength/2)); /* up to maxlen/2 chars for location */\n if(b.length()+1+shortLoc.length()>maxSheetNameLength)\n {\n b.replace(maxSheetNameLength-shortLoc.length(),\n maxSheetNameLength,shortLoc);\n b.setCharAt(maxSheetNameLength-1-shortLoc.length(),'_');\n if(b.length()>maxSheetNameLength) b.delete(maxSheetNameLength,b.length());\n }\n else\n {\n b.append('_').append(shortLoc);\n }\n return WorkbookUtil.createSafeSheetName(b.toString());\n }",
"public void setName(String n) {\r\n name = n;\r\n }",
"public void setName (String n) {\n name = n;\n }",
"public int getSheetNumber(){\n return sheetNumber;\n }",
"void xsetName(org.apache.xmlbeans.XmlString name);",
"void xsetName(org.apache.xmlbeans.XmlString name);",
"public void setEditCalSuiteName(final String val) {\n editCalSuiteName = val;\n }",
"public void setSheetIndex(int sheetIndex) {\r\n this.sheetIndex = sheetIndex;\r\n }",
"public void setStrName(String strName) {\n this.strName = strName;\n }",
"public void setName(String s) {\n\t\tclassName = s;\n\t}",
"public void setName(String n)\n\t{\n\t\tfullName=n;\n\t}",
"public void loadSheet(String sheetName) {\n\t\tsheet = excelWBook.getSheet(sheetName);\n\t}",
"public static void setName(String n){\n\t\tname = n;\n\t}",
"public void setCellname(String cellname) {\r\n this.cellname = cellname;\r\n }",
"@Override\n public void setBeanName(String name) {\n System.out.println(\"## setBeanName(name) My bean Name is : \" + name);\n }",
"public void setName(String n) {\r\n\t\tthis.name = n;\r\n\t}",
"@IcalProperty(pindex = PropertyInfoIndex.NAME,\n required = true,\n eventProperty = true,\n todoProperty = true,\n journalProperty = true)\n public void setName(final String val) {\n name = val;\n }",
"public void setUserName(String Strusername) {\n\t\tstepstatus = basepage.setText(Username, Strusername);\n\t\treportEvent(stepstatus, \"Able to enter username\", \"Unable to enter username\", driver, true);\n\t}",
"public void setDisplayName (\r\n String strDisplayName) throws java.io.IOException, com.linar.jintegra.AutomationException;",
"public void setName(String s) {\n\t\t\n\t\tname = s;\n\t}",
"public void setName(final String strname) {\n this.action.setValue(this.textBoxname, strname);\n }",
"public void setSupregname( java.lang.String newValue ) {\n __setCache(\"supregname\", newValue);\n }",
"public void setName(String nm){\n\t\tname = nm;\n\t}",
"public void setName(String name) {\n if (name != null && name.length() > 40) {\n this.name = name.substring(0, 40);\n } else {\n this.name = name;\n }\n }",
"public void setName(String n) {\n this.name = n;\n }",
"public static void set_SetName(String v) throws RuntimeException\n {\n UmlCom.send_cmd(CmdFamily.javaSettingsCmd, JavaSettingsCmd._setJavaSetNameCmd, v);\n UmlCom.check();\n \n _set_name = v;\n }",
"public void setExcelFile(String excelfilepath,String Sheetname) throws IOException {\n\t\t File file=new File(excelfilepath);\n\t\t FileInputStream inputstream=new FileInputStream(file);\n\t\t workbook =new XSSFWorkbook(inputstream);\n\t\t sheet =workbook.getSheet(Sheetname);\n\n\t}",
"public static void setString(String usrname) {\n\t\tUserPanel.usrname = usrname;\r\n\t}",
"public void setNameofRenter(String usrName) throws Exception{\n\n\t\t/*\n\t\t * Input is invalid if an empty String is passed in.\n\t\t */\n\t\tif(usrName.length() == 0){\n\t\t\tthrow new Exception();\n\t\t}\n\t\tnameofRenter = usrName;\n\t}",
"public void setName(String name) {\r\n this.name = name.trim();\r\n }",
"public void setName(String inName)\n {\n\tname = inName;\n }",
"ISheet getSheet(String name);",
"public void setShRepositoryName(String val) {\n\n\t\tshRepositoryName = val;\n\n\t}",
"private void setName(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n name_ = value;\n }",
"private void setName(String nameIn){\r\n\t\tplayerName = nameIn;\r\n\t}",
"private void setName(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n name_ = value;\n }",
"private void setName(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n name_ = value;\n }",
"private void setName(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n name_ = value;\n }",
"public void setName(String s) {\n this.name = s;\n }",
"public void setHomeName(String homeName) {\n this.homeName.setText(homeName);\n }",
"public void setName(String tmp) {\n this.name = tmp;\n }",
"public void setWorkername(java.lang.String newWorkername) {\n\tworkername = newWorkername;\n}",
"@Override\n\tpublic void setBeanName(String beanname) {\n\t\t\n\t\tSystem.out.println(\"Bean name is : \" + beanname);\n\t\t\n\t}",
"public ExcelSheet(HSSFWorkbook wb, String _sheetName) {\n\t\t// create a sheet with the provided name \n\t\t// in the provided workbook\n\t\t// limit to the 31 first characters\n\t\tif (_sheetName.length() > 31) {\n\t\t\tthis.SheetName = _sheetName.substring(0, 31);\n\t\t} else {\n\t\t\tthis.SheetName = _sheetName;\n\t\t}\n\t\tsheet = wb.createSheet(SuppressForbiddenChar(this.SheetName));\n\t\trowIndex = 0 ;\n\t\tcellStyles = new CellStyles(wb);\n\t}",
"public void setName(String n){ name=n; }",
"public void setTabName(String value) {\n this.tabName = value;\n }",
"public void setName(String inName)\n {\n name = inName;\n }",
"@Autowired(required=false)\n public void setSheetsByName(Map<String,Sheet> map) {\n this.sheetsByName = map;\n }",
"public void setsName(String sName) {\n this.sName = sName == null ? null : sName.trim();\n }",
"public void setName(String name)\n {\n this.name = name.trim();\n }",
"public static void setTestName(String rnTest)\n\t{\n\t\trnTestName = rnTest;\n\t\tlogger.info(\"set test case name\");\n\t\t\n\t}",
"public void setName(String nameIn) {\n name = nameIn;\n }",
"public void setName(String name) {\r\n\t\tthis.title = name;\r\n\t}",
"public String getStyleSheetName()\n {\n return _styleSheetName;\n }",
"public static void setExcelFile(String filePath, String shName)\n\t{\n\t\t//open excel file\n\t\ttry {\n\t\t\tlogger.info(\"creating file inputstream object and setting up file path and sheet\");\n\t\t\tFileInputStream fis = new FileInputStream(filePath);\n\t\t\t\n\t\t\tlogger.debug(\"creating new object for workbook\");\n\t\t\t\n\t\t\txlWBook = new XSSFWorkbook(fis); \n\t\t\t\n\t\t\tlogger.debug(\"get sheet from workbook object\");\n\t\t\txlSheet = xlWBook.getSheet(shName);\n\t\t\tlogger.info(\"created xl sheet object\");\n\t\t\t\t\t\t\n\t\t\t\n\t\t} catch (FileNotFoundException e) {\n\t\t\t\n\t\t\tlogger.error(\"Function - setExcelFile: file not found\", e);\n\t\t\te.printStackTrace();\n\t\t}\n\t\tcatch(IOException e)\n\t\t{\n\t\t\tlogger.error(\"Function - setExcelFile: IO exception occured\", e);\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t}",
"private void setNewName(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n newName_ = value;\n }",
"public void setName(String name) {\n\t\tName = name;\n\t}",
"public NavigableMap<String,List<String>> getSheetsNamesBySurt() {\n return this.sheetNamesBySurt;\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(java.lang.String name)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NAME$26);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(NAME$26);\r\n }\r\n target.setStringValue(name);\r\n }\r\n }",
"public long getSheetId() {\r\n return sheetId;\r\n }",
"public void setName(java.lang.String name)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(NAME$0, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(NAME$0);\n }\n target.setStringValue(name);\n }\n }",
"public void setName(java.lang.String name)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(NAME$0, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(NAME$0);\n }\n target.setStringValue(name);\n }\n }",
"@Override\r\n public void setName(String name) {\n }",
"public final void setName(final String inName) {\n mName = inName;\n }",
"public String setName(String name){\n return personName = name;\n }",
"public void setName(String value) {\n\t\tname = value;\n\t}",
"public static String setName()\n {\n read_if_needed_();\n \n return _set_name;\n }",
"public void setName(java.lang.String name)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(NAME$0, 0);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(NAME$0);\r\n }\r\n target.setStringValue(name);\r\n }\r\n }",
"public void setName(String value) {\n this.name = value;\n }",
"public void setName(String n);",
"public static void setFirstName(String name){\n setUserProperty(Constants.ZeTarget_keyForUserPropertyFName, name);\n }",
"@Override\n\tpublic void setName( final String name )\n\t{\n\t\tsuper.setName( name );\n\t}"
] | [
"0.7717621",
"0.73296005",
"0.70675784",
"0.7059093",
"0.70469683",
"0.7035473",
"0.70343137",
"0.67305136",
"0.66807455",
"0.65150553",
"0.59519374",
"0.5927867",
"0.58830106",
"0.58567613",
"0.5799968",
"0.576755",
"0.5708453",
"0.5580189",
"0.54869443",
"0.54673755",
"0.542943",
"0.5426325",
"0.5425875",
"0.541712",
"0.54163796",
"0.53967446",
"0.53957635",
"0.53940517",
"0.5373453",
"0.5350882",
"0.53495747",
"0.53467077",
"0.53467077",
"0.5296647",
"0.5296354",
"0.5292812",
"0.5280829",
"0.52786267",
"0.5273954",
"0.5258176",
"0.52455086",
"0.5243392",
"0.5226757",
"0.5225785",
"0.52253616",
"0.5206391",
"0.5196046",
"0.5192758",
"0.5184893",
"0.5172312",
"0.5170791",
"0.5165753",
"0.51630694",
"0.5147422",
"0.5143697",
"0.5137989",
"0.5136181",
"0.51171154",
"0.5114425",
"0.51126546",
"0.5111628",
"0.5110229",
"0.510694",
"0.510694",
"0.510694",
"0.51041937",
"0.510118",
"0.5100362",
"0.50967216",
"0.5095035",
"0.50902814",
"0.5086415",
"0.50862545",
"0.506778",
"0.5066753",
"0.5059663",
"0.5058706",
"0.50583327",
"0.50557953",
"0.50471765",
"0.5037817",
"0.5035564",
"0.50344026",
"0.50320977",
"0.5028008",
"0.5025215",
"0.502078",
"0.50176203",
"0.50116205",
"0.50116205",
"0.5009474",
"0.50086313",
"0.50052035",
"0.5002227",
"0.49997112",
"0.49983633",
"0.4994869",
"0.49942023",
"0.49928695",
"0.49885762"
] | 0.7290949 | 2 |
Getter for property profitLoss. | public String getProfitLoss() {
return this.profitLoss;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getProfitLossName() {\n\n return this.profitLossName;\n }",
"public void setProfitLoss(String profitLoss) {\n\n this.profitLoss = profitLoss;\n }",
"public double getExpLoss()\r\n\t{\treturn this.expLoss;\t}",
"public double getProfit() {\n\t\treturn profit;\n\t}",
"public double getProfit() {\n\t\treturn profit;\n\t}",
"public double getProfit(){\n return getPrice() * PROFIT_IN_PERCENTS / 100;\n }",
"public LossModel getLoss() {\n return new LossModel(600, 30, 500);\n }",
"public double getPvpExpLoss() \r\n\t{\treturn this.pvpExpLoss;\t}",
"public void setProfitLossName(String profitLossName) {\n\n this.profitLossName = profitLossName;\n }",
"@Override\n\tpublic int getProfit() {\n\t\treturn 0;\n\t}",
"public double getRealizedProfit() {\n return this.realizedProfit ;\n }",
"public BigDecimal getRealProfit() {\r\n return realProfit;\r\n }",
"public BigDecimal getLossDs() {\r\n return lossDs;\r\n }",
"public double getTotalSalesProfit(){\n return totalSaleProfit;\n }",
"public BigDecimal getRecommendStopLoss() {\n return recommendStopLoss;\n }",
"public double getProfit() {\n\n\n double difference = maxRange * GAS_RATE;\n double sum = super.getProfit();\n\n return sum - difference;\n\n }",
"public BigDecimal getLossSd() {\r\n return lossSd;\r\n }",
"public BigDecimal getAgencyProfit() {\r\n return agencyProfit;\r\n }",
"public Integer getExpense() {\n return expense;\n }",
"public double getIncome() {\n\n return gross;\n }",
"public BigDecimal getMarkProfit() {\r\n return markProfit;\r\n }",
"public float getExpense() throws IllegalArgumentException {\n\t\treturn expense;\n\t}",
"public BigDecimal getRecommendStopProfit() {\n return recommendStopProfit;\n }",
"public Integer getLoanProfitandlossId() {\n return loanProfitandlossId;\n }",
"public int losses(String team) {\n return loss[findTeamIndex(team)];\n }",
"public double getReliability() {\r\n return reliability;\r\n }",
"public double getexpense()\n\t{\n\t\treturn this.expenses;\n\t}",
"public BigDecimal getCarProfitMoney() {\n return carProfitMoney;\n }",
"@Override\r\n\tpublic int getPayCheque() {\n\t\treturn profit+annuelSalary;\r\n\t\t\r\n\t}",
"public int getDefensePower() {\n return defensePower;\n }",
"public float getDefense()\n {\n return defense;\n }",
"public double getGrossSales() {\n return grossSales;\n}",
"public int losses(String team) {\n if (team == null || !st.contains(team))\n throw new IllegalArgumentException(\"Invalid Arguments!\");\n return loss[st.get(team)];\n }",
"double getTotalProfit();",
"@Override\r\n\tpublic Double getModel_stockf_prop_score() {\n\t\treturn super.getModel_stockf_prop_score();\r\n\t}",
"public int getWorth()\n {\n return worth;\n }",
"public double getGrossSales() {\n return grossSales;\n }",
"@Override\n\tpublic double getDefense() {\n\t\treturn 0;\n\t}",
"public BigDecimal getPercentageProfitPStd();",
"public Double getSaleNetWorth() {\r\n return saleNetWorth;\r\n }",
"public double getmoneySaved()\n\t{\n\t\treturn this.getincome()-this.getexpense();\n\t}",
"public String getAwayLoss(String team) {\n\n return getGameInfo(team, \"away_loss\");\n }",
"@Override\n public double earnings() {\n return getCommissionRate() * getGrossSales();\n }",
"public int getLosses() {\n return losses;\n }",
"public String getUnitPriceDiscountHigh() {\n return this.UnitPriceDiscountHigh;\n }",
"public Integer getExpenseAmount() {\r\n return expenseAmount;\r\n }",
"@Override\n public double getHonorario() {\n return super.getHonorario() * 1.05;\n }",
"public int getDamageDealt () {\r\n\t\treturn this.damageDealt;\r\n\t}",
"public BigDecimal getPercentageProfitPLimit();",
"int getDefense();",
"int getDefense();",
"int getDefense();",
"int getDefense();",
"int getDefense();",
"int getDefense();",
"public String getDiscountPriceHigh() {\n return this.DiscountPriceHigh;\n }",
"public String getSupEntMoney() {\n return supEntMoney;\n }",
"public float getPropertyPenalty() {\n return propertyPenalty;\n }",
"@Override\n public final float getSpecialDefenseValue() {\n return _defenseValue;\n }",
"double getReliability();",
"@Override\n public int damage() {\n int newDamage=criticalStrike();\n return newDamage;\n }",
"@Override\n\tpublic double getSalud() {\n\t\treturn this.salud;\n\t}",
"public int getLosses() {\n return losses;\n }",
"public int getSalePrice() {\n return salePrice;\n }",
"public int salePrice(){\n return this.salePrice;\n }",
"public EntityImpl getPublicCashPenalty() {\n return (EntityImpl)getEntity(0);\n }",
"public String getHomeLoss(String team) {\n\n return getGameInfo(team, \"home_loss\");\n }",
"public BigDecimal getOverdueAmount() {\n return overdueAmount;\n }",
"float getBonusExp();",
"public int getGold(){\n return this.gold;\n }",
"public Integer getConsumption() {\r\n return consumption;\r\n }",
"public double getBonus(){\r\n return bonus;\r\n }",
"public int getProgeny() {\n return this.progeny;\n }",
"int getBonusMoney();",
"float getWinLossRatio();",
"public double getLowPrice() {\n return this.lowPrice;\n }",
"String getDamage() {\n return damage;\n }",
"public int getProteksi(){\n\t\treturn (getTotal() - getPromo()) * protectionCost / 100;\n\t}",
"public Money getLuggage() {\n\t\treturn luggage;\n\t}",
"public String getDegrade() {\n return degrade;\n }",
"int getBonusExp();",
"int getBonusExp();",
"@Column(name = \"exp_gained\", precision = 10)\n\t@Override\n\tpublic Integer getExpGained() {\n\t\treturn (Integer) getValue(3);\n\t}",
"public int getProfit(Item item) {\n\t\treturn profit.get(item);\n\t}",
"public double getDamage() {\n return damage;\n }",
"public int[] getWinLoss()\n {\n int[] winst = new int[]\n {\n wins , losses\n };\n return winst;\n }",
"public int losses(String team) {\n return getTeamByName(team).losses;\r\n }",
"public int getSellPrice(){\n\t\treturn (int)(price * 0.6);\n\t}",
"public String getPricePro() {\n return pricePro;\n }",
"public String getSalePercent() {\n\t\treturn salePercent;\n\t}",
"public int getEquippedWeaponDamage() {\n return 0;\n }",
"public Float getGoodsPrize() {\n return goodsPrize;\n }",
"public Money getOldPrice() {\n\t\treturn oldPrice;\n\t}",
"public Double getGoodsPrice() {\n return goodsPrice;\n }",
"public double getUnRealizedCashProfit() {\n double profit = 0 ;\n double lastTP = 0.0 ;\n ScripITD itdVal = null ;\n ScripEOD eodVal = null ;\n\n // We have unrealized profit if and only if we have positive active units\n if( getNumActiveCashUnits() > 0 ) {\n itdVal = this.itdValueCache.getScripITDForSymbol( this.symbol ) ;\n if( itdVal != null ) {\n lastTP = itdVal.getPrice() ;\n }\n else {\n eodVal = this.eodValueCache.getScripEOD( this.symbol ) ;\n if( eodVal != null ) {\n lastTP = eodVal.getClosingPrice() ;\n }\n else {\n throw new IllegalArgumentException( \"Symbol \" + this.symbol +\n \" not registered for calculating LTP\" ) ;\n }\n }\n\n profit = getNumActiveCashUnits() * ( lastTP - this.avgCashUnitPrice ) ;\n\n // Approximately 0.87% of the profit is taxes and brokerage.\n // Subtract that from the profit.\n profit -= (0.87/100)*profit ;\n }\n return profit ;\n }",
"public void setProfit(double profit) {\n\t\tthis.profit = profit;\n\t}",
"@Override\n\tpublic LossType getLossType() {\n\t\treturn LossType.square_loss;\n\t}",
"@JsonIgnore\r\n public Double priceReduction() {\n if (wasPrice == null || nowPrice == null)\r\n return 0D;\r\n\r\n return wasPrice - nowPrice;\r\n }",
"public double getWorth() {\r\n\t\treturn worth;\r\n\t}",
"public int getOpponentScore(){\n return this.oppoScore;\n }"
] | [
"0.7977064",
"0.74684083",
"0.72003436",
"0.70776415",
"0.70776415",
"0.69337153",
"0.6909278",
"0.6778766",
"0.66876036",
"0.66645926",
"0.66388464",
"0.6626183",
"0.65639734",
"0.64410514",
"0.63737833",
"0.6369831",
"0.6323241",
"0.6267939",
"0.61561537",
"0.61347",
"0.6104056",
"0.6103864",
"0.60881126",
"0.6054622",
"0.60035133",
"0.59886444",
"0.59870994",
"0.59829175",
"0.59488755",
"0.59273833",
"0.5893634",
"0.58669615",
"0.58334094",
"0.58205354",
"0.58128494",
"0.5812598",
"0.58067995",
"0.57989913",
"0.5791468",
"0.57741183",
"0.5771832",
"0.5767151",
"0.57649106",
"0.57519406",
"0.5737696",
"0.5737031",
"0.57339543",
"0.57266134",
"0.57246417",
"0.57148015",
"0.57148015",
"0.57148015",
"0.57148015",
"0.57148015",
"0.57148015",
"0.5712843",
"0.5708208",
"0.56998426",
"0.56983066",
"0.5686493",
"0.56779605",
"0.5671991",
"0.5667095",
"0.56463313",
"0.5645548",
"0.5643367",
"0.56408733",
"0.5640763",
"0.5632103",
"0.56283134",
"0.5623871",
"0.5623428",
"0.5619934",
"0.5618472",
"0.5616066",
"0.561499",
"0.5612812",
"0.5612313",
"0.5608906",
"0.5607671",
"0.5606838",
"0.5606838",
"0.5602809",
"0.5599591",
"0.55938065",
"0.5592308",
"0.5592305",
"0.55854696",
"0.55838704",
"0.5580318",
"0.5579926",
"0.5579112",
"0.5576702",
"0.5575235",
"0.55684465",
"0.5567393",
"0.5562777",
"0.556194",
"0.55608296",
"0.55603856"
] | 0.8719297 | 0 |
Setter for property profitLoss. | public void setProfitLoss(String profitLoss) {
this.profitLoss = profitLoss;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getProfitLoss() {\n\n return this.profitLoss;\n }",
"public void setProfitLossName(String profitLossName) {\n\n this.profitLossName = profitLossName;\n }",
"public String getProfitLossName() {\n\n return this.profitLossName;\n }",
"public void setProfit(double profit) {\n\t\tthis.profit = profit;\n\t}",
"public double getExpLoss()\r\n\t{\treturn this.expLoss;\t}",
"public void setPvpExpLoss(double pvpExpLoss) \r\n\t{\tthis.pvpExpLoss = pvpExpLoss;\t}",
"public double getProfit() {\n\t\treturn profit;\n\t}",
"public double getProfit() {\n\t\treturn profit;\n\t}",
"public LossModel getLoss() {\n return new LossModel(600, 30, 500);\n }",
"public double getProfit(){\n return getPrice() * PROFIT_IN_PERCENTS / 100;\n }",
"@Override\n\tpublic int getProfit() {\n\t\treturn 0;\n\t}",
"public void loseExp(double percent) {\n double amount = percent * getRequiredExp();\n\n // Launch the event\n PlayerExperienceLostEvent event = new PlayerExperienceLostEvent(this, amount);\n Bukkit.getPluginManager().callEvent(event);\n\n // Subtract the experience\n if (!event.isCancelled()) {\n amount = Math.min(event.getExp(), exp);\n exp = exp - amount;\n\n // Exp loss message\n if (SkillAPI.getSettings().isShowLossMessages() && (int) amount > 0) {\n TitleManager.show(\n player.getPlayer(),\n TitleType.EXP_LOST,\n NotificationNodes.LOSE,\n RPGFilter.EXP.setReplacement((int) amount + \"\"),\n RPGFilter.CLASS.setReplacement(classData.getName()),\n Filter.AMOUNT.setReplacement((int) amount + \"\")\n );\n }\n }\n }",
"public double getPvpExpLoss() \r\n\t{\treturn this.pvpExpLoss;\t}",
"private void setMaxLoss(float maxloss) \n\t{\n\t\tif (Math.abs(maxloss) < 1.0f)\n\t\t{\n\t\t\t_maxloss = Math.abs(maxloss);\t\n\t\t}\n\t}",
"public int losses(String team) {\n return loss[findTeamIndex(team)];\n }",
"public BigDecimal getLossDs() {\r\n return lossDs;\r\n }",
"public BigDecimal getRealProfit() {\r\n return realProfit;\r\n }",
"public void setLossReproductionEnergy(int lossReproductionEnergy) {\n\t\tif (lossReproductionEnergy < 0) {\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"lossReproductionEnergy should be positive! It is set to \" + LOSS_REPRODUCTION_ENERGY + \".\");\n\t\t\tlossReproductionEnergy = LOSS_REPRODUCTION_ENERGY;\n\t\t} else if (lossReproductionEnergy > this.getBirthThreshold()) {\n\t\t\tSystem.out.println(\"lossReproductionEnergy should be smaller or equal to the birth threshold (\"\n\t\t\t\t\t+ this.getBirthThreshold() + \"). It is set to \" + this.getBirthThreshold() + \".\");\n\t\t\tlossReproductionEnergy = this.getBirthThreshold();\n\t\t}\n\t\tthis.lossReproductionEnergy = lossReproductionEnergy;\n\t\tupdatePanel();\n\t}",
"public void setLossDs(BigDecimal lossDs) {\r\n this.lossDs = lossDs;\r\n }",
"public BigDecimal getRecommendStopLoss() {\n return recommendStopLoss;\n }",
"public int losses(String team) {\n if (team == null || !st.contains(team))\n throw new IllegalArgumentException(\"Invalid Arguments!\");\n return loss[st.get(team)];\n }",
"public double getRealizedProfit() {\n return this.realizedProfit ;\n }",
"public void setLossSd(BigDecimal lossSd) {\r\n this.lossSd = lossSd;\r\n }",
"public BigDecimal getLossSd() {\r\n return lossSd;\r\n }",
"@Override\n public void endGameAsLoss()\n {\n // UPDATE THE GAME STATE USING THE INHERITED FUNCTIONALITY\n super.endGameAsLoss();\n \n // RECORD IT AS A loss\n ((MahjongSolitaireMiniGame)miniGame).getPlayerRecord().addLoss(currentLevel);\n ((MahjongSolitaireMiniGame)miniGame).savePlayerRecord();\n \n // DISPLAY THE loss DIALOG\n miniGame.getGUIDialogs().get(LOSS_DIALOG_TYPE).setState(VISIBLE_STATE); \n\n // AND PLAY THE LOSS AUDIO\n miniGame.getAudio().stop(MahjongSolitairePropertyType.SPLASH_SCREEN_SONG_CUE.toString()); \n miniGame.getAudio().stop(MahjongSolitairePropertyType.GAMEPLAY_SONG_CUE.toString());\n miniGame.getAudio().play(MahjongSolitairePropertyType.LOSS_AUDIO_CUE.toString(), false);\n }",
"public void setAgencyProfit(BigDecimal agencyProfit) {\r\n this.agencyProfit = agencyProfit;\r\n }",
"public double getProfit() {\n\n\n double difference = maxRange * GAS_RATE;\n double sum = super.getProfit();\n\n return sum - difference;\n\n }",
"public void setProbOfFailure(int prob) {\n \tif( prob <= 100 || prob >= 0){\n \t\tthis.probOfFailure = prob;\n \t}\n }",
"public double getTotalSalesProfit(){\n return totalSaleProfit;\n }",
"public void setPercentageProfitPStd (BigDecimal PercentageProfitPStd);",
"public int losses(String team) {\n\n return 0;\n }",
"public BigDecimal getMarkProfit() {\r\n return markProfit;\r\n }",
"public void setRealProfit(BigDecimal realProfit) {\r\n this.realProfit = realProfit;\r\n }",
"public BigDecimal getAgencyProfit() {\r\n return agencyProfit;\r\n }",
"public Integer getLoanProfitandlossId() {\n return loanProfitandlossId;\n }",
"public static void lose()\n\t{\n\t\tGame.setMoney(Game.getMoney()-bet);\n\t\tremainingMoneyN.setText(String.valueOf(Game.getMoney()));\n\t\tbet=0;\n\t\ttfBet.setText(\"0\");\n\t\tlblUpdate.setText(\"The dealer wins\");\n\t\tif(Game.getMoney()<=0)\n\t\t{\n\t\t\tGame.setComplete(true);\n\t\t\tendGameSequence();\n\n\t\t}\n\t}",
"@Override\n\tpublic void setDefense(double defense) {\n\n\t}",
"public void setLosses(int value) {\n this.losses = value;\n }",
"public void sellProperty(){\n owner.addMoney(costs[0]/2);\n owner.removeProperty(this);\n owner = null;\n }",
"public float getExpense() throws IllegalArgumentException {\n\t\treturn expense;\n\t}",
"public void setDefense(float defense)\n {\n this.defense = defense;\n }",
"public void setRecommendStopLoss(BigDecimal recommendStopLoss) {\n this.recommendStopLoss = recommendStopLoss;\n }",
"public String getSalePercent() {\n\t\treturn salePercent;\n\t}",
"public void setProportionHigh(BigDecimal proportionHigh) {\n\t\tthis.proportionHigh = proportionHigh;\n\t}",
"public void setGrossSales(double grossSales) {\n if (grossSales < 0.0) { // validate\n throw new IllegalArgumentException(\"Gross sales must be >= 0.0\");\n }\n\n this.grossSales = grossSales;\n}",
"public BigDecimal getRecommendStopProfit() {\n return recommendStopProfit;\n }",
"public Integer getExpense() {\n return expense;\n }",
"public void setExpense(float expense) throws IllegalArgumentException {\n\t\tif(expense <= 0 || expense > 1)\n\t\t\tthrow new IllegalArgumentException(\"The weight should be in (0,1] only\");\n\t\tthis.expense = expense;\n\t}",
"public void setPercentageProfitPLimit (BigDecimal PercentageProfitPLimit);",
"@Override\n\tpublic double getDefense() {\n\t\treturn 0;\n\t}",
"public BigDecimal getPercentageProfitPStd();",
"float getWinLossRatio();",
"public double loss() {\n double L,l;\n if (weightStrategy != 2) {\n\n L = reg * (U.squaredSum() + V.squaredSum());\n for (int u = 0; u < userCount; u++) {\n l = 0;\n for (int i : trainMatrix.getRowRef(u).indexList()) {\n double pred = predict(u, i);\n l += W.getValue(u, i) * Math.pow(trainMatrix.getValue(u, i) - pred, 2);\n l -= getNegWeight(i) * Math.pow(pred, 2);\n }\n l += SV.mult(U.row(u, false)).inner(U.row(u, false));\n L += l;\n }\n\n return L;\n }\n else {\n L = reg * (U.squaredSum() + V.squaredSum());\n for (int i = 0; i < itemCount; i++) {\n l = 0;\n for (int u : trainMatrix.getColRef(i).indexList()) {\n double pred = predict(u, i);\n l += W.getValue(u, i) * Math.pow(trainMatrix.getValue(u, i) - pred, 2);\n l -= getNegWeight(u) * Math.pow(pred, 2);\n }\n l += SU.mult(V.row(i, false)).inner(V.row(i, false));\n L += l;\n }\n\n return L;\n }\n }",
"public void setProfit(Item item, int value) {\n\t\tprofit.put(item, value);\n\t}",
"public CVParam getNeutralLoss() {\n return neutralLoss;\n }",
"@Override\n\tpublic LossType getLossType() {\n\t\treturn LossType.square_loss;\n\t}",
"@Override\n public int damage() {\n int newDamage=criticalStrike();\n return newDamage;\n }",
"public void addMoney(double profit){\n money+=profit;\n }",
"public void setHightPrice(final float newHightPrice)\r\n{\r\n\tthis.hightPrice = newHightPrice;\r\n}",
"@Override\r\n\tpublic Double getModel_stockf_prop_score() {\n\t\treturn super.getModel_stockf_prop_score();\r\n\t}",
"void setExpenses(double amount);",
"public int getDefensePower() {\n return defensePower;\n }",
"public void setBuyPrice(double buyPrice) {\n double oldPrice = this.buyPrice;\n this.buyPrice = buyPrice;\n if(oldPrice == -1) {\n originalPrice = buyPrice;\n } else {\n fluctuation += (buyPrice - oldPrice);\n }\n }",
"public void setActualHP(int hp) { this.actualHP = Math.max(0, hp); }",
"public float getDefense()\n {\n return defense;\n }",
"public void setFailureProb(float failprob)\n {\n this.failprob = failprob;\n }",
"public String getHomeLoss(String team) {\n\n return getGameInfo(team, \"home_loss\");\n }",
"boolean addHardLoss();",
"public BigDecimal getPercentageProfitPLimit();",
"public String getAwayLoss(String team) {\n\n return getGameInfo(team, \"away_loss\");\n }",
"public void setExpense(Integer expense) {\n this.expense = expense;\n }",
"public void setPropertyPenalty(float value) {\n this.propertyPenalty = value;\n }",
"@Override\n public int computeProfit() {\n return getVehiclePerformance() / getVehiclePrice();\n }",
"@Override\n public final float getSpecialDefenseValue() {\n return _defenseValue;\n }",
"public void setLoses() {\r\n this.losses++;\r\n }",
"public BigDecimal getCarProfitMoney() {\n return carProfitMoney;\n }",
"public int losses(String team) {\n return getTeamByName(team).losses;\r\n }",
"public void setLossRateEnergy(int lossRateEnergy) {\n\t\tif (lossRateEnergy < 0) {\n\t\t\tSystem.out.println(\"lossRateEnergy should be positive! It is set to \" + LOSS_RATE_ENERGY + \".\");\n\t\t\tlossRateEnergy = LOSS_RATE_ENERGY;\n\t\t}\n\t\tthis.lossRateEnergy = lossRateEnergy;\n\t\tupdatePanel();\n\t}",
"public int getLosses() {\n return losses;\n }",
"public double calculateLoss(int dataIndex){\r\n double ans = 0;\r\n for (int i = 0; i < outputLayer.length; i++) {\r\n ans += Math.pow((attribute[dataIndex] == i ? 1 : 0) - sigmoid(outputLayer[i].z), 2);\r\n }\r\n return ans / outputLayer.length;\r\n }",
"public int getTotalProfit() {\n\t\tif (game.countProfit() >= 0) {\n\t\t\treturn 0;\n\t\t}\n\t\telse {\n\t\t\treturn game.countProfit();\n\t\t}\n\t}",
"@Test\n public void setProductPrice() throws NegativeValueException {\n cartItem.setProductPrice(536);\n double expected = 536;\n double actual = cartItem.getProductPrice();\n assertEquals(expected, actual, 0.0);\n }",
"public double getIncome() {\n\n return gross;\n }",
"public void setReliability(double reliability) {\r\n this.reliability = reliability;\r\n }",
"public BigDecimal getProportionHigh() {\n\t\treturn proportionHigh;\n\t}",
"double getTotalProfit();",
"public void setHungerDamage(float hunger);",
"public void setSaleNetWorth(Double saleNetWorth) {\r\n this.saleNetWorth = saleNetWorth;\r\n }",
"@Override\r\n\tpublic int getPayCheque() {\n\t\treturn profit+annuelSalary;\r\n\t\t\r\n\t}",
"public static void setGsSearchLosDiscard(double val) {\n gsSearchLosDiscard = val;\n }",
"public void setPercentage() {\n\t\tif (this.winnumber == 0) {\n\t\t\tthis.percentage = 0;\n\t\t} else {\n\t\t\tthis.percentage = (double) this.winnumber * 100 / (double) this.gamenumber;\n\t\t}\n\t}",
"protected void do_disabilityFTF_propertyChange(PropertyChangeEvent arg0) {\n\t\tsetIncomeTotal();\n\t}",
"private void calculateRealizedProfit() {\n\n // Calculate the realized profit for this stock. Realized profit is\n // the sum of money already gained or lost for all the shares sold for\n // this stock.\n this.realizedProfit = 0 ;\n for( final Trade buyTrade : this.allCashBuyTrades ) {\n final List<Trade> sellTrades = buyTrade.getSellTrades() ;\n if( sellTrades != null ) {\n for( final Trade sellTrade : sellTrades ) {\n this.realizedProfit += sellTrade.getMatchedUnits() *\n ( sellTrade.getAvgPrice() - buyTrade.getAvgPrice() ) ;\n }\n }\n }\n }",
"public final void setSalary(float salary){\n if(salary>=0){\n this.salary=salary;\n }\n else{\n JOptionPane.showMessageDialog(null,\"Incorrect amount of salary \");\n }\n }",
"public int getLosses() {\n return losses;\n }",
"public void setLoanProfitandlossId(Integer loanProfitandlossId) {\n this.loanProfitandlossId = loanProfitandlossId;\n }",
"public void setGrossSales(double grossSales) {\n if (grossSales < 0.0) {// validate\n throw new IllegalArgumentException(\"Gross sales must be >= 0.0\");\n }\n this.grossSales = grossSales;\n }",
"public void setOldLoyaltyScale(int value) {\n this.oldLoyaltyScale = value;\n }",
"public void setDamageTaken(double damage){\n\t\tlifeForce -= damage;\n\t\tif (! (lifeForce > 0) ) {\n\t\t\tJOptionPane.showMessageDialog(null, \"You Died - GAME OVER\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t}",
"public void setProbability(double pProbability) throws Exception{\r\n\t\tif (pProbability >= 0) probability = pProbability;\r\n\t\telse throw new Exception(\"02; sPro,ProEle\");\r\n\t}"
] | [
"0.7915954",
"0.7300634",
"0.723113",
"0.67540234",
"0.62589467",
"0.6131156",
"0.6110258",
"0.6110258",
"0.60515606",
"0.59939057",
"0.58778965",
"0.5813196",
"0.5786812",
"0.57019764",
"0.56929845",
"0.5661327",
"0.56601274",
"0.5647341",
"0.56001234",
"0.5546145",
"0.5504519",
"0.5483811",
"0.5474836",
"0.5468761",
"0.54612947",
"0.54327345",
"0.54149926",
"0.54117113",
"0.53942025",
"0.53600734",
"0.5359833",
"0.53522354",
"0.5328856",
"0.5320504",
"0.53043324",
"0.52834964",
"0.528118",
"0.5272678",
"0.5262522",
"0.5256531",
"0.52511233",
"0.5220937",
"0.51903087",
"0.5138422",
"0.5134995",
"0.51308787",
"0.5130382",
"0.51264703",
"0.5125239",
"0.5098044",
"0.5087757",
"0.5076838",
"0.5071106",
"0.5051921",
"0.50328934",
"0.50304306",
"0.5029359",
"0.5020261",
"0.50182605",
"0.5015136",
"0.50069714",
"0.500448",
"0.50020134",
"0.49941826",
"0.4990855",
"0.49907795",
"0.49810317",
"0.49806806",
"0.498063",
"0.49800363",
"0.4979846",
"0.49644113",
"0.49567413",
"0.49545988",
"0.49319562",
"0.4925808",
"0.49230206",
"0.49097797",
"0.49032563",
"0.490112",
"0.49003062",
"0.48976147",
"0.48955527",
"0.48915192",
"0.48893625",
"0.48818684",
"0.4867672",
"0.4863439",
"0.48607093",
"0.4854374",
"0.48531586",
"0.4836317",
"0.48360083",
"0.48290116",
"0.48244157",
"0.4820287",
"0.48130944",
"0.48123875",
"0.48070613",
"0.47999054"
] | 0.8382297 | 0 |
Getter for property profitLossName. | public String getProfitLossName() {
return this.profitLossName;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getProfitLoss() {\n\n return this.profitLoss;\n }",
"public void setProfitLossName(String profitLossName) {\n\n this.profitLossName = profitLossName;\n }",
"public void setProfitLoss(String profitLoss) {\n\n this.profitLoss = profitLoss;\n }",
"public String getProName() {\n return proName;\n }",
"public String getNamePro() {\n return namePro;\n }",
"public String getPriceName() {\n return this.PriceName;\n }",
"public String getGoodsName() {\n return goodsName;\n }",
"public String getGoodsName() {\n return goodsName;\n }",
"public String getGoodsName() {\n return goodsName;\n }",
"public String getPropName() {\n return m_propName;\n }",
"String getPropertyName();",
"public String getExpenseName() {\n if (categoryIdentifier == AppController.periodicCategoryIdentifier)\n expenseName = pExpenseNameEt.getText().toString();\n else expenseName = fExpenseNameEt.getText().toString();\n return expenseName;\n }",
"public String getGradeName() {\n return gradeName;\n }",
"String getStockName();",
"java.lang.String getCouponName();",
"java.lang.String getCouponName();",
"java.lang.String getCouponName();",
"String getPresetName();",
"public double getExpLoss()\r\n\t{\treturn this.expLoss;\t}",
"public LossModel getLoss() {\n return new LossModel(600, 30, 500);\n }",
"public double getProfit() {\n\t\treturn profit;\n\t}",
"public double getProfit() {\n\t\treturn profit;\n\t}",
"public String getProdName() {\n\t\treturn prodName;\n\t}",
"public String getGoodname() {\r\n return goodname;\r\n }",
"String getName() {\n return getStringStat(playerName);\n }",
"String getDamage() {\n return damage;\n }",
"@Override\r\n\t\t\tpublic String getPrice() {\n\t\t\t\treturn this.getName();\r\n\t\t\t}",
"public String getGoodname() {\n return goodname;\n }",
"java.lang.String getEmployeeName();",
"public String getPlayerName() {\n/* 100 */ return this.scorePlayerName;\n/* */ }",
"public String getPricePro() {\n return pricePro;\n }",
"PropertyName getName();",
"public String getDealName() {\n\t\treturn this.name;\n\t}",
"public String getProdDetailsName(){\n String prodName = productDetailsName.toString();\n return prodName;\n }",
"public String getPropertyName();",
"public double getProfit(){\n return getPrice() * PROFIT_IN_PERCENTS / 100;\n }",
"public String getNameProd() {\n\t\treturn nameProd;\n\t}",
"public String getNomeProduto() {\r\n\t\treturn nomeProduto;\r\n\t}",
"@Override\n public String getName()\n {\n if (amount > 1)\n {\n return amount + \" Nickles\";\n }\n else\n {\n return amount + \" Nickle\";\n }\n }",
"public String getName() { return name.get(); }",
"public String getter() {\n\t\treturn name;\n\t}",
"public String getUnSold() {\n\t\treturn unSold;\n\t}",
"public String getProductName(){\n return productRelation.getProductName();\n }",
"public String getName(){\n\t\treturn Name; // Return the product's name\n\t}",
"public String getStockName() {\r\n return stockName;\r\n }",
"public String getName() { return (String)get(\"Name\"); }",
"public String getPropertyName()\n {\n return Integer.toString(getLowNbrParticipants());\n }",
"public String getGoodsTypeName() {\n return goodsTypeName;\n }",
"java.lang.String getGameName();",
"java.lang.String getGameName();",
"public String getName(){\n\n //returns the value of the name field\n return this.name;\n }",
"public double getPvpExpLoss() \r\n\t{\treturn this.pvpExpLoss;\t}",
"public String getSalesProp() {\n return salesProp;\n }",
"public String getStockName() {\n return stockName;\n }",
"public String getSupName() {\n return supName;\n }",
"public String getMealName() {\n return name.getText().toString();\n }",
"@Override\n\tpublic java.lang.String getTitle() {\n\t\treturn _buySellProducts.getTitle();\n\t}",
"public String getProductName() {\r\n return productName;\r\n }",
"public String getSupEntDeal() {\n return supEntDeal;\n }",
"public String getPotionName()\r\n/* 119: */ {\r\n/* 120:121 */ return Potion.potionList[this.id].getName();\r\n/* 121: */ }",
"java.lang.String getSchoolName();",
"public String getDPReiheHgName(){\n\t\treturn this.m_sDPReiheHgName;\n\t}",
"public java.lang.String getSupregName() {\n\treturn supregName;\n}",
"public String getInvestorName() {\r\n return investorName;\r\n }",
"public String getStrName() {\n return strName;\n }",
"public String getName() {\n return (this.name);\n }",
"public java.lang.String getSuperCUGNameProp()\n\t{\n\t\treturn superCUGNameProp;\n\t}",
"public String getPropertyName()\n {\n return propertyName;\n }",
"public double getRealizedProfit() {\n return this.realizedProfit ;\n }",
"public String getAgcProName() {\n\t\treturn agcProName;\n\t}",
"public String getNomeProfessor()\n\t{\n\t\treturn nomeProfessor;\n\t}",
"@Override\n\tpublic int getProfit() {\n\t\treturn 0;\n\t}",
"public String getsName() {\n return sName;\n }",
"public String getPropertyName(){\n return SimpleTableField.mapPropName(this.columnName);\n }",
"public String getWeaponName()\r\n\t{\r\n\t\treturn this.weaponName;\r\n\t}",
"@Override\n\tpublic String getName() {\n\t\treturn product.getName();\n\t}",
"public String getDegrade() {\n return degrade;\n }",
"public String getProductName() {\n return productName;\n }",
"public String getProductName() {\n return productName;\n }",
"public String getProductName() {\n return productName;\n }",
"String getSupName();",
"public StringKey getName() {\n return ModelBundle.SHIP_NAME.get(name);\n }",
"public String getName() { //declare public type, return type: String\r\n\t\treturn mName; //return mName value\r\n\t}",
"public String getName() \n {\n return m_sName;\n }",
"public String getGameName () {\n\t\treturn (String) game.getProperty(GAME_NAME).getValue();\n\t}",
"public String getName()\r\n {\r\n return (m_name);\r\n }",
"protected String getPropertyName(){\n return propertyName;\n }",
"public void setProName(String proName) {\n this.proName = proName == null ? null : proName.trim();\n }",
"public String getPriceTitle() {\n return this.PriceTitle;\n }",
"public String getGameName() {\n return gameName;\n }",
"public String getPetName();",
"String getName() {\n return this.name;\n }",
"private String getString() {\n TableRow<Story> row = getTableRow();\n Story story = null;\n Integer priority;\n String priorityString = null;\n if (row != null) {\n story = row.getItem();\n }\n if (story != null) {\n priority = getModel().getStoryPriority(story);\n if (priority != -1) {\n priorityString = priority.toString();\n }\n else {\n priorityString = \"-\";\n }\n }\n\n return priorityString;\n }",
"String getName(){return this.name;}",
"public Name getShopperName() {\n return shopperName;\n }",
"public String getProductName() {\r\n\t\treturn productName;\r\n\t}",
"public String getName()\n {\n return (this.name);\n }",
"java.lang.String getHotelName();",
"String getName() {\n return this.name;\n }",
"public String getPropertyName() {\n return this.propertyName;\n }"
] | [
"0.8075139",
"0.7694716",
"0.69967943",
"0.6473561",
"0.6353485",
"0.61401886",
"0.61063045",
"0.61063045",
"0.61063045",
"0.59654576",
"0.5924676",
"0.59175223",
"0.5909089",
"0.5890534",
"0.5867315",
"0.5867315",
"0.5867315",
"0.5867217",
"0.5863925",
"0.58585304",
"0.5841343",
"0.5841343",
"0.5833087",
"0.58099943",
"0.5793463",
"0.57834923",
"0.5781896",
"0.57520944",
"0.57409495",
"0.5708229",
"0.57048684",
"0.5691416",
"0.569027",
"0.5688736",
"0.56778526",
"0.5662449",
"0.56504244",
"0.56401336",
"0.56365657",
"0.5636212",
"0.56352043",
"0.56231624",
"0.558942",
"0.55869526",
"0.5579772",
"0.5554693",
"0.5549646",
"0.55415756",
"0.5537598",
"0.5537598",
"0.55371124",
"0.552515",
"0.5524164",
"0.5514174",
"0.5510045",
"0.5509846",
"0.55097574",
"0.55062425",
"0.54991466",
"0.54969656",
"0.5496507",
"0.54913384",
"0.548926",
"0.54884017",
"0.54870856",
"0.54830605",
"0.5481713",
"0.54799235",
"0.54754466",
"0.54731745",
"0.5471022",
"0.5469612",
"0.5469032",
"0.5468192",
"0.54663867",
"0.5466227",
"0.5460745",
"0.54493",
"0.54493",
"0.54493",
"0.5448824",
"0.5445632",
"0.5440709",
"0.54368263",
"0.54310083",
"0.5430038",
"0.5429153",
"0.54117393",
"0.5408959",
"0.5406713",
"0.5403689",
"0.5397217",
"0.5393931",
"0.53938365",
"0.5382662",
"0.5376359",
"0.5375909",
"0.5373896",
"0.53676075",
"0.53672534"
] | 0.8820586 | 0 |
Setter for property profitLossName. | public void setProfitLossName(String profitLossName) {
this.profitLossName = profitLossName;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getProfitLossName() {\n\n return this.profitLossName;\n }",
"public void setProfitLoss(String profitLoss) {\n\n this.profitLoss = profitLoss;\n }",
"public String getProfitLoss() {\n\n return this.profitLoss;\n }",
"public void setProName(String proName) {\n this.proName = proName == null ? null : proName.trim();\n }",
"public void setNamePro(String namePro) {\n this.namePro = namePro;\n }",
"public void setDPReiheHgName(String value){\n\t\tthis.m_bIsDirty = (this.m_bIsDirty || (!value.equals(this.m_sDPReiheHgName)));\n\t\tthis.m_sDPReiheHgName=value;\n\t}",
"public String getProName() {\n return proName;\n }",
"void setHighscoreName(String _playerName) {\n String name = _playerName;\n\n System.out.println(name + \"Game\");\n if (name == null) {\n //create Scanner\n Scanner input = new Scanner(System.in);\n //prompt the user to enter the name their highscore\n System.out.println(\"\");\n System.out.println(\"Please enter your highscore name:\");\n name = input.next();\n }\n// String name = playerName;\n if (!(name.length() <= 16)) {\n String substringOfName = name.substring(0, 15);\n score.setName(substringOfName);\n } else {\n score.setName(name);\n }\n }",
"public String getNamePro() {\n return namePro;\n }",
"public void setPropName(String name) {\n m_propName = name;\n }",
"public void setPlayerName(String newName) {\n if(newName == null) {\n return;\n }\n props.setProperty(\"name\", newName);\n saveProps();\n }",
"public void setSupregName(java.lang.String newSupregName) {\n\tsupregName = newSupregName;\n}",
"public void setDPReiheHgVorname(String value){\n\t\tthis.m_bIsDirty = (this.m_bIsDirty || (!value.equals(this.m_sDPReiheHgVorname)));\n\t\tthis.m_sDPReiheHgVorname=value;\n\t}",
"public void setProfit(double profit) {\n\t\tthis.profit = profit;\n\t}",
"public void setSupregname( java.lang.String newValue ) {\n __setCache(\"supregname\", newValue);\n }",
"public void setName(String grade) {\r\n\t\tname = grade;\r\n\t\t\r\n\t}",
"@Override\n public String getName()\n {\n if (amount > 1)\n {\n return amount + \" Nickles\";\n }\n else\n {\n return amount + \" Nickle\";\n }\n }",
"void setName(String name) {\n setStringStat(name, playerName);\n }",
"public void setName( String pName )\n {\n name = pName;\n }",
"public void setName (String n) {\n name = n;\n }",
"public void setName(String newname)\n {\n name = newname;\n \n }",
"@VTID(18)\n void setName(\n java.lang.String rhs);",
"public final void setName(final String nameNew) {\n this.name = nameNew;\n }",
"public void setName(String n) {\r\n name = n;\r\n }",
"private void setNewName(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n newName_ = value;\n }",
"public void setName (String n){\n\t\tname = n;\n\t}",
"@IcalProperty(pindex = PropertyInfoIndex.NAME,\n required = true,\n eventProperty = true,\n todoProperty = true,\n journalProperty = true)\n public void setName(final String val) {\n name = val;\n }",
"void setGameName(String gameName);",
"public void setName(String n) {\r\n\t\tthis.name = n;\r\n\t}",
"public void setName(String name) {\n//\t\tif((name==null) || (name.length()<2)){\n//\t\t\tthrow new RuntimeException(\"Name muss mindestens 2 Zeichen enthalten!\");\n//\t\t}\n\t\tthis.name = name;\n\t}",
"public void setProductName(final String productName);",
"public void setPvpExpLoss(double pvpExpLoss) \r\n\t{\tthis.pvpExpLoss = pvpExpLoss;\t}",
"public void setProdName(String prodName) {\n\t\tthis.prodName = prodName;\n\t}",
"public String getProdName() {\n\t\treturn prodName;\n\t}",
"public static void set_GetName(String v) throws RuntimeException\n {\n UmlCom.send_cmd(CmdFamily.javaSettingsCmd, JavaSettingsCmd._setJavaGetNameCmd, v);\n UmlCom.check();\n \n _get_name = v;\n \n }",
"public void setName(String newname) {\n\t\tname = newname == null? \"\" : newname;\n\t\tfireNameChanged();\n\t}",
"public void setName(String new_name) {\n\t\t_name = new_name;\n\t}",
"public void setName(String n) {\n this.name = n;\n }",
"public String getGradeName() {\n return gradeName;\n }",
"@DISPID(-2147417111)\n @PropPut\n void className(\n java.lang.String rhs);",
"public void setLossReproductionEnergy(int lossReproductionEnergy) {\n\t\tif (lossReproductionEnergy < 0) {\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"lossReproductionEnergy should be positive! It is set to \" + LOSS_REPRODUCTION_ENERGY + \".\");\n\t\t\tlossReproductionEnergy = LOSS_REPRODUCTION_ENERGY;\n\t\t} else if (lossReproductionEnergy > this.getBirthThreshold()) {\n\t\t\tSystem.out.println(\"lossReproductionEnergy should be smaller or equal to the birth threshold (\"\n\t\t\t\t\t+ this.getBirthThreshold() + \"). It is set to \" + this.getBirthThreshold() + \".\");\n\t\t\tlossReproductionEnergy = this.getBirthThreshold();\n\t\t}\n\t\tthis.lossReproductionEnergy = lossReproductionEnergy;\n\t\tupdatePanel();\n\t}",
"public void setSupName(String supName) {\n this.supName = supName == null ? null : supName.trim();\n }",
"public String getPriceName() {\n return this.PriceName;\n }",
"public void setGradeName(String gradeName) {\n this.gradeName = gradeName;\n }",
"public void setPriceName(String PriceName) {\n this.PriceName = PriceName;\n }",
"@Override\r\n\tpublic void setName(String newName) \r\n\t{\r\n\t\tthis._name = newName;\r\n\t}",
"public String getNewName() {\n return newName;\n }",
"public String getNewName() {\n return newName;\n }",
"public void setPlayerName(String newName) {\n\t\tname = newName;\n\t}",
"private void setName(String nameIn){\r\n\t\tplayerName = nameIn;\r\n\t}",
"public void setGameName(String gameName) {\n this.gameName = gameName == null ? null : gameName.trim();\n }",
"public void setpName(String pName) {\n this.pName = pName;\n }",
"public void setName(String n)\n\t{\n\t\tfullName=n;\n\t}",
"public String getGoodname() {\r\n return goodname;\r\n }",
"public void setPricePro(String pricePro) {\n this.pricePro = pricePro;\n }",
"public String getExpenseName() {\n if (categoryIdentifier == AppController.periodicCategoryIdentifier)\n expenseName = pExpenseNameEt.getText().toString();\n else expenseName = fExpenseNameEt.getText().toString();\n return expenseName;\n }",
"public void setStrName(String strName) {\n this.strName = strName;\n }",
"public void setName(String theName)\n\t{\n\t\tthis.theName=theName;\n\t\tif(theName.length()==0)\n\t\t{\n\t\t\tthis.theName=\"**No Name**\";\n\t\t}\n\t}",
"public String getGoodsName() {\n return goodsName;\n }",
"public String getGoodsName() {\n return goodsName;\n }",
"public String getGoodsName() {\n return goodsName;\n }",
"public void setName(String newname){\n name = newname; \n }",
"public void setName(String name) {\n if (name != null && name.length() > 40) {\n this.name = name.substring(0, 40);\n } else {\n this.name = name;\n }\n }",
"public void setDPHgVorname(String value){\n\t\tthis.m_bIsDirty = (this.m_bIsDirty || (!value.equals(this.m_sDPHgVorname)));\n\t\tthis.m_sDPHgVorname=value;\n\t}",
"public void setName(String name)\n {\n playersName = name;\n }",
"String getPresetName();",
"public void setpName(String name) {\n this.pName = name;\n }",
"public void setName(String name) {\r\n this.name = name.trim();\r\n }",
"public String getGoodname() {\n return goodname;\n }",
"public void setName(String name) {\n monsterName = name;\n }",
"public void setName(String name) {\n monsterName = name;\n }",
"public void setName(String val) {\n this.name = val;\n }",
"public void setName(String newname) {\n name=newname;\n }",
"public void getNameCostProduct() {\n\t\t\t\tgetNameCostProduct(0);\n\t\t\t}",
"public String getDealName() {\n\t\treturn this.name;\n\t}",
"public void setName(String name)\r\n\t{\r\n\t\tthis.playerName = name;\r\n\t}",
"public String getNewName() {\n return newName_;\n }",
"public void setName(String val) {\n name = val;\n }",
"public void setName(String name)\n {\n this.name = name.trim();\n }",
"public String getSupName() {\n return supName;\n }",
"public void setName(String newValue);",
"public void setName(String newValue);",
"public void setName(String new_name){\n this.name=new_name;\n }",
"private void setNomeProfessor(String novoNome)\n\t{\n\t\tthis.nomeProfessor = novoNome;\n\t}",
"public double getExpLoss()\r\n\t{\treturn this.expLoss;\t}",
"public void setName(String newName){\n name = newName;\n }",
"public String getPropName() {\n return m_propName;\n }",
"public void setName(String newName) {\n this.name = newName;\n }",
"public void setName(String dishName) {\n this.dishName = dishName;\n }",
"public String setName(String name) {\r\n String oldName = myName;\r\n myName = (name == null ? \"\" : name);\r\n return oldName;\r\n }",
"public void setName(String name)\r\n\t{\r\n\t\tthis.nome = nome;\r\n\t}",
"public void setName(String newName){\n\n //assigns the value newName to the name field\n this.name = newName;\n }",
"public String getNameProd() {\n\t\treturn nameProd;\n\t}",
"public void setObjectiveName(String name) {\n this.objectiveName = name;\n if (created)\n getPlayer().sendPacket(createObjectivePacket(2, name));\n }",
"public static void setName(String n){\n\t\tname = n;\n\t}",
"public void setName(String name) {\n m_Name = name;\n }",
"public void setName(String newName){\n name=newName;\n }",
"public String getNewName()\n {\n return this.newName;\n }",
"public java.lang.String getSupregName() {\n\treturn supregName;\n}",
"public static void setLastName(String name){\n setUserProperty(Constants.ZeTarget_keyForUserPropertyLName,name);\n }"
] | [
"0.82023954",
"0.7859379",
"0.7207541",
"0.62127453",
"0.61562437",
"0.5772477",
"0.5621229",
"0.55888027",
"0.5501534",
"0.54628795",
"0.54447675",
"0.542982",
"0.5409803",
"0.5357671",
"0.5352545",
"0.5312824",
"0.52981126",
"0.526784",
"0.52581275",
"0.52385044",
"0.523016",
"0.5227007",
"0.52176195",
"0.52153444",
"0.5209099",
"0.5206399",
"0.5202321",
"0.5195136",
"0.51699287",
"0.51651937",
"0.5159917",
"0.5159823",
"0.51404786",
"0.51377255",
"0.5134405",
"0.51181793",
"0.51069665",
"0.509311",
"0.50899345",
"0.50855225",
"0.50854385",
"0.5084998",
"0.5084353",
"0.50788754",
"0.5068295",
"0.5067178",
"0.50638705",
"0.50638705",
"0.5063368",
"0.5061375",
"0.5055349",
"0.5041244",
"0.50404805",
"0.5040163",
"0.50233114",
"0.50213856",
"0.5021234",
"0.5016966",
"0.50117",
"0.50117",
"0.50117",
"0.50091535",
"0.5007561",
"0.50060594",
"0.5002159",
"0.49883863",
"0.49879783",
"0.49859706",
"0.4978845",
"0.49765515",
"0.49765515",
"0.49750382",
"0.49658287",
"0.49588707",
"0.49572918",
"0.49509335",
"0.4950054",
"0.4949882",
"0.49439332",
"0.4943677",
"0.49381813",
"0.49381813",
"0.49367434",
"0.49303308",
"0.49296862",
"0.4927564",
"0.4926976",
"0.4922086",
"0.49220702",
"0.49209023",
"0.49188286",
"0.49163538",
"0.49054816",
"0.49041957",
"0.49014336",
"0.490008",
"0.48985857",
"0.4896218",
"0.48885405",
"0.48885116"
] | 0.8556084 | 0 |
Getter for property us1120incomeStmt. | public String getUs1120incomeStmt() {
return this.us1120incomeStmt;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getUs1120incomeStmtName() {\n\n return this.us1120incomeStmtName;\n }",
"public void setUs1120incomeStmt(String us1120incomeStmt) {\n\n this.us1120incomeStmt = us1120incomeStmt;\n }",
"public void setUs1120incomeStmtName(String us1120incomeStmtName) {\n\n this.us1120incomeStmtName = us1120incomeStmtName;\n }",
"public Stmt getStmt() {\n return this.stmt;\n }",
"public String getStatement()\n {\n return _statement;\n }",
"public double getincome()\n\t{\n\t\treturn this.income;\n\t}",
"public String getStatement(){\n return this.statement;\n }",
"public int getAnnualIncome() {\n return annualIncome;\n }",
"public int getIncome() {\n\t\treturn income;\n\t}",
"public BigDecimal getStmtAmt();",
"Statement getStmt();",
"public String getStatement() {\r\n\t\treturn statement;\r\n\t}",
"public boolean getOwnStatement() {\n return ownStatement_;\n }",
"public double getIncome() {\n\n return gross;\n }",
"public String getStatement();",
"public boolean getOwnStatement() {\n return ownStatement_;\n }",
"public Table getStatementsTable(){\n\t\treturn m_statements;\n\t}",
"java.lang.String getInsight();",
"abstract public int getIncomeSegment( int hhIncomeInDollars );",
"boolean getOwnStatement();",
"public String getStatement() {\n\tStringBuilder statement = new StringBuilder(\"Statement for \" + name + \"\\n\"); \n double total = 0.0;\n for (Account account : accounts) {\n statement.append(\"\\n\" + statementForAccount(account) + \"\\n\");\n total += account.sumTransactions();\n }\n statement.append(\"\\nTotal In All Accounts \" + toDollars(total));\n return statement.toString();\n }",
"com.google.ads.googleads.v14.common.IncomeRangeInfo getIncomeRange();",
"public String getSupEntMoney() {\n return supEntMoney;\n }",
"@java.lang.Override\n public java.lang.String getInsight() {\n java.lang.Object ref = insight_;\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 insight_ = s;\n return s;\n }\n }",
"public double getIncome() throws BankException {\n throw new BankException(\"This account does not support this feature\");\n }",
"@Override\n\tpublic double getInsuranceAmount() {\n\t\treturn 200000;\n\t}",
"public String getCoverage() {\n/* 98 */ return getValue(\"coverage\");\n/* */ }",
"public EstimateIncome(){\n\t\tcalculateSlopesAndIntercepts();\n\t}",
"public java.lang.String getInsight() {\n java.lang.Object ref = insight_;\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 insight_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"@Nonnull\n @JsonProperty(PROP_STATEMENTS)\n public List<Statement> getStatements() {\n return _statements;\n }",
"@SuppressWarnings({\"unchecked\", \"cast\"}) public Stmt getStmt(int i) {\n return (Stmt)getStmtList().getChild(i);\n }",
"public void setStmtAmt (BigDecimal StmtAmt);",
"public int getStatementId() {\n return statementId_;\n }",
"public int getStatementId() {\n return statementId_;\n }",
"public int getStatementId() {\n return statementId_;\n }",
"@SuppressWarnings({\"unchecked\", \"cast\"}) public List<Stmt> getStmtList() {\n return (List<Stmt>)getChild(0);\n }",
"public int getStatementId() {\n return statementId_;\n }",
"public int getStatementId() {\n return statementId_;\n }",
"public int getStatementId() {\n return statementId_;\n }",
"public java.lang.Integer getVar115() {\n return var115;\n }",
"public int getYearlyBonus(){\n return this.yearlyBonus;\n }",
"@java.lang.Override\n public int getIndividualStamina() {\n return individualStamina_;\n }",
"public int getNumStmt() {\n return getStmtList().getNumChild();\n }",
"public java.lang.String getStatementname() {\n return statementname;\n }",
"public String getSQLString () {\n \treturn statementString;\n }",
"private Stmt stmt(){\n \n switch(lexer.token){\n case IDENT:\n \n if (symbolTable.get(lexer.getStringValue()) instanceof Procedure) \n return procedureCall();\n \n //can´t be a function\n else if (symbolTable.get(lexer.getStringValue()) instanceof Function)\n lexer.error(\"Function was expected \\n\");\n \n //assignstmt\n else \n return assignstmt();\n \n case BEGIN:\n return cmpstmt();\n case IF:\n return ifstmt();\n case WHILE:\n return whilestmt();\n case WRITE:\n return writestmt();\n case WRITELN:\n return writelnstmt();\n case READ:\n return readstmt();\n case RETURN:\n return returnStmt();\n default:\n lexer.error(\"missing statment\\n\");\n }\n \n return null;\n }",
"public String getProfitLoss() {\n\n return this.profitLoss;\n }",
"public int getStatementCount() {\n return this.statementCount;\n }",
"@java.lang.Override\n public int getIndividualStamina() {\n return individualStamina_;\n }",
"public java.lang.Integer getVar115() {\n return var115;\n }",
"public BigDecimal getStatementId() {\n return getStatementIdProperty().getValue();\n }",
"public int getCoverage (){\r\n return coverage;\r\n }",
"public String toStringIdIncome() {\n\t\tNumberFormat currency = NumberFormat.getCurrencyInstance();\n return \"\" + id + \"\\t\\t\" + currency.format(income);\n }",
"public void setAnnualIncome(int value) {\n this.annualIncome = value;\n }",
"public String getStsCode() {\n return stsCode;\n }",
"public BigDecimal getINSURANCE_AMOUNT() {\r\n return INSURANCE_AMOUNT;\r\n }",
"public String getIncomeStreamAccountNumber() {\n return incomeStreamAccountNumber;\n }",
"public java.lang.String getCoverage()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(COVERAGE$4);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }",
"public String getStCodeStS() {\n return stCodeStS;\n }",
"final public SqlStatement Statement() throws ParseException {SqlStatement st = null;\n switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {\n case USE:{\n st = UseStatement();\n break;\n }\n case SET:{\n st = SetVariableStatement();\n break;\n }\n case CREATE:{\n st = CreateStatement();\n break;\n }\n case ALTER:{\n st = AlterStatement();\n break;\n }\n case DROP:{\n st = DropStatement();\n break;\n }\n case INSERT:{\n st = InsertStatement();\n break;\n }\n case LOCK:{\n st = LockTablesStatement();\n break;\n }\n case UNLOCK:{\n st = UnlockTablesStatement();\n break;\n }\n case START:{\n st = StartTransactionStatement();\n break;\n }\n case COMMIT:{\n st = CommitTransactionStatement();\n break;\n }\n default:\n jj_la1[2] = jj_gen;\nst = new EmptyStatement();\n }\nreturn st;\n}",
"public int getSalary () {\n return salary;\n }",
"com.google.ads.googleads.v14.common.IncomeRangeInfoOrBuilder getIncomeRangeOrBuilder();",
"public String getStCodeStC() {\n return stCodeStC;\n }",
"public double getNetIncome(){\n\t\tdouble netIncome = getIncomeTotal() - getExpensesTotal();\n\t\tif(netIncome < 0){\n\t\t\tnetIncomeOutput.setForeground(Color.RED);\n\t\t}\n\t\treturn netIncome;\n\t}",
"@gw.internal.gosu.parser.ExtendedProperty\n public gw.api.financials.CurrencyAmount getNetTotalIncurred();",
"final public SqlStatement ScriptStatement() throws ParseException {SqlStatement st = null;\n switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {\n case USE:\n case CREATE:\n case DROP:\n case SET:\n case INSERT:\n case ALTER:\n case LOCK:\n case UNLOCK:\n case START:\n case COMMIT:\n case 117:{\n st = Statement();\n jj_consume_token(117);\n break;\n }\n case 0:{\n jj_consume_token(0);\n break;\n }\n default:\n jj_la1[1] = jj_gen;\n jj_consume_token(-1);\n throw new ParseException();\n }\nreturn st;\n}",
"private Stmt simpleStmt() {\n if (null != lexer.token) {\n switch (lexer.token) {\n case PRINT:\n return printStmt();\n case BREAK:\n return breakStmt();\n case IDENT:\n lexer.nextToken();\n if (lexer.token == Symbol.LEFTPAR) {\n lexer.backToken();\n return funcStmt();\n } else {\n lexer.backToken();\n return exprStmt();\n }\n case RETURN:\n return returnStmt();\n default:\n break;\n }\n }\n return null;\n }",
"public String countIncomes() throws IOException{ \r\n return \"Incomes: \" + getActualSheet().getCellAt(\"B1\").getTextValue() + \"\\n\";\r\n }",
"public R visit(StmtExp n) {\n R _ret=null;\n n.f0.accept(this);\n // System.out.println(\"BEGIN\");\n n.f1.accept(this);\n n.f2.accept(this);\n \t\n String s = (String) n.f3.accept(this);\n current_temp =s;\n n.f4.accept(this);\n //System.out.println(\"END\");\n return (R)s;\n }",
"public Integer getProductionstatementid() {\n return productionstatementid;\n }",
"public String getInterestAmount() {\r\n return interestAmount;\r\n }",
"public ContextNodeStatement getStatement();",
"StatementsPackage getStatementsPackage();",
"public Integer getInsid() {\n return insid;\n }",
"public edu.umich.icpsr.ddi.VerStmtType getVerStmt()\n {\n synchronized (monitor())\n {\n check_orphaned();\n edu.umich.icpsr.ddi.VerStmtType target = null;\n target = (edu.umich.icpsr.ddi.VerStmtType)get_store().find_element_user(VERSTMT$22, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }",
"public String getSalaryRange() {\r\n return salaryRange;\r\n }",
"public int getSalary() {\n return salary;\n }",
"public String getInspection() {\n return (String)getAttributeInternal(INSPECTION);\n }",
"public Stmt\ngetHirBody();",
"public int getSt1() {\r\n\t\treturn this.st1;\r\n\t}",
"private ParseTree parseStatement() {\n return parseSourceElement();\n }",
"@Override\n\tpublic double getInsuranceAmount() {\n\t\treturn 13_00_000;\n\t}",
"public List<Statement> getStatements() {\n\t\treturn new ArrayList<Statement>(statements);\n\t}",
"public Statement getElseStm();",
"@java.lang.Override\n public com.google.protobuf.ByteString getInsightBytes() {\n java.lang.Object ref = insight_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);\n insight_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public EntityImpl getPublicCashPenalty() {\n return (EntityImpl)getEntity(0);\n }",
"public SQLStatement getSQLStatement() {\n return sqlStatement;\n }",
"public Account getIncomeStreamAccount() {\n return incomeStreamAccount;\n }",
"public int getAmount()\n {\n return this.transactionValue;\n }",
"@Override\r\n\tpublic final int getSaludBonus() {\r\n\t\treturn BONUSSALUD;\r\n\t}",
"public int getMinYearAmount() {\r\n return minYearAmount;\r\n }",
"@Override\n\tpublic double getSalud() {\n\t\treturn this.salud;\n\t}",
"public String getIncomeStreamFinancialCoaCode() {\n return incomeStreamFinancialCoaCode;\n }",
"public ASTNode visitStatement(StatementContext ctx) {\n ASTStmt stmt = (ASTStmt)visit(ctx.stmt());\n return new ASTStmtUnit(ctx, stmt);\n }",
"public interface IStmt {\n\n String toStr();\n PrgState execute(PrgState state) throws StmtException;\n\n}",
"public java.lang.Integer getVar114() {\n return var114;\n }",
"public java.lang.Integer getVar100() {\n return var100;\n }",
"public int getStudentNum(){//return student Number\r\n \treturn studentNum;\r\n }",
"@Override\r\n\tpublic String getBind_annuity_ind() {\n\t\treturn super.getBind_annuity_ind();\r\n\t}",
"public int getNoPaymentsYearly(){return this.no_payments_yearly;}"
] | [
"0.83245724",
"0.7397854",
"0.67908067",
"0.6527005",
"0.59365207",
"0.5914473",
"0.5893307",
"0.5838395",
"0.57772875",
"0.5738481",
"0.56972474",
"0.55835587",
"0.5513007",
"0.54838985",
"0.54633576",
"0.5462879",
"0.53808606",
"0.52270633",
"0.5200176",
"0.51508963",
"0.5130718",
"0.5093462",
"0.50868",
"0.50714505",
"0.5067757",
"0.504341",
"0.50204474",
"0.501997",
"0.4989258",
"0.4983992",
"0.49618837",
"0.4961514",
"0.4937632",
"0.4937632",
"0.4937632",
"0.4921085",
"0.49177432",
"0.49177432",
"0.49177432",
"0.4879331",
"0.48716322",
"0.4871211",
"0.48459783",
"0.48382246",
"0.48365673",
"0.48363072",
"0.48333624",
"0.48306355",
"0.48289663",
"0.48226982",
"0.48205233",
"0.48158982",
"0.48157644",
"0.48138386",
"0.4799688",
"0.478557",
"0.4774291",
"0.4759017",
"0.4754008",
"0.47524625",
"0.47512037",
"0.47484156",
"0.47435912",
"0.47341275",
"0.47281098",
"0.4721844",
"0.47195077",
"0.47062433",
"0.47049117",
"0.47014296",
"0.46987858",
"0.46968657",
"0.46900627",
"0.46856898",
"0.46810773",
"0.4674384",
"0.46729532",
"0.4671195",
"0.46671718",
"0.46637267",
"0.46529046",
"0.46517676",
"0.4638372",
"0.46215436",
"0.46175715",
"0.4616535",
"0.46154213",
"0.46127155",
"0.46123502",
"0.46120295",
"0.45967263",
"0.4588277",
"0.45872012",
"0.4582338",
"0.4581775",
"0.45802152",
"0.45763347",
"0.45751897",
"0.45674354",
"0.45673782"
] | 0.8702517 | 0 |
Setter for property us1120incomeStmt. | public void setUs1120incomeStmt(String us1120incomeStmt) {
this.us1120incomeStmt = us1120incomeStmt;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getUs1120incomeStmt() {\n\n return this.us1120incomeStmt;\n }",
"public String getUs1120incomeStmtName() {\n\n return this.us1120incomeStmtName;\n }",
"public void setUs1120incomeStmtName(String us1120incomeStmtName) {\n\n this.us1120incomeStmtName = us1120incomeStmtName;\n }",
"public void setStmtAmt (BigDecimal StmtAmt);",
"public void setAnnualIncome(int value) {\n this.annualIncome = value;\n }",
"void setIncome(double amount);",
"void setStatement(Statement statement);",
"public Stmt getStmt() {\n return this.stmt;\n }",
"public void setStatement(String newStatement){\n this.statement = newStatement; \n }",
"public void setStmt(Stmt node, int i) {\n List<Stmt> list = getStmtList();\n list.setChild(node, i);\n }",
"public int updateIncome(Income income) {\n\t\treturn 0;\n\t}",
"public final String assignStmt() throws RecognitionException {\n\t\tString out = null;\n\n\n\t\tCommonTree ID26=null;\n\t\tString expr27 =null;\n\n\n\t\t\tout = \"\";\n\n\t\ttry {\n\t\t\t// C:\\\\Users\\\\Samir\\\\Documents\\\\University\\\\Y2S2\\\\COMP2010\\\\LittleNic\\\\src\\\\LittleNicCodeGen.g:376:2: ( ^( ':=' ID expr[false, null] ) )\n\t\t\t// C:\\\\Users\\\\Samir\\\\Documents\\\\University\\\\Y2S2\\\\COMP2010\\\\LittleNic\\\\src\\\\LittleNicCodeGen.g:376:4: ^( ':=' ID expr[false, null] )\n\t\t\t{\n\t\t\tmatch(input,30,FOLLOW_30_in_assignStmt515); \n\t\t\tmatch(input, Token.DOWN, null); \n\t\t\tID26=(CommonTree)match(input,ID,FOLLOW_ID_in_assignStmt517); \n\t\t\tpushFollow(FOLLOW_expr_in_assignStmt519);\n\t\t\texpr27=expr(false, null);\n\t\t\tstate._fsp--;\n\n\t\t\tmatch(input, Token.UP, null); \n\n\t\t\tout = \"_\" + (ID26!=null?ID26.getText():null) + \" = \" + expr27 + \";\";\n\t\t\t}\n\n\t\t}\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\trecover(input,re);\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\treturn out;\n\t}",
"public String getStatement(){\n return this.statement;\n }",
"public void setCoverage(String value) {\n/* 90 */ setValue(\"coverage\", value);\n/* */ }",
"public BigDecimal getStmtAmt();",
"public void setIncomeTotal(){\n\t\tincomeOutput.setText(\"$\" + getIncomeTotal());\n\t\tnetIncomeOutput.setText(\"$\" + (getIncomeTotal() - getExpensesTotal()));\n\t}",
"public int getAnnualIncome() {\n return annualIncome;\n }",
"public void setSupEntMoney(String supEntMoney) {\n this.supEntMoney = supEntMoney == null ? null : supEntMoney.trim();\n }",
"void setIncome(double newIncome) throws BankException {\n throw new BankException(\"This account does not support this feature\");\n }",
"public String getStatement()\n {\n return _statement;\n }",
"public double getincome()\n\t{\n\t\treturn this.income;\n\t}",
"public int getIncome() {\n\t\treturn income;\n\t}",
"public void setLBR_InterestCode (String LBR_InterestCode);",
"public EstimateIncome(){\n\t\tcalculateSlopesAndIntercepts();\n\t}",
"public void setStmtList(List<Stmt> list) {\n setChild(list, 0);\n }",
"public void setThenStm(Statement thenStm);",
"public R visit(StmtExp n) {\n R _ret=null;\n n.f0.accept(this);\n n.f1.accept(this);\n n.f2.accept(this);\n \n use.put(statementNumber, new ArrayList<Integer>());\n def.put(statementNumber, new ArrayList<Integer>());\n n.f3.accept(this);\n end.add(statementNumber);\n// System.out.println(statementNumber);\n n.f4.accept(this);\n statementNumber++;\n return _ret;\n }",
"public void setSemTable(Semesterunits value);",
"public String getStatement() {\r\n\t\treturn statement;\r\n\t}",
"public void setBTHighScore50(int s)\n\t{\n\t\tbattletowerHighscoreLvl50 = s;\n\t}",
"@Override\r\n\tpublic void visit(InstrumentStatement instrumentStatement) {\n\t\t\r\n\t}",
"public Table getStatementsTable(){\n\t\treturn m_statements;\n\t}",
"public ASTNode visitStatement(StatementContext ctx) {\n ASTStmt stmt = (ASTStmt)visit(ctx.stmt());\n return new ASTStmtUnit(ctx, stmt);\n }",
"public void addIncomeAmount(KualiDecimal incomeAmount) {\n this.incomeAmount = this.incomeAmount.add(incomeAmount); \n this.totalNumberOfTransactionLines++;\n \n }",
"public void setSupEntIndustry(String supEntIndustry) {\n this.supEntIndustry = supEntIndustry == null ? null : supEntIndustry.trim();\n }",
"private void setStatementInfo (String tempID,IncomeNotePO note, String staffID,\n\t\t\tPreparedStatement stmt) throws SQLException {\n\t\tstmt.setString(1, tempID);\n\t\tstmt.setString(2, note.getTime());\n\t\tstmt.setString(3, note.getReceivingOrganization());\n\t\tstmt.setString(4, note.getIncomeHandler());\n\t\tstmt.setString(5, note.getIncomeSource());\n\t\tstmt.setString(6, note.getMoney());\n\t\tstmt.setString(7, note.getAccount().getNumber());\n\t\tstmt.setString(8, staffID);\n\t\t\n\t\tstmt.setInt(9, DocState.UNCHECKED.getIntState());\n\t}",
"public void setAgentStipend(String value) {\r\n setAttributeInternal(AGENTSTIPEND, value);\r\n }",
"private void changeIncomeValues() {\n \n selectedCity.updateIncomes(selectedCity.getSlot(selectedSlot));\n \n soldierIncomeLabel.setText(selectedCity.getSoldierIncome() + \"\");\n foodIncomeLabel.setText(selectedCity.getFoodIncome() + \"\");\n goldIncomeLabel.setText(selectedCity.getGoldIncome() + \"\");\n }",
"public void setProfitLoss(String profitLoss) {\n\n this.profitLoss = profitLoss;\n }",
"public void setVar115(java.lang.Integer value) {\n this.var115 = value;\n }",
"public void setIndName(String indName) {\r\n this.indName = indName == null ? null : indName.trim();\r\n }",
"public void\nsetHirBody( BlockStmt pHirBody );",
"public void setSightRange(int n){\n\tsightRange = n;\n }",
"public Income() {\r\n\t\t//this.customer = customer;\r\n\t\tperiod = 31;\t\t\t\t//sets the default payment period to 31 days\r\n\t\tvalue = 1000;\t\t\t\t//sets the default income value to 1000\r\n\t\t\r\n\t}",
"public void setBTStreak50(int s)\n\t{\n\t\tbattletowerCurrentStreakLvl50 = s;\n\t}",
"public void setORM_Stalstal(orm.Stal value) {\r\n\t\tthis.stalstal = value;\r\n\t}",
"@Override\n\tpublic double getInsuranceAmount() {\n\t\treturn 200000;\n\t}",
"public void updateIncome(Income income) {\n\t\tSession session=null;\n\t\tTransaction tx=null;\n\t\ttry {\n\t\t\tsession=BuildSessionFactory.getCurrentSession();\n\t\t\ttx=session.beginTransaction();\n\t\t\tincomeDao.update(session, income);\n\t\t\ttx.commit();\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t\tif(tx!=null){\n\t\t\t\ttx.rollback();\n\t\t\t\tthrow new UserException(e.getMessage());\n\t\t\t}\n\t\t}finally{\n\t\t\tif(session!=null && session.isOpen()){\n\t\t\t\tsession.close();\n\t\t\t}\n\t\t}\n\t}",
"Statement getStmt();",
"public void changeSstat(int amt) {\n\t\tsStatN += amt;\n\t\tsStatM = sStatN / 2;\n\t}",
"ScriptBuilder setLineCoverage(String lineCoverage) {\n this.lineCoverage = lineCoverage;\n return this;\n }",
"public double getIncome() {\n\n return gross;\n }",
"public void setInsid(Integer insid) {\n this.insid = insid;\n }",
"public Builder setInsight(java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n insight_ = value;\n bitField0_ |= 0x00000001;\n onChanged();\n return this;\n }",
"public void setSupEntScope(String supEntScope) {\n this.supEntScope = supEntScope == null ? null : supEntScope.trim();\n }",
"public void setInsYmd(String insYmd) {\n this.insYmd = insYmd;\n }",
"public void setStone(int stoneIn){\r\n\t\tstone = stoneIn;\r\n\t}",
"public void setIndepYear(int indepYear) {\n\n this.indepYear = indepYear;\n }",
"public void setVerStmt(edu.umich.icpsr.ddi.VerStmtType verStmt)\n {\n synchronized (monitor())\n {\n check_orphaned();\n edu.umich.icpsr.ddi.VerStmtType target = null;\n target = (edu.umich.icpsr.ddi.VerStmtType)get_store().find_element_user(VERSTMT$22, 0);\n if (target == null)\n {\n target = (edu.umich.icpsr.ddi.VerStmtType)get_store().add_element_user(VERSTMT$22);\n }\n target.set(verStmt);\n }\n }",
"public void setYearlyBonus(int yearlyBonus){\n this.yearlyBonus = yearlyBonus;\n }",
"public void setAmount(double amount) {\r\n\t\tthis.investmentAmount = amount;\r\n\t}",
"public abstract void parseStatements(\n\t\tParser parser,\n\t\tCompilationUnitDeclaration unit);",
"public void setIndenter(PIndenter newIndenter) {\n this.indenter = newIndenter;\n }",
"public void setCoverage(java.lang.String coverage)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(COVERAGE$4);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(COVERAGE$4);\n }\n target.setStringValue(coverage);\n }\n }",
"public boolean getOwnStatement() {\n return ownStatement_;\n }",
"public void setSalary(int salary) {\n this.salary = salary; // assigning a local variable value to a global variable\r\n }",
"public void insurance() {\n\t\tSystem.out.println(\"Min ins is 500\");\n\t}",
"public void setElseStm(Statement elseStm);",
"public ReadStmt(Variable var)\n {\n this.var = var;\n }",
"public void setSalary(double salary){\r\n this.salary = salary;\r\n }",
"public void setVar100(java.lang.Integer value) {\n this.var100 = value;\n }",
"public boolean getOwnStatement() {\n return ownStatement_;\n }",
"public void setCoverage (int coverage) throws PatientException{\r\n if (coverage >=0 && coverage <= 100){\r\n this.coverage = coverage;\r\n }\r\n else {\r\n PatientException eCoverage = new PatientException();\r\n eCoverage.setMessage(\"This is not a valid percent, must be between 0 and 100.\");\r\n throw(eCoverage);\r\n }\r\n }",
"public void setHungerDamage(float hunger);",
"public String getSupEntMoney() {\n return supEntMoney;\n }",
"public void setNetTotalIncurred(gw.api.financials.CurrencyAmount value);",
"public void setSuit (int aSuit)\n {\n this.suits = aSuit;\n }",
"private void buildIncomeStatementPane() // buildIncomeStatementPane method start\n\t{\n\t\t// creating object\n\t\tISOutput = new JTextArea();\n\t\t\n\t\t// object settings\n\t\tISOutput.setText(log.incomeStatement());\n\t\tISOutput.setEditable(false);\n\t\tISOutput.setFont(font);\n\t\tISOutput.setRows(20);\n\t\t\n\t\t// adding object and scroll bar to panel\n\t\tincomeStatementPane.add(ISOutput);\n\t\tincomeStatementPane.add(new JScrollPane(ISOutput));\n\t}",
"private void setStory(int storyIn) {\n\t\tstory = storyIn;\n\t}",
"abstract public int getIncomeSegment( int hhIncomeInDollars );",
"public void setCounty(String county) {\r\n this.county = county;\r\n }",
"@Override public void enterWrite_stmt(MicroParser.Write_stmtContext ctx) {\n\t\tString txt = ctx.getText();\n\t\tString id = txt.split(\"\\\\(\")[1].split(\"\\\\)\")[0];\n\n\t\tString type = \"\";\n\t\tArrayList<List<String>> varList = st.varMap.get(\"GLOBAL\");\n\t if(varList != null){\n\t for(List<String> varData : varList){\n\t \tif(varData.get(0).equals(id)){\n\t \t\ttype = varData.get(1);\n\t \t}\n\t }\n\t }\n\n\t\tif(type.equals(\"INT\"))\n\t\t\tthis.meIRL.add(new IRNode(\"WRITEI\", id, \"\", \"\"));\n\t\tif(type.equals(\"FLOAT\"))\n\t\t\tthis.meIRL.add(new IRNode(\"WRITEF\", id, \"\", \"\"));\n\t}",
"@Override\n public String visit(LabeledStmt n, Object arg) {\n return null;\n }",
"public void\naddInitiationStmt( Stmt pInitiationStmt );",
"@Override\r\n\tpublic void setNextStatementInProgram(Statement stat) {\r\n\t\tthis.nextStatementInProgram = body;\r\n\t\tbody.setNextStatementInProgram(stat);\r\n\t}",
"void setFinancialStatementsArray(int i, ch.crif_online.www.webservices.crifsoapservice.v1_00.FinancialStatement financialStatements);",
"final public SqlStatement ScriptStatement() throws ParseException {SqlStatement st = null;\n switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {\n case USE:\n case CREATE:\n case DROP:\n case SET:\n case INSERT:\n case ALTER:\n case LOCK:\n case UNLOCK:\n case START:\n case COMMIT:\n case 117:{\n st = Statement();\n jj_consume_token(117);\n break;\n }\n case 0:{\n jj_consume_token(0);\n break;\n }\n default:\n jj_la1[1] = jj_gen;\n jj_consume_token(-1);\n throw new ParseException();\n }\nreturn st;\n}",
"public AssignStmt assign_stmt() {\n AssignExpr ae = assign_expr();\n if (lexer.token != Symbol.SEMICOLON) {\n error.signal(\"Semicolon expected after assignment\");\n }\n lexer.nextToken();\n\n return new AssignStmt(ae);\n }",
"public void setInspection(String value) {\n setAttributeInternal(INSPECTION, value);\n }",
"public void setExplicandum(SqlNode explicandum) {\n this.explicandum = explicandum;\n }",
"public void setSalaryRange(String salaryRange) {\r\n this.salaryRange = salaryRange;\r\n }",
"public R visit(StmtExp n) {\n R _ret=null;\n n.f0.accept(this);\n // System.out.println(\"BEGIN\");\n n.f1.accept(this);\n n.f2.accept(this);\n \t\n String s = (String) n.f3.accept(this);\n current_temp =s;\n n.f4.accept(this);\n //System.out.println(\"END\");\n return (R)s;\n }",
"public void setBonusScore() {\r\n count = count+50;\r\n }",
"public void setNY(int ny){\n newY=ny;\n }",
"public void setSettlementno(Integer settlementno) {\n this.settlementno = settlementno;\n }",
"public void setSTS( Integer STS )\n {\n this.STS = STS;\n }",
"void addIncomeToBudget();",
"public void statement(Node n_parent) {\r\n System.out.println(\":: statement:\"+n_parent.getData());\r\n if(token.get(lookAheadPossition).contains(\"ident(\")){\r\n System.out.println(\":: statement::if\");\r\n\r\n Node n_assignment = n_parent.setChildren(\":=\");\r\n this.assignment(n_assignment);\r\n }\r\n else if (token.get(lookAheadPossition).equals(\"IF\")) {\r\n System.out.println(\":: statement::if\");\r\n\r\n Node n_ifStatement = n_parent.setChildren(\"if\");\r\n this.ifStatement(n_ifStatement);\r\n }\r\n else if (token.get(lookAheadPossition).equals(\"WHILE\")){\r\n System.out.println(\":: statement::if\");\r\n\r\n Node n_whileStatement = n_parent.setChildren(\"while\");\r\n this.whileStatement(n_whileStatement);\r\n }\r\n else if (token.get(lookAheadPossition).equals(\"WRITEINT\")){\r\n System.out.println(\":: statement::if\");\r\n\r\n Node n_writeInt = n_parent.setChildren(\"writeInt\");\r\n this.writeInt(n_writeInt);\r\n }\r\n }",
"public int getStatementId() {\n return statementId_;\n }",
"public int getStatementId() {\n return statementId_;\n }"
] | [
"0.7892394",
"0.77216107",
"0.74193525",
"0.5630381",
"0.5628475",
"0.52032346",
"0.51229244",
"0.51160705",
"0.5110249",
"0.4917036",
"0.4763958",
"0.4749984",
"0.47407728",
"0.4728446",
"0.4717618",
"0.46753892",
"0.46577665",
"0.46383098",
"0.46367103",
"0.4630534",
"0.4608616",
"0.45536914",
"0.4546716",
"0.45074221",
"0.45044297",
"0.4484274",
"0.4481917",
"0.44528738",
"0.4446842",
"0.44239283",
"0.44189674",
"0.4418655",
"0.44184956",
"0.44151893",
"0.44078472",
"0.43958056",
"0.43938833",
"0.43923944",
"0.43905073",
"0.43747008",
"0.43716833",
"0.43680167",
"0.43626902",
"0.4342936",
"0.4320479",
"0.43119887",
"0.43109894",
"0.43061075",
"0.43044913",
"0.42966568",
"0.4294834",
"0.42920172",
"0.42907673",
"0.42854947",
"0.42839178",
"0.4283849",
"0.4281271",
"0.4279251",
"0.42788878",
"0.42777216",
"0.4275296",
"0.42513934",
"0.4240045",
"0.42331833",
"0.42291713",
"0.42263985",
"0.42066732",
"0.4202849",
"0.41933802",
"0.41912243",
"0.41884875",
"0.4185556",
"0.4178597",
"0.41761965",
"0.4176124",
"0.41728336",
"0.41622925",
"0.41611484",
"0.4156329",
"0.41512263",
"0.41511703",
"0.415042",
"0.41501522",
"0.41493115",
"0.41464147",
"0.414632",
"0.41451037",
"0.41401717",
"0.41395283",
"0.41377285",
"0.4135341",
"0.4132173",
"0.41312987",
"0.41282442",
"0.41250125",
"0.41248304",
"0.41174072",
"0.41158342",
"0.41155282",
"0.41155282"
] | 0.8280265 | 0 |
Getter for property us1120incomeStmtName. | public String getUs1120incomeStmtName() {
return this.us1120incomeStmtName;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getUs1120incomeStmt() {\n\n return this.us1120incomeStmt;\n }",
"public void setUs1120incomeStmtName(String us1120incomeStmtName) {\n\n this.us1120incomeStmtName = us1120incomeStmtName;\n }",
"public void setUs1120incomeStmt(String us1120incomeStmt) {\n\n this.us1120incomeStmt = us1120incomeStmt;\n }",
"public java.lang.String getStatementname() {\n return statementname;\n }",
"public Stmt getStmt() {\n return this.stmt;\n }",
"@AutoEscape\n\tpublic String getStudentName();",
"public String getName() \r\n {\r\n return studentName;\r\n }",
"public String getStudentName() {\n return studentName;\n }",
"public String getStudentName() {\n return studentName;\n }",
"public String getStudentName() {\r\n\t\treturn studentName;\r\n\t}",
"public String getName() { return _sqlName; }",
"public String getStatement(){\n return this.statement;\n }",
"@VTID(27)\n java.lang.String getSourceName();",
"public String getStudentName() {\n\t\treturn studentName;\n\t}",
"public String getStatement()\n {\n return _statement;\n }",
"public String getProfitLossName() {\n\n return this.profitLossName;\n }",
"public String getIndName() {\r\n return indName;\r\n }",
"public String getStrName() {\n return strName;\n }",
"public String getSname() {\n return sname;\n }",
"public String getUnitName() throws Exception {\r\n return (String) getField(BaseAuditContestInterceptor.class, this, \"unitName\");\r\n }",
"public JExpr getNameExpr() { return _nameExpr; }",
"public String getName()\r\n/* */ {\r\n/* 130 */ return this.name;\r\n/* */ }",
"public String getPlayerName() {\n/* 100 */ return this.scorePlayerName;\n/* */ }",
"final public Identifier getName ()\n {\n\treturn myName;\n }",
"public java.lang.String getStudent_name() {\n\t\treturn _primarySchoolStudent.getStudent_name();\n\t}",
"public String getSQLName(){\n\t\tif(source==null){\n\t\t\t//no source predicate is associated with this pred\n\t\t\treturn name;\n\t\t}\n\t\treturn source.getSQLName();\n\t}",
"java.lang.String getBankName();",
"public String getSkillsetName() {\n return skillsetName;\n }",
"@Override\n\tpublic String getInsuranceName() {\n\t\treturn \"Har Ghar Bima\";\n\t}",
"public String getStatName() {\n return statName;\n }",
"public String getName() {\n return stid.trim() + std2.trim();\n }",
"public String getName()\n/* */ {\n/* 336 */ return this.fullName;\n/* */ }",
"java.lang.String getSchoolName();",
"public String getStatement() {\r\n\t\treturn statement;\r\n\t}",
"public String getName() {\n return sname;\n }",
"public String getName()\n/* */ {\n/* 94 */ return this._name;\n/* */ }",
"String getName() {\n return getStringStat(playerName);\n }",
"public java.lang.String getSourceName() {\r\n return localSourceName;\r\n }",
"public YangString getNameValue() throws JNCException {\n return (YangString)getValue(\"name\");\n }",
"public YangString getNameValue() throws JNCException {\n return (YangString)getValue(\"name\");\n }",
"public String getsName() {\n return sName;\n }",
"java.lang.String getCodeName();",
"public String getName()\n/* */ {\n/* 59 */ return this.name;\n/* */ }",
"java.lang.String getInsight();",
"public String getName()\n/* */ {\n/* 60 */ return this.name;\n/* */ }",
"public String getName()\n/* */ {\n/* 62 */ return this.name;\n/* */ }",
"public String getStatement();",
"public String getName()\r\n/* 24: */ {\r\n/* 25:20 */ return this.name;\r\n/* 26: */ }",
"public NsName getName () { return name; }",
"public String getName()\n/* */ {\n/* 109 */ return this.name;\n/* */ }",
"public String getStudyName() {\n return studyName;\n }",
"public String getName() {\n return monsterName;\n }",
"public String getSeName() {\n return seName;\n }",
"public String getStudentName(){\n return studentName.getText().trim();\n }",
"String getIssueName();",
"public double getincome()\n\t{\n\t\treturn this.income;\n\t}",
"public String getNurseoneName() {\n return nurseoneName;\n }",
"public java.lang.String getStrName()\n\t{\n\t\treturn strName;\n\t}",
"public String getName() {\n/* 209 */ return this.name;\n/* */ }",
"@Override\n protected String getNameImpl()\n {\n return _nameExpr != null ? _nameExpr.getName() : null;\n }",
"Statement getStmt();",
"public String getName() {\n\t\treturn ((name != null) && !name.isEmpty()) ? name\n\t\t\t\t: (\"[\" + Long.toString(dciId) + \"]\"); //$NON-NLS-1$ //$NON-NLS-2$\n\t}",
"public Identifier getName();",
"public String getCountyname() {\n return countyname;\n }",
"public String getSpLastName() {\r\n return spLastName;\r\n }",
"public String getName() {\n return this.lineName;\n }",
"public java.lang.String getPetName() {\n return localPetName;\n }",
"public String getName(){\n\t\treturn this.tournamentName;\n\t}",
"public String getPropertyName(){\n return SimpleTableField.mapPropName(this.columnName);\n }",
"@Override\r\n\tpublic String toString() {\n\t\treturn \"Name is \" + empName + \"\\nEmp ID is \" + empID + \"\\nIncome=\" + annualIncome + \"\\nIncome Tax=\" + incomeTax\r\n\t\t\t\t+ \"\";\r\n\t}",
"java.lang.String getCouponName();",
"java.lang.String getCouponName();",
"java.lang.String getCouponName();",
"public String getResidentName() {\n return residentName;\n }",
"java.lang.String getEmployeeName();",
"public String getStudent(){\n\t\t\n\t\treturn this.student;\n\t}",
"public String getStuname() {\n return stuname;\n }",
"public String getName(){\n\t\treturn this.firstName + \" \" + this.surname;\r\n\t}",
"public String getSrcLastName() {\r\n return (String) getAttributeInternal(SRCLASTNAME);\r\n }",
"public static String getStudentName(int rollNum) {\r\n\t\tMap<Integer,Student> map = getStudentMap();\r\n\t\tif(map.containsKey(rollNum)) { \r\n\t\t\tStudent st = map.get(rollNum);\r\n\t\t\treturn st.getName();\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public String getName() {\r\n return myName;\r\n }",
"public String getUs1120sheetName() {\n\n return this.us1120sheetName;\n }",
"public String getName(){\n\t\treturn myName;\n\t}",
"@Override\r\n\tpublic String getSurName() {\n\t\treturn sur_name;\r\n\t}",
"public String getPinyinName() {\n return mPinyinName;\n }",
"@VTID(17)\n java.lang.String getName();",
"public String name() {\n return myStrVal;\n }",
"public String getSupName() {\n return supName;\n }",
"public String getName() {\n/* */ return this.field_176894_i;\n/* */ }",
"public void setIndName(String indName) {\r\n this.indName = indName == null ? null : indName.trim();\r\n }",
"public String getSurName(){\n return this.surName;\n }",
"protected String getInstrumentName() {\n\t\treturn this.instrument;\n\t}",
"@Override\n\tpublic String getInsuranceName() {\n\t\treturn \"JeevanBima\";\n\t}",
"String getVarName();",
"String getVarName();",
"String getVarName();",
"public PosSymbol getProfileName() {\n return profileName;\n }",
"public String getName(){\r\n\t\tString s=\"\";\r\n\r\n\t\tif(getPersonId() != null && getPersonId().length() != 0)\r\n\t\t\ts += \" \" + getPersonId();\r\n\t\t\r\n\t\tif(getStudySubjectId() != null && getStudySubjectId().length() != 0)\r\n\t\t\ts += \" \" + getStudySubjectId();\r\n\r\n\t\tif(getSecondaryId() != null && getSecondaryId().length() != 0)\r\n\t\t\ts += \" \" + getSecondaryId();\r\n\r\n\t\treturn s;\r\n\t}",
"public String getScoreboardName() {\n/* 1999 */ return getGameProfile().getName();\n/* */ }",
"public String getNiceName() {\n\t\treturn niceName;\n\t}"
] | [
"0.7934518",
"0.73239684",
"0.674522",
"0.6183315",
"0.6092007",
"0.6040124",
"0.58433604",
"0.5788048",
"0.5788048",
"0.57831895",
"0.5749424",
"0.57346904",
"0.57311016",
"0.5719319",
"0.57147",
"0.56998897",
"0.5693417",
"0.56876993",
"0.5618207",
"0.5595518",
"0.5552926",
"0.55092204",
"0.5492603",
"0.5488426",
"0.54849625",
"0.5476778",
"0.5473899",
"0.54179156",
"0.5417151",
"0.541301",
"0.540762",
"0.5396486",
"0.53952104",
"0.5391689",
"0.53912294",
"0.5390722",
"0.5348143",
"0.5342368",
"0.53334564",
"0.53334564",
"0.5322018",
"0.5292471",
"0.52677727",
"0.5267441",
"0.52658814",
"0.52586055",
"0.52441126",
"0.5226007",
"0.5222084",
"0.5208363",
"0.5202728",
"0.5198432",
"0.519726",
"0.51939356",
"0.5183458",
"0.5177526",
"0.517517",
"0.51739436",
"0.5173752",
"0.5169203",
"0.51633984",
"0.51540655",
"0.5144807",
"0.5133236",
"0.5122319",
"0.51206744",
"0.51176447",
"0.51172566",
"0.51148856",
"0.51147",
"0.5114407",
"0.5114407",
"0.5114407",
"0.5102667",
"0.5099266",
"0.50944924",
"0.50909114",
"0.50856656",
"0.5081822",
"0.5074919",
"0.50695205",
"0.50661063",
"0.50636685",
"0.5060708",
"0.50530547",
"0.5050056",
"0.5047467",
"0.50410956",
"0.50410086",
"0.50387037",
"0.50329596",
"0.5030034",
"0.50258386",
"0.50172055",
"0.50172055",
"0.50172055",
"0.50152767",
"0.5012491",
"0.5012274",
"0.5011647"
] | 0.8763318 | 0 |
Setter for property us1120incomeStmtName. | public void setUs1120incomeStmtName(String us1120incomeStmtName) {
this.us1120incomeStmtName = us1120incomeStmtName;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getUs1120incomeStmtName() {\n\n return this.us1120incomeStmtName;\n }",
"public void setUs1120incomeStmt(String us1120incomeStmt) {\n\n this.us1120incomeStmt = us1120incomeStmt;\n }",
"public String getUs1120incomeStmt() {\n\n return this.us1120incomeStmt;\n }",
"public void setIndName(String indName) {\r\n this.indName = indName == null ? null : indName.trim();\r\n }",
"@VTID(18)\n void setName(\n java.lang.String rhs);",
"public void setStatementname(java.lang.String statementname) {\n this.statementname = statementname;\n }",
"public java.lang.String getStatementname() {\n return statementname;\n }",
"public void setStudentName(String studentName);",
"public void setName(String n)\n\t{\n\t\tfullName=n;\n\t}",
"@AutoEscape\n\tpublic String getStudentName();",
"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 inName)\n {\n\tname = inName;\n }",
"public void setProfitLossName(String profitLossName) {\n\n this.profitLossName = profitLossName;\n }",
"void setName(String name) {\n setStringStat(name, playerName);\n }",
"public void setName (String n) {\n name = n;\n }",
"public void setNameString(String s) {\n nameString = s;\r\n }",
"public void setName(String nameExpr) throws JspException {\n this.nameExpr = nameExpr;\n }",
"public void setStrName(String strName) {\n this.strName = strName;\n }",
"private void setName(String nameIn){\r\n\t\tplayerName = nameIn;\r\n\t}",
"public void setName(String n) {\r\n\t\tthis.name = n;\r\n\t}",
"public void setName(String inName)\n {\n name = inName;\n }",
"public void setName(String studentName) \r\n {\r\n if (isEmpty(studentName)) \r\n {\r\n throw new IllegalArgumentException(\"Student name cannot be blank.\");\r\n } \r\n else \r\n {\r\n this.studentName = studentName;\r\n }\r\n\r\n }",
"public void setName(Identifier name) throws SourceException;",
"public void setStudentName(String studentName) {\n this.studentName = studentName == null ? null : studentName.trim();\n }",
"public void setName(String name) {\n monsterName = name;\n }",
"public void setName(String name) {\n monsterName = name;\n }",
"public void setName(String n) {\n this.name = n;\n }",
"public void setName(String nameIn) {\n name = nameIn;\n }",
"public void setSname(String sname) {\n this.sname = sname == null ? null : sname.trim();\n }",
"public void setName(String s) {\n this.name = s;\n }",
"public String getStrName() {\n return strName;\n }",
"public String getName() { return _sqlName; }",
"public void setName(String s) {\n\t\t\n\t\tname = s;\n\t}",
"public void setStudentName() {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t// setter method initialized\r\n System.out.println(\"Name Of The Student : \"+studentName);}",
"public void setName(String sName) {\n\t\t\tsRuleID = sName;\n\t\t}",
"public final void setName(final String inName) {\n mName = inName;\n }",
"@Override\r\n\tpublic void setSurName(String sname) {\n\t\tif (sname == null) {\r\n\t\t\tthrow new IllegalArgumentException(\"Null argument is not allowed\");\r\n\t\t}\r\n\t\tif (sname.equals(\"\")) {\r\n\t\t\tthrow new IllegalArgumentException(\"Empty argument is not allowed\");\r\n\t\t}\r\n\t\tthis.sur_name = sname;\r\n\t}",
"public final void setName(final GenericName name) {\n this.value = name.toString();\n final NameSpace scope = name.scope();\n if (scope != null && !scope.isGlobal()) {\n codeSpace = scope.name().toString();\n }\n }",
"public void setName(String name)\r\n/* */ {\r\n/* 137 */ this.name = name;\r\n/* */ }",
"public static void setName(String n){\n\t\tname = n;\n\t}",
"public void setsName(String sName) {\n this.sName = sName == null ? null : sName.trim();\n }",
"public void setName(String n){ name=n; }",
"public String getStudentName() {\r\n\t\treturn studentName;\r\n\t}",
"public void setSupName(String supName) {\n this.supName = supName == null ? null : supName.trim();\n }",
"public void setObjectiveName(String name) {\n this.objectiveName = name;\n if (created)\n getPlayer().sendPacket(createObjectivePacket(2, name));\n }",
"public void setName(String rawLineName) {\n this.lineName = rawLineName;\n //System.out.println(this.lineName + \" \" + lineName);\n }",
"public void setName(String name) {\r\n this.name = name.trim();\r\n }",
"public void setCountyname(String countyname) {\n this.countyname = countyname;\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/* */ }",
"public String getStudentName() {\n\t\treturn studentName;\n\t}",
"public String getSname() {\n return sname;\n }",
"public void setSeName(String seName) {\n this.seName = seName;\n }",
"public void setNameExpr(JExpr anExpr)\n {\n replaceChild(_nameExpr, _nameExpr = anExpr);\n }",
"public void setName(String name)\r\n\t{\r\n\t\tthis.name = name.trim();\r\n\t\tif(name.length() > 0)\r\n\t\t{\r\n\t\t this.sponsorFirstChar = Character.toLowerCase(name.charAt(0));\r\n\t\t}\r\n\t\t\r\n\t}",
"public void setStudentName(String studentName) {\n\t\tthis.studentName = studentName;\n\t}",
"public void setName(String name)\n {\n this.name = name.trim();\n }",
"public void setNameValue(String nameValue) throws JNCException {\n setNameValue(new YangString(nameValue));\n }",
"public void setNameValue(String nameValue) throws JNCException {\n setNameValue(new YangString(nameValue));\n }",
"public void setName(String name){\n\t\tthis.tournamentName = name;\n\t}",
"public void setName(String grade) {\r\n\t\tname = grade;\r\n\t\t\r\n\t}",
"public void setStudentLastName(String studentLastName){\r\n this.studentLastName.set(studentLastName);\r\n }",
"public Constraint setName(StringDt theValue) {\n\t\tmyName = theValue;\n\t\treturn this;\n\t}",
"public String getProfitLossName() {\n\n return this.profitLossName;\n }",
"public void setName(String name)\n/* */ {\n/* 84 */ this._name = name;\n/* */ }",
"public void setSpLastName(String _empLastName) {\r\n this.spLastName = _empLastName;\r\n }",
"public void setName(String nm){\n\t\tname = nm;\n\t}",
"public abstract void setName( String name ) throws SourceException;",
"public String getSkillsetName() {\n return skillsetName;\n }",
"public String getName() \r\n {\r\n return studentName;\r\n }",
"@Override\npublic void studentName(String name) {\n\tthis.name = name;\n\tSystem.out.println(\"student name is \" +name);\n\t\n}",
"public void setName(String myName){\n this.name = myName;\n }",
"public void setStuname(String stuname) {\n this.stuname = stuname == null ? null : stuname.trim();\n }",
"public void setName(String n);",
"public void setName(java.lang.String param){\r\n localNameTracker = true;\r\n \r\n this.localName=param;\r\n \r\n\r\n }",
"public void setName(java.lang.String param){\r\n localNameTracker = true;\r\n \r\n this.localName=param;\r\n \r\n\r\n }",
"public void setName(java.lang.String param){\r\n localNameTracker = true;\r\n \r\n this.localName=param;\r\n \r\n\r\n }",
"public void setStrLabelName(String strLabelName) {\r\n\t\tthis.strLabelName = strLabelName;\r\n\t}",
"public void setName(String name)\r\n/* 29: */ {\r\n/* 30:23 */ this.name = name;\r\n/* 31: */ }",
"public void setName(String nam) {\r\n\t\tthis.name = nam;\r\n\t}",
"public void setName(String name)\n/* */ {\n/* 53 */ this.name = name;\n/* */ }",
"public void setName(String name)\n/* */ {\n/* 368 */ this.name = name;\n/* 369 */ this.fullName = name;\n/* 370 */ this.namespace = null;\n/* */ }",
"public void setName(String theName)\n\t{\n\t\tthis.theName=theName;\n\t\tif(theName.length()==0)\n\t\t{\n\t\t\tthis.theName=\"**No Name**\";\n\t\t}\n\t}",
"public void setName(java.lang.String param) {\r\n localNameTracker = true;\r\n\r\n this.localName = param;\r\n\r\n\r\n }",
"public final void setVarName(String varName){\n\t\tthis.varName = varName;\t\n\t}",
"public void setName(String name) {\n\t\tthis.name = name == null ? null : name.trim();\n\t}",
"public void setName(String name) {\n\t\tthis.name = name == null ? null : name.trim();\n\t}",
"public void setName(String name) {\n\t\tthis.name = name == null ? null : name.trim();\n\t}",
"public String getSQLName(){\n\t\tif(source==null){\n\t\t\t//no source predicate is associated with this pred\n\t\t\treturn name;\n\t\t}\n\t\treturn source.getSQLName();\n\t}",
"public void setName( String pName )\n {\n name = pName;\n }",
"@VTID(27)\n java.lang.String getSourceName();",
"public void setPetName(java.lang.String param) {\n localPetNameTracker = true;\n\n this.localPetName = param;\n }",
"public void nameAnalysis(SymTable symTab) {\n for (StmtNode node : myStmts) {\n node.nameAnalysis(symTab);\n }\n }",
"public void setName(String name) {\n fName= name;\n }",
"public void setName (String name) {\n\t streetName = name ;\n }",
"public String getIndName() {\r\n return indName;\r\n }",
"public final void setName(String name) {_name = name;}",
"public void setSrcLastName(String value) {\r\n setAttributeInternal(SRCLASTNAME, value);\r\n }",
"public void setName(String newName){\n\n //assigns the value newName to the name field\n this.name = newName;\n }",
"@DISPID(-2147417111)\n @PropPut\n void className(\n java.lang.String rhs);"
] | [
"0.81378984",
"0.7410114",
"0.68917304",
"0.5917443",
"0.5824902",
"0.56566185",
"0.5640612",
"0.5520431",
"0.54568046",
"0.542317",
"0.5397443",
"0.5370178",
"0.53694123",
"0.5359254",
"0.5356494",
"0.5350743",
"0.5348496",
"0.53455454",
"0.5341246",
"0.533727",
"0.53318524",
"0.53134",
"0.53097093",
"0.530228",
"0.5291925",
"0.5283028",
"0.5283028",
"0.525838",
"0.5238823",
"0.52302414",
"0.52282387",
"0.5224911",
"0.5217973",
"0.52047193",
"0.5193364",
"0.5192397",
"0.5185362",
"0.5170588",
"0.5169294",
"0.51586974",
"0.514153",
"0.5140502",
"0.5137104",
"0.51366806",
"0.5133448",
"0.5132824",
"0.51245296",
"0.51056397",
"0.50979316",
"0.5095348",
"0.5086487",
"0.5084135",
"0.50782347",
"0.50750613",
"0.5070903",
"0.50417227",
"0.5037532",
"0.5032339",
"0.5032339",
"0.502164",
"0.5011451",
"0.5008783",
"0.5007783",
"0.50065696",
"0.5004373",
"0.50041646",
"0.50036055",
"0.50033796",
"0.49968967",
"0.4995769",
"0.4992838",
"0.49910614",
"0.4987189",
"0.4985491",
"0.4983342",
"0.4983342",
"0.4983342",
"0.49833414",
"0.49793205",
"0.49667802",
"0.49585837",
"0.49579751",
"0.4952963",
"0.49527565",
"0.49489307",
"0.49466294",
"0.49466294",
"0.49466294",
"0.4938766",
"0.49373195",
"0.49342495",
"0.49329573",
"0.49301326",
"0.49293387",
"0.49270552",
"0.49227",
"0.49223256",
"0.49202338",
"0.49187642",
"0.49165076"
] | 0.8048922 | 1 |
Getter for property cashFlow. | public String getCashFlow() {
return this.cashFlow;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Key<CashFlow> getCashflow() {\n\t\treturn cashflow;\n\t}",
"public String getCashFlowName() {\n\n return this.cashFlowName;\n }",
"public Double getCash() {\n\t\treturn cash;\n\t}",
"public double getCash() {\n return cash;\n }",
"public void setCashFlow(String cashFlow) {\n\n this.cashFlow = cashFlow;\n }",
"public String getCashNumber() {\n return cashNumber;\n }",
"public BigDecimal getCashMoney() {\n return cashMoney;\n }",
"public double getCash()\r\n/* */ {\r\n\t\t\t\tlogger.info(count++ + \" About to getCash : \" + \"Agent\");\r\n/* 219 */ return this.cash;\r\n/* */ }",
"public Money getAvailableCash(){\n\t\treturn availableCash;\n\t}",
"public double getCurrentCash() {\r\n return currentCash;\r\n }",
"@Override\r\n\tpublic Collection getCashFlows() {\n\t\treturn null;\r\n\t}",
"public java.math.BigDecimal getCashOrCheckAmount() {\r\n return cashOrCheckAmount;\r\n }",
"public BigDecimal getfCashoutAmount() {\r\n return fCashoutAmount;\r\n }",
"public BigDecimal getCashoutAmount() {\r\n return cashoutAmount;\r\n }",
"public BigDecimal getTotalCashPayment() {\n return totalCashPayment;\n }",
"@Column(name = \"pvp_queue_cash_cost\", precision = 10)\n\t@Override\n\tpublic Integer getPvpQueueCashCost() {\n\t\treturn (Integer) getValue(9);\n\t}",
"public Flow getFlow() {\r\n\t\treturn flow;\r\n\t}",
"public int getFlow() {\r\n\r\n return flow;\r\n }",
"public Flow getFlow() {\n return flow;\n }",
"public void setCashFlowName(String cashFlowName) {\n\n this.cashFlowName = cashFlowName;\n }",
"public double getContestFee() {\r\n return contestFee;\r\n }",
"public java.util.List<org.drip.analytics.cashflow.CompositePeriod> cashFlowPeriod()\n\t{\n\t\treturn _lsPeriod;\n\t}",
"Money getCashSettlementAmount();",
"public java.util.Set<java.lang.String> cashflowCurrencySet()\n\t{\n\t\tjava.util.Set<java.lang.String> setCcy = new java.util.HashSet<java.lang.String>();\n\n\t\tsetCcy.add (payCurrency());\n\n\t\tsetCcy.add (couponCurrency());\n\n\t\treturn setCcy;\n\t}",
"@Override\r\n\tpublic int getPayCheque() {\n\t\treturn profit+annuelSalary;\r\n\t\t\r\n\t}",
"public Integer getContractAmount() {\n return contractAmount;\n }",
"public int getCompFlow(){\n return this.mFarm.getCompFlow();\n }",
"public Float getCourseCredit() {\n return courseCredit;\n }",
"public String getCodFactura() {\r\n return codFactura;\r\n }",
"public BigDecimal getCredit() {\n return credit;\n }",
"public int getFlowCost()\n\t{\n\t\tint result = 0;\n\t\t\n\t\tfor (Node v : this.getNodes())\n\t\t for (Edge e : v.getOutgoingEdges())\n\t\t\tresult += (e.getFlow() * e.getCost());\n\t\t\n\t\treturn result;\n\t}",
"public String getCashoutProcessNo() {\r\n return cashoutProcessNo;\r\n }",
"public int getCredit() {\n return this.credit;\n }",
"@Column(name = \"cash_gained\", precision = 10)\n\t@Override\n\tpublic Integer getCashGained() {\n\t\treturn (Integer) getValue(4);\n\t}",
"public int getMoney() {\n return this.budget;\n }",
"public Float getCumulativePrice()\n\t{\n\t\treturn m_cumulativePrice;\n\t}",
"public float getCost() {\n if (categoryIdentifier == AppController.periodicCategoryIdentifier) {\n if (pCostEt.getText().toString().isEmpty())\n return -100;\n cost = Float.valueOf(pCostEt.getText().toString());\n } else {\n if (fCostEt.getText().toString().isEmpty())\n return -100;\n cost = Float.valueOf(fCostEt.getText().toString());\n }\n return cost;\n }",
"public int flow() {\n\t\treturn this.flow;\n\t}",
"public Money getCost(){\r\n return this.cost;\r\n }",
"public String getCum() {\n return cum;\n }",
"@Override\r\n\tpublic Double getModel_cashf_prop_score() {\n\t\treturn super.getModel_cashf_prop_score();\r\n\t}",
"public BigDecimal getCarProfitMoney() {\n return carProfitMoney;\n }",
"public BigDecimal getfMcashoutAmount() {\r\n return fMcashoutAmount;\r\n }",
"public JingtumCurrency getPay() {\n\t\tif (this.taker_gets == null && order != null){\n\t\t\treturn order.getTaker_gets();\n\t\t}\n\t\treturn taker_gets;\n\t}",
"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 double getCouponAmount() {\n return _couponAmount;\n }",
"public int getFee()\n {\n return fee;\n }",
"public double getAvgCashUnitPrice() {\n return this.avgCashUnitPrice ;\n }",
"@Override\n public int getCost() {\n int price = (int) Math.round(this.weight * this.pricePerLbs); //get the price of the cookies in the form of an int\n return price; //return the price\n\n }",
"public EntityImpl getPublicCashPenalty() {\n return (EntityImpl)getEntity(0);\n }",
"public BigDecimal getFcontractid() {\n return fcontractid;\n }",
"@Override\r\n\tpublic Integer getModel_cashf_prop_decile() {\n\t\treturn super.getModel_cashf_prop_decile();\r\n\t}",
"public int getCheckout() {\n return checkout;\n }",
"public java.lang.Double getMontoCashbackAnulacion() {\r\n return montoCashbackAnulacion;\r\n }",
"@Override\n\tpublic BnsCash get(String arg0) {\n\t\treturn cashRepository.findOne(arg0);\n\t}",
"public java.lang.Integer getCreditos() {\n return creditos;\n }",
"public String getCentralCashAllocationSchedule() {\n return centralCashAllocationSchedule;\n }",
"public JP430000.bssv.e1.oracle.ConfirmPurchaseOrderFinancialHeader getFinancial() {\n return financial;\n }",
"public Number getCost()\r\n {\r\n return (m_cost);\r\n }",
"@Override\r\n\tpublic double getCost() {\n\t\treturn this.cost_of_icecream;\r\n\t}",
"protected Double getCAProfessionnel() {\n List<Facture> facturesProfessionnel = this.factureProfessionnelList;\n Double ca = 0.0; \n for(Facture f : facturesProfessionnel )\n ca = ca + f.getTotalHT();\n \n return ca ; \n \n }",
"Money getDiscountValue();",
"public void setCash(double cash_input) {\n cash = cash_input;\n }",
"public BigDecimal getCpMoney() {\n return cpMoney;\n }",
"public double getAccrualFactorToNextCoupon() {\n return _factorToNextCoupon;\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 FlowControl getFlowControl() {\n\t\treturn flowControl;\n\t}",
"public BigDecimal getBudget() {\n return budget;\n }",
"public double getCopilot() {\r\n return copilot;\r\n }",
"public java.math.BigDecimal getCreditBalance() {\n return creditBalance;\n }",
"public float getRefundedCredits() {\n return this.refundedCredits;\n }",
"public float getCost() {\r\n\t\treturn this.cost.floatValue();\r\n\t}",
"public org.drip.param.valuation.CashSettleParams cashSettleParams()\n\t{\n\t\treturn _cashSettleParams;\n\t}",
"public int getMoney() {\n return money;\n }",
"public BigDecimal getMcashoutAmount() {\r\n return mcashoutAmount;\r\n }",
"public int getMoney()\n {\n return money;\n }",
"public Number getActualCost()\r\n {\r\n return (m_actualCost);\r\n }",
"public java.lang.String getChargecurrency() {\n\treturn chargecurrency;\n}",
"public AmountOfMoney getCashRegisterBalance(){\n return cashRegister.getBalance();\n }",
"public float getTcintmprice()\r\n {\r\n return _tcintmprice;\r\n }",
"public int getStock() {\n return stock;\n }",
"public BigDecimal getStock_price() {\n return stock_price;\n }",
"public boolean isAppliedCashCredit() {\r\n return appliedCashCredit;\r\n }",
"public BaseFlow getFlow() {\n\t\treturn this;\n\t}",
"public int getFECHAINICVAL() {\n return fechainicval;\n }",
"public int getTempCoolDown() {\n return tempCoolDown;\n }",
"public int getTurnCost()\n\t{\n\t\treturn TurnCost;\n\t}",
"public double getexpense()\n\t{\n\t\treturn this.expenses;\n\t}",
"public double getCEMENTAmount();",
"public String getPayDue(){\n return payDue;\n }",
"public int getDeliveryFee()\n {\n return deliveryFee;\n }",
"@Override\npublic Currency getCurrency() {\n\treturn balance.getCurrency();\n}",
"@Override\n public double getCashback(double amt_spent) {\n double rewards = 0.01*amt_spent;\n return rewards;\n }",
"public String getCflowBindings() {\n\t\tString cflowCondotion = \"\";\n\t\tList<ASTNode> children = this.getAbstractChildNodes();\n\t\tif (children.size() == 1 && children.get(0) instanceof PointCutASTNode)\n\t\t\tcflowCondotion = ((PointCutASTNode) children.get(0)).getCflowBindings();\n\t\telse if (children.size() == 2 && children.get(0) instanceof PointCutASTNode\n\t\t\t\t&& children.get(1) instanceof PointCutASTNode) {\n\t\t\tString leftChild = ((PointCutASTNode) children.get(0)).getCflowBindings();\n\t\t\tString rightChild = ((PointCutASTNode) children.get(1)).getCflowBindings();\n\n\t\t\tif (!leftChild.isEmpty() && !rightChild.isEmpty())\n\t\t\t\tcflowCondotion = leftChild + \" + \" + rightChild;\n\t\t\telse\n\t\t\t\tcflowCondotion = leftChild + rightChild;\n\t\t}\n\t\treturn cflowCondotion;\n\t}",
"@Override\r\n\tpublic Double getModel_cash_correlation() {\n\t\treturn super.getModel_cash_correlation();\r\n\t}",
"Money getItemValue();",
"public double getMoney() {\n return this.money;\n }",
"public double getCouponRate() {\n return _couponRate;\n }",
"@Override\r\n\tpublic double getBalance() {\n\t\treturn (super.getBalance()+cashcredit);\r\n\t}",
"public BigDecimal getFdeliverypricerate() {\n return fdeliverypricerate;\n }"
] | [
"0.78795093",
"0.7429451",
"0.71017694",
"0.7008596",
"0.6797394",
"0.6782647",
"0.66557986",
"0.65321434",
"0.64752513",
"0.644432",
"0.6310125",
"0.6257318",
"0.61117923",
"0.5999622",
"0.59225225",
"0.58805454",
"0.57614416",
"0.56808287",
"0.5674584",
"0.56555486",
"0.5654881",
"0.56519616",
"0.56466085",
"0.561489",
"0.55814195",
"0.55579346",
"0.5537231",
"0.5524907",
"0.5515053",
"0.54921734",
"0.5452058",
"0.54488444",
"0.5420082",
"0.54192585",
"0.5408475",
"0.53968734",
"0.53685975",
"0.5322252",
"0.5317595",
"0.5304378",
"0.52754015",
"0.5266263",
"0.5262319",
"0.5233303",
"0.5231273",
"0.52297175",
"0.5221375",
"0.5219966",
"0.52156955",
"0.5212994",
"0.5191891",
"0.5188113",
"0.5186065",
"0.51804745",
"0.51761276",
"0.51705045",
"0.51624364",
"0.51592046",
"0.51586765",
"0.5152615",
"0.51422006",
"0.51402277",
"0.51324534",
"0.5128988",
"0.51273465",
"0.51240486",
"0.5123298",
"0.51227826",
"0.5122277",
"0.5098758",
"0.5081961",
"0.5081919",
"0.508012",
"0.5058771",
"0.5047646",
"0.50408816",
"0.5040729",
"0.5039249",
"0.50389266",
"0.50325423",
"0.50249505",
"0.5018933",
"0.50167364",
"0.50099164",
"0.50092816",
"0.5008087",
"0.5003731",
"0.500327",
"0.49972597",
"0.4996127",
"0.49927607",
"0.49892005",
"0.49890223",
"0.4988681",
"0.49743962",
"0.49724954",
"0.49717543",
"0.49687696",
"0.49678108",
"0.4967027"
] | 0.85742193 | 0 |
Setter for property cashFlow. | public void setCashFlow(String cashFlow) {
this.cashFlow = cashFlow;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getCashFlow() {\n\n return this.cashFlow;\n }",
"public void setCash(double cash_input) {\n cash = cash_input;\n }",
"public void setCashFlowName(String cashFlowName) {\n\n this.cashFlowName = cashFlowName;\n }",
"public Key<CashFlow> getCashflow() {\n\t\treturn cashflow;\n\t}",
"public String getCashFlowName() {\n\n return this.cashFlowName;\n }",
"public void setCurrentCash(double value) {\r\n this.currentCash = value;\r\n }",
"void setFlow(double amount);",
"public void setFlow(int flow) {\r\n\r\n this.flow = flow;\r\n }",
"public Double getCash() {\n\t\treturn cash;\n\t}",
"public CashFlowImportStatus(Key<CashFlow> cashflow, int total) {\n\t\tthis.cashflow = cashflow;\n\t\tthis.setTotal(total);\n\t}",
"public double getCash() {\n return cash;\n }",
"public void setCashMoney(BigDecimal cashMoney) {\n this.cashMoney = cashMoney;\n }",
"public String getCashNumber() {\n return cashNumber;\n }",
"public BigDecimal getCashMoney() {\n return cashMoney;\n }",
"public void setCompFlow(int compFlow){\n this.mFarm.setCompFlow(compFlow);\n }",
"public void setfCashoutAmount(BigDecimal fCashoutAmount) {\r\n this.fCashoutAmount = fCashoutAmount;\r\n }",
"public BigDecimal getfCashoutAmount() {\r\n return fCashoutAmount;\r\n }",
"public BigDecimal getCashoutAmount() {\r\n return cashoutAmount;\r\n }",
"public void setContestFee(double contestFee) {\r\n this.contestFee = contestFee;\r\n }",
"@Override\n\tpublic void collectCash(int cash) {\n\t\t\n\t}",
"public java.util.Set<java.lang.String> cashflowCurrencySet()\n\t{\n\t\tjava.util.Set<java.lang.String> setCcy = new java.util.HashSet<java.lang.String>();\n\n\t\tsetCcy.add (payCurrency());\n\n\t\tsetCcy.add (couponCurrency());\n\n\t\treturn setCcy;\n\t}",
"@Override\n\tpublic StructureTownHallConfigRecord setPvpQueueCashCost(Integer value) {\n\t\tsetValue(9, value);\n\t\treturn this;\n\t}",
"public double getCurrentCash() {\r\n return currentCash;\r\n }",
"@Override\n\tpublic TaskForUserOngoingRecord setCashGained(Integer value) {\n\t\tsetValue(4, value);\n\t\treturn this;\n\t}",
"void setContract(int contract) {\r\n\t\tif (contract == 24 || contract == 30 || contract == 36) {\r\n\t\t\tthis.contract = contract;\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic Collection getCashFlows() {\n\t\treturn null;\r\n\t}",
"public void setCumulativePrice(float cumulativePrice)\n\t{\n\t\tm_cumulativePrice = cumulativePrice;\n\t}",
"public void setCashoutAmount(BigDecimal cashoutAmount) {\r\n this.cashoutAmount = cashoutAmount;\r\n }",
"public void setFlowControl(FlowControl flowControl) throws FTD2XXException {\n ensureFTStatus(ftd2xx.FT_SetFlowControl(ftHandle, (short) flowControl.constant(), (byte) 0, (byte) 0));\n }",
"public void setInitilaCash(int noOfBills) throws java.lang.Exception;",
"public void setAppliedCashCredit(boolean value) {\r\n this.appliedCashCredit = value;\r\n }",
"public void setFeePerCreditHour(double feePerCreditHour) {\n this.feePerCreditHour = feePerCreditHour;\n }",
"Money getCashSettlementAmount();",
"public Money getAvailableCash(){\n\t\treturn availableCash;\n\t}",
"public void setFlowType(String flowType);",
"public void setCost(Money obj){\r\n \t//check if the object is null or not an instance of Money\r\n if(obj == null || !(obj instanceof Money)){\r\n \t//throw an exception\r\n throw new PizzaException(\"Exception in the setCost method: the object is null or not an instance of money\");\r\n }\r\n //casting\r\n Money m = (Money) obj;\r\n //set the cost to the clone of m\r\n this.cost = m.clone();\r\n }",
"public void setCadence(int newValue) {\n cadence = newValue;\n }",
"public int getFlowCost()\n\t{\n\t\tint result = 0;\n\t\t\n\t\tfor (Node v : this.getNodes())\n\t\t for (Edge e : v.getOutgoingEdges())\n\t\t\tresult += (e.getFlow() * e.getCost());\n\t\t\n\t\treturn result;\n\t}",
"public void setRefundedCredits(float val) {\n // ProtectBlock setRefundedCredits\n // ProtectBlock End\n this.refundedCredits = val;\n }",
"public void setCredit(int credit) {\n this.credit = credit;\n }",
"public void setEdgeFlow(double flow) throws Exception {\r\n\t\tif (this.capacity < flow || flow < 0)\r\n\t\t\tthrow new IndexOutOfBoundsException();\r\n\t\tthis.flow = flow;\r\n\t}",
"public void initTotalCash() {\n\t\ttotalCash.setValue(\"\");\n\t}",
"private void setFlow(Flow flow) throws IllegalArgumentException {\r\n\t\tAssert.hasText(getId(), \"The id of the state should be set before adding the state to a flow\");\r\n\t\tAssert.notNull(flow, \"The owning flow is required\");\r\n\t\tthis.flow = flow;\r\n\t\tflow.add(this);\r\n\t}",
"public void setCredit(BigDecimal credit) {\n this.credit = credit;\n }",
"public void setCost(int c) {\r\n this.cost = c;\r\n }",
"public void setAvailableCash(Money initialAmount){\n\t\tavailableCash = initialAmount;\n\t}",
"public void setTempCoolDown(int tempCoolDown) {\n this.tempCoolDown = tempCoolDown;\n }",
"public void setFinancial(JP430000.bssv.e1.oracle.ConfirmPurchaseOrderFinancialHeader financial) {\n this.financial = financial;\n }",
"protected void do_foodStampsFTF_propertyChange(PropertyChangeEvent arg0) {\n\t\tsetIncomeTotal();\n\t}",
"public void setCanceledServiceDelivery(CanceledServiceDelivery val) {\n // ProtectBlock setCanceledServiceDelivery\n \tfloat cancelCredits = 0.0f;\n \tfor(ServiceCreditPayment payment: val.getPaymentItems()){\n \t\tcancelCredits+=payment.getCredits();\n \t}\n \tthis.refundedCredits=cancelCredits;\n \tthis.canceledCountryCode=ShoppingCartUtility.getISO3CountryCode(val.getCountryCode());\n // ProtectBlock End\n this.canceledServiceDelivery = val;\n }",
"public Transaction(int memberInvovled, double cashFlow) {\n this.memberInvovled = memberInvovled;\n this.type = TransactionType.DISCOUNT;\n this.cashFlow = cashFlow;\n }",
"public void setCourseCredit(Float courseCredit) {\n this.courseCredit = courseCredit;\n }",
"@Column(name = \"pvp_queue_cash_cost\", precision = 10)\n\t@Override\n\tpublic Integer getPvpQueueCashCost() {\n\t\treturn (Integer) getValue(9);\n\t}",
"public BigDecimal getTotalCashPayment() {\n return totalCashPayment;\n }",
"public void setFECHAINICVAL(int value) {\n this.fechainicval = value;\n }",
"public double getContestFee() {\r\n return contestFee;\r\n }",
"protected void do_socialSecurityFTF_propertyChange(PropertyChangeEvent arg0) {\n\t\tsetIncomeTotal();\n\t}",
"public void setCalories(int c){\r\n \t//check if c is less than ot equal to 0\r\n if (c <= 0){\r\n \t//throw an exception\r\n throw new PizzaException(\"exception in the setCalories method: the calories are less than or equal to 0\");\r\n }\r\n //otherwise\r\n else{\r\n \t//calories is set to c\r\n this.calories = c;\r\n } \r\n }",
"public java.math.BigDecimal getCashOrCheckAmount() {\r\n return cashOrCheckAmount;\r\n }",
"@Override\n public void setTotalMoney(BigDecimal inputMoney) {\n totalMoney = inputMoney;\n }",
"public void setFee(int fee)\n {\n this.fee = fee;\n }",
"public Flow getFlow() {\r\n\t\treturn flow;\r\n\t}",
"public double getCash()\r\n/* */ {\r\n\t\t\t\tlogger.info(count++ + \" About to getCash : \" + \"Agent\");\r\n/* 219 */ return this.cash;\r\n/* */ }",
"public void setContentFlowno(long contentFlowno) {\n this.contentFlowno = contentFlowno;\n }",
"public void displayTotalCash(int tc) {\n\t\tString stc;\n\n\t\tstc = new String(tc + \" C\");\n\t\ttotalCash.setValue(stc);\n\t}",
"public void setBudget(BigDecimal budget) {\n this.budget = budget;\n }",
"public void setCreditHours(int creditHours) {\n this.creditHours = creditHours;\n }",
"public void setCum(String cum) {\n this.cum = cum == null ? null : cum.trim();\n }",
"public void setCumulative(boolean isCumulative) {\n\t\tthis.isCumulative = isCumulative;\n\t\tsettingChanged();\n\t}",
"public void setStock(int stock) {\n this.stock = stock;\n }",
"public void setStock(int stock) {\n this.stock = stock;\n }",
"public void setTotalCashPayment(BigDecimal totalCashPayment) {\n this.totalCashPayment = totalCashPayment;\n }",
"protected void do_disabilityFTF_propertyChange(PropertyChangeEvent arg0) {\n\t\tsetIncomeTotal();\n\t}",
"public int getFlow() {\r\n\r\n return flow;\r\n }",
"void changeCadence(int newValue);",
"@Override\n\tprotected void setCost(double cst) {\n\t\t\n\t}",
"protected void do_otherIncomeFTF_propertyChange(PropertyChangeEvent arg0) {\n\t\tsetIncomeTotal();\n\t}",
"@Autowired\n\tpublic void setCost(@Value(\"${repair.cost}\") int cost) {\n\t\tthis.cost = oneOrMore(cost);\n\t}",
"public void setFlowControl(FlowControl flowControl, byte uXon, byte uXoff) throws FTD2XXException {\n ensureFTStatus(ftd2xx.FT_SetFlowControl(ftHandle, (short) flowControl.constant(), uXon, uXoff));\n }",
"private void setTotalValueAndNet(){\n\t\tBigDecimal currentPrice = getCurrentPrice(); //getCurrentPrice() is synchronized already\n\t\tsynchronized(this){\n\t\t\t//If quantity == 0, then there's no total value or net\n\t\t\tif(quantityOfShares > 0){\n\t\t\t\ttotalValue = currentPrice.multiply(new BigDecimal(quantityOfShares));\n\t\t\t\tnet = totalValue.subtract(principle);\n\t\t\t}\n\t\t\telse{\n\t\t\t\ttotalValue = new BigDecimal(0);\n\t\t\t\tnet = new BigDecimal(0);\n\t\t\t}\n\t\t}\n\t}",
"public void setValorCalculo(ValoresCalculo valorCalculo)\r\n/* 93: */ {\r\n/* 94:111 */ this.valorCalculo = valorCalculo;\r\n/* 95: */ }",
"@Test()\n public void testSetBudgetPerMonth() {\n\tfloat budget = 3000;\n\texpenseManager.setBudgetPerMonth(budget);\n\tassertEquals(3000, expenseManager.getBudgetPerMonth(), 0);\n }",
"public void setFileFlow(String fileFlow) {\r\n\t\tthis.fileFlow = fileFlow;\r\n\t}",
"void setIncome(double amount);",
"public Transaction(int staff, int memberInvovled, int bookInvovled, double cashFlow) {\n this.type = TransactionType.RETURN;\n this.staffHandled = staff;\n this.memberInvovled = memberInvovled;\n this.bookInvovled = bookInvovled;\n this.cashFlow = cashFlow;\n }",
"public void setCumTime(double cumTime) {\n this.cumTime = cumTime;\n }",
"public void initCollectCash() {\n\t\tcollectCash.setValue(\"\");\n\t}",
"public void setCouponAmount(double couponAmount) {\n _couponAmount = couponAmount;\n }",
"protected void f_set(Long eID, int flowValue) {\n\t\tincreaseAccess(); // Zugriff auf den Graphen\n\t\tgraph.setValE(eID, flowAttr, flowValue);\n\t}",
"public void setActualCost(Number actualCost)\r\n {\r\n m_actualCost = actualCost;\r\n }",
"void setDiscount(float sconto);",
"public void setContractAmount(Integer contractAmount) {\n this.contractAmount = contractAmount;\n }",
"public Flow getFlow() {\n return flow;\n }",
"@IcalProperties({\n @IcalProperty(pindex = PropertyInfoIndex.COST,\n eventProperty = true,\n todoProperty = true,\n journalProperty = true),\n @IcalProperty(pindex = PropertyInfoIndex.XBEDEWORK_COST,\n eventProperty = true,\n todoProperty = true,\n journalProperty = true)}\n )\n public void setCost(final String val) {\n cost = val;\n }",
"public void setBet(double bet){\n\t\tthis.bet = bet;\n\t\ttotalMoney -= bet;\n\t}",
"public void setFactType(FactType factType) {\r\n\t\tthis.factType = factType;\r\n\t}",
"public void setStock(int stock) {\n\t\tthis.stock = stock;\n\t}",
"void setExpenses(double amount);",
"public void setCashNumber(String cashNumber) {\n this.cashNumber = cashNumber == null ? null : cashNumber.trim();\n }",
"public ReturnCash(){\n\t\t\n\t}"
] | [
"0.7141244",
"0.6486085",
"0.6435799",
"0.619927",
"0.60272133",
"0.58743876",
"0.5823982",
"0.5802413",
"0.57773626",
"0.56943583",
"0.5666696",
"0.5602399",
"0.5496126",
"0.54122174",
"0.5382785",
"0.5238757",
"0.51600975",
"0.514349",
"0.5119113",
"0.5096563",
"0.5083856",
"0.5075429",
"0.50572675",
"0.5047448",
"0.5045489",
"0.5043016",
"0.501556",
"0.49884436",
"0.49822143",
"0.49736574",
"0.49723467",
"0.49303457",
"0.492688",
"0.48769343",
"0.48664564",
"0.48596263",
"0.4816242",
"0.48126164",
"0.47927994",
"0.47902802",
"0.47870457",
"0.4780167",
"0.47778025",
"0.47678414",
"0.47664452",
"0.47659367",
"0.4751352",
"0.47353616",
"0.4734703",
"0.4716044",
"0.47092676",
"0.47041863",
"0.4700728",
"0.4697238",
"0.4697092",
"0.46874398",
"0.46862254",
"0.4671312",
"0.46712694",
"0.46676412",
"0.4657337",
"0.46336368",
"0.46330258",
"0.46328548",
"0.4626279",
"0.46236593",
"0.46228406",
"0.46192506",
"0.46140054",
"0.46055937",
"0.46055937",
"0.4598833",
"0.45950824",
"0.45835075",
"0.45800018",
"0.45750925",
"0.4572346",
"0.457194",
"0.45600376",
"0.45394373",
"0.45367327",
"0.453176",
"0.45290136",
"0.45231396",
"0.45220754",
"0.4517512",
"0.45160267",
"0.45106387",
"0.44982082",
"0.44964477",
"0.44885585",
"0.44834483",
"0.44830045",
"0.4477404",
"0.4474734",
"0.44728047",
"0.44703963",
"0.44684374",
"0.44530264",
"0.4450059"
] | 0.8082439 | 0 |
Getter for property cashFlowName. | public String getCashFlowName() {
return this.cashFlowName;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getCashFlow() {\n\n return this.cashFlow;\n }",
"public void setCashFlowName(String cashFlowName) {\n\n this.cashFlowName = cashFlowName;\n }",
"public String getDataFlowName() {\n return dataFlowName;\n }",
"@ApiModelProperty(value = \"Name of a flow\")\n public String getName() {\n return name;\n }",
"java.lang.String getCouponName();",
"java.lang.String getCouponName();",
"java.lang.String getCouponName();",
"public Key<CashFlow> getCashflow() {\n\t\treturn cashflow;\n\t}",
"String getPropertyName();",
"public String name() {\n return celestialName;\n }",
"public String getName()\n {\n ensureLoaded();\n return m_clzName.getValue();\n }",
"PropertyName getName();",
"public java.lang.String getCouponName() {\n java.lang.Object ref = couponName_;\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 couponName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getCouponName() {\n java.lang.Object ref = couponName_;\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 couponName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getCouponName() {\n java.lang.Object ref = couponName_;\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 couponName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"String getCruiseName();",
"String getStockName();",
"public String getStockName() {\r\n return stockName;\r\n }",
"public String getter() {\n\t\treturn name;\n\t}",
"public String getPropName() {\n return m_propName;\n }",
"public java.lang.String getCouponName() {\n java.lang.Object ref = couponName_;\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 couponName_ = s;\n return s;\n }\n }",
"public java.lang.String getCouponName() {\n java.lang.Object ref = couponName_;\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 couponName_ = s;\n return s;\n }\n }",
"public java.lang.String getCouponName() {\n java.lang.Object ref = couponName_;\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 couponName_ = s;\n return s;\n }\n }",
"@Override\n public String getBusinessName() {\n\n if(this.businessName == null){\n\n this.businessName = TestDatabase.getInstance().getClientField(token, id, \"businessName\");\n }\n\n return businessName;\n }",
"public String getStockName() {\n return stockName;\n }",
"public String getName() { return name.get(); }",
"@Override\n\t\t\tpublic String getName() {\n\t\t\t\treturn cf.getName();\n\t\t\t}",
"@Override\n\t\t\tpublic String getName() {\n\t\t\t\treturn cf.getName();\n\t\t\t}",
"public String getName() {\n return getProperty(Property.NAME);\n }",
"public String getPropertyName();",
"public DataItem getCborName() {\n\t\treturn DataItemHelper.cloneDataItem(this.cborName);\n\t}",
"public String getName() {\n return (this.name);\n }",
"public String getPropertyName()\n {\n return Integer.toString(getLowNbrParticipants());\n }",
"@JsonProperty(PROP_NAME)\n @Nonnull\n public String getName() {\n return _name;\n }",
"public String getName() {\n return name.get();\n }",
"public String getcName() {\n return cName;\n }",
"public String getContractorName() {\n return contractorName;\n }",
"public String getStockName() {\r\n\t\treturn stockName;\r\n\t}",
"public String getIsmtransitionCareflowstepName() {\n\t\treturn ismtransitionCareflowstepName;\n\t}",
"public String getCreditCardName() {\n return getCreditCardName(getCreditCardType());\n }",
"public String getCouseName() {\n return couseName;\n }",
"public String getName(){\n\n //returns the value of the name field\n return this.name;\n }",
"public String getName() {\n return (String) mProperties.get(FIELD_NAME);\n }",
"public String getName() {\n LOGGER.trace(\"Called the AccountCashBalance getName() with no parameters.\");\n\n LOGGER.trace(\"Leaving the AccountCashBalance getName().\");\n LOGGER.trace(RETURNING + NAME + \">\");\n\n return NAME;\n }",
"public String getName() {\r\n\t\treturn name.get();\r\n\t}",
"public String getName()\n {\n return (this.name);\n }",
"public String getStockName() {\n\t\treturn stockName;\n\t}",
"public String getDealName() {\n\t\treturn this.name;\n\t}",
"public java.lang.String getCUGNameProp()\n\t{\n\t\treturn CUGNameProp;\n\t}",
"String getCName() {\n return nameTF.getText();\n }",
"public String getCandyName() {\n\t\treturn candyName;\n\t}",
"public String name() {\n return getString(FhirPropertyNames.PROPERTY_NAME);\n }",
"public String getName() {\n return (String) getValue(NAME);\n }",
"public java.lang.String getName()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NAME$26);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getStringValue();\r\n }\r\n }",
"@Override\n\t\tfinal public String getName() {\n\t\t\treturn this.Name;\n\t\t}",
"public String getsName() {\n return sName;\n }",
"@Override\r\n\tpublic String getName() {\n\t\treturn this.name;\r\n\t}",
"public String getExpenseName() {\n if (categoryIdentifier == AppController.periodicCategoryIdentifier)\n expenseName = pExpenseNameEt.getText().toString();\n else expenseName = fExpenseNameEt.getText().toString();\n return expenseName;\n }",
"public String GetName() {\n\t\treturn this.name;\n\t}",
"@NotNull\n public String getName() {\n return name;\n }",
"@Override\n\tpublic String getValue() {\n\t\treturn name;\n\t}",
"public String getName() {\r\n return this.name;\r\n }",
"public String getName() {\r\n return this.name;\r\n }",
"public String getName() {\r\n return this.name;\r\n }",
"public String getName() {\r\n return this.name;\r\n }",
"@Override\n\tpublic String getName() {\n\t\treturn this.name;\n\t}",
"@Override\n\tpublic String getName() {\n\t\treturn this.name;\n\t}",
"public String getName() {\r\n return this.name;\r\n }",
"public String getName() {\r\n return this.name;\r\n }",
"public java.lang.String getName()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NAME$6);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getStringValue();\r\n }\r\n }",
"String getName() {\r\n\t\t\treturn this.name;\r\n\t\t}",
"String getName() {\n return this.name;\n }",
"public String getPropertyName() {\n return this.propertyName;\n }",
"String getName() {\n return this.name;\n }",
"public final String getName() {\n return this.name;\n }",
"public String getName() {\r\n return _name;\r\n }",
"@Override\n public String getName() {\n return this.name;\n }",
"public String getName() {\r\n assert name != null;\r\n return name;\r\n }",
"public String getPlayerName() {\n return props.getProperty(\"name\");\n }",
"@Override\n\tpublic String get_name() {\n\t\treturn name;\n\t}",
"public String getPropertyName()\n {\n return propertyName;\n }",
"public com.google.protobuf.ByteString\n getCouponNameBytes() {\n java.lang.Object ref = couponName_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n couponName_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public com.google.protobuf.ByteString\n getCouponNameBytes() {\n java.lang.Object ref = couponName_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n couponName_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public com.google.protobuf.ByteString\n getCouponNameBytes() {\n java.lang.Object ref = couponName_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n couponName_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"java.lang.String getBusinessName();",
"public String getName() \n {\n return m_sName;\n }",
"String getName() {\n return name;\n }",
"public String getName()\r\n {\r\n return (m_name);\r\n }",
"public String getName() {\n return this.name;\n }",
"public String getName() {\n return this.name;\n }",
"public String getName() {\n return this.name;\n }",
"public String getName() {\n return this.name;\n }",
"public String getName() {\n return this.name;\n }",
"public String getName() {\n return this.name;\n }",
"public String getName() {\n return this.name;\n }",
"public String getName() {\n return this.name;\n }",
"@Override\n\tpublic String getName() {\n\t\treturn this.name;\n\t\t\n\t}",
"public String getName()\n {\n return _name;\n }",
"@Override\n\t\t\tpublic String getName() {\n\t\t\t\treturn name;\n\t\t\t}",
"@Override\n public String name() {\n return this._name;\n }"
] | [
"0.68875253",
"0.67407",
"0.6303198",
"0.624807",
"0.61922854",
"0.61922854",
"0.61922854",
"0.60622907",
"0.60017425",
"0.5919747",
"0.59118724",
"0.5898836",
"0.58798295",
"0.58798295",
"0.58798295",
"0.5876097",
"0.5871979",
"0.5864156",
"0.5823735",
"0.5822907",
"0.58202124",
"0.58202124",
"0.58202124",
"0.58027124",
"0.580018",
"0.5796848",
"0.57921666",
"0.57921666",
"0.5791999",
"0.57820284",
"0.57731336",
"0.57524323",
"0.57355475",
"0.573539",
"0.5727225",
"0.57238007",
"0.57182884",
"0.5717919",
"0.5710453",
"0.5702445",
"0.5699401",
"0.56960446",
"0.5688562",
"0.56835496",
"0.5671748",
"0.5662213",
"0.56621623",
"0.5658603",
"0.5652931",
"0.5650361",
"0.56442463",
"0.5625313",
"0.56148547",
"0.56067073",
"0.5606674",
"0.5606341",
"0.5601601",
"0.5598907",
"0.5596203",
"0.55953544",
"0.55907136",
"0.55867094",
"0.55867094",
"0.55867094",
"0.55856407",
"0.5576919",
"0.5576919",
"0.5576564",
"0.5576564",
"0.55742615",
"0.5569229",
"0.55691355",
"0.5567821",
"0.556762",
"0.55656505",
"0.55653816",
"0.55525565",
"0.5551599",
"0.55505514",
"0.55500895",
"0.5549738",
"0.5548332",
"0.5548332",
"0.5548332",
"0.554589",
"0.5545109",
"0.55448526",
"0.55442744",
"0.55388373",
"0.55388373",
"0.55388373",
"0.55388373",
"0.55388373",
"0.55388373",
"0.55388373",
"0.55388373",
"0.5536662",
"0.5535781",
"0.55312496",
"0.55293787"
] | 0.8657986 | 0 |
Setter for property cashFlowName. | public void setCashFlowName(String cashFlowName) {
this.cashFlowName = cashFlowName;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getCashFlowName() {\n\n return this.cashFlowName;\n }",
"public void setCashFlow(String cashFlow) {\n\n this.cashFlow = cashFlow;\n }",
"@ApiModelProperty(value = \"Name of a flow\")\n public String getName() {\n return name;\n }",
"@IcalProperty(pindex = PropertyInfoIndex.NAME,\n required = true,\n eventProperty = true,\n todoProperty = true,\n journalProperty = true)\n public void setName(final String val) {\n name = val;\n }",
"@Override\n public void setName(String name)\n {\n checkState();\n this.name = name;\n }",
"public void setName(String name)\n {\n fName = name;\n }",
"@Override\r\n\tpublic void setName(String name) {\n\t\tthis.name = name;\r\n\t}",
"public void setName(String value) {\n this.name = value;\n }",
"@Override\n public void setName(String name) {\n this.name = name;\n }",
"@Override\n public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\r\n String oldValue = this.name;\r\n this.name = name;\r\n propertyChangeSupport.firePropertyChange(PROPERTY_NAME, oldValue, name);\r\n }",
"public void setName(java.lang.String value) {\n this.name = value;\n }",
"public void setCName(String aValue) {\n String oldValue = cName;\n cName = aValue;\n changeSupport.firePropertyChange(\"cName\", oldValue, aValue);\n }",
"@Override\n\tpublic void setName(String name) {\n\t\tthis.name = name;\n\t}",
"@Override\n\tpublic void setName(String name) {\n\t\tthis.name = name;\n\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 }",
"public void setName(String name) {\r\n this._name = name;\r\n }",
"public void setName(String name) {\n\t\tm_name = (name != null) ? name : \"\";\n\t}",
"public void setName(String name) {\r\n\t\t_name = name;\r\n\t}",
"public void setName(final String name) {\n mName = name;\n }",
"public void setName(final String name) {\r\n\t\tthis.name = name;\r\n\t}",
"public void setName(final String name) {\r\n\t\tthis.name = name;\r\n\t}",
"@VTID(18)\n void setName(\n java.lang.String rhs);",
"public void setName(final String name) {\n this.name = name;\n }",
"public void setName(final String name) {\n this.name = name;\n }",
"public void setName(final String name) {\n this.name = name;\n }",
"public void setName(final String name) {\n this.name = name;\n }",
"public void setName(final String name) {\n this.name = name;\n }",
"public void setName(final String name) {\n this.name = name;\n }",
"public void setName (String name) {\n this.name = name;\n }",
"public void setName (String name) {\n this.name = name;\n }",
"public void setName (String name) {\n this.name = name;\n }",
"public void setName(String name) {\n fName= name;\n }",
"public void setName(String name) {\n m_Name = name;\n }",
"public void setName(final String nameValue) {\n this.name = nameValue;\n }",
"public void setName(final String nameValue) {\n this.name = nameValue;\n }",
"public void setName(final String nameValue) {\n this.name = nameValue;\n }",
"public void setName(String name) {\n\t this.name = name;\n\t }",
"public void setName(String name) {\n _name = name;\n }",
"public void setName(String name) {\n \tif (name==null)\n \t\tthis.name = \"\";\n \telse\n \t\tthis.name = name;\n\t}",
"public void setName(String n) {\r\n name = n;\r\n }",
"public void setName (String name) {\r\n\t\tthis.name = name;\r\n\t}",
"public void setName (String n) {\n name = n;\n }",
"public void setName(String name) {\n\t\tmName = name;\n\t}",
"public void setName(final String name) {\n\t\tthis.name = name;\n\t}",
"public void setName(final String name) {\n\t\tthis.name = name;\n\t}",
"public void setName(final String name) {\n\t\tthis.name = name;\n\t}",
"public void setName(final String name) {\n\t\tthis.name = name;\n\t}",
"public void setCustomName ( String name ) {\n\t\texecute ( handle -> handle.setCustomName ( name ) );\n\t}",
"public void setName(final String nameValue) {\n this.name = nameValue;\n }",
"public void setName(final String nameValue) {\n this.name = nameValue;\n }",
"public void setName(final String nameValue) {\n this.name = nameValue;\n }",
"public void setName(String name) {\r\r\n\t\tthis.name = name;\r\r\n\t}",
"public void setName(java.lang.CharSequence value) {\n this.name = value;\n }",
"public void setName(String name){\n\t\tthis.tournamentName = name;\n\t}",
"public void setName(java.lang.String name)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NAME$26);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(NAME$26);\r\n }\r\n target.setStringValue(name);\r\n }\r\n }",
"public void setName(String value) {\n\t\tname = value;\n\t}",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String _name) {\n this._name = _name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName (String name) {\n this.name = name;\n }",
"public void setName( final String name )\r\n {\r\n this.name = name;\r\n }",
"public void setName(String name)\r\n {\r\n m_name = name;\r\n }",
"public void setName(String name) {\n this.mName = name;\n }",
"public void setName(String name)\n {\n this.name = name;\n }",
"public void setName(String name){\r\n\t\tthis.name = name;\r\n\t}",
"public void setName(String name){\r\n\t\tthis.name = name;\r\n\t}",
"public void setName(String name){\r\n\t\tthis.name = name;\r\n\t}",
"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}"
] | [
"0.7467573",
"0.6493708",
"0.595069",
"0.58585316",
"0.57579255",
"0.5729292",
"0.5667277",
"0.56639713",
"0.5660544",
"0.5660544",
"0.56512827",
"0.56478596",
"0.5640714",
"0.5633179",
"0.5622476",
"0.5610788",
"0.5610788",
"0.5610131",
"0.5605454",
"0.5604856",
"0.5603163",
"0.5594271",
"0.5594271",
"0.55924314",
"0.5584133",
"0.5584133",
"0.5584133",
"0.5584133",
"0.55813503",
"0.55813503",
"0.55807334",
"0.55807334",
"0.55807334",
"0.55782205",
"0.55717003",
"0.5570271",
"0.5570271",
"0.5570271",
"0.55636024",
"0.55629843",
"0.555307",
"0.5552178",
"0.5552103",
"0.55447227",
"0.5544309",
"0.5540952",
"0.5540952",
"0.5540952",
"0.5540952",
"0.55406797",
"0.5537818",
"0.5537818",
"0.5537818",
"0.5533437",
"0.55288833",
"0.5528727",
"0.55267346",
"0.55264956",
"0.552435",
"0.55239844",
"0.55239844",
"0.55239844",
"0.55239105",
"0.5523544",
"0.5523544",
"0.5523544",
"0.5523544",
"0.5522428",
"0.5520954",
"0.5519759",
"0.55194694",
"0.55134743",
"0.5509793",
"0.5509793",
"0.5509793",
"0.55041075",
"0.55041075",
"0.55041075",
"0.55041075",
"0.55041075",
"0.55041075",
"0.55041075",
"0.55041075",
"0.55041075",
"0.55041075",
"0.55041075",
"0.55041075",
"0.55041075",
"0.55041075",
"0.55041075",
"0.55041075",
"0.55041075",
"0.55041075",
"0.55041075",
"0.55041075",
"0.55041075",
"0.55041075",
"0.55041075",
"0.55041075",
"0.55041075"
] | 0.78944373 | 0 |
private UserService userService; private User user; | @Autowired
public void setPostService(PostService postService) {
this.postService = postService;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface UserService {\n}",
"public interface UserService {\n}",
"public interface UserService\n{\n}",
"public interface UserService {\n\n User getUser(Long id);\n}",
"public interface UserService {\r\n\r\n User getUserById(Long id);\r\n User getUserNyName(String name);\r\n void saveUser(User user);\r\n}",
"public interface UserService {\n\n User get(String email);\n void update(User user);\n void create(User user);\n}",
"@Service\r\npublic interface UserService {\r\n\r\n int addUser(User user);\r\n}",
"public interface UserService extends UserDetailsService {\n\n\n\n}",
"public UserService() {\n }",
"public interface UserService {\n\n User getUserByPassword(User user);\n\n User getByUserName(String user_name);\n\n void save(User user);\n\n User getUserById(int user_id);\n\n int getCount();\n\n User getByEmail(String email);\n\n void update(User user);\n}",
"public interface UserService {\n long addUser(User user);\n User getUserById(int id);\n long updateUserById(User user);\n}",
"public interface UserService extends UserDetailsService {\n User findUserByLogin(String login);\n\n User findUserById(Long id);\n\n void registerUser(User newUser);\n}",
"public interface UserService {\n User findUserById(int id);\n User selectByName(String username);\n User selectByEmail(String email);\n int insrtUser(User user);\n int insertStatus(int id,int status);\n int insertHeader(int id,String headerUrl);\n int insertPassword(int id,String password);\n}",
"public interface UserService\n{\n /*对用户进行增删改查*/\n User login(String loginname, String password);\n User findUserById(Integer id);\n List<User> findUser(User user, PageModel pageModel);\n void removeUserById(Integer id);\n void modifyUser(User user);\n void addUser(User user);\n\n}",
"public interface UserService {\n\n\tpublic User create(User user);\n\t\n\tpublic Boolean findUser(String username, String password);\n\n\tpublic User findByID(String userId);\n\n}",
"public interface UserService extends UserDetailsService {\n /**\n * Retrieves an user by its id.\n *\n * @param id cannot be null\n * @return\n */\n Optional<User> findUserById(Long id);\n\n /**\n * Retrieves an user by its username.\n *\n * @param username cannot be null\n * @return\n */\n Optional<User> findUserByUsername(String username);\n\n /**\n * Saves a given entity. Use the returned instance for further operations as the save operation might have changed the entity instance completely.\n *\n * @param user user\n * @return the saved user; will never be null.\n * @throws IllegalArgumentException in case the given advertisement is null.\n */\n User save(User user);\n\n /**\n * Return list of all users int the system.\n *\n * @return List of all users in the system\n */\n List<User> findAll();\n\n /**\n * Deletes a given user.\n *\n * @param user cannot be null\n */\n void delete(User user);\n\n /**\n * Deletes a given user.\n *\n * @param id cannot be null\n */\n void deleteById(Long id);\n}",
"public interface UserService{\n//public interface UserService extends UserDetailsService {\n\n public User getUserByName(String userName);\n\n public int saveUser(String username, String password, String role);\n}",
"public interface UserService {\n\n boolean authenticate(String name, String password); // Authenticates user login\n\n boolean addUser(UserModel user); // Adds a new user to the database\n\n UserModel findByName(String name); // Finds a user by name\n\n}",
"public User getUser(){return this.user;}",
"public interface UserService extends Service<User> {\n\n}",
"public interface UserService extends Service<User> {\n\n}",
"public interface UserService extends Service<User> {\n\n}",
"public UserService getUserService() {\n return userService;\n }",
"public interface UserService {\n\n\t/**\n\t * Finds a user by email\n\t * \n\t * @param email\n\t * @return\n\t */\n\tUser find(String email);\n\n\t/**\n\t * Finds a user by email\n\t * \n\t * @param email\n\t * @return\n\t */\n\tList<User> addUsersToShowableList(UserListRequest userListRequest);\n\t\n\t/**\n\t * Finds a user by its id\n\t * \n\t * @param id\n\t * @return\n\t */\n\tUser find(long id);\n\n\t/**\n\t * \n\t * @param user\n\t */\n\tvoid save(User user, String token);\n\n\t/**\n\t * \n\t * @param user\n\t */\n\tvoid register(User user, String urlBase);\n\n\t/**\n\t * Load the number of user offering services\n\t * @return\n\t */\n\tInteger loadUserCount();\n\n\t/**\n\t * Validate if email already exists\n\t * @param email\n\t * \t\tThe email to validate\n\t */\n\tvoid validate(String email);\n\n\t/**\n\t * Send a activation email to user who register\n\t * @param email\n\t * @param activationLink\n\t * @param activationKey\n\t * @throws MailServicesErrorException\n\t */\n\tvoid sendActivationLinkEmail(User user, String activationLink, String activationKey)\n\t\t\tthrows MailServicesErrorException;\n\n\t/**\n\t * Activate an user that comes from email activation link\n\t * @param email\n\t * @param activationToken\n\t */\n\tvoid activateUser(String email, String activationToken);\n\n\t/**\n\t * Ends the user session by deleting its security access token\n\t * @param userTokenTokenContent\n\t * \t\tContent of user token to delete\n\t */\n\tvoid logout(String userTokenTokenContent);\n\n\t/**\n\t * filter users by specific request filter\n\t * @param request\n\t * @return\n\t */\n\tUserFilterResult find(UserFilterRequest request);\n}",
"public interface UserService {\n\n SysUser getUser(String username);\n\n BootstrapTable list(SearchVo search);\n\n ResultVo saveOrUpdate(SysUser user, BigDecimal roleId);\n\n SysUser getUserById(BigDecimal id);\n\n ResultVo delete(BigDecimal id);\n}",
"public interface UserService{\n /**\n * Method to add user to the repository\n * @param userModel {@link AddUserModel} Details of the user to be added\n * @return {@link UserModel}\n * @throws BadRequestException Thrown when userName is null or empty\n */\n\tpublic UserModel addUser(AddUserModel userModel) throws BadRequestException;\n\t\n /**\n * Method to delete user from the repository\n * @param id Id of the user to be deleted\n * @throws BadRequestException Thrown when id is null or non-integer value\n */\n\tpublic void deleteUser(Integer id) throws BadRequestException;\n\t\n /**\n * Method to view details of a particular user\n * @param id of the user to be viewed\n * @return {@link UserModel} contains all the details of user \n * @throws BadRequestException Thrown when id is null or non-integer value\n */\n\tpublic UserModel viewUser(Integer id) throws BadRequestException;\n\t\n /**\n * Method to retrieve all the users from the repository\n * @return List of {@link UserModel}\n */\n\tpublic List<UserModel> viewAll();\n\t\n /**\n * Method to update the details of the user\n * @param userId Id of the user to be updated\n * @param user {@link UserModel} Details to be updated\n * @return {@link UserModel}\n * @throws BadRequestException Thrown when id is null or non-integer value\n */\n\tpublic UserModel updateUser(Integer userId,UserModel user) throws BadRequestException;\n\t\n\t/**\n\t * Method to add new user and update existing user\n\t * @param user Details of the user fetched from session\n\t * @return Id of the user who is added/updated\n\t */\n\tpublic Integer addOrUpdate(LoginResponse user);\n}",
"public interface UserService {\n public User getUserById(int userId);\n public User selectUserByUsername(String username);\n}",
"public interface UserService{\r\n \r\n\t/**\r\n\t * Creates the user\r\n\t * \r\n\t * @param dto\r\n\t * UserModel\r\n\t * @return User If user account exists\r\n\t * @throws UserExistsException\r\n\t * if user account doesn't exists\r\n\t */\r\n\tUser createUser(UserModel dto) throws UserExistsException;\r\n\r\n\t/**\r\n\t * Returns the User by user name.\r\n\t * \r\n\t * @param username\r\n\t * String\r\n\t */\r\n\tUser getUserByUsername(String username);\r\n\r\n\t/**\r\n\t * Changes the password.\r\n\t * \r\n\t * @param user\r\n\t * ChangePasswordModel\r\n\t * @param token\r\n\t * String\r\n\t * @return Returns true if the password change succeeded otherwise false\r\n\t * @throws InvalidTokenException\r\n\t */\r\n\tBoolean changePassword(ChangePasswordModel user, String token) throws InvalidTokenException;\r\n\r\n\t/**\r\n\t * Saves the login info to the repository.\r\n\t * \r\n\t * @param login\r\n\t * UserLogin\r\n\t * @return UserLogin\r\n\t */\r\n\tUserLogin recordLogin(UserLogin login);\r\n\r\n\t/**\r\n\t * Verifies the account is locked or not.\r\n\t * \r\n\t * @param username\r\n\t * String\r\n\t * @return Boolean\r\n\t */\r\n\tBoolean isAccountLocked(String username);\r\n\r\n\t/**\r\n\t * Saves the user, password and ContactOptIn.\r\n\t * \r\n\t * @param user User\r\n\t * @return User\r\n\t */\r\n\tUser saveUser(User user);\r\n\r\n\t/**\r\n\t * Creates the password reset token\r\n\t * \r\n\t * @param username\r\n\t * String\r\n\t * @return String Password reset token\r\n\t * @throws UserNotFoundException\r\n\t */\r\n\tString createPasswordResetToken(String username) throws UserNotFoundException;\r\n\r\n\t/**\r\n\t * Returns the Authorities based on user.\r\n\t * \r\n\t * @param user User\r\n\t * @return Authority information\r\n\t */\r\n\tSet<Authority> getAuthorities(User user);\r\n\r\n\t/**\r\n\t * Changes the password.\r\n\t * \r\n\t * @param user\r\n\t * UserModel\r\n\t * @return Boolean\r\n\t * \r\n\t * @throws UserNotFoundException\r\n\t */\r\n\tBoolean changePassword(UserModel user) throws UserNotFoundException;\r\n\r\n}",
"public interface UserService {\n\n /**\n * Добавление нового пользователя в БД\n * @param user User\n * @return User\n */\n User add(User user);\n\n /**\n * Поиск пользователя по email\n * @param email String\n * @return User\n */\n User find(String email);\n\n /**\n * Изменения данных пользователя\n * @param user User\n */\n void update(User user);\n}",
"public interface UserService {\n\n User findUserById(Integer id);\n\n void insertUser(User user);\n\n void invest(Invest invest);\n}",
"public interface UserService extends UserDetailsService{\n\n\t/**\n\t * save method is used save record in user table\n\t * \n\t * @param userEntity.\n\t * @return UserEntity\n\t */\n public UserEntity save(UserEntity userEntity); \n\t\n /**\n * getByName method is used to retrieve userId from userName. \n * \n * @param userName\n * @return UUID\n */\n public UserQueryEntity getByName(String userName);\n \n}",
"public interface UserService {\n public void add(User user);\n public void remove(Integer id);\n}",
"public interface UserService {\n\n void register(UserEntity userEntity);\n UserEntity findByUsername(String username);\n UserEntity findByEmail(String email);\n void editMyAccount(UserEntity newUserEntity, Principal principal);\n void editUser(UserEntity newUserEntity);\n void deleteMyAccount(String password, Principal principal);\n void deleteUser(String username, Principal principal);\n List<UserEntity> getAllUsers();\n String getRoleOfLoggedUser();\n boolean checkIfPasswordMatchWithLoggedUserPassword(String password);\n}",
"public interface UserService {\n\n public User save(String username, String password);\n}",
"public interface UserService {\n\n public User get(String username);\n\n public User save(User user);\n\n public void saveHost(String host, String name);\n\n public String getName(String host);\n}",
"public interface IUserService {\n}",
"public interface UserService {\n\n int createUser(String email, String password, UserRole userRole);\n\n User getUserById(int userId);\n\n User getUserByEmail(String email);\n\n boolean deleteUserById(int userId);\n}",
"public interface UserService {\n\n User queryUserById(long id);\n\n User create(User user);\n\n int update(User user);\n\n int deleteById(long id);\n}",
"public interface UserService {\n\n\tpublic void save(UserEntity userEntity);\n\n\tpublic void saveBatch(HashMap<String, Object> map);\n\n\tpublic void delete(UserEntity userEntity);\n\n\tpublic void update(UserEntity userEntity);\n\n\tpublic void updatePic(UserEntity userEntity);\n\t\n\tpublic void updateRole(UserEntity userEntity);\n\n\tpublic List<UserEntity> findList(UserEntity userEntity);\n\n\t/* find user information to display */\n\tpublic List<UserParam> findUesrDetailInfo(UserEntity userEntity);\n\n\t/* find user information by name */\n\tpublic List<UserParam> findListForManagement(UserEntity userEntity);\n}",
"public interface UserService {\n\n public User selectUser(long userId);\n}",
"public interface UserService {\r\n\t\r\n\tpublic UserProfileTo readUser(Long id);\r\n\r\n\tpublic UserProfileTo createUser(String login, String password, String email);\r\n}",
"public interface UserService {\n\n User getById(int id);\n\n User login(User user);\n\n List<User> getByParam(String param,Object value);\n\n List<User> getPageByMap(Map<String,Object> map, int pageIndex, int pageSize);\n\n List<User> getListByMap(Map<String,Object> map);\n\n void addUser(User user);\n\n boolean isExsit(User user);\n\n void logout(User user);\n\n void update (User user);\n\n void delete(int id);\n}",
"public interface UserService {\n User createUser(User user);\n\n User findByNameAndPsw(String username, String password);\n\n User findByName(String username);\n}",
"public interface UserService {\r\n\r\n\t/**\r\n\t * Loads {@link User} specified by ID\r\n\t * @param id of user\r\n\t * @return {@link User} instance\r\n\t * @throws RuntimeException if user does not exist\r\n\t */\r\n\tUser loadUserById(Integer id);\r\n\r\n\t/**\r\n\t * Loads {@link User} specified by username\r\n\t * @param username of user\r\n\t * @return {@link User} instance\r\n\t * @throws RuntimeException if user does not exist or permission is denied\r\n\t */\r\n\tUser loadUserByUsername(String username);\r\n\r\n\t/**\r\n\t * Creates new user \r\n\t * @param userBuilder used to define user properties\r\n\t * @param notify determines whether notification email should be send\r\n\t * @return newly created {@link User}\r\n\t * @throws RuntimeException if user does not exist or permission is denied\r\n\t */\r\n\tUser createUser(UserBuilder userBuilder, boolean notify);\r\n\r\n\t/**\r\n\t * Updates user specified by ID and version\r\n\t * @param id of the user to update\r\n\t * @param version of the user to update\r\n\t * @param userBuilder used to define user properties to be updated\r\n\t * @throws RuntimeException if user does not exist or permission is denied \r\n\t */\r\n\tvoid updateUser(Integer id, Long version, UserBuilder userBuilder);\r\n\r\n\t/**\r\n\t * Deletes the user\r\n\t * @param id of the user to delete\r\n\t * @throws RuntimeException if user does not exist or permission is denied\r\n\t */\r\n\tvoid deleteUser(Integer id);\r\n\r\n\t/**\r\n\t * Updates user-domain association\r\n\t * @param userId of the user\r\n\t * @param domainId of the domain\r\n\t * @param roles {@link UserRole} to set.\r\n\t * @throws RuntimeException if user does not exist, domain does not exist or permission is denied\r\n\t */\r\n\tvoid updateDomainAssociation(Integer userId, Integer domainId, UserRole... roles);\r\n\r\n\t/**\r\n\t * Updates user-user group association\r\n\t * @param userId of the user\r\n\t * @param userGroups id's of the groups\r\n\t * @throws RuntimeException if user does not exist, user groups do not exist or permission is denied\r\n\t */\r\n\tvoid updateUserGroupAssociation(Integer userId, Integer... userGroups);\r\n\r\n\t/**\r\n\t * Creates an user request of desired type.\r\n\t * @param username username of the user the request is created for.\r\n\t * @param type Specifies the type of the request. Available types are: LOGIN_UNATTENDED, PASSWORD_SET, PASSWORD_RESET, UNLOCK_ACCOUNT, LOGIN\r\n\t * @return request_id and request_code of the created request. Example: 1544;RDQX1Qx9UokSf4n3KAVWgNClvrFUqncSZg7fK3gnVAfNIAOylN\r\n\t * @throws RuntimeException if user does not exist or permission is denied\r\n\t */\r\n\tString createUserRequest(String username, UserRequestType type);\r\n\r\n}",
"public interface UserService {\n\n /**\n * This method will return all users saved in DB.\n *\n * @return the users collection\n */\n Collection<GetUserDto> getAllUsers();\n\n /**\n * This method will return the user with the given id.\n *\n * @param id the user id.\n * @return the dto fo the user\n */\n UpdateUserDto getUserWithId(int id);\n\n /**\n * This method will create a new user.\n *\n * @param createUserDto the user to create.\n */\n void createUser(CreateUserDto createUserDto);\n\n /**\n * This method will update the given user.\n *\n * @param id the user id\n * @param updateUserDto the user's data to update\n */\n void updateUser(int id, UpdateUserDto updateUserDto);\n\n /**\n * this method will delete the user identified by the given id.\n *\n * @param id the id of the user to delete\n */\n void deleteUser(int id);\n\n}",
"public interface UserService {\n\n User getUserById(Integer userId);\n int insertNewUser(User user);\n}",
"public interface UserService {\n boolean checkCredentials(String login, String password);\n User add(String login, String password);\n}",
"public interface UserService {\n void resetCredentials();\n\n User findById(Long id);\n\n User findByUsername(String username);\n\n List<User> findAll();\n\n User save(UserRequest user);\n}",
"public interface UserService {\n\n public User getOneByAccount(String account);\n\n public boolean existsById(String account);\n\n public List<User> findAll();\n\n String getNickname(String account);\n\n Map<String, String> getNicknames(List<String> accounts);\n\n PageInfo getUserByPage();\n\n PageInfo getUserByConditionWithPage(User condition);\n\n List<String> getAccount(String nickname);\n\n public List<User> findAllById(String id);\n\n boolean changeState(String state, List<String> accounts);\n\n public long count();\n\n public boolean deleteByAccount(String account);\n\n public boolean delete(User user);\n\n public boolean deleteAll();\n\n public boolean deleteInBatch(List<User> users);\n\n public boolean save(User user);\n\n public List<UserDrop> getUserDrop();\n\n public List<User4Org> getUnassignedUsers(List<User4Org> exclude);\n\n public int login(User user);\n}",
"public interface UserService {\n\n\n User checkUser(String username,String password);\n\n User checkUserByName(String username);\n\n User getUser(Long id);\n\n User saveUser(User user);\n\n User updateUserById(Long id, User user);\n\n Page<User> listUser(Pageable pageable);\n\n void deleteUser(Long id);\n\n}",
"public interface UserService {\n\n /**\n * <p>\n * This Method is used to add a new User.\n * </p>\n *\n * @param user a User object with the email and password to be added.\n *\n * @return boolean a boolean value indicating the successful addition of\n * a new User.\n *\n * @throws ApplicationException A Custom Exception created for catching\n * exceptions that occur while retrieving an\n * user.\n */\n public Boolean addUser(User user) throws ApplicationException;\n\n /**\n * <p>\n * This Method is used to search a User Entry and return the User\n * object. It returns null if no match is found.\n * </p>\n *\n * @param email a String indicating the email of the user that is\n * to be searched an returned.\n *\n * @return user an User object is returned if a valid match is\n * found, else returns null.\n *\n * @throws ApplicationException A Custom Exception created for catching\n * exceptions that occur while retrieving an\n * user.\n */\n public User retrieveUserByEmail(String email) throws ApplicationException;\n\n}",
"@Service\npublic interface UserService {\n\n void userRegister(String username, String password);\n\n String userLogin(String username, String password);\n\n User findUserByUserName(String userName);\n\n boolean insertThirdPartUserInfo(String username, String imageUrl, String thirdPart);\n\n boolean isExistLocalUserName(String username);\n}",
"public interface UserService {\n\n User findUserbyEmailandPassword(String email, String password);\n\n public User save(User user);\n}",
"public interface UserService {\n List<User> findAllUsers();\n\n AuthorizedUser saveUser(User user);\n}",
"public interface UserService {\n\n /**\n * Create new user with registration\n */\n boolean registerUser(UserRegisterDTO userRegisterDTO);\n\n /**\n * Update user information\n */\n void updateUser(UserUpdateDto userUpdateDto, Long id) throws TimeTrackerException;\n\n /**\n * Get user information\n */\n Optional<User> userByIdSearch(Long id);\n\n /**\n * Get all users\n */\n Iterable<User> usersFind();\n\n /**\n * Add new user by administrator\n */\n void userAddByAdmin(AdminUserAddDTO adminUserAddDTO) throws RecordExistException;\n\n /**\n * Delete existing user by administrator\n */\n void deleteUserById(Long id);\n\n /**\n * Change existing user by administrator\n */\n void userChangeByAdmin(AdminUserDTO adminUserDTO) throws RecordExistException;\n}",
"public interface UserService {\n\n User save(User user);\n\n List<User> list();\n}",
"public interface UserService{\n\n public UserAccount saveUser(UserAccount userAccount) throws UserNotExist;\n public UserAccount updateUser(UpdateDto updateDto) throws UserNotExist;\n public void deleteUser(DeleteDto deleteDto);\n\n public UserAccount findByEmail(String email);\n public UserAccount findByConfirmationToken(String confirmationToken);\n\n\n// public void logout();\n public void resendMail(ResendEmailDto resendEmailDto);\n public void resetPassword(UserAccount userAccount, HttpServletRequest request);\n}",
"public interface UserService {\n\n void insertUser(UserDto userDto);\n List<UserDto> getAllUsers();\n UserDto login(String phone, String password);\n\n}",
"public interface UserService {\n\n User findUserByLoginName(String loginName);\n\n}",
"public interface UserService {\n List<User> findAll();\n\n LoginUser findByUserId(Long userId);\n\n User findDepartLeader(Long departId);\n\n User getById(Long id);\n\n List<UserVo> findVoAll();\n\n void bindUserPro(Long userId, String proCode);\n\n List<UserProVo> findUserProList();\n\n void delUserPro(Long id);\n}",
"public interface UserService {\n\n public boolean register(User user);\n\n public boolean updatePassword(Integer userId, String userPassword);\n\n public boolean getUserInfo(Integer userId);\n\n}",
"public interface UserService {\n\n\t/**\n\t * This method is used to create a worker into the system.\n\t * \n\t * @author umamaheswarar\n\t * @param createEmployeeDTO\n\t * worker related information to create the worker\n\t * @return createEmployeeDTO worker information after creating the worker\n\t * into the system.\n\t * @throws ApplicationCustomException\n\t */\n\tpublic EmployeeDTO createEmployee(final EmployeeDTO createEmployeeDTO) throws ApplicationCustomException;\n\n\t/**\n\t * This method is used to update a worker into the system.\n\t * \n\t * @author umamaheswarar\n\t * @param createEmployeeDTO\n\t * worker related information to create the worker\n\t * @return createEmployeeDTO worker information after creating the worker\n\t * into the system.\n\t * @throws ApplicationCustomException\n\t */\n\tpublic EmployeeDTO updateEmployee(final EmployeeDTO createEmployeeDTO) throws ApplicationCustomException;\n\n\t/**\n\t * This method is used to get the user from system.\n\t * \n\t * @author umamaheswarar\n\t * @param username\n\t * username of the logged in user.\n\t * @return UserDTO user details.\n\t */\n\tpublic UserDTO getUserDetails(final String username);\n\n\t/**\n\t * This method is used to create a position into the system.\n\t * \n\t * @author umamaheswarar\n\t * @param positionDTO\n\t * position related information to create the position\n\t * @return positionDTO position information after creating into the system.\n\t * @throws ApplicationCustomException\n\t */\n\tpublic PositionDTO createJobPosition(final PositionDTO positionDTO) throws ApplicationCustomException;\n\n\t/**\n\t * This method is used to update a position into the system.\n\t * \n\t * @author umamaheswarar\n\t * @param positionDTO\n\t * position related information to update the position\n\t * @return positionDTO position information after updating into the system.\n\t * @throws ApplicationCustomException\n\t */\n\tpublic PositionDTO updateJobPosition(final PositionDTO positionDTO) throws ApplicationCustomException;\n\n\t/**\n\t * This method is used to manage the time off of the employees\n\t * \n\t * @author umamaheswarar\n\t * @param timeOffDTO\n\t * time off DTO object\n\t * @return TimeOffDTO time off details after saving the details\n\t */\n\tpublic TimeOffDTO manageTimeOff(final TimeOffDTO timeOffDTO) throws ApplicationCustomException;\n\n\t/**\n\t * This method is used to change the employee job details\n\t * \n\t * @author umamaheswarar\n\t * @param jobChangeDTO\n\t * job change details\n\t * @return jobChangeDTO job change details after completion\n\t * @throws ApplicationCustomException\n\t * custom application message in case of any exception\n\t */\n\tpublic JobChangeDTO jobChange(final JobChangeDTO jobChangeDTO) throws ApplicationCustomException;\n\n\t/**\n\t * This method is used to change the address details of the employee\n\t * \n\t * @author umamaheswarar\n\t * @param employeeAddressDTO\n\t * @return addressChangeEventId address change event id\n\t * @throws ApplicationCustomException\n\t * custom application exception message\n\t */\n\tpublic String changeContactDetails(final EmployeeAddressDTO employeeAddressDTO) throws ApplicationCustomException;\n\n\t/**\n\t * This method is used to manage the payroll of the employees\n\t * \n\t * @author umamaheswarar\n\t * @param payrollDTO\n\t * payrollDTO object\n\t * @return payrollDTO payroll details after saving the details\n\t */\n\tpublic PayrollDTO managePayroll(final PayrollDTO payrollDTO) throws ApplicationCustomException;\n\n\t/**\n\t * This method is used to manage the payroll of the employees\n\t * \n\t * @author umamaheswarar\n\t * @param registerDTO\n\t */\n\tpublic boolean register(final RegisterDTO registerDTO)\n\t\t\tthrows ApplicationCustomException, HibernateException, SQLException;\n\n}",
"public interface UserService {\n List<User> getAllUsers();\n User getUser(int id);\n}",
"public interface UserService {\n\n /**\n * 获取用户信息列表\n *\n * @return\n */\n List<User> findAllUser();\n\n /**\n * 根据 ID,查询信息\n *\n * @param user\n * @return\n */\n ResponseBean login(User user);\n\n /**\n * 新增信息\n *\n * @param user\n * @return\n */\n ResponseBean saveUser(User user);\n\n /**\n * 更新信息\n *\n * @param user\n * @return\n */\n ResponseBean updateUser(User user);\n\n /**\n * 获取用户信息\n * @param phone\n * @return\n */\n ResponseBean getUserInfo(String phone);\n\n /**\n * 根据 ID,删除信息\n *\n * @param id\n * @return\n */\n ResponseBean deleteUser(Long id);\n\n /**\n * 验证用户的登录情况,Token是否合法\n * @param phoneNum\n * @param token\n * @return\n */\n boolean isUserTokenLegal(String phoneNum, String token);\n\n ResponseBean getAllUserList(String params);\n\n ResponseBean getAllInfo(User user);\n}",
"public interface UserService {\n /**\n * 登陆验证\n * @param email\n * @param password\n * @return\n */\n UserInfo findByEmailAndPassword(String email, String password);\n\n /**\n * 通过Id查找用户\n * @param id\n * @return\n */\n UserInfoVO findUserInfo(Long id);\n\n /**\n * 通过邮箱查找用户\n * @param email\n * @return\n */\n\n UserInfo IsExist(String email);\n\n\n /**\n * 注册\n * @param email\n * @param password\n * @return\n */\n UserInfo register(UserInfo user);\n\n /**\n * 用于更新用户信息\n * @param user\n * @return\n */\n UserInfo update(UserInfoVO user);\n /**\n * 注销VO\n * @param email\n */\n void writeOff(String email);\n}",
"public void setUser(User user) { this.user = user; }",
"public interface UserService {\n User authorize(Login login) throws Exception;\n\n User findUser(UUID userApiKey);\n\n}",
"public interface UserService {\n\n User findUserBuId(Long id);\n\n List<User> findAllUsers();\n\n void deleteUser(Long id);\n\n void saveUser(User user);\n\n void updateUser(User user);\n\n User findUserByEmail(String value);\n\n boolean isExist(String email);\n}",
"@Autowired\n public UserController(UserService userService) {\n this.userService = userService;\n }",
"public interface IUserAccountService {\n\n\t/**\n\t * The method is responsible for adding new user or registering new user\n\t * \n\t * @param transientUser\n\t * @return\n\t * @throws Exception\n\t */\n\tpublic Long addUser(User transientUser) throws Exception;\n\n\t/**\n\t * The method is responsible for updating existing user information\n\t * \n\t * @param detachedUser\n\t * @throws Exception\n\t */\n\tpublic void updateUser(User detachedUser) throws Exception;\n\n\t/**\n\t * The method is responsible for deleting existing user.\n\t * \n\t * @param userToDelete\n\t * @throws Exception\n\t */\n\tpublic void deleteUser(User userToDelete) throws Exception;\n\n\t/**\n\t * This method returns the user with username passed in parameter\n\t * \n\t * @param username\n\t * @return\n\t * @throws Exception\n\t */\n\tpublic User findByUserName(String username) throws Exception;\n\n\t/**\n\t * This method returns all the users of the system\n\t * @return\n\t */\n\tpublic List<User> findAll();\n\n}",
"public interface UserService extends MinsxEntityService {\n\n}",
"public interface UserService {\n\n public User getUserByName(String name);\n\n public User modify();\n\n public boolean add(User user);\n\n int getStatusCount(String userName, int status);\n\n boolean exist(String name);\n\n void edit(String userName, String nick, String note, String newpassword, String school, String email);\n\n int getSubmitCount(String userName);\n}",
"public interface IUserService {\n User getUser(String login);\n}",
"public interface UserService {\n /**\n * description: 用户登录\n * version: 1.0\n * date: 2021/1/11 22:38\n * author: LIBEL\n *\n * @param param\n * @return com.adp.FTXSecurity.model.vo.UserVo\n */\n UserVo login(LoginParam param);\n\n /**\n * description: 更新用户信息\n * version: 1.0\n * date: 2021/1/11 22:40\n * author: LIBEL\n *\n * @param param\n * @return void\n */\n void update(UserParam param);\n\n /**\n * description: 新增用户信息\n * version: 1.0\n * date: 2021/1/11 22:40\n * author: LIBEL\n *\n * @param param\n * @return void\n */\n void createUser(UserEntity param);\n}",
"public interface IUserService {\n void save(User user);\n}",
"public interface UserService {\n\n /**\n * login user\n *\n * @param login user login\n * @param password user password\n * @return optional value of user if login is successful\n * @throws ServiceException if an error occurs while processing.\n */\n Optional<User> login(String login, String password) throws ServiceException;\n\n /**\n * register user\n *\n * @param login user login\n * @param password user password\n * @param passwordConfirmed password confirm\n * @return true if register successful, false, otherwise\n * @throws ServiceException if an error occurs while processing.\n */\n boolean register(String login, String password, String passwordConfirmed) throws ServiceException;\n\n /**\n * Finds user by id\n *\n * @param id user id\n * @return optional value of user.\n * @throws ServiceException if an error occurs while processing.\n */\n Optional<User> findUser(int id) throws ServiceException;\n\n /**\n * Finds user with cookies\n *\n * @param login user login\n * @param userHash user hash\n * @return optional value of user.\n * @throws ServiceException if an error occurs while processing.\n */\n Optional<User> findUserWithCookies(String login, String userHash) throws ServiceException;\n\n /**\n * update user\n *\n * @param user user entity\n * @return true if register successful, false, otherwise\n * @throws ServiceException if an error occurs while processing.\n */\n boolean updateUser(User user) throws ServiceException;\n\n /**\n * confirm email\n *\n * @param userId id of user\n * @param token for confirmation\n * @return optional value of user.\n * @throws ServiceException if an error occurs while processing.\n */\n Optional<User> confirmEmail(int userId, String token) throws ServiceException;\n\n /**\n * Finds all users\n *\n * @return list of users.\n * @throws ServiceException if an error occurs while processing.\n */\n List<User> findALlUsers() throws ServiceException;\n\n}",
"@Autowired\n public void setUserService(UserService userService) {\n this.userService = userService;\n }",
"public interface UserService {\n List<User> findAll();\n void addUser(User user);\n}",
"public interface UserService {\n\n //查询所有用户\n public List<User> selectUserList();\n //根据权限查询用户列表\n public List<User> selectUserListByType(int type);\n //更改用户信息(包括权限)\n public boolean updateUser(User user);\n\n public User selectUserByUserId(String userId);\n}",
"public interface UserService extends AbstractService<User>{\n\n /**\n * 根据用户名和密码查询,校验用户\n * @param userName\n * @param password\n * @return\n */\n User checkUser(String userName, String password);\n}",
"public interface IUserService {\n \n User queryUserById(long id);\n}",
"public interface UserService {\n\n public Object save(UserEntity test);\n\n UserEntity get(Long id);\n\n boolean exists(String username);\n\n UserEntity checkLogin(Map<String, String> dataMap);\n\n UserEntity checkLogin(String username, String password);\n}",
"public interface UserService {\n\n public UserDO getUserDo(Long id);\n\n public void deleteUser(Long id);\n}",
"public interface UserService {\n\n User save(User user);\n\n User update(User user);\n\n void delete(Long id);\n\n User findById(Long id);\n\n List<User> findAll();\n\n}",
"public interface UserService {\n public Integer insertUser(User user);\n public Integer updateUser(User user);\n public User queryOne(Integer id);\n}",
"public interface UserService {\n\n //创建一个用户\n public void createUser(Sysuser sysuser);\n //修改用户信息\n public void saveUser(Sysuser sysuser);\n\n //根据传入的用户信息查询用户主要用户名和密码,返回list<map>\n public List<Map<String,Object>> signIn(Sysuser sysuser);\n\n //根据传入的用户信息查询用户主要用户名和密码,返回list<Sysuser>\n public List<Sysuser> getUserInfo1(Sysuser Sysuser);\n\n //修改密码\n public int modifyPassword(Map<String, Object> params);\n\n //修改头像\n public int modifyPhoto(String userId, String photoPath, String userType);\n\n //根据用户ID查询用户\n public Sysuser getUserInfoFromId(String userId);\n\n //设置用户是否可登陆后台\n public int setUserConsole(int userId,int state);\n\n //设置用户是否可登陆前台\n public int setUserFront(int userId,int state);\n\n}",
"public interface UserService {\n\n List<User> getAllUsers();\n\n boolean addUser(User user);\n\n}",
"public interface UserService {\n List<User> findAllUser();\n\n User addUser(User user);\n\n User findUser(long id);\n\n Set<Post> findPostsOfUser(long id);\n}",
"public interface UserService {\n\n public List<User> getUsers();\n\n //添加用户\n public boolean addUser(User user);\n\n //通过用户名查user对象\n public List<User> getUserByName(String username);\n //通过用户id获取角色名\n public String getRoleNameByUid(Integer userid);\n //修改密码\n public boolean updateUpw(User user );\n}",
"public interface UserInfoService extends IService {\n String getUserId();\n String getUserToken();\n}",
"public interface IUserService extends UserDetailsService {\n Long signin(Account account);\n\n List<UserInformation> showUserDetails();\n\n Account changeApplicationVersion(String accountIdentifier, ApplicationVersion applicationVersion);\n\n Long removeAccount(String accountIdentifier);\n\n Long suspendAccount(String accountIdentifier);\n\n Long unsuspendAccount(String accountIdentifier);\n\n Long addIncomingInvoice(String accountIdentifier);\n\n Long removeIncomingInvoice(String accountIdentifier);\n\n Long changeAssignment(String accountIdentifier, boolean newAssignementValue);\n\n Account findAccount(String accountIdentifier);\n}",
"public interface UserService {\r\n\r\n //注册方法\r\n Integer register(UserForm userForm) throws IOException;\r\n\r\n //登录\r\n UserDTO login(String userName, String userPassword);\r\n\r\n //检查用户名是否有效(str可以是用户名也可以是手机号。对应的type是username和userPhone)\r\n Integer checkValid(String str, String type);\r\n\r\n //获取用户登录信息\r\n UserDTO getUserInfo(String userPhone);\r\n\r\n //忘记密码获取问题\r\n String getQuestion(String userPhone);\r\n\r\n //提交问题答案(返回一个token)\r\n String checkAnswer(String userPhone, String userQuestion, String userAnswer);\r\n\r\n //忘记密码的重设密码\r\n Integer forgetResetPassword(String userPhone, String newPassword, String forgetToken);\r\n\r\n //登录状态中重设密码\r\n Integer resetPassword(String oldPassword, String newPassword, UserDTO userDTO);\r\n\r\n //登录状态更新个人信息\r\n Integer updateInformation(UserDTO userDTO,String userName, String userMail,String userPhone,String userQuestion,String userAnswer);\r\n\r\n //获取当前登录用户的详细信息,并强制登录\r\n UserForm getInformation(UserDTO userDTO);\r\n\r\n //退出登录\r\n Integer logout();\r\n\r\n //管理员查询用户列表\r\n List<UserInfo> list();\r\n\r\n //添加收货地址\r\n Shipping createShipping(ShippingForm shippingForm, String userId);\r\n\r\n //更新收货地址\r\n Shipping updateShipping(ShippingForm shippingForm, String shippingId, String userId);\r\n\r\n //查看收货地址\r\n Shipping shippingDetail(String shippingId);\r\n\r\n //查看收货地址列表\r\n List<Shipping> shippingList(String userId);\r\n\r\n //删除收货地址\r\n void deleteShipping(String shippingId);\r\n\r\n}",
"public interface UserService {\n\n UserDAO register(UserDAO user);\n\n void delete(String id);\n\n List<UserDAO> findAll();\n\n UserDAO findById(String id);\n\n UserDAO update(UserUpdateDAO user);\n\n UserDAO activateAccount(UserActivateDAO userActivateDAO);\n\n UserDAO authenticate(UserAuthenticateDAO userAuthenticateDAO);\n\n UserDAO convertToDAO(User user);\n\n UserUpdateDAO convertToUpdateDAO(UserDAO userDAO);\n\n UserRepository getRepository();\n}",
"public interface UserService {\n\n ResponseEntity<?> login(String username, String password, HttpSession session); //用户登录\n\n ResponseEntity<?> auth(String username,String password); //获取token\n\n ResponseEntity<?> register(String username,String password); //用户注册\n\n ResponseEntity<?> getOne(long userId);\n\n ResponseEntity<?> getUserNumber(); //获取用户数量\n\n ResponseEntity<?> saveAndFlush(User user);\n\n ResponseEntity<?> getUsers();\n\n ResponseEntity<?> changeStatus(long userId, int status);\n\n Page<User> list(Pageable pageable);\n\n ResponseEntity<?> search(String name);\n}",
"public interface UserService {\n\n User login(User user);\n\n /**\n * 用户列表\n *\n * @param user\n * @param pageHelper\n * @return\n */\n List<User> userGrid(User user, PageHelper pageHelper);\n\n /**\n * 保存或者更新\n *\n * @param user\n */\n void saveOrUpdate(User user) throws Exception;\n\n /**\n * 通过主键list集合删除\n *\n * @param list\n */\n void delete(List<String> list);\n\n /**\n * 加载男女管理员\n *\n * @return\n */\n List<Map<String, Object>> userMaleAndFemale();\n}",
"public interface IUserService {\n\n String getUserName();\n\n}",
"public interface UserAccountService {\n\n\tpublic final static String BEAN_ID = \"userAccountService\";\n\n\tpublic UserAccount findById(ServiceContext ctx, Long id) throws UserAccountNotFoundException;\n\n\tpublic List<UserAccount> findAll(ServiceContext ctx);\n\n\tpublic UserAccount save(ServiceContext ctx, UserAccount entity);\n\n\tpublic void delete(ServiceContext ctx, UserAccount entity);\n\n}",
"public interface IUserService extends IService<User, Integer>, UserDetailsService {\n\n User findUserByUsername(String username);\n\n User findUserByEmail(String email);\n\n User createUser(User user) throws UsernameExistsException;\n\n}",
"public interface UserService extends UserDetailsService {\n\n /**\n * 根据用户名查询用户\n *\n * @param username username\n * @return UserDetails\n * @throws UsernameNotFoundException UsernameNotFoundException\n */\n @Override\n UserDetails loadUserByUsername(String username) throws UsernameNotFoundException;\n}",
"public interface UserService {\n /**\n * 后台用户登陆\n * @param loginName\n * @param password\n * @return\n * @throws UserNotFoundException\n * @throws UserRoleException\n * @throws UserStatusException\n */\n public User backLogin(String loginName, String password) throws UserNotFoundException, UserRoleException, UserStatusException;\n\n public User frontLogin(String loginName, String password) throws UserNotFoundException, UserRoleException, UserStatusException;\n\n public PageInfo<User> findAllUserByAjax(int pageNo, User user) throws UserNotFoundException;\n\n public User findByUserId(Integer userId) throws UserNotFoundException;\n\n\n public void findByUsername(String username) throws UserExistException;\n\n public void addUser(User user) throws UserExistException;\n\n public void modifyUser(User user) throws UserExistException;\n\n public void modifyUserStatus(User user);\n\n\n\n}",
"public interface UserService {\n\n void signUp(String login, String password) throws ServiceSQLException, DataSourceException;\n\n User signIn(String login, String password) throws DataSourceException, ServiceSQLException;\n\n int getID(String login) throws DataSourceException, ServiceSQLException;\n\n String getPassword(String login) throws DataSourceException, ServiceSQLException;\n\n int getBalance(String login) throws DataSourceException, ServiceSQLException;\n\n void setBalance(Connection connection, String userID, int balance) throws DataSourceException, ServiceSQLException;\n\n float setDiscount(Connection connection, String userID) throws DataSourceException, ServiceSQLException;\n}"
] | [
"0.8184655",
"0.8184655",
"0.79585415",
"0.7939137",
"0.77692276",
"0.77503884",
"0.7748897",
"0.76868945",
"0.76643664",
"0.7643532",
"0.7635859",
"0.76211935",
"0.7619853",
"0.761795",
"0.7605434",
"0.75796753",
"0.75794244",
"0.7577913",
"0.75721735",
"0.75551057",
"0.75551057",
"0.75551057",
"0.7538822",
"0.7529018",
"0.751092",
"0.7510536",
"0.75044316",
"0.7503768",
"0.7498066",
"0.7493986",
"0.74871236",
"0.74867904",
"0.7484759",
"0.7484583",
"0.7476685",
"0.74749744",
"0.7473801",
"0.7468068",
"0.74634093",
"0.746118",
"0.74552786",
"0.74546385",
"0.7432004",
"0.7431814",
"0.7425331",
"0.7421896",
"0.7416031",
"0.7413125",
"0.7410651",
"0.7404945",
"0.7394854",
"0.7394594",
"0.7394002",
"0.7385812",
"0.73814505",
"0.7373136",
"0.73661655",
"0.7365225",
"0.7361409",
"0.7356759",
"0.7345643",
"0.73440474",
"0.732838",
"0.7316297",
"0.730798",
"0.73025715",
"0.72977513",
"0.7292546",
"0.729113",
"0.72871804",
"0.72871023",
"0.72800654",
"0.72787654",
"0.72762644",
"0.72742003",
"0.72711146",
"0.7268385",
"0.72641206",
"0.726126",
"0.72576636",
"0.72542644",
"0.72529465",
"0.7251456",
"0.7246995",
"0.72460395",
"0.72418016",
"0.72412187",
"0.7236406",
"0.72354126",
"0.7225804",
"0.72236806",
"0.72111017",
"0.720913",
"0.7193941",
"0.71838933",
"0.7181403",
"0.7178327",
"0.7168726",
"0.7157945",
"0.7156226",
"0.71549773"
] | 0.0 | -1 |
Creates new form AddVisite | public AddVisite(java.awt.Frame parent, boolean modal, EventType type) {
super(parent, modal);
isRadioEnable = true;
this.type = type;
if (type == EventType.OUTING){
eventType = "Sortie";
}
else
eventType = "Visite";
System.out.println(eventType);
initComponents();
alerteEmptyField.setVisible(false);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void addDao(Visite visite) {\r\n\t\t// Creation de la session\r\n\t\tSession s = sf.getCurrentSession();\r\n\r\n\t\ts.save(visite);\r\n\t\t\r\n\t}",
"public AddToVisitsDialogBox(Frame parent, GlobeApp gb) {\n this.gb = gb;\n this.parent = parent;\n Point loc = parent.getLocation();\n setAddVisitDialogUI(parent, loc);\n\n\n\n setNameUI();\n\n panel.add(namePanel);\n panel.add(Box.createVerticalStrut(10));\n\n\n\n setDateUI();\n\n panel.add(datePanel);\n panel.add(Box.createVerticalStrut(10));\n\n\n setNotesUI();\n\n panel.add(notesPanel);\n panel.add(Box.createVerticalStrut(15));\n\n\n setAddButtonUI();\n\n panel.add(addButton);\n panel.add(Box.createVerticalStrut(18));\n\n\n setErrorUI();\n panel.add(err);\n panel.add(Box.createVerticalStrut(20));\n\n dialog.getContentPane().add(panel);\n dialog.pack();\n }",
"private void addOnClick() throws CountryAlreadyPresentException, InvalidCountryException, FutureDateException {\n gb.addToVisitedList(nameField.getText().trim().toUpperCase(), dateField.getText().trim(),\n notesField.getText().trim());\n row = new Object[]{nameField.getText().trim().toUpperCase(), dateField.getText().trim(),\n notesField.getText().trim()};\n gb.getTableModel3().addRow(row);\n }",
"public String addNew() throws Exception {\r\n\t\tgetNavigationPanel(2);\r\n\t\tExpensesCategoryModel model = new ExpensesCategoryModel();\r\n\t\tmodel.initiate(context, session);\r\n\t\tmodel.getData(expenses, request);\r\n\t\texpenses.setLoadFlag(true);\r\n\t\treset();\r\n\t\t//\texpenses.setFlag(true);\r\n\r\n\t\texpenses.setPanelFlag(\"2\");\r\n\t\texpenses.setRetrnFlag(\"success\");\r\n\r\n\t\tmodel.terminate();\r\n\t\treturn \"success\";\r\n\r\n\t}",
"public void onNew() {\t\t\n\t\tdesignWidget.addNewForm();\n\t}",
"public void onClickAdd(View v) {\n Intent intent = new Intent(this, ItemFormActivity.class);\n startActivity(intent);\n }",
"@Command\n\tpublic void nuevoAnalista(){\n\t\tMap<String, Object> parametros = new HashMap<String, Object>();\n\n\t\t//parametros.put(\"recordMode\", \"NEW\");\n\t\tllamarFormulario(\"formularioAnalistas.zul\", null);\n\t}",
"private void newNetworkDialogCreateButton(){\n //Create new networkData object here based on the field info\n LabData.NetworkData newNetworkData = new LabData.NetworkData(\n NetworkAddDialogNameTextfield.getText().toUpperCase(),\n NetworkAddDialogMaskTextfield.getText(),\n NetworkAddDialogGatewayTextfield.getText(),\n (int)NetworkAddDialogMacVLanExtSpinner.getValue(),\n (int)NetworkAddDialogMacVLanSpinner.getValue(),\n NetworkAddDialogIPRangeTextfield.getText(),\n NetworkAddDialogTapRadioButton.isSelected()\n );\n \n // Update the list of labs in the current UI data object\n labDataCurrent.getNetworks().add(newNetworkData);\n \n // Add the network into the UI \n addNetworkPanel(newNetworkData);\n \n // Update the Container Config dialogs to include the new network\n updateNetworkReferenceInContainerConfigDialogs(\"Add\", NetworkAddDialogNameTextfield.getText().toUpperCase(), null);\n }",
"@GetMapping(value = \"/create\") // https://localhost:8080/etiquetasTipoDisenio/create\n\tpublic String create(Model model) {\n\t\tetiquetasTipoDisenio etiquetasTipoDisenio = new etiquetasTipoDisenio();\n\t\tmodel.addAttribute(\"title\", \"Registro de una nuev entrega\");\n\t\tmodel.addAttribute(\"etiquetasTipoDisenio\", etiquetasTipoDisenio); // similar al ViewBag\n\t\treturn \"etiquetasTipoDisenio/form\"; // la ubicacion de la vista\n\t}",
"public String addNew() {\r\n\t\ttry {\r\n\t\t\tgetNavigationPanel(2);\r\n\t\t\treturn \"questData\";\r\n\t\t} catch(Exception e) {\r\n\t\t\tlogger.error(\"Exception in addNew in action:\" + e);\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}",
"public void onAddByWebSitePressed( ) {\n Router.Instance().changeView(Router.Views.AddFromWebSite);\n }",
"public static void addNewVilla() {\n Services villa = new Villa();\n villa = addNewService(villa);\n ((Villa) villa).setRoomType(FuncValidation.getValidName(ENTER_ROOM_TYPE,INVALID_NAME));\n ((Villa) villa).setFacilities(FuncValidation.getValidName(ENTER_FACILITIIES,INVALID_NAME));\n ((Villa) villa).setPoolArea(FuncValidation.getValidDoubleNumber(ENTER_POOL_AREA,INVALID_DOUBLE_NUMBER,30.0));\n ((Villa) villa).setNumberOfFloor(FuncValidation.getValidIntegerNumber(ENTER_NUMBER_OF_FLOOR,INVALID_NUMBER_OF_FLOOR, 0));\n\n //Get villa list from CSV\n ArrayList<Villa> villaList = FuncGeneric.getListFromCSV(FuncGeneric.EntityType.VILLA);\n\n //Add villa to list\n villaList.add((Villa) villa);\n\n //Write villa list to CSV\n FuncReadWriteCSV.writeVillaToFileCSV(villaList);\n System.out.println(\"----Villa \"+villa.getNameOfService()+\" added to list---- \");\n addNewServices();\n\n }",
"private void addInstituicao() {\n\n if (txtNome.getText().equals(\"\")) {\n JOptionPane.showMessageDialog(null, \"Campo Nome Invalido\");\n txtNome.grabFocus();\n return;\n } else if (txtNatureza.getText().equals(\"\")) {\n JOptionPane.showMessageDialog(null, \"Campo Natureza Invalido\");\n txtNatureza.grabFocus();\n return;\n }\n if ((instituicao == null) || (instituicaoController == null)) {\n instituicao = new Instituicao();\n instituicaoController = new InstituicaoController();\n }\n instituicao.setNome(txtNome.getText());\n instituicao.setNatureza_administrativa(txtNatureza.getText());\n if (instituicaoController.insereInstituicao(instituicao)) {\n limpaCampos();\n JOptionPane.showMessageDialog(null, \"Instituicao Cadastrada com Sucesso\");\n }\n }",
"@GetMapping(\"/add\")\r\n\tpublic String newSave(Model model) {\r\n\t\tmodel.addAttribute(\"trainee\", new Trainee());\r\n\t\treturn \"add-trainee\";\r\n\t}",
"@Override\n public void buttonClick(ClickEvent event) {\n \n \ttry {\n\t\t\t\t\tUI.getCurrent().getNavigator().addView(_nombreSeccion + \"Adm/\" + _titulo.getCaption(), new AdministradorClase(new Lista_Mensaje_V_Administrador(it.getIdTema())));\n\t\t\t\t} catch (PersistentException 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\tUI.getCurrent().getNavigator().navigateTo(_nombreSeccion+ \"Adm/\" + _titulo.getCaption());\n \t\n \t\n }",
"com.soa.SolicitarCreditoDocument.SolicitarCredito addNewSolicitarCredito();",
"protected void creaPagine() {\n Pagina pag;\n Pannello pan;\n\n try { // prova ad eseguire il codice\n\n /* crea la pagina e aggiunge campi e pannelli */\n pag = this.addPagina(\"generale\");\n\n pan = PannelloFactory.orizzontale(this);\n pan.add(Cam.data);\n pan.add(Cam.importo.get());\n pan.add(Cam.note.get());\n pag.add(pan);\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n }",
"public SiteVisitsPageSteps addVisitScheduleForSite() throws Exception {\n\n\t\tassertPageLoad();\n\n\t\twaiter().until(ExpectedConditions.visibilityOfElementLocated(By.id(\"toolBarTable\")));\n\t\tgetLinkControl(\"Add a new activity\").click();\n\t\tassertPageLoad();\n\n\t\tString visitScheduleName = \"SQV Visit - \" + RandomData.dateTime_yyyyMMddHHmmss();\n\t\tthis.getTestData().put(\"visitScheduleName\", visitScheduleName);\n\n\t\t//TODO: IE SPECIFIC - SendKeys is inconsistent in entering value for IE browser. Modified with JS script as workaround until rca/ fix\n\t\t//getTextboxControl(\"name\").enterValue(visitScheduleName);\n\t\t((JavascriptExecutor) driver()).executeScript(String.format(\"document.getElementById('name').value='\" + visitScheduleName + \"';\"));\n\n\t\tgetDropdownControl(\"category_cb\").enterValue(getTestData().get(\"Category\"));\n\n\t\tclickSaveAndClose();\n\t\t//TODO: IE SPECIFIC - \"Save and Close\" does not navigate to the visits page when performed in IE. Added hack - To be fixed.\n\t\tif(System.getProperty(\"browser\").equalsIgnoreCase(\"ie\")){\n\t\t\tgetLinkControl(\"Back to previous view\").click();\n\t\t\tassertPageLoad();\n\t\t}\n\n\t\treturn new SiteVisitsPageSteps(getConfig(), getAgent(), getTestData());\n\t}",
"public void clickCreate() {\n\t\tbtnCreate.click();\n\t}",
"@RequestMapping(value={\"/projects/add\"}, method= RequestMethod.GET)\r\n\tpublic String createProjectForm(Model model) {\r\n\t\tUser loggedUser= sessionData.getLoggedUser();\r\n\t\tmodel.addAttribute(\"loggedUser\", loggedUser);\r\n\t\tmodel.addAttribute(\"projectForm\", new Project());\r\n\t\treturn \"addProject\";\r\n\t}",
"protected void add(HttpServletRequest request) throws ClassNotFoundException, SQLException{\n if(!request.getParameter(\"nome\").equals(\"\")){\n //Adiciona pessoa\n PessoaDAO dao = new PessoaDAO(); \n //String acao = request.getParameter(\"add\");\n int id = 0;\n for(Pessoa t:dao.findAll()){\n id =t.getId();\n }\n id++; \n Pessoa p = new Pessoa(new Integer((String)request.getParameter(\"id\")),request.getParameter(\"nome\"),request.getParameter(\"telefone\"),request.getParameter(\"email\"));\n dao.create(p);\n }\n }",
"@GetMapping(\"/add\")\n\tpublic String showFormForAdd(Model model) {\n\t\tMemo memo = new Memo();\n\t\t\n\t\t// load categories for select options\n\t\tMap<String, String> mapCategories = generateMapCategories();\n\t\t\n\t\t// add to the model\n\t\tmodel.addAttribute(\"memo\", memo);\n\t\tmodel.addAttribute(\"categories\", mapCategories);\n\t\t\n\t\treturn \"add\";\n\t}",
"public void add(View view) {\n Intent addIntent = new Intent(this, AddTask.class);\n addIntent.putExtra(\"com.example.joshua.livetogether.aptID\", mAptID);\n startActivity(addIntent);\n }",
"public String handleAdd() \n throws HttpPresentationException, webschedulePresentationException\n { \n\t try {\n\t Project project = new Project();\n saveProject(project);\n throw new ClientPageRedirectException(PROJECT_ADMIN_PAGE);\n\t } catch(Exception ex) {\n return showAddPage(\"You must fill out all fields to add this project\");\n }\n }",
"com.soa.SolicitarServicioDocument.SolicitarServicio addNewSolicitarServicio();",
"public NomineeAddActivity() {\r\n\t\tsetContentView(R.layout.activity_nominee_add);\r\n\t}",
"@Override\r\n\t\tpublic void onClick(ClickEvent event) {\n\t\t\tRootPanel.get(\"details\").clear();\r\n\t\t\tuf = new UserForm(AktuellerAnwender.getAnwender());\r\n\t\t\tRootPanel.get(\"details\").add(uf);\r\n\t\t}",
"private void newProject()\n\t{\n\t\tnew FenetreCreationProjet();\n\t}",
"public void add(View v) {\n\t\tint type = tabHost.getCurrentTab() + 1;\n\t\tIntent i = new Intent(this, AddActivity.class);\n\t\ti.putExtra(\"type\", type);\n\t\tstartActivityForResult(i, MainActivity.REQUEST_ADD);\n\t}",
"public void CrearNew(ActionEvent e) {\n List<Pensum> R = ejbFacade.existePensumID(super.getSelected().getIdpensum());\n if(R.isEmpty()){\n super.saveNew(e);\n }else{\n new Auxiliares().setMsj(3,\"PENSUM ID YA EXISTE\");\n }\n }",
"public void addNewAnimalAction() {\n\t\tAnimalModel newAnimalModel = new AnimalModel(\"\", \"\");\n\n\t\teditAnimalDetail(newAnimalModel, AnimalDetailPanel.NEW_ANIMAL);\n\t}",
"private void actionAdd() {\n\t\tURL verifiedUrl = verifyUrl(addTextField.getText());\n\t\tif (verifiedUrl != null) {\n\t\t\ttableModel.addDownload(new Download(verifiedUrl));\n\t\t\taddTextField.setText(\"\"); // reset add text field\n\t\t} else {\n\t\t\ttf.dispose();\n\t\t\tJOptionPane.showMessageDialog(this,\n\t\t\t\"Invalid Download URL\", \"Error\",\n\t\t\tJOptionPane.ERROR_MESSAGE);\n\t\t}\n\t}",
"public void addNewUserEntry(View v){\n Intent invoer;\n invoer = new Intent(getBaseContext(),InvoerActivity.class);\n startActivity(invoer);\n }",
"public SrvINFONEGOCIO(AgregarInfoNegocio view) {//C.P.M Tendremos un constructor con la vista de agregar informacion de negocio\r\n this.vista = view;//C.P.M Se la agregamos a la variable para tener acceso a la vista \r\n }",
"public String crea() {\n c.setId(0);\n clienteDAO.crea(c); \n //Post-Redirect-Get\n return \"visualiza?faces-redirect=true&id=\"+c.getId();\n }",
"public void addProj() {\n\t\tbtnAdd.click();\n\t}",
"public void onClickAddNewItem(View v) {\n Intent intent = new Intent(EditFoodItemActivity.this, MainActivity.class);\n startActivity(intent);\n }",
"@Override\r\n\t\tpublic void onClick(ClickEvent event) {\n\t\t\tRootPanel.get(\"details\").clear();\r\n\t\t\thome = new AdminDashboardForm();\r\n\t\t\tRootPanel.get(\"details\").add(home);\r\n\t\t}",
"@RequiresPermissions(\"/storage/plugin/add\")\n\t@RequestMapping(value = \"/{type}/add/\", method = RequestMethod.POST)\n\tpublic String addStorageForm(@PathVariable(\"type\") String type, HttpSession session, HttpServletRequest request) {\n\t\tString host = request.getParameter(\"hc_mysql_host\");\n\t\tString port = request.getParameter(\"hc_mysql_port\");\n\n\t\tOdpsContent odps = new OdpsContent();\n\t\todps.setHost(host);\n\t\todps.setType(type);\n\n\t\tString id = request.getParameter(\"hc_mysql_id\");\n\t\tif (id != null && id != \"\") {\n\t\t\todps.setId(Integer.valueOf(id));\n\t\t}\n\n\t\ttry {\n\t\t\todps.setPort(Integer.valueOf(port));\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn \"redirect:/errors/500\";\n\t\t}\n\t\tif (JConstants.MYSQL.equals(type)) {\n\t\t\tString username = request.getParameter(\"hc_mysql_username\");\n\t\t\tString password = request.getParameter(\"hc_mysql_password\");\n\t\t\todps.setUsername(username);\n\t\t\todps.setPassword(password);\n\t\t}\n\t\tif (storageService.replace(odps) > 0) {\n\t\t\treturn \"redirect:/storage/\" + type;\n\t\t} else {\n\t\t\treturn \"redirect:/errors/500\";\n\t\t}\n\t}",
"public static Result newForm() {\n return ok(newForm.render(palletForm, setOfArticleForm));\n }",
"@Override\r\n\t\tpublic void onClick(ClickEvent event) {\n\t\t\tdropdown.clear();\r\n\t\t\tRootPanel.get(\"details\").clear();\r\n\t\t\tSpielplanErstellenForm erstellen = new SpielplanErstellenForm();\r\n\r\n\t\t\tRootPanel.get(\"details\").add(erstellen);\r\n\t\t}",
"public void crearPersonaje(ActionEvent event) {\r\n\r\n\t\tthis.personaje.setAspecto(url);\r\n\r\n\t\tDatabaseOperaciones.guardarPersonaje(stats, personaje);\r\n\r\n\t\tvisualizaPersonajes();\r\n\t}",
"public void createAd(/*Should be a form*/){\n Ad ad = new Ad();\n User owner = this.user;\n Vehicle vehicle = this.vehicle;\n String \n// //ADICIONAR\n ad.setOwner();\n ad.setVehicle();\n ad.setDescription();\n ad.setPics();\n ad.setMain_pic();\n }",
"void onAddClicked();",
"public void addButtonClicked(View view) {\n\n Products product = new Products(johnsInput.getText().toString());\n\n dbHandler.addProduct(product);\n printDatabase();\n }",
"private void clickAddAndSave(boolean visit, final boolean isCensor, String censorId, String censorName) {\n callLoading(2);\n\n String _date = ((TextView) findViewById(R.id.Date)).getText().toString(); //拜访日期\n String _place = ((TextView) findViewById(R.id.Place)).getText().toString(); //地点\n// String companyData = ((TextView) findViewById(R.id.Company)).getText().toString(); //客户\n// String targetData = ((TextView) findViewById(R.id.Target)).getText().toString(); //对象\n String _todo = ((EditText) findViewById(R.id.Todo)).getText().toString(); //目的\n int _type = ((Spinner) findViewById(R.id.Type)).getSelectedItemPosition(); //类型\n String _record = ((EditText) findViewById(R.id.Record)).getText().toString(); //记录\n int _result = ((Spinner) findViewById(R.id.Result)).getSelectedItemPosition(); //结果\n String _remark = ((EditText) findViewById(R.id.Remark)).getText().toString(); //备注\n String _tape = visitContentFragment.getTapeList().toString(); //录音\n Log.e(\"tapeList.toString() = \", _tape);\n _tape = _tape.substring(1, _tape.length() - 1);\n\n\n if (isAdding) {\n isAdding = false;\n ++MaxId;\n if (tmpTargetId == null) {\n tmpTargetId = new int[0];\n }\n if (tmpTarget == null) {\n tmpTarget = new String[0];\n }\n if (tmpCompany == null) {\n tmpCompany = \"\";\n }\n VisitData AddVisitData = new VisitData(MaxId, UID, UID, UNAME, _date, _place,\n tmpCompanyId, tmpCompany, tmpTargetId, tmpTarget, _todo,\n _type, _record, _result, _remark, _tape);\n String dataStr = AddVisitData.getAddSQLString();\n visitJsonList.add(\n new VisitJSONOperate()\n .setAct(this)\n .setFragment(visitOverviewFragment)\n .setUID(UID)\n .addJson(AddVisitData));\n\n } else {\n final VisitContentFragment v = visitContentFragment;\n if (tmpTargetId == null) {\n tmpTargetId = v.getTargetId();\n }\n if (tmpTarget == null) {\n tmpTarget = v.getTarget();\n }\n if (tmpCompanyId == -1) {\n tmpCompanyId = v.getCompanyId();\n }\n if (tmpCompany == null) {\n tmpCompany = v.getCompany();\n }\n VisitData updateVisitData = new VisitData(v.getVisitId(), UID, v.getSubmitId(), v.getSubmitName(),\n _date, v.getDateInt(), _place, tmpCompanyId, tmpCompany, tmpTargetId, tmpTarget,\n _todo, _type, _record, _result, _remark, _tape, v.getCondition(),\n v.getPartnerId(), v.getPartnerName(), v.getPidL(), v.getPidC(), v.getIsTemp(), null, null);\n\n if (visit) {\n// NotificationManager notifiManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\n// notifiManager.cancel(0);\n// isVisiting = false;\n updateVisitData.setCondition(2);\n }\n\n if (isCensor) {\n updateVisitData.setCensor(censorId, censorName).setCondition(4);\n approvalJsonList.add(new ApprovalJSONOperate(UID).setAct(this).submit(updateVisitData));\n visitJsonList.add(\n new VisitJSONOperate()\n .setAct(this)\n .setFragment(visitOverviewFragment)\n .setUID(UID)\n .updateJson(updateVisitData));\n } else {\n visitJsonList.add(\n new VisitJSONOperate()\n .setAct(this)\n .setFragment(visitOverviewFragment)\n .setUID(UID)\n .updateJson(updateVisitData));\n }\n }\n setLoadingText(\"正在保存至远程服务器...\");\n// Toast.makeText(this, \"正在保存至远程服务器...\", Toast.LENGTH_SHORT).show();\n }",
"public void testValidateFieldsAdd() throws Exception {\n this.mSession = new PortalSessionTestFacade(new InstanceSelectorPlusDirectActionsTemplate());\n\n this.mSession.startFlow(\"start\");\n assertNotNull(this.mSession.getCurrentPage());\n assertNotNull(this.mSession.getCurrentPage());\n\n // emtpy required field Peroon.Naam and press add button\n this.mSession.handleButtonEvent(\"add\", new RequestTemplate(\"Persoon.Naam\", \"\"));\n assertNotNull(this.mSession.getCurrentPage());\n assertEquals(\"Persoon instance must be added\", 4,\n this.mSession.getProfile().getAllInstancesForEntity(\"Persoon\", false).length);\n }",
"public void addItem() {\n Url url = new Url();\n Venue item = new Venue(venuename.getText().toString(), address.getText().toString(), venueimage.getText().toString(), details.getText().toString());\n Call<Void> additem = url.createInstanceofRetrofit().addNewVenue(item);\n additem.enqueue(new Callback<Void>() {\n @Override\n public void onResponse(Call<Void> call, Response<Void> response) {\n Toast.makeText(VenueAdd.this, \"Venue Added Successfully\", Toast.LENGTH_SHORT).show();\n Intent intent=new Intent(VenueAdd.this, Dash.class);\n startActivity(intent);\n finish();\n }\n\n @Override\n public void onFailure(Call<Void> call, Throwable t) {\n Toast.makeText(VenueAdd.this, \"Error:\"+t, Toast.LENGTH_SHORT).show();\n }\n });\n\n }",
"public FormInserir() {\n initComponents();\n }",
"@OnClick (R.id.create_course_btn)\n public void createCourse()\n {\n\n CourseData courseData = new CourseData();\n courseData.CreateCourse( getView() ,UserData.user.getId() ,courseName.getText().toString() , placeName.getText().toString() , instructor.getText().toString() , Integer.parseInt(price.getText().toString()), date.getText().toString() , descreption.getText().toString() ,location.getText().toString() , subField.getSelectedItem().toString() , field.getSelectedItem().toString());\n }",
"public void onclick_add(MouseEvent mouseEvent) {\n\t\tUifEditCmd cmd = new UifEditCmd(\"ssoView\",DialogConstant.DEFAULT_WIDTH, DialogConstant.SIX_ELE_HEIGHT);\n\t\tAppLifeCycleContext.current().getWindowContext().addAppAttribute(\"operate\", \"add\");\n\t\tcmd.execute();\n//\t\tRow row = ds.getEmptyRow();\n//\t\tds.addRow(row);\n//\t\tds.setRowSelectIndex(ds.getRowIndex(row));\n//\t\tds.setEnabled(true);\n//\t\tnew UifUpdateOperatorState(ds, AppLifeCycleContext.current().getViewContext().getView()).execute();\n\t}",
"@Override\n public void Create() {\n\n initView();\n }",
"public org.openxmlformats.schemas.presentationml.x2006.main.CTShowInfoBrowse addNewBrowse()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.openxmlformats.schemas.presentationml.x2006.main.CTShowInfoBrowse target = null;\n target = (org.openxmlformats.schemas.presentationml.x2006.main.CTShowInfoBrowse)get_store().add_element_user(BROWSE$2);\n return target;\n }\n }",
"@Override\n public void onClick(View v) {\n switch (v.getId()) {\n case R.id.submitBtn:\n String merchant = retrieveMerchant();\n String description = retrieveDesc();\n String date = retrieveDate();\n String cost = retrieveCost();\n if (merchant.equals(\"\") || description.equals(\"\") || date.equals(\"\") || cost.equals(\"\")) {\n return;\n }\n Date d = Utils.convertToDate(Utils.getYearFromStr(date), Utils.getMonthFromStr(date), Utils.getDayFromStr(date));\n ContentValues values = Utils.insertEntries(merchant, description, date, d, cost);\n long newRowId = _db.insert(Inventory.InventoryEntry.TABLE_NAME, null, values);\n Intent i = new Intent(AddActivity.this, MainActivity.class);\n startActivity(i);\n }\n }",
"@GetMapping(\"/restaurante/new\")\n\tpublic String newRestaurante(Model model) {\n\t\tmodel.addAttribute(\"restaurante\", new Restaurante());\n\t\tControllerHelper.setEditMode(model, false);\n\t\tControllerHelper.addCategoriasToRequest(categoriaRestauranteRepository, model);\n\t\t\n\t\treturn \"restaurante-cadastro\";\n\t\t\n\t}",
"@FXML\n\tvoid AddVisitor_Button_Clicked(ActionEvent event) { // could the visitor be for different parks? time? date ?\n\t\tString ordererId = PopUp.getUserInput(\"Private Group Order\", \"Enter ID of the visitor\", \"ID or Subscriber ID\");\n\n\t\tif (!CheckID(ordererId)) {\n\t\t\tPopUp.showInformation(\"Please enter appropriate ID\", \"Please enter appropriate ID\",\n\t\t\t\t\t\"Please enter appropriate ID\");\n\t\t} else if (visitorsIDArray.contains(ordererId) || visitorsIDArray.contains(\"S\" + ordererId)\n\t\t\t\t|| visitorsIDArray.contains(ordererId.substring(1, ordererId.length()))) {\n\t\t\tPopUp.showInformation(\"This ID already is added\", \"This ID already is added\", \"This ID already is added\");\n\t\t} else {\n\t\t\tvisitorsIDArray.add(ordererId);\n\t\t\tPopUp.showInformation(\"Visitor Added\", \"Visitor Added\", \"Visitor Added\");\n\t\t\tvisitorsCounter++;\n\t\t\tlistViewVisitors.getItems().add(\"visitor #\" + visitorsCounter + \" \" + \"(\" + ordererId + \")\");\n\t\t\tPlaceOrder_Button.setDisable(false);\n\t\t\tRemoveVisitor_Button.setDisable(false);\n\t\t}\n\t}",
"private void crearVista() {\n\t\tVista vista = Vista.getInstancia();\n\t\tvista.addObservador(this);\n\n\t}",
"@Command\n public void nuevaMateria() {\n\t\t\n\t\tWindow window = (Window)Executions.createComponents(\n \"/WEB-INF/include/Mantenimiento/Materias/vtnMaterias.zul\", null, null);\n window.doModal();\n }",
"@Override\r\n\tpublic void crearVehiculo() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void agregarObjeto() {\r\n\t\t// opcion 1 es agregar nuevo justificativo\r\n\t\tthis.setTitle(\"PROCESOS - PERMISOS INDIVIDUALES (AGREGANDO)\");\r\n\t\tthis.opcion = 1;\r\n\t\tactivarFormulario();\r\n\t\tlimpiarTabla();\r\n\t\tthis.panelBotones.habilitar();\r\n\t}",
"public void create_new_package(View V) {\n make_request();\r\n progressDialog.show();\r\n }",
"public static void addNewServices() {\n displayAddNewServicesMenu();\n processAddnewServicesMenu();\n }",
"private void addSite(Vec2D v)\n\t\t{\n\t\tvoronoi.addPoint(v);\n\t\tstroke(0, 255, 255);\n\t\tpos.add(v);\n\t\t}",
"CreateSiteResult createSite(CreateSiteRequest createSiteRequest);",
"private void onAddGoalsClicked() {\n Intent intent = new Intent(this, GoalCreationActivity.class);\n startActivity(intent);\n }",
"public void create_GovOfficial(Citizen citizen)\n\t{\n\t\tPersonalDetails details = citizen.getDetails(); \n\t\tString user = citizen.getUsername(), \n\t\t\t pass = citizen.getPassword();\n\t\t\n\t\taccounts.remove(citizen);\n\t\taccounts.add(new GovernmentOfficial(user, pass));\n\t\taccounts.get(accounts.size() - 1).setPersonalDetails(details);\n\t}",
"public ADD() {\n initComponents();\n }",
"public void add(View project){\n projects.add(project);\n }",
"public JIFrameAtividadesInserir() {\n initComponents();\n this.selecionaDadosCategoria(conn);\n }",
"public AddExpensesForm() {\n initComponents();\n }",
"com.synergyj.cursos.webservices.ordenes.XMLBFactura addNewXMLBFactura();",
"public DDSViewCollectionForm() {\n\t}",
"@Override\n public void onClick(View v) {\n NewBucketDialogFragment newBucketDialogFragment = NewBucketDialogFragment.newInstance();\n newBucketDialogFragment.setTargetFragment(BucketListFragment.this, REQ_CODE_NEW_BUCKET);\n newBucketDialogFragment.show(getFragmentManager(), NewBucketDialogFragment.TAG);\n }",
"public void add_stage() {\r\n\t\tif (this.controller.getSelectedCatagory() == null)\r\n\t\t\treturn;\r\n\t\tString name = JOptionPane.showInputDialog(this,\r\n\t \t\"Choose a name for the stage\",\r\n\t \"Name Stage\", 1);\r\n\t if (name == null) {\r\n\t \treturn;\r\n\t }\r\n\t // If the stage cannot be added, inform the user\r\n\t\tif (!controller.addStage(name)) {\r\n\t\t\tJOptionPane.showMessageDialog(this, \"A Stage with that name already exists\");\r\n\t\t}\r\n\t}",
"public void createNewTask(View view) {\n try{\n newTaskLayout.checkTaskLayoutIsValid();\n ImageView taskImage = (ImageView) findViewById(R.id.imageViewBoard);\n String layoutImagePath = takeScreenshot(taskImage);\n newTaskLayout.setImagePath(layoutImagePath);\n\n // save new task\n HashMap<String, Integer> instructions = convertSpinnersToHashMap();\n Task newTask = new Task(newTaskLayout, instructions);\n Task.saveTask(getApplicationContext(), newTask);\n\n // alert user task created and return to task menu.\n Toast.makeText(this, \"new task created\", Toast.LENGTH_LONG).show();\n startActivity(new Intent(getApplicationContext(), TaskOptionsActivity.class));\n } catch (TaskLayoutException | InstructionsRequiredException e) {\n // layout was not valid on insufficient instructions set.\n makeMessageDialogue(e.getMessage());\n }\n }",
"private void actionNewProject ()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tDataController.scenarioNewProject();\r\n\r\n\t\t\thelperDisplayProjectFiles();\r\n\r\n\t\t\t//---- Change button icon\r\n\t\t\tImageIcon iconButton = FormUtils.getIconResource(FormStyle.RESOURCE_PATH_ICO_VIEW_SAMPLES);\r\n\r\n\t\t\tmainFormLink.getComponentToolbar().getComponentButtonViewSamples().setIcon(iconButton);\r\n\t\t\tmainFormLink.getComponentToolbar().getComponentButtonViewSamples().setActionCommand(FormMainHandlerCommands.AC_VIEW_SAMPLES_ON);\r\n\t\t\tmainFormLink.getComponentToolbar().getComponentButtonViewSamples().setToolTipText(\"View detected samples\");\r\n\r\n\t\t\tmainFormLink.reset();\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}",
"@GetMapping(\"/owners/*/pets/{petId}/visits/new\")\n\tpublic String initNewVisitForm(@PathVariable(\"petId\") int petId, Map<String, Object> model) {\n\t\treturn \"pets/createOrUpdateVisitForm\";\n\t}",
"public void btnAddClicked(View view){\n List list = new List(input.getText().toString());\n dbHandler.addProduct(list);\n printDatabase();\n }",
"public CreateAccount() {\n initComponents();\n selectionall();\n }",
"@Override\n public void onClick(View v) {\n if(v == mFab) {\n final Dialog adddialog = new Dialog(getActivity());\n adddialog.setContentView(R.layout.add_plan_layout);\n adddialog.setCancelable(false);\n adddialog.show();\n Button confirm = (Button) adddialog.findViewById(R.id.plan);\n Button cancel = (Button) adddialog.findViewById(R.id.no_thank);\n final EditText plan = (EditText) adddialog.findViewById(R.id.add_plan);\n mDbHelper = new DbHelper(getActivity());\n\n //create plan function\n confirm.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n Plan planList = new Plan(mDbHelper.getPlanCount(), String.valueOf(plan.getText()));\n // if(!taskExists(planList)) {\n mDbHelper.insertplan(planList);\n plan_list.add(planList);\n refreshList();\n\n Toast.makeText(getActivity(), \"Plan Created\", Toast.LENGTH_SHORT).show();\n\n adddialog.cancel();\n }\n });\n //cancel button function\n cancel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n adddialog.cancel();\n }\n });\n\n }\n }",
"@SuppressWarnings(\"UnusedParameters\")\n private void onClickNewButton(View v) {\n ((MainDrawerActivity) getActivity()).switchFragment(NewWaterReportFragment.newInstance());\n }",
"public Add() {\n initComponents();\n }",
"private void addNewCoursesOnClick(){\n dataSource.open();\n dataSource.createCourses(editTextCourses.getText().toString(),editTextTeacher.getText().toString(),editTextWhen.getText().toString(),editTextWhere.getText().toString(),editTextGrading.getText().toString(),editTextOther.getText().toString());\n dataSource.close();\n CoursesListElement courses = new CoursesListElement(editTextCourses.getText().toString(),editTextTeacher.getText().toString(),editTextWhen.getText().toString(),editTextWhere.getText().toString(),editTextGrading.getText().toString(),editTextOther.getText().toString(),0);\n listElements.add(courses);\n // setting list adapter\n listView.setAdapter(new ActionListAdapter(getActivity(),R.id.list_courses, listElements));\n newCourses.setVisibility(View.GONE);\n editTextCourses.setText(\"\");\n editTextTeacher.setText(\"\");\n editTextWhen.setText(\"\");\n editTextWhere.setText(\"\");\n editTextGrading.setText(\"\");\n editTextOther.setText(\"\");\n }",
"private void azzeraInsertForm() {\n\t\tviewInserimento.getCmbbxTipologia().setSelectedIndex(-1);\n\t\tviewInserimento.getTxtFieldDataI().setText(\"\");\n\t\tviewInserimento.getTxtFieldValore().setText(\"\");\n\t\tviewInserimento.getTxtFieldDataI().setBackground(Color.white);\n\t\tviewInserimento.getTxtFieldValore().setBackground(Color.white);\n\t}",
"public static AddProject newInstance() {\n AddProject fragment = new AddProject();\n return fragment;\n }",
"public void buttonNew(View view) {\n Intent intent = new Intent(this, ProductNewActivity.class);\n startActivity(intent);\n }",
"@RequestMapping(\"/new\")\n\tpublic String displayProjectForm(Model model) {\n\t\tProject aproject = new Project();\n\t//Iterable<Employee> employees = \tpro.getall();\n\t\n\t\tmodel.addAttribute(\"project\", aproject);\n\n\t\t//model.addAttribute(\"allEmployees\", employees);\n\t\t\n\t\t\n\t\treturn \"newproject\";\n\t\t\n\t}",
"public String nuevo() {\n\n\t\tLOG.info(\"Submitado formulario, accion nuevo\");\n\t\tString view = \"/alumno/form\";\n\n\t\t// las validaciones son correctas, por lo cual los datos del formulario estan en\n\t\t// el atributo alumno\n\n\t\t// TODO simular index de la bbdd\n\t\tint id = this.alumnos.size();\n\t\tthis.alumno.setId(id);\n\n\t\tLOG.debug(\"alumno: \" + this.alumno);\n\n\t\t// TODO comprobar edad y fecha\n\n\t\talumnos.add(alumno);\n\t\tview = VIEW_LISTADO;\n\t\tmockAlumno();\n\n\t\t// mensaje flash\n\t\tFacesContext facesContext = FacesContext.getCurrentInstance();\n\t\tExternalContext externalContext = facesContext.getExternalContext();\n\t\texternalContext.getFlash().put(\"alertTipo\", \"success\");\n\t\texternalContext.getFlash().put(\"alertMensaje\", \"Alumno \" + this.alumno.getNombre() + \" creado con exito\");\n\n\t\treturn view + \"?faces-redirect=true\";\n\t}",
"@Override\n public void onClick(View v) {\n\n DBCreate();\n\n SubmitData2SQLiteDB();\n\n }",
"public Result addNewRoomType() {\n\n DynamicForm dynamicform = Form.form().bindFromRequest();\n if (dynamicform.get(\"AdminAddRoom\") != null) {\n\n return ok(views.html.AddRoomType.render());\n }\n\n\n return ok(\"Something went wrong\");\n }",
"public static void add() {\n Application.currentUserCan( 1 );\n render();\n }",
"public void btn_AddActivity(View view) {\n startActivity(new Intent(this, add_Recipe.class));\n }",
"@OnClick(R.id.fabAdd)\n void onClickAdd() {\n Intent addAddressIntent = new Intent(this, AddAddressActivity.class);\n startActivity(addAddressIntent);\n }",
"@Test(groups ={Slingshot,Regression})\n\tpublic void ValidatetheAddNewViewOverlay() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify whether 'Confirm' and 'cancel' links in 'Add a new view' overlay are navigated to the respective pages\");\n\n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMVTestDatas\");\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.ClickAddNewUserLink()\n\t\t.AddUserRadioButton()\n\t\t.StandardUser_Creation()\n\t\t.ValidateaddnewviewOverlay();\t\n\t}",
"public void onAddPage(View view){\n addPage();\n view.setVisibility(View.GONE);\n Toast.makeText(this, \"Page Added\", Toast.LENGTH_LONG).show();\n }",
"@Override\n\t\t\t\t\tpublic void onClick(View view) {\n\t\t\t\t\t\tnew AddInDatabase().execute();\n\t\t\t\t\t}",
"@RequestMapping(value = \"/report.create\", method = RequestMethod.GET)\n @ResponseBody public ModelAndView newreportForm(HttpSession session) throws Exception {\n ModelAndView mav = new ModelAndView();\n mav.setViewName(\"/sysAdmin/reports/details\");\n\n //Create a new blank provider.\n reports report = new reports();\n \n mav.addObject(\"btnValue\", \"Create\");\n mav.addObject(\"reportdetails\", report);\n\n return mav;\n }",
"@RequestMapping(path = \"/sigQuotaLocaliteView/add/{idSelection}\", method = RequestMethod.GET)\n public String createSigQuotaLocalite(Model model, @PathVariable(value = \"idSelection\") String idSelection)\n {\n \t\n \t\n \tList<SigQuotaSelection> listSelection1 = sigQuotaSelectionService.detailSelection1(idSelection);\n\t\t model.addAttribute(\"listSelection1\", listSelection1);\n\t\t model.addAttribute(\"sigQuotaSelection\", new SigQuotaSelection());\n \t\n User user = (User)SecurityContextHolder.getContext().getAuthentication().getPrincipal();\n\t model.addAttribute(\"user\", user);\n\t \n\t \n\t SigQuotaSelection sigQuotaSelection = new SigQuotaSelection();\n\t model.addAttribute(\"sigQuotaSelection\", sigQuotaSelection);\n\t List<SigQuotaSelection> allSigQuotaSelection = (List<SigQuotaSelection>) sigQuotaSelectionService.findAll();\n\t model.addAttribute(\"allSigQuotaSelection\", allSigQuotaSelection);\n\t\t\t\t \n\t\t\t\t SigLocalite SigLocalite = new SigLocalite();\n\t\t model.addAttribute(\"SigLocalite\", SigLocalite);\n\t\t List<SigLocalite> allSigLocalite = (List<SigLocalite>) sigLocaliteService.findAllOrder();\n\t\t model.addAttribute(\"allSigLocalite\", allSigLocalite);\n\t \n model.addAttribute(\"sigQuotaLocalite\", new SigQuotaLocalite());\n\t\t\n\t\t\n\n\t\t\n return \"admin/saveSigQuotaLocaliteView.html\";\n }",
"private void onClickBtAdd() {\n\t\tDbAdapter db = new DbAdapter(this);\n\t\tdb.open();\n\n\t\tfloat amount = 0;\n\n\t\ttry {\n\t\t\tamount = Float.parseFloat(etAmount.getText().toString());\n\t\t} catch (Exception e) {\n\t\t\tamount = 0;\n\t\t}\n\n\t\t// create a medicine event\n\t\tdb.createMedicineEvent(amount,\n\t\t\t\tnew Functions().getDateAsStringFromCalendar(mCalendar),\n\t\t\t\tspMedicine.getSelectedItemId());\n\n\t\tdb.close();\n\n\t\tActivityGroupTracking.group.restartThisActivity();\n\n\t\t// clear the edittext\n\t\tetAmount.setText(\"\");\n\n\t\t// Go to tracking tab when clicked on add\n\t\tShowHomeTab parentActivity;\n\t\tparentActivity = (ShowHomeTab) this.getParent().getParent();\n\t\tparentActivity.goToTab(DataParser.activityIDTracking);\n\t}",
"public abstract void addSelectorForm();",
"public void newProject(View V){\n Intent i = new Intent(this, NewProject.class);\n i.putExtra(\"course title\",courseTitle);\n startActivity(i);\n }"
] | [
"0.6307684",
"0.6021121",
"0.58142483",
"0.5756697",
"0.5696116",
"0.5685552",
"0.56672585",
"0.56516856",
"0.5593909",
"0.55725425",
"0.55592513",
"0.55147517",
"0.5466614",
"0.5461267",
"0.54144317",
"0.53783566",
"0.537118",
"0.5347981",
"0.53366673",
"0.53191686",
"0.5305987",
"0.5291546",
"0.52881235",
"0.52811724",
"0.5264139",
"0.52553666",
"0.5252467",
"0.5250772",
"0.5228909",
"0.5205652",
"0.5201872",
"0.5201752",
"0.5184849",
"0.5183088",
"0.51804674",
"0.51665837",
"0.51623553",
"0.5154926",
"0.5152454",
"0.51424116",
"0.51391816",
"0.51351553",
"0.5120013",
"0.51182103",
"0.5107433",
"0.5102666",
"0.51014715",
"0.5098362",
"0.5097103",
"0.5094688",
"0.5093796",
"0.50900185",
"0.5087974",
"0.50851524",
"0.5083819",
"0.5070178",
"0.5066285",
"0.5064564",
"0.50629085",
"0.50591063",
"0.5054638",
"0.5054105",
"0.50461984",
"0.50447905",
"0.5025156",
"0.502346",
"0.502263",
"0.50200593",
"0.5017724",
"0.50169",
"0.5007991",
"0.5007623",
"0.50059986",
"0.5000045",
"0.49994776",
"0.49925438",
"0.49887314",
"0.4987094",
"0.4985716",
"0.4976609",
"0.49764162",
"0.49711785",
"0.497112",
"0.49698982",
"0.49662864",
"0.49626687",
"0.49613857",
"0.49564672",
"0.49532914",
"0.49528578",
"0.4952035",
"0.4949135",
"0.4944612",
"0.49439824",
"0.49423328",
"0.49420866",
"0.4937335",
"0.4935743",
"0.49340463",
"0.4932242",
"0.49318868"
] | 0.0 | -1 |
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor. | @SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
descripTextField = new javax.swing.JTextField();
jLabel3 = new javax.swing.JLabel();
validButton = new javax.swing.JButton();
startHour = new javax.swing.JTextField();
endHour = new javax.swing.JTextField();
eventLabel = new javax.swing.JLabel();
startMinute = new javax.swing.JTextField();
jLabel4 = new javax.swing.JLabel();
endMinute = new javax.swing.JTextField();
jLabel5 = new javax.swing.JLabel();
jLabel6 = new javax.swing.JLabel();
jLabel7 = new javax.swing.JLabel();
jLabel8 = new javax.swing.JLabel();
dateTextField = new javax.swing.JTextField();
todayRadioButton = new javax.swing.JRadioButton();
alerteEmptyField = new javax.swing.JLabel();
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
jLabel1.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
jLabel1.setText("Heure de début :");
jLabel2.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
jLabel2.setText("Heure de fin :");
descripTextField.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
descripTextFieldActionPerformed(evt);
}
});
jLabel3.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
jLabel3.setText("Description (optionnelle)");
validButton.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
validButton.setText("Valider");
validButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
validButtonActionPerformed(evt);
}
});
startHour.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
startHourActionPerformed(evt);
}
});
endHour.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
endHourActionPerformed(evt);
}
});
eventLabel.setText("Ajouter une " + eventType);
eventLabel.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
jLabel4.setText("H");
jLabel5.setText("H");
jLabel6.setText("min");
jLabel7.setText("min");
jLabel8.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
jLabel8.setText("Le : (ex: 27/08/2001)");
todayRadioButton.setText("Aujourd'hui");
todayRadioButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
todayRadioButtonActionPerformed(evt);
}
});
alerteEmptyField.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
alerteEmptyField.setForeground(new java.awt.Color(255, 0, 51));
alerteEmptyField.setText("Champ obligatoire vide /!\\");
alerteEmptyField.addComponentListener(new java.awt.event.ComponentAdapter() {
public void componentShown(java.awt.event.ComponentEvent evt) {
alerteEmptyFieldComponentShown(evt);
}
});
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(119, 119, 119)
.addComponent(eventLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 190, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(descripTextField)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel1)
.addComponent(jLabel2)
.addComponent(jLabel8))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 91, Short.MAX_VALUE)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(startHour, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(endHour, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addGroup(layout.createSequentialGroup()
.addComponent(jLabel4)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(startMinute, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 9, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(20, 20, 20)
.addComponent(endMinute, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE))))
.addComponent(dateTextField, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(10, 10, 10)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel6)
.addComponent(jLabel7))
.addGap(38, 38, 38))
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(todayRadioButton)
.addGroup(layout.createSequentialGroup()
.addGap(63, 63, 63)
.addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 263, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addGap(99, 99, 99)
.addComponent(validButton)
.addGap(18, 18, 18)
.addComponent(alerteEmptyField, javax.swing.GroupLayout.PREFERRED_SIZE, 218, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGap(0, 0, Short.MAX_VALUE)))
.addContainerGap())
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(eventLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, Short.MAX_VALUE)
.addComponent(todayRadioButton)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(dateTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(startHour, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(startMinute, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel4)
.addComponent(jLabel6))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(endHour, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(endMinute, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel5)
.addComponent(jLabel7))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel3)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(descripTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 82, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(alerteEmptyField, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(validButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addContainerGap())
);
pack();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Form() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public frmRectangulo() {\n initComponents();\n }",
"public form() {\n initComponents();\n }",
"public AdjointForm() {\n initComponents();\n setDefaultCloseOperation(HIDE_ON_CLOSE);\n }",
"public FormListRemarking() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n \n }",
"public FormPemilihan() {\n initComponents();\n }",
"public GUIForm() { \n initComponents();\n }",
"public FrameForm() {\n initComponents();\n }",
"public TorneoForm() {\n initComponents();\n }",
"public FormCompra() {\n initComponents();\n }",
"public muveletek() {\n initComponents();\n }",
"public Interfax_D() {\n initComponents();\n }",
"public quanlixe_form() {\n initComponents();\n }",
"public SettingsForm() {\n initComponents();\n }",
"public RegistrationForm() {\n initComponents();\n this.setLocationRelativeTo(null);\n }",
"public Soru1() {\n initComponents();\n }",
"public FMainForm() {\n initComponents();\n this.setResizable(false);\n setLocationRelativeTo(null);\n }",
"public soal2GUI() {\n initComponents();\n }",
"public EindopdrachtGUI() {\n initComponents();\n }",
"public MechanicForm() {\n initComponents();\n }",
"public AddDocumentLineForm(java.awt.Frame parent) {\n super(parent);\n initComponents();\n myInit();\n }",
"public BloodDonationGUI() {\n initComponents();\n }",
"public quotaGUI() {\n initComponents();\n }",
"public Customer_Form() {\n initComponents();\n setSize(890,740);\n \n \n }",
"public PatientUI() {\n initComponents();\n }",
"public Oddeven() {\n initComponents();\n }",
"public myForm() {\n\t\t\tinitComponents();\n\t\t}",
"public intrebarea() {\n initComponents();\n }",
"public Magasin() {\n initComponents();\n }",
"public RadioUI()\n {\n initComponents();\n }",
"public NewCustomerGUI() {\n initComponents();\n }",
"public ZobrazUdalost() {\n initComponents();\n }",
"public FormUtama() {\n initComponents();\n }",
"public p0() {\n initComponents();\n }",
"public INFORMACION() {\n initComponents();\n this.setLocationRelativeTo(null); \n }",
"public ProgramForm() {\n setLookAndFeel();\n initComponents();\n }",
"public AmountReleasedCommentsForm() {\r\n initComponents();\r\n }",
"public form2() {\n initComponents();\n }",
"public MainForm() {\n\t\tsuper(\"Hospital\", List.IMPLICIT);\n\n\t\tstartComponents();\n\t}",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n setRequestFocusEnabled(false);\n setVerifyInputWhenFocusTarget(false);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 465, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 357, Short.MAX_VALUE)\n );\n }",
"public LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }",
"public kunde() {\n initComponents();\n }",
"public MusteriEkle() {\n initComponents();\n }",
"public frmMain() {\n initComponents();\n }",
"public frmMain() {\n initComponents();\n }",
"public DESHBORDPANAL() {\n initComponents();\n }",
"public frmVenda() {\n initComponents();\n }",
"public GUIForm() {\n initComponents();\n inputField.setText(NO_FILE_SELECTED);\n outputField.setText(NO_FILE_SELECTED);\n progressLabel.setBackground(INFO);\n progressLabel.setText(SELECT_FILE);\n }",
"public FrmMenu() {\n initComponents();\n }",
"public Botonera() {\n initComponents();\n }",
"public OffertoryGUI() {\n initComponents();\n setTypes();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setBackground(new java.awt.Color(255, 255, 255));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 983, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 769, Short.MAX_VALUE)\n );\n\n pack();\n }",
"public JFFornecedores() {\n initComponents();\n }",
"public EnterDetailsGUI() {\n initComponents();\n }",
"public vpemesanan1() {\n initComponents();\n }",
"public Kost() {\n initComponents();\n }",
"public FormHorarioSSE() {\n initComponents();\n }",
"public frmacceso() {\n initComponents();\n }",
"public UploadForm() {\n initComponents();\n }",
"public HW3() {\n initComponents();\n }",
"public Managing_Staff_Main_Form() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(null);\n\n pack();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }",
"public sinavlar2() {\n initComponents();\n }",
"public P0405() {\n initComponents();\n }",
"public MiFrame2() {\n initComponents();\n }",
"public IssueBookForm() {\n initComponents();\n }",
"public Choose1() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n\n String oldAuthor = prefs.get(\"AUTHOR\", \"\");\n if(oldAuthor != null) {\n this.authorTextField.setText(oldAuthor);\n }\n String oldBook = prefs.get(\"BOOK\", \"\");\n if(oldBook != null) {\n this.bookTextField.setText(oldBook);\n }\n String oldDisc = prefs.get(\"DISC\", \"\");\n if(oldDisc != null) {\n try {\n int oldDiscNum = Integer.parseInt(oldDisc);\n oldDiscNum++;\n this.discNumberTextField.setText(Integer.toString(oldDiscNum));\n } catch (Exception ex) {\n this.discNumberTextField.setText(oldDisc);\n }\n this.bookTextField.setText(oldBook);\n }\n\n\n }",
"public GUI_StudentInfo() {\n initComponents();\n }",
"public Lihat_Dokter_Keseluruhan() {\n initComponents();\n }",
"public JFrmPrincipal() {\n initComponents();\n }",
"public bt526() {\n initComponents();\n }",
"public Pemilihan_Dokter() {\n initComponents();\n }",
"public Ablak() {\n initComponents();\n }",
"@Override\n\tprotected void initUi() {\n\t\t\n\t}",
"@SuppressWarnings(\"unchecked\")\n\t// <editor-fold defaultstate=\"collapsed\" desc=\"Generated\n\t// Code\">//GEN-BEGIN:initComponents\n\tprivate void initComponents() {\n\n\t\tlabel1 = new java.awt.Label();\n\t\tlabel2 = new java.awt.Label();\n\t\tlabel3 = new java.awt.Label();\n\t\tlabel4 = new java.awt.Label();\n\t\tlabel5 = new java.awt.Label();\n\t\tlabel6 = new java.awt.Label();\n\t\tlabel7 = new java.awt.Label();\n\t\tlabel8 = new java.awt.Label();\n\t\tlabel9 = new java.awt.Label();\n\t\tlabel10 = new java.awt.Label();\n\t\ttextField1 = new java.awt.TextField();\n\t\ttextField2 = new java.awt.TextField();\n\t\tlabel14 = new java.awt.Label();\n\t\tlabel15 = new java.awt.Label();\n\t\tlabel16 = new java.awt.Label();\n\t\ttextField3 = new java.awt.TextField();\n\t\ttextField4 = new java.awt.TextField();\n\t\ttextField5 = new java.awt.TextField();\n\t\tlabel17 = new java.awt.Label();\n\t\tlabel18 = new java.awt.Label();\n\t\tlabel19 = new java.awt.Label();\n\t\tlabel20 = new java.awt.Label();\n\t\tlabel21 = new java.awt.Label();\n\t\tlabel22 = new java.awt.Label();\n\t\ttextField6 = new java.awt.TextField();\n\t\ttextField7 = new java.awt.TextField();\n\t\ttextField8 = new java.awt.TextField();\n\t\tlabel23 = new java.awt.Label();\n\t\ttextField9 = new java.awt.TextField();\n\t\ttextField10 = new java.awt.TextField();\n\t\ttextField11 = new java.awt.TextField();\n\t\ttextField12 = new java.awt.TextField();\n\t\tlabel24 = new java.awt.Label();\n\t\tlabel25 = new java.awt.Label();\n\t\tlabel26 = new java.awt.Label();\n\t\tlabel27 = new java.awt.Label();\n\t\tlabel28 = new java.awt.Label();\n\t\tlabel30 = new java.awt.Label();\n\t\tlabel31 = new java.awt.Label();\n\t\tlabel32 = new java.awt.Label();\n\t\tjButton1 = new javax.swing.JButton();\n\n\t\tlabel1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel1.setText(\"It seems that some of the buttons on the ATM machine are not working!\");\n\n\t\tlabel2.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel2.setText(\"Unfortunately these numbers are exactly what Professor has to use to type in his password.\");\n\n\t\tlabel3.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel3.setText(\n\t\t\t\t\"If you want to eat tonight, you have to help him out and construct the numbers of the password with the working buttons and math operators.\");\n\n\t\tlabel4.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tlabel4.setText(\"Denver's Password: 2792\");\n\n\t\tlabel5.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel5.setText(\"import java.util.Scanner;\\n\");\n\n\t\tlabel6.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel6.setText(\"public class ATM{\");\n\n\t\tlabel7.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel7.setText(\"public static void main(String[] args){\");\n\n\t\tlabel8.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel8.setText(\"System.out.print(\");\n\n\t\tlabel9.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel9.setText(\" -\");\n\n\t\tlabel10.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel10.setText(\");\");\n\n\t\ttextField1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\ttextField1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tlabel14.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel14.setText(\"System.out.print( (\");\n\n\t\tlabel15.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel15.setText(\"System.out.print(\");\n\n\t\tlabel16.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel16.setText(\"System.out.print( ( (\");\n\n\t\tlabel17.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel17.setText(\")\");\n\n\t\tlabel18.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel18.setText(\" +\");\n\n\t\tlabel19.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel19.setText(\");\");\n\n\t\tlabel20.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel20.setText(\" /\");\n\n\t\tlabel21.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel21.setText(\" %\");\n\n\t\tlabel22.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel22.setText(\" +\");\n\n\t\tlabel23.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel23.setText(\");\");\n\n\t\tlabel24.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel24.setText(\" +\");\n\n\t\tlabel25.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel25.setText(\" /\");\n\n\t\tlabel26.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel26.setText(\" *\");\n\n\t\tlabel27.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n\t\tlabel27.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel27.setText(\")\");\n\n\t\tlabel28.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel28.setText(\")\");\n\n\t\tlabel30.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel30.setText(\"}\");\n\n\t\tlabel31.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel31.setText(\"}\");\n\n\t\tlabel32.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel32.setText(\");\");\n\n\t\tjButton1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tjButton1.setText(\"Check\");\n\t\tjButton1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tjButton1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tjavax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n\t\tlayout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(28).addGroup(layout\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING).addComponent(getDoneButton()).addComponent(jButton1)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, 774, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addGap(92).addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15, GroupLayout.PREFERRED_SIZE, 145,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(2)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(37))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(174)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(7)))\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label23, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20).addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(23).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel10, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16, GroupLayout.PREFERRED_SIZE, 177,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));\n\t\tlayout.setVerticalGroup(\n\t\t\t\tlayout.createParallelGroup(Alignment.LEADING).addGroup(layout.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup().addGroup(layout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(19)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(78)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(76)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(75)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(27))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel23,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(29)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))))\n\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t.addGap(30)\n\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(25)\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(26).addComponent(jButton1).addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(getDoneButton()).addContainerGap(23, Short.MAX_VALUE)));\n\t\tthis.setLayout(layout);\n\n\t\tlabel16.getAccessibleContext().setAccessibleName(\"System.out.print( ( (\");\n\t\tlabel17.getAccessibleContext().setAccessibleName(\"\");\n\t\tlabel18.getAccessibleContext().setAccessibleName(\" +\");\n\t}",
"public Pregunta23() {\n initComponents();\n }",
"public FormMenuUser() {\n super(\"Form Menu User\");\n initComponents();\n }",
"public AvtekOkno() {\n initComponents();\n }",
"public busdet() {\n initComponents();\n }",
"public ViewPrescriptionForm() {\n initComponents();\n }",
"public Ventaform() {\n initComponents();\n }",
"public Kuis2() {\n initComponents();\n }",
"public CreateAccount_GUI() {\n initComponents();\n }",
"public POS1() {\n initComponents();\n }",
"public Carrera() {\n initComponents();\n }",
"public EqGUI() {\n initComponents();\n }",
"public JFriau() {\n initComponents();\n this.setLocationRelativeTo(null);\n this.setTitle(\"BuNus - Budaya Nusantara\");\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setBackground(new java.awt.Color(204, 204, 204));\n setMinimumSize(new java.awt.Dimension(1, 1));\n setPreferredSize(new java.awt.Dimension(760, 402));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 750, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n }",
"public nokno() {\n initComponents();\n }",
"public dokter() {\n initComponents();\n }",
"public ConverterGUI() {\n initComponents();\n }",
"public hitungan() {\n initComponents();\n }",
"public Modify() {\n initComponents();\n }",
"public FP_Calculator_GUI() {\n initComponents();\n \n setVisible(true);\n }",
"public frmAddIncidencias() {\n initComponents();\n }"
] | [
"0.73192346",
"0.7290526",
"0.7290526",
"0.7290526",
"0.7285891",
"0.72480357",
"0.7213616",
"0.7207808",
"0.71955067",
"0.71891475",
"0.71844363",
"0.7159038",
"0.71474695",
"0.7092269",
"0.7079923",
"0.70560205",
"0.69864315",
"0.697697",
"0.69552195",
"0.6953691",
"0.69458604",
"0.6942849",
"0.6935743",
"0.6930747",
"0.69286084",
"0.6924837",
"0.69246644",
"0.6911876",
"0.69103247",
"0.68922365",
"0.6891582",
"0.68904996",
"0.68901706",
"0.6888661",
"0.68829393",
"0.6881672",
"0.6880505",
"0.68782157",
"0.6875765",
"0.6874406",
"0.68711114",
"0.6859388",
"0.6856025",
"0.68551815",
"0.6855079",
"0.6855076",
"0.68530315",
"0.68524104",
"0.68524104",
"0.6843717",
"0.68364704",
"0.6836458",
"0.6828335",
"0.68279964",
"0.6826276",
"0.68240345",
"0.6823631",
"0.68171996",
"0.6816324",
"0.68097955",
"0.68088883",
"0.68078303",
"0.6807776",
"0.680721",
"0.680251",
"0.6795605",
"0.6794452",
"0.67921954",
"0.67907083",
"0.678904",
"0.6787817",
"0.6787755",
"0.67814714",
"0.67663145",
"0.6765024",
"0.67649895",
"0.6756559",
"0.6754775",
"0.6751848",
"0.67506975",
"0.67435455",
"0.6738591",
"0.6737042",
"0.6735227",
"0.6732907",
"0.6726301",
"0.6726003",
"0.67197675",
"0.67156976",
"0.6714806",
"0.6713657",
"0.6708582",
"0.67078584",
"0.6705488",
"0.6700733",
"0.6699659",
"0.6698679",
"0.66974026",
"0.6693979",
"0.66902804",
"0.6690275"
] | 0.0 | -1 |
Using an Anchor Pane as the root pane in this screen | @Override
public Scene createScene(Stage stage) {
AnchorPane anchor = new AnchorPane();
anchor.setPadding(new Insets(10, 10, 10, 10));
//Screen Title displayed and anchored at top
Label titleText = new Label("Create Your Playlist");
titleText.getStyleClass().add("label-title");
titleText.setAlignment(Pos.CENTER);
VBox titleBox = new VBox();
titleBox.setPadding(new Insets(15, 10, 10, 10));
titleBox.getChildren().add(titleText);
titleBox.setAlignment(Pos.CENTER_LEFT);
//set theme, if applicable
String theme = gd.getLobby().getTheme();
if (!theme.equals("")) {
Label themeLabel = new Label("Theme: " + theme);
themeLabel.setAlignment(Pos.CENTER_LEFT);
themeLabel.setPadding(new Insets(0, 10, 10, 10));
titleBox.getChildren().add(themeLabel);
}
AnchorPane.setTopAnchor(titleBox, null);
//Get names of all mp3s
File folder = new File(System.getProperty("user.dir") + "/bin/resources/Songs");
File[] listOfFiles = folder.listFiles();
for (int i = 0; i < listOfFiles.length; i++) {
if (listOfFiles[i].isFile() && listOfFiles[i].getName().contains(".mp3")) {
String[] parts = listOfFiles[i].getName().split("-");
Song s = new Song(parts[0].substring(0,parts[0].length()-1), parts[1].substring(1, parts[1].length()-4));
allSongs.add(s);
}
}
//Search Box and Results displayed in Center anchor with Playlist and Add Button
VBox leftVBox = addLeftVBox(songs);
VBox rightVBox = addRightVBox();
VBox nameVBox = addNameVBox();
VBox centerVBox = new VBox();
Button addButton = new Button();
addButton.setText("Add Song");
addButton.setPrefWidth(150.0);
//Add Song Button Functionality
addButton.setOnAction(new EventHandler<ActionEvent>() {
public void handle(ActionEvent e) {
Song selectedSong = searchResults.getSelectionModel().getSelectedItem();
if (selectedSong != null && numSongs < maxSongs) {
mySongs.add(selectedSong);
numSongs++;
}
if (selectedSong != null)
setPlaylistMade();
}
});
//Delete Song button and Functionality
Button delButton = new Button();
delButton.setText("Delete Song");
delButton.setPrefWidth(150.0);
delButton.setOnAction(new EventHandler<ActionEvent>() {
public void handle(ActionEvent e) {
if (playlist.getSelectionModel().getSelectedIndex() != -1) {
mySongs.remove(playlist.getSelectionModel().getSelectedIndex());
numSongs--;
decrementPlayistLength();
}
}
});
centerVBox.getChildren().addAll(addButton, delButton);
centerVBox.setSpacing(10.0);
centerVBox.setAlignment(Pos.CENTER);
GridPane inputGrid = new GridPane();
inputGrid.setHgap(20.0);
inputGrid.setVgap(10.0);
inputGrid.setPadding(new Insets(10, 10, 10, 10));
GridPane.setConstraints(leftVBox, 0, 1, 3, 4, null, null, null, null, null); // Bridget moved this down by 1
GridPane.setConstraints(centerVBox, 3, 3, 2, 1, null, null, null, null, null);
GridPane.setConstraints(nameVBox, 6, 0, 3, 1, null, null, null, null, null);
GridPane.setConstraints(rightVBox, 6, 1, 3, 4, null, null, null, null, null);
inputGrid.getChildren().addAll(leftVBox, centerVBox, rightVBox, nameVBox);
AnchorPane.setLeftAnchor(inputGrid, 10.0);
AnchorPane.setRightAnchor(inputGrid, 10.0);
AnchorPane.setTopAnchor(inputGrid, 100.0);
AnchorPane.setBottomAnchor(inputGrid, 100.0);
// Button to Save playlist anchored to bottom right of page
saveButton = new Button();
saveButton.setText("Save Playlist");
saveButton.setDisable(true);
saveButton.setOnAction(new EventHandler<ActionEvent>() {
public void handle(ActionEvent e) {
playerName = playerNameField.getText();
playlistName = playlistNameField.getText();
if (!playerName.equals("") && !playlistName.equals("")) { //if the player name AND playlist name field is filled
notifyObserver("listen");
Playlist p = new Playlist(playlistNameField.getText());
for (Song s : mySongs) {
p.addSong(s);
}
Player player = new Player(playerNameField.getText());
player.setPlaylist(p);
// send playlist to another class
gd.update(player);
notifyObserver("listen");
}
else if (playerName.equals("") && playlistName.equals("")) { //no player name and no playlist name
String msg = "You are missing the player name and playlist name. Please fill them out before moving forward.";
informPlayerOfMissingFields(msg);
}
else if (playerName.equals("")) { //no player name
String msg = "You are missing the player name. Please fill it out before moving forward.";
informPlayerOfMissingFields(msg);
}
else { //no playlist name
String msg = "You are missing the playlist name. Please fill it out before moving forward.";
informPlayerOfMissingFields(msg);
}
}
});
AnchorPane.setBottomAnchor(saveButton, 20.0);
AnchorPane.setRightAnchor(saveButton, 20.0);
anchor.getChildren().addAll(titleBox, inputGrid, saveButton);
Scene cpScene = new Scene(anchor, 275, 250);
cpScene.getStylesheets().add("application/application.css");
return cpScene;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setRoot(AnchorPane ap) {\n\t\t\r\n\t}",
"protected AnchorPane makeAnchorPane() {\n return new AnchorPane();\n }",
"public AnchorPane getAnchorPane(){return anchorPane;}",
"private Parent rootScene() {\r\n hBox = new HBox();\r\n hBox.setSpacing(10);\r\n hBox.setStyle(\"-fx-background-color: #082B59;\");\r\n hBox.getChildren().addAll(btnCam, btnManAut);\r\n\r\n root.setBottom(hBox);\r\n root.setCenter(imageView);\r\n root.setStyle(\"-fx-background-color: #0A2D68;\");\r\n\r\n return root;\r\n }",
"public AnchorPane getContent(){\r\n\t\treturn root;\r\n\t}",
"public AnchorPane addAnchorPane(VBox vb) {\n\n AnchorPane anchorpane = new AnchorPane();\n\n\n HBox hb = new HBox();\n hb.setPadding(new Insets(0, 10, 10, 10));\n hb.setSpacing(10);\n\n anchorpane.getChildren().addAll(vb,hb);\n // Anchor buttons to bottom right, anchor grid to top\n AnchorPane.setBottomAnchor(hb, 8.0);\n AnchorPane.setRightAnchor(hb, 5.0);\n AnchorPane.setTopAnchor(vb, 10.0);\n\n return anchorpane;\n }",
"public PaneOrganizer() {\n\t\t\n\t\t_root = new BorderPane();\n\t\t_game = new Game(_root);\n\t\tthis.setupButton();\n\t\t\n\t}",
"private void initRootLayout() {\n try {\n // Load root layout from fxml file.\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(MainApp.class.getResource(VIEW_ROOT_LAYOUT_FXML));\n rootLayout = loader.load();\n\n mApplicationCompositionRoot = new ApplicationCompositionRoot(this, rootLayout);\n\n //grab your root here\n rootLayout.setOnMousePressed(event -> {\n xOffset = event.getSceneX();\n yOffset = event.getSceneY();\n });\n\n //move around here\n rootLayout.setOnMouseDragged(event -> {\n mPrimaryStage.setX(event.getScreenX() - xOffset);\n mPrimaryStage.setY(event.getScreenY() - yOffset);\n });\n\n // Show the scene containing the root layout.\n Scene scene = new Scene(rootLayout);\n mPrimaryStage.setScene(scene);\n mPrimaryStage.show();\n\n //Give the controller access to the main app.\n RootLayout controller = loader.getController();\n controller.setMainApp(this);\n\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public Pane getRoot() {\n \treturn _root;\n }",
"@Override\n\tpublic void setPane() {\n\t\tNewTaskPane textListPane = new NewTaskPane();\n\t\trootPane = new HomePane(new MainLeftPane(),textListPane);\t\t\n\t}",
"@Override\n\tpublic void setPane() {\n\t\tNewSchedulePane SchListPane = new NewSchedulePane();\n\t\trootPane = new HomePane(new MainLeftPane(),SchListPane);\n\t}",
"public void show (View anchor) {\r\n\t\t//preShow();\r\n\t\t\r\n\t\tif (mRootView == null) \r\n\t\t\tthrow new IllegalStateException(\"setContentView was not called with a view to display.\");\r\n\t\r\n\t\tif (mBackground == null) \r\n\t\t\tmWindow.setBackgroundDrawable(new BitmapDrawable());\r\n\t\telse \r\n\t\t\tmWindow.setBackgroundDrawable(mBackground);\r\n\r\n\t\tmWindow.setWidth(WindowManager.LayoutParams.WRAP_CONTENT);\r\n\t\tmWindow.setHeight(WindowManager.LayoutParams.WRAP_CONTENT);\r\n\t\tmWindow.setTouchable(true);\r\n\t\tmWindow.setFocusable(true);\r\n\t\tmWindow.setOutsideTouchable(true);\r\n\r\n\t\tmWindow.setContentView(mRootView);\t\r\n\t\t\r\n\t\tboolean flag;\r\n\t\t\r\n\t\tint xPos=0, yPos=0, arrowPos=0;\r\n\r\n\t\tmDidAction = false;\r\n\r\n\t\tint[] location = new int[2];\r\n\r\n\t\tanchor.getLocationOnScreen(location);\r\n\r\n\t\tRect anchorRect = new Rect(location[0], location[1], location[0]\r\n\t\t\t\t+ anchor.getWidth(), location[1] + anchor.getHeight());\r\n\r\n\t\t// mRootView.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));\r\n\t\t\r\n\t\t\r\n\t\tint screenWidth = mWindowManager.getDefaultDisplay().getWidth();\r\n\t\tint screenHeight = mWindowManager.getDefaultDisplay().getHeight();\r\n\t\t\r\n\t\tint dyTop;\r\n\t\tint dyBottom;\r\n\t\tint dxLeft;\r\n\t\tint dxRight;\r\n\t\t\r\n\t\tDisplayMetrics dm = new DisplayMetrics();\r\n\t\tmWindowManager.getDefaultDisplay().getMetrics(dm);\r\n\t\tint dH = (int) (15 * dm.scaledDensity);\r\n\r\n\t\tboolean onTop;\r\n\t\tboolean onLeft;\r\n\t\t\r\n\t\t//mRootView.setLayoutParams(new LayoutParams(rootWidth, rootHeight));\r\n\t\t\r\n\t\tif (mArrowVerticalOrientatiom) {\r\n\t\t\t\r\n\t\t\tmRootView.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));\r\n\t\t\t//mRootView.measure(MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED), MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED));\r\n\t\t\tif(VERTICAL==mOrientation)\r\n\t\t\t\tmRootView.measure(MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED),MeasureSpec.makeMeasureSpec(screenHeight, MeasureSpec.AT_MOST));\r\n\t\t\telse\r\n\t\t\t\tmRootView.measure(MeasureSpec.makeMeasureSpec(screenWidth, MeasureSpec.AT_MOST),MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED));\r\n\t\t\t//mRootView.measure(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT);\r\n\t\t\trootHeight = mRootView.getMeasuredHeight();\r\n\t\t\trootWidth = mRootView.getMeasuredWidth();\r\n\r\n\t\t\tdyTop = anchorRect.top;\r\n\t\t\tdyBottom = screenHeight - anchorRect.bottom;\r\n\t\t\tdxLeft = anchorRect.right;\r\n\t\t\tdxRight = screenWidth - anchorRect.left;\r\n\r\n\t\t\tonTop = (dyTop > dyBottom) ? true : false;\r\n\t\t\tonLeft = (dxLeft > dxRight) ? true : false;\r\n\t\t\t\r\n\t\t\trootHeight = mRootView.getMeasuredHeight();\r\n\t\t\trootWidth = mRootView.getMeasuredWidth();\r\n\r\n\t\t\tif (rootWidth >= screenWidth) {\r\n\t\t\t\txPos = 0;\r\n\t\t\t\tarrowPos = anchorRect.centerX();\r\n\t\t\t\trootWidth=screenWidth;\r\n\t\t\t} else {\r\n\t\t\t\tif (onLeft) {\r\n\t\t\t\t\tif (rootWidth > dxLeft) {\r\n\t\t\t\t\t\txPos = 0;\r\n\t\t\t\t\t\tarrowPos = anchorRect.centerX();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\txPos = anchorRect.right - rootWidth;\r\n\t\t\t\t\t\tarrowPos = anchorRect.centerX() - xPos;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\txPos = anchorRect.left;\r\n\r\n\t\t\t\t\tif (rootWidth > dxRight) {\r\n\t\t\t\t\t\txPos = screenWidth - 15 - rootWidth;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tarrowPos = anchorRect.centerX() - xPos;\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\tif (onTop) {\r\n\t\t\t\tif (rootHeight > dyTop) {\r\n\t\t\t\t\tyPos = 0;\r\n\t\t\t\t\tLayoutParams l = mScroller.getLayoutParams();\r\n\t\t\t\t\tl.height = dyTop - (2*dH);\r\n\t\t\t\t\trootHeight=dyTop;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tyPos = anchorRect.top - rootHeight;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tyPos = anchorRect.bottom;\r\n\r\n\t\t\t\tif (rootHeight > dyBottom) {\r\n\t\t\t\t\tLayoutParams l = mScroller.getLayoutParams();\r\n\t\t\t\t\tl.height = dyBottom - 2*dH;\r\n\t\t\t\t\trootHeight=dyBottom;\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\t\r\n\r\n\t\t\tshowVerticalArrow(((onTop) ? R.id.arrow_down : R.id.arrow_up),\r\n\t\t\t\t\tarrowPos);\r\n\r\n\t\t\tsetAnimationStyleVerticalArrow(screenWidth, anchorRect.centerX(),\r\n\t\t\t\t\tonTop);\r\n\r\n\t\t\tmWindow.showAtLocation(anchor, Gravity.NO_GRAVITY, xPos, yPos);\r\n\t\t\tmWindow.update(rootWidth, rootHeight);\r\n\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\t\r\n\t\t\tif(VERTICAL==mOrientation)\r\n\t\t\t\tmRootView.measure(MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED),MeasureSpec.makeMeasureSpec(screenHeight, MeasureSpec.AT_MOST));\r\n\t\t\telse\r\n\t\t\t\tmRootView.measure(MeasureSpec.makeMeasureSpec(screenWidth, MeasureSpec.AT_MOST),MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED));\r\n\t\t\t//mRootView.measure(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT);\r\n\t\t\trootHeight = mRootView.getMeasuredHeight();\r\n\t\t\trootWidth = mRootView.getMeasuredWidth();\r\n\t\t\t\r\n\t\t\tdyTop = anchorRect.bottom;\r\n\t\t\tdyBottom = screenHeight - anchorRect.top;\r\n\t\t\tdxLeft = anchorRect.left;\r\n\t\t\tdxRight = screenWidth - anchorRect.right;\r\n\t\t\t\r\n\t\t\tonTop = (dyTop > dyBottom) ? true : false;\r\n\t\t\tonLeft = (dxLeft > dxRight) ? true : false;\r\n\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t// automatically get Y coord of popup (top left)\r\n\t\t\t\r\n\t\t\tif(rootHeight>=screenHeight) {\r\n\t\t\t\tyPos = 0;\r\n\t\t\t\tarrowPos = anchorRect.centerY();\r\n\t\t\t\trootHeight=screenHeight;\r\n\t\t\t} else {\r\n\t\t\t\tif (onTop) {\r\n\t\t\t\t\tif (rootHeight > dyTop) {\r\n\t\t\t\t\t\tyPos = 0;\r\n\t\t\t\t\t\tarrowPos=anchorRect.centerY()-yPos;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tyPos = (int) (anchorRect.bottom - rootHeight+0.5*dH);\r\n\t\t\t\t\t\tarrowPos=anchorRect.centerY()-yPos;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tyPos = anchorRect.top-dH;\r\n\r\n\t\t\t\t\tif (rootHeight > dyBottom) {\r\n\t\t\t\t\t\tyPos=screenHeight - rootHeight-dH;\r\n\t\t\t\t\t\tyPos=(yPos<0?0:yPos);\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\tarrowPos=anchorRect.centerY()-yPos;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\t\t\t\r\n\t\t\t\r\n\t\t\tif (onLeft) {\r\n\t\t\t\tif (rootWidth > dxLeft) {\r\n\t\t\t\t\txPos = 0;\t\t\t\t\t\r\n\t\t\t\t\trootWidth = dxLeft;\r\n\t\t\t\t} else {\r\n\t\t\t\t\txPos = anchorRect.left - rootWidth;\r\n\t\t\t\t}\r\n\t\t\t\tLayoutParams l = mScroller.getLayoutParams();\r\n\t\t\t\t//LayoutParams l = mTrack.getLayoutParams();\r\n\t\t\t\tl.width = rootWidth - (2 * dH);\r\n\t\t\t} else {\r\n\t\t\t\txPos = anchorRect.right;\r\n\r\n\t\t\t\tif (rootWidth > dxRight) {\r\n\t\t\t\t\tLayoutParams l = mScroller.getLayoutParams();\r\n\t\t\t\t\tl.width = dxRight - (2 * dH);\r\n\t\t\t\t\trootWidth=dxRight;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tshowHorizontalArrow(((onLeft) ? R.id.arrow_right : R.id.arrow_left), (int) (arrowPos));//+ dY \r\n\r\n\t\t\tsetAnimationStyleHorizontalArrow(screenWidth, anchorRect.centerY(), onLeft);\r\n\r\n\t\t\tmWindow.showAtLocation(anchor, Gravity.NO_GRAVITY, xPos, yPos);//- dY+ dY+dY\r\n\t\t\tmWindow.update(rootWidth, rootHeight);\r\n\r\n\t\t}\r\n\t\t\r\n\t}",
"public Scene scene() {\n AnchorPane anchorPane = new AnchorPane();\n\n Pane track = raceTrack.trackpainting();\n\n AnchorPane.setTopAnchor(track, 40.0);\n AnchorPane.setLeftAnchor(track, 40.0);\n\n determineStartingLocation(carOne, carTwo, carThree);\n\n carPosition(carOne);\n carPosition(carTwo);\n carPosition(carThree);\n\n AnchorPane.setTopAnchor(btnStartRace, 480.0);\n AnchorPane.setLeftAnchor(btnStartRace, 740.0);\n\n AnchorPane.setTopAnchor(btnEndRace, 480.0);\n AnchorPane.setLeftAnchor(btnEndRace, 730.0);\n\n AnchorPane.setTopAnchor(txtWarning, 600.0);\n AnchorPane.setLeftAnchor(txtWarning, 610.0);\n\n anchorPane.setBackground(\n new Background(new BackgroundFill(Color.rgb(0, 132, 0),\n CornerRadii.EMPTY, Insets.EMPTY)));\n\n anchorPane.getChildren().addAll(track, carOne, carTwo, carThree, btnStartRace, btnEndRace, txtWarning);\n\n Scene scene = new Scene(anchorPane, 1580, 1030);\n return scene;\n }",
"public PaneOrganizer() {\n\t\t_root = new BorderPane(); // new border pane\n\t\t\n\t\tLabel score = new Label(\"Score: 0\"); // score label\n\t\tscore.setTextFill(Color.WHITE); // text color\n\t\t\n\t\tLabel lives = new Label(\"Lives: 3\"); // lives label\n\t\tlives.setTextFill(Color.WHITE); // text color\n\t\t\n\t\tGame game = new Game(score, lives); // game pane\n\t\tHBox hbox = new HBox(); // hbox to organize the quit button\n\n\t\tButton quit = new Button(\"Quit\"); // Creating quit button\n\t\tquit.setOnAction(new QuitHandler()); // add the quit handler\n\t\tquit.minHeight(Constants.QUIT_HEIGHT); // sizing\n\n\t\thbox.getChildren().addAll(quit, score, lives); // add components to hbox\n\t\thbox.setSpacing(20);\n\t\t\n\t\t_root.setCenter(game); // set the game pane\n\t\t_root.setBottom(hbox); // set the hbox\n\t\t_root.setStyle(\"-fx-background-color: black\");\n\t}",
"private void showGameOverScreen(){\n try{\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(Game.class.getResource(\"view/GameOverScreen.fxml\"));\n AnchorPane anchorPane = (AnchorPane) loader.load();\n\n rootLayout.setCenter(anchorPane);\n }catch(IOException e){\n e.printStackTrace();\n }\n }",
"public void initRootLayout() {\r\n try {\r\n // Load root layout from fxml file.\r\n FXMLLoader loader = new FXMLLoader();\r\n loader.setLocation(getClass().getResource(\"/view/rootlayout.fxml\"));\r\n rootLayout = (BorderPane) loader.load();\r\n \r\n // Show the scene containing the root layout.\r\n scene = new Scene(rootLayout);\r\n primaryStage.setScene(scene);\r\n primaryStage.show();\r\n \r\n controller = loader.getController();\r\n controller.setMainApp(this);\r\n \r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }",
"BorderPane getRoot();",
"@Override\n\tpublic void setPane() {\n\t\tNewRecordPane RecListPane = new NewRecordPane();\n\t\trootPane = new HomePane(new MainLeftPane(),RecListPane);\n\t}",
"public void initRootLayout() {\n try {\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(MainApplication.class.getResource(\"view/RootLayout.fxml\"));\n rootLayout = (BorderPane) loader.load();\n Scene scene = new Scene(rootLayout);\n primaryStage.setScene(scene);\n primaryStage.show();\n } catch (IOException e) {\n e.printStackTrace();\n \t}\n }",
"public void initRootLayout() {\n try {\n // Load root layout from fxml file.\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(MainApp.class.getResource(\"RootLayout.fxml\"));\n rootLayout = (BorderPane) loader.load();\n\n // Show the scene containing the root layout.\n Scene scene = new Scene(rootLayout);\n primaryStage.setScene(scene);\n primaryStage.show();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public MainPane(BananaBroadcast app, Stage primaryStage) throws IOException {\n\t\tthis.cartouches = app.cartouches;\n\t\tthis.scheduler = app.scheduler;\n\t\tthis.primaryStage = primaryStage;\n\t\tthis.database = app.database;\n\t\tthis.app = app;\n\t\tGuiApp.loadLayout(this, \"MainPane.fxml\");\n\t}",
"public void initRootLayout() {\r\n try {\r\n // Load root layout from fxml file.\r\n FXMLLoader loader = new FXMLLoader();\r\n loader.setLocation(FilmApp.class.getResource(\"view/RootLayout.fxml\"));\r\n rootLayout = (BorderPane) loader.load();\r\n\r\n // Show the scene containing the root layout.\r\n Scene scene = new Scene(rootLayout);\r\n primaryStage.setScene(scene);\r\n primaryStage.show();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }",
"private Pane createLayout() {\n root = new Pane();\n root.setPrefSize(Main.APP_W, Main.APP_H);\n\n // Logo\n ImageView logoView = new ImageView(new Image(\"res/snake.png\"));\n logoView.setFitHeight(500);\n logoView.setPreserveRatio(true);\n logoView.setLayoutX(40);\n logoView.setLayoutY(40);\n\n // Controls diagram\n ImageView controlsView = new ImageView(new Image(\"res/controls.png\"));\n controlsView.setFitHeight(100);\n controlsView.setPreserveRatio(true);\n controlsView.setLayoutX(350);\n controlsView.setLayoutY(40);\n\n // Control instructions\n Text keys = new Text(\"Use arrow keys to direct the snake \\nspacebar to pause / resume the game\");\n keys.setFont(Font.font(\"Calibri\", FontWeight.BOLD, 20));\n keys.setFill(Color.BLUE);\n keys.setLayoutX(470);\n keys.setLayoutY(90);\n\n // Play button image\n ImageView playView = new ImageView(new Image(\"res/play.png\"));\n playView.setFitHeight(150);\n playView.setPreserveRatio(true);\n playView.setLayoutX(320);\n playView.setLayoutY(170);\n\n // Click here instructions\n // Control instructions\n Text clickHere = new Text(\"Click to play\");\n clickHere.setFont(Font.font(\"Calibri\", FontWeight.BOLD, 20));\n clickHere.setFill(Color.BLUE);\n clickHere.setLayoutX(348);\n clickHere.setLayoutY(348);\n\n // Background\n ImageView backgroundView = new ImageView(Main.BACKGROUND_IMAGE);\n\n // Add elements to the root\n root.getChildren().setAll(backgroundView, logoView, controlsView, keys, playView, clickHere);\n\n return root;\n }",
"public void initRootLayout() {\n try {\n // Load root layout from fxml file.\n FXMLLoader loader = new FXMLLoader();\n URL url = TwitterFX.class.getClassLoader().getResource(\"twitterfx.fxml\");\n loader.setLocation(url);\n rootLayout = (AnchorPane) loader.load();\n buildLayout();\n // Show the scene containing the root layout.\n Scene scene = new Scene(rootLayout, 600,400);\n primaryStage.setScene(scene);\n primaryStage.show();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"private FlowPane setMainMenu() {\n FlowPane mainMenu = new FlowPane();\n mainMenu.setAlignment(Pos.CENTER);\n mainMenuButtons = new Button[3];\n String[] buttonText = {\"Flashcards\", \"Quizes\", \"Scores\"};\n for (int i = 0; i < mainMenuButtons.length; i++) {\n mainMenuButtons[i] = createButton(buttonText[i], TEXT_SIZE, 10);\n FlowPane.setMargin(mainMenuButtons[i], new Insets(10, 10, 30, 10));\n mainMenu.getChildren().add(mainMenuButtons[i]);\n }\n return mainMenu;\n }",
"public void initRootLayout() {\r\n FXMLLoader loader = fxmlLoaderService.getLoader(getClass().getResource(FXML_MAIN));\r\n\r\n try {\r\n rootLayout = loader.load();\r\n } catch (IOException ex) {\r\n logger.warn(\"Failed to load: \" + FXML_MAIN, ex);\r\n\r\n return;\r\n }\r\n\r\n Scene scene = new Scene(rootLayout);\r\n scene.getStylesheets().add(STYLESHEET_DEFAULT);\r\n\r\n mainStage.setScene(scene);\r\n mainStage.setTitle(\"Business eValuator\");\r\n mainStage.setResizable(true);\r\n mainStage.centerOnScreen();\r\n mainStage.setHeight(900);\r\n mainStage.show();\r\n }",
"public static AnchorPane getButtonPane() {\n\t\tif (buttonPane == null) {\n\t\t\tinitScene();\n\t\t}\n\t\treturn buttonPane;\n\t}",
"private void initRoot() {\n root = new VBox(10);\n root.setAlignment(Pos.CENTER);\n root.setPadding(new Insets(10));\n root.setPrefWidth(300);\n root.setPrefHeight(150);\n }",
"private GridPane absencePane(){\n GridPane absencePane = new GridPane();\n \n Button menuButton = new Button(\"Back to employee menu\");\n menuButton.setOnAction(e->menu());\n \n absencePane.add(menuButton, 2,1);\n absencePane.setAlignment(Pos.CENTER);\n\n return absencePane;\n }",
"public void initRootLayout() {\n try {\n // Load root layout from fxml file.\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(Pepoview.class.getResource(\"MainWindow.fxml\"));\n rootLayout = (SplitPane) loader.load(); \n \n // Show the scene containing the root layout.\n Scene scene = new Scene(rootLayout);\n primaryStage.setScene(scene);\n primaryStage.show();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public MainFrame() {\n initComponents();\n setLocationRelativeTo(null); \n btnHome.setBackground(Color.CYAN);\n btnHome.setSelected(rootPaneCheckingEnabled);\n }",
"public void initRootLayout(){\n try{\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(Game.class.getResource(\"view/RootLayout.fxml\"));\n rootLayout = (BorderPane) loader.load();\n\n Scene scene = new Scene(rootLayout);\n \n primaryStage.setScene(scene);\n \n RootLayoutController controller = loader.getController();\n controller.setGame(this);\n \n primaryStage.show(); \n showCreateNewPlayer();\n }catch(IOException e){\n }\n }",
"public static AnchorPane getContentBox(){\n return MainUIController.contentBox;\n }",
"public void showHomeScreen() {\n try {\n FXMLLoader loader1 = new FXMLLoader();\n loader1.setLocation(MainApplication.class.getResource(\"view/HomeScreen.fxml\"));\n AnchorPane anchorPane = (AnchorPane) loader1.load();\n rootLayout.setCenter(anchorPane);\n HomeScreenController controller = loader1.getController();\n controller.setMainApp(this);\n } catch (IOException e) {\n \t\te.printStackTrace();\n \t }\n }",
"private JComponent getRootPane()\n\t{\n\t\treturn null;\n\t}",
"public void sceneRoot(){\n primaryStage = new Stage();\n root = new Group();\n Scene scene = new Scene(root,sceneWidth,sceneHeight, Color.web(\"#b8cfcc\"));\n primaryStage.setTitle(\"Dry Cleaning System\");\n primaryStage.setScene(scene);\n primaryStage.show();\n primaryStage.setResizable(false);\n\n totalPricePlaceholder = new Label(\"Total Price: \");\n totalPricePlaceholder.setLayoutX(950);\n totalPricePlaceholder.setLayoutY(300);\n totalPricePlaceholder.setFont(new Font(22));\n\n totalPrice = new Label(\"0DKK\");\n totalPrice.setLayoutX(985);\n totalPrice.setLayoutY(350);\n totalPrice.setFont(new Font(22));\n totalPrice.setTextFill(Color.CORAL);\n\n root.getChildren().addAll(totalPricePlaceholder,totalPrice);\n }",
"public BorderPane getRoot() {\n\t\treturn _root;\n\t}",
"public BorderPane getRoot() {\n\t\treturn _root;\n\t}",
"public BorderPane getRoot() {\n\t\treturn root;\n\t}",
"public void mostrarRootLayout() {\n try {\n // Load root layout from fxml file.\n // Carrega o layout raíz do arquivo FXML \"RootLayout\"\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(LivrariaPrincipal.class.getResource(\"view/RootLayout.fxml\"));\n rootLayout = (BorderPane) loader.load();\n\n // Show the scene containing the root layout.\n // Mostra a cena que contém o layour raíz\n Scene scene = new Scene(rootLayout);\n primaryStage.setScene(scene);\n\n // Dá acesso do controlador para o aplicativo principal\n RootLayoutController controller = loader.getController();\n controller.setMainApp(this);\n\n primaryStage.show();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public Scene Window(){\n Area.setPrefHeight(177);\n Area.setPrefWidth(650);\n Area.setOpacity(0.5);\n Area.setEditable(false);\n Area.setText(\"\\n\\nThe application is used for PV(photovoltaics) sizing to power a RO(Reverse osmosis) desalination unit\" +\n \"\\nThe system depends on batteries to store energy.\" +\n \"\\n\\nTo use this application without problems, you must have the following information\\n\" +\n \"\\t*The location of the desalination unit;\\n\" +\n \"\\t*Amount of power required to operate the unit in kilowatts;\\n\" +\n \"\\t*Time of operating for RO;\\n\" +\n \"\\t*Detailed specification information of the pv modules;\\n\" +\n \"\\t*The number of people the Ro unit will provide water for,and the average water consumption for regular person\");\n\n boxPane.setPrefHeight(44);\n boxPane.setPrefWidth(650);\n\n //Go user map selection interface\n nextWindow.setPrefHeight(30);\n nextWindow.setPrefWidth(300);\n nextWindow.setMnemonicParsing(false);\n nextWindow.setText(\"NEXT\");\n\n\n //HBox.setMargin(nextWindow, new Insets(5,0,5,0));\n // boxPane.getChildren().addAll(nextWindow);\n boxPane.setAlignment(Pos.CENTER);\n\n //Load text area and button to the container\n rootPane.setCenter(Area);\n rootPane.setBottom(boxPane);\n\n scene = new Scene(rootPane,640,300);\n return scene;\n }",
"@Override // Override the start method in the Application class\r\n public void start(Stage primaryStage) {\n BorderPane bPane = new BorderPane();\r\n bPane.setBottom(this.getHBox());\r\n bPane.setCenter(this.getGPane());\r\n Scene scene = new Scene(bPane);\r\n primaryStage.setTitle(\"Search Window\"); // Set the stage title\r\n primaryStage.initModality(Modality.APPLICATION_MODAL);\r\n primaryStage.setResizable(false);\r\n primaryStage.setScene(scene); // Place the scene in the stage\r\n primaryStage.showAndWait(); // Display the stage\r\n }",
"public MainApp() {\r\n\t\tsuper();\r\n\t\tthis.setSize(642, 455);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t}",
"public void start() {\n BorderPane borderPane = new BorderPane();\n VBox centerPane = new VBox();\n\n borderPane.setTop(lobbyMenu());\n\n String TITLE = \"Connect 4\";\n Text title = new Text(TITLE);\n title.setFont(Font.font(\"Arial\", FontWeight.BOLD, 30));\n centerPane.getChildren().add(title);\n centerPane.getChildren().add(lobbyButtons());\n centerPane.setAlignment(Pos.CENTER);\n\n borderPane.setCenter(centerPane);\n\n Scene scene = new Scene(borderPane, 520, 360);\n\n stage.setTitle(TITLE);\n stage.setScene(scene);\n }",
"@FXML\n private void showMenu(){\n Main.setPane(0);\n }",
"public void displayTestPane() {\n mainWindow.setContent(new TestPane());\n console = null;\n }",
"public void Scene() {\n Scene scene = new Scene(this.root);\n this.stage.setScene(scene);\n this.stage.show();\n }",
"private void setLayout (){\r\n /* define placeholders for content*/\r\n HBox mainFrame= new HBox(); //the Main frame component.\r\n root.getChildren().add(mainFrame); //add it to the scene\r\n \r\n \r\n \r\n mainFrame.getChildren().addAll(leftPane,rightPane);\r\n \r\n Rectangle leftR= new Rectangle(600.0, 900.0);\r\n leftR.setFill(Color.WHITE);\r\n Rectangle rightR= new Rectangle(300.0, 900.0);\r\n rightR.setFill(Color.RED);\r\n rightPane.getChildren().add(rightR);\r\n leftPane.getChildren().add(leftR);\r\n \r\n \r\n }",
"private void returnHome() {\n parentPane.getChildren().clear();\n parentPane.setTop(mainMenu);\n parentPane.setCenter(imgHome);\n }",
"@Override\n public void start(Stage primaryStage) throws Exception{\n // Loads the Home view\n Parent root = FXMLLoader.load(getClass().getResource(\"fxml/Home.fxml\"));\n\n primaryStage.setTitle(\"To-Do Manager\"); // Sets the title of the window\n\n // Sets the Home view as the first scene\n Scene scene = new Scene(root, 854, 480);\n\n // Sets the window's scene\n primaryStage.setScene(scene);\n\n // Prevents user from resizing window ( because of UI reasons )\n primaryStage.setResizable(false);\n\n // Displays the window\n primaryStage.show();\n }",
"private void resizeAnchorPane() {\n if (currentVista == null) return;\n hideBarsIfLackSpace();\n currentVista.setPrefWidth(scrollPane.getViewportBounds().getWidth());\n }",
"@Override\n public void start(Stage primaryStage) {\n root = new VBox(10);\n root.setPadding(new Insets(30));\n initLabel();\n //set up scene\n Scene scene = new Scene(root);\n primaryStage.setScene(scene);\n primaryStage.sizeToScene();\n primaryStage.setTitle(\"Mastermind\");\n primaryStage.show();\n }",
"public void homeClicked() {\r\n Pane newRoot = loadFxmlFile(Home.getHomePage());\r\n Home.getScene().setRoot(newRoot);\r\n }",
"private void displayPane(Node p){\n root.setCenter(p);\n //BorderPane.setAlignment(p,Pos.CENTER);\n }",
"public JRootPane findRootPaneFor(View view) {\n JRootPane pane = super.findRootPaneFor(view);\n\n if (pane != null) {\n return pane;\n }\n\n if (((SwingView) view).getDisplayMode() != SwingView.PRIMARY_WINDOW) {\n return pane;\n }\n\n return frame.getRootPane();\n }",
"public void showPersonOverview() {\n try {\n // Load person overview.\n FXMLLoader loader = new FXMLLoader();\n //URL url=getClass().getResource(\"/fxml/Focustab.fxml\");\n loader.setLocation(MainApp.class.getResource(\"/fxml/Focustab.fxml\"));\n // Pane focusPane = (Pane)FXMLLoader.load(getClass().getResource(\"/fxml/Focustab.fxml\"));\n Pane focusPane=(Pane)loader.load();\n FocusPaneController controller = loader.getController();\n controller.setMainApp(this);\n Scene myScene = new Scene(focusPane);\n primaryStage.setScene(myScene);\n primaryStage.show();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void showPane(){\n\t\tpane.draw();\n\t}",
"public Pane getPage5Root() {\n\t\tPane page5Root = new Pane();\n\n\t\tRectangle r5 = new Rectangle(450, 200);\n\t\tr5.setFill(Color.WHITE);\n\n\t\tRectangle r6 = new Rectangle(450, 500);\n\t\tr6.setLayoutX(0);\n\t\tr6.setLayoutY(200);\n\t\tr6.setFill(Color.ORANGE);\n\t\t\n\t\tpage5Root.getChildren().add(r5);\n\t\tpage5Root.getChildren().add(r6);\n\n\t\treturn page5Root;\n\t}",
"public void openGamePane() {\n\t\tParent root;\n\t\ttry {\n\t\t\tFXMLLoader loader = new FXMLLoader(getClass().getResource(GAMEPANELOCATION));\n\t\t\tloader.setController(this);\n\t\t\troot = loader.load();\n\t\t\tScene scene = new Scene(root);\n\t\t\tStage stage = new Stage();\n\t\t\tstage.setScene(scene);\n\t\t\tstage.show();\n\t\t} catch (IOException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tgamePane.setBackground(new Background(new BackgroundFill(new Color(195/256.0,222/256.0,250/256.0,1),CornerRadii.EMPTY, Insets.EMPTY)));\n\t\tgameObjects=new HashMap<Integer,GameObjectVisualComponent>();\n\t\tpodium=new ArrayList<Text>();\n\t\tpodium.add(new Text(gamePane.getWidth()-100,15,\"TOP\"));\n\t\tgamePane.getChildren().add(podium.get(0));\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 }",
"@Override\n public void start(Stage primaryStage) throws IOException {\n Parent root = FXMLLoader.load(getClass().getResource(\"/MainMenuLayout.fxml\"));\n primaryStage.setTitle(\"Pairs\");\n primaryStage.setMinHeight(600);\n primaryStage.setMinWidth(600);\n primaryStage.setScene(new Scene(root));\n primaryStage.show();\n }",
"public void createMainStage(){\n mainStage = new Stage();\n BorderPane mainPageBp = new BorderPane();\n \n String headerTextMain = \"Main menu\";\n setBorderPaneTop(mainPageBp, headerTextMain, mainStage);\n setBorderPaneCenterMain(mainPageBp);\n setBorderPaneBottomMain(mainPageBp);\n \n Scene sceneMain = new Scene(mainPageBp,Constants.SCENEWIDTH, Constants.SCENEHEIGHT);\n sceneMain.getStylesheets().add(\"/styles/aitBank.css\");// add connection to stylesheet per scene\n mainStage.setTitle(bankName);\n mainStage.setScene(sceneMain);\n }",
"public static void borderPane(Stage primaryStage) {\n BorderPane pane = new BorderPane();\n\n // Place nodes in the pane\n pane.setTop(new CustomPane(\"Top\"));\n pane.setRight(new CustomPane(\"Right\"));\n pane.setBottom(new CustomPane(\"Bottom\"));\n pane.setLeft(new CustomPane(\"Left\"));\n pane.setCenter(new CustomPane(\"Center\"));\n\n // Create a scene and place it in the stage\n Scene scene = new Scene(pane);\n primaryStage.setTitle(\"ShowBorderPane\"); // Set the stage title\n primaryStage.setScene(scene); // Place the scene in the stage\n primaryStage.show(); // Display the stage\n }",
"private Parent content() {\r\n\r\n\t\t// Kujundus.\r\n\t\tBorderPane bp = new BorderPane();\r\n\r\n\t\tPane side = new Pane(controls);\r\n\t\tside.getStyleClass().add(\"pane\");\r\n\r\n\t\tPane window = new Pane();\r\n\t\twindow.setPrefSize(APP_W, APP_H);\r\n\t\twindow.getStyleClass().add(\"board\");\r\n\r\n\t\tbp.setCenter(window);\r\n\t\tbp.setLeft(side);\r\n\r\n\t\tGroup snakeBody = new Group();\r\n\t\tsnake = snakeBody.getChildren();\r\n\r\n\t\tpoints.setText(\"Points: \" + punktid);\r\n\t\tpoints.setTextFill(Color.WHITE);\r\n\t\tpoints.setTranslateX(APP_W / 1.15);\r\n\t\tpoints.setTranslateY(2);\r\n\t\tcontrols.setTextFill(Color.WHITE);\r\n\r\n\t\tLine rLine = new Line(APP_W, 0, APP_W, APP_H);\r\n\t\trLine.getStyleClass().add(\"line\");\r\n\t\trLine.setStrokeWidth(5);\r\n\t\tLine tLine = new Line(0, 0, APP_W, 0);\r\n\t\ttLine.getStyleClass().add(\"line\");\r\n\t\ttLine.setStrokeWidth(5);\r\n\t\tLine bLine = new Line(0, APP_H, APP_W, APP_H);\r\n\t\tbLine.getStyleClass().add(\"line\");\r\n\t\tbLine.setStrokeWidth(5);\r\n\r\n\t\t// Tekib toit.\r\n\t\tCircle food = new Circle(BLOCK_SIZE / 2, BLOCK_SIZE / 2, 5);\r\n\t\tfood.setFill(Color.CHARTREUSE);\r\n\t\tfood.setTranslateX((int) (Math.random() * (APP_W - BLOCK_SIZE) / BLOCK_SIZE) * BLOCK_SIZE);\r\n\t\tfood.setTranslateY((int) (Math.random() * (APP_H - BLOCK_SIZE) / BLOCK_SIZE) * BLOCK_SIZE);\r\n\t\tRfood = 1;\r\n\r\n\t\t// Aja algus.\r\n\t\tKeyFrame frame = new KeyFrame(Duration.seconds(0.1), event -> {\r\n\t\t\tif (!running)\r\n\t\t\t\treturn;\r\n\r\n\t\t\t// Kui ussi pikkus on 1 liigub ise edasi, kui 2 v�i enam v�tab\r\n\t\t\t// viimase t�ki ja t�stab ette.\r\n\t\t\tboolean toRemove = snake.size() > 1;\r\n\r\n\t\t\tNode tail = toRemove ? snake.remove(snake.size() - 1) : snake.get(0);\r\n\r\n\t\t\t// J�tan meelde ussi kordinaadid\r\n\t\t\tdouble tailX = tail.getTranslateX();\r\n\t\t\tdouble tailY = tail.getTranslateY();\r\n\r\n\t\t\t// kuhu ja kuidas uss liigub iga suuna korral\r\n\t\t\tswitch (direction) {\r\n\t\t\tcase UP:\r\n\t\t\t\ttail.setTranslateX(snake.get(0).getTranslateX());\r\n\t\t\t\ttail.setTranslateY(snake.get(0).getTranslateY() - BLOCK_SIZE);\r\n\t\t\t\tbreak;\r\n\t\t\tcase DOWN:\r\n\t\t\t\ttail.setTranslateX(snake.get(0).getTranslateX());\r\n\t\t\t\ttail.setTranslateY(snake.get(0).getTranslateY() + BLOCK_SIZE);\r\n\t\t\t\tbreak;\r\n\t\t\tcase LEFT:\r\n\t\t\t\ttail.setTranslateX(snake.get(0).getTranslateX() - BLOCK_SIZE);\r\n\t\t\t\ttail.setTranslateY(snake.get(0).getTranslateY());\r\n\t\t\t\tbreak;\r\n\t\t\tcase RIGHT:\r\n\t\t\t\ttail.setTranslateX(snake.get(0).getTranslateX() + BLOCK_SIZE);\r\n\t\t\t\ttail.setTranslateY(snake.get(0).getTranslateY());\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tmoved = true;\r\n\r\n\t\t\t// Lisame tagasi �rav�etud t�ki\r\n\t\t\tif (toRemove)\r\n\t\t\t\tsnake.add(0, tail);\r\n\r\n\t\t\t// Kui uss vastu iseennast\r\n\t\t\tfor (Node part : snake) {\r\n\t\t\t\tif (part != tail && tail.getTranslateX() == part.getTranslateX()\r\n\t\t\t\t\t\t&& tail.getTranslateY() == part.getTranslateY()) {\r\n\t\t\t\t\tstopGame();\r\n\t\t\t\t\tover.setTextFill(Color.WHITE);\r\n\t\t\t\t\tover.setText(\"GAME OVER !\");\r\n\t\t\t\t\tover.setTranslateX(APP_W / 2.5);\r\n\t\t\t\t\tover.setTranslateY(APP_H / 4);\r\n\t\t\t\t\tover.setVisible(true);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Kui uss l�heb vastu seina\r\n\t\t\t\tif (tail.getTranslateX() < 0 || tail.getTranslateX() == APP_W || tail.getTranslateY() < 0\r\n\t\t\t\t\t\t|| tail.getTranslateY() == APP_H) {\r\n\t\t\t\t\tstopGame();\r\n\t\t\t\t\tover.setTextFill(Color.WHITE);\r\n\t\t\t\t\tover.setText(\"GAME OVER ! \");\r\n\t\t\t\t\tover.setTranslateX(APP_W / 2.25);\r\n\t\t\t\t\tover.setTranslateY(APP_H / 4);\r\n\t\t\t\t\tover.setVisible(true);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Kui uss l�heb vastu boonus toitu\r\n\t\t\tif (tail.getTranslateX() == bonus.getTranslateX() && tail.getTranslateY() == bonus.getTranslateY()) {\r\n\t\t\t\tbonus.setVisible(false);\r\n\t\t\t\tbonus.isVisible();\r\n\t\t\t\tbonus.setDisable(true);\r\n\t\t\t\tbonus.isDisable();\r\n\r\n\t\t\t\tif (bonusFood == 1) {\r\n\r\n\t\t\t\t\tpunktid = punktid + 50;\r\n\t\t\t\t\tpoints.setText(\"Points: \" + punktid);\r\n\t\t\t\t\tpoints.setTextFill(Color.WHITE);\r\n\t\t\t\t\tpoints.setTranslateX(APP_W / 1.15);\r\n\r\n\t\t\t\t\tCircle circ2 = new Circle(BLOCK_SIZE / 2, BLOCK_SIZE / 2, 5, Color.WHITE);\r\n\t\t\t\t\tcirc2.setTranslateX(tailX);\r\n\t\t\t\t\tcirc2.setTranslateY(tailY);\r\n\r\n\t\t\t\t\tCircle circ3 = new Circle(BLOCK_SIZE / 2, BLOCK_SIZE / 2, 5, Color.WHITE);\r\n\t\t\t\t\tcirc3.setTranslateX(tailX);\r\n\t\t\t\t\tcirc3.setTranslateY(tailY);\r\n\r\n\t\t\t\t\tsnake.addAll(circ2, circ3);\r\n\t\t\t\t\tbonusFood = 0;\r\n\t\t\t\t\tRfood = 1;\r\n\t\t\t\t\tfood.setVisible(true);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (Rfood == 1) {\r\n\r\n\t\t\t\t// Kui uss l�heb vastu tavalist toitu\r\n\t\t\t\tif (tail.getTranslateX() == food.getTranslateX() && tail.getTranslateY() == food.getTranslateY()) {\r\n\t\t\t\t\tfood.setTranslateX((int) (Math.random() * (APP_W - BLOCK_SIZE) / BLOCK_SIZE) * BLOCK_SIZE);\r\n\t\t\t\t\tfood.setTranslateY((int) (Math.random() * (APP_H - BLOCK_SIZE) / BLOCK_SIZE) * BLOCK_SIZE);\r\n\r\n\t\t\t\t\tpunktid = punktid + 10;\r\n\t\t\t\t\tpoints.setText(\"Points: \" + punktid);\r\n\t\t\t\t\tpoints.setTextFill(Color.WHITE);\r\n\t\t\t\t\tpoints.setTranslateX(APP_W / 1.15);\r\n\t\t\t\t\tpoints.setTranslateY(2);\r\n\t\t\t\t\tCircle circ = new Circle(BLOCK_SIZE / 2, BLOCK_SIZE / 2, 5, Color.WHITE);\r\n\t\t\t\t\tcirc.setTranslateX(tailX);\r\n\t\t\t\t\tcirc.setTranslateY(tailY);\r\n\r\n\t\t\t\t\t// Boonus toidu tekkimine\r\n\t\t\t\t\tif (7 < (int) (Math.random() * 10)) {\r\n\t\t\t\t\t\tRfood = 0;\r\n\t\t\t\t\t\tbonusFood = 1;\r\n\t\t\t\t\t\tbonus.setVisible(true);\r\n\t\t\t\t\t\tbonus.setDisable(false);\r\n\t\t\t\t\t\tbonus.getStyleClass().add(\"bonus\");\r\n\t\t\t\t\t\tbonus.setTranslateX((int) (Math.random() * (APP_W - BLOCK_SIZE) / BLOCK_SIZE) * BLOCK_SIZE);\r\n\t\t\t\t\t\tbonus.setTranslateY((int) (Math.random() * (APP_H - BLOCK_SIZE) / BLOCK_SIZE) * BLOCK_SIZE);\r\n\t\t\t\t\t\tfood.setVisible(false);\r\n\t\t\t\t\t\tfood.isVisible();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tsnake.add(circ);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t// Keyframe k�ib l�pmatult\r\n\t\ttimeline.getKeyFrames().add(frame);\r\n\t\ttimeline.setCycleCount(Timeline.INDEFINITE);\r\n\r\n\t\twindow.getChildren().addAll(bonus, food, snakeBody, points, over, rLine, tLine, bLine);\r\n\t\treturn bp;\r\n\t}",
"@Override\n\tpublic void start(Stage primaryStage) throws Exception {\n\n\t\tlistePane.add((AnchorPane) FXMLLoader.load(getClass().getResource(\"../View/Login.fxml\")));\n\n\t\tps = primaryStage;\n\t\tprimaryStage.initStyle(StageStyle.TRANSPARENT);\n\t\troot = (AnchorPane) FXMLLoader.load(getClass().getResource(\"../View/Blank.fxml\"));\n\t\t\n\t\troot.setOnMousePressed(new EventHandler<MouseEvent>() {\n\t @Override\n\t public void handle(MouseEvent event) {\n\t xOffset = event.getSceneX();\n\t yOffset = event.getSceneY();\n\t }\n\t });\n\t root.setOnMouseDragged(new EventHandler<MouseEvent>() {\n\t @Override\n\t public void handle(MouseEvent event) {\n\t primaryStage.setX(event.getScreenX() - xOffset);\n\t primaryStage.setY(event.getScreenY() - yOffset);\n\t }\n\t });\n\t\t\n\t\tsetVue(0);\n\n\t\tScene scene = new Scene(root);\n//\t\tscene.setFill(javafx.scene.paint.Color.TRANSPARENT);\n//\t\tscene.getStylesheets().add(getClass().getResource(\"application.css\").toExternalForm());\n\t\tprimaryStage.setScene(scene);\n\t\tprimaryStage.show();\n\t}",
"public MainContentPane() {\r\n\t\tsuper();\r\n\r\n\t\t// Add design-time configured components.\r\n\t\tinitComponents();\r\n\t}",
"@Override\n public void start(Stage stage) throws Exception{\n BorderPane border = new BorderPane();\n\n// HBox hbox = addHBox();\n// border.setTop(hbox);\n border.setLeft(addVBox());\n\n// hbox.setStyle(\"\");\n// addStackPane(hbox);\n border.setCenter(addAnchorPane(addGridPane()));\n\n Scene scene = new Scene(border);\n stage.setScene(scene);\n stage.setTitle(\"Wally Save\");\n stage.show();\n }",
"public void setScreenParent(StackPaneController sceneController);",
"public void initRootLayout() {\n try {\n // Load root layout from fxml file.\n FXMLLoader loader = new FXMLLoader();\n //loader.setLocation(RestApplication.class.getResource(\"views/RootLayout.fxml\"));\n rootLayout = (BorderPane) loader.load(getClass().getResourceAsStream(\"/views/RootLayout.fxml\"));\n Scene scene = new Scene(rootLayout);\n Image img = new Image(\"file:resources/img/logo.png\");\n Stage mainStage = new Stage();\n this.stage = mainStage;\n mainStage.setScene(scene);\n mainStage.initStyle(StageStyle.DECORATED); \n mainStage.setTitle(\"..: tallyMED :: Home :..\");\n mainStage.getIcons().add(img);\n mainStage.setMaximized(true);\n loginStage.close();\n mainStage.setOnHidden(event -> Platform.exit());\n mainStage.show();\n \n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"@Override\n\tpublic void start(Stage primaryStage) {\n\n\t\ttry {\n\t\t\t// Load root layout from fxml file.\n\t\t\tParent root = FXMLLoader.load(getClass().getResource(\"/view/History.fxml\"));\n\t\t\tScene window = new Scene(root);\n\t\t\tprimaryStage.setScene(window);\n\t\t\tprimaryStage.show();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@FXML\n private void startGame(){\n AnchorPane anchorPane = new AnchorPane();\n Scene gameScene = new Scene(anchorPane, 800, 600);\n Stage gameStage = new Stage();\n GameView gameView = new GameView(anchorPane, gameScene, gameStage);\n gameView.gameStart();\n }",
"public static Scene getMainWindow(Stage mainStage) {\n\n HBox systemInfo = new HBox(SystemInfo.getSystemInfoLabel());\n systemInfo.alignmentProperty().setValue(Pos.BOTTOM_RIGHT);\n\n Button login = new Button(\"Login\");\n\n EventHandler<ActionEvent> loginButtonEvent = (actionEvent) -> {\n Authentication.getUserAccessToken();\n App.setUser(Graph.getUser(SimpleAuthProvider.getAccessToken()));\n if(App.getUser() == null){\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setContentText(\"There was an error logging in please try again\");\n } else {\n App.configScene.show(mainStage);\n }\n };\n\n login.setOnAction(loginButtonEvent);\n\n\n\n\n\n //login button\n\n VBox loginContainer = new VBox();\n loginContainer.setAlignment(Pos.CENTER);\n loginContainer.getChildren().addAll(login);\n\n BorderPane borderPane = new BorderPane();\n borderPane.setCenter(loginContainer);\n borderPane.setBottom(systemInfo);\n\n\n Scene scene = new Scene(borderPane);\n\n return scene;\n }",
"public void makeGameStage() {\n Stage gameStage = new Stage();\n gameStage.setTitle(\"Mastermind Game\");\n AnchorPane gamePane = new AnchorPane();\n Scene gameScene = new Scene(gamePane, 650, 700);\n\n //Section for adding the rectangle board\n Rectangle boardBackground = new Rectangle(50, 75, 450, 600);\n boardBackground.setFill(Color.GRAY);\n gamePane.getChildren().add(boardBackground);\n\n //Section for adding circles that the user will use to input secret code colors\n HBox inputCircles = new HBox();\n inputCircles.setSpacing(30);\n inputCircles.setLayoutX(100);\n inputCircles.setLayoutY(600);\n inputCircles.setPrefHeight(100);\n inputCircles.setPrefWidth(200);\n\n for (int i=0; i < 4; i++) {\n Circle c = new Circle(30);\n inputCircles.getChildren().add(c);\n\n }\n gamePane.getChildren().add(inputCircles);\n\n //Section for adding the enter button to submit a guess\n //No functionality implemented yet\n Button enter = new Button(\"Enter Guess\\n(No functionality yet)\");\n enter.setPrefWidth(130);\n enter.setPrefHeight(75);\n enter.setLayoutX(510);\n enter.setLayoutY(600);\n gamePane.getChildren().add(enter);\n\n gameStage.setScene(gameScene);\n gameStage.show();\n }",
"void createScene(){\n\t\tmainScene = new Scene(mainPane);\r\n\t\t\r\n\t\t//If keyEvent is not focussed on a node on the scene, you can attach\r\n\t\t//a keyEvent to a scene to be consumed by the screen itself.\r\n\t\tCloser closer = new Closer();\r\n\t\tmainScene.setOnKeyPressed(closer);\r\n\t}",
"private void initializeLayout(Stage primaryStage) throws IOException {\r\n baseLayout = FXMLLoader.load(getClass().getResource(\"/presentation/view/RootLayout.fxml\"));\r\n Scene scene = new Scene(baseLayout);\r\n primaryStage.setScene(scene);\r\n primaryStage.setResizable(true);\r\n primaryStage.show();\r\n }",
"protected void configure(JRootPane rootPane) {\r\n Container contentPane = rootPane.getContentPane();\r\n contentPane.add(graphComponent, BorderLayout.CENTER);\r\n\r\n JToolBar toolBar = createToolBar();\r\n if (toolBar != null) {\r\n configureToolBar(toolBar);\r\n contentPane.add(toolBar, BorderLayout.NORTH);\r\n }\r\n\r\n JComponent helpPane = createHelpPane();\r\n if (helpPane != null) {\r\n contentPane.add(helpPane, BorderLayout.EAST);\r\n }\r\n }",
"private BorderPane getBorderPain(BorderPane root) {\n gridPane.setPadding(new Insets(15, 5, 15, 5));\n gridPane.setVgap(10);\n gridPane.setHgap(10);\n root.setPadding(new Insets(50, 10, 80, 10));\n root.setId(\"root\");\n root.setBottom(numberDisplay);\n root.setCenter(gridPane);\n return root;\n }",
"@Override\n public void start (Stage primaryStage) {\n Group root = new Group();\n Scene scene = new Scene(root, AppConstants.STAGE_WIDTH, AppConstants.STAGE_HEIGHT);\n ModulePopulator = new ModuleCreationHelper(root, scene, primaryStage);\n view = new View();\n scene.setFill(AppConstants.BACKGROUND_COLOR);\n // scene.getStylesheets().add(getClass().getResource(\"application.css\").toExternalForm());\n view.init(root, ModulePopulator);\n ModulePopulator.setView(view);\n ModulePopulator.createMainPageModules();\n view.initRunner(root, ModulePopulator);\n primaryStage.setTitle(\"SLogo!\");\n primaryStage.setScene(scene);\n primaryStage.show();\n\n System.out.println(\"App Has Started!\");\n }",
"private void setStage() {\n\t\tstage = new Stage();\n\t\tstage.setScene(myScene);\n\t\tstage.setTitle(title);\n\t\tstage.show();\n\t\tstage.setResizable(false);\n//\t\tstage.setOnCloseRequest(e -> {\n//\t\t\te.consume();\n//\t\t});\n\t}",
"public void moveScene(Parent root) {\n Stage stage = new Stage();\n stage.setScene(new Scene(root));\n stage.show();\n }",
"public abstract int getRootView();",
"private Parent mainMenu() {\n BorderPane menu = new BorderPane();\n menu.setPrefSize(1200, 900);\n\n Image image = new Image(\"/menu.png\");\n ImageView img = new ImageView(image);\n img.setFitHeight(400);\n img.setFitWidth(400);\n\n\n //if cheat is on, user can see pieces on computer board --> for testing purposes\n cheatON.setToggleGroup(groupCheat);\n cheatOFF.setToggleGroup(groupCheat);\n HBox cheat = new HBox(cheatON, cheatOFF);\n cheatOFF.setSelected(true);\n //select difficulty\n easy.setToggleGroup(groupDiff);\n hard.setToggleGroup(groupDiff);\n HBox Diff = new HBox(easy, hard);\n hard.setSelected(true);\n\n Label welcome = new Label(\"Welcome!\");\n Label Cheat = new Label(\"Cheats\");\n Label diff = new Label(\"Difficulty\");\n\n Cheat.setAlignment(Pos.CENTER);\n cheat.setAlignment(Pos.CENTER);\n\n diff.setAlignment(Pos.CENTER);\n Diff.setAlignment(Pos.CENTER);\n\n\n HBox buttons = new HBox(40, startGame, exit);\n\n buttons.setAlignment(Pos.CENTER);\n\n menu.setStyle(\"-fx-background-color: #B5D3E7\");\n\n VBox difficulty = new VBox(5, diff, Diff);\n VBox cheater = new VBox(5, Cheat, cheat);\n difficulty.setAlignment(Pos.CENTER);\n cheater.setAlignment(Pos.CENTER);\n\n VBox vbox = new VBox(30, welcome, img, buttons, difficulty, cheater);\n vbox.setAlignment(Pos.CENTER);\n //use some CSS inline styling\n vbox.setStyle(\"-fx-background-image: url('/menu.png');\" +\n \"-fx-background-repeat: stretch;\" +\n \"-fx-background-size: 400 300;\" +\n \"-fx-background-position: center center;\"\n );\n menu.setCenter(vbox);\n\n\n return menu; //return root\n }",
"@Override\n public void start(Stage primaryStage) {\n\n // Creates the scene and displays it to the main window\n Scene withDrawPaneSetup = new Scene(withDrawPaneSetup(primaryStage), 1024, 768);\n primaryStage.setScene(withDrawPaneSetup);\n }",
"public Pane getPane() {\n\t\treturn pane;\n\t}",
"public DiagramRootPane(Diagram diagram) {\n \t\tsuper(diagram);\n \t\tsetGraphicalRepresentation(new DrawingGraphicalRepresentation());\n \t}",
"public void initAndShowStage(Parent root) {\n Scene scene = new Scene(root);\n Stage stage = new Stage();\n stage.initModality(Modality.APPLICATION_MODAL);\n stage.setScene(scene);\n stage.setTitle(\"Ayuda para la Gestion de Usuarios\");\n stage.setResizable(false);\n stage.setMinWidth(800);\n stage.setMinHeight(600);\n stage.setOnShowing(this::handleWindowShowing);\n stage.show();\n }",
"public void displayWelcomePane() {\n mainWindow.setContent(new WelcomePane());\n console = null;\n }",
"@Override\n public final void start(final Stage primaryStage) {\n Scene scene = new Scene(getPane(), PANE_WIDTH, PANE_HEIGHT);\n primaryStage.setTitle(\"Tic-Tak-Toe\"); // Set the stage title.\n primaryStage.setScene(scene); // Place the scene in the stage.\n primaryStage.show(); // Display the stage.\n }",
"private void setUpFrame() {\n rootPanel = new JPanel();\n rootPanel.setLayout(new BorderLayout());\n rootPanel.setBackground(Color.darkGray);\n }",
"public void setupScene() {\n\t\tplayScene = new Scene(new Group());\n\t\tupdateScene(playScene);\n\t\twindow.setScene(playScene);\n\t\twindow.show();\n\t}",
"public HomeView(Stage stage) {\n\n root = new GridPane();\n this.applicationScene = new Scene(root);\n stage.setScene(this.applicationScene);\n\n initializeGrid();\n stage.setWidth(1280.0);\n stage.setHeight(720.0);\n\n stage.setOnCloseRequest(e -> {\n // This function will shutdown simulation importer for warnings controller as well.\n GraphController.getInstance().shutdown();\n });\n // stage.setMaximized(true);\n\n stage.show();\n // Set minimum dimensions to 720p - Doesn't support below this\n stage.setMinHeight(720);\n stage.setMinWidth(1280);\n\n }",
"private AnchorPane construirCamadas() {\n AnchorPane painelCamadas = new AnchorPane();\n painelCamadas.setPrefSize(400, 400);\n\n /*******************************************\n * [ACORDEON]\n ********************************************/\n this.camadas = new Accordion();\n this.camadas.setPrefSize(370,350);\n this.camadas.setLayoutX(30);\n this.camadas.setLayoutY(10);\n painelCamadas.getChildren().add(camadas);\n\n /*******************************************\n * [IMAGEVIEW SETA]\n ********************************************/\n this.setaImagem = allImage.getImageView(\"seta\");\n this.setaImagem.setFitWidth(26);\n this.setaImagem.setFitHeight(26);\n this.setaImagem.setLayoutY(10);\n this.setaImagem.setVisible(false);\n painelCamadas.getChildren().add(setaImagem);\n\n\n /*******************************************\n * [CAMADA DE APLICACAO]\n ********************************************/\n camadaAplicacao = new Camada(\"Camada Aplicacao\",setaImagem,10,camadas);\n this.camadas.getPanes().add(camadaAplicacao);\n \n /*******************************************\n * [CAMADA ENLACE DE DADOS]\n ********************************************/\n camadaEnlace = new Camada(\"Camada Enlace de Dados\",setaImagem,37,camadas);\n this.camadas.getPanes().add(camadaEnlace);\n\n /*******************************************\n * [CAMADA FISICA]\n ********************************************/\n camadaFisica = new Camada(\"Camada Fisica\",setaImagem,62,camadas);\n this.camadas.getPanes().add(camadaFisica);\n\n return painelCamadas;\n }",
"@FXML\r\n private void addPane(ActionEvent e) throws IOException {\r\n\r\n eventDialog(\"New\");\r\n eventLabel.setText(\"Are you want to take a new window?\");\r\n\r\n noButton.setOnAction(event -> {\r\n firstLabel.setVisible(false);\r\n lastLabel.setVisible(false);\r\n lineFirstNodeTF.setVisible(false);\r\n lineLastNodeTF.setVisible(false);\r\n setNodeButton.setVisible(false);\r\n resetNodeButton.setVisible(false);\r\n\r\n graphNodeTextArea.setEditable(true);\r\n graphNodeTextArea.setText(\"\");\r\n eventStage.close();\r\n });\r\n\r\n yesButton.setOnAction(event -> {\r\n Parent root = null;\r\n try {\r\n root = FXMLLoader.load(Objects.requireNonNull(getClass().getResource(\"GUI.fxml\")));\r\n } catch (IOException ioException) {\r\n ioException.printStackTrace();\r\n }\r\n Scene scene = new Scene(root);\r\n\r\n Stage primaryStage = new Stage();\r\n primaryStage.setScene(scene);\r\n primaryStage.setTitle(\"Object Oriented Programming Project - Team 1B\");\r\n primaryStage.show();\r\n eventStage.close();\r\n });\r\n\r\n }",
"public void initRootLayout(Stage primaryStage) {\n this.primaryStage = primaryStage;\n setAuthorisationScene();\n }",
"public void showLogin() {\n try {\n\n // Load person overview.\n loginController controller = new loginController(this);\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(MainApp.class.getResource(\"Login.fxml\"));\n loader.setController(controller);\n AnchorPane personOverview = (AnchorPane) loader.load();\n\n // Set person overview into the center of root layout.\n rootLayout.setCenter(personOverview);\n controller.background();\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void initMainLayout() {\n\t\ttry {\n\t\t\t// Load root layout from fxml file.\n\t\t\tFXMLLoader loader = new FXMLLoader();\n\t\t\tloader.setLocation(MainApp.class.getResource(\"view/MainLayout.fxml\"));\n\t\t\trootLayout = (BorderPane) loader.load();\n\n\t\t\t// Show the scene containing the root layout.\n\t\t\tScene scene = new Scene(rootLayout);\n\t\t\tprimaryStage.setScene(scene);\n\t\t\tprimaryStage.show();\n\n\t\t\tMainLayoutController mainLayoutController = loader.getController();\n\t\t\tmainLayoutController.setMainApp(this);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(0);\n\t\t\n\t\t}\n\t}",
"private void createScene() \n {\n PlatformImpl.startup(\n new Runnable() {\n public void run() { \n Group root = new Group(); \n Scene scene = new Scene(root, 80, 20); \n SizeView sizeview = createSizeView(scene);\n root.getChildren().add(sizeview);\n jfxPanel.setScene(scene); \n } \n }); \n }",
"public Pane<T> currentPane() {\n return currentPane(System.currentTimeMillis());\n }",
"void chang_scene_method(String FXML_Name) {\n try {\n AnchorPane pane = FXMLLoader.load(getClass().getResource(FXML_Name));\n anchorPane.getChildren().setAll(pane);\n } catch (IOException e) {\n JOptionPane.showMessageDialog(null, \"Error: \" + e);\n }\n }",
"public RootTreePanel() {\n\t\tsuper();\n\t\tTreeNode.setCentered(false);\n\t}"
] | [
"0.76446617",
"0.7383683",
"0.72201157",
"0.6926814",
"0.6768328",
"0.67469573",
"0.6729552",
"0.6711039",
"0.6707433",
"0.6616272",
"0.6547234",
"0.6546083",
"0.6542366",
"0.6457002",
"0.6447223",
"0.636292",
"0.6354706",
"0.63379973",
"0.6313584",
"0.62874794",
"0.6284655",
"0.6265787",
"0.6236614",
"0.62156487",
"0.6204255",
"0.6178498",
"0.61621255",
"0.61574256",
"0.61368066",
"0.6127416",
"0.610038",
"0.6088619",
"0.6073366",
"0.6069574",
"0.6064994",
"0.605967",
"0.6014681",
"0.6014681",
"0.5997214",
"0.59882486",
"0.59805816",
"0.5976523",
"0.59564847",
"0.5950906",
"0.59438527",
"0.5931361",
"0.5913576",
"0.590595",
"0.5899308",
"0.58771193",
"0.58594686",
"0.5855598",
"0.5828574",
"0.581693",
"0.5810663",
"0.57703054",
"0.57648736",
"0.57613736",
"0.5752903",
"0.5747298",
"0.57457477",
"0.57456017",
"0.5742003",
"0.5719352",
"0.57146156",
"0.5706821",
"0.56887525",
"0.5669963",
"0.56654376",
"0.566145",
"0.5652717",
"0.56500167",
"0.56493276",
"0.5646498",
"0.5645429",
"0.5632104",
"0.56306016",
"0.5623774",
"0.56182903",
"0.5608194",
"0.55997235",
"0.55992645",
"0.55936843",
"0.55886674",
"0.5588161",
"0.55777174",
"0.55648196",
"0.5557166",
"0.55546826",
"0.5553901",
"0.5545865",
"0.55440795",
"0.5541209",
"0.5539424",
"0.5536703",
"0.5536226",
"0.553263",
"0.55297494",
"0.55252576",
"0.55226564"
] | 0.56683195 | 68 |
This is the Left grouping of boxes | public VBox addLeftVBox(ObservableList<Song> songs) {
VBox vbox = new VBox();
vbox.setPadding(new Insets(10, 10, 10, 10));
GridPane searchGrid = new GridPane();
searchGrid.setPadding(new Insets(10, 10, 10, 10));
searchGrid.setVgap(10.0);
TextField searchInput = new TextField();
searchInput.setPromptText("Search Songs");
searchInput.setPrefWidth(200);
Button searchBtn = new Button();
searchBtn.setText("Go");
searchBtn.setOnAction(new EventHandler<ActionEvent>() {
public void handle(ActionEvent e) {
songs.clear();
searchForSongs(searchInput.getText());
}
});
searchResults.setPrefSize(300, 400);
searchResults.setEditable(true);
GridPane.setConstraints(searchInput, 0, 0, 3, 1, null, null, null, null, null);
GridPane.setConstraints(searchBtn, 3, 0);
GridPane.setConstraints(searchResults, 0, 1, 3, 4, null, null, null, null, null);
searchGrid.getChildren().addAll(searchInput, searchBtn, searchResults);
vbox.getChildren().add(searchGrid);
return vbox;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void makeLeftBox() {\n\t\tgamePanel = new JPanel();\n\t\tgamePanel.setLayout(new BorderLayout());\n\t\tgamePanel.setBackground(Color.GRAY);\n\t\tgamePanel.setOpaque(true);\n\t\tleft = new JPanel();\n\t\tleft.setLayout(new GridLayout(1,1));\n\t\tleft.setBackground(Color.GRAY);\n\t\tbanner = new JLabel(\"Jeopardy\", SwingConstants.CENTER);\n\t\tbanner.setBorder(new EmptyBorder(10,10,10,10));\n\t\tbanner.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tbanner.setForeground(Color.GRAY);\n\t\tbanner.setBackground(lightRed);\n\t\tbanner.setFont(new Font(\"TimesRoman\", Font.BOLD, 30));\n\t\tbanner.setOpaque(true);\n\t\tmakeGameBoard();\n\t\t\n\t\tgamePanel.add(banner, BorderLayout.NORTH);\n\t\tgamePanel.add(board, BorderLayout.CENTER);\n\t\tleft.setOpaque(false);\n\t\tJPanel space = new JPanel();\n\t\tspace.setOpaque(false);\n\t\tgamePanel.add(space, BorderLayout.SOUTH);\n\t\tleft.add(gamePanel);\n\t\t\n\t}",
"public void group() {\n for (Box box : boxes) {\r\n box.x += this.x;\r\n box.y += this.y;\r\n }\r\n }",
"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 }",
"void left() {\n startAnimation(leftSubCubes(), Axis.X, Direction.ANTICLOCKWISE);\n leftCubeSwap();\n }",
"public VBox addVBoxLeft() {\r\n\t\t\r\n\t\tText text = new Text(\"Log: \");\r\n\t\ttext.setFont(new Font(\"Agency FB\", 20));\t\t\t\t//set font and size of text\r\n\t\t\r\n\t\tlog = new TextArea();\r\n\t\tlog.setEditable(false);\t\t\t\t\t\t\t\t\t//Log not editable\r\n\t \r\n\t\tVBox vBoxLeft = new VBox(text,log);\t\t\t\t\t\t//Putting text and log into the VBox\r\n\t vBoxLeft.setPadding(new Insets(15, 15, 15, 15));\t\t//Padding around the vBox\r\n\t vBoxLeft.setPrefSize(200, 600);\t\t\t\t\t\t\t//Preferred size\r\n\t vBoxLeft.setSpacing(1);\t\t\t\t\t\t\t\t\t//Adding space between stuff\r\n\t vBoxLeft.setStyle(\"-fx-background-color: #f0f8ff;\");\t//Set background color\r\n\t \r\n\t return vBoxLeft;\r\n\t}",
"void leftView() \n\t\t{ \n\t\t\tleftViewUtil(root, 1); \n\t\t}",
"@Override\r\n public void getBoxes(IPartCollisionHelper box) {\n box.addBox(4, 4, 12, 12, 12, 14);\r\n box.addBox(6, 6, 11, 10, 10, 12);\r\n }",
"void leftView()\n {\n leftViewUtil(root, 1);\n }",
"public void displayInnerBoxes() {\n for (Box box : boxes)\r\n box.display();\r\n }",
"public void setBoundingBoxLeft(double value) {\n this.boundingBoxLeft = value;\n }",
"public Lane getLeft() {\r\n\t\treturn left;\r\n\t}",
"public void moveLeft() {\n if (rec.getUpperLeft().getX() - 5 < leftBorder) {\n rec.getUpperLeft().setX(leftBorder);\n } else {\n rec.getUpperLeft().setX(rec.getUpperLeft().getX() - 5);\n }\n\n }",
"private void setBox(){\n\t\tif((this.row >= 0 && this.row <= 2) && \n\t\t (this.column >= 0 && this.column <= 2)){\n\t\t\t\t\tthis.box = 1;\n\t\t\t\t\treturn;\n\t\t}\n\t\tif((this.row >= 0 && this.row <= 2) && \n\t\t (this.column >= 3 && this.column <= 5)){\n\t\t\t\t\tthis.box = 2;\n\t\t\t\t\treturn;\n\t\t}\n\t\tif((this.row >= 0 && this.row <= 2) && \n\t\t (this.column >= 6 && this.column <= 8)){\n\t\t\t\t\tthis.box = 3;\n\t\t\t\t\treturn;\n\t\t}\n\t\tif((this.row >= 3 && this.row <= 5) && \n\t\t (this.column >= 0 && this.column <= 2)){\n\t\t\t\t\tthis.box = 4;\n\t\t\t\t\treturn;\n\t\t}\n\t\tif((this.row >= 3 && this.row <= 5) && \n\t\t (this.column >= 3 && this.column <= 5)){\n\t\t\t\t\tthis.box = 5;\n\t\t\t\t\treturn;\n\t\t}\n\t\tif((this.row >= 3 && this.row <= 5) && \n\t\t (this.column >= 6 && this.column <= 8)){\n\t\t\t\t\tthis.box = 6;\n\t\t\t\t\treturn;\n\t\t}\n\t\tif((this.row >= 6 && this.row <= 8) && \n\t\t (this.column >= 0 && this.column <= 2)){\n\t\t\t\t\tthis.box = 7;\n\t\t\t\t\treturn;\n\t\t}\n\t\tif((this.row >= 6 && this.row <= 8) && \n\t\t (this.column >= 3 && this.column <= 5)){\n\t\t\t\t\tthis.box = 8;\n\t\t\t\t\treturn;\n\t\t}\n\t\tif((this.row >= 6 && this.row <= 8) && \n\t\t (this.column >= 6 && this.column <= 8)){\n\t\t\t\t\tthis.box = 9;\n\t\t\t\t\treturn;\n\t\t}\n\t}",
"private JPanel leftBar() {\n\t\tJPanel leftBar = new JPanel();\n\t\tColor myPurp = new Color(191, 123, 123);\n\t\tleftBar.setBackground(myPurp);\n\t\tleftBar.setLayout(new BoxLayout(leftBar, BoxLayout.Y_AXIS));\n\t\t\n\t\t//creating slider that determines speed\n\t\tJLabel milliSecs = new JLabel(\"ms between\", JLabel.LEFT);\n\t\tJLabel generations = new JLabel(\"generations\", JLabel.LEFT);\n\t\tspeed.addChangeListener(this);\n\t\tspeed.setPaintTicks(true);\n\t\tspeed.setMajorTickSpacing(500);\n\t\tspeed.setPaintLabels(true);\n\t\tspeed.setMinorTickSpacing(250);\n\t\tleftBar.add(milliSecs);\n\t\tleftBar.add(generations);\n\t\tleftBar.add(speed);\n\t\t\n\t\t//creating slider that determines grid size\n\t\tJLabel dimensionsLabel = new JLabel(\"dimensions\");\n\t\tgridSize.addChangeListener(this);\n\t\tgridSize.setPaintTicks(true);\n\t\tgridSize.setMajorTickSpacing(10);\n\t\tgridSize.setPaintLabels(true);\n\t\tleftBar.add(dimensionsLabel);\n\t\tleftBar.add(gridSize);\n\t\tpack();\n\t\t\n\t\treturn leftBar;\n\t}",
"@Override\n\t\tpublic Rectangle displayBox() {\n\t Enumeration<Figure> k = figures();\n\t Rectangle r = k.nextElement().displayBox();\n\t\n\t while (k.hasMoreElements())\n\t r.add(k.nextElement().displayBox());\n\t return r;\n\t }",
"private VBox createBottomOrderBox() {\n\t\tVBox v = new VBox();\n\t\tVBox.setMargin(v, new Insets(5));\n\t\tv.setStyle(\"-fx-border-color: black; \"\n\t\t\t\t+ \"-fx-background-color: gainsboro\");\n\t\tLabel l1 = new Label(\"Please Check Applicable Storage Shelves\");\n\t\tv.getChildren().add(l1);\n\t\t//Iterate into lines of 5 lables and checkboxes\n\t\tfor (int i = 0; i < cf.getShelf().size(); i += 5) {\n\t\t\t\n\t\t\t/*\n\t\t\t * Create the HBox to store up to 5\n\t\t\t * CheckBoxes. Align its contents to the center.\n\t\t\t */\n\t\t\tHBox h = new HBox();\n\t\t\th.setSpacing(10);\n\t\t\tHBox.setMargin(h, new Insets(5));\n\t\t\th.setPadding(new Insets(5));\n\t\t\th.setAlignment(Pos.CENTER);\n\t\t\t/*\n\t\t\t * Decide what to iterate on:\n\t\t\t * If there are >= 5 shelves remaining, \n\t\t\t * iterate against 5. If there are less than 5 \n\t\t\t * shelves, iterate against no.Shelves remaining.\n\t\t\t * This allows blocks of 5 checkboxes and a final\n\t\t\t * dynamicly sized block for the remaining amount.\n\t\t\t */\n\t\t\tif ((cf.getShelf().size()-i) >= 5) {\n\t\t\t\t//For the next 5 StorageShelves\n\t\t\t\tfor (int j = i; j < i+5; j++) {\n\t\t\t\t\tCheckBox cb = new CheckBox();\n\t\t\t\t\t//Set the CheckBox's text to the Shelf it represents.\n\t\t\t\t\tcb.setText(cf.getShelf().get(j).getuID());\n\n\t\t\t\t\t// Add the checkbox to currentOrder's array to be referenced later.\n\t\t\t\t\tcurrentOrder.addBox(cb);\n\t\t\t\t\t\n\t\t\t\t\t//Add checkbox to Hbox for displaying\n\t\t\t\t\th.getChildren().add(cb);\n\t\t\t\t}\n\t\t\t} else if ((cf.getShelf().size()-i) < 5) {\n\t\t\t\t//For the remaining number of shelves\n\t\t\t\tfor (int j = i; j < cf.getShelf().size(); j++) {\n\t\t\t\t\tCheckBox cb = new CheckBox();\n\t\t\t\t\t//Set the CheckBox's text to the Shelf it represents.\n\t\t\t\t\tcb.setText(cf.getShelf().get(j).getuID());\n\n\t\t\t\t\t// Add the checkbox to currentOrder's array to be referenced later.\n\t\t\t\t\tcurrentOrder.addBox(cb);\n\t\t\t\t\t//Add checkbox to Hbox for displaying\n\t\t\t\t\th.getChildren().add(cb);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"OrderBox Error Found!\");\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t//Add HBox and its contents into the VBox\n\t\t\tv.getChildren().add(h);\n\t\t}\n\t\treturn v;\n\t}",
"public double getBoundingBoxLeft() {\n return boundingBoxLeft;\n }",
"private void printLeft() {\n System.out.println(\"left side:\");\n if(leftSide != null) {\n for (int person : leftSide) System.out.print(Integer.toString(person) + \" \");\n System.out.println();\n }\n }",
"void leftInv() {\n startAnimation(leftSubCubes(), Axis.X, Direction.CLOCKWISE);\n leftCubeSwap();\n leftCubeSwap();\n leftCubeSwap();\n }",
"public void createMinimap() {\n if (gameField.getFields().size() == 1024) {\n rootSize = 32;\n blockSize = 8;\n } else { //if size == 64^2 == 4096\n rootSize = 64;\n blockSize = 4;\n }\n int magnification = gameFieldController.getMagnification();\n if (AdvancedWarsApplication.getInstance().getGameScreenCon().base.getScene() != null) {\n positionBoxSizeX = blockSize *\n (AdvancedWarsApplication.getInstance().getGameScreenCon().base.getScene().getWidth() / (rootSize * magnification));\n\n positionBoxSizeY = blockSize *\n (AdvancedWarsApplication.getInstance().getGameScreenCon().base.getScene().getHeight() / (rootSize * magnification));\n } else {\n //for offline test\n positionBoxSizeX = (blockSize * 1920) / (rootSize * magnification);\n positionBoxSizeY = (blockSize * 1080) / (rootSize * magnification);\n }\n\n for (int i = 0; i < rootSize; ++i) {\n for (int j = 0; j < rootSize; ++j) {\n Field currentField = gameField.getFields().get(i * rootSize + j);\n Rectangle rectangle = new Rectangle(blockSize, blockSize);\n if (!currentField.getType().equals(\"Grass\")) {\n if (currentField.getType().equals(\"Water\")) {\n rectangle.setFill(Color.rgb(11, 89, 139));\n } else if (currentField.getType().equals(\"Forest\")) {\n rectangle.setFill(Color.rgb(38, 106, 0));\n } else { //if currentField equals Mountain\n rectangle.setFill(Color.rgb(95, 111, 54));\n }\n rectangle.relocate((i * blockSize) + 1, (j * blockSize) + 1);\n drawPane.getChildren().add(rectangle);\n }\n }\n }\n Rectangle rect = new Rectangle(positionBoxSizeX, positionBoxSizeY);\n Rectangle clip = new Rectangle(1, 1, positionBoxSizeX - 2, positionBoxSizeY - 2);\n positionBox = Shape.subtract(rect, clip);\n positionBox.setFill(Color.WHITE);\n drawPane.getChildren().add(positionBox);\n isCreated = true;\n }",
"protected void groupBoardArea(){\n for (int i = 0; i < norseCityArea.getComponents().length; i++){\n if (norseCityArea.getComponent(i) instanceof JLabel){\n norseCity.add((JLabel)norseCityArea.getComponent(i));\n }\n }\n for (int i = 0; i < greekCityArea.getComponents().length; i++){\n if (greekCityArea.getComponent(i) instanceof JLabel){\n greekCity.add((JLabel)greekCityArea.getComponent(i));\n }\n }\n for (int i = 0; i < egyptCityArea.getComponents().length; i++){\n if (egyptCityArea.getComponent(i) instanceof JLabel){\n egyptCity.add((JLabel)egyptCityArea.getComponent(i));\n }\n }\n for (int i = 0; i < norseProductArea.getComponents().length; i++){\n if (norseProductArea.getComponent(i) instanceof JLabel){\n norseProduction.add((JLabel)norseProductArea.getComponent(i));\n }\n }\n for (int i = 0; i < greekProductArea.getComponents().length; i++){\n if (greekProductArea.getComponent(i) instanceof JLabel){\n greekProduction.add((JLabel)greekProductArea.getComponent(i));\n }\n }\n for (int i = 0; i < egyptProductArea.getComponents().length; i++){\n if (egyptProductArea.getComponent(i) instanceof JLabel){\n egyptProduction.add((JLabel)egyptProductArea.getComponent(i));\n }\n }\n }",
"public void createSideBlocks() {\n Fill fill = new FillColor(Color.darkGray);\n Block topB = new Block(new Rectangle(new Point(0, 0), 800, 45), fill);\n Block rightB = new Block(new Rectangle(new Point(775, 25), 25, 576), fill);\n Block leftB = new Block(new Rectangle(new Point(0, 25), 25, 576), fill);\n //add each screen-side block to game and set 1 hitpoint.\n topB.addToGame(this);\n topB.setHitPoints(1);\n rightB.addToGame(this);\n rightB.setHitPoints(1);\n leftB.addToGame(this);\n leftB.setHitPoints(1);\n }",
"public BranchGroup blocksScene(){\n\t\t\n\t\tIterator iterator = blocks.iterator();\n\t\t\n\t\twhile(iterator.hasNext()){\n\t\t\tbg.addChild(((Block) iterator.next()).boxGridScene());\n\t\t}\n\t\treturn bg;\n\t}",
"private JPanel getJPanelLeft() {\r\n\t\tif (jPanelLeft == null) {\r\n\t\t\tjPanelLeft = new JPanel();\r\n\t\t\tjPanelLeft.setLayout(new BorderLayout());\r\n\t\t\tjLabelLeft = new JLabel(\"Left: \");\r\n\t\t\t//jLabelLeft.setPreferredSize(new Dimension(50, 20));\r\n\t\t\tjLabelLeft.setHorizontalAlignment(SwingConstants.RIGHT);\r\n\t\t\tSpinnerModel sModel = new SpinnerNumberModel(0, -Integer.MAX_VALUE, Integer.MAX_VALUE, 1); // init, min, max, step\r\n\t\t\tjSpinnerLeft = new JSpinner(sModel);\r\n\t\t\t//jSpinnerLeft.setPreferredSize(new Dimension(60, 20));\r\n\t\t\tjSpinnerLeft.addChangeListener(this);\r\n\t\t\tJSpinner.DefaultEditor defEditor = (JSpinner.DefaultEditor) jSpinnerLeft.getEditor();\r\n\t\t\tJFormattedTextField ftf = defEditor.getTextField();\r\n\t\t\tftf.setColumns(5);\r\n\t\t\tInternationalFormatter intFormatter = (InternationalFormatter) ftf.getFormatter();\r\n\t\t\tDecimalFormat decimalFormat = (DecimalFormat) intFormatter.getFormat();\r\n\t\t\tdecimalFormat.applyPattern(\"#\"); // decimalFormat.applyPattern(\"#,##0.0\")\r\n\t\t\tjPanelLeft.add(jLabelLeft, BorderLayout.WEST);\r\n\t\t\tjPanelLeft.add(jSpinnerLeft, BorderLayout.CENTER);\r\n\t\t}\r\n\t\treturn jPanelLeft;\r\n\t}",
"public void alignSelectedFurnitureOnLeftSide() {\n alignSelectedFurniture(new AlignmentAction() {\n public void alignFurniture(AlignedPieceOfFurniture [] alignedFurniture, \n HomePieceOfFurniture leadPiece) {\n float [][] points = leadPiece.getPoints();\n Line2D leftLine = new Line2D.Float(points [3][0], points [3][1], points [0][0], points [0][1]); \n for (AlignedPieceOfFurniture alignedPiece : alignedFurniture) {\n alignPieceOfFurnitureAlongLeftOrRightSides(alignedPiece.getPieceOfFurniture(), leadPiece, leftLine, false);\n }\n }\n });\n }",
"private void createGrpSelectStockCenter() {\n\t\t// create widgets\n\t\tgrpSelectStockCenter = new Group(getShell(), SWT.NONE);\n\t\tgrpSelectStockCenter.setBounds(new Rectangle(40, 100, 720, 120));\n\t\tgrpSelectStockCenter.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\tgrpSelectStockCenter\n\t\t.setText(\"Pharmacy Details (related to where stock is held)\");\n\n\t\trdBtnAddStockCenter = new Button(grpSelectStockCenter, SWT.RADIO);\n\t\trdBtnAddStockCenter.setBounds(new Rectangle(105, 25, 150, 30));\n\t\trdBtnAddStockCenter.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\trdBtnAddStockCenter.setText(\"Add New Pharmacy\");\n\n\t\trdBtnUpdateStockCenter = new Button(grpSelectStockCenter, SWT.RADIO);\n\t\trdBtnUpdateStockCenter.setBounds(new Rectangle(280, 20, 150, 30));\n\t\trdBtnUpdateStockCenter.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\trdBtnUpdateStockCenter.setText(\"Update a Pharmacy\");\n\n\t\trdBtnUpdatePharmacyDetails = new Button(grpSelectStockCenter, SWT.RADIO);\n\t\trdBtnUpdatePharmacyDetails.setBounds(new Rectangle(455, 20, 160, 30));\n\t\trdBtnUpdatePharmacyDetails.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\trdBtnUpdatePharmacyDetails.setText(\"Update Facility Details\");\n\n\t\tlblStockCenterName = new Label(grpSelectStockCenter, SWT.NONE);\n\t\tlblStockCenterName.setBounds(new Rectangle(155, 60, 100, 20));\n\t\tlblStockCenterName.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\tlblStockCenterName.setAlignment(SWT.RIGHT);\n\t\tlblStockCenterName.setText(\"Pharmacy name:\");\n\n\t\ttxtStockCenterName = new Text(grpSelectStockCenter, SWT.BORDER);\n\t\ttxtStockCenterName.setBounds(new Rectangle(\n\t\t\t\t265, 60, 200, 20));\n\t\ttxtStockCenterName.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\ttxtStockCenterName.addKeyListener(new KeyAdapter() {\n\t\t\t@Override\n\t\t\tpublic void keyReleased(KeyEvent evt) {\n\t\t\t\tif ((btnSearch != null) && (btnSearch.getEnabled()) && rdBtnUpdateStockCenter.getSelection()) {\n\t\t\t\t\tif (evt.character == SWT.CR) {\n\t\t\t\t\t\tcmdEnterPressed();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(rdBtnAddStockCenter.getSelection()) {\n\t\t\t\t\tfieldsChanged = true;\n\t\t\t\t}\n\t\t\t\trdBtnPreferredNo.setEnabled(true);\n\t\t\t\trdBtnPreferredYes.setEnabled(true);\n\n\t\t\t}\n\t\t});\n\t\ttxtStockCenterName.addModifyListener(new ModifyListener() {\n\t\t\t@Override\n\t\t\tpublic void modifyText(ModifyEvent event1) {\n\t\t\t\tif(rdBtnUpdateStockCenter.getSelection()) {\n\t\t\t\t\tfieldsChanged = true;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tbtnSearch = new Button(grpSelectStockCenter, SWT.NONE);\n\t\tbtnSearch.setBounds(new Rectangle(470, 57, 110, 28));\n\t\tbtnSearch.setText(\"Pharmacy Search\");\n\t\tbtnSearch\n\t\t.setToolTipText(\"Press this button to search for pharmacies.\");\n\t\tbtnSearch.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\tbtnSearch.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {\n\t\t\t\tcmdSearchWidgetSelected();\n\t\t\t}\n\t\t});\n\t\tbtnSearch.setVisible(false);\n\n\t\tlblPreferredStockCenter = new Label(grpSelectStockCenter, SWT.NONE);\n\t\tlblPreferredStockCenter.setBounds(new Rectangle(140, 97, 200, 20));\n\t\tlblPreferredStockCenter.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\tlblPreferredStockCenter.setAlignment(SWT.RIGHT);\n\t\tlblPreferredStockCenter.setText(\"Preferred Pharmacy?\");\n\n\t\tComposite cmpRadio = new Composite(grpSelectStockCenter, SWT.NONE);\n\t\tcmpRadio.setLayout(null);\n\t\tcmpRadio.setBounds(new Rectangle(340, 75, 100, 40));\n\n\t\trdBtnPreferredYes = new Button(cmpRadio, SWT.RADIO);\n\t\trdBtnPreferredYes.setBounds(new Rectangle(10, 10, 40, 30));\n\t\trdBtnPreferredYes.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\trdBtnPreferredYes.setText(\"Yes\");\n\t\trdBtnPreferredYes.setEnabled(false);\n\t\trdBtnPreferredYes.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tif(rdBtnUpdateStockCenter.getSelection() && (!rdBtnPreferredYes.getSelection())) {\n\t\t\t\t\tfieldsChanged = true;\n\t\t\t\t\tif(rdBtnUpdateStockCenter.getSelection() &&\n\t\t\t\t\t\t\t!\"\".equalsIgnoreCase(txtStockCenterName.getText()) &&\n\t\t\t\t\t\t\tlocalStockCenter.isPreferred()) {\n\t\t\t\t\t\tpreferredChanged = true;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tpreferredChanged = false;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\trdBtnPreferredNo = new Button(cmpRadio, SWT.RADIO);\n\t\trdBtnPreferredNo.setBounds(new Rectangle(60, 10, 40, 30));\n\t\trdBtnPreferredNo.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\trdBtnPreferredNo.setText(\"No\");\n\t\trdBtnPreferredNo.setSelection(true);\n\t\trdBtnPreferredNo.setEnabled(false);\n\t\trdBtnPreferredNo.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tif (rdBtnUpdateStockCenter.getSelection()\n\t\t\t\t\t\t&& (!rdBtnPreferredNo.getSelection())) {\n\t\t\t\t\tfieldsChanged = true;\n\t\t\t\t}\n\t\t\t\tif (rdBtnUpdateStockCenter.getSelection() && preferredChanged\n\t\t\t\t\t\t&& rdBtnPreferredNo.getSelection()) {\n\t\t\t\t\tMessageBox mbox = new MessageBox(getShell(),\n\t\t\t\t\t\t\tSWT.ICON_INFORMATION | SWT.OK);\n\t\t\t\t\tmbox.setText(\"Cannot Change Preferred Pharmacy \");\n\t\t\t\t\tmbox\n\t\t\t\t\t.setMessage(\"'\"\n\t\t\t\t\t\t\t+ txtStockCenterName.getText()\n\t\t\t\t\t\t\t+ \"' is currently the preferred pharmacy and this cannot be changed here.\\n\\nIf you would like to make another pharmacy the preferred one, please select it using the search button, and then set that pharmacy to the preferred one. \");\n\t\t\t\t\tmbox.open();\n\n\t\t\t\t\trdBtnPreferredYes.setSelection(true);\n\t\t\t\t\trdBtnPreferredNo.setSelection(false);\n\n\t\t\t\t\tif (\"\"\n\t\t\t\t\t\t\t.equalsIgnoreCase(txtStockCenterName.getText()\n\t\t\t\t\t\t\t\t\t.trim())\n\t\t\t\t\t\t\t\t\t|| localStockCenter.getStockCenterName().equalsIgnoreCase(txtStockCenterName.getText())) {\n\t\t\t\t\t\tfieldsChanged = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\n\t\t// add listeners\n\t\trdBtnAddStockCenter\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\tif (rdBtnAddStockCenter.getSelection()) {\n\n\t\t\t\t\tif(changeModes()) {\n\n\t\t\t\t\t\tString headerTxt = \"Add a New Pharmacy\";\n\t\t\t\t\t\tiDartImage icoImage = iDartImage.PHARMACYUSER;\n\t\t\t\t\t\tbuildCompHeader(headerTxt, icoImage);\n\t\t\t\t\t\tgetShell().setText(\"Add a New Pharmacy\");\n\t\t\t\t\t\tcurrentScreenMode = screenModes[0];\n\t\t\t\t\t\tclearForm();\n\t\t\t\t\t\tenableFields();\n\t\t\t\t\t\t// reset fields changed\n\t\t\t\t\t\tfieldsChanged = false;\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\trdBtnAddStockCenter.setSelection(false);\n\t\t\t\t\t\trdBtnUpdateStockCenter.setSelection(false);\n\t\t\t\t\t\trdBtnUpdatePharmacyDetails.setSelection(false);\n\n\t\t\t\t\t\t// select previous value\n\t\t\t\t\t\tif(currentScreenMode.equalsIgnoreCase(screenModes[0])) {\n\t\t\t\t\t\t\trdBtnAddStockCenter.setSelection(true);\n\t\t\t\t\t\t} else if(currentScreenMode.equalsIgnoreCase(screenModes[1])) {\n\t\t\t\t\t\t\trdBtnUpdateStockCenter.setSelection(true);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\trdBtnUpdatePharmacyDetails.setSelection(true);\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\n\t\trdBtnUpdateStockCenter\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\tif (rdBtnUpdateStockCenter.getSelection()) {\n\n\t\t\t\t\tif (changeModes()) {\n\n\t\t\t\t\t\tString headerTxt = \"Update a Pharmacy\";\n\t\t\t\t\t\tiDartImage icoImage = iDartImage.PHARMACYUSER;\n\t\t\t\t\t\tbuildCompHeader(headerTxt, icoImage);\n\t\t\t\t\t\t\t\tgetShell().setText(\"Update a Pharmacy\");\n\t\t\t\t\t\tcurrentScreenMode = screenModes[1];\n\t\t\t\t\t\tclearForm();\n\t\t\t\t\t\tenableFields();\n\t\t\t\t\t\t// reset fields changed\n\t\t\t\t\t\tfieldsChanged = false;\n\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\trdBtnAddStockCenter.setSelection(false);\n\t\t\t\t\t\trdBtnUpdateStockCenter.setSelection(false);\n\t\t\t\t\t\trdBtnUpdatePharmacyDetails.setSelection(false);\n\n\t\t\t\t\t\t// select previous value\n\t\t\t\t\t\tif(currentScreenMode.equalsIgnoreCase(screenModes[0])) {\n\t\t\t\t\t\t\trdBtnAddStockCenter.setSelection(true);\n\t\t\t\t\t\t} else if(currentScreenMode.equalsIgnoreCase(screenModes[1])) {\n\t\t\t\t\t\t\trdBtnUpdateStockCenter.setSelection(true);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\trdBtnUpdatePharmacyDetails.setSelection(true);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\trdBtnUpdatePharmacyDetails\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\tif (rdBtnUpdatePharmacyDetails.getSelection()) {\n\n\t\t\t\t\tif (changeModes()) {\n\n\t\t\t\t\t\tString headerTxt = \"Update Facility Details\";\n\t\t\t\t\t\tiDartImage icoImage = iDartImage.PHARMACYUSER;\n\t\t\t\t\t\tbuildCompHeader(headerTxt, icoImage);\n\t\t\t\t\t\tgetShell().setText(\"Update Facility Details\");\n\t\t\t\t\t\tcurrentScreenMode = screenModes[2];\n\t\t\t\t\t\tclearForm();\n\t\t\t\t\t\tenableFields();\n\t\t\t\t\t\t// reset fields changed\n\t\t\t\t\t\tfieldsChanged = false;\n\t\t\t\t\t\tloadPharmacyDetails();\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\trdBtnAddStockCenter.setSelection(false);\n\t\t\t\t\t\trdBtnUpdateStockCenter.setSelection(false);\n\t\t\t\t\t\trdBtnUpdatePharmacyDetails.setSelection(false);\n\n\t\t\t\t\t\t// select previous value\n\t\t\t\t\t\tif(currentScreenMode.equalsIgnoreCase(screenModes[0])) {\n\t\t\t\t\t\t\trdBtnAddStockCenter.setSelection(true);\n\t\t\t\t\t\t} else if(currentScreenMode.equalsIgnoreCase(screenModes[1])) {\n\t\t\t\t\t\t\trdBtnUpdateStockCenter.setSelection(true);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\trdBtnUpdatePharmacyDetails.setSelection(true);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t// set initial values\n\t\trdBtnAddStockCenter.setSelection(true);\n\t\trdBtnUpdateStockCenter.setSelection(false);\n\t\trdBtnUpdatePharmacyDetails.setSelection(false);\n\n\t}",
"public void addBox()\n {\n if(Student.sittingRia==false) {\n box = new BoxRia(\"chalkboard.png\",4,2);\n addObject(box,box.myRow,box.mySeat);\n chalk = new BoxRia(\"chalk.png\",0,0);\n addObject(chalk,2,3);\n }\n }",
"private HBox createTopOrderBox() {\n\t\tHBox h = new HBox();\n\t\tHBox.setMargin(h, new Insets(4));\n\t\t\n\t\t//Create the labels for the current order\n\t\tLabel l1 = new Label(\"Order: \");\n\t\tint currOrder = noOfOrders+1;\n\t\tLabel l2 = new Label(\"\"+currOrder);\n\t\t\n\t\t//A divider for neatness\n\t\tRegion r = new Region();\n\t\tr.setPrefWidth(150);\n\t\t\n\t\t//Create the label and TextField for the ticks we want from the user\n\t\tLabel l3 = new Label(\"TicksToPack: \");\n\t\tTextField tf = new TextField();\n\t\ttf.setPromptText(\"value between 0-99\");\n\t\t//Assign the TextField to the currentOrder variable to reference later\n\t\tcurrentOrder.setTickNo(tf);\n\t\t\n\t\t//Add all this to the HBox and return it.\n\t\th.getChildren().addAll(l1,l2,r,l3,tf);\n\t\treturn h;\n\t}",
"private void addLeftBlock(Position p, TETile te,\n int len, int leftWid, int rightWid) {\n\n int x = p.x;\n int y = p.y;\n for (int i = x; i > x - len; i -= 1) {\n for (int j = y - leftWid; j < y + rightWid + 1; j += 1) {\n world[i][j] = te;\n }\n }\n }",
"protected RectF getLeftHandleRect() {\n return mLeftHandle;\n }",
"public void initNumLeftBlock(JTextField n[]){ // n[] is for numleft zone\t\n\t\tfor(int i=0;i<9;i++)\n\t\t\tnumLeft[i]=9;\n\t\tfor(int i=0;i<81;i++){\n\t\t\tchar c=sudokuDisplay[i/9][i%9];\n\t\t\tif(c!='.'){\n\t\t\t\tint j=sudokuDisplay[i/9][i%9]-'1'; // get the number that block has\n\t\t\t\tnumLeft[j]--;\n\t\t\t}\n\t\t}\n\t\tfor(Integer i=0;i<9;i++){\n\t\t\tInteger num=numLeft[i];\n\t\t\tn[i+9].setText(num.toString()); // set numleft value\n\t\t}\n\t}",
"public Box getBox() {\n\t//we compute the coordinates of the top left square \n\t//of the box by integer division\n\treturn new Box((rowIndex/3)*3, (colIndex/3)*3); \n }",
"private void createLeftSide() {\n\t\tfor (int i = 0; i < rins.size(); i ++){\r\n\t\t\tif (rins.get(i).getRinStatus().equalsIgnoreCase(\"NEW\"))\r\n\t\t\t\tnewRINs.add(rins.get(i));\r\n\t\t}\r\n\t\tfor (int i = 0; i < newRINs.size(); i ++){\r\n\t\t\tVerificationRow row = new VerificationRow(newRINs.get(i));\r\n\t\t\trowList.add(row);\r\n\t\t\trinSide.add(row);//Add the row to UI\r\n\r\n\t\t\tfor (int j = 0; j < 9; j ++){\r\n\t\t\t\trow.getRINComponentBoxes()[j].setText(newRINs.get(i).readComponent()[j]);\r\n\t\t\t}\r\n\t\t\trow.showRowStatus(newRINs.get(i));\r\n\t\t\trow.setReadOnly();\r\n\t\t}\r\n\t\trejectAcceptPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);\r\n\t\trejectAcceptPanel.setSpacing(20);\r\n\t\trejectAcceptPanel.add(rejectButton);\r\n\t\trejectAcceptPanel.add(acceptButton);\r\n\t\tacceptButton.setEnabled(false);\r\n\t\trinSide.add(rejectAcceptPanel);\r\n\t\trinSide.setHeight(LEFTSIDE_HEIGHT);\r\n\t\trinSide.setWidth(LEFTSIDE_WIDTH);\r\n\t\thPanel.add(rinSide);\r\n\r\n\t\trejectButton.addClickListener(new ClickListener(){\r\n\t\t\tpublic void onClick(Widget sender) {\r\n\t\t\t\tif (Window.confirm(\"Are you sure you want to reject the Invoice?\")){\r\n\t\t\t\t\trejectButton.setEnabled(false);\r\n\t\t\t\t\tbuyInvoice.setStatus(\"REJECTED\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tsvc.saveInvoice(buyInvoice, new AsyncCallback<Void>(){\r\n\t\t\t\t\t\tpublic void onFailure(Throwable arg0) {\r\n\t\t\t\t\t\t\trejectButton.setEnabled(true);\r\n\t\t\t\t\t\t\tWindow.alert(\"Rejection failure: \"+arg0.getMessage());\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tpublic void onSuccess(Void arg0) {\r\n\t\t\t\t\t\t\tWindow.alert(\"Rejection success!\");\r\n\t\t\t\t\t\t\trootPanel.clear();\r\n\t\t\t\t\t\t\trootPanel.add(new AccountantStartPanel());\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\r\n\t\tacceptButton.addClickListener(new ClickListener(){\r\n\t\t\tpublic void onClick(Widget sender) {\r\n\t\t\t\tacceptButton.setEnabled(false);\r\n\t\t\t\tfor (int i = 0; i < newRINs.size();i++){\r\n\t\t\t\t\tnewRINs.get(i).setRinStatus(\"ACCEPTED\");\r\n\t\t\t\t}//Can only change the status of NEW RINs\r\n\t\t\t\tbuyInvoice.setStatus(\"ACCEPTED\");\r\n\t\t\t\tsvc.saveInvoice(buyInvoice, new AsyncCallback<Void>(){\r\n\t\t\t\t\tpublic void onFailure(Throwable arg0) {\r\n\t\t\t\t\t\tWindow.alert(\"Acception failure: \" + arg0.getMessage());\r\n\t\t\t\t\t\tacceptButton.setEnabled(true);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tpublic void onSuccess(Void arg0) {\r\n\t\t\t\t\t\tWindow.alert(\"Acception success!\");\r\n\t\t\t\t\t\trootPanel.clear();\r\n\t\t\t\t\t\trootPanel.add(new AccountantStartPanel());\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t});\r\n\t}",
"private void split(){\n // Slice horizontaly to get sub nodes width\n float subWidth = this.getBounds().width / 2;\n // Slice vertically to get sub nodes height\n float subHeight = this.getBounds().height / 2;\n float x = this.getBounds().x;\n float y = this.getBounds().y;\n int newLevel = this.level + 1;\n\n // Create the 4 nodes\n this.getNodes().add(0, new QuadTree(newLevel, new Rectangle(x + subWidth, y, subWidth, subHeight)));\n this.getNodes().add(1, new QuadTree(newLevel, new Rectangle(x, y, subWidth, subHeight)));\n this.getNodes().add(2, new QuadTree(newLevel, new Rectangle(x, y + subHeight, subWidth, subHeight)));\n this.getNodes().add(3, new QuadTree(newLevel, new Rectangle(x + subWidth, y + subHeight, subWidth, subHeight)));\n\n }",
"private RectHV leftRect(RectHV rect, Node h) {\n\t\tif (h.isVertical) { // left rect\r\n\t\t\treturn new RectHV(rect.xmin(), rect.ymin(), h.p.x(), rect.ymax());\r\n\t\t} else { //bottom rect\r\n\t\t\treturn new RectHV(rect.xmin(), rect.ymin(), rect.xmax(), h.p.y());\r\n\t\t}\r\n\t}",
"private void setSizeBox() {\n\t\t\tthis.leftX = pointsSubStroke.get(0).getX();\n\t\t\tthis.righX = pointsSubStroke.get(0).getX();\n\t\t\tthis.topY = pointsSubStroke.get(0).getY();\n\t\t\tthis.bottomY = pointsSubStroke.get(0).getY();\n\t\t\t\n\t\t\tfor(int i = 0; i < pointsSubStroke.size();i++) {\n\t\t\t\tdouble x = pointsSubStroke.get(i).getX();\n\t\t\t\tdouble y = pointsSubStroke.get(i).getX();\n\t\t\t\t\n\t\t\t\tthis.leftX = Math.min(x, leftX);\n\t\t\t\tthis.righX = Math.max(x, righX);\n\t\t\t\tthis.topY = Math.min(y, topY);\n\t\t\t\tthis.bottomY = Math.max(y, bottomY);\n\t\t\t}\n\t\t}",
"private void leftLeftCase(NodeRB<K, V> x) {\n\t\t// Swap colors of g and p\n\t\tboolean aux = x.parent.color;\n\t\tx.parent.color = x.getGrandParent().color;\n\t\tx.getGrandParent().color = aux;\n\n\t\t// Right Rotate g\n\t\tNodeRB<K, V> g = x.getGrandParent();\n\t\tif (g.parent == null) {\n\t\t\troot = rotateRight(g);\n\t\t} else {\n\t\t\trotateRight(g);\n\t\t}\n\t}",
"private JPanel getJPanelLeft() {\r\n if (jPanelLeft == null) {\r\n BorderLayout borderLayout = new BorderLayout(0, 10);\r\n borderLayout.setVgap(10);\r\n jPanelLeft = new JPanel();\r\n jPanelLeft.setLayout(borderLayout);\r\n jPanelLeft.setPreferredSize(new Dimension(170, 0));\r\n jPanelLeft.setBorder(BorderFactory.createCompoundBorder(\r\n BorderFactory.createEmptyBorder(10, 10, 10, 5),\r\n BorderFactory.createEtchedBorder(EtchedBorder.LOWERED)));\r\n jPanelLeft.add(getJScrollPane(), BorderLayout.CENTER);\r\n jPanelLeft.add(getJbProcess(), BorderLayout.SOUTH);\r\n }\r\n return jPanelLeft;\r\n }",
"private void setupLeftPanel()\n {\n // display the radio buttons for the various sorts.\n Box leftPanel = Box.createVerticalBox();\n Box buttonColumn = Box.createVerticalBox();\n Box nameDelayBox = Box.createHorizontalBox();\n buttonColumn.setBorder(BorderFactory.createTitledBorder(\"Algorithms\"));\n ButtonGroup bg = new ButtonGroup();\n sortTypeButtons = new JRadioButton[sortNames.length]; // to change which sorts are available, look at variables\n // at the top of the class.\n for (int i=0; i<sortNames.length; i++)\n {\n sortTypeButtons[i] = new JRadioButton(sortNames[i]);\n buttonColumn.add(sortTypeButtons[i]);\n bg.add(sortTypeButtons[i]);\n sortTypeButtons[i].addActionListener(this);\n }\n sortTypeButtons[0].setSelected(true);\n nameDelayBox.add(buttonColumn);\n\n // display the delay slider.\n delaySlider = new JSlider(JSlider.VERTICAL,0,20,1);\n delaySlider.addChangeListener(this);\n delaySlider.setMajorTickSpacing(1);\n delaySlider.setPaintTicks(true);\n Hashtable<Integer,JLabel> labelTable = new Hashtable<>();\n labelTable.put(0,new JLabel(\"0\"));\n labelTable.put(5,new JLabel(\"5\"));\n labelTable.put(10,new JLabel(\"10\"));\n labelTable.put(15,new JLabel(\"15\"));\n labelTable.put(20,new JLabel(\"20\"));\n delaySlider.setLabelTable(labelTable);\n delaySlider.setPaintLabels(true);\n delaySlider.setSnapToTicks(true);\n delaySlider.setBorder(new TitledBorder(\"Delay\"));\n nameDelayBox.add(delaySlider);\n leftPanel.add(nameDelayBox);\n\n // display the run/cancel and reset buttons.\n Box runResetPanel = Box.createHorizontalBox();\n runButton = new JButton(\"Run\");\n runButton.addActionListener(this);\n resetButton = new JButton(\"Reset\");\n resetButton.addActionListener(this);\n runResetPanel.add(runButton);\n runResetPanel.add(resetButton);\n leftPanel.add(runResetPanel);\n\n // shows popup menu of possible values of N.\n nMenu = new JComboBox<>();\n for (int v:possibleNValues) // see the variables at the top of the class to modify options shown.\n nMenu.addItem(v);\n nMenu.addActionListener(this);\n nMenu.setSelectedItem(100);\n nMenu.setBorder(new TitledBorder(\"Array Size (N)\"));\n leftPanel.add(nMenu);\n\n // label that indicates whether this list is sorted correctly\n leftPanel.add(new JLabel(\"Status\"));\n statusLabel = new JLabel(\"\");\n leftPanel.add(statusLabel);\n leftPanel.add(Box.createVerticalStrut(10));\n\n // label that indicates how much time (was/has been) spent on the most recent run\n leftPanel.add(new JLabel(\"Time\"));\n timeLabel = new JLabel(\"00.000\");\n leftPanel.add(timeLabel);\n leftPanel.add(Box.createVerticalStrut(10));\n\n // label that indicates which sort was run most recently.\n leftPanel.add(new JLabel(\"Latest Run\"));\n latestRunLabel = new JLabel(\"None\");\n leftPanel.add(latestRunLabel);\n leftPanel.add(Box.createVerticalGlue());\n\n // update alignment so things look nice.\n buttonColumn.setAlignmentY(Component.TOP_ALIGNMENT);\n nameDelayBox.setAlignmentX(Component.LEFT_ALIGNMENT);\n runResetPanel.setAlignmentX(Component.LEFT_ALIGNMENT);\n nMenu.setAlignmentX(Component.LEFT_ALIGNMENT);\n delaySlider.setAlignmentY(Component.TOP_ALIGNMENT);\n statusLabel.setAlignmentX(Component.LEFT_ALIGNMENT);\n timeLabel.setAlignmentX(Component.LEFT_ALIGNMENT);\n latestRunLabel.setAlignmentX(Component.LEFT_ALIGNMENT);\n\n getContentPane().add(leftPanel,BorderLayout.WEST);\n\n }",
"public void printLeftView(){\n if(root == null)\n return;\n\n // Take a queue and enqueue root and null\n // every level ending is signified by null\n // since there is just one node at root we enqueue root as well as null\n // take a bool value printed = false\n Queue<Node<T>> queue = new LinkedList<>();\n queue.add(root);\n queue.add(null);\n boolean printed = false;\n\n while(queue.size() != 0){\n Node<T> node = queue.remove();\n if(node != null){\n // if the first node is not printed print it and flip the bool value\n if(! printed){\n System.out.println(node.data);\n printed = true;\n }\n\n // add left and right child if they exist\n if(node.left != null)\n queue.add(node.left);\n if(node.right != null)\n queue.add(node.right);\n }else{\n // flip the printed bool value\n // break if the queue is empty else enqueue a null\n printed = false;\n if(queue.size() == 0)\n break;\n queue.add(null);\n }\n }\n }",
"protected void refillLeft(){\n\t\tif(!shouldRepeat && isSrollingDisabled) return; //prevent next layout calls to override first init to scrolling disabled by falling to this branch\n\t\tif(getChildCount() == 0) return;\n\t\t\n\t\tfinal int leftScreenEdge = getScrollX();\n\t\t\n\t\tView child = getChildAt(0);\n\t\tint childLeft = child.getLeft();\n\t\tint currLayoutRight = childLeft - ((LoopLayoutParams)child.getLayoutParams()).leftMargin;\n\t\twhile(currLayoutRight > leftScreenEdge){\n\t\t\tmFirstItemPosition--;\n\t\t\tif(mFirstItemPosition < 0) mFirstItemPosition = mAdapter.getCount()-1;\n\t\t\t\n\t\t\tchild = mAdapter.getView(mFirstItemPosition, getCachedView(), this);\n Validate.notNull(child,\"Your adapter has returned null from getView.\");\n\t\t\tchild = addAndMeasureChildHorizontal(child, LAYOUT_MODE_TO_BEFORE);\n\t\t\tcurrLayoutRight = layoutChildHorizontalToBefore(child, currLayoutRight, (LoopLayoutParams) child.getLayoutParams());\n\t\t\tchildLeft = child.getLeft() - ((LoopLayoutParams)child.getLayoutParams()).leftMargin;\n\t\t\t//update left edge of children in container\n\t\t\tmLeftChildEdge = childLeft;\n\t\t\t\n\t\t\t//if selected view is going to screen, set selected state on him\n\t\t\tif(mFirstItemPosition == mSelectedPosition){\n\t\t\t\tchild.setSelected(true);\n\t\t\t}\n\t\t}\n\t}",
"@Test\n public void shouldTestIsReorderValidWithUnbreakableFromNonGroupedLeft() {\n this.gridLayer.setClientAreaProvider(new IClientAreaProvider() {\n\n @Override\n public Rectangle getClientArea() {\n return new Rectangle(0, 0, 1600, 250);\n }\n\n });\n this.gridLayer.doCommand(new ClientAreaResizeCommand(new Shell(Display.getDefault(), SWT.V_SCROLL | SWT.H_SCROLL)));\n\n // remove first group\n this.rowGroupHeaderLayer.removeGroup(11);\n\n // set all remaining groups unbreakable\n this.rowGroupHeaderLayer.setGroupUnbreakable(0, true);\n this.rowGroupHeaderLayer.setGroupUnbreakable(4, true);\n this.rowGroupHeaderLayer.setGroupUnbreakable(8, true);\n\n // between unbreakable groups\n assertTrue(RowGroupUtils.isReorderValid(this.rowGroupHeaderLayer, 12, 8, true));\n // to start of table\n assertTrue(RowGroupUtils.isReorderValid(this.rowGroupHeaderLayer, 13, 0, true));\n }",
"public void refreshLeft();",
"private void makeContainer(){\n Container X = (Container) ((SpringGridLayout) headlineContainer.getLayout()).getChild(1, 0);\n if (!(X == null)) headlineContainer.removeChild(X);\n\n Container sub = new Container(new SpringGridLayout(Axis.X,Axis.Y,FillMode.Last,FillMode.None));\n sub.setBackground(null); // just in case style sets an bg here\n Container sub1 = new Container();\n sub1.setBackground(null);\n Container sub2 = new Container();\n sub2.setBackground(null);\n Container sub3 = new Container();\n sub3.setBackground(null);\n\n sub.addChild(sub1);\n sub.addChild(sub2);\n sub.addChild(sub3);\n\n headlineContainer.addChild(sub ,1,0);\n/*\n sub2.setName(\"TEST\");\n sub3.setBackground(new QuadBackgroundComponent(ColorRGBA.Pink));\n\n // sub1.setPreferredSize(new Vector3f(25,50,0));\n sub1.setBackground(new QuadBackgroundComponent(ColorRGBA.Green));\n */\n }",
"@Override\n\tpublic String box() {\n\t\treturn \"Earphone box\";\n\t}",
"public void selectionLeft() {\n\t\tselectedSlotPosX = (selectedSlotPosX == 0) ? C.MENU_INVENTORY_ITEM_SLOT_WIDTH - 1 : selectedSlotPosX-1;\n\t}",
"public void setLeft(int x) {\r\n leftSide = x;\r\n }",
"private Slot getLeft(Slot slot) {\n if (slot.getColumn() - 2 >= Board.MIN_COLUMN &&\n boardObject.getSlot(slot.getRow(), slot.getColumn() - 2).getColor() == Slot.EMPTY &&\n boardObject.getSlot(slot.getRow(), slot.getColumn() - 1).getColor() != Slot.EMPTY) {\n return new Slot(slot.getRow(), slot.getColumn() - 2, Slot.EMPTY);\n }\n\n return null;\n }",
"private void Leftlboard(Point2 position) {\r\n GameBoard Leftlboard = new GameBoard(position, BoardColor, BoardType.Left);\r\n boards.add(Leftlboard);\r\n }",
"private void boxCorners() {\n\t\tint tileTL = Track.getTiles()[(int) ((x + bounds.x) / Tile.TILEWIDTH)][(int) ((y + bounds.y)/ Tile.TILEHEIGHT)];\n\t\tint tileTR = Track.getTiles()[(int) ((x + bounds.x + bounds.width) / Tile.TILEWIDTH)][(int) ((y + bounds.y)/ Tile.TILEHEIGHT)];\n\t\tint tileBL = Track.getTiles()[(int) ((x + bounds.x) / Tile.TILEWIDTH)][(int) ((y + bounds.y + bounds.height)/ Tile.TILEHEIGHT)];\n\t\tint tileBR = Track.getTiles()[(int) ((x + bounds.x + bounds.width) / Tile.TILEWIDTH)][(int) ((y + bounds.y + bounds.height)/ Tile.TILEHEIGHT)];\n\t\tif(vector[0] == 0 && ((tileTL == 2 && tileTR == 3 && tileBL == 5 && tileBR == 4)||\n\t\t\t\t(tileTL == 21 && tileTR == 22 && tileBL == 24 && tileBR == 23) || \n\t\t\t\t(SettingsNdAudio.isHandicap() && tileTL == 25 && tileTR == 26 && tileBL == 28 && tileBR == 27) ||\n\t\t\t\t(SettingsNdAudio.isHandicap() && tileTL == 29 && tileTR == 30 && tileBL == 32 && tileBR == 31)\n\t\t\t\t)) {\n\t\t\tif(!hasReset) {\n\t\t\t\tticker = 0;\n\t\t\t\thasReset = true;\n\t\t\t}\n\t\t\tif(GameState.getGameActive() == 0) {\n\t\t\t\tGameState.setGameActive(2);\n\t\t\t}else if(GameState.getGameActive() == 4) {\n\t\t\t\tif(GameState.getLevel() + 1 < 10) {\n\t\t\t\t\tGameState.setLevel(GameState.getLevel() + 1);\n\t\t\t\t\tGameState newLv = new GameState(handler, GameState.getLevel());\n\t\t\t\t\tState.setState(newLv);\n\t\t\t\t} else\n\t\t\t\t\tGameState.setGameActive(2);\n\t\t\t}\n\t\t}\n\t}",
"public int getLeft(){\n\t\treturn platformHitbox.x;\n\t}",
"private int leftSideView(Node root, int currentLevel, int processingLevel){\n if(root== null){\n return processingLevel;\n }\n if(processingLevel == currentLevel) {\n System.out.println(root.getData());\n processingLevel++;\n }\n processingLevel = leftSideView(root.getLeft(), currentLevel+1, processingLevel);\n processingLevel = leftSideView(root.getRight(), currentLevel+1, processingLevel);\n\n return processingLevel;\n }",
"private VBox vboxFormat() {\n VBox vbox = new VBox();\n // vbox.setAlignment(Pos.BASELINE_CENTER);\n vbox.setSpacing(10);\n vbox.setPadding(new Insets(20, 20, 20, 20));\n return vbox;\n }",
"public int getBox(){\n\t\treturn box;\n\t}",
"private AvlNode<E> rotateWithLeftChild(AvlNode<E> k1){\n AvlNode<E> k2 = k1.left;\n k1.left = k2.right;\n k2.right = k1;\n k1.height = max(height(k1.left), height(k2.right)) + 1;\n k2.height = max(height(k2.left), k1.height) + 1;\n return k2;\n }",
"public void justifyLeft() {\n\t\tleft.left();\n\t}",
"private int leftChild(int index) {\n return index * 2;\n }",
"@Override\r\n protected void computeBox ()\r\n {\r\n // Stem or similar info\r\n Rectangle newBox = new Rectangle(getTailLocation());\r\n newBox.add(getHeadLocation());\r\n\r\n // Each and every note\r\n for (TreeNode n : getNotes()) {\r\n Note note = (Note) n;\r\n\r\n newBox.add(note.getBox());\r\n }\r\n\r\n setBox(newBox);\r\n }",
"public Box[][] getBoxes() {\n \treturn boxes;\n }",
"public boolean displayLeftArm() {\r\n\t\tfinal List<Block> newBlocks = new ArrayList<>();\r\n\t\tif (this.leftArmConsumed) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tfinal Location l1 = GeneralMethods.getLeftSide(this.player.getLocation(), 1).add(0, 1.5, 0);\r\n\t\tif (!this.canPlaceBlock(l1.getBlock())) {\r\n\t\t\tthis.left.clear();\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (!(this.getLeftHandPos().getBlock().getLocation().equals(l1.getBlock().getLocation()))) {\r\n\t\t\tthis.addBlock(l1.getBlock(), GeneralMethods.getWaterData(3), 100);\r\n\t\t\tnewBlocks.add(l1.getBlock());\r\n\t\t}\r\n\r\n\t\tfinal Location l2 = GeneralMethods.getLeftSide(this.player.getLocation(), 2).add(0, 1.5, 0);\r\n\t\tif (!this.canPlaceBlock(l2.getBlock()) || !this.canPlaceBlock(l1.getBlock())) {\r\n\t\t\tthis.left.clear();\r\n\t\t\tthis.left.addAll(newBlocks);\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tthis.addBlock(l2.getBlock(), Material.WATER.createBlockData(), 100);\r\n\t\tnewBlocks.add(l2.getBlock());\r\n\r\n\t\tfor (int j = 1; j <= this.initLength; j++) {\r\n\t\t\tfinal Location l3 = l2.clone().toVector().add(this.player.getLocation().clone().getDirection().multiply(j)).toLocation(this.player.getWorld());\r\n\t\t\tif (!this.canPlaceBlock(l3.getBlock()) || !this.canPlaceBlock(l2.getBlock()) || !this.canPlaceBlock(l1.getBlock())) {\r\n\t\t\t\tthis.left.clear();\r\n\t\t\t\tthis.left.addAll(newBlocks);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\tnewBlocks.add(l3.getBlock());\r\n\t\t\tif (j >= 1 && this.selectedSlot == this.freezeSlot && this.bPlayer.canIcebend()) {\r\n\t\t\t\tthis.addBlock(l3.getBlock(), Material.ICE.createBlockData(), 100);\r\n\t\t\t} else {\r\n\t\t\t\tthis.addBlock(l3.getBlock(), Material.WATER.createBlockData(), 100);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.left.clear();\r\n\t\tthis.left.addAll(newBlocks);\r\n\r\n\t\treturn true;\r\n\t}",
"EObject getLeft();",
"public boolean LeftIntersects(BoundingBox other) {\r\n\t\treturn ((Math.abs(other.getRight() - left) < SMALL_NUMBER)\r\n\t\t\t\t&& (other.getTop() == top));\r\n\t}",
"private void createBorders() {\r\n // Upper border rectangle\r\n Rectangle topRecFrame = new Rectangle(new Point(0, 0), WITH, SIZE + 20);\r\n // Left border rectangle\r\n Rectangle leftRecFrame = new Rectangle(new Point(0, SIZE + 21), SIZE, HEIGHT);\r\n // Right border rectangle\r\n Rectangle rightRecFrame = new Rectangle(new Point(WITH - SIZE, SIZE + 21), SIZE, HEIGHT);\r\n // Rectangle for block on top of upper block for the score\r\n Rectangle topRecScore = new Rectangle(new Point(0, 0), WITH, 20);\r\n Block topScore = new Block(topRecScore, Color.LIGHT_GRAY, 0);\r\n Block topFrame = new Block(topRecFrame, Color.GRAY, 0);\r\n Block leftFrame = new Block(leftRecFrame, Color.gray, 0);\r\n Block rightFrame = new Block(rightRecFrame, Color.gray, 0);\r\n topFrame.addToGame(this);\r\n leftFrame.addToGame(this);\r\n rightFrame.addToGame(this);\r\n topScore.addToGame(this);\r\n\r\n }",
"private void createGrpLabel() {\n\n\t\tgrpLabel = new Group(grpPharmacyDetails, SWT.NONE);\n\t\tgrpLabel.setText(\"Preview of Label\");\n\t\tgrpLabel.setBounds(new Rectangle(390, 40, 310, 230));\n\t\tgrpLabel.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\n\t\tcanvasLabel = new Canvas(grpLabel, SWT.NONE);\n\t\tcanvasLabel.setBounds(new org.eclipse.swt.graphics.Rectangle(12, 18,\n\t\t\t\t285, 200));\n\t\tcanvasLabel.setBackground(ResourceUtils.getColor(iDartColor.WHITE));\n\t\tcreateCanvasBorders();\n\n\t\tlblCanvasPharmName = new Label(canvasLabel, SWT.NONE);\n\t\tlblCanvasPharmName.setText(\"Facility Name\");\n\t\tlblCanvasPharmName.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\tlblCanvasPharmName.setBackground(ResourceUtils\n\t\t\t\t.getColor(iDartColor.WHITE));\n\t\tlblCanvasPharmName.setBounds(5, 6, 273, 20);\n\t\tlblCanvasPharmName\n\t\t.setFont(ResourceUtils.getFont(iDartFont.VERASANS_10));\n\t\tlblCanvasPharmName.setAlignment(SWT.CENTER);\n\n\t\tlblCanvasPharmacist = new Label(canvasLabel, SWT.NONE);\n\t\tlblCanvasPharmacist.setText(\"Pharmacist\");\n\t\tlblCanvasPharmacist\n\t\t.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\tlblCanvasPharmacist.setBackground(ResourceUtils\n\t\t\t\t.getColor(iDartColor.WHITE));\n\t\tlblCanvasPharmacist.setBounds(5, 27, 273, 20);\n\t\tlblCanvasPharmacist.setFont(ResourceUtils\n\t\t\t\t.getFont(iDartFont.VERASANS_10));\n\t\tlblCanvasPharmacist.setAlignment(SWT.CENTER);\n\n\t\tlblCanvasAddress = new Label(canvasLabel, SWT.NONE);\n\t\tlblCanvasAddress.setText(\"Physical Address\");\n\t\tlblCanvasAddress.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\tlblCanvasAddress\n\t\t.setBackground(ResourceUtils.getColor(iDartColor.WHITE));\n\t\tlblCanvasAddress.setBounds(5, 49, 273, 20);\n\t\tlblCanvasAddress.setFont(ResourceUtils.getFont(iDartFont.VERASANS_10));\n\t\tlblCanvasAddress.setAlignment(SWT.CENTER);\n\n\t}",
"public void setLeft() {\n\t\tstate = State.LEFT;\n\t}",
"public Shape rotateLeft() \n\t{\n\t\tif (detailShape == Tetromino.SQUARE)\n\t\t{\n\t\t\treturn this;\n\t\t}\n\t\t\n\t\tvar result = new Shape();\n\t\tresult.detailShape = detailShape;\n\t\t\n\t\tfor (int i=0; i<4; i++)\n\t\t{\n\t\t\tresult.setX(i, y(i));\n\t\t\tresult.setY(i, -x(i));\n\t\t}\n\t\t\n\t\treturn result;\n\t}",
"@Test\n public void testIsLeft() {\n for (final Border border : Border.values()) {\n if (border.toString().contains(\"LEFT\") || border.toString().contains(\"ALL\")) {\n Assert.assertTrue(border.isLeft());\n } else {\n Assert.assertFalse(border.isLeft());\n }\n }\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 }",
"@Override\n\tpublic INode getLeft() {\n\t\treturn left;\n\t}",
"@Override\n\t\tpublic PrintNode getLeft() {\n\t\t\treturn this.left;\n\t\t}",
"for (Card c : humanPlayerHand.getAllCards) {\n StackPane cardGrouping = new StackPane; // used to center the rectangle and text\n Rectangle card = new Rectangle(width, height); // where width and height are defined elsewhere\n card.setArcWidth(arcSize); // where arcSize is defined elsewhere\n card.setArcHeight(arcSize);\n card.setFill(c.getSuit); // color will be based on suit but implementation will differ slightly - different method will pull the colors matched to suits from data file\n cardGrouping.add(card);\n Text cardText = new Text();\n\n if (c.getValue < 10) {\n cardText.setText(c.getValue);\n }\n // also need cases for special cards\n cardGrouping.add(cardText);\n\n HBox.add(cardGrouping);\n }",
"public Ellipse getLeftButton() {\n return leftButton;\n }",
"public void alignSelectedFurnitureOnLeft() {\n alignSelectedFurniture(new AlignmentAction() {\n public void alignFurniture(AlignedPieceOfFurniture [] alignedFurniture, \n HomePieceOfFurniture leadPiece) {\n float minXLeadPiece = getMinX(leadPiece);\n for (AlignedPieceOfFurniture alignedPiece : alignedFurniture) {\n HomePieceOfFurniture piece = alignedPiece.getPieceOfFurniture();\n float minX = getMinX(piece);\n piece.setX(piece.getX() + minXLeadPiece - minX);\n }\n }\n });\n }",
"public void show(){\n fill(255);\n stroke(255);\n \n if (left){\n rect(0, y, size, brickLength);\n x = 0;\n }\n else{\n rect(width - size, y, size, brickLength);\n x = width - size;\n }\n }",
"protected int layoutChildHorizontalToBefore(View v, int right , LoopLayoutParams lp){\n\t\tfinal int left = right - v.getMeasuredWidth() - lp.leftMargin - lp.rightMargin;\n\t\tlayoutChildHorizontal(v, left, lp);\n\t\treturn left;\n\t}",
"public int numberOfBoxesInPile()\n {\n if (aboveBox != null)\n {\n return 1 + aboveBox.numberOfBoxesInPile();\n }\n else\n {\n return 1;\n }\n }",
"public void setLeft(Lane left) {\r\n\t\tthis.left = left;\r\n\t}",
"public Component leftWorld() {\n return MiniMessage.get().parse(voteHeader + leftWorld);\n }",
"public static void box(){\n System.out.println(\" ********************* ********************* ********************* \");\n System.out.println(\" *** *** *** *** *** *** \");\n System.out.println(\" *** 1 *** *** 2 *** *** 3 *** \");\n System.out.println(\" *** *** *** *** *** *** \");\n System.out.println(\" ********************* ********************* ********************* \"); \n }",
"private static int leftChildIndex(int index) {\n\t\treturn (index * 2) + 1;\n\t}",
"public int getLeft() {\n\t\treturn left;\n\t}",
"public IAVLNode getLeft() {\n\t\t\treturn this.left; // to be replaced by student code\n\t\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tif (i >= size)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"insertion sort terminated\");\n\t\t\t\t\ttimer.stop();\n\t\t\t\t\tbox.setColorRange(0, box.getNumber() - 1, END_COLOR);\n\t\t\t\t\tpaintBox();\n\t\t\t\t}\n\t\t\t\t// Step one find a suitable index where to place the current rectangle\n\t\t\t\telse if (codeFlag == 1)\n\t\t\t\t{\n\t\t\t\t\tRectangle currRect = box.getRectangle(i);\n\t\t\t\t\tcurrRect.setColor(FOCUS_COLOR1);\n\t\t\t\t\tRectangle scanRect;\n\t\t\t\t\tfor (k = i - 1; k >= 0; k--)\n\t\t\t\t\t{\n\t\t\t\t\t\tscanRect = box.getRectangle(k);\n\t\t\t\t\t\tscanRect.setColor(FOCUS_COLOR2);\n\t\t\t\t\t\tif (scanRect.getData() > currRect.getData())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// getting the index of first rectangle to move to the left\n\t\t\t\t\tindex = i - 1;\n\t\t\t\t\tcodeFlag = 0;\n\t\t\t\t\tdownFlag = 1;\n\t\t\t\t\tcurrentDownCount = 0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//moving the current rectangle down\n\t\t\t\telse if (downFlag == 1)\n\t\t\t\t{\n\t\t\t\t\tbox.addOffsetRectangle(i, 0, YCHANGE);\n\t\t\t\t\tpaintBox();\n\t\t\t\t\tcurrentDownCount += YCHANGE;\n\t\t\t\t\tif (currentDownCount >= DOWN)\n\t\t\t\t\t{\n\t\t\t\t\t\tint excess = currentDownCount - DOWN;\n\t\t\t\t\t\tbox.addOffsetRectangle(i, 0, -excess);\n\t\t\t\t\t\tpaintBox();\n\t\t\t\t\t\tdownFlag = 0;\n\t\t\t\t\t\trightBlockFlag = 1;\n\t\t\t\t\t\tindexRightCount = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// moving the block of rectangle to the left\n\t\t\t\telse if (rightBlockFlag == 1)\n\t\t\t\t{\n\t\t\t\t\tif (index <= k)\n\t\t\t\t\t{\n\t\t\t\t\t\trightBlockFlag = 0;\n\t\t\t\t\t\tleftFlag = 1;\n\t\t\t\t\t\tcurrentLeftCount = 0;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\trightFlag = 1;\n\t\t\t\t\t\trightBlockFlag = 0;\n\t\t\t\t\t\tindexRightCount = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// moving each rectangle of the block to the right\n\t\t\t\telse if (rightFlag == 1)\n\t\t\t\t{\n\t\t\t\t\tbox.addOffsetRectangle(index, XCHANGE, 0);\n\t\t\t\t\tpaintBox();\n\t\t\t\t\tindexRightCount += XCHANGE;\n\t\t\t\t\t\n\t\t\t\t\tif (indexRightCount >= width)\n\t\t\t\t\t{\n\t\t\t\t\t\tint excess = indexRightCount - width;\n\t\t\t\t\t\tbox.addOffsetRectangle(index, -excess, 0);\n\t\t\t\t\t\tpaintBox();\n\t\t\t\t\t\trightFlag = 0;\n\t\t\t\t\t\trightBlockFlag = 1;\n\t\t\t\t\t\tindex--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// moving the current rectangle to the left\n\t\t\t\telse if (leftFlag == 1)\n\t\t\t\t{\n\t\t\t\t\tbox.addOffsetRectangle(i, -XCHANGE, 0);\n\t\t\t\t\tcurrentLeftCount += XCHANGE;\n\t\t\t\t\tpaintBox();\n\t\t\t\t\tif (currentLeftCount >= width * (i - 1 - k))\n\t\t\t\t\t{\n\t\t\t\t\t\tint excess = currentLeftCount - width * (i - 1 - k);\n\t\t\t\t\t\tbox.addOffsetRectangle(i, excess, 0);\n\t\t\t\t\t\tpaintBox();\n\t\t\t\t\t\tleftFlag = 0;\n\t\t\t\t\t\tupFlag = 1;\n\t\t\t\t\t\tcurrentUpCount = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// moving the current rectangle up\n\t\t\t\telse if (upFlag == 1)\n\t\t\t\t{\n\t\t\t\t\tbox.addOffsetRectangle(i, 0, -YCHANGE);\n\t\t\t\t\tcurrentUpCount += YCHANGE;\n\t\t\t\t\tpaintBox();\n\t\t\t\t\tif (currentUpCount >= DOWN)\n\t\t\t\t\t{\n\t\t\t\t\t\tint excess = currentUpCount - DOWN;\n\t\t\t\t\t\tbox.addOffsetRectangle(i, 0, excess);\n\t\t\t\t\t\tpaintBox();\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Reflecting the changes internally\n\t\t\t\t\t\t\n\t\t\t\t\t\tRectangle currRect = box.getRectangle(i);\n\t\t\t\t\t\tcurrRect.setColor(FOCUS_COLOR2);\n\t\t\t\t\t\tpaintBox();\n\t\t\t\t\t\tRectangle scanRect;\n\t\t\t\t\t\tint t;\n\t\t\t\t\t\tfor (t = i - 1; t >= 0; t--)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tscanRect = box.getRectangle(t);\n\t\t\t\t\t\t\tif (scanRect.getData() > currRect.getData())\n\t\t\t\t\t\t\t\tbox.setRectangle(box.getRectangle(t), t + 1);\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbox.setRectangle(currRect, t + 1);\n\t\t\t\t\t\tdelayFlag1 = 1;\n\t\t\t\t\t\tupFlag = 0;\n\t\t\t\t\t\tdelay1 = 0;\n\t\t\t\t\t\tupFlag = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (delayFlag1 == 1)\n\t\t\t\t{\n\t\t\t\t\tdelay1++;\n\t\t\t\t\tif (delay1 >= DELAY)\n\t\t\t\t\t{\n\t\t\t\t\t\tdelayFlag1 = 0;\n\t\t\t\t\t\tcodeFlag = 1;\n\t\t\t\t\t\ti++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}",
"private Node rotateLeft() {\n Node right = this.rightChild;\n this.rightChild = right.leftChild;\n right.leftChild = this;\n\n this.updateHeight();\n right.updateHeight();\n\n return right;\n }",
"private BioMightBoundBoxes setupDefaultBoundBoxes() \r\n\t{\r\n\t\t// Set up the collection to hold the Bounding Boxes\r\n\t\tBioMightBoundBoxes bioBoundBoxes = null;\r\n\t\r\n\t\t// Initialize the position of the bounding box vars\r\n\t\tBigDecimal xPos = new BigDecimal(0.0);\r\n\t\tBigDecimal yPos = new BigDecimal(0.0);\r\n\t\tBigDecimal zPos= new BigDecimal(0.0);\r\n\t\t\r\n\t\t// Set to base 1x1x1 cube\r\n\t\tBigDecimal xVector= new BigDecimal(1.0);\r\n\t\tBigDecimal yVector= new BigDecimal(1.0); \r\n\t\tBigDecimal zVector= new BigDecimal(1.0);\r\n\t\r\n\t\t// Initialize a BoundBox\r\n\t\tBioMightBoundBox bioBoundBox = null;\r\n\t\r\n\t\t// Initialize Connectors \r\n\t\tBioMightConnectors bioMightConnectors = null; \r\n\r\n\t\t// Initialize a Connector \r\n\t\tBioMightConnector bioMightConnector= null;\r\n\t\r\n\t\tdouble circumference = 0.0;\r\n\t\tdouble[] startPos = {0.0, 0.0, 0.0};\r\n\t\tdouble[][] startPoints = null;\r\n\t\r\n\t\t//********************************************************************* \r\n\t\t// LEFT FOOT BOUNDBOX\r\n\t\t// Set up the Bounding Box for the Feet\r\n\t\t// The connector for this will come from the incoming Bound Box\r\n\t\t// Both are defined like and bolt and they lock into position at the\r\n\t\t// interestion of both connectors\r\n\t\t//**********************************************************************\r\n\t\txPos = new BigDecimal(0.0);\r\n\t\tyPos = new BigDecimal(-65.0);\r\n\t\tzPos= new BigDecimal(3.0);\r\n\t\r\n\t\txVector= new BigDecimal(1.0);\r\n\t\tyVector= new BigDecimal(4.0); \r\n\t\tzVector= new BigDecimal(1.0);\r\n\r\n\t\tbioBoundBox = new BioMightBoundBox(xPos, yPos, zPos, xVector, yVector, zVector);\r\n\t\tbioMightConnectors = new BioMightConnectors();\r\n\t\r\n\t\t// Feet Epithelium Connector\r\n\t\tcircumference = 0.3;\r\n\t\tstartPos = getStartPoints(-2.0, -65.0, -1.0);\r\n\t\tstartPoints = BioGraphics.octogonYPlane(startPos, circumference);\r\n\t\tbioMightConnector = new BioMightConnector(startPoints, Constants.FootEpitheliumRef,\"connType\");\r\n\t\tbioMightConnectors.setBioMightConnector(Constants.FootEpitheliumRef, bioMightConnector);\r\n\t\t\r\n\t\t// Associate the connector on the Box\r\n\t\tbioBoundBox.setBioMightConnectors(bioMightConnectors);\r\n\t\t\r\n\t\t// Put the Bounding Box in the collection\r\n\t\tbioBoundBoxes.setBoundingBox(Constants.LeftFootRef, bioBoundBox);\r\n\t\r\n\t\r\n\t\t//********************************************************************* er\r\n\t\t// RIGHT CNEMES BOUNDBOX\r\n\t\t// Set up the Bounding Box for the Foot\r\n\t\t// On a porportioned human, the \r\n\t\t//**********************************************************************\r\n\t\txPos = new BigDecimal(0.0);\r\n\t\tyPos = new BigDecimal(-14.0);\r\n\t\tzPos= new BigDecimal(-3.0);\r\n\t\r\n\t\txVector= new BigDecimal(1.0);\r\n\t\tyVector= new BigDecimal(4.0); \r\n\t\tzVector= new BigDecimal(1.0);\r\n\r\n\t\tbioBoundBox = new BioMightBoundBox(xPos, yPos, zPos, xVector, yVector, zVector);\r\n\t\tbioMightConnectors = new BioMightConnectors();\r\n\t\t\r\n\t\t// Foot Epithelium Connector\r\n\t\tcircumference = 0.3;\r\n\t\tstartPos = getStartPoints(2.0, -65.0, -1.0);\r\n\t\tstartPoints = BioGraphics.octogonYPlane(startPos, circumference);\r\n\t\tbioMightConnector = new BioMightConnector(startPoints, Constants.FootEpitheliumRef,\"connType\");\r\n\t\tbioMightConnectors.setBioMightConnector(Constants.FootEpitheliumRef, bioMightConnector);\r\n\t\r\n\t\t// Associate the connector on the Box\r\n\t\tbioBoundBox.setBioMightConnectors(bioMightConnectors);\r\n\t\t\r\n\t\t// Put the Bounding Box in the collection\r\n\t\tbioBoundBoxes.setBoundingBox(Constants.RightFootRef, bioBoundBox);\r\n\t\r\n\t\t// return the collection that holds both foot bound boxes\r\n\t\treturn (bioBoundBoxes);\r\n\t}",
"public Group shapes() {\n Group group = new Group();\n\n Rectangle square = new Rectangle();\n square.setHeight(_size * 2.0);\n square.setWidth(_size * 2.0);\n square.setX(-_size);\n square.setY(-_size);\n square.setFill(_fill);\n square.setOpacity(0.2);\n group.getChildren().add(square);\n\n return group;\n }",
"private int leftChild(int index){\n\t\treturn (2*index) +1;\n\t}",
"@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}",
"public boolean isleft(){\n\t\tif (x>0 && x<Framework.width && y<Framework.height )//bullet can in the air(no boundary on the top. )\n\t\t\treturn false; \n\t\telse \n\t\t\treturn true; \n\t}",
"private List<Box> initBoxes(List<Integer> deadBoxes){\n List<Box> boxes = new ArrayList<>();\n\n for(int x=0;x<16;x++){\n boxes.add(new Box(x + 1, grid[x]));\n }\n\n\n /**\n * 1 2 3 4\n * 5 6 7 8\n * 9 10 11 12\n * 13 14 15 16\n */\n\n //first row\n addNeighbours(1, new int[]{2,5,6}, boxes);\n addNeighbours(2,new int[]{1,3,5,6,7}, boxes);\n addNeighbours(3,new int[]{2,4,6,7,8}, boxes);\n addNeighbours(4,new int[]{3,7,8}, boxes);\n addNeighbours(5,new int[]{1,2,6,9,10}, boxes);\n addNeighbours(6,new int[]{1,2,3,5,7,9,10,11}, boxes);\n addNeighbours(7,new int[]{2,3,4,6,8,10,11,12}, boxes);\n addNeighbours(8,new int[]{3,4,7,11,12}, boxes);\n addNeighbours(9,new int[]{5,6,10,13,14}, boxes);\n addNeighbours(10,new int[]{5,6,7,9,11,13,14,15}, boxes);\n addNeighbours(11,new int[]{6,7,8,10,12,14,15,16}, boxes);\n addNeighbours(12,new int[]{7,8,11,15,16}, boxes);\n addNeighbours(13,new int[]{9,10,14}, boxes);\n addNeighbours(14,new int[]{9,10,11,13,15}, boxes);\n addNeighbours(15,new int[]{10,11,12,14,16}, boxes);\n addNeighbours(16,new int[]{11,12,15}, boxes);\n\n return removeBoxes(boxes,deadBoxes);\n }",
"public VBox getBox() {\n return box;\n }",
"public int[] getBoxes() { return boxes; }",
"public int getLeftEdge() {\n return leftEdge;\n }",
"private void boxCreator(int[] pos, int width, int height) {\n for (int x = pos[0]; x < pos[0] + width; x++) {\n tiles[x][pos[1]] = Tileset.WALL;\n }\n for (int y = pos[1]; y < pos[1] + height; y++) {\n tiles[pos[0]][y] = Tileset.WALL;\n }\n for (int x = pos[0]; x < pos[0] + width; x++) {\n tiles[x][pos[1] + height] = Tileset.WALL;\n }\n for (int y = pos[1]; y < pos[1] + height + 1; y++) {\n tiles[pos[0] + width][y] = Tileset.WALL;\n }\n for (int y = pos[1] + 1; y < pos[1] + height; y++) {\n for (int x = pos[0] + 1; x < pos[0] + width; x++) {\n tiles[x][y] = Tileset.FLOWER;\n }\n }\n }",
"private void LeftLeftLeft() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<1) {\n\t\t\t\tRobot.drivebase.run(.53, -.53);\n\t\t\t}\n \t\tif (Robot.autotime.get()>=1) {\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t\t\n \t\n \t}\n\t\t}",
"protected Box getGroupBounds (int idx)\n {\n if (_groupBounds.length <= idx) {\n Box[] obounds = _groupBounds;\n _groupBounds = new Box[idx + 1];\n System.arraycopy(obounds, 0, _groupBounds, 0, obounds.length);\n for (int ii = obounds.length; ii < _groupBounds.length; ii++) {\n _groupBounds[ii] = new Box();\n }\n }\n return _groupBounds[idx];\n }",
"public void moveLeft()\n {\n if (!this.search_zone.isLeftBorder(this.x_position))\n {\n this.x_position = (this.x_position - 1);\n }\n }",
"BigBox(float x, float y, float w, float h, float strokeWeight, Box... littleBoxes) {\r\n super(x, y, w, h, strokeWeight);\r\n boxes = littleBoxes;\r\n shadow = new Box(x + 2.5f, y + 2.5f, w, h, 0, Colour.GREY);\r\n group();\r\n }",
"@Override\r\n\tpublic void BuildArmLeft() {\n\t\tg.drawLine(60, 50, 40, 100);\r\n\t}",
"public AVLNode<E> getLeft() {\r\n\t\treturn left;\r\n\t}",
"private void createLevelBoxes() {\n int totalRows = (LEVELS / LEVEL_COLUMNS_PER_SCREEN) + 1;\n \n // Calculate space between each level square\n int spaceBetweenRows = (CAMERA_HEIGHT / LEVEL_ROWS_PER_SCREEN) - LEVEL_PADDING;\n int spaceBetweenColumns = (CAMERA_WIDTH / LEVEL_COLUMNS_PER_SCREEN) - LEVEL_PADDING;\n \n //Current Level Counter\n int iLevel = 1;\n //Create the Level selectors, one row at a time.\n int boxX = LEVEL_PADDING, boxY = LEVEL_PADDING;\n for (int y = 0; y < totalRows; y++) {\n for (int x = 0; x < LEVEL_COLUMNS_PER_SCREEN; x++) {\n \n //On Touch, save the clicked level in case it's a click and not a scroll.\n final int levelToLoad = iLevel;\n \n if(iLevel >= mMaxLevelReached) {\n \t dotLevel = new Sprite(boxX, boxY, resourcesManager.level_dot_red_region, vbom) {\n @Override\n public boolean onAreaTouched(final TouchEvent pSceneTouchEvent, final float pTouchAreaLocalX, final float pTouchAreaLocalY) {\n if (levelToLoad >= mMaxLevelReached)\n iLevelClicked = -1;\n else\n iLevelClicked = levelToLoad;\n return false;\n }\n };\n }\n else {\n \tdotLevel = new Sprite(boxX, boxY, resourcesManager.level_dot_green_region, vbom) {\n @Override\n public boolean onAreaTouched(final TouchEvent pSceneTouchEvent, final float pTouchAreaLocalX, final float pTouchAreaLocalY) {\n if (levelToLoad >= mMaxLevelReached)\n iLevelClicked = -1;\n else\n iLevelClicked = levelToLoad;\n return false;\n }\n };\n }\n \n this.attachChild(dotLevel);\n \n this.attachChild(new Text(boxX, boxY - 5, resourcesManager.font, String.valueOf(iLevel), vbom));\n \n \n this.registerTouchArea(dotLevel);\n \n iLevel++;\n boxX += spaceBetweenColumns + LEVEL_PADDING;\n \n if (iLevel > LEVELS)\n break;\n }\n \n if (iLevel > LEVELS)\n break;\n \n boxY += spaceBetweenRows + LEVEL_PADDING;\n boxX = 50;\n }\n }"
] | [
"0.6927808",
"0.6856098",
"0.6493383",
"0.64810735",
"0.6108724",
"0.5976429",
"0.59328467",
"0.5905266",
"0.5893936",
"0.5887307",
"0.5876912",
"0.5873922",
"0.58280414",
"0.57852936",
"0.5781642",
"0.5757898",
"0.5751641",
"0.5741154",
"0.5736793",
"0.57115483",
"0.56911093",
"0.56593126",
"0.5647224",
"0.5634601",
"0.5621867",
"0.5620021",
"0.560238",
"0.55654556",
"0.55488443",
"0.5540528",
"0.55271876",
"0.55253685",
"0.5511414",
"0.55070686",
"0.5498736",
"0.5491343",
"0.54889065",
"0.5480583",
"0.5478159",
"0.547128",
"0.5461943",
"0.5451617",
"0.54412967",
"0.54394317",
"0.5437828",
"0.5428248",
"0.54050076",
"0.5385952",
"0.538174",
"0.53769445",
"0.53729117",
"0.5372467",
"0.5370331",
"0.53697604",
"0.53650606",
"0.5357455",
"0.53555983",
"0.53442585",
"0.53031915",
"0.5297922",
"0.5297657",
"0.52890235",
"0.5287541",
"0.5279839",
"0.52764726",
"0.52742064",
"0.52728033",
"0.52594256",
"0.52594197",
"0.5252466",
"0.5250364",
"0.524948",
"0.52423203",
"0.52376276",
"0.52363175",
"0.5236263",
"0.522149",
"0.5218377",
"0.5214409",
"0.5209261",
"0.5203959",
"0.51962507",
"0.5194999",
"0.51883656",
"0.51862776",
"0.51852775",
"0.51826483",
"0.5180697",
"0.5177477",
"0.51766396",
"0.5176399",
"0.51743585",
"0.5167529",
"0.5167402",
"0.51669204",
"0.5160328",
"0.5153687",
"0.51470095",
"0.5142615",
"0.51383007",
"0.5137323"
] | 0.0 | -1 |
This method Not currently used | public VBox addButton(ObservableList<Song> searchResults, ObservableList<Song> playlist) {
VBox vbox = new VBox();
searchResults = searchResults;
playlist = playlist;
vbox.setPadding(new Insets(350, 100, 350, 10));
Button addSongBtn = new Button();
addSongBtn.setText("Add Song");
addSongBtn.setPrefSize(25.0, 15);
addSongBtn.setAlignment(Pos.CENTER_LEFT);
vbox.getChildren().addAll(addSongBtn);
return vbox;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"public final void mo51373a() {\n }",
"private stendhal() {\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\n public void func_104112_b() {\n \n }",
"@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 protected void prot() {\n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"protected boolean func_70814_o() { return true; }",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}",
"@Override\n 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\tprotected void doF4() {\n\t\t\r\n\t}",
"@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"protected MetadataUGWD() {/* intentionally empty block */}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n protected void initialize() {\n\n \n }",
"@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n protected void init() {\n }",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"protected void mo6255a() {\n }",
"@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n public int retroceder() {\n return 0;\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"private void getStatus() {\n\t\t\n\t}",
"@Override\n public int describeContents() { return 0; }",
"private void m50366E() {\n }",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\r\n \tpublic void process() {\n \t\t\r\n \t}",
"public void mo38117a() {\n }",
"@Override\n public void memoria() {\n \n }",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void mo4359a() {\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void 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}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void smell() {\n\t\t\n\t}",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"public void mo6081a() {\n }",
"@Override public int describeContents() { return 0; }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"@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}",
"protected void onFirstUse() {}",
"@Override\n\tpublic void apply() {\n\t\t\n\t}",
"private void kk12() {\n\n\t}",
"private FlyWithWings(){\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}",
"private Rekenhulp()\n\t{\n\t}",
"private void poetries() {\n\n\t}",
"@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}",
"protected boolean func_70041_e_() { return false; }",
"private void strin() {\n\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {}",
"protected OpinionFinding() {/* intentionally empty block */}",
"@Override\n public void onCancelled(CancelledException arg0) {\n }",
"@Override\n public void onCancelled(CancelledException arg0) {\n }",
"@Override\n void init() {\n }",
"@Override\n public 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}"
] | [
"0.6320679",
"0.60903823",
"0.6051746",
"0.60215133",
"0.6009573",
"0.5966214",
"0.59374726",
"0.5920906",
"0.5892294",
"0.5878944",
"0.5878944",
"0.58665395",
"0.57877266",
"0.57524896",
"0.5729567",
"0.5698514",
"0.5698514",
"0.5663583",
"0.564756",
"0.5640039",
"0.5615721",
"0.5615721",
"0.5610939",
"0.5602106",
"0.5588365",
"0.55821687",
"0.5568887",
"0.5568887",
"0.5568312",
"0.5568312",
"0.5568312",
"0.5568312",
"0.5568312",
"0.5568312",
"0.5560131",
"0.55555934",
"0.55472946",
"0.55267656",
"0.5524663",
"0.5515891",
"0.5513943",
"0.5511976",
"0.5507388",
"0.5503767",
"0.55037004",
"0.55019283",
"0.5484454",
"0.54762197",
"0.54727936",
"0.54717624",
"0.54626215",
"0.5455645",
"0.54551166",
"0.5452566",
"0.5449343",
"0.5446927",
"0.5437988",
"0.54329747",
"0.5426368",
"0.54154974",
"0.54051024",
"0.54051024",
"0.53975105",
"0.53975105",
"0.5396983",
"0.53849703",
"0.53849703",
"0.53849703",
"0.53849703",
"0.53849703",
"0.53849703",
"0.53849703",
"0.53849113",
"0.53809905",
"0.5365362",
"0.53627175",
"0.5359085",
"0.5356212",
"0.5353684",
"0.5353684",
"0.534636",
"0.5344657",
"0.5341419",
"0.534093",
"0.53388166",
"0.5336016",
"0.53350955",
"0.53348494",
"0.5333601",
"0.53236395",
"0.5322367",
"0.53218573",
"0.53204143",
"0.53158295",
"0.53139764",
"0.5307453",
"0.5307453",
"0.53059083",
"0.53046405",
"0.5299715",
"0.5299715"
] | 0.0 | -1 |
shutdownNow() is required because we have bydesign infinitely running calls | public boolean close(long timeout, TimeUnit timeoutUnit) throws InterruptedException {
channel.shutdownNow();
return channel.awaitTermination(timeout, timeoutUnit);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void shutdownNow() {\n }",
"public void shutdownNow() {\n }",
"public void shutdown() {\n/* 188 */ this.shutdown = true;\n/* */ }",
"public void shutdownNow() {\n\t\tupdater.shutdownNow();\n\t}",
"public void shutdown() {\n // no-op\n }",
"public void shutdown() {\n shutdown(false);\n }",
"@Override\n\t\tprotected void shutdown() {\n\n\t\t}",
"@Override\n public void run() {\n shutdown();\n }",
"public void shutdown()\n {\n // nothing to do here\n }",
"public static void shutdown() {\n\t}",
"public void shutdown() {\n // For now, do nothing\n }",
"protected void shutdown() {\n\r\n }",
"@Override\n public void shutdown()\n {\n // nothing to do\n }",
"public void shutdown()\n {\n // todo\n }",
"public void shutdown() {\n\t\t\n\t}",
"@Override\n public void shutdown() {\n }",
"@Override\n public void shutdown() {\n }",
"@Override\n public void shutdown() {\n }",
"protected abstract void shutdown();",
"@Override\n public void waitShutdown() {\n // Do nothing.\n }",
"public void cleanShutDown () {\n shutdown = true;\n }",
"public static void shutdown() {\n\t\t// Ignore\n\t}",
"@Override\n public void shutdown() {\n }",
"@Override\n\tpublic void shutdown() {\n\t\t\n\t}",
"public void forceShutdown() {\n shutdown(true);\n }",
"void shutdown();",
"void shutdown();",
"void shutdown();",
"void shutdown();",
"void shutdown();",
"void shutdown();",
"void shutdown();",
"void shutdown();",
"void shutdown();",
"void shutdown();",
"void shutdown();",
"void shutdown();",
"void shutdown();",
"void shutdown();",
"void shutdown();",
"void shutdown();",
"void shutdown();",
"public void shutdown() {\n }",
"@Override\n\tpublic void shutdown()\n\t{\n\t}",
"@Override\n\tpublic void shutdown() {\n\t}",
"@Override\n\tpublic void shutdown() {\n\t}",
"public void shutdown();",
"public void shutdown();",
"public void shutdown();",
"public void shutdown();",
"public void integrationHZshutdownTest() {\n\t\t\n\t\tretryManager.registerCallback(new LatchCallback(new CountDownLatch(1), false), TYPE);\n\t\t\n\t\tretryManager.getHzInst().getLifecycleService().shutdown();\n\t\t\n\t\tRetryHolder retry = new RetryHolder(\"id-local-to-fail\", TYPE,new Exception(),\"Object\");\n\t\t\n\t\tretryManager.addRetry(retry);\n\t\t\n\t\t\t\t\n\t\t\n\t}",
"public void shutdown() {\n this.dontStop = false;\n }",
"public void shutdown() {\n this.isShutdown = true;\n }",
"@Override\r\n\tprotected void shutdownSpecific() {\n\r\n\t}",
"@Override\n\tpublic void shutdown() {\n\n\t}",
"@Override\n public void shutdown() {\n // Do nothing.\n }",
"public void shutdown() {\n\t\tfinal List<Runnable> tasks = updater.shutdownNow();\n\t\tif (null == tasks) return;\n\t\tfor (final Runnable t : tasks)\n\t\t\tt.run();\n\t}",
"public void abnormalShutDown() {\n\t}",
"public abstract void shutdown();",
"public abstract void shutdown();",
"public abstract void shutdown();",
"public abstract void shutdown();",
"void shutdown() throws Exception;",
"public void shutdown()\n\t{\n\t\t; // do nothing\n\t}",
"private static void shutdownGracefully() {\n //record out file time for the last access to the stream.\n try {\n disruptor.shutdown();\n setLastReadTime();\n closeCouchbaseClient();\n } catch (Exception ex) {\n //not much we can do, what if our logging is already shutdown or not up\n // when this happens?\n ex.printStackTrace();\n }\n\n }",
"@Override\n protected void shutdown() {\n super.shutdown();\n // Now perform any other shutdown tasks you need.\n // ...\n }",
"void prepareForShutdown();",
"@Override\n\tprotected void shutdown() throws Throwable {\n\t\t\n\t}",
"private static void shutdown() {\n\t\tSystem.out.println(\"Shutting down ...\");\n\t\tpool.shutdown();\n\t\tfor (Client client : clientMap.values()) {\n\t\t\tclient.cleanup();\n\t\t}\n\n\t\t// wait until all threads complete\n\t\ttry {\n\t\t\tif (!pool.awaitTermination(30, TimeUnit.SECONDS)) {\n\t\t\t\tSystem.out.println(\"Force shutdown after 30 seconds ...\");\n\t\t\t\tpool.shutdownNow();\n\t\t\t\tif (!pool.awaitTermination(30, TimeUnit.SECONDS)) {\n\t\t\t\t\tSystem.out.println(\"Terminate the process.\");\n\t\t\t\t\tThread.currentThread().interrupt();\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (InterruptedException e) {\n\t\t\tThread.currentThread().interrupt();\n\t\t}\n\t}",
"@Test\n\tpublic void ShutdownTest()\n\t{\n\t\tThreadPool testThreadPool = new ThreadPool(new SongValidator(),2,100);\n\t\ttestThreadPool.shutdown();\n\t\tassertTrue(testThreadPool.getAvailableExpirator()==null);\n\t}",
"public void shutdown()\n {\n this.running = false;\n }",
"@Override\n public String shutdown() {\n instance.shutdown();\n return \"ok\";\n }",
"public void forceShutdown()\n {\n taskExecutor.shutdownNow();\n differencingDone.signalAll();\n completed.signalAll();\n }",
"@Override\n protected void shutDown() {\n }",
"public static void systemShutdown() throws IOException {\n\t\t/*Runtime runtime = Runtime.getRuntime();\n\t\tProcess proc = runtime.exec(\"shutdown -l -t 30\");//.exec(\"shutdown -l\");//.exec(\"shutdown -l -t 0\").exec(\"shutdown -r\");\t\t\n\t\tSystem.out.println(\"\"+proc);\n\t\tSystem.exit(0);*/\n\t}",
"public void shutdown(){\n \tSystem.out.println(\"SHUTTING DOWN..\");\n \tSystem.exit(0);\n }",
"public void shutdownSilently() {\n shutdownSilently(true);\n }",
"public static void bgfx_shutdown() {\n long __functionAddress = Functions.shutdown;\n invokeV(__functionAddress);\n }",
"void shutdown() {\n\t\t\tshutdown = true;\n\t\t\tsel.wakeup();\n\t\t}",
"public static void triggerImmediateForcefulShutdown() {\n triggerImmediateForcefulShutdown(1);\n }",
"public void shutdown()\n {\n shutdown = true;\n cil.shutdown();\n }",
"public void shutdown() {\r\n System.exit(0);\r\n }",
"@Programmatic\n public void shutdown() {\n LOG.info(\"shutting down {}\", this);\n\n cache.clear();\n }",
"@Override\r\n public void close() {\r\n\tsaveZip();\r\n\tsetChanged();\r\n\tnotifyObservers(\"shutting down\");\r\n\tthreadpool.shutdown();\r\n\t// wait 10 seconds over and over again until all running jobs have\r\n\t// finished\r\n\ttry {\r\n\t boolean allTasksCompleted = false;\r\n\t while (!(allTasksCompleted = threadpool.awaitTermination(10, TimeUnit.SECONDS)))\r\n\t\t;\r\n\t setChanged();\r\n\t notifyObservers(\"Server is safely closed\");\r\n\t} catch (InterruptedException e) {\r\n\t e.printStackTrace();\r\n\t}\r\n }",
"private void dofakework() {\n\t\ttry {\n\t\t\tThread.sleep(1000);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public static void shutdown() {\n\t\tSystem.err.println(\"shutdown initiated!\");\n\t\tBaseFuture bf0 = master.shutdown();\n\t\tbf0.awaitUninterruptibly();\n\t\tSystem.err.println(\"shutdown master done!\");\n\t\t\n\t\tBaseFuture bf1 = unreachable1.shutdown();\n\t\tbf1.awaitUninterruptibly();\n\t\tSystem.err.println(\"shutdown unreachable1 done!\");\n\n\t\tBaseFuture bf2 = unreachable2.shutdown();\n\t\tbf2.awaitUninterruptibly();\n\t\tSystem.err.println(\"shutdown unreachable 2 done!\");\n\t}",
"public void shutdown() {\n this.shallRun = false;\n this.interrupt();\n Log.getLog().info(\"catched caretaker termination signal\");\n }",
"@Override\n protected void shutdownService() {\n }",
"private void shutdown() {\n LOG.info(\"shutting down QlikLoad\");\n\n // pause briefly to allow things to drain\n try {\n Thread.sleep(500);\n } catch (InterruptedException e) {\n LOG.trace(\"shutdown() timer\");\n }\n\n if ((baos.size() != 0)) {\n LOG.warn(\"shutdown(): Thread {} baos HAS NOT been drained. Size: {}\",\n threadName, baos.size());\n } else {\n LOG.info(\"shutdown(): Thread {} baos has been drained. Size: {}\",\n threadName, baos.size());\n }\n\n\n qlikSocket.shutdown();\n }",
"@Override\n public void shutDown() {\n }",
"@Override\r\n protected void shutdownInternal() {\r\n service.stop();\r\n }",
"public void shutdown() {\n\t\tthreadPool.shutdown();\n\t}",
"@Override\n\tpublic boolean isShutdown() {\n\t\treturn false;\n\t}",
"public void shutdown() {\n executor.shutdown();\n try {\n executor.awaitTermination(Long.MAX_VALUE, TimeUnit.NANOSECONDS);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }",
"public void shutdown() {\r\n ThreadLocalEventLoop.INSTANCE.resetEventLoop$kotlinx_coroutines_core();\r\n this.isCompleted = true;\r\n closeQueue();\r\n do {\r\n } while (processNextEvent() <= 0);\r\n rescheduleAllDelayed();\r\n }",
"public void shutdown() {\n lock.lock();\n try {\n state = State.SHUTDOWN;\n if (serialExecutorMap.isEmpty()) {\n executor.shutdown();\n }\n } finally {\n lock.unlock();\n }\n }",
"void startShutdown() {\n closed.set(true);\n regionManager.stopScanners();\n synchronized(toDoQueue) {\n toDoQueue.clear(); // Empty the queue\n delayedToDoQueue.clear(); // Empty shut down queue\n toDoQueue.notifyAll(); // Wake main thread\n }\n serverManager.notifyServers();\n }",
"public synchronized void terminate () {\n shutdown = true;\n }",
"public void mo130409d() {\n this.f110664a.dispose();\n Future<?> future = this.f110668e;\n if (future != null) {\n future.cancel(true);\n }\n ScheduledExecutorService scheduledExecutorService = this.f110667d;\n if (scheduledExecutorService != null) {\n scheduledExecutorService.shutdownNow();\n }\n }",
"public void shutDown();",
"public void shutdownForUpdate();"
] | [
"0.8138444",
"0.8098498",
"0.7492087",
"0.7377547",
"0.722598",
"0.7163348",
"0.7065793",
"0.7053911",
"0.7030139",
"0.70171267",
"0.7008886",
"0.6945413",
"0.6941824",
"0.6930533",
"0.692004",
"0.69134915",
"0.69134915",
"0.69134915",
"0.6888765",
"0.68775016",
"0.68741363",
"0.68589175",
"0.6855269",
"0.6839167",
"0.6837317",
"0.6821406",
"0.6821406",
"0.6821406",
"0.6821406",
"0.6821406",
"0.6821406",
"0.6821406",
"0.6821406",
"0.6821406",
"0.6821406",
"0.6821406",
"0.6821406",
"0.6821406",
"0.6821406",
"0.6821406",
"0.6821406",
"0.6821406",
"0.68202233",
"0.68072623",
"0.6805109",
"0.6805109",
"0.6790394",
"0.6790394",
"0.6790394",
"0.6790394",
"0.6763368",
"0.6760988",
"0.67418",
"0.6740471",
"0.6725456",
"0.6700085",
"0.66966635",
"0.66963017",
"0.6687393",
"0.6687393",
"0.6687393",
"0.6687393",
"0.66768324",
"0.66699773",
"0.6669838",
"0.6668115",
"0.6633459",
"0.6615139",
"0.66057426",
"0.6605734",
"0.66031146",
"0.6595793",
"0.64893824",
"0.6480419",
"0.647349",
"0.64716816",
"0.64416903",
"0.6435514",
"0.64337957",
"0.64297026",
"0.6415566",
"0.64026284",
"0.63804257",
"0.63789135",
"0.63365895",
"0.6328969",
"0.63287747",
"0.63088053",
"0.6279345",
"0.62680537",
"0.62642056",
"0.6248844",
"0.62430507",
"0.6226598",
"0.6225808",
"0.6225327",
"0.62231123",
"0.6219702",
"0.6207264",
"0.62020016",
"0.619344"
] | 0.0 | -1 |
Test of nextToken method, of class Scanner. | @Test
public void testCommentLine() {
setupReaderAndErrorHandler("# This is a comment line");
scanner.nextToken();
assertTrue("EOFSY expected", scanner.getCurrentToken().getSymbol() == Symbol.EOFSY);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Token next();",
"private void scan() {\n token = nextToken;\n nextToken = scanner.next();\n }",
"private Token nextToken() {\n Token token = scanner.nextToken();\n lastSourcePosition = token.location.end;\n return token;\n }",
"private boolean getNextToken() throws IOException {\n if (jackTokenizer.hasMoreTokens()) {\n jackTokenizer.advance();\n currTokenType = jackTokenizer.tokenType();\n if (currTokenType.equals(JackTokenizer.IDENTIFIER_TOKEN_TYPE)) {\n currentToken = jackTokenizer.identifier();\n\n } else if (currTokenType.equals(JackTokenizer.INT_CONST_TOKEN_TYPE)) {\n currentToken = String.valueOf(jackTokenizer.intVal());\n\n } else if (currTokenType.equals(JackTokenizer.KEYWORD_TOKEN_TYPE)) {\n currentToken = jackTokenizer.keyWord();\n\n } else if (currTokenType.equals(JackTokenizer.STRING_CONST_TOKEN_TYPE)) {\n currentToken = jackTokenizer.stringVal();\n\n } else if (currTokenType.equals(JackTokenizer.SYMBOL_TOKEN_TYPE)) {\n currentToken = String.valueOf(jackTokenizer.currentSymbol());\n\n } else {\n return false;\n\n }\n return true;\n }\n return false;\n }",
"@Override\n\tprotected Token findNextToken() {\n\t\tLocatedChar ch = nextNonWhitespaceChar();\n\t\tif(isCommentStart(ch)) {\n\t\t\tscanComment(ch);\n\t\t\treturn findNextToken();\n\t\t}\n\t\tif(ch.isDigit()) {\n\t\t\treturn scanNumber(ch);\n\t\t}\n\t\telse if(isIdentifierStart(ch)) {\n\t\t\treturn scanIdentifier(ch);\n\t\t}\n\t\telse if(isPunctuatorStart(ch)) {\n\t\t\treturn PunctuatorScanner.scan(ch, input);\n\t\t}\n\t\telse if(isCharStart(ch)) {\n\t\t\treturn scanChar(ch);\n\t\t}\n\t\telse if(isStrStart(ch)) {\n\t\t\treturn scanString(ch);\n\t\t}\n\t\telse if(isEndOfInput(ch)) {\n\t\t\treturn NullToken.make(ch);\n\t\t}\n\t\telse {\n\t\t\tlexicalError(ch);\n\t\t\treturn findNextToken();\n\t\t}\n\t}",
"public boolean nextToken() {\n\n while (!isEndOfCode()) { // while loop is to fetch nextToken, if a skipWS occurs.\n\n previousToken = currentToken; // in case you need the previous token\n\n final char currentChar = code.charAt(currentIndex);\n\n if (Arrays.asList(' ', '\\r', '\\t', '\\n').contains(currentChar)) { // 1. WS\n skipWhiteSpace();\n continue;\n } else if (currentChar == '=') { // 2. LET\n currentToken = new Token(TokenType.EQUALS_OPERATOR);\n currentIndex++;\n } else if (Character.isDigit(currentChar)) { // 3. INT\n currentToken = new Token(TokenType.NUMBER, readNumber());\n } else if (Character.isLetter(currentChar)) {\n String variableName = readVariable();\n if (variableName.equalsIgnoreCase(\"show\")) { // 4. SHOW\n currentToken = new Token(TokenType.SHOW);\n } else { // 5. VAR\n currentToken = new Token(TokenType.VARIABLE, variableName);\n }\n } else {\n throw new LexerException(\"Token not defined.\");\n }\n return true;\n }\n return false;\n }",
"void scanner() {\r\n\t\tSystem.out.println(\"---------- Scanner\" + ++exampleNumber\r\n\t\t\t\t+ \"----------\");\r\n\r\n\t\tString source = \"asdqw easd casa\";\r\n\t\tScanner s1 = new Scanner(source);\r\n\t\t// hasNext() - testuje wartosc kolejnego tokena, ale go nie pobiera\r\n\t\t// next() - pobiera kolejny token\r\n\t\t// domyslnie bialy znak jest delimiterem\r\n\t\twhile (s1.hasNext()) {\r\n\t\t\tSystem.out.println(s1.next());\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"---------- Scanner\" + ++exampleNumber\r\n\t\t\t\t+ \"----------\");\r\n\r\n\t\t// hasNextXxx() - dla wszystkich primitives oprocz chara\r\n\t\t// nextXxx() - pobiera kolejny prymitywny token\r\n\t\tScanner s2 = new Scanner(\"1 true 34 hi\");\r\n\t\tboolean b;\r\n\t\twhile (b = s2.hasNext()) {\r\n\t\t\tif (s2.hasNextInt()) {\r\n\t\t\t\tint i = s2.nextInt();\r\n\t\t\t\tSystem.out.println(\"integer token: \" + i);\r\n\t\t\t} else if (s2.hasNextBoolean()) {\r\n\t\t\t\tboolean b2 = s2.nextBoolean();\r\n\t\t\t\tSystem.out.println(\"boolean token: \" + b2);\r\n\t\t\t} else {\r\n\t\t\t\tString str = s2.next();\r\n\t\t\t\tSystem.out.println(\"String token: \" + str);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"---------- Scanner\" + ++exampleNumber\r\n\t\t\t\t+ \"----------\");\r\n\r\n\t\t// useDelimiter(delimiter) - ustawienie delimitera (wyrazenia regularnego) wg ktorego bedzie przetwarzany strumien\r\n\t\t// domyslnym delimiterem jest spacja, tabulator, ogolnie bialy znak lub znaki\r\n\t\tScanner s3 = new Scanner(\"Test1 true 34 hi\");\r\n\t\ts3.useDelimiter(\"\\\\d\"); // delimiterem jest cyfra\r\n\t\twhile (s3.hasNext()) {\r\n\t\t\tSystem.out.println(s3.next());\r\n\t\t}\r\n\t}",
"private static void check (int expected) {\n\t\tif (sym == expected) scan(); // if verified,read next\n\t\telse error(TokenCodes.tokenName[expected]+\"expected\" );\n\t\t}",
"public Token nextToken() throws ScanErrorException\n {\n skipWhiteSpace();\n if (eof) \n return new Token(\"eof\", \"eof\");\n else if (isDigit(currentChar))\n return new Token(scanNumber(), \"number\");\n else if (isLetter(currentChar))\n {\n return Token.verifyKeywordLexeme(scanIdentifier());\n }\n else if (isArithmeticOperand(currentChar))\n {\n String result = \"\";\n result += currentChar;\n eat(currentChar);\n return new Token(result, \"arithmetic_operand\");\n }\n else if (isParentheses(currentChar))\n {\n String result = \"\";\n result += currentChar;\n eat(currentChar);\n return new Token(result, \"parentheses\");\n }\n else if(currentChar == '<' || currentChar == '>' || currentChar == '=')\n {\n String result = \"\";\n result += currentChar;\n if(currentChar == '=')\n eat(currentChar);\n else if(currentChar == '>')\n {\n eat(currentChar);\n if(currentChar == '=')\n {\n result += currentChar;\n eat(currentChar);\n }\n }\n else\n {\n eat(currentChar);\n if(currentChar == '>' || currentChar == '=')\n {\n result += currentChar;\n eat(currentChar);\n }\n }\n\n return new Token(result, \"relational_operand\");\n }\n\n System.out.println(\"Error in reading token. Char <\" + currentChar \n + \"> not part of regular language.\");\n eat(currentChar);\n return null;\n }",
"private void scanToken() {\n char c = advance();\n switch (c) {\n case '(':\n addToken(LEFT_PAREN);\n break;\n case ')':\n addToken(RIGHT_PAREN);\n break;\n case '{':\n addToken(LEFT_BRACE);\n break;\n case '}':\n addToken(RIGHT_BRACE);\n break;\n case ',':\n addToken(COMMA);\n break;\n case '.':\n addToken(DOT);\n break;\n case '-':\n addToken(MINUS);\n break;\n case '+':\n addToken(PLUS);\n break;\n case ';':\n addToken(SEMICOLON);\n break;\n case '*':\n addToken(STAR);\n break;\n case '?':\n addToken(QUERY);\n break;\n case ':':\n addToken(COLON);\n break;\n\n case '!': // These characters could be part of a 2-char lexeme, so must check the second char.\n addToken(secondCharIs('=') ? BANG_EQUAL : BANG);\n break;\n case '=':\n addToken(secondCharIs('=') ? EQUAL_EQUAL : EQUAL);\n break;\n case '<':\n addToken(secondCharIs('=') ? LESS_EQUAL : LESS);\n break;\n case '>':\n addToken(secondCharIs('=') ? GREATER_EQUAL : GREATER);\n break;\n\n case '/': // The / char could be the beginning of a comment\n handleSlash();\n break;\n\n case ' ': // Ignore whitespace\n case '\\r':\n case '\\t':\n break;\n\n case '\\n': // Ignore newline but increase line count\n line++;\n break;\n\n case '\"': // Beginning of a string\n handleString();\n break;\n\n default:\n if (isDigit(c)) {\n handleNumber();\n } else if (isAlpha(c)) {\n handleIdentifier();\n } else {\n Rune.error(line, \"Unexpected character.\");\n }\n break;\n }\n }",
"public java_cup.runtime.Symbol scan()\n throws java.lang.Exception\n {\n return getScanner().next_token(); \n }",
"@Test\n\tpublic void testGetReturnsLastNext() {\n\t\tSmartScriptLexer lexer = new SmartScriptLexer(\"\");\n\t\t\n\t\tSmartScriptToken token = lexer.nextToken();\n\t\tassertEquals(token, lexer.getToken(), \"getToken returned different token than nextToken.\");\n\t\tassertEquals(token, lexer.getToken(), \"getToken returned different token than nextToken.\");\n\t}",
"private String nextToken()\n {\n // ensure that the current line has a token\n while (line == null || !line.hasMoreTokens())\n {\n try\n {\n // attempt to input another line\n String newLine = in.readLine();\n if (newLine == null) // end of file encountered\n throw new MyInputException(\"End of file\");\n\n // convert newLine to tokens\n line = new StringTokenizer(newLine);\n }\n catch (IOException e)\n {throw new MyInputException(e.getMessage());}\n\n }\n\n // extract and return the next token\n return line.nextToken();\n }",
"@Test\n\tpublic final void testNextToken() {\n\t\tst = new StringTokenizer(testString,\":\");\n\t\tString token = st.nextToken();\n\t\tString secondToken = st.nextToken();\n\t\tSystem.out.println(\"1. token = \" + token);\n\t\tSystem.out.println(\"2. token = \" + secondToken);\n\t\tif (!secondToken.startsWith(\" Fri\")){\n\t\t\tfail(\"Didn't get right token.\"); \n\t\t} \n\t}",
"public java_cup.runtime.Symbol scan()\n throws java.lang.Exception\n {\n return s.next_token(); \n }",
"public java_cup.runtime.Symbol scan()\r\n throws java.lang.Exception\r\n {\r\n\r\n\tSymbol s = this.getScanner().next_token();\r\n\tif (s != null && s.value != null) \r\n\t\tlog.info(s.toString() + \" \" + s.value.toString());\r\n\treturn s;\r\n\r\n }",
"public java_cup.runtime.Symbol scan()\n throws java.lang.Exception\n {\n return lexer.nextToken(); \n }",
"@Test\n public void parseToken() {\n }",
"private Token nextToken() throws IOException {\n // Si hay lexemas en el buffer, leemos de ahi\n if (!bufferLocal.esVacia()) {\n return bufferLocal.extraer();\n }\n // Si no, leemos del Stream\n String lexemaActual = \"\";\n do {\n int lexema = tokens.nextToken();\n switch (lexema) {\n case StreamTokenizer.TT_WORD:\n lexemaActual = tokens.sval;\n break;\n case StreamTokenizer.TT_EOF:\n lexemaActual = \"fin\";\n break;\n default:\n lexemaActual = String.valueOf((char)tokens.ttype);\n break;\n }\n // Sumamos una linea en caso de haber salto de linea\n if (lexemaActual.equals(\"\\n\"))\n numeroLinea++;\n } while (lexemaActual.matches(\" |\\t|\\n|\\r\"));\n return new Token(lexemaActual,this.numeroLinea);\n }",
"public static Token getNextToken() {\n Token matchedToken;\n int curPos = 0;\n\n EOFLoop:\n for (; ; ) {\n try {\n curChar = input_stream.BeginToken();\n } catch (java.io.IOException e) {\n jjmatchedKind = 0;\n jjmatchedPos = -1;\n matchedToken = jjFillToken();\n return matchedToken;\n }\n\n for (; ; ) {\n switch (curLexState) {\n case 0:\n try {\n input_stream.backup(0);\n while (curChar <= 32 && (0x100002600L & (1L << curChar)) != 0L)\n curChar = input_stream.BeginToken();\n } catch (java.io.IOException e1) {\n continue EOFLoop;\n }\n jjmatchedKind = 0x7fffffff;\n jjmatchedPos = 0;\n curPos = jjMoveStringLiteralDfa0_0();\n break;\n case 1:\n jjmatchedKind = 0x7fffffff;\n jjmatchedPos = 0;\n curPos = jjMoveStringLiteralDfa0_1();\n if (jjmatchedPos == 0 && jjmatchedKind > 10) {\n jjmatchedKind = 10;\n }\n break;\n }\n if (jjmatchedKind != 0x7fffffff) {\n if (jjmatchedPos + 1 < curPos)\n input_stream.backup(curPos - jjmatchedPos - 1);\n if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) {\n matchedToken = jjFillToken();\n if (jjnewLexState[jjmatchedKind] != -1)\n curLexState = jjnewLexState[jjmatchedKind];\n return matchedToken;\n } else if ((jjtoSkip[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) {\n if (jjnewLexState[jjmatchedKind] != -1)\n curLexState = jjnewLexState[jjmatchedKind];\n continue EOFLoop;\n }\n if (jjnewLexState[jjmatchedKind] != -1)\n curLexState = jjnewLexState[jjmatchedKind];\n curPos = 0;\n jjmatchedKind = 0x7fffffff;\n try {\n curChar = input_stream.readChar();\n continue;\n } catch (java.io.IOException e1) {\n }\n }\n int error_line = input_stream.getEndLine();\n int error_column = input_stream.getEndColumn();\n String error_after = null;\n boolean EOFSeen = false;\n try {\n input_stream.readChar();\n input_stream.backup(1);\n } catch (java.io.IOException e1) {\n EOFSeen = true;\n error_after = curPos <= 1 ? \"\" : input_stream.GetImage();\n if (curChar == '\\n' || curChar == '\\r') {\n error_line++;\n error_column = 0;\n } else\n error_column++;\n }\n if (!EOFSeen) {\n input_stream.backup(1);\n error_after = curPos <= 1 ? \"\" : input_stream.GetImage();\n }\n throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);\n }\n }\n }",
"public char getNextToken(){\n\t\treturn token;\n\t}",
"private @Nullable Token eat(TokenType expectedTokenType) {\n Token token = nextToken();\n if (token.type != expectedTokenType) {\n reportExpectedError(token, expectedTokenType);\n return null;\n }\n return token;\n }",
"public int readInt(){\n\t\ttry{\n\t\t\treturn scanner.nextInt();\n\t\t}catch (InputMismatchException e){\n\t\t\tString token=scanner.next();\n\t\t\tthrow new InputMismatchException(\"the next token is\\\"\"+token+\"\\\"\");\n\t\t}\n\t\tcatch (NoSuchElementException e){\n\t\t\tthrow new NoSuchElementException(\"no more tokens are available\");\n\t\t}\n\t}",
"private void check(int expectedKind) {\n if (nextToken.kind == expectedKind) {\n scan();\n } else {\n error(expectedKind + \" expected, found \" + nextToken.kind);\n }\n }",
"boolean next() throws IOException;",
"public void advance(){\n\n if (hasMoreTokens()) {\n currentToken = tokens.get(pointer);\n pointer++;\n }else {\n throw new IllegalStateException(\"No more tokens\");\n }\n\n //System.out.println(currentToken);\n\n if (currentToken.matches(keyWordReg)){\n currentTokenType = TYPE.KEYWORD;\n }else if (currentToken.matches(symbolReg)){\n currentTokenType = TYPE.SYMBOL;\n }else if (currentToken.matches(intReg)){\n currentTokenType = TYPE.INT_CONST;\n }else if (currentToken.matches(strReg)){\n currentTokenType = TYPE.STRING_CONST;\n }else if (currentToken.matches(idReg)){\n currentTokenType = TYPE.IDENTIFIER;\n }else {\n\n throw new IllegalArgumentException(\"Unknown token:\" + currentToken);\n }\n\n }",
"public static boolean hasNextChar() {\n \t boolean result = scanner.hasNext();\n \t return result;\n }",
"public token next_token() throws IOException, DasmError {\n token_line_num = line_num;\n\n for (;;)\n switch (nextChar) {\n case ';': // a comment\n case '\\n':\n // return single SEP token (skip multiple newlines\n // interspersed with whitespace or comments)\n skipEmptyLines();\n token_line_num = line_num;\n return new token(sym.SEP);\n\n case ' ':\n case '\\t':\n case '\\r':\n case ',': // whitespace\n readNextChar();\n break;\n\n case -1: // EOF token\n char_num = -1;\n return new token(sym.EOF);\n\n case '=': // EQUALS token\n readNextChar();\n return new token(sym.EQ);\n\n case ':': // COLON token\n readNextChar();\n return new token(sym.COLON);\n\n case '-':\n case '+':\n case '0':\n case '1':\n case '2':\n case '3':\n case '4':\n case '5':\n case '6':\n case '7':\n case '8':\n case '9':\n case '.': // a number\n {\n return readNumber();\n }\n\n case '\"': // quoted string\n {\n return readQuotedString();\n }\n\n case '{': // list of registers\n {\n return readRegList();\n }\n\n case '\\'': // quotation for overloading reserved words\n return readQuotedReservedWord();\n\n default: {\n // read up until a separatorcharacter\n boolean only_name = false;\n\n charBuf.reset();\n do {\n char chval = (char) nextChar;\n if (nextChar == '\\\\') {\n chval = nameEscape();\n only_name = true;\n }\n charBuf.add(chval);\n readNextChar();\n } while (!isSeparator(nextChar));\n\n String str = charBuf.toString();\n\n if (!only_name) {\n token tok;\n\n // keyword or directive?\n if ((tok = ReservedWords.get(str)) != null) return tok;\n\n // VM instruction?\n if (DopInfo.contains(str))\n return new str_token(sym.Insn, str);\n\n if (str.charAt(0) == '$') {\n String s = str.substring(1);\n Object v;\n int n = 10;\n boolean neg = false;\n switch (s.charAt(0)) {\n default:\n break;\n\n case '-':\n neg = true;\n case '+':\n s = s.substring(1);\n if (s.startsWith(\"0x\")) {\n n = 16;\n s = s.substring(2);\n }\n try {\n n = Integer.parseInt(s, n);\n } catch (NumberFormatException e) {\n throw new DasmError(\n \"Bad relative offset number\");\n }\n if (neg) n = -n;\n return new relative_number_token(sym.Relative, n);\n }\n // Do variable substitution\n if ((v = dict.get(s)) != null) return (token) v;\n } // not begin from '$'\n } // !only_name\n // Unrecognized string token (e.g. a classname)\n return new str_token(sym.Word, str);\n }\n }\n }",
"private boolean ifPeekThenConsume(String token) throws LexemeException {\n\t\tif (ifPeek(token)) {\n\t\t\tconsumeToken();\n\t\t\treturn true;\n\t\t} else {\n\t\t\tlogErrorMessage(peekToken.getType(), token);\n\t\t\treturn false;\n\t\t}\n\t}",
"@Test\n public void testGetNext()\n {\n System.out.println(\"getNext\");\n final File file = new File(\"src/test/data/test.example.txt\");\n final Lexer lexer = new Lexer();\n final Token token = lexer.analyze(file);\n assertEquals(Syntax.LABEL, token.getSyntax());\n assertTrue(token.getNext() != null);\n final Token next = token.getNext();\n assertEquals(\"{\", next.getValue());\n assertEquals(Syntax.OPEN, next.getSyntax());\n assertEquals(2, next.getLine());\n assertEquals(1, next.getPosition());\n }",
"private ELOperandToken getNextToken() {\r\n \t\tswitch (fState) {\r\n \t\tcase STATE_INITIAL: // Just started\r\n \t\t{\r\n \t\t\tint ch = readCharBackward();\r\n \t\t\tif (ch == -1) {\r\n \t\t\t\treturn ELOperandToken.EOF;\r\n \t\t\t}\r\n \t\t\tif (Character.isJavaIdentifierPart((char)ch)) {\r\n \t\t\t\treleaseChar();\r\n \t\t\t\treturn readVarToken();\r\n \t\t\t}\r\n \t\t\tif (ch == '.') {\r\n \t\t\t\treleaseChar();\r\n \t\t\t\treturn readSeparatorToken();\r\n \t\t\t}\r\n \t\t\tif (ch == ')') {\r\n \t\t\t\treleaseChar();\r\n \t\t\t\treturn readMethodToken();\r\n \t\t\t}\r\n \t\t\treleaseChar();\r\n \t\t\treturn ELOperandToken.EOF;\r\n \t\t}\r\n \t\tcase STATE_VAR: // Variable name is read - expecting a separator \r\n \t\t{\r\n \t\t\tint ch = readCharBackward();\r\n \t\t\tif (ch == -1) {\r\n \t\t\t\treturn ELOperandToken.EOF;\r\n \t\t\t}\r\n \t\t\tif (ch == '.') {\r\n \t\t\t\treleaseChar();\r\n \t\t\t\treturn readSeparatorToken();\r\n \t\t\t}\r\n \t\t\treleaseChar();\r\n \t\t\treturn ELOperandToken.EOF;\r\n \t\t}\r\n \t\tcase STATE_METHOD: // Method name and parameters are read - expecting a separator\r\n \t\t{\r\n \t\t\tint ch = readCharBackward();\r\n \t\t\tif (ch == -1) {\r\n \t\t\t\treturn ELOperandToken.EOF;\r\n \t\t\t}\r\n \t\t\tif (ch == '.') {\r\n \t\t\t\treleaseChar();\r\n \t\t\t\treturn readSeparatorToken();\r\n \t\t\t}\r\n \t\t\treleaseChar();\r\n \t\t\treturn ELOperandToken.EOF;\r\n \t\t}\r\n \t\tcase STATE_SEPARATOR: // Separator is read - expecting a var or method\r\n \t\t{\r\n \t\t\tint ch = readCharBackward();\r\n \t\t\tif (ch == -1) {\r\n \t\t\t\treturn ELOperandToken.EOF;\r\n \t\t\t}\r\n \t\t\tif (Character.isJavaIdentifierPart((char)ch)) {\r\n \t\t\t\treleaseChar();\r\n \t\t\t\treturn readVarToken();\r\n \t\t\t}\r\n \t\t\tif (ch == ')') {\r\n \t\t\t\treleaseChar();\r\n \t\t\t\treturn readMethodToken();\r\n \t\t\t}\r\n \t\t\treleaseChar();\r\n \t\t\treturn ELOperandToken.EOF;\r\n \t\t}\r\n \t\t}\r\n \t\treturn ELOperandToken.EOF;\r\n \t}",
"public boolean next() {\n\t\tif (done())\n\t\t\treturn false;\n\t\tmany(whitespace);\n\t\tString c=program.charAt(pos)+\"\";\n\t\tif (digits.contains(c))\n\t\t\tnextNumber();\n\t\telse if (letters.contains(c))\n\t\t\tnextKwId();\n\t\telse if (operators.contains(c))\n\t\t\tnextOp();\n\t\telse if (c.equals(\"#\")){\n\t\t\t//this is a comment, move past the first hashtag\n\t\t\tpast('#');\n\t\t\t//move past the second hastag, ignoring everything in between\n\t\t\tpast('#');\n\t\t\treturn next();\n\t\t} else {\n\t\t\tSystem.err.println(\"illegal character at position \"+pos);\n\t\t\tpos++;\n\t\t\treturn next();\n\t\t}\n\t\treturn true;\n }",
"Token peek();",
"private Token nextToken() throws ParseException {\n String str;\n int line;\n int column;\n\n try {\n lastMatch.clear();\n stringDfaMatcher.match(buffer, lastMatch);\n nfaMatcher.match(buffer, lastMatch);\n regExpMatcher.match(buffer, lastMatch);\n if (lastMatch.length() > 0) {\n line = buffer.lineNumber();\n column = buffer.columnNumber();\n str = buffer.read(lastMatch.length());\n return newToken(lastMatch.pattern(), str, line, column);\n } else if (buffer.peek(0) < 0) {\n return null;\n } else {\n line = buffer.lineNumber();\n column = buffer.columnNumber();\n throw new ParseException(ParseException.UNEXPECTED_CHAR_ERROR,\n buffer.read(1),\n line,\n column);\n }\n } catch (IOException e) {\n throw new ParseException(ParseException.IO_ERROR,\n e.getMessage(),\n -1,\n -1);\n }\n }",
"public Token nextToken ()\n throws ParseException\n {\n return getNextToken();\n }",
"public static Token getNextToken() \n{\n Token matchedToken;\n int curPos = 0;\n\n EOFLoop :\n for (;;)\n {\n try\n {\n curChar = input_stream.BeginToken();\n }\n catch(java.io.IOException e)\n {\n jjmatchedKind = 0;\n matchedToken = jjFillToken();\n return matchedToken;\n }\n\n for (;;)\n {\n switch(curLexState)\n {\n case 0:\n try { input_stream.backup(0);\n while (curChar <= 32 && (0x100002200L & (1L << curChar)) != 0L)\n curChar = input_stream.BeginToken();\n }\n catch (java.io.IOException e1) { continue EOFLoop; }\n jjmatchedKind = 0x7fffffff;\n jjmatchedPos = 0;\n curPos = jjMoveStringLiteralDfa0_0();\n break;\n case 1:\n jjmatchedKind = 0x7fffffff;\n jjmatchedPos = 0;\n curPos = jjMoveStringLiteralDfa0_1();\n if (jjmatchedPos == 0 && jjmatchedKind > 6)\n {\n jjmatchedKind = 6;\n }\n break;\n }\n if (jjmatchedKind != 0x7fffffff)\n {\n if (jjmatchedPos + 1 < curPos)\n input_stream.backup(curPos - jjmatchedPos - 1);\n if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)\n {\n matchedToken = jjFillToken();\n if (jjnewLexState[jjmatchedKind] != -1)\n curLexState = jjnewLexState[jjmatchedKind];\n return matchedToken;\n }\n else if ((jjtoSkip[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)\n {\n if (jjnewLexState[jjmatchedKind] != -1)\n curLexState = jjnewLexState[jjmatchedKind];\n continue EOFLoop;\n }\n if (jjnewLexState[jjmatchedKind] != -1)\n curLexState = jjnewLexState[jjmatchedKind];\n curPos = 0;\n jjmatchedKind = 0x7fffffff;\n try {\n curChar = input_stream.readChar();\n continue;\n }\n catch (java.io.IOException e1) { }\n }\n int error_line = input_stream.getEndLine();\n int error_column = input_stream.getEndColumn();\n String error_after = null;\n boolean EOFSeen = false;\n try { input_stream.readChar(); input_stream.backup(1); }\n catch (java.io.IOException e1) {\n EOFSeen = true;\n error_after = curPos <= 1 ? \"\" : input_stream.GetImage();\n if (curChar == '\\n' || curChar == '\\r') {\n error_line++;\n error_column = 0;\n }\n else\n error_column++;\n }\n if (!EOFSeen) {\n input_stream.backup(1);\n error_after = curPos <= 1 ? \"\" : input_stream.GetImage();\n }\n throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);\n }\n }\n}",
"boolean hasToken();",
"boolean hasToken();",
"boolean hasToken();",
"boolean hasToken();",
"boolean hasToken();",
"boolean hasToken();",
"boolean hasFirstToken();",
"public boolean next() {\r\n\t\tboolean hasElement = false;\r\n\r\n\t\t// Shift tokens \r\n\t\tfor (int i=0; i<tokens.length-1; ++i) {\r\n\t\t\ttokens[i] = tokens[i+1];\r\n\t\t\tnormalizedTokens[i] = normalizedTokens[i+1];\r\n\t\t\tif (tokens[i] != null) hasElement = true;\r\n\t\t}\r\n\t\t\t\r\n\t\t// Read a next token\r\n\t\tif (reader.next()) {\r\n\t\t\ttokens[tokens.length-1] = reader.getText();\r\n\t\t\tnormalizedTokens[normalizedTokens.length-1] = reader.getNormalizedText();\r\n\t\t\thasElement = true;\r\n\t\t} else {\r\n\t\t\ttokens[tokens.length-1] = null;\r\n\t\t\tnormalizedTokens[normalizedTokens.length-1] = null;\r\n\t\t}\r\n\t\t\r\n\t\tif (hasElement) ngramCount++;\r\n\r\n\t\treturn hasElement;\r\n\t}",
"private void consumeToken() {\n\t\tToken token = lexAnalyser.nextToken();\n\t\tlogMessage(functionStack.peekFirst() + \" consumed \" + token.getType()\n\t\t\t\t+ \": <lexeme>\" + token.getLexeme() + \"</lexeme>\");\n\t\tpeekToken = lexAnalyser.peekToken();\n\t}",
"protected int getNextToken(){\n if( currentToken == 1){\n currentToken = -1;\n }else{\n currentToken = 1;\n }\n return currentToken;\n }",
"public Token checkNextToken() throws IOException {\n\t\tToken token = this.getNextToken();\n\t\tthis.pushBack();\n\t\treturn token;\t\n\t}",
"abstract protected void parseNextToken();",
"public boolean hasNext() {\n\n\t\tif (tokenPosition < tokens.size()) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public static void countTokens(Scanner in) {\n }",
"public boolean next() throws StandardException;",
"public static void getNextToken() {\n if (currPos < tokens.size()) {\n currToken = tokens.get(currPos);\n //TODO del \n // System.out.println(currToken);\n currPos++;\n } else {\n// System.out.println(\"end of tokens reached\");\n currToken = new Token(Token.UNRECOGNIZED);\n }\n }",
"public void skipToken() {\t\t\n\t\t//remove token from line\n\t\tif (token != null)\n\t\t{\n\t\t\tline = line.substring(token.length());\n\t\t}\n\t\t//check if new token in line\n\t\tint pos = findFirstNotWhitespace(line.toCharArray());\n\t\t\n\t\t//read line until next token found\n\t\twhile (pos == -1 && s.hasNextLine())\n\t\t{\n\t\t\t//read next line\n\t\t\tline = s.nextLine();\n\t\t\t//check for start of token\n\t\t\tpos = findFirstNotWhitespace(line.toCharArray());\n\t\t}\n\t\t\n\t\t//no token found till eof\n\t\tif (pos == -1)\n\t\t{\n\t\t\t//set EOF tag\n\t\t\tline = null;\n\t\t}\n\t\t//reset token values\n\t\ttoken = null;\n\t\ttType = null;\n\t}",
"public Token getNextToken() {\r\n \r\n // if no next token, abort\r\n if (!this.hasNextToken()) return null;\r\n \r\n // get the current character\r\n char c = this.stream.peek();\r\n \r\n // comment\r\n if (c==this.charComment) {\r\n // read the line and return the token\r\n this.current = new Token(this.getUntilMeetChar('\\n'));\r\n return this.current;\r\n }\r\n \r\n // !\r\n if (c==this.charSize) {\r\n this.stream.next(); // consume the character\r\n this.current = new Token(String.valueOf(this.charSize)); // and build the token\r\n return this.current;\r\n }\r\n \r\n // else\r\n this.current = new Token(this.getUntilMeetChar(this.charSeparator)); // extract until a charSeparator is met\r\n return this.current;\r\n \r\n }",
"public void scan() throws ScanErrorException\n {\n while(! eof)\n {\n Token next = nextToken();\n if (next != null)\n System.out.println(next);\n }\n\n try\n {\n in.close();\n }\n catch (IOException e)\n {\n System.err.println(\"Catastrophic File IO error.\\n\" + e);\n System.exit(1); \n //exit with nonzero exit code to indicate catastrophic error\n }\n }",
"static void getToken() throws IOException{\n curr_char = pbIn.read();\n getNonBlank();\n lookUp();\n }",
"public Token getNextToken()\n {\n int iStartOfToken = myOffset;\n int iTokenLength = 0;\n Token tokenType = Token.TOKEN_UNKNOWN;\n\n // Inside single-quotes, the whole thing until EOI or another single-quote\n // is one string!\n if (amIInsideSingleQuotes)\n {\n if (iStartOfToken >= myMetadataText.length())\n {\n // EOI while in single quotes -- error!\n iTokenLength = 0;\n tokenType = Token.TOKEN_ERROR_EOI_IN_SQUOTES;\n }\n else if (myMetadataText.charAt(iStartOfToken) == '\\'')\n {\n iTokenLength = 1;\n tokenType = Token.TOKEN_SINGLE_QUOTE;\n amIInsideSingleQuotes = false;\n }\n else\n {\n while ((iStartOfToken + iTokenLength) < myMetadataText.length() &&\n myMetadataText.charAt(iStartOfToken + iTokenLength) != '\\'')\n iTokenLength++;\n tokenType = Token.TOKEN_STRING;\n }\n }\n else if (amIInsideDoubleQuotes)\n {\n if (iStartOfToken >= myMetadataText.length())\n {\n // EOI while in double quotes -- error!\n iTokenLength = 0;\n tokenType = Token.TOKEN_ERROR_EOI_IN_DQUOTES;\n }\n else if (myMetadataText.charAt(iStartOfToken) == '\"')\n {\n iTokenLength = 1;\n tokenType = Token.TOKEN_DOUBLE_QUOTE;\n amIInsideDoubleQuotes = false;\n }\n else\n {\n while ((iStartOfToken + iTokenLength) < myMetadataText.length() &&\n myMetadataText.charAt(iStartOfToken + iTokenLength) != '\"')\n iTokenLength++;\n tokenType = Token.TOKEN_STRING;\n }\n }\n else\n {\n // EOI test.\n if (iStartOfToken >= myMetadataText.length())\n {\n // End of input string.\n iTokenLength = 0;\n tokenType = Token.TOKEN_EOI;\n }\n // First char starts a string consisting of letters, numbers, and\n // all but a few punctuation characters.\n else if ((iStartOfToken + iTokenLength) < myMetadataText.length() &&\n //!Character.isWhitespace(myMetadataText.charAt(iStartOfToken + iTokenLength)) &&\n PUNCT_CHARS_NOT_AS_STRING.indexOf(myMetadataText.charAt(iStartOfToken + iTokenLength)) == -1)\n {\n // String mode.\n while ((iStartOfToken + iTokenLength) < myMetadataText.length() &&\n //!Character.isWhitespace(myMetadataText.charAt(iStartOfToken + iTokenLength)) &&\n PUNCT_CHARS_NOT_AS_STRING.indexOf(myMetadataText.charAt(iStartOfToken + iTokenLength)) == -1)\n {\n iTokenLength++;\n }\n tokenType = Token.TOKEN_STRING;\n }\n else if (myMetadataText.charAt(iStartOfToken) == ';')\n {\n // Semicolon.\n iTokenLength = 1;\n tokenType = Token.TOKEN_SEMICOLON;\n }\n else if (myMetadataText.charAt(iStartOfToken) == '=')\n {\n // Equals.\n iTokenLength = 1;\n tokenType = Token.TOKEN_EQUALS;\n }\n// else if (myMetadataText.charAt(iStartOfToken) == '\\'')\n// {\n// // Single Quote.\n// iTokenLength = 1;\n// tokenType = Token.TOKEN_SINGLE_QUOTE;\n// amIInsideSingleQuotes = true;\n// }\n else if (myMetadataText.charAt(iStartOfToken) == '\"')\n {\n // Double Quote.\n iTokenLength = 1;\n tokenType = Token.TOKEN_DOUBLE_QUOTE;\n amIInsideDoubleQuotes = true;\n }\n else if (Character.isWhitespace(myMetadataText.charAt(iStartOfToken)))\n {\n // Whitespace.\n while ((iStartOfToken + iTokenLength) < myMetadataText.length() &&\n Character.isWhitespace(myMetadataText.charAt(iStartOfToken + iTokenLength)))\n iTokenLength++;\n tokenType = Token.TOKEN_WHITESPACE;\n }\n } // End else from if (amIInsideDoubleQuotes)\n\n // Note down lexeme for access later.\n myCurrLexeme = myMetadataText.substring(iStartOfToken, iStartOfToken + iTokenLength);\n\n // Update the offset.\n myOffset += iTokenLength;\n\n return tokenType;\n }",
"@Test(timeout = 4000)\n public void test119() throws Throwable {\n StringReader stringReader0 = new StringReader(\"Q!@aV0Ak~pvq\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(74, token0.kind);\n assertEquals(\"Q\", token0.toString());\n }",
"private static void testAllTokens(String arg) throws IOException \r\n {\r\n\t// open input file\r\n\tFileReader inFile = null;\r\n\tPrintWriter outFile = null;\r\n /**\r\n * Returns the file after testing to a .out file which contains the output else throws FileNotFoundException\r\n */\r\n\ttry {\r\n\t inFile = new FileReader(arg);\r\n\t outFile = new PrintWriter(new FileWriter(arg+\".out\"));\r\n\t } catch (FileNotFoundException ex) \r\n {\r\n\t System.err.println(\"File \" + arg + \" not found.\");\r\n\t System.exit(-1);\r\n\t } catch (IOException ex)\r\n {\r\n\t\tSystem.err.println(arg + \" cannot be opened. ------SKIPPED\");\r\n\t\treturn;\r\n }\r\n \r\n // create and call the scanner\r\n Yylex scanner = new Yylex(inFile);\r\n Symbol token = scanner.next_token();\r\n while (token.sym != sym.EOF) {\r\n switch (token.sym) {\r\n case sym.INT:\r\n outFile.println(\"Type: INT\\nLineNum: \" + ((TokenVal)token.value).linenum + \"\\nCharNum: \" + ((TokenVal)token.value).charnum + \"\\n\");\r\n break;\r\n case sym.BOOL:\r\n outFile.println(\"Type: BOOL\\nLineNum: \" + ((TokenVal)token.value).linenum + \"\\nCharNum: \" + ((TokenVal)token.value).charnum + \"\\n\"); \r\n break;\r\n case sym.VOID:\r\n outFile.println(\"Type: VOID\\nLineNum: \" + ((TokenVal)token.value).linenum + \"\\nCharNum: \" + ((TokenVal)token.value).charnum + \"\\n\");\r\n break;\r\n case sym.TRUE:\r\n outFile.println(\"Type: TRUE\\nLineNum: \" + ((TokenVal)token.value).linenum + \"\\nCharNum: \" + ((TokenVal)token.value).charnum + \"\\n\");\r\n break;\r\n case sym.FALSE:\r\n outFile.println(\"Type: FALSE\\nLineNum: \" + ((TokenVal)token.value).linenum + \"\\nCharNum: \" + ((TokenVal)token.value).charnum + \"\\n\");\r\n break;\r\n case sym.IF:\r\n outFile.println(\"Type: IF\\nLineNum: \" + ((TokenVal)token.value).linenum + \"\\nCharNum: \" + ((TokenVal)token.value).charnum + \"\\n\");\r\n break;\r\n case sym.ELSE:\r\n outFile.println(\"Type: ELSE\\nLineNum: \" + ((TokenVal)token.value).linenum + \"\\nCharNum: \" + ((TokenVal)token.value).charnum + \"\\n\");\r\n break;\r\n case sym.WHILE:\r\n outFile.println(\"Type: WHILE\\nLineNum: \" + ((TokenVal)token.value).linenum + \"\\nCharNum: \" + ((TokenVal)token.value).charnum + \"\\n\");\r\n break;\r\n case sym.RETURN:\r\n outFile.println(\"Type: RETURN\\nLineNum: \" + ((TokenVal)token.value).linenum + \"\\nCharNum: \" + ((TokenVal)token.value).charnum + \"\\n\");\r\n break;\r\n case sym.CIN:\r\n outFile.println(\"Type: CIN\\nLineNum: \" + ((TokenVal)token.value).linenum + \"\\nCharNum: \" + ((TokenVal)token.value).charnum + \"\\n\");\r\n break;\r\n case sym.COUT:\r\n outFile.println(\"Type: COUT\\nLineNum: \" + ((TokenVal)token.value).linenum + \"\\nCharNum: \" + ((TokenVal)token.value).charnum + \"\\n\");\r\n break;\r\n case sym.ID:\r\n outFile.println(\"Type: ID\\nLineNum: \" + ((IdTokenVal)token.value).linenum + \"\\nCharNum: \" + ((IdTokenVal)token.value).charnum \r\n\t\t\t\t+ \"\\nValue: \" + ((IdTokenVal)token.value).idVal + \"\\n\");\r\n break;\r\n case sym.INTLITERAL: \r\n outFile.println(\"Type: INTLITERAL\\nLineNum: \" + ((IntLitTokenVal)token.value).linenum + \"\\nCharNum: \" + ((IntLitTokenVal)token.value).charnum \r\n\t\t\t\t+ \"\\nValue: \" + ((IntLitTokenVal)token.value).intVal + \"\\n\");\r\n break;\r\n case sym.STRINGLITERAL: \r\n outFile.println(\"Type: STRINGLITERAL\\nLineNum: \" + ((StrLitTokenVal)token.value).linenum + \"\\nCharNum: \" + ((StrLitTokenVal)token.value).charnum \r\n\t\t\t\t+ \"\\nValue: \" + ((StrLitTokenVal)token.value).strVal + \"\\n\");\r\n break; \r\n case sym.LCURLY:\r\n outFile.println(\"Type: LCURLY\\nLineNum: \" + ((TokenVal)token.value).linenum + \"\\nCharNum: \" + ((TokenVal)token.value).charnum + \"\\n\");\r\n break;\r\n case sym.RCURLY:\r\n outFile.println(\"Type: RCURLY\\nLineNum: \" + ((TokenVal)token.value).linenum + \"\\nCharNum: \" + ((TokenVal)token.value).charnum + \"\\n\");\r\n break;\r\n case sym.LPAREN:\r\n outFile.println(\"Type: LPAREN\\nLineNum: \" + ((TokenVal)token.value).linenum + \"\\nCharNum: \" + ((TokenVal)token.value).charnum + \"\\n\");\r\n break;\r\n case sym.RPAREN:\r\n outFile.println(\"Type: RPAREN\\nLineNum: \" + ((TokenVal)token.value).linenum + \"\\nCharNum: \" + ((TokenVal)token.value).charnum + \"\\n\");\r\n break;\r\n case sym.LSQBRACKET:\r\n outFile.println(\"Type: LSQBRACKET\\nLineNum: \" + ((TokenVal)token.value).linenum + \"\\nCharNum: \" + ((TokenVal)token.value).charnum + \"\\n\");\r\n break;\r\n case sym.RSQBRACKET:\r\n outFile.println(\"Type: RSQBRACKET\\nLineNum: \" + ((TokenVal)token.value).linenum + \"\\nCharNum: \" + ((TokenVal)token.value).charnum + \"\\n\");\r\n break;\r\n case sym.COMMA:\r\n outFile.println(\"Type: COMMA\\nLineNum: \" + ((TokenVal)token.value).linenum + \"\\nCharNum: \" + ((TokenVal)token.value).charnum + \"\\n\");\r\n break;\r\n case sym.ASSIGN:\r\n outFile.println(\"Type: ASSIGN\\nLineNum: \" + ((TokenVal)token.value).linenum + \"\\nCharNum: \" + ((TokenVal)token.value).charnum + \"\\n\");\r\n break;\r\n case sym.SEMICOLON:\r\n outFile.println(\"Type: SEMICOLON\\nLineNum: \" + ((TokenVal)token.value).linenum + \"\\nCharNum: \" + ((TokenVal)token.value).charnum + \"\\n\");\r\n break;\r\n case sym.PLUS:\r\n outFile.println(\"Type: PLUS\\nLineNum: \" + ((TokenVal)token.value).linenum + \"\\nCharNum: \" + ((TokenVal)token.value).charnum + \"\\n\");\r\n break;\r\n case sym.MINUS:\r\n outFile.println(\"Type: MINUS\\nLineNum: \" + ((TokenVal)token.value).linenum + \"\\nCharNum: \" + ((TokenVal)token.value).charnum + \"\\n\");\r\n break;\r\n case sym.TIMES:\r\n outFile.println(\"Type: TIMES\\nLineNum: \" + ((TokenVal)token.value).linenum + \"\\nCharNum: \" + ((TokenVal)token.value).charnum + \"\\n\");\r\n break;\r\n case sym.DIVIDE:\r\n outFile.println(\"Type: DIVIDE\\nLineNum: \" + ((TokenVal)token.value).linenum + \"\\nCharNum: \" + ((TokenVal)token.value).charnum + \"\\n\");\r\n break;\r\n case sym.NOT:\r\n outFile.println(\"Type: NOT\\nLineNum: \" + ((TokenVal)token.value).linenum + \"\\nCharNum: \" + ((TokenVal)token.value).charnum + \"\\n\");\r\n break;\r\n case sym.AND:\r\n outFile.println(\"Type: AND\\nLineNum: \" + ((TokenVal)token.value).linenum + \"\\nCharNum: \" + ((TokenVal)token.value).charnum + \"\\n\");\r\n break;\r\n case sym.OR:\r\n outFile.println(\"Type: OR\\nLineNum: \" + ((TokenVal)token.value).linenum + \"\\nCharNum: \" + ((TokenVal)token.value).charnum + \"\\n\");\r\n break;\r\n case sym.EQUALS:\r\n outFile.println(\"Type: EQUALS\\nLineNum: \" + ((TokenVal)token.value).linenum + \"\\nCharNum: \" + ((TokenVal)token.value).charnum + \"\\n\");\r\n break;\r\n case sym.NOTEQUALS:\r\n outFile.println(\"Type: NOTEQUALS\\nLineNum: \" + ((TokenVal)token.value).linenum + \"\\nCharNum: \" + ((TokenVal)token.value).charnum + \"\\n\");\r\n break;\r\n case sym.LESS:\r\n outFile.println(\"Type: LESS\\nLineNum: \" + ((TokenVal)token.value).linenum + \"\\nCharNum: \" + ((TokenVal)token.value).charnum + \"\\n\");\r\n break;\r\n case sym.GREATER:\r\n outFile.println(\"Type: GREATER\\nLineNum: \" + ((TokenVal)token.value).linenum + \"\\nCharNum: \" + ((TokenVal)token.value).charnum + \"\\n\");\r\n break;\r\n case sym.LESSEQ:\r\n outFile.println(\"Type: LESSEQ\\nLineNum: \" + ((TokenVal)token.value).linenum + \"\\nCharNum: \" + ((TokenVal)token.value).charnum + \"\\n\");\r\n break;\r\n case sym.GREATEREQ:\r\n outFile.println(\"Type: GREATEREQ\\nLineNum: \" + ((TokenVal)token.value).linenum + \"\\nCharNum: \" + ((TokenVal)token.value).charnum + \"\\n\");\r\n break;\r\n case sym.WRITE:\r\n outFile.println(\"Type: WRITE\\nLineNum: \" + ((TokenVal)token.value).linenum + \"\\nCharNum: \" + ((TokenVal)token.value).charnum + \"\\n\");\r\n break;\r\n case sym.READ:\r\n outFile.println(\"Type: READ\\nLineNum: \" + ((TokenVal)token.value).linenum + \"\\nCharNum: \" + ((TokenVal)token.value).charnum + \"\\n\");\r\n break;\r\n } // end switch\r\n\r\n token = scanner.next_token();\r\n } // end while\r\n outFile.close();\r\n }",
"@Override\n public Token next() throws IOException {\n\n if (hasNext()) {\n String next = splits.get(current++);\n if (isString(next)) {\n return new StringToken(next.substring(1, next.length() - 1));\n }\n if (isNumber(next)) {\n return new NumberToken(Double.parseDouble(next));\n }\n if (isSymbol(next)) {\n return new SymbolToken(next.charAt(0));\n }\n if (isName(next)) {\n return new NameToken(next);\n }\n throw new IOException(\"Invalid input.\");\n }\n\n return null;\n }",
"public boolean isNextToken(Type token){\n if(currentToken+1 >= tokens.size())\n return false; \n return tokens.get(++currentToken).type.equals(token);\n }",
"public Token nextToken() {\n\t\t\n\t\t//if the method nextToken() is called and the last token\n\t\t//before that was EOF, then this method will throw LexerException.\n\t\tif(token != null && token.type == TokenType.EOF) {\n\t\t\tthrow new LexerException(\"There are no more tokens afeter EOF.\");\n\t\t\t\t\t\n\t\t}\n\t\t\n\t\tskipBlankSpaces();\n\t\t\n\t\tif(currentIndex >= data.length) {\n\t\t\ttoken = new Token(TokenType.EOF, null);\n\t\t\treturn token;\n\t\t}\n\t\t\n\t\tif(state == LexerState.BASIC) {\n\t\t\t//checking if it is a word\n\t\t\tif(Character.isLetter(data[currentIndex]) || data[currentIndex] == '\\\\') {\n\t\t\t\ttoken = basicNextWordToken();\n\t\t\t\treturn token;\n\t\t\t}\n\t\t\t\n\t\t\t//checking if it is a number\n\t\t\tif(data[currentIndex] >= '1' && data[currentIndex] <= '9') {\t\n\t\t\t\ttry {\n\t\t\t\t\ttoken = basicNextNumberToken();\n\t\t\t\t\treturn token;\n\t\t\t\t\t\n\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\tthrow new LexerException(\"The number could not be parsed to long!\");\t\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t//it is in the EXTENDED state\n\t\t\tif(data[currentIndex] != '#') {\n\t\t\t\ttoken = extendedNextWordToken();\n\t\t\t\treturn token;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//if it is not a word or a number then it is a symbol.\n\t\t\n\t\ttoken = new Token(TokenType.SYMBOL, data[currentIndex]);\n\t\tcurrentIndex++;\n\t\t\n\t\treturn token;\n\t}",
"private void basicNext() {\n\t\t// start = currentIndex;\n\t\tif (currentIndex >= data.length) {\n\t\t\ttoken = new Token(TokenType.EOF, null);\n\t\t} else {\n\t\t\tcreateBasicToken();\n\t\t}\n\t}",
"public Token nextToken() throws LexerException { \n \n trimWhitespaces();\n \n if(currentIndex > dataLength) {\n throw new LexerException(\"No more tokens! EOF!\");\n }\n \n if(currentIndex == dataLength) {\n token = new Token(TokenType.EOF, null);\n currentIndex++;\n return token;\n } \n \n if(data[currentIndex] == '#') {\n token = new Token(TokenType.SYMBOL, data[currentIndex]);\n \n currentIndex++;\n stringToken = new StringBuilder();\n \n return token;\n }\n \n if(state == LexerState.BASIC) {\n return nextTokenBasic();\n }\n return nextTokenExtended();\n }",
"public boolean next() throws IOException;",
"private Token nextRawToken() throws NoSuchElementException {\n\t\t// Location of the char after the current projected token.\n\t\tint sLoc = 0;\n\n\t\twhile (latestLine.trim().isEmpty()) {\n\t\t\tlatestLine = fileScanner.nextLine();\n\t\t}\n\n\t\t// Find the next end segment\n\t\twhile (latestLine.length() != sLoc + 1\n\t\t\t\t&& latestLine.charAt(sLoc + 1) != ' ') {\n\t\t\t// && getType(document.substring(0, sLoc + 1)) == TokenType.INVALID)\n\t\t\t// {\n\t\t\tsLoc++;\n\t\t}\n\n\t\t// End indices of the token, inclusive.\n\t\tint endTestToken = sLoc;\n\n\t\t/*\n\t\t * Determine the longest sub-token by starting from the end and working\n\t\t * backwards.\n\t\t */\n\t\tboolean valid = false;\n\t\tfor (int i = endTestToken; i >= 0; i--) {\n\t\t\tString testToken = latestLine.substring(0, i + 1);\n\t\t\tif (getType(testToken) != TokenType.INVALID) {\n\t\t\t\tsLoc = i;\n\t\t\t\tvalid = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (!valid) {\n\t\t\tsLoc = 0;\n\t\t}\n\n\t\tString token = latestLine.substring(0, sLoc + 1);\n\n\t\tToken t = new Token(token, getType(token));\n\t\trunDiagnostic(t);\n\n\t\t// Consume the token form the document\n\t\tlatestLine = latestLine.substring(sLoc + 1).trim();\n\n\t\treturn t;\n\t}",
"public boolean next () throws Exception;",
"private Token peekToken(int index) {\n return scanner.peekToken(index);\n }",
"@Test(timeout = 4000)\n public void test109() throws Throwable {\n StringReader stringReader0 = new StringReader(\"]\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals(82, token0.kind);\n }",
"@Test(timeout = 4000)\n public void test115() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"Xr\\\"\");\n Token token0 = xPathLexer0.nextToken();\n assertEquals(15, token0.getTokenType());\n assertEquals(\"Xr\", token0.getTokenText());\n }",
"public boolean isNextToken(String token){\n if(currentToken+1 >= tokens.size())\n return false; \n return tokens.get(++currentToken).identifier.equals(token);\n }",
"void checkToken(String token) throws InvalidTokenException;",
"public Token next()\n\t{\n\t\tint munchSize = 0;\n\t\tStringBuilder buffer = new StringBuilder();\n\n\t\t// iterate until we either:\n\t\t//\t1. Match a token in any state but MANY_STATE\n\t\t//\t2. Whitespace, newline or EOF\n\t\tboolean was_good = false, can_continue = true;\n\t\tToken to_return = Token.generateToken(lineNum, charPos, \"EOF\", Token.Kind.EOF);\n\n\t\t// skip any initial white space.\n\t\twhile (readChar() == -1) { }\n\t\tthis.lastChar = this.nextChar;\n\t\twhile (can_continue && readChar() > -1) {\n\t\t\tchar next = (char)this.nextChar;\n\t\t\tint pos = (charPos - (buffer.length() + 1));\n\t\t\tswitch (munchSize) {\n\t\t\t\tcase EMPTY_STATE:\n\t\t\t\t\t// Search for all tokens of one token. If we match\n\t\t\t\t\t// store it, and attempt to switch states.\n\t\t\t\t\tif (Token.isValidLexeme(Token.getSingleCharacterMap(), String.valueOf(next), 0)) {\n\t\t\t\t\t\t// We can transition.\n\t\t\t\t\t\tbuffer.append(next);\n\t\t\t\t\t\tto_return = Token.generateToken(lineNum, pos, buffer.toString(),\n\t\t\t\t\t\t\t\tToken.getSingleCharacterMap());\n\t\t\t\t\t\tmunchSize++;\n\t\t\t\t\t\twas_good = true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// error.\n\t\t\t\t\t\twas_good = false;\n\t\t\t\t\t\tbuffer.append(next);\n\t\t\t\t\t\tmunchSize++;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase SINGLE_STATE:\n\t\t\t\t\t// Search for all tokens of two tokens. If we match\n\t\t\t\t\t// store it, and attempt to switch states.\n\t\t\t\t\tif (Token.isValidLexeme(Token.getDoubleCharTokens(), buffer.toString() + next, 1)) {\n\t\t\t\t\t\t// we can transition\n\t\t\t\t\t\tbuffer.append(next);\n\t\t\t\t\t\tto_return = Token.generateToken(lineNum, pos, buffer.toString(),\n\t\t\t\t\t\t\t\tToken.getDoubleCharTokens());\n\t\t\t\t\t\tmunchSize++;\n\t\t\t\t\t\twas_good = true;\n\n\t\t\t\t\t\t// is this a comment?\n\t\t\t\t\t\tif (to_return.is(Token.Kind.COMMENT)) {\n\t\t\t\t\t\t\t// restart parse.\n\t\t\t\t\t\t\tthis.on_comment = true;\n\t\t\t\t\t\t\tmunchSize = 0;\n\t\t\t\t\t\t\tbuffer.delete(0, buffer.length());\n\t\t\t\t\t\t\twas_good = false;\n\t\t\t\t\t\t\tcan_continue = true;\n\t\t\t\t\t\t\tto_return = Token.generateToken(lineNum, pos, \"EOF\", Token.Kind.EOF);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// if we had a previous good state, return, else error.\n\t\t\t\t\t\tcan_continue = false;\n\t\t\t\t\t\tthis.lastChar = this.nextChar;\n\t\t\t\t\t\tif (!was_good) {\n\t\t\t\t\t\t\t// error.\n\t\t\t\t\t\t\twas_good = false;\n\t\t\t\t\t\t\tto_return = Token.generateToken(lineNum, pos, \"Unexpected token: \" + buffer.toString(),\n\t\t\t\t\t\t\t\t\tToken.Kind.ERROR);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase DOUBLE_STATE:\n\t\t\t\t\t// Search for multiple character states and keywords.\n\t\t\t\t\tif (Token.isValidLexeme(Token.getMultiCharTokens(), buffer.toString() + next, 2)) {\n\t\t\t\t\t\t// we can transition\n\t\t\t\t\t\tbuffer.append(next);\n\t\t\t\t\t\tto_return = Token.generateToken(lineNum, pos, buffer.toString(),\n\t\t\t\t\t\t\t\tToken.getMultiCharTokens());\n\t\t\t\t\t\tmunchSize++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// if we had a previous good state, return, else error.\n\t\t\t\t\t\tcan_continue = false;\n\t\t\t\t\t\tif (was_good) {\n\t\t\t\t\t\t\tthis.lastChar = this.nextChar;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\twas_good = false;\n\t\t\t\t\t\t\tto_return = Token.generateToken(lineNum, pos, \"Unexpected token: \" + buffer.toString(),\n\t\t\t\t\t\t\t\t\tToken.Kind.ERROR);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault: // MANY_STATE\n\t\t\t\t\tif (Token.isValidLexeme(Token.getKeywords(), buffer.toString() + next, munchSize)) {\n\t\t\t\t\t\tbuffer.append(next);\n\t\t\t\t\t\tto_return = Token.generateToken(lineNum, pos, buffer.toString(), Token.getKeywords());\n\t\t\t\t\t\tmunchSize++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcan_continue = false;\n\t\t\t\t\t\tif (was_good) {\n\t\t\t\t\t\t\tthis.lastChar = this.nextChar;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\twas_good = false;\n\t\t\t\t\t\t\tto_return = Token.generateToken(lineNum, pos, \"Unexpected token: \" + buffer.toString(),\n\t\t\t\t\t\t\t\t\tToken.Kind.ERROR);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn to_return;\n\t}",
"@Test(timeout = 4000)\n public void test116() throws Throwable {\n StringReader stringReader0 = new StringReader(\"U3kE.1/hk@Tuvel]`L\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(3, javaCharStream0.bufpos);\n assertEquals(74, token0.kind);\n }",
"@Test(timeout = 4000)\n public void test110() throws Throwable {\n StringReader stringReader0 = new StringReader(\"RaLz,<NBG_}Q[P4}\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 20, 0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(3, javaCharStream0.bufpos);\n assertEquals(74, token0.kind);\n }",
"public void testNextChar() {\n System.out.println(\"nextChar\");\n BufferedCharSequence instance = null;\n char expResult = ' ';\n char result = instance.nextChar();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }",
"@Test(timeout = 4000)\n public void test109() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"^r\");\n Token token0 = xPathLexer0.nextToken();\n assertEquals(\"^r\", token0.getTokenText());\n }",
"@Test(timeout = 4000)\n public void test050() throws Throwable {\n StringReader stringReader0 = new StringReader(\"/q\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals(1, javaCharStream0.getEndLine());\n }",
"private void tokenStart() {\n tokenStartIndex = zzStartRead;\n }",
"public boolean eof() {\n\treturn !(tokenizer.hasMoreElements());\n }",
"@Override\r\n\tpublic boolean hasNext() {\n\t\treturn scanner.hasNext();\r\n\t}",
"@Test(timeout = 4000)\n public void test126() throws Throwable {\n StringReader stringReader0 = new StringReader(\"9F}n S'~C\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(74, token0.kind);\n assertEquals(\"F\", token0.toString());\n }",
"@Test(timeout = 4000)\n public void test091() throws Throwable {\n StringReader stringReader0 = new StringReader(\"void\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(3, javaCharStream0.bufpos);\n assertEquals(\"void\", token0.toString());\n }",
"public Token nextToken(){\n if(currentToken+1 >= tokens.size())\n return null; \n return tokens.get(++currentToken);\n }",
"@Test(timeout = 4000)\n public void test029() throws Throwable {\n StringReader stringReader0 = new StringReader(\"case\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 1, 23);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(3, javaCharStream0.bufpos);\n assertEquals(26, javaCharStream0.getEndColumn());\n }",
"@Test(timeout = 4000)\n public void test157() throws Throwable {\n StringReader stringReader0 = new StringReader(\"gR39:};Az,EeQ2PLmLM\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 84, 84, 84);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(3, javaCharStream0.bufpos);\n assertEquals(\"gR39\", token0.toString());\n }",
"private void match(TokenType tokType) {\r\n if(tokens.get(position).returnType() != tokType) {\r\n \t\tSystem.out.println(position);\r\n parseError();\r\n }\r\n position++;\r\n }",
"public static boolean hasNextToken() {\n\t\tif(index < tokens.size()) return true;\n\t\treturn false;\n\t}",
"protected int match (int token) throws HTMLParseException {\r\n int ts;\r\n\r\n if (nextToken != token)\r\n throw new HTMLParseException (\"Token: \" + getTokenString (token) + \" != \" + getTokenString (nextToken));\r\n\r\n if (pendingComment != null) {\r\n nextToken = LT;\r\n pendingComment = null;\r\n return SCRIPT;\r\n }\r\n while (index < length) {\r\n tagStart = index;\r\n stringValue = null;\r\n switch (pagepart[index++]) {\r\n case (int)' ':\r\n case (int)'\\t':\r\n case (int)'\\n':\r\n case (int)'\\r':\r\n // TODO evaluate strategy here, a continue here may result\r\n // in RabbIT cutting out whitespaces from the html-page.\r\n continue;\r\n case (int)'<':\r\n //System.out.println(\"[index]\" + index);\r\n ts = tagStart;\r\n if (isComment ()) {\r\n nextToken = scanComment ();\r\n tagStart = ts;\r\n return nextToken;\r\n } else{\r\n return nextToken = LT;\r\n }\r\n case (int)'>':\r\n return nextToken = MT;\r\n case (int)'=':\r\n \tif(pagepart[index] == '=' && index < length) {\r\n \t\treturn nextToken = scanString();\r\n \t} else {\r\n \t\tstringValue = \"=\";\r\n return nextToken = EQUALS;\r\n \t}\r\n case (int)'\"':\r\n if (tagmode)\r\n return nextToken = scanQuotedString ();\r\n // else fallthrough...\r\n case (int)'\\'':\r\n if (tagmode)\r\n return nextToken = scanQuotedString ();\r\n // else fallthrough...\r\n default:\r\n return nextToken = scanString ();\r\n }\r\n }\r\n\r\n return nextToken = END;\r\n }",
"private int findTokenStart() {\n\n\t\tint tokenStart = NOTOKENFOUND;\n\t\t//find starting position of token\n\t\twhile ( tokenStart == NOTOKENFOUND)\n\t\t{\n\t\t\t//empty line, but more lines to read\n\t\t\tif (line.length() == 0 && s.hasNextLine()) \n\t\t\t{\n\t\t\t\t//read next line\n\t\t\t\tline = s.nextLine(); \n\t\t\t}\n\t\t\t//empty line, and no more lines to read\n\t\t\telse if (line.length() == 0 && !s.hasNextLine() )\n\t\t\t{\n\t\t\t\treturn NOTOKENFOUND;\n\t\t\t}\n\t\t\t//line not empty\n\t\t\telse if (line.length() > 0)\n\t\t\t{\n\t\t\t\t//convert to characters[]\n\t\t\t\tchar[] characters = line.toCharArray();\n\t\t\t\t//find position of token in line.\n\t\t\t\ttokenStart = findFirstNotWhitespace(characters);\n\t\t\t\t//empty line if no token found.\n\t\t\t\tif (tokenStart == NOTOKENFOUND)\n\t\t\t\t{\t\n\t\t\t\t\t//empty the line.\n\t\t\t\t\tline = \"\";\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//token was found!\n\t\treturn tokenStart;\n\t}",
"public boolean hasNextToken(){\n if(currentToken+1 > tokens.size())\n return false;\n if(currentToken <= 0)\n return false;\n return true;\n }",
"public Token nextToken() {\r\n\t\treturn tokens.get(nextTokenPos++);\r\n\t}",
"public String getNextToken() {\n return nextToken;\n }",
"public Token getNextToken() \n{\n Token specialToken = null;\n Token matchedToken;\n int curPos = 0;\n\n EOFLoop :\n for (;;)\n {\n try\n {\n curChar = input_stream.BeginToken();\n }\n catch(java.io.IOException e)\n {\n jjmatchedKind = 0;\n matchedToken = jjFillToken();\n matchedToken.specialToken = specialToken;\n return matchedToken;\n }\n image = jjimage;\n image.setLength(0);\n jjimageLen = 0;\n\n try { input_stream.backup(0);\n while (curChar <= 12 && (0x1000L & (1L << curChar)) != 0L)\n curChar = input_stream.BeginToken();\n }\n catch (java.io.IOException e1) { continue EOFLoop; }\n jjmatchedKind = 0x7fffffff;\n jjmatchedPos = 0;\n curPos = jjMoveStringLiteralDfa0_0();\n if (jjmatchedKind != 0x7fffffff)\n {\n if (jjmatchedPos + 1 < curPos)\n input_stream.backup(curPos - jjmatchedPos - 1);\n if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)\n {\n matchedToken = jjFillToken();\n matchedToken.specialToken = specialToken;\n TokenLexicalActions(matchedToken);\n return matchedToken;\n }\n else\n {\n if ((jjtoSpecial[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)\n {\n matchedToken = jjFillToken();\n if (specialToken == null)\n specialToken = matchedToken;\n else\n {\n matchedToken.specialToken = specialToken;\n specialToken = (specialToken.next = matchedToken);\n }\n SkipLexicalActions(matchedToken);\n }\n else\n SkipLexicalActions(null);\n continue EOFLoop;\n }\n }\n int error_line = input_stream.getEndLine();\n int error_column = input_stream.getEndColumn();\n String error_after = null;\n boolean EOFSeen = false;\n try { input_stream.readChar(); input_stream.backup(1); }\n catch (java.io.IOException e1) {\n EOFSeen = true;\n error_after = curPos <= 1 ? \"\" : input_stream.GetImage();\n if (curChar == '\\n' || curChar == '\\r') {\n error_line++;\n error_column = 0;\n }\n else\n error_column++;\n }\n if (!EOFSeen) {\n input_stream.backup(1);\n error_after = curPos <= 1 ? \"\" : input_stream.GetImage();\n }\n throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);\n }\n}",
"public static boolean hasNextLine(){\n \tboolean result = scanner.hasNext();\n \treturn result;\n }",
"@Test(timeout = 4000)\n public void test132() throws Throwable {\n StringReader stringReader0 = new StringReader(\"??S,\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 28, 21, 21);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals(91, token0.kind);\n }",
"public boolean hasNextToken() {\r\n return this.stream.hasNext(); // based on the method hasNext() of the stream\r\n }",
"@Test(timeout = 4000)\n public void test129() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"F<=oPf^MU.<n%\");\n Token token0 = xPathLexer0.nextToken();\n assertEquals(15, token0.getTokenType());\n assertEquals(\"F\", token0.getTokenText());\n }",
"@Test(timeout = 4000)\n public void test046() throws Throwable {\n StringReader stringReader0 = new StringReader(\".wa]!^8?,%1IG\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals(85, token0.kind);\n }",
"public Token next() {\n \tcurrent = peek;\n \tpeek = extractToken();\n \treturn current;\n }"
] | [
"0.7570858",
"0.73006755",
"0.7160009",
"0.69971186",
"0.69248736",
"0.68598056",
"0.67166334",
"0.66292495",
"0.6629222",
"0.65776837",
"0.6562504",
"0.65574247",
"0.6536088",
"0.6481028",
"0.64726985",
"0.6424487",
"0.6377311",
"0.63663596",
"0.63552105",
"0.63398695",
"0.6335338",
"0.63193434",
"0.6315084",
"0.63127184",
"0.6293836",
"0.62674797",
"0.62621814",
"0.62521696",
"0.6252009",
"0.6248068",
"0.62435216",
"0.623851",
"0.62343854",
"0.6227078",
"0.62227017",
"0.6221244",
"0.62181014",
"0.62181014",
"0.62181014",
"0.62181014",
"0.62181014",
"0.62181014",
"0.62157655",
"0.61909884",
"0.6187707",
"0.61839586",
"0.61781955",
"0.6174742",
"0.6152544",
"0.6122541",
"0.6112706",
"0.610988",
"0.60869145",
"0.608422",
"0.6082252",
"0.60688967",
"0.6068676",
"0.6064615",
"0.6061804",
"0.60522753",
"0.6052257",
"0.6052256",
"0.6044171",
"0.6039311",
"0.6031797",
"0.6029296",
"0.60240513",
"0.60088193",
"0.60086054",
"0.5981535",
"0.5974167",
"0.59741026",
"0.59734434",
"0.59686726",
"0.59679455",
"0.5966914",
"0.59668356",
"0.5964313",
"0.5958153",
"0.5957506",
"0.5952387",
"0.5947883",
"0.5938273",
"0.5938094",
"0.5924535",
"0.59230673",
"0.5912284",
"0.5901053",
"0.58936787",
"0.58911955",
"0.5886293",
"0.58860326",
"0.5884402",
"0.58802825",
"0.5878908",
"0.58720046",
"0.5864903",
"0.5862839",
"0.58597875",
"0.5858742"
] | 0.5856383 | 100 |
Created by hide on 2016/09/23. | public interface IDeviceInfo
{
public DeviceInfo GetDeviceInfo();
} | {
"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\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"public final void mo51373a() {\n }",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"public void mo38117a() {\n }",
"@Override\n\tpublic void anular() {\n\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"private static void cajas() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"private void poetries() {\n\n\t}",
"public void mo4359a() {\n }",
"@Override\n\tpublic void entrenar() {\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}",
"protected boolean func_70814_o() { return true; }",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n protected void initialize() {\n\n \n }",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"private void kk12() {\n\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tpublic void sacrifier() {\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\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"public void 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\r\n\tpublic void rozmnozovat() {\n\t}",
"private void init() {\n\n\t}",
"@Override\n public int describeContents() { return 0; }",
"@Override\n public void init() {\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 dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\n protected void init() {\n }",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\n public void init() {\n\n }",
"@Override\n public void init() {\n\n }",
"private void m50366E() {\n }",
"@Override\n void init() {\n }",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\r\n\tpublic void init() {}",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n public void init() {}",
"@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tpublic void init()\n\t{\n\n\t}",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t}",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n\tpublic void debite() {\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\n public void inizializza() {\n\n super.inizializza();\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"private void strin() {\n\n\t}",
"public void mo6081a() {\n }",
"public void mo12628c() {\n }",
"private void init() {\n\n\n\n }",
"public void mo12930a() {\n }"
] | [
"0.59330475",
"0.58006805",
"0.57411087",
"0.5731517",
"0.5731517",
"0.57249755",
"0.57174474",
"0.565185",
"0.5634802",
"0.5565415",
"0.5561842",
"0.5555461",
"0.55545014",
"0.5540641",
"0.5538065",
"0.55377394",
"0.5523023",
"0.5512867",
"0.5507554",
"0.5507506",
"0.5504499",
"0.5504499",
"0.5504499",
"0.5504499",
"0.5504499",
"0.5499514",
"0.5498016",
"0.5495832",
"0.549108",
"0.5488201",
"0.5484991",
"0.5470787",
"0.5468577",
"0.54671556",
"0.5452573",
"0.54214424",
"0.54214424",
"0.54055506",
"0.54046845",
"0.5387069",
"0.5387069",
"0.5387069",
"0.5379888",
"0.5379888",
"0.5379888",
"0.5379888",
"0.5379888",
"0.5379888",
"0.5379888",
"0.5375723",
"0.5374667",
"0.5374612",
"0.5369915",
"0.53698564",
"0.53698564",
"0.53698564",
"0.53656024",
"0.53656024",
"0.53656024",
"0.5363628",
"0.5363628",
"0.53583735",
"0.5345815",
"0.5341524",
"0.5339128",
"0.533804",
"0.53364587",
"0.53364587",
"0.5335402",
"0.5334984",
"0.533199",
"0.5330705",
"0.53300506",
"0.5328702",
"0.5328702",
"0.5328702",
"0.5328702",
"0.5328702",
"0.5328702",
"0.5327275",
"0.5326183",
"0.5310809",
"0.53068984",
"0.5299838",
"0.52929616",
"0.5276182",
"0.52715737",
"0.5264887",
"0.52560294",
"0.5255849",
"0.5249791",
"0.5249791",
"0.5246549",
"0.52457386",
"0.5243473",
"0.52425885",
"0.52419657",
"0.523487",
"0.5221715",
"0.52148783",
"0.521335"
] | 0.0 | -1 |
init method usage in constructor. Method split raw command by spaces. First part is command, second is parameter | private void init(String command) {
if (command == null) throw new IllegalArgumentException("Empty command");
this.raw = command;
String[] data = this.raw.split(" ");
this.map = new HashMap<>();
for ( int i = 0; i < data.length; i++) {
map.put( Index.values()[i], data[i] );
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void init(String command){\n\t\tStringTokenizer st = new StringTokenizer(command);\n\t\t\n\t\tthis.numberOfTokens = st.countTokens() ;\n\t\tthis.tokens = new String[this.numberOfTokens];\n\t\t\n\t\tString currentToken;\n\t\tint tokenNumber = 0;\n\t\t\n\t\t/*inizialize the entire array or cannot concatenate strings\n\t\tin the while belowe: looks like null!Command nullArgument1 ...*/\n\t\t//for(int i = 0; i < this.numberOfTokens; i++) this.tokens[i] = \"\";\n\t\t\n\t\twhile (st.hasMoreTokens()) {\n\t\t\tcurrentToken = st.nextToken();\n\t\t\t//System.out.println(\"token\"+tokenNumber+\": \"+currentToken);\n\t\t\t\n\t\t\tthis.tokens[tokenNumber] = currentToken;\n\t\t\tif(tokenNumber>1)\n\t\t\t\tmiscParam += \" \"+currentToken;\n\t\t\tif(tokenNumber>0 && !currentToken.startsWith(\"$\")) \n\t\t\t\tallParam += \" \"+currentToken;\n\t\t\t\n\t\t\ttokenNumber++;\n\t\t}\n\t\t/*this is just for remove the first <space> from the second param of the command*/\n\t\t//if(this.hasAllParam()) this.tokens[2] = this.tokens[2].substring(1);\n\t}",
"private CommandWord(String commandString)\n {\n this.commandString = commandString;\n }",
"public Command parse(String fullCommand) throws InvalidInputException, UnknownException {\n checkDelimiters(fullCommand);\n String[] tokens = fullCommand.split(\"\\\\s+\");\n\n // If tokenized command returns an empty array (entered a string with only white spaces),\n // raise an exception\n if (tokens.length == 0) {\n throw new InvalidInputException(InvalidInputException.Type.EMPTY_STRING);\n }\n // If first token (command) is empty, there are empty spaces typed in at the front - so we remove it\n if (tokens[0].isEmpty()) {\n tokens = Arrays.copyOfRange(tokens, 1, tokens.length);\n // Check again to make sure it is not empty after removing first element\n if (tokens.length == 0) {\n throw new InvalidInputException(InvalidInputException.Type.EMPTY_STRING);\n }\n }\n\n HashMap<String, String> arguments = new HashMap<>();\n // Conver input command to lowercase to make it case insensitive\n String command = tokens[0].toLowerCase();\n arguments.put(\"command\", command);\n\n // Default key is \"payload\"\n String key = \"payload\";\n ArrayList<String> values = new ArrayList<>();\n for (int i = 1; i < tokens.length; ++i) {\n String token = tokens[i];\n // Check whether this token is a new key\n if (!token.isEmpty() && token.charAt(0) == '/') {\n // If it is, save current value into the map and start a new k-v pair\n arguments.put(key, String.join(DELIMITER, values));\n key = token.substring(1);\n values.clear();\n } else {\n // If not, append this token to the end of the value\n values.add(token);\n }\n }\n\n // Store the last k-v pair\n // Store even when `values` is empty, as that indicates an empty string\n arguments.put(key, String.join(DELIMITER, values));\n\n // Initialize a respective class from the command (by capitalize first character)\n String className = command + \"Command\";\n className = className.substring(0, 1).toUpperCase() + className.substring(1);\n className = Constants.COMMAND_CLASS_PREFIX + className;\n try {\n Class<?> cls = Class.forName(className);\n Constructor<?> constructor = cls.getDeclaredConstructor(Ui.class, Data.class, HashMap.class);\n Object obj = constructor.newInstance(ui, data, arguments);\n return (Command) obj;\n } catch (ClassNotFoundException classNotFoundException) {\n // *Command class cannot be found!\n throw new InvalidInputException(InvalidInputException.Type.UNKNOWN_COMMAND, classNotFoundException);\n } catch (Exception exception) {\n // Some other weird error occurred here (e.g. dev bugs)\n // We should NEVER reach this block, if we do, log under the highest level\n throw new UnknownException(exception);\n }\n }",
"public Command() {\n this.arguments = new String[0];\n }",
"private Command parseCommand(String input) {\r\n\r\n String[] splittedInput = input.toUpperCase().split(\" \");\r\n String command = splittedInput[0];\r\n\r\n switch (command) {\r\n case \"PLACE\":\r\n return new PlaceCommand(input);\r\n case \"MOVE\":\r\n return new MoveCommand();\r\n case \"LEFT\":\r\n return new RotateLeftCommand();\r\n case \"RIGHT\":\r\n return new RotateRightCommand();\r\n case \"REPORT\":\r\n return new ReportCommand();\r\n default:\r\n return new IgnoreCommand();\r\n }\r\n }",
"private static String parseCommandStr(String cmd, String[] args) {\n return cmd + \" \" + String.join(\" \", args);\n }",
"protected Command(String input, String[] data) {\n this.setInput(input);\n this.setData(data);\n }",
"public static Command parseCommand(String response) {\n String[] command = response.split(\" \", 10);\n switch (command[0]) {\n case \"list\":\n return new ListCommand(command);\n case \"done\":\n case \"undo\":\n return new DoneUndoCommand(command);\n case \"remove\":\n return new RemoveCommand(command);\n case \"add\":\n return new AddCommand(command, response);\n case \"bye\":\n return new ByeCommand();\n case \"help\":\n return new HelpCommand();\n case \"find\":\n return new FindCommand(command, response);\n case \"update\":\n return new UpdateCommand(command);\n default:\n System.out.println(\"Im sorry i did not catch that maybe these instructions below will help\"\n + System.lineSeparator() + Interface.lineBreak);\n return new HelpCommand();\n }\n }",
"private Command createCommand(String command) {\n\t\tString[] tokens = command.split(\" \");\n\t\tswitch(tokens[0].toLowerCase()) {\n\t\tcase DRAW:\n\t\t\treturn createDrawCommand(command);\n\t\t\n\t\tcase SKIP:\n\t\t\treturn createSkipCommmand(command);\n\t\t\t\n\t\tcase SCALE:\n\t\t\treturn createScaleCommand(command);\n\t\t\t\n\t\tcase ROTATE:\n\t\t\treturn createRotateCommand(command);\n\t\t\t\n\t\tcase PUSH:\n\t\t\treturn createPushCommand();\n\t\t\t\n\t\tcase POP:\n\t\t\treturn createPopCommand();\n\t\t\t\n\t\tcase COLOR:\n\t\t\treturn createColorCommand(command);\n\t\t\t\n\t\tdefault:\n\t\t\tthrow new IllegalArgumentException(\"Invalid command argument\");\n\t\t}\n\t}",
"public FrameworkCommand(String input, ObjectType init) \n {\n commandString = input.toUpperCase();\n initiator = init;\n\n // todo: verb as first word?\n \n /* This is a crummy timestamp.. We'll hope to do better in subclasses \n using scheduler instances. */\n lTimestamp = System.currentTimeMillis() * 1000;\n }",
"public void setInitCommand (String command){\r\n //process the command \r\n initCommand = command.trim();\r\n initialize(); \r\n }",
"public CommandMAN() {\n super();\n }",
"public CLI(String inputCommand)\r\n\t{\r\n\t\t//lvl = new Level();\r\n\t\tthis.inputCommand = inputCommand;\r\n\t\tin = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\r\n\t}",
"private static Command<?> getCommand(@NonNull String inputStr) {\n int seperatorIndex = inputStr.indexOf(' ');\n String commandStr = seperatorIndex == -1 ? inputStr : inputStr.substring(0, seperatorIndex);\n String paramStr = seperatorIndex == -1 ? \"\" : inputStr.substring(seperatorIndex + 1).trim();\n\n if (\"Tag\".equalsIgnoreCase(commandStr)) {\n List<String> tagList = Splitter.on(\",\")\n .trimResults()\n .omitEmptyStrings()//可以 选择是否对 空字符串 做处理\n .splitToList(paramStr.replace(',', ','));\n return new TagCommand(tagList.toArray(new String[]{}));\n } else if (\"Name\".equalsIgnoreCase(commandStr)) {\n if (isBlank(paramStr)) {\n throw new IllegalArgumentException(\"Need to specify file path\");\n }\n return new NameCommand(paramStr);\n } else if (\"Where\".equalsIgnoreCase(commandStr)) {\n if (isBlank(paramStr)) {\n throw new IllegalArgumentException(\"Need to specify search criteria\");\n }\n return new WhereCommand(paramStr);\n } else if (\"Analyze\".equalsIgnoreCase(commandStr)) {\n return new AnalyzeCommand();\n } else if (\"Export\".equalsIgnoreCase(commandStr)) {\n if (isBlank(paramStr)) {\n throw new IllegalArgumentException(\"Need to specify export file path\");\n }\n return new ExportCommand(paramStr);\n } else {\n throw new IllegalArgumentException(\"Use either Tag, Where, Name, Export, or Analyze\");\n }\n }",
"public interface CommandParser {\n String[] splitStringIntoCommands(String string);\n String[] splitCommandIntoParams(String string);\n String convertArrayToString(String... stringArray);\n}",
"private void parseCommand(String line) throws IllegalArgumentException {\n\t\tString[] tokens = line.split(\"\\\\s+\");\n\t\tString commandString;\n\t\tif(tokens.length == 4) {\n\t\t\tcommandString = tokens[2] + \" \" + tokens[3];\n\t\t}\n\t\telse if(tokens.length == 3) {\n\t\t\tcommandString = tokens[2];\n\t\t}\n\t\telse {\n\t\t\tthrow new IllegalArgumentException(\"Invalid command argument\");\n\t\t}\n\t\tthis.registerCommand(tokens[1].charAt(0), commandString);\n\t}",
"public Command parse(String inputCommand) {\n Matcher matcher = BASIC_COMMAND_FORMAT.matcher(inputCommand.trim());\n if (!matcher.matches()) {\n return new IncorrectCommand(\"This is a incorrect format, \"\n + \" you may type the list to see all the commands.\"\n + \" the command should not contain the separator '|'\");\n }\n\n String commandWord = matcher.group(\"commandWord\");\n String arguments = matcher.group(\"arguments\");\n\n switch (commandWord) {\n case AddCommand.COMMAND_WORD:\n return prepareAdd(arguments);\n case ListCommand.COMMAND_WORD:\n return prepareList(arguments);\n\n case DoneCommand.COMMAND_WORD:\n return prepareDone(arguments);\n case DueCommand.COMMAND_WORD:\n return prepareDue(arguments);\n case DeleteCommand.COMMAND_WORD:\n return prepareDelete(arguments);\n\n case SetCommand.COMMAND_WORD:\n return prepareSet(arguments);\n\n case ExitCommand.COMMAND_WORD:\n return new ExitCommand();\n\n case ProjModeCommand.COMMAND_WORD:\n return new ProjModeCommand();\n\n // case HelpCommand.COMMAND_WORD:\n // default:\n // return new HelpCommand();\n\n default:\n return new IncorrectCommand(\"IncorrectCommand\");\n }\n\n }",
"private Command() {\n initFields();\n }",
"static ParsedCommand parseCommand(String cmdline) {\n ParsedCommand res = new ParsedCommand();\n cmdline = cmdline.trim();\n String[] split = cmdline.split(\"\\\\/([-]?[a-zA-Z]*)\");\n List<String> args = new ArrayList<>();\n for (int i = 0; i < split.length; i++) {\n String[] tmp = split[i].split(\" \");\n for (int j = 0; j < tmp.length; j++) {\n if (tmp[j].length() > 0) {\n args.add(tmp[j]);\n }\n }\n }\n if (args.size() == 0) return null;\n res.argv.addAll(args);\n Pattern p = Pattern.compile(\"\\\\/([-]?[a-zA-Z]*)\");\n Matcher m = p.matcher(cmdline);\n while (m.find()) {\n String cur = m.group(1);\n if (cur.startsWith(\"-\")) {\n for (int i = 1; i < cur.length(); i++) {\n res.switches.remove(String.valueOf(cur.charAt(i)).toUpperCase());\n }\n } else {\n for (int i = 0; i < cur.length(); i++) {\n res.switches.add(String.valueOf(cur.charAt(i)).toUpperCase());\n }\n }\n }\n\n return res;\n }",
"public CommandParser(){\n setLanguage(\"ENGLISH\");\n commandTranslations = getPatterns(new String[] {TRANSLATION});\n commands = new ArrayList<>();\n addErrors();\n }",
"CommandWord(final String pCommandString)\n {\n this.aCommandString = pCommandString;\n }",
"public Command getCommand() {\n String userInput = in.nextLine();\n String[] words = userInput.split(\" \", 2);\n try {\n return new Command(words[0].toLowerCase(), words[1]);\n } catch (ArrayIndexOutOfBoundsException e) {\n return new Command(words[0].toLowerCase(), Command.BLANK_DESCRIPTION);\n }\n }",
"Command(String command, int parameterCount) {\n this.command = command;\n this.parameterCount = parameterCount;\n }",
"private ConsoleCommand mapConsoleCommand( String[] parsedString ){\r\n\t\t\r\n\t\tFileSystemService fileSysSrv = new FileSystemService();\r\n\t\tStringBuilder errorSB = new StringBuilder();\r\n\t\tConsoleCommand consoleCommand = new ConsoleCommand();\r\n\t\t\r\n\t\tconsoleCommand.setCommand( parsedString[ AppConstanst.COMMAND_IDX ] );\r\n\t\t\t\t\r\n\t\tif ( parsedString.length < AppConstanst.MIN_SCAN_PARAM ){\r\n\t\t\terrorSB.append( AppConstanst.NOT_ALL_REQ_COMMAND_SET ) ;\r\n\t\t} else {\r\n\t\t\t// VALIDATE INPUTDIR COMMAND\r\n\t\t\tconsoleCommand.setInputDir( parsedString[ AppConstanst.INPUT_DIR_IDX ] );\r\n\t\t\tif ( !AppConstanst.SCAN_INPUT_DIR.equals( consoleCommand.getInputDir() ) ){\r\n\t\t\t\terrorSB.append( AppConstanst.WRONG_REQ_COMMAND+\" \"+consoleCommand.getInputDir()+AppConstanst.MUST_BE+AppConstanst.SCAN_INPUT_DIR+\"\\n\" );\r\n\t\t\t}\r\n\t\t\tconsoleCommand.setInputDirValue( parsedString[ AppConstanst.INPUT_DIR_VALUE_IDX ] );\r\n\t\t\tif ( ! consoleCommand.getInputDirValue().matches( AppConstanst.ABS_PATH) ){\r\n\t\t\t\terrorSB.append( AppConstanst.ILLEGAL_INPUT_PATH + consoleCommand.getInputDirValue()+\"\\n\");\r\n\t\t\t}\r\n\t\t\t//CHECK IS INPUT DIR EXIST, IF NOT TRY CREATE IT\r\n\t\t if ( !fileSysSrv.isDirectoryExist( consoleCommand.getInputDirValue() ) ){\r\n\t\t \tif ( !fileSysSrv.makeDirectory( consoleCommand.getInputDirValue() ) ){\r\n\t\t \t\terrorSB.append( AppConstanst.INPUT_DIR_NOT_EXISTS + consoleCommand.getInputDirValue()+\"\\n\");\r\n\t\t \t};\r\n\t\t }\r\n\t\t\t// VALIDATE OUTPUTDIR COMMAND\r\n\t\t\tconsoleCommand.setOutPutDir( parsedString[ AppConstanst.OUTPUT_DIR_IDX ] );\r\n\t\t\tif ( !AppConstanst.SCAN_OUTPUT_DIR.equals( consoleCommand.getOutPutDir() ) ){\r\n\t\t\t\terrorSB.append( AppConstanst.WRONG_REQ_COMMAND+\" \"+consoleCommand.getOutPutDir()+AppConstanst.MUST_BE+AppConstanst.SCAN_OUTPUT_DIR+\"\\n\" );\r\n\t\t\t}\r\n\t\t\tconsoleCommand.setOutPutDirValue( parsedString[ AppConstanst.OUTPUT_DIR_VALUE_IDX ] );\r\n\t\t\tif ( ! consoleCommand.getOutPutDirValue().matches( AppConstanst.ABS_PATH) ){\r\n\t\t\t\terrorSB.append( AppConstanst.ILLEGAL_OUTPUT_PATH + consoleCommand.getOutPutDirValue()+\"\\n\" );\r\n\t\t\t}\r\n\t\t\t//CHECK IS OUTPUT DIR EXIST, IF NOT TRY CREATE IT\r\n\t\t if ( !fileSysSrv.isDirectoryExist( consoleCommand.getOutPutDirValue() ) ){\r\n\t\t \tif ( !fileSysSrv.makeDirectory( consoleCommand.getOutPutDirValue() ) ){\r\n\t\t \t\terrorSB.append( AppConstanst.OUTPUT_DIR_NOT_EXISTS + consoleCommand.getOutPutDirValue()+\"\\n\");\r\n\t\t \t};\r\n\t\t }\r\n\t\t\t// VALIDATE MASK COMMAND\r\n\t\t\tconsoleCommand.setMask( parsedString[ AppConstanst.MASK_IDX ] );\r\n\t\t\tif ( !AppConstanst.SCAN_MASK.equals( consoleCommand.getMask() ) ){\r\n\t\t\t\terrorSB.append( AppConstanst.WRONG_REQ_COMMAND+\" \"+consoleCommand.getMask()+AppConstanst.MUST_BE+AppConstanst.SCAN_MASK+\"\\n\" );\r\n\t\t\t}\r\n\t\t\tconsoleCommand.setMaskValue( parsedString[ AppConstanst.MASK_VALUE_IDX ]);\r\n\t\t\tif ( ! AppUtils.isMaskCorrect( consoleCommand.getMaskValue() ) ){\r\n\t\t\t\terrorSB.append( AppConstanst.ILLEGAL_MASK + consoleCommand.getMaskValue()+\"\\n\" );\r\n\t\t\t}\r\n\t\t\t// VALIDATE WAIT INTERVAL COMMAND\r\n\t\t\tconsoleCommand.setWaitInterval( parsedString[ AppConstanst.WAIT_INTERVAL_IDX ] );\r\n\t\t\tif ( !AppConstanst.SCAN_WAIT_INTERVAL.equals( consoleCommand.getWaitInterval() ) ){\r\n\t\t\t\terrorSB.append( AppConstanst.WRONG_REQ_COMMAND+\" \"+consoleCommand.getWaitInterval()+AppConstanst.MUST_BE+AppConstanst.SCAN_WAIT_INTERVAL+\"\\n\" );\r\n\t\t\t}\r\n\t\t\tLong interval= null;\r\n\t\t\ttry{\r\n\t\t\t\tinterval = Long.parseLong( parsedString[ AppConstanst.WAIT_INTERVAL_VALUE_IDX ] );\r\n\t\t\t} catch (NumberFormatException e) {} \r\n\t\t\tconsoleCommand.setWaitIntervalValue( interval );\r\n\t\t\tif ( interval == null || interval < 0){\r\n\t\t\t\terrorSB.append( AppConstanst.INCORECT_WAIT_INTERVAL + parsedString[ AppConstanst.WAIT_INTERVAL_VALUE_IDX ]+AppConstanst.POSITIVE_INT+\"\\n\" );\r\n\t\t\t}\r\n\t\t\t// VALIDATE NOT REQUIRED COMMAND\r\n\t\t\t\r\n\t\t\t\tfor (int idx = AppConstanst.MIN_SCAN_PARAM+1; idx < parsedString.length; idx += 2){\r\n\t\t\t\t\tif ( AppConstanst.SCAN_INCLUDE_SUB.equals( parsedString[ idx ] ) ){\r\n\t\t\t\t\t\tconsoleCommand.setIncludeSubs( parsedString[ idx ] );\r\n\t\t\t\t\t\tconsoleCommand.setIncludeSubsValue( parsedString[ idx+1 ] );\r\n\t\t\t\t\t\tif ( !AppConstanst.TRUE.equals( parsedString[ idx+1 ]) && !AppConstanst.FALSE.equals( parsedString[ idx+1 ] ) ){\r\n\t\t\t\t\t\t\terrorSB.append( AppConstanst.INCORECT_INCLUDE_SUBFOLDERS+\" \"+parsedString[ idx+1 ]+AppConstanst.TRUE_OR_FALSE+\"\\n\" );\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\tif ( AppConstanst.SCAN_AUTO_DELETE.equals( parsedString[ idx ] ) ){\r\n\t\t\t\t\t\tconsoleCommand.setAutoDelete( parsedString[ idx ] );\r\n\t\t\t\t\t\tconsoleCommand.setAutoDeleteValue( parsedString[ idx+1 ] );\r\n\t\t\t\t\t\tif ( !AppConstanst.TRUE.equals( parsedString[ idx+1 ]) && !AppConstanst.FALSE.equals( parsedString[ idx+1 ] ) ){\r\n\t\t\t\t\t\t\terrorSB.append( AppConstanst.INCORECT_AUTODELETE+\" \"+parsedString[ idx+1 ]+AppConstanst.TRUE_OR_FALSE+\"\\n\" );\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}\r\n\t\tif ( errorSB.length() > 0 ){\r\n\t\t\tSystem.out.println(AppConstanst.ERROR_IN_SCAN_COMMAND+ errorSB.toString());\r\n\t\t\tconsoleCommand.setCommand( AppConstanst.UNKNOWN);\r\n\t\t} \r\n\t\treturn consoleCommand;\r\n\t}",
"public static Command parse(String fullCommand) throws DukeException {\n String[] arr = fullCommand.split(\"\\\\s+\", 2);\n String command = arr[0];\n if (command.equals(\"todo\")) {\n if (arr.length == 1) {\n throw new DukeException(\"OOPS!!! The description of a todo cannot be empty.\");\n } else {\n Task task = new Todo(arr[1]);\n return new AddCommand(task);\n }\n } else if (command.equals(\"deadline\")) {\n if (arr.length == 1) {\n throw new DukeException(\"OOPS!!! The description of a deadline cannot be empty.\");\n } else {\n String[] deadlineArr = arr[1].split(\" /by \", 2);\n if (deadlineArr.length == 1) {\n throw new DukeException(\"OOPS!!! You forgot to specify a date/time for the deadline.\");\n } else {\n Task task = new Deadline(deadlineArr[0], deadlineArr[1]);\n return new AddCommand(task);\n }\n }\n } else if (command.equals(\"event\")) {\n if (arr.length == 1) {\n throw new DukeException(\"OOPS!!! The description of an event cannot be empty.\");\n } else {\n String[] eventArr = arr[1].split(\" /at \", 2);\n if (eventArr.length == 1) {\n throw new DukeException(\"OOPS!!! You forgot to specify a date/time for the event.\");\n } else {\n Task task = new Event(eventArr[0], eventArr[1]);\n return new AddCommand(task);\n }\n }\n } else if (command.equals(\"done\")) {\n String[] array = arr[1].split(\"\\\\s+\");\n int[] options = new int[array.length];\n for (int i = 0; i < options.length; i++) {\n options[i] = Integer.parseInt(array[i]);\n }\n return new DoneCommand(options);\n } else if (command.equals(\"delete\")) {\n String[] array = arr[1].split(\"\\\\s+\");\n int[] options = new int[array.length];\n for (int i = 0; i < options.length; i++) {\n options[i] = Integer.parseInt(array[i]);\n }\n return new DeleteCommand(options);\n } else if (command.equals(\"list\")) {\n return new ListCommand();\n } else if (command.equals(\"find\")) {\n return new FindCommand(arr[1]);\n } else if (command.equals(\"bye\")) {\n return new ExitCommand();\n } else {\n throw new DukeException(\"OOPS!!! I'm sorry, but I don't know what that means :-(\");\n }\n }",
"private Command createDrawCommand(String command) {\n\t\tString[] tokens = command.split(\" \");\n\t\treturn new DrawCommand(Double.parseDouble(tokens[1]));\n\t}",
"@Override\n public Command parseCommand(String commandText, ViewController viewController, Cli cli) throws InvalidCommandException {\n\n String prefix = \"\";\n String suffix = \"\";\n\n for (int i = 0;i<commandText.length();i++){\n if (commandText.charAt(i) != ' '){\n prefix = prefix + commandText.charAt(i);\n } else {\n for (i++;i<commandText.length();i++)\n suffix = suffix + commandText.charAt(i);\n }\n }\n\n\n if (prefix.equals(\"\"))\n throw new InvalidCommandException();\n\n switch(prefix){\n case \"exit\" : {\n return new ExitCommand();\n }\n case \"help\" : {\n return new HelpCommand();\n }\n case \"showGameboard\" : {\n return new ShowGameBoardCommand(cli);\n }\n case \"showMarket\" : {\n return new ShowMarketCommand(cli);\n }\n case \"showPlayer\" : {\n\n int n = 0;\n int temp;\n boolean found = false;\n\n for (int i = 0; i < suffix.length() && !found; i++) {\n if ( suffix.charAt(i) != ' '){\n temp = suffix.charAt(i) -'0';\n if (temp < 0 || temp > 9)\n throw new InvalidCommandException();\n n = temp;\n found = true;\n }\n\n }\n if (n < 1 || n > 4)\n throw new InvalidCommandException();\n return new ShowPlayerCommand(n, viewController);\n\n }\n case \"showProductionDecks\" : {\n return new ShowProductionDeckCommand(cli);\n }\n case \"showReserve\" : {\n return new ShowReserveCommand(cli);\n }\n default: {\n throw new InvalidCommandException();\n }\n }\n\n }",
"public Command()\r\n {\r\n this.aSecondWord = null;\r\n }",
"private static void parse(String[] command, Player player) {\n\t\t\n\t\t\n\t}",
"public static Command parse(String fullCommand) throws DukeException {\n\n String firstWord = null;\n if(fullCommand.contains(\" \")) {\n firstWord = fullCommand.substring(0, fullCommand.indexOf(\" \"));\n }\n\n if (fullCommand.equals(\"bye\")) {\n return new ExitCommand();\n } else if (fullCommand.equals(\"list\")) {\n return new ListCommand();\n } else if (firstWord.equals(\"todo\")) {\n return new AddCommand(Command.Type.TODO,fullCommand);\n } else if (firstWord.equals(\"deadline\")) {\n return new AddCommand(Command.Type.DEADLINE,fullCommand);\n } else if (firstWord.equals(\"event\")) {\n return new AddCommand(Command.Type.EVENT,fullCommand);\n } else if (firstWord.equals(\"done\")) {\n return new DoneCommand(fullCommand);\n } else if (firstWord.equals(\"find\")) {\n return new FindCommand(fullCommand);\n } else if (firstWord.equals(\"delete\")) {\n return new DeleteCommand(fullCommand);\n } else {\n throw new DukeException(\" ☹ OOPS!! I'm sorry, but I don't know what that means :-(\");\n }\n }",
"@Override\n\tpublic Command createCommand(String commandStr) {\n\t\tif(commandStr != null && !commandStr.equalsIgnoreCase(\"\")) {\n\t\t\tString[] args = commandStr.split(\"\\\\|\");\n\t\t\tif(args[0].trim().equalsIgnoreCase(\"time\")) {\n\t\t\t\tList<String> grepList = new ArrayList<String>();\n\t\t\t\tList<ShowColumn> scList = new ArrayList<ShowColumn>();\n\t\t\t\t\n\t\t\t\tCommand entity = new Command();\n\t\t\t\tscList.add(ShowColumn.All);\n\t\t\t\tentity.setCommandType(CommandType.Time);\n\t\t\t\t\n\t\t\t\tfor(int i=1; i<args.length; i++) {\n\t\t\t\t\tif(args[i].trim().startsWith(\"grep\")) {\n\t\t\t\t\t\tgrepList.add(args[i].trim().replaceFirst(\"grep \", \"\").trim());\n\t\t\t\t\t} else if(args[i].trim().startsWith(\"group\")) {\n\t\t\t\t\t\tentity.setGroup(Integer.parseInt(args[i].trim().replaceFirst(\"group \", \"\").trim()));\n\t\t\t\t\t} else if(args[i].trim().startsWith(\"column\")) {\n\t\t\t\t\t\tscList.clear();\n\t\t\t\t\t\tString cs = args[i].trim().replaceFirst(\"column -\", \"\");\n\t\t\t\t\t\tif(cs.indexOf(\"a\") >= 0) {\n\t\t\t\t\t\t\tif(!scList.contains(ShowColumn.All)) {\n\t\t\t\t\t\t\t\tscList.add(ShowColumn.All);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tString[] csAry = cs.split(\"\");\n\t\t\t\t\t\t\tfor(String item : csAry) {\n\t\t\t\t\t\t\t\tif(item.equalsIgnoreCase(\"t\")) {\n\t\t\t\t\t\t\t\t\tif(!scList.contains(ShowColumn.Time)) {\n\t\t\t\t\t\t\t\t\t\tscList.add(ShowColumn.Time);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else if(item.equalsIgnoreCase(\"k\")) {\n\t\t\t\t\t\t\t\t\tif(!scList.contains(ShowColumn.Key)) {\n\t\t\t\t\t\t\t\t\t\tscList.add(ShowColumn.Key);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else if(item.equalsIgnoreCase(\"d\")) {\n\t\t\t\t\t\t\t\t\tif(!scList.contains(ShowColumn.Description)) {\n\t\t\t\t\t\t\t\t\t\tscList.add(ShowColumn.Description);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tentity.setGrep(grepList);\n\t\t\t\tentity.setColumnList(scList);\n\t\t\t\treturn entity;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"private Command parseCommand(String s) {\n\t\tif (constantMatch.matcher(s).matches()) {\n\t\t\treturn new Constant(Double.parseDouble(s));\n\t\t}\n\t\tif (variableMatch.matcher(s).matches()) {\n\t\t\treturn myDictionary.getVariable(s);\n\t\t}\n\t\tif (s.equals(START_LIST)) {\n\t\t\treturn createListCommand();\n\t\t}\n\t\tif(s.equals(START_GROUP)) {\n\t\t\tCommand c = getCommandOrFunction(codeReader.next());\n\t\t\tif(c.howManyArguments() <= 0) {\n\t\t\t\tthrow new SLogoException(\"Attempting to group command that takes no arguments\");\n\t\t\t}\n\t\t\tcreateGroupCommand(c); \n\t\t\treturn c;\n\t\t}\n\t\treturn findTrueCommand(s);\n\t}",
"@Override\n public Command parseCommand(String commandText, ViewController viewController, Cli cli) throws InvalidCommandException {\n\n System.out.println(this+\": \"+commandText);\n String word = \"\";\n Resource resource;\n String prefix = \"\";\n String suffix = \"\";\n boolean found = false;\n ArrayList<Resource> resources = new ArrayList<>();\n\n if (commandText.length() == 0)\n throw new InvalidCommandException();\n\n commandText = Command.deleteInitSpaces(commandText);\n\n for (int i = 0;i<commandText.length();i++){\n if (commandText.charAt(i) != ' '){\n prefix = prefix + commandText.charAt(i);\n } else {\n for (i++;i<commandText.length();i++)\n suffix = suffix + commandText.charAt(i);\n }\n }\n\n if (prefix.equals(\"coin\") || prefix.equals(\"rock\") || prefix.equals(\"shield\") || prefix.equals(\"servant\")){\n\n resource = Command.fromStringToResource(prefix);\n resources.add(resource);\n\n for (int i = 0;i<suffix.length();i++){\n if (suffix.charAt(i) != ' '){\n word = word + suffix.charAt(i);\n } else {\n resource = Command.fromStringToResource(word);\n if(resource != null )\n for(Resource r : possibleResources)\n if (r == resource)\n resources.add(resource);\n word = \"\";\n }\n }\n resource = Command.fromStringToResource(word);\n if(resource != null )\n for(Resource r : possibleResources)\n if (r == resource)\n resources.add(resource);\n\n if (resources.size() != numberOfWhiteMarbles){\n throw new InvalidCommandException();\n }\n return new WhiteMarbleCommand(resources,cli);\n } else {\n switch (prefix) {\n case \"exit\": {\n return new ExitCommand();\n }\n case \"help\": {\n return new HelpCommand();\n }\n case \"showGameboard\": {\n return new ShowGameBoardCommand(cli);\n }\n case \"showMarket\": {\n return new ShowMarketCommand(cli);\n }\n case \"showPlayer\": {\n\n int n = 0;\n int temp;\n found = false;\n\n for (int i = 0; i < suffix.length() && !found; i++) {\n if (suffix.charAt(i) != ' ') {\n temp = suffix.charAt(i) - '0';\n if (temp < 0 || temp > 9)\n throw new InvalidCommandException();\n n = temp;\n found = true;\n }\n\n }\n if (n < 1 || n > 4)\n throw new InvalidCommandException();\n return new ShowPlayerCommand(n, viewController);\n\n }\n case \"showProductionDecks\": {\n return new ShowProductionDeckCommand(cli);\n }\n case \"showReserve\": {\n return new ShowReserveCommand(cli);\n }\n default: {\n throw new InvalidCommandException();\n }\n }\n }\n }",
"@Override\n\tpublic Command parse(String[] s) {\n\t\tif (s.length==1 && s[0].equalsIgnoreCase(\"HELP\"))\n\t\t\treturn new Help(); \n\t\telse return null;\n\t}",
"public static Commands parse(String fullCommand) throws InvalidCommandException {\n String[] inputs = fullCommand.split(\"\\\\s+\", 2);\n String commandType = inputs[0].trim().toUpperCase();\n checkCommands(commandType);\n return Commands.valueOf(commandType);\n }",
"void parseCommand(String command){\n\t\tif(command!=null && command.length()>0){\n\t\t\tif(!subMenuFlag){\n\t\t\t\tmainMenuCommand(command);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tsubMenuCommand(command);\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"Please enter a valid command.\");\n\t\t}\n\t}",
"public Command parse(String[] s) {\n\t\t\n\t\tif(s.length == 1 && s[0].equalsIgnoreCase(\"RUN\"))\n\t\t\treturn new Run();\n\t\telse return null;\n\t}",
"public Command(String prefix){\r\n this.prefix = prefix;\r\n }",
"public Shell() {\n commandNumber = 0;\n prevPID = -1;\n command = \"\";\n }",
"private Command parse() throws ParseException {\n next();\n expect(Token.COMMAND);\n cmd = new Command(text);\n next();\n while (!((token == Token.WHERE) || (token == Token.RETURN) || (token == Token.EOL))) {\n param();\n }\n if (token == Token.WHERE) {\n where();\n }\n if (token == Token.RETURN) {\n returns();\n }\n expect(Token.EOL);\n return cmd;\n }",
"public static Command parse(String input) throws DukeException {\r\n String[] inputArr = input.split(\" \", 2);\r\n String command = inputArr[0];\r\n\r\n switch (command) {\r\n case \"bye\":\r\n return new ExitCommand();\r\n case \"list\":\r\n return new ListCommand();\r\n case \"done\":\r\n try {\r\n return new DoneCommand(inputArr[1]);\r\n } catch (ArrayIndexOutOfBoundsException e) {\r\n throw new DukeException(\"Please specify the task number you wish to\\n mark as done!\");\r\n }\r\n case \"delete\":\r\n try {\r\n return new DeleteCommand(inputArr[1]);\r\n } catch (ArrayIndexOutOfBoundsException e) {\r\n throw new DukeException(\"Please specify the task number you wish to\\n delete!\");\r\n }\r\n case \"todo\":\r\n try {\r\n return new AddCommand(new Todo(inputArr[1]));\r\n } catch (ArrayIndexOutOfBoundsException e) {\r\n throw new DukeException(\"The description of a todo cannot be empty.\");\r\n }\r\n case \"deadline\":\r\n try {\r\n String[] detailsArr = inputArr[1].split(\" /by \");\r\n return new AddCommand(new Deadline(detailsArr[0], detailsArr[1]));\r\n } catch (ArrayIndexOutOfBoundsException e) {\r\n throw new DukeException(\r\n \"Please follow the format:\\n deadline <description> /by <DD/MM/YYYY HHMM>\");\r\n }\r\n case \"event\":\r\n try {\r\n String[] detailsArr = inputArr[1].split(\" /at \");\r\n return new AddCommand(new Event(detailsArr[0], detailsArr[1]));\r\n } catch (ArrayIndexOutOfBoundsException e) {\r\n throw new DukeException(\r\n \"Please follow the format:\\n event <description> /at <DD/MM/YYYY HHMM>\");\r\n }\r\n case \"find\":\r\n try {\r\n return new FindCommand(inputArr[1]);\r\n } catch (ArrayIndexOutOfBoundsException e) {\r\n throw new DukeException(\"Please specify what you are searching for!\");\r\n }\r\n default:\r\n throw new DukeException(\"I'm sorry, but I don't know what that means!\");\r\n }\r\n }",
"public ArrayList<Command> parseCommand(String command) throws InvalidCommandException {\n\n\n\t\tArrayList<Command> cmds = new ArrayList<Command>();\n\t\tString cmd;\n\t\tString[] text;\n\n\t\tArrayList<Parameter> parameters = new ArrayList<Parameter>();\n\n\t\tint indexOfFirstSpace = 0;\n\t\tint indexOfFirstInvertedSlash = 0;\n\t\tboolean passFirstSpace = false;\n\n\t\t// check and find the first space and slash.\n\t\tfor (int i = 0; i < command.length(); i++) {\n\t\t\tif (command.charAt(i) == ' ' && !passFirstSpace) {\n\t\t\t\tindexOfFirstSpace = i;\n\t\t\t\tpassFirstSpace = true;\n\t\t\t} else if (command.charAt(i) == INVERTED_SLASH) {\n\t\t\t\tindexOfFirstInvertedSlash = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tindexOfFirstSpace = getEquivalentIndexForCommandWithoutParameter(command, indexOfFirstSpace);\n\n\t\tif (indexOfFirstSpace == 0) {\n\t\t\treturn null;\n\t\t}\n\n\t\tcmd = command.substring(0, indexOfFirstSpace);\n\t\tint cmdType = mapCommandType(cmd);\n\n\t\tif (cmdType == ERROR_COMMAND_TYPE) {\n\t\t\tthrow new InvalidCommandException(command);\n\t\t}\n\n\t\tif (!command.contains(VERTICAL_DASH)) {\n\t\t\tperformSmartParsing(command, parameters);\n\t\t}\n\n\t\ttext = extractTextAndPerformParameterParsing(command, parameters, indexOfFirstSpace, indexOfFirstInvertedSlash);\n\t\tif (text != null) {\n\t\t\tfor (String textEntry : text) {\n\t\t\t\tcmds.add(new Command(cmdType, trimOffDateIfAny(textEntry), parameters));\n\n\t\t\t}\n\t\t} else {\n\t\t\tcmds.add(new Command(cmdType, \"\", parameters));\n\t\t}\n\n\t\treturn cmds;\n\t}",
"PSConsoleCommand(String cmdArgs)\n {\n super();\n m_cmdArgs = cmdArgs;\n }",
"public CommandMAN(String[] arguments) {\n super(arguments);\n }",
"private CommandLine() {\n\t}",
"private Query(String command) {\n\t\tthis.command = command;\n\t}",
"private Command createRotateCommand(String command) {\n\t\tString[] tokens = command.split(\" \");\n\t\treturn new RotateCommand(Double.parseDouble(tokens[1]));\n\t}",
"public String[] readCommand();",
"public synchronized void constructCmdAndNotify(final String cmdPart) {\n\n log.info(\"Getting command part: {}\", cmdPart);\n\n if (StringUtils.isEmpty(cmdPart)) {\n return;\n }\n\n final String startSymbol = serialProperties.getCmdBeginMarker().toString();\n\n // before appending\n String buffer = constructedCommand();\n\n if (cmdPart.startsWith(startSymbol)) {\n if (StringUtils.isEmpty(buffer)) {\n append(cmdPart);\n } else {\n constructedCommand.set(cmdPart);\n }\n } else if (buffer.startsWith(startSymbol)) {\n append(cmdPart);\n }\n\n\n while(canSend()) {\n buffer = constructedCommand();\n\n log.info(\"buffer: {}\", buffer);\n\n int beginIndex = constructedCommand()\n .indexOf(startSymbol);\n int endIndex = constructedCommand()\n .indexOf(serialProperties.getCmdEndMarker());\n\n String toSend = buffer.substring(beginIndex, endIndex + 1);\n\n constructedCommand.set(buffer.substring(endIndex + 1));\n\n if (!StringUtils.isEmpty(buffer)) {\n ArduinoDataUpdate dataUpdate = ArduinoDataUpdate.fromSerialCmd(\n toSend,\n startSymbol,\n serialProperties.getCmdEndMarker().toString(),\n serialProperties.getCmdSeparator().toString());\n\n if (dataUpdate != null) {\n processor.onNext(dataUpdate);\n }\n }\n }\n\n }",
"private void commandProgramBasic(String command)\n {\n String[] array = command.split(\" \");\n\n if(array[0].equals(\"init\"))\n {\n System.out.println(\"The program will now read the file.\");\n input.readFile();\n } else if(array[0].equals(\"run\"))\n {\n int runTime = Integer.parseInt(array[1]);\n System.out.println(\"Please wait while the data is stored.\");\n System.out.println(\"The filled data containers will be printed shortly.\");\n input.runProgram(runTime);\n } else if(array[0].equals(\"clear\"))\n {\n System.out.println(\"The data containers will now be cleared.\");\n input.clear();\n } else if(array[0].equals(\"exit\"))\n {\n scanner.close();\n } \n\n askUser();\n }",
"public Command() {\n }",
"public static Command parseCommand(String command) throws DukeException {\n try {\n String[] args = getArgs(command.trim());\n String commandWord = args[0];\n boolean isOneWord = isOneWord(command.trim());\n\n if (isOneWord) {\n switch (commandWord.toLowerCase()) {\n case \"list\":\n return new ListCommand();\n case \"bye\":\n return new ExitCommand();\n case \"listtag\":\n return new ListTagCommand();\n default:\n throw new DukeException(MESSAGE_INVALID_INPUT);\n }\n\n } else {\n switch (commandWord.toLowerCase()) {\n case \"todo\":\n return new AddTodo(args[1]);\n case \"deadline\":\n return new AddDeadline(args[1]);\n case \"event\":\n return new AddEvent(args[1]);\n case \"done\":\n return new DoneCommand(args[1]);\n case \"delete\":\n return new DeleteCommand(args[1]);\n case \"find\":\n return new FindCommand(args[1]);\n case \"findtag\":\n return new FindTagCommand(args[1]);\n case \"addtag\":\n return new AddTagCommand(args[1]);\n case \"deltag\":\n return new DeleteTagCommand(args[1]);\n default:\n throw new DukeException(MESSAGE_INVALID_INPUT);\n }\n }\n\n } catch (ArrayIndexOutOfBoundsException e) {\n throw new DukeException(MESSAGE_INVALID_INPUT);\n }\n }",
"@Test\n\tpublic void parseCommandTest() {\n\t\tassertFalse(myManager.parseCommand(\"quit\"));\n\t\tassertFalse(myManager.parseCommand(\"Quit\"));\n\t\tassertFalse(myManager.parseCommand(\"q uit\"));\n\t\t\n\t\tassertTrue(myManager.parseCommand(\"new job\"));\n\t\tassertTrue(myManager.parseCommand(\"NEW job\"));\n\t\tassertTrue(myManager.parseCommand(\"new\"));\n\t\tassertFalse(myManager.parseCommand(\"new jobzo\"));\n\t}",
"public FrameworkCommand(String input, String _verb, ObjectType init) \n {\n this(input, init);\n setVerb(_verb);\n }",
"public xCommandOnText(String command){ this.init(command); }",
"public static Command parse(String str) throws DukeException {\n\n String[] arr = str.split(\" \", 2);\n if (arr.length < 1) {\n throw new DukeException(\"No command was given.\");\n }\n String firstWord = arr[0];\n if (str.equalsIgnoreCase(\"bye\")) {\n return new ExitCommand();\n } else if (str.equalsIgnoreCase(\"list\")) {\n return new ListCommand();\n } else {\n Action action = parseFirstWord(firstWord.toLowerCase());\n\n if (arr.length < 2 && (action == Action.Done || action == Action.Delete)) {\n throw new DukeException(\"duke.task.Task number for \" + firstWord + \" is not given.\");\n } else if (arr.length < 2 || arr[1].isBlank()) {\n throw new DukeException(\"The description of \" + firstWord + \" cannot be empty\");\n } else {\n return actionToCommand(action, arr[1]);\n }\n }\n }",
"@Test\n public void testConstructor() {\n interpreterInstance.interpret(\"cd \");\n Command testCommand = interpreterInstance.getCommand();\n List<String> testArguments = interpreterInstance.getArguments();\n assertEquals(\"driver.ChangeDirectory\", testCommand.getClass().getName());\n assertTrue(testArguments.isEmpty());\n }",
"public static Command parse(String command) throws DukeException {\n // remove trailing/leading whitespace and split by whitespace(s)\n command = command.strip();\n String[] commands = command.split(\"[ ]+\");\n String[] args = Arrays.copyOfRange(commands, 1, commands.length);\n\n assert args.length == commands.length - 1 : \"Incorrect array copy\";\n\n switch (commands[0]) {\n case \"todo\":\n return parseTodoCommand(args);\n case \"event\":\n return parseEventCommand(args);\n case \"deadline\":\n return parseDeadlineCommand(args);\n case \"find\":\n return parseFindCommand(args);\n case \"done\":\n return parseDoneCommand(args);\n case \"delete\":\n return parseDeleteCommand(args);\n case \"list\":\n return parseListCommand(args);\n case \"remindme\":\n return parseRemindCommand(args);\n case \"bye\":\n return parseBye(args);\n default:\n throw new DukeMissingDescriptionException(\"Hmm... I'm sorry, but I don't know what that means...\");\n }\n }",
"protected Command parseCommandString(String commandString) {\n DslParser parser = new DslParser(new DslLexer(new StringReader(commandString)));\n\n Object parseResult = null;\n\n try {\n parseResult = parser.parse().value;\n } catch (Exception e) {\n //environment.error(String.format(\"Invalid command: \\\"%s\\\"\", command_string));\n }\n\n if (parseResult instanceof Command) {\n return (Command)parseResult;\n } else {\n //environment.error(String.format(\"Expected command object but got \\\"%s\\\"\",\n // parseResult));\n return new NullCommand();\n }\n }",
"public NativeExecutable(String command) {\n this.command = command;\n }",
"private GetLCCommand() {\n initFields();\n }",
"public CLI()\r\n\t{\r\n\t\t//lvl = new Level();\r\n\t\tthis.inputCommand = \"\";\r\n\t\t//this.exitStr = exitStr;\r\n\t\tin = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\r\n\t}",
"CommandTypes(String command) {\n this.command = command;\n }",
"public CPRCommand()\r\n {\r\n }",
"public Command parse(String command) throws DukeException {\n String[] commandSplit = command.split(\"\\\\s+\", 2);\n String commandWord = commandSplit[0].toLowerCase();\n String desc = \"\";\n if (commandSplit.length == 2) {\n desc = commandSplit[1];\n }\n\n switch (commandWord) {\n case DoneCommand.COMMAND_WORD:\n return doneParse(desc);\n\n case ListCommand.COMMAND_WORD:\n return new ListCommand();\n\n case ToDoCommand.COMMAND_WORD:\n return toDoParse(desc);\n\n case DeadlineCommand.COMMAND_WORD:\n return deadlineParse(desc);\n\n case EventCommand.COMMAND_WORD:\n return eventParse(desc);\n\n case DeleteCommand.COMMAND_WORD:\n return deleteParse(desc);\n\n case FindCommand.COMMAND_WORD:\n return new FindCommand(desc);\n case UpdateCommand.COMMAND_WORD:\n return new UpdateParser(desc).parse();\n case ByeCommand.COMMAND_WORD:\n return new ByeCommand();\n default:\n throw new DukeException(INVALID_COMMAND_MESSAGE);\n }\n }",
"@Override\n public Command build() {\n switch (CommandType.fromString(commandName.getEscapedAndStrippedValue())) {\n case ASSIGN:\n return new AssignmentCommand(commandArgs);\n case CAT:\n return new CatCommand(commandArgs);\n case ECHO:\n return new EchoCommand(commandArgs);\n case WC:\n return new WcCommand(commandArgs);\n case PWD:\n return new PwdCommand(commandArgs);\n case GREP:\n return new GrepCommand(commandArgs);\n case EXIT:\n return new ExitCommand(commandArgs);\n default:\n return new OtherCommand(commandName, commandArgs);\n }\n }",
"Command(String c, String id) {\n commandWord = c;\n pageId = id;\n\n pageValue = -1;\n }",
"public abstract void setCommand(String cmd);",
"public static JaccsCommandHandler parseCommands(String str, JaccsCommandHandler command)throws JaccsCommandException \r\n\t{\r\n\t\tif (!(str != null))return null;\r\n\t\t\t\r\n\t\t\r\n\t\tString[] args = str.split(\" \");\r\n\t\tfor (int i = 0; i < args.length; i++) {\r\n\t\t\tif (args[i].startsWith(prefix)) \r\n\t\t\t{\r\n\t\t\t\tString tempString = args[i].substring(prefix.length());\r\n\r\n\t\t\t\tswitch (tempString) \r\n\t\t\t\t{\r\n\t\t\t\tcase \"noconjunctions\":\r\n\t\t\t\t\tcommand.setNoConjunctions(true);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"conjunctions\":\r\n\t\t\t\t\tcommand.setNoConjunctions(false);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"noreasons\":\r\n\t\t\t\t\tcommand.setNoReasons(true);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"reasons\":\r\n\t\t\t\t\tcommand.setNoReasons(false);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"counter\":\r\n\t\t\t\t\ti++;\r\n\t\t\t\t\tcommand.addCounterNames(args[i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"card\":\r\n\t\t\t\tcase \"arch\":\r\n\t\t\t\tcase \"name\":\r\n\t\t\t\t\ti += command.addName(args, i);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"quickspell\":\r\n\t\t\t\t\tcommand.setQuickSpells(true);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"fastspell\":\r\n\t\t\t\t\tcommand.setFastSpells(true);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"addword\":\r\n\t\t\t\t\tcommand.addWord(tempString.toLowerCase());\r\n\t\t\t\t}\r\n\t\t\t} \r\n\t\t\telse \r\n\t\t\t{\r\n\t\t\t\tString ans = \"\";\r\n\t\t\t\tfor (int j = i; j < args.length; j++) \r\n\t\t\t\t{\r\n\t\t\t\t\tans = ans + args[j] + \" \";\r\n\t\t\t\t}\r\n\t\t\t\tcommand.text = ans;\r\n\t\t\t\treturn command;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn null;\r\n\r\n\t}",
"public Parser(String[] userInput) {\n this.command = userInput[0];\n if (userInput.length > 1) {\n this.description = userInput[1];\n }\n }",
"public Command parse(String[] s) {\r\n\t\t\t\r\n\t\tif (s.length == 1 && s[0].equalsIgnoreCase(\"QUIT\"))\r\n\t\t\treturn new Quit();\r\n\t\telse \r\n\t\t\treturn null;\r\n\t}",
"@Override\n\tpublic void setCommand(String cmd) {\n\t\t\n\t}",
"final public void basicCommand() throws ParseException {\n if (jj_2_75(4)) {\n if (jj_2_55(4)) {\n jj_consume_token(MOVE);\n numero();\n } else if (jj_2_56(4)) {\n jj_consume_token(RIGHT);\n numero();\n } else if (jj_2_57(4)) {\n jj_consume_token(LEFT);\n numero();\n } else if (jj_2_58(4)) {\n jj_consume_token(ROTATE);\n numero();\n } else if (jj_2_59(4)) {\n jj_consume_token(DROP);\n numero();\n } else if (jj_2_60(4)) {\n jj_consume_token(FREE);\n numero();\n } else if (jj_2_61(4)) {\n jj_consume_token(PICK);\n numero();\n } else if (jj_2_62(4)) {\n jj_consume_token(POP);\n numero();\n } else if (jj_2_63(4)) {\n jj_consume_token(BLOCKEDP);\n } else if (jj_2_64(4)) {\n jj_consume_token(NOP);\n } else if (jj_2_65(4)) {\n jj_consume_token(LOOK);\n if (jj_2_49(4)) {\n jj_consume_token(N);\n } else if (jj_2_50(4)) {\n jj_consume_token(E);\n } else if (jj_2_51(4)) {\n jj_consume_token(W);\n } else if (jj_2_52(4)) {\n jj_consume_token(S);\n } else {\n jj_consume_token(-1);\n throw new ParseException();\n }\n } else if (jj_2_66(4)) {\n jj_consume_token(CHECK);\n if (jj_2_53(4)) {\n jj_consume_token(C);\n } else if (jj_2_54(4)) {\n jj_consume_token(B);\n } else {\n jj_consume_token(-1);\n throw new ParseException();\n }\n numero();\n } else if (jj_2_67(4)) {\n block();\n } else if (jj_2_68(4)) {\n repeat();\n } else if (jj_2_69(4)) {\n conditional();\n } else if (jj_2_70(4)) {\n define();\n } else if (jj_2_71(4)) {\n function();\n } else if (jj_2_72(4)) {\n funcall();\n } else if (jj_2_73(4)) {\n varcall();\n } else {\n jj_consume_token(-1);\n throw new ParseException();\n }\n } else {\n label_13:\n while (true) {\n if (jj_2_74(4)) {\n ;\n } else {\n break label_13;\n }\n jj_consume_token(34);\n }\n }\n }",
"public ToDoCommand(String fullCommand) throws NoDescriptionException {\n if (fullCommand.equals(\"todo\")) {\n throw new NoDescriptionException(\"The description of a todo cannot be empty.\");\n }\n String[] splitCommand = fullCommand.split(\" \", 2);\n String desc = splitCommand[1];\n taskToAdd = new ToDo(desc);\n }",
"public void setCommand(String command) {\n this.command = command;\n }",
"public BadCommandException(String cmd){\n super(cmd);\n }",
"Command(String[] commandArgs) {\n this.commandArgs = commandArgs;\n assert this.commandArgs != null : \"Command with null arguments constructed\";\n }",
"private void parseCommand(String consoleLine){\r\n if(consoleLine.trim().equals(\"\")) {\r\n System.err.println(\"Blank line\");\r\n } else {\r\n ArrayList<String> cmdSplit = new ArrayList<>();\r\n\r\n //Split the line by spaces except between quotes and add to the cmdSplit ArrayList\r\n Matcher matcher = Pattern.compile(\"([^\\\"]\\\\S*|\\\".+?\\\")\\\\s*\").matcher(consoleLine);\r\n while(matcher.find()) cmdSplit.add(matcher.group(1).replace(\"\\\"\", \"\"));\r\n\r\n //Store the first element in a String command and the second element in a String name\r\n String command = cmdSplit.get(0);\r\n String name = \"\";\r\n consoleAppend(\"Command: \" + command);\r\n if(cmdSplit.size() > 1) {\r\n name = cmdSplit.get(1);\r\n consoleAppend(\"Name: \" + name);\r\n }\r\n /* COMMANDS BELOW\r\n * printnames: Prints the current list of clients\r\n *\r\n * search name: Searches for the client in the Vector and prints a String\r\n *\r\n * enable name: If the player is in the Vector, sends a ControlToken telling\r\n * them to enable their button.\r\n *\r\n * disable name: If the player is in the Vector, sends a ControlToken telling\r\n * them to disable their button.\r\n *\r\n * kick name: Close the socket for this player.\r\n *\r\n * move name <int> <obo>: Move the player a number of spaces. Include obo if you want the\r\n * player to move one tile at a time.\r\n */\r\n\r\n switch(command){\r\n //Prints the current list of clients\r\n case \"printnames\":\r\n if(clientThreads.size() == 0){\r\n consoleAppend(\"No clients are connected.\");\r\n }\r\n StringBuilder sbClientList = new StringBuilder();\r\n for(ClientHandler ch:clientThreads){\r\n sbClientList.append(String.format(\"Index: %-3d | Name: \\\"%s\\\"\\n\", clientThreads.indexOf(ch), ch.getName()));\r\n }\r\n consoleAppend(sbClientList.toString());\r\n break;\r\n\r\n //Gets an updated board\r\n case \"getboard\":\r\n requestBoard();\r\n break;\r\n\r\n// //Displays the updated board in a new window\r\n// case \"showboard\":\r\n// if(updatedGL != null) {\r\n// JFrame jfBoard = new JFrame();\r\n// jfBoard.setTitle(\"Current Board\");\r\n// jfBoard.add(updatedGL, BorderLayout.CENTER);\r\n// jfBoard.pack();\r\n// jfBoard.setVisible(true);\r\n// jfBoard.setDefaultCloseOperation(EXIT_ON_CLOSE);\r\n// } else {\r\n// consoleAppend(\"Board doesn't exist.\");\r\n// }\r\n// break;\r\n\r\n //Searches for a client in the Vector\r\n case \"search\":\r\n consoleAppend(searchClients(name));\r\n break;\r\n\r\n //Starts the game\r\n case \"startgame\":\r\n if(clientThreads.size() == 0){\r\n consoleAppend(\"Can't start the game, no players are connected.\");\r\n } else {\r\n consoleAppend(\"Starting game..\");\r\n TurnHandler th = new TurnHandler();\r\n th.start();\r\n }\r\n break;\r\n\r\n //Enables roll for a player\r\n case \"enable\":\r\n if(getIndex(name) != -1){\r\n consoleAppend(String.format(\"Attempting to enable %s's button...\\n\", name));\r\n clientThreads.get(getIndex(name)).enableClient();\r\n } else {\r\n consoleAppend(String.format(\"Could not enable button, client %s not found.\\n\", name));\r\n }\r\n break;\r\n\r\n //Disables roll for a player\r\n case \"disable\":\r\n if(getIndex(name) != -1){\r\n consoleAppend(String.format(\"Attempting to disable %s's button...\\n\", name));\r\n clientThreads.get(getIndex(name)).disableClient();\r\n } else {\r\n consoleAppend(String.format(\"Could not disable button, client %s not found.\\n\", name));\r\n }\r\n break;\r\n //Kick a player.\r\n case \"kick\":\r\n if(getIndex(name) != -1){\r\n consoleAppend(String.format(\"Attempting to kick %s...\\n\", name));\r\n try{\r\n clientThreads.get(getIndex(name)).mySocket.close();\r\n } catch(IOException ioe) {\r\n consoleAppend(\"Error: couldn't kick \" + name);\r\n ioe.printStackTrace();\r\n }\r\n } else {\r\n consoleAppend(String.format(\"Could not kick client %s, client %s not connected.\\n\", name, name));\r\n }\r\n break;\r\n\r\n //Move a player a number of tiles on all boards\r\n case \"move\":\r\n if (getIndex(name) != -1) {\r\n try {\r\n int tilesToMove = Integer.parseInt(cmdSplit.get(2));\r\n boolean oBo = false;\r\n if (cmdSplit.size() >= 4) {\r\n String oneByOne = cmdSplit.get(3);\r\n if (oneByOne.equals(\"obo\")) {\r\n oBo = true;\r\n }\r\n }\r\n sendCTToAll(new ControlToken(\r\n ControlToken.MOVECODE, name, tilesToMove, oBo));\r\n } catch (NumberFormatException nfe) {\r\n System.err.println(\"Invalid number of moves, please enter an integer.\");\r\n }\r\n } else {\r\n System.err.printf(\"Could not move client %s, client %s not connected.\\n\", name, name);\r\n }\r\n break;\r\n\r\n default:\r\n consoleAppend(\"Command not recognized.\");\r\n break;\r\n\r\n }\r\n }\r\n }",
"public TodoCommand(String userInputCommand) {\n this.userInputCommand = userInputCommand;\n }",
"private Command createColorCommand(String command) {\n\t\tString[] tokens = command.split(\" \");\n\t\tColor color = new Color(Integer.decode(\"#\" + tokens[1]));\n\t\treturn new ColorCommand(color);\n\t}",
"public CommandManager(String path) {\n\n myParser = new TextParser(path);\n myTracker = new VariableTracker();\n preloadCommands();\n\n }",
"public Command parseCommand(String userInput) throws ParseException {\n final Matcher matcher = BASIC_COMMAND_FORMAT.matcher(userInput.trim());\n if (!matcher.matches()) {\n throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, HelpCommand.MESSAGE_USAGE));\n }\n\n final String commandWord = matcher.group(\"commandWord\");\n final String arguments = matcher.group(\"arguments\");\n switch (commandWord) {\n\n // ========================== Easy Travel Commands =========================\n case HelpCommand.COMMAND_WORD:\n return new HelpCommand();\n\n case ExitCommand.COMMAND_WORD:\n return new ExitCommand();\n\n // ========================== Trip Commands =========================\n case SetTripCommand.COMMAND_WORD:\n return new SetTripCommandParser().parse(arguments);\n\n case DeleteTripCommand.COMMAND_WORD:\n return new DeleteTripCommand();\n\n case CheckStatusCommand.COMMAND_WORD:\n return new CheckStatusCommand();\n\n case EditBudgetCommand.COMMAND_WORD:\n return new EditBudgetCommandParser().parse(arguments);\n\n case RenameCommand.COMMAND_WORD:\n return new RenameCommandParser().parse(arguments);\n // ========================== Schedule Commands =========================\n case ScheduleCommand.COMMAND_WORD:\n return new ScheduleCommandParser().parse(arguments);\n\n case UnscheduleCommand.COMMAND_WORD:\n return new UnscheduleCommandParser().parse(arguments);\n\n case ListScheduleCommand.COMMAND_WORD:\n return new ListScheduleCommand();\n\n // ========================== Fixed Expense Commands =========================\n case AddFixedExpenseCommand.COMMAND_WORD:\n return new AddFixedExpenseCommandParser().parse(arguments);\n\n case ClearFixedExpenseCommand.COMMAND_WORD:\n return new ClearFixedExpenseCommand();\n\n case DeleteFixedExpenseCommand.COMMAND_WORD:\n return new DeleteFixedExpenseCommandParser().parse(arguments);\n\n case EditFixedExpenseCommand.COMMAND_WORD:\n return new EditFixedExpenseCommandParser().parse(arguments);\n\n case CheckBudgetStatus.COMMAND_WORD:\n return new CheckBudgetStatus();\n\n case SortFixedExpenseCommand.COMMAND_WORD:\n return new SortFixedExpenseCommandParser().parse(arguments);\n\n case ListFixedExpenseCommand.COMMAND_WORD:\n return new ListFixedExpenseCommand();\n\n // ========================== Transport Booking Commands =========================\n case AddTransportBookingCommand.COMMAND_WORD:\n return new AddTransportBookingCommandParser().parse(arguments);\n\n case EditTransportBookingCommand.COMMAND_WORD:\n return new EditTransportBookingCommandParser().parse(arguments);\n\n case DeleteTransportBookingCommand.COMMAND_WORD:\n return new DeleteTransportBookingCommandParser().parse(arguments);\n\n case ClearTransportBookingCommand.COMMAND_WORD:\n return new ClearTransportBookingCommand();\n\n case SortTransportBookingCommand.COMMAND_WORD:\n return new SortTransportBookingCommandParser().parse(arguments);\n\n case ListTransportBookingCommand.COMMAND_WORD:\n return new ListTransportBookingCommand();\n\n // ========================== Packing List Commands =========================\n case AddItemCommand.COMMAND_WORD:\n return new AddItemCommandParser().parse(arguments);\n\n case AddPresetCommand.COMMAND_WORD:\n return new AddPresetCommandParser().parse(arguments);\n\n case CheckItemCommand.COMMAND_WORD:\n return new CheckItemCommandParser().parse(arguments);\n\n case ClearItemCommand.COMMAND_WORD:\n return new ClearItemCommand();\n\n case DeleteItemCommand.COMMAND_WORD:\n return new DeleteItemCommandParser().parse(arguments);\n\n case EditItemCommand.COMMAND_WORD:\n return new EditItemCommandParser().parse(arguments);\n\n case FindItemCommand.COMMAND_WORD:\n return new FindItemCommandParser().parse(arguments);\n\n case FindItemCategoryCommand.COMMAND_WORD:\n return new FindItemCategoryCommandParser().parse(arguments);\n\n case UncheckItemCommand.COMMAND_WORD:\n return new UncheckItemCommandParser().parse(arguments);\n\n case ListItemCommand.COMMAND_WORD:\n return new ListItemCommand();\n\n case ListPresetCommand.COMMAND_WORD:\n return new ListPresetCommand();\n\n case SortItemCommand.COMMAND_WORD:\n return new SortItemCommandParser().parse(arguments);\n\n\n // ========================== Activity Commands =========================\n case AddActivityCommand.COMMAND_WORD:\n return new AddActivityCommandParser().parse(arguments);\n\n case DeleteActivityCommand.COMMAND_WORD:\n return new DeleteActivityCommandParser().parse(arguments);\n\n case ClearActivityCommand.COMMAND_WORD:\n return new ClearActivityCommand();\n\n case EditActivityCommand.COMMAND_WORD:\n return new EditActivityCommandParser().parse(arguments);\n\n case FindActivityCommand.COMMAND_WORD:\n return new FindActivityCommandParser().parse(arguments);\n\n case FindActivityTagCommand.COMMAND_WORD:\n return new FindActivityTagCommandParser().parse(arguments);\n\n case ListActivityCommand.COMMAND_WORD:\n return new ListActivityCommand();\n\n case SortActivityCommand.COMMAND_WORD:\n return new SortActivityCommandParser().parse(arguments);\n\n // ========================== Accommodation Commands =========================\n case AddAccommodationBookingCommand.COMMAND_WORD:\n return new AddAccommodationBookingCommandParser().parse(arguments);\n\n case ClearAccommodationBookingCommand.COMMAND_WORD:\n return new ClearAccommodationBookingCommand();\n\n case DeleteAccommodationBookingCommand.COMMAND_WORD:\n return new DeleteAccommodationBookingCommandParser().parse(arguments);\n\n case EditAccommodationBookingCommand.COMMAND_WORD:\n return new EditAccommodationBookingCommandParser().parse(arguments);\n\n case SortAccommodationBookingCommand.COMMAND_WORD:\n return new SortAccommodationBookingParser().parse(arguments);\n\n case ListAccommodationBookingCommand.COMMAND_WORD:\n return new ListAccommodationBookingCommand();\n\n // ========================== Invalid Commands =========================\n default:\n throw new ParseException(MESSAGE_UNKNOWN_COMMAND);\n }\n }",
"Command createCommand();",
"private CommandBrocker() {}",
"public static Command decode(String input) \n\t{\n\t\tString[] data = new String[4];\n\t\tdata = input.split(\";\");\n\t\tCommand cmd = new Command(data[0], data[1], data[2], data[3]);\n\t\treturn cmd;\n\t}",
"java.lang.String getCommand();",
"public Command(byte[] data, long timestamp, int sid, int size) throws IOException {\n this.timestamp = timestamp;\n this.sid = sid;\n this.setSize(size);\n DataInputStream in = new DataInputStream(new ByteArrayInputStream(data));\n int magic = in.readUnsignedByte();\n if (magic != TTMAGICNUM) throw new IOException(\"Wrong magic header.\");\n command = in.readUnsignedByte();\n switch (command) {\n case TTCMDMISC:\n parseCommandMisc(in);\n break;\n case TTCMDPUT:\n name = \"put\";\n parseCommandPut(in);\n break;\n case TTCMDPUTKEEP:\n name = \"putkeep\";\n parseCommandPut(in);\n break;\n default:\n if (LOG.isDebugEnabled()) LOG.debug(\"constructor: Found unhandled command -> 0x\" + Integer.toHexString(command));\n break;\n }\n in.close();\n in = null;\n }",
"UnknownCommand(String bogusCommand)\n {\n this.bogusCommand = bogusCommand; \n }",
"public static String parseCommand(String command) {\n String keyWord = \"\";\n if (command.startsWith(\"list\")) {\n keyWord = \"list\";\n } else if (command.startsWith(\"notes\")) {\n keyWord = \"notes\";\n } else if (command.startsWith(\"done\")) {\n keyWord = \"done\";\n } else if (command.startsWith(\"delete note\")) {\n keyWord = \"delete note\";\n } else if (command.startsWith(\"delete\")) {\n keyWord = \"delete\";\n } else if (command.startsWith(\"todo\")) {\n keyWord = \"todo\";\n } else if (command.startsWith(\"deadline\")) {\n keyWord = \"deadline\";\n } else if (command.startsWith(\"event\")) {\n keyWord = \"event\";\n } else if (command.startsWith(\"today\")) {\n keyWord = \"today\";\n } else if (command.startsWith(\"find\")) {\n keyWord = \"find\";\n } else if (command.startsWith(\"bye\")) {\n keyWord = \"bye\";\n } else if (command.startsWith(\"note\")) {\n keyWord = \"note\";\n }\n return keyWord;\n }",
"public ViewStorageCommand parse(String args) throws ParseException {\n String trimmedArgs = args.trim();\n if (trimmedArgs.isEmpty()) {\n throw new ParseException(\n String.format(MESSAGE_INVALID_COMMAND_FORMAT, ViewStorageCommand.MESSAGE_USAGE));\n }\n Matcher matcher = ViewStorageCommand_Argument_Format.matcher(trimmedArgs);\n if (!matcher.matches()) {\n throw new ParseException(\n String.format(MESSAGE_INVALID_COMMAND_FORMAT, ViewStorageCommand.MESSAGE_USAGE)\n );\n }\n String[] path = matcher.group(\"rawpath\").split(\"\\\\\\\\\");\n return new ViewStorageCommand(path);\n }",
"public String commandLine() {\n String command = \"\";\n for (String arg : builder.command()) {\n command += arg + ' ';\n }\n if (command.endsWith(\" \")) {\n command = command.substring(0, command.length() - 1);\n }\n return command;\n }",
"protected void setCommand(String command)\n {\n Command = command;\n }",
"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}",
"private NetCommand buildIlasmCommand() {\n NetCommand command = new NetCommand(this, exe_title, exe_name);\n command.setFailOnError(getFailOnError());\n //fill in args\n command.addArgument(getDebugParameter());\n command.addArgument(getTargetTypeParameter());\n command.addArgument(getListingParameter());\n command.addArgument(getOutputFileParameter());\n command.addArgument(getResourceFileParameter());\n command.addArgument(getVerboseParameter());\n command.addArgument(getKeyfileParameter());\n command.addArgument(getExtraOptionsParameter());\n\n /*\n * space for more argumentativeness\n * command.addArgument();\n * command.addArgument();\n */\n return command;\n }",
"public void setCommand(String command)\n {\n this.command = command;\n }",
"private Visitor createCommand(String[][] cmdTokens)\n {\n Visitor cmd = null;\n\n try {\n String cmdName = Character.toUpperCase(cmdTokens[0][Helpers.CMD].charAt(0)) + cmdTokens[Helpers.CMD][0].substring(1);\n Class<?> aClass = Class.forName(Visitor.class.getPackage().getName() + '.' + cmdName);\n Constructor<?> ctor = aClass.getConstructor(String[].class, User.class, String[].class);\n cmd = (Visitor) ctor.newInstance(cmdTokens[ARGS], currentUser, cmdTokens[FS_ELEMENTS]);\n } catch (Exception ignored) {\n System.out.println(cmdTokens[0][Helpers.CMD] + \": command not found\");\n } finally {\n System.out.println(); // print out a new line after the command runs (or errors)\n }\n\n return cmd;\n }",
"public Command (int id, String name) {\n if (commands[id] != null) {\n\n } else {\n commands[id] = this;\n this.name = name;\n System.out.println(\"[Command Initialization] Command \" + name + \" successfully initialized with id \"\n + id + \" and allowable arguments:\" /*allowable args will be printed here.*/);\n }\n }",
"static Command parse(String text) throws ParseException {\n Parser parser = new Parser(text);\n return parser.parse();\n }",
"public void initCmds() {\n cmd.put(\"hist\",(i) -> histRPN(i));\n cmd.put(\"pile\",(i) -> pile(i));\n cmd.put(\"!\",(c) -> store(c));\n cmd.put(\"?\",(c) -> getVal(c));\n\n }",
"public DrawCommand() {\n\t\tcommand = null;\n\t\targs1 = null;\n\t\targs2 = null;\n\t}"
] | [
"0.7631647",
"0.70513207",
"0.69771695",
"0.6793276",
"0.67413425",
"0.67218393",
"0.66165644",
"0.6560065",
"0.65456104",
"0.6542432",
"0.6529234",
"0.64822024",
"0.64699733",
"0.64682513",
"0.6464589",
"0.64568186",
"0.6440679",
"0.64322686",
"0.64167887",
"0.6404855",
"0.6394411",
"0.63859576",
"0.6331845",
"0.63308066",
"0.6328831",
"0.62647784",
"0.62499094",
"0.6242003",
"0.6219716",
"0.6218065",
"0.6210482",
"0.6209938",
"0.62064797",
"0.6200212",
"0.6181971",
"0.61640835",
"0.6152409",
"0.6146276",
"0.6127586",
"0.61095834",
"0.6096558",
"0.60930884",
"0.6086831",
"0.607831",
"0.6071459",
"0.60714185",
"0.60655415",
"0.60401356",
"0.60397756",
"0.60371614",
"0.6031985",
"0.6029235",
"0.6019286",
"0.60069865",
"0.59903383",
"0.59864485",
"0.59840417",
"0.5982427",
"0.59745324",
"0.59729505",
"0.5971578",
"0.5968023",
"0.5964275",
"0.5961659",
"0.5955959",
"0.5946392",
"0.59321815",
"0.5929842",
"0.59268636",
"0.5923072",
"0.5913695",
"0.5910777",
"0.5909249",
"0.58952415",
"0.58838415",
"0.58808196",
"0.58740956",
"0.5862663",
"0.5857314",
"0.5855579",
"0.58439595",
"0.5842546",
"0.5841185",
"0.583334",
"0.5833253",
"0.58291745",
"0.5828792",
"0.58041614",
"0.5782393",
"0.578133",
"0.57785946",
"0.57706755",
"0.57660127",
"0.5759747",
"0.5752319",
"0.5751514",
"0.57503134",
"0.5734658",
"0.5726467",
"0.569406"
] | 0.6028423 | 52 |
creating a list for category items | public GradeBook readIpGradeBook() throws IOException, ParseException {
List<String> cList = new ArrayList<>();
Map<String, String> gradeItem = new HashMap<>();
JSONParser parser = new JSONParser();
Object obj = parser.parse(new FileReader("src/inputandOutput/input.json"));
JSONArray jsonArray;
JSONObject jsonObject = null;
if (obj instanceof JSONArray) {
jsonArray = (JSONArray) obj;
jsonObject=(JSONObject) jsonArray.get(0);
} else if (obj instanceof JSONObject) {
jsonObject = (JSONObject)obj;
}
JSONArray grdBookArray;
JSONObject grdBookObject = null;
if(jsonObject.get("GradeBook") instanceof JSONArray){
grdBookArray = (JSONArray) jsonObject.get("GradeBook");
grdBookObject=(JSONObject) grdBookArray.get(0);
} else if(jsonObject.get("GradeBook") instanceof JSONObject){
grdBookObject=(JSONObject) jsonObject.get("GradeBook");
}
JSONArray gradingSchemaArray;
JSONObject gradingSchemaObject = null;
if(grdBookObject.get("GradingSchema") instanceof JSONArray){
gradingSchemaArray = (JSONArray) grdBookObject.get("GradingSchema");
gradingSchemaObject=(JSONObject) gradingSchemaArray.get(0);
} else if(grdBookObject.get("GradingSchema") instanceof JSONObject){
gradingSchemaObject=(JSONObject) grdBookObject.get("GradingSchema");
}
JSONArray grdItemArray;
JSONObject grdItemObject = null;
if(gradingSchemaObject.get("GradeItem") instanceof JSONArray){
grdItemArray = (JSONArray) gradingSchemaObject.get("GradeItem");
for(int i=0; i<grdItemArray.size();i++){
grdItemObject=(JSONObject) grdItemArray.get(i);
String category = (String) grdItemObject.get("Category");
String percentage = (String) grdItemObject.get("Percentage");
cList.add(category);
gradeItem.put(category, percentage);
}
} else if(gradingSchemaObject.get("GradeItem") instanceof JSONObject){
grdItemObject = (JSONObject) gradingSchemaObject.get("GradeItem");
String category = (String) grdItemObject.get("Category");
String percentage = (String) grdItemObject.get("Percentage");
cList.add(category);
gradeItem.put(category, percentage);
}
grdBook.setGradeItem(gradeItem);
grdBook.setCategory(cList);
return grdBook;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public ArrayList<ItemCategory> createItemCategoryList() {\n return categoryLines\n .stream()\n .map(this::writeLineNumber)\n .map(this::createItemList)\n .peek(this::addCategoryForFasterTesting)\n .collect(Collectors.toCollection(ArrayList::new));\n }",
"public String categoryList(CategoryDetails c);",
"public List<String> getCategories();",
"private List<ExploreSitesCategory> createDefaultCategoryTiles() {\n List<ExploreSitesCategory> categoryList = new ArrayList<>();\n\n // Sport category.\n ExploreSitesCategory category = new ExploreSitesCategory(\n SPORT, getContext().getString(R.string.explore_sites_default_category_sports));\n category.setDrawable(getVectorDrawable(R.drawable.ic_directions_run_blue_24dp));\n categoryList.add(category);\n\n // Shopping category.\n category = new ExploreSitesCategory(\n SHOPPING, getContext().getString(R.string.explore_sites_default_category_shopping));\n category.setDrawable(getVectorDrawable(R.drawable.ic_shopping_basket_blue_24dp));\n categoryList.add(category);\n\n // Food category.\n category = new ExploreSitesCategory(\n FOOD, getContext().getString(R.string.explore_sites_default_category_cooking));\n category.setDrawable(getVectorDrawable(R.drawable.ic_restaurant_menu_blue_24dp));\n categoryList.add(category);\n return categoryList;\n }",
"private void buildCategories() {\n List<Category> categories = categoryService.getCategories();\n if (categories == null || categories.size() == 0) {\n throw new UnrecoverableApplicationException(\n \"no item types found in database\");\n }\n\n Map<Category, List<Category>> categoriesMap = new HashMap<Category, List<Category>>();\n for (Category subCategory : categories) {\n Category parent = subCategory.getParentCategory();\n if (categoriesMap.get(parent) == null) {\n categoriesMap.put(parent, new ArrayList<Category>());\n categoriesMap.get(parent).add(subCategory);\n } else {\n categoriesMap.get(parent).add(subCategory);\n }\n }\n\n this.allCategories = categories;\n this.sortedCategories = categoriesMap;\n }",
"private void prepareListData() {\n mCategoryList = new ArrayList<>();\n mFullList = new ArrayList<>();\n for (Category cat : fileSystem.getLocalInformationList())\n {\n List<Object> phraseList = cat.phraseList;\n mCategoryList.add(new Category(phraseList, cat.name));\n }\n mFullList.addAll(mCategoryList);\n\n }",
"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 }",
"CodeOrNullListType getCategoryList();",
"@Override\r\n\tpublic List<Category> list() {\n\t\treturn categories;\r\n\t}",
"List<Category> getAllCategories();",
"public ArrayList<Categoria> listarCategorias();",
"public List<Categorie> getAllCategories();",
"List<Category> selectCategoryList();",
"public ItemCategory getCategory();",
"List<Category> lisCat() {\n return dao.getAll(Category.class);\n }",
"@Override\n\t\tpublic void oncreateItem(String tag, View convertView) {\n\t\t\tmGuanzhuList.add(new Category(tag));// empty\n\t\t}",
"public List<DVDCategorie> listDVDCategorie();",
"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 }",
"@Override\r\n\tpublic int getItemCategory() {\n\t\treturn category;\r\n\t}",
"public List<VehicleCategoryMasterBean> categoryList() throws Exception;",
"public String[] getCategoryList(){\n return new String[]{\n \"Macros\",\n \"Instrument Type\",\n \"TOF_NSCD\",\n \"NEW_SNS\"\n };\n }",
"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 listCategory() {\r\n \r\n cmbCategoryFilter.removeAllItems();\r\n cmbCategory.removeAllItems();\r\n \r\n cmbCategoryFilter.addItem(\"All\");\r\n for (Category cat : Category.listCategory()) {\r\n cmbCategoryFilter.addItem(cat.getName());\r\n cmbCategory.addItem(cat.getName());\r\n }\r\n \r\n }",
"public List<TilePojo> getCategoryCharacterList() {\n\t\tLOGGER.info(\"GetCategoryCharacterList -> Start\");\n\t\tcategoryCharacterList = new LinkedList<>();\n\n\t\tTagManager tagManager = resource.getResourceResolver().adaptTo(TagManager.class);\n\t\tif (galleryCategory != null && tagManager != null) {\n\t\t\tTag galleryTag = tagManager.resolve(galleryCategory[0]);\n\t\t\tString galleryTagId = galleryTag.getTagID();\n\t\t\tList<TilePojo> charList = tileGalleryAndLandingService.getTilesByDate(homePagePath, galleryFor,\n\t\t\t\t\tgalleryTagId, resource.getResourceResolver(), true);\n\t\t\tcategoryCharacterList = getFixedNumberChar(charList, 12);\n\t\t}\n\t\tLOGGER.info(\"GetCategoryCharacterList -> End\");\n\t\treturn categoryCharacterList;\n\t}",
"@NonNull\n public static List<Category> getCategories() {\n if (CATEGORY == null) {\n CATEGORY = new ArrayList<>();\n CATEGORY.add(new Category(\"Bollywood\", R.drawable.bollywood, 1));\n CATEGORY.add(new Category(\"Hollywood\", R.drawable.hollywood3, 2));\n CATEGORY.add(new Category(\"Cricket\", R.drawable.cricket4, 3));\n CATEGORY.add(new Category(\"Science\", R.drawable.science1, 4));\n CATEGORY.add(new Category(\"Geography\", R.drawable.geography, 5));\n CATEGORY.add(new Category(\"History\", R.drawable.history, 6));\n }\n return CATEGORY;\n }",
"@Override\n\tpublic List<Categories> getListCat() {\n\t\treturn categoriesDAO.getListCat();\n\t}",
"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 }",
"public List<ProductCatagory> getAllCategory() throws BusinessException;",
"public ObservableList<String> getCategories()\n {\n ArrayList<Category> categoryList = rentalModel.getCategoryList();\n ArrayList<String> categoryListString = new ArrayList<>();\n for (int i = 0; i < categoryList.size(); i++)\n {\n categoryListString.add(categoryList.get(i).toString());\n }\n categoriesList = FXCollections.observableArrayList(categoryListString);\n return categoriesList;\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 }",
"private List<String> createCategoryNames(List<CategoryDb> instances) {\n List<String> list = new ArrayList<>(0);\n for (CategoryDb categoryDb : instances) {\n list.add(categoryDb.getCategoryNameEn());\n }\n return list;\n }",
"private static void catList() {\n\t\tSystem.out.println(\"List of preset Categories\");\n\t\tSystem.out.println(\"=========================\");\n\t\tSystem.out.println(\n\t\t\t\t\"Family\\nTeen\\nThriller\\nAnimated\\nSupernatural\\nComedy\\nDrama\\nQuirky\\nAction\\nComing of age\\nHorror\\nRomantic Comedy\\n\\n\");\n\t}",
"private void createClinicList(){\n\n ArrayList<Clinic> clinics = LogIn.clinicDAO.getAllClinics();\n for(Clinic cn : clinics){\n double avgRating = LogIn.rateDAO.getAvgRating(cn.getClinicID());\n clinicList.add(new ClinicItem(cn.getClinicName(), drawable.clinic_logo, \"Singapore\", Double.toString(avgRating)));\n }\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}",
"@Test\r\n\tpublic void catTest() {\r\n\t\tItem item = new Item();\r\n\t\ttry {\r\n\t\t\tString tempSet[] = item.getCats();\r\n\t\t\tassertNotSame(tempSet.length, 0);\r\n\t\t\tfor (int i = 0; i < tempSet.length; i++) { // check if categories are empty\r\n\t\t\t\tassertNotNull(tempSet[i]);\r\n\t\t\t\tassertNotSame(tempSet[i], \"\");\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tfail(\"Failed to execute the retrieval of the list of categories: SQLException\");\r\n\t\t}\r\n\t\t\r\n\t}",
"public void LlenarC(){\n for(int i=0;i< new GestionCategorias().getListCategoria().size();i++){\n catBox.addItem(new GestionCategorias().getListCategoria().get(i).getCat_nombre());\n \n }\n }",
"public List<String> getCategoryList(String cat) {\n ArrayList<String> ls = new ArrayList<String>();\n String[] keys = sortedStringKeys();\n\n for (String s : keys) {\n if (s.startsWith(cat)) { ls.add(getProperty(s)); }\n }\n return ls;\n }",
"default List<String> getCategory(String category) {\n return new ArrayList<>(getCategories().get(category.toLowerCase()).values());\n }",
"public static ArrayList<Category> getCategories(int shopID) {\n categories = new ArrayList<>();\n categories.add(new Category(1, 10, \"Category 1\", \"1st Floor a Wing\"));\n categories.add(new Category(1, 11, \"Category 2\", \"1st Floor b Wing\"));\n categories.add(new Category(1, 12, \"Category 3\", \"\"));\n categories.add(new Category(1, 13, \"Category 4\", \"1st Floor c Wing\"));\n\n/*\n categories.add(new Category(1, 10, \"Category 1\", \"\"));\n categories.add(new Category(1, 11, \"Category 2\", \"\"));\n categories.add(new Category(1, 12, \"Category 3\", \"\"));\n categories.add(new Category(1, 13, \"Category 4\", \"\"));\n*/\n return categories;\n }",
"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}",
"List getCategoriesOfType(String typeConstant);",
"public ArrayList<Item> getCardsByCategory(String category)\n {\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor res = db.rawQuery( \"SELECT * FROM \" + CARDS_TABLE_NAME +\n \" WHERE \" + CARDS_COLUMN_CATEGORY + \" LIKE '\" + category + \"' \" +\n \"ORDER BY \" + CARDS_COLUMN_NAME + \" COLLATE NOCASE\", null );\n res.moveToFirst();\n\n while(res.isAfterLast() == false){\n card = new Item();\n card.setItemId(res.getInt(res.getColumnIndex(CARDS_COLUMN_ID)));\n card.setItemName(res.getString(res.getColumnIndex(CARDS_COLUMN_NAME)));\n card.setItemCategory(res.getString(res.getColumnIndex(CARDS_COLUMN_CATEGORY)));\n card.setItemFormat(res.getString(res.getColumnIndex(CARDS_COLUMN_FORMAT)));\n card.setItemNumber(res.getString(res.getColumnIndex(CARDS_COLUMN_NUMBER)));\n items.add(card);\n res.moveToNext();\n }\n return items;\n }",
"public ArrayList<ItemBean> getCatalogueList() throws SQLException{\n\t\tString query = \"select DISTINCT CATID from roumani.item\";\n\t\t\n\t\tArrayList<ItemBean> itemList = new ArrayList<ItemBean>();\n\t\t\n\t\ttry{\n\t\t\t//Open connection to database\n\t\tConnection con = dataSource.getConnection();\n\t\t\t//Create prepared statement\n\t\tPreparedStatement statement = con.prepareStatement(query);\n\t\t\n\t\t\t//Query the database\n\t\tResultSet rs = statement.executeQuery();\n\t\t\n\t\t\n\t\t\t//If there are remaining items matching search criteria, place them in list\n\t\twhile(rs.next())\n//\t\t\tSystem.out.println(\"Category:\" + rs.getString(\"CATID\"));\n\t\t\ttry{\n\t\t\t\tString categoryCheck = rs.getString(\"CATID\");\n\t\t\t\tif(categoryCheck.equals(\"3\"))\n\t\t\t\t\titemList.add(new ItemBean(\"Meats\", 3));\n\t\t\t\telse if(categoryCheck.equals(\"4\"))\n\t\t\t\t\titemList.add(new ItemBean(\"Cheese\", 4));\n\t\t\t\telse if(categoryCheck.equals(\"5\"))\n\t\t\t\t\titemList.add(new ItemBean(\"Deserts\", 5));\n\t\t\t\telse if(categoryCheck.equals(\"6\"))\n\t\t\t\t\titemList.add(new ItemBean(\"Cereal\", 6));\n\t\t\t\t\n\t\t\t}catch(SQLException e){\n\t\t\t\tSystem.err.println(e.getMessage());\n\t\t\t}\n\t\tcon.close();\n\t\tstatement.close();\n\t\trs.close();\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(\"ERROR! Could not connect to database, or find anything inside.\\nDid you remember to start and connect to Derby?\");\n\t\t}\n\t\t\t//Return list of found items\n//\t\tSystem.out.println(\"Done searching for category list\");\n\t\treturn itemList;\n\t}",
"public String getCategory();",
"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();",
"@Override\n\tpublic String toString() {\n\t\treturn \"Category [categoryid=\" + categoryid + \", name=\" + capitalize(name) + \"]\";\n\t}",
"private void setupCategoryListAdapter(JSONArray dataList) {\n GridLayoutManager gridLayoutManager = new GridLayoutManager(getActivity(), 1, GridLayoutManager.VERTICAL, false);\n rvCategories.setLayoutManager(gridLayoutManager);\n adapter = new CategoryListAdapter(getActivity(), dataList);\n rvCategories.setAdapter(adapter);\n adapter.setRvClickListener(this);\n }",
"public abstract ArrayList<DtPropuesta> listarPropuestasPorCategoria(String nombreCat);",
"String category();",
"public interface Categories {\n List<String> all();\n List<String> getAdCategories(Ad ad);\n void linkCategories(long id, String[] categories);\n}",
"List<ProductCategory> getAll();",
"public List<Category> queryExistingCategory(){\n\t\tArrayList<Category> cs = new ArrayList<Category>(); \n\t\tCursor c = queryTheCursorCategory(); \n\t\twhile(c.moveToNext()){\n\t\t\tCategory category = new Category();\n\t\t\tcategory._id = c.getInt(c.getColumnIndex(\"_id\"));\n\t\t\tcategory.title = c.getString(c.getColumnIndex(DBEntryContract.CategoryEntry.COLUMN_NAME_TITLE));\n\t\t\tcategory.numberOfEntries = this.queryLocationEntryNumberByCategory(category._id);\n\t\t\tcs.add(category);\n\t\t}\n\t\t// close the cursor\n\t\tc.close();\n\t\treturn cs;\n\t\t\n\t}",
"WebBookNewsCateListResult listAllBookNewsCategories();",
"@RequestMapping(value = \"/list/{category}\", method = RequestMethod.GET)\n public String listItemByTag(@PathVariable(\"category\") String category, Model model) {\n List<Item> items = itemService.findByCategoryAndTag(category, 1);\n model.addAttribute(\"items\", items);\n return \"item/list\";\n }",
"@ModelAttribute(\"categories\")\r\n\tpublic List<Category> getCategoryList() {\r\n\t\treturn categoryDAO.list();\r\n\t}",
"public String[] getCategoryList(){\n return new String[]{\n \"HIDDENOPERATOR\"\n };\n }",
"@Override\n public void gotCategories(ArrayList<String> categories) {\n ArrayAdapter<String> categoryAdapter = new ArrayAdapter<>(this,\n android.R.layout.simple_list_item_1 , categories);\n categoriesListView.setAdapter(categoryAdapter);\n }",
"@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}",
"@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 }",
"List<ConfigCategory> getCategoryOfTypeAndDisplayName(String typeConstant, String catDisplayName);",
"@Override\n\tpublic List<CategoryVO> mainCategory() {\n\t\treturn mapper.mainCategory();\n\t}",
"ListCategoryResponse listCategories(ListCategoryRequest request);",
"List<Channel> getJXCategory();",
"@Override\n\tpublic List<Categoryb> GetCategpryb() {\n\t\treturn null;\n\t}",
"public List<ItemCategory> getByCat(int id) {\n return repository.findByCategoryId(id);\n }",
"public static List<Category> getCategories(Context context) {\r\n DbManager dbManager = new DbManager(context);\r\n SQLiteDatabase db = dbManager.getReadableDatabase();\r\n\r\n Cursor cursor = db.query(\r\n CategoryTable.TABLE_NAME,\r\n new String[]{CategoryTable._ID, CategoryTable.COLUMN_NAME_CATEGORY_NAME},\r\n CategoryTable.COLUMN_NAME_IS_DELETED + \" = 0\",\r\n null,\r\n null,\r\n null,\r\n CategoryTable.COLUMN_NAME_CATEGORY_NAME + \" ASC\"\r\n );\r\n\r\n List<Category> categories = new ArrayList<>();\r\n while(cursor.moveToNext()) {\r\n Category category = new Category();\r\n category._id = cursor.getInt(cursor.getColumnIndexOrThrow(CategoryTable._ID));\r\n category.category = cursor.getString(cursor.getColumnIndexOrThrow(CategoryTable.COLUMN_NAME_CATEGORY_NAME));\r\n categories.add(category);\r\n }\r\n cursor.close();\r\n db.close();\r\n\r\n return categories;\r\n }",
"public Set<String> getCategory(){return category;}",
"public ArrayList<Categories> getAllCategories() {\n\t\t\n\t\tCategories cg;\n\t\tArrayList<Categories> list=new ArrayList<Categories>();\n\t\t\n\t\ttry {\n\t\t\t String query=\"select * from categories;\";\n\t\t\tPreparedStatement pstm=con.prepareStatement(query);\n\t\t\tResultSet set= pstm.executeQuery();\n\t\t\t\n\t\t\twhile(set.next()) {\n\t\t\t\tint cid=set.getInt(1);\n\t\t\t\tString cname=set.getString(2);\n\t\t\t\tString cdes=set.getString(3);\n\t\t\t\t\n\t\t\t\tcg=new Categories(cid, cname, cdes);\n\t\t\t\tlist.add(cg);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn list;\n\t}",
"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<SubCategory> getSubCategory(Category category) throws DataBaseException;",
"public List<Cvcategory> findAllCvcategories();",
"@Override\n\t\t\t\tpublic String getKey() {\n\t\t\t\t\treturn \"category\";\n\t\t\t\t}",
"@Override\n public int getItemCount() {\n return categorieList.size();\n }",
"public String getCategory_name(){return category_name;}",
"public static List<StockInfoCategory> getBICategoryList(){\r\n\t\treturn BICategoryList;\r\n\t}",
"@Override\n\t\tpublic void oncreateItem(String tag, View convertView) {\n\t\t\tmFiles.add(new Category(tag));// empty\n\t\t}",
"public List<Categoria> listarCategorias(){\n //este metodo devuelve una lista.\n return categoriaRepo.findAll(); \n\n }",
"List<? extends HasListBox> getCodeListsForCategory(String category);",
"public static List<StockInfoCategory> getCombinedBICategoryList(){\r\n\t\treturn CBICategoryList;\r\n\t}",
"public static ArrayList<String> catToCateg(String categ) throws Exception {\n\n\t\tArrayList<String> list = new ArrayList<String>();\n\n\t\tif (categOffsetIndex == null) {\n\t\t\tSystem.out.println(\"categ loading index...\");\n\t\t\tloadCategIndex();\n\t\t\tSystem.out.println(\"categ index loaded !!!\");\n\t\t}\n\n\t\tif (categOffsetIndex.get(categ) != null) {\n\t\t\tFile file = new File(basedir + \"categHierarchy\");\n\t\t\tRandomAccessFile rFile = new RandomAccessFile(file, \"r\");\n\t\t\t// System.out.println(categOffsetIndex.get(categ));\n\t\t\trFile.seek(categOffsetIndex.get(categ));\n\t\t\tString temp = rFile.readLine();\n\t\t\trFile.close();\n\t\t\tString arr[] = temp.split(\"\\t\");\n\n\t\t\tString temp1 = arr[1].substring(1, arr[1].length() - 1);\n\t\t\tString arr1[] = temp1.split(\",\");\n\n\t\t\tfor (String key : arr1) {\n\t\t\t\tlist.add(key.trim());\n\t\t\t}\n\t\t\trFile.close();\n\t\t\treturn list;\n\n\t\t}\n\n\t\telse {\n\n\t\t\treturn null;\n\t\t}\n\n\t}",
"public void displayCategories() {\n System.out.println(\"Categories:\");\n for(int i = 0; i < categories.size(); i++)\n System.out.println((i + 1) + \". \" + categories.get(i).getName());\n }",
"@Override\n public String getCategory() {\n return category;\n }",
"public Categories getCategories() {\n return this.categories;\n }",
"public CategorysAdapter(Context context, List<CategorysModel.Categorys> list) {\n this.context = context;\n this.list = list;\n }",
"public CategorizedList(Activity context, ListView listView, ArrayList<Tag> initialTags, List<Categories> topicsList) {\n this.context = context;\n this.listView = listView;\n sectionItemsWithHeaders = new ArrayList<Section>();\n this.initialTags = initialTags;\n this.topicsList = topicsList;\n }",
"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 Flowable<List<Category>> getCategories() {\n return findAllData(Category.class);\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 }",
"public List<String> categories() {\n return this.categories;\n }",
"List<Category> getAllCategories() throws DataBaseException;",
"public String getCategory(){\r\n\t\treturn this.category;\r\n\t}",
"private void prepareMachineCategoryCards() {\n int totalMachineTypes = machine_types_models_array.size();\n MachineCategories a;\n for (int i=0;i<totalMachineTypes;i++){\n String ss=machine_types_models_array.get(i).getImage();\n Log.e(\"IMAGE URL: \",ss );\n a = new MachineCategories(machine_types_models_array.get(i).getMachine_name(),machine_types_models_array.get(i).getImage());\n machineCategoriesList.add(a);\n }\n adapter.notifyDataSetChanged();\n }",
"public List<Concept> populateConceptSection(String category){\n\t\tConceptService cs = Context.getConceptService();\n\t\tDeIdentifiedExportService d = Context.getService(DeIdentifiedExportService.class);\n\t\tList<String> list = d.getConceptByCategory(category);\n\t\tInteger temp;\n\t\tList<Concept> conceptList = new Vector<Concept>();\n\t\tfor(int i=0; i<list.size();i++){\n\t\t\tfor (String retval: list.get(i).split(\",\")){\n\t\t\t\ttemp = Integer.parseInt(retval);\n\t\t\t\tconceptList.add(cs.getConcept(temp));\n\t\t\t}\n\t\t}\n\t\tSet set = new HashSet(conceptList);\n\t\tList list1 = new ArrayList(set);\n\t\treturn list1;\n\t}",
"public List<Category> list() {\n\t\tSession session = getSession();\n\n\t\tQuery query = session.createQuery(\"from Category\");\n\t\tList<Category> categoryList = query.list();\n session.close();\n\t\treturn categoryList;\n\t}",
"public String toString() {\n\t\treturn category;\n\t}",
"public String getCategory() {\n return this.category;\n }",
"@GetMapping(\"/list\")\n public String listCategories(Model theModel) {\n List<Categories> theCategories = categoriesService.getCategories();\n theModel.addAttribute(\"categories\", theCategories);\n return \"loaisanpham-list\"; }",
"public String getCategory()\n {\n return category;\n }",
"public static List<String> getAllCategoryName() {\n List<String> list = new ArrayList<>();\n List<Category> catList=getAllCategory();\n if(catList!=null && catList.size()>0) {\n for (Category category : catList)\n {\n list.add(category.getCategoryName());\n }\n }\n\n return list;\n\n }"
] | [
"0.7506959",
"0.71609473",
"0.6876156",
"0.68195564",
"0.6657705",
"0.6652389",
"0.6621363",
"0.6619389",
"0.65592605",
"0.6538364",
"0.65283424",
"0.65002936",
"0.64472926",
"0.6440147",
"0.64263093",
"0.6422266",
"0.6387921",
"0.6319202",
"0.63048995",
"0.6303566",
"0.62993276",
"0.6293237",
"0.6267256",
"0.622831",
"0.62211907",
"0.6214291",
"0.62127054",
"0.62022126",
"0.61994565",
"0.6198976",
"0.6191211",
"0.6188236",
"0.61545795",
"0.6154088",
"0.6153528",
"0.61428523",
"0.6140119",
"0.6132537",
"0.6128449",
"0.6110843",
"0.6096444",
"0.6083697",
"0.6073581",
"0.60418904",
"0.60274947",
"0.6025249",
"0.6025249",
"0.60132253",
"0.6011846",
"0.6007676",
"0.6001566",
"0.59964484",
"0.5995594",
"0.59885144",
"0.5987511",
"0.5971737",
"0.5970046",
"0.59611404",
"0.5951935",
"0.5948685",
"0.5937864",
"0.5936304",
"0.5934824",
"0.5921143",
"0.59170306",
"0.59159255",
"0.59083664",
"0.59047425",
"0.5903152",
"0.5902904",
"0.58993536",
"0.58933246",
"0.5891823",
"0.5886106",
"0.58809364",
"0.5872995",
"0.58709407",
"0.58560634",
"0.5843438",
"0.58405596",
"0.5839898",
"0.58340544",
"0.583402",
"0.5829978",
"0.5819259",
"0.5815886",
"0.5811932",
"0.5808157",
"0.58039784",
"0.5803759",
"0.5793593",
"0.5793559",
"0.5785353",
"0.57844424",
"0.5783727",
"0.578104",
"0.5780964",
"0.5776945",
"0.5775746",
"0.57645756",
"0.57603425"
] | 0.0 | -1 |
Constructor, asks to open a predefined sample image if no other image is currently open. | public Region_Eccentricity_Ellipse_Demo() {
if (noCurrentImage()) {
DialogUtils.askForSampleImage(GeneralSampleImage.ToolsSmall);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void openImageFile(ImageActions action) {\n\t\tsetImageHolder(action, RGPTUIUtil.getImageFile(this));\r\n\t}",
"private void getSampleImage() {\n\t\t_helpingImgPath = \"Media\\\\\"+_camType.toString()+_downStream.toString()+_camProfile.toString()+\".bmp\";\n//\t\tswitch( _downStream ){\n//\t\tcase DownstreamPage.LEVER_NO_DOWNSTREAM:\n//\t\t\tswitch ( _camProfile )\n//\t\t\t{\n//\t\t\tcase CamProfilePage.LEVER_BEAD_CAM:\n//\t\t\t\tbreak;\n//\t\t\tcase CamProfilePage.LEVER_DOUBLE_CAM:\n//\t\t\t\tbreak;\n//\t\t\tcase CamProfilePage.LEVER_GROOVE_CAM:\n//\t\t\t\tbreak;\n//\t\t\tcase CamProfilePage.LEVER_OUTER_CAM:\n//\t\t\t\tbreak;\t\n//\t\t\t}\n//\t\t\tbreak;\n//\t\tcase DownstreamPage.LEVER_CRANK:\n//\t\t\tbreak;\n//\t\tcase DownstreamPage.LEVER_FOUR_JOIN:\n//\t\t\tbreak;\n//\t\tcase DownstreamPage.LEVER_PUSHER_TUGS:\n//\t\t\tbreak;\n//\t\tcase DownstreamPage.CAMS_CRANK:\n//\t\t\tswitch ( _camProfile )\n//\t\t\t{\n//\t\t\tcase CamProfilePage.SLIDER_BEAD_CAM:\n//\t\t\t\tbreak;\n//\t\t\tcase CamProfilePage.SLIDER_DOUBLE_CAM:\n//\t\t\t\tbreak;\n//\t\t\tcase CamProfilePage.SLIDER_GROOVE_CAM:\n//\t\t\t\tbreak;\n//\t\t\tcase CamProfilePage.SLIDER_OUTER_CAM:\n//\t\t\t\tbreak;\n//\t\t\t}\n//\t\t\tbreak;\n//\t\tcase DownstreamPage.CAMS_DOUBLE_SLIDE:\n//\t\t\tbreak;\n//\t\tcase DownstreamPage.CAMS_NO_DOWNSTREAM:\n//\t\t\tbreak;\n//\t\t}\n\t\t\n\t}",
"private void createImgSample() throws IOException {\n\t\tSystem.out.print(\"[INFO][PLUGIN][REPLY]:Creating IMG Sample...\");\n\t\tURL url = new URL(\"http://w23.loxa.edu.tw/mm974401/SmallNight2019.png\");\n\t\tHttpURLConnection con = (HttpURLConnection) url.openConnection();\n\t\tcon.setRequestProperty(\"User-agent\", \" Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:70.0) Gecko/20100101 Firefox/70.0\");\n\t\tBufferedInputStream in = new BufferedInputStream(con.getInputStream());\n\t\tbyte[] data = new byte[1024];\n\t\tnew File(\"reply/img/Sample\").mkdir();\n\t\tFile sampImg = new File(\"reply/img/Sample/SmallNight2019.png\");\n\t\tFileOutputStream fos = new FileOutputStream(sampImg);\n\t\tint n;\n\t\twhile((n=in.read(data,0,1024))>=0) \n\t\t\tfos.write(data,0,n);\n\t\tfos.flush();\n\t\tfos.close();\n\t\tin.close();\n\t\tFileWriter sampCmd = new FileWriter(\"reply/cmd/SampleImg.yml\");\n\t\tsampCmd.write(\"img\\n\");\n\t\tsampCmd.write(\"Sample\\n\");\n\t\tsampCmd.write(\"sample||Sample||TEST||test\\n\");\n\t\tsampCmd.write(\"break\\n\");\n\t\tsampCmd.flush();\n\t\tsampCmd.close();\n\t\tSystem.out.println(\"DONE!\");\n\t}",
"@Override\r\n\tpublic void init() {\n\t\timg = new ImageClass();\r\n\t\timg.Init(imgPath);\r\n\t}",
"private void openImageIntent() {\n\t\tfinal File root = new File(Environment.getExternalStorageDirectory()\n\t\t\t\t+ File.separator + \"MyDir\" + File.separator);\n\t\troot.mkdirs();\n\n\t\tfinal File sdImageMainDirectory = new File(root, getUniquePhotoName());\n\t\toutputFileUri = Uri.fromFile(sdImageMainDirectory);\n\n\t\t// Camera.\n\t\tfinal List<Intent> cameraIntents = new ArrayList<Intent>();\n\t\tfinal Intent captureIntent = new Intent(\n\t\t\t\tandroid.provider.MediaStore.ACTION_IMAGE_CAPTURE);\n\t\tfinal PackageManager packageManager = source.getPackageManager();\n\t\tfinal List<ResolveInfo> listCam = packageManager.queryIntentActivities(\n\t\t\t\tcaptureIntent, 0);\n\t\tfor (ResolveInfo res : listCam) {\n\t\t\tfinal String packageName = res.activityInfo.packageName;\n\t\t\tfinal Intent intent = new Intent(captureIntent);\n\t\t\tintent.setComponent(new ComponentName(res.activityInfo.packageName,\n\t\t\t\t\tres.activityInfo.name));\n\t\t\tintent.setPackage(packageName);\n\t\t\tintent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);\n\t\t\tcameraIntents.add(intent);\n\t\t}\n\n\t\t// Filesystem.\n\t\tfinal Intent galleryIntent = new Intent();\n\t\tgalleryIntent.setType(\"*/*\");\n\t\tgalleryIntent.setAction(Intent.ACTION_GET_CONTENT);\n\n\t\t// Chooser of filesystem options.\n\t\tIntent chooserIntent = Intent.createChooser(galleryIntent, \"Select Source\");\n\n\t\t// Add the camera options.\n\t\t//chooserIntent.putExtra(Intent.EXTRA_INITIAL_INTENTS,\n\t\t//\t\tcameraIntents.toArray(new Parcelable[] {}));\n\t\t\n\t\tIntent getContentIntent = FileUtils.createGetContentIntent();\n\n\t chooserIntent = Intent.createChooser(getContentIntent, \"Select a file\");\n\n\t\tsource.startActivityForResult(chooserIntent, Constants.QUIZSHOW_DATA);\n\t\t\n\t}",
"public void openImage() {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(intent, IMAGE_REQUEST);\n }",
"public void openCustomPictureCreator() {\n\n\t\tFXMLLoader fxmlL = new FXMLLoader(getClass().getResource(\"AvatarDrawingTool.fxml\"));\n\t\ttry {\n\t\t\tBorderPane login = (BorderPane) fxmlL.load();\n\n\t\t\tScene scene = new Scene(login, 600, 400);\n\n\t\t\tStage stage = new Stage();\n\t\t\tstage.setScene(scene);\n\t\t\tstage.initModality(Modality.APPLICATION_MODAL);\n\n\t\t\tstage.showAndWait();\n\t\t\t\n\t\t\tif(custom) {\n\t\t\t\tsetImg();\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\t\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private void openFileChoose() {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(intent, PEGA_IMAGEM);\n }",
"public void openDialog() {\r\n\t\tString filename = this.getFileName();\r\n\t\tif (filename.equals(null) || filename.equals(\"\") ) {\r\n\t\t\ttext.append(\"\\nPlease select valid image\");\r\n\t\t\topenDialog();\r\n\t\t}\r\n\t\tdisplay_img = this.loadImage(filename);\r\n\r\n\t}",
"public BufferedImage open() {\n\t\tJFileChooser choose = new JFileChooser(); //Removed path from the chooser!\n\n\t\tif (choose.showOpenDialog(null) != JFileChooser.APPROVE_OPTION)\n\t\t\treturn null;\n\t\tString file = choose.getSelectedFile().getAbsolutePath();\n\t\ttry {\n\t\t\tthis.x = 0;\n\t\t\tthis.y = 0;\n\t\t\tFileInputStream fis = new FileInputStream(file); \n\t\t\tObjectInputStream ois = new ObjectInputStream(fis);\n\t\t\tString iden = \"\";\n\t\t\tiden += ois.readChar();\n\t\t\tiden += ois.readChar();\n\t\t\tiden += ois.readChar();\n\t\t\t\n\t\t\tif (iden.compareTo(\"PPL\") != 0)\treturn null;\n\t\t\tbyte by = ois.readByte();\n\t\t\tSystem.out.println(by);\n\t\t\t\n\t\t\tswitch (by) {\n\t\t\t\tcase 0:\n\t\t\t\t\tthis.image = loadRGB(ois);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\t\tthis.image = loadCMY(ois);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tthis.image = loadGS(ois);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tthis.image = loadBW(ois);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tthis.image = loadLT(ois);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tois.close();\n\t\t\t//int b = ois.readByte(); //lee 8 bits, lee -16, y no 240\n\t\t\t//si el bit mas significativo del byte antes de introducirse fue 1, el numero leido se interpreta como negativo\n\t\t\t//if(b < 0) b += 256; //para leer bytes sin signo\n\t\t\t//int i = ois.readInt(); //lee 32 bits, lee 3500\n\t\t} catch (FileNotFoundException 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\treturn image;\n\t}",
"public RecordImage(String filename, String format, Parameter choice, Stage primaryStage){\n this. filename=filename;\n this.format=format;\n this.choice=choice;\n RecordImage.primaryStage =primaryStage;\n }",
"public void init() throws IOException\n\t{\n\t\tString pth = \"\";\n\t\tif(normal)\n\t\t{\n\t\t\tpth = \"Assets\\\\Art\\\\Tiles\\\\\";\n\t\t}\n\t\ttry\n\t\t{\n\t\t\ttexture = TextureLoader.getTexture(\"PNG\", ResourceLoader.getResourceAsStream(pth+path));\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\ttexture = TextureLoader.getTexture(\"PNG\", ResourceLoader.getResourceAsStream(pth+\"default.png\"));\n\t\t}\n\n\t\theight = texture.getImageHeight();\n\t\twidth = texture.getImageWidth();\n\t\tRandom rand = new Random();\n\t\tthis.identity = rand.nextInt();\n\t\ta = new AudioController();\n\t\t\n\t}",
"public void loadInputImage()\n{\n selectInput(\"Select a file to process:\", \"imageLoader\"); // select image window -> imageLoader()\n}",
"public void openImage(String name) throws ViewerException {\n\n\t}",
"public void startImageSwitch() {\n Intent intent = new Intent(this, AlbumCompatActivity.class);\r\n intent.putExtra(AlbumCompatActivity.CHOOSE_MODE, AlbumCompatActivity.CHOOSE_MODE_SECTION); // ImageUtil.getPathForUpload(mImageKey).getAbsolutePath()\r\n intent.putExtra(AlbumCompatActivity.K_ALBUM_RST_COUNT, 5);\r\n startActivityForResult(intent, SELECT_IMAGE_COMPLETE);\r\n }",
"public Picture(String fileName)\n {\n // let the parent class handle this fileName\n super(fileName);\n }",
"public Picture(String fileName)\n {\n // let the parent class handle this fileName\n super(fileName);\n }",
"private void openImageIntent() {\n final File root = new File(Environment.getExternalStorageDirectory() + File.separator + \"MyDir\" + File.separator);\n root.mkdirs();\n final String fname = UUID.randomUUID().toString();\n final File sdImageMainDirectory = new File(root, fname);\n outputFileUri = Uri.fromFile(sdImageMainDirectory);\n\n // Camera.\n final List<Intent> cameraIntents = new ArrayList<Intent>();\n final Intent captureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n final PackageManager packageManager = getPackageManager();\n final List<ResolveInfo> listCam = packageManager.queryIntentActivities(captureIntent, 0);\n for(ResolveInfo res : listCam) {\n final String packageName = res.activityInfo.packageName;\n final Intent intent = new Intent(captureIntent);\n intent.setComponent(new ComponentName(res.activityInfo.packageName, res.activityInfo.name));\n intent.setPackage(packageName);\n intent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);\n cameraIntents.add(intent);\n }\n\n // Filesystem.\n final Intent galleryIntent = new Intent();\n galleryIntent.setType(\"image/*\");\n galleryIntent.setAction(Intent.ACTION_GET_CONTENT);\n\n // Chooser of filesystem options.\n final Intent chooserIntent = Intent.createChooser(galleryIntent, \"Select Source\");\n\n // Add the camera options.\n chooserIntent.putExtra(Intent.EXTRA_INITIAL_INTENTS, cameraIntents.toArray(new Parcelable[]{}));\n\n startActivityForResult(chooserIntent, SELECT_PICTURE);\n }",
"private RandomImageFinder() {\n }",
"public void testCase1_RequestImageFromFilePath() throws IllegalArgumentException,\n InstantiationException, IllegalAccessException, InvocationTargetException,\n NoSuchFieldException, NoSuchMethodException, InterruptedException {\n Logger.d(TAG, \"testCase1_RequestImageFromFilePath() entry\");\n MockOnLoadImageFinishListener listener = new MockOnLoadImageFinishListener();\n MockOnLoadImageFinishListener listenerNext = new MockOnLoadImageFinishListener();\n String filePath = getFilePath(0);\n String filePathNext = getFilePath(1);\n assertNotSame(filePath, filePathNext);\n assertNotNull(filePath);\n Bitmap bitmap = ImageLoader.requestImage(filePath, listener);\n ImageLoader.requestImage(filePathNext, listenerNext);\n getInstrumentation().waitForIdleSync();\n ImageLoader.interrupt(filePathNext);\n assertNull(bitmap);\n listener.waitForImage();\n bitmap = ImageLoader.requestImage(filePath);\n assertNotNull(bitmap);\n Map imageMap = getImageMap(filePath, bitmap);\n assertEquals(IMAGE_SIZE, imageMap.size());\n bitmap = ImageLoader.requestImage(filePath);\n assertNotNull(bitmap);\n ImageLoader.getInstance().clearImageMap();\n ImageLoader.requestImage(filePath, listener);\n ImageLoader.requestImage(filePathNext, listenerNext);\n listener.waitForImage();\n ImageLoader.interrupt(filePath);\n ImageLoader.interrupt(filePathNext);\n ImageLoader.interrupt();\n getInstrumentation().waitForIdleSync();\n ImageLoader.getInstance().clearImageMap();\n ImageLoader.requestImage(filePath, listener);\n ImageLoader.requestImage(filePathNext, listenerNext);\n ImageLoader.interrupt();\n getInstrumentation().waitForIdleSync();\n }",
"public void openimagefile(String fn,int sno)\n {\n\t try\n\t {\n\t i=0;\n\t FileInputStream fis = new FileInputStream(fn);\n\t DataInputStream dis=new DataInputStream(fis);\n\t while((ch=dis.readUnsignedByte())!=-1)\n\t {\n\t\tp[i]=ch;\n p1[i]=ch;\n\t\ti++;\n\t }\n fis.close();\n dis.close();\n }\n catch(Exception e)\n\t{\n maxp=i;\n switch(p[28])\n\t {\n \t case 24:\n \t\t{\n init24();\n\t \tbreak;\n } //case 24 ends\n\t } // switchp[28] ends\n\t} //catch() ends\n img=createImage(new MemoryImageSource(width,height,pixels,0,width));\n img1=createImage(new MemoryImageSource(width,height,pixels1,0,width));\n }",
"public void openFile()\n { \n JFileChooser chooser = new JFileChooser();\n chooser.setCurrentDirectory(new File(\".\"));\n \n chooser.setFileFilter(new\n javax.swing.filechooser.FileFilter()\n { \n public boolean accept(File f)\n { \n String name = f.getName().toLowerCase();\n return name.endsWith(\".gif\") || name.endsWith(\".jpg\") || name.endsWith(\".jpeg\")\n || f.isDirectory();\n }\n public String getDescription() { return \"Image files\"; }\n });\n\n int r = chooser.showOpenDialog(this);\n if(r != JFileChooser.APPROVE_OPTION) return;\n\n try\n {\n image = ImageIO.read(chooser.getSelectedFile());\n }\n catch (IOException e)\n {\n JOptionPane.showMessageDialog(this, e);\n }\n repaint();\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 void openImage() {\t\n\t\ttry {\n\t\t\timg.openImage(list);\n\t\t} \t\n\n\t\tcatch (BrokenImageException ex) {\n\t\t\ttry{\n\t\t\t\tif(!validImageContent())\n\t\t\t\t\tthrow new BadImageContentException(\"The image is broken \"\n\t\t\t\t\t\t\t+ \"due to corrupt content\");\n\t\t\t\tif(!validImageHeader())\n\t\t\t\t\tthrow new BadImageHeaderException(\"The image is broken\"\n\t\t\t\t\t\t\t+ \" due to a damaged header\");\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\"Please catch the proper Image-related Exception.\");\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"private void initializeImages(File imageFile,File answerFile) throws IOException {\n asciiReader=new ASCIIreader(imageFile,answerFile, 2.0/3.0);\n }",
"public Photo() {\n\t\tthis(UUID.randomUUID().toString() + \".jpg\");\n\t}",
"@Override\n\tpublic void init() {\n\t\tthis.image = Helper.getImageFromAssets(AssetConstants.IMG_ROAD_NORMAL);\n\t}",
"public void imageOpened(ImagePlus imp) {\n update(imp);\n }",
"public ImageFile(BufferedImage img) throws ImageException{\r\n\tloadImage(img);\r\n}",
"public void init() {\n\t\t// Image init\n\t\tcharacter_static = MainClass.getImage(\"\\\\data\\\\character.png\");\n\t\tcharacter_static2 = MainClass.getImage(\"\\\\data\\\\character2.png\");\n\t\tcharacter_static3 = MainClass.getImage(\"\\\\data\\\\character3.png\");\n\t\t\n\t\tcharacterCover = MainClass.getImage(\"\\\\data\\\\cover.png\");\n\t\tcharacterJumped = MainClass.getImage(\"\\\\data\\\\jumped.png\");\n\t\t\n\t\t// Animated when static.\n\t\tthis.addFrame(character_static, 2000);\n\t\tthis.addFrame(character_static2, 50);\n\t\tthis.addFrame(character_static3, 100);\n\t\tthis.addFrame(character_static2, 50);\n\t\t\n\t\tthis.currentImage = super.getCurrentImage();\n\t}",
"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 }",
"public AbstractIOImage(String filePath, boolean dontLoadImage) {\n super(filePath, dontLoadImage);\n }",
"public ImageSection() { // required by the SessionLoader (should not be used elsewhere)\n hasImage = new HasImage();\n }",
"@Override\n public void startDeviceImageIntent() {\n Intent galleryIntent = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n startActivityForResult(galleryIntent, PICK_FROM_GALLERY_REQUEST_CODE);\n }",
"@Override\n public void initialize(URL location, ResourceBundle resources) {\n studentList = FXCollections.observableArrayList();\n studentNumber.setEditable(false);\n try {\n File imageFile = new File(\"./src/Image/defaultPerson.png\");\n BufferedImage bufferedImage = ImageIO.read(imageFile);\n Image image = SwingFXUtils.toFXImage(bufferedImage, null);\n selectImage.setImage(image);\n }\n catch (IOException e){\n System.out.println(e.getMessage());\n }\n errorDisplay.setText(\"\");\n ageLabel.setText(\"\");\n studentNumber.setText(String.valueOf(Student.getStudentNumber()));\n }",
"public XONImageMaker() {\r\n\t\tthis(true, null);\r\n\t}",
"void imageChooser() {\n\n // create an instance of the\n // intent of the type image\n Intent i = new Intent();\n i.setType(\"image/*\");\n i.setAction(Intent.ACTION_GET_CONTENT);\n\n\n // pass the constant to compare it\n // with the returned requestCode\n startActivityForResult(Intent.createChooser(i, \"Select Picture\"), SELECT_PICTURE);\n }",
"public ImageFactoryImpl()\n\t{\n\t\tsuper();\n\t}",
"public BufferedImage open(String id, int no)\n throws FormatException, IOException\n {\n if (!id.equals(currentId)) initFile(id);\n \n if (no < 0 || no >= getImageCount(id)) {\n throw new FormatException(\"Invalid image number: \" + no);\n }\n \n // First initialize:\n in.seek(offsets[no] + 12);\n byte[] toRead = new byte[4];\n in.read(toRead);\n int blockSize = batoi(toRead);\n toRead = new byte[1];\n in.read(toRead);\n // right now I'm gonna skip all the header info\n // check to see whether or not this is v2 data\n if (toRead[0] == 1) {\n in.skipBytes(128);\n }\n in.skipBytes(169);\n // read in the block of data\n toRead = new byte[blockSize];\n int read = 0;\n int left = blockSize;\n while (left > 0) {\n int i = in.read(toRead, read, left);\n read += i;\n left -= i;\n }\n byte[] pixelData = new byte[blockSize];\n int pixPos = 0;\n \n Dimension dim;\n try { dim = pictReader.getDimensions(toRead); }\n catch (Exception e) { dim = new Dimension(0, 0); }\n \n int length = toRead.length;\n int num, size, blockEnd;\n int totalBlocks = -1; // set to allow loop to start.\n int expectedBlock = 0;\n int pos = 0;\n int imagePos = 0;\n int imageSize = dim.width * dim.height;\n short[] flatSamples = new short[imageSize];\n byte[] temp;\n boolean skipflag;\n \n // read in deep grey pixel data into an array, and create a\n // BufferedImage out of it\n //\n // First, checks the existence of a deep gray block. If it doesn't exist,\n // assume it is PICT data, and attempt to read it.\n \n // check whether or not there is deep gray data\n while (expectedBlock != totalBlocks) {\n skipflag = false;\n while (pos + 7 < length &&\n (toRead[pos] != 73 || toRead[pos + 1] != 86 ||\n toRead[pos + 2] != 69 || toRead[pos + 3] != 65 ||\n toRead[pos + 4] != 100 || toRead[pos + 5] != 98 ||\n toRead[pos + 6] != 112 || toRead[pos + 7] != 113))\n {\n pos++;\n }\n if (pos + 32 > length) { // The header is 32 bytes long.\n if (expectedBlock == 0 && imageType[no] < 9) {\n // there has been no deep gray data, and it is supposed\n // to be a pict... *crosses fingers*\n try { return pictReader.openBytes(toRead); }\n catch (Exception e) {\n e.printStackTrace();\n throw new FormatException(\"No iPic comment block found\", e);\n }\n }\n else {\n throw new FormatException(\"Expected iPic comment block not found\");\n }\n }\n \n pos += 8; // skip the block type we just found\n \n // Read info from the iPic comment. This serves as a\n // starting point to read the rest.\n temp = new byte[] {\n toRead[pos], toRead[pos+1], toRead[pos+2], toRead[pos+3]\n };\n num = batoi(temp);\n if (num != expectedBlock) {\n throw new FormatException(\"Expected iPic block not found\");\n }\n expectedBlock++;\n temp = new byte[] {\n toRead[pos+4], toRead[pos+5], toRead[pos+6], toRead[pos+7]\n };\n if (totalBlocks == -1) {\n totalBlocks = batoi(temp);\n }\n else {\n if (batoi(temp) != totalBlocks) {\n throw new FormatException(\"Unexpected totalBlocks numbein.read\");\n }\n }\n \n // skip to size\n pos += 16;\n temp = new byte[] {\n toRead[pos], toRead[pos+1], toRead[pos+2], toRead[pos+3]\n };\n size = batoi(temp);\n pos += 8;\n blockEnd = pos + size;\n \n // copy into our data array.\n System.arraycopy(toRead, pos, pixelData, pixPos, size);\n pixPos += size;\n }\n int pixelValue = 0;\n pos = 0;\n \n // Now read the data and wrap it in a BufferedImage\n \n while (true) {\n if (pos + 1 < pixelData.length) {\n pixelValue = pixelData[pos] < 0 ? 256 + pixelData[pos] :\n (int) pixelData[pos] << 8;\n pixelValue += pixelData[pos + 1] < 0 ? 256 + pixelData[pos + 1] :\n (int) pixelData[pos + 1];\n }\n else throw new FormatException(\"Malformed LIFF data\");\n flatSamples[imagePos] = (short) pixelValue;\n imagePos++;\n if (imagePos == imageSize) { // done, return it\n return ImageTools.makeImage(flatSamples,\n dim.width, dim.height, 1, false);\n }\n }\n }",
"public OpenImgs(IFramesTaker collectionTaker, BufferedImage[] images) {\n this.framesTaker = collectionTaker;\n \n initComponents();\n initAdvancedComponents();\n \n framePanel.setFrame(new Frame(images[0],GameInvariants.FRAMES_VERSION));\n imgs = images;\n massCenterPanel.setFramePanel(framePanel);\n colorPanel.setFramePanel(framePanel);\n }",
"public void actionPerformed(ActionEvent event){\n\t\tObject source = event.getSource();\n\t\t//System.out.println(source);\n\t\tif(source == open){\n\t\t\t//If the Open menu item is pressed, then open an image and then display it (display is temporary)\n\t\t\t//BufferedImage img = ImageFileIO.OpenImage();\n\t\t\tnImage image = ImageFileIO.OpenImageIM();\n\t\t\t//String tempName = IUtils.NameFromFile(image.getFile());\n\t\t\t//imageNamesVector.add(tempName);\n\t\t\t//imageMap.put(image, tempName);\n\t\t\t//imageList.setListData(imageNamesVector);\n\t\t\t\n\t\t\t//ImageFileIO.DisplayImage(image.getImage());\n\t\t\tImageInternalFrame currentFrame = ImageFileIO.ReturnDisplayImage(image);\n\t\t\tSystem.out.println(currentFrame.toString());\n\t\t\tdesktop.add(currentFrame);\n\t\t\tinternalFrameList.add(currentFrame);\n\t\t\t//System.out.println(internalFrameList.toString());\n\t\t\t\n\t\t\t//Testing some stuff. Will not remain in the program.\n\t\t\t\n\t\t\t//TestFilter filter = new TestFilter(image.getImage(), new iKernel(3,3));\n\t\t\t//System.out.println(img.getColorModel().toString());\n\t\t\t/*currentFrame = ImageFileIO.ReturnDisplayImage(new nImage(IUtils.mirrorImage(image.getImage(), new iKernel(3,3))));\n\t\t\tdesktop.add(currentFrame);\n\t\t\tinternalFrameList.add(currentFrame);*/\n\t\t\t\n\t\t}else if(source == about){//Display information about the software in a popup\n\t\t\t//JPanel aboutPane = new JPanel();\n\t\t\tString aboutString = \t\"Texas A&M Texarkana Computer Science Major's Software Engineering project 2012\\n\"+\n\t\t\t\t\t\t\t\t\t\"Authors: Dalton Holley, Willis Ellis, Hiroyuki Plumlee, Micheal C., Glen Wallace\\n\\n\" +\n\t\t\t\t\t\t\t\t\t\"Hiroyuki Plumlee: Rank EV programmer\\n\"+\n\t\t\t\t\t\t\t\t\t\"Micheal C.: Median filter programmer\\n\" +\n\t\t\t\t\t\t\t\t\t\"Willis Ellis: Unsharp mask filter programmer\\n\" +\n\t\t\t\t\t\t\t\t\t\"Dalton Holley: Color ultilities programmer\\n\" +\n\t\t\t\t\t\t\t\t\t\"Glen Wallace: Graphical User Interface programmer\\n\" +\n\t\t\t\t\t\t\t\t\t\"--General Utility programmer\\n\" +\n\t\t\t\t\t\t\t\t\t\"--Project Manager\\n\" +\n\t\t\t\t\t\t\t\t\t\"--Mod. Rank Median filter programmer\";\n\t\t\tJOptionPane.showMessageDialog(this, aboutString);\n\t\t}\n\t\t\n\t}",
"public void openImage() {\n InputStream f = Controller.class.getResourceAsStream(\"route.png\");\n img = new Image(f, mapImage.getFitWidth(), mapImage.getFitHeight(), false, true);\n h = (int) img.getHeight();\n w = (int) img.getWidth();\n pathNodes = new GraphNodeAL[h * w];\n mapImage.setImage(img);\n //makeGrayscale();\n }",
"@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 }",
"public void call1()\n\t{\n\t\tIntent intent = new Intent();\n\t\tintent.setType(\"image/*\");\n\t\tintent.setAction(Intent.ACTION_GET_CONTENT);\n\t\tstartActivityForResult(Intent.createChooser(intent,\n\t\t\t\t\"Select Picture\"), SELECT_PICTURE);\n\n\n\t}",
"@Test\n public void baseTest() {\n RenderedImage twoBands=ConstantDescriptor.create(512f, 512f, new Double[]{1d,0d}, null);\n \n // now select second band\n ParameterBlockJAI pb =\n new ParameterBlockJAI(\"BandSelect\");\n pb.addSource(twoBands);\n pb.setParameter(\"bandIndices\", new int[]{1});\n RenderedOp oneBand = JAI.create(\"BandSelect\", pb);\n \n \n // make sure we got the right band\n Assert.assertEquals(1,oneBand.getSampleModel().getNumBands());\n Assert.assertEquals(0,oneBand.getData().getSample(0, 0, 0),1E-11);\n \n }",
"private void requestImageSource(){\n\n //Checks if device has a camera\n if (mActivity.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA)){\n DialogClickListener clickListener = new DialogClickListener(this);\n String[] options = new String[]{\"Galerie\", \"Kamera\"};\n\n AlertDialog.Builder builder = new AlertDialog.Builder(mActivity);\n builder.setTitle(\"Bildquelle auswählen\");\n builder.setIcon(R.drawable.ic_add_a_photo_darkgrey_24dp);\n builder.setItems(options, clickListener);\n builder.show();\n }\n else\n importImageFromGallery();\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 public void actionPerformed(ActionEvent e) {\n JFileChooser fc = new JFileChooser(); \n int returnVal = fc.showOpenDialog(null);\n if (returnVal == JFileChooser.APPROVE_OPTION) {\n File file = fc.getSelectedFile();\n System.out.println(file.getAbsolutePath()); \n image = loadImage( file);\n }\n }",
"public ImageProcessor(Pic a) {\n image = a;\n }",
"private void initAreaImageFilm() {\n\n }",
"private void setImage() throws FileNotFoundException {\n\t\timage = new Image(new FileInputStream(path));\n\t}",
"private static void openImageMenu(OrganizedImage image, int index)\n {\n\t// True if the 'Back to 'Browse organized images' menu...' option has been selected.\n\tboolean backToBrowseOrganized = false;\n\n\twhile(!backToBrowseOrganized)\n\t {\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.println(\">>Main>Browse organized images>Open image:\");\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.println(\"1: View image.\");\n\t\tSystem.out.println(\"2: Image options...\");\n\t\tSystem.out.println(\"3: Back to 'Browse organized images' menu...\");\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.print(\"\\t>> \");\n\t\t\n\t\tswitch(getUserOption())\n\t\t {\n\t\t case(1):\n\t\t\timage.view();\n\t\t\tbreak;\n\t\t case(2):\n\t\t\timageOptionsMenu(image, index);\n\t\t\tbreak;\n\t\t case(3):\n\t\t\tbackToBrowseOrganized = true;\n\t\t\tbreak;\n\t\t default:\n\t\t\tSystem.out.println(\"That was not a valid option, please try again:\");\n\t\t }\n\t }\n }",
"private Images() {}",
"public static void openPictureJFrame(String fileName) {\n\t SwingUtilities.invokeLater(new Runnable() {\n\t\t \n\t\t @Override\n\t\t public void run() {\n\t\t\t JFrame frame = new JFrame(fileName); \n\t\t\t frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\t BufferedImage img = null;\n\t\t\t //attempt to open file\n\t\t\t try {\n\t\t\t\t img = ImageIO.read(new File(fileName));\n\t\t\t }catch(Exception e ) { e.printStackTrace(); }\n\t\t\t \n\t\t\t //add image to img icon and jlabel\n\t\t\t JLabel lbl = new JLabel();\n\t\t\t lbl.setIcon(new ImageIcon(img));\n\t\t\t frame.getContentPane().add(lbl, BorderLayout.CENTER);\n\t\t\t //set size if you want\n\t\t\t frame.setSize(1920, 1080);\n\t\t\t frame.pack();\n\t\t\t frame.setLocationRelativeTo(null);\n\t\t\t frame.setVisible(true);\n\t\t }\n\t });\n }",
"private void QueryScreenShot() {\n\t\tThread initThread = new Thread() {\n\t\t\tpublic void run() {\n\t\t\t\tlbIm1.setIcon(new ImageIcon(images.get(currentFrameNum)));\n\t\t\t}\n\t\t};\n\t\tinitThread.start();\n\t}",
"private void imageInitiation() {\n ImageIcon doggyImage = new ImageIcon(\"./data/dog1.jpg\");\n JLabel dogImage = new JLabel(doggyImage);\n dogImage.setSize(700,500);\n this.add(dogImage);\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 public void initialize(URL url, ResourceBundle rb) {\n CURRENT_INSTANCE=this;\n visualizationSP.setVisible(false);\n FileChooser fileCh = new FileChooser();\n fileCh.getExtensionFilters().add(new FileChooser.ExtensionFilter(\"ARFF files (*.arff)\", \"*.arff\"));\n fileCh.getExtensionFilters().add(new FileChooser.ExtensionFilter(\"TXT files (*.txt)\", \"*.txt\"));\n\n uploadFileBtn.setOnAction((event) -> {\n File file = fileCh.showOpenDialog(stage);\n if (file != null) {\n openFile(file);\n }\n });\n minSupport_label.setText(50+\"\");\n minConfidence_label.setText(80+\"\");\n\n }",
"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 CaptureImage()\r\n\t{\r\n\t\tSystem.loadLibrary(Core.NATIVE_LIBRARY_NAME);\r\n\t\tcapturedFrame = new Mat();\r\n\t\tprocessedFrame = new Mat();\r\n\t\tboard = new byte[32];\r\n\t\tfor (int i=0;i<board.length;i++){\r\n\t\t\tboard[i] = 0;\r\n\t\t}\r\n\t\tcaptured = new byte[12];\r\n\t}",
"public void openFileAction(File file) {\n\t\tmultimediaPanel.changeImagePanelContent(file);\n\n\t\tselectedAnimalModel.setIsChanged(true);\n\t\tbyte[] bytes = multimediaPanel.getImageByteArray();\n\t\tif (bytes == null) {\n\t\t\tshowDialog(ERROR_MESSAGE, \"Cannot open file.\");\n\t\t\treturn;\n\t\t}\n\n\t\tisImageChangedFlag = true;\n\t}",
"private void initialize() {\n setImageResource(R.drawable.content);\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 }",
"private void onLoad() {\n\n Intent intent = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.INTERNAL_CONTENT_URI);\n startActivityForResult(intent, RESULT_LOAD_ARTIST_IMAGE);\n }",
"public Picture(BufferedImage image)\n {\n super(image);\n }",
"public Picture(BufferedImage image)\n {\n super(image);\n }",
"private void captureImageInitialization() {\n final String[] items = new String[] { \"Take from camera\",\n \"Select from gallery\" };\n\n ArrayAdapter<String> adapter = new ArrayAdapter<>(this,\n android.R.layout.select_dialog_item, items);\n\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n\n builder.setTitle(\"Select Image\");\n builder.setAdapter(adapter, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int item) { // pick from\n // Open camera\n if (item == 0) {\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n /**\n * Also specify the Uri to save the image on specified path\n * and file name. Note that this Uri variable also used by\n * gallery app to hold the selected image path.\n */\n mImageCaptureUri = Uri.fromFile(new File(Environment\n .getExternalStorageDirectory(), \"tmp_avatar_\"\n + String.valueOf(System.currentTimeMillis())\n + \".jpg\"));\n intent.putExtra(android.provider.MediaStore.EXTRA_OUTPUT,\n mImageCaptureUri);\n try {\n intent.putExtra(\"return-data\", true);\n startActivityForResult(intent, PICK_FROM_CAMERA);\n\n } catch (ActivityNotFoundException e) {\n e.printStackTrace();\n }\n } else {\n // Pick from file\n /**\n * To select an image from existing files, use\n * Intent.createChooser to open image chooser. Android will\n * automatically display a list of supported applications,\n * such as image gallery or file manager.\n */\n\n Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);\n intent.addCategory(Intent.CATEGORY_OPENABLE);\n intent.setType(\"image/*\");\n\n intent = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n\n startActivityForResult(Intent.createChooser(intent, \"Complete action using\"), PICK_FROM_FILE);\n }\n }\n });\n dialog = builder.create();\n }",
"public DemoFileChooser()\n\t{\n\t\tsetTitle(\"Testing Tool\");\n\t\tinitComponents();\n\t}",
"public Picture()\n {\n // nothing to do... instance variables are automatically set to null\n }",
"public Picture()\n {\n // nothing to do... instance variables are automatically set to null\n }",
"public Picture()\n {\n // nothing to do... instance variables are automatically set to null\n }",
"public Picture()\n {\n // nothing to do... instance variables are automatically set to null\n }",
"public Image() {\n \n }",
"public ImageDisplay()\n\t{\n initComponents();\n }",
"public ImageHandler() {\n if (System.getProperty(\"os.name\").toLowerCase().contains(\"win\")) {\n this.OS = \"windows/\";\n } else {\n this.OS = \"mac/\";\n }\n }",
"protected abstract boolean isSample(File file);",
"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 SplashScreen (String imageFileName)\n {\n super (new Frame2());\n try {\n Toolkit toolkit = Toolkit.getDefaultToolkit();\n \n URL imageUrl = getClass().getResource (imageFileName);\n image_ = ImageIO.read(imageUrl);\n\n MediaTracker mediaTracker = new MediaTracker (this);\n mediaTracker.addImage (image_, 0);\n mediaTracker.waitForID (0);\n\n width_ = image_.getWidth (this);\n height_ = image_.getHeight (this);\n\n Dimension screenSize = toolkit.getScreenSize();\n \n x_ = (screenSize.width - width_) / 2;\n y_ = (screenSize.height - height_) / 2;\n }\n catch (Exception exception) {\n exception.printStackTrace();\n image_ = null;\n }\n }",
"@BeforeEach\n\tpublic void init() throws NotJpgException {\n\t\t// fixture\n\t\timagePath = \"src/main/resources/skillvssalary.jpeg\";\n\t\timagePath2 = \"src/main/resources/success.jpg\";\n\t\tnotImage = \"src/main/resources/dwa\";\n\t\tphoto = new Photo(imagePath);\n\t}",
"public Image() {\n\t\tsuper();\n\t\taddNewAttributeList(NEW_ATTRIBUTES);\n\t\taddNewResourceList(NEW_RESOURCES);\n\t}",
"private void openFile(File file)\n {\n String imagePath = file.toURI().toString();\n Image image = new Image(imagePath);\n if ( image == null || image.isError())\n {\n showInvalidFileFormatError();\n } else\n {\n bufferImage = image;\n changeAvatarCircle.setFill(new ImagePattern(image));\n imagePathLabel.setText(imagePath);\n }\n }",
"static public AppImage browseForImage() {\n // If there is no image ask the user to choose image from file:\n JFileChooser file_chooser = new JFileChooser();\n file_chooser.setAcceptAllFileFilterUsed(false);\n file_chooser.addChoosableFileFilter(new FileFilter() {\n public boolean accept(File file) {\n if (file.isDirectory()) return true;\n String extension = FileUtils.getFileExtension(file);\n return extension.equals(\"png\");\n }\n\n public String getDescription() {\n return \"Portable Network Graphics (PNG)\";\n }\n });\n int ret_value = file_chooser.showOpenDialog(App.instance);\n AppImage app_image = null;\n if (ret_value == JFileChooser.APPROVE_OPTION) {\n // Read the selected file and do scaling on it:\n File file = file_chooser.getSelectedFile();\n String path = file.getAbsolutePath();\n\n // Create the image and add it to cache:\n app_image = Resources.loadAppImage(path);\n addImage(app_image);\n writeRepository();\n }\n\n return app_image;\n }",
"private void setStudentImage() {\n ImagePicker.create(this)\n .single()\n .origin(images)\n .imageTitle(\"Tap to select student profile\") // image selection title\n .start(REQUEST_CODE_PICKER); // start image picker activity with request code\n }",
"public OImaging(final String[] args) {\n super(args);\n }",
"private void getImage() {\n\n Intent intent = new Intent(\n Intent.ACTION_PICK,\n android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n\n //intent.setType(\"text/xls\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n\n try {\n startActivityForResult(\n Intent.createChooser(intent, \"Complete action using\"),\n MY_INTENT_CLICK);\n }catch (Exception e) {\n e.getMessage();\n }\n }",
"@Test\n\tpublic void testGetImage() {\n\n\t\tip = new ImagePlus();\n\t\t//assertNull(ip.img);\n\t\tassertNull(ip.getImage());\n\n\t\tip = new ImagePlus(DataConstants.DATA_DIR + \"gray8-3x2-sub1.tif\");\n\t\t//assertNull(ip.img);\n\t\tassertNotNull(ip.getImage());\n\t}",
"public void testGetSetImageImage() {\n\t\tassertEquals(testNormal.getImage(), new ImageIcon(\"PACMAN/smallpill.png\").getImage());\n\t\t\n\t\t//SET NEW IMAGE\n\t\ttestNormal.setImage(testImage);\n\t\tassertEquals(testNormal.getImage(), testImage);\n\t}",
"private ImageLoader() {}",
"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 initialize(URL url, ResourceBundle rb) {\n \n c = (int) (Math.random() * (300000 - 2 + 1)) + 2;\n pDir = new File(\"src/img/Profile\" + c + \".jpg\");\n lien = \"Profile\" + c + \".jpg\";\n \n\n }",
"public Sniffer() { \n initComponents(); \n setLocationRelativeTo(getRootPane());\n setIconImage(Toolkit.getDefaultToolkit().getImage(MainFrame.class.getResource(\"/views/images/sam_icon.png\")));\n }",
"private void clickpic() {\n if (getApplicationContext().getPackageManager().hasSystemFeature(\n PackageManager.FEATURE_CAMERA)) {\n // Open default camera\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n intent.putExtra(MediaStore.EXTRA_OUTPUT, fileUri);\n\n // start the image capture Intent\n startActivityForResult(intent, 100);\n\n\n } else {\n Toast.makeText(getApplication(), \"Camera not supported\", Toast.LENGTH_LONG).show();\n }\n }",
"public YourImage() {\n initComponents();\n }",
"public abstract void chooseMedia();",
"@Override\n public void onClick(View view) {\n Bundle extras = new Bundle();\n extras.putInt(\"PICK_FROM_FILE\", mPICK_FROM_FILE);\n extras.putParcelable(\"ImageCaptureUri\", mImageCaptureUri);\n\n Intent i = new Intent(DisplayImageActivity.this, EffectsActivity.class);\n i.putExtras(extras);\n startActivity(i);\n }",
"void setImageFromSpec(ImageProvider spec);",
"public Image() {\n }",
"public OMETiffReader() {\n super(\"OME-TIFF\", new String[] {\"ome.tif\", \"ome.tiff\"});\n suffixNecessary = false;\n suffixSufficient = false;\n domains = FormatTools.NON_GRAPHICS_DOMAINS;\n hasCompanionFiles = true;\n datasetDescription = \"One or more .ome.tiff files\";\n }",
"private void helperDisplaySampleLocation ()\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\t//---- Check if the project is empty or not\r\n\t\t\tif (tableSize != 0)\r\n\t\t\t{\r\n\t\t\t\tint indexImage = mainFormLink.getComponentPanelLeft().getComponentComboboxFileName().getSelectedIndex();\r\n\t\t\t\tint indexSample = mainFormLink.getComponentPanelLeft().getComponentComboboxSampleName().getSelectedIndex();\r\n\r\n\t\t\t\tint samplesCount = DataController.getTable().getElement(indexImage).getChannelCount();\r\n\r\n\t\t\t\tif (samplesCount != 0 && indexSample >= 0 && indexSample < samplesCount)\r\n\t\t\t\t{\r\n\t\t\t\t\t//---- Get points of the sample polygon\r\n\t\t\t\t\tPoint[] samplePolygon = DataController.getTable().getElement(indexImage).getDataImage().getChannel(indexSample).getChannelLocationPoints();\r\n\r\n\t\t\t\t\tif (samplePolygon != null)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmainFormLink.getComponentPanelCenter().getComponentPanelImageView().displayPolygon(samplePolygon);\r\n\t\t\t\t\t\tmainFormLink.getComponentPanelCenter().getComponentPanelImageView().repaint();\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\tcatch (ExceptionMessage exception)\r\n\t\t{\r\n\t\t\tExceptionHandler.processException(exception);\r\n\t\t}\r\n\t}",
"public HSIImage()\r\n {\r\n }",
"protected void OpenImageFile(String path) {\n\t\tSystem.out.println(\"path\"+path);\n\t\tIntent intent = new Intent(\"android.intent.action.VIEW\");\n\t\tintent.addCategory(\"android.intent.category.DEFAULT\");\n\t\tintent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\t\tUri uri = Uri.fromFile(new File(path));\n\t\tintent.setDataAndType(uri, \"image/*\");\n\t\tstartActivity(intent);\n\n\t}"
] | [
"0.6242346",
"0.6202628",
"0.577953",
"0.57216877",
"0.5720319",
"0.5562577",
"0.5557484",
"0.5550327",
"0.5548093",
"0.5533621",
"0.54506344",
"0.5448244",
"0.54388237",
"0.54300886",
"0.5425978",
"0.54249763",
"0.54249763",
"0.5424976",
"0.541124",
"0.53949016",
"0.53557926",
"0.5347354",
"0.53351676",
"0.5334785",
"0.53190607",
"0.5316068",
"0.52993864",
"0.52993536",
"0.52759737",
"0.52640456",
"0.5258513",
"0.52430916",
"0.52426505",
"0.52356493",
"0.5235486",
"0.5229593",
"0.5223933",
"0.52235645",
"0.52221566",
"0.52094454",
"0.5188345",
"0.5188095",
"0.51838374",
"0.5175778",
"0.5162432",
"0.5162356",
"0.5153196",
"0.5135896",
"0.5130652",
"0.5116268",
"0.5113698",
"0.51026744",
"0.5083225",
"0.50751674",
"0.50706196",
"0.5067927",
"0.50647235",
"0.50626194",
"0.5059401",
"0.5059033",
"0.50577337",
"0.5052012",
"0.50396717",
"0.50392836",
"0.50314665",
"0.50314665",
"0.50252867",
"0.50220555",
"0.50197756",
"0.50197756",
"0.50197756",
"0.50197756",
"0.5015063",
"0.50031495",
"0.50022584",
"0.50020766",
"0.50004745",
"0.4995005",
"0.49940324",
"0.49912444",
"0.49861163",
"0.49847525",
"0.49806464",
"0.49741784",
"0.49645168",
"0.4946269",
"0.49424636",
"0.49402404",
"0.49383765",
"0.4938035",
"0.49366063",
"0.4931243",
"0.49255636",
"0.4924683",
"0.49202585",
"0.49170172",
"0.4915747",
"0.49139446",
"0.49095634",
"0.49075758",
"0.49066845"
] | 0.0 | -1 |
Make other class can't call new MoneyFactory | protected MoneyFactory() {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test(expected = IllegalArgumentException.class)\n public void testCreateIllegalThaiMoney() {\n setFactory(\"ThaiMoneyFactory\");\n moneyFactory.createMoney(0.9);\n }",
"@Test(expected = IllegalArgumentException.class)\n public void testCreateIllegalMalayMoney() {\n setFactory(\"MalayMoneyFactory\");\n moneyFactory.createMoney(0.9);\n }",
"private MoneyPreconditions() {\n }",
"public interface AmountFactory {\r\n Amount amountFrom(BigDecimal amountValue);\r\n\r\n Amount amountFrom(BigDecimal amountValue, BigDecimal multiplier);\r\n}",
"@Test\n public void testCreateLegalMoney() {\n setFactory(\"ThaiMoneyFactory\");\n double[] thaiValue = {1, 2, 5, 10, 20, 50, 100, 500, 1000};\n for (double val : thaiValue) {\n assertEquals(makeValuable(val), moneyFactory.createMoney(val));\n }\n setFactory(\"MalayMoneyFactory\");\n double[] malayValue = {0.05, 0.10, 0.20, 0.50, 1, 2, 5, 10, 20, 50, 100};\n for (double val : malayValue) {\n assertEquals(makeValuable(val), moneyFactory.createMoney(val));\n }\n }",
"@Test\n public void testCreateFactory() {\n setFactory(\"ThaiMoneyFactory\");\n assertEquals(ThaiMoneyFactory.class, moneyFactory.getClass());\n assertNotEquals(MalayMoneyFactory.class, moneyFactory.getClass());\n assertEquals(currency, \"Baht\");\n setFactory(\"MalayMoneyFactory\");\n assertEquals(MalayMoneyFactory.class, moneyFactory.getClass());\n assertNotEquals(ThaiMoneyFactory.class, moneyFactory.getClass());\n assertEquals(currency, \"Ringgit\");\n }",
"abstract Valuable createMoney(double value);",
"public static MoneyFactory getInstance() {\n\t\treturn factory;\n\t}",
"private ConcreteFactory() {}",
"@Test\n public void testMoneyConstructor() {\n Money money = new Money(new BigDecimal(\"1.231\"));\n Money actual = new Money(money);\n assertEquals(\"A Money object created from another Money object should be equivalent\", money, actual);\n assertFalse(\"A Money object created from another Money object should be a different object\", money == actual);\n }",
"public MyMoneyException() {\r\n\t\tsuper();\r\n\t}",
"public static void setMoneyFactory(MoneyFactory f) {\n\t\tfactory = f;\n\t}",
"private UnitFactory() {\n\t}",
"private DTOFactory() {\r\n \t}",
"private void setFactory(String factoryClass) {\n MoneyFactory moneyFactory = null;\n try {\n moneyFactory = (MoneyFactory) Class.forName(\"coinpurse.\" + factoryClass).newInstance();\n } catch (IllegalAccessException | InstantiationException | ClassNotFoundException e) {\n System.out.println(\"Cannot create Money Factory.\");\n System.exit(0);\n }\n if (moneyFactory == null) System.exit(0);\n MoneyFactory.setFactory(moneyFactory);\n this.moneyFactory = MoneyFactory.getInstance();\n if (moneyFactory.getClass().equals(ThaiMoneyFactory.class)) currency = \"Baht\";\n else if (moneyFactory.getClass().equals(MalayMoneyFactory.class)) currency = \"Ringgit\";\n }",
"private FixtureContract() {}",
"Reproducible newInstance();",
"private EntityFactory() {}",
"private ContactFactory() {\n throw new AssertionError();\n }",
"private SerializerFactory() {\n // do nothing\n }",
"public interface AccountFactory {\n Account create();\n}",
"private ObjectFactory() { }",
"public interface PurchaseDTOFactory {\n\n PurchaseDTO createNotExpiredPurchaseDTO();\n PurchaseDTO createExpiredPurchaseDTO();\n\n}",
"public CostFactoryImpl() {\n\t\tsuper();\n\t}",
"private XmlFactory() {\r\n /* no-op */\r\n }",
"@Test\n public void testMoneyConstructorSanity() {\n \n BigDecimal expectedAmount = new BigDecimal(\"1.23\");\n Currency expectedCurrency = Currency.getInstance(\"USD\");\n RoundingMode expectedRoundingMode = RoundingMode.CEILING;\n \n Money actual = new Money(expectedAmount, expectedCurrency, expectedRoundingMode);\n assertEquals(\"Creation amount\", expectedAmount, actual.getAmount());\n assertEquals(\"Creation currency\", expectedCurrency, actual.getCurrency());\n assertEquals(\"Creation rounding mode\", expectedRoundingMode, actual.getRoundingMode());\n \n }",
"private ServiceFactory() {}",
"public MoneyTransfer() {\n }",
"public Currency() {\n // Instances built via this constructor have undefined behavior.\n }",
"public CoinFactory(Main main) {\n\t\tthis.main = main;\n\t}",
"public interface KitCalculatorsFactory<E> {\r\n\r\n /**\r\n * Create a new CurrencyDateCalculatorBuilder specialised for 2 currencies, including WorkingWeek, calendars registered and CurrencyCalculatorConfig.\r\n *\r\n * NOTE that USD currency holiday must also be registered.\r\n *\r\n * @param ccy1\r\n * first currency, will pickup the holiday set for this ccy.\r\n * @param ccy2\r\n * second currency, will pick up the holiday set for this ccy.\r\n * @param spotLag\r\n * the number of days between tradeDate and spotDate.\r\n * @return a new CurrencyDateCalculatorBuilder\r\n * @exception IllegalArgumentException\r\n * if the type is not null or a valid value.\r\n * @since 1.4.0\r\n */\r\n CurrencyDateCalculatorBuilder<E> getDefaultCurrencyDateCalculatorBuilder(String ccy1, String ccy2, SpotLag spotLag);\r\n\r\n CurrencyDateCalculator<E> buildCurrencyDateCalculator(CurrencyDateCalculatorBuilder<E> builder);\r\n\r\n /**\r\n * Create a new IMMUTABLE CurrencyDateCalculator specialised for 2 currencies, including WorkingWeek, calendars\r\n * registered and CurrencyCalculatorConfig.\r\n *\r\n * NOTE that USD currency holiday must also be registered.\r\n *\r\n * @param ccy1\r\n * first currency, will pickup the holiday set for this ccy.\r\n * @param ccy2\r\n * second currency, will pick up the holiday set for this ccy.\r\n * @param spotLag\r\n * the number of days between tradeDate and spotDate.\r\n * @return a new CurrencyDateCalculator\r\n * @exception IllegalArgumentException\r\n * if the type is not null or a valid value.\r\n * @since 1.4.0\r\n */\r\n CurrencyDateCalculator<E> getDefaultCurrencyDateCalculator(String ccy1, String ccy2, SpotLag spotLag);\r\n\r\n /**\r\n * Use this method register a specific currency config, if not provided then the DefaultCurrencyCalculatorConfig will be given.\r\n * @param config that specifies the set of currencies subject to USD T+1.\r\n */\r\n void setCurrencyCalculatorConfig(CurrencyCalculatorConfig config);\r\n\r\n CurrencyCalculatorConfig getCurrencyCalculatorConfig();\r\n\r\n /**\r\n * Create a new DateCalculator for a given name and type of handling.\r\n *\r\n * @param name\r\n * calendar name (holidays set interested in). If there is set of\r\n * holidays with that name, it will return a DateCalculator with\r\n * an empty holiday set (will work on Weekend only).\r\n * @param holidayHandlerType\r\n * typically one of the value of HolidayHandlerType or null.\r\n * @return a new DateCalculator\r\n * @exception IllegalArgumentException\r\n * if the type is not null or a valid value.\r\n */\r\n DateCalculator<E> getDateCalculator(String name, String holidayHandlerType);\r\n\r\n /**\r\n * Use this method to register a holidays calendar.\r\n *\r\n * @param calendarName\r\n * the calendar name to register these holidays under.\r\n * @param holidaysCalendar\r\n * the holiday calendar (non-working days with boundaries).\r\n */\r\n KitCalculatorsFactory<E> registerHolidays(String calendarName, HolidayCalendar<E> holidaysCalendar);\r\n\r\n /**\r\n * @return true if the holiday calendar name is registered.\r\n */\r\n boolean isHolidayCalendarRegistered(String calendarName);\r\n\r\n /**\r\n * @return an immutable Holiday Calendar name that is registered.\r\n */\r\n HolidayCalendar<E> getHolidayCalendar(String calendarName);\r\n\r\n /**\r\n * @return an immutable set of registered calendar names\r\n */\r\n Set<String> getRegisteredHolidayCalendarNames();\r\n\r\n /**\r\n * Unregister a given holiday calendar\r\n * @param calendarName\r\n * the calendar name to unregister.\r\n */\r\n KitCalculatorsFactory<E> unregisterHolidayCalendar(String calendarName);\r\n\r\n /**\r\n * unregister all holiday calendars;\r\n */\r\n KitCalculatorsFactory<E> unregisterAllHolidayCalendars();\r\n\r\n // -----------------------------------------------------------------------\r\n //\r\n // ObjectLab, world leaders in the design and development of bespoke\r\n // applications for the securities financing markets.\r\n // www.ObjectLab.co.uk\r\n //\r\n // -----------------------------------------------------------------------\r\n\r\n /**\r\n * Create a new PeriodCountCalculator.\r\n *\r\n * @return a PeriodCountCalculator\r\n */\r\n PeriodCountCalculator<E> getPeriodCountCalculator();\r\n\r\n /**\r\n * Create a new IMMDateCalculator.\r\n *\r\n * @return an IMMDateCalculator\r\n */\r\n IMMDateCalculator<E> getIMMDateCalculator();\r\n\r\n /**\r\n * Create a new holiday handler of given type\r\n * @param holidayHandlerType\r\n * @return a new handler\r\n * @throws IllegalArgumentException if the holidayHandlerType is unsupported\r\n * @since 1.4.0\r\n */\r\n HolidayHandler<E> getHolidayHandler(String holidayHandlerType);\r\n\r\n}",
"private PerksFactory() {\n\n\t}",
"private void makeDeposit() {\n\t\t\r\n\t}",
"private VegetableFactory() {\n }",
"Not createNot();",
"Not createNot();",
"public InternalFloaterFactory() {\n super();\n }",
"private TemplateFactory(){\n //AssertionError不是必须的. 但它可以避免不小心在类的内部调用构造器. 保证该类在任何情况下都不会被实例化.\n //see 《Effective Java》 2nd\n throw new AssertionError(\"No \" + getClass().getName() + \" instances for you!\");\n }",
"private DingnedDealManager() {}",
"public Money(float amount) {\n setAmountFloat(amount);\n }",
"private DPSingletonLazyLoading(){\r\n\t\tthrow new RuntimeException();//You can still access private constructor by reflection and calling setAccessible(true)\r\n\t}",
"private DishContract() {\n }",
"protected Depot() {\n\t\tthis(null);\n\t}",
"private StickFactory() {\n\t}",
"@Override\n\tpublic Valuable createMoney(double value) {\n\t\tValuable thaiMoney = null;\n\t\tif ( isCoin(value) ) {\n\t\t\tthaiMoney = new Coin(value);\n\t\t} else if ( isBankNote(value) ) {\n\t\t\tthaiMoney = new BankNote(value, nextSerialNumber++);\n\t\t} else {\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\treturn thaiMoney;\n\t}",
"@Override\n\tpublic Valuable createMoney(double value) {\n\t\tboolean check = false;\n\t\tfor(double d: MONEY){\n\t\t\tif(d == value) check = true;\n\t\t}\n\t\tif(!check) throw new IllegalArgumentException(String.format(\"No %.2f %s money\", value, MARLAY_CURR));\n\t\tif(value > 1) return new BankNote(value, MARLAY_CURR, nextSerialNumber++);\n\t\treturn new Coin(value, MARLAY_CURR);\n\t}",
"private DAOJPAFactory() {\r\n }",
"private CloneFactory() {\n }",
"private InterpreterDependencyChecks() {\r\n\t\t// Hides default constructor\r\n\t}",
"public interface AbstractFactory {\n Bmw produceBmw();\n Benz produceBenz();\n}",
"private EagerlySinleton()\n\t{\n\t}",
"@Test\n public void testSetCurrency() {\n CurrencyUnit cu = Waehrung.of(\"XXX\");\n factory.setCurrency(cu);\n Geldbetrag geldbetrag = factory.create();\n assertEquals(cu, geldbetrag.getCurrency());\n }",
"@Test\n\tpublic void newInvoiceShouldNotBePayed() {\n\t\tInvoice tested = new Invoice(12L, 3400);\n\t\t\n\t\t// then\n\t\t// ...it should not be payed\n\t\tassertThat(tested, not( payed() ));\n\t\t\n\t}",
"public ObjectFactory() {}",
"public ObjectFactory() {}",
"public ObjectFactory() {}",
"public BasicSafetyCaseFactoryImpl() {\n\t\tsuper();\n\t}",
"public borFactoryImpl() {\n\t\tsuper();\n\t}",
"private ErrorFactory() {\r\n\t}",
"public PedidoFactoryImpl() {\n\t\tsuper();\n\t}",
"private ChildContract() {}",
"private ProjectConfigurationFactory()\n {}",
"private ProfitPerTariffType ()\n {\n super();\n }",
"private CompanyManager() {}",
"static Sbpayment newInstance() {\n return new DefaultSbpayment();\n }",
"public static NumberAmount create(){\n NumberAmount NA = new NumberAmount(new AdvancedOperations(Digit.Zero()));\n return NA;\n }",
"public interface ComplexNumberAbstractFactory {\n /**\n * Permet la creation du nombre complexe à l'aide d'un nombre complexe cartesien\n * @param real Le reel du nombre complexe que l'on souhaite créer\n * @param imaginary L'imaginaire du nombre complexe que l'on souhaite créer\n * @return Le nouveau nombre complexe\n */\n ComplexNumber createComplexNumberFromCartesian(double real, double imaginary);\n /**\n * Permet la creation du nombre complexe à l'aide d'un nombre complexe polaire\n * @param modulus Le module du nombre complexe que l'on souhaite créer\n * @param argument L'argument du nombre complexe que l'on souhaite créer\n * @return Le nouveau nombre complexe complexe\n */\n ComplexNumber createComplexNumberFromPolar(double modulus, double argument);\n}",
"public ProyectoFactoryImpl() {\r\n\t\tsuper();\r\n\t}",
"public Factory() {\n\t\tsuper();\n\t}",
"private WinRateHelper() {\n throw new AssertionError();\n }",
"private StrategyChainBuilder() {\n\t}",
"private NaturePackage() {}",
"public interface UnitFactory {\n Gui_Unit createUnit(String name, int team);\n Gui_Unit copy(Gui_Unit guiUnit);\n\n static UnitFactory getUnitFactory(UnitClassNames name){\n UnitFactory factory = null;\n\n switch (name){\n case ARTILLERY:{\n factory = new ArtilleryFactory();\n break;\n }\n case VEHICLE:{\n factory = new VehicleFactory();\n break;\n }\n case LIGHT_INFANTRY:{\n factory = new LightInfantryFactory();\n break;\n }\n case MELEE_INFANTRY:{\n factory = new MeleeInfantryFactory();\n break;\n }\n case HEAVY_INFANTRY:{\n factory = new HeavyInfantryFactory();\n break;\n }\n }\n return factory ;\n }\n}",
"public XCanopusFactoryImpl()\r\n {\r\n super();\r\n }",
"private DecimalUtils() {\n\n }",
"private UserFactory() {\r\n }",
"private FavouriteContract() {\n }",
"PriceModel createInstanceOfPriceModel();",
"private PtTlsReaderFactory() {\n throw new AssertionError();\n }",
"protected abstract SelfChainingDataObject getNewIndependentInstance();",
"private SingletonDoubleCheck() {}",
"@Test\n public void testFloatingPointCurrency() {\n AntiPattern.floatingPointCurrency();\n }",
"private LocatorFactory() {\n }",
"private RejectEmailSearchBuilder() {\r\n // nothing\r\n }",
"public interface AbstractFactory {\n /**\n * Create cpu cpu.\n *\n * @return the cpu\n */\n Cpu createCpu();\n\n /**\n * Create main board main board.\n *\n * @return the main board\n */\n MainBoard createMainBoard();\n}",
"@Test\n public void testSetNumber() {\n factory.setNumber(1).setCurrency(\"CHF\");\n assertEquals(Geldbetrag.valueOf(\"1 CHF\"), factory.create());\n }",
"@Test\n public void testBigDecimalConstructorDefaultCurrency() {\n new Money(new BigDecimal(\"1.231\"));\n }",
"private BookContract() {}",
"private HabitContract() {\n }",
"@Override\n\tpublic IProduct factoryMethod() {\n\t\treturn new Toy();\n\t}",
"private BankCustomerFacade() {\n }",
"private Contract() {\n }",
"public interface DrinksFactory {\n //饮料\n Drinks dBuild();\n\n //面包\n Bread bBuild();\n\n void buyWhat();\n}",
"@Test\r\n public void testPurChaseBeverageWithNotEnoughMoney() {\r\n coffeeMaker.addRecipe(recipe1); // cost 50\r\n assertEquals(25, coffeeMaker.makeCoffee(0, 25)); // not enough amount paid\r\n }",
"public CommonsFactoryImpl() {\n\t\tsuper();\n\t}",
"public Coin()\n {\n toss();//call the toss method\n }",
"private ATCres() {\r\n // prevent to instantiate this class\r\n }",
"private SelfShieldingCalc()\n {\n // This class should just contain static methods. Don't let anyone\n // instantiate it.\n }",
"private Consts(){\n //this prevents even the native class from \n //calling this ctor as well :\n throw new AssertionError();\n }",
"public MyMoneyException(String msg) {\r\n\t\tsuper(msg);\r\n\t}"
] | [
"0.64012486",
"0.63441443",
"0.6249763",
"0.6040585",
"0.60313964",
"0.6013395",
"0.58470917",
"0.57684594",
"0.57457566",
"0.573717",
"0.5684725",
"0.5660675",
"0.5643412",
"0.5637445",
"0.5629799",
"0.5615952",
"0.55994487",
"0.55845344",
"0.5564614",
"0.5561259",
"0.55566186",
"0.5554207",
"0.5509285",
"0.5487874",
"0.5481254",
"0.5414644",
"0.5400624",
"0.53564686",
"0.5347293",
"0.53402376",
"0.5300967",
"0.5298161",
"0.52852374",
"0.52599394",
"0.52566427",
"0.52566427",
"0.52558476",
"0.5252776",
"0.52506906",
"0.52403104",
"0.52395266",
"0.5236518",
"0.52328104",
"0.52203596",
"0.5217626",
"0.52091455",
"0.51998883",
"0.5198184",
"0.51844174",
"0.51788217",
"0.5157873",
"0.51397306",
"0.5133712",
"0.51276577",
"0.51276577",
"0.51276577",
"0.51253515",
"0.51091236",
"0.51025754",
"0.5097847",
"0.50963014",
"0.5095308",
"0.5086422",
"0.5051541",
"0.5036245",
"0.5033752",
"0.5029428",
"0.5026845",
"0.50222504",
"0.502075",
"0.5018439",
"0.5017735",
"0.5014904",
"0.5014395",
"0.5011851",
"0.50085896",
"0.50049907",
"0.5002126",
"0.50001466",
"0.49944726",
"0.4990399",
"0.49901715",
"0.49807662",
"0.4970466",
"0.49697387",
"0.4968929",
"0.4954254",
"0.4946113",
"0.49453047",
"0.49444792",
"0.49427664",
"0.49406323",
"0.49324304",
"0.49281445",
"0.4919518",
"0.49164322",
"0.49143708",
"0.49143326",
"0.49129233",
"0.49109688"
] | 0.7440136 | 0 |
Return the instance of the MoneyFactory. | public static MoneyFactory getInstance() {
return factory;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected MoneyFactory() {\n\t}",
"public static void setMoneyFactory(MoneyFactory f) {\n\t\tfactory = f;\n\t}",
"public interface AmountFactory {\r\n Amount amountFrom(BigDecimal amountValue);\r\n\r\n Amount amountFrom(BigDecimal amountValue, BigDecimal multiplier);\r\n}",
"public PriceFactory getCurrentPriceFactory()\r\n\t{\n\t\treturn OrderManager.getInstance().getPriceFactory();\r\n\t}",
"public static CostFactory init() {\n\t\ttry {\n\t\t\tCostFactory theCostFactory = (CostFactory)EPackage.Registry.INSTANCE.getEFactory(CostPackage.eNS_URI);\n\t\t\tif (theCostFactory != null) {\n\t\t\t\treturn theCostFactory;\n\t\t\t}\n\t\t}\n\t\tcatch (Exception exception) {\n\t\t\tEcorePlugin.INSTANCE.log(exception);\n\t\t}\n\t\treturn new CostFactoryImpl();\n\t}",
"public static BookFactory getInstance()\r\n {\r\n \r\n if(bookFactoryInstance == null)\r\n {\r\n bookFactoryInstance = new BookFactory();\r\n }\r\n \r\n return bookFactoryInstance;\r\n }",
"abstract Valuable createMoney(double value);",
"public ObjectifyFactory factory() {\n return ofy().factory();\n }",
"public static PeriodFactory init() {\n\t\ttry {\n\t\t\tPeriodFactory thePeriodFactory = (PeriodFactory)EPackage.Registry.INSTANCE.getEFactory(PeriodPackage.eNS_URI);\n\t\t\tif (thePeriodFactory != null) {\n\t\t\t\treturn thePeriodFactory;\n\t\t\t}\n\t\t}\n\t\tcatch (Exception exception) {\n\t\t\tEcorePlugin.INSTANCE.log(exception);\n\t\t}\n\t\treturn new PeriodFactoryImpl();\n\t}",
"public synchronized static MoneyRegister getInstance() {\r\n\t\tif (instance == null)\r\n\t\t\tinstance = new MoneyRegister();\r\n\t\treturn instance;\r\n\t}",
"public static PerksFactory getInstance() {\n\n\t\tif (perksFactory == null) {\n\t\t\tperksFactory = new PerksFactory();\n\t\t}\n\n\t\treturn perksFactory;\n\t}",
"public static NPIconFactory getInstance()\r\n {\r\n if(instance==null)\r\n instance = new NPIconFactory();\r\n return instance;\r\n }",
"public static Factory factory() {\n return ext_dbf::new;\n }",
"public Contract create(){\n\t\treturn new Contract();\n\t}",
"static Sbpayment newInstance() {\n return new DefaultSbpayment();\n }",
"public static EnergyEntityFactory getInstance() {\r\n if (instance == null) {\r\n instance = new EnergyEntityFactory();\r\n }\r\n return instance;\r\n }",
"public static NumberAmount create(){\n NumberAmount NA = new NumberAmount(new AdvancedOperations(Digit.Zero()));\n return NA;\n }",
"public static ContaCapitalCadastroDaoFactory getInstance() {\n\t\treturn factory;\n\t}",
"public static PedidoFactory init() {\n\t\ttry {\n\t\t\tPedidoFactory thePedidoFactory = (PedidoFactory) EPackage.Registry.INSTANCE\n\t\t\t\t\t.getEFactory(PedidoPackage.eNS_URI);\n\t\t\tif (thePedidoFactory != null) {\n\t\t\t\treturn thePedidoFactory;\n\t\t\t}\n\t\t} catch (Exception exception) {\n\t\t\tEcorePlugin.INSTANCE.log(exception);\n\t\t}\n\t\treturn new PedidoFactoryImpl();\n\t}",
"@Override\n\tpublic Valuable createMoney(double value) {\n\t\tValuable thaiMoney = null;\n\t\tif ( isCoin(value) ) {\n\t\t\tthaiMoney = new Coin(value);\n\t\t} else if ( isBankNote(value) ) {\n\t\t\tthaiMoney = new BankNote(value, nextSerialNumber++);\n\t\t} else {\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\treturn thaiMoney;\n\t}",
"public static ProyectoFactory init() {\r\n\t\ttry {\r\n\t\t\tProyectoFactory theProyectoFactory = (ProyectoFactory)EPackage.Registry.INSTANCE.getEFactory(ProyectoPackage.eNS_URI);\r\n\t\t\tif (theProyectoFactory != null) {\r\n\t\t\t\treturn theProyectoFactory;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (Exception exception) {\r\n\t\t\tEcorePlugin.INSTANCE.log(exception);\r\n\t\t}\r\n\t\treturn new ProyectoFactoryImpl();\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 ValueFactory<K, V> getFactory()\n {\n return factory;\n }",
"@Test\n public void testCreateFactory() {\n setFactory(\"ThaiMoneyFactory\");\n assertEquals(ThaiMoneyFactory.class, moneyFactory.getClass());\n assertNotEquals(MalayMoneyFactory.class, moneyFactory.getClass());\n assertEquals(currency, \"Baht\");\n setFactory(\"MalayMoneyFactory\");\n assertEquals(MalayMoneyFactory.class, moneyFactory.getClass());\n assertNotEquals(ThaiMoneyFactory.class, moneyFactory.getClass());\n assertEquals(currency, \"Ringgit\");\n }",
"public PedidoFactoryImpl() {\n\t\tsuper();\n\t}",
"public static borFactory init() {\n\t\ttry {\n\t\t\tborFactory theborFactory = (borFactory)EPackage.Registry.INSTANCE.getEFactory(borPackage.eNS_URI);\n\t\t\tif (theborFactory != null) {\n\t\t\t\treturn theborFactory;\n\t\t\t}\n\t\t}\n\t\tcatch (Exception exception) {\n\t\t\tEcorePlugin.INSTANCE.log(exception);\n\t\t}\n\t\treturn new borFactoryImpl();\n\t}",
"public Factory() {\n this(getInternalClient());\n }",
"public CostFactoryImpl() {\n\t\tsuper();\n\t}",
"public static VersionFactory getInstance() {\n\t\treturn SingletonHolder.versionFactory;\n\t}",
"public Invoice create() {\r\n\t\treturn new Invoice();\r\n\t}",
"public static StaticFactoryInsteadOfConstructors create(){\n return new StaticFactoryInsteadOfConstructors();\n }",
"public static ServiceFactory getInstance(){\n\t\tif(instance == null)\n\t\t\tinstance = new ServiceFactory();\n\t\treturn instance;\n\t}",
"public Money convertToMoney(float amount) {\n return new Money(amount);\n }",
"public static ProjectFactory init() {\r\n\t\ttry {\r\n\t\t\tProjectFactory theProjectFactory = (ProjectFactory)EPackage.Registry.INSTANCE.getEFactory(ProjectPackage.eNS_URI);\r\n\t\t\tif (theProjectFactory != null) {\r\n\t\t\t\treturn theProjectFactory;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (Exception exception) {\r\n\t\t\tEcorePlugin.INSTANCE.log(exception);\r\n\t\t}\r\n\t\treturn new ProjectFactoryImpl();\r\n\t}",
"public Money(float amount) {\n setAmountFloat(amount);\n }",
"public interface AccountFactory {\n Account create();\n}",
"public static Factory factory() {\n return ext_accdt::new;\n }",
"Valuable createMoney(String value) {\n\t\ttry {\n\t\t\tDouble.parseDouble(value);\n\t\t} catch (NumberFormatException e) {\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\treturn createMoney(Double.parseDouble(value));\n\t}",
"@Test\n public void testCreateLegalMoney() {\n setFactory(\"ThaiMoneyFactory\");\n double[] thaiValue = {1, 2, 5, 10, 20, 50, 100, 500, 1000};\n for (double val : thaiValue) {\n assertEquals(makeValuable(val), moneyFactory.createMoney(val));\n }\n setFactory(\"MalayMoneyFactory\");\n double[] malayValue = {0.05, 0.10, 0.20, 0.50, 1, 2, 5, 10, 20, 50, 100};\n for (double val : malayValue) {\n assertEquals(makeValuable(val), moneyFactory.createMoney(val));\n }\n }",
"public MoneyManager getMoney() {\n\treturn money;\n }",
"public static synchronized EnumFactory getInstance() {\n if (instance == null) {\n instance = new EnumFactory();\n }\n return instance;\n }",
"public static ComputingElementFactory getInstance() {\n\t\t\n\t\tif( _instance == null) {\n\t\t\t_instance = new ComputingElementFactory();\n\t\t}\n\t\treturn _instance;\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 }",
"PriceModel createInstanceOfPriceModel();",
"public static DataFactory init() {\n\t\ttry {\n\t\t\tDataFactory theDataFactory = (DataFactory)EPackage.Registry.INSTANCE.getEFactory(DataPackage.eNS_URI);\n\t\t\tif (theDataFactory != null) {\n\t\t\t\treturn theDataFactory;\n\t\t\t}\n\t\t}\n\t\tcatch (Exception exception) {\n\t\t\tEcorePlugin.INSTANCE.log(exception);\n\t\t}\n\t\treturn new DataFactoryImpl();\n\t}",
"public static CoeurAStockage getInstance() \n\t{\n\t\tif(instance == null)\n\t\t\tinstance = new CoeurAStockageImpl();\n\t\treturn instance;\n\t}",
"public static QuizFactory getFactoryInstance(){\n\t\tif (defQuizFactory == null)\n\t\t\tdefQuizFactory = new DefaultQuizFactory();\n\t\t\n\t\treturn defQuizFactory;\n\t}",
"public static CLONDATAFactory init() {\n\t\ttry {\n\t\t\tCLONDATAFactory theCLONDATAFactory = (CLONDATAFactory) EPackage.Registry.INSTANCE.getEFactory(\n\t\t\t\tCLONDATAPackage.eNS_URI);\n\t\t\tif (theCLONDATAFactory != null) {\n\t\t\t\treturn theCLONDATAFactory;\n\t\t\t}\n\t\t} catch (Exception exception) {\n\t\t\tEcorePlugin.INSTANCE.log(exception);\n\t\t}\n\t\treturn new CLONDATAFactoryImpl();\n\t}",
"private void setFactory(String factoryClass) {\n MoneyFactory moneyFactory = null;\n try {\n moneyFactory = (MoneyFactory) Class.forName(\"coinpurse.\" + factoryClass).newInstance();\n } catch (IllegalAccessException | InstantiationException | ClassNotFoundException e) {\n System.out.println(\"Cannot create Money Factory.\");\n System.exit(0);\n }\n if (moneyFactory == null) System.exit(0);\n MoneyFactory.setFactory(moneyFactory);\n this.moneyFactory = MoneyFactory.getInstance();\n if (moneyFactory.getClass().equals(ThaiMoneyFactory.class)) currency = \"Baht\";\n else if (moneyFactory.getClass().equals(MalayMoneyFactory.class)) currency = \"Ringgit\";\n }",
"public static OpenTypeFactory getInstance() {\n\t\tif(instance==null) {\n\t\t\tsynchronized(lock) {\n\t\t\t\tif(instance==null) {\n\t\t\t\t\tinstance = new OpenTypeFactory();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn instance;\n\t}",
"public CoinFactory(Main main) {\n\t\tthis.main = main;\n\t}",
"@Override\n\tpublic IProduct factoryMethod() {\n\t\treturn new Toy();\n\t}",
"public Money(BigDecimal amount) {\n this(amount, null);\n }",
"public static DataBaseCreator getInstance() {\r\n if (instance == null) {\r\n synchronized (lock) {\r\n if (instance == null) {\r\n instance = new DataBaseCreator();\r\n }\r\n }\r\n }\r\n\r\n return instance;\r\n }",
"static public PositionFactory getInstance(){\n if(instance == null) {\n instance =new PositionFactory();\n }\n return instance;\n }",
"public interface KitCalculatorsFactory<E> {\r\n\r\n /**\r\n * Create a new CurrencyDateCalculatorBuilder specialised for 2 currencies, including WorkingWeek, calendars registered and CurrencyCalculatorConfig.\r\n *\r\n * NOTE that USD currency holiday must also be registered.\r\n *\r\n * @param ccy1\r\n * first currency, will pickup the holiday set for this ccy.\r\n * @param ccy2\r\n * second currency, will pick up the holiday set for this ccy.\r\n * @param spotLag\r\n * the number of days between tradeDate and spotDate.\r\n * @return a new CurrencyDateCalculatorBuilder\r\n * @exception IllegalArgumentException\r\n * if the type is not null or a valid value.\r\n * @since 1.4.0\r\n */\r\n CurrencyDateCalculatorBuilder<E> getDefaultCurrencyDateCalculatorBuilder(String ccy1, String ccy2, SpotLag spotLag);\r\n\r\n CurrencyDateCalculator<E> buildCurrencyDateCalculator(CurrencyDateCalculatorBuilder<E> builder);\r\n\r\n /**\r\n * Create a new IMMUTABLE CurrencyDateCalculator specialised for 2 currencies, including WorkingWeek, calendars\r\n * registered and CurrencyCalculatorConfig.\r\n *\r\n * NOTE that USD currency holiday must also be registered.\r\n *\r\n * @param ccy1\r\n * first currency, will pickup the holiday set for this ccy.\r\n * @param ccy2\r\n * second currency, will pick up the holiday set for this ccy.\r\n * @param spotLag\r\n * the number of days between tradeDate and spotDate.\r\n * @return a new CurrencyDateCalculator\r\n * @exception IllegalArgumentException\r\n * if the type is not null or a valid value.\r\n * @since 1.4.0\r\n */\r\n CurrencyDateCalculator<E> getDefaultCurrencyDateCalculator(String ccy1, String ccy2, SpotLag spotLag);\r\n\r\n /**\r\n * Use this method register a specific currency config, if not provided then the DefaultCurrencyCalculatorConfig will be given.\r\n * @param config that specifies the set of currencies subject to USD T+1.\r\n */\r\n void setCurrencyCalculatorConfig(CurrencyCalculatorConfig config);\r\n\r\n CurrencyCalculatorConfig getCurrencyCalculatorConfig();\r\n\r\n /**\r\n * Create a new DateCalculator for a given name and type of handling.\r\n *\r\n * @param name\r\n * calendar name (holidays set interested in). If there is set of\r\n * holidays with that name, it will return a DateCalculator with\r\n * an empty holiday set (will work on Weekend only).\r\n * @param holidayHandlerType\r\n * typically one of the value of HolidayHandlerType or null.\r\n * @return a new DateCalculator\r\n * @exception IllegalArgumentException\r\n * if the type is not null or a valid value.\r\n */\r\n DateCalculator<E> getDateCalculator(String name, String holidayHandlerType);\r\n\r\n /**\r\n * Use this method to register a holidays calendar.\r\n *\r\n * @param calendarName\r\n * the calendar name to register these holidays under.\r\n * @param holidaysCalendar\r\n * the holiday calendar (non-working days with boundaries).\r\n */\r\n KitCalculatorsFactory<E> registerHolidays(String calendarName, HolidayCalendar<E> holidaysCalendar);\r\n\r\n /**\r\n * @return true if the holiday calendar name is registered.\r\n */\r\n boolean isHolidayCalendarRegistered(String calendarName);\r\n\r\n /**\r\n * @return an immutable Holiday Calendar name that is registered.\r\n */\r\n HolidayCalendar<E> getHolidayCalendar(String calendarName);\r\n\r\n /**\r\n * @return an immutable set of registered calendar names\r\n */\r\n Set<String> getRegisteredHolidayCalendarNames();\r\n\r\n /**\r\n * Unregister a given holiday calendar\r\n * @param calendarName\r\n * the calendar name to unregister.\r\n */\r\n KitCalculatorsFactory<E> unregisterHolidayCalendar(String calendarName);\r\n\r\n /**\r\n * unregister all holiday calendars;\r\n */\r\n KitCalculatorsFactory<E> unregisterAllHolidayCalendars();\r\n\r\n // -----------------------------------------------------------------------\r\n //\r\n // ObjectLab, world leaders in the design and development of bespoke\r\n // applications for the securities financing markets.\r\n // www.ObjectLab.co.uk\r\n //\r\n // -----------------------------------------------------------------------\r\n\r\n /**\r\n * Create a new PeriodCountCalculator.\r\n *\r\n * @return a PeriodCountCalculator\r\n */\r\n PeriodCountCalculator<E> getPeriodCountCalculator();\r\n\r\n /**\r\n * Create a new IMMDateCalculator.\r\n *\r\n * @return an IMMDateCalculator\r\n */\r\n IMMDateCalculator<E> getIMMDateCalculator();\r\n\r\n /**\r\n * Create a new holiday handler of given type\r\n * @param holidayHandlerType\r\n * @return a new handler\r\n * @throws IllegalArgumentException if the holidayHandlerType is unsupported\r\n * @since 1.4.0\r\n */\r\n HolidayHandler<E> getHolidayHandler(String holidayHandlerType);\r\n\r\n}",
"@Override\n\tpublic Valuable createMoney(double value) {\n\t\tboolean check = false;\n\t\tfor(double d: MONEY){\n\t\t\tif(d == value) check = true;\n\t\t}\n\t\tif(!check) throw new IllegalArgumentException(String.format(\"No %.2f %s money\", value, MARLAY_CURR));\n\t\tif(value > 1) return new BankNote(value, MARLAY_CURR, nextSerialNumber++);\n\t\treturn new Coin(value, MARLAY_CURR);\n\t}",
"public Factory getFactory()\r\n {\r\n if( m_factory != null ) return m_factory;\r\n m_factory = FactoryHelper.narrow( m_primary );\r\n return m_factory;\r\n }",
"private EntityFactory() {}",
"public static PetrinetmodelFactory init() {\r\n\t\ttry {\r\n\t\t\tPetrinetmodelFactory thePetrinetmodelFactory = (PetrinetmodelFactory)EPackage.Registry.INSTANCE.getEFactory(PetrinetmodelPackage.eNS_URI);\r\n\t\t\tif (thePetrinetmodelFactory != null) {\r\n\t\t\t\treturn thePetrinetmodelFactory;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (Exception exception) {\r\n\t\t\tEcorePlugin.INSTANCE.log(exception);\r\n\t\t}\r\n\t\treturn new PetrinetmodelFactoryImpl();\r\n\t}",
"public static StaticFactoryInsteadOfConstructors newInstance() {\n return new StaticFactoryInsteadOfConstructors();\n }",
"public static XCanopusFactory init()\r\n {\r\n try\r\n {\r\n XCanopusFactory theXCanopusFactory = (XCanopusFactory)EPackage.Registry.INSTANCE.getEFactory(XCanopusPackage.eNS_URI);\r\n if (theXCanopusFactory != null)\r\n {\r\n return theXCanopusFactory;\r\n }\r\n }\r\n catch (Exception exception)\r\n {\r\n EcorePlugin.INSTANCE.log(exception);\r\n }\r\n return new XCanopusFactoryImpl();\r\n }",
"public EntityManagerFactory newEMFactory() {\n emFactory = Persistence.createEntityManagerFactory(\"Exercici1-JPA\");\n return emFactory;\n }",
"public CurrencyHibernateDAO getCurrencyDAO() {\n\t\treturn (CurrencyHibernateDAO)instantiateDAO(CurrencyHibernateDAO.class);\n\t}",
"public Factory() {\n\t\tsuper();\n\t}",
"public static PromiseFactory init() {\n\t\ttry {\n\t\t\tPromiseFactory thePromiseFactory = (PromiseFactory)EPackage.Registry.INSTANCE.getEFactory(PromisePackage.eNS_URI);\n\t\t\tif (thePromiseFactory != null) {\n\t\t\t\treturn thePromiseFactory;\n\t\t\t}\n\t\t}\n\t\tcatch (Exception exception) {\n\t\t\tEcorePlugin.INSTANCE.log(exception);\n\t\t}\n\t\treturn new PromiseFactoryImpl();\n\t}",
"public PeriodFactoryImpl() {\n\t\tsuper();\n\t}",
"public static Testing2Factory init() {\n\t\ttry {\n\t\t\tTesting2Factory theTesting2Factory = (Testing2Factory)EPackage.Registry.INSTANCE.getEFactory(Testing2Package.eNS_URI);\n\t\t\tif (theTesting2Factory != null) {\n\t\t\t\treturn theTesting2Factory;\n\t\t\t}\n\t\t}\n\t\tcatch (Exception exception) {\n\t\t\tEcorePlugin.INSTANCE.log(exception);\n\t\t}\n\t\treturn new Testing2FactoryImpl();\n\t}",
"@Test(expected = IllegalArgumentException.class)\n public void testCreateIllegalThaiMoney() {\n setFactory(\"ThaiMoneyFactory\");\n moneyFactory.createMoney(0.9);\n }",
"public static Order createOrder() {\n OrderFactory orderFactory;\n Cuisine cuisine = ORDERING_FACADE.askForCuisine(); // choosing cuisine\n Meal mealType = ORDERING_FACADE.askForMealType(); // choosing meal type\n if (mealType.equals(Meal.LUNCH)) { // setting factory for meal choosen\n orderFactory = LUNCH_FACTORY;\n \n } else {\n orderFactory = DRINK_FACTORY;\n \n }\n return orderFactory.createOrder(cuisine); // creating and returning concrete meal order\n }",
"public static EntityFactory init() {\n\t\ttry {\n\t\t\tEntityFactory theEntityFactory = (EntityFactory)EPackage.Registry.INSTANCE.getEFactory(EntityPackage.eNS_URI);\n\t\t\tif (theEntityFactory != null) {\n\t\t\t\treturn theEntityFactory;\n\t\t\t}\n\t\t}\n\t\tcatch (Exception exception) {\n\t\t\tEcorePlugin.INSTANCE.log(exception);\n\t\t}\n\t\treturn new EntityFactoryImpl();\n\t}",
"public static DataModelBuilder create() {\n return new DataModelBuilder();\n }",
"public static PascalFactory init()\n {\n try\n {\n PascalFactory thePascalFactory = (PascalFactory)EPackage.Registry.INSTANCE.getEFactory(PascalPackage.eNS_URI);\n if (thePascalFactory != null)\n {\n return thePascalFactory;\n }\n }\n catch (Exception exception)\n {\n EcorePlugin.INSTANCE.log(exception);\n }\n return new PascalFactoryImpl();\n }",
"@Test(expected = IllegalArgumentException.class)\n public void testCreateIllegalMalayMoney() {\n setFactory(\"MalayMoneyFactory\");\n moneyFactory.createMoney(0.9);\n }",
"BusinessEntityFactory getBusinessEntityFactory();",
"public static Pack2Factory init() {\n\t\ttry {\n\t\t\tPack2Factory thePack2Factory = (Pack2Factory)EPackage.Registry.INSTANCE.getEFactory(Pack2Package.eNS_URI);\n\t\t\tif (thePack2Factory != null) {\n\t\t\t\treturn thePack2Factory;\n\t\t\t}\n\t\t}\n\t\tcatch (Exception exception) {\n\t\t\tEcorePlugin.INSTANCE.log(exception);\n\t\t}\n\t\treturn new Pack2FactoryImpl();\n\t}",
"public ProyectoFactoryImpl() {\r\n\t\tsuper();\r\n\t}",
"public static BusquedaMaker getInstance() {\n\t\tif (instance == null) {\n\t\t\tinstance = new BusquedaMaker();\n\t\t}\n\n\t\treturn instance;\n\t}",
"public static EditorFactory init() {\n\t\ttry {\n\t\t\tEditorFactory theEditorFactory = (EditorFactory)EPackage.Registry.INSTANCE.getEFactory(\"http://opaeum.org/uimetamodel/editor/1.0\"); \n\t\t\tif (theEditorFactory != null) {\n\t\t\t\treturn theEditorFactory;\n\t\t\t}\n\t\t}\n\t\tcatch (Exception exception) {\n\t\t\tEcorePlugin.INSTANCE.log(exception);\n\t\t}\n\t\treturn new EditorFactoryImpl();\n\t}",
"public InternalFloaterFactory() {\n super();\n }",
"public static ControlFactory init() {\n\t\ttry {\n\t\t\tControlFactory theControlFactory = (ControlFactory)EPackage.Registry.INSTANCE.getEFactory(\"http://opaeum.org/uimetamodel/control/1.0\"); \n\t\t\tif (theControlFactory != null) {\n\t\t\t\treturn theControlFactory;\n\t\t\t}\n\t\t}\n\t\tcatch (Exception exception) {\n\t\t\tEcorePlugin.INSTANCE.log(exception);\n\t\t}\n\t\treturn new ControlFactoryImpl();\n\t}",
"public static Business getInstance() {\n if (business == null) {\n business = new Business();\n }\n return business;\n }",
"public static TimedStateMachineFactory init() {\n\t\ttry {\n\t\t\tTimedStateMachineFactory theTimedStateMachineFactory = (TimedStateMachineFactory) EPackage.Registry.INSTANCE\n\t\t\t\t\t.getEFactory(TimedStateMachinePackage.eNS_URI);\n\t\t\tif (theTimedStateMachineFactory != null) {\n\t\t\t\treturn theTimedStateMachineFactory;\n\t\t\t}\n\t\t} catch (Exception exception) {\n\t\t\tEcorePlugin.INSTANCE.log(exception);\n\t\t}\n\t\treturn new TimedStateMachineFactoryImpl();\n\t}",
"public static ExternalServiceLayerCIMFactory init() {\n\t\ttry {\n\t\t\tExternalServiceLayerCIMFactory theExternalServiceLayerCIMFactory = (ExternalServiceLayerCIMFactory)EPackage.Registry.INSTANCE.getEFactory(ExternalServiceLayerCIMPackage.eNS_URI);\n\t\t\tif (theExternalServiceLayerCIMFactory != null) {\n\t\t\t\treturn theExternalServiceLayerCIMFactory;\n\t\t\t}\n\t\t}\n\t\tcatch (Exception exception) {\n\t\t\tEcorePlugin.INSTANCE.log(exception);\n\t\t}\n\t\treturn new ExternalServiceLayerCIMFactoryImpl();\n\t}",
"public static LambdaFactory get() {\n return get(LambdaFactoryConfiguration.get());\n }",
"public interface Factory<T> {\n\n /**\n * Returns an instance of the required type. The implementation determines whether or not a new or cached\n * instance is created every time this method is called.\n *\n * @return an instance of the required type.\n */\n T getInstance();\n}",
"public static BromiumFactory init()\n {\n try\n {\n BromiumFactory theBromiumFactory = (BromiumFactory)EPackage.Registry.INSTANCE.getEFactory(BromiumPackage.eNS_URI);\n if (theBromiumFactory != null)\n {\n return theBromiumFactory;\n }\n }\n catch (Exception exception)\n {\n EcorePlugin.INSTANCE.log(exception);\n }\n return new BromiumFactoryImpl();\n }",
"public static CertificationFactory init() {\n\t\ttry {\n\t\t\tCertificationFactory theCertificationFactory = (CertificationFactory)EPackage.Registry.INSTANCE.getEFactory(CertificationPackage.eNS_URI);\n\t\t\tif (theCertificationFactory != null) {\n\t\t\t\treturn theCertificationFactory;\n\t\t\t}\n\t\t}\n\t\tcatch (Exception exception) {\n\t\t\tEcorePlugin.INSTANCE.log(exception);\n\t\t}\n\t\treturn new CertificationFactoryImpl();\n\t}",
"public static GpflFactory init()\n {\n try\n {\n GpflFactory theGpflFactory = (GpflFactory)EPackage.Registry.INSTANCE.getEFactory(GpflPackage.eNS_URI);\n if (theGpflFactory != null)\n {\n return theGpflFactory;\n }\n }\n catch (Exception exception)\n {\n EcorePlugin.INSTANCE.log(exception);\n }\n return new GpflFactoryImpl();\n }",
"public static Tp2Factory init() {\n\t\ttry {\n\t\t\tTp2Factory theTp2Factory = (Tp2Factory)EPackage.Registry.INSTANCE.getEFactory(\"http:///recette1-tp2-v0\"); \n\t\t\tif (theTp2Factory != null) {\n\t\t\t\treturn theTp2Factory;\n\t\t\t}\n\t\t}\n\t\tcatch (Exception exception) {\n\t\t\tEcorePlugin.INSTANCE.log(exception);\n\t\t}\n\t\treturn new Tp2FactoryImpl();\n\t}",
"public static DAOFactory getInstance() {\r\n return instance;\r\n }",
"@Override\r\n\tpublic Product factory() {\n\t\treturn new ConcreteProduct2();\r\n\t}",
"PlanningFactory getFactory();",
"private DAOJPAFactory() {\r\n }",
"public PaxosRound createRound()\n {\n return createRound(0);\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 }",
"public static Factory factory() {\n return text::new;\n }",
"public static FixtureCache getInstance() {\n\t\tif(instance==null) {\n\t\t\tsynchronized(lock) {\n\t\t\t\tif(instance==null) {\n\t\t\t\t\tinstance = new FixtureCache();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn instance;\n\t}",
"public FactoryValue( ) \r\n {\r\n }",
"public static PiviFactory init() {\r\n\t\ttry {\r\n\t\t\tPiviFactory thePiviFactory = (PiviFactory)EPackage.Registry.INSTANCE.getEFactory(PiviPackage.eNS_URI);\r\n\t\t\tif (thePiviFactory != null) {\r\n\t\t\t\treturn thePiviFactory;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (Exception exception) {\r\n\t\t\tEcorePlugin.INSTANCE.log(exception);\r\n\t\t}\r\n\t\treturn new PiviFactoryImpl();\r\n\t}"
] | [
"0.72678435",
"0.6556473",
"0.62969315",
"0.61724734",
"0.6123452",
"0.59346175",
"0.5816365",
"0.5778038",
"0.561429",
"0.56127423",
"0.56082827",
"0.55945134",
"0.55883133",
"0.55459267",
"0.5524017",
"0.5508178",
"0.5502636",
"0.5491658",
"0.5480847",
"0.5450702",
"0.54490614",
"0.54454577",
"0.5444064",
"0.54190654",
"0.5418428",
"0.5384144",
"0.5356014",
"0.5331219",
"0.53292537",
"0.5324925",
"0.5311578",
"0.53054535",
"0.5301728",
"0.5289148",
"0.5285555",
"0.52803874",
"0.5278624",
"0.527346",
"0.5263338",
"0.52425337",
"0.5241132",
"0.5240227",
"0.51942015",
"0.5192513",
"0.5189746",
"0.5187992",
"0.5170788",
"0.51676226",
"0.5164532",
"0.51585746",
"0.51547617",
"0.5153087",
"0.51492006",
"0.51464564",
"0.5143908",
"0.5133213",
"0.51272476",
"0.5124722",
"0.51092714",
"0.51066154",
"0.51028913",
"0.5101608",
"0.5101501",
"0.509721",
"0.50831884",
"0.5079547",
"0.50572944",
"0.50496143",
"0.5046463",
"0.50426996",
"0.5039773",
"0.5036232",
"0.5033618",
"0.503336",
"0.50315255",
"0.5019076",
"0.50174433",
"0.50157857",
"0.5013685",
"0.50074995",
"0.4999946",
"0.49896213",
"0.49857873",
"0.49847287",
"0.4981279",
"0.4979944",
"0.49657476",
"0.49656388",
"0.49634698",
"0.4962647",
"0.4958787",
"0.49575374",
"0.49547184",
"0.4953373",
"0.4953283",
"0.4951834",
"0.49509314",
"0.49453804",
"0.494419",
"0.49409753"
] | 0.8726338 | 0 |
Set the factory to f in the parameter. | public static void setMoneyFactory(MoneyFactory f) {
factory = f;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setFactory(ValueFactory<K, V> factory)\n {\n this.factory = factory;\n }",
"void setFactoryBean( FactoryBean factory );",
"public void setFeatureFactory(FeatureFactory featureFactory) {\n factory = featureFactory;\n }",
"private void setupFactory(Factory f) {\n f.createQuery(f.getModel().getRootPackage()).filterChildren(e -> {\n e.setFactory(f);\n return false;\n }).list();\n }",
"public void setF(boolean f) {\n\tthis.f = f;\n }",
"public static void setInputFactory(final IInputFactory inputFactory) {\n\n m_InputFactory = inputFactory;\n\n }",
"public Builder setF(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n f_ = value;\n onChanged();\n return this;\n }",
"private FactoryTransformer(Factory factory) {\n super();\n iFactory = factory;\n }",
"protected void setFactory(HttpClientFactory factory) {\n\t\tthis.factory = factory;\n\t}",
"void setObjectFactory(Injectable injectable, ObjectFactory<?> objectFactory);",
"public void setFactory(JDOMFactory factory) {\n this.factory = factory;\n }",
"public static void setActionFactory(AnnotatedActionFactory factory) {\n/* 92 */ Objects.requireNonNull(factory);\n/* 93 */ actionFactory = factory;\n/* */ }",
"public void setFactor(int f) { this.factor = f; }",
"public void setF(){\n\t\tf=calculateF();\n\t}",
"private void setFactory(String factoryClass) {\n MoneyFactory moneyFactory = null;\n try {\n moneyFactory = (MoneyFactory) Class.forName(\"coinpurse.\" + factoryClass).newInstance();\n } catch (IllegalAccessException | InstantiationException | ClassNotFoundException e) {\n System.out.println(\"Cannot create Money Factory.\");\n System.exit(0);\n }\n if (moneyFactory == null) System.exit(0);\n MoneyFactory.setFactory(moneyFactory);\n this.moneyFactory = MoneyFactory.getInstance();\n if (moneyFactory.getClass().equals(ThaiMoneyFactory.class)) currency = \"Baht\";\n else if (moneyFactory.getClass().equals(MalayMoneyFactory.class)) currency = \"Ringgit\";\n }",
"public void setFilter(Filter f){\r\n\t\tthis.filtro = new InputFilter(f);\r\n\t}",
"@Autowired\n\tpublic void setFactory(SessionFactory factory) {\n\t\tthis.factory = factory;\n\t}",
"public void put(String uri, FunctionFactory f) { registry.put(uri,f) ; }",
"public void setFunction(SoSensorCB f) {\n\t\t func = f; \n\t}",
"public void setSf(SessionFactory sf) {\r\n\t\tthis.sf = sf;\r\n\t}",
"public void setDependencyFactory( DependencyFactory dependencyFactory ) \r\n {\r\n this.dependencyFactory = dependencyFactory;\r\n }",
"public void setBeanFactory(BeanFactory beanFactory)\r\n/* 35: */ {\r\n/* 36: 77 */ this.beanFactory = beanFactory;\r\n/* 37: */ }",
"void setDataModelFactory (DataModelFactory factory);",
"public void setConsumerFactory( ConsumerFactory<K, V> consumerFactory ) {\n this.consumerFactory = consumerFactory;\n }",
"public Target setActionFactory(Method actionFactory) {\n this.actionFactory = actionFactory;\n return this;\n }",
"public synchronized static void setFactory(ImageDecoderFactory factory) {\n defaultInstance = factory ;\n }",
"void setObjectFactory(Injectable injectable, ObjectFactory<?> objectFactory, InjectionAttributes attributes);",
"protected static void setParam(Object o, Field f, CommandSetting s, String key) throws ReflectiveOperationException,\r\n\t\t\tNameNotFoundException, IllegalArgumentException, notFoundException, CannotConvertException {\n\t\tf.setAccessible(true);\r\n\t\tClass<?> cls = f.getType();\r\n\t\tif (cls == int.class) {\r\n\t\t\tf.set(o, s.getAsInt(key));\r\n\t\t} else if (cls == double.class) {\r\n\t\t\tf.set(o, s.getAsDouble(key));\r\n\t\t} else if (cls == boolean.class) {\r\n\t\t\tf.set(o, s.getAsBool(key));\r\n\t\t} else if (Sequence.class.isAssignableFrom(cls)) {\r\n\t\t\tassert false;\r\n\r\n\t\t\t// f.set(o, Sequence.getSequence(s.getAsStr(key)));\r\n\t\t} else {\r\n\t\t\tf.set(o, s.get(key));\r\n\t\t}\r\n\t}",
"public static void setCustomFactoryHandler(CustomFactoryHandler factoryHandler)\n {\n DBFactory.factoryHandler = factoryHandler;\n }",
"public final void SetEntryFactory(IEntryFactory factory)\n\t{\n\t\tentryFactory = factory;\n\t}",
"public DeviceFamilyImpl(DeviceFactory df){\n\t\tsuper((Class<T>) c);\n\t\tthis.df = df;\n\t}",
"void setFilter(Filter f);",
"@SuppressWarnings(\"UnusedReturnValue\")\n @Override\n public T setField(T f) {\n T temp = mField;\n mField = f;\n return temp;\n }",
"public void setStubFactoryFactory(boolean paramBoolean, PresentationManager.StubFactoryFactory paramStubFactoryFactory) {\n/* 176 */ if (paramBoolean) {\n/* 177 */ this.dynamicStubFactoryFactory = paramStubFactoryFactory;\n/* */ } else {\n/* 179 */ this.staticStubFactoryFactory = paramStubFactoryFactory;\n/* */ } \n/* */ }",
"private Builder(final Function<Builder, DoubleFunction<String>> factory) {\n this.factory = factory;\n }",
"public ObjectifyFactory factory() {\n return ofy().factory();\n }",
"private void setCurrentFacility(Point f){\n\t\t\n\t\t_currentFacility = f;\n\t\n\t}",
"public void setNodeFactory(NodeFactory nodeFactory)\n {\n this.nodeFactory = nodeFactory;\n }",
"void setFmla(java.lang.String fmla);",
"private void setLambdaInvokeFactory(Context context) {\n factory = new LambdaInvokerFactory(\n context,\n Regions.US_EAST_1,\n this.credentialsProvider);\n }",
"public void colores(int f) {\n this.f = f;\n }",
"public static void setSAXParserFactory(SAXParserFactory pFactory) {\n spf = pFactory;\n }",
"PlanningFactory getFactory();",
"public void setObjectFactory(PoolObjectFactory factory) {\n if (initialized)\n throw new IllegalStateException(INITIALIZED);\n this.factory = factory;\n }",
"public FactoryValue( ) \r\n {\r\n }",
"public void setPrf(gov.nih.nlm.ncbi.www.SeqIdDocument.SeqId.Prf prf)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n gov.nih.nlm.ncbi.www.SeqIdDocument.SeqId.Prf target = null;\r\n target = (gov.nih.nlm.ncbi.www.SeqIdDocument.SeqId.Prf)get_store().find_element_user(PRF$26, 0);\r\n if (target == null)\r\n {\r\n target = (gov.nih.nlm.ncbi.www.SeqIdDocument.SeqId.Prf)get_store().add_element_user(PRF$26);\r\n }\r\n target.set(prf);\r\n }\r\n }",
"public FvFactoryImpl() {\n\t\tsuper();\n\t}",
"public STFBehaviour(Faction faction)\n\t{\n\t\tfFaction = faction;\n fRandom = new Random();\n\t}",
"@SuppressWarnings(\"UnusedReturnValue\")\n @Override\n public T setField (T f) {\n T temp = mField;\n mField = f;\n return temp;\n }",
"public void setFA(java.lang.String param){\r\n \r\n if (param != null){\r\n //update the setting tracker\r\n localFATracker = true;\r\n } else {\r\n localFATracker = false;\r\n \r\n }\r\n \r\n this.localFA=param;\r\n \r\n\r\n }",
"public ValueFactory<K, V> getFactory()\n {\n return factory;\n }",
"public static Factory factory() {\n return ext_dbf::new;\n }",
"public interface Factory {\n /* renamed from: a */\n Call mo35727a(Request request);\n }",
"public StratmasParameterFactory() \n {\n this.typeMapping = createTypeMapping();\n }",
"public StyxSerializer(ObjectFactory factory) {\n this.factory = factory;\n }",
"public void setServerSocketFactory(ServerSocketFactory factory){\n this.factory = factory;\n }",
"Factory getFactory()\n {\n return configfile.factory;\n }",
"public void setInitialFactory(String initialFactory) {\r\n this.initialFactory = initialFactory;\r\n }",
"void setFeatures(Features f) throws Exception;",
"void setFigure(FigureInfo f);",
"public void setfUser(FirebaseUser f){\n fUser = f;\n }",
"public void set(int dim, float f)\n {\n switch(dim)\n {\n case 0:\n {\n fx = f;\n }\n case 1:\n {\n fy = f;\n }\n case 2:\n {\n fz = f;\n }\n default:\n {\n Log.d(\"debug1\", \"Bad Float Set to Vector.\");\n }\n }\n setMagnitude();\n }",
"public static void setButtonGroupFactory(ButtonGroupFactory newVal) {\n\t\tfactory = newVal;\n\t}",
"@Test\n public void testSetNumber() {\n factory.setNumber(1).setCurrency(\"CHF\");\n assertEquals(Geldbetrag.valueOf(\"1 CHF\"), factory.create());\n }",
"void setSocketFactory(SocketFactory socketFactory);",
"public final JsonFactory configure(Feature f, boolean state)\n/* */ {\n/* 532 */ return state ? enable(f) : disable(f);\n/* */ }",
"public abstract ProductFactory getFactory();",
"private void setForceField(String ffname) throws CDKException {\n\t\tif (ffname == null) {\n\t\t\tffname = \"mm2\";\n\t\t}\n\t\ttry {\n\t\t\tforceFieldName = ffname;\n\t\t\tffc.setForceFieldConfigurator(ffname);\n\t\t\tparameterSet = ffc.getParameterSet();\n\t\t} catch (Exception ex1) {\n\t\t\tlogger.error(\"Problem with ForceField configuration due to>\" + ex1.getMessage());\n\t\t\tlogger.debug(ex1);\n\t\t\tthrow new CDKException(\"Problem with ForceField configuration due to>\" + ex1.getMessage(), ex1);\n\t\t}\n\t}",
"public interface Factory {\r\n}",
"public Factory getFactory()\r\n {\r\n if( m_factory != null ) return m_factory;\r\n m_factory = FactoryHelper.narrow( m_primary );\r\n return m_factory;\r\n }",
"@Test\n public void testCreateFactory() {\n setFactory(\"ThaiMoneyFactory\");\n assertEquals(ThaiMoneyFactory.class, moneyFactory.getClass());\n assertNotEquals(MalayMoneyFactory.class, moneyFactory.getClass());\n assertEquals(currency, \"Baht\");\n setFactory(\"MalayMoneyFactory\");\n assertEquals(MalayMoneyFactory.class, moneyFactory.getClass());\n assertNotEquals(ThaiMoneyFactory.class, moneyFactory.getClass());\n assertEquals(currency, \"Ringgit\");\n }",
"public void setX(float f)\n {\n fx = f;\n setMagnitude();\n }",
"TransformFactory getFactory();",
"public void setFormat(final NumberFormat f) {\r\n format = f;\r\n }",
"public void setFactoryDAO(DAOFactory factoryDAO) {\n\t\tthis.factoryDAO = factoryDAO;\n\t}",
"public void setFact(Fact[] param) {\r\n\r\n validateFact(param);\r\n\r\n localFactTracker = true;\r\n\r\n this.localFact = param;\r\n }",
"public static void setGUIFactory(final IGUIFactory guiFactory) {\n\n m_GUIFactory = guiFactory;\n\n }",
"public void setFilial(int filial);",
"public JsonFactory enable(Feature f)\n/* */ {\n/* 540 */ this._factoryFeatures |= f.getMask();\n/* 541 */ return this;\n/* */ }",
"public synchronized static void setFASTAWriter(FASTAWriterFactory factory, String regex) {\r\n // treat the extension as a regular expression\r\n Pattern pattern = Pattern.compile(regex);\r\n writers.put(pattern, factory);\r\n }",
"public void setFClass(String fClass) {\n\t\t\tthis.fClass = fClass;\n\t\t}",
"public void setAdapterFactory(AdapterFactory adapterFactory)\n {\n this.adapterFactory = adapterFactory;\n }",
"public DefaultFieldDecorator(ElementLocatorFactory factory) {\n\t\tthis.factory = factory;\n\t}",
"public void setItemElementFactory(ElementFactory itemElementFactory) {\n \t\tthis.itemElementFactory = itemElementFactory;\n \t}",
"public final JsonFactory configure(JsonGenerator.Feature f, boolean state)\n/* */ {\n/* 626 */ return state ? enable(f) : disable(f);\n/* */ }",
"@Override\n\tpublic void setForm(Form f) {\n\t\tsuper.setForm(f);\n\n\t\tfor (SPhraseSpec s : this.coordinator.coordinates) {\n\t\t\ts.setForm(f);\n\t\t}\n\t}",
"public void setFaceValue(double f){\n\t\tface = f ;\n\t}",
"public Factory(BaseProcessingEnvImpl env) {\n _env = env;\n }",
"Builder injectionFactory(InjectionObjectFactory factory);",
"public void setOutputBufferFactory (OutputBufferFactory factory) {\n this.factory = factory;\n }",
"public void setActivatableFactory(ActivatableFactory activatableFactory) {\n this.activatableFactory = activatableFactory;\n }",
"public void setDataSourceFactory(Factory<DataSource> dataSourceFactory) {\n this.dataSourceFactory = dataSourceFactory;\n }",
"public void mo3777a(float f) {\n this.f1443S = f;\n }",
"protected Figure newFigure( Point2D p, Figure f ) {\n\t\tSistema.logger.info( \"Creating actor at \" + p.getX() + \",\" + p.getY() );\n\t\tActorFigure figure = new ActorFigure( \"teste\" );\n\t\tfigure.setLocation( p );\n\t\treturn figure;\n\t}",
"public Builder methodArgumentFactory(MethodArgumentFactory methodArgumentFactory) {\n\t\t\tthis.methodArgumentFactory = methodArgumentFactory;\n\t\t\treturn this.me();\n\t\t}",
"public interface FilterFactory<K, G> extends Serializable\n{\n\t/**\n\t * Creates a set of filters for the given token,tag, and tag-of-previous-token.\n\t * The convention is as follows:\n\t * Let each feature f be a feature that <B>might</B> return non-zero for the given token,tag,previous-tag.\n\t * That feature is encapsulated with a {@link Filter} in a {@link CrfFilteredFeature}. Let's call this filter \"t\".\n\t * For that filter there exist one filter in the set returned by this function, name it \"t'\", such that \"t'\" equals to \"t\".\n\t * \n\t * \n\t * @param sequence A sequence of tokens\n\t * @param tokenIndex An index of a token in that sequence\n\t * @param currentTag A tag for that token\n\t * @param previousTag A tag for the token which immediately precedes that token.\n\t * @return A set of filters as described above.\n\t */\n\tpublic Set<Filter<K, G>> createFilters(K[] sequence, int tokenIndex, G currentTag, G previousTag);\n}",
"public void setField(int i, Field f) {\n\n\t\tif (i < 0 || i >= fields.size())\n\t\t\treturn;\n\t\tfields.add(i, f);\n\n\t}",
"public void setXPathFactory(XPathFactory xpathFactory)\n {try{__CLR4_0_68g8gl1l0dv4j.R.inc(307);\n __CLR4_0_68g8gl1l0dv4j.R.inc(308);this.xpathFactory = xpathFactory;\n }finally{__CLR4_0_68g8gl1l0dv4j.R.flushNeeded();}}",
"void setTf(TrabajadorFormulario tf) {\n this.tf=tf;\n }",
"@Required\n public void setXmlFilterFactory(XmlFilterFactory xmlFilterFactory) {\n this.xmlFilterFactory = xmlFilterFactory;\n }"
] | [
"0.7220745",
"0.68872446",
"0.67755854",
"0.65451247",
"0.61087483",
"0.6080093",
"0.6033242",
"0.6030495",
"0.60014546",
"0.5930983",
"0.5908865",
"0.5808983",
"0.57685876",
"0.57591754",
"0.5755716",
"0.5723965",
"0.56939924",
"0.5680209",
"0.5676038",
"0.56488204",
"0.564248",
"0.5641283",
"0.56354105",
"0.56065977",
"0.5590732",
"0.5582087",
"0.55740976",
"0.55698925",
"0.55441755",
"0.5534786",
"0.5519866",
"0.55143356",
"0.5513628",
"0.5506879",
"0.54989034",
"0.54542595",
"0.5452811",
"0.5444736",
"0.54445213",
"0.543378",
"0.5413322",
"0.5410842",
"0.54099935",
"0.5406916",
"0.5391655",
"0.53859866",
"0.5375136",
"0.53607273",
"0.53503895",
"0.5319789",
"0.53185016",
"0.53171384",
"0.5312179",
"0.53102124",
"0.5298678",
"0.5292277",
"0.5271002",
"0.52515763",
"0.5242711",
"0.52272177",
"0.52251977",
"0.5224462",
"0.5216162",
"0.5211055",
"0.52048343",
"0.51948035",
"0.51742333",
"0.51663625",
"0.51639324",
"0.5161088",
"0.5153019",
"0.5148196",
"0.5145508",
"0.5144182",
"0.51404464",
"0.51383734",
"0.51379657",
"0.51357675",
"0.51218647",
"0.5110695",
"0.5109331",
"0.51078635",
"0.51045805",
"0.510157",
"0.50854003",
"0.5081159",
"0.5077479",
"0.5069914",
"0.506492",
"0.50607985",
"0.5045701",
"0.5044924",
"0.5044289",
"0.50441164",
"0.5043589",
"0.5042105",
"0.50420475",
"0.50343037",
"0.50328463",
"0.5024017"
] | 0.7281379 | 0 |
Abstract method, used to create the money by primitive double, for edited in each country factory. | abstract Valuable createMoney(double value); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic Valuable createMoney(double value) {\n\t\tValuable thaiMoney = null;\n\t\tif ( isCoin(value) ) {\n\t\t\tthaiMoney = new Coin(value);\n\t\t} else if ( isBankNote(value) ) {\n\t\t\tthaiMoney = new BankNote(value, nextSerialNumber++);\n\t\t} else {\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\treturn thaiMoney;\n\t}",
"@Test\n public void testSetNumberDouble() {\n factory.setNumber(0.25).setCurrency(\"EUR\");\n assertEquals(Geldbetrag.valueOf(\"0.25 EUR\"), factory.create());\n }",
"double getMoney();",
"@Override\n\tpublic Valuable createMoney(double value) {\n\t\tboolean check = false;\n\t\tfor(double d: MONEY){\n\t\t\tif(d == value) check = true;\n\t\t}\n\t\tif(!check) throw new IllegalArgumentException(String.format(\"No %.2f %s money\", value, MARLAY_CURR));\n\t\tif(value > 1) return new BankNote(value, MARLAY_CURR, nextSerialNumber++);\n\t\treturn new Coin(value, MARLAY_CURR);\n\t}",
"public Currency(String country,double value, double valueUSD){\n this.country = country;\n this.value = value;\n this.valueUSD = valueUSD;\n}",
"@Override\n\tvoid money() {\n\t\t\n\t}",
"abstract public double getPrice();",
"public interface AmountFactory {\r\n Amount amountFrom(BigDecimal amountValue);\r\n\r\n Amount amountFrom(BigDecimal amountValue, BigDecimal multiplier);\r\n}",
"@Test\n public void testCreateLegalMoney() {\n setFactory(\"ThaiMoneyFactory\");\n double[] thaiValue = {1, 2, 5, 10, 20, 50, 100, 500, 1000};\n for (double val : thaiValue) {\n assertEquals(makeValuable(val), moneyFactory.createMoney(val));\n }\n setFactory(\"MalayMoneyFactory\");\n double[] malayValue = {0.05, 0.10, 0.20, 0.50, 1, 2, 5, 10, 20, 50, 100};\n for (double val : malayValue) {\n assertEquals(makeValuable(val), moneyFactory.createMoney(val));\n }\n }",
"private Valuable makeValuable(double value) {\n if (currency.equals(\"Baht\")) {\n if (value == 1 || value == 2 || value == 5 || value == 10)\n return new Coin(value, currency);\n else if (value == 20 || value == 50 || value == 100 || value == 500 || value == 1000) {\n return new BankNote(value, currency);\n }\n } else if (currency.equals(\"Ringgit\")) {\n if (value == 0.05 || value == 0.1 || value == 0.2 || value == 0.5)\n return new Coin(value, currency);\n else if (value == 1 || value == 2 || value == 5 || value == 10 || value == 20 || value == 50 || value == 100)\n return new BankNote(value, currency);\n }\n throw new IllegalArgumentException(\"Cannot create \" + value + \" \" + currency);\n }",
"abstract protected BigDecimal getBasicTaxRate();",
"public double getMoney(){\n return money;\n }",
"public abstract T fromDouble(Double d);",
"public MoneyRecMoneyConverter(double amount)\r\n\t{\r\n\t\tthis.amount = amount;\r\n\t}",
"public void setMoney(Double money) {\n this.money = money;\n }",
"@Test\n public void testSetCurrency() {\n CurrencyUnit cu = Waehrung.of(\"XXX\");\n factory.setCurrency(cu);\n Geldbetrag geldbetrag = factory.create();\n assertEquals(cu, geldbetrag.getCurrency());\n }",
"@Override \npublic double getPaymentAmount() { \n return getCommissionRate() * getGrossSales(); \n}",
"public abstract double pay();",
"public abstract double getDepositDiscount();",
"protected MoneyFactory() {\n\t}",
"public Double getMoney() {\n return money;\n }",
"@Override\n public double payment(double amount) {\n return amount * 98 / 100 ;\n }",
"Gradian createGradian();",
"public void setPriceActual (BigDecimal PriceActual);",
"public ModelPayment(double payment) {\n this.payment = payment;\n }",
"BigDecimal getPrice();",
"public Money(float amount) {\n setAmountFloat(amount);\n }",
"public double dollarTorp()\r\n\t{\r\n\t\treturn getAmount() * 14251.25;\r\n\t}",
"public double getPricePerSquareFoot(){\nreturn pricePerSquareFoot;\n}",
"double getPrice();",
"double getPrice();",
"double getPrice();",
"public abstract double initialise();",
"public Currency() {\n // Instances built via this constructor have undefined behavior.\n }",
"public abstract double calculateTax();",
"public void setMoney(double money) {\n this.money = money;\n }",
"int getMoney();",
"public static NumberAmount create(){\n NumberAmount NA = new NumberAmount(new AdvancedOperations(Digit.Zero()));\n return NA;\n }",
"double getPricePerPerson();",
"double purchasePrice();",
"QuoteCoefficient createQuoteCoefficient();",
"public void setPrice(double price){this.price=price;}",
"BigDecimal getDirtyPrice();",
"public abstract double getCost();",
"public abstract double getComplianceFee();",
"public BigDecimal getPriceActual();",
"@Override public double getCosto(){\n double d = 190.00;\n return d;\n }",
"public void setPrice(Double price);",
"public abstract double getDiscountRate();",
"public void setPriceStd (BigDecimal PriceStd);",
"protected abstract Double getRate(T object);",
"public void setPriceEntered (BigDecimal PriceEntered);",
"public void setPriceStdWTax (BigDecimal PriceStdWTax);",
"public SavingsAccount(double rate) //setting interest rate with constructor\r\n { \r\n interestRate = rate;\r\n }",
"BigDecimal getAmount();",
"public Double getPrice();",
"@Override\n public double getPrice() {\n return 2.5;\n }",
"public double getPrice(){return price;}",
"public abstract String withdrawAmount(double amountToBeWithdrawn);",
"@Override\n\tpublic void OkHereIsMoney(double amount) {\n\t\t\n\t}",
"public abstract BaseQuantityDt setValue(BigDecimal theValue);",
"NumberValue createNumberValue();",
"public BankAccount(double basicMoney) {\n\t\tthis.money = basicMoney;\n\t}",
"int getMoneyValue();",
"int getMoneyValue();",
"void newSale(double totalWithTaxes);",
"public BigDecimal getPriceStd();",
"public void setAmount(Double amount) {\r\n this.amount = amount;\r\n }",
"Quantity createQuantity();",
"public void setMoney(double money) { //void method has no return type.\n\t\tthis.money=money;\n\t}",
"public double convert(double amount, Unit u);",
"public double getPrice();",
"abstract public double getBegBal(int yr);",
"void setIncome(double amount);",
"double applyTax(double price);",
"public BigDecimal getMoney() {\r\n return money;\r\n }",
"public BigDecimal getMoney() {\r\n return money;\r\n }",
"public BigDecimal getMoney() {\r\n return money;\r\n }",
"public BigDecimal getPriceStdWTax();",
"Valuable createMoney(String value) {\n\t\ttry {\n\t\t\tDouble.parseDouble(value);\n\t\t} catch (NumberFormatException e) {\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\treturn createMoney(Double.parseDouble(value));\n\t}",
"private Currency(String name, double unitValueAsDollar)\n\t{\n\t\tthis.name = name;\n\t\tthis.unitValueAsDollar = unitValueAsDollar;\n\t}",
"public Money getPrice() {\n return price;\n }",
"public int price(){\n return 2;\n }",
"public void deposit(double value){\r\n balance += value;\r\n}",
"protected abstract BigDecimal calculate();",
"public double getMoney() {\n return money_;\n }",
"BigDecimal getTax();",
"@Test\n public void testConstantPricePerUnit() throws Exception {\n {\n Product beans = new Product(\n \"Can of Beans\",\n \"SKU-0001\",\n ToMoney.from(Multiply.by(65)));\n\n assertEquals(new Money(0*65),beans.getPrice(0));\n assertEquals(new Money(1*65),beans.getPrice(1));\n assertEquals(new Money(2*65),beans.getPrice(2));\n assertEquals(new Money(3*65),beans.getPrice(3));\n }\n // or, using the speical constructor:\n {\n Product beans = new Product(\n \"Can of Beans\",\n \"SKU-0001\",\n 65);\n\n assertEquals(new Money(0*65),beans.getPrice(0));\n assertEquals(new Money(1*65),beans.getPrice(1));\n assertEquals(new Money(2*65),beans.getPrice(2));\n assertEquals(new Money(3*65),beans.getPrice(3));\n }\n }",
"public abstract double getTaxValue(String country);",
"public void setPriceStdEntered (BigDecimal PriceStdEntered);",
"ShipmentCostEstimate createShipmentCostEstimate();",
"protected abstract double getDefaultCost();",
"public void setCurrency1(BigDecimal newCurrency1) {\n\tcurrency1 = newCurrency1;\n}",
"public BigDecimal getPriceListWTax();",
"public Coin(double value, String name) {\n this.value = value;\n this.name = name;\n }",
"public void setMoney(BigDecimal money) {\r\n this.money = money;\r\n }",
"public void setMoney(BigDecimal money) {\r\n this.money = money;\r\n }",
"public void setMoney(BigDecimal money) {\r\n this.money = money;\r\n }",
"public BigDecimal getMoney() {\n return money;\n }",
"public BigDecimal getMoney() {\n return money;\n }"
] | [
"0.7180781",
"0.6706116",
"0.6550309",
"0.64953625",
"0.6417322",
"0.62035227",
"0.6188539",
"0.6182747",
"0.61757565",
"0.6132721",
"0.6127725",
"0.6094112",
"0.60730183",
"0.60711575",
"0.6040978",
"0.60087305",
"0.59450036",
"0.59396183",
"0.58765864",
"0.5875992",
"0.5873878",
"0.58676445",
"0.5831456",
"0.58231574",
"0.5814529",
"0.5803139",
"0.5785641",
"0.5767952",
"0.57525927",
"0.5738589",
"0.5738589",
"0.5738589",
"0.57376534",
"0.57356167",
"0.5733983",
"0.5726902",
"0.57253695",
"0.5723839",
"0.5722229",
"0.57108855",
"0.57099605",
"0.5693037",
"0.5683427",
"0.56815904",
"0.5660817",
"0.5654127",
"0.5652031",
"0.565078",
"0.5636201",
"0.56344754",
"0.56333995",
"0.5630939",
"0.5623464",
"0.5623039",
"0.56218207",
"0.56200767",
"0.5619622",
"0.5609197",
"0.56015044",
"0.55951",
"0.5588932",
"0.5587879",
"0.5583411",
"0.55804825",
"0.55804825",
"0.5579578",
"0.5576179",
"0.5571344",
"0.55703914",
"0.55677336",
"0.55649036",
"0.55633754",
"0.5559626",
"0.55592304",
"0.5558281",
"0.5557157",
"0.5557157",
"0.5557157",
"0.555507",
"0.55548763",
"0.55529404",
"0.55509686",
"0.5547803",
"0.5546588",
"0.55456746",
"0.5540498",
"0.5538783",
"0.5534496",
"0.553405",
"0.5533075",
"0.5527373",
"0.5518025",
"0.5516734",
"0.5514385",
"0.55051684",
"0.550347",
"0.550347",
"0.550347",
"0.5492273",
"0.5492273"
] | 0.79024106 | 0 |
Try parsing String value into Double to use createMoney(double value) method. Return the money in valuable, if try parsing String into Double and it's possible. Throw the IllegalArgumentException if cannot. | Valuable createMoney(String value) {
try {
Double.parseDouble(value);
} catch (NumberFormatException e) {
throw new IllegalArgumentException();
}
return createMoney(Double.parseDouble(value));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static Value<Double> parseDouble(String value) {\n try {\n if (value == null || value.isEmpty()) return empty();\n return of(Double.parseDouble(value));\n } catch (NumberFormatException error) {\n return empty();\n }\n }",
"private static double validateAmount(String amount) {\n \n double newAmount = 0.0;\n if(!amount.isEmpty()) {\n \n newAmount = Double.parseDouble(amount);\n }\n return newAmount;\n }",
"private static double stringToDouble(String valor) throws ParseException\n\t{\n\t\tDecimalFormat format = new DecimalFormat(\"#,###,##0.00\", new DecimalFormatSymbols(Locale.ENGLISH));\n\t\t\n\t\tdouble result = 0.0d;\n\t\ttry\n\t\t{\n\t\t\tif(!valor.equalsIgnoreCase(\"\"))\n\t\t\t{\n\t\t\t\tresult = format.parse(valor).doubleValue();\n\t\t\t}\n\t\t}\n\t\tcatch(ParseException e)\n\t\t{\n\t\t\tresult = 0;\n\t\t}\n\n\t\treturn result;\n\t}",
"abstract Valuable createMoney(double value);",
"private double parseAmount(String amount){\n return Double.parseDouble(amount.replace(\",\", \".\"));\n }",
"private static double checkInput(String input) {\n\t\tdouble parsedValue = 0;\n\t\ttry {\n\t\t\tparsedValue = Double.parseDouble(input);\n\t\t} catch (NumberFormatException parseFailed) {\n\t\t\tSystem.out.println(\"'\" + input + \"' se ne može protumačiti kao broj.\");\n\t\t\treturn ERROR;\n\t\t}\n\n\t\tif (parsedValue > 0) {\n\t\t\treturn parsedValue;\n\t\t} else if (parsedValue < 0) {\n\t\t\tSystem.out.println(\"Unijeli ste negativnu vrijednost.\");\n\t\t} else {\n\t\t\tSystem.out.println(\"Ne postoji pravokutnik sa stranicom duljine nula.\");\n\t\t}\n\t\treturn ERROR;\n\t}",
"public static double validDouble(String message){\n boolean success = false;\n double value = -1;\n do {\n try {\n value = (double)readNumber(message, \"double\");\n success = true;\n } catch (InputMismatchException e){\n System.out.println(\"Debe introducir un valor numérico válido... \");\n }\n } while(!success);\n return value;\n }",
"private boolean okay( String s )\n {\n try{\n double x = Double.parseDouble( s );\n return true;\n }\n catch(Exception e)\n {\n return false;\n }\n }",
"private Double parseDouble(String value, String description) throws InvalidStateException {\r\n try {\r\n Double numeric = Double.valueOf(value);\r\n if (numeric.isNaN()) {\r\n throw new InvalidStateException(\"Could not understand '\" + value + \"' in \" + description);\r\n }\r\n return numeric;\r\n } catch (NumberFormatException nfe) {\r\n throw new InvalidStateException(\"Could not understand '\" + value + \"' in \" + description);\r\n }\r\n }",
"private boolean isValidDouble(String text) {\r\n \ttry {\r\n \t\tDouble value = Double.valueOf(text);\r\n \t} catch (NumberFormatException e) {\r\n \t\treturn false;\r\n \t}\r\n \treturn true;\r\n }",
"private double getTextToDouble(JTextField text) {\n try {\n Double.parseDouble(text.getText());\n\n } catch (NumberFormatException e) {\n JOptionPane.showMessageDialog(null, \"Input format for : \" + text.getText() + \" is illegal! Input number!\"\n , \"Error message\", JOptionPane.ERROR_MESSAGE);\n }\n return Double.parseDouble(text.getText());\n\n }",
"public static double getDecimal() throws ValorInvalidoException {\n double number;\n try {\n number=Double.parseDouble(getString());\n }catch(NumberFormatException e) {\n throw new ValorInvalidoException();\n }\n return number;\n }",
"public static double parseDouble(String val)\n {\n if(val == null || val.trim().length() == 0)\n {\n return 0;\n }\n else\n {\n return Double.parseDouble(val);\n }\n }",
"public static double getAmount(String value) {\n\t\tvalue = value.substring(1);\n\t\tdouble valueDouble = Double.parseDouble(value);\n\t\treturn valueDouble;\n\t}",
"public boolean tryParseDouble(String value)\n {\n try {\n Double.parseDouble(value);\n return true;\n } catch(NumberFormatException e) {\n return false;\n }\n }",
"private static double parsePrice(String price) {\n if (price.startsWith(\"$\")) {\n price = price.substring(1);\n }\n\n try {\n return Double.parseDouble(price);\n } catch (NumberFormatException e) {\n return Double.NEGATIVE_INFINITY;\n }\n }",
"public static Double getDoubleFromString(String value) {\n\n if (value == null) {\n return null;\n }\n Double doubleVal = null;\n\n try {\n doubleVal = Double.parseDouble(value);\n } catch (RuntimeException exc) {\n // could not parse into float, null will be returned\n }\n return doubleVal;\n }",
"double getCommission(String commission) throws IllegalArgumentException;",
"@Override\n\tpublic Valuable createMoney(double value) {\n\t\tValuable thaiMoney = null;\n\t\tif ( isCoin(value) ) {\n\t\t\tthaiMoney = new Coin(value);\n\t\t} else if ( isBankNote(value) ) {\n\t\t\tthaiMoney = new BankNote(value, nextSerialNumber++);\n\t\t} else {\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\treturn thaiMoney;\n\t}",
"private String getResult(TextInputDialog dialog, String original){\n\t\tOptional<String> output = dialog.showAndWait();\n\t\tif(output.isPresent()){\n\t\t\ttry{\n\t\t\t\tDouble.parseDouble(output.get());\n\t\t\t}\n\t\t\tcatch(NumberFormatException nfe){\n\t\t\t\tdialog.setHeaderText(\"Invalid value!\");\n\t\t\t\treturn getResult(dialog, original);\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\treturn original;\n\t\t}\n\t\treturn output.get();\n\t}",
"@Override\n\tpublic Valuable createMoney(double value) {\n\t\tboolean check = false;\n\t\tfor(double d: MONEY){\n\t\t\tif(d == value) check = true;\n\t\t}\n\t\tif(!check) throw new IllegalArgumentException(String.format(\"No %.2f %s money\", value, MARLAY_CURR));\n\t\tif(value > 1) return new BankNote(value, MARLAY_CURR, nextSerialNumber++);\n\t\treturn new Coin(value, MARLAY_CURR);\n\t}",
"@Test\n public void testGetPropertyAsDouble_shouldReturnDoubleValue() {\n final Config wholeNum = new Config().setId(\"wholeNum\").setValue(\"12345\");\n when(configDao.findById(\"wholeNum\")).thenReturn(Optional.of(wholeNum));\n assertThat(service.getProperty(\"wholeNum\").asDouble()).hasValue(12345d);\n\n // Test with decimals\n final Config decimal = new Config().setId(\"decimal\").setValue(\"983.23315\");\n when(configDao.findById(\"decimal\")).thenReturn(Optional.of(decimal));\n assertThat(service.getProperty(\"decimal\").asDouble()).hasValue(983.23315);\n\n // Test with empty\n assertThat(service.getProperty(\"unknown\").asDouble()).isEmpty();\n\n // Test with blank\n Assertions.assertThatThrownBy(() -> service.getProperty(\"blank\").asDouble())\n .isInstanceOf(NumberFormatException.class);\n\n // Test with invalid characters\n Assertions.assertThatThrownBy(() -> service.getProperty(\"email\").asDouble())\n .isInstanceOf(NumberFormatException.class);\n }",
"public static Optional<Double> parseOptionalDouble(final String input)\n {\n try\n {\n return Optional.ofNullable(input).map(Double::valueOf);\n }\n catch(NumberFormatException e)\n {\n return Optional.empty();\n }\n }",
"public void testGetNumericValue2() {\n ValueString vs = new ValueString(\"2.8\");\n\n assertEquals(\"2.8\", vs.getString());\n assertEquals(2.8D, vs.getNumber(), 0.0D);\n assertNull(vs.getDate()); // will fail parsing\n assertEquals(false, vs.getBoolean());\n assertEquals(0, vs.getInteger());\n assertEquals(2.8D, vs.getBigNumber().doubleValue(), 0.1D);\n }",
"private Double parseNumber(String num) {\r\n\t\tDouble tempnum = (double) 0;\r\n\t\tint opos; //operator position\r\n\t\tif ((num == null) || (num.length() < 1) ) {\r\n\t\t\treturn tempnum;\r\n\t\t}\r\n\r\n\t\t//replace constants with their value\r\n\t\twhile (num.indexOf(\"P\") >= 0) { //PI constant\r\n\t\t\tString[] numparts = StringUtil.splitData(num, 'P', 2);\r\n\t\t\tnum = numparts[0]+String.valueOf(Math.PI)+numparts[1];\r\n\t\t}\r\n\t\twhile (num.indexOf(\"X\") >= 0) { //e constant\r\n\t\t\tString[] numparts = StringUtil.splitData(num, 'X', 2);\r\n\t\t\tnum = numparts[0]+String.valueOf(Math.E)+numparts[1];\r\n\t\t}\r\n\r\n\t\tif (num.indexOf(\"^\") >= 0) { //allows to specify powers (e.g.: 2^10)\r\n\t\t\tString[] numparts = StringUtil.splitData(num, '^', 2);\r\n\t\t\ttempnum = Math.pow(parseNumber(numparts[0]), parseNumber(numparts[1]));\r\n\t\t}\r\n\t\telse if ( ((opos = num.indexOf(\"-\")) > 0) && (num.charAt(opos-1) != 'E') && (num.charAt(opos-1) != '^')) {\r\n\t\t\tString[] numparts = StringUtil.splitData(num, '-', 2);\r\n\t\t\ttempnum = parseNumber(numparts[0]) - parseNumber(numparts[1]);\r\n\t\t}\r\n\t\telse if ( ((opos = num.indexOf(\"+\")) > 0) && (num.charAt(opos-1) != 'E') && (num.charAt(opos-1) != '^')) {\r\n\t\t\tString[] numparts = StringUtil.splitData(num, '+', 2);\r\n\t\t\ttempnum = parseNumber(numparts[0]) + parseNumber(numparts[1]);\r\n\t\t}\r\n\t\telse if (num.indexOf(\"/\") >= 0) {\r\n\t\t\tString[] numparts = StringUtil.splitData(num, '/', 2);\r\n\t\t\ttempnum = parseNumber(numparts[0]) / parseNumber(numparts[1]);\r\n\t\t}\r\n\t\telse if (num.indexOf(\"*\") >= 0) {\r\n\t\t\tString[] numparts = StringUtil.splitData(num, '*', 2);\r\n\t\t\ttempnum = parseNumber(numparts[0]) * parseNumber(numparts[1]);\r\n\t\t}\r\n\t\telse {\r\n\t\t\ttempnum = Double.valueOf(num);\r\n\t\t}\r\n\r\n\t\treturn tempnum;\r\n\t}",
"public static double inputDouble() {\n Scanner scan = new Scanner(System.in);\n System.out.println(\"Enter dollar amount\");\n double input = scan.nextDouble();\n if (input > 1000000.0 || input < 0.0) {\n System.out.println(\"Sorry, try again\");\n return inputDouble();\n }else {\n return input;\n\n }\n\n }",
"private double convertDouble()\n\t{\n\t\tString val = tokens[10];\n\t\tdouble value = 0.0;\n\t\ttry {\n\t\t\tvalue = Double.parseDouble(tokens[10]);\n\t\t}\n\t\tcatch(NumberFormatException e) {\n\t\t\tSystem.err.print(\"\");\n\t\t}\n\t\treturn value;\n\t}",
"private double tranferStringToNum(String num){\r\n double number = 0;\r\n try{\r\n\tnumber = Double.parseDouble(num);\r\n }catch(Exception ex){\r\n\tnumber = 0;\r\n }\r\n return number;\r\n }",
"public static double StringToDouble(String StringValue){\n Double doublee;\n doublee = Double.valueOf(StringValue);\n return doublee.doubleValue();\n }",
"public static double getDouble(String key) throws UnknownID, ArgumentNotValid {\n\t\tString value = get(key);\n\t\ttry {\n\t\t\treturn Double.parseDouble(value);\n\t\t} catch (NumberFormatException e) {\n\t\t\tString msg = \"Invalid setting. Value '\" + value + \"' for key '\" + key\n\t\t\t\t\t+ \"' could not be parsed as a double.\";\n\t\t\tthrow new ArgumentNotValid(msg, e);\n\t\t}\n\t}",
"public static Double converteStringToDouble(String valor) {\n Double retorno;\n try {\n String valorSemFormatacao = valor.replace(StringUtil.CARACTER_PONTO, \"\").replace(StringUtil.CARACTER_VIRGULA, StringUtil.CARACTER_PONTO);\n BigDecimal bd2 = new BigDecimal(valorSemFormatacao, new MathContext(15, RoundingMode.FLOOR));\n retorno = bd2.doubleValue();\n } catch (NumberFormatException e) {\n retorno = null;\n } catch (NullPointerException e) {\n retorno = null;\n }\n return retorno;\n }",
"public static double parseDouble(final CharSequence s)\n {\n // no string\n if (s == null)\n {\n throw new NumberFormatException(\"null\");\n }\n\n // determine length\n final int length = s.length();\n\n if (length == 0)\n {\n throw new NumberFormatException(\"length = 0\");\n }\n\n // that is safe, we already know that we are > 0\n final int digit = s.charAt(0);\n\n // turn the compare around to allow the compiler and cpu\n // to run the next code most of the time\n if (digit < '0' || digit > '9')\n {\n return Double.parseDouble(s.toString());\n }\n\n long value = digit - DIGITOFFSET;\n\n int decimalPos = 0;\n\n for (int i = 1; i < length; i++)\n {\n final int d = s.charAt(i);\n if (d == '.')\n {\n decimalPos = i;\n continue;\n }\n if (d < '0' || d > '9')\n {\n throw new NumberFormatException(\"Not a double \" + s.toString());\n }\n\n value = ((value << 3) + (value << 1));\n value += (d - DIGITOFFSET);\n }\n\n // adjust the decimal places\n return decimalPos > 0 ? value * multipliers[length - decimalPos] : value;\n }",
"private double valor() throws Excepciones{\n double resultado = 0.0;\n switch(tipoToken){\n case NUMERO:\n try {\n resultado = Double.parseDouble(token);\n } catch (NumberFormatException exc) {\n obtieneError(SYNTAXIS);\n }\n obtieneToken();\n break;\n default:\n obtieneError(SYNTAXIS);\n break;\n }\n return resultado;\n}",
"private Valuable makeValuable(double value) {\n if (currency.equals(\"Baht\")) {\n if (value == 1 || value == 2 || value == 5 || value == 10)\n return new Coin(value, currency);\n else if (value == 20 || value == 50 || value == 100 || value == 500 || value == 1000) {\n return new BankNote(value, currency);\n }\n } else if (currency.equals(\"Ringgit\")) {\n if (value == 0.05 || value == 0.1 || value == 0.2 || value == 0.5)\n return new Coin(value, currency);\n else if (value == 1 || value == 2 || value == 5 || value == 10 || value == 20 || value == 50 || value == 100)\n return new BankNote(value, currency);\n }\n throw new IllegalArgumentException(\"Cannot create \" + value + \" \" + currency);\n }",
"public static double parseDoubleOrDefault(String s, double defaultDouble) {\n try {\n return Double.parseDouble(s);\n } catch (NumberFormatException e) {\n Logger.trace(MESSAGE, s, e);\n return defaultDouble;\n }\n }",
"@Override\n\t\tpublic Double convert(String s) {\n\t\t\treturn Double.parseDouble(s);\n\t\t}",
"public static double getValidDouble() {\n\n // This keeps looping until double input is received.\n while (!scnr.hasNextDouble()) {\n scnr.nextLine(); // clear the buffer\n System.out.print(\"Please enter an value! \");\n }\n\n double doubleNum = scnr.nextDouble();\n scnr.nextLine();\n\n return doubleNum;\n }",
"public UnitP(Double value, String unitString, ExceptionHandlingTypes exceptionHandling, PrefixUsageTypes prefixUsage)\n {\n UnitPConstructor unitP2 = MethodsUnitP.GetUnitP2(value, unitString, exceptionHandling, prefixUsage);\n \n OriginalUnitString = unitP2.OriginalUnitString;\n Value = unitP2.Value;\n BaseTenExponent = unitP2.UnitInfo.BaseTenExponent;\n Unit = unitP2.UnitInfo.Unit;\n UnitType = unitP2.UnitType;\n UnitSystem = unitP2.UnitSystem;\n UnitPrefix = new Prefix(unitP2.UnitInfo.Prefix);\n UnitParts = unitP2.UnitInfo.Parts;\n UnitString = unitP2.UnitString;\n ValueAndUnitString = unitP2.ValueAndUnitString;\n //If applicable, this instantiation would trigger an exception right away.\n Error = ExceptionInstantiation.NewErrorInfo(unitP2.ErrorType, unitP2.ExceptionHandling);\n }",
"public static double parseDouble(String s){\r\n double v=-1;\r\n try{\r\n v = Double.parseDouble(s);\r\n }catch(NumberFormatException e){\r\n System.out.println(\"Invalid input\");\r\n }\r\n return v;\r\n }",
"private void validate(Adouble val) {\r\n Assertions.assertEquals(val.aonType(), Atype.DOUBLE);\r\n Assertions.assertEquals(val, val);\r\n Assertions.assertEquals(val, Adouble.valueOf(val.toDouble()));\r\n Assertions.assertEquals(val.hashCode(), Adouble.valueOf(val.toDouble()).hashCode());\r\n Assertions.assertTrue(val.isNumber());\r\n }",
"public static double parseDouble(String val) {\n\n\t\tif (val == null) {\n\t\t\tval = \"0\";\n\t\t}\n\n\t\tdouble ret = 0;\n\n\t\ttry {\n\t\t\tret = Double.parseDouble(val);\n\t\t} catch (NumberFormatException e) {\n\t\t}\n\n\t\treturn ret;\n\t}",
"public static boolean isDouble(String value) {\n\n if (value == null) {\n return false;\n }\n\n boolean valid = false;\n try {\n Double.parseDouble(value);\n valid = true;\n } catch (RuntimeException exc) {\n // could not parse into double, false will be returned\n }\n return valid;\n }",
"private double parseNumber() throws InvalidExpressionException {\n\t\tdouble value;\r\n\t\tboolean negative = false;\r\n\t\tignorWhiteSpace();\r\n\t\tif (singleChar == '+' || singleChar == '-') {\r\n\t\t\t// check if the value is negative\r\n\t\t\tnegative = singleChar == '-';\r\n\t\t\tnextChar();\r\n\t\t\tignorWhiteSpace();\r\n\t\t}\r\n\t\tif (singleChar == '(') { // in case of open parentheses do recursion (include nested parentheses)!\r\n\t\t\tnextChar();\r\n\t\t\tvalue = parseExpression();\r\n\t\t\tif (singleChar == ')')\r\n\t\t\t\tnextChar();\r\n\t\t} else { // construct full length number\r\n\t\t\tStringBuilder sb = new StringBuilder();\r\n\t\t\twhile ((singleChar >= '0' && singleChar <= '9') || singleChar == '.') { // added support for double numbers\r\n\t\t\t\tsb.append((char) singleChar);\r\n\t\t\t\tnextChar();\r\n\t\t\t}\r\n\t\t\tif (sb.length() == 0) // If invalid char exist in the expression, throw an exception.\r\n\t\t\t\tthrow new InvalidExpressionException(\"Invalid character : \" + (char) singleChar);\r\n\t\t\tvalue = Double.parseDouble(sb.toString());\r\n\t\t}\r\n\t\tignorWhiteSpace();\r\n\t\tif (singleChar == '^') { // in power \r\n\t\t\tnextChar();\r\n\t\t\tvalue = Math.pow(value, parseNumber());\r\n\t\t}\r\n\t\tif (negative)\r\n\t\t\tvalue = -value; // append minus to number if negative\r\n\t\treturn value;\r\n\t}",
"public static double getDouble (String ask)\r\n {\r\n boolean badInput = false;\r\n String input = new String(\"\");\r\n double value = 0.0;\r\n do {\r\n badInput = false;\r\n input = getString(ask);\r\n try {\r\n value = Double.parseDouble(input);\r\n }\r\n catch (NumberFormatException e) {\r\n badInput = true;\r\n }\r\n }while(badInput);\r\n return value;\r\n }",
"public static boolean isDoubleValid (String str) {\r\n try {Double.parseDouble(str);} catch (NumberFormatException e) {return false;}\r\n return true;\r\n }",
"public static double convertToDouble(String number) {\n try {\n return Double.parseDouble(number);\n } catch (Exception e) {\n e.printStackTrace();\n return 0;\n }\n }",
"public double getValue() {// modified by JD to issue error dialog\n while (display.getText().equals(\"\")) {\n String UserInput = JOptionPane.showInputDialog\n (\"Please enter the required input value:\");\n display.setText(UserInput);\n }\n return Double.parseDouble(display.getText());\n }",
"double getStockValue(String date) throws IllegalArgumentException;",
"public UnitP\n (\n Double value, String unitString, ExceptionHandlingTypes exceptionHandling\n ) \n { \n \tthis (value, unitString, exceptionHandling, PrefixUsageTypes.DefaultUsage);\n }",
"public static double getDecimal(String mensaje) throws ValorInvalidoException {\n System.out.println(mensaje);\n return getDecimal();\n }",
"public static double getDoubleFromString(String value, double defaultValue) {\n Double result = getDoubleFromString(value);\n return result == null ? defaultValue : result.doubleValue();\n }",
"private boolean isDouble(String str)\r\n {\r\n try\r\n {\r\n double i = Double.parseDouble(str);\r\n } catch (NumberFormatException nfe)\r\n {\r\n MyLogger.log(Level.INFO, LOG_CLASS_NAME + \"Non numeric value. Value was: {0}\", str);\r\n return false;\r\n }\r\n return true;\r\n }",
"public static double doubleEingeben(String text){\n boolean korrekt=true;\n double eingabe= 0.0;\n do {\n System.out.print(text);\n String input = reader.next();\n try {\n double isNum = Double.parseDouble(input);\n if (isNum == Math.floor(isNum)) {\n korrekt=true;\n eingabe= Double.valueOf(input);\n //enter a double again\n } else {\n korrekt=true;\n eingabe= Double.valueOf(input);\n //break\n }\n } catch (Exception e) {\n if (input.toCharArray().length == 1) {\n System.out.println(\"Input ist ein Char\");\n korrekt=false;\n\n //enter a double again\n } else {\n System.out.println(\"Input ist ein String\");\n korrekt=false;\n\n //enter a double again\n }\n }\n }while(korrekt==false);\n return eingabe;\n }",
"private static boolean checkIfIsDouble(String num) {\n try {\n Double.parseDouble(num);\n return true;\n } catch (NumberFormatException e) {\n return false;\n }\n }",
"public final Double _parseDouble(JsonParser jVar, DeserializationContext gVar) throws IOException {\n JsonToken l = jVar.mo29328l();\n if (l == JsonToken.VALUE_NUMBER_INT || l == JsonToken.VALUE_NUMBER_FLOAT) {\n return Double.valueOf(jVar.mo29251G());\n }\n if (l == JsonToken.VALUE_STRING) {\n String trim = jVar.mo29334t().trim();\n if (trim.length() == 0) {\n return (Double) _coerceEmptyString(gVar, this._primitive);\n }\n if (_hasTextualNull(trim)) {\n return (Double) _coerceTextualNull(gVar, this._primitive);\n }\n char charAt = trim.charAt(0);\n if (charAt != '-') {\n if (charAt != 'I') {\n if (charAt == 'N' && _isNaN(trim)) {\n return Double.valueOf(Double.NaN);\n }\n } else if (_isPosInf(trim)) {\n return Double.valueOf(Double.POSITIVE_INFINITY);\n }\n } else if (_isNegInf(trim)) {\n return Double.valueOf(Double.NEGATIVE_INFINITY);\n }\n _verifyStringForScalarCoercion(gVar, trim);\n try {\n return Double.valueOf(parseDouble(trim));\n } catch (IllegalArgumentException unused) {\n return (Double) gVar.mo31517b(this._valueClass, trim, \"not a valid Double value\", new Object[0]);\n }\n } else if (l == JsonToken.VALUE_NULL) {\n return (Double) _coerceNullToken(gVar, this._primitive);\n } else {\n if (l == JsonToken.START_ARRAY) {\n return (Double) _deserializeFromArray(jVar, gVar);\n }\n return (Double) gVar.mo31493a(this._valueClass, jVar);\n }\n }",
"public void testGetNumericValue1() {\n ValueString vs = new ValueString(\"1000\");\n\n assertEquals(\"1000\", vs.getString());\n assertEquals(1000.0D, vs.getNumber(), 0.0D);\n assertNull(vs.getDate()); // will fail parsing\n assertEquals(false, vs.getBoolean());\n assertEquals(1000, vs.getInteger());\n assertEquals(BigDecimal.valueOf(1000), vs.getBigNumber());\n }",
"public abstract double fromBasicUnit(double valueJTextInsert);",
"private Double parseRadiusValue(String value, String description) throws InvalidStateException {\r\n return parseDouble(value, description);\r\n }",
"public double parseDouble()\r\n {\r\n String str = feed.findWithinHorizon( REAL_PATTERN, 0 );\r\n \r\n if( str == null )\r\n throw new NumberFormatException( \"[Line \" + lineNum + \"] Input did not match a real number\" );\r\n else if( str.length() == 0 )\r\n throw new NumberFormatException( \"[Line \" + lineNum + \"] Input did not match a real number\" );\r\n \r\n return Double.parseDouble( str );\r\n }",
"public double getDouble(String name, double defaultValue)\n/* */ {\n/* 1028 */ String value = getString(name);\n/* 1029 */ return value == null ? defaultValue : Double.parseDouble(value);\n/* */ }",
"@Test\n\tpublic void test_TCM__double_getDoubleValue() {\n\t\tAttribute attr = new Attribute(\"test\", \"11111111111111\");\n\t\ttry {\n\t\t\tassertTrue(\"incorrect double value\", attr.getDoubleValue() == 11111111111111d );\n\n\t\t\tattr.setValue(\"0\");\n\t\t\tassertTrue(\"incorrect double value\", attr.getDoubleValue() == 0 );\n\n\t\t\tattr.setValue(Double.toString(java.lang.Double.MAX_VALUE));\n\t\t\tassertTrue(\"incorrect double value\", attr.getDoubleValue() == java.lang.Double.MAX_VALUE);\n\n\t\t\tattr.setValue(Double.toString(java.lang.Double.MIN_VALUE));\n\t\t\tassertTrue(\"incorrect double value\", attr.getDoubleValue() == java.lang.Double.MIN_VALUE);\n\n\t\t} catch (DataConversionException e) {\n\t\t\tfail(\"couldn't convert boolean value\");\n\t\t}\n\n\t\ttry {\n\t\t\tattr.setValue(\"foo\");\n\t\t\tfail(\"incorrectly returned double from non double value\" + attr.getDoubleValue());\n\n\t\t} catch (DataConversionException e) {\n\t\t\t// Do nothing\n\t\t} catch (Exception e) {\n\t\t\tfail(\"Unexpected exception \" + e.getClass());\n\t\t}\n\n\t}",
"public static Double getNumber(String number){\n if(StringUtils.isEmpty(number) || !containDigit(number)){\n return null;\n }\n if(containVariable(number)){\n return extractFirstVariableValue(number);\n }\n String firstNumberStr = null, numberStr = null, unitStr = null;\n if(contains(number, numberUnitPattern)){\n firstNumberStr = removeFormatForNumberStr(extract(number, numberUnitPattern));\n Matcher matcher = numberUnitPattern.matcher(firstNumberStr);\n while(matcher.find()){\n numberStr = matcher.group(2); // number\n if(matcher.group(8) != null){\n unitStr = matcher.group(8); // unit\n }\n }\n }\n\n if(StringUtils.isNotEmpty(firstNumberStr)){\n Double result = Double.valueOf(numberStr);\n if(StringUtils.isNotEmpty(unitStr)){\n switch (unitStr){\n case \"bps\" : result *= 0.0001; break;\n case \"%\" : result *= 0.01; break;\n case \"k\" : result *= 1e3; break;\n case \"m\" :\n case \"mm\" : result *= 1e6; break;\n case \"bn\" : result *= 1e9; break;\n }\n }\n return result;\n }\n return null;\n }",
"private boolean validateBidPrice(String value){\n boolean isValid = true;\n\n if (value == null || value.isEmpty()) {\n isValid = false;\n } else {\n\n try {\n Float valueFloat = Float.valueOf(value);\n } catch (NumberFormatException e) {\n isValid = false;\n }\n\n if (isValid && value.contains(\".\")) {\n String[] priceParts = value.split(\"\\\\.\");\n if (priceParts[1].length() > 2) {\n isValid = false;\n }\n }\n }\n\n return isValid;\n }",
"static Value<Float> parseFloat(String value) {\n try {\n if (value == null || value.isEmpty()) return empty();\n return of(Float.parseFloat(value));\n } catch (NumberFormatException error) {\n return empty();\n }\n }",
"public static boolean checkIfNumeric(Object toBeChecked)\r\n\t{\r\n\t\ttry {\r\n\t\t\tDouble.parseDouble((String) toBeChecked);\r\n\t\t\treturn true;\r\n\t\t} catch (ClassCastException e) {\r\n\t\t\treturn true;\r\n\t\t} catch (NumberFormatException e) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"private double parseOptionPrice(String line) {\n\n Double optionPrice = -1d;\n\n try {\n if (\"\".equals(line.trim()))\n throw new AutoException(EnumAutomobileErrors.MISSING_OPTION_PRICE);\n else\n try {\n optionPrice = Double.valueOf(line.substring(line.indexOf(\":\") + 1).trim());\n } catch (NumberFormatException ex) {\n throw new AutoException(EnumAutomobileErrors.WRONG_OPTION_PRICE);\n }\n } catch (AutoException ex) {\n Object object = ex.fix();\n if (object != null)\n optionPrice = (double) object;\n }\n\n return optionPrice;\n\n }",
"private static Double stod(String string) {\n\t\tDouble result = 2.0; // should handle this error: \"cannnot convert string to Double\"\n\t\tif (string == null || string.equals(\"\") || string.equals(\"null\") || string.equals(\"I\")) {\n\t\t\tresult = 0.0;\n\t\t} else if (string.equals(\"E\")) {\n\t\t\tresult = 1.0;\n\t\t} else {\n\t\t\ttry {\n\t\t\t\tresult = Double.parseDouble(string);\n\t\t\t} catch(Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}",
"private static boolean isDouble(String input) {\n\t\ttry {\n\t\t\tDouble.parseDouble(input);\n\t\t\treturn true;\n\t\t} catch (Exception ex) {}\n\t\treturn false;\n\t}",
"public static boolean isParsable(String inString)\n\t{\n\t\tboolean blnParsable= true; //tells if the value can be parsed \n\t\ttry\n\t\t{\n\t\t\tDouble.parseDouble (inString);\n\t\t}\n\t\tcatch(NumberFormatException e)\n\t\t{\n\t\t\tblnParsable = false;\n\t\t}\n\t\treturn blnParsable;\n\t}",
"public UnitP(Double value, Units unit, Prefix prefix, ExceptionHandlingTypes exceptionHandling)\n {\n ErrorTypes errorType = \n (\n unit == Units.None || MethodsCommon.IsUnnamedUnit(unit) ?\n ErrorTypes.InvalidUnit : ErrorTypes.None\n );\n\n UnitInfo tempInfo = null;\n if (errorType == ErrorTypes.None)\n {\n //Getting the unit parts associated with the given unit.\n tempInfo = ExceptionInstantiation.NewUnitInfo(value, unit, prefix);\n\n if (tempInfo.Error.Type == ErrorTypes.None)\n {\n tempInfo = MethodsUnitP.ImproveUnitInfo(tempInfo, false);\n }\n else errorType = tempInfo.Error.Type;\n }\n\n if (errorType != ErrorTypes.None)\n {\n Value = 0.0;\n BaseTenExponent = 0;\n UnitPrefix = new Prefix(prefix.getPrefixUsage());\n UnitParts = new ArrayList<UnitPart>();\n UnitString = null;\n OriginalUnitString = null;\n Unit = Units.None;\n UnitSystem = UnitSystems.None;\n UnitType = UnitTypes.None;\n ValueAndUnitString = \"\";\n }\n else\n {\n Value = tempInfo.Value;\n BaseTenExponent = tempInfo.BaseTenExponent;\n Unit = unit;\n UnitType = MethodsCommon.GetTypeFromUnit(Unit);\n UnitSystem = MethodsCommon.GetSystemFromUnit(Unit);\n UnitPrefix = new Prefix(prefix);\n UnitParts = tempInfo.Parts;\n UnitString = MethodsCommon.GetUnitString(tempInfo);\n OriginalUnitString = UnitString;\n ValueAndUnitString = Value.toString() + \" \" + UnitString;\n }\n\n //If applicable, this instantiation would trigger an exception right away.\n Error = ExceptionInstantiation.NewErrorInfo\n (\n errorType, exceptionHandling\n );\n }",
"private static Double grabPriceText(String s_input, String s_label) {\n Pattern dollabillsyall = Pattern.compile(\"[0-9]{1,4}[.][0-9]{0,4}\");\n Matcher matcher = dollabillsyall.matcher(s_input);\n\n if (matcher.find())\n System.out.println(\"=== \" + s_label + \": \" + matcher.group(0));\n else\n System.out.println(\"=== \" + s_label + \": \" + \"no match\");\n\n return Double.parseDouble(matcher.group(0));\n }",
"public static float validatePriceInput(Context context, TextInputEditText editText) {\n // store trimmed raw input as a string\n final String rawPrice = editText.getText().toString().trim();\n\n // check for emptiness and signal user about it\n if (TextUtils.isEmpty(rawPrice)) {\n editText.setError(context.getResources().getString(R.string.editor_edt_empty_input));\n return -1;\n }\n\n // save the input as a float (we check for numbers in xml through inputType)\n try {\n float floatPrice = Float.parseFloat(rawPrice);\n\n if (floatPrice <= 0) {\n editText.setError(context.getResources().getString(R.string.editor_edt_invalid_input));\n return 0;\n }\n\n return floatPrice;\n\n } catch (NumberFormatException e) {\n editText.setError(context.getResources().getString(R.string.editor_edt_invalid_input));\n return -1;\n }\n }",
"public TextValidatorResult validateCurrency(final String input,\n final boolean allowPartialMatching)\n {\n Pattern currency = Pattern.compile(\"^\\\\$?(\\\\d+(?:\\\\.\\\\d{2})?)$\");\n Matcher matches = currency.matcher(input);\n boolean res = matches.matches();\n ArrayList<String> results = new ArrayList<String>();\n\n if (res)\n {\n if (input.contains(\".\"))\n { // check case where a decimal exists and enforce entry of post-decimal values\n currency = Pattern.compile(\"^\\\\$?(\\\\d+(?:\\\\.\\\\d{2}))$\");\n matches = currency.matcher(input);\n res = matches.matches();\n if (res)\n {\n for (int i = 0; i < matches.groupCount() + 1; i++)\n {\n results.add(matches.group(i));\n }\n return new TextValidatorResult(1, results, \"\");\n }\n else\n {\n return new TextValidatorResult(-2, results,\n \"Invalid format. If using decimal, enter all values afterwards.\\nExample: 4 or 4.10\");\n }\n }\n else\n {\n for (int i = 0; i < matches.groupCount() + 1; i++)\n {\n results.add(matches.group(i));\n }\n return new TextValidatorResult(1, results, \"\");\n }\n }\n else\n {\n if (matches.hitEnd() && allowPartialMatching)\n {\n return new TextValidatorResult(1, results, \"\");\n }\n else\n { // Check case where a decimal exists and force entry of post-decimal values\n if (input.contains(\".\"))\n {\n return new TextValidatorResult(-2, results,\n \"invalid format. Example, either: 4 OR 4.10\\n(Include all\" +\n \" values after decimal, if a point is used.\");\n }\n else\n {\n return new TextValidatorResult(-1, results,\n \"invalid format. Example, either: 4 OR 4.10\\n(Include all values after decimal, if a point is used.\");\n }\n\n }\n }\n }",
"@Test\n public void testSetNumberDouble() {\n factory.setNumber(0.25).setCurrency(\"EUR\");\n assertEquals(Geldbetrag.valueOf(\"0.25 EUR\"), factory.create());\n }",
"public static DoubleValue convert(AtomicValue value, Configuration config) {\n try {\n if (value == null) {\n return DoubleValue.NaN;\n }\n if (value instanceof BooleanValue) {\n return new DoubleValue(((BooleanValue) value).getBooleanValue() ? 1.0e0 : 0.0e0);\n }\n if (value instanceof DoubleValue) {\n return (DoubleValue) value;\n }\n if (value instanceof NumericValue) {\n return new DoubleValue(((NumericValue) value).getDoubleValue());\n }\n if (value instanceof StringValue && !(value instanceof AnyURIValue)) {\n double d = config.getConversionRules().getStringToDoubleConverter().stringToNumber(value.getStringValueCS());\n return new DoubleValue(d);\n }\n return DoubleValue.NaN;\n } catch (NumberFormatException e) {\n return DoubleValue.NaN;\n }\n }",
"private static boolean validNumber(String thing) {\n\t\treturn validDouble(thing);\n\t}",
"double getMoney();",
"public double getDouble(String key, double fallback)\n {\n if (key.contains(\".\"))\n {\n String[] pieces = key.split(\"\\\\.\", 2);\n DataSection section = getSection(pieces[0]);\n return section == null ? fallback : section.getDouble(pieces[1], fallback);\n }\n\n if (!data.containsKey(key)) return fallback;\n Object obj = data.get(key);\n try\n {\n return Double.parseDouble(obj.toString());\n }\n catch (Exception ex)\n {\n return fallback;\n }\n }",
"public static DoubleValue toNumber(AtomicValue arg0) {\n if (arg0 instanceof BooleanValue) {\n return Converter.BooleanToDouble.INSTANCE.convert((BooleanValue)arg0);\n } else if (arg0 instanceof NumericValue) {\n return (DoubleValue) Converter.NumericToDouble.INSTANCE.convert((NumericValue)arg0).asAtomic();\n } else if (arg0 instanceof StringValue && !(arg0 instanceof AnyURIValue)) {\n // Always use the XSD 1.1 rules, which permit \"+INF\"\n ConversionResult cr = StringToDouble11.getInstance().convert((StringValue)arg0);\n if (cr instanceof ValidationFailure) {\n return DoubleValue.NaN;\n } else {\n return (DoubleValue) cr;\n }\n } else {\n return DoubleValue.NaN;\n }\n }",
"public static boolean isDouble(String valor) {\n boolean valido = false;\n if (!valor.endsWith(\".\")) {\n try {\n double cantidad = Double.parseDouble(valor);\n if (cantidad > 0) {\n valido = true;\n }\n } catch (NullPointerException | NumberFormatException e) {\n System.out.println(\"No es un caracter double\");\n }\n }\n\n return valido;\n }",
"public double parse(String inputString){\n\t\tclear();\n\t\tinput = inputString;\n\t\treturn expr(true);\n\t}",
"private Double askDouble(String label){\n try{\n System.out.println(label);\n String input = in.nextLine();\n if (input.isEmpty()){\n return null;\n }\n else{\n return Double.parseDouble(in.nextLine());}\n }\n catch(NumberFormatException e){\n return askDouble(label);\n }\n }",
"public\n double getValue() {\n double d;\n\n try {\n d = Double.parseDouble(getText());\n } catch (NumberFormatException e) {\n return 0;\n }\n return d;\n }",
"public static synchronized double parsePower(final String value)\n\t\t\tthrows java.text.ParseException {\n\t\tfinal String strValue = value.toUpperCase();\n\n\t\tif (strValue.endsWith(KILOWATT_UNIT.toUpperCase())) {\n\t\t\t// try kilowatts\n\t\t\tfinal String normalized = strValue.substring(0, strValue.length()\n\t\t\t\t\t- KILOWATT_UNIT.length())\n\t\t\t\t\t+ KILOWATT_UNIT;\n\t\t\tfinal Number n = KW_FORMATTER.parse(normalized);\n\t\t\treturn n.doubleValue() * THOUSAND_WATTS;\n\t\t} else if (strValue.endsWith(WATT_UNIT.toUpperCase())) {\n\t\t\t// try watts\n\t\t\tfinal String normalized = strValue.substring(0, strValue.length()\n\t\t\t\t\t- WATT_UNIT.length())\n\t\t\t\t\t+ WATT_UNIT;\n\t\t\tfinal Number n = WATTS_FORMATER.parse(normalized);\n\t\t\treturn n.doubleValue();\n\t\t} else {\n\t\t\t// assume watts by default\n\t\t\tfinal Number n = WATTS_FORMATER.parse(strValue + WATT_UNIT);\n\t\t\treturn n.doubleValue();\n\t\t}\n\t}",
"public static double ParseCurrency(String s) throws ParseException{\r\n String regex = \"[^\\\\d.-]+\";\r\n String newStr = s.replace(\",\", \".\");\r\n newStr = newStr.replaceAll(regex, \"\");\r\n double resultat = Double.parseDouble(newStr);\r\n //System.out.println(\"String s: \"+s + \" resultat: \"+resultat);\r\n if(resultat <0){\r\n throw new ParseException(MSG_PARSECURRENCY,0);\r\n }\r\n return resultat;\r\n }",
"public double toDouble() {\n/* */ try {\n/* 813 */ return Double.valueOf(this.m_str).doubleValue();\n/* */ }\n/* 815 */ catch (NumberFormatException nfe) {\n/* */ \n/* 817 */ return Double.NaN;\n/* */ } \n/* */ }",
"public double getDouble(String name)\r\n throws NumberFormatException\r\n {\r\n return Double.parseDouble(getString(name));\r\n }",
"public double getDouble(String key, double defaultValue) {\n String lowerCaseKey = validateAndGetLowerCaseKey(key);\n\n if(map.containsKey(lowerCaseKey)) {\n String value = map.get(lowerCaseKey);\n\n try {\n return Double.parseDouble(value);\n } catch (NumberFormatException exception) {\n System.err.println(\"Unable to parse double: \" + exception.getMessage());\n }\n\n }\n return defaultValue;\n }",
"@Test\n public void testLog() throws IOException {\n System.out.println(Double.parseDouble(\"3.123124354657668698\"));\n }",
"@Override\r\n public Tuple2<Integer, Double> map(String value) throws Exception {\n return Tuple2.of(1, Double.parseDouble(value));\r\n }",
"double getBasedOnValue();",
"double getDouble(String key, double defaultValue);",
"public static double getDouble(String inputDialog) {\n return(Double.parseDouble(JOptionPane.showInputDialog(inputDialog)));\n }",
"public UnitP(Double value, Units unit, ExceptionHandlingTypes exceptionHandling)\n { \n \tthis(value, unit, new Prefix(), exceptionHandling);\n }",
"public Boolean checkNumberFormatException(String price_str, String size_str, String bathroom_str, String room_str){\n\t\t\tboolean result = false;\r\n\t\t\t\r\n\t\t\ttry{\r\n\t\t\t\tDouble price = Double.parseDouble(price_str);\r\n\t\t\t\tDouble size = Double.parseDouble(size_str);\r\n\t\t\t\tInteger bahtroom = Integer.parseInt(bathroom_str);\r\n\t\t\t\tInteger room = Integer.parseInt(room_str);\r\n\t\t\t}catch(NumberFormatException e){\r\n\t\t\t\tresult = true;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn result;\r\n\t\t}",
"public static double isDouble() {\n\t\twhile (true) {\n\t\t\ttry {\n\t\t\t\treturn input.nextDouble();\n\t\t\t} catch (InputMismatchException e) {\n\t\t\t\tinput.next();\n\t\t\t\tSystem.out.println(\"Vas unos nije odgovarajuci. Probajte ponovo: \");\n\t\t\t}\n\t\t}\n\t}",
"public static double readDouble() {\n try {\n return scanner.nextDouble();\n }\n catch (InputMismatchException e) {\n String token = scanner.next();\n throw new InputMismatchException(\"attempts to read a 'double' value from standard input, \"\n + \"but the next token is \\\"\" + token + \"\\\"\");\n }\n catch (NoSuchElementException e) {\n throw new NoSuchElementException(\"attempts to read a 'double' value from standard input, \"\n + \"but no more tokens are available\");\n }\n }",
"public Double getInvalidDouble() throws ServiceException {\n try {\n Call<ResponseBody> call = service.getInvalidDouble();\n ServiceResponse<Double> response = getInvalidDoubleDelegate(call.execute(), null);\n return response.getBody();\n } catch (ServiceException ex) {\n throw ex;\n } catch (Exception ex) {\n throw new ServiceException(ex);\n }\n }",
"@Test\n public void testIsValidDouble() {\n System.out.println(\"isValidDouble\");\n String double_number = \"Mary\";\n boolean expResult = false;\n boolean result = ValidVariables.isValidDouble(double_number);\n assertEquals(expResult, result);\n }",
"@Ignore\n @Test(expected = IllegalArgumentException.class)\n public void require_that_illegal_double_throws_exception() throws IOException {\n Slime slime = new Slime();\n Cursor root = slime.setObject();\n root.setString(\"doubleval\", \"invalid\");\n InnerCNode def = new DefParser(\"simpletypes\", new StringReader(StringUtilities.implode(SimpletypesConfig.CONFIG_DEF_SCHEMA, \"\\n\"))).getTree();\n new ConfigFileFormat(def).encode(new ByteArrayOutputStream(), slime);\n }"
] | [
"0.6872182",
"0.65970695",
"0.6523461",
"0.62830955",
"0.6163286",
"0.6155614",
"0.6154624",
"0.60357547",
"0.6013682",
"0.600548",
"0.5959892",
"0.59582084",
"0.5940212",
"0.5937747",
"0.5923902",
"0.5866712",
"0.57924116",
"0.57596046",
"0.57356775",
"0.57336247",
"0.57193",
"0.5701573",
"0.5691218",
"0.5661003",
"0.56269443",
"0.5620348",
"0.5618848",
"0.5614334",
"0.55965203",
"0.55903596",
"0.5588193",
"0.5582195",
"0.5536241",
"0.55326074",
"0.5527371",
"0.55153674",
"0.5510886",
"0.5507355",
"0.55072194",
"0.55058634",
"0.5504114",
"0.54966223",
"0.5495703",
"0.5480904",
"0.5477369",
"0.5476819",
"0.5440935",
"0.5439833",
"0.5435407",
"0.5433127",
"0.5424213",
"0.5422523",
"0.54195833",
"0.5411774",
"0.5409181",
"0.54079753",
"0.5399698",
"0.53975344",
"0.53764564",
"0.53709626",
"0.53669965",
"0.5361847",
"0.53509116",
"0.5338862",
"0.5328536",
"0.5325352",
"0.53150225",
"0.5304358",
"0.530417",
"0.52852297",
"0.5276612",
"0.5269286",
"0.5268662",
"0.5266356",
"0.5258968",
"0.52539486",
"0.52536",
"0.5243759",
"0.52316743",
"0.52290773",
"0.52256703",
"0.5223438",
"0.5223029",
"0.5221456",
"0.52138466",
"0.5213133",
"0.52070934",
"0.517722",
"0.51760083",
"0.51743615",
"0.5162355",
"0.51618797",
"0.51512533",
"0.51490927",
"0.51450944",
"0.5139222",
"0.5138501",
"0.5135864",
"0.5128248",
"0.51167923"
] | 0.7530502 | 0 |
TODO Autogenerated method stub | @Override
public void onClick(View v)
{
Intent intent = new Intent(DeviceActivity.this, sdw.com.CountyActivity.class);// ����������Activity
Bundle bundle = new Bundle(0);
bundle.putString("fun1",transferValue);
Log.e("TAG",transferValue);
bundle.putString("search1","btnRunRecord");
intent.putExtras(bundle);//can't
startActivity(intent);
// finish();
} | {
"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(DeviceActivity.this, sdw.com.CountyActivity.class);// ����������Activity
Bundle bundle = new Bundle(0);
bundle.putString("fun1",transferValue);
bundle.putString("search1","btnCheckRecord");
intent.putExtras(bundle);//
startActivity(intent);
//finish();
} | {
"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(DeviceActivity.this, sdw.com.CountyActivity.class);// ����������Activity
Bundle bundle = new Bundle(0);
bundle.putString("fun1",transferValue);
bundle.putString("search1","btnCheckMap");
intent.putExtras(bundle);//
startActivity(intent);
//finish();
} | {
"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(DeviceActivity.this, sdw.com.CountyActivity.class);// ����������Activity
Bundle bundle = new Bundle(0);
bundle.putString("fun1",transferValue);
bundle.putString("search1","btnWaterFlow");
intent.putExtras(bundle);//
startActivity(intent);
//finish();
} | {
"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 |
Assuming name for simplicity. | @Override
public String storeTime(String empName, String type) {
Employee employee = employeeRepository.getEmployeeByEmployeeName(empName);
DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");
Date date = new Date();
LocalDateTime dateTime = LocalDateTime.now();
System.out.println("Time : "+dateFormat.format(date));
if("inTime".equalsIgnoreCase(type)){
employee.setInTime(dateFormat.format(date));
}else{
employee.setOutTime(dateFormat.format(date));
}
employeeRepository.save(employee);
return dateFormat.format(date);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected abstract String name ();",
"abstract String getName();",
"abstract String name();",
"String getName() ;",
"@Override\n\tString name();",
"@Override\n\tpublic void name() {\n\t\t\n\t}",
"@Override\n\tpublic void name() {\n\t\t\n\t}",
"public String getName(){return this.aName;}",
"protected abstract String getName();",
"public String getName() {\n/* 209 */ return this.name;\n/* */ }",
"public String getName () { return this.name; }",
"public String getName() {\n/* 57 */ return this.name;\n/* */ }",
"String getName( String name );",
"public String getName()\n/* */ {\n/* 62 */ return this.name;\n/* */ }",
"abstract public String named();",
"@Override\r\n String getName();",
"public String getName() { return name; }",
"@Override\n String getName();",
"@Override \n public String getName() {\n return NAME;\n }",
"public final int getName() { return name; }",
"public String getName()\n/* */ {\n/* 59 */ return this.name;\n/* */ }",
"public String getName()\n/* */ {\n/* 109 */ return this.name;\n/* */ }",
"public String name() { return name; }",
"public String getName() { return name;}",
"public String getName() {return name;}",
"public String getName() {return name;}",
"public String getName() {return name;}",
"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();",
"public String getName() { return _name; }",
"public String getName(){return this.name;}",
"public String getName(){return name;}",
"public String getName(){return name;}",
"public String getName(){return name;}",
"public String getName(){return name;}",
"@Override\n public String getName() {\n return name;\n }",
"public String getName(){ return name; }",
"public Name getName() { return name; }",
"@Override\n public String getName() {\n return name();\n }",
"void getName(String name);",
"public String getName()\n/* */ {\n/* 60 */ return this.name;\n/* */ }",
"public Classification nameOf(String name) {\n throw new IllegalStateException(\"Unknown definition: \" + this); // basically unreachable\n }",
"abstract public String getName();",
"abstract public String getName();",
"public String getName()\r\n/* 24: */ {\r\n/* 25:20 */ return this.name;\r\n/* 26: */ }",
"@Override\r\n\tprotected String getName() {\n\t\treturn NAME;\r\n\t}",
"@Override\n public String getName() {\n return name;\n }",
"@Override\n public String getName() {\n return name;\n }",
"String getName();",
"String getName();",
"String getName();"
] | [
"0.6917611",
"0.6872814",
"0.6841963",
"0.6827841",
"0.68124974",
"0.68084544",
"0.68084544",
"0.6800884",
"0.6775914",
"0.6761519",
"0.6756343",
"0.6744477",
"0.673586",
"0.67336905",
"0.67237633",
"0.6716125",
"0.670967",
"0.6698067",
"0.6690275",
"0.66878587",
"0.6667668",
"0.6649449",
"0.6647728",
"0.66326964",
"0.6629427",
"0.6629427",
"0.6629427",
"0.66163814",
"0.66163814",
"0.66163814",
"0.66163814",
"0.66163814",
"0.66163814",
"0.66163814",
"0.66163814",
"0.66163814",
"0.66163814",
"0.66163814",
"0.66163814",
"0.66163814",
"0.66163814",
"0.66163814",
"0.66163814",
"0.66163814",
"0.66163814",
"0.66163814",
"0.66163814",
"0.66163814",
"0.66163814",
"0.66163814",
"0.66163814",
"0.66163814",
"0.66163814",
"0.66163814",
"0.66163814",
"0.66163814",
"0.66163814",
"0.66163814",
"0.66163814",
"0.66163814",
"0.66163814",
"0.66163814",
"0.66163814",
"0.66163814",
"0.66163814",
"0.66163814",
"0.66163814",
"0.66163814",
"0.66163814",
"0.66163814",
"0.66163814",
"0.66163814",
"0.66163814",
"0.66163814",
"0.66163814",
"0.66163814",
"0.66163814",
"0.66163814",
"0.66163814",
"0.6608124",
"0.66019875",
"0.65791637",
"0.65791637",
"0.65791637",
"0.65791637",
"0.6578291",
"0.6572922",
"0.6559286",
"0.6558587",
"0.6556804",
"0.65519214",
"0.6551276",
"0.6545931",
"0.6545931",
"0.654029",
"0.6533619",
"0.6523664",
"0.6523664",
"0.65185046",
"0.65185046",
"0.65185046"
] | 0.0 | -1 |
Create a user and fill out all the required fields | @Parameters({"quantity","customerName","street","city","zip","cardNum","expNum"})
@Test(priority = 0)
public void creatingUser(String quantity, String customerName, String street,String city,String zip,String cardNum,String expNum) throws InterruptedException {
driver.findElement(By.xpath("//a[@href='Process.aspx']")).click();
sendText(driver.findElement(By.cssSelector("input#ctl00_MainContent_fmwOrder_txtQuantity")),quantity);
sendText(driver.findElement(By.cssSelector("input#ctl00_MainContent_fmwOrder_txtName")),customerName);
sendText(driver.findElement(By.cssSelector("input#ctl00_MainContent_fmwOrder_TextBox2")),street);
sendText(driver.findElement(By.cssSelector("input#ctl00_MainContent_fmwOrder_TextBox3")),city);
sendText(driver.findElement(By.cssSelector("input#ctl00_MainContent_fmwOrder_TextBox5")),zip);
driver.findElement(By.cssSelector("input#ctl00_MainContent_fmwOrder_cardList_0")).click();
sendText(driver.findElement(By.cssSelector("input#ctl00_MainContent_fmwOrder_TextBox6")),cardNum);
sendText(driver.findElement(By.cssSelector("input#ctl00_MainContent_fmwOrder_TextBox1")),expNum);
driver.findElement(By.cssSelector("a#ctl00_MainContent_fmwOrder_InsertButton")).click();
//Verify that user name appears on the table
driver.findElement(By.xpath("//a[text()='View all orders']")).click();
WebElement el = driver.findElement(By.cssSelector("#ctl00_MainContent_orderGrid > tbody > tr:nth-child(2) > td:nth-child(2)"));
String name=el.getText();
String expName = customerName;
Assert.assertEquals(name, expName);
System.out.println("User name on the table");
//Edit and update user's State, assert the new updated State is displayed and save the changes.
driver.findElement(By.xpath("//table[@id='ctl00_MainContent_orderGrid']/tbody/tr[2]/td[13]")).click();
sendText(driver.findElement(By.cssSelector("input#ctl00_MainContent_fmwOrder_TextBox4")), "New Jersey");
driver.findElement(By.xpath("//a[@id='ctl00_MainContent_fmwOrder_UpdateButton']")).click();
WebElement el1 = driver.findElement(By.cssSelector("#ctl00_MainContent_orderGrid > tbody > tr:nth-child(2) > td:nth-child(8)"));
String state=el1.getText();
String expState = "New Jersey";
Assert.assertEquals(state, expState);
System.out.println("State updated succesfully");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void createUser(User user) {\n\n\t}",
"public void createUser(User user);",
"UserCreateResponse createUser(UserCreateRequest request);",
"CreateUserResult createUser(CreateUserRequest createUserRequest);",
"private void createAccount()\n {\n // check for blank or invalid inputs\n if (Utils.isEmpty(edtFullName))\n {\n edtFullName.setError(\"Please enter your full name.\");\n return;\n }\n\n if (Utils.isEmpty(edtEmail) || !Utils.isValidEmail(edtEmail.getText().toString()))\n {\n edtEmail.setError(\"Please enter a valid email.\");\n return;\n }\n\n if (Utils.isEmpty(edtPassword))\n {\n edtPassword.setError(\"Please enter a valid password.\");\n return;\n }\n\n // check for existing user\n AppDataBase database = AppDataBase.getAppDataBase(this);\n User user = database.userDao().findByEmail(edtEmail.getText().toString());\n\n if (user != null)\n {\n edtEmail.setError(\"Email already registered.\");\n return;\n }\n\n user = new User();\n user.setId(database.userDao().findMaxId() + 1);\n user.setFullName(edtFullName.getText().toString());\n user.setEmail(edtEmail.getText().toString());\n user.setPassword(edtPassword.getText().toString());\n\n database.userDao().insert(user);\n\n Intent intent = new Intent(this, LoginActivity.class);\n intent.putExtra(\"user\", user);\n startActivity(intent);\n }",
"public void creatUser(String name, String phone, String email, String password);",
"public String create() {\r\n\t\tuserService.create(userAdd);\r\n\t\tusers.setWrappedData(userService.list());\r\n\t\treturn \"create\";\r\n\t}",
"public User createUser() {\n printer.println(\"Welcome! Enter you name and surname:\");\n printer.println(\"Name:\");\n String name = input.nextString();\n printer.println(\"Surname:\");\n String surname = input.nextString();\n return new User(name, surname);\n }",
"User createUser(UserCreationModel user);",
"private void createUser(final String email, final String password) {\n\n }",
"@FXML\n\tpublic void createUser(ActionEvent event) {\n\t\tString empty = \"\";\n\t\tString name = txtUserNames.getText();\n\t\tString lastName = txtUserSurnames.getText();\n\t\tString id = txtUserId.getText();\n\t\tString username = txtUserUsername.getText();\n\t\tString password = PfUserPassword.getText();\n\n\t\tif (!name.equals(empty) && !lastName.equals(empty) && !id.equals(empty) && !username.equals(empty)\n\t\t\t\t&& !password.equals(empty)) {\n\t\t\tcreateSystemUser(name, lastName, id, username, password);\n\t\t\ttxtUserNames.setText(\"\");\n\t\t\ttxtUserSurnames.setText(\"\");\n\t\t\ttxtUserId.setText(\"\");\n\t\t\ttxtUserUsername.setText(\"\");\n\t\t\tPfUserPassword.setText(\"\");\n\t\t\t// labelUserMessage.setText(\"The user has been created\");\n\t\t} else if (name.equals(empty) && lastName.equals(empty) && id.equals(empty) && username.equals(empty)\n\t\t\t\t&& password.equals(empty)) {\n\t\t\tDialog<String> dialog = createDialog();\n\t\t\tdialog.setTitle(\"Error al guardar datos\");\n\t\t\tdialog.setContentText(\"Todos los campos de texto deben ser llenados\");\n\t\t\tdialog.show();\n\t\t}\n\t}",
"public void createUser() {\r\n\t\tif(validateUser()) {\r\n\t\t\t\r\n\t\t\tcdb=new Connectiondb();\r\n\t\t\tcon=cdb.createConnection();\r\n\t\t\ttry {\r\n\t\t\t\tps=con.prepareStatement(\"INSERT INTO t_user (nom,prenom,userName,pass,tel,type,status) values(?,?,?,?,?,?,?)\");\r\n\t\t\t\tps.setString(1, this.getNom());\r\n\t\t\t\tps.setString(2, this.getPrenom());\r\n\t\t\t\tps.setString(3, this.getUserName());\r\n\t\t\t\tps.setString(4, this.getPassword());\r\n\t\t\t\tps.setInt(5, Integer.parseInt(this.getTel().trim()));\r\n\t\t\t\tps.setString(6, this.getType());\r\n\t\t\t\tps.setBoolean(7, true);\r\n\t\t\t\tps.executeUpdate();\r\n\t\t\t\tnew Message().error(\"Fin d'ajout d'utilisateur\");\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\tnew Message().error(\"Echec d'ajout d'utilisateur\");\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}finally {\r\n\t\t\t\tcdb.closePrepareStatement(ps);\r\n\t\t\t\tcdb.closeConnection(con);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}",
"User createUser();",
"@Override\n\tpublic void create(User user) {\n\t\t\n\t}",
"@PostMapping(\"/user/new/\")\n\tpublic userprofiles createUser(@RequestParam String firstname, @RequestParam String lastname, @RequestParam String username, @RequestParam String password, @RequestParam String pic) {\n\t\treturn this.newUser(firstname, lastname, username, password, pic);\n\t}",
"public void createUser() throws ServletException, IOException {\n\t\tString fullname = request.getParameter(\"fullname\");\n\t\tString password = request.getParameter(\"password\");\n\t\tString email = request.getParameter(\"email\");\n\t\tUsers getUserByEmail = productDao.findUsersByEmail(email);\n\t\t\n\t\tif(getUserByEmail != null) {\n\t\t\tString errorMessage = \"we already have this email in database\";\n\t\t\trequest.setAttribute(\"message\", errorMessage);\n\t\t\t\n\t\t\tString messagePage = \"message.jsp\";\n\t\t\tRequestDispatcher requestDispatcher = request.getRequestDispatcher(messagePage);\n\t\t\trequestDispatcher.forward(request, response);\n\t\t}\n\t\t// create a new instance of users class;\n\t\telse {\n\t\t\tUsers user = new Users();\n\t\t\tuser.setPassword(password);\n\t\t\tuser.setFullName(fullname);\n\t\t\tuser.setEmail(email);\n\t\t\tproductDao.Create(user);\n\t\t\tlistAll(\"the user was created\");\n\t\t}\n\n\t\t\n\t}",
"User createUser(User user);",
"void createUser() throws SQLException {\n String name = regName.getText();\n String birthdate = regAge.getText();\n String username = regUserName.getText();\n String password = regPassword.getText();\n String query = \" insert into users (name, birthdate, username, password)\"\n + \" values (?, ?, ?, ?)\";\n\n DB.registerUser(name, birthdate, username, password, query);\n }",
"@RequestMapping(value=\"\", method=RequestMethod.POST, consumes=MediaType.MULTIPART_FORM_DATA_VALUE, produces = \"application/json\")\n\tpublic @ResponseBody Object createUser(@RequestParam String userName, @RequestParam String userPassword, @RequestParam String userFirstName, \n\t\t\t@RequestParam String userLastName, @RequestParam String userPicURL,@RequestParam String userEmail, @RequestParam String userEmployer,\n\t\t\t@RequestParam String userDesignation, @RequestParam String userCity, @RequestParam String userState, @RequestParam(required=false) String programId, \n\t\t\t@RequestParam long updatedBy, @RequestParam String userExpertise, @RequestParam String userRoleDescription,\n\t\t\t@RequestParam String userPermissionCode, @RequestParam String userPermissionDescription, HttpServletRequest request, HttpServletResponse response) {\n\t\treturn userService.createUser(userName, userPassword, userFirstName, userLastName, userPicURL, userEmail, userEmployer, userDesignation, userCity, userState, programId, updatedBy, userExpertise, userRoleDescription, userPermissionCode, userPermissionDescription, request, response);\n\t}",
"private void register_user() {\n\n\t\tHttpRegister post = new HttpRegister();\n\t\tpost.execute(Config.URL + \"/api/newuser\");\n\n\t}",
"private void createUser(String Address, String Phone_number,String needy) {\n // TODO\n // In real apps this userId should be fetched\n // by implementing firebase auth\n if (TextUtils.isEmpty(userId)) {\n userId = mFirebaseDatabase.push().getKey();\n }\n\n com.glitch.annapurna.needy user = new needy(Address,Phone_number,needy);\n\n mFirebaseDatabase.child(userId).setValue(user);\n\n addUserChangeListener();\n }",
"private void createUser(Request request, Response response) {\r\n\t\tUserBean userBean = new UserBean();\r\n\t\tRESTfulSession session = null;\r\n\r\n\t\ttry {\r\n\t\t\tBeanHelper.populateUserBeanFromRequest(request, userBean);\r\n\t\t\tString username = userBean.getUsername();\r\n\t\t\tString password = userBean.getPassword();\r\n\t\t\tString email = userBean.getEmail();\r\n\r\n\t\t\tif (StringHelper.isNullOrNullString(username)\r\n\t\t\t\t\t|| StringHelper.isNullOrNullString(password)\r\n\t\t\t\t\t|| StringHelper.isNullOrNullString(email)) {\r\n\t\t\t\tthrow new InvalidInputException();\r\n\t\t\t}\r\n\r\n\t\t\tsession = userService.createUser(userBean);\r\n\t\t} catch (InvalidInputException e) {\r\n\t\t\tresponse.setStatus(Status.CLIENT_ERROR_BAD_REQUEST, e.getMessage());\r\n\t\t} catch (Exception e) {\r\n\t\t\tresponse.setStatus(Status.SERVER_ERROR_INTERNAL, e.getMessage());\r\n\t\t\te.printStackTrace();\r\n\t\t\tlog.error(e);\r\n\t\t} finally {\r\n\t\t\t// generate response XML\r\n\t\t\txmlSerializationService.generateXMLResponse(request, response,\r\n\t\t\t\t\tsession);\r\n\t\t}\r\n\t}",
"int createUser(User data) throws Exception;",
"private User createUser(org.picketlink.idm.model.User picketLinkUser) {\n User user = new User(picketLinkUser.getLoginName());\n user.setFullName(picketLinkUser.getFirstName() + \" \" + picketLinkUser.getLastName());\n user.setShortName(picketLinkUser.getLastName());\n return user;\n }",
"@Test (priority = 1)\n public void test002createUserWithAllFieldsTest() {\n close();\n login();\n\n //create user with filled user name only\n Map<String, String> userAttributesMap = getAllUserAttributesMap();\n createUser(ALL_FIELDS_USER_NAME, userAttributesMap);\n\n checkOperationStatusOk(\"Save (GUI)\");\n //search for the created user in users list\n searchForElement(ALL_FIELDS_USER_NAME);\n //check if all fields are saved with values\n $(By.linkText(ALL_FIELDS_USER_NAME)).shouldBe(visible).click();\n checkObjectAttributesValues(userAttributesMap);\n }",
"private void createUser(String username) {\n if (TextUtils.isEmpty(username)) {\n Toast.makeText(this, \"Username Field Required!\", Toast.LENGTH_SHORT).show();\n return;\n }else {\n FirebaseUser current_user = FirebaseAuth.getInstance().getCurrentUser();\n String userID = current_user.getUid();\n User user = new User(et_username.getText().toString(), et_gender.getText().toString(), \"Newbie\", \"Online\", \"Active\", userID, \"default_url\");\n mRef.child(mAuth.getCurrentUser().getUid()).setValue(user);\n }\n }",
"boolean create(User user) throws Exception;",
"@Override\n\tpublic ApplicationResponse createUser(UserRequest request) {\n\t\tUserEntity entity = repository.save(modeltoentity.apply(request));\n\t\tif (entity != null) {\n\t\t\treturn new ApplicationResponse(true, \"Success\", enitytomodel.apply(entity));\n\t\t}\n\t\treturn new ApplicationResponse(false, \"Failure\", enitytomodel.apply(entity));\n\t}",
"public void createUser(SignUpDto signupdto) {\n\t\tUser user = new User();\r\n\t\t\r\n\t\tuser.setId(signupdto.getId());\r\n\t\tuser.setPw(signupdto.getPw());\r\n\t\tuser.setNickname(signupdto.getNickname());\r\n\t\t\r\n\t\tuserRepository.save(user);\t\r\n\t}",
"public void createUser(String firstName, String emailAddress) {\n\n this.firstName = firstName;\n this.emailAddress = emailAddress;\n\n }",
"@Test\n\tpublic void newUser() {\n\n\t\tUser user = new User(\"moviewatcher\", \"$2a$10$37jGlxDwJK4mRpYqYvPmyu8mqQJfeQJVSdsyFY5UNAm9ckThf2Zqa\", \"USER\");\n\t\tuserRepository.save(user);\n\n\t\tassertThat(user).isNotNull();\n\t\tassertThat(user).hasFieldOrPropertyWithValue(\"username\", \"moviewatcher\");\n\t}",
"public void newUser(User user);",
"private void addNewUser() throws Exception, UnitException {\n String firstNameInput = firstName.getText();\n String lastNameInput = lastName.getText();\n String unitInput = unitID.getText();\n String accountInput = accountTypeValue;\n String passwordInput = password.getText();\n User newUserInfo;\n\n // Create user type based on the commandbox input\n switch (accountInput) {\n case \"Employee\":\n newUserInfo = new Employee(firstNameInput, lastNameInput, unitInput, passwordInput);\n break;\n case \"Lead\":\n newUserInfo = new Lead(firstNameInput, lastNameInput, unitInput, passwordInput);\n break;\n case \"Admin\":\n newUserInfo = new Admin(firstNameInput, lastNameInput, unitInput, passwordInput);\n break;\n default:\n throw new IllegalStateException(\"Unexpected value: \" + accountInput);\n }\n\n // Try adding this new user information to the database, if successful will return success prompt\n try {\n Admin.addUserToDatabase(newUserInfo);\n\n // If successful, output message dialog\n String msg = \"New User \" + firstNameInput + \" \" + lastNameInput + \" with UserID \"\n + newUserInfo.returnUserID() + \" successfully created\";\n JOptionPane.showMessageDialog(null, msg);\n\n // Reset Values\n firstName.setText(\"\");\n lastName.setText(\"\");\n unitID.setText(\"\");\n password.setText(\"\");\n } catch (UserException e) {\n JOptionPane.showMessageDialog(null, e.getMessage());\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e.getMessage());\n }\n }",
"public int createUser(Users user) {\n\t\t int result = getTemplate().update(INSERT_users_RECORD,user.getUsername(),user.getPassword(),user.getFirstname(),user.getLastname(),user.getMobilenumber());\n\t\t\treturn result;\n\t\t\n\t\n\t}",
"public void createUser() {\n try {\n conn = dao.getConnection();\n\n ps = conn.prepareStatement(\"INSERT INTO Users(username, password) VALUES(?, ?)\");\n ps.setString(1, this.username);\n ps.setString(2, this.password);\n\n ps.execute();\n\n ps.close();\n conn.close();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }",
"private void createNewUser() {\n ContentValues contentValues = new ContentValues();\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.GENDER, getSelectedGender());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.PIN, edtConfirmPin.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.LAST_NAME, edtLastName.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.FIRST_NAME, edtFirstName.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.STATUS, spnStatus.getSelectedItem().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.DATE_OF_BIRTH, edtDateOfBirth.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.BLOOD_GROUP, spnBloodGroup.getSelectedItem().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.IS_DELETED, \"N\");\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.MOBILE_NUMBER, edtMobileNumber.getText().toString());\n contentValues.put(DataBaseConstants.Constants_TBL_CATEGORIES.CREATE_DATE, Utils.getCurrentDateTime(Utils.DD_MM_YYYY));\n\n dataBaseHelper.saveToLocalTable(DataBaseConstants.TableNames.TBL_PATIENTS, contentValues);\n context.startActivity(new Intent(CreatePinActivity.this, LoginActivity.class));\n }",
"@Override\n public void createUser(User user) {\n run(()->{this.userDAO.save(user);});\n\n }",
"@Test\n public void createUserTestTest()\n {\n HashMap<String, Object> values = new HashMap<String, Object>();\n values.put(\"age\", \"22\");\n values.put(\"dob\", new Date());\n values.put(\"firstName\", \"CreateFName\");\n values.put(\"lastName\", \"CreateLName\");\n values.put(\"middleName\", \"CreateMName\");\n values.put(\"pasword\", \"user\");\n values.put(\"address\", \"CreateAddress\");\n values.put(\"areacode\", \"CreateAddressLine\");\n values.put(\"city\", \"CreateCity\");\n values.put(\"country\", \"CreateCountry\");\n values.put(\"road\", \"CreateRoad\");\n values.put(\"suberb\", \"CreateSuberb\");\n values.put(\"cell\", \"CreateCell\");\n values.put(\"email\", \"user\");\n values.put(\"homeTell\", \"CreateHomeTell\");\n values.put(\"workTell\", \"CreateWorkTell\");\n createUser.createNewUser(values);\n\n Useraccount useraccount = useraccountCrudService.findById(ObjectId.getCurrentUserAccountId());\n Assert.assertNotNull(useraccount);\n\n Garage garage = garageCrudService.findById(ObjectId.getCurrentGarageId());\n Assert.assertNotNull(garage);\n\n Saleshistory saleshistory = saleshistoryCrudService.findById(ObjectId.getCurrentSalesHistoryId());\n Assert.assertNotNull(saleshistory);\n }",
"Utilizator createUser(String username, String password, String nume,\n\t\t\tString prenume, String tip, String aux);",
"private void createAccount() {\n mAuth.createUserWithEmailAndPassword(mTextEmail.getText().toString(), mTextPassword.getText().toString()).addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n Log.d(TAG, \"createUserWithEmail:onComplete:\" + task.isSuccessful());\n\n if(!task.isSuccessful()){\n Toast.makeText(SignInActivity.this, \"Account creation failed!\", Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(SignInActivity.this, \"Account creation success!\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }",
"public void createUserAccount(UserAccount account);",
"User create(User user);",
"Boolean registerNewUser(User user);",
"@Override\n\tpublic int create(Users user) {\n\t\tSystem.out.println(\"service:creating new user...\");\n\t\treturn userDAO.create(user);\n\t}",
"public void createUser(String email, String password) {\n\n if (!validateForm()) {\n return;\n }\n\n signupBtn.setEnabled(false);\n startLoadAnim(getString(R.string.registering_user));\n mAuth.createUserWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n Log.d(TAG, \"createUserWithEmail:onComplete:\" + task.isSuccessful());\n // If sign in fails, display a message to the user. If sign in succeeds\n // the auth state listener will be notified and logic to handle the\n // signed in user can be handled in the listener.\n if (!task.isSuccessful()) {\n Toast.makeText(LoginActivity.this, R.string.registration_failed, Toast.LENGTH_SHORT).show();\n signupBtn.setEnabled(true);\n stopLoadAnim();\n }\n }\n });\n }",
"void createUser(CreateUserDto createUserDto);",
"private void setCreateUser(entity.User value) {\n __getInternalInterface().setFieldValue(CREATEUSER_PROP.get(), value);\n }",
"public void createAccount() {\n\t\tSystem.out.print(\"Enter Name: \");\n\t\tString name = nameCheck(sc.next());\n\t\tSystem.out.print(\"Enter Mobile No.: \");\n\t\tlong mobNo = mobCheck(sc.nextLong());\n\t\tlong accNo = mobNo - 1234;\n\t\tSystem.out.print(\"Enter Balance: \"); \n\t\tfloat balance = amountCheck(sc.nextFloat());\n\t\tuserBean BeanObjCreateAccountObj = new userBean(accNo, name, mobNo, balance);\n\t\tSystem.out.println(\"Account created with Account Number: \" +accNo);\n\t\tServiceObj.bankAccountCreate(BeanObjCreateAccountObj);\n\t\t\n\t\n\t}",
"public void addUserUI() throws IOException {\n System.out.println(\"Add user: id;surname;first name;username;password\");\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n String line = reader.readLine();\n String[] a = line.split(\";\");\n User user = new User(a[1], a[2], a[3], a[4], \" \");\n user.setId(Long.parseLong(a[0]));\n try\n {\n User newUser = service.addUser(user);\n if(newUser != null)\n System.out.println(\"ID already exists for \" + user.toString());\n else\n System.out.println(\"User added successfully!\");\n }\n catch (ValidationException ex)\n {\n System.out.println(ex.getMessage());\n }\n catch (IllegalArgumentException ex)\n {\n System.out.println(ex.getMessage());\n }\n }",
"public iUser createUser(int id) {\n iUser user = null;\n String username = getUsername();\n String password = getPassword();\n\n boolean confirmed = confirmed(id, username);\n if (confirmed) {\n user = registerOptions(username, password, id);\n }\n return user;\n }",
"@Override\n public ApiResponse createUser(SignupDto signupDto){\n var userRole = this.roleDAO.findByName(RoleEnum.USER);\n Set<Role> userRoles = new HashSet<Role>(Collections.singletonList(userRole.get()));\n\n Person newPerson = new Person();\n newPerson.setEmail(signupDto.getUsername());\n newPerson.setFirstName(signupDto.getFirstName());\n newPerson.setLastName(signupDto.getLastName());\n newPerson.setRoles(userRoles);\n\n // Encriptamos la contraseña que nos mando el usuario\n var encryptedPassword = this.passwordEncoder.encode(signupDto.getPassword());\n newPerson.setPassword(encryptedPassword);\n\n this.personDAO.save(newPerson);\n\n return new ApiResponse(true, \"Usuario creado\");\n\n }",
"@Headers({\n \"Content-Type:application/json\"\n })\n @POST(\"administrators\")\n Call<Void> createUser(\n @retrofit2.http.Body UserBody userBody\n );",
"private void register() {\r\n if (mName.getText().length() == 0) {\r\n mName.setError(\"please fill this field\");\r\n return;\r\n }\r\n if (mEmail.getText().length() == 0) {\r\n mEmail.setError(\"please fill this field\");\r\n return;\r\n }\r\n if (mPassword.getText().length() == 0) {\r\n mPassword.setError(\"please fill this field\");\r\n return;\r\n }\r\n if (mPassword.getText().length() < 6) {\r\n mPassword.setError(\"password must have at least 6 characters\");\r\n return;\r\n }\r\n\r\n\r\n final String email = mEmail.getText().toString();\r\n final String password = mPassword.getText().toString();\r\n final String name = mName.getText().toString();\r\n\r\n FirebaseAuth.getInstance().createUserWithEmailAndPassword(email, password).addOnCompleteListener(getActivity(), new OnCompleteListener<AuthResult>() {\r\n @Override\r\n public void onComplete(@NonNull Task<AuthResult> task) {\r\n if (!task.isSuccessful()) {\r\n Snackbar.make(view.findViewById(R.id.layout), \"sign up error\", Snackbar.LENGTH_SHORT).show();\r\n } else {\r\n String uid = FirebaseAuth.getInstance().getCurrentUser().getUid();\r\n\r\n //Saves the user's info in the database\r\n Map<String, Object> mNewUserMap = new HashMap<>();\r\n mNewUserMap.put(\"email\", email);\r\n mNewUserMap.put(\"name\", name);\r\n\r\n FirebaseDatabase.getInstance().getReference().child(\"users\").child(uid).updateChildren(mNewUserMap);\r\n }\r\n }\r\n });\r\n\r\n }",
"@Test\n public void createUser() {\n Response response = regressionClient.createUser();\n dbAssist.responseValidation(response);\n }",
"public void createUser(VUser vUser) {\n\t\tUser user = new User();\n\n\t\tboolean match = Pattern.matches(Constants.REGEX_EMAIL, vUser.getEmail());\n\t\tif (!match) {\n\t\t\tthrow new ResponseStatusException(HttpStatus.BAD_REQUEST, \"El email tiene formato incorrecto.\");\n\t\t}\n\n\t\tif (repo.getUserByEmail(vUser.getEmail()) != null) {\n\t\t\tthrow new ResponseStatusException(HttpStatus.BAD_REQUEST, \"Ya hay un usuario con ese email.\");\n\t\t}\n\n\t\tuser.setEmail(vUser.getEmail());\n\t\tuser.setFullName(vUser.getFullName());\n\t\t\n\t\tif(vUser.getFullName() == null || vUser.getFullName().isEmpty()) {\n\t\t\tuser.setFullName(vUser.getEmail());\n\t\t}\n\n\t\t// TODO: hashear password\n\t\tuser.setPasswordHash(vUser.getPassword());\n\n\t\tuser.setRoles(vUser.getRoles());\n\t\tuser.setUserType(vUser.getUserType());\n\n\t\trepo.createUser(user);\n\t}",
"@Override\n\tpublic String createUser(User users) {\n\t\tuserRepository.save(users);\n\t\treturn \"Save Successful\";\n\t}",
"private void registerUser()\n {\n /*AuthService.createAccount takes a Consumer<Boolean> where the result will be true if the user successfully logged in, or false otherwise*/\n authService.createAccount(entryService.extractText(namedFields), result -> {\n if (result.isEmpty()) {\n startActivity(new Intent(this, DashboardActivity.class));\n } else {\n makeToast(result);\n formContainer.setAlpha(1f);\n progressContainer.setVisibility(View.GONE);\n progressContainer.setOnClickListener(null);\n }\n });\n }",
"@RequestMapping(\"/signup\")\n public void signUp(String firstName, String lastName, String address,\n String emailAddress, String userName,\n String password, int age, int telephoneNumber){\n User.UserBuilder userBuilder = new User.UserBuilder(firstName, lastName, address, age,\n userName, password,emailAddress);\n if(telephoneNumber > 0) userBuilder.telephoneNumber(telephoneNumber);\n User user = userBuilder.build();\n userService.addUser(user);\n }",
"private void createUserDetails(User user) {\n userContactService.addUserContact(CreateUserContactRequest.builder()\n .displayName(user.getDisplayName())\n .realName(user.getRealName())\n .mobileNo(user.getMobileNo())\n .countryCode(user.getCountryCode())\n .userId(user.getId())\n .lastSeenDate(LocalDateTime.now())\n .userIds(Collections.singletonList(user.getId()))\n .build());\n\n settingsService.addSettings(CreateSettingsRequest.builder()\n .userId(user.getId())\n .allowNotifications(true)\n .build());\n }",
"public void create(String userName, String password, String userFullname,\r\n\t\t\tString userSex, int userTel, String role);",
"private void registerUser() {\n\n // Get register name\n EditText mRegisterNameField = (EditText) findViewById(R.id.register_name_field);\n String nickname = mRegisterNameField.getText().toString();\n\n // Get register email\n EditText mRegisterEmailField = (EditText) findViewById(R.id.register_email_field);\n String email = mRegisterEmailField.getText().toString();\n\n // Get register password\n EditText mRegisterPasswordField = (EditText) findViewById(R.id.register_password_field);\n String password = mRegisterPasswordField.getText().toString();\n\n AccountCredentials credentials = new AccountCredentials(email, password);\n credentials.setNickname(nickname);\n\n if (DataHolder.getInstance().isAnonymous()) {\n credentials.setOldUsername(DataHolder.getInstance().getUser().getUsername());\n }\n\n sendRegistrationRequest(credentials);\n }",
"@Test\n void createUserReturnsNull() {\n Address address = new Address(\"Earth\", \"Belgium\", \"City\", \"Street\", 0);\n User user = new User(\"Mira\", \"Vogelsang\", \"0412345678\", \"maarten@maarten\", \"pass\", address);\n\n assertNull(controller.createUser(user));\n }",
"public void addingNewUser() throws Exception {\n\t\tlog.info(\"Started ----- Adding New User -----\");\n\t\tFirstNameField.sendKeys(pr.loaddata(\"FirstNameField\"));\n\t\tExcelAPI e=new ExcelAPI(System.getProperty(\"user.dir\")\n\t\t\t\t+ \"/src/main/java/WebTesting/AutomationTask/TestData/AutomationTask_TestData.xlsx\");\n\t\tint rcnt = e.getRowCount(\"Task2_TestData\");\n\t\tfor (int i = 1; i < rcnt; i++) {\n\t\t\tLastNameField.clear();\n\t\t\tLastNameField.sendKeys(e.getCellData(\"Task2_TestData\", \"Last Name\", i));\n\t\t\tPasswordField.sendKeys(e.getCellData(\"Task2_TestData\", \"Password\", i));\n\t\t\tEmailField.sendKeys(e.getCellData(\"Task2_TestData\", \"Email\", i));\n\t\t}\n\t\tUserNameField.sendKeys(pr.loaddata(\"username\") + pr.randomusername());\n\t\tWebElement radio_Button = CustomerField;\n\t\tif (!radio_Button.isSelected()) {\n\t\t\tCustomerField.click();\n\t\t\tThread.sleep(1000);\n\t\t}\n\t\tRoleField.click();\n\t\tdriver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS); // Implicitly Wait\n\t\tPhoneField.sendKeys(pr.loaddata(\"phonenumber\") + pr.randomphonenumber());\n\t\tSaveButtonField.click();\n\t\twaitforElement(SearchField, 30); // Explicitly Wait\n\t\tlog.info(\"Ended ----- Adding New User -----\");\n\t}",
"@POST\n public User create(User user) {\n SecurityUtils.getSubject().checkPermission(\"User:Edit\");\n\n userFacade.create(user);\n return user;\n }",
"@Override\n\tpublic void createUser(User user) {\n\t\tSystem.out.println(\"INSIDE create user function\");\n\t\tem.persist(user);\n\t\t\t\n\t}",
"User create(final User user) throws DatabaseException;",
"public void createUser(User u) {\n\n em.persist(u);\n\n String content = \"new user: \" + u.getName() + \" => \" + u.getPassword();\n\n MailMessage mailMessage = new MailMessage();\n\n mailMessage.addRecipient(\"[email protected]\");\n mailMessage.setContent(content);\n mailMessage.setSubject(\"new user: \" + u.getName());\n mailer.sendAsyncMail(mailMessage);\n\n mailer.sendSyncMail(mailMessage);\n\n }",
"User registration(User user);",
"@RequestMapping(value = \"create\", method = RequestMethod.POST)\n\tpublic String create(@ModelAttribute(\"usermodel\") User user, Errors errors)\n\t\t\tthrows NoSuchAlgorithmException, IOException {\n\t\tuser.setId(0);\n\t\tvalidator.validate(user, errors);\n\t\tif (errors.hasErrors()) {\n\t\t\treturn VIEW_DEFAULT;\n\t\t}\n\t\tuser.setCreated(new Date());\n\t\tString password = user.getPassword();\n\t\tStandardPasswordEncoder encoder = new StandardPasswordEncoder();\n String encodedPassword = encoder.encode(password);\n user.setPassword(encodedPassword);\n String uuid = UUID.randomUUID().toString();\n user.setUuid(uuid);\n user.setStatus(EnumStatus.INACTIVE.toString());\n // if there is the inactive user, update it with new data\n User userDb = userRepository.findInactiveByEmail(user.getEmail());\n if (userDb != null) {\n \tuser.setId(userDb.getId());\n }\n userRepository.save(user);\n\n // send registration email\n sendRegistrationEmail(user.getEmail(), uuid);\n\n\t\treturn VIEW_EMAIL_SENT;\n\t}",
"public User() {\n this.id = 0;\n this.username = \"gfisher\";\n this.password = \"password\";\n this.email = \"[email protected]\";\n this.firstname = \"Gene\";\n this.lastname = \"Fisher\";\n this.type = new UserPermission(true, true, true, true);\n }",
"@PostMapping(\"/users\")\n public UsersResponse createNewUser(@RequestBody NewUserRequest request) {\n User user = new User();\n user.setName(request.getName());\n user.setAge(request.getAge());\n user = userRepository.save(user);\n return new UsersResponse(user.getId(), user.getName() + user.getAge());\n }",
"public User(int user_id, String full_name, String address, String postal_code, int mobile_no,\n String snow_zone, String garbage_day, String password){\n this.user_id = user_id;\n this.full_name = full_name;\n this.address = address;\n this.postal_code = postal_code;\n this.mobile_no = mobile_no;\n this.snow_zone = snow_zone;\n this.garbage_day = garbage_day;\n this.password = password;\n\n }",
"public void onCreationEvent(UserCreateEvent event){\n user = new UserBean(event.getUser());\n }",
"public void setCreateUser(entity.User value) {\n __getInternalInterface().setFieldValue(CREATEUSER_PROP.get(), value);\n }",
"private User createUser(String username, String name, String email, String password) {\n UserDTO userDTO = new UserDTO();\n userDTO.setEmail(email);\n userDTO.setName(name);\n userDTO.setPassword(password);\n userDTO.setUsername(username);\n\n userService.registerUser(userDTO);\n\n User user = userService.getUserByEmail(email);\n return user;\n }",
"public User() {\n setName(\"\");\n setBirthdate(\"\");\n setCity(\"\");\n setIsSingle(true);\n setPartnerName(\"\");\n setPartnerGender(\"\");\n setMonthsUntilDeath(0);\n }",
"public void register()\n {\n String n = nameProperty.getValue();\n if (n == null || n.isEmpty())\n {\n throw new IllegalArgumentException(\"Field cannot be empty\");\n }\n String p = passwordProperty.getValue();\n if (p == null || p.isEmpty())\n {\n throw new IllegalArgumentException(\"Field cannot be empty\");\n }\n String e = emailProperty.getValue();\n if (e == null || e.isEmpty())\n {\n throw new IllegalArgumentException(\"Field cannot be empty\");\n }\n String ph = phoneProperty.getValue();\n if (ph == null || ph.isEmpty())\n {\n throw new IllegalArgumentException(\"Field cannot be empty\");\n }\n if (ph.length() != 8)\n {\n throw new IllegalArgumentException(\"Invalid phone number\");\n }\n try\n {\n Integer.parseInt(ph);\n }\n catch (NumberFormatException ex)\n {\n throw new IllegalArgumentException(\"Invalid phone number\", ex);\n }\n String t = titleProperty.getValue();\n if (t == null || t.isEmpty())\n {\n throw new IllegalArgumentException(\"Field cannot be empty\");\n }\n String a = authorProperty.getValue();\n if (a == null || a.isEmpty())\n {\n throw new IllegalArgumentException(\"Field cannot be empty\");\n }\n String y = yearProperty.getValue();\n if (y == null || y.isEmpty())\n {\n throw new IllegalArgumentException(\"Field cannot be empty\");\n }\n if (y.length() != 4)\n {\n throw new IllegalArgumentException(\"Invalid year\");\n }\n try\n {\n Integer.parseInt(y);\n }\n catch (NumberFormatException ex)\n {\n throw new IllegalArgumentException(\"Invalid year\", ex);\n }\n\n try\n {\n\n model.registerUser(n, p, e, ph, t, a, y);\n\n }\n catch (Exception e1)\n {\n\n e1.printStackTrace();\n }\n\n }",
"public void setupUser() {\n }",
"private void CreateUserAccount(final String lname, String lemail, String lpassword, final String lphone, final String laddress, final String groupid, final String grouppass ){\n mAuth.createUserWithEmailAndPassword(lemail,lpassword).addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if(task.isSuccessful()){\n //account creation successful\n showMessage(\"Account Created\");\n //after user account created we need to update profile other information\n updateUserInfo(lname, pickedImgUri,lphone, laddress, groupid, grouppass, mAuth.getCurrentUser());\n }\n else{\n //account creation failed\n showMessage(\"Account creation failed\" + task.getException().getMessage());\n regBtn.setVisibility(View.VISIBLE);\n loadingProgress.setVisibility(View.INVISIBLE);\n\n }\n }\n });\n }",
"Human_User createHuman_User();",
"public User createUser(User user) {\r\n user.setPassword(hashPassword(user.getPassword()));\r\n\r\n if(!isLetters(user.getFirstname()) || !isLetters(user.getLastname()) || !isLetters(user.getCity())) {\r\n throw new IllegalArgumentException(\"Firstname, lastname or city did not contain only letters\");\r\n } else if (!user.getEmail().contains(\"@\") || !user.getEmail().contains(\".\")) {\r\n throw new IllegalArgumentException(\"Email must contain @ and .\");\r\n } else if (String.valueOf(user.getBirthyear()).length() != 4) {\r\n throw new IllegalArgumentException(\"Wrong format for birthday\");\r\n } else if (!isValidGender(user.getGender())) {\r\n throw new IllegalArgumentException(\"Wrong format for gender\");\r\n }\r\n if (user.getRating() == null){\r\n Rating rating = new Rating(user);\r\n user.setRating(rating);\r\n }\r\n return userRepo.save(user);\r\n }",
"public void insertUser() {}",
"public UserAuthToken createUser(CreateUserRequest request);",
"public CreateUser(int age, String name){ // constructor\n userAge = age;\n userName = name;\n }",
"@Test\n\tpublic void testCreateUser() {\n\t\tassertTrue(auctionSystem.createUser(\"toto\", \"Glen\", \"Fiddich\", RoleEnum.SELLER));\n\t\tassertTrue(auctionSystem.createUser(\"tata\", \"Johnnie\", \"Campbell\", RoleEnum.BUYER));\n\t\tassertTrue(auctionSystem.createUser(\"tutu\", \"Ballentine\", \"Darmore\", RoleEnum.SELLER_BUYER));\n\t}",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {\n if (CREATE_USER_REQUEST_CODE == requestCode && RESULT_OK == resultCode){\n if (data != null) {\n String username = data.getStringExtra(UserCreationActivity.BUNDLE_NEW_USER_NAME);\n\n User user = new User(username, User.EMPTY_CASE, User.EMPTY_CASE);\n\n createUser(user);\n }\n }\n }",
"private void newUser(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {\n\t\ttry {\n\t\t\tPrintWriter out = res.getWriter();\n\t\t\tString name = req.getParameter(Constants.NAME_USER);\n\t\t\tUserDB.introduceUser(name);\n\t\t\tlong id = UserDB.getUserId(name);\n\t\t\tUsuario u = new Usuario(name, Long.toString(id));\n\t\t\tout.print(gson.toJson(u));\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tres.setStatus(HttpServletResponse.SC_BAD_REQUEST);\n\t\t}\n\t}",
"public void createAdminUser() {\n\n Users user = new Users();\n user.setId(\"1\");\n user.setName(\"admin\");\n user.setPassword(bCryptPasswordEncoder.encode(\"admin\"));\n\n ExampleMatcher em = ExampleMatcher.matching().withIgnoreCase();\n Example<Users> example = Example.of(user, em);\n List<Users> users = userRepository.findAll(example);\n System.out.println(\"Existing users: \" + users);\n\n if (users.size() == 0) {\n System.out.println(\"admin user not found, hence creating admin user\");\n userRepository.save(user);\n System.out.println(\"admin user created\");\n latch.countDown();\n }\n try {\n latch.await();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }",
"public UserRecord(Integer idUser, String name, String surname, String title, LocalDateTime dateBirth, LocalDateTime dateCreate, LocalDateTime dateUpdate, LocalDateTime dateDelete, String govId, String username, String password, String email, String gender, String status) {\n super(User.USER);\n\n set(0, idUser);\n set(1, name);\n set(2, surname);\n set(3, title);\n set(4, dateBirth);\n set(5, dateCreate);\n set(6, dateUpdate);\n set(7, dateDelete);\n set(8, govId);\n set(9, username);\n set(10, password);\n set(11, email);\n set(12, gender);\n set(13, status);\n }",
"@PostMapping\n @ResponseStatus(HttpStatus.CREATED)\n public UserResponse createUser(@Valid @RequestBody CreateUserRequest createUser) {\n return userMapper.toUserResponse(\n userService.createUser(\n userMapper.toDto(createUser)\n )\n );\n }",
"@PostMapping(\"/users\")\n\tpublic ResponseEntity<UserDTO> creareUser(@RequestBody(required = true) @Valid UserDTO user) {\n\t\tuser = userService.createUser(user);\n\t\treturn new ResponseEntity<>(user, HttpStatus.CREATED);\n\t}",
"UserModel createUserModel(UserModel userModel);",
"public void Register() {\n Url url = new Url();\n User user = new User(fname.getText().toString(), lname.getText().toString(), username.getText().toString(), password.getText().toString());\n Call<Void> registerUser = url.createInstanceofRetrofit().addNewUser(user);\n registerUser.enqueue(new Callback<Void>() {\n @Override\n public void onResponse(Call<Void> call, Response<Void> response) {\n Toast.makeText(getActivity(), \"User Registered successfully\", Toast.LENGTH_SHORT).show();\n }\n\n @Override\n public void onFailure(Call<Void> call, Throwable t) {\n Toast.makeText(getActivity(), \"Error\" + t, Toast.LENGTH_SHORT).show();\n }\n });\n }",
"@POST\n\t@Path(\"/newUser\")\n\t@Consumes({ MediaType.APPLICATION_JSON })\n\t@Produces({ MediaType.APPLICATION_JSON })\n\t@Transactional\n\tpublic Response createUser(User user) {\n\t\tuserDao.createUser(user);\n\n\t\treturn Response.status(201)\n\t\t\t\t.entity(\"A new user has been created\").build();\n\t}",
"@PostMapping(consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)\n @ResponseBody\n public UserResult createUser(@RequestBody UserInput userInput) {\n return userService.create(userInput);\n }",
"@Override\r\n\tpublic void postRequest(Request request, Response response) {\r\n\t\tcreateUser(request, response);\r\n\t}",
"@BeforeClass(alwaysRun = true)\r\n\tpublic void createUser() throws ParseException, SQLException, JoseException {\r\n\t\tSystem.out.println(\"******STARTING***********\");\r\n\t\tUser userInfo = User.builder().build();\r\n\t\tuserInfo.setUsername(userName);\r\n\t\tuserInfo.setPassword(\"Test@123\");\r\n\t\tsessionObj = EnvSession.builder().cobSession(config.getCobrandSessionObj().getCobSession())\r\n\t\t\t\t.path(config.getCobrandSessionObj().getPath()).build();\r\n\t\t//userHelper.getUserSession(\"InsightsEngineusers26 \", \"TEST@123\", sessionObj); \r\n\t\tuserHelper.getUserSession(userInfo, sessionObj);\r\n\t\tlong providerId = 16441;\r\n\t\tproviderAccountId = providerId;\r\n\t\tResponse response = providerAccountUtils.addProviderAccountStrict(providerId, \"fieldarray\",\r\n\t\t\t\t\"budget1_v1.site16441.1\", \"site16441.1\", sessionObj);\r\n\t\tproviderAccountId = response.jsonPath().getLong(JSONPaths.PROVIDER_ACC_ID);\r\n\t\tAssert.assertTrue(providerAccountId!=null);\r\n\t\t\r\n\t\t}",
"public void createUserAccount(SignupRequest signUpRequest) {\n\t\tApplicationUser user = new ApplicationUser(signUpRequest.getUsername(), \r\n\t\t\t\t\t\t\t signUpRequest.getEmail(),\r\n\t\t\t\t\t\t\t encoder.encode(signUpRequest.getPassword()));\r\n\r\n\t\tSet<String> strRoles = signUpRequest.getRole();\r\n\t\tSet<Role> roles = new HashSet<>();\r\n\r\n\t\tif (strRoles == null || strRoles.isEmpty()) {\r\n\t\t\tRole userRole = roleRepository.findByName(ERole.ROLE_USER)\r\n\t\t\t\t\t.orElseThrow(() -> new RuntimeException(\"Error: Role is not found.\"));\r\n\t\t\troles.add(userRole);\r\n\t\t} else {\r\n\t\t\tstrRoles.forEach(role -> {\r\n\t\t\t\tswitch (role) {\r\n\t\t\t\tcase \"ROLE_ADMIN\":\r\n\t\t\t\t\tRole adminRole = roleRepository.findByName(ERole.ROLE_ADMIN)\r\n\t\t\t\t\t\t\t.orElseThrow(() -> new RuntimeException(\"Error: Role is not found.\"));\r\n\t\t\t\t\troles.add(adminRole);\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"ROLE_POC\":\r\n\t\t\t\t\tRole modRole = roleRepository.findByName(ERole.ROLE_POC)\r\n\t\t\t\t\t\t\t.orElseThrow(() -> new RuntimeException(\"Error: Role is not found.\"));\r\n\t\t\t\t\troles.add(modRole);\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tRole userRole = roleRepository.findByName(ERole.ROLE_USER)\r\n\t\t\t\t\t\t\t.orElseThrow(() -> new RuntimeException(\"Error: Role is not found.\"));\r\n\t\t\t\t\troles.add(userRole);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tuser.setRoles(roles);\r\n\t\tuserRepository.save(user);\r\n\t}",
"public String createUserAction()throws Exception{\n\t\tString response=\"\";\n\t\tresponse=getService().getUserMgmtService().createNewUser(\n\t\t\t\tgetAuthBean().getUserName(),\n\t\t\t\tgetAuthBean().getFirstName(),\n\t\t\t\tgetAuthBean().getLastName(),\n\t\t\t\tgetAuthBean().getEmailId(),\n\t\t\t\tgetAuthBean().getRole()\n\t\t);\n\t\tgetAuthBean().setResponse(response);\n\t\tinputStream = new StringBufferInputStream(response);\n\t\tinputStream.close();\n\t\treturn SUCCESS;\n\t}",
"public void makeNewUser(String name, int age, String address, String password)\n throws SQLException, ConnectionFailedException, DatabaseInsertException {\n if (this.currentUserAuthenticated) {\n // find the role ID that corresponds to customer\n EnumMapRolesAndAccounts map = new EnumMapRolesAndAccounts();\n map.createEnumMap();\n int roleId = map.roleIds.get(Roles.CUSTOMER);\n int userId = DatabaseInsertHelper.insertNewUser(name, age, address, roleId, password);\n System.out.println(\"User ID - \" + userId);\n System.out.println(\"succesfully made user\");\n } else {\n System.out.println(\"failed making user\");\n throw new ConnectionFailedException();\n }\n }",
"public void createAccount() {\n\t\t// Assigns variables based on user input\n\t\tString username = usernameField.getText();\n\t\tString firstName = firstNameField.getText();\n\t\tString lastName = lastNameField.getText();\n\t\tString address = addressField.getText();\n\t\tString postCode = postcodeField.getText();\n\t\tString phoneNumber = phoneNumberField.getText();\n\t\tlong phoneNumberLong;\n\t\tif (username.isEmpty() || firstName.isEmpty() || lastName.isEmpty() || address.isEmpty() || postCode.isEmpty()\n\t\t\t\t|| phoneNumber.isEmpty()) { // Checks if number is correct format\n\n\t\t\tAlert alert = new Alert(AlertType.ERROR); // Error message\n\t\t\talert.setTitle(\"Error\");\n\n\t\t\talert.setHeaderText(\"Could not create an user\");\n\t\t\talert.setContentText(\"Make sure you fill all fields and press button again\");\n\t\t\talert.showAndWait();\n\n\t\t\treturn;\n\t\t}\n\n\t\telse {\n\t\t\ttry {\n\t\t\t\tphoneNumberLong = Long.parseLong(phoneNumber);\n\t\t\t} catch (Exception e) {\n\t\t\t\tAlert alert = new Alert(AlertType.ERROR);\n\t\t\t\talert.setTitle(\"Error\");\n\n\t\t\t\talert.setHeaderText(\"Wrong format of phone number\");\n\t\t\t\talert.setContentText(\"Please enter correct phone number\");\n\t\t\t\talert.showAndWait();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tif(FileReader.exists(username)) {\n\t\t\t\tAlert alert = new Alert(AlertType.ERROR);\n\t\t\t\talert.setTitle(\"Error\");\n\n\t\t\t\talert.setHeaderText(\"User with the username \"+ username +\" already exists. \");\n\t\t\t\talert.setContentText(\"Please choose another username\");\n\t\t\t\talert.showAndWait();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tString userdata = \"\";\n\t\t\tuserdata += \"\\n Username: \" + username;\n\t\t\tuserdata += \"\\n First name: \" + firstName;\n\t\t\tuserdata += \"\\n Last name: \" + lastName;\n\t\t\tuserdata += \"\\n Address: \" + address;\n\t\t\tuserdata += \"\\n Post code: \" + postCode;\n\t\t\tuserdata += \"\\n Phone number: \" + phoneNumberLong;\n\t\t\t\n\n\t\t\tif(custom) {\n\t\t\t\tavatarIndex = 101;\n\t\t\t\t// Gives users the custom avatar\n\t\t\t\tFile file1 = new File(\"artworkImages/\" + username);\n\t\t\t\tfile1.mkdir();\n\t\t\t\tPath path = Paths.get(\"customAvatars/\" + username + \".png\");\n\t\t\t\tString path1 = \"tmpImg.png\";\n\t\t\t\tFile file = new File(path1);\n\n\t\t\t\ttry {\n\t\t\t\t\tFiles.copy(file.toPath(), path, StandardCopyOption.REPLACE_EXISTING);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tUser user = new User(username, firstName, lastName, address, postCode, phoneNumberLong, avatarIndex);\n\t\t\tFileReader.addUser(user); // Creates user\n\n\t\t\ttry {\n\t\t\t\tWriter.writeUserFile(user); // Adds user to memory\n\t\t\t} catch (IOException e) {\n\t\t\t\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\n\t\t\tAlert alert = new Alert(AlertType.INFORMATION); // Success message\n\t\t\talert.setTitle(\"Success\");\n\n\t\t\talert.setHeaderText(\"The user has been created\");\n\t\t\talert.setContentText(\"Close this window to return to login screen\");\n\t\t\talert.showAndWait();\n\n\t\t\tcreateAccountButton.getScene().getWindow().hide();\n\t\t}\n\n\t}"
] | [
"0.77515036",
"0.7619387",
"0.7576411",
"0.7450125",
"0.73990643",
"0.7350841",
"0.7296505",
"0.7265082",
"0.72511756",
"0.72032183",
"0.71980906",
"0.7191268",
"0.71835417",
"0.7063725",
"0.7057419",
"0.7012626",
"0.7005776",
"0.69875324",
"0.6940025",
"0.6908295",
"0.6906088",
"0.6893522",
"0.6888148",
"0.6884647",
"0.6870529",
"0.68304944",
"0.682103",
"0.68167233",
"0.6816442",
"0.6810076",
"0.6807428",
"0.68028927",
"0.68002445",
"0.6797608",
"0.67662376",
"0.6761846",
"0.6753502",
"0.67528605",
"0.6743889",
"0.67405635",
"0.67346865",
"0.6731393",
"0.672421",
"0.6710294",
"0.6707764",
"0.6704762",
"0.6699639",
"0.66995776",
"0.66962516",
"0.6681573",
"0.66765827",
"0.66731906",
"0.66731095",
"0.6660796",
"0.6659357",
"0.6657587",
"0.6652377",
"0.66513747",
"0.66443545",
"0.663521",
"0.66339433",
"0.6629696",
"0.66186965",
"0.661778",
"0.6615984",
"0.66112965",
"0.66028917",
"0.6593049",
"0.65835106",
"0.6582166",
"0.6579654",
"0.6579314",
"0.65778303",
"0.6576707",
"0.6575234",
"0.657473",
"0.6571895",
"0.65655905",
"0.656554",
"0.6556669",
"0.655547",
"0.6554922",
"0.6548699",
"0.654788",
"0.6546808",
"0.6544552",
"0.65372086",
"0.65280175",
"0.65227765",
"0.6520116",
"0.6519201",
"0.6518814",
"0.65069467",
"0.6504719",
"0.6501836",
"0.6495051",
"0.6487872",
"0.6484848",
"0.6484576",
"0.648145",
"0.6480862"
] | 0.0 | -1 |
Adds the given effect to the Wizard's current effects. | public synchronized void addEffect(SpellEffect effect) {
effects.add(effect);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void effectAdded(Effect effect) {\n\t}",
"public void addEffect(BattleEffect btlEff) {\n effectsToApply.add(btlEff);\n effectsToRemove.add(btlEff);\n }",
"public void registerEffect(IEnvironmentalEffect effect);",
"public void addEffects() {\r\n\t\tfor (BlinkingButton effect : parameterLocation) {\r\n\t\t\t//Effects that are visible - should be added the the panel\r\n\t\t\tif (effect.isVisible()) {\r\n\t\t\t\tmainPanel.add(effect);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void setEffect(String effect){\n this.effect = effect;\n }",
"private String addEffect() {\n\t\t// One Parameter: EffectName\n\t\tStringBuilder tag = new StringBuilder();\n\t\ttag.append(\"|effect:\" + parameters[0]);\n\t\treturn tag.toString();\n\n\t}",
"void addEffect(Effect effect, boolean temp) {\n/* 1782 */ if (this.isTransition && this.surfaced) {\n/* */ \n/* 1784 */ getCaveTile().addEffect(effect, temp);\n/* */ \n/* */ return;\n/* */ } \n/* 1788 */ if (!temp) {\n/* */ \n/* 1790 */ if (this.effects == null)\n/* 1791 */ this.effects = new HashSet<>(); \n/* 1792 */ this.effects.add(effect);\n/* */ } \n/* */ \n/* 1795 */ if (this.watchers != null)\n/* */ {\n/* 1797 */ for (Iterator<VirtualZone> it = this.watchers.iterator(); it.hasNext();) {\n/* 1798 */ ((VirtualZone)it.next()).addEffect(effect, temp);\n/* */ }\n/* */ }\n/* 1801 */ effect.setSurfaced(this.surfaced);\n/* */ \n/* */ try {\n/* 1804 */ effect.save();\n/* */ }\n/* 1806 */ catch (IOException iox) {\n/* */ \n/* 1808 */ logger.log(Level.INFO, iox.getMessage(), iox);\n/* */ } \n/* */ }",
"private void addAdditionalEffects()\n {\n // make them fly so they do not fall from suspension\n FLYING flying = new FLYING(p, duration + 10, targetID);\n Ollivanders2API.getPlayers().playerEffects.addEffect(flying);\n additionalEffects.add(O2EffectType.FLYING);\n\n // add an immbolize effect with a duration slightly longer than this one so that they cannot move while suspended\n IMMOBILIZE immbobilize = new IMMOBILIZE(p, duration + 10, targetID);\n Ollivanders2API.getPlayers().playerEffects.addEffect(immbobilize);\n additionalEffects.add(O2EffectType.IMMOBILIZE);\n }",
"public void test_useCase_addEffect() throws UiObjectNotFoundException\n {\n executeTestCase(appPackageName, appLaunchIconText, \"addEffect\", 9, false);\n }",
"private void applyEffect(Event.Effect effect) {\n\t\tint change = (int) effect.getValue();\n\t\t\n\t\tswitch(effect.getType()) {\t\t\n\t\tcase INCREASE_MONEY:\n\t\t\tplayer.setMoney(player.getMoney() + change);\n\t\t\tbreak;\n\t\tcase DECREASE_MONEY:\n\t\t\tplayer.setMoney(player.getMoney() - change);\n\t\t\tbreak;\n\t\tcase INCREASE_AGENTS:\n\t\t\tplayer.setAgentNumber(player.getAgentNumber() + change);\n\t\t\tbreak;\n\t\tcase DECREASE_AGENTS:\n\t\t\tplayer.setAgentNumber(player.getAgentNumber() - change);\n\t\t\tbreak;\n\t\tcase INCREASE_AGENT_SKILL:\n\t\t\tplayer.setAgentSkill(player.getAgentSkill() + change);\n\t\t\tbreak;\n\t\tcase DECREASE_AGENT_SKILL:\n\t\t\tplayer.setAgentSkill(player.getAgentSkill() - change);\t\t\t\n\t\t\tbreak;\n\t\tcase INCREASE_MEDIA_REACH:\n\t\t\tplayer.setMediaReach(player.getMediaReach() + change);\n\t\t\tbreak;\n\t\tcase DECREASE_MEDIA_REACH:\n\t\t\tplayer.setMediaReach(player.getMediaReach() - change);\t\t\t\n\t\t\tbreak;\n\t\tcase INCREASE_MEDIA_INFLUENCE:\n\t\t\tplayer.setMediaPerception(player.getMediaPerception() + change);\n\t\t\tbreak;\n\t\tcase DECREASE_MEDIA_INFLUENCE:\n\t\t\tplayer.setMediaPerception(player.getMediaPerception() - change);\t\t\t\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t// TODO handle error\n\t\t}\n\t\t\n\t}",
"public void addEffect(String e) {\n \t\tif (!e.isEmpty())\n \t\t\teffects.add(e);\n \t\t// TODO: process effects to make attributes\n \t}",
"public void effect() {\n }",
"public void setEffect(BGMTransition effect)\n\t{\n\t\tthis.effect = effect;\n\t}",
"void applyEffects();",
"private static void playEffect(Clip effect) {\n\n\t\tif (GameFrame.settingsPanel.effectsOn() && effect != null) {\n\t\t\teffect.start();\n\t\t\teffect.setFramePosition(0);\n\t\t}\n\n\t}",
"private static void loadQuestEffects(Objective o, String thisLine)\n\t\t\tthrows IOException {\n\t\tString nextLine = thisLine;\n\t\tMatcher m;\n\t\t// Find any effects\n\t\tdo {\n\t\t\tPattern effectPattern = Pattern.compile(\"<effect\");\n\t\t\tif ((m = effectPattern.matcher(nextLine)).find()) {\n\t\t\t\t// Find the location\n\t\t\t\tm = propertyExtractor(\"loc\", \"\\\\w+\").matcher(nextLine);\n\t\t\t\tString loc = \"end\";\n\t\t\t\tif (m.find()) {\n\t\t\t\t\tloc = m.group(1);\n\t\t\t\t}\n\t\t\t\t// Create a function that adds the effect in the create place\n\t\t\t\tConsumer<Consumer<World>> addEffect = null;\n\t\t\t\tif (loc.equals(\"end\")) {\n\t\t\t\t\taddEffect = (ccw -> o.addEndEffect(ccw));\n\t\t\t\t} else if (loc.equals(\"start\")) {\n\t\t\t\t\taddEffect = (ccw -> o.addStartEffect(ccw));\n\t\t\t\t} else {\n\t\t\t\t\tlogError(\"Unknown effect location: \" + loc, 2);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\twhile (!(nextLine = getNextLine()).matches(\n\t\t\t\t\t\t\"\\\\s*</effect>\\\\s*\")) {\n\t\t\t\t\t// Find all effects\n\t\t\t\t\tPattern setStatePattern = Pattern.compile(\n\t\t\t\t\t\t\t\"setState\\\\((\\\\d+),(\\\\d+)\\\\)\");\n\t\t\t\t\tm = setStatePattern.matcher(nextLine);\n\t\t\t\t\tif (m.find()) {\n\t\t\t\t\t\tint npcID = Integer.parseInt(m.group(1));\n\t\t\t\t\t\tint newState = Integer.parseInt(m.group(2));\n\n\t\t\t\t\t\taddEffect.accept(cw -> {\n\t\t\t\t\t\t\tif (cw != null && cw.getMap() != null) {\n\t\t\t\t\t\t\t\tNPC npc = cw.getMap().getNPC(npcID);\n\t\t\t\t\t\t\t\tif (npc != null) {\n\t\t\t\t\t\t\t\t\tnpc.setStoryState(newState);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\n\t\t\t\t\tPattern addObjectPattern = Pattern.compile(\n\t\t\t\t\t\t\t\"addObject\\\\(([\\\\w_]+),(\\\\d+),(\\\\d+),(\\\\d+),(\\\\d+)\\\\)\");\n\t\t\t\t\tm = addObjectPattern.matcher(nextLine);\n\t\t\t\t\tif (m.find()) {\n\t\t\t\t\t\tString itemType = m.group(1).toUpperCase();\n\t\t\t\t\t\tint x = Integer.parseInt(m.group(2));\n\t\t\t\t\t\tint y = Integer.parseInt(m.group(3));\n\t\t\t\t\t\tint lockID = Integer.parseInt(m.group(4));\n\t\t\t\t\t\tint npcID = Integer.parseInt(m.group(5));\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tItemType it = ItemType.valueOf(itemType);\n\t\t\t\t\t\t\taddEffect.accept(cw -> {\n\t\t\t\t\t\t\t\tWorldObject wo = ObjectMaker.makeFromType(it,\n\t\t\t\t\t\t\t\t\t\tnew Point(x, y), lockID, npcID);\n\t\t\t\t\t\t\t\tcw.addObject(wo);\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t} catch (IllegalArgumentException e) {\n\t\t\t\t\t\t\tlogError(\"Unknown item type: \" + itemType, 2);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tPattern useObjectPattern = Pattern.compile(\n\t\t\t\t\t\t\t\"use\\\\(([\\\\w_]+),(\\\\d+)\\\\)\");\n\t\t\t\t\tm = useObjectPattern.matcher(nextLine);\n\t\t\t\t\tif (m.find()) {\n\t\t\t\t\t\tString itemType = m.group(1).toUpperCase();\n\t\t\t\t\t\tint quant = Integer.parseInt(m.group(2));\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tItemType it = ItemType.valueOf(itemType);\n\t\t\t\t\t\t\taddEffect.accept(cw -> {\n\t\t\t\t\t\t\t\tif (cw != null && cw.getMap() != null\n\t\t\t\t\t\t\t\t\t\t&& cw.getMap().getPlayer() != null) {\n\t\t\t\t\t\t\t\t\tPlayer p = (Player) cw.getMap().getPlayer();\n\t\t\t\t\t\t\t\t\tp.use(it, quant);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t} catch (IllegalArgumentException e) {\n\t\t\t\t\t\t\tlogError(\"Unknown item type: \" + itemType, 2);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tPattern worldConvPattern = Pattern.compile(\"worldConv\\\\((\\\\d+)\\\\)\");\n\t\t\t\t\tm = worldConvPattern.matcher(nextLine);\n\t\t\t\t\tif (m.find()) {\n\t\t\t\t\t\tint convID = Integer.parseInt(m.group(1));\n\t\t\t\t\t\taddEffect.accept(cw -> cw.showWorldConversation(convID));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} while ((nextLine = getNextLine()) != null\n\t\t\t\t&& !nextLine.matches(\"\\\\s*</objective>\\\\s*\"));\n\n\t}",
"@Override\n public void applyEffect(Player player) {\n\n player.add(mResourcesGains);\n\n }",
"Effect getEffect();",
"public V1Toleration withEffect(String effect) {\n this.effect = effect;\n return this;\n }",
"@Override\n public void effect() {\n\n }",
"@Override\n\tpublic void setEffect(Effect effect) {\n\t\tthis.effect = effect;\n\t\tthis.txtEffectName.setText(this.effect.getName());\n\t\tthis.txtEffectValue.setText(Integer.toString(this.effect.getValue()));\n\t\tthis.txtaDescription.setText(((FeintActionEffect)this.effect).getDescription());\n\t}",
"protected void registerEffect(String effectCode, Effect effect){\n this.registry.put(effectCode, effect);\n }",
"public void pushEffect(Integer effectID){\n history.push(effectID);\n }",
"protected void applyEffects()\n\t{\n\t\tfor(int i = 0; i < effects.length; i++)\n\t\t{\n\t\t\tif(effects[i] != null)\n\t\t\t{\n\t\t\t\teffects[i].applyEffect();\n\t\t\t}\n\t\t}\n\t}",
"public final void appendRequiredEffect(StandardEffect effect) {\n appendCost(effect);\n }",
"@Override\n\tpublic Affectation addAffectation(Affectation affectation, int idEquip) {\n\t\treturn dao.addAffectation(affectation, idEquip);\n\t}",
"public void apply() {\r\n\tif (currentEffect != null)\r\n\t currentEffect.removeFrom(kingdom);\r\n\r\n\tif (isVacant())\r\n\t currentEffect = penalty;\r\n\telse\r\n\t currentEffect = bonus;\r\n\r\n\tcurrentEffect.applyTo(kingdom);\r\n }",
"public abstract void setEffects(Tank t);",
"public String getEffect() {\n\t\treturn effect;\n\t}",
"@Override\n\tprotected void enterEffect() {\n\t\t\n\t}",
"public void executeEffect() {\n\t\texecuteEffect(myCard);\n\t}",
"public void addLayer(int index, int effect, float param){\n history.addAtIndex(index, effect);\n historyValues.addAtIndex(index, param);\n }",
"@Override\n public List<Effect> getEffect() {\n \treturn new ArrayList<Effect>(effects);\n }",
"public synchronized void removeEffectFromList(SpellEffect effect) {\n if (effects.contains(effect)) {\n effects.remove(effect);\n }\n }",
"@Override\n protected void doPlayEffect(final SwccgGame game) {\n BattleState battleState = game.getGameState().getBattleState();\n battleState.increaseBaseAttrition(game.getDarkPlayer(), battleState.getTotalBattleDestiny(game, game.getLightPlayer()));\n battleState.increaseBaseAttrition(game.getLightPlayer(), battleState.getTotalBattleDestiny(game, game.getDarkPlayer()));\n battleState.baseAttritionCalculated();\n\n // Emit effect result that can trigger cards that can respond to the attrition being calculated\n game.getActionsEnvironment().emitEffectResult(\n new InitialAttritionCalculatedResult(battleState.getPlayerInitiatedBattle()));\n }",
"public abstract int addEffect(Guid process, Guid signal)\r\n throws SignalModeConflictException;",
"public void setEffectType(int i) {\n this.mEffectType = i;\n }",
"public default void doEffectStart(SpellData data, World world, Side onSide){ }",
"public RMEffect getEffect() { return _effect; }",
"public String effect() {\n return this.effect;\n }",
"public void activateEffect( final EffectEntry tag ) {\n\t\tif ( !getEnabled() || !isClosed() || mBitmap == null ) return;\n\n\t\tif ( mCurrentEffect != null ) throw new IllegalStateException( \"There is already an active effect. Cannot activate new\" );\n\t\tif ( mEffectLoader == null ) mEffectLoader = (EffectLoaderService) getService( EffectLoaderService.class );\n\n\t\tfinal AbstractEffectPanel effect = mEffectLoader.load( tag );\n\n\t\tif ( effect != null ) {\n\t\t\tmCurrentEffect = effect;\n\t\t\tmCurrentEntry = tag;\n\n\t\t\tsetCurrentState( STATE.OPENING );\n\t\t\tprepareEffectPanel( effect, tag );\n\n\t\t\tTracker.recordTag( mCurrentEntry.name.name().toLowerCase( Locale.US ) + \": opened\" );\n\t\t\tmContext.getBottomBar().setOnPanelOpenListener( new OnPanelOpenListener() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onOpened() {\n\t\t\t\t\tsetCurrentState( STATE.OPENED );\n\t\t\t\t\tmContext.getBottomBar().setOnPanelOpenListener( null );\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onOpening() {\n\t\t\t\t\tmCurrentEffect.onOpening();\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tmContext.getBottomBar().open();\n\t\t}\n\t}",
"@Override\n\tpublic Effect getEffect() {\n\t\tthis.effect.setName(txtEffectName.getText());\n\t\tthis.effect.setValue(Integer.parseInt(txtEffectValue.getText()));\n\t\t((FeintActionEffect)this.effect).setDescription(txtaDescription.getText());\n\t\treturn this.effect;\n\t}",
"@Override\n\t\t\t\t\tpublic void onSaveEffect(long effectID) {\n\t\t\t\t\t\tEncountersTable.addEffect(GameSQLDataSource.getDatabase(getActivity()), rowID, effectID);\n\t\t\t\t\t\trefreshList();\n\t\t\t\t\t}",
"public void setEffect(RMEffect anEffect)\n{\n if(RMUtils.equals(getEffect(), anEffect)) return; // If value already set, just return\n repaint(); // Register repaint\n if(_effect!=null) { _effect.removePropertyChangeListener(this);\n removePropertyChangeListener(_effect); removeDeepChangeListener(_effect); }\n firePropertyChange(\"Effect\", _effect, _effect = anEffect, -1); // Set value and fire PropertyChange\n if(_effect!=null) { _effect.addPropertyChangeListener(this);\n addPropertyChangeListener(_effect); addDeepChangeListener(_effect); }\n}",
"public void startEffect(Effect effect, EffectController controller) {\n int startRound = 0;\n if (Objects.nonNull(effect.getRoom())) {\n startRound = effect.getRoom().getRound();\n }\n effect.setStartRound(startRound);\n //effect.setEndTime(System.currentTimeMillis() + effect.getEffectResource().getDuration());\n effect.setEndRound(startRound + effect.getEffectResource().getDuration());\n }",
"public static HashMap<Integer, Object> showAddEffectDialog( EffectsController effectsController, int effectType ) {\r\n\r\n return showEditEffectDialog( effectsController, effectType, null );\r\n }",
"@Override\n protected void doPlayEffect(SwccgGame game) {\n if (gameState.getDuelState().canContinue(game)) {\n\n actionsEnvironment.emitEffectResult(new DuelAddOrModifyDuelDestiniesStepResult(subAction));\n }\n }",
"public BGMTransition getEffect()\n\t{\n\t\treturn effect;\n\t}",
"int getEffect();",
"public void registerBeamEffect(World world, Vector3D origin, Vector3D dest, float r, float g, float b, int lifespan){}",
"public Effect getEffect(String effectCode){\n return this.registry.get(effectCode);\n }",
"public void addTemporaryLayer(ExtrudeAction extrudeAction) {\n\t\t\n\t}",
"private void activeDrawEffects() {\n }",
"public ApplyEffect(SnagliModel model) {\n\t\tApplyEffect.model = model;\n\t}",
"public String effect(Player player) {\n\tif (player.character.getAlignment() == Alignment.EVIL) {\n\t player.character.setCurrentLife(player.character.getLife() + 1);\n\t return \"You gain a life </html>\";\n\t} else if (player.character.getAlignment() == Alignment.GOOD) {\n\t player.character.setCurrentLife(player.character.getLife() - 1);\n\t return \"You loose a life </html>\";\n\t} else {\n\t return \"No effect </html\";\n\t}\n }",
"@Test\n public void useEffect() {\n \t//should normally run useItem method, but for testing it is not needed here.\n \tHealthEffect bombEff = (HealthEffect) bomb.getEffect().get(0);\n \tbombEff.applyEffect(com);\n \tAssert.assertTrue(com.getHealth() == baseHP - 700);\n \tSpecial heal = new Special(SpecialType.HEALTHBLESS);\n \theal.getEffect().get(0).applyEffect(com);\n \tAssert.assertTrue(com.getHealth() == baseHP);\n }",
"@Override\n protected void doPlayEffect(SwccgGame game) {\n if (gameState.getDuelState().canContinue(game)) {\n\n final SubAction duelCardEffectAction = new SubAction(subAction);\n duelCardEffectAction.appendEffect(\n new PassthruEffect(duelCardEffectAction) {\n @Override\n protected void doPlayEffect(SwccgGame game) {\n _duelDirections.performDuelDirections(duelCardEffectAction, game, gameState.getDuelState());\n }\n }\n );\n // Stack sub-action\n subAction.stackSubAction(duelCardEffectAction);\n }\n }",
"public void applyEffect(EntityRef instigator, EntityRef entity, String id, float magnitude, long duration) {\n // First, determine if the entity already has a resist damage component attached. If not, create a new one and\n // attach it to the entity.\n ResistDamageComponent resDamageComponent = entity.getComponent(ResistDamageComponent.class);\n if (resDamageComponent == null) {\n resDamageComponent = new ResistDamageComponent();\n entity.addComponent(resDamageComponent);\n }\n\n // Create a new ResistDamageEffect instance and assign the resistance type and amount based on the ID and\n // magnitude respectively.\n ResistDamageEffect resEffect = new ResistDamageEffect();\n resEffect.resistType = id;\n resEffect.resistAmount = TeraMath.floorToInt(magnitude);\n\n // If the current resist type doesn't already exist, add the resEffect into the map directly. Otherwise,\n // replace the older one.\n if (resDamageComponent.rdes.get(id) == null) {\n resDamageComponent.rdes.put(id, resEffect);\n } else {\n resDamageComponent.rdes.replace(id, resEffect);\n }\n\n // Send out this event to collect all the duration and magnitude modifiers and multipliers that can affect this\n // resist damage effect. The ID is also sent to distinguish it from other possible resist damage effects.\n OnEffectModifyEvent effectModifyEvent = entity.send(new OnEffectModifyEvent(instigator, entity, 0, 0, this, id));\n long modifiedDuration = 0;\n boolean modifiersFound = false;\n\n // If the effect modify event is consumed, don't apply this resist damage effect.\n if (!effectModifyEvent.isConsumed()) {\n /*\n Get the magnitude result value and the shortest duration, and assign them to the modifiedMagnitude and\n modifiedDuration respectively.\n\n The shortest duration is used as the effect modifier associated with that will expire in the shortest\n amount of time, meaning that this effect's total magnitude and next remaining duration will have to be\n recalculated.\n */\n float modifiedMagnitude = effectModifyEvent.getMagnitudeResultValue();\n modifiedDuration = effectModifyEvent.getShortestDuration();\n\n // If there's at least one duration and magnitude modifier, set the effect's magnitude and the modifiersFound flag.\n if (!effectModifyEvent.getDurationModifiers().isEmpty() && !effectModifyEvent.getMagnitudeModifiers().isEmpty()) {\n resEffect.resistAmount = (int) modifiedMagnitude;\n modifiersFound = true;\n }\n }\n\n // Save the component so the latest changes to it don't get lost when the game's exited.\n entity.saveComponent(resDamageComponent);\n\n // If the modified duration is between the accepted values (0 and Long.MAX_VALUE), and the base duration is not infinite,\n // add a delayed action to the DelayManager using the new system.\n if (modifiedDuration < Long.MAX_VALUE && modifiedDuration > 0 && duration != AlterationEffects.DURATION_INDEFINITE) {\n String effectID = effectModifyEvent.getEffectIDWithShortestDuration();\n delayManager.addDelayedAction(entity, AlterationEffects.EXPIRE_TRIGGER_PREFIX + AlterationEffects.RESIST_DAMAGE\n + \":\" + id + \"|\" + effectID, modifiedDuration);\n } else if (duration > 0 && !modifiersFound && !effectModifyEvent.isConsumed()) {\n // Otherwise, if the duration is greater than 0, there are no modifiers found, and the effect modify event was not consumed,\n // add a delayed action to the DelayManager using the old system.\n delayManager.addDelayedAction(entity, AlterationEffects.EXPIRE_TRIGGER_PREFIX + AlterationEffects.RESIST_DAMAGE\n + \":\" + id, duration);\n } else if (!modifiersFound || !effectModifyEvent.getHasInfDuration()) {\n // Otherwise, if there are either no modifiers found, or none of the modifiers collected in the event have infinite\n // duration, remove the resist effect from the resist damage component.\n resDamageComponent.rdes.remove(id, resEffect);\n }\n // If this point is reached and none of the above if-clauses were met, that means there was at least one modifier\n // collected in the event which has infinite duration.\n }",
"void effect(Entity e, BoardPosition bp);",
"private static void registerCardEffects(Card newCard, JsonObject card){\n\t List<Tuple<JsonValue, JsonValue>> instantEffectList = parseEffect(card.get(\"instantEffect\"),\n card.get(\"instantPayload\"));\n\t if(!instantEffectList.isEmpty()){\n\t Tuple<JsonValue, JsonValue> instantEffect = instantEffectList.get(0);\n\t newCard.registerInstantEffect(getEffectFromRegistry(instantEffect.getFirstArg().asString(),\n\t instantEffect.getSecondArg()));\n\t }\n\n\t List<Tuple<JsonValue, JsonValue>> permanentEffectList = parseEffect(card.get(\"permanentEffect\"),\n card.get(\"permanentPayload\"));\n\t if(!permanentEffectList.isEmpty()){\n Tuple<JsonValue, JsonValue> permanentEffect = permanentEffectList.get(0);\n newCard.registerPermanentEffect(getEffectFromRegistry(permanentEffect.getFirstArg().asString(),\n\t permanentEffect.getSecondArg()));\n\t }\n\t}",
"public StatusEffect getEffect() {\n return effect;\n }",
"@Override\n\t\t\tpublic void onNewEffectSelected() {\n\t\t\t\tCreateEffectFragment newFrag = CreateEffectFragment.newInstance(new ICreateEffectCallback() {\n\t\t\t\t\t\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onSaveEffect(long effectID) {\n\t\t\t\t\t\t// when the new effect is created, add it to the selected creature\n\t\t\t\t\t\tEncountersTable.addEffect(GameSQLDataSource.getDatabase(getActivity()), rowID, effectID);\n\t\t\t\t\t\trefreshList();\n\t\t\t\t\t}\n\t\t\t\t}, null);\n\t\t\t\t\n\t\t\t\tnewFrag.show(getFragmentManager(), null);\n\t\t\t}",
"@Override\n protected void doPlayEffect(SwccgGame game) {\n if (gameState.getDuelState().canContinue(game)) {\n final SubAction duelCardEffectAction = new SubAction(subAction);\n duelCardEffectAction.appendEffect(\n new PassthruEffect(duelCardEffectAction) {\n @Override\n protected void doPlayEffect(SwccgGame game) {\n _duelDirections.performDuelResults(duelCardEffectAction, game, gameState.getDuelState());\n }\n }\n );\n // Stack sub-action\n subAction.stackSubAction(duelCardEffectAction);\n }\n }",
"@Override\n\tpublic int effect() {\n\t\treturn 0 ;\n\t}",
"private void cardEffect(Match match, Player player, ToolCardInput input) throws RemoteException {\n //Ottiene dati\n Die die = match.getMatchDice().retrieveDieFromDraftPool(input.getChosenDie());\n\n //Controlla giocatore non ha gia piazzato questo turno\n if (player.getTurnDiePlaced())\n throw new MatchException(\"hai gia piazzato un dado\");\n\n //Rilancia il dado\n die.roll();\n\n //Controlla se il dado è piazzabile\n if (player.getWindow().getValidCells(die).isEmpty()) {\n player.setTurnDiePlaced(true);\n throw new MatchException(\"non puoi piu piazzare il dado\");\n }\n\n //Aggiorna effetti\n player.getToolCardEffect().setChosenDie(die);\n }",
"public Color4 getEffectColorAdd();",
"public void update(){\n\t\tfor(ParticleEffect effect : effects){\n\t\t\teffect.update();\n\t\t}\n\t}",
"public ItemStack applyPassiveEffect(ItemStack stack);",
"@Override\n public Iterator<Effect> iterator() {\n return effects.iterator();\n }",
"@Override\n\tpublic void applyEffect(Player player) {\n\t\tplayer.setSightRange(7);\n\t}",
"void setPositionEffect(PositionEffect inPositionEffect);",
"public void registerEffect(IMajorConstellation c, Function<Void, ConstellationEffect> effectInstanceProvider) {\n ConstellationEffectRegistry.registerFromAPI(c, effectInstanceProvider);\n }",
"@Override\n\tpublic EffectEntry getCurrentEffect() {\n\t\treturn mCurrentEntry;\n\t}",
"public synchronized List<SpellEffect> getEffect(String effectName) {\n if (!hasEffect(effectName)) {\n return null;\n }\n \n List<SpellEffect> currentEffects = new ArrayList<>();\n \n for (SpellEffect effect : effects) {\n if (effect.getName().equals(effectName)) {\n currentEffects.add(effect);\n }\n }\n \n return currentEffects;\n }",
"private void updateEffectState(@Nonnull ScheduledEffect effect) {\n this.messagingTemplate.convertAndSend(\"/topic/effect/progress\", new EffectProgressEntity(effect.getEffectId(), effect.getProgress(), effect.getState()));\n }",
"public List<Effect> getEffects()\n {\n return m_effects;\n }",
"@Override\n public void use(AbstractPlayer p, AbstractMonster m) {\n AbstractDungeon.actionManager.addToBottom(new VFXAction(p, new FlameBarrierEffect(p.hb.cX, p.hb.cY), 0.5F));\n AbstractDungeon.actionManager.addToBottom(new ApplyPowerAction(p, m, new FlameWardPower(p, block, magicNumber)));\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 void pushRedo(Integer effectID, Float param){\n history.push(effectID);\n historyValues.push(param);\n\n }",
"public void use(Player player){\r\n\t\t\tif(this.getEffect()==\"HEAL\"){\r\n\t\t\t\tplayer.heal(this.getValue());\r\n\t\t\t}\r\n\t\t\tif(this.getEffect() == \"BOOK\"){ \r\n\t\t\t\tplayer.increaseSkill(this.getValue(), 1); \r\n\t\t\t}\r\n\t\t\tif(this.getEffect() == \"RESSURECTION\"){\r\n\t\t\t\ttry {TrackLog.writeLog(\"I think I should keep this one, migth save my life some days\");} \r\n\t\t\t\tcatch (IOException e) {e.printStackTrace();}\r\n\t\t\t}\r\n\t\t}",
"public void applyEffectUser(Enemy user) {\n\t\tsuper.applyEffectsUser(user);\n\t\tuser.addEnrage(enrage);\n\t}",
"public void addLight(Light light) { LightSet.addElement(light); }",
"public void update(ActorRef out) {\t\n\t\t/* Buff animation */\n\t\tEffectAnimation buff = BasicObjectBuilders.loadEffect(StaticConfFiles.f1_buff);\n\t\tBasicCommands.playEffectAnimation(out, buff, this.currentTile);\n\t\ttry {Thread.sleep(1000);} catch (InterruptedException e) {e.printStackTrace();}\n\t\t\n\t\t/* Update health & attack */\n\t\tthis.addHealth(1, out);\n\t\tthis.addAttack(1, out);\n\t\t\n\t\t/* testing */\n\t\tSystem.out.println(\"SpellThief effect applied to \" + getName());\n\t}",
"private void courseEffects() {\n\t\t\n\t}",
"public LightSideGoesFirstEffect(Action action) {\n super(action);\n }",
"public static EffectRegistry getInstance(){\n if( instance == null ){\n instance = new EffectRegistry();\n AddEffect.loadBuilder();\n BonusEffect.loadBuilder();\n ChangeEffect.loadBuilder();\n ActionEffect.loadBuilder();\n PermanentEffect.loadBuilder();\n UniqueEffect.loadBuilder();\n PrivilegeEffect.loadBuilder();\n ExcomunicateEffect.loadBuilder();\n }\n return instance;\n }",
"public void specialEffect() {\n if (getDefense() > 0) {\n setDefense(0);\n setCurrentHealth(currentHealth + 50);\n }\n\n }",
"public static EffectPane getEffectPane() {\n\t\tif (effectPane == null) {\n\t\t\tinitScene();\n\t\t}\n\t\treturn effectPane;\n\t}",
"public void addWeapon(CardWeapon cw)\n {\n this.weapons.add(cw);\n }",
"public int getTotalEffect() {\n\t\treturn totalEffect;\n\t}",
"public interface EntityEffect extends Effect{\n\n}",
"public void setTotalEffect(int totalEffect) {\n\t\tthis.totalEffect = totalEffect;\n\t}",
"public ActAbilByEffect(CharacterEvent actor, Class<? extends AbilEffect> type) {\n\t\tsuper(actor);\n\t\tthis.type = type;\n\t\tloadNextAbil();\n\t}",
"public AddDuelDestinyEffect(Action action, int modifierAmount) {\n this(action, modifierAmount, action.getPerformingPlayer());\n }",
"public static boolean applyPotionEffect(LivingEntity e, PotionEffect effect) {\n\t\tPotionEffect active = e.getPotionEffect(effect.getType());\n\t\tif(active != null) {\n\t\t\tboolean activeHasMorePower = active.getAmplifier() > effect.getAmplifier();\n\t\t\tif(activeHasMorePower || active.getDuration() > effect.getDuration()) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\te.removePotionEffect(active.getType());\n\t\t}\n\t\te.addPotionEffect(effect);\n\t\treturn true;\n\t}",
"@Override\r\n public Effect getEffect(String effectDescription, int aggro) {\r\n return effectsDAO.getEffect(effectDescription, aggro);\r\n }",
"public void effectDelete(int id)\n\t{\n\t\tEntityEffect[] effectNew = new EntityEffect[10];\n\t\t\n\t\t// Loop through the effects and place them in the temporary array\n\t\tint eStart = id + 1;\n\t\tfor(int e=eStart;e<=effectCount;e+=1)\n\t\t{\n\t\t\tint n = e;\n\t\t\tif(e>id){n = e - 1;}\n\t\t\teffectNew[e] = effect[n];\n\t\t}\n\t\t\n\t\t// Overwrite the effect array with the new data \n\t\teffect = effectNew;\n\t\teffectCount -= 1;\n\t}",
"@Override\n public Boolean hasEffect() {\n\treturn false;\n }",
"public boolean canUseWeaponEffect(FullEffect effect){\n List<Color> priceTmp;\n if(effect.getPrice() != null){\n priceTmp = new ArrayList<>(effect.getPrice());\n return controlPayment(priceTmp);\n }\n return true;\n }",
"@Override\n public void onDrawFrame(GL10 gl) {\n Log.i(\"kike\", \"onDrawFrame\");\n if (effectContext == null) {\n effectContext = EffectContext.createWithCurrentGlContext();\n }\n if (effect != null) {\n effect.release();\n }\n ////////////////////////////Efecte//////////////////////////\n //noEffect();\n //autofixEffect(fxValue); // ok\n //backdropperEffect(); // no probat\n //bitmapoverlayEffect(); // no probat\n //blackwhiteEffect(100, 150); // ok, ... :(\n brightnessEffect(fxValue); // ok\n //contrastEffect(fxValue); // ok\n //cropEffect(); // no probat\n //crossprocessEffect(); // ok\n //documentaryEffect(); // ok\n //duotoneEffect(); // no probat\n //filllightEffect(fxValue); // ok\n //fisheyeEffect(fxValue); // ok\n //flipEffect(false, false); // ok\n //grainEffect(fxValue); // l'efecte que fa no es massa bo\n //grayScaleEffect(); // ok\n //lomoishEffect(); // ok\n //negativeEffect(); // ok\n //posterizeEffect(); // ok\n //redeyeEffect(); // no probat\n //rotateEffect(fxValue); // error\n //saturateEffect(fxValue); // ok\n //sepiaEffect(); // ok\n //sharpenEffect(fxValue); // l'efecte que fa no es massa bo\n //straightenEffect(fxValue); // ok, retalla la imatge tambe\n //temperatureEffect(fxValue); // ok\n //tintEffect(); // no probat\n //vignetteEffect(fxValue); // nomes fa forma rodona i negra??\n ////////////////////////////Efecte//////////////////////////\n square.draw(textures[1]);\n }"
] | [
"0.7140714",
"0.6908591",
"0.6552919",
"0.6529467",
"0.6462166",
"0.6378903",
"0.6344993",
"0.62429154",
"0.62098",
"0.6163465",
"0.6153484",
"0.6132145",
"0.5915065",
"0.58966094",
"0.5893174",
"0.58548945",
"0.57369936",
"0.57196474",
"0.56873757",
"0.5671758",
"0.564135",
"0.56119704",
"0.5561407",
"0.5493288",
"0.5481006",
"0.5462958",
"0.54601264",
"0.54523677",
"0.54514486",
"0.544629",
"0.54088545",
"0.5389978",
"0.5367809",
"0.5347286",
"0.534634",
"0.53229976",
"0.52937263",
"0.52816004",
"0.527504",
"0.5273709",
"0.52681655",
"0.5264655",
"0.52255666",
"0.52220756",
"0.51895106",
"0.51868427",
"0.51532936",
"0.5127567",
"0.5042771",
"0.50253946",
"0.5024673",
"0.5001812",
"0.49941128",
"0.4984269",
"0.4977831",
"0.4976905",
"0.49752015",
"0.4974106",
"0.49604437",
"0.49546194",
"0.49519932",
"0.4908816",
"0.49022588",
"0.48747736",
"0.48678896",
"0.4859797",
"0.48564845",
"0.48547852",
"0.48347637",
"0.48195451",
"0.4817892",
"0.48168582",
"0.47856537",
"0.4766555",
"0.47629932",
"0.47623816",
"0.47613972",
"0.47558716",
"0.47502238",
"0.4735907",
"0.4729901",
"0.4718672",
"0.47093797",
"0.46527475",
"0.4634069",
"0.46159753",
"0.46058452",
"0.45921046",
"0.45868343",
"0.4579558",
"0.4579416",
"0.4577736",
"0.45774367",
"0.4559961",
"0.45466065",
"0.45460448",
"0.45422494",
"0.4535693",
"0.45264864",
"0.4526346"
] | 0.7478728 | 0 |
Gets a list of all of the SpellEffect objects of the given type which are currently affecting this wizard. | public synchronized List<SpellEffect> getEffect(String effectName) {
if (!hasEffect(effectName)) {
return null;
}
List<SpellEffect> currentEffects = new ArrayList<>();
for (SpellEffect effect : effects) {
if (effect.getName().equals(effectName)) {
currentEffects.add(effect);
}
}
return currentEffects;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public List<Effect> getEffect() {\n \treturn new ArrayList<Effect>(effects);\n }",
"public List<Effect> getEffects()\n {\n return m_effects;\n }",
"public List<String> getEffects(@Nonnull final Entity entity) {\n\t\tfinal IEntityFX caps = CapabilityEntityFXData.getCapability(entity);\n\t\tif (caps != null) {\n\t\t\tfinal EntityEffectHandler eh = caps.get();\n\t\t\tif (eh != null)\n\t\t\t\treturn eh.getAttachedEffects();\n\t\t}\n\t\treturn ImmutableList.of();\n\t}",
"public abstract ArrayList<DamageEffect> getDamageEffects();",
"public ArrayList<Effect> getEnemyEffects(int index){\n return enemyController.seeEnemyEffect(index);\n }",
"public <T> List<T> getDeclarablesByType(Class<T> type) {\n\t\treturn this.declarables.stream()\n\t\t\t\t.filter(type::isInstance)\n\t\t\t\t.map(type::cast)\n\t\t\t\t.collect(Collectors.toList());\n\t}",
"public SpellList spells();",
"public List<Troop> getSpells()\n\t{\n\t\treturn spells;\n\t}",
"private static List<AbilityEffect> getEffectsFor(String abilityName) {\n switch (abilityName) {\n case \"Magic Missile\":\n return Collections.singletonList(AbilityEffect.damage(30, 45));\n case \"Heal\":\n return Collections.singletonList(AbilityEffect.healPercentageOfMaxHp(.5));\n case \"Clairvoyance\":\n return Collections.singletonList(AbilityEffect.modifierBundle(Modifiers.farsight(3)));\n case \"Sacrifice\":\n return Collections.singletonList(AbilityEffect.destroyUnit());\n case \"Research\":\n return Collections.singletonList(AbilityEffect.research(75));\n case \"Cone of Flame\":\n return Collections.singletonList(AbilityEffect.damage(45, 60));\n case \"Strengthen\":\n return Collections.singletonList(AbilityEffect.modifierBundle(Modifiers.strengthened(10)));\n case \"Repair\":\n return Collections.singletonList(AbilityEffect.healPercentageOfMaxHp(1.0));\n case \"Toughen\":\n return Collections.singletonList(AbilityEffect.modifierBundle(Modifiers.toughness(10)));\n case \"Quicken\":\n return Collections.singletonList(AbilityEffect.modifierBundle(Modifiers.quickness(3)));\n case \"Cone of Ice\":\n return Arrays.asList(\n AbilityEffect.damage(45, 60), AbilityEffect.modifierBundle(Modifiers.sluggish(1)));\n case \"Cone of Electricity\":\n return Arrays.asList(\n AbilityEffect.damage(45, 60), AbilityEffect.modifierBundle(Modifiers.weakened(5)));\n case \"Mass Heal\":\n return Collections.singletonList(AbilityEffect.healPercentageOfMaxHp(.5));\n case \"Resolution\":\n return Arrays.asList(\n AbilityEffect.healConstantHp(25), AbilityEffect.modifierBundle(Modifiers.tenacity(25)));\n case \"Refresh\":\n return Collections.singletonList(AbilityEffect.refreshUnit());\n case \"Spacial Shift\":\n return Collections.emptyList();\n case \"Cone of Light\":\n return Arrays.asList(\n AbilityEffect.damage(60, 90), AbilityEffect.modifierBundle(Modifiers.blinded(2)));\n case \"Mana Shield\":\n return Arrays.asList(\n AbilityEffect.modifierBundle(Modifiers.shielded(0.25)),\n AbilityEffect.healPercentageOfMaxHp(0.5));\n case \"Levitation\":\n return Collections.singletonList(\n AbilityEffect.modifierBundle(\n new ModifierBundle(\n Modifiers.flight(), Modifiers.farsight(3), Modifiers.quickness(1))));\n case \"Channel\":\n return Collections.singletonList(AbilityEffect.mana(25));\n default:\n throw new RuntimeException(\"Unknown ability name \" + abilityName);\n }\n }",
"final Effect[] getEffects() {\n/* 3082 */ if (this.effects != null) {\n/* 3083 */ return this.effects.<Effect>toArray(new Effect[this.effects.size()]);\n/* */ }\n/* 3085 */ return emptyEffects;\n/* */ }",
"public ArrayList<BattleEffect> getEffectsToApply() {\n return effectsToApply;\n }",
"public ArrayList<StatusEffects> getStatusEffects()\n\t{\n\t\treturn this.listEffets;\n\t}",
"public Spell getSpell(String spellType, Name spellName, Money price, Level level, Damage damage, Mana mana);",
"public ArrayList<BattleEffect> getEffectsToRemove() {\n return effectsToRemove;\n }",
"@Override\n public final ArrayList<Spell> getSpells(final float amp) {\n float newamp = amp;\n if (TerrainMap.getInstance().getTerrain(x, y) == TerrainTypes.Land) {\n newamp += SpellConstants.KNIGHTLANDBONUS;\n }\n return super.getSpells(newamp);\n }",
"@Override\n public Iterator<Effect> iterator() {\n return effects.iterator();\n }",
"public synchronized void removeEffectFromList(SpellEffect effect) {\n if (effects.contains(effect)) {\n effects.remove(effect);\n }\n }",
"public default void doEffectStart(SpellData data, World world, Side onSide){ }",
"public void setEffectType(int i) {\n this.mEffectType = i;\n }",
"private static void loadQuestEffects(Objective o, String thisLine)\n\t\t\tthrows IOException {\n\t\tString nextLine = thisLine;\n\t\tMatcher m;\n\t\t// Find any effects\n\t\tdo {\n\t\t\tPattern effectPattern = Pattern.compile(\"<effect\");\n\t\t\tif ((m = effectPattern.matcher(nextLine)).find()) {\n\t\t\t\t// Find the location\n\t\t\t\tm = propertyExtractor(\"loc\", \"\\\\w+\").matcher(nextLine);\n\t\t\t\tString loc = \"end\";\n\t\t\t\tif (m.find()) {\n\t\t\t\t\tloc = m.group(1);\n\t\t\t\t}\n\t\t\t\t// Create a function that adds the effect in the create place\n\t\t\t\tConsumer<Consumer<World>> addEffect = null;\n\t\t\t\tif (loc.equals(\"end\")) {\n\t\t\t\t\taddEffect = (ccw -> o.addEndEffect(ccw));\n\t\t\t\t} else if (loc.equals(\"start\")) {\n\t\t\t\t\taddEffect = (ccw -> o.addStartEffect(ccw));\n\t\t\t\t} else {\n\t\t\t\t\tlogError(\"Unknown effect location: \" + loc, 2);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\twhile (!(nextLine = getNextLine()).matches(\n\t\t\t\t\t\t\"\\\\s*</effect>\\\\s*\")) {\n\t\t\t\t\t// Find all effects\n\t\t\t\t\tPattern setStatePattern = Pattern.compile(\n\t\t\t\t\t\t\t\"setState\\\\((\\\\d+),(\\\\d+)\\\\)\");\n\t\t\t\t\tm = setStatePattern.matcher(nextLine);\n\t\t\t\t\tif (m.find()) {\n\t\t\t\t\t\tint npcID = Integer.parseInt(m.group(1));\n\t\t\t\t\t\tint newState = Integer.parseInt(m.group(2));\n\n\t\t\t\t\t\taddEffect.accept(cw -> {\n\t\t\t\t\t\t\tif (cw != null && cw.getMap() != null) {\n\t\t\t\t\t\t\t\tNPC npc = cw.getMap().getNPC(npcID);\n\t\t\t\t\t\t\t\tif (npc != null) {\n\t\t\t\t\t\t\t\t\tnpc.setStoryState(newState);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\n\t\t\t\t\tPattern addObjectPattern = Pattern.compile(\n\t\t\t\t\t\t\t\"addObject\\\\(([\\\\w_]+),(\\\\d+),(\\\\d+),(\\\\d+),(\\\\d+)\\\\)\");\n\t\t\t\t\tm = addObjectPattern.matcher(nextLine);\n\t\t\t\t\tif (m.find()) {\n\t\t\t\t\t\tString itemType = m.group(1).toUpperCase();\n\t\t\t\t\t\tint x = Integer.parseInt(m.group(2));\n\t\t\t\t\t\tint y = Integer.parseInt(m.group(3));\n\t\t\t\t\t\tint lockID = Integer.parseInt(m.group(4));\n\t\t\t\t\t\tint npcID = Integer.parseInt(m.group(5));\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tItemType it = ItemType.valueOf(itemType);\n\t\t\t\t\t\t\taddEffect.accept(cw -> {\n\t\t\t\t\t\t\t\tWorldObject wo = ObjectMaker.makeFromType(it,\n\t\t\t\t\t\t\t\t\t\tnew Point(x, y), lockID, npcID);\n\t\t\t\t\t\t\t\tcw.addObject(wo);\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t} catch (IllegalArgumentException e) {\n\t\t\t\t\t\t\tlogError(\"Unknown item type: \" + itemType, 2);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tPattern useObjectPattern = Pattern.compile(\n\t\t\t\t\t\t\t\"use\\\\(([\\\\w_]+),(\\\\d+)\\\\)\");\n\t\t\t\t\tm = useObjectPattern.matcher(nextLine);\n\t\t\t\t\tif (m.find()) {\n\t\t\t\t\t\tString itemType = m.group(1).toUpperCase();\n\t\t\t\t\t\tint quant = Integer.parseInt(m.group(2));\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tItemType it = ItemType.valueOf(itemType);\n\t\t\t\t\t\t\taddEffect.accept(cw -> {\n\t\t\t\t\t\t\t\tif (cw != null && cw.getMap() != null\n\t\t\t\t\t\t\t\t\t\t&& cw.getMap().getPlayer() != null) {\n\t\t\t\t\t\t\t\t\tPlayer p = (Player) cw.getMap().getPlayer();\n\t\t\t\t\t\t\t\t\tp.use(it, quant);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t} catch (IllegalArgumentException e) {\n\t\t\t\t\t\t\tlogError(\"Unknown item type: \" + itemType, 2);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tPattern worldConvPattern = Pattern.compile(\"worldConv\\\\((\\\\d+)\\\\)\");\n\t\t\t\t\tm = worldConvPattern.matcher(nextLine);\n\t\t\t\t\tif (m.find()) {\n\t\t\t\t\t\tint convID = Integer.parseInt(m.group(1));\n\t\t\t\t\t\taddEffect.accept(cw -> cw.showWorldConversation(convID));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} while ((nextLine = getNextLine()) != null\n\t\t\t\t&& !nextLine.matches(\"\\\\s*</objective>\\\\s*\"));\n\n\t}",
"public synchronized void addEffect(SpellEffect effect) {\n effects.add(effect);\n }",
"@SuppressWarnings(\"unchecked\")\n public <T extends Resource> List<T> getChildren(Class<T> type)\n {\n Resource[] allChildren = getChildren();\n List<T> filteredChildren = new ArrayList<T>();\n for(Resource child : allChildren)\n {\n if(type.isAssignableFrom(child.getClass()))\n {\n filteredChildren.add((T)child);\n }\n }\n return filteredChildren;\n }",
"private Cursor getWordsByType(int typeId) {\n\t\n\t\tString query = String.format(_select, getDate()) +\t\t\t\t\t\t\t \n\t\t\t\t\t\t\" WHERE \" + DBConstants.WordTable.TYPEID_KEY + \" = \" + typeId +\n\t\t\t\t\t\t_havingDataContraint + \n\t\t\t\t\t\t\" ORDER BY \" + DBConstants.WordTable.WORD_KEY;\n\t\t\t\n\t\treturn _db.rawQuery(query, null);\n }",
"public List<WordClass> getWords(int type, boolean isFavorites, int offset) {\n List<WordClass> list = new ArrayList<>();\n Cursor cursor;\n if (isFavorites) {\n cursor = database.rawQuery(\"SELECT * FROM words where type =? and is_favorite =? order by word ASC\", new String[]{String.valueOf(type), String.valueOf(1)});\n } else\n cursor = database.rawQuery(\"SELECT * FROM words where type =? order by word ASC\", new String[]{String.valueOf(type)});\n cursor.moveToFirst();\n while (!cursor.isAfterLast()) {\n list.add(new WordClass(cursor.getInt(0), cursor.getInt(1), cursor.getString(2), cursor.getString(3), cursor.getLong(4), cursor.getInt(5) == 1));\n cursor.moveToNext();\n }\n cursor.close();\n return list;\n }",
"private void createSpells() {\n spells.add(new Heal(owner, assets));\n spells.add(new Renew(owner, assets));\n spells.add(new FlashHeal(owner, assets));\n spells.add(new Dispel(owner, assets));\n spells.add(new HolyNova(owner, assets));\n spells.add(new PrayerOfMending(owner, assets));\n spells.add(new Barrier(owner, assets));\n spells.add(new GreaterHeal(owner, assets));\n spells.add(new Smite(owner, assets));\n spells.add(new Penance(owner, assets));\n spells.add(new HolyShock(owner, assets));\n spells.add(new Lightwell(owner, assets));\n spells.add(new DivineHymn(owner, assets));\n spells.add(new DivineProtection(owner, assets));\n spells.add(new BlessedGarden(owner, assets));\n\n // add spell to group\n for(int i = 0; i < spells.size(); i++) {\n addActor(spells.get(i));\n }\n }",
"public List<ImageThought> getImageThoughts(String filterType){\n\t\tList<ImageThought> imageThoughts = new ArrayList<>();\n\t\tString whereClause = null;\n\t\tString whereArgs[] = null;\n\n\t\tswitch (filterType){\n\t\t\tcase \"all\":\n\t\t\t\tqueryImageThoughts(null, null);\n\t\t\t\tbreak;\n\t\t\tcase \"completed\":\n\t\t\t\twhereClause = ImageThoughtTable.Cols.COMPLETE + \" = ?\";\n\t\t\t\twhereArgs = new String[]{String.valueOf(1)};\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tqueryImageThoughts(null, null);\n\t\t}\n\n\n\t\tImageThoughtCursorWrapper cursor = queryImageThoughts(whereClause, whereArgs);\n\n\t\ttry {\n\t\t\tcursor.moveToFirst();\n\t\t\twhile(!cursor.isAfterLast()){\n\t\t\t\timageThoughts.add(cursor.getImageThought());\n\t\t\t\tcursor.moveToNext();\n\t\t\t}\n\n\t\t} finally {\n\t\t\tcursor.close();\n\t\t}\n\n\t\treturn imageThoughts;\n\t}",
"public List<E> findAll(Class<E> type){\n transaction.begin();\n List<E> types = entityManager.createQuery(\" from \" + type.getName()).getResultList();\n transaction.commit();\n return types;\n }",
"List<SpawnType> getSpawnTypes(EntityType entityType);",
"@Override\n\tpublic List<Effect> convert(AbstractEffect e) {\n\t\tArrayList<Effect> list = new ArrayList<Effect>();\n\t\tSceneElementDef sceneElementDef = null;\n\t\tboolean useTrajectory = false;\n\t\tfloat x = 0;\n\t\tfloat y = 0;\n\t\tswitch (e.getType()) {\n\t\tcase es.eucm.eadventure.common.data.chapter.effects.Effect.MOVE_NPC:\n\t\t\tMoveNPCEffect npcEf = (MoveNPCEffect) e;\n\t\t\tx = npcEf.getX();\n\t\t\ty = npcEf.getY();\n\t\t\tsceneElementDef = (SceneElementDef) elementsCache.get(npcEf\n\t\t\t\t\t.getTargetId());\n\t\t\tbreak;\n\t\tcase es.eucm.eadventure.common.data.chapter.effects.Effect.MOVE_PLAYER:\n\t\t\tMovePlayerEffect ef = (MovePlayerEffect) e;\n\t\t\tx = ef.getX();\n\t\t\ty = ef.getY();\n\t\t\tuseTrajectory = true;\n\t\t\tsceneElementDef = (SceneElementDef) elementsCache\n\t\t\t\t\t.get(Player.IDENTIFIER);\n\t\t\tbreak;\n\t\tcase es.eucm.eadventure.common.data.chapter.effects.Effect.MOVE_OBJECT:\n\t\t\tMoveObjectEffect obEf = (MoveObjectEffect) e;\n\t\t\tx = obEf.getX();\n\t\t\ty = obEf.getY();\n\t\t\t// XXX isAnimated, scale...\n\t\t\tsceneElementDef = (SceneElementDef) elementsCache.get(obEf\n\t\t\t\t\t.getTargetId());\n\t\t}\n\t\tMoveSceneElementEf moveSceneElement = new MoveSceneElementEf(\n\t\t\t\tsceneElementDef, x, y, MovementSpeed.NORMAL);\n\t\tmoveSceneElement.setUseTrajectory(useTrajectory);\n\t\tlist.add(moveSceneElement);\n\t\treturn list;\n\t}",
"public static void clearPotionEffects(LivingEntity ent) {\n\t\tent.getActivePotionEffects().forEach(ef -> ent.removePotionEffect(ef.getType()));\n\t}",
"Effect getEffect();",
"@Override\n protected void doCheckEffect ()\n {\n // check all the stationary spells in the location of the projectile for a Colloportus\n List<O2StationarySpell> inside = new ArrayList<>();\n for (O2StationarySpell spell : Ollivanders2API.getStationarySpells(p).getStationarySpellsAtLocation(location))\n {\n if (spell instanceof COLLOPORTUS)\n {\n inside.add(spell);\n }\n }\n\n // remove the colloportus spells found\n if (inside.size() > 0)\n {\n for (O2StationarySpell spell : inside)\n {\n spell.kill();\n spell.flair(10);\n }\n\n kill();\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 }",
"private static void openUpPotionTypes()\n\t{\n\t\tPotion[] potionTypes = null;\n\n\t for (Field f : Potion.class.getDeclaredFields()) \n\t {\n\t f.setAccessible(true);\n\t \n\t try \n\t {\n\t if (f.getName().equals(\"potionTypes\") || f.getName().equals(\"field_76425_a\")) \n\t {\n\t Field modfield = Field.class.getDeclaredField(\"modifiers\");\n\t modfield.setAccessible(true);\n\t modfield.setInt(f, f.getModifiers() & ~Modifier.FINAL);\n\n\t potionTypes = (Potion[])f.get(null);\n\t final Potion[] newPotionTypes = new Potion[256];\n\t System.arraycopy(potionTypes, 0, newPotionTypes, 0, potionTypes.length);\n\t f.set(null, newPotionTypes);\n\t }\n\t } \n\t catch (Exception e) \n\t {\n\t System.err.println(e);\n\t }\n\t }\n\t}",
"@Override\n\tpublic List<Record> getRecordsByType(Type type) {\n\t\tSession session=HibernateSessionFactory.getSession();\n\t\tTransaction tx=session.beginTransaction();\n\t\tList<Record> list=new ArrayList<Record>();\n\t\tRecordDAO recordDAO=new RecordDAO();\n\t\t\n\t\ttry{\n\t\t\tlist=recordDAO.getRecordsByType(type);\n\t\t\ttx.commit();\n\t\t}catch(RuntimeException e){\n\t\t\te.printStackTrace();\n\t\t\ttx.rollback();\n\t\t}finally{\n\t\t\tsession.close();\n\t\t}\n\t\treturn list;\n\t}",
"public void removeTempStatusEffects()\n\t{\n\t\tfor(Pokemon pokemon : getParty())\n\t\t\tif(pokemon != null)\n\t\t\t\tpokemon.removeStatusEffects(false);\n\t}",
"@Transactional\r\n\tpublic List getAllTypeMaterial() {\n\t\treturn typematerialdao.getAllTypeMaterial();\r\n\t}",
"public String getEffects() {\n \t\tString result = getEffects_j();\n \t\tString effectsStr_e = getEffects_e();\n \t\tif (!effectsStr_e.isEmpty()) {\n \t\t\tresult += \"\\n\" + effectsStr_e;\n \t\t}\n \t\treturn result;\n \t}",
"public <T extends GameObject> T[] senseNearbyGameObjects(Class<T> type);",
"public Vector getList(RationaleElementType type) {\r\n \t\tif (type.equals(RationaleElementType.DECISION)) {\r\n \t\t\treturn subDecisions;\r\n \t\t} else if (type.equals(RationaleElementType.ARGUMENT)) {\r\n \t\t\treturn getAllArguments();\r\n \t\t} else if (type.equals(RationaleElementType.QUESTION)) {\r\n \t\t\treturn questions;\r\n \t\t} else {\r\n \t\t\treturn null;\r\n \t\t}\r\n \t}",
"public default void doEffectCancel(SpellData data, World world, Side onSide){ doEffect(data, world, getDuration(data.casterLevel()), onSide); }",
"public <T extends IDBEntities> List<T> retrieveAll(Class<? extends IDBEntities> type) {\n\t\tif (type == null)\n\t\t\treturn new ArrayList<>();\n\t\tList<T> result;\n\t\tEntityManager em = getEM();\n\t\ttry {\n\t\t\tQuery q = em.createNamedQuery(type.getSimpleName() + \".findAll\", type);\n\t\t\tresult = q.getResultList();\n\t\t} catch (Exception ex) {\n\t\t\t// No records exist\n\t\t\treturn null;\n\t\t} finally {\n\t\t\tem.close();\n\t\t}\n\t\t// Dealing with EclipseLink Vector overriding issues (iterators don't work properly)\n\t\tList<T> output = new ArrayList<>();\n\t\toutput.addAll(result);\n\t\treturn output;\n\t}",
"public String[] getSpellImageArray()\r\n\t{\r\n\t\t String[] spellImages = new String[spells.size()];\r\n\t\t for (int i = 0; i < spells.size(); i++) {\r\n\t\t\t spellImages[i] = spells.get(i).getSnapImage();\r\n\t\t }\r\n\t\t return spellImages;\r\n\t}",
"@Override\r\n\tpublic LastOneDayList getElectricity(String type) {\n\t\treturn totalConsumptionDao.getElectricity(type);\r\n\t}",
"@Override\n\tpublic List<Type> listType() {\n\t\treturn goodsDao.listType();\n\t}",
"protected void applyEffects()\n\t{\n\t\tfor(int i = 0; i < effects.length; i++)\n\t\t{\n\t\t\tif(effects[i] != null)\n\t\t\t{\n\t\t\t\teffects[i].applyEffect();\n\t\t\t}\n\t\t}\n\t}",
"public List<Card> getCards(CardType type) {\n List<Card> cards = new ArrayList<>();\n for (Card card : this) {\n if (card.getCardType() == type) {\n cards.add(card);\n }\n }\n return cards;\n }",
"private static void addSpell(Thing t) {\r\n \t\tString name=t.getString(\"Name\");\r\n \t\tspellNames.add(name);\r\n \t\t\r\n \t\tGame.assertTrue(t.getFlag(\"IsSpell\"));\r\n \r\n \t\tint level=t.getStat(\"Level\");\r\n \t\tGame.assertTrue(level>0);\r\n \t\tt.set(\"LevelMin\",level);\r\n \r\n \t\tint skillMin=(t.getStat(\"SpellCost\"))*3;\r\n \t\tt.set(\"SkillMin\",skillMin);\r\n \t\t\r\n \t\tt.set(\"Image\",t.getStat(\"BoltImage\"));\r\n \t\tt.set(\"ImageSource\",\"Effects\");\r\n \t\t\r\n \t\t//int power=(int)(6*Math.pow(spellPowerMultiplier,level));\r\n \t\t//Game.assertTrue(power>0);\r\n \t\t//t.set(\"Power\",power);\r\n \t\tLib.add(t);\r\n \t}",
"Set<DependencyItem> getIDependOn(Class<?> type);",
"@Override\n\tpublic List<FoodType> FindAllType() {\n\t\treturn ftb.FindAllType();\n\t}",
"public List<CWLType> getTypes() {\n return types;\n }",
"public interface IMagicEffect\r\n{\r\n\tpublic String getSimpleName();\r\n\tpublic default String getName(){ return \"magic.\"+Reference.ModInfo.MOD_PREFIX+getSimpleName() + \".name\"; }\r\n\tpublic default String getTranslatedName(){ return (new TranslationTextComponent(getName())).getUnformattedComponentText(); }\r\n\t\r\n\t/** The level of this spell, typically between 0 and 9 */\r\n\tpublic default int getLevel(){ return 0; }\r\n\t\r\n\tpublic List<EnumSpellProperty> getSpellProperties();\r\n\t\r\n\tpublic static float getXPToInscribe(IMagicEffect spell)\r\n\t{\r\n\t\tfloat spellLevel = Math.max(0.5F, spell == null ? 1 : spell.getLevel());\r\n\t\treturn spellLevel * 4.444F;\r\n\t}\r\n\t\r\n\t/**\r\n\t * Returns true if this particular spell requires certain items when inscribing\r\n\t */\r\n\tpublic default boolean needsReagents()\r\n\t{\r\n\t\tfor(ItemStack stack : getReagents()) if(!stack.isEmpty()) return true;\r\n\t\treturn true;\r\n\t}\r\n\t\r\n\t/**\r\n\t * Returns a list of additional items necessary when inscribing this spell\r\n\t */\r\n\tpublic default NonNullList<ItemStack> getReagents()\r\n\t{\r\n\t\treturn NonNullList.<ItemStack>withSize(4, ItemStack.EMPTY);\r\n\t}\r\n\t\r\n\t/**\r\n\t * Returns true if all necessary prerequisites to casting the spell by the given caster have been met.\r\n\t * Used primarily by scrolls to inform the tooltip information.\r\n\t * @param casterIn\r\n\t * @param scrollIn\r\n\t */\r\n\tpublic default boolean canCast(LivingEntity casterIn, ItemStack scrollIn)\r\n\t{\r\n\t\tif(getDurationType() == DurationType.CONCENTRATE && casterIn != null && casterIn.getEntityWorld() != null)\r\n\t\t{\r\n\t\t\tMap<ResourceLocation, List<SpellData>> activeOwnedSpells = SpellManager.get(casterIn.getEntityWorld()).getSpellsOwnedBy(casterIn);\r\n\t\t\tfor(ResourceLocation dim : activeOwnedSpells.keySet())\r\n\t\t\t\tfor(SpellData spell : activeOwnedSpells.get(dim))\r\n\t\t\t\t\tif(!spell.isPermanent() && spell.getSpell().getDurationType() == DurationType.CONCENTRATE)\r\n\t\t\t\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tif(MagicEffects.isInsideAntiMagic(casterIn)) return false;\r\n\t\t\r\n\t\tfor(Components component : getCastingComponents())\r\n\t\t\tif(!component.isValid(casterIn, this)) return false;\r\n\t\t\r\n\t\tint casterLevel = getCasterLevelFromEntity(casterIn);\r\n\t\tif(casterLevel > -1 && casterLevel < Spell.getMinCasterLevel(this)) return false;\r\n\t\t\r\n\t\treturn getCastingState(casterIn, scrollIn) == EnumCastingError.CASTABLE;\r\n\t}\r\n\t\r\n\t/** \r\n\t * Returns true if this spell should spawn an EntitySpell when it is cast.<br>\r\n\t * This is mostly a utility feature following the spell system overhaul. \r\n\t */\r\n\tpublic default boolean shouldSpawnEntity(){ return false; }\r\n\t\r\n\t/**\r\n\t * Returns true if the given spell is presently affecting the given entity.<br>\r\n\t * Usually only true for de/buff effects.\r\n\t */\r\n\tpublic default boolean isAffectingEntity(SpellData dataIn, LivingEntity entityIn){ return false;}\r\n\t\r\n\t/**\r\n\t * Returns TRUE if the spell is considered to be at its object position instead of at the position of an affected entity.<br>\r\n\t * Usually FALSE for de/buff spells and spells with a PERSONAL range type.\r\n\t */\r\n\tpublic default boolean activeFromObject(SpellData dataIn, World worldIn){ return getRangeType() != RangeType.PERSONAL; }\r\n\t\r\n\t/**\r\n\t * Returns the caster level of players or IMobSpellcaster entities, or 0 if the caster is neither.\r\n\t * @param casterIn\r\n\t * @return\r\n\t */\r\n\tpublic static int getCasterLevelFromEntity(Entity casterIn)\r\n\t{\r\n\t\tif(casterIn != null)\r\n\t\t{\r\n//\t\t\tif(casterIn instanceof PlayerEntity)\r\n//\t\t\t\treturn VOPlayerData.getCasterLevel((PlayerEntity)casterIn);\r\n\t\t\tif(casterIn instanceof IMobSpellcaster)\r\n\t\t\t\treturn ((IMobSpellcaster)casterIn).getCasterLevel();\r\n\t\t}\r\n\t\t\r\n\t\treturn 0;\r\n\t}\r\n\t\r\n\tpublic default EnumCastingError getFullCastingState(LivingEntity casterIn, ItemStack scrollIn)\r\n\t{\r\n\t\tif(getDurationType() == DurationType.CONCENTRATE && casterIn != null && casterIn.getEntityWorld() != null)\r\n\t\t{\r\n\t\t\tMap<ResourceLocation, List<SpellData>> activeOwnedSpells = SpellManager.get(casterIn.getEntityWorld()).getSpellsOwnedBy(casterIn);\r\n\t\t\tfor(ResourceLocation dim : activeOwnedSpells.keySet())\r\n\t\t\t\tfor(SpellData spell : activeOwnedSpells.get(dim))\r\n\t\t\t\t\tif(!spell.isPermanent() && spell.getSpell().getDurationType() == DurationType.CONCENTRATE)\r\n\t\t\t\t\t\treturn EnumCastingError.CONCENTRATING;\r\n\t\t}\r\n\t\t\r\n\t\tif(MagicEffects.isInsideAntiMagic(casterIn)) return EnumCastingError.ANTI_MAGIC;\r\n\t\t\r\n\t\tint casterLevel = getCasterLevelFromEntity(casterIn);\r\n\t\tif(casterLevel > -1 && casterLevel < Spell.getMinCasterLevel(this)) return EnumCastingError.CASTER_LEVEL;\r\n\t\t\r\n\t\tfor(Components component : getCastingComponents())\r\n\t\t\tif(!component.isValid(casterIn, this))\r\n\t\t\t\tswitch(component)\r\n\t\t\t\t{\r\n\t\t\t\t\tcase FOCUS:\t\treturn EnumCastingError.NO_FOCUS;\r\n\t\t\t\t\tcase MATERIAL:\treturn EnumCastingError.INGREDIENTS;\r\n\t\t\t\t\tcase SOMATIC:\treturn EnumCastingError.NO_GESTURE;\r\n\t\t\t\t\tcase VERBAL:\treturn EnumCastingError.NO_SPEECH;\r\n\t\t\t\t}\r\n\t\t\r\n\t\treturn getCastingState(casterIn, scrollIn);\r\n\t}\r\n\t\r\n\tpublic default boolean itemMatchesFocus(ItemStack heldItem)\r\n\t{\r\n\t\tItemStack focusIn = getFocus();\r\n\t\treturn !heldItem.isEmpty() && heldItem.getItem() == focusIn.getItem();\r\n\t}\r\n\t\r\n\t/**\r\n\t * Returns the contextual response to attempting to cast this spell, whether that be CASTABLE or an informative error\r\n\t * @param casterIn\r\n\t * @param scrollIn\r\n\t */\r\n\tpublic default EnumCastingError getCastingState(LivingEntity casterIn, ItemStack scrollIn){ return EnumCastingError.CASTABLE; }\r\n\t\r\n\tpublic default List<Components> getCastingComponents(){ return Arrays.asList(Components.VERBAL, Components.SOMATIC); }\r\n\tpublic static String getFormattedComponents(List<Components> components)\r\n\t{\r\n\t\tList<String> componentNames = new ArrayList<String>();\r\n\t\tfor(Components component : components) componentNames.add(component.translatedName());\r\n\t\tCollections.sort(componentNames);\r\n\t\t\r\n\t\tString output = \"\";\r\n\t\tfor(String component : componentNames)\r\n\t\t{\r\n\t\t\tif(output.length() > 0) output += \", \";\r\n\t\t\toutput += component;\r\n\t\t}\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tpublic default ItemStack getFocus()\r\n\t{\r\n\t\treturn getCastingComponents().contains(Components.FOCUS) ? getFocusItem() : ItemStack.EMPTY;\r\n\t}\r\n\t\r\n\tpublic default ItemStack getFocusItem(){ return new ItemStack(Items.DIAMOND); }\r\n\t\r\n\tpublic default NonNullList<ItemStack> getMaterialComponents(){ return NonNullList.<ItemStack>withSize(1, ItemStack.EMPTY); }\r\n\t\r\n\t/** How long it takes to cast the spell, in ticks */\r\n\tpublic default int getCastingTime(){ return Spell.STANDARD_ACTION; }\r\n\t\r\n\t/** How long the spell lasts, in ticks */\r\n\tpublic default int getDuration(int casterLevel){ return Reference.Values.TICKS_PER_SECOND; }\r\n\t\r\n\tpublic default DurationType getDurationType(){ return DurationType.NORMAL; }\r\n\t\r\n\tpublic default boolean allowsSpellResistance(){ return false; }\r\n\t\r\n\t/** True if the spell can be ended prematurely by interacting with the spell object */\r\n\tpublic default boolean isDismissable(){ return false; }\r\n\t\r\n\t/** True if the spell can be dismissed even if it is or has been made permanent */\r\n\tpublic default boolean isAlwaysDismissable(){ return false; }\r\n\t\r\n\t/** True if the spell has variables that can be edited post-casting */\r\n\tpublic default boolean isEditable(){ return false; }\r\n\t\r\n\t/** Opens the corresponding UI for editing the variables of this spell */\r\n\tpublic default void edit(PlayerEntity playerIn, SpellData dataIn, World worldIn){ }\r\n\t\r\n\t/** True if the spell object should never be visible */\r\n\tpublic default boolean shouldHideEntity(){ return false; }\r\n\t\r\n\t/** Returns true if the spell can be made permanent, such as by Permanency */\r\n\tpublic default boolean canBePermanent(){ return false; }\r\n\t\r\n\t/** True if this spell performs differently when cast whilst sneaking */\r\n\tpublic default boolean hasAltFire(){ return false; }\r\n\t\r\n\t/** Returns a list of strings describing this spell */\r\n\tpublic default Collection<String> getDescription()\r\n\t{\r\n\t\treturn new ArrayList<String>();\r\n\t}\r\n\t\r\n\t/** Determines where the EntitySpell entity is spawned */\r\n\tpublic default SpawnStyle getSpawnStyle(){ return SpawnStyle.FEET; }\r\n\r\n\t/** Sets the initial position and angles of the SpellData, used by the CUSTOM SpawnStyle */\r\n\tpublic default void setSpawnPosition(SpellData data, LivingEntity casterIn){ }\r\n\t\r\n\tpublic default RangeType getRangeType(){ return RangeType.MEDIUM; }\r\n\t\r\n\t/** Returns the maximum distance from caster to target, used by the LOOK SpawnStyle */\r\n\tpublic default double getTargetRange(Entity casterIn){ return RangeType.getRange(casterIn, this); }\r\n\t\r\n\t/** Called by SpellData when it first updates, chiefly meant for Instantaneous effects */\r\n\tpublic default void doEffectStart(SpellData data, World world, Side onSide){ }\r\n\tpublic void doEffect(SpellData data, World world, int ticksActive, Side onSide);\r\n\t/** Called by SpellData when it is destroyed before its duration completes */\r\n\tpublic default void doEffectCancel(SpellData data, World world, Side onSide){ doEffect(data, world, getDuration(data.casterLevel()), onSide); }\r\n\t\r\n//\t@OnlyIn(Dist.CLIENT)\r\n//\tpublic default void renderEffect(SpellData dataIn, int activeTime, World world, double x, double y, double z, float entityYaw, float partialTicks, RenderManager rendererIn){ }\r\n\t\r\n\tpublic MagicSchool getSchool();\r\n\tpublic List<MagicSubType> getDescriptors();\r\n\t\r\n\tpublic enum Components\r\n\t{\r\n\t\tFOCUS,\r\n\t\tMATERIAL,\r\n\t\tSOMATIC,\r\n\t\tVERBAL;\r\n\t\t\r\n\t\tpublic String translatedName(){ return (new TranslationTextComponent(\"enum.\"+Reference.ModInfo.MOD_PREFIX+\"components.\"+this.name().toLowerCase())).getUnformattedComponentText(); }\r\n\t\t\r\n\t\t/** Returns true if the given caster could fulfill this component's requirement */\r\n\t\tpublic boolean isValid(LivingEntity casterIn, IMagicEffect spellIn)\r\n\t\t{\r\n\t\t\tif(casterIn == null) return true;\r\n\t\t\tswitch(this)\r\n\t\t\t{\r\n\t\t\t\tcase FOCUS:\r\n\t\t\t\t\tif(casterIn instanceof PlayerEntity && ((PlayerEntity)casterIn).isCreative()) return true;\r\n\t\t\t\t\t\r\n\t\t\t\t\tboolean focusFound = false;\r\n\t\t\t\t\tfor(Hand hand : Hand.values())\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tItemStack heldItem = casterIn.getHeldItem(hand);\r\n\t\t\t\t\t\tif(spellIn.itemMatchesFocus(heldItem))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tfocusFound = true;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(!focusFound && casterIn instanceof PlayerEntity)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tPlayerEntity player = (PlayerEntity)casterIn;\r\n\t\t\t\t\t\tfor(int slot=0; slot<9; slot++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tItemStack heldItem = player.inventory.getStackInSlot(slot);\r\n\t\t\t\t\t\t\tif(spellIn.itemMatchesFocus(heldItem))\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tfocusFound = true;\r\n\t\t\t\t\t\t\t\tbreak;\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\t\t\t\treturn focusFound;\r\n\t\t\t\tcase MATERIAL:\r\n\t\t\t\t\tif(casterIn instanceof PlayerEntity && ((PlayerEntity)casterIn).isCreative()) ;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tPlayerEntity player = casterIn instanceof PlayerEntity ? (PlayerEntity)casterIn : null;\r\n\t\t\t\t\t\tfor(ItemStack material : spellIn.getMaterialComponents())\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tint count = material.getCount();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t// Check player inventory\r\n\t\t\t\t\t\t\tif(player != null)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tfor(int slot=0; slot<player.inventory.getSizeInventory(); slot++)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tItemStack heldItem = player.inventory.getStackInSlot(slot);\r\n\t\t\t\t\t\t\t\t\tif(heldItem.isEmpty()) continue;\r\n\t\t\t\t\t\t\t\t\tif(isMatchingItem(heldItem, material)) count -= Math.min(count, heldItem.getCount());\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\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t// Check held items\r\n\t\t\t\t\t\t\t\tfor(Hand hand : Hand.values())\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tItemStack heldItem = casterIn.getHeldItem(hand);\r\n\t\t\t\t\t\t\t\t\tif(heldItem.isEmpty()) continue;\r\n\t\t\t\t\t\t\t\t\tif(isMatchingItem(heldItem, material)) count -= Math.min(count, heldItem.getCount());\r\n\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\t// Check armour slots\r\n\t\t\t\t\t\t\t\tfor(EquipmentSlotType hand : EquipmentSlotType.values())\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tItemStack heldItem = casterIn.getItemStackFromSlot(hand);\r\n\t\t\t\t\t\t\t\t\tif(heldItem.isEmpty()) continue;\r\n\t\t\t\t\t\t\t\t\tif(isMatchingItem(heldItem, material)) count -= Math.min(count, heldItem.getCount());\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif(count > 0) return false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn true;\r\n\t\t\t\tcase SOMATIC:\r\n\t\t\t\t\treturn !VOPotions.isParalysed(casterIn);\r\n\t\t\t\tcase VERBAL:\r\n\t\t\t\t\treturn !VOPotions.isSilenced(casterIn);\r\n\t\t\t\tdefault: return true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t/** Extracts the requirements for the component from the given caster */\r\n\t\tpublic void extractFrom(LivingEntity casterIn, IMagicEffect spellIn)\r\n\t\t{\r\n\t\t\tswitch(this)\r\n\t\t\t{\r\n\t\t\t\tcase SOMATIC:\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase VERBAL:\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase FOCUS:\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase MATERIAL:\r\n\t \t\t\tfor(ItemStack item : spellIn.getMaterialComponents())\r\n\t \t\t\t{\r\n\t \t\t\t\tif(casterIn instanceof PlayerEntity)\r\n\t \t\t\t\t{\r\n//\t \t\t\t\t\tPlayerEntity player = (PlayerEntity)casterIn;\r\n//\t \t\t\t\t\tif(!player.isCreative())\r\n//\t \t\t\t\t\t\tplayer.inventory.clearMatchingItems(item.getItem(), item.getMetadata(), item.getCount(), item.hasTag() ? item.getTag() : null);\r\n\t \t\t\t\t}\r\n\t \t\t\t\telse\r\n\t \t\t\t\t{\r\n\t\t \t\t\t\tint count = item.getCount();\r\n\t\t \t\t\t\tfor(Hand hand : Hand.values())\r\n\t\t \t\t\t\t{\r\n\t\t\t\t\t\t\t\tif(count <= 0) break;\r\n\t\t \t\t\t\t\tItemStack heldItem = casterIn.getHeldItem(hand);\r\n\t\t \t\t\t\t\tif(heldItem.isEmpty()) continue;\r\n\t\t\t\t\t\t\t\tif(isMatchingItem(heldItem, item))\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tint dif = Math.min(count, heldItem.getCount());\r\n\t\t\t\t\t\t\t\t\tcount -= dif;\r\n\t\t\t\t\t\t\t\t\tif(dif >= heldItem.getCount()) casterIn.setHeldItem(hand, ItemStack.EMPTY);\r\n\t\t\t\t\t\t\t\t\telse heldItem.setCount(heldItem.getCount() - dif);\r\n\t\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\tfor(EquipmentSlotType slot : EquipmentSlotType.values())\r\n\t\t \t\t\t\t{\r\n\t\t \t\t\t\t\tif(count <= 0) break;\r\n\t\t \t\t\t\t\tItemStack heldItem = casterIn.getItemStackFromSlot(slot);\r\n\t\t \t\t\t\t\tif(heldItem.isEmpty()) continue;\r\n\t\t\t\t\t\t\t\tif(isMatchingItem(heldItem, item))\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tint dif = Math.min(count, heldItem.getCount());\r\n\t\t\t\t\t\t\t\t\tcount -= dif;\r\n\t\t\t\t\t\t\t\t\tif(dif >= heldItem.getCount()) casterIn.setItemStackToSlot(slot, ItemStack.EMPTY);\r\n\t\t\t\t\t\t\t\t\telse heldItem.setCount(heldItem.getCount() - dif);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t \t\t\t\t}\r\n\t \t\t\t\t}\r\n\t \t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tprivate boolean isMatchingItem(ItemStack heldItem, ItemStack item)\r\n\t\t{\r\n\t\t\treturn heldItem.isItemEqual(item);\r\n\t\t}\r\n\t}\r\n\t\r\n\tpublic enum DurationType\r\n\t{\r\n\t\tNORMAL,\r\n\t\tINSTANT,\r\n\t\tPERMANENT,\r\n\t\tCONCENTRATE;\r\n\t\t\r\n\t\tpublic String translatedName(){ return (new TranslationTextComponent(\"enum.\"+Reference.ModInfo.MOD_PREFIX+\"magic_duration.\"+this.name().toLowerCase())).getUnformattedComponentText(); }\r\n\t}\r\n\t\r\n\tpublic enum RangeType\r\n\t{\r\n\t\tTOUCH,\r\n\t\tPERSONAL,\r\n\t\tCLOSE,\r\n\t\tMEDIUM,\r\n\t\tLONG,\r\n\t\tFEET,\r\n\t\tUNLIMITED;\r\n\t\t\r\n\t\tpublic String translatedName(){ return (new TranslationTextComponent(\"enum.\"+Reference.ModInfo.MOD_PREFIX+\"magic_range.\"+this.name().toLowerCase())).getUnformattedComponentText(); }\r\n\t\t\r\n\t\tpublic static double getRange(Entity caster, IMagicEffect spell)\r\n\t\t{\r\n\t\t\tint casterCL = getCasterLevelFromEntity(caster);\r\n\t\t\tint CL = casterCL < 0 ? 20 : (casterCL > -1 ? casterCL : Spell.getMinCasterLevel(spell));\r\n\t\t\t\r\n\t\t\tswitch(spell.getRangeType())\r\n\t\t\t{\r\n\t\t\t\tcase PERSONAL:\r\n\t\t\t\tcase TOUCH:\t\treturn (caster != null && caster instanceof PlayerEntity) ? ((PlayerEntity)caster).getAttribute(ForgeMod.REACH_DISTANCE.get()).getValue() : 5D;\r\n\t\t\t\tcase CLOSE:\t\treturn Spell.feetToMetres(25 + Math.floor(CL / 2) * 5);\r\n\t\t\t\tcase MEDIUM:\treturn Spell.feetToMetres(100 + CL * 10);\r\n\t\t\t\tcase LONG:\t\treturn Spell.feetToMetres(400 + CL * 40);\r\n\t\t\t\tcase UNLIMITED:\treturn Double.MAX_VALUE;\r\n\t\t\t\tdefault:\t\treturn 5D;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tpublic enum SpawnStyle\r\n\t{\r\n\t\t/** Spawn at the point you are looking at */\r\n\t\tLOOK,\r\n\t\t/** Spawn at your head position */\r\n\t\tHEAD,\r\n\t\t/** Spawn at your feet */\r\n\t\tFEET,\r\n\t\t/** Use the setSpawnPosition function */\r\n\t\tCUSTOM;\r\n\t}\r\n\t\r\n\tpublic enum MagicSchool\r\n\t{\r\n\t\tABJURATION(-1, TextFormatting.GRAY),\r\n\t\tCONJURATION(16449280, TextFormatting.YELLOW),\r\n\t\tDIVINATION(61695, TextFormatting.AQUA),\r\n\t\tENCHANTMENT(16711848, TextFormatting.LIGHT_PURPLE),\r\n\t\tEVOCATION(16711680, TextFormatting.RED),\r\n\t\tILLUSION(10354943, TextFormatting.DARK_PURPLE),\r\n\t\tNECROMANCY(0, TextFormatting.DARK_GRAY),\r\n\t\tTRANSMUTATION(65305, TextFormatting.GREEN);\r\n\t\t\r\n\t\tprivate final int colour;\r\n\t\tprivate final TextFormatting textColour;\r\n\t\t\r\n\t\tprivate MagicSchool(int colourIn, TextFormatting textIn)\r\n\t\t{\r\n\t\t\tcolour = colourIn;\r\n\t\t\ttextColour = textIn;\r\n\t\t}\r\n\t\t\r\n\t\tpublic int getColour(){ return this.colour; }\r\n\t\tpublic TextFormatting getTextColour(){ return this.textColour; }\r\n\t\tpublic String translatedName(){ return (new TranslationTextComponent(\"enum.\"+Reference.ModInfo.MOD_PREFIX+\"magic_school.\"+this.name().toLowerCase())).getUnformattedComponentText(); }\r\n\t}\r\n\t\r\n\tpublic enum MagicSubType\r\n\t{\r\n\t\tACID,\r\n\t\tAIR,\r\n\t\tCOLD,\r\n\t\tDARKNESS,\r\n\t\tDEATH,\r\n\t\tEARTH,\r\n\t\tELECTRICITY,\r\n\t\tEVIL,\r\n\t\tFEAR,\r\n\t\tFIRE,\r\n\t\tFORCE,\r\n\t\tGOOD,\r\n\t\tHEALING,\r\n\t\tLIGHT,\r\n\t\tMIND_AFFECTING,\r\n\t\tSONIC,\r\n\t\tWATER;\r\n\t\t\r\n\t\tpublic static String getListAsString(List<MagicSubType> list)\r\n\t\t{\r\n\t\t\tString string = \"\";\r\n\t\t\tif(!list.isEmpty())\r\n\t\t\t{\r\n\t\t\t\tfor(int i=0; i<list.size(); i++)\r\n\t\t\t\t{\r\n\t\t\t\t\tstring += list.get(i).translatedName();\r\n\t\t\t\t\tif(i < (list.size()-1)) string += \", \";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn string;\r\n\t\t}\r\n\t\t\r\n\t\tpublic String translatedName(){ return (new TranslationTextComponent(\"enum.\"+Reference.ModInfo.MOD_PREFIX+\"magic_subtype.\"+this.name().toLowerCase())).getUnformattedComponentText(); }\r\n\t}\r\n}",
"public void removeAll () {\n\t\teffects.clear();\n\t}",
"public HashMap<Integer, Object> getEffectProperties( ) {\r\n\r\n return properties;\r\n }",
"@Override\n\tpublic List<Affectation> getAllAffectation() {\n\t\treturn dao.getAllAffectation();\n\t}",
"public ArrayList<Attraction> subList(String attractionType) {\n\n ArrayList<Attraction> tempList = new ArrayList<>();\n\n for (Attraction attraction : attractions) {\n switch (attractionType) {\n case MainActivity.STATE_BARS:\n if (attraction.isBar()) {\n tempList.add(attraction);\n }\n break;\n case MainActivity.STATE_RESTAURANTS:\n if (attraction.isRestaurant()) {\n tempList.add(attraction);\n }\n break;\n\n case MainActivity.STATE_CAFES:\n if (attraction.isCafe()) {\n tempList.add(attraction);\n }\n break;\n\n case MainActivity.STATE_COFFEE_SHOPS:\n if (attraction.isCoffeeShop()) {\n tempList.add(attraction);\n }\n break;\n\n case MainActivity.STATE_PHOTO_OPPORTUNITIES:\n if (attraction.isPhotoOpportunity()) {\n tempList.add(attraction);\n }\n break;\n\n case MainActivity.STATE_THINGS_TO_DO:\n if (attraction.isThingToDo()) {\n tempList.add(attraction);\n }\n break;\n }\n }\n\n return tempList;\n }",
"private void castSpellByAI() {\n\t\tboolean spellIsNotActivated = true;\n\t\tboolean[] spellsFlags = new boolean[3];\n\t\tChampion AI = currentTask.getCurrentChamp();\n\t\tArrayList<Spell> spells = ((Wizard)AI).getSpells();\n\t\twhile(spellIsNotActivated){\n\t\t\t\n\t\t\tint randomAction = (int) (Math.random()*2);\n\t\t\tSpell spell = null;\n\t\t\t\n\t\t\tswitch(randomAction){\n\t\t\tcase 0: if(spellsFlags[0]==false) {spell = spells.get(0); spellsFlags[0]=true; break;}\n\t\t\tcase 1:\tif(spellsFlags[1]==false) {spell = spells.get(1); spellsFlags[1]=true; break;}\n\t\t\tdefault: if(spellsFlags[2]==false) {spell = spells.get(2); spellsFlags[2] =true;}\n\t\t\t}\n\t\t\t\n\t\t\tif(spell instanceof HealingSpell){\n\t\t\t\tcastHealingSpell(spell);\n\t\t\t}else if(spell instanceof DamagingSpell){\n\t\t\t\tDirection direction;\n\t\t\t\tint randomDirection = (int) (Math.random()*3);\n\t\t\t\tswitch(randomDirection){\n\t\t\t\tcase 0: direction = Direction.BACKWARD;\n\t\t\t\tcase 1: direction = Direction.FORWARD;\n\t\t\t\tcase 2: direction = Direction.LEFT;\n\t\t\t\tdefault: direction = Direction.RIGHT;\n\t\t\t\t}\n\t\t\t\tspellInAction = spell;\n\t\t\t\tdirectionsInAction = new ArrayList<Direction>();\n\t\t\t\tdirectionsInAction.add(direction);\n\t\t\t\tcastDamagingSpell();\n\t\t\t}else if(spell instanceof RelocatingSpell){\n\t\t\t\tDirection direction1;\n\t\t\t\tint randomDirection1 = (int) (Math.random()*3);\n\t\t\t\tswitch(randomDirection1){\n\t\t\t\tcase 0: direction1 = Direction.BACKWARD;\n\t\t\t\tcase 1: direction1 = Direction.FORWARD;\n\t\t\t\tcase 2: direction1 = Direction.LEFT;\n\t\t\t\tdefault: direction1 = Direction.RIGHT;\n\t\t\t\t}\n\t\t\t\tDirection direction2;\n\t\t\t\tint randomDirection2 = (int) (Math.random()*3);\n\t\t\t\tswitch(randomDirection2){\n\t\t\t\tcase 0: direction2 = Direction.BACKWARD;\n\t\t\t\tcase 1: direction2 = Direction.FORWARD;\n\t\t\t\tcase 2: direction2 = Direction.LEFT;\n\t\t\t\tdefault: direction2 = Direction.RIGHT;\n\t\t\t\t}\n\t\t\t\tspellInAction = spell;\n\t\t\t\tdirectionsInAction = new ArrayList<Direction>();\n\t\t\t\tdirectionsInAction.add(direction1);\n\t\t\t\tdirectionsInAction.add(direction2);\n\t\t\t\t\n\t\t\t\tint randomRange = (int) (Math.random()*((RelocatingSpell)spell).getRange()) + 1;\n\t\t\t\tcastRelocatingSpell(randomRange);\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tspellIsNotActivated = false;\n\t\t\t}\n\t\t\tif(AI != currentTask.getCurrentChamp()){\n\t\t\t\tspellIsNotActivated = false;\n\t\t\t}\n\t\t}\n\n\t\t\n\t\t\n\t}",
"public Weapon(WeaponType type, int level) {\n \tthis.effects = new ArrayList<>();\n this.type = type;\n this.level = level;\n this.effects.add(new AttackEffect(getWeaponDamage(), getWeaponSpeed(), getWeaponRange(), Target.SELF));\n }",
"@Override\n public void onTypeAttack(Entity target) {\n if (target instanceof EntityLivingBase) {\n int time;\n switch (target.worldObj.difficultySetting) {\n case PEACEFUL:\n return;\n case EASY:\n time = 15;\n break;\n case NORMAL:\n time = 35;\n break;\n default:\n time = 75;\n }\n time *= 20;\n ((EntityLivingBase)target).addPotionEffect(new PotionEffect(Potion.resistance.id, time, -3));\n }\n }",
"public Set<Cause> getRelations() {\n\t\tSet<Cause> relations = new TreeSet<Cause>();\n\t\tfor (Relation relation : this.effectRelations) {\n\t\t\tif (!this.isChildOf(relation.causeTo)) {\n\t\t\t\trelations.add(relation.causeTo);\n\t\t\t}\n\t\t}\n\t\treturn relations;\n\t}",
"public List<Resource> findByType(ResourceType type) {\n\t\tMap<String, Object> typeFilter = new HashMap<>(1);\n\n\t\ttypeFilter.put(\"type\", new ValueParameter(type));\n\n\t\treturn this.filter(typeFilter);\n\t}",
"public List<Effect> getMethodEffects(\r\n final IRNode mDecl, final IRNode callSite) {\r\n final List<Effect> effects = getDeclaredMethodEffects(mDecl, callSite);\r\n if (effects == null) {\r\n final Target anything =\r\n new ClassTarget(getAllRegion(callSite), NoEvidence.INSTANCE);\r\n return ImmutableList.of(\r\n Effect.write(callSite, anything, NoPromisedEffectEvidence.INSTANCE));\r\n } else {\r\n return effects;\r\n }\r\n }",
"public ArrayList <TreasureKind> getSpecificVisibleTreasures () {\n \n return this.specificVisibleTreasures; \n }",
"@objid (\"be13c135-d5bf-4f14-9794-2c2fbdc9e900\")\n <T extends ResourceType> List<T> getDefinedResourceType(java.lang.Class<T> filterClass);",
"public static HashMap<Integer, Object> showEditEffectDialog( EffectsController effectsController, int effectType, HashMap<Integer, Object> currentProperties ) {\r\n\r\n HashMap<Integer, Object> effectProperties = null;\r\n\r\n switch( effectType ) {\r\n case Effect.ACTIVATE:\r\n effectProperties = new FlagEffectDialog( FlagEffectDialog.ACTIVATE, currentProperties ).getEffectProperties( );\r\n break;\r\n case Effect.DEACTIVATE:\r\n effectProperties = new FlagEffectDialog( FlagEffectDialog.DEACTIVATE, currentProperties ).getEffectProperties( );\r\n break;\r\n case Effect.SET_VALUE:\r\n effectProperties = new VarEffectDialog( VarEffectDialog.SET_VALUE, currentProperties ).getEffectProperties( );\r\n break;\r\n case Effect.INCREMENT_VAR:\r\n effectProperties = new VarEffectDialog( VarEffectDialog.INCREMENT_VAR, currentProperties ).getEffectProperties( );\r\n break;\r\n case Effect.DECREMENT_VAR:\r\n effectProperties = new VarEffectDialog( VarEffectDialog.DECREMENT_VAR, currentProperties ).getEffectProperties( );\r\n break;\r\n case Effect.MACRO_REF:\r\n effectProperties = new MacroReferenceEffectDialog( currentProperties ).getEffectProperties( );\r\n break;\r\n case Effect.CONSUME_OBJECT:\r\n effectProperties = new ObjectEffectDialog( ObjectEffectDialog.CONSUME, currentProperties ).getEffectProperties( );\r\n break;\r\n case Effect.GENERATE_OBJECT:\r\n effectProperties = new ObjectEffectDialog( ObjectEffectDialog.GENERATE, currentProperties ).getEffectProperties( );\r\n break;\r\n case Effect.CANCEL_ACTION:\r\n case Effect.TRIGGER_LAST_SCENE:\r\n effectProperties = new HashMap<Integer, Object>( );\r\n break;\r\n case Effect.SPEAK_PLAYER:\r\n effectProperties = new SpeakPlayerEffectDialog( effectsController, currentProperties ).getEffectProperties( );\r\n break;\r\n case Effect.SPEAK_CHAR:\r\n effectProperties = new SpeakCharacterEffectDialog( effectsController, currentProperties ).getEffectProperties( );\r\n break;\r\n case Effect.TRIGGER_BOOK:\r\n effectProperties = new TriggerBookEffectDialog( currentProperties ).getEffectProperties( );\r\n break;\r\n case Effect.PLAY_SOUND:\r\n effectProperties = new PlaySoundEffectDialog( effectsController, currentProperties ).getEffectProperties( );\r\n break;\r\n case Effect.PLAY_ANIMATION:\r\n effectProperties = new PlayAnimationEffectDialog( effectsController, currentProperties ).getEffectProperties( );\r\n break;\r\n case Effect.MOVE_PLAYER:\r\n effectProperties = new MovePlayerEffectDialog( currentProperties ).getEffectProperties( );\r\n break;\r\n case Effect.MOVE_NPC:\r\n effectProperties = new MoveNPCEffectDialog( currentProperties ).getEffectProperties( );\r\n break;\r\n case Effect.TRIGGER_CONVERSATION:\r\n effectProperties = new TriggerConversationEffectDialog( currentProperties ).getEffectProperties( );\r\n break;\r\n case Effect.TRIGGER_CUTSCENE:\r\n effectProperties = new TriggerCutsceneEffectDialog( currentProperties ).getEffectProperties( );\r\n break;\r\n case Effect.TRIGGER_SCENE:\r\n effectProperties = new TriggerSceneEffectDialog( currentProperties ).getEffectProperties( );\r\n break;\r\n case Effect.WAIT_TIME:\r\n effectProperties = new WaitTimeEffectDialog( currentProperties ).getEffectProperties( );\r\n break;\r\n case Effect.SHOW_TEXT:\r\n effectProperties = new ShowTextEffectDialog( effectsController, currentProperties ).getEffectProperties( );\r\n break;\r\n case Effect.HIGHLIGHT_ITEM:\r\n effectProperties = new HighlightItemEffectDialog( HighlightItemEffectDialog.HIGHLIGHT, currentProperties ).getEffectProperties( );\r\n break;\r\n case Effect.MOVE_OBJECT:\r\n effectProperties = new MoveObjectEffectDialog( currentProperties ).getEffectProperties( );\r\n break;\r\n }\r\n\r\n return effectProperties;\r\n }",
"public List<Type> getAll();",
"public StatusEffect getEffect() {\n return effect;\n }",
"public ArrayList<Treasure> getTreasureList() {\n\n return treasures;\n }",
"public RMEffect getEffect() { return _effect; }",
"public List<CourseBean> findCourseTypeOfMusic() {\n\t\tString hql = \"FROM CourseBean WHERE course_type='music'\";\n\n\t\treturn entityManager.createQuery(hql, CourseBean.class).getResultList();\n\t}",
"public String[] getSpellNamesArray()\r\n\t{\r\n\t\t String[] spellNames = new String[spells.size()];\r\n\t\t for (int i = 0; i < spells.size(); i++) {\r\n\t\t\t spellNames[i] = spells.get(i).getName();\r\n\t\t }\r\n\t\t return spellNames;\r\n\t}",
"public PhaseType[] getAllPhaseTypes() throws PhaseManagementException {\r\n return this.delegate.getAllPhaseTypes();\r\n }",
"@Override\r\n\tpublic void destroy() {\r\n\t\tsuper.destroy();\r\n\t\t// gotta remove cont effects when this ability leaves game...\r\n\r\n\t\tfor (Effect effect : effects) {\r\n\t\t\tref.getGame().getState().getContinuousEffects()\r\n\t\t\t\t\t.remove(effect);\r\n\t\t}\r\n\r\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 static List<Field> getInheritedFields(Class<?> type) {\n List<Field> fields = new ArrayList<>();\n\n Class<?> stopClass = type.isEnum() ? Enum.class : Object.class;\n Class<?> beanClass = type;\n while (beanClass != null && beanClass != stopClass) {\n Stream.of(beanClass.getDeclaredFields())\n .filter(BeanPropertyUtils::isBeanField)\n .forEach(fields::add);\n beanClass = beanClass.getSuperclass();\n }\n\n return fields;\n }",
"public Set<String> getConstants(PDDLType type) {\n\t\treturn filterTypedList(constants, type);\n\t}",
"public List<Treasure> giveInventory() {\r\n return treasures;\r\n }",
"Set<DependencyItem> getDependsOnMe(Class<?> type);",
"public <T extends Entity> List<T> getAllEntitiesOf(Class<T> type, Entity... exclude)\n\t{\n\t\treturn this.getEntitiesInRadius(0.0F, 0.0F, 9999F, type, exclude);\n\t}",
"public static List<Field> getInheritedPrivateFields(Class<?> type)\r\n {\r\n List<Field> result = new ArrayList<Field>();\r\n \r\n Class<?> i = type;\r\n while (i != null && i != Object.class) {\r\n for (Field field : i.getDeclaredFields()) {\r\n if (!field.isSynthetic()) {\r\n result.add(field);\r\n }\r\n }\r\n i = i.getSuperclass();\r\n }\r\n \r\n return result;\r\n }",
"public List<PluginInfo> getPluginsByType(String type) {\n List<PluginInfo> typeList = new ArrayList<PluginInfo>();\n for (int i = 0; i < pl.getPlugins().size(); i++) {\n PluginInfo pi = pl.getPlugins().get(i);\n if (type.endsWith(pi.getType())) {\n typeList.add(pi);\n }\n }\n return typeList;\n }",
"default <T extends SimpleInventory> List<T> getInventories(Class<T> clazz) {\n return this.getInventories().stream()\n .filter(inventory -> inventory.getClass().equals(clazz))\n .map(clazz::cast)\n .collect(Collectors.toList());\n }",
"public Set<Position> getPositionsWithActiveEffects() {\n return activeEffects.keySet();\n }",
"private String applyAllEffects() {\n StringBuilder applySummary = new StringBuilder();\n for (BattleEffect btlEff : effectsToApply) {\n applySummary.append(btlEff.apply());\n }\n return applySummary.toString();\n }",
"@Override\r\n\tpublic List<Type> getTypes() {\n\t\treturn (List<Type>)BaseDao.select(\"select * from type\", Type.class);\r\n\t}",
"public String getEffect() {\n\t\treturn effect;\n\t}",
"public List<ApiDAOFactory> getDSPluginService(String type) {\n /**\n * List of DAO service implementations of T class.\n */\n List<ApiDAOFactory> apiDAOFactories = new ArrayList<>();\n\n for (Map.Entry<String, ModuleLayer> layer : DemoPluginLifecycleListener.getModuleLayers().entrySet()) {\n ServiceLoader.load(layer.getValue(), ApiDAOFactory.class)\n .stream()\n .map(ServiceLoader.Provider::get)\n .filter(d -> d.getApiDAO().accept(type))\n .forEach(apiDAOFactories::add);\n }\n\n return apiDAOFactories;\n }",
"public static @NonNull List<Typeface> getAvailableTypefaces() {\n synchronized (TypefaceManager.class) {\n sortTypefaces();\n\n return Collections.unmodifiableList(new ArrayList<>(typefaces));\n }\n }",
"List<SpawnType> getSpawnTypes();",
"public ArrayList<Shield> getShields() {\n return shields;\n }",
"@Override\n public void filter(String type) {\n\n List<Doctor> newDocs = new ArrayList<>();\n \n for (Doctor doctor : doctors) {\n //If doctor's specialization matches user searched specialization add to new doctor list\n if (doctor.getSpecialization()!=null && doctor.getSpecialization().equals(type)) {\n newDocs.add(doctor);\n }\n }\n \n //Set new doctor list as the doctor list\n doctors = newDocs;\n }",
"private void removeEnchantRecipe() {\n Iterator<Recipe> it = Bukkit.recipeIterator();\n\n while (it.hasNext()) {\n Recipe res = it.next();\n\n if (res.getResult().getType() == ENCHANT_TABLE.getType()) {\n it.remove();\n }\n }\n }",
"public Set<Node> getChildByType(String type) {\n HashSet<Node> result = new HashSet<Node>();\n Iterable<Relationship> relations = gisNode.getRelationships(Direction.OUTGOING);\n for (Relationship relationship : relations) {\n Node node = relationship.getEndNode();\n if (type.equals(node.getProperty(INeoConstants.PROPERTY_TYPE_NAME, \"\"))) {\n result.add(node);\n }\n }\n return result;\n }",
"@Override\n public ArrayList<Tool> selectByTypeId(String typeId) {\n Firestore dbFirestore = FirestoreClient.getFirestore();\n ApiFuture<QuerySnapshot> querySnapshot = dbFirestore.collection(collection).whereEqualTo(\"typeId\", typeId).get();\n ArrayList<Tool> tools = new ArrayList<>();\n\n try {\n List<QueryDocumentSnapshot> docList = querySnapshot.get().getDocuments();\n if(!docList.isEmpty()){\n for (QueryDocumentSnapshot queryDocumentSnapshot : docList) {\n tools.add(queryDocumentSnapshot.toObject(Tool.class));\n }\n }\n } catch (InterruptedException | ExecutionException e) {\n e.printStackTrace();\n }\n\n return tools;\n }",
"public Spell() {\r\n spells = new ArrayList<>();\r\n // Add all 3 spells whenever defualt constructor is called\r\n spells.add(\"Jump the player to another grid location\");\r\n spells.add(\"Randomly reveal the location of one of the Tokimons\");\r\n spells.add(\"Randomly kill off one of the Fokimons\");\r\n spellsCounter = 3;\r\n }",
"public ContentHandler[] forType(String type) {\n return impl.forType(type);\n }",
"public List<Rule> positionProfitTakingRuleList(TacticTypeEnum tacticType) {\n List<Rule> ruleList = new ArrayList<>();\n SuppressCondition suppressMonth = suppressConditionTemplate.month();\n RangeCondition pctGT40 = rangeConditionTemplate.pct(40, Double.MAX_VALUE);\n Operation sellAll = operationTemplate.sellAll();\n ruleList.add(of(tacticType, pctGT40, suppressMonth, sellAll));\n RangeCondition pct30To40 = rangeConditionTemplate.pct(30, 40);\n Operation sell50 = operationTemplate.sell50Pct();\n ruleList.add(of(tacticType, pct30To40, suppressMonth, sell50));\n RangeCondition pct20To30 = rangeConditionTemplate.pct(20, 30);\n Operation sell30 = operationTemplate.sell30Pct();\n ruleList.add(of(tacticType, pct20To30, suppressMonth, sell30));\n return ruleList;\n }",
"public List<WeatherType> getListWeatherType() {\n\t\treturn weatherTypeService.getAllWeatherType();\n\t}",
"public ArrayList <TreasureKind> getSpecificHiddenTreasures () {\n \n return this.specificHiddenTreasures; \n }",
"public void getEnemyBattleEffects(Enemy enemy) {\n try {\n Ability chosenAbility = enemy.getLastUsableAbility().clone();\n ArrayList<Entity> players = new ArrayList<>();\n players.add(playerInCombat);\n addEffect(enemy.parse(chosenAbility,players,true));\n } catch (InsufficientResourceException ignored) {\n ;\n }\n }",
"public void addEffects() {\r\n\t\tfor (BlinkingButton effect : parameterLocation) {\r\n\t\t\t//Effects that are visible - should be added the the panel\r\n\t\t\tif (effect.isVisible()) {\r\n\t\t\t\tmainPanel.add(effect);\r\n\t\t\t}\r\n\t\t}\r\n\t}"
] | [
"0.63166434",
"0.6137176",
"0.58613455",
"0.5853994",
"0.57163715",
"0.57032734",
"0.5619779",
"0.5589201",
"0.5579073",
"0.5489782",
"0.54682595",
"0.52966374",
"0.5244673",
"0.5135587",
"0.5085562",
"0.501606",
"0.4992593",
"0.49041793",
"0.48994118",
"0.4847061",
"0.4834401",
"0.48308584",
"0.48254132",
"0.47826055",
"0.4770261",
"0.47541946",
"0.47480023",
"0.47478127",
"0.4744582",
"0.47428116",
"0.47284123",
"0.47105256",
"0.4695791",
"0.46819252",
"0.4676771",
"0.46746832",
"0.4660997",
"0.46471363",
"0.46419498",
"0.46376127",
"0.46299517",
"0.46282807",
"0.46162197",
"0.46116653",
"0.45985013",
"0.45938772",
"0.4583485",
"0.45772433",
"0.45717263",
"0.45683348",
"0.45621923",
"0.45621806",
"0.45615748",
"0.4560914",
"0.4556405",
"0.45533872",
"0.45505732",
"0.45470154",
"0.4544279",
"0.45364368",
"0.45356968",
"0.45315173",
"0.452621",
"0.45253354",
"0.45162255",
"0.45066828",
"0.4493937",
"0.44853938",
"0.4464915",
"0.44617537",
"0.4447641",
"0.4446423",
"0.44449946",
"0.444423",
"0.44395855",
"0.44389284",
"0.44355723",
"0.44326293",
"0.44236672",
"0.441467",
"0.44112328",
"0.4410061",
"0.4409845",
"0.44082874",
"0.440638",
"0.44026163",
"0.44001818",
"0.43908283",
"0.4382511",
"0.4377809",
"0.43732187",
"0.4369383",
"0.43658727",
"0.43614906",
"0.43609726",
"0.43608448",
"0.4353356",
"0.4348654",
"0.4340393",
"0.43345907"
] | 0.619116 | 1 |
Removes the given effect from the wizard if they are indeed being afflicted by it. This does NOT remove the effect's presence on the wizard. That must be done manually. | public synchronized void removeEffectFromList(SpellEffect effect) {
if (effects.contains(effect)) {
effects.remove(effect);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void doRemove()\n {\n Player target = p.getServer().getPlayer(targetID);\n if (target == null)\n return;\n\n // teleport them back to their original location\n target.teleport(originalLocation);\n\n // remove flying and immobolize effects\n for (O2EffectType effectType : additionalEffects)\n {\n Ollivanders2API.getPlayers().playerEffects.removeEffect(targetID, effectType);\n }\n }",
"boolean removeEffect(Effect effect) {\n/* 2699 */ boolean removed = false;\n/* 2700 */ if (this.effects != null && this.effects.contains(effect)) {\n/* */ \n/* 2702 */ this.effects.remove(effect);\n/* 2703 */ if (this.watchers != null)\n/* */ {\n/* 2705 */ for (Iterator<VirtualZone> it = this.watchers.iterator(); it.hasNext();)\n/* 2706 */ ((VirtualZone)it.next()).removeEffect(effect); \n/* */ }\n/* 2708 */ if (this.effects.size() == 0)\n/* 2709 */ this.effects = null; \n/* 2710 */ removed = true;\n/* */ } \n/* */ \n/* 2713 */ return removed;\n/* */ }",
"public void remove() {\r\n\tif (kingdom != null && currentEffect != null)\r\n\t currentEffect.removeFrom(kingdom);\r\n\tcurrentEffect = null;\r\n }",
"@Override\r\n\tpublic void destroy() {\r\n\t\tsuper.destroy();\r\n\t\t// gotta remove cont effects when this ability leaves game...\r\n\r\n\t\tfor (Effect effect : effects) {\r\n\t\t\tref.getGame().getState().getContinuousEffects()\r\n\t\t\t\t\t.remove(effect);\r\n\t\t}\r\n\r\n\t}",
"private void removeEffects(PlanGraphStep stepToRemove, int currentLevel) {\n\t\t\n\t\tremoveEffects(stepToRemove, currentLevel, true);\n\t}",
"public void removeTempStatusEffects()\n\t{\n\t\tfor(Pokemon pokemon : getParty())\n\t\t\tif(pokemon != null)\n\t\t\t\tpokemon.removeStatusEffects(false);\n\t}",
"@Override\n public void flingEffect(Battle b, ActivePokemon pelted) {\n removeLevitation(b, pelted);\n }",
"@Override\n public Boolean hasEffect() {\n\treturn false;\n }",
"public void removeWizard() {\n\t\tyellowWizard = null;\n\t\tplayer.getHintIconsManager().removeAll();\n\t\tplayer.WizardUsed = true;\n\t}",
"public void endTurn() {\n for (BattleEffect btlEff : effectsToRemove) {\n if (btlEff.getTurnsRemaining() == 0) {\n btlEff.remove();\n effectsToApply.remove(btlEff);\n } else {\n btlEff.decrementTurnsRemaining();\n }\n }\n }",
"private void removeEffects(PlanGraphStep stepToRemove, int currentLevel, boolean propagate) {\n\t\t\n\t\tSet<PlanGraphStep> currentSteps = steps.get(currentLevel);\n\t\tSet<PlanGraphLiteral> currentFacts = facts.get(currentLevel);\n\t\t/* propagate removal until steps no longer exists*/\n\t\tif (currentSteps.contains(stepToRemove)){\n\t\t\t\n\t\t\tcurrentSteps.remove(stepToRemove);\n\t\t\tfor (PlanGraphLiteral pgLiteral : stepToRemove.getChildNodes()) {\n\t\t\t\t/* check to see if another step at this level has the effect pgLiteral */\n\t\t\t\tif (Collections.disjoint(currentSteps, pgLiteral.getParentNodes())) {\n\t\t\t\t\tcurrentFacts.remove(pgLiteral);\n\t\t\t\t\tif (propagate == true && currentLevel + 1 < maxLevel) {\n\t\t\t\t\t\tif (stepToRemove.isPersistent()) {\n\t\t\t\t\t\t\tremoveStep(stepToRemove, currentLevel + 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tPlanGraphStep persistentStep = persistentSteps.get(pgLiteral);\n\t\t\t\t\t\t\tremoveStep(persistentStep, currentLevel + 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"protected void decrementEffectDurations()\n\t{\n\t\tfor(int i = 0; i < effects.length; i++)\n\t\t{\n\t\t\tif(effects[i] != null)\n\t\t\t{\n\t\t\t\teffects[i].decrementDuration();\n\t\t\t\t\n\t\t\t\tif(effects[i].getDuration() == 0)\n\t\t\t\t{\n\t\t\t\t\t// TODO: Destroy Effect object\n\n\t\t\t\t\t// Remove object from effects array\n\t\t\t\t\teffects[i] = null;\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void remove() {\n\t\tstopFloating();\t\n\t\tPacketHandler.toggleRedTint(player, false);\n\t\tplayer.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS, 30, 1));\n\t\tplayer.stopSound(Sound.MUSIC_DISC_CHIRP);\n\t\tcleanTasks();\n\t\tactiveScenarios.remove(player.getUniqueId());\n\t}",
"public static void clearPotionEffects(LivingEntity ent) {\n\t\tent.getActivePotionEffects().forEach(ef -> ent.removePotionEffect(ef.getType()));\n\t}",
"public void removeAll () {\n\t\teffects.clear();\n\t}",
"public default void doEffectCancel(SpellData data, World world, Side onSide){ doEffect(data, world, getDuration(data.casterLevel()), onSide); }",
"@Override\n protected void doPlayEffect(SwccgGame game) {\n if (gameState.getDuelState().canContinue(game)) {\n\n actionsEnvironment.emitEffectResult(new DuelAddOrModifyDuelDestiniesStepResult(subAction));\n }\n }",
"public void setEffect(String effect){\n this.effect = effect;\n }",
"@Override\n\tpublic int effect() {\n\t\treturn 0 ;\n\t}",
"public void undoAction() {\n classifier.removeFeature(operation);\n }",
"public void makesNotHere(){this.piece.unAffect();}",
"@Override\n protected void doCheckEffect ()\n {\n // check all the stationary spells in the location of the projectile for a Colloportus\n List<O2StationarySpell> inside = new ArrayList<>();\n for (O2StationarySpell spell : Ollivanders2API.getStationarySpells(p).getStationarySpellsAtLocation(location))\n {\n if (spell instanceof COLLOPORTUS)\n {\n inside.add(spell);\n }\n }\n\n // remove the colloportus spells found\n if (inside.size() > 0)\n {\n for (O2StationarySpell spell : inside)\n {\n spell.kill();\n spell.flair(10);\n }\n\n kill();\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 }",
"public void apply() {\r\n\tif (currentEffect != null)\r\n\t currentEffect.removeFrom(kingdom);\r\n\r\n\tif (isVacant())\r\n\t currentEffect = penalty;\r\n\telse\r\n\t currentEffect = bonus;\r\n\r\n\tcurrentEffect.applyTo(kingdom);\r\n }",
"public void endBattle() {\n for (BattleEffect btlEff : effectsToRemove) {\n btlEff.remove();\n }\n playerInCombat.resetHealthAndMana();\n }",
"public void effect() {\n }",
"void removeHas_action(Action oldHas_action);",
"public void onCancel() {\n\t\tif ( !getEnabled() || !isOpened() ) return;\n\t\tif ( mCurrentEffect == null ) throw new IllegalStateException( \"there is no current effect active in the context\" );\n\t\tif ( !mCurrentEffect.onCancel() ) {\n\t\t\tcancel();\n\t\t}\n\t}",
"public ArrayList<BattleEffect> getEffectsToRemove() {\n return effectsToRemove;\n }",
"public void removeSkills()\r\n\t{\r\n\t\tremove(skillOne);\r\n\t\tremove(skillTwo);\r\n\t\tremove(skillThree);\r\n\t\tremove(skillFour);\r\n\t\tremove(skillFive);\r\n\t\t\r\n\t\trevalidate();\r\n\t\trepaint();\r\n\t}",
"public void unloadEffect(String path){\n\t\tInteger soundId = this.mPathSoundIDMap.remove(path);\n\t\t\n\t\tif (soundId != null){\n\t\t\t// unload effect\n\t\t\tthis.mSoundPool.unload(soundId.intValue());\n\t\t\t\n\t\t\t// remove record from mSoundIdStreamIdMap\n\t\t\tthis.mSoundIdStreamIdMap.remove(soundId);\n\t\t}\n\t}",
"public void onImpact() {\n die();\r\n this.getArrow().remove();\r\n }",
"protected void applyEffects()\n\t{\n\t\tfor(int i = 0; i < effects.length; i++)\n\t\t{\n\t\t\tif(effects[i] != null)\n\t\t\t{\n\t\t\t\teffects[i].applyEffect();\n\t\t\t}\n\t\t}\n\t}",
"void applyEffects();",
"Effect getEffect();",
"public boolean applyPotion( Potion potion){\n if(potion.isHasTarget() )return false;\n if(!character.hasPotion(potion))return false;\n effectHandler.playPotion( potion ,null);\n character.getPotions().remove(potion);\n return true;\n }",
"public void removeSkills()\r\n\t{\n\t\tgetPlayer().removeSkill(SkillTable.getInstance().getInfo(5491, 1), false);\r\n\t\t// Cancel Gatekeeper Transformation\r\n\t\tgetPlayer().removeSkill(SkillTable.getInstance().getInfo(8248, 1), false);\r\n\t\tgetPlayer().removeSkill(SkillTable.getInstance().getInfo(5656, 1), false);//Update by rocknow\r\n\t\tgetPlayer().removeSkill(SkillTable.getInstance().getInfo(5657, 1), false);//Update by rocknow\r\n\t\tgetPlayer().removeSkill(SkillTable.getInstance().getInfo(5658, 1), false);//Update by rocknow\r\n\t\tgetPlayer().removeSkill(SkillTable.getInstance().getInfo(5659, 1), false, false);//Update by rocknow\r\n\r\n\t\tgetPlayer().setTransformAllowedSkills(EMPTY_ARRAY);\r\n\t}",
"public void refreshEffects() {\n Iterator<Map.Entry<Position, AreaEffect>> iterator = activeEffects.entrySet().iterator();\n\n while (iterator.hasNext()) {\n Map.Entry<Position, AreaEffect> entry = iterator.next();\n if (entry.getValue().getRemainingDuration() == 0) {\n iterator.remove();\n } else {\n entry.getValue().decrementRemainingDuration();\n }\n }\n }",
"private static void playEffect(Clip effect) {\n\n\t\tif (GameFrame.settingsPanel.effectsOn() && effect != null) {\n\t\t\teffect.start();\n\t\t\teffect.setFramePosition(0);\n\t\t}\n\n\t}",
"@Override\n public boolean isUsableEffectOne() {\n return getEffectsEnable()[0] && getUsableEffect()[0] && ((TargetSquareRequestEvent) getTargetEffectOne()).getPossibleTargetsX().length != 0;\n }",
"void removeDependsOnMe(DependencyItem dependency);",
"void doNegativeEffect(Skill castSkill, double power, Creature performer, Item target) {\n/* 200 */ performer.getCommunicator().sendNormalServerMessage(\"The \" + target\n/* 201 */ .getName() + \" emits a deep worrying sound of resonance, but stays intact.\", (byte)3);\n/* */ }",
"public String getEffect() {\n\t\treturn effect;\n\t}",
"private DrawDestinyToAttritionOnlyEffect(Action action, String playerId) {\n super(action);\n _playerId = playerId;\n }",
"public void effectDelete(int id)\n\t{\n\t\tEntityEffect[] effectNew = new EntityEffect[10];\n\t\t\n\t\t// Loop through the effects and place them in the temporary array\n\t\tint eStart = id + 1;\n\t\tfor(int e=eStart;e<=effectCount;e+=1)\n\t\t{\n\t\t\tint n = e;\n\t\t\tif(e>id){n = e - 1;}\n\t\t\teffectNew[e] = effect[n];\n\t\t}\n\t\t\n\t\t// Overwrite the effect array with the new data \n\t\teffect = effectNew;\n\t\teffectCount -= 1;\n\t}",
"public boolean canUseWeaponEffect(FullEffect effect){\n List<Color> priceTmp;\n if(effect.getPrice() != null){\n priceTmp = new ArrayList<>(effect.getPrice());\n return controlPayment(priceTmp);\n }\n return true;\n }",
"@Override\n public void action() {\n while (turn.getPlayer().getFightDecision() == null){\n ;\n }\n FightDecision decision = turn.getPlayer().getFightDecision();\n if (decision== FightDecision.IGNORE){\n turn.getPlayer().setFightDecision(null);\n turn.setPhase(new MovePhase(y));\n }else{\n turn.getPlayer().setFightDecision(null);\n turn.setPhase(new FightPhase());\n }\n }",
"@Override\n public void unInvoke() {\n final Environmental item = affected;\n if (item == null)\n return;\n final Room room = CMLib.map().roomLocation(item);\n if ((canBeUninvoked()) && (room != null))\n room.showHappens(CMMsg.MSG_OK_VISUAL, item, L(\"<S-YOUPOSS> flaming sword is consumed!\"));\n super.unInvoke();\n if ((canBeUninvoked()) && (room != null)) {\n room.recoverRoomStats();\n item.destroy();\n }\n }",
"public void removeTechnique(Integer typeOfTechnique){\n\t\tpriorj.removeTechnique(typeOfTechnique);\n\t}",
"public void resumeAllEffects(){\n\t\tpauseOrResumeAllEffects(false);\n\t}",
"public void reSurrect(){\n\t\tcanvas = Canvas.getInstance();\n\t\tfor(int i = 0; i < myEffects.size(); i++){\n\t\t\tmyEffects.get(i).reSurrect();\n\t\t}\n\t}",
"void removeIsPerformOf(Role oldIsPerformOf);",
"private void off(){\n\n\t\t// if light is on and there is a flash object\n\t\tif (_flash != null && isFlashOn){\n\n\t\t\t_flash.off();\n\t\t\tisFlashOn = false;\n\t\t}\n\t}",
"@Override\n\tpublic void undo() {\n\t\tlight.off();\n\t}",
"private void deleteSelectedTransition()\n {\n Transition oppositeTransition = optionsPanel.getWorkspacePanel().findTransitionBetween(transition.getToState(), transition.getFromState());\n if (oppositeTransition != null)\n {\n oppositeTransition.setTangent(false);\n }\n optionsPanel.getWorkspacePanel().repaint();\n optionsPanel.getWorkspacePanel().getNFA().removeTransition(transition);\n optionsPanel.getWorkspacePanel().setTool(LMWorkspacePanel.SELECT_TOOL);\n optionsPanel.changeOptions(\"blank\");\n }",
"public void endTurn()\n\t{\n\t\tthis.decrementEffectDurations();\n\t\tdoneWithTurn = true;\n\t}",
"public void test_useCase_addEffect() throws UiObjectNotFoundException\n {\n executeTestCase(appPackageName, appLaunchIconText, \"addEffect\", 9, false);\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 }",
"public void pauseAllEffects(){\n\t\tpauseOrResumeAllEffects(true);\n\t}",
"public void delete(Effect p_Effect, Structure p_Structure) {\n if (p_Structure.getEffects().contains(p_Effect)) {\n p_Structure.removeEffect(p_Effect);\n }\n this.m_EquivalenceClassManager.deleteEffectOfEquivalenceClasses(p_Effect, p_Structure);\n this.m_CombinationManager.deleteEffectOfCombinations(p_Effect, p_Structure);\n }",
"public void hideFightSetup() {\r\n\t\tremove(content);\r\n\t\tcontent.revalidate();\r\n\t\tcontent.repaint();\r\n\t\trevalidate();\r\n\t\trepaint();\r\n\t}",
"public void undo() {\n\t\tlight.on();\n\t}",
"@Override\n\tpublic void effectAdded(Effect effect) {\n\t}",
"public void unsetShowAnimation()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_attribute(SHOWANIMATION$20);\n }\n }",
"@Override\n public Event performAction(RemoteView remoteView) {\n\n return remoteView.weaponDiscardChoice(getWeapons());\n }",
"public void resetPlugin(){\n\t\tpriorj.getTechniques().clear();\n\t}",
"void unsetTarget();",
"void addEffect(Effect effect, boolean temp) {\n/* 1782 */ if (this.isTransition && this.surfaced) {\n/* */ \n/* 1784 */ getCaveTile().addEffect(effect, temp);\n/* */ \n/* */ return;\n/* */ } \n/* 1788 */ if (!temp) {\n/* */ \n/* 1790 */ if (this.effects == null)\n/* 1791 */ this.effects = new HashSet<>(); \n/* 1792 */ this.effects.add(effect);\n/* */ } \n/* */ \n/* 1795 */ if (this.watchers != null)\n/* */ {\n/* 1797 */ for (Iterator<VirtualZone> it = this.watchers.iterator(); it.hasNext();) {\n/* 1798 */ ((VirtualZone)it.next()).addEffect(effect, temp);\n/* */ }\n/* */ }\n/* 1801 */ effect.setSurfaced(this.surfaced);\n/* */ \n/* */ try {\n/* 1804 */ effect.save();\n/* */ }\n/* 1806 */ catch (IOException iox) {\n/* */ \n/* 1808 */ logger.log(Level.INFO, iox.getMessage(), iox);\n/* */ } \n/* */ }",
"@Override\r\n\tpublic void removeExperience(int id) {\n\t\t\r\n\t}",
"public Set<Effect> maskEffects(final Set<Effect> effects) {\r\n if (effects.isEmpty()) {\r\n return Collections.emptySet();\r\n } else {\r\n final ImmutableSet.Builder<Effect> newEffects = ImmutableSet.builder();\r\n for (final Effect e : effects) {\r\n final Effect masked = e.mask(binder);\r\n if (masked != null) newEffects.add(masked);\r\n }\r\n return newEffects.build();\r\n }\r\n }",
"public void executeEffect() {\n\t\texecuteEffect(myCard);\n\t}",
"void unsetPurpose();",
"private void courseEffects() {\n\t\t\n\t}",
"public V1Toleration withEffect(String effect) {\n this.effect = effect;\n return this;\n }",
"public StatusEffect getEffect() {\n return effect;\n }",
"@Override // com.android.server.wm.WindowContainer\n public void removeIfPossible() {\n if (isAnimating()) {\n this.mDeferredRemoval = true;\n } else {\n removeImmediately();\n }\n }",
"public boolean hasEffect(ItemStack is){\n\t\treturn true;\n\t}",
"public static void removeFromPracticedWords(Word word) {\n favWords.remove(word);\n // Set the word favourite status to false in dictionary after removing the word in practice list\n if (Dictionary.getDictionary().contains(word)) {\n Dictionary.getWord(word).setFavorited(false);\n }\n }",
"@Override\n\tpublic void removeTrigger() {\n\t\tplayer.removeListener(this.listener, EventNameType.SOUL_FIGHT);\n\t}",
"public void specialEffect() {\n if (getDefense() > 0) {\n setDefense(0);\n setCurrentHealth(currentHealth + 50);\n }\n\n }",
"@Override\n public void exit() {\n player.steeringBehaviorsManager.removeBehavior(ballPursuit);\n }",
"public AbstractEffect stop() {\n\t\tTask task = effectData.getTask();\n\t\tif (task == null)\n\t\t\treturn this;\n\t\ttry {\n\t\t\ttask.cancel();\n\t\t\ttask = null;\n\t\t} catch (IllegalStateException exc) {\n\t\t}\n\t\treturn this;\n\t}",
"public synchronized void addEffect(SpellEffect effect) {\n effects.add(effect);\n }",
"public void remModify(){\n rem(MetaDMSAG.__modify);\n }",
"void removeRecipeFilter(RecipeFilter recipeFilter);",
"private void applyEffect(Event.Effect effect) {\n\t\tint change = (int) effect.getValue();\n\t\t\n\t\tswitch(effect.getType()) {\t\t\n\t\tcase INCREASE_MONEY:\n\t\t\tplayer.setMoney(player.getMoney() + change);\n\t\t\tbreak;\n\t\tcase DECREASE_MONEY:\n\t\t\tplayer.setMoney(player.getMoney() - change);\n\t\t\tbreak;\n\t\tcase INCREASE_AGENTS:\n\t\t\tplayer.setAgentNumber(player.getAgentNumber() + change);\n\t\t\tbreak;\n\t\tcase DECREASE_AGENTS:\n\t\t\tplayer.setAgentNumber(player.getAgentNumber() - change);\n\t\t\tbreak;\n\t\tcase INCREASE_AGENT_SKILL:\n\t\t\tplayer.setAgentSkill(player.getAgentSkill() + change);\n\t\t\tbreak;\n\t\tcase DECREASE_AGENT_SKILL:\n\t\t\tplayer.setAgentSkill(player.getAgentSkill() - change);\t\t\t\n\t\t\tbreak;\n\t\tcase INCREASE_MEDIA_REACH:\n\t\t\tplayer.setMediaReach(player.getMediaReach() + change);\n\t\t\tbreak;\n\t\tcase DECREASE_MEDIA_REACH:\n\t\t\tplayer.setMediaReach(player.getMediaReach() - change);\t\t\t\n\t\t\tbreak;\n\t\tcase INCREASE_MEDIA_INFLUENCE:\n\t\t\tplayer.setMediaPerception(player.getMediaPerception() + change);\n\t\t\tbreak;\n\t\tcase DECREASE_MEDIA_INFLUENCE:\n\t\t\tplayer.setMediaPerception(player.getMediaPerception() - change);\t\t\t\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t// TODO handle error\n\t\t}\n\t\t\n\t}",
"@Override\r\n\tpublic void onSpellHit(Spell spell) {\n\t\tif (spell.getName().contains(\"Antlitz der Göttin\")){\r\n\t\t\tcaster.setFlying(false);\r\n\t\t\tcaster.setAllowFlight(false);\r\n\t\t}\r\n\t}",
"public RMEffect getEffect() { return _effect; }",
"@Override\r\n\tpublic void undo() {\n\t\tlight.on();\r\n\t}",
"public String effect() {\n return this.effect;\n }",
"public T caseReactionEffect(ReactionEffect object) {\r\n\t\treturn null;\r\n\t}",
"public void renderOccluder(boolean renderWithLight);",
"public void cancel() {\n cancelSoftwareAnimations();\n }",
"private void addAdditionalEffects()\n {\n // make them fly so they do not fall from suspension\n FLYING flying = new FLYING(p, duration + 10, targetID);\n Ollivanders2API.getPlayers().playerEffects.addEffect(flying);\n additionalEffects.add(O2EffectType.FLYING);\n\n // add an immbolize effect with a duration slightly longer than this one so that they cannot move while suspended\n IMMOBILIZE immbobilize = new IMMOBILIZE(p, duration + 10, targetID);\n Ollivanders2API.getPlayers().playerEffects.addEffect(immbobilize);\n additionalEffects.add(O2EffectType.IMMOBILIZE);\n }",
"public void undo() {\n compositionManager.ungroup(group);\n }",
"public Builder clearAdditionalImpact() {\n if (additionalImpactBuilder_ == null) {\n additionalImpact_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000020);\n onChanged();\n } else {\n additionalImpactBuilder_.clear();\n }\n return this;\n }",
"public Element disabledFireEffect()\n\t{\n\t\tthis.canAppliedFire = false;\n\t\treturn this;\n\t}",
"public void registerEffect(IEnvironmentalEffect effect);",
"public void stopThemeSound() {\n\t\tAudioPlayer audio = AudioPlayer.getInstance();\n\t\taudio.stopSound(MUSIC_FOLDER, THEME);\n\n\t}",
"protected void unconfigureAbilityModifiers(Ability ability) {\n int count = ability.getLimitationCount();\n for (int i = 0; i < count; i++) {\n //if ( ability.getIndexedBooleanValue(i, \"Limitation\", \"FRAMEWORKLIMITATION\") ) {\n Limitation lim = ability.getLimitation(i);\n if (lim.isAddedByFramework()) {\n ability.removeLimitation(i);\n count--;\n }\n }\n }",
"public void undo() {\n target.setCombatState( oldState );\n }"
] | [
"0.6662432",
"0.6215105",
"0.6105289",
"0.606989",
"0.5954381",
"0.58810776",
"0.574994",
"0.57047117",
"0.56585664",
"0.5649567",
"0.56328195",
"0.5579687",
"0.55543494",
"0.54944354",
"0.54441595",
"0.53457075",
"0.5335625",
"0.5320414",
"0.5304216",
"0.52878946",
"0.5230074",
"0.5191687",
"0.51863784",
"0.51845735",
"0.51562357",
"0.51475763",
"0.5142472",
"0.51148796",
"0.5104971",
"0.5084027",
"0.50820094",
"0.50514984",
"0.50087947",
"0.49903533",
"0.49660274",
"0.49516308",
"0.49445143",
"0.49269685",
"0.49071327",
"0.49060252",
"0.4895363",
"0.4858579",
"0.48523736",
"0.48521507",
"0.48506615",
"0.4847598",
"0.48465043",
"0.4835351",
"0.48346114",
"0.48084462",
"0.4804474",
"0.4799875",
"0.47974318",
"0.47915533",
"0.47891098",
"0.4781395",
"0.47809732",
"0.4778969",
"0.47308573",
"0.47220615",
"0.47215918",
"0.47158813",
"0.47030497",
"0.4701329",
"0.47001305",
"0.469904",
"0.46940628",
"0.4684842",
"0.46693653",
"0.46586788",
"0.46515146",
"0.46484184",
"0.4647012",
"0.46469143",
"0.4638755",
"0.46351486",
"0.46338707",
"0.46282336",
"0.46200418",
"0.46147433",
"0.46130657",
"0.46117148",
"0.46046028",
"0.46002293",
"0.45996445",
"0.45985818",
"0.45980167",
"0.45963353",
"0.45953795",
"0.45890808",
"0.4583953",
"0.45817572",
"0.4578753",
"0.4570363",
"0.45679137",
"0.45642725",
"0.4562967",
"0.4562211",
"0.4560045",
"0.4555653"
] | 0.686243 | 0 |
Adds the given spell to the Wizard's known spell list if they do not already know it. | public void addSpell(Spell spell) {
if (!knownSpells.contains(spell)) {
knownSpells.add(spell);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void addSpell(Thing t) {\r\n \t\tString name=t.getString(\"Name\");\r\n \t\tspellNames.add(name);\r\n \t\t\r\n \t\tGame.assertTrue(t.getFlag(\"IsSpell\"));\r\n \r\n \t\tint level=t.getStat(\"Level\");\r\n \t\tGame.assertTrue(level>0);\r\n \t\tt.set(\"LevelMin\",level);\r\n \r\n \t\tint skillMin=(t.getStat(\"SpellCost\"))*3;\r\n \t\tt.set(\"SkillMin\",skillMin);\r\n \t\t\r\n \t\tt.set(\"Image\",t.getStat(\"BoltImage\"));\r\n \t\tt.set(\"ImageSource\",\"Effects\");\r\n \t\t\r\n \t\t//int power=(int)(6*Math.pow(spellPowerMultiplier,level));\r\n \t\t//Game.assertTrue(power>0);\r\n \t\t//t.set(\"Power\",power);\r\n \t\tLib.add(t);\r\n \t}",
"private static void addItemSpell(Thing t) {\r\n \t\taddSpell(t);\r\n \t}",
"private void addSpell(Bundle bundle) {\n Toast.makeText(getContext(), \"Not yet implemented\", Toast.LENGTH_SHORT).show();\n }",
"@Override\r\n\tpublic void onSpellHit(Spell spell) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void onSpellHit(Spell spell) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void onSpellHit(Spell spell) {\n\t\t\r\n\t}",
"private void useSpell(Room currentRoom, Player player, String spell) throws IllegalArgumentException\n\t{\n\t\t//Check if the spell is an offensive spell\n\t\tif (player.getFaction().getLandSpells().contains(Spell.valueOf(spell)))\n\t\t{\n\t\t\tSpell s = Spell.valueOf(spell);\n\t\t\tplayer.useLandSpell(s, currentRoom);\n\t\t}\n\t\t//Check if the spell is a land spell\n\t\telse if (player.getFaction().getOffensiveSpells().contains(Spell.valueOf(spell)))\n\t\t{\n\t\t\tSpell s = Spell.valueOf(spell);\n\t\t\tif (currentRoom instanceof MonsterRoom)\n\t\t\t{\n\t\t\t\tEntityLiving e = ((MonsterRoom) currentRoom).getMonster();\n\t\t\t\tplayer.useOffensiveSpell(s, e);\n\t\t\t\tif (!e.isDead())\n\t\t\t\t\te.attack(player);\n\t\t\t}\n\t\t\telse if (currentRoom instanceof BossRoom)\n\t\t\t{\n\t\t\t\tEntityLiving e = ((BossRoom) currentRoom).getBoss();\n\t\t\t\tplayer.useOffensiveSpell(s, e);\n\t\t\t\tif (!e.isDead())\n\t\t\t\t\te.attack(player);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t}",
"public void spell(Player player, Spell spell)\n {\n \n if(isUsingSpell(player))\n {\n cancelSpell(player);\n }\n \n spells.put(player, spell);\n player.addPotionEffect(new PotionEffect(PotionEffectType.SLOW, CustomItemsAPI.secondsToTicks(2), 2));\n player.getWorld().playSound(player.getLocation(), Sound.ENTITY_ZOMBIE_VILLAGER_CONVERTED, 0.4f, 0.4f);\n }",
"public abstract boolean isValid(Spell spell);",
"public void buy(Spell spell) {\n\n\t\t// Calculate total cost of transaction first to see if possible\n\t\tint totalCost = spell.getCost();\n\n\t\t// Remove correct sum of money from user's Inventory\n\t\tplayer.getInventory().removeMoney(totalCost);\n\t\tplayerMon -= totalCost;\n\n\t\t// Remove correct number of items from Merchant's Inventory\n\t\tsb.remove(spell);\n\n\t\tplayer.getBook().add(spell);\n\t}",
"public void setSelectedSpell(Spell spell) {\n selectedSpell = spell;\n }",
"private void initialiseWordsToSpell(){\n\t\t//normal quiz\n\t\tif(quiz_type==PanelID.Quiz){\n\t\t\twords_to_spell = parent_frame.getPreQuizHandler().getWordsForSpellingQuiz(parent_frame.getDataHandler().getNumWordsInQuiz(), PanelID.Quiz);\n\t\t} else { //review quiz\n\t\t\twords_to_spell = parent_frame.getPreQuizHandler().getWordsForSpellingQuiz(parent_frame.getDataHandler().getNumWordsInQuiz(), PanelID.Review);\n\t\t}\t\n\t}",
"@Override\r\n public void actionPerformed(ActionEvent arg0) {\r\n UserDictionaryProvider provider = SpellChecker.getUserDictionaryProvider();\r\n if (provider != null) {\r\n provider.addWord(word);\r\n }\r\n Dictionary dictionary = SpellChecker.getCurrentDictionary();\r\n dictionary.add(word);\r\n dictionary.trimToSize();\r\n AutoSpellChecker.refresh(jText);\r\n }",
"@Override\r\n\tpublic void onSpellHit(Spell spell) {\n\t\tif (spell.getName().contains(\"Antlitz der Göttin\")){\r\n\t\t\tcaster.setFlying(false);\r\n\t\t\tcaster.setAllowFlight(false);\r\n\t\t}\r\n\t}",
"public String spellcheck(String word) {\n // Check if the world is already in lcDictionary.\n String lcdictionaryLookup = lcDictionary.get(word.toLowerCase());\n if(lcdictionaryLookup != null) {\n return lcdictionaryLookup;\n }\n String reducedWord = reducedWord(word);\n String rwdictionaryLookup = rwDictionary.get(reducedWord);\n if(rwdictionaryLookup != null) {\n return rwdictionaryLookup;\n }\n return \"NO SUGGESTION\";\n }",
"public void add(LLNodeHash word){\n if (!checkWord(word)){\n put(word);\n }\n }",
"public static void registerSpell(Spell par1Spell, int par2effectId)\n\t{\n\t\tif (spellList[par2effectId] != null) \n\t\t\tthrow new IllegalArgumentException(\"Duplicate spell id!\");\n else \n \tspellList[par2effectId] = par1Spell;\n\t}",
"public abstract void teleport(TeleportSpell spell);",
"private static void addDefensiveSpell(Thing t) {\r\n \t\tt.set(\"IsDefensiveSpell\",1);\r\n \t\taddSpell(t);\r\n \t}",
"public synchronized void addEffect(SpellEffect effect) {\n effects.add(effect);\n }",
"public void addWord (String word) {\r\n word = word.toUpperCase ();\r\n if (word.length () > 1) {\r\n String s = validateWord (word);\r\n if (!s.equals (\"\")) {\r\n JOptionPane.showMessageDialog (null, \"The word you have entered contained invalid characters\\nInvalid characters are: \" + s, \"Error\",\r\n JOptionPane.ERROR_MESSAGE);\r\n return;\r\n }\r\n checkEasterEgg (word);\r\n words.add (word);\r\n Components.wordList.getContents ().addElement (word);\r\n } else {\r\n JOptionPane.showMessageDialog (null, \"The word you have entered does not meet the minimum requirement length of 2\", \"Error\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n }",
"public boolean addWord(String word) {\n return false;\n }",
"public void add(String word) {\n\t\twordList.add(word);\n\t\t// TODO Add your code here\n\t}",
"public Spell getSpell(String spellType, Name spellName, Money price, Level level, Damage damage, Mana mana);",
"public static Spell get(String spellName) {\n\t\treturn switch(spellName) {\n\t\tcase \"teleport self\" -> TeleportSelf.getInstance();\t\n\t\tcase \"dig\" -> Dig.getInstance();\n\t\tcase \"Summon lesser creature\" -> SummonLesserCreature.getInstance();\n\t\tdefault -> null; \n\t\t};\n\t}",
"private static void addOffensiveSpell(Thing t) {\r\n \t\tif (t.getString(\"HitName\")==null) {\r\n \t\t\tt.set(\"HitName\",t.name()+\" spell\");\r\n \t\t}\r\n \t\tt.set(\"IsOffensiveSpell\",1);\r\n \t\taddSpell(t);\r\n \t}",
"public boolean add(String word) {\r\n\t\treturn dict.add(word);\r\n\t}",
"private void updateSpellList() {\n //To change body of generated methods, choose Tools | Templates.\n DefaultListModel model = new DefaultListModel();\n \n for(int i = 0 ; i < spells.size(); i++){\n try{\n model.addElement(spells.get(i).getSpellName());\n }catch(Exception e){\n \n }\n }\n spellManagerList.setModel(model);\n \n \n }",
"private void castSpellByAI() {\n\t\tboolean spellIsNotActivated = true;\n\t\tboolean[] spellsFlags = new boolean[3];\n\t\tChampion AI = currentTask.getCurrentChamp();\n\t\tArrayList<Spell> spells = ((Wizard)AI).getSpells();\n\t\twhile(spellIsNotActivated){\n\t\t\t\n\t\t\tint randomAction = (int) (Math.random()*2);\n\t\t\tSpell spell = null;\n\t\t\t\n\t\t\tswitch(randomAction){\n\t\t\tcase 0: if(spellsFlags[0]==false) {spell = spells.get(0); spellsFlags[0]=true; break;}\n\t\t\tcase 1:\tif(spellsFlags[1]==false) {spell = spells.get(1); spellsFlags[1]=true; break;}\n\t\t\tdefault: if(spellsFlags[2]==false) {spell = spells.get(2); spellsFlags[2] =true;}\n\t\t\t}\n\t\t\t\n\t\t\tif(spell instanceof HealingSpell){\n\t\t\t\tcastHealingSpell(spell);\n\t\t\t}else if(spell instanceof DamagingSpell){\n\t\t\t\tDirection direction;\n\t\t\t\tint randomDirection = (int) (Math.random()*3);\n\t\t\t\tswitch(randomDirection){\n\t\t\t\tcase 0: direction = Direction.BACKWARD;\n\t\t\t\tcase 1: direction = Direction.FORWARD;\n\t\t\t\tcase 2: direction = Direction.LEFT;\n\t\t\t\tdefault: direction = Direction.RIGHT;\n\t\t\t\t}\n\t\t\t\tspellInAction = spell;\n\t\t\t\tdirectionsInAction = new ArrayList<Direction>();\n\t\t\t\tdirectionsInAction.add(direction);\n\t\t\t\tcastDamagingSpell();\n\t\t\t}else if(spell instanceof RelocatingSpell){\n\t\t\t\tDirection direction1;\n\t\t\t\tint randomDirection1 = (int) (Math.random()*3);\n\t\t\t\tswitch(randomDirection1){\n\t\t\t\tcase 0: direction1 = Direction.BACKWARD;\n\t\t\t\tcase 1: direction1 = Direction.FORWARD;\n\t\t\t\tcase 2: direction1 = Direction.LEFT;\n\t\t\t\tdefault: direction1 = Direction.RIGHT;\n\t\t\t\t}\n\t\t\t\tDirection direction2;\n\t\t\t\tint randomDirection2 = (int) (Math.random()*3);\n\t\t\t\tswitch(randomDirection2){\n\t\t\t\tcase 0: direction2 = Direction.BACKWARD;\n\t\t\t\tcase 1: direction2 = Direction.FORWARD;\n\t\t\t\tcase 2: direction2 = Direction.LEFT;\n\t\t\t\tdefault: direction2 = Direction.RIGHT;\n\t\t\t\t}\n\t\t\t\tspellInAction = spell;\n\t\t\t\tdirectionsInAction = new ArrayList<Direction>();\n\t\t\t\tdirectionsInAction.add(direction1);\n\t\t\t\tdirectionsInAction.add(direction2);\n\t\t\t\t\n\t\t\t\tint randomRange = (int) (Math.random()*((RelocatingSpell)spell).getRange()) + 1;\n\t\t\t\tcastRelocatingSpell(randomRange);\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tspellIsNotActivated = false;\n\t\t\t}\n\t\t\tif(AI != currentTask.getCurrentChamp()){\n\t\t\t\tspellIsNotActivated = false;\n\t\t\t}\n\t\t}\n\n\t\t\n\t\t\n\t}",
"private void correctSpelling() {\n\t\tparent_frame.getFestival().speak(\"Correct\", false);\n\n\t\t//adds to respective arraylist based on which attempt they get it right\n\t\tif (current_attempt_number==1){\n\t\t\twords_mastered.add(words_to_spell.get(current_word_number));\n\t\t} else {//words is faulted\n\t\t\twords_faulted.add(words_to_spell.get(current_word_number));\n\t\t}\n\n\t\tcurrent_word_number+=1;\n\t\tcurrent_attempt_number=1;\n\t\tprogress_bar.setForeground(Color.GREEN);\n\t\tprogress_bar.setString(\"word \"+current_word_number +\" was CORRECT\");\n\t\tfeedback_display.setText(\"\");//clear display\n\t}",
"public static void addIntoPracticedWords(Word word) {\n word.setFavorited(true);\n favWords.add(word);\n // Set the word favourite status to true in dictionary after adding the word to practice list\n if (Dictionary.getDictionary().contains(word)) {\n Dictionary.getWord(word).setFavorited(true);\n }\n }",
"public void addWord(Word word);",
"void addWordToCandidatesSet(String word) {\n candidates.add(word);\n }",
"public SpellList spells();",
"@Override\n public void addSpellToList(Spell power) {\n progressBar.setVisibility(View.GONE);\n recyclerView.setVisibility(View.VISIBLE);\n\n Log.d(TAG, \"addSpellToList: Got a spell to be added to adapter: \" + power.getName());\n\n String powerGroupName = power.getGroupName();\n Log.d(TAG, \"addSpellToList: power group name \" + powerGroupName);\n //see if spellgroups already has the group this spell belongs to\n if(!spellGroups.contains(new SpellGroup(powerGroupName, power))) {\n //add the power group, pass the power for SpellGroups in constructor\n spellGroups.add(new SpellGroup(powerGroupName, power));\n //notify adapter that new parent was added so it is added to list\n adapter.notifyParentItemInserted( spellGroups.size()-1 );\n }\n //otherwise just add the spell to the existing spell group\n else {\n //get index of the group with a \"dummy group\", a needless object allocation here tbh\n int parentIndex = spellGroups.indexOf(new SpellGroup(powerGroupName, power));\n\n //power might already be in the list, check for that\n if(!spellGroups.get(parentIndex).containsSpell(power)) {\n //add the spell to the SpellGroup's list of powers\n int spellIndex = spellGroups.get(parentIndex).addSpell(power);\n //notify adapter that new child was added so it can animate it in\n Log.d(TAG, \"addSpellToList: parent index \" + parentIndex);\n Log.d(TAG, \"addSpellToList: parent list size: \" + spellGroups.get(parentIndex).getListSize());\n adapter.notifyChildItemInserted(\n parentIndex,\n spellIndex\n //spellGroups.get(parentIndex).getListSize() - 1\n );\n }\n }\n }",
"public void addUnknown(String word, String tag) {\n\t\tthis.unknownWordTable.put(word, tag);\n\t}",
"public void populateWord(String word) {\n\t\tthis.add(word);\n\t}",
"public boolean addThemeWord(String word){\r\n\t\treturn themeWords.add(word);\r\n\t}",
"public void add_word(String word, String definition){\n\t\tif(word.length() > 1){\n\t\t\tfor(LexiNode child: childs){\n\t\t\t\tif(word.toLowerCase().charAt(0) == Character.toLowerCase(child.getRepresentative_letter())){\n\t\t\t\t\tchild.add_word(word, definition, word);\n\t\t\t\t\t//if we found a matching child, we don't wanna create another one\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\tLexiNode child = new LexiNode();\n\t\t\tchilds.add(child);\n\t\t\tchild.add_word(word, definition, word);\n\t\t}\n\t}",
"public Spell() {\r\n spells = new ArrayList<>();\r\n // Add all 3 spells whenever defualt constructor is called\r\n spells.add(\"Jump the player to another grid location\");\r\n spells.add(\"Randomly reveal the location of one of the Tokimons\");\r\n spells.add(\"Randomly kill off one of the Fokimons\");\r\n spellsCounter = 3;\r\n }",
"public void addWord(String word) {\n trie.insert(word);\n }",
"public void spell(SpellRequest parsedRequest, GameServer gServer) {\n gameServer = gServer;\n Log.i(TAG, \"Handle spell \" + parsedRequest.toString());\n Hero hero = GameUtil.getHeroById(parsedRequest.getHeroId(), gameServer.getHeroes());\n switch (parsedRequest.getSpell_id()) {\n case 8:\n Log.i(TAG, \"Warrior used taunt!\");\n warriorTaunt((Warrior) hero, parsedRequest);\n break;\n case 7:\n Log.i(TAG, \"Warrior used cleave!\");\n warriorCleave((Warrior) hero, parsedRequest);\n break;\n case 1:\n Log.i(TAG, \"Warrior used Charge!\");\n warriorCharge((Warrior) hero, parsedRequest);\n break;\n case 2:\n Log.i(TAG, \"Priest used Heal!\");\n priestHeal((Priest) hero, parsedRequest);\n break;\n case 3:\n Log.i(TAG, \"Priest used Smite!\");\n priestSmite((Priest) hero, parsedRequest);\n break;\n case 6:\n Log.i(TAG, \"Priest used Shield!\");\n priestShield((Priest) hero, parsedRequest);\n break;\n case 5:\n Log.i(TAG, \"Priest used Heal over time!\");\n priesHealOverTime((Priest) hero, parsedRequest);\n break;\n case 26:\n Log.i(TAG, \"Warlock used drain life!\");\n warlockDrain((Warlock) hero, parsedRequest);\n break;\n case 27:\n Log.i(TAG, \"Warlock used haemorrhage!\");\n warlockHaemorrhage((Warlock) hero, parsedRequest);\n break;\n case 28:\n Log.i(TAG, \"Warlock used restore!\");\n warlockRestore((Warlock) hero, parsedRequest);\n break;\n case 29:\n Log.i(TAG, \"Warlock used restore!\");\n warlockBloodBolt((Warlock) hero, parsedRequest);\n break;\n default:\n Log.i(TAG, \"Did not find spell with id: \" + parsedRequest.getSpell_id());\n break;\n }\n gServer.sendGameStatus();\n }",
"@ZAttr(id=1073)\n public void addPrefSpellIgnoreWord(String zimbraPrefSpellIgnoreWord) throws com.zimbra.common.service.ServiceException {\n HashMap<String,Object> attrs = new HashMap<String,Object>();\n StringUtil.addToMultiMap(attrs, \"+\" + Provisioning.A_zimbraPrefSpellIgnoreWord, zimbraPrefSpellIgnoreWord);\n getProvisioning().modifyAttrs(this, attrs);\n }",
"public void addWord(String word) {\n dataStructure.put(word, \"\");\n }",
"@Override\n\t\t\tpublic Spell pickSpell(Spell[] spells, EntityWisp wisp) {\n\t\t\t\treturn getSpellToUse();\n\t\t\t}",
"public static Spell createSpellFromJsonString(String spellJsonString, String name) throws JSONException {\n JSONArray jsonArray = null;\n try {\n jsonArray = new JSONArray(spellJsonString);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n for (int i = 0; i < jsonArray.length(); i++) {\n try {\n JSONObject jsonObj = jsonArray.getJSONObject(i);\n if (jsonObj.getString(\"spell\").equals(name)) {\n setSpell(jsonObj);\n break;\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n return spell;\n }",
"public void setUserDictionary(SpellDictionary dictionary) {\n\t\tif (spellCheck != null) {\n\t\t\tspellCheck.setUserDictionary(dictionary);\n\t\t}\n\t}",
"public int addList(String word) {\n\n\t\tif (slist.traverse(word) == 1) {\n\t\t\tslist.add(word);\n\t\t\tcount++;\n\n\t\t} else {\n\t\t\tslist.deleteElement(word);\n\t\t\tcount--;\n\n\t\t}\n\n\t\treturn count;\n\n\t}",
"public void addWord(String word) {\n\t\taddWord(word, root);\n\t}",
"private void addAllEventListeners(final String wordString, boolean isThereAReason) {\n // if the word is wrong, then it doesn't have a definition\n if(!isThereAReason) {\n requestDefinitionButton.attachActionListenerToButton(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n try {\n RemoteObjectContextProvider\n .game\n .askForWordDefinition(\n GameContextProvider.getGameClientReference(),\n wordString\n );\n } catch(RemoteException exc) {\n exc.printStackTrace();\n }\n }\n });\n }\n backButton.attachActionListenerToButton(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n FrameHandler.disposeSecondaryGridContainer();\n }\n });\n }",
"public void addWord(String word) {\n TrieNode cur = root;\n for (int i=0; i<word.length(); i++) {\n int pos = word.charAt(i) - 'a';\n if (cur.next[pos] == null) {\n cur.next[pos] = new TrieNode();\n }\n cur = cur.next[pos];\n }\n cur.isWord = true;\n }",
"public boolean addEntryFromMenu(String newWord)\n {\n if (this.hasWord(newWord))\n {\n return false;\n }\n else\n {\n //a new blank entry\n Entry newEntry = new Entry();\n //adds my new word tothe entry\n newEntry.setWord(newWord);\n //insert the new entry to the list\n this.addEntryInOrder(newEntry);\n return true;\n }\n //System.out.println(\"You broke logic\");\n //#unreachable\n }",
"public void addWord(String word) {\n if (word == null || word.equals(\"\")) return;\n char[] str = word.toCharArray();\n WordDictionary cur = this;\n for (char c: str) {\n if (cur.letters[c - 'a'] == null) cur.letters[c - 'a'] = new WordDictionary();\n cur = cur.letters[c - 'a'];\n }\n cur.end = true;\n }",
"public void addTerm(Term term) throws PreExistingTermException {\n ArrayList<String> temp = new ArrayList<>();\n\n for (Term t: listOfTerms) {\n String termName = t.getTermName();\n temp.add(termName);\n }\n\n String newTermName = term.getTermName();\n\n if (!temp.contains(newTermName)) {\n this.listOfTerms.add(term);\n } else {\n throw new PreExistingTermException();\n }\n }",
"public SpellChecker getSpellChecker(Locale locale) {\r\n SpellChecker spellChecker = null;\r\n if (resolvedLocales.get(locale) == null) {\r\n Collection<SpellDictionary> dictionaries = getHierarchyDictionaries(locale);\r\n this.logger.getLogger().info(\r\n \"Building SpellChecker for locale <\" + locale + \"> : found \" + dictionaries.size() + \" dictionaries\");\r\n if (dictionaries.size() > 0) {\r\n spellChecker = new SpellChecker();\r\n for (SpellDictionary dictionary : dictionaries) {\r\n spellChecker.addDictionary(dictionary);\r\n }\r\n spellCheckers.put(locale, spellChecker);\r\n }\r\n resolvedLocales.put(locale, true);\r\n\r\n } else {\r\n spellChecker = spellCheckers.get(locale);\r\n }\r\n return spellChecker;\r\n }",
"private boolean checkSpelling(String word) {\n\n boolean exists = false;\n if (word == null || word.trim().length() == 0) {\n exists = true;\n } else if (isFiltered(word)) {\n exists = true;\n } else {\n\n if (word.contains(\"-\")) {\n if (!isInWordList(word)) {\n boolean pe = true;\n for (String part : word.split(\"-\"))\n {\n pe = pe && checkSpelling(part.trim());\n }\n exists = pe;\n } else {\n exists = true;\n }\n } else {\n exists = isInWordList(word);\n }\n }\n return exists;\n }",
"public void add(String word) {\n Signature sig = new Signature(word);\n add(sig, word);\n }",
"public void display(Spell spell) {\n\n\n //we actualize the selected metamagic\n currentSpell = spell;\n\n name.setText(spell.getName());\n level.setText(Integer.toString(spell.getLevel()));\n description.setText(spell.getDescription());\n school.setText(spell.getSchool().toString());\n descriptors.setText(spell.getDescriptorList().toString());\n range.setText(spell.getRange());\n area.setText(spell.getArea());\n duration.setText(spell.getDuration());\n castingTime.setText(spell.getCastingTime());\n link.setText(spell.getLink());\n\n }",
"void addQuest(Question quest){\r\n\t\t//if the test bank does not contain this topic, create a new one and add question\r\n\t\tif(!bank.containsKey(quest.getTopic())){\r\n\t\t\tquest.setID(0);\r\n\t\t\tbank.put(quest.getTopic(), new ArrayList<Question>());\r\n\t\t\tbank.get(quest.getTopic()).add(quest);\r\n\t\t}else{\r\n\t\t\tquest.setID(bank.get(quest.getTopic()).size());\r\n\t\t\tbank.get(quest.getTopic()).add(quest);\r\n\t\t}\r\n\t}",
"private void addSubSpellsToSubtree(Node root)\n {\n for(int spellInd = 0; spellInd < SpellLibrary.spellList.length; spellInd++)\n {\n if (root.name.length() >= SpellLibrary.spellList[spellInd].length())\n {\n if(root.name.substring(root.name.length() - SpellLibrary.spellList[spellInd].length()).equals(SpellLibrary.spellList[spellInd]))\n {\n root.spellsCast.add(spellInd);\n }\n }\n }\n //Go down the tree and recurse\n Gestures gest;\n Node nodeToCheck;\n for(int gestInd = 0; gestInd < Gestures.GESTURES_INDEXED.length-1; gestInd++) {\n gest = Gestures.GESTURES_INDEXED[gestInd];\n nodeToCheck = root.getChild(gest);\n if(nodeToCheck != null)\n {\n addSubSpellsToSubtree(nodeToCheck);\n }\n }\n\n }",
"public void insert(String word) {\n if (word == null) {\n return;\n }\n if (value == null) {\n value = new ArrayList<>();\n }\n value.add(word);\n }",
"public void addWord(String word) {\n TrieNode cur = root;\n for(char c : word.toCharArray()) {\n if(cur.next[c-'a'] == null) {\n cur.next[c-'a'] = new TrieNode(c);\n }\n cur = cur.next[c-'a'];\n }\n cur.isWord = true;\n }",
"public void addWord(String word) {\n root = put(root, word, 0);\n }",
"public void addWord(String word) {\n root.addWord(word);\n }",
"public void dictionaryAdd(String engWord, String vietWord) {\n String[] explain = vietWord.split(\"\\n\");\n\n if (dictionary.getWordList().get(engWord) != null) {\n dictionary.getWordList().get(engWord).addAll(Arrays.asList(explain));\n } else {\n ArrayList<String> arrayList = new ArrayList<>(Arrays.asList(explain));\n dictionary.getWordList().put(engWord, arrayList);\n }\n }",
"public void setSpellQuery(String query) {\n\t\tspellQuery.setText(query);\n\t}",
"public void addWord(String word) {\n maxLength = Math.max(maxLength, word.length());\n\n TrieNode temp = root;\n for (int i = 0; i < word.length(); i++) {\n char c = word.charAt(i);\n if (temp.children[c - 'a'] == null) {\n temp.children[c - 'a'] = new TrieNode(c);\n }\n temp = temp.children[c - 'a'];\n }\n temp.isWord = true;\n }",
"public void addWord(String word) {\n if (word !=null && word.length() > 0) {\n TrieNode t = this.root;\n for (int i = 0; i < word.length(); i++) {\n int offset = word.charAt(i) - 'a';\n if (t.children[offset] == null) {\n t.children[offset] = new TrieNode();\n }\n t = t.children[offset];\n if (i == word.length() - 1) {\n t.endWithWord = true;\n }\n }\n }\n }",
"public void addWord(String word) {\n TrieNode curr = root;\n for (int i = 0; i < word.length(); i++) {\n char c = word.charAt(i);\n if (curr.children[c - 'a'] == null )\n curr.children[c - 'a'] = new TrieNode();\n curr = curr.children[c - 'a'];\n }\n curr.end = true;\n }",
"public static void addKeyWord(String word)\r\n\t{\r\n\t\tkeywords.add(word);\r\n\t}",
"public void addWord(String word) {\n // Write your code here\n TrieNode now = root;\n for(int i = 0; i < word.length(); i++) {\n Character c = word.charAt(i);\n if (now.children[c - 'a'] == null) {\n now.children[c - 'a'] = new TrieNode();\n }\n now = now.children[c - 'a'];\n }\n now.hasWord = true;\n }",
"public void addTWord(TWord tword){\n\t\tsentence.add(tword);\n\t}",
"public void addWord(String word) {\n \tTrieNode curr=root;\n for(int i=0;i<word.length();i++){\n \tchar ch=word.charAt(i);\n \tif(curr.children[ch-'a']==null)\n \t\tcurr.children[ch-'a']=new TrieNode();\n \tif(i==word.length()-1)\n \t\tcurr.children[ch-'a'].isCompleteword=true;\n \t\n \tcurr=curr.children[ch-'a'];\n }\n }",
"public void insert( Word x )\n {\n WordList whichList = theLists[ myhash( x.key ) ];\n //System.out.println(\"WordList found\");\n \n\t whichList.add( x );\n\t //System.out.println(\"Word \" + x.value + \" successfully added\");\n }",
"public void addWord(String word) {\n //Corner Case\n if(word == null || word.length() == 0){\n return;\n }\n TrieNode node = root;\n int d = 0;\n \n while(d<word.length()){\n char c = word.charAt(d);\n if(node.next[c-'a']==null){\n node.next[c-'a'] = new TrieNode();\n }\n node = node.next[c-'a'];\n d++;\n }\n \n node.isWord = true;\n }",
"private void setupSpellHereField(){\n\t\tinput_from_user = new JTextField();\n\t\tinput_from_user.setFont(new Font(\"Calibri Light\", Font.PLAIN, 45));\n\t\tinput_from_user.setEditable(true);\n\t\tinput_from_user.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t//only enable submitting if festival has finished to avoid delayed voice prompts\n\t\t\t\tif(parent_frame.getFestival().isLocked()){\n\t\t\t\t\tfeedback_display.append(\"\\tPlease submit after voice prompt has finished.\\n\");\n\t\t\t\t} else {\n\t\t\t\t\tprocessAttempt(input_from_user.getText());\n\t\t\t\t\tinput_from_user.requestFocusInWindow(); //gets focus back on the field\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tadd(input_from_user);\n\t\tinput_from_user.setBounds(374, 484, 942, 74);\n\t}",
"public void addWord(String word) {\n TrieNode curr = root;\n for (char c : word.toCharArray()) {\n curr = curr.chars.computeIfAbsent(c, (k) -> new TrieNode());\n\n }\n curr.isWord = true;\n }",
"public Spell() {}",
"SpellEx(Map<String, Integer> words) {\n\t\tdict = new HashMap<String, Integer>(words);\n\t}",
"public void addWord(String word) {\n TrieNode cur = root;\n for(int i = 0; i < word.length(); i++) {\n char c = word.charAt(i);\n TrieNode node = cur.children.get(c);\n if(node == null) {\n node = new TrieNode();\n cur.children.put(c, node);\n }\n cur = node;\n }\n cur.isEnd = true;\n }",
"void setWordGuessed( String word )\n\t{\n\t\tfor( int i = 0; i < entry.getLinkedWords().size(); i++ )\n\t\t\tif( entry.getLinkedWords().elementAt(i).equals(word) )\n\t\t\t{\n\t\t\t\twordGuessed[i] = true;\n\t\t\t\twPanel.showWord(i);\n\t\t\t}\n\t}",
"public void addWord(String word) {\r\n Trie node = root;\r\n for(char ch: word.toCharArray()){\r\n if(node.child[ch - 'a'] == null)\r\n node.child[ch - 'a'] = new Trie(ch);\r\n node = node.child[ch - 'a'];\r\n }\r\n node.end = true;\r\n }",
"private void createSpells() {\n spells.add(new Heal(owner, assets));\n spells.add(new Renew(owner, assets));\n spells.add(new FlashHeal(owner, assets));\n spells.add(new Dispel(owner, assets));\n spells.add(new HolyNova(owner, assets));\n spells.add(new PrayerOfMending(owner, assets));\n spells.add(new Barrier(owner, assets));\n spells.add(new GreaterHeal(owner, assets));\n spells.add(new Smite(owner, assets));\n spells.add(new Penance(owner, assets));\n spells.add(new HolyShock(owner, assets));\n spells.add(new Lightwell(owner, assets));\n spells.add(new DivineHymn(owner, assets));\n spells.add(new DivineProtection(owner, assets));\n spells.add(new BlessedGarden(owner, assets));\n\n // add spell to group\n for(int i = 0; i < spells.size(); i++) {\n addActor(spells.get(i));\n }\n }",
"public void approveAll() {\r\n\t\tif (readDocument != null) {\r\n\t\t\tif (incorrectWords.size() > 0) {\r\n\t\t\t\tScanner sc = new Scanner(System.in);\r\n\t\t\t\tObject[] incorrectWordsArray = incorrectWords.toArray();\r\n\t\t\t\tSystem.out.println(\"Would you like to add the following misspelled words to the dictionary?\");\r\n\t\t\t\tfor (int i = 0; i < incorrectWordsArray.length; i++) {\r\n\t\t\t\t\tSystem.out.println(incorrectWordsArray[i]);\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.print(\"(Y/N): \");\r\n\t\t\t\tString response = sc.next();\r\n\t\t\t\tif (response.equalsIgnoreCase(\"Y\")) {\r\n\t\t\t\t\tfor (int i = 0; i < incorrectWordsArray.length; i++) {\r\n\t\t\t\t\t\tdictionary.add((String)incorrectWordsArray[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tincorrectWords.clear();\r\n\t\t\t\t\tSystem.out.println(\"Your changes were made to the dictionary.\");\r\n\t\t\t\t\tmodified = true;\r\n\t\t\t\t} \r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.println(\"There were no misspelled words.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"You have not read in a document to be spell checked. Please indicate file name\"\r\n\t\t\t\t\t+ \" before using this feature.\");\r\n\t\t}\r\n\t}",
"public void add(String word) {\n if (hashTable.contains(word)) {\n hashTable.put(word, hashTable.get(word) + 1);\n }\n else {\n hashTable.put(word,1);\n }\n }",
"private void laadSpellen() {\r\n this.spellen = this.dc.geefOpgeslagenSpellen();\r\n int index = 0;\r\n String res = String.format(\"%25s %20s\", r.getString(\"spelNaam\"), r.getString(\"moeilijkheidsGraad\"));\r\n for (String[] rij : spellen) {\r\n index++;\r\n res += String.format(\"%n%d) %20s\", index, rij[0]);\r\n switch (rij[1]) {\r\n case \"1\":\r\n res += String.format(\"%20s\", r.getString(\"makkelijk\"));\r\n break;\r\n case \"2\":\r\n res += String.format(\"%20s\", r.getString(\"gemiddeld\"));\r\n break;\r\n case \"3\":\r\n res += String.format(\"%20s\", r.getString(\"moeilijk\"));\r\n break;\r\n }\r\n \r\n }\r\n System.out.printf(res);\r\n }",
"public void addWord(String word) {\n // Write your code here\n TrieNode now = root;\n for(int i = 0; i < word.length(); i++) {\n Character c = word.charAt(i);\n if (!now.children.containsKey(c)) {\n now.children.put(c, new TrieNode());\n }\n now = now.children.get(c);\n }\n now.hasWord = true;\n }",
"public void addDog(Dog dog){\n if(this.numOfDogs() < SHELTER_SIZE){\n String dogName = dog.getName();\n if (noDogsOfName(dogName)) {\n dogs.add(dog);\n }\n else{\n System.out.println(\"There is already a dog named \" + dogName + \". Please choose another name.\");\n }\n }\n else{\n System.out.println(\"Cannot add \" + dog.getName() + \" to the shelter because it is full!\");\n }\n }",
"public boolean addWord(String word) {\n // TODO: Implement this method.\n char[] c = word.toLowerCase().toCharArray();\n\n TrieNode predptr = root;\n boolean isWord = false;\n\n for (int i = 0, n = c.length; i < n; i++) {\n TrieNode next = predptr.insert(c[i]);\n\n if (next != null) {\n predptr = next;\n } else {\n predptr = predptr.getChild(c[i]);\n }\n\n if (i == n - 1) {\n if (!predptr.endsWord()) {\n size++;\n isWord = true;\n predptr.setEndsWord(true);\n }\n }\n\n }\n return isWord;\n }",
"public final ItemScroll getSpell(int id) {\n\t\treturn spellmap.get(Integer.valueOf(id - Config.scrollStartIndex()));\n\t}",
"public boolean put(String word){\n\n\t\tif (word != null){\n\t\t\tint hash = getHash(word);\n\t\t\tif (hash != INVALID){\n\t\t\t\tm_arraylists[hash].put(word);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"public void insert(String word) {\n Trie cur = this;\n int i = 0;\n while(i < word.length()) {\n int c = word.charAt(i) - 'a';\n if(cur.tries[c] == null) {\n cur.tries[c] = new Trie();\n }\n cur = cur.tries[c];\n i++;\n }\n cur.hasWord = true;\n }",
"public void addWord(Word englishWord, Word frenchWord) {\n\t\tdictFr.add(frenchWord);\n\t\tdictEn.add(englishWord);\n\t\twordsAdded(englishWord, frenchWord);\n\t}",
"public void updateSpellList(SpellList sList){\n\t\tspellList=sList;\n\t\trequestInputFocus();\n\t}",
"public void putWord(String word) {\n if(index < words.length) {\n words[index] = word;\n }\n index++;\n }",
"public void listIncorrectWords() {\r\n\t\tif (readDocument != null) {\r\n\t\t\t// Add all of the words from the read document that are not in the dictionary to the \r\n\t\t\t// incorrectWords collection.\r\n\t\t\tincorrectWords = readDocumentNoDuplicates.difference(dictionary);\r\n\t\t\t\r\n\t\t\tif (incorrectWords.size() > 0) {\r\n\t\t\t\t// List incorrect words from the read document.\r\n\t\t\t\tSystem.out.println(\"Incorrectly spelled words:\");\r\n\t\t\t\tObject[] incorrectWordsArray = incorrectWords.toArray();\r\n\t\t\t\tfor (int i = 0; i < incorrectWordsArray.length; i++) {\r\n\t\t\t\t\tSystem.out.println(incorrectWordsArray[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.println(\"There were no misspelled words.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"You have not read in a document to be spell checked. Please indicate file name\"\r\n\t\t\t\t\t+ \" before using this feature.\");\r\n\t\t}\r\n\t}",
"public void listCorrectWords() {\r\n\t\tif (readDocumentNoDuplicates != null) {\r\n\t\t\t// Add all of the words from the read document that are also in the dictionary to the\r\n\t\t\t// correctWords collection.\r\n\t\t\tcorrectWords = readDocumentNoDuplicates.intersection(dictionary);\r\n\t\r\n\t\t\tif (correctWords.size() > 0) {\r\n\t\t\t\t// List correct words from the read document.\r\n\t\t\t\tSystem.out.println(\"Correctly spelled words:\");\r\n\t\t\t\tObject[] correctWordsArray = correctWords.toArray();\r\n\t\t\t\tfor (int i = 0; i < correctWordsArray.length; i++) {\r\n\t\t\t\t\tSystem.out.println(correctWordsArray[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.println(\"There were no correctly spelled words.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"You have not read in a document to be spell checked. Please indicate file name\"\r\n\t\t\t\t\t+ \" before using this feature.\");\r\n\t\t}\r\n\t}",
"public void add(T word);",
"void add(String str) {\n assertEquals(!words.contains(str), trie.add(str));\n words.add(str);\n dictionary.add(str);\n assertEquals(words.size(), trie.size());\n checkConsistency();\n }",
"public void addIncorrect(String incorrect) {\n\t\tthis.incorrects.add(incorrect);\n\t}"
] | [
"0.6669823",
"0.64733803",
"0.63510793",
"0.6130934",
"0.6130934",
"0.6130934",
"0.61228895",
"0.60937446",
"0.60461384",
"0.60358655",
"0.59031516",
"0.5881135",
"0.5868368",
"0.58316755",
"0.5757805",
"0.57283163",
"0.5641872",
"0.5632415",
"0.5624393",
"0.5614305",
"0.5605738",
"0.5602611",
"0.554778",
"0.54536265",
"0.54456425",
"0.542529",
"0.53954196",
"0.5389279",
"0.53712",
"0.53679556",
"0.53647953",
"0.53536433",
"0.5344231",
"0.53439206",
"0.53262764",
"0.5313341",
"0.5305781",
"0.52964115",
"0.5198189",
"0.5197989",
"0.5188943",
"0.51810527",
"0.5174395",
"0.5155837",
"0.5129828",
"0.5105921",
"0.50910026",
"0.5055948",
"0.50469196",
"0.5026064",
"0.5007462",
"0.49880975",
"0.49809256",
"0.49797213",
"0.4979147",
"0.497531",
"0.49726334",
"0.49658063",
"0.49640784",
"0.49412584",
"0.4938444",
"0.4936002",
"0.49231568",
"0.49152285",
"0.49077624",
"0.49071115",
"0.4894045",
"0.48831177",
"0.48782134",
"0.4861735",
"0.48614907",
"0.48595214",
"0.4858787",
"0.48580673",
"0.48487312",
"0.484361",
"0.4839742",
"0.48359433",
"0.48270744",
"0.4827036",
"0.48269796",
"0.4815286",
"0.48097667",
"0.48095685",
"0.48074096",
"0.48045754",
"0.48034698",
"0.47908834",
"0.47871178",
"0.47865915",
"0.4763209",
"0.47631308",
"0.47394583",
"0.4735597",
"0.473286",
"0.4727763",
"0.47252384",
"0.47118577",
"0.47108302",
"0.47006628"
] | 0.8223574 | 0 |
Sets the selected spell for this wizard. The selected spell will be casted when the player interacts with their wand. | public void setSelectedSpell(Spell spell) {
selectedSpell = spell;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\t\t\tpublic Spell pickSpell(Spell[] spells, EntityWisp wisp) {\n\t\t\t\treturn getSpellToUse();\n\t\t\t}",
"@Override\r\n\tpublic void onSpellHit(Spell spell) {\n\t\tif (spell.getName().contains(\"Antlitz der Göttin\")){\r\n\t\t\tcaster.setFlying(false);\r\n\t\t\tcaster.setAllowFlight(false);\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic void onSpellHit(Spell spell) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void onSpellHit(Spell spell) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void onSpellHit(Spell spell) {\n\t\t\r\n\t}",
"public void setChosenWord(String word) {\n this.chosenWordDisplay.setText(word);\n }",
"public void spell(Player player, Spell spell)\n {\n \n if(isUsingSpell(player))\n {\n cancelSpell(player);\n }\n \n spells.put(player, spell);\n player.addPotionEffect(new PotionEffect(PotionEffectType.SLOW, CustomItemsAPI.secondsToTicks(2), 2));\n player.getWorld().playSound(player.getLocation(), Sound.ENTITY_ZOMBIE_VILLAGER_CONVERTED, 0.4f, 0.4f);\n }",
"public void setCurrentSword(Sword currentSword) {\n this.currentSword = currentSword;\n\t}",
"public void setSpellQuery(String query) {\n\t\tspellQuery.setText(query);\n\t}",
"private void initialiseWordsToSpell(){\n\t\t//normal quiz\n\t\tif(quiz_type==PanelID.Quiz){\n\t\t\twords_to_spell = parent_frame.getPreQuizHandler().getWordsForSpellingQuiz(parent_frame.getDataHandler().getNumWordsInQuiz(), PanelID.Quiz);\n\t\t} else { //review quiz\n\t\t\twords_to_spell = parent_frame.getPreQuizHandler().getWordsForSpellingQuiz(parent_frame.getDataHandler().getNumWordsInQuiz(), PanelID.Review);\n\t\t}\t\n\t}",
"public void display(Spell spell) {\n\n\n //we actualize the selected metamagic\n currentSpell = spell;\n\n name.setText(spell.getName());\n level.setText(Integer.toString(spell.getLevel()));\n description.setText(spell.getDescription());\n school.setText(spell.getSchool().toString());\n descriptors.setText(spell.getDescriptorList().toString());\n range.setText(spell.getRange());\n area.setText(spell.getArea());\n duration.setText(spell.getDuration());\n castingTime.setText(spell.getCastingTime());\n link.setText(spell.getLink());\n\n }",
"public void setSelectedLesson(Lesson l) {\n\t\tselectedLesson = l;\n\t\tinitAllPhrases();\n\t\tresetButtons();\n\t}",
"public void setSelection( String strSelection )\n {\n List<String> suggestionNames = getPopupSuggestions();\n for( int currentIndex = 0; currentIndex < suggestionNames.size(); currentIndex++ )\n {\n if( suggestionNames.get( currentIndex ).equals( strSelection ) )\n {\n //select the matching suggestion's index\n _list.setSelectedIndex( currentIndex );\n break;\n }\n }\n }",
"@Override\r\n\tpublic DTextArea setHtmlSpellCheck(final String spellCheck) {\r\n\t\tsuper.setHtmlSpellCheck(spellCheck);\r\n\t\treturn this ;\r\n\t}",
"public void setSkill(int skill){\n\t\tskillSelection = skill;\n\t}",
"private void setSelectedWord() {\n for (TableRow row: rows) {\n Drawable background = row.getBackground();\n if (background instanceof ColorDrawable) {\n int backColor = ((ColorDrawable) background).getColor();\n if (backColor == rowSelectColor) {\n final TextView descriptionView = (TextView) row.findViewById(R.id.wordDescription);\n final TextView glossView1 = (TextView) row.findViewById(R.id.wordGloss1);\n if (descriptionView != null) selectedWords = descriptionView.getText().toString();\n if (glossView1 != null) selectedSynset = glossView1.getText().toString();\n }\n }\n }\n }",
"public abstract void teleport(TeleportSpell spell);",
"public default void doEffectStart(SpellData data, World world, Side onSide){ }",
"public void setSword(Sword sword) {\n \tif(this.sword == null) {\n \t\tthis.sword = sword;\n \t\tthis.UIsword().set(true);\n \t\tdungeon.swordLeft().set(\"Sword Hits Left: 5\\n\");\n \t}\n\t}",
"public void setSoundFX(boolean checked) {\n\n SharedPreferences.Editor editor = mSharedPreferences.edit();\n editor.putBoolean(mContext.getString(R.string.sound_fx_checked), checked);\n editor.commit();\n }",
"private void useSpell(Room currentRoom, Player player, String spell) throws IllegalArgumentException\n\t{\n\t\t//Check if the spell is an offensive spell\n\t\tif (player.getFaction().getLandSpells().contains(Spell.valueOf(spell)))\n\t\t{\n\t\t\tSpell s = Spell.valueOf(spell);\n\t\t\tplayer.useLandSpell(s, currentRoom);\n\t\t}\n\t\t//Check if the spell is a land spell\n\t\telse if (player.getFaction().getOffensiveSpells().contains(Spell.valueOf(spell)))\n\t\t{\n\t\t\tSpell s = Spell.valueOf(spell);\n\t\t\tif (currentRoom instanceof MonsterRoom)\n\t\t\t{\n\t\t\t\tEntityLiving e = ((MonsterRoom) currentRoom).getMonster();\n\t\t\t\tplayer.useOffensiveSpell(s, e);\n\t\t\t\tif (!e.isDead())\n\t\t\t\t\te.attack(player);\n\t\t\t}\n\t\t\telse if (currentRoom instanceof BossRoom)\n\t\t\t{\n\t\t\t\tEntityLiving e = ((BossRoom) currentRoom).getBoss();\n\t\t\t\tplayer.useOffensiveSpell(s, e);\n\t\t\t\tif (!e.isDead())\n\t\t\t\t\te.attack(player);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t}",
"public void setSelection (boolean selected) {\r\n\tcheckWidget();\r\n\tif ((style & (SWT.CHECK | SWT.RADIO | SWT.TOGGLE)) == 0) return;\r\n\tOS.PtSetResource (handle, OS.Pt_ARG_FLAGS, selected ? OS.Pt_SET : 0, OS.Pt_SET);\r\n}",
"public void setCurrent_word(String current_word){\n\t\tthis.current_word = current_word;\n\t}",
"public void setUserDictionary(SpellDictionary dictionary) {\n\t\tif (spellCheck != null) {\n\t\t\tspellCheck.setUserDictionary(dictionary);\n\t\t}\n\t}",
"private static void addSpell(Thing t) {\r\n \t\tString name=t.getString(\"Name\");\r\n \t\tspellNames.add(name);\r\n \t\t\r\n \t\tGame.assertTrue(t.getFlag(\"IsSpell\"));\r\n \r\n \t\tint level=t.getStat(\"Level\");\r\n \t\tGame.assertTrue(level>0);\r\n \t\tt.set(\"LevelMin\",level);\r\n \r\n \t\tint skillMin=(t.getStat(\"SpellCost\"))*3;\r\n \t\tt.set(\"SkillMin\",skillMin);\r\n \t\t\r\n \t\tt.set(\"Image\",t.getStat(\"BoltImage\"));\r\n \t\tt.set(\"ImageSource\",\"Effects\");\r\n \t\t\r\n \t\t//int power=(int)(6*Math.pow(spellPowerMultiplier,level));\r\n \t\t//Game.assertTrue(power>0);\r\n \t\t//t.set(\"Power\",power);\r\n \t\tLib.add(t);\r\n \t}",
"public void setWord(String word){\n this.word = word; //Only used in testing.\n }",
"public void setEquippedWeapon(String w)\n\t{\n\t\tstrEquippedWeapon = w;\n\t\t\n\t}",
"void setWord(Word word);",
"@Override\r\n\tpublic DTextArea setHtmlSpellCheck(final boolean spellCheck) {\r\n\t\tsuper.setHtmlSpellCheck(spellCheck) ;\r\n\t\treturn this ;\r\n\t}",
"public void setSpellCheckerManager(SpellCheckerManager spellCheckerManager) {\n this.spellCheckerManager = spellCheckerManager;\n }",
"public void updateSpellList(SpellList sList){\n\t\tspellList=sList;\n\t\trequestInputFocus();\n\t}",
"@SuppressLint(\"NewApi\")\n\t@Override\n\tpublic void setSelected(boolean selected) {\n\t\tsuper.setSelected(selected);\n\t\tif (selected) {\n\t\t\tsetBackground(getResources().getDrawable(resCheck));\n\t\t} else {\n\t\t\tsetBackground(getResources().getDrawable(resDefult));\n\n\t\t}\n\t}",
"public void setSelectedLesson(Lesson l) {\n\t\tselectedLesson = l;\n\t\tinitAllHistory();\n\t}",
"public void setSelection(T t) {\n\t\tspinner.setSelection(adapter.getPosition(t));\n\t}",
"public void setQuest(Quest quest) {\n\t\tthis.quest = quest;\n\t}",
"public Spell getSpell(String spellType, Name spellName, Money price, Level level, Damage damage, Mana mana);",
"private void addSpell(Bundle bundle) {\n Toast.makeText(getContext(), \"Not yet implemented\", Toast.LENGTH_SHORT).show();\n }",
"public void setMusic(boolean checked) {\n\n SharedPreferences.Editor editor = mSharedPreferences.edit();\n editor.putBoolean(mContext.getString(R.string.music_checked), checked);\n editor.commit();\n }",
"@ReactMethod\n public void setAudioDevice(final String device) {\n runInAudioThread(new Runnable() {\n @Override\n public void run() {\n if (!availableDevices.contains(device)) {\n JitsiMeetLogger.w(TAG + \" Audio device not available: \" + device);\n userSelectedDevice = null;\n return;\n }\n\n if (mode != -1) {\n JitsiMeetLogger.i(TAG + \" User selected device set to: \" + device);\n userSelectedDevice = device;\n updateAudioRoute(mode, false);\n }\n }\n });\n }",
"public void buy(Spell spell) {\n\n\t\t// Calculate total cost of transaction first to see if possible\n\t\tint totalCost = spell.getCost();\n\n\t\t// Remove correct sum of money from user's Inventory\n\t\tplayer.getInventory().removeMoney(totalCost);\n\t\tplayerMon -= totalCost;\n\n\t\t// Remove correct number of items from Merchant's Inventory\n\t\tsb.remove(spell);\n\n\t\tplayer.getBook().add(spell);\n\t}",
"public void setHandThrowDamage(short handThrowDamage);",
"public void setCurrentWeapon(Pair<Byte,Short> weapon){\n currentWeapon = weapon;\n }",
"public void useSword() {\n \n \tif(this.getSword() != null) {\n \t\tdungeon.swordLeft().set(\"Sword Hits Left:\" + \" \" + (this.sword.getSwings()-1) + \"\\n\");\n \t\tthis.getSword().useSword(this);\n \t}\n }",
"public void setMlStemplete(String mlStemplete) {\n this.mlStemplete = mlStemplete;\n }",
"private void startQuiz(){\t\n\t\tparent_frame.getFestival().speak(\"Please spell... \"+words_to_spell.get(current_word_number),false);\n\n\t\tfeedback_display.append(\"Word: \"+(current_word_number+1)+\" out of \"+words_to_spell.size()+\"\\nAttempt: \"+current_attempt_number+\" out of 2\\n\");\n\t\tprogress_bar.setValue(current_word_number);\n\t}",
"private void changeVoice(String voice) throws IOException{\r\n\t\tFile failed = new File(\".festivalrc\");\r\n\t\t//If file does not exist, create new file\r\n\t\tif(!failed.exists()) {\r\n\t\t\tfailed.createNewFile();\r\n\t\t} \r\n\r\n\t\t//Appending the word to the file\r\n\t\tWriter output;\r\n\t\toutput = new BufferedWriter(new FileWriter(failed,false)); \r\n\t\toutput.append(\"(set! voice_default '\"+voice +\")\");\r\n\t\toutput.close();\r\n\t}",
"public void addSpell(Spell spell) {\n if (!knownSpells.contains(spell)) {\n knownSpells.add(spell);\n }\n }",
"public void setChoice(Choice choice) {\n this.choice = choice;\n }",
"private void setupChangeVoice() {\n\t\tFestivalVoice[] voices={FestivalVoice.Kiwi, FestivalVoice.British, FestivalVoice.American};\n\t\tfinal JComboBox voice_chooser = new JComboBox(voices);\n\t\tvoice_chooser.setFont(new Font(\"Arial\", Font.PLAIN, 20));\n\t\tvoice_chooser.setForeground(Color.BLACK);\n\t\tvoice_chooser.setBackground(Color.WHITE);\n\n\t\t//set shown item to be the current voice\n\t\tvoice_chooser.setSelectedItem(parent_frame.getFestival().getFestivalVoice());\n\t\tvoice_chooser.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tinput_from_user.requestFocusInWindow();//gets focus back to the spell here field\n\t\t\t\tif((FestivalVoice)voice_chooser.getSelectedItem()!=null){\n\t\t\t\t\tparent_frame.getFestival().setFestivalVoice((FestivalVoice)voice_chooser.getSelectedItem());\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tvoice_chooser.setBounds(919, 600, 154, 40);\n\t\tadd(voice_chooser);\n\t}",
"public void setShoot(String text) {\n shoot.setText(text);\n }",
"public void spellLevelUp() {\n \n }",
"public void setAnswer(MCQChoice answer)\n\t{\n\t\tmcqAnswer = answer;\n\t}",
"private static void addItemSpell(Thing t) {\r\n \t\taddSpell(t);\r\n \t}",
"public void setVoice (Voice voice)\r\n {\r\n // Already done?\r\n if (this.voice == null) {\r\n final String contextString = getContextString();\r\n logger.debug(\"{} Ch#{} setVoice {}\",\r\n contextString, id, voice.getId());\r\n\r\n this.voice = voice;\r\n\r\n // Update the voice entity\r\n if (!isWholeDuration()) {\r\n if (slot != null) {\r\n voice.setSlotInfo(\r\n slot,\r\n new VoiceChord(this, Voice.Status.BEGIN));\r\n }\r\n\r\n // Extend this info to other grouped chords if any\r\n BeamGroup group = getBeamGroup();\r\n\r\n if (group != null) {\r\n logger.debug(\r\n \"{} Ch#{} extending voice#{} to group#{}\",\r\n contextString, id, voice.getId(), group.getId());\r\n\r\n group.setVoice(voice);\r\n }\r\n\r\n // Extend to the following tied chords as well\r\n List<Chord> tied = getFollowingTiedChords();\r\n\r\n for (Chord chord : tied) {\r\n logger.debug(\"{} tied to {}\", this, chord);\r\n\r\n // Check the tied chords belong to the same measure\r\n if (this.getMeasure() == chord.getMeasure()) {\r\n logger.debug(\r\n \"{} Ch#{} extending voice#{} to tied chord#{}\",\r\n contextString, id, voice.getId(), chord.getId());\r\n\r\n chord.setVoice(voice);\r\n } else {\r\n // Chords tied across measure boundary\r\n logger.debug(\"{} Cross tie {} -> {}\",\r\n contextString,\r\n toShortString(), chord.toShortString());\r\n }\r\n }\r\n }\r\n } else if (this.voice != voice) {\r\n addError(\r\n \"Chord. Attempt to reassign voice from \" + this.voice.\r\n getId()\r\n + \" to \" + voice.getId() + \" in \" + this);\r\n } else {\r\n if (!isWholeDuration()) {\r\n if (slot != null) {\r\n voice.setSlotInfo(\r\n slot,\r\n new VoiceChord(this, Voice.Status.BEGIN));\r\n }\r\n }\r\n }\r\n }",
"public void setSelected(boolean selected) {\n\t\t// Set the Selection on the CoolBar\n\t _coolBar.setSelected(selected);\n\t}",
"public void setCurrentPlayerWord(String currentActivePlayer, String word) {\n\t\t\n\t\tif(currentActivePlayer.equals(\"Player 01: \")) {\n\t\t\t\n\t\t\tplayer01.setCurrentWord(word);\n\t\t}else {\n\t\t\t\n\t\t\tplayer02.setCurrentWord(word);\n\t\t}\n\t\t\n\t}",
"public void setWordSearched(String wordSearched){\r\n this.wordSearched = wordSearched;\r\n setWordSearchedLower(wordSearched);\r\n }",
"@Override\n\tpublic WeaponSelection shoot(List<Weapon> loaded) {\n\t\tJSONObject message = new JSONObject();\n\t\tmessage.put(\"function\", \"select\");\n\t\tmessage.put(\"type\", \"shoot\");\n\t\treturn getWeaponSelection(loaded, message);\n\t}",
"public int getSpellVamp() {\n\t\t\n\t\treturn spellVamp;\n\t}",
"public SpellViewHolder(final View itemView, final List<Integer> selectedList, final AppCompatActivity parent) {\n\n super(itemView, selectedList, parent);\n\n //the field for the view\n name = itemView.findViewById(R.id.spellName);\n description = itemView.findViewById(R.id.spellDescription);\n level = itemView.findViewById(R.id.spellLevel);\n school = itemView.findViewById(R.id.schoolText);\n descriptors = itemView.findViewById(R.id.descriptorsText);\n range = itemView.findViewById(R.id.rangeText);\n area = itemView.findViewById(R.id.areaText);\n duration = itemView.findViewById(R.id.durationText);\n castingTime = itemView.findViewById(R.id.castingText);\n link = itemView.findViewById(R.id.spellLink);\n\n\n\n\n\n\n\n\n //when the user click on the item we mark the item as selected and add him in the selected item list\n itemView.setOnClickListener(new View.OnClickListener() {\n\n @Override\n public void onClick(View view) {\n\n //let's update the selectedList\n if(view.isSelected()){\n view.setSelected(false);\n selectedList.remove((Integer) getAdapterPosition());\n }\n else{\n view.setSelected(true);\n selectedList.add((Integer) getAdapterPosition());\n }\n\n //when a meta magic is selected we allow the modifications\n if(! (selectedList == null) && ! selectedList.isEmpty()){\n parent.findViewById(R.id.buttonDelete).setEnabled(true);\n\n //we allow modification only if there is one item selected\n if(selectedList.size() == 1)\n {\n parent.findViewById(R.id.buttonEdit).setEnabled(true);\n }\n else\n {\n parent.findViewById(R.id.buttonEdit).setEnabled(false);\n }\n\n }\n else{\n parent.findViewById(R.id.buttonDelete).setEnabled(false);\n parent.findViewById(R.id.buttonEdit).setEnabled(false);\n }\n\n }\n });\n }",
"public void setSonClick(Audio son)\n {\n son_click = son;\n }",
"private void castSpellByAI() {\n\t\tboolean spellIsNotActivated = true;\n\t\tboolean[] spellsFlags = new boolean[3];\n\t\tChampion AI = currentTask.getCurrentChamp();\n\t\tArrayList<Spell> spells = ((Wizard)AI).getSpells();\n\t\twhile(spellIsNotActivated){\n\t\t\t\n\t\t\tint randomAction = (int) (Math.random()*2);\n\t\t\tSpell spell = null;\n\t\t\t\n\t\t\tswitch(randomAction){\n\t\t\tcase 0: if(spellsFlags[0]==false) {spell = spells.get(0); spellsFlags[0]=true; break;}\n\t\t\tcase 1:\tif(spellsFlags[1]==false) {spell = spells.get(1); spellsFlags[1]=true; break;}\n\t\t\tdefault: if(spellsFlags[2]==false) {spell = spells.get(2); spellsFlags[2] =true;}\n\t\t\t}\n\t\t\t\n\t\t\tif(spell instanceof HealingSpell){\n\t\t\t\tcastHealingSpell(spell);\n\t\t\t}else if(spell instanceof DamagingSpell){\n\t\t\t\tDirection direction;\n\t\t\t\tint randomDirection = (int) (Math.random()*3);\n\t\t\t\tswitch(randomDirection){\n\t\t\t\tcase 0: direction = Direction.BACKWARD;\n\t\t\t\tcase 1: direction = Direction.FORWARD;\n\t\t\t\tcase 2: direction = Direction.LEFT;\n\t\t\t\tdefault: direction = Direction.RIGHT;\n\t\t\t\t}\n\t\t\t\tspellInAction = spell;\n\t\t\t\tdirectionsInAction = new ArrayList<Direction>();\n\t\t\t\tdirectionsInAction.add(direction);\n\t\t\t\tcastDamagingSpell();\n\t\t\t}else if(spell instanceof RelocatingSpell){\n\t\t\t\tDirection direction1;\n\t\t\t\tint randomDirection1 = (int) (Math.random()*3);\n\t\t\t\tswitch(randomDirection1){\n\t\t\t\tcase 0: direction1 = Direction.BACKWARD;\n\t\t\t\tcase 1: direction1 = Direction.FORWARD;\n\t\t\t\tcase 2: direction1 = Direction.LEFT;\n\t\t\t\tdefault: direction1 = Direction.RIGHT;\n\t\t\t\t}\n\t\t\t\tDirection direction2;\n\t\t\t\tint randomDirection2 = (int) (Math.random()*3);\n\t\t\t\tswitch(randomDirection2){\n\t\t\t\tcase 0: direction2 = Direction.BACKWARD;\n\t\t\t\tcase 1: direction2 = Direction.FORWARD;\n\t\t\t\tcase 2: direction2 = Direction.LEFT;\n\t\t\t\tdefault: direction2 = Direction.RIGHT;\n\t\t\t\t}\n\t\t\t\tspellInAction = spell;\n\t\t\t\tdirectionsInAction = new ArrayList<Direction>();\n\t\t\t\tdirectionsInAction.add(direction1);\n\t\t\t\tdirectionsInAction.add(direction2);\n\t\t\t\t\n\t\t\t\tint randomRange = (int) (Math.random()*((RelocatingSpell)spell).getRange()) + 1;\n\t\t\t\tcastRelocatingSpell(randomRange);\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tspellIsNotActivated = false;\n\t\t\t}\n\t\t\tif(AI != currentTask.getCurrentChamp()){\n\t\t\t\tspellIsNotActivated = false;\n\t\t\t}\n\t\t}\n\n\t\t\n\t\t\n\t}",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n Word voice = color.get(position);\n releaseMediaPlayer();\n\n int result = mAudiomanager.requestAudioFocus(afChangeListener,\n // Use the music stream.\n AudioManager.STREAM_MUSIC,\n // Request permanent focus.\n AudioManager.AUDIOFOCUS_GAIN_TRANSIENT);\n\n if (result == AudioManager.AUDIOFOCUS_REQUEST_GRANTED) {\n //mAudioManager.registerMediaButtonEventReceiver();\n // Start playback\n //create and setup the{@link Medisplayer} for the audio resource assiciated\n //with the current word\n \n\n\n mediaPlayer = MediaPlayer.create(ColorsActivity.this, voice.getmAudioresourceid());\n mediaPlayer.start();\n\n mediaPlayer.setOnCompletionListener(mCompletionListener);\n }\n }",
"private void correctSpelling() {\n\t\tparent_frame.getFestival().speak(\"Correct\", false);\n\n\t\t//adds to respective arraylist based on which attempt they get it right\n\t\tif (current_attempt_number==1){\n\t\t\twords_mastered.add(words_to_spell.get(current_word_number));\n\t\t} else {//words is faulted\n\t\t\twords_faulted.add(words_to_spell.get(current_word_number));\n\t\t}\n\n\t\tcurrent_word_number+=1;\n\t\tcurrent_attempt_number=1;\n\t\tprogress_bar.setForeground(Color.GREEN);\n\t\tprogress_bar.setString(\"word \"+current_word_number +\" was CORRECT\");\n\t\tfeedback_display.setText(\"\");//clear display\n\t}",
"@Override\n\tpublic void optionSelected(AbstractPlayer arg0, AbstractMonster arg1, int arg2) {\n\t\t\n\t}",
"public void speak(int word) {\n\t\t\n\t\tboolean flag=Machine.interrupt().disable();\n\t\tspeakerNum++;\n\t\tif(hasSpoken||speakerNum!=1)\n\t\t{\n\t\t\twaitToSpeak.waitForAccess(KThread.currentThread());\n\t\t\tKThread.sleep();\n\t\t}\n\t\thasSpoken=true;\n\t\tthis.word=word;\n\t\tKThread thread=null;\n\t\tif((thread=waitToListen.nextThread())!=null)\n\t\t\tthread.ready();\n\t\tspeakerNum--;\n\t//\tSystem.out.println(\"speak:\"+word+\" \"+KThread.currentThread().toString());\n\t\tMachine.interrupt().setStatus(flag);\n\n\t\treturn ;\n\t}",
"@Override\r\n\tpublic void setSelection(List<EObject> selection) {\r\n\t\tthis.selection = selection;\r\n\t\tthis.refactoringProcessor = \r\n\t\t\t\tnew InternalRefactoringProcessor(this.selection);\r\n\t}",
"public void setSelected(boolean selected) {\n\t\tiAmSelected = selected;\n\t}",
"private void select()\n\t{\n\t\tSoundPlayer.playClip(\"select.wav\");\n\t if(currentChoice == 0)\n\t\t{\n\t\t\tsuper.isFadingOut = true;\n\t\t\tSoundPlayer.animVolume(-40.0F);\n\t\t}\n\t\tif(currentChoice == 1)\n\t\t{\n\t\t\tbottomFadeOut = true;\n\t\t\t//gsm.setState(GameStateManager.CONTROLSTATE);\n\t\t}\n\t\tif(currentChoice == 2)\n\t\t{\n\t\t\tbottomFadeOut = true;\n\t\t\t//gsm.setState(GameStateManager.CREDITSTATE);\n\t\t}\n\t\tif(currentChoice == 3)\n\t\t{\n\t\t\tnew Timer().schedule(new TimerTask()\n\t\t\t{\n\t\t\t\tpublic void run()\n\t\t\t\t{\n\t\t\t\t\tSystem.exit(0);\t\t\n\t\t\t\t}\n\t\t\t}, 500);\n\t\t}\n\t}",
"public void speak(int word) {\n\t\tcommlock.acquire();\n\t\twhile(listenersWaiting == 0 || sharedWordInUse)\n\t\t\tspeaker.sleep();\n\n\t\tsharedWordInUse = true;\n\t\tsharedWord = word;\n\n\t\tlistener.wake();\n commlock.release();\n }",
"public void setSelected(AnimationDef selected) {\n getAdapter().getSelectionManager().deselectAll();\n if( selected != null ){\n getAdapter().getSelectionManager().select(selected);\n }\n }",
"public void setWord(String newWord)\n\t{\n\t\tword = newWord;\n\t}",
"public void xsetEnumSkillId(org.apache.xmlbeans.XmlString enumSkillId)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(ENUMSKILLID$10);\n if (target == null)\n {\n target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(ENUMSKILLID$10);\n }\n target.set(enumSkillId);\n }\n }",
"public void setCorrection(String word) throws IOException {\n writeWord(word);\n }",
"public void setCurrentMedium(DvdDto dvdDto) {\n currentMediumType = MediumType.DVD;\n this.enableFieldsForMediumType(MediumType.DVD);\n this.bindGenericProperties(\n dvdDto.getTitle(),\n dvdDto.getStorageLocation(),\n dvdDto.getTopic(),\n dvdDto.getReleaseDate()\n );\n currentDvd = dvdDto;\n }",
"public void setSelectedFood(online.food.ordering.Food _selectedFood)\n {\n selectedFood = _selectedFood;\n }",
"public void toSelectingWeapon() {\n }",
"public void setAttackBoot() {\n if (this.isHasSword()) {\n this.attack = this.getCurrentSword().getAtkBoot();\n }\n }",
"public void switchWeapon() {\n\t\tif (type == 0) {\n\t\t\ttype = 1;\n\t\t\tthis.setImage(getFilename(type, held));\n\t\t\tsetFocus();\n\t\t} else {\n\t\t\ttype = 0;\n\t\t\tthis.setImage(getFilename(type, held));\n\t\t\tsetFocus();\n\t\t} // end else\n\t}",
"public void setShield(int shield) {\n this.shield = shield;\n }",
"public void chooseWord() {\n int length = words.size();\n int index = (int) ((length - 1) * Math.random());\n word = words.get(index);\n }",
"public void xsetEnumSkillName(org.apache.xmlbeans.XmlString enumSkillName)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(ENUMSKILLNAME$8);\n if (target == null)\n {\n target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(ENUMSKILLNAME$8);\n }\n target.set(enumSkillName);\n }\n }",
"public void setTutorial(boolean checked){\n\n SharedPreferences.Editor editor = mSharedPreferences.edit();\n editor.putBoolean(\"TUTORIAL_CHECKED\", checked);\n editor.commit();\n }",
"@Override\n public void selectItem(String selection) {\n vendingMachine.setSelectedItem(selection);\n vendingMachine.changeToHasSelectionState();\n }",
"public void setSelectedTerritoryForTurn(Territory selectedTerritory) {\n selectedTerritoryByPlayer = selectedTerritory;\n }",
"@Override\n\tpublic void setChaseTarget(){\n\t\tthis.setTarget(_pacman.getX()+Constants.SQUARE_SIDE,_pacman.getY()-(4*Constants.SQUARE_SIDE));\n\t}",
"public Spell() {\r\n spells = new ArrayList<>();\r\n // Add all 3 spells whenever defualt constructor is called\r\n spells.add(\"Jump the player to another grid location\");\r\n spells.add(\"Randomly reveal the location of one of the Tokimons\");\r\n spells.add(\"Randomly kill off one of the Fokimons\");\r\n spellsCounter = 3;\r\n }",
"public int parseSpellChoice(List<Spell> list) {\n\t\tSystem.out.println(\"Which Spell would you like to cast?\");\n\t\tprintSpellList(list);\n\t\treturn parseChoice(list,1);\n\t\t\n\t\t\n\t}",
"public void setSelection(FBitSet selection) {\r\n\t\tthis.selection = selection;\r\n\t}",
"public void setSelected(boolean s)\n {\n selected = s; \n }",
"private void fireSuggestionEvent(SuggestFieldSuggestionImpl selectedSuggestion) {\n \t\tSelectionEvent.fire(this, selectedSuggestion);\n \t}",
"public void spell(SpellRequest parsedRequest, GameServer gServer) {\n gameServer = gServer;\n Log.i(TAG, \"Handle spell \" + parsedRequest.toString());\n Hero hero = GameUtil.getHeroById(parsedRequest.getHeroId(), gameServer.getHeroes());\n switch (parsedRequest.getSpell_id()) {\n case 8:\n Log.i(TAG, \"Warrior used taunt!\");\n warriorTaunt((Warrior) hero, parsedRequest);\n break;\n case 7:\n Log.i(TAG, \"Warrior used cleave!\");\n warriorCleave((Warrior) hero, parsedRequest);\n break;\n case 1:\n Log.i(TAG, \"Warrior used Charge!\");\n warriorCharge((Warrior) hero, parsedRequest);\n break;\n case 2:\n Log.i(TAG, \"Priest used Heal!\");\n priestHeal((Priest) hero, parsedRequest);\n break;\n case 3:\n Log.i(TAG, \"Priest used Smite!\");\n priestSmite((Priest) hero, parsedRequest);\n break;\n case 6:\n Log.i(TAG, \"Priest used Shield!\");\n priestShield((Priest) hero, parsedRequest);\n break;\n case 5:\n Log.i(TAG, \"Priest used Heal over time!\");\n priesHealOverTime((Priest) hero, parsedRequest);\n break;\n case 26:\n Log.i(TAG, \"Warlock used drain life!\");\n warlockDrain((Warlock) hero, parsedRequest);\n break;\n case 27:\n Log.i(TAG, \"Warlock used haemorrhage!\");\n warlockHaemorrhage((Warlock) hero, parsedRequest);\n break;\n case 28:\n Log.i(TAG, \"Warlock used restore!\");\n warlockRestore((Warlock) hero, parsedRequest);\n break;\n case 29:\n Log.i(TAG, \"Warlock used restore!\");\n warlockBloodBolt((Warlock) hero, parsedRequest);\n break;\n default:\n Log.i(TAG, \"Did not find spell with id: \" + parsedRequest.getSpell_id());\n break;\n }\n gServer.sendGameStatus();\n }",
"void setWordGuessed( String word )\n\t{\n\t\tfor( int i = 0; i < entry.getLinkedWords().size(); i++ )\n\t\t\tif( entry.getLinkedWords().elementAt(i).equals(word) )\n\t\t\t{\n\t\t\t\twordGuessed[i] = true;\n\t\t\t\twPanel.showWord(i);\n\t\t\t}\n\t}",
"public Skills chooseSkill();",
"public void edit_word(String word, String definition){\n\t\tLexiNode node = search_specific_word(word, -1);\n\t\tif(node == null)\n\t\t\tadd_word(word, definition);\n\t\telse\n\t\t\tsearch_specific_word(word, -1).setDefinition(definition);\n\t}",
"public void setTheWords (String themeWords){\n\t\twords.setText(themeWords);\n\t}",
"public void deleteSelectedWord()\r\n {\n ArrayList al = crossword.getWords();\r\n al.remove(selectedWord);\r\n repopulateWords();\r\n }",
"public void setSelectedTrain(Train train){\n\n this.selectedTrain = train;\n }",
"public void setSelected(boolean selected) {\t\t\t\t\n\t\tthis.selected = selected;\t\t\t\t\t\t\n\t}",
"void setSelected(boolean selected) {\n if (selected == isSelected()) {\n return;\n }\n if (selected) {\n highlight();\n } else {\n unhighlight();\n }\n this.selected = selected;\n }"
] | [
"0.58736205",
"0.564999",
"0.5633935",
"0.5633935",
"0.5633935",
"0.56075263",
"0.5472076",
"0.5459593",
"0.5401448",
"0.53883904",
"0.52863574",
"0.52107805",
"0.51820993",
"0.51808685",
"0.51697093",
"0.51569027",
"0.51505154",
"0.5099177",
"0.5039763",
"0.5011612",
"0.4993581",
"0.49803495",
"0.4977375",
"0.49598035",
"0.4959181",
"0.4931808",
"0.49265805",
"0.4921805",
"0.4910954",
"0.49059758",
"0.48747006",
"0.48174062",
"0.47923854",
"0.4784612",
"0.47591606",
"0.47484562",
"0.47427866",
"0.47166693",
"0.4710821",
"0.46988878",
"0.4691973",
"0.46892527",
"0.46883583",
"0.4681507",
"0.46781608",
"0.46762595",
"0.46687883",
"0.46593213",
"0.4658504",
"0.46337047",
"0.4623989",
"0.46202576",
"0.46147826",
"0.460581",
"0.45965788",
"0.45960674",
"0.45940828",
"0.4582532",
"0.45773932",
"0.4568498",
"0.4563094",
"0.4553466",
"0.45525116",
"0.45384887",
"0.45341545",
"0.45195818",
"0.45148653",
"0.45023963",
"0.44959772",
"0.44957286",
"0.44914407",
"0.4487529",
"0.44862223",
"0.44786373",
"0.4475452",
"0.44746616",
"0.4467702",
"0.4467605",
"0.44642976",
"0.445395",
"0.44357634",
"0.44239247",
"0.44238576",
"0.44226322",
"0.4421925",
"0.44123662",
"0.44087693",
"0.44083655",
"0.4396149",
"0.43898404",
"0.43696496",
"0.4365667",
"0.43631974",
"0.43615052",
"0.4361076",
"0.43599764",
"0.43570238",
"0.43524408",
"0.43457505",
"0.43456736"
] | 0.8249489 | 0 |
Sets the current page index of the wizard in their Known Spells GUI. Given a value less than 1 or greater than the maximum page limit will cause the index to remain the same. | public void setCurrentPageIndex(int pageIndex) {
if (pageIndex > 0 && pageIndex <= getMaxPageNumber()) {
currentPageIndex = pageIndex;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setPage(int index) throws IndexOutOfBoundsException;",
"public void setPage(int value) {\n this.page = value;\n }",
"public void setPageIncrement( final int value ) {\n checkWidget();\n if( value >= 1 && value <= maximum - minimum ) {\n pageIncrement = value;\n }\n }",
"public void setCurrentPage(int pageNumber) {\n\t\t\n\t}",
"public void setCurrentPage(int pageNum) {\n mCurrentPage = pageNum;\n }",
"public void setEndPage(int value) {\n this.endPage = value;\n }",
"public void setPageIndex(int pageIndex) {\n this.pageIndex = pageIndex;\n }",
"public void setPreviousPage(IWizardPage page);",
"public void setPage(int page) {\n this.page = page;\n }",
"void setPageStart(short start);",
"public void setEndingPage(int endingPage) {\n if(endingPage < this.startingPage){\n this.endingPage = this.startingPage;\n }else{\n this.endingPage = endingPage;\n }\n }",
"public void moveTo(int pageIndex);",
"public void setPage(Integer page) {\n this.page = page;\n }",
"private void setUpPageItem() {\n displaylimit = xmlhandler.getItemDisplayLimit();\n itemrow = inventory.getItemRow();\n Back.setEnabled(false);\n Begin.setEnabled(false);\n if(getPageEnd()==1) {\n Forward.setEnabled(false);\n End.setEnabled(false);\n }\n }",
"private void updateUi() {\n int index = mCurrentPage.getIndex();\n int pageCount = mPdfRenderer.getPageCount();\n mButtonPrevious.setEnabled(0 != index);\n mButtonNext.setEnabled(index + 1 < pageCount);\n getActivity().setTitle(getString(R.string.app_name_with_index, index + 1, pageCount));\n }",
"public void setStartPage(int value) {\n this.startPage = value;\n }",
"public void setPages(int pages) {\n this.pages = pages;\n }",
"@Override\n public void changePage(int newPage) {\n\n if ( (newPage >= 0) && (newPage< bookInitial.getListAllTextToDisplay().size()))\n {\n\n if (isManual)\n {\n bookInitial.setCurrentPage(newPage);\n updateCurrentPage();\n displayPage();\n }else\n {\n int a = bookInitial.getCurrentPage();\n bookInitial.setCurrentPage(newPage);\n updateCurrentPage();\n displayPage();\n updateAutoWPop(a);\n }\n\n\n }\n\n\n }",
"public void setLastPage(int lastPage) {\n\t\tthis.lastPage = lastPage;\n\t}",
"void nextPage() throws IndexOutOfBoundsException;",
"public void setDefaultPage(int newDefaultPage)\n\t{\n\t\tdefaultPage = newDefaultPage;\n\t}",
"public void setPage(SQLInteger page) {\n\t\tthis.page = page;\n\t}",
"private void nextPage()\n {\n if(currentPage + 1 <= maxPage)\n {\n prevPageButton.setEnabled(true);\n if(currentPage + 2 > maxPage)\n nextPageButton.setEnabled(false);\n \n paginate(++currentPage, getResultsPerPage());\n updatePageLabel(currentPage, maxPage);\n }\n }",
"public void setPages(int pages) {\n this.pages = pages;\n }",
"public IWizardPage getNextPage();",
"private void updatePageLabel(int current, int max)\n {\n String info = MessageFormat.format(\"Page {0}/{1}\", current, max);\n pageInfoLabel.setText(info);\n }",
"public void setStartingPage(int startingPage) {\n if(startingPage <= 0){\n this.startingPage = 1;\n }else{\n this.startingPage = startingPage;\n }\n }",
"@Override\r\n\tpublic IPage<T> setCurrent(long current) {\n\t\treturn null;\r\n\t}",
"public void setPage(final int number) {\n final int oldPage = this.currentPage;\n if (this.displayMode == CONTINUOUS || this.displayMode == CONT_FACING) {\n this.currentPage = number;\n this.gridPanel\n .scrollRectToVisible(this.pagePanels[this.currentPage]\n .getBounds());\n } else { // single page mode\n this.currentPage = number;\n this.firstPage = this.currentPage;\n }\n showPage();\n firePageChange(oldPage, this.currentPage);\n }",
"protected void showNextPage() {\n\t\tif (currPageIndex.equals(pages.size() - 1)) {\n\t\t\t// Last page so dispose\n\n\t\t\tcleanup();\n\t\t\treturn;\n\t\t}\n\n\t\tAbstractWizardPanel page = pages.get(currPageIndex);\n\n\t\t// Remove page from ignored list if requested\n\t\tif (page.getEnablePageClassArray().size() > 0) {\n\t\t\tfor (Class<? extends AbstractWizardPanel> ignorePage : page\n\t\t\t\t\t.getEnablePageClassArray()) {\n\t\t\t\tignoredPages.remove(ignorePage);\n\t\t\t}\n\t\t}\n\n\t\t// Add page to ignored list if requested\n\t\tif (page.getDisablePageClassArray().size() > 0) {\n\t\t\tfor (Class<? extends AbstractWizardPanel> ignorePage : page\n\t\t\t\t\t.getDisablePageClassArray()) {\n\t\t\t\tif (!ignoredPages.contains(ignorePage)) {\n\t\t\t\t\tignoredPages.add(ignorePage);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tshowPage(currPageIndex + 1, Direction.FORWARD);\n\n\t}",
"void previousPage() throws IndexOutOfBoundsException;",
"public void setPageNo(long pageNo) {\r\n\t\tif (pageNo < 1) {\r\n\t\t\tthis.pageNo = 1;\r\n\t\t} else {\r\n\t\t\tthis.pageNo = pageNo;\r\n\t\t}\r\n\t}",
"public void setPageNo(int pageNo) {\n this.pageNo = pageNo;\n }",
"@Override\r\n\tpublic int nombrePage() {\n\t\treturn 0;\r\n\t}",
"public void reset() {\n _pageIndex = 0;\n //cbxPage.setSelectedIndex(0);\n dispatchEvent(new Event(\"reset\", true, false));\n }",
"protected void setCurrentPageInternal(final int currentPage) {\r\n\t\tthis.currentPage = currentPage;\r\n\t}",
"private JTextField buildDocumentPageNumbers() {\r\n final JTextField textField = new JTextField();\r\n textField.setInputVerifier(new PageNumberTextFieldInputVerifier());\r\n textField.addKeyListener(new PageNumberTextFieldKeyListener());\r\n textField.addFocusListener(new FocusAdapter() {\r\n public void focusLost(FocusEvent e) {\r\n Object src = e.getSource();\r\n if (src == null)\r\n return;\r\n if (src == textField) {\r\n String fieldValue = textField.getText();\r\n int currentValue = Integer.parseInt(fieldValue);\r\n int maxValue = controller.getDocument().getNumberOfPages();\r\n if (currentValue > maxValue)\r\n textField.setText(String.valueOf(maxValue));\r\n }\r\n }\r\n });\r\n // start off with page 1.\r\n textField.setText(\"1\");\r\n return textField;\r\n }",
"void setLimit(int limit);",
"public void setLimitNum(int limitNum) {\r\n this.limitNum = limitNum;\r\n this.endNum = this.skipNum + this.limitNum +1;\r\n }",
"void setCurrentLocaleIndex(int value) {\n\n this.currentLocaleIndex = value;\n this.updateBundle();\n }",
"private void forwardPage()\n {\n page++;\n open();\n }",
"public void setPage(Page page) {this.page = page;}",
"public void setPageItemCount(Integer pageItemCount) {\n this.pageItemCount = pageItemCount;\n }",
"public void setResultsPage(int resultsPage)\r\n\t{\r\n\t\tthis.resultsPage = resultsPage;\r\n\t}",
"public void setPageNum(String pageNum) {\r\n this.pageNum = pageNum;\r\n }",
"public void setSelectedIndex(int index)\r\n {\r\n this.scrollBy(index - avatarIndex);\r\n }",
"public void setCurrent(int current) {\n\tif(current >= 0 && current <= ceiling) {\n\t this.current = current;\n\t}\n }",
"public void setCurrentPage(String sCurrentPage){\n\t\tthis.sCurrentPage = sCurrentPage;\n\t}",
"private void setFormedIndex() {\n\t\tint t = this.formeIndex + 1;\n\t\tif (t == NUMBEROFEACHCARD) {\n\t\t\tsetFillIndex();\n\t\t\tthis.formeIndex = 0;\n\t\t} else {\n\t\t\tthis.formeIndex = t;\n\t\t}\n\n\t}",
"public void setMaximumPagesToFetch(int max)\n\t{\n\t\tFrontier.setMaximumPagesToFetch(max);\n\t}",
"public void setNextPage(boolean value) {\n this.nextPage = value;\n }",
"private void showPage(Integer index, Direction dir) {\n\t\tAbstractWizardPanel page;\n\t\ttry {\n\t\t\tpage = pages.get(index);\n\t\t} catch (Exception e) {\n\t\t\tlog.error(\"Error setting wizard page to index: \" + index);\n\t\t\te.printStackTrace();\n\t\t\treturn;\n\t\t}\n\n\t\t// Check to see if page should be ignored\n\t\tif (isIgnoredPageClass(page)) {\n\t\t\tif (dir.equals(Direction.FORWARD)) {\n\t\t\t\tindex++;\n\t\t\t} else {\n\t\t\t\tindex--;\n\t\t\t}\n\n\t\t\tshowPage(index, dir);\n\t\t\treturn;\n\t\t}\n\n\t\tpagePanel.removeAll();\n\t\tpagePanel.add(page);\n\t\tlblTitle.setText(page.getTitle());\n\t\ttxtInstructions.setText(page.getInstructions());\n\t\tcurrPageIndex = index;\n\t\tautoEnableNavButtons();\n\n\t\tpage.initialViewTasks();\n\n\t\tpagePanel.repaint();\n\n\t}",
"@Override\r\n\tprotected IWizardPage updatePage(int index) {\r\n\t\tIHeadlessWizardContainer hwc = (IHeadlessWizardContainer) getContainer();\r\n\t\tif(!( hwc instanceof WizardContainer )){\r\n\t\t\thwc.updateButtons();\r\n\t\t\treturn super.updatePage(index);\r\n\t\t}\r\n\t\tWizardContainer container = (WizardContainer) hwc;\t\r\n\r\n\t\tIndexStore is = getIndexStore(index);\r\n\t\tString ts = ( is.titleStyle == null )? this.titleStyle: is.titleStyle;\r\n\t\tsetBarStyle( container.getToolBar(), index, ts );\r\n\t\tString bs = ( is.buttonStyle == null )? this.buttonbarStyle: is.buttonStyle;\r\n\t\tcontainer.setButtons( is.getButtons() );\r\n\t\tsetBarStyle( container.getButtonBar(), index, bs );\r\n\r\n\t\tfor( Buttons button: is.getButtons() ){\r\n\t\t\tcontainer.setButtonEnabled(button, is.isButtonEnabled(button));\r\n\t\t}\r\n\r\n\t\tboolean choice = ( index > 0 );\r\n\t\t\r\n\t\tif( this.needsPreviousAndNextButtons() ){\r\n\t\t\tcontainer.setButtonEnabled( IButtonWizardContainer.Buttons.PREVIOUS, choice);\t\t\r\n\t\t\tchoice = ( index < container.size() - 1 );\r\n\t\t\tcontainer.setButtonEnabled( IButtonWizardContainer.Buttons.NEXT, choice);\r\n\t\t}\r\n\t\tchoice = ( index >= container.getFinishIndex() );\r\n\t\tcontainer.setButtonEnabled( IButtonWizardContainer.Buttons.FINISH, choice);\r\n\t\tcontainer.updateButtons();\r\n\t\tfor( Buttons button: is.getButtons() ){\r\n\t\t\tcontainer.buttonVisible( button, is.isButtonVisible(button));\r\n\t\t}\r\n\r\n\t\treturn super.updatePage(index);\r\n\t}",
"@ApiModelProperty(value = \"Index of the page\")\n public Integer getPage() {\n return page;\n }",
"public void setLastSelectedIndex() {\n\t\tsetSelectedIndex(selectedIndex);\n\t}",
"@Override\r\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\tprgDlg.setMax(nTotalPage);\r\n\t\t\t\t\t\t\tprgDlg.setProgress(nPage);\r\n\t\t\t\t\t\t}",
"protected void jumpPage() {\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n\t\tbuilder.setTitle(getString(R.string.txtjump));\n\t\tfinal SeekBar seek = new SeekBar(this);\n\t\tseek.setOnSeekBarChangeListener(this);\n\t\tseek.setMax(100);\n\t\tint p = (int) (BookPageFactory.sPercent * 100);\n\t\tseek.setProgress(p);\n\t\tbuilder.setView(seek);\n\t\tbuilder.setPositiveButton(getString(R.string.yes),\n\t\t\t\tnew OnClickListener() {\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tint per = seek.getProgress();\n\t\t\t\t\t\t\tif (per >= 0.0 && per <= 100.0) {\n\t\t\t\t\t\t\t\tmPagefactory.jumpPage(per);\n\t\t\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t\t\tmPagefactory.onDraw(mCurPageCanvas);\n\t\t\t\t\t\t\t\tmPageWidget.setBitmaps(mCurPageBitmap,\n\t\t\t\t\t\t\t\t\t\tmNextPageBitmap);\n\t\t\t\t\t\t\t\tmPageWidget.startAnimation(1000);\n\t\t\t\t\t\t\t\tToast.makeText(ArchermindReaderActivity.this,\n\t\t\t\t\t\t\t\t\t\tgetString(R.string.successjump),\n\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tToast.makeText(ArchermindReaderActivity.this,\n\t\t\t\t\t\t\t\t\t\tgetString(R.string.hintjunp),\n\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\tToast.makeText(ArchermindReaderActivity.this,\n\t\t\t\t\t\t\t\t\tgetString(R.string.hintjunp),\n\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tbuilder.setNegativeButton(getString(R.string.no),\n\t\t\t\tnew OnClickListener() {\n\t\t\t\t\t// @Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tbuilder.show();\n\t}",
"public void setThisManual()\n { \n actual = 1;\n \n nextPage = new Label();\n addObject(nextPage, 1132, 2001);\n \n prePage = new Label();\n addObject(prePage, 122, 2007);\n \n prePage.setImage(new GreenfootImage(\"\", 0, null, null));\n nextPage.setImagine(\"sipka1\");\n \n callMenu = new CallMenu();\n addObject(callMenu, 667, 60);\n }",
"public void setCp(int currentPage) {\n\t\tthis.currentPage = currentPage;\n\t}",
"public synchronized void setTbApWtEntryIndex(Integer value)\n\t\t\t\t throws AgentException{\n\t\t// Fill up with necessary processing\n\n\t\ttbApWtEntryIndex = value;\n\t}",
"public void setPageSize(int pageSize) {\r\n\t\tif (pageSize < 1) {\r\n\t\t\tthis.pageSize = DEF_COUNT;\r\n\t\t} else {\r\n\t\t\tthis.pageSize = pageSize;\r\n\t\t}\r\n\t}",
"public ReviewsArguments currentPage(Integer value) {\n if (value != null) {\n startArgument(\"currentPage\");\n _queryBuilder.append(value);\n }\n return this;\n }",
"public Builder setPageNo(io.dstore.values.IntegerValue value) {\n if (pageNoBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n pageNo_ = value;\n onChanged();\n } else {\n pageNoBuilder_.setMessage(value);\n }\n\n return this;\n }",
"public void setIndex(int index) {\r\n this.textIndex = index;\r\n }",
"private void backPage()\n {\n page--;\n open();\n }",
"static void setCurrentSettingTab(int currentIdx) {\n currentSettingTab = currentIdx;\n }",
"public Builder setPageNo(io.dstore.values.IntegerValue value) {\n if (pageNoBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n pageNo_ = value;\n onChanged();\n } else {\n pageNoBuilder_.setMessage(value);\n }\n\n return this;\n }",
"@Override\n public void onClick(View v) {\n editor4.putInt(\"page\", ++page);\n editor4.apply();\n startActivity(new Intent(FileUpload.this, UploadActivity.class));\n }",
"@Override\n\tprotected void actionPerformed(GuiButton par1GuiButton)\n {\n\n if (par1GuiButton.enabled)\n {\n if (par1GuiButton.id == 1)\n {\n if (this.currPage < this.totalPages - 1)\n {\n ++this.currPage;\n }\n }\n else if (par1GuiButton.id == 2)\n {\n if (this.currPage > 0)\n {\n --this.currPage;\n }\n }\n else if (par1GuiButton.id == 8)\n {\n this.index = true;\n this.currPage = 0;\n this.totalPages = (this.maxResearch - (this.maxResearch % 5))/5 + 1;\n }\n else if (par1GuiButton.id == 9)\n {\n if (this.currentResearch == this.bookmarkpage) {\n \tthis.bookmarkpage = this.maxResearch + 1;\n \tSystem.out.println(\"changed\");\n }\n else\n {\n \tthis.bookmarkpage = this.currentResearch;\n \tSystem.out.println(\"changed\");\n }\n editingPlayer.inventory.mainInventory[editingPlayer.inventory.currentItem].stackTagCompound.setInteger(\"SelectedResearch\", this.bookmarkpage);\n updateBookmark();\n\n }\n else if (par1GuiButton.id > 2)\n {\n\t this.index = false;\n\t this.currentResearch = par1GuiButton.id + (currPage*5) - 2;\n\t NBTTagCompound var4 = itemstack.getTagCompound();\n\t this.researchKey = itemstack.stackTagCompound.getCompoundTag(Integer.toString(this.currentResearch)).getString(\"Research\");\n\t this.complete = itemstack.stackTagCompound.getCompoundTag(Integer.toString(this.currentResearch)).getInteger(\"Complete\");\n\t \tif (itemstack.stackTagCompound.getCompoundTag(Integer.toString(this.currentResearch)).getInteger(\"Complete\") == 1) {\n\t this.totalPages = ResearchDictionary.researchList.get(researchKey).description.size();\n\t }\n\t this.currPage = 0;\n }\n\n this.updateButtons();\n }\n }",
"public void setIndex(int newIndex)\r\n {\r\n\t if(newIndex < 1)\r\n\t\t index = 1;\r\n\t else if(newIndex > getNumberOfLines())\r\n\t\t index = getNumberOfLines();\r\n\t else\r\n\t\t index = newIndex;\r\n }",
"void setPagination(Pagination pagination);",
"private void nextButtonActionPerformed(ActionEvent e) {\n // TODO add your code here\n int remainItem = this.list.size() - 6 * (this.page + 1);\n\n if(remainItem <= 0){\n Warning.run(\"No more page here.\");\n }\n else{\n this.page++;\n this.update();\n }\n }",
"private void moveToLastPage() {\n while (!isLastPage()) {\n click(findElement(next_btn));\n }\n }",
"@Override\n public void onPageSelected(int position) {\n tljr_txt_page.setText(position + 1 + \"/\" + uList.size());\n currentPosition = position;\n }",
"public void setIndex(int index)\n/* */ {\n/* 39 */ this.index = index;\n/* */ }",
"public void setMaximum(Number max) {\n ((ADocument) getDocument()).setMaximum(max);\n }",
"public static void setCurrentPage(String page) throws ConfigurationException, IOException {\r\n SetRunTimeData(\"currentPage\", page);\r\n }",
"public void goToSlide() {\t\t\t\t\r\n\t\tString pageNumberStr = JOptionPane.showInputDialog(\"Page number?\");\r\n\t\tint pageNumber = Integer.parseInt(pageNumberStr);\r\n\t\t\r\n\t\tgoToSlide(pageNumber);\r\n\t}",
"public void setPagination(Number value) {\n setAttributeInternal(PAGINATION, value);\n }",
"public void setPage(Page page) {\n this.page=page;\n }",
"public void setPage(Page page) {\n this.page=page;\n }",
"public void setStartIndex(Integer startIndex) {\r\n this.startIndex = startIndex;\r\n }",
"private void setIndex(int index){\n\t\tthis.index = index;\n\t}",
"private void setMax(int max) { this.max = new SimplePosition(false,false,max); }",
"public synchronized void resetCurrentIndex()\n {\n // Reset the current index to start from 1 (speechgen0001.mp3)\n currentIndex = 1;\n }",
"private void prevPage()\n {\n if(currentPage - 1 >= 1)\n {\n nextPageButton.setEnabled(true);\n if(currentPage -2 < 1)\n prevPageButton.setEnabled(false);\n \n paginate(--currentPage, getResultsPerPage());\n updatePageLabel(currentPage, maxPage);\n }\n }",
"public void setIndex(int index){\r\n \tthis.index = index;\r\n }",
"public Builder setPageNo(\n io.dstore.values.IntegerValue.Builder builderForValue) {\n if (pageNoBuilder_ == null) {\n pageNo_ = builderForValue.build();\n onChanged();\n } else {\n pageNoBuilder_.setMessage(builderForValue.build());\n }\n\n return this;\n }",
"public void addPage(int newPage) {\r\n\t\tpage.addAtTail(newPage);\r\n\t}",
"public Builder setPageNo(\n io.dstore.values.IntegerValue.Builder builderForValue) {\n if (pageNoBuilder_ == null) {\n pageNo_ = builderForValue.build();\n onChanged();\n } else {\n pageNoBuilder_.setMessage(builderForValue.build());\n }\n\n return this;\n }",
"public int getPageIncrement() {\n \tcheckWidget();\n \treturn pageIncrement;\n }",
"public void setCurrentPosition(int value) {\n this.currentPosition = value;\n }",
"public void setIndex(int index) { this.index = index; }",
"public int getDefaultPage()\n\t{\n\t\treturn defaultPage;\n\t}",
"public void goToNextPage() {\n nextPageButton.click();\n }",
"public int getCurrentPage();",
"public void setIndex(int index) {\n _index = index;\n }",
"public int getPageNumber() {\r\n\t\t\t\treturn currentPage;\r\n\t\t\t}",
"public void setIndexTool(int index) {\r\n this.indexTool = index;\r\n }",
"@Override\n\t\tpublic void onLoadMore() {\n\t\t\tpageIndex++;\n\t\t\tloadInfo(pageIndex, 1);\n\t\t\tif (DzqcStu.isDebug) {\n\t\t\t\tLog.i(\"pageIndex------\", pageIndex+\"\");\n\t\t\t}\n\t\t}"
] | [
"0.6828109",
"0.65987545",
"0.6487562",
"0.6356165",
"0.62964004",
"0.6157961",
"0.6148551",
"0.6128514",
"0.6125825",
"0.59875274",
"0.5974333",
"0.5973246",
"0.593957",
"0.5904613",
"0.5868332",
"0.5858459",
"0.5823885",
"0.58009654",
"0.5735676",
"0.57349545",
"0.5715657",
"0.56888425",
"0.56810004",
"0.5674086",
"0.5632923",
"0.5629561",
"0.5624697",
"0.5593096",
"0.5560557",
"0.5545438",
"0.5505769",
"0.5461815",
"0.544594",
"0.54455584",
"0.54148877",
"0.54045725",
"0.5398116",
"0.5390718",
"0.53817475",
"0.53798056",
"0.5373334",
"0.53591067",
"0.53456813",
"0.5342336",
"0.5328519",
"0.53132325",
"0.52837664",
"0.52747005",
"0.5274089",
"0.5273319",
"0.5243586",
"0.5237596",
"0.5226562",
"0.5223578",
"0.52223694",
"0.52097476",
"0.52083546",
"0.520462",
"0.51985425",
"0.5195768",
"0.51836455",
"0.5181534",
"0.51793045",
"0.5174333",
"0.5168674",
"0.5166657",
"0.516175",
"0.5158411",
"0.5158326",
"0.51505005",
"0.5147665",
"0.5147219",
"0.514517",
"0.5123132",
"0.51197404",
"0.5115384",
"0.51115215",
"0.5109493",
"0.5107851",
"0.5102064",
"0.5102064",
"0.508704",
"0.5079336",
"0.50748456",
"0.5063649",
"0.5061543",
"0.5054425",
"0.5052599",
"0.5052342",
"0.5049152",
"0.5045426",
"0.5042765",
"0.5040873",
"0.5040128",
"0.50389653",
"0.5029257",
"0.50259745",
"0.50192034",
"0.5017944",
"0.50164616"
] | 0.64755386 | 3 |
Creates the stage for Post Details | public PostDetails(Post post, String userid) {
postStage = new Stage();
postStage.initModality(Modality.APPLICATION_MODAL);
postDetailsController = new PostDetailsController();
userId = userid;
bp = new BorderPane();
bp.setPadding(new Insets(5));
bp.setTop(showTitle(post));
bp.setCenter(showPostDetails(post));
bp.setBottom(showReplyList(post));
Scene mainScene = new Scene(bp, 1000, 600);
postStage.setScene(mainScene);
postStage.show();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void CreateStage(int id, String name, String title,\n\t\t\tString description) throws Exception {\n\t\ttry {\n\t\t\tString query = \"INSERT INTO stage VALUES ('\" + id + \"', '\" + description + \"', '0', '\"+ name + \"', '\" + title + \"', '0')\";\n\t\t\tstatement.execute(query); \n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tif (conex != null) {\n\t\t\t\tconex.close();\n\t\t\t}\n\t\t}\n\t}",
"public void setPostStage(Vector4f postStage)\n\t{\n\t\tthis.postStage = postStage;\n\t}",
"public static GridPane showPostDetails(Post post) {\n\t\tGridPane grid = new GridPane();\n\t\tgrid.setHgap(10);\n\t\tgrid.setVgap(10);\n\t\tgrid.setPadding(new Insets(20, 20, 20, 20));\n\t\t\n\t\tString imagePath = post.getImagePath();\n\t\tif(imagePath.equalsIgnoreCase(\"none\") || imagePath.isEmpty()) {\n\t\t\timagePath = \"../../Images/No_image_available.jpg\";\n\t\t}\n\t\tImageView image = new ImageView(new Image(\"file:\" + imagePath, 300, 300, false, false));\n\t\tgrid.add(image, 0, 0);\n\t\t\n\t\tButton uploadImage = new Button(\"Upload Image\");\n\t\tuploadImage.setOnAction(PostDetailsController.uploadImageHandler(postStage, post));\n\t\tHBox hbBtn = new HBox(300);\n\t\thbBtn.getChildren().add(uploadImage);\n\t\thbBtn.setAlignment(Pos.BOTTOM_CENTER);\n\t\tgrid.add(hbBtn, 0, 1);\n\t\t\n\t\tVBox details = new VBox();\n\t\tdetails.setSpacing(10);\n\t\t\n\t\tdetails.getChildren().add(getLabel(\"Post ID: \", post.getId(), false, \"string\"));\n\t\tdetails.getChildren().add(getLabel(\"Title: \", post.getTitle(), true, \"string\"));\n\t\tdetails.getChildren().add(getLabel(\"Description: \", post.getDescription(), true, \"string\"));\n\t\tdetails.getChildren().add(getLabel(\"Creator ID: \", post.getCid(), false, \"string\"));\n\t\tdetails.getChildren().add(getLabel(\"Status: \", post.getStatus(), false, \"string\"));\n\t\tif(post instanceof Event) {\n\t\t\tdetails.getChildren().add(getLabel(\"Venue: \", ((Event) post).getVenue(), true, \"string\"));\n\t\t\tdetails.getChildren().add(getLabel(\"Date: \", ((Event) post).getDate(), true, \"date\"));\n\t\t\tdetails.getChildren().add(getLabel(\"Capacity: \", Integer.toString(((Event) post).getCapacity()), true, \"int\"));\n\t\t\tdetails.getChildren().add(getLabel(\"Attendee Count: \", Integer.toString(((Event) post).getAttcount()), false, \"int\"));\n\t\t}\n\t\telse if(post instanceof Job) {\n\t\t\tdetails.getChildren().add(getLabel(\"Proposed Price: \", Double.toString(((Job) post).getProprice()), true, \"double\"));\n\t\t\tdetails.getChildren().add(getLabel(\"Lowest Offer: \", Double.toString(((Job) post).getLowoffer()), false, \"double\"));\n\t\t}\n\t\telse {\n\t\t\tdetails.getChildren().add(getLabel(\"Highest Offer: \", Double.toString(((Sale) post).getHighoffer()), false, \"double\"));\n\t\t\tdetails.getChildren().add(getLabel(\"Minimum Raise: \", Double.toString(((Sale) post).getMinraise()), true, \"double\"));\n\t\t\tdetails.getChildren().add(getLabel(\"Asking Price: \", Double.toString(((Sale) post).getAskprice()), true, \"double\"));\n\t\t}\n\t\tgrid.add(details, 3, 0);\n\t\t\n\t\tButton closePost = new Button(\"Close Post\");\n\t\tclosePost.setOnAction(PostDetailsController.closePostHandler(userId));\n\t\t\n\t\tButton deletePost = new Button(\"Delete Post\");\n\t\tdeletePost.setOnAction(PostDetailsController.deletePostHandler(userId));\n\t\t\n\t\tButton savePost = new Button(\"Save(after edit)\");\n\t\tsavePost.setOnAction(PostDetailsController.savePostHandler(userId, post));\n\t\t\n\t\tRegion region1 = new Region();\n HBox.setHgrow(region1, Priority.ALWAYS);\n Region region2 = new Region();\n HBox.setHgrow(region2, Priority.ALWAYS);\n\t\tHBox btn = new HBox(closePost, region1, deletePost, region2, savePost);\n\t\t\n\t\tbtn.setAlignment(Pos.BOTTOM_CENTER);\n\t\tgrid.add(btn, 3, 1, 10, 1);\n\t\t\n\t\treturn grid;\n\t}",
"public void setStageDescription(String stageDescription) {\n this.stageDescription = stageDescription;\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 }",
"public CreatePost(Context context) {\n this.context = context;\n }",
"@Test(enabled=true)\n\tpublic void createCompletePost() {\n\t\tPosts posts = new Posts(\"5\", \"Lakers\", \"Horry\");\n\t\t\n\t\tString id =\n\n\t\tgiven()\n\t\t.contentType(ContentType.JSON)\n\t\t.body(posts)\n\t\t.when()\n\t\t.post(\"http://localhost:3000/posts/\")\n\t\t.then()\n\t\t.statusCode(201)\n\t\t.extract()\n\t\t.path(\"id\");\n\t\t\n\t\tgiven()\n\t\t.pathParams(\"id\", id)\n\t\t.when().get(\"http://localhost:3000/posts/{id}\")\n\t\t.then()\n\t\t.statusCode(200)\n\t\t.body(\"id\", is(posts.getId()))\n\t\t.body(\"title\",is(posts.getTitle()))\n\t\t.body(\"author\",is(posts.getAuthor()));\n\t}",
"public String getStageDescription() {\n return stageDescription;\n }",
"public void setStageName(String stageName) {\n this.stageName = stageName;\n }",
"@PostMapping(\"/posts/create\")\n @ResponseBody\n public String createPost() {\n return \"Create new post.\";\n }",
"public void createPost( BlogPost post );",
"@PostMapping(\"/posts\")\n ResponseEntity<?> createPost(@RequestBody Post post) {\n post.setOwner(SecurityContextHolder.getContext().getAuthentication().getName());\n post.setDateCreated(LocalDateTime.now());\n\n EntityModel<Post> newPost = modelAssembler.toModel(postRepository.save(post));\n return ResponseEntity.created(newPost.getRequiredLink(IanaLinkRelations.SELF).toUri()).body(newPost);\n }",
"public VerticalPanel createPost2(Post post){\n\t\t\tVerticalPanel result = new VerticalPanel();\n\t\t\tLabel lbl = new Label(post.getContent());\n\t\t\tresult.add(lbl);\n\t\t\treturn result;\n\t\t}",
"public void add_stage() {\r\n\t\tif (this.controller.getSelectedCatagory() == null)\r\n\t\t\treturn;\r\n\t\tString name = JOptionPane.showInputDialog(this,\r\n\t \t\"Choose a name for the stage\",\r\n\t \"Name Stage\", 1);\r\n\t if (name == null) {\r\n\t \treturn;\r\n\t }\r\n\t // If the stage cannot be added, inform the user\r\n\t\tif (!controller.addStage(name)) {\r\n\t\t\tJOptionPane.showMessageDialog(this, \"A Stage with that name already exists\");\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic void setStage(int stage) {\n\r\n\t}",
"public Stage getStage() {\n return stage;\n }",
"@Test (groups = \"create_post\")\n public void DTest_Show_Post_success(){\n\n System.out.println(\"Show PostID# \"+ createdPost);\n System.out.println(\"Generated Post Title: \"+ createdTitle);\n System.out.println(\"Generated Post Content: \"+ createdContent);\n System.out.println(\"Request to: \" + resourcePath + \"/\" + createdPost);\n\n given()\n .spec(RequestSpecs.generateToken())\n .get(String.format(\"%s/%s\",resourcePath,createdPost.toString()))\n .then()\n .body(\"data.id\", equalTo(createdPost))\n .and()\n .body(\"data.title\", equalTo(createdTitle))\n .and()\n .body(\"data.content\", equalTo(createdContent))\n .and()\n .statusCode(200)\n .spec(ResponseSpecs.defaultSpec());\n }",
"public Stage getStage() {\n return stage;\n }",
"public Stage getStage() {\n return stage;\n }",
"public Stage getStage() {\n return stage;\n }",
"@PostMapping(\"/addPost\")\n public ResponseEntity addNewPost(@RequestBody Post post){\n postService.postNewInfo(post);\n return new ResponseEntity(HttpStatus.OK);\n }",
"public void setStage(int stage) {\r\n\t\tthis.stage = stage;\r\n\t}",
"@Test(enabled=false)\n\tpublic void createPostCheckBodyContents() {\n\t\tPosts posts = new Posts(\"4\", \"Packers\", \"Favre\");\n\t\t\n\t\tgiven().\n\t\twhen().contentType(ContentType.JSON).\n\t\tbody(posts).\n\t\tpost(\"http://localhost:3000/posts/\").\n\t\tthen().\n\t\tstatusCode(201).\n\t\tbody(\"id\", is(posts.getId())).\n\t\tbody(\"title\",is(posts.getTitle())).\n\t\tbody(\"author\",is(posts.getAuthor()));\n\t}",
"public String getStageName() {\n return stageName;\n }",
"CompletableFuture<PostResponse> createNewPost(Post post);",
"@PostMapping(\"/\")\n private ResponseEntity<Post> createPost(@RequestBody Post post) {\n User user = getCurrentUser();\n post.setCreated(new Date());\n post.setUserId(user.getId());\n post = postService.add(post);\n\n return new ResponseEntity<>(post, HttpStatus.OK);\n }",
"String getStage();",
"@PostMapping(\"/posts/create\")\n public String createPost(\n Model model,\n @RequestParam(name = \"title\") String title,\n @RequestParam(name = \"body\") String body,\n @RequestParam(name = \"team\") String teamIDString,\n @RequestParam(name = \"sport\") String sportIDString) {\n\n long teamID = Long.parseLong(teamIDString);\n long sportID = Long.parseLong(sportIDString);\n\n Team thisTeam = teamRepository.findOne(teamID);\n Sport thisSport = sportRepository.findOne(sportID);\n\n\n// Which user is being assigned to this post?\n\n User foundUser = (User) SecurityContextHolder.getContext().getAuthentication().getPrincipal();\n User dbUser = userRepository.findOne(foundUser.getId());\n\n\n\n\n// Now it's time to actually make the post.\n\n Post post = new Post();\n post.setTitle(title);\n post.setBody(body);\n post.setSport(thisSport);\n post.setTeam(thisTeam);\n post.setAuthor(dbUser);\n\n postRepository.save(post);\n\n// After post is created, give user options to do something next\n\n Post createdPost = postRepository.findOne(post.getId());\n model.addAttribute(\"createdPost\", createdPost);\n\n\n// Send email commented out for now so I don't send an email every time\n\n// emailService.prepareAndSend(post, \"Congratulations James! You have been hired for this position\", \"You have been hired for this position: 1007A McDonalds Region Manager\");\n\n return \"posts/create-success\";\n }",
"public postDetailsMB() {\n }",
"public Post() {\n\t\t\n\t}",
"public CreateUAV(){\n createStage = new Stage();\n createStage.setTitle(\"UAV Setup\");\n createStage.initModality(Modality.APPLICATION_MODAL);\n setupOverwriteDialog();\n }",
"void savePost(Post post);",
"public PostRecord() {\n super(PostTable.POST);\n }",
"@Override\r\n\tpublic void createPost(Integer postID, Integer parentPostID,\r\n\t\t\tString posterName, String message, String[] imageName,\r\n\t\t\tString[] imageID) {\n\t\t\r\n\t}",
"SqlElasticPoolOperations.DefinitionStages.WithCreate withNewDatabase(String databaseName);",
"SqlElasticPoolOperations.DefinitionStages.WithCreate withExistingDatabase(SqlDatabase database);",
"String getStageName();",
"@Override\n\tpublic Post createPost(Post post) {\n\t\treturn postDao.createPost(post);\n\t}",
"public void setStageNumber(Integer stageNumber) {\n this.stageNumber = stageNumber;\n }",
"public void create(Post post) {\r\n jdbcOp.update(SQL_INSERT_TICKET,\r\n post.getCustomerName(),\r\n post.getSubject(), \r\n post.getBody(),\r\n post.getCategories());\r\n// for (String role : user.getRoles()) {\r\n// jdbcOp.update(SQL_INSERT_ROLE,\r\n// user.getUsername(),\r\n// role); \r\n }",
"public CreateDeploymentInput withStageDescription(String stageDescription) {\n this.stageDescription = stageDescription;\n return this;\n }",
"SqlElasticPoolOperations.DefinitionStages.WithCreate withExistingDatabase(String databaseName);",
"public void setStage(Stage stage) {\n this.stage = stage;\n }",
"public void setStage(Stage stage) {\n this.stage = stage;\n }",
"public PostPO clickOnNewPost() {\n\t\tnewPost.click();\n\t\treturn new PostPO();\n\t}",
"public Integer getStageNumber() {\n return stageNumber;\n }",
"public Post(String title , String context) {\n\t\tthis.title = title ;\n\t\tthis.context = context ;\n\t}",
"private HBox showTitle(Post post) {\t\n\t\tButton backMenu = new Button(\"Back To Main Window\");\n\t\tbackMenu.setOnAction(PostDetailsController.backMenuhandler());\n\t\t\n\t\tRegion region1 = new Region();\n HBox.setHgrow(region1, Priority.ALWAYS);\n \n Region region2 = new Region();\n HBox.setHgrow(region2, Priority.ALWAYS);\n \n Text title = new Text(post.getId() + \" - \" + post.getTitle() + \" : Post Details\");\n title.setFont(Font.font(\"Tahoma\", FontWeight.SEMI_BOLD, 30));\n \n HBox titleBox = new HBox(backMenu, region1, title, region2);\n \n\t\treturn titleBox;\n\t}",
"@Override\n public void onClick(View view) {\n CreatePost createPost = new CreatePost(context, selectedPic);\n createPost.execute(title.getText().toString(), description.getText().toString());\n }",
"public void setStage(Stage stage) {\r\n this.stage = stage;\r\n }",
"void insertDetailCaptionByPost(Detail detail);",
"@When(\"^I Create a post with title \\\"(.*?)\\\" and body \\\"(.*?)\\\"$\")\n\tpublic void i_Create_a_post_with_title_and_body(String title, String body) throws Throwable {\n\t\tString postsData = \"{\\\"title\\\":\\\" \"+ title + \"\\\",\" + \"\\\"body\\\":\\\" \" + body +\"}\";\n\t\t\t\t;\n\t\t\n\t\tresponse = request.when().body(postsData).post(\"/posts\");\n\t\tSystem.out.println(\"response: \" + response.prettyPrint());\n\t}",
"interface WithCreate\n extends DefinitionStages.WithTags,\n DefinitionStages.WithNetworkProfile,\n DefinitionStages.WithAutoShutdownProfile,\n DefinitionStages.WithConnectionProfile,\n DefinitionStages.WithVirtualMachineProfile,\n DefinitionStages.WithSecurityProfile,\n DefinitionStages.WithRosterProfile,\n DefinitionStages.WithLabPlanId,\n DefinitionStages.WithTitle,\n DefinitionStages.WithDescription {\n /**\n * Executes the create request.\n *\n * @return the created resource.\n */\n Lab create();\n\n /**\n * Executes the create request.\n *\n * @param context The context to associate with this operation.\n * @return the created resource.\n */\n Lab create(Context context);\n }",
"public StagePosition makeStagePosition();",
"public void setStage(Stage stage) {\n\t\tthis.stage = stage;\n\t}",
"public void ejbPostCreate(String description, long statusId) {\n }",
"public void setStagePrincipal(Stage stagePrincipal) {\n this.stagePrincipal = stagePrincipal;\n }",
"void createStage(Stage stage){\n\t\tstage.setHeight(background.getHeight()+25);//displays full image (1)\r\n\t\tstage.setWidth(background.getWidth());\r\n\t\tshowBackground.setFitWidth(stage.getWidth());\r\n\t\tshowBackground.setFitHeight(stage.getHeight()-23);//displays full image (1)\r\n\t\r\n\t\tstage.setAlwaysOnTop(true);\r\n\t\tstage.setResizable(false);\r\n\t\t\r\n\t\t//launches first window in center of screen. \r\n\t\tstage.centerOnScreen();\r\n\t\tstage.setScene(mainScene);\r\n\t\tstage.setTitle(\"Don't Play Games in Class\");\r\n\t\t//supposed to prevent window from being moved\r\n\t\t\r\n\t\t//removes minimize, maximize and close buttons\r\n\t\t//unused because replacing the \r\n\t\t//stage.initStyle(StageStyle.UNDECORATED);\r\n\t\t\r\n\t\t//removes minimize and maximize button\r\n\t\tstage.initStyle(StageStyle.UTILITY);\r\n\t\t\r\n\t\t//replaces the closed window in the center of the screen.\r\n\t\tRespawn launch = new Respawn();\r\n\t\tstage.setOnCloseRequest(launch);\r\n\t}",
"@PostMapping(\"\")\n public ResponseEntity<Post> createPost(@Valid @RequestBody Post post) {\n return ResponseEntity.status(HttpStatus.CREATED)\n .body(postService.createPost(post));\n }",
"public static Result postAddPaper() {\n Form<PaperFormData> formData = Form.form(PaperFormData.class).bindFromRequest();\n Paper info1 = new Paper(formData.get().title, formData.get().authors, formData.get().pages,\n formData.get().channel);\n info1.save();\n return redirect(routes.PaperController.listProject());\n }",
"@Override\n\tpublic void start(Stage stage) throws Exception {\n\t\tinstance = this;\n\t\tmainStage = stage;\n\t\tHemsProps.init(hemsPropsPath);\n\t\t\n\t\t//decide if data upload mode or normal production\n\t\tif (!IS_DATA_UPLOAD_MODE) {\n\t\t\tstage.setScene(createScene(loadMainPane()));\n\t\t\tstage.setTitle(windowTitle);\n\t\t\tstage.show();\n\n\t\t} else {\n\t\t\tDataCreator();\n\t\t}\n\t}",
"@Override\n public String getServletInfo() {\n return \"Servet to handle creation of new posts\";\n }",
"public Post() {\n }",
"@java.lang.Override\n public int getStageValue() {\n return stage_;\n }",
"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 }",
"public void savePost(VBeatPostModel post) {\n AppLocalDB.getInstance().db.postDao().insertAll(post);\n }",
"@Test\n public void createPost() {\n User bob = new User(\"Jasdeep\",\"Madan\",\"JD\",\"[email protected]\",\"password\", \"member\", true, true).save();\n\n //Create a new Category and save it\n Category category = new Category(\"Tech\", \"Some Description\").save();\n\n // Create a new post\n new Article(\"My first post\", \"Hello world\", bob, category, true, null, null).save();\n\n // Test that the post has been created\n assertEquals(1, Article.count());\n\n // Retrieve all posts created by Bob\n List<Article> bobPosts = Article.find(\"byAuthor\", bob).fetch();\n\n // Tests\n assertEquals(1, bobPosts.size());\n Article firstPost = bobPosts.get(0);\n assertNotNull(firstPost);\n assertEquals(bob, firstPost.author);\n assertEquals(\"My first post\", firstPost.title);\n assertEquals(\"Hello world\", firstPost.content);\n assertNotNull(firstPost.submit_date);\n }",
"public Post()\n {\n }",
"public AddFoodItemStage(FoodList foodList, FoodData foodData) {\n // initialize the foodList and foodData fields\n this.foodList = foodList;\n this.foodData = foodData;\n // create a new pane\n this.addFoodPane = new AnchorPane();\n createTextFieldLabels();\n handleConfirmEvent();\n handleCancelEvent();\n componentPositionAdjustment();\n StageAdjustment();\n }",
"@Override\n\tpublic Post toPost(PostDto postDto ) {\n\t\treturn new Post(employeeDao.readEmployeeById(postDto.getEmployeeId()), postDto.getBody(), LocalDateTime.now(), ticketDao.readTicket(postDto.getTicketId()));\n\t}",
"public void clickCreateNewPostBtn() {\n createPostBtn.get(0).click();\n }",
"private Node createDetails ()\n {\n\n List<String> prefix = Arrays.asList (charts,sessionlength,labels);\n\n FlowPane b = new FlowPane ();\n b.getStyleClass ().add (StyleClassNames.DETAIL);\n\n return b;\n\n }",
"public void setStage(){\n if(id < 3)\n stage = 1;\n if(id >= 3 && id < 6)\n stage = 2;\n if(id >= 6 && id < 9)\n stage = 3;\n if(id >= 9)\n stage = 4;\n }",
"public Post(){\n\n }",
"abstract Resource<Controller> setupStage(Stage stage);",
"public void setProdutoStage(Stage produtoStage) {\n\t\tthis.produtoStage = produtoStage;\n\t}",
"public void addStage(PipelineStage stag) {\r\n\t\tSystem.out.println(\"Adding stage \" + stag);\r\n\t\tstages.add(stag);\r\n\t}",
"private void initStage() {\n stage = new Stage();\n stage.setTitle(\"Attentions\");\n stage.setScene(new Scene(root));\n stage.sizeToScene();\n }",
"WithCreate withLabPlanId(String labPlanId);",
"@Override\n public String getName() {\n return \"createblog.do\";\n }",
"@Override\n\tpublic java.lang.String getStage() {\n\t\treturn _scienceApp.getStage();\n\t}",
"java.lang.String getStageId();",
"@GetMapping(\"/posts/create\")\n @ResponseBody\n public String postCreateGet() {\n return \"view the form for creating a post 'Create a post'\";\n //http://localhost:8080/posts/create\n }",
"private void getStageDetailsForJob() throws IGCException {\n final String methodName = \"getStageDetailsForJob\";\n String jobRid = job.getId();\n log.debug(\"Retrieving stage details for job: {}\", jobRid);\n IGCSearch igcSearch = new IGCSearch(\"stage\");\n igcSearch.addProperties(DataStageConstants.getStageSearchProperties());\n IGCSearchCondition condition = new IGCSearchCondition(\"job_or_container\", \"=\", jobRid);\n IGCSearchConditionSet conditionSet = new IGCSearchConditionSet(condition);\n igcSearch.addConditions(conditionSet);\n ItemList<Stage> stages = igcRestClient.search(igcSearch);\n List<Stage> allStages = igcRestClient.getAllPages(null, stages);\n for (Stage stage : allStages) {\n stageToVarsMap.put(stage.getId(), new TreeSet<>());\n }\n buildMap(stageMap, allStages);\n }",
"public void addNewStage() {\n\t\tif (stage != 0 && getCurrentActions().isEmpty()) { // This should be validated by the command\n\t\t\tthrow new IllegalStateException(\"Cannot progress stage without actions\");\n\t\t}\n\n\t\tstage = amountOfStages\n\t\t\t\t+ 1; // The stage that is being edited may not be the latest so make sure not to duplicate\n\t\tamountOfStages++;\n\t\tstagesOfActions.putIfAbsent(stage, new LinkedHashMap<>());\n\t\tstageJsons.putIfAbsent(stage, new JsonObject());\n\t}",
"@Override\n protected void createEntity() {\n ProjectStatus status = createProjectStatus(5);\n setEntity(status);\n }",
"private void addStage(Stage s) {\r\n\t\tstages[num_stages] = s;\r\n\t\tnum_stages++;\r\n\t}",
"@Test\n public void a_create() {\n String url = baseUrl + \"create\";\n System.out.println();\n System.out.println(\"volunteerProvince being posted: \"+volunteerProvince);\n ResponseEntity<VolunteerProvince> postResponse = testRestTemplate\n .withBasicAuth(SECURITY_USERNAME, SECURITY_PASSWORD)\n .postForEntity(url, volunteerProvince, VolunteerProvince.class);\n volunteerProvince = postResponse.getBody();\n assertNotNull(postResponse.getBody());\n assertEquals(volunteerProvince.getVolunteerNum(), postResponse.getBody().getVolunteerNum());\n System.out.println(\"Volunteer Province saved on the data structure: \"+postResponse.getBody());\n\n }",
"@java.lang.Override\n public int getStageValue() {\n return stage_;\n }",
"@BodyParser.Of(BodyParser.Json.class)\n public Result create(Long id) {\n Script script = Script.find.byId(id);\n if (script != null) {\n JsonNode json = request().body().asJson();\n String name = json.findPath(\"name\").textValue();\n String description = json.findPath(\"description\").textValue();\n\n models.Preset preset = models.Preset.createDummyPreset(name, description, script);\n\n return ok(Json.toJson(preset));\n }\n return notFound();\n }",
"public long ashirPostCreating(AshirBlogPostingHelper post) {\n long result;\n\n SQLiteDatabase db = this.getWritableDatabase();\n ContentValues values = new ContentValues();\n values.put(Col_2, post.getPost());\n values.put(Col_3, post.getImage());\n //inserting valuse into table columns\n result = db.insert(NAME_OF_TABLE, null, values);\n db.close();\n return result;\n\n }",
"public Post(long timeStamp, String userName, Long postId) {\n this.arrivalTime = timeStamp;\n this.userName = userName;\n this.totalScore = 10;\n this.postId = postId;\n }",
"@Override\n protected void onPostCreate(Bundle savedState) {\n super.onPostCreate(savedState);\n }",
"Post save(Post post) throws Exception;",
"@Override\r\n\tpublic void addPost(Post post) {\n\t\tgetHibernateTemplate().save(post);\r\n\t}",
"public void getSceneDetails() {\n Intent sceneIntent = getIntent();\n //TODO: set member strings = intent extras\n storyId = sceneIntent.getStringExtra(\"storyId\");\n chapterId = sceneIntent.getStringExtra(\"chapterId\");\n sceneId = sceneIntent.getStringExtra(\"selectedSceneId\");\n\n getAllFormFields();\n\n setSceneFormFields();\n }",
"Achievements getPostDetails();",
"@Override\n\tpublic void addPost(Scanner sc) {\n\t\tPost p = new Post();\n\t\tp.setMemberId(cur.getId());\n\t\tsc.nextLine();\n\t\tSystem.out.print(\"제목: \");\n\t\tp.setPostName(sc.nextLine());\n\t\tSystem.out.print(\"내용: \");\n\t\tp.setContent(sc.nextLine());\n\t\tdao.insertPost(p);\n\t}",
"public CreateDeploymentInput withStageName(String stageName) {\n this.stageName = stageName;\n return this;\n }",
"private void setStage() {\n\t\tstage = new Stage();\n\t\tstage.setScene(myScene);\n\t\tstage.setTitle(title);\n\t\tstage.show();\n\t\tstage.setResizable(false);\n//\t\tstage.setOnCloseRequest(e -> {\n//\t\t\te.consume();\n//\t\t});\n\t}"
] | [
"0.6155691",
"0.6086447",
"0.60396326",
"0.57346463",
"0.56497633",
"0.5648374",
"0.5621819",
"0.555878",
"0.551881",
"0.5513078",
"0.548688",
"0.54825026",
"0.54745865",
"0.5452223",
"0.5451578",
"0.5430193",
"0.5375346",
"0.53720003",
"0.53720003",
"0.53720003",
"0.5355367",
"0.534237",
"0.5336255",
"0.5303106",
"0.5281105",
"0.52718455",
"0.5258849",
"0.52369255",
"0.52343714",
"0.51863205",
"0.5154346",
"0.5110971",
"0.510553",
"0.5100901",
"0.50961053",
"0.5092429",
"0.508809",
"0.5081961",
"0.50694996",
"0.5059281",
"0.5051853",
"0.50459915",
"0.50310457",
"0.50310457",
"0.50206244",
"0.5002028",
"0.49975786",
"0.49861452",
"0.49703026",
"0.4969624",
"0.49678552",
"0.49666613",
"0.49651182",
"0.4965016",
"0.49600863",
"0.49545506",
"0.49384236",
"0.49255568",
"0.49237865",
"0.49211028",
"0.4917824",
"0.49159274",
"0.4893726",
"0.487605",
"0.48751748",
"0.4870945",
"0.48634964",
"0.48593777",
"0.4843516",
"0.4835566",
"0.48284662",
"0.48263878",
"0.48094958",
"0.4801522",
"0.4797716",
"0.47920826",
"0.4790103",
"0.47844335",
"0.47790048",
"0.4775134",
"0.47723275",
"0.47682512",
"0.47534385",
"0.47486806",
"0.47484025",
"0.47446412",
"0.47438556",
"0.4739732",
"0.4737653",
"0.47332346",
"0.4724062",
"0.47239557",
"0.47202608",
"0.47155845",
"0.47040305",
"0.47000596",
"0.46986824",
"0.46928185",
"0.46875483",
"0.46865237"
] | 0.6169905 | 0 |
Displays the reply List in TableView | private VBox showReplyList(Post post) {
ArrayList<Reply> reply = Post.getReplies(post.getId());
TableView<Reply> tableView = new TableView<Reply>();
if(post instanceof Event) {
TableColumn<Reply, String> responder = new TableColumn<Reply, String>("Users Participating in the Event");
responder.setCellValueFactory(new PropertyValueFactory<>("responderId"));
responder.setMinWidth(500);
responder.setStyle("-fx-alignment: CENTER");
tableView.getColumns().add(responder);
for(int i = 0; i < reply.size(); i++) {
tableView.getItems().add(reply.get(i));
}
}
else if(post instanceof Job || post instanceof Sale) {
TableColumn<Reply, String> responder = new TableColumn<Reply, String>("Responder ID");
responder.setCellValueFactory(new PropertyValueFactory<>("responderId"));
responder.setStyle("-fx-alignment: CENTER");
responder.setMinWidth(150);
TableColumn<Reply, Double> offerValue = new TableColumn<Reply, Double>("Offer Amount");
offerValue.setCellValueFactory(new PropertyValueFactory<>("value"));
offerValue.setStyle("-fx-alignment: CENTER");
offerValue.setMinWidth(150);
tableView.getColumns().add(responder);
tableView.getColumns().add(offerValue);
for (int i = reply.size() - 1; i >= 0; i--) {
tableView.getItems().add(reply.get(i));
}
}
Text replyTitle = new Text("Reply Details");
replyTitle.setFont(Font.font("Tahoma", FontWeight.BOLD, 20));
VBox vbox = new VBox(replyTitle, tableView);
return vbox;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic List<ReplyDTO> listReply(Integer bno) {\n\t\treturn replyMapper.list(bno);\r\n\t}",
"@RequestMapping(\"/reply_view\")\n\tpublic String reply_view(HttpServletRequest request, Model model) {\n\t\tBDto dto = dao.reply_view(request.getParameter(\"bId\"));\n\t\tmodel.addAttribute(\"reply_view\", dto);\n\t\treturn \"reply_view\";\n\t}",
"@Override\n\tpublic List<boardDTO> replyList(String reply_code) throws Exception {\n\t\treturn sqlSession.selectList(namespace+\".replyList\", reply_code);\n\t}",
"private void initTableView() {\n\t\ttry {\r\n\t\t\tlist = LoginList.userList();\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tSystem.out.println(list);\r\n\t\t// 조회된 데이터 tableView 에 넣기\r\n\r\n\t\tlogColIp.setCellValueFactory(new PropertyValueFactory<LoginUser, String>(\r\n\t\t\t\t\"ip\"));\r\n\t\tlogColId.setCellValueFactory(new PropertyValueFactory<LoginUser, String>(\r\n\t\t\t\t\"id\"));\r\n\t\tlogColSdi\r\n\t\t\t\t.setCellValueFactory(new PropertyValueFactory<LoginUser, String>(\r\n\t\t\t\t\t\t\"port\"));\r\n\r\n\t\tlogTableView.setItems(FXCollections.observableArrayList(list));\r\n\t\tlogTableView.getSelectionModel().select(-1);\r\n\t\t// listView 이벤트 등록\r\n\t\tlogTableView.getSelectionModel().selectedItemProperty()\r\n\t\t\t\t.addListener(new ChangeListener<LoginUser>() {\r\n\t\t\t\t\tpublic void changed(\r\n\t\t\t\t\t\t\t// 토나오는 코드..\r\n\t\t\t\t\t\t\tObservableValue<? extends LoginUser> observable,\r\n\t\t\t\t\t\t\tLoginUser oldValue, LoginUser newValue) {\r\n\t\t\t\t\t\tif (newValue != null) {\r\n\t\t\t\t\t\t\tlu = newValue;\r\n\t\t\t\t\t\t\tinitTextFeild();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\tlogTableView.addEventFilter(MouseEvent.MOUSE_CLICKED,\r\n\t\t\t\tnew EventHandler<MouseEvent>() {\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\t// 이거도 토나오네...\r\n\t\t\t\t\tpublic void handle(MouseEvent mouseEvent) {\r\n\t\t\t\t\t\tif (mouseEvent.getButton().equals(MouseButton.PRIMARY)) {\r\n\t\t\t\t\t\t\tif (mouseEvent.getClickCount() == 2) {\r\n\t\t\t\t\t\t\t\thandleButtonAction(mouseEvent);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t}",
"@Override\r\n\tpublic List<ReplyVO> list(int bno) {\n\t\treturn replyDAO.list(bno);\r\n\t}",
"@Override\r\n public int getCount() {\n return chatList.size();\r\n }",
"@Override\n public int getCount() {\n return chatList.size();\n }",
"@Override\r\n\tpublic int getCount() {\n\t\treturn msgList.size();\r\n\t}",
"private void updateListViewLogWindow()\n {\n listViewMessageItems.clear();\n\n for(int i =0;i<= printResult.size() - 1;i++)\n {\n listViewMessageItems.add(printResult.get(i));\n }\n\n }",
"@RequestMapping(\"/reply\")\n\tpublic String reply(HttpServletRequest request, Model model) {\n\t\tdao.reply(request.getParameter(\"bId\"), \n\t\t\t\trequest.getParameter(\"bName\"), \n\t\t\t\trequest.getParameter(\"bTitle\"), \n\t\t\t\trequest.getParameter(\"bContent\"),\n\t\t\t\trequest.getParameter(\"bGroup\"), \n\t\t\t\trequest.getParameter(\"bStep\"), \n\t\t\t\trequest.getParameter(\"bIndent\"));\n\t\treturn \"redirect:list\";\n\t}",
"public void viewList() {\n\t\tSystem.out.println(\"Your have \" + contacts.size() + \" contacts:\");\n\t\tfor (int i=0; i<contacts.size(); i++) {\n\t\t\tSystem.out.println((i+1) + \". \" \n\t\t\t\t\t+ contacts.get(i).getName() + \" number: \" \n\t\t\t\t\t+ contacts.get(i).getPhoneNum());\n\t\t}\n\t}",
"@Override\n\tpublic int getCount() {\n\n\t\treturn msgList.size();\n\t}",
"@Override\n public int getCount() {\n return messages.size();\n }",
"public void showIngredients() {\n list = dbController.getIngredientsList();\n\n idColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, Integer>(\"id\"));\n nameColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, String>(\"name\"));\n caloriesColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, Double>(\"calories\"));\n proteinColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, Double>(\"protein\"));\n fatColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, Double>(\"fat\"));\n carbohydratesColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, Double>(\"carbohydrates\"));\n selectColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, CheckBox>(\"select\"));\n\n TableView.setItems(list);\n }",
"public void SessionView(){\n\n\n Connection con = SQliteConnection.DBconnect();\n ResultSet rs = null;\n try {\n rs = con.createStatement().executeQuery(\"SELECT * FROM Sessions\");\n System.out.println(\"In the view Quiry\");\n\n while (rs.next()) {\n observableList.add(new Room(rs.getInt(\"id\"),rs.getString(\"session\"),rs.getString(\"room\"),rs.getString(\"sessionDetails\")));\n }\n\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n }\n\n id.setCellValueFactory(new PropertyValueFactory<>(\"id\"));\n session.setCellValueFactory(new PropertyValueFactory<>(\"session\"));\n room.setCellValueFactory(new PropertyValueFactory<>(\"room\"));\n sessionDetails.setCellValueFactory(new PropertyValueFactory<>(\"sessionDetails\"));\n tableView.setItems(observableList);\n\n\n\n\n }",
"@Override\n\t\tpublic void initList() {\n\t\t\tadapter = new MsgItemAdapter(context);\n\t\t\tArrayList<MsgBean> datas = getData();\n\t\t\tadapter.setData(datas);\n\t\t\tmListView.setAdapter(adapter);\n\t\t\tmListView.setViewMode(true, true);\n\t\t\tif(!DataValidate.checkDataValid(datas)){\n\t\t\t\tpageView.setDefaultPage().setVisibility(View.VISIBLE);\n\t\t\t}\n\t\t}",
"private void displayChatMessage() {\n ListView listOfMessage = (ListView) findViewById(R.id.list_of_messages);\n adapter = new FirebaseListAdapter<ChatMessage>(this, ChatMessage.class,\n R.layout.list_messages, FirebaseDatabase.getInstance().getReference()) {\n @Override\n protected void populateView(View v, ChatMessage model, int position) {\n\n TextView messageText,messageUser,messageTime;\n messageText = (TextView) v.findViewById(R.id.message_text);\n messageUser = (TextView) v.findViewById(R.id.message_user);\n messageTime = (TextView) v.findViewById(R.id.message_time);\n\n messageText.setText(model.getMessageText());\n messageUser.setText(model.getMessageUser());\n messageTime.setText(DateFormat.format(\"dd-MM-yyyy (HH:mm:ss)\",\n model.getMessageTime()));\n }\n };\n listOfMessage.setAdapter(adapter);\n }",
"private void ShowData() {\n\t\tif (messages != null) {\r\n\t\tAdapterMessages tva = new AdapterMessages(this, messages,R.layout.messages_row);\r\n\t\tsetListAdapter(tva);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tnew AlertDialog.Builder(this).setTitle(\"Error\")\r\n\t\t\t.setPositiveButton(\"OK\", null).setMessage(\r\n\t\t\t\t\t\"There was an error retrieving your messages, check your login information or try again later.\")\r\n\t\t\t.show();\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic List<ComReplyVO> comscrollreplylist(Map<String, String> map) throws Exception {\n\t\treturn dao.comscrollreplylist(map);\r\n\t}",
"private void updateLists(){\n subjects.clear();\n for(Message m : user.getMessages()){\n subjects.add(String.format(\"From - %-\" + (40 - m.getFrom().length()) +\"s %20s\", m.getFrom(), m.getTimestamp().substring(0,16)));\n }\n listViewAdapter.notifyDataSetChanged();\n }",
"public ChatView() {\n\t\t// Load Font and Style Sheet\n\t\tFont.loadFont(Resources.el_font, 20);\n\t\tgetStylesheets().add(Resources.Css_ChatView);\n\n\t\t// Creating \"Chat Messages\" observable list and list view\n\t\tthis.chatMessages = FXCollections.observableArrayList();\n\t\t\n\t\tthis.lstChatMessages = new ListView<String>(chatMessages);\n\t\tthis.lstChatMessages.setPrefWidth(780);\n\t\tthis.lstChatMessages.setPrefHeight(780);\n\t\tthis.lstChatMessages.setStyle(\"\");\n\t\t//\t this.lstChatMessages.setPadding(new Insets(0,10,0,10));\n\t\tthis.lstChatMessages.setStyle(\"-fx-background-color: white;\");\n\t\tthis.lstChatMessages.setId(\"chatMessages\");\n\t\tthis.lstChatMessages.setCellFactory(\n\t\t\t\tnew Callback<ListView<String>, ListCell<String>>() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic ListCell<String> call(ListView<String> lstChatMessages) {\n\t\t\t\t\t\tfinal ListCell<String> cell =\n\t\t\t\t\t\t\t\tnew ListCell<String>() {\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tsetPrefWidth(5);\n\t\t\t\t\t\t\t\tsetWrapText(true);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tprotected void updateItem(String item, boolean empty) {\n\t\t\t\t\t\t\t\tsuper.updateItem(item, empty);\n\t\t\t\t\t\t\t\tif (item == null) {\n\t\t\t\t\t\t\t\t\tsetText(null);\n\t\t\t\t\t\t\t\t\tsetStyle(null);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tsetText(item);\n\t\t\t\t\t\t\t\t\tsetStyle(\"-fx-font-family: 'Elianto Regular';\");\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\treturn cell;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tthis.lstChatMessages.setId(\"lstChatMessages\");\n\t\tthis.lstChatMessages.setItems(getChatMessages());\n\n\n\t\t// Setup Labels\n\t\tthis.title = new Text(\"Chat\");\n\t\tthis.title.setOnMouseClicked(e -> {slideChat();});\n\t\t\n\t\tthis.title.setId(\"Title\");\n\t\tthis.lblCharactersLeft = new Label(Integer.toString(this.maxCharacters));\n\t\tthis.lblCharactersLeft.setId(\"lblCharactersLeft\");\n\n\t\t// Setup Message Text Input\n\t\tthis.textInputMessage = new TextField();\n\t\tthis.textInputMessage.prefWidthProperty().bind(lstChatMessages.widthProperty().multiply(0.8));\n\t\tthis.textInputMessage.setPrefHeight(40);\n\t\tthis.textInputMessage.setFont(Font.loadFont(Resources.el_font, 16));\n\n\t\tfinal UnaryOperator<Change> limit = c -> {\n\t\t\tif (c.isContentChange()) {\n\t\t\t\tint newLength = c.getControlNewText().length();\n\t\t\t\tif (newLength > maxCharacters) {\n\t\t\t\t\tc.setText(c.getControlText());\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn c;\n\t\t};\n\t\tfinal UnaryOperator<Change> chatFilter =\n\t\t\t\tchange -> { // Setup Filter\n\t\t\t\t\tif (change.getControlNewText().length() > maxCharacters) {\n\t\t\t\t\t\tnumCharactersLeft = 0;\n\t\t\t\t\t\tlblCharactersLeft.setText(Integer.toString(numCharactersLeft));\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tnumCharactersLeft = maxCharacters - change.getControlNewText().length();\n\t\t\t\t\t\tlblCharactersLeft.setText(Integer.toString(numCharactersLeft));\n\t\t\t\t\t\treturn change;\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tthis.textInputMessage.setTextFormatter(new TextFormatter<>(limit));\n\t\t\t\tthis.textInputMessage.setTextFormatter(new TextFormatter<>(chatFilter));\n\t\t\t\tthis.textInputMessage.setOnKeyPressed(\n\t\t\t\t\t\tnew EventHandler<KeyEvent>() {\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void handle(KeyEvent keyEvent) {\n\t\t\t\t\t\t\t\tif ((keyEvent.getCode() == KeyCode.ENTER) && (!keyEvent.isAltDown())) {\n\t\t\t\t\t\t\t\t\tkeyEvent.consume();\n\t\t\t\t\t\t\t\t\tString message = textInputMessage.getText();\n\t\t\t\t\t\t\t\t\ttextInputMessage.clear();\n\t\t\t\t\t\t\t\t\tsendMessage(message);\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\tthis.textInputMessage.setId(\"textInputMessage\");\n\n\n\t\t\t\t// Setup Send Button\n\t\t\t\tButton sendBtn = new Button(\"Send\");\n\t\t\t\tsendBtn.prefWidthProperty().bind(lstChatMessages.widthProperty().multiply(0.2));\n\t\t\t\tsendBtn.setOnAction(e ->{ // Show deck\n\t\t\t\t\tsendMessage(textInputMessage.getText());\n\t\t\t\t});\n\n\t\t\t\tStackPane top = new StackPane();\n\t\t\t\ttop.getChildren().add(lstChatMessages);\n\n\t\t\t\tHBox bottom = new HBox(5);\n\t\t\t\tbottom.setAlignment(Pos.CENTER);\n\t\t\t\tbottom.getChildren().addAll(textInputMessage, sendBtn);\n\t\t\t\tbottom.setPadding(new Insets(0,0,10,0));\n\n\n\t\t\t\t// Put all together\n\t\t\t\tthis.container = new VBox(10);\n\t\t\t\tcontainer.setAlignment(Pos.BOTTOM_CENTER);\n\t\t\t\tcontainer.getChildren().addAll(lstChatMessages, bottom, title);\n\t\t\t\tcontainer.setPadding(new Insets(10,10,10,10));\n\t\t\t\tcontainer.setId(\"chat\");\n\n\t\t\t\tthis.getChildren().add(container);\n\t}",
"@Override\r\n\tpublic int getCount() {\n\t\t\r\n\t\treturn chat.size(); \r\n\t}",
"public void fetRowList() {\n try {\n data.clear();\n if (rsAllEntries != null) {\n ObservableList row = null;\n //Iterate Row\n while (rsAllEntries.next()) {\n row = FXCollections.observableArrayList();\n //Iterate Column\n for (int i = 1; i <= rsAllEntries.getMetaData().getColumnCount(); i++) {\n row.add(rsAllEntries.getString(i));\n }\n data.add(row);\n }\n //connects table with list\n table.setItems(data);\n // cell instances are generated for Order Status column and then colored\n customiseStatusCells();\n\n } else {\n warning.setText(\"No rows to display\");\n }\n } catch (SQLException ex) {\n System.out.println(\"Failure getting row data from SQL \");\n }\n }",
"private void display()\n {\n tasksColumn.setCellValueFactory(new PropertyValueFactory<>(\"task\"));\n completionDateColumn.setCellValueFactory(new PropertyValueFactory<>(\"completionDate\"));\n completedColumn.setCellValueFactory(new PropertyValueFactory<>(\"completed\"));\n\n listView.getItems().add(Item.getToDoList().get(index));\n index++;\n }",
"public TableView sponsorsTable(ArrayList<Person> list)\n\t{\n\t\tTableColumn<Person, String> addColumn = new TableColumn<>(\"Address\");\n\t\taddColumn.setMinWidth(200);\n\t\taddColumn.setCellValueFactory(new PropertyValueFactory<>(\"address\"));\n\n\t\tTableColumn<Person, String> emailColumn = new TableColumn<>(\"Email\");\n\t\temailColumn.setMinWidth(200);\n\t\temailColumn.setSortable(false);\n\t\temailColumn.setCellValueFactory(new PropertyValueFactory<>(\"email\"));\n\n\t\tTableColumn<Person, String> phoneNumberColumn = new TableColumn<>(\"phoneNumber\");\n\t\tphoneNumberColumn.setMinWidth(80);\n\t\tphoneNumberColumn.setSortable(false);\n\t\tphoneNumberColumn.setCellValueFactory(new PropertyValueFactory<>(\"phoneNumber\"));\n\n\t\tTableColumn<Person, String> nameColumn = new TableColumn<>(\"Name\");\n\t\tnameColumn.setMinWidth(200);\n\t\tnameColumn.setSortable(false);\n\t\tnameColumn.setCellValueFactory(new PropertyValueFactory<>(\"name\"));\n\n\t\tTableColumn<Person, Integer > idColumn = new TableColumn<>(\"ID\");\n\t\tidColumn.setMinWidth(50);\n\t\tidColumn.setSortable(false);\n\t\tidColumn.setCellValueFactory(new PropertyValueFactory<>(\"ID\"));\n\t\t\n\t\ttable = new TableView<Person>();\n\t\ttable.setItems(ReadWrite.getAnimal(list));\n\t\ttable.getColumns().addAll(idColumn, nameColumn, addColumn, emailColumn, phoneNumberColumn);\n\n\t\treturn table;\n\t}",
"private void reply(HttpServletRequest request, HttpServletResponse response) throws IOException {\n\t\tint id = Integer.parseInt(request.getParameter(\"id\"));\r\n\t\tcomplainVo complainVo = new complainVo();\r\n\t\tcomplainVo.setComplainId(id);\r\n\t\tcomplainDao complainDao = new complainDao();\r\n\t\tList ls = complainDao.edit(complainVo);\r\n\t\tHttpSession session = request.getSession();\r\n\t\tsession.setAttribute(\"replyList\", ls);\r\n\t\t\r\n\t\tresponse.sendRedirect(\"Admin/replyComplain.jsp\");\r\n\t}",
"@Override\n protected void iniView()\n {\n txtHead = (TextView) findViewById(R.id.txtHead);\n imgBack = (ImageView) findViewById(R.id.img_left);\n\n txtHead.setText(\"回复列表\");\n\n TopicID = this.getIntent().getExtras().getString(\"TopicID\").toString();\n LeftID = this.getIntent().getExtras().getString(\"LeftID\").toString();\n listview = (ListView) findViewById(R.id.listview_postlist);\n TopicType = this.getIntent().getExtras().getString(\"TopicType\").toString();\n }",
"private void displayList(){\n\t\tmArrayAdapter.clear();\n\t\tBT.setupBT();\n\n\t\tListView newDevicesListView = (ListView)\n\t\t\t\tdialog.findViewById(R.id.device_list_display);\n\n\t\tnewDevicesListView.setAdapter(mArrayAdapter);\n\t\tnewDevicesListView.setClickable(true);\n\t}",
"public void showListData() {\n List<Operator> operators = operatorService.queryAll();\n String[][] datas = new String[operators.size()][8];\n for (int i = 0; i < datas.length; i++) {\n datas[i][0] = operators.get(i).getId().toString();\n datas[i][1] = operators.get(i).getName();\n datas[i][2] = operators.get(i).getSex();\n datas[i][3] = operators.get(i).getAge().toString();\n datas[i][4] = operators.get(i).getIdentityCard();\n datas[i][5] = operators.get(i).getWorkDate().toString();\n datas[i][6] = operators.get(i).getTel();\n datas[i][7] = operators.get(i).getAdmin().toString();\n }\n operatorManagetable.setModel(new DefaultTableModel(\n datas, new String[]{\"编号\", \"用户名\", \"性别\", \"年龄\", \"证件号\", \"工作时间\", \"电话号码\", \"是否为管理员\"}\n ));\n scrollPane1.setViewportView(operatorManagetable);\n }",
"private void showListView()\n {\n SimpleCursorAdapter adapter = new SimpleCursorAdapter(\n this,\n R.layout.dataview,\n soldierDataSource.getCursorALL(), //\n _allColumns,\n new int[]{ R.id.soldierid, R.id.username, R.id.insertedphone, R.id.password},\n 0);\n\n table.setAdapter(adapter);\n }",
"private void createTableArea() {\n\t\tthis.tableModel = new MessagesTableModel();\n\t\tthis.conversation = new JTable(this.tableModel);\n\t\tthis.conversation.setRowSelectionAllowed(false);\n\t\tthis.conversation.getColumn(\"Pseudo\").setMaxWidth(150);\n\t\tthis.conversation.getColumn(\"Message\").setWidth(200);\n\t\tthis.conversation.getColumn(\"Heure\").setMaxWidth(50);\n\t\tthis.conversation.getColumn(\"Message\").setCellRenderer(new WrapTableCellRenderer());\n\t\tthis.conversation.getColumn(\"Pseudo\").setCellRenderer(new ColorTableCellRenderer());\n\t\tthis.scrollPane = new JScrollPane(conversation);\n\t}",
"private void addReplyPanel(final HTMLPanel root, final ConversationDTO c) {\n\t\tFluidContainer container = new FluidContainer();\n\n\t\t// alert row\n\t\tRow row = new FluidRow();\n\t\tcom.github.gwtbootstrap.client.ui.Column col = new com.github.gwtbootstrap.client.ui.Column(10);\n\t\tfinal Alert info = new Alert();\n\t\tinfo.setVisible(false);\n\t\tcol.add(info);\n\t\trow.add(col);\n\t\tcontainer.add(row);\n\n\t\t// TextArea row\n\t\trow = new Row();\n\t\tcom.github.gwtbootstrap.client.ui.Column replyTextCol =\n\t\t new com.github.gwtbootstrap.client.ui.Column(10);\n\n\t\treplyTextCol.setOffset(1);\n\t\tHTMLPanel replyPanel = new HTMLPanel(\"\");\n\n\t\tfinal ControlGroup replyTextAreaCg = new ControlGroup();\n\t\tfinal TextArea replyTextArea = new TextArea();\n\t\treplyTextArea.addStyleName(style.replyTextArea());\n\t\tfinal HelpInline replyTextAreaHelpInline = new HelpInline();\n\t\treplyTextAreaHelpInline.setStyleName(style.helpinline());\n\t\treplyTextAreaCg.add(replyTextArea);\n\n\t\treplyTextAreaCg.add(replyTextAreaHelpInline);\n\t\treplyPanel.add(replyTextAreaCg);\n\t\treplyTextCol.add(replyPanel);\n\t\trow.add(replyTextCol);\n\t\tcontainer.add(row);\n\n\t\t// buttons\n\t\tRow buttonRow = new Row();\n\t\tcom.github.gwtbootstrap.client.ui.Column replyBtnCol =\n\t\t new com.github.gwtbootstrap.client.ui.Column(1);\n\t\treplyBtnCol.setOffset(1);\n\t\tbuttonRow.add(replyBtnCol);\n\n\t\tButton replyBtn = new Button(\"Reply\");\n\t\treplyBtn.setType(ButtonType.PRIMARY);\n\t\treplyBtnCol.add(replyBtn);\n\t\treplyBtn.addClickHandler(new ClickHandler() {\n\t\t\t@Override\n\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\tinfo.setVisible(false);\n\t\t\t\tValidationResult result = FieldVerifier.validateTweet(replyTextArea.getText());\n\t\t\t\tif (!result.isValid()) {\n\t\t\t\t\treplyTextAreaCg.setType(ControlGroupType.ERROR);\n\t\t\t\t\treplyTextAreaHelpInline.setText(result.getErrors().get(0).getErrorMessage());\n\t\t\t\t\treplyTextAreaHelpInline.setVisible(true);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\treplyTextAreaCg.setType(ControlGroupType.NONE);\n\t\t\t\treplyTextAreaHelpInline.setVisible(false);\n\n\t\t\t\tConversationDTO conversation = new ConversationDTO();\n\t\t\t\tconversation.setId(c.getId());\n\t\t\t\tconversation.setSender(c.getSender());\n\t\t\t\tconversation.setReceiver(c.getReceiver());\n\t\t\t\tconversation.setSubject(c.getSubject());\n\t\t\t\tconversation.setStatus(ConversationStatus.READ);\n\t\t\t\tconversation.setTimeUpdated(new Date());\n\t\t\t\tconversation.getMessages().addAll(c.getMessages());\n\t\t\t\tMessageDTO m = new MessageDTO();\n\t\t\t\tm.setMessage(replyTextArea.getText());\n\t\t\t\tm.setTimeCreated(new Date());\n\t\t\t\tif (c.isSender()) {\n\t\t\t\t\tm.setReceiver(c.getReceiver());\n\t\t\t\t\tm.setSender(c.getSender());\n\t\t\t\t} else {\n\t\t\t\t\tm.setReceiver(c.getSender());\n\t\t\t\t\tm.setSender(c.getReceiver());\n\t\t\t\t}\n\t\t\t\tconversation.add(m);\n\t\t\t\tpresenter.sendMessage(conversation);\n\t\t\t\treplyTextArea.setText(\"\");\n\t\t\t}\n\t\t});\n\n\t\tcom.github.gwtbootstrap.client.ui.Column backBtnCol =\n\t\t new com.github.gwtbootstrap.client.ui.Column(2);\n\t\tbuttonRow.add(backBtnCol);\n\n\t\tButton backBtn = new Button(\"Back\");\n\t\tbackBtn.addStyleName(style.button());\n\t\tbackBtnCol.add(backBtn);\n\t\tbackBtn.addClickHandler(new ClickHandler() {\n\t\t\t@Override\n\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\tgetConversations();\n\t\t\t\tclearConversationTable();\n\t\t\t}\n\t\t});\n\t\tcontainer.add(buttonRow);\n\t\troot.add(container);\n\t}",
"public void displayDataUpListView() {\n\t\ttry {\n\t\t\t// lay tat ca cac du lieu trong sqlite\n\t\t\talNews = qlb.getAllNewsDaTa();\n\t\t\tmListView.setAdapter(new AdapterListNewsSaved(\n\t\t\t\t\tActivity_News_Saved_List.this));\n\t\t} catch (Exception e) {\n\t\t\tmListView.setAdapter(null);\n\t\t}\n\n\t}",
"public void inboxTable()\r\n\t{\r\n\t\tArrayList columnNames = new ArrayList();\r\n\t\tArrayList data = new ArrayList();\r\n\t\tDefaultTableModel model = new DefaultTableModel(new String[]{\"mailID\", \"From\", \"Subject\", \"Time Sent\"}, 0 );\r\n\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\tString query = \"select mailID, sender, mailSubject, date_format(timeSent, \\\"%b %d %a %r\\\") as timeSent from mails where mailType = 's' and recipient = ? order by timeSent DESC\";\r\n\t\t\tpreparedStatement = connect.prepareStatement(query);\r\n\t\t\tpreparedStatement.setString(1, email_address);\r\n\t\t\tresultSet = preparedStatement.executeQuery();\r\n\t\t\t\r\n\t\t\t/*\r\n\t\t\t * while the resultSet has another row returned, the columns returned from the database are stored and assigned added to a row in the table model\r\n\t\t\t * the data from each column from the database can be stored by getting the value at the column name in the database\r\n\t\t\t * when added to the row it will be in order of how the table model column names are shown.\r\n\t\t\t */\r\n\t\t\twhile(resultSet.next())\r\n\t\t\t{\r\n\t\t\t\tString col1 = resultSet.getString(\"mailID\");\r\n\t\t\t\tString col2 = resultSet.getString(\"sender\");\r\n\t\t\t String col3 = resultSet.getString(\"mailSubject\");\r\n\t\t\t String col4 = resultSet.getString(\"timeSent\");\r\n\t\t\t\tmodel.addRow(new Object[] {col1, col2, col3, col4});\r\n\t\t\t}\r\n\r\n\t\t\t/*\r\n\t\t\t * after the table model has been populated it is then placed in the inbox table\r\n\t\t\t * once the inbox table is populated we collapse the mailID column so that the data is not displayed but still be used to obtain data from the database\r\n\t\t\t * \r\n\t\t\t */\r\n\t\t\ttableInbox.setModel(model);\r\n\t\t\ttableInbox.getColumnModel().getColumn(0).setMinWidth(0);\r\n\t\t\ttableInbox.getColumnModel().getColumn(0).setMaxWidth(0);\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}",
"private void viewList() {\r\n PrintListMenuView listMenu = new PrintListMenuView();\r\n listMenu.displayMenu();\r\n }",
"@FXML\n public void initialize() {\n EventManager.getInstance().registerListener(MessageEvent.class, this::getMessage);\n EventManager.getInstance().registerListener(ChangeChatEvent.class, this::changeChat);\n\n messages = FXCollections.observableArrayList();\n sortedMessages = new SortedList<>(messages, Comparator.comparing(IMessageIn::getTimeStamp));\n messageView.setItems(sortedMessages);\n\n messageView.setCellFactory(param -> new ListCell<IMessageIn>() {\n @Override\n protected void updateItem(IMessageIn item, boolean empty) {\n super.updateItem(item, empty);\n if (empty || item == null){\n setText(null);\n setGraphic(null);\n } else {\n setText(item.getUser().getName() + \" | \" + item.getContent());\n }\n setOnMouseEntered(event -> {\n if (empty || item == null){\n setText(null);\n setGraphic(null);\n } else {\n Tooltip tt = new Tooltip(\"\" + item.getTimeStamp());\n setTooltip(tt);\n }\n\n });\n }\n });\n // Scrolls to the newest message\n Platform.runLater( () -> messageView.scrollTo(messages.size()-1) );\n Platform.runLater(() -> {\n ScrollBar bar = (ScrollBar) messageView.lookup(\".scroll-bar:vertical\");\n bar.valueProperty().addListener((observableValue, number, t1) -> {\n if (number.doubleValue() != 0 && t1.doubleValue() == 0 && canGetMore) {\n int page = messages.size() / 20;\n RequestResponse<List<? extends IMessageIn>> response = GUI.getInstance().getBusiness().getMessages(page);\n List<? extends IMessageIn> newMessages = response.getResponse();\n newMessages.removeAll(messages);\n if (!newMessages.isEmpty()) {\n messages.addAll(newMessages);\n messageView.scrollTo(response.getResponse().get(0));\n } else {\n canGetMore = false;\n }\n }\n });\n });\n }",
"@Override\n public void initialize(URL url, ResourceBundle rb) {\n tableColumID.setCellValueFactory(new PropertyValueFactory<>(\"id\"));\n tableColumUsuario.setCellValueFactory(new PropertyValueFactory<>(\"usuario\"));\n tableColumFecha.setCellValueFactory(new PropertyValueFactory<>(\"fecha\"));\n tableColumMensaje.setCellValueFactory(new PropertyValueFactory<>(\"mensaje\"));\n listaChat = cnx.listarMensajes();\n tableViewChat.setItems(listaChat);\n txtMensaje.requestFocus();\n }",
"private void setOnListView() {\n\t\tlist.setItems(obs);\n\t\tlist.setCellFactory(new Callback<ListView<User>, ListCell<User>>(){\n\n\t\t\t@Override\n\t\t\tpublic ListCell<User> call(ListView<User> p) {\n\t\t\t\t\n\t\t\t\tListCell<User> cell = new ListCell<User>() {\n\t\t\t\t\t\n\t\t\t\t\t@Override \n\t\t\t\t\tprotected void updateItem(User s, boolean bln) {\n\t\t\t\t\t\tsuper.updateItem(s, bln);\n\t\t\t\t\t\tif(s != null) {\n\t\t\t\t\t\t\tsetText(s.getUserName());\n\t\t\t\t\t\t}else\n\t\t\t\t\t\t\tsetText(\"\");\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\treturn cell;\n\t\t\t}\n\t\t});\n\t}",
"private void populateFriendsTables(){\r\n TableLayout tl = (TableLayout) findViewById(R.id.friendTable);\r\n tl.removeAllViews();\r\n TableRow row, titleRow;\r\n TextView view, titleViewEmail, tileViewButton;\r\n\r\n List<String> friends = (List<String>) mFriendData.get(\"friends\");\r\n\r\n titleRow = new TableRow(getApplicationContext());\r\n titleViewEmail = new TextView(getApplicationContext());\r\n titleViewEmail.setText(\"Friend Email\");\r\n titleViewEmail.setPadding(20, 20, 20, 20);\r\n\r\n tileViewButton = new TextView(getApplicationContext());\r\n tileViewButton.setText(\"Remove\");\r\n tileViewButton.setPadding(20, 20, 20, 20);\r\n\r\n titleRow.addView(titleViewEmail);\r\n titleRow.addView(tileViewButton);\r\n\r\n tl.addView(titleRow);\r\n for (String email : friends) {\r\n row = new TableRow(getApplicationContext());\r\n view = new TextView(getApplicationContext());\r\n view.setText(email);\r\n view.setPadding(20, 20, 20, 20);\r\n\r\n TextView button = new Button(getApplicationContext());\r\n button.setText(\"Remove Friend\");\r\n button.setPadding(20, 20, 20, 20);\r\n\r\n row.addView(view);\r\n row.addView(button);\r\n tl.addView(row);\r\n }\r\n }",
"private void hookUpMessageListAdapter(){\n DeviceSingleton deviceSingleton = DeviceSingleton.getInstance();\n this.arrayAdapter = new ArrayAdapter<String>(\n this,\n android.R.layout.simple_list_item_1,\n deviceSingleton.getTempTextArray() );\n// messageList.setAdapter(arrayAdapter);\n\n\n //ADD MessageAdapter here to replace above stuff\n messageObjectList = deviceSingleton.getMessages();\n messageList = (ListView) findViewById(R.id.listView);\n messageObjectAdapter = new MessageAdapter(this, R.layout.single_row, messageObjectList);\n messageList.setAdapter(messageObjectAdapter);\n ///////////////////////////////////////////\n }",
"@Override\n\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t ViewHolder viewHolder; \n\t if (convertView == null) {\n\t \tviewHolder=new ViewHolder();\n\t\t\tconvertView = inflater.inflate(R.layout.item_comment, null);\n\t\t\tviewHolder.commentAuthorName = (TextView) convertView\n\t\t\t\t\t.findViewById(R.id.tv_comment_author);\n\t\t\tviewHolder.commentContent = (TextView) convertView\n\t\t\t\t\t.findViewById(R.id.tv_comment_text);\n\t\t\tviewHolder.replyTo=(TextView) convertView.findViewById(R.id.tv_reply_to);\n\t\t\tviewHolder.reply=(TextView) convertView.findViewById(R.id.tv_reply);\n\t\t\tconvertView.setTag(viewHolder);\n\t\t} else {\n\t\t\tviewHolder = (ViewHolder) convertView.getTag();\n\t\t\t\n\t\t}\n\t String commentAuthor=commentList.get(position).getCommentAuthor();\n\t if(commentAuthor!=null){\n\t\t viewHolder.commentAuthorName.setText(commentAuthor);\n\t }\n\t\tString commentContent=commentList.get(position).getCommentContent();\n\t\tif(commentContent!=null){\n\t\t\tviewHolder.commentContent.setText(commentContent);\n\t\t}\n\t\tString replyTo=commentList.get(position).getReplyTo();\n\t\tif(replyTo!=null&& !replyTo.equals(\"\")){\n\t\t\tviewHolder.replyTo.setText(replyTo);\n\t\t\tviewHolder.replyTo.setVisibility(View.VISIBLE);\n\t\t\tviewHolder.reply.setVisibility(View.VISIBLE);\n\t\t\t//viewHolder.reply.setTextColor(0xffffff00);\n\t\t}else{\n\t\t\tviewHolder.reply.setVisibility(View.GONE);\n\t\t\tviewHolder.replyTo.setVisibility(View.GONE);\n\t\t}\n\t\treturn convertView;\n\t}",
"@Override\n\t\t\tpublic void handleMessage(Message msg) {\n\t\t\t\tsuper.handleMessage(msg);\n\t\t\t\tswitch (msg.what) {\n\t\t\t\tcase 1:\n\n\t\t\t\t\tlistView.setAdapter(new ListAdaptersujin(ListActivity.this, app\n\t\t\t\t\t\t\t.getList()));\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"@Override\n public int getCount() {\n return mChatListItems.size();\n }",
"@Override\n\tprotected void setupListView() {\n\t\tfinal int elementLayout = R.layout.image_selectable_list_item;\n\t\tfinal int imageView = R.id.imageView1;\n\t\tfinal int textView = R.id.textView1;\n\n\t\tmQueryListener = new QueryListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onError() {\n\t\t\t\tmAdapter = null;\n\t\t\t\tsetListAdapter(null);\n\t\t\t\tgetListView().invalidateViews();\n\t\t\t\tsetEmptyText(getString(R.string.retrievalError));\n\t\t\t\tmProgressBar.setVisibility(View.GONE);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onDataChange(double data, boolean saved) {\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onDataChange(boolean data, boolean saved) {\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onDataChange(ObjectPrx data, boolean saved) {\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onDataChange(QueryModel data, boolean saved) {\n\t\t\t\tif (saved) {\n\t\t\t\t\tmQueryModel = data;\n\t\t\t\t\tArrayList<UserTypPrx> adapterData = new ArrayList<UserTypPrx>(\n\t\t\t\t\t\t\tdata.data.size());\n\t\t\t\t\tfor (ObjectPrx oprx : data.data)\n\t\t\t\t\t\tadapterData.add(UserTypPrxHelper.checkedCast(oprx));\n\t\t\t\t\tif (mAdapter == null) {\n\t\t\t\t\t\tmAdapter = new UserListAdapter(MyMessagesActivity.this,\n\t\t\t\t\t\t\t\telementLayout, imageView, textView, adapterData);\n\t\t\t\t\t\tsetListAdapter(mAdapter);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmAdapter.addAll(adapterData);\n\t\t\t\t\t}\n\t\t\t\t\tmAdapter.notifyDataSetChanged();\n\t\t\t\t\tmProgressBar.setVisibility(View.GONE);\n\t\t\t\t\tif (mAdapter.getCount() <= 0)\n\t\t\t\t\t\tsetEmptyText(getString(R.string.noMessagesFound));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}",
"public void insertReply() {\n\r\n\t}",
"public void populateTerms(){\n\n //clear existing view\n table.removeAllViews();\n\n //get existing Terms from Database\n ArrayList<List> allTerms = getTerms();\n\n //fill TableLayout with existing Terms\n for (List<String> list : allTerms){\n\n TableRow row = new TableRow(TermsActivity.this);\n TextView idCol = new TextView(TermsActivity.this);\n TextView nameCol = new TextView(TermsActivity.this);\n TextView startCol = new TextView(TermsActivity.this);\n TextView spaceCol = new TextView(TermsActivity.this);\n TextView endCol = new TextView(TermsActivity.this);\n Button detailBtn = new Button(TermsActivity.this);\n\n //convert dates\n long start = Long.valueOf(list.get(2));\n long end = Long.valueOf(list.get(3));\n\n idCol.setText(list.get(0));\n idCol.setMinWidth(120);\n final String idNum = idCol.getText().toString();\n nameCol.setText(list.get(1));\n nameCol.setMinWidth(250);\n startCol.setText(new SimpleDateFormat(\"MM/dd/yyyy\", Locale.US).format(new Date(start)));\n startCol.setMinWidth(250);\n spaceCol.setMinWidth(45);\n endCol.setText(new SimpleDateFormat(\"MM/dd/yyyy\", Locale.US).format(new Date(end)));\n endCol.setMinWidth(250);\n\n detailBtn.setText(\"Details\");\n detailBtn.setPadding(15,0, 0, 0);\n detailBtn.setOnClickListener(new View.OnClickListener(){\n @Override\n public void onClick(View v){\n\n //put term data into Shared Preferences to send to next activity\n editor.putString(\"term\", idNum);\n editor.commit();\n\n //switch to Details activity\n Intent intent = new Intent(v.getContext(), TermDetailsActivity.class);\n v.getContext().startActivity(intent);\n }\n });\n\n row.addView(idCol);\n row.addView(nameCol);\n row.addView(startCol);\n row.addView(spaceCol);\n row.addView(endCol);\n row.addView(detailBtn);\n table.addView(row);\n }\n }",
"@Override\n public int getItemCount() {\n return mMessagesList.size();\n }",
"public void displayLoanToJTable()\n {\n DefaultTableModel model = (DefaultTableModel) loan_results_jTable.getModel();\n Object rowData[] = new Object[7];\n for(int i = 0; i < _list.size(); i++)\n {\n rowData[0] = _list.get(i)._Bname;\n rowData[1] = _list.get(i)._LoanId;\n rowData[2] = _list.get(i)._ISBN;\n rowData[3] = _list.get(i)._CardId;\n rowData[4] = _list.get(i)._DateOut;\n rowData[5] = _list.get(i)._DueDate;\n rowData[6] = _list.get(i)._DateIn; \n model.addRow(rowData);\n } \n }",
"@Override\n\tprotected void iniView() {\n\t\ttxtHead = (TextView) findViewById(R.id.txtHead);\n\t\timgBack = (ImageView) findViewById(R.id.img_left);\n\n\t\ttxtHead.setText(\"回复列表\");\n\t\tlistview = (ListView) findViewById(R.id.listview_postlist);\n\t}",
"@GetMapping(\"/administrator/replies\")\n\tpublic List<ReactReply> getAllRepliesa() {\n\t\tSystem.out.println(\"get all replies (employee) request received\");\n\t\t\treturn replyService.getAllReplies(); //no logic here, just a call to service when the request is received.\n\n\t}",
"@Override\n\t\tpublic int getCount() {\n\t\t\treturn answers.size();\n\t\t}",
"@Override\n\tprotected String getListView() {\n\t\tthis.getRequest().setAttribute(\"typeList\",PhoneMemberEnum.values());\n\t\tthis.getRequest().setAttribute(\"useList\",PhoneMemberUseEnum.values());\n\t\tthis.getRequest().setAttribute(\"customerId\", ParamUtils.getParamValue(PhoneMemberUtil.CMCT_CUSOMETID));\n\t\tthis.getRequest().setAttribute(\"state\", \"UNUSE\");\n\t\tthis.getRequest().setAttribute(\"org\", SystemUtil.getCurrentOrg());\n\t\treturn \"cmct/phone/phoneUnMatchList\";\n\t}",
"public synchronized void doUpdateChatListView(Message msg)\n {\n Bundle b = msg.getData();\n String next = b.getString(Constants.CHAR);\n chatList.add(new CustomString(next,Constants.SENDER_DEVICE));\n customAdapter.notifyDataSetChanged();\n\n }",
"public List<DoubtReply> repliesDB(String did) throws SQLException {\n\t\tString sql = \"select (select UNAME from users where UID=d.UID ) as uname,\"\n\t\t\t\t\t+ \"d.DMSG,d.DRDT from doubts_reply d where d.did=? order by d.DRDT desc;\";\n\t\tPreparedStatement preparedStatement = conn.prepareStatement(sql);\n\t\tpreparedStatement.setString(1, did);\n\t\tResultSet resultSet = preparedStatement.executeQuery();\n\t\tList<DoubtReply> replies = new ArrayList<>();\n\t\tDoubtReply dr;\n\t\twhile(resultSet.next()) {\n\t\t\tdr = new DoubtReply(\n\t\t\t\t\tresultSet.getString(\"uname\"),\n\t\t\t\t\tresultSet.getString(\"DMSG\"),\n\t\t\t\t\tresultSet.getString(\"DRDT\")\n\t\t\t\t\t);\n\t\t\treplies.add(dr);\n\t\t}\n\t\treturn replies;\n\t}",
"void populateFriendList() {\n \t\n \tfriendList = controller.Main.getUser().getFriendList();\n\n \tdisplayFriendList.getChildren().clear();\n\n\t\tSessionFactory sessionFactory = new Configuration().configure().buildSessionFactory();\n\t\tSession session = sessionFactory.openSession();\n\t\tsession.beginTransaction();\n\t\t\n \tfor(int i = 0; i < friendList.size(); i++) {\n \t\t\n \t\t// logging stuff\n \t\tSystem.out.println(\"\\nfetching then setting button to username: \" + friendList.get(i).getFriend().getUsername() +\n \t\t\t\t\t\t \" by getting userID: \" + friendList.get(i).getFriend().getUserId() + \" from friendList\");\n \t\t//Fetch user by userId from user_friend \n \t\tQuery query = session.createQuery(\"from User where userId = '\" + friendList.get(i).getFriend().getUserId() + \"'\");\n \t\t\n \t\tUser friend = (User) query.list().get(0);\n \t\t\n \t\tJFXButton btnStartChat = new JFXButton(friend.getUsername());\n \t\tbtnStartChat.setMaxWidth(Double.MAX_VALUE);\n \t\tbtnStartChat.setStyle(\"-fx-font: 15xp; -fx-background-color: #60b0f4; -fx-text-fill: #ffffff;\");\n \t\t\n \t\tfinal int pos = i;\n \t\t\n \t\t// setting button onAction\n \t\tbtnStartChat.setOnAction(actionEvent -> {\n \t\t\t\n \t\t\t// create a new tab and sets tab to username of selected friend and sets closable to true\n \t\t\tTab newTab = new Tab(friendList.get(pos).getFriend().getUsername());\n \t\t\t\n \t\t\t// creating a new int variable to hold the userId of this friend (used for checking if the message sent from server\n \t\t\t// meant for this friend)\n \t\t\tUser friendId = friendList.get(pos).getFriend();\n \t\t\t\n \t\t\t// be able to close the tab\n \t\t\tnewTab.setClosable(true);\n \t\t\t\n \t\t\t// start adding things to the newTab\n \t\t\t// declaring list view to display sent and received messages\n \t\t\tListView<String> messageDisplayArea = new ListView<String>();\n \t\t\t\n \t\t//Fetch user by userId from user_friend \n// \t\tQuery query2 = session.createQuery(\"from Message where sender_id = '\" + controller.Main.getUser().getUserId() + \"' OR receiver_id = '\" + controller.Main.getUser().getUserId());\n \t\t\n// \t\tfor(Message temp: (Message)query2.list()) {\n// \t\t\t\n// \t\t\tSystem.out.println(\"message = '\" + temp.getMessage() + \"' sent to = \" + temp.getRecieverId());\n// \t\t}\n \t\t\t \t\t\t\n \t\t\t// declaring a textArea to type messages in \n \t\t\tTextArea typeMessage = new TextArea();\n \t\t\t\n \t\t\t// declaring a new button to send typed messages\n \t\t\tJFXButton btnSend = new JFXButton(\"Send\");\n \t\t\t \t\t\t\n \t\t\t// setting action listener for btnSend\n \t\t\tbtnSend.setOnAction(actionEvent1 -> {\n \t\t\t\t\n \t\t\t\t// new message object created with senderId: logged in user's ID, recieverId: friendId, message: text from typeMessage\n \t\t\t\tMessage outgoingMessage = new Message(Main.getUser() /*senderId*/, friendId /* recieverId */, typeMessage.getText());\n \t\t\t\t\n \t\t\t\tSystem.out.println(\"sending message to: \" + friendId.getUserId());\n \t\t\t\t\n \t\t\t\t// try/catch for sending message to server\n \t\t\t\ttry {\n\t\t\t\t\t\tobjectOutputStream.writeObject(outgoingMessage);\n\t \t\t\t\tobjectOutputStream.flush();\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n \t\t\t\t\n \t\t\t\tmessageDisplayArea.getItems().add(\"sent: \" + outgoingMessage.getMessage());\n \t\t\t\t\n \t\t\t});\n \t\t\t\n \t\t\t// delcaring new hbox to hold typeMessage\n \t\t\tHBox hBox = new HBox();\n \t\t\t\n \t\t\t// setting the typeMessage node in hBox to aways grow horizontally\n \t\t\thBox.setHgrow(typeMessage, Priority.ALWAYS);\n \t\t\t\n \t\t\t// adding typeMessage and btnSend to hBox\n \t\t\thBox.getChildren().addAll(typeMessage, btnSend);\n \t\t\t\n \t\t\t// declaring a new VBox to hold list view and hbox containing typeMessage and btnSend\n \t\t\tVBox vBox = new VBox();\n \t\t\t\n \t\t\t// setting the messageDisplyaArea node to always grow vertically\n \t\t\tvBox.setVgrow(messageDisplayArea, Priority.ALWAYS);\n \t\t\t\n \t\t\t// adding messageDisplayArea and hBox to the vBox\n \t\t\tvBox.getChildren().addAll(messageDisplayArea, hBox);\n \t\t\t\n \t\t\t// adding vBox to newTab\n \t\t\tnewTab.setContent(messageDisplayArea);\n \t\t\tnewTab.setContent(vBox); \n \t\t\t// end adding stuff to newTab\n \t\t\t\n \t\t\t// add tab to the tab pane\n \t\t\ttabPane.getTabs().add(newTab);\n \t\t\t\n \t\t\t// solution from: https://examples.javacodegeeks.com/desktop-java/javafx/javafx-concurrency-example/\n \t\t // XXX: garbage solution as mentioned in above URL\n \t\t\t// start a thread to listen for messages from the server\n \t\t\tRunnable listenerTask = new Runnable() {\n\n \t\t\t\t@Override\n \t\t\t\tpublic void run() {\n \t\t\t\t\t\n \t\t\t\t\tSystem.out.println(\"ListenerTask thread started\");\n \t\t\t\t\t\n \t\t\t\t\twhile(true) {\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\t// used for getting messages from the server\n \t\t\t\t\t\t\tMessage incomingMessage = (Message) objectInputStream.readObject();\n \t\t\t\t\t\t\t\n \t\t\t\t\t\t\t// checking if the message gotten from server meant for this friend (by comparing friendId (declared above)\n \t\t\t\t\t\t\t// with incomingMessage's senderId field\n \t\t\t\t\t\t\tif(incomingMessage.getSenderId().getUserId() == friendId.getUserId()) {\n \t\t\t\t\t\t\t\n \t\t\t\t\t\t\t session.persist(incomingMessage);\n \t\t\t\t\t\t\t \n \t\t\t\t\t\t\t // commiting the new user\n \t\t\t\t\t\t\t session.getTransaction().commit();\n \t\t\t\t\t\t\t\t\n\t \t\t\t\t\t\t\t// adding the received message from server to this messageDisplayArea\n\t \t\t\t\t\t\t\t//TODO: set alignment of received message to the right\n\t \t\t\t\t\t\t\tmessageDisplayArea.getItems().add(\"recieved: \" + incomingMessage.getMessage());\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t\n \t\t\t\t\t\t} catch (ClassNotFoundException e) {\n \t\t\t\t\t\t\t\n \t\t\t\t\t\t\te.printStackTrace();\n \t\t\t\t\t\t} catch (IOException e) {\n\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}\n \t\t\t};\n \t\t\t\n \t\t\t// creating then starting the listenerTask thread\n \t\t\tSystem.out.println(\"Starting ListnerThread\");\n \t\t\tThread listenerTaskThread = new Thread(listenerTask);\n \t\t\tlistenerTaskThread.setDaemon(true);\n \t\t\tlistenerTaskThread.start();\n \t\t\t\n \t\t});\n \t\t\n \t\t// adding the btnStartChat to VBox displayFriendList\n \t\tdisplayFriendList.getChildren().add(btnStartChat);\n \t\t\n \t}\n \t\n \t//session.close();\n }",
"@GET(\"/{interaction-id}/replies\")\n List<GetGlueInteraction> replies(\n @EncodedPath(\"interaction-id\") String interactionId\n );",
"public void draftsTable()\r\n\t{\r\n\t\tArrayList columnNames = new ArrayList();\r\n\t ArrayList data = new ArrayList();\r\n\t DefaultTableModel model = new DefaultTableModel(new String[]{\"mailID\", \"To\", \"Subject\", \"timeSent\"}, 0);\r\n\t \r\n\t\ttry\r\n\t\t{\r\n\t\t\tString query = \"select mailID, recipient, mailSubject, date_format(timeSent, \\\"%b %d %a %r\\\") as timeSent from mails where mailType = 'd' and sender = ? order by timeSent DESC\";\r\n\t\t\tpreparedStatement = connect.prepareStatement(query);\r\n\t\t\tpreparedStatement.setString(1, email_address);\r\n\t\t\tresultSet = preparedStatement.executeQuery();\r\n\t\t\t\r\n\t\t\t/*\r\n\t\t\t * while the resultSet has another row returned, the columns returned from the database are stored and assigned added to a row in the table model\r\n\t\t\t * the data from each column from the database can be stored by getting the value at the column name in the database\r\n\t\t\t * when added to the row it will be in order of how the table model column names are shown.\r\n\t\t\t */\r\n\t\t\twhile(resultSet.next())\r\n\t\t\t{\r\n\t\t\t\tString col1 = resultSet.getString(\"mailID\");\r\n\t\t\t\tString col2 = resultSet.getString(\"recipient\");\r\n\t\t\t String col3 = resultSet.getString(\"mailSubject\");\r\n\t\t\t String col4 = resultSet.getString(\"timeSent\");\r\n\t\t\t model.addRow(new Object[]{col1, col2, col3, col4});\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t/*\r\n\t\t\t * after the table model has been populated it is then placed in the draft table\r\n\t\t\t * once the draft table is populated we collapse the mailID column so that the data is not displayed but still be used to obtain data from the database\r\n\t\t\t * \r\n\t\t\t */\r\n\t\t\ttableDraft.setModel(model);\r\n\t\t\ttableDraft.getColumnModel().getColumn(0).setMinWidth(0);\r\n\t\t\ttableDraft.getColumnModel().getColumn(0).setMaxWidth(0);\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\t\r\n\t}",
"public void populateListView() {\n\n\n }",
"@Override\r\n public void initialize (URL location, ResourceBundle resources) {\n\r\n tableView.setItems(komponenter_list);\r\n\r\n\r\n }",
"public void handleResponse(String resp) {\n\t\tnoteLists = new ArrayList<NotesList>();\t\n Log.d(\"TAG\", resp);\n try {\n\t\t\t//JSONArray items = response.getJSONArray(resp);\n\t\t\t//JSONObject mainObject = new JSONObject(resp);\n \tString parsedData = \"\";\n \tSimpleDateFormat df=new SimpleDateFormat(\"dd/MMM/yyyy hh:mm a\");\n\t\t\tJSONArray items = new JSONArray(resp);\n\t\t\t//Log.d(\"TAG ERROR\", items.length()+\"\");\n\t\t\tfor (int i = 0; i < items.length(); i++) {\n JSONObject c = items.getJSONObject(i);\n \n String id = c.getString(\"Id\"); \n String title = c.getString(\"Topic\"); \n String date = c.getString(\"CreatedAt\"); \n date=date.replace(\"/Date(\", \"\").replace(\")/\", \"\");\n \t\t long time = Long.parseLong(date);\n \t\t Date d= new Date(time);\n \t\t parsedData=df.format(d);\n //String lecturer = c.getString(\"LectureName\");\n // Log.d(\"TAG ERROR\"+ i, lecturer+\"\");\n //String imageUrl = \"http://android-apis.firefightersmagazine-nigeria.com/images/\"+logo;\n\t\t\t\tNotesList model = new NotesList();\n\t\t\t\tmodel.setNoteId(id);\n\t\t\t\tmodel.setNoteTitle(title);\n\t\t\t\tmodel.setNoteDate(parsedData);\n\t\t\t\t//Log.d(\"Title\", title);\n\t\t\t\t//model.setLecturerName(lecturer);\n\t\t\t\tnoteLists.add(model); \n\t\t\t}\n\t\t\tlist = (ListView) this.findViewById(R.id.ongoingcoursenote_list);\n\t\t\tadapter = new NoteAdapter(this.getApplicationContext(), noteLists);\n\t\t\tlist.setAdapter(adapter);\n\t\t\t\n\t\t\tlist.setOnItemClickListener(new OnItemClickListener() {\n\n\t\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\n\t\t\t\t\t\tint position, long id) {\n\t\t\t\t\t// getting values from selected ListItem\n\t\t\t\t\tCourseObject.CourseId = null;\n\t\t\t\t\t// Starting single contact activity\n\t\t\t\t\tIntent in = new Intent(getApplicationContext(),\n\t\t\t\t\t\t\tNotesContents.class);\n\t\t\t\t\t//in.putExtra(\"title\", noteLists.get(position).getNoteTitle());*/\n\t\t\t\t\t//in.putExtra(\"code\", noteLists.get(position).getCourseCode());\n\t\t\t\t\tin.putExtra(\"id\", noteLists.get(position).getNoteId());\n\t\t\t\t\tstartActivity(in);\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n }catch(JSONException ex){\n \tLog.d(\"TAG ERROR\", ex.getMessage());\n }\n }",
"public void displayPatients() {\n DefaultTableModel dm = new DefaultTableModel(0, 0);\n String header[] = new String[]{\"\", \"Nom:\", \"Prénom:\", \"Dg:\", \"Séance:\", \"Date visit\"};\n dm.setColumnIdentifiers(header);\n jTable1.setModel(dm);\n\n \n \n //set the data in the table =>rows\n\n for (int i = 0; i < patients.size(); i++) {\n Patient patient = patients.get(i);\n\n Vector<Object> data = new Vector<Object>();\n data.add(patient.getId());\n data.add(patient.getNom());\n data.add(patient.getPrenom());\n data.add(patient.getDg());\n data.add(patient.getNombre_seance());\n data.add(patient.getDate_visit());\n dm.addRow(data);\n \n }\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.main);\n input = (EditText) findViewById(R.id.input);\n listView = (ListView) findViewById(R.id.listview);\n list = new ArrayList<>();\n adapter = new MyAdapter(this, list);\n listView.setAdapter(adapter);\n handler = new Handler() {\n @Override\n public void handleMessage(Message msg) {\n int what = msg.what;\n switch (what) {\n case 998:\n String receivecontent = (String) msg.obj;\n SimpleDateFormat sDateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n String time = sDateFormat.format(System.currentTimeMillis());\n Messages receivemessages = genernateMessages(receivecontent,\n R.drawable.renma,\n time,\n \"mm\",\n \"receive\");\n list.add(receivemessages);\n adapter.notifyDataSetChanged();\n listView.setSelection(adapter.getCount() - 1);\n break;\n }\n }\n };\n }",
"@Override\n\t\tpublic void handleMessage(Message msg) {\n\t\t\tif (msg.what==1) {\n\t\t\t\tif(myListAdapter != null)\n\t\t\t\t{\n\t\t\t\tmyListAdapter.notifyDataSetChanged();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(list != null)\n\t\t\t\t\tif(list.size() > 0)\n\t\t\t\t\t\tlast_id = (Integer) list.get(list.size() - 1).get(\"id\");\n\t\t\t\tif(listView != null){\n\t\t\t\t\tif(listView.getFooterViewsCount() > 0 && hot_list_footer != null)\n\t\t\t\t\t\tlistView.removeFooterView(hot_list_footer);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tloadable = true;\n\t\t\t}\n\t\t\telse if (msg.what==2) {\n\t\t\t\tmyListAdapter.notifyDataSetChanged();\n\t\t\t\tpg.setVisibility(View.GONE);\n\t\t\t\tif(listView != null){\n\t\t\t\t\tif(listView.getFooterViewsCount() > 0 && hot_list_footer != null)\n\t\t\t\t\t\tlistView.removeFooterView(hot_list_footer);\n\t\t\t\t}\n//\t\t\t\tbt.setVisibility(View.VISIBLE);\n\t\t\t\tloadable = true;\n\t\t\t}\n\t\t\telse if (msg.what==3) {\n\t\t\t\tpg.setVisibility(View.GONE);\n\t\t\t\tbt.setVisibility(View.GONE);\n\t\t\t\tif(listView != null){\n\t\t\t\t\tif(listView.getFooterViewsCount() > 0 && hot_list_footer != null)\n\t\t\t\t\t\tlistView.removeFooterView(hot_list_footer);\n\t\t\t\t}\n\t\t\t\tloadable = true;\n\t\t\t}\n\t\t\telse if (msg.what==4) {\n\t\t\t\t//myListAdapter.notifyDataSetChanged();\n\t\t\t\tlistView.onRefreshComplete();\n\t\t\t\tloadable = true;\n\t\t\t}\n\t\t\telse if(msg.what == 5){\n\t\t\t\tif(listView != null){\n\t\t\t\t\tif(listView.getFooterViewsCount() > 0 && hot_list_footer != null)\n\t\t\t\t\t\tlistView.removeFooterView(hot_list_footer);\n\t\t\t\t}\n\t\t\t\tloadable = true;\n\t\t\t}\n\t\t\tsuper.handleMessage(msg);\n\t\t}",
"public void displayUsers(){\n //go through the userName arraylist and add them to the listView\n for(String val:this.userNames){\n this.userListView.getItems().add(val);\n }\n }",
"private void populateListView() {\n ArrayAdapter<Representative> adapter = new MyListAdapter();\n ListView list = (ListView) findViewById(R.id.repListView);\n list.setAdapter(adapter);\n }",
"public void showPosts() {\n\t\tpostsList.getItems().clear();\n\t\tList<Text> toPost = getPosts();\n\t\tfor(Text text : toPost) {\n\t\t\tSystem.out.println(text);\n\t\t\ttext.wrappingWidthProperty().bind(postsList.widthProperty());\n\t\t\tpostsList.getItems().add(text);\n\t\t}\n\t}",
"public void initializeClientTableViewAdm() {\n\t\tObservableList<Client> clientsList = FXCollections.observableArrayList(restaurant.getClients());\n\n\t\tcolumnClientName.setCellValueFactory(new PropertyValueFactory<Client, String>(\"names\"));\n\t\tcolumnClientLastName.setCellValueFactory(new PropertyValueFactory<Client, String>(\"surnames\"));\n\t\tcolumnClientID.setCellValueFactory(new PropertyValueFactory<Client, String>(\"idNumber\"));\n\t\tcolumnClientAdress.setCellValueFactory(new PropertyValueFactory<Client, String>(\"adress\"));\n\t\tcolumnClientPhoneNumber.setCellValueFactory(new PropertyValueFactory<Client, String>(\"phoneNumber\"));\n\t\tcolumnClientObservations.setCellValueFactory(new PropertyValueFactory<Client, String>(\"observations\"));\n\t\tcolumnClientCondition.setCellValueFactory(new PropertyValueFactory<Client, Condition>(\"condition\"));\n\n\t\ttableViewClientsList.setItems(clientsList);\n\n\t\ttableViewClientsList.setRowFactory(tv -> {\n\t\t\tTableRow<Client> row = new TableRow<>();\n\t\t\trow.setOnMouseClicked(event -> {\n\t\t\t\tif (event.getClickCount() == 2 && (!row.isEmpty())) {\n\t\t\t\t\tClient client = row.getItem();\n\t\t\t\t\ttry {\n\t\t\t\t\t\tFXMLLoader updateClientFxml = new FXMLLoader(getClass().getResource(\"Update-ClientAdm.fxml\"));\n\t\t\t\t\t\tupdateClientFxml.setController(this);\n\t\t\t\t\t\tParent root = updateClientFxml.load();\n\t\t\t\t\t\tmainPane_AdministratorOptionsWindow.getChildren().setAll(root);\n\n\t\t\t\t\t\tLabelUpdateClientNameAdm.setText(client.getNames());\n\t\t\t\t\t\ttxtUpdateClientNamesAdm.setText(client.getNames());\n\t\t\t\t\t\ttxtUpdateClientSurnamesAdm.setText(client.getSurnames());\n\t\t\t\t\t\ttxtUpdateClientIdAdm.setText(client.getIdNumber());\n\t\t\t\t\t\ttxtUpdateClientAdressAdm.setText(client.getAdress());\n\t\t\t\t\t\ttxtUpdateClientPhoneAdm.setText(client.getPhoneNumber());\n\t\t\t\t\t\ttxtUpdateClientObservationsAdm.setText(client.getObservations());\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn row;\n\t\t});\n\t}",
"List<String> showNewsAndMessages();",
"@Override\r\n\tpublic String list() {\n\t\tList<HeadLine> dataList=new ArrayList<HeadLine>();\r\n\t\tPagerItem pagerItem=new PagerItem();\r\n\t\tpagerItem.parsePageSize(pageSize);\r\n\t\tpagerItem.parsePageNum(pageNum);\r\n\t\t\r\n\t\tLong count=headLineService.count();\r\n\t\tpagerItem.changeRowCount(count);\r\n\t\t\r\n\t\tdataList=headLineService.pager(pagerItem.getPageNum(), pagerItem.getPageSize());\r\n\t\tpagerItem.changeUrl(SysFun.generalUrl(requestURI, queryString));\r\n\t\t\r\n\t\trequest.put(\"DataList\", dataList);\r\n\t\trequest.put(\"pagerItem\", pagerItem);\r\n\t\t\r\n\t\t\r\n\t\treturn \"list\";\r\n\t}",
"@Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n tableLayoutChat.removeAllViews();\n for (DataSnapshot postSnapshot : dataSnapshot.getChildren()) {\n //getting artist;\n ChatMessage chatMessage = postSnapshot.getValue(ChatMessage.class);\n String theMessege=chatMessage.getMessage();\n String theSender=chatMessage.getSender();\n String theTime=chatMessage.getTime();\n\n\n TableRow header=new TableRow(AcceptedTaskActivity.this);\n ViewGroup.MarginLayoutParams params = new ViewGroup.MarginLayoutParams(\n ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);\n header.setLayoutParams(params);\n\n TextView sender = new TextView(AcceptedTaskActivity.this);\n sender.setGravity(Gravity.LEFT);\n if (theSender.equals(userName)){\n sender.setTextColor(Color.BLUE);\n }\n else{\n sender.setTextColor(Color.GREEN);\n }\n sender.setText(theSender);\n\n TextView time = new TextView(AcceptedTaskActivity.this);\n time.setGravity(Gravity.LEFT);\n time.setTextColor(Color.GRAY);\n time.setText(theTime);\n //Log.d(\"theTime\",theTime);\n\n\n TableRow body=new TableRow(AcceptedTaskActivity.this);\n body.setLayoutParams(params);\n TextView message = new TextView(AcceptedTaskActivity.this);\n message.setGravity(Gravity.LEFT);\n\n message.setText(theMessege);\n\n TableRow spacing=new TableRow(AcceptedTaskActivity.this);\n spacing.setLayoutParams(params);\n TextView space = new TextView(AcceptedTaskActivity.this);\n\n\n header.addView(sender);\n header.addView(time);\n body.addView(message);\n spacing.addView(space);\n\n tableLayoutChat.addView(header, params);\n tableLayoutChat.addView(body, params);\n tableLayoutChat.addView(spacing,params);\n scrolview.fullScroll(ScrollView.FOCUS_DOWN);\n\n }\n\n }",
"public void Show_Products_in_jTable()\n {\n ArrayList<Patient> list = getPatientList();\n DefaultTableModel model = (DefaultTableModel) jTablePatient.getModel();\n //Clear jTable;\n model.setRowCount(0);\n Object[] row = new Object[5];\n for(int i=0;i<list.size();i++)\n {\n row[0] = list.get(i).getID();\n row[1] = list.get(i).getName();\n row[2] = list.get(i).getAge();\n row[3] = list.get(i).getContactNumber();\n row[4] = list.get(i).getDoctor();\n \n model.addRow(row);\n }\n }",
"private void setupListView() {\n potList = loadPotList();\n arrayofpots = potList.getPotDescriptions();\n refresher(arrayofpots);\n }",
"private void refresh(){\r\n if (!clientList.isEmpty()){\r\n clientList.clear();\r\n clientList = FXCollections.observableArrayList(Client.clientList());\r\n } \r\n table.setItems(clientList);\r\n }",
"public void printList() {\n userListCtrl.showAll();\n }",
"private void mostrarMensajes() {\r\n\t\tint indice=tablaMensajes.getSelectionIndex();\r\n\t\ttablaMensajes.removeAll();\r\n\t\tint i = 0;\r\n\t\tint numNuevos = 0;\r\n\t\t// Crear una fuente cursiva y otra negrita\r\n\t\tFontData[] fd = tablaMensajes.getFont().getFontData();\r\n\t\tfd[0].setStyle(SWT.ITALIC);\r\n\t\tFont fCursiva = new Font(tablaMensajes.getDisplay(),fd);\r\n\t\tfd[0].setStyle(SWT.BOLD);\r\n\t\tFont fNegrita = new Font(tablaMensajes.getDisplay(),fd);\r\n\t\tColor yellow = new Color(tablaMensajes.getDisplay(),255,255,0);\r\n\t\t\t\r\n\t\twhile (vista.getEmpleados().size()>0 && i + primerMensaje < vista.getTodosMensajesEntrantes().size() && i < vista.getNum_men_hoja()) {\r\n\t\t\tTableItem tItem = new TableItem(tablaMensajes, SWT.NONE);\r\n\t\t\tif (vista.getTodosMensajesEntrantes().get(vista.getTodosMensajesEntrantes().size()-i-1-primerMensaje).isMarcado())\r\n\t\t\t{\r\n\t\t\t\ttItem.setBackground(yellow);\r\n\t\t\t}\r\n\t\t\t//TODO mostrar mensajes leídos o no leídos\r\n\t\t\tif (vista.getTodosMensajesEntrantes().get(vista.getTodosMensajesEntrantes().size()-i-1-primerMensaje).isLeido()) \r\n\t\t\t{\r\n\t\t\t\ttItem.setImage(vista.getImagenes().getIco_mens_l());\r\n\t\t\t}\t\r\n\t\t\telse \r\n\t\t\t{\r\n\t\t\t\ttItem.setImage(vista.getImagenes().getIco_mens());\r\n\t\t\t\ttItem.setFont(fNegrita);\r\n\t\t\t\tnumNuevos++;\r\n\t\t\t}\r\n\t\t\tif (remitentes.size()>i)\r\n\t\t\ttItem.setText(1, remitentes.get(vista.getTodosMensajesEntrantes().size()-i-1));\r\n\t\t\t\r\n\t\t\ttItem.setText(2, Util.recortarTituloTexto(vista.getTodosMensajesEntrantes().get(vista.getTodosMensajesEntrantes().size()-i-1-primerMensaje).getAsunto(), prevAsuntoMens));\r\n\t\t\ttItem.setText(3, Util.recortarContenidoTexto(vista.getTodosMensajesEntrantes().get(vista.getTodosMensajesEntrantes().size()-i-1-primerMensaje).getTexto(), prevTextoMens));\r\n\t\t\ttItem.setText(4, Util.dateAString(vista.getTodosMensajesEntrantes().get(vista.getTodosMensajesEntrantes().size()-i-1-primerMensaje).getFecha()));\r\n\t\t\ttItem.setText(5, Util.dateAStringHora(vista.getTodosMensajesEntrantes().get(vista.getTodosMensajesEntrantes().size()-i-1-primerMensaje).getFecha()));\r\n\t\t\ti++;\r\n\t\t}\r\n\t\tint min;\r\n\t\tif(primerMensaje + vista.getNum_men_hoja()<vista.getTodosMensajesEntrantes().size())\r\n\t\t{\r\n\t\t\tmin = primerMensaje + vista.getNum_men_hoja();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tmin = vista.getTodosMensajesEntrantes().size();\r\n\t\t}\r\n\t\tlMensajes.setText(bundle.getString(\"I02_lab_MostrandoMensajes1\") + \" \" + String.valueOf(primerMensaje+1) + \" \" + \r\n\t\t\t\tbundle.getString(\"I02_lab_MostrandoMensajes2\") + \" \" + String.valueOf(min)+ \" \" + \r\n\t\t\t\tbundle.getString(\"I02_lab_MostrandoMensajes3\") + \" \" + String.valueOf(vista.getTodosMensajesEntrantes().size()));\r\n\t\t/*dMensajes.setText(bundle.getString(\"I02_lab_MostrandoMensajes4\") + \" \" + String.valueOf(numNuevos) + \" \" +\r\n\t\t\t\tbundle.getString(\"I02_lab_MostrandoMensajes5\"));*/\r\n\t\ttablaMensajes.setEnabled(true);\r\n\t\ttablaMensajes.setCursor(new Cursor(tablaMensajes.getDisplay(), SWT.CURSOR_ARROW));\r\n\t\t\r\n\t\tint totalEntrantes = vista.getTodosMensajesEntrantes().size();\r\n\t\tif(primerMensaje+vista.getNum_men_hoja() < totalEntrantes)\r\n\t\t\tbSig = true;\r\n\t\telse \r\n\t\t\tbSig = false;\r\n\t\tbMensSiguientes.setEnabled(bSig);\r\n\t\t\r\n\t\tif(primerMensaje > 0)\r\n\t\t\tbAnt = true;\r\n\t\telse \r\n\t\t\tbAnt = false;\r\n\t\tbMensAnteriores.setEnabled(bAnt);\r\n\t\t\r\n\t\tbActualizar.setEnabled(true);\r\n\t\ttablaMensajes.setSelection(indice);\r\n\t}",
"private void apresentarListaNaTabela() {\n DefaultTableModel modelo = (DefaultTableModel) tblAlunos.getModel();\n modelo.setNumRows(0);\n for (Aluno item : bus.getLista()) {\n modelo.addRow(new Object[]{\n item.getIdAluno(),\n item.getNome(),\n item.getEmail(),\n item.getTelefone()\n });\n }\n }",
"@Override\n\tpublic List<ReplyDTO> select(int num) throws Exception {\n\t\treturn session.selectList(\"ReplyMapper.selectList\",num);\n\t}",
"public List<String> build() {\n equalColSize();\n\n //titlebar\n String message = \"```\" + title + \"```\";\n\n int numRows = columnList.get(0).entries.size();\n int rowIndex = 0;\n String potentialMsg = \"\";\n while (rowIndex < numRows) {\n //for each row, iterate through columns and add entries to potentialMsg\n Iterator<ColumnElement> columnsListIt = columnList.iterator();\n while (columnsListIt.hasNext()) {\n ColumnElement columnElement = columnsListIt.next();\n switch (columnElement.columnType) {\n case HYPERLINK:\n //rowIndex 0 is title row and gets same treatment as ColumnType.DEFAULT\n if (rowIndex != 0) {\n potentialMsg = potentialMsg.concat(\"<\" + columnElement.entries.get(rowIndex) + \"> \");\n break;\n }\n case DEFAULT:\n potentialMsg = potentialMsg.concat(\"`\" + columnElement.entries.get(rowIndex) + \"` \");\n break;\n }\n }\n //Remove last trailing space\n potentialMsg = potentialMsg.trim();\n\n //max char limit is 2000, so if concatenating the potentialMsg to message will be less then 1996, go ahead and concat.\n //if not, add current message to array and then make a new message for the bot to send\n if ((message.length() + potentialMsg.length()) <= 1996) {\n message = message.concat(potentialMsg);\n } else {\n fullMsgList.add(message);\n message = potentialMsg;\n }\n\n //end of row\n message = message.concat(\"\\n\");\n potentialMsg = \"\";\n rowIndex++;\n }\n fullMsgList.add(message);\n return fullMsgList;\n }",
"public static void main_printList(){\n\n table.printApplicantTable();\n\n }",
"public void displayAllPatients() {\r\n\t\ttry {\r\n\t\t\tString query= \"SELECT * FROM patients\";\r\n\t\t\tStatement stm= super.getConnection().createStatement();\r\n\t\t\tResultSet results= stm.executeQuery(query);\r\n\t\t\twhile(results.next()) {\r\n\t\t\t\tString[] row= new String[7];\r\n\t\t\t\trow[0]= results.getInt(1)+\"\";\r\n\t\t\t\trow[1]= results.getString(2);\r\n\t\t\t\trow[2]= results.getString(3);\r\n\t\t\t\trow[3]= results.getString(4);\r\n\t\t\t\trow[4]= results.getString(5);\r\n\t\t\t\trow[5]= results.getInt(6)+\"\";\r\n\t\t\t\tmodelHostory.addRow(row);\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(e);\r\n\t\t}\r\n\t}",
"public void chat_list() {\n\n synchronized(chat_room) {\n Set chat_room_set = chat_room.keySet();\n Iterator iter = chat_room_set.iterator();\n\n clearScreen(client_PW);\n client_PW.println(\"------------Chat Room List-----------\");\n while(iter.hasNext()) {\n client_PW.println(iter.next());\n }\n client_PW.flush();\n }\n }",
"@Override\n protected void initView() {\n mListView = (ListView) findViewById(R.id.list);\n ViewGroup.LayoutParams layoutParams = mListView.getLayoutParams();\n layoutParams.width = ViewGroup.LayoutParams.MATCH_PARENT;\n layoutParams.height = AppController.displayMetrics.heightPixels / 2;\n mListView.setLayoutParams(layoutParams);\n\n\n mSelectChatAdapter = new SelectChatAdapter(getContext());\n mListView.setAdapter(mSelectChatAdapter);\n mListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n goToHXMain(\n HXApplication.getInstance().parseUserFromID(HXHelper.yamContactList.get(position)\n .getFirendsUserInfo().getId(), HXConstant.TAG_SHOP));\n }\n });\n }",
"public void initializeUserClientTableView() {\n\t\tObservableList<Client> clientsList = FXCollections.observableArrayList(restaurant.getClients());\n\n\t\tcolumnClientName.setCellValueFactory(new PropertyValueFactory<Client, String>(\"names\"));\n\t\tcolumnClientLastName.setCellValueFactory(new PropertyValueFactory<Client, String>(\"surnames\"));\n\t\tcolumnClientID.setCellValueFactory(new PropertyValueFactory<Client, String>(\"idNumber\"));\n\t\tcolumnClientAdress.setCellValueFactory(new PropertyValueFactory<Client, String>(\"adress\"));\n\t\tcolumnClientPhoneNumber.setCellValueFactory(new PropertyValueFactory<Client, String>(\"phoneNumber\"));\n\t\tcolumnClientObservations.setCellValueFactory(new PropertyValueFactory<Client, String>(\"observations\"));\n\t\tcolumnClientCondition.setCellValueFactory(new PropertyValueFactory<Client, Condition>(\"condition\"));\n\n\t\ttableViewClientsList.setItems(clientsList);\n\n\t\ttableViewClientsList.setRowFactory(tv -> {\n\t\t\tTableRow<Client> row = new TableRow<>();\n\t\t\trow.setOnMouseClicked(event -> {\n\t\t\t\tif (event.getClickCount() == 2 && (!row.isEmpty())) {\n\t\t\t\t\tClient client = row.getItem();\n\t\t\t\t\ttry {\n\t\t\t\t\t\tFXMLLoader updateClientFxml = new FXMLLoader(getClass().getResource(\"Update-Client.fxml\"));\n\t\t\t\t\t\tupdateClientFxml.setController(this);\n\t\t\t\t\t\tParent root = updateClientFxml.load();\n\t\t\t\t\t\tmainPane_OptionsWindow.getChildren().setAll(root);\n\n\t\t\t\t\t\tLabelUpdateClientName.setText(client.getNames());\n\t\t\t\t\t\ttxtUpdateClientNames.setText(client.getNames());\n\t\t\t\t\t\ttxtUpdateClientSurnames.setText(client.getSurnames());\n\t\t\t\t\t\ttxtUpdateClientPhone.setText(client.getPhoneNumber());\n\t\t\t\t\t\ttxtUpdateClientAdress.setText(client.getAdress());\n\t\t\t\t\t\ttxtUpdateClientId.setText(client.getIdNumber());\n\t\t\t\t\t\ttxtUpdateClientObservations.setText(client.getObservations());\n\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn row;\n\t\t});\n\t}",
"@Override\n public void onResponse(JSONObject response) {\n try{\n JSONArray array = response.getJSONArray(\"nodes\");\n// Loop through the array elements\n for(int i=0;i<array.length();i++){\n // Get current json object\n JSONObject speakers = array.getJSONObject(i);\n JSONObject node = speakers.getJSONObject(\"node\");\n\n // Get the current student (json object) data\n String firstname = node.getString(\"first_name\");\n String lastname = node.getString(\"last_name\");\n String organization = node.getString(\"organization\");\n String title = node.getString(\"job_title\");\n\n\n // Display the formatted json data in text view\n responseView.append(firstname +\" \"+ lastname + \" \\n\"+ title +\" - \"+ organization );\n responseView.append(\"\\n\\n\");\n\n// LayoutInflater vi = (LayoutInflater) getApplicationContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n// View v = vi.inflate(R.layout.activity_speaker, null);\n//\n// // fill in any details dynamically here\n// TextView textView = (TextView) v.findViewById(R.id.textViewSpeakers);\n// textView.setText(\"your text\"+ firstname);\n//\n// // insert into main view\n// ViewGroup insertPoint = (ViewGroup) findViewById(R.id.tableViewSpeakers);\n// insertPoint.addView(v, 0, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.FILL_PARENT));\n\n// responseView.addView();\n\n\n }\n }catch (JSONException e){\n e.printStackTrace();\n }\n// responseView.setText(response.toString());\n }",
"public void Display(){\r\n window.setWidth(WIDTH);\r\n window.setHeight(HEIGHT);\r\n window.initModality(Modality.APPLICATION_MODAL);\r\n HBox buttons = new HBox(5);\r\n buttons.getChildren().addAll(select,delete,back);\r\n buttons.setPadding(new Insets(25,15,15,15));\r\n ROOT.setBottom(buttons);\r\n ROOT.setPadding(new Insets(25));\r\n back.setOnAction(e->back(e));\r\n select.setOnAction(e->select(e));\r\n delete.setOnAction(e->delete(e));\r\n window.setScene(new Scene(ROOT));\r\n // Populate the table with info from client list\r\n refresh();\r\n table.getColumns().addAll(cName,cAdd1,cAdd2,cCity,cZip,cCountry,cPhone); \r\n // Set data for column\r\n cName.setCellValueFactory(new PropertyValueFactory<>(\"name\"));\r\n cAdd1.setCellValueFactory(new PropertyValueFactory<>(\"address1\"));\r\n cAdd2.setCellValueFactory(new PropertyValueFactory<>(\"address2\"));\r\n cCity.setCellValueFactory(new PropertyValueFactory<>(\"city\"));\r\n cZip.setCellValueFactory(new PropertyValueFactory<>(\"zip\"));\r\n cCountry.setCellValueFactory(new PropertyValueFactory<>(\"country\"));\r\n cPhone.setCellValueFactory(new PropertyValueFactory<>(\"phone\"));\r\n // Set table factory to allow rows to be clickable\r\n table.setRowFactory(tv ->{\r\n TableRow<Client> row = new TableRow<>();\r\n row.setOnMouseClicked(e ->{\r\n if (!row.isEmpty() && e.getButton() == MouseButton.PRIMARY){\r\n client = row.getItem();\r\n }\r\n });\r\n return row;\r\n });\r\n ROOT.setCenter(table);\r\n window.showAndWait(); \r\n }",
"public ArrayList<Message> getReplyText(java.util.Date time){\n\t ArrayList<Message> M = new ArrayList<Message> ();\n\t try{\n\t\t //STEP 2: Register JDBC driver\n\t\t Class.forName(\"com.mysql.jdbc.Driver\");\n\n\t\t //STEP 3: Open a connection\n\t\t ////System.out.println(\"Connecting to database...\");\n\t\t conn = DriverManager.getConnection(DB_URL,USER,PASS);\n\n\t\t //STEP 4: Execute a query\n\t\t ////System.out.println(\"Creating statement...\");\n\t\t stmt = conn.createStatement();\n\t\t \n\t\t \n\t\t String statement = \"SELECT * FROM `procesed_texts` INNER JOIN `conversations` ON `procesed_texts`.`conversation_id` = `conversations`.`id`\"\n\t\t \t\t +\" INNER JOIN `users` ON `users`.`id` = `conversations`.`user_id`\"\n\t\t \t\t +\" WHERE `procesed_texts`.`reply` IS NOT NULL \"\n\t\t \t\t + \"AND `procesed_texts`.`updated_at` >= '\"+new Timestamp(time.getTime())+\"'\";\n\t\t System.out.println(\"Reply Text Querry : \"+statement);\n\t\t ResultSet rs = stmt.executeQuery(statement);\n\t\t \n\t\t while(rs.next()){\n\t \t\t\t//////System.out.println(\"test III\");\n\t\t //Retrieve by column name\n\t\t //String id = rs.getString(\"facebook_user_id\");\n\t\t String text = rs.getString(\"reply\");\n\t\t String id = rs.getString(\"facebook_conversation_id\");\n\t\t //Display values\n\t\t //////System.out.println(\", Raw Data: \" + rd);\n\t\t Message temp = new Message();\n\t\t temp.setMessage(text);\n\t\t temp.setId(id);\n\t\t M.add(temp);\n\t\t }\n\t\t \n\t\t //STEP 6: Clean-up environment\n\t\t rs.close();\n\t\t stmt.close();\n\t\t conn.close();\n\t\t }catch(SQLException se){\n\t\t //Handle errors for JDBC\n\t\t se.printStackTrace();\n\t\t }catch(Exception e){\n\t\t //Handle errors for Class.forName\n\t\t e.printStackTrace();\n\t\t }finally{\n\t\t //finally block used to close resources\n\t\t try{\n\t\t if(stmt!=null)\n\t\t stmt.close();\n\t\t }catch(SQLException se2){\n\t\t }// nothing we can do\n\t\t try{\n\t\t if(conn!=null)\n\t\t conn.close();\n\t\t }catch(SQLException se){\n\t\t se.printStackTrace();\n\t\t }//end finally try\n\t\t }//end try\n\t \t ////System.out.println(\"Goodbye!\");\n\t //////System.out.println(\"Message Number :\"+Mes.size()); \t \n\t return M;\n\n }",
"@FXML\n public void attTblCidade(){\n \tcidades = Cidade.listarTodas(conn, null);\n \ttblCidade.setItems(FXCollections.observableArrayList(cidades));\n }",
"private void showInbox(){\n getInbox();\n //display persons\n MainActivity.instance().displayPersonsRunnable = new DisplayPersonsRunnable(MainActivity.instance());\n this.thread = new Thread(MainActivity.instance().displayPersonsRunnable);\n this.thread.start();\n }",
"public void vlist(String cid) { \n\t\tString[][] datas = {};\n\t\tString[] titles = {\"Username\",\"User ID\",\"Status\"};\n\t\tvmodel = new DefaultTableModel(datas,titles);\n\t\tvlist = new JTable(vmodel);\n\t\tvlist.setPreferredScrollableViewportSize(new Dimension(400, 200));\n\t\ttry {\n\t\t\t\n\t\t\tFileReader file = new FileReader(\"all.txt\");\n\t\t\tBufferedReader bfr = new BufferedReader(file);\n\t\t\tif(cid.equals(\"\")) {\n\t\t\t\tfor(oneline = bfr.readLine();oneline != null;oneline = bfr.readLine()) {\n\t\t\t\t\treadconsumerinfo = oneline.split(\" \");\n\t\t\t\t\tif(readconsumerinfo[0].equals(\"p\") == false) {\n\t\t\t\t\t\tvmodel.addRow(new String[] {readconsumerinfo[2],readconsumerinfo[0],\" \"});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tfor(oneline = bfr.readLine();oneline != null;oneline = bfr.readLine()) {\n\t\t\t\t\treadconsumerinfo = oneline.split(\" \");\n\t\t\t\t\tif(readconsumerinfo[0].equals(cid) == true) {\n\t\t\t\t\t\tvmodel.addRow(new String[] {readconsumerinfo[2],readconsumerinfo[0],\" \"});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tbfr.close();\n\t\t\tfile.close();\n\t\t\t\n\t\t}\n\t\tcatch(IOException|ArrayIndexOutOfBoundsException e) {\n\t\t\tSystem.out.print(\"Error occured in vlist()\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t\tjspanview = new JScrollPane(vlist);\n\t}",
"public void loadContactListToView(){\r\n\t\ttry {\r\n\t\t\tclientView.clearContactList();\r\n\t\t\tHashMap <Long, String> contactList = userModel.getContactList().getClReader().getContactList();\r\n\t\t\tIterator iter = contactList.entrySet().iterator();\r\n\t\t\tMap.Entry <Long, String> pair;\r\n\t\t\tint i =0;\r\n\t\t\twhile(iter.hasNext()){\r\n\t\t\t\tSystem.out.println(i++);\r\n\t\t\t\tpair = (Map.Entry <Long, String>)iter.next();\r\n\t\t\t\t\tclientView.addNewUserToContactList(pair.getValue()+\" \"+pair.getKey());\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} catch (NumberFormatException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\tclientView.showMsg(\"Contact list can't be loaded\");\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}",
"public void afficherReclamationAdmin(ObservableList<Reclamation> oblist1){\n try {\n PreparedStatement pt1 = c.prepareStatement(\"SELECT id_r, message, etat, date_rec, reponse, prenom, nom FROM reclamation, user where idch=id_u and etat != 'Archivée'\");\n ResultSet rs = pt1.executeQuery();\n while (rs.next()) {\n String fetch = rs.getString(\"prenom\")+\" \"+rs.getString(\"nom\");\n System.out.println(rs.getString(\"reponse\"));\n oblist1.add(new Reclamation(rs.getInt(\"id_r\"), rs.getString(\"message\"), rs.getString(\"etat\"), rs.getString(\"date_rec\"), rs.getString(\"reponse\"), fetch));\n }\n } catch (SQLException ex) {\n Logger.getLogger(ReclamationCRUD.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"private void displayContactDetails() {\n bindTextViews();\n populateTextViews();\n }",
"public void showData(){\n listName.setText(this.listName);\n listDescription.setText(this.description);\n Double Total = Lists.getInstance().getLists(this.listName).getTotal();\n listTotal.setText(pending.toString());\n\n this.data = FXCollections.observableArrayList(Lists.getInstance().getLists(this.listName).getItems());\n articleColumn.setCellValueFactory(\n new PropertyValueFactory<>(\"name\")\n );\n quantityColumn.setCellValueFactory(\n new PropertyValueFactory<>(\"quantity\")\n );\n priceColumn.setCellValueFactory(\n new PropertyValueFactory<>(\"price\")\n );\n totalColumn.setCellValueFactory(\n new PropertyValueFactory<>(\"total\")\n );\n stateColumn.setCellValueFactory(\n new PropertyValueFactory<>(\"state\")\n );\n this.itemsTable.setItems(data);\n\n }",
"@Override\n public void initialize(URL location, ResourceBundle resources) {\n String searchId = Controller.rId;\n char ch1 = searchId.charAt(0);\n\n\n String sql = \"select * from notifications where rolenum = \" + ch1 + \"\";\n\n try {\n Connection conn = DBConnector.getConnection();\n Statement stmt = conn.createStatement();\n ResultSet rs = stmt.executeQuery(sql);\n System.out.println(\"connection succesfull\");\n\n while (rs.next()) {\n System.out.println(\"trying2\");\n oblist.add(new NotificationTable(\n rs.getString(\"nsubj\"),\n rs.getDate(\"ndate\")));\n }\n\n rs.close();\n stmt.close();\n conn.close();\n System.out.println(\"connection closed\");\n\n\n col_nsubj.setCellValueFactory(new PropertyValueFactory<>(\"nsubj\"));\n col_ndate.setCellValueFactory(new PropertyValueFactory<>(\"ndate\"));\n table.setItems(oblist);\n\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n }\n\n }",
"public static void displayResults(List<String> list, String companyName)\n {\n List<Company> lstCompany = new ArrayList<>();\n for (String tickerSymbol: list)\n {\n Hyperlink symbol = new Hyperlink(tickerSymbol);\n symbol.setOnAction(ev -> //Registers event handler \n {\n tfSymbol.setText(symbol.getText()); //Sets TextField Text property in MainStage\n tableData.clear();\n colSymbol.getColumns().clear();\n colName.getColumns().clear();\n stage.hide();\n });\n\n lstCompany.add(new Company(symbol, companyName));\n }\n \n tableData.addAll(lstCompany); //Adds collection of symbols to ObservableList\n tableView.setItems(tableData); \n }",
"@Override\n\tpublic List<ReplyVO> readReply(int f_no) {\n\t\treturn mapper.readReply(f_no);\n\t}",
"public List getReplyList(int id) {\n\t\tString HQL = \"\";\r\n\t\tHQL += \" from XzfyOtherSuggest x\";\r\n\t\tHQL += \" where 1 = 1 and x.parentId =\"+id+\"order by id asc\";\t\r\n\t\treturn super.find(HQL);\r\n\t}",
"@Override\n public void updateContent() {\n lmDriver.getTournaments();\n\n // Show all tournaments in the scene\n table.createTable();\n\n // Disable buttons\n btnJoin.disableProperty().bind(Bindings.isEmpty(tblTournaments.getSelectionModel().getSelectedItems()));\n btnWithdraw.disableProperty().bind(Bindings.isEmpty(tblTournaments.getSelectionModel().getSelectedItems()));\n btnShowInfo.disableProperty().bind(Bindings.isEmpty(tblTournaments.getSelectionModel().getSelectedItems()));\n\n // Clear list\n listLeaderboard.getItems().clear();\n\n // Update global leaderboard\n ArrayList<String> leaderboard = lmDriver.getGlobalLeaderboard();\n\n if (leaderboard.size() == 0) {\n listLeaderboard.getItems().add(\"There are no values yet.\");\n } else {\n listLeaderboard.getItems().add(\"Position Score Player\");\n for (String row : leaderboard) {\n listLeaderboard.getItems().add(row);\n }\n }\n }",
"public List<Comment> getReplies () {\n return replies;\n }",
"@Override\n public void run() {\n lv_list.setSelection(feedBackReplyAdapter.getCount() - 1);\n }"
] | [
"0.6054958",
"0.59757745",
"0.595334",
"0.5891346",
"0.5863859",
"0.5819005",
"0.57870424",
"0.5726953",
"0.5669626",
"0.5656264",
"0.56487495",
"0.5625174",
"0.5617337",
"0.560951",
"0.55930847",
"0.5539735",
"0.55351686",
"0.55336505",
"0.55112946",
"0.55108607",
"0.54896814",
"0.5481933",
"0.54734665",
"0.54633427",
"0.5463268",
"0.5448823",
"0.54435897",
"0.54327977",
"0.5431613",
"0.54275024",
"0.54272723",
"0.54191434",
"0.53863394",
"0.5360921",
"0.53596747",
"0.5352024",
"0.5332824",
"0.5332218",
"0.531299",
"0.5304811",
"0.5297765",
"0.52759725",
"0.5266772",
"0.5261811",
"0.5260899",
"0.5260286",
"0.5217434",
"0.5214169",
"0.51926565",
"0.5187941",
"0.51856756",
"0.5175418",
"0.51726663",
"0.5168528",
"0.51501286",
"0.51489323",
"0.5130344",
"0.5125106",
"0.51247716",
"0.51205546",
"0.5118535",
"0.51127964",
"0.51096666",
"0.5104073",
"0.51003826",
"0.5094614",
"0.5088723",
"0.5088147",
"0.50793034",
"0.50759196",
"0.5071589",
"0.50711757",
"0.50692546",
"0.5065668",
"0.50552535",
"0.5053421",
"0.5039935",
"0.5039104",
"0.5036181",
"0.5026849",
"0.5025331",
"0.50223184",
"0.502162",
"0.5015025",
"0.5011656",
"0.5009574",
"0.5006855",
"0.5006714",
"0.5005958",
"0.5005274",
"0.5004694",
"0.49939322",
"0.49904707",
"0.4980255",
"0.4979366",
"0.49771544",
"0.4970032",
"0.49675295",
"0.49623984",
"0.49607337"
] | 0.79105943 | 0 |
Displays the Post Details in GridPane | public static GridPane showPostDetails(Post post) {
GridPane grid = new GridPane();
grid.setHgap(10);
grid.setVgap(10);
grid.setPadding(new Insets(20, 20, 20, 20));
String imagePath = post.getImagePath();
if(imagePath.equalsIgnoreCase("none") || imagePath.isEmpty()) {
imagePath = "../../Images/No_image_available.jpg";
}
ImageView image = new ImageView(new Image("file:" + imagePath, 300, 300, false, false));
grid.add(image, 0, 0);
Button uploadImage = new Button("Upload Image");
uploadImage.setOnAction(PostDetailsController.uploadImageHandler(postStage, post));
HBox hbBtn = new HBox(300);
hbBtn.getChildren().add(uploadImage);
hbBtn.setAlignment(Pos.BOTTOM_CENTER);
grid.add(hbBtn, 0, 1);
VBox details = new VBox();
details.setSpacing(10);
details.getChildren().add(getLabel("Post ID: ", post.getId(), false, "string"));
details.getChildren().add(getLabel("Title: ", post.getTitle(), true, "string"));
details.getChildren().add(getLabel("Description: ", post.getDescription(), true, "string"));
details.getChildren().add(getLabel("Creator ID: ", post.getCid(), false, "string"));
details.getChildren().add(getLabel("Status: ", post.getStatus(), false, "string"));
if(post instanceof Event) {
details.getChildren().add(getLabel("Venue: ", ((Event) post).getVenue(), true, "string"));
details.getChildren().add(getLabel("Date: ", ((Event) post).getDate(), true, "date"));
details.getChildren().add(getLabel("Capacity: ", Integer.toString(((Event) post).getCapacity()), true, "int"));
details.getChildren().add(getLabel("Attendee Count: ", Integer.toString(((Event) post).getAttcount()), false, "int"));
}
else if(post instanceof Job) {
details.getChildren().add(getLabel("Proposed Price: ", Double.toString(((Job) post).getProprice()), true, "double"));
details.getChildren().add(getLabel("Lowest Offer: ", Double.toString(((Job) post).getLowoffer()), false, "double"));
}
else {
details.getChildren().add(getLabel("Highest Offer: ", Double.toString(((Sale) post).getHighoffer()), false, "double"));
details.getChildren().add(getLabel("Minimum Raise: ", Double.toString(((Sale) post).getMinraise()), true, "double"));
details.getChildren().add(getLabel("Asking Price: ", Double.toString(((Sale) post).getAskprice()), true, "double"));
}
grid.add(details, 3, 0);
Button closePost = new Button("Close Post");
closePost.setOnAction(PostDetailsController.closePostHandler(userId));
Button deletePost = new Button("Delete Post");
deletePost.setOnAction(PostDetailsController.deletePostHandler(userId));
Button savePost = new Button("Save(after edit)");
savePost.setOnAction(PostDetailsController.savePostHandler(userId, post));
Region region1 = new Region();
HBox.setHgrow(region1, Priority.ALWAYS);
Region region2 = new Region();
HBox.setHgrow(region2, Priority.ALWAYS);
HBox btn = new HBox(closePost, region1, deletePost, region2, savePost);
btn.setAlignment(Pos.BOTTOM_CENTER);
grid.add(btn, 3, 1, 10, 1);
return grid;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void showPosts() {\n\t\tpostsList.getItems().clear();\n\t\tList<Text> toPost = getPosts();\n\t\tfor(Text text : toPost) {\n\t\t\tSystem.out.println(text);\n\t\t\ttext.wrappingWidthProperty().bind(postsList.widthProperty());\n\t\t\tpostsList.getItems().add(text);\n\t\t}\n\t}",
"public PostDetails(Post post, String userid) {\n\t\tpostStage = new Stage();\n\t\tpostStage.initModality(Modality.APPLICATION_MODAL);\n\t\tpostDetailsController = new PostDetailsController();\n\t\tuserId = userid;\n\t\t\n\t\tbp = new BorderPane();\n\t\tbp.setPadding(new Insets(5));\n\t\tbp.setTop(showTitle(post));\n\t\tbp.setCenter(showPostDetails(post));\n\t\tbp.setBottom(showReplyList(post));\n\t\t\n\t\tScene mainScene = new Scene(bp, 1000, 600);\n\t\tpostStage.setScene(mainScene);\n\n\t\tpostStage.show();\n\t}",
"private HBox showTitle(Post post) {\t\n\t\tButton backMenu = new Button(\"Back To Main Window\");\n\t\tbackMenu.setOnAction(PostDetailsController.backMenuhandler());\n\t\t\n\t\tRegion region1 = new Region();\n HBox.setHgrow(region1, Priority.ALWAYS);\n \n Region region2 = new Region();\n HBox.setHgrow(region2, Priority.ALWAYS);\n \n Text title = new Text(post.getId() + \" - \" + post.getTitle() + \" : Post Details\");\n title.setFont(Font.font(\"Tahoma\", FontWeight.SEMI_BOLD, 30));\n \n HBox titleBox = new HBox(backMenu, region1, title, region2);\n \n\t\treturn titleBox;\n\t}",
"void displayPostWithId(String id);",
"private void display()\n {\n //Displaying the posts\n newsFeed.show();\n \n }",
"public static void refreshPostDetails(Post post) {\n\t\tbp.setCenter(showPostDetails(post));\n\t}",
"public void bind(Post post) {\n tvDesc.setText(post.getDescription());\n tvUser.setText(post.getUser().getUsername());\n ParseFile image = post.getImage();\n if(image != null) {\n Glide.with(context).load(post.getImage().getUrl()).into(ivPost);\n }\n createdAt = post.getCreatedAt();\n timeAgo = post.calculateTimeAgo(createdAt);\n tvTime.setText(timeAgo);\n }",
"public void bind(Post post) {\n // Profile Picture\n // Username\n tvUsername.setText(post.getUser().getUsername());\n // Post Image\n ParseFile postImage = post.getImage();\n if (postImage != null) {\n Glide.with(context).load(postImage.getUrl()).fitCenter().into(ivPostImage);\n }\n // Description\n tvDescription.setText(post.getDescription());\n // Profile Picture Comment\n // Time Ago\n Date createdAt = post.getCreatedAt();\n String timeAgo = Post.calculateTimeAgo(createdAt);\n tvTimeAgo.setText(timeAgo);\n }",
"@Override\n\tpublic void showPostLocation() {\n\t\t\n\t}",
"public static Result posts() {\n\t\tPost post = new Post();\n\t\tUser user = UserController.loggedInUser();\n\t\tif (user != null) {\n\t\t\tpost.city= user.city;\n\t\t\tpost.state = user.state;\n\t\t\tpost.country = user.country;\n\t\t\tpost.zipcode = user.zipcode;\n\t\t\tpost.createdBy = user.userName;\t\t\t\n\t\t}\n\t\t//TODO:Use bind() instead of the above to avoid 0.0 in price field\n\t\treturn ok(index.render(Post.listPosts(), form(Post.class).fill(post), user));\n\t}",
"public VerticalPanel createPost2(Post post){\n\t\t\tVerticalPanel result = new VerticalPanel();\n\t\t\tLabel lbl = new Label(post.getContent());\n\t\t\tresult.add(lbl);\n\t\t\treturn result;\n\t\t}",
"private VBox showReplyList(Post post) {\n\t\tArrayList<Reply> reply = Post.getReplies(post.getId());\n\t\tTableView<Reply> tableView = new TableView<Reply>();\n\t\tif(post instanceof Event) { \n\t\t TableColumn<Reply, String> responder = new TableColumn<Reply, String>(\"Users Participating in the Event\");\n\t\t responder.setCellValueFactory(new PropertyValueFactory<>(\"responderId\"));\n\t\t responder.setMinWidth(500);\n\t\t responder.setStyle(\"-fx-alignment: CENTER\");\n\t\t tableView.getColumns().add(responder);\n\t\t \n\t\t for(int i = 0; i < reply.size(); i++) {\n\t\t \ttableView.getItems().add(reply.get(i));\n\t\t }\n\t\t}\n\t\telse if(post instanceof Job || post instanceof Sale) {\n\t\t\tTableColumn<Reply, String> responder = new TableColumn<Reply, String>(\"Responder ID\");\n\t\t responder.setCellValueFactory(new PropertyValueFactory<>(\"responderId\"));\n\t\t responder.setStyle(\"-fx-alignment: CENTER\");\n\t\t responder.setMinWidth(150);\n\t\t \n\t\t TableColumn<Reply, Double> offerValue = new TableColumn<Reply, Double>(\"Offer Amount\");\n\t\t offerValue.setCellValueFactory(new PropertyValueFactory<>(\"value\"));\n\t\t offerValue.setStyle(\"-fx-alignment: CENTER\");\n\t\t offerValue.setMinWidth(150);\n\t\t \n\t\t tableView.getColumns().add(responder);\n\t\t tableView.getColumns().add(offerValue);\n\t\t for (int i = reply.size() - 1; i >= 0; i--) {\n\t\t \ttableView.getItems().add(reply.get(i));\n\t\t\t}\n\t\t}\n\t\t\n\t\tText replyTitle = new Text(\"Reply Details\");\n\t\treplyTitle.setFont(Font.font(\"Tahoma\", FontWeight.BOLD, 20));\n\t\t\n\t\tVBox vbox = new VBox(replyTitle, tableView);\n\t\t\n\t\treturn vbox;\n\t}",
"void insertDetailCaptionByPost(Detail detail);",
"public void getPostInfo(String objectId){\n final Post.Query query = new Post.Query();\n query.getTop().withUser();\n query.getInBackground(objectId, new GetCallback<Post>() {\n @Override\n public void done(Post object, ParseException e) {\n if (e == null){\n // populate fields with information\n\n if (!object.getDescription().equals(\"\")){\n SpannableString ss1= new SpannableString(object.getHandle() + \" \");\n ss1.setSpan(new StyleSpan(Typeface.BOLD), 0, ss1.length(), 0);\n tvCaption2.append(ss1);\n tvCaption2.append(object.getDescription());\n } else{\n tvCaption2.setText(\"\");\n tvCaption2.setVisibility(View.GONE);\n }\n\n tvHandle2.setText(object.getHandle());\n if (object.getImage() != null){\n GlideApp.with(PostDetails.this)\n .load(object.getImage().getUrl())\n .placeholder(R.drawable.placeholder)\n .into(ivImage2);\n }\n if (object.getProfileImage() != null) {\n GlideApp.with(PostDetails.this)\n .load(object.getProfileImage().getUrl())\n .transform(new CircleCrop())\n .placeholder(R.drawable.instagram_user)\n .into(ivProfileImage2);\n }\n\n tvTimeStamp2.setText(TimeFormatter.getTimeDifference(object.getCreatedAt().toString()));\n } else{ e.printStackTrace(); }\n }\n });\n }",
"void displayAllPosts();",
"public void help (ArrayList<Post> post)\n {\n adminRecView = findViewById(R.id.adminRecView);\n posts = post;\n ModRecAdapter adapt = new ModRecAdapter(posts, this);\n adminRecView.setAdapter(adapt);\n adminRecView.setLayoutManager(new LinearLayoutManager(this));\n }",
"void displayDetails(String title, String description);",
"public void viewPosts(String typeOfScheme) {\n\t\tSchemeData postData = new SchemeData();\n\t\tHashMap<String, Scheme> data = postData.getSchemeData(typeOfScheme);\n\t\tif (data == null) {\n\t\t\tSystem.out.println(\"empty\");\n\t\t} else\n\t\tSystem.out.println(data.toString());\n\t}",
"public void display() {\n updateTileButtons();\n gridView.setAdapter(new CustomAdapter(tileButtons, columnWidth, columnHeight));\n }",
"@Override\n public String toString() {\n return \"Post number: \" + this.id + \"\\n\" +\n this.content + \"\\n\" +\n \"Written by: \" + this.user.getUsername() + \"\\n\" +\n //The expression below checks if the url\n //field is null. If not, it displays the url.\n //If it is, it just displays an empty string\n \"URL: \" + (this.url != null ? this.url : \"\");\n\n }",
"public BlogPostView() {\n this.blogPost = new BlogPost();\n }",
"public void showPostButton() {\n mPostButton.post(new Runnable() {\n @Override\n public void run() {\n mPostButton.setTranslationY(0);\n }\n });\n }",
"private void showMovieDetails() {\n\n if (movie != null) {\n\n // Display movie title, year, and overview into corresponding labels\n if (movie.getReleaseDate().equals(\"\")) {\n\n lblTitle.setText(movie.getMovieTitle());\n lblOverview.setText(movie.getMovieOverview());\n } else {\n\n lblTitle.setText(String.format(\"%s (%s)\", movie.getMovieTitle(), movie.getReleaseDate()));\n lblOverview.setText(movie.getMovieOverview());\n }\n\n // Display movie media into an image view\n downloadPoster();\n }\n }",
"void bindTo(Post currentPost){\n mUsernameText.setText(currentPost.getUser().getUsername());\n mDescriptionText.setText(currentPost.getDescription());\n mNumOfLikes.setText(String.valueOf(currentPost.getNumberOfLikes()));\n mDate.setText(currentPost.getDate());\n //Get the current sport\n mCurrentPost = currentPost;\n\n //Load the images into the ImageView using the Glide library\n Glide.with(mContext).load(currentPost.\n getImageResource()).placeholder(mGradientDrawable).into(mPostsImage);\n\n Glide.with(mContext).load(currentPost.getUser().\n getImageRes()).placeholder(mGradientDrawable).into(mAvatarImage);\n\n }",
"public void display(){\n\t\tLog.d(\"DISPLAY\", \"Getting Scrollview...\");\r\n\t\tScrollView l = new ScrollView(this);\r\n\t\tLog.d(\"LAYOUT\", \"creating LinearLayout...\");\r\n\t\tLinearLayout lv = new LinearLayout(this);\r\n\t\tlv.setBackgroundColor(Color.WHITE);\r\n\t\tLog.d(\"DISPLAY\", \"Setting LinearLayout orientation...\");\r\n\t\tlv.setOrientation(LinearLayout.VERTICAL);\r\n\t\tLog.d(\"DISPLAY\", \"Adding LinearLayout to ScrollView.....\");\r\n\t\tl.addView(lv);\r\n\t\tLog.d(\"DISPLAY\",\"Creating Title..\");\r\n\t\tTextView title = new TextView(this);\r\n\t\tLog.d(\"DISPLAY\", \"Setting gravity...\");\r\n\t\ttitle.setGravity(Gravity.CENTER);\r\n\t\tLog.d(\"DISPLAY\", \"Setting Text Size..\");\r\n\t\ttitle.setTextSize(30);\r\n\t\tLog.d(\"DISPLAY\", \"Changing text to \\\"funny\\\"\");\r\n\t\ttitle.setText(\"funny\");\r\n\t\ttitle.setTextColor(Color.BLACK);\r\n\t\tLog.d(\"DISPLAY\", \"Adding to ScrollView...\");\r\n\t\tlv.addView(title);\r\n\t\tfor(int i=0; i<posts.size(); i++){\r\n\t\t\ttry {\r\n\t\t\t\t/*\r\n\t\t\t\t * Must create: \r\n\t\t\t\t * {{\r\n\t\t\t\t * linear view for each post\r\n\t\t\t\t * medium text view for each post title\r\n\t\t\t\t * imageview for each post\r\n\t\t\t\t * small view for each author's post\r\n\t\t\t\t * small view for each post comment\r\n\t\t\t\t * }}\r\n\t\t\t\t */\r\n\t\t\t\tfinal CanvasPost p = posts.get(i);\r\n\t\t\t\tLog.v(\"DISPLAY\", \"Trying to set title...\");\r\n\t\t\t\tif(p.title!= null){\r\n\t\t\t\t\ttry{\r\n\t\t\t\t\t\tLog.d(\"DISPLAY\", \"Creating TextView...\");\r\n\t\t\t\t\t\tTextView titlev = new TextView(this);\r\n\t\t\t\t\t\tLog.d(\"DISPLAY\", \"setting title text: \"+p.title);\r\n\t\t\t\t\t\ttitlev.setText(p.title);\r\n\t\t\t\t\t\tLog.d(\"DISPLAY\", \"setting top_sticker text: \"+p.top_sticker_name);\r\n\t\t\t\t\t\ttitlev.setText(p.top_sticker_name);\r\n\t\t\t\t\t\tLog.d(\"DISPLAY\", \"Settings text size to 20...\");\r\n\t\t\t\t\t\ttitlev.setTextSize(20);\r\n\t\t\t\t\t\tLog.d(\"DISPLAY\", \"Settings text color to BLACK...\");\r\n\t\t\t\t\t\ttitlev.setTextColor(Color.BLACK);\r\n\t\t\t\t\t\tLog.d(\"DISPLAY\",\"Adding view to linear layout\");\r\n\t\t\t\t\t\tlv.addView(titlev);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcatch(Exception e){\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\tLog.i(\"TITLE\", \"p.title is null. posturl: \"+p.url);\r\n\t\t\t\tLog.v(\"DISPLAY\", \"Trying to set image...\");\r\n\t\t\t\tif(p.urls.stream != null){\r\n\t\t\t\t\tLog.v(\"DISPLAY\", \"Post url is defined\");\r\n\t\t\t\t\tURL url = new URL(p.urls.stream.name);\r\n\t\t\t\t\tLog.d(\"DISPLAY\", \"Getting URL...\");\r\n\t\t\t\t\tInputStream content = (InputStream)url.getContent();\r\n\t\t\t\t\tLog.d(\"DISPLAY\", \"Creating Drawable from InputStream...\");\r\n\t\t\t\t\tDrawable d = Drawable.createFromStream(content , \"src\");\r\n\t\t\t\t\tLog.d(\"DISPLAY\", \"Creating imageview\");\r\n\t\t\t\t\tImageView im = new ImageView(this);\r\n\t\t\t\t\tLog.d(\"DISPLAY\", \"Adding onclicklistener\");\r\n\t\t\t\t\tim.setOnClickListener(new View.OnClickListener() {\r\n\r\n\t\t\t\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t\t\t\tIntent i = new Intent(getBaseContext(), ThreadViewActivity.class);\r\n\t\t\t\t\t\t\ti.putExtra(\"POSTID\", p.thread_op_id);\r\n\t\t\t\t\t\t\tstartActivity(i);\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\tim.setMinimumHeight(p.urls.stream.h);\r\n\t\t\t\t\tim.setMinimumWidth(p.urls.stream.w);\r\n\t\t\t\t\tLog.d(\"DISPLAY\", \"Setting Image...\");\r\n\t\t\t\t\tim.setImageDrawable(d);\r\n\t\t\t\t\tLog.d(\"DISPLAY\", \"Adding view...\");\r\n\t\t\t\t\tlv.addView(im);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\tLog.i(\"IMG\",\"imgurl is null. posturl: \"+p.url);\r\n\t\t\t\t\r\n\t\t\t\tif(p.caption!=null){\r\n\t\t\t\t\ttry{\r\n\t\t\t\t\t\tLog.d(\"DISPLAY\", \"Creating TextView...\");\r\n\t\t\t\t\t\tTextView titlev = new TextView(this);\r\n\t\t\t\t\t\tLog.d(\"DISPLAY\", \"setting caption text: \"+p.title);\r\n\t\t\t\t\t\ttitlev.setText(p.title);\r\n\t\t\t\t\t\tLog.d(\"DISPLAY\", \"setting top_sticker text: \"+p.top_sticker_name);\r\n\t\t\t\t\t\ttitlev.setText(p.top_sticker_name);\r\n\t\t\t\t\t\tLog.d(\"DISPLAY\", \"Settings text size to 20...\");\r\n\t\t\t\t\t\ttitlev.setTextSize(10);\r\n\t\t\t\t\t\tLog.d(\"DISPLAY\", \"Settings text color to BLACK...\");\r\n\t\t\t\t\t\ttitlev.setTextColor(Color.BLACK);\r\n\t\t\t\t\t\tLog.d(\"DISPLAY\",\"Adding view to linear layout\");\r\n\t\t\t\t\t\tlv.addView(titlev);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcatch(Exception e){\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//=====================\r\n\t\t\t}\r\n\t\t\tcatch(Exception e){\r\n\t\t\t\tLog.e(\"DISPLAY\", \"Error: \"+e.getMessage());\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis.setContentView(l);\r\n\t}",
"public static Scene ReviewerPage (Stage stage) \n {\n \tstage.setTitle(\"Reviewer Page\");\n \t\n GridPane grid = new GridPane(); // Setup the grid background\n grid.setAlignment(Pos.TOP_LEFT);\n grid.setHgap(30);\n grid.setVgap(10);\n grid.setPadding(new Insets(25, 25, 25, 25));\n\n VBox vbox = new VBox();\n vbox.setPadding(new Insets(25, 25, 25, 25));\n vbox.setSpacing(10);\n\n Text title = new Text(\"Reviewer's Task\");\n title.setFont(Font.font(\"Arial\", FontWeight.BOLD, 20));\n vbox.getChildren().add(title);\n\n Hyperlink options[] = new Hyperlink[] \n {\n new Hyperlink(\"View list of Bugs\"),\n new Hyperlink(\"Update Bug Status\"),\n new Hyperlink(\"Search Bugs\"),\n new Hyperlink(\"Comment on Bugs\")\n //any more you can add in \n };\n\t\t\n // i<2 (the number 2 will change if more hyperlinks is added to options[])\n for (int i=0; i<4; i++) \n {\n VBox.setMargin(options[i], new Insets(0, 0, 0, 8));\n vbox.getChildren().add(options[i]);\n\n if (options[i].onMouseClickedProperty() != null && options[i].getText() == \"View list of Bugs\") \n {\n options[i].setOnAction(new EventHandler<ActionEvent>() \n {\n @Override\n public void handle(ActionEvent t) \n {\n stage.setScene(ReviewerBugListUI.create(stage)); \n }\n });\n }\n else if (options[i].onMouseClickedProperty() != null && options[i].getText() == \"Update Bug Status\")\n {\n options[i].setOnAction(new EventHandler<ActionEvent>() \n {\n @Override\n public void handle(ActionEvent t) \n {\n \tstage.setScene(ReviewerUpdateStatusUI.create(stage));\n } \n });\n }\n else if (options[i].onMouseClickedProperty() != null && options[i].getText() == \"Search Bugs\")\n {\n options[i].setOnAction(new EventHandler<ActionEvent>() \n {\n @Override\n public void handle(ActionEvent t) \n {\n \tstage.setScene(SearchPage(stage));\n } \n });\n }\n else if (options[i].onMouseClickedProperty() != null && options[i].getText() == \"Comment on Bugs\")\n {\n options[i].setOnAction(new EventHandler<ActionEvent>() \n {\n @Override\n public void handle(ActionEvent t) \n {\n \tstage.setScene(BugCommentUI.create(stage));\n } \n });\n }\n \n }\n\n Button logoutBtn = new Button(\"Logout\"); // Logout Button\n logoutBtn.setOnAction(new EventHandler<ActionEvent>() \n {// Handles what actions happend when the button is clicked. \n @Override\n public void handle(ActionEvent event) \n {\n stage.setScene(UserLogoutUI.create(stage));\n }\n });\n grid.add(vbox, 0, 0);\n grid.add(logoutBtn, 0, 1);\n\n BackgroundFill background_fill = new BackgroundFill(Color.ALICEBLUE, CornerRadii.EMPTY, Insets.EMPTY);\n Background background = new Background(background_fill);\n grid.setBackground(background);\n\n Scene scene2= new Scene(grid, 550, 500);\n return scene2;\n }",
"void displayCommentsForPostWithId(String id);",
"private void display()\n {\n tasksColumn.setCellValueFactory(new PropertyValueFactory<>(\"task\"));\n completionDateColumn.setCellValueFactory(new PropertyValueFactory<>(\"completionDate\"));\n completedColumn.setCellValueFactory(new PropertyValueFactory<>(\"completed\"));\n\n listView.getItems().add(Item.getToDoList().get(index));\n index++;\n }",
"@GetMapping(\"/post/{no}\")\n public String detail(@PathVariable(\"no\") Long no, Model model) {\n BoardDto boardDTO = boardService.getPost(no);\n model.addAttribute(\"boardDto\", boardDTO);\n return \"/board/detail.html\";\n }",
"public void setPostId(Integer postId) {\n this.postId = postId;\n }",
"private void showPersonDetails(Shops shops) {\n if (shops != null) {\n // Fill the labels with info from the shops object.\n idLabel.setText(Integer.toString(shops.getId()));\n nameLabel.setText(shops.getName());\n unitLabel.setText(shops.getUnit());\n countLabel.setText(Integer.toString(shops.getCount()));\n priceLabel.setText(Integer.toString(shops.getPrice()));\n dateLabel.setText(DateUtil.format(shops.getDate()));\n descrLabel.setText(shops.getDescriptionInfo());\n } else {\n // Shops is null, remove all the text.\n idLabel.setText(\"\");\n nameLabel.setText(\"\");\n unitLabel.setText(\"\");\n countLabel.setText(\"\");\n priceLabel.setText(\"\");\n dateLabel.setText(\"\");\n descrLabel.setText(\"\");\n }\n }",
"public WPPost getPost() {return post;}",
"public PostPO clickOnNewPost() {\n\t\tnewPost.click();\n\t\treturn new PostPO();\n\t}",
"private RGridBagLayoutPane getDatabasePane() {\n if (databasePane == null) {\n ULCTitledBorder ULCTitledBorder2 =\n BorderFactory.createTitledBorder(null, \"Database\", ULCTitledBorder.LEADING, ULCTitledBorder.DEFAULT_POSITION,\n new Font(\"Tahoma\", Font.PLAIN, 11), new Color(23, 64, 140));\n ULCTitledBorder2.setTitle(\"<%=ivy.cms.co(\\\"/Dialogs/about/databaseTitle\\\")%>\");\n ULCTitledBorder2.setBorder(null);\n RFiller filler1 = new RFiller();\n filler1\n .setStyleProperties(\"{/usePreferredSizeAsExactSize \\\"true\\\"/preferredSizeWidth \\\"135\\\"/preferredSizeHeight \\\"0\\\"}\");\n databasePane = new RGridBagLayoutPane();\n databasePane.setName(\"databasePane\");\n databasePane.setBorder(BorderFactory.createTitledBorder(null, \"Database\", ULCTitledBorder.LEADING,\n ULCTitledBorder.DEFAULT_POSITION, new Font(\"Tahoma\", Font.PLAIN, 11), new Color(23, 64, 140)));\n databasePane.setStyleProperties(\"{/fill \\\"HORIZONTAL\\\"/weightY \\\"0\\\"/insetsLeft \\\"5\\\"}\");\n databasePane.setBorder(ULCTitledBorder2);\n databasePane.add(getDbProductLabel(), new com.ulcjava.base.application.GridBagConstraints(0, 1, 1, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n databasePane.add(getDbSystemLabel(), new com.ulcjava.base.application.GridBagConstraints(0, 0, 1, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n databasePane.add(getDbSystemTextField(), new com.ulcjava.base.application.GridBagConstraints(1, 0, 1, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n databasePane.add(getDbProductTextField(), new com.ulcjava.base.application.GridBagConstraints(1, 1, 1, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n databasePane.add(getDbVersionLabel(), new com.ulcjava.base.application.GridBagConstraints(0, 2, 1, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n databasePane.add(getDbVersionTextField(), new com.ulcjava.base.application.GridBagConstraints(1, 2, 1, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n databasePane.add(filler1, new com.ulcjava.base.application.GridBagConstraints(0, 3, 1, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n }\n return databasePane;\n }",
"public void bind(Post post) {\n tvDescription.setText(post.getDescription());\n tvUsername.setText(post.getUser().getUsername());\n tvTime.setText(Post.calculateTimeAgo(post.getCreatedAt()));\n\n ParseFile image = post.getImage();\n if (image != null) {\n Glide.with(context).load(image.getUrl()).into(ivImage);\n }\n\n itemView.findViewById(R.id.ivImage).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent intent = new Intent(context, PostDetailActivity.class);\n intent.putExtra(\"post\", Parcels.wrap(post));\n context.startActivity(intent);\n }\n });\n\n //Change heart to be liked\n ivLike.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Resources res = context.getResources();\n if(ivLike.getBackground().equals(res.getDrawable(R.drawable.ufi_heart_active))) {\n Drawable drawable = res.getDrawable(R.drawable.ufi_heart);\n ivLike.setBackground(drawable);\n }\n else {\n Drawable drawable = res.getDrawable(R.drawable.ufi_heart_active);\n ivLike.setBackground(drawable);\n }\n }\n });\n\n //change save Image\n ivSave.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Resources res = context.getResources();\n if(ivSave.getBackground().equals(res.getDrawable(R.drawable.ufi_save_active))) {\n Drawable drawable = res.getDrawable(R.drawable.ufi_save_icon);\n ivSave.setBackground(drawable);\n }\n else {\n Drawable drawable = res.getDrawable(R.drawable.ufi_save_active);\n ivSave.setBackground(drawable);\n }\n }\n });\n\n }",
"private void displayContactDetails() {\n bindTextViews();\n populateTextViews();\n }",
"private void queryPost() {\n tv_search.setText(\"Recently Added Posts:\");\n ParseQuery<Post> query = ParseQuery.getQuery(Post.class);\n query.include(Post.KEY_USER);\n query.setLimit(15);\n query.addDescendingOrder(Post.KEY_CREATED);\n query.findInBackground(new FindCallback<Post>() {\n @Override\n public void done(List<Post> posts, ParseException e) {\n if(e!= null){\n Log.e(tag, \"Issue with getting post\", e);\n return;\n }\n adaptor.clear();\n adaptor.addAll(posts);\n //allPost.addAll(posts);\n //adaptor.notifyDataSetChanged();\n //swipeRefreshLayout.setRefreshing(false);\n\n //user just created a post\n if (isJustCreatedNewPost == true)\n {\n //reset bool\n isJustCreatedNewPost = false;\n// //subscribe user to their new post channel\n// String postChannel = \"POST_\"+posts.get(0).getObjectId();\n// ParsePush.subscribeInBackground(postChannel);\n\n }\n }\n });\n }",
"private Node createDetails ()\n {\n\n List<String> prefix = Arrays.asList (charts,sessionlength,labels);\n\n FlowPane b = new FlowPane ();\n b.getStyleClass ().add (StyleClassNames.DETAIL);\n\n return b;\n\n }",
"public void bind(final Post post) {\n SpannableStringBuilder str = new SpannableStringBuilder(post.getUser().getUsername() +\n \" \" + post.getDescription());\n str.setSpan(new android.text.style.StyleSpan(android.graphics.Typeface.BOLD), 0,\n post.getUser().getUsername().length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);\n descriptionTextView.setText(str);\n\n usernameTextView.setText(post.getUser().getUsername());\n relativeDate = DateUtils.getRelativeTimeSpanString(post.getCreatedAt().getTime()) + \"\";\n timestampText.setText(DateUtils.getRelativeTimeSpanString(post.getCreatedAt().getTime()));\n final ParseFile image = post.getImage();\n if (image != null) {\n Glide.with(context).load(image.getUrl()).into(imgView);\n }\n final ParseFile profilePic = post.getUser().getParseFile(\"profilePic\");\n if (profilePic != null) {\n GlideApp.with(context)\n .load(profilePic.getUrl())\n .transform(new CircleCrop())\n .into(profileImgView);\n } else {\n GlideApp.with(context)\n .load(R.drawable.instagram_user_filled_24)\n .transform(new CircleCrop())\n .into(profileImgView);\n }\n imgView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent intent = new Intent(context, PostDetailsActivity.class);\n intent.putExtra(\"KEY_DESCRIPTION\", post.getDescription());\n intent.putExtra(\"KEY_CREATED_KEY\", relativeDate);\n intent.putExtra(\"KEY_USER\", Parcels.wrap(post.getUser()));\n intent.putExtra(\"KEY_IMAGE\", Parcels.wrap(image));\n context.startActivity(intent);\n }\n });\n usernameTextView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent intent = new Intent(context, ProfileFragment.class);\n// intent.putExtra(\"KEY_USER\", post.getUser());\n intent.putExtra(\"KEY_IMAGE\", Parcels.wrap(image));\n context.startActivity(intent);\n }\n });\n }",
"public PostViewBean() {\n }",
"public int getPostNum() {\n return postNum_;\n }",
"public Detail() {\n initComponents();\n }",
"public String getPost() {\r\n return post;\r\n }",
"public void display() {\n System.out.println(\"Title: \" + this.title);\n System.out.println(\"Description: \" + this.des);\n System.out.println(\"Price Per Night: $\" + this.price);\n System.out.println(\"Max Guests: \" + this.guests);\n System.out.println(\"Length of stay: \" + this.days + \" days\");\n System.out.println(\"Total for stay: $\" + this.total);\n System.out.println(\"-----------------------------------\");\n }",
"public void setPost(WPPost post) {this.post = post;}",
"public int getPostNum() {\n return postNum_;\n }",
"public static Scene DeveloperPage (Stage stage) \n { \t\n \tstage.setTitle(\"Developer Page\");\n \t\n GridPane grid = new GridPane(); // Setup the grid background\n grid.setAlignment(Pos.TOP_LEFT);\n grid.setHgap(30);\n grid.setVgap(10);\n grid.setPadding(new Insets(25, 25, 25, 25));\n\n VBox vbox = new VBox();\n vbox.setPadding(new Insets(25, 25, 25, 25));\n vbox.setSpacing(10);\n\n Text title = new Text(\"Developer's Task\");\n title.setFont(Font.font(\"Arial\", FontWeight.BOLD, 20));\n vbox.getChildren().add(title);\n\n Hyperlink options[] = new Hyperlink[] \n {\n new Hyperlink(\"View Bugs Assigned\"),\n new Hyperlink(\"Update Bug Status\"),\n new Hyperlink(\"Search Bugs\"),\n new Hyperlink(\"Comment on Bugs\")\n //any more you can add in \n };\n\t\t\n // i<2 (the number 2 will change if more hyperlinks is added to options[])\n for (int i=0; i<4; i++) \n {\n VBox.setMargin(options[i], new Insets(0, 0, 0, 8));\n vbox.getChildren().add(options[i]);\n\n if (options[i].onMouseClickedProperty() != null && options[i].getText() == \"View Bugs Assigned\") \n {\n options[i].setOnAction(new EventHandler<ActionEvent>() \n {\n @Override\n public void handle(ActionEvent t) \n {\n stage.setScene(DeveloperBugListUI.create(stage)); \n }\n });\n }\n else if (options[i].onMouseClickedProperty() != null && options[i].getText() == \"Update Bug Status\")\n {\n options[i].setOnAction(new EventHandler<ActionEvent>() \n {\n @Override\n public void handle(ActionEvent t) \n {\n stage.setScene(DeveloperUpdateStatusUI.create(stage));\n System.out.println(\"Update Bug Status\");\n } \n });\n }\n else if (options[i].onMouseClickedProperty() != null && options[i].getText() == \"Search Bugs\")\n {\n options[i].setOnAction(new EventHandler<ActionEvent>() \n {\n @Override\n public void handle(ActionEvent t) \n {\n \tstage.setScene(SearchPage(stage));\n } \n });\n }\n else if (options[i].onMouseClickedProperty() != null && options[i].getText() == \"Comment on Bugs\")\n {\n options[i].setOnAction(new EventHandler<ActionEvent>() \n {\n @Override\n public void handle(ActionEvent t) \n {\n \tstage.setScene(BugCommentUI.create(stage));\n } \n });\n }\n }\n\n Button logoutBtn = new Button(\"Logout\"); // Logout Button\n logoutBtn.setOnAction(new EventHandler<ActionEvent>() \n {// Handles what actions happend when the button is clicked. \n @Override\n public void handle(ActionEvent event) \n {\n stage.setScene(UserLogoutUI.create(stage));\n }\n });\n grid.add(vbox, 0, 0);\n grid.add(logoutBtn, 0, 1);\n\n BackgroundFill background_fill = new BackgroundFill(Color.ALICEBLUE, CornerRadii.EMPTY, Insets.EMPTY);\n Background background = new Background(background_fill);\n grid.setBackground(background);\n\n Scene scene2= new Scene(grid, 550, 500);\n return scene2;\n }",
"@RequestMapping(value = \"/posts\", method = RequestMethod.GET)\n\tpublic String postsPage(Model model) {\n\t\tAuthentication auth = SecurityContextHolder.getContext().getAuthentication();\n\t\tmodel.addAttribute(\"username\", auth.getName());\n\t\tmodel.addAttribute(\"title\", \"WeSpeak | Bài viết kinh nghiệm\");\n\n\t\tList<Post> list = postDAO.listPostActive(1);\n\t\tmodel.addAttribute(\"postModel\", list);\n\t\tif (list != null) {\n\t\t\tList<Post> listImportant = new ArrayList<Post>();\n\t\t\tif (list.size() <= 4)\n\t\t\t\tfor (int i = 0; i < list.size(); i++)\n\t\t\t\t\tlistImportant.add(list.get(i));\n\t\t\telse\n\t\t\t\tfor (int i = 0; i < 4; i++)\n\t\t\t\t\tlistImportant.add(list.get(i));\n\n\t\t\tmodel.addAttribute(\"postListImportant\", listImportant);\n\t\t}\n\t\treturn \"postsPage\";\n\t}",
"public ShowDetails() {\n initComponents();\n }",
"@RequestMapping(value = \"add\", method = RequestMethod.GET)\n public String displayAddPostForm(Model model) {\n\n model.addAttribute(\"title\", \"New Post\");\n model.addAttribute(\"post\", new Post());\n return \"post/add\";\n }",
"Object getViewDetails();",
"public String getPost() {\n return post;\n }",
"public String getPost() {\n return post;\n }",
"@FXML\n void displayPD() {\n generalTextArea.clear();\n clearEverything();\n String employeeListPD = company.printByDepartment();\n generalTextArea.appendText(employeeListPD);\n }",
"void editMyPost(Post post);",
"public VentanaListaPosts(List<Post> posts, List<Post> posts2) {\n\t \n\t\tsetSize(620, 480);\n\t\tsetTitle(\"Lista de posts\");\n\t\tsetLocationRelativeTo(null);\n\t\tsetDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n\t\tsetResizable(false);\n\t\tgetContentPane().setLayout(null);\n\t\tsetLocationRelativeTo(null);\n\t\t\n\t\ttextBuscarPost = new JTextField();\n\t\ttextBuscarPost.setBounds(23, 11, 397, 20);\n new TextPrompt(\"Introduce usuario para buscar sus posts\", textBuscarPost);\n getContentPane().add(textBuscarPost);\n \n JButton btnBuscar = new JButton(\"Buscar\");\n btnBuscar.setBounds(467, 11, 100, 24);\n getContentPane().add(btnBuscar);\n\t\t\n\t\tJPanel panelListaPost= new JPanel();\n\t\tpanelListaPost.setBounds(10, 46, 594, 350);\n getContentPane().add(panelListaPost);\n \n JTextArea textoPost = new JTextArea();\n textoPost.setColumns(50);\n textoPost.setRows(20);\n textoPost.setEditable(false);\n \n Font font1 = new Font(\"Arial\", Font.ITALIC, 12);\n textoPost.setFont(font1);\n textoPost.setBounds(10, 46, 594, 229);\n scroll = new JScrollPane(textoPost);\n\t\tscroll.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);\n\t\tpanelListaPost.add(scroll);\n\t\t\n\t\tJButton btnPisos = new JButton(\"Pisos\");\n\t\tbtnPisos.setBounds(20, 417, 89, 23);\n\t\tgetContentPane().add(btnPisos);\n\t\t\n\t\tJButton btnInicio = new JButton(\"Inicio\");\n\t\tbtnInicio.setBounds(208, 417, 89, 23);\n\t\tgetContentPane().add(btnInicio);\n\t\t\n\t\t\n\t\tif(posts2.size() > 0) {\n\t\t\ttextoPost.setText(\"Titulo: \" + posts2.get(0).getTitulo().toUpperCase() + \"\\n\" + \"Descripción: \" + posts2.get(0).getContenido() +\"\\n\" + \"Autor: \" + posts2.get(0).getAutor() + \"\\n\" + \"Likes: \" + posts2.get(0).getLikes() +\"\\n\\n\");\n\t\t\tfor(int i = 1; i < posts2.size(); i++) {\n\t\t\t\ttextoPost.append(\"Titulo: \" + posts2.get(i).getTitulo().toUpperCase() + \"\\n\" + \"Descripción: \" + posts2.get(i).getContenido() +\"\\n\" + \"Autor: \" + posts2.get(i).getAutor() + \"\\n\" + \"Likes: \" + posts2.get(i).getLikes() +\"\\n\\n\");\n\t\t\t}\n\t\t}else {\n \tscroll.setVisible(false);\n \tpanelListaPost.setVisible(false);\n \tJLabel labelNoPost = new JLabel(\"No se encontró ningun post.\");\n \tlabelNoPost.setBounds(200, 50, 200, 50);\n \tgetContentPane().add(labelNoPost);\n }\n\t\tbtnPisos.addActionListener(new ActionListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tList<Piso> pisos = new ArrayList<Piso>();\n\t\t\t\tpisos = Controller.getInstance().getPisos();\n\t\t\t\tnew VentanaListaPisos(pisos, pisos);\n\t\t\t\tdispose();\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tbtnInicio.addActionListener(new ActionListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tList<Post> posts = new ArrayList<Post>();\n\t\t\t\tposts = Controller.getInstance().getPost();\n\t\t\t\tnew VentanaListaPosts(posts, posts);\n\t\t\t\tdispose();\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tbtnBuscar.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\tnew VentanaListaPosts(posts, m.buscarPosts(textBuscarPost.getText(), posts));\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\ttextoPost.addMouseListener(new MouseAdapter() {\n\t\t\t\n\t\t\t@Override\n \t public void mousePressed(MouseEvent e) {\n\t\t\t\tif(e.getClickCount() == 2) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tint line = textoPost.getLineOfOffset( textoPost.getCaretPosition());\n\t\t\t\t\t\tint start = textoPost.getLineStartOffset( line );\n\t\t\t\t\t\tint end = textoPost.getLineEndOffset( line );\n\t\t\t\t\t\tString text = textoPost.getDocument().getText(start, end - start).toLowerCase();\n\t\t\t\t\t\tif(text.contains(\"titulo\")) {\n\t\t\t\t\t\t\tnew VentanaInfoPost(m.obtenerPost(text, posts));\n\t\t\t\t\t\t\tdispose();\n\t\t\t\t\t\t}else if(text.contains(\"descripción\")) {\n\t\t\t\t\t\t\tline = line - 1;\n\t\t\t\t\t\t\tstart = textoPost.getLineStartOffset( line );\n\t\t\t\t\t\t\tend = textoPost.getLineEndOffset( line );\n\t\t\t\t\t\t\ttext = textoPost.getDocument().getText(start, end - start).toLowerCase();\n\t\t\t\t\t\t\tnew VentanaInfoPost(m.obtenerPost(text, posts));\n\t\t\t\t\t\t\tdispose();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}else if(text.contains(\"autor\")) {\n\t\t\t\t\t\t\tline = line - 2;\n\t\t\t\t\t\t\tstart = textoPost.getLineStartOffset( line );\n\t\t\t\t\t\t\tend = textoPost.getLineEndOffset( line );\n\t\t\t\t\t\t\ttext = textoPost.getDocument().getText(start, end - start).toLowerCase();\n\t\t\t\t\t\t\tnew VentanaInfoPost(m.obtenerPost(text, posts));\n\t\t\t\t\t\t\tdispose();\n\t\t\t\t\t\t}else if(text.contains(\"likes\")) {\n\t\t\t\t\t\t\tline = line - 3;\n\t\t\t\t\t\t\tstart = textoPost.getLineStartOffset( line );\n\t\t\t\t\t\t\tend = textoPost.getLineEndOffset( line );\n\t\t\t\t\t\t\ttext = textoPost.getDocument().getText(start, end - start).toLowerCase();\n\t\t\t\t\t\t\tnew VentanaInfoPost(m.obtenerPost(text, posts));\n\t\t\t\t\t\t\tdispose();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (BadLocationException e1) {\n\t\t\t\t\t\t\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t});\n\t\tsetVisible(true);\n\t\t\n\t}",
"GridPane body();",
"public Prisoner_details() {\n initComponents();\n fetch();\n }",
"@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_posts_details, container, false);\r\n\r\n vm = new ViewModelProvider(requireActivity()).get(MainActivityVM.class);\r\n\r\n title = view.findViewById(R.id.title);\r\n body = view.findViewById(R.id.body);\r\n\r\n Post post = vm.getPostDetails();\r\n\r\n title.setText(post.getTitle());\r\n body.setText(post.getBody());\r\n\r\n\r\n// vm.getPostDetails().observe(getActivity(), new Observer<Post>() {\r\n// @Override\r\n// public void onChanged(Post post) {\r\n// title.setText(post.getTitle());\r\n// body.setText(post.getBody());\r\n// }\r\n// });\r\n\r\n return view;\r\n }",
"public void post(ActionEvent actionEvent) throws IOException, ClassNotFoundException {\n Post post;\n if (postPic != null) {\n post = new Post(thisUser.getUser().getUsername(), title.getText()\n , description.getText(), new Date(), thisUser.getUser().getProfileImage(), postPic);\n post.setPostPicAddress(file.toString());\n } else {\n post = new Post(thisUser.getUser().getUsername(), title.getText()\n , description.getText(), new Date(), thisUser.getUser().getProfileImage());\n post.setPostPicAddress(\"No postPic\");\n }\n\n post.setOwner(thisUser.getUser().getUsername());\n\n CommandSender commandSender = new CommandSender(CommandType.NEWPOST\n , post);\n\n Client.getObjectOutputStream().writeObject(commandSender);\n\n thisUser.setSearchedUser(thisUser.getUser());\n Main.loadAPage(actionEvent\n , \"../FXMLs/MyProfile.fxml\"\n , \"SBUgram - Your Profile\"\n );\n\n }",
"public static Scene TriagerPage (Stage stage) \n { \t\n \tstage.setTitle(\"Triager Page\");\n \t\n GridPane grid = new GridPane(); // Setup the grid background\n grid.setAlignment(Pos.TOP_LEFT);\n grid.setHgap(30);\n grid.setVgap(10);\n grid.setPadding(new Insets(25, 25, 25, 25));\n\n VBox vbox = new VBox();\n vbox.setPadding(new Insets(25, 25, 25, 25));\n vbox.setSpacing(10);\n\n Text title = new Text(\"Triager's Task\");\n title.setFont(Font.font(\"Arial\", FontWeight.BOLD, 20));\n vbox.getChildren().add(title);\n\n Hyperlink options[] = new Hyperlink[] \n {\n new Hyperlink(\"View list of Bugs\"),\n new Hyperlink(\"Assign Bug\"),\n new Hyperlink(\"Search Bugs\"),\n new Hyperlink(\"Comment on Bugs\"),\n new Hyperlink(\"Generate Bug Report\")\n //any more you can add in \n };\n\t\t\n // i<2 (the number 2 will change if more hyperlinks is added to options[])\n for (int i=0; i<5; i++) \n {\n VBox.setMargin(options[i], new Insets(0, 0, 0, 8));\n vbox.getChildren().add(options[i]);\n\n if (options[i].onMouseClickedProperty() != null && options[i].getText() == \"View list of Bugs\")\n {\n options[i].setOnAction(new EventHandler<ActionEvent>() \n {\n @Override\n public void handle(ActionEvent t) \n {\n stage.setScene(TriagerBugListUI.create(stage)); \n }\n });\n }\n else if (options[i].onMouseClickedProperty() != null && options[i].getText() == \"Assign Bug\")\n {\n options[i].setOnAction(new EventHandler<ActionEvent>() \n {\n @Override\n public void handle(ActionEvent t) \n {\n \tstage.setScene(TriagerAssignmentUI.create(stage));\n } \n });\n }\n else if (options[i].onMouseClickedProperty() != null && options[i].getText() == \"Search Bugs\")\n {\n options[i].setOnAction(new EventHandler<ActionEvent>() \n {\n @Override\n public void handle(ActionEvent t) \n {\n \tstage.setScene(SearchPage(stage));\n } \n });\n }\n else if (options[i].onMouseClickedProperty() != null && options[i].getText() == \"Comment on Bugs\")\n {\n options[i].setOnAction(new EventHandler<ActionEvent>() \n {\n @Override\n public void handle(ActionEvent t) \n {\n \tstage.setScene(BugCommentUI.create(stage));\n } \n });\n }\n else if (options[i].onMouseClickedProperty() != null && options[i].getText() == \"Generate Bug Report\") // Samuel\n {// Hyperlink for Generating Report\n options[i].setOnAction(new EventHandler<ActionEvent>() \n {// Link to Select Generate Report Type\n @Override\n public void handle(ActionEvent t) \n {stage.setScene(GenerateReport(stage));}\n });\n }\n }\n\n Button logoutBtn = new Button(\"Logout\"); // Logout Button\n logoutBtn.setOnAction(new EventHandler<ActionEvent>() \n {// Handles what actions happend when the button is clicked. \n @Override\n public void handle(ActionEvent event) \n {\n stage.setScene(UserLogoutUI.create(stage));\n }\n });\n grid.add(vbox, 0, 0);\n grid.add(logoutBtn, 0, 1);\n\n BackgroundFill background_fill = new BackgroundFill(Color.ALICEBLUE, CornerRadii.EMPTY, Insets.EMPTY);\n Background background = new Background(background_fill);\n grid.setBackground(background);\n\n Scene scene2= new Scene(grid, 550, 500);\n return scene2;\n }",
"public DetailsPanel( )\n {\n initComponents();\n }",
"public void updateDetailWindow();",
"private void producueViews() {\n if (splittedPostComponent != null && splittedPostComponent.size() > 0) {\n // loop through each component\n for (int i = 0; i < splittedPostComponent.size(); i++) {\n // create view if collection did not equal to empty string \"\"\n if (!splittedPostComponent.get(i).trim().equals(\"\")) {\n generateView(splittedPostComponent.get(i));\n }\n }\n }\n }",
"@FXML\r\n private void handleOverview() throws SQLException, IOException{\r\n Parent home_page_parent = FXMLLoader.load(getClass().getResource(\"overview.fxml\"));\r\n Scene home_page_scene = new Scene(home_page_parent);\r\n Stage app_stage = (Stage) ((Node) Overview).getScene().getWindow();\r\n app_stage.setScene(home_page_scene);\r\n app_stage.show();\r\n \r\n \r\n }",
"private void showImageDetail() {\n }",
"private void addTopicDetails() \n {\n baseLayout.addComponent(UIUtils.getSchoolBannerLayout());\n baseLayout.addComponent(getVideoPathLayout());\n baseLayout.addComponent(getNotesLayout());\n baseLayout.addComponent(getOtherNotesLayout());\n baseLayout.addComponent(getPreviousQuestionsLayout());\n baseLayout.addComponent(getQuizLayout());\n baseLayout.addComponent(addUserNotes());\n //baseLayout.setExpandRatio(tabsheetLayout,2);\n }",
"protected void newPost() {\n\t\tIntent intent = new Intent(this, EditTopicActivity.class);\n\t\tintent.putExtra(EditPostActivity.IS_NEW, true);\n\n\t\tstartActivity(intent);\n\t}",
"@Override\n\t\tpublic void postShow() {\n\t\t\tif (bmoRequisition.getSupplierId().toInteger() > 0)\n\t\t\t\tsetFormatEmailTo(bmoRequisition.getBmoSupplier().getEmail().toString(), bmoRequisition.getBmoSupplier().getName().toString());\n\n\t\t\tif (!newRecord)\n\t\t\t\tbuttonPanel.add(lifeCycleShowButton);\n\t\t\t// Mostrar boton cuando NO tenga un recibo(en parcial/total) y tenga un pagos de anticipo\n\t\t\tif (enableCheekingCostTravelExpense(false))\n\t\t\t\tbuttonPanel.add(verifyTravelExpenseShowButton);\n\t\t\telse {\n\t\t\t\tbuttonPanel.add(copyRequisitionDialogButton);\n\t\t\t}\n\n\t\t\tgetBmoOrderType(((BmoFlexConfig)getSFParams().getBmoAppConfig()).getDefaultOrderTypeId().toInteger());\t\n\t\t}",
"@Override\n public void onPostAdded(final Post post) {\n new Thread(new Runnable() {\n @Override\n public void run() {\n post.setFullView(false);\n post.processData();\n post.setCallbackManager(manager);\n\n manager.addCallback(new CallbackManager.Callback<BaseGlobalPostListFragment>() {\n @Override\n public void execute(BaseGlobalPostListFragment object) {\n object.postsAdapter.add(0, post);\n object.offset++;\n }\n });\n }\n }).start();\n }",
"public java.lang.CharSequence getGLPOSTDETAILS() {\n return GLPOST_DETAILS;\n }",
"public void addPanelForResult(GridPane gridPane) {\n\t\tint nbrCols = gridPane.getColumnCount(); \n\t\tint nbrRows = gridPane.getRowCount();\n\t\tfor(int i =0; i<nbrRows; i++) {\n\t\t\tPane pane = new Pane(); \n\t\t\tpane.setStyle(\"-fx-background-color: #FFFFFF;\"); \n\n\t\t\tLabel label = new Label(\"C\"+(i+1)); \n\t\t\tgridPane.add(pane,0, i);\n\t\t\tgridPane.add(label, 0,i);\n\t\t\tGridPane.setHalignment(label, HPos.CENTER);\n\n\t\t}\n\n\t\t// Ajout d'un panel aux autres cellules \n\t\tfor(int i=1; i<=nbrCols; i++) {\n\t\t\tfor(int j=0; j<=nbrRows; j++) {\n\t\t\t\tPane pane = new Pane(); \n\t\t\t\tpane.setStyle(\"-fx-border-color: black; -fx-border-width: 1 1 0 0;\");\n\n\t\t\t\tgridPane.add(pane, i, j);\n\t\t\t}\n\t\t}\n\t}",
"public int getPostnr() {\n return postnr;\n }",
"public Pane getPane() {\n return grid;\n }",
"public void bind(Post post) {\n tvUsername.setText(post.getUser().getUsername());\n String descriptionString = \"<b>\" + post.getUser().getUsername() + \"</b> \" + post.getDescription();\n tvDescription.setText(Html.fromHtml(descriptionString));\n //Log.i(\"Posts Adapter\", post.getDescription() + post.getCreatedAt());\n tvDate.setText(post.getCreatedAt().toString());\n ParseFile image = post.getImage();\n if(image != null){\n Glide.with(context).load(image.getUrl()).into(ivImage);\n }\n ParseFile imageProfile = post.getUser().getParseFile(\"profileImage\");\n if(imageProfile != null){\n Glide.with(context).load(imageProfile.getUrl()).transform(new CircleCrop()).into(ivProfilePic);\n }\n rlPostProfile.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n int position = getAdapterPosition();\n //Log.i(\"myApp\", \"on click\");\n // make sure the position is valid, i.e. actually exists in the view\n if (position != RecyclerView.NO_POSITION) {\n // get the movie at the position, this won't work if the class is static\n Post post = posts.get(position);\n // create intent for the new activity\n Intent intent = new Intent(context, UserPostActivity.class);\n // serialize the movie using parceler, use its short name as a key\n intent.putExtra(Post.class.getSimpleName(), Parcels.wrap(post));\n ///intent.putExtra(Tweet.class.getSimpleName(), Parcels.wrap(tweet));\n // show the activity\n context.startActivity(intent);\n }\n }\n });\n }",
"public java.lang.CharSequence getGLPOSTDETAILS() {\n return GLPOST_DETAILS;\n }",
"public ArrayList<Post> viewAllPosts()\n\n {\n postList = new ArrayList<Post>();\n\n try\n {\n database = dbH.getReadableDatabase();\n dbH.openDataBase();\n String query = \"SELECT * FROM Post WHERE 1\";\n Cursor c = database.rawQuery(query, null);\n if (c.moveToFirst())\n {\n do\n {\n Post post = new Post();\n post.setPostBody(c.getString(c.getColumnIndex(\"postBody\")));\n post.setPostedBy(c.getString(c.getColumnIndex(\"postedBy\")));\n post.setPostedAt(c.getString(c.getColumnIndex(\"postedAt\")));\n post.setPostID(Integer.valueOf(c.getString(c.getColumnIndex(\"postID\"))));\n post.setBitmap(c.getString(c.getColumnIndex(\"image\")));\n\n postList.add(post);\n } while (c.moveToNext());\n }\n\n else\n {\n Log.i(TAG, \"There are no posts in the DB.\");\n }\n c.close();\n dbH.close();\n }\n catch (SQLException e)\n {\n e.printStackTrace();\n }\n return postList;\n }",
"private void addElementsGridPane(GridPane infosPane, Label toDrawLbl, \n Label wordLbl, Label avgPropsTitleLbl, \n Label avgPropsLbl) {\n infosPane.add(super.getGameStatusTitleLbl(), 0, 0);\n infosPane.add(super.getGameStatusLbl(), 0, 1);\n infosPane.add(toDrawLbl, 0, 5);\n infosPane.add(wordLbl, 0, 6);\n infosPane.add(avgPropsTitleLbl, 0, 8);\n infosPane.add(avgPropsLbl, 0, 9);\n infosPane.add(super.getHistoryLbl(), 0, 11);\n infosPane.add(super.getPropositionHist(), 0, 12);\n infosPane.add(super.getHistoryBtn(), 0, 18);\n infosPane.add(super.getQuitBtn(), 0, 20);\n }",
"public void ShowPosInfo(int index){\n\n //\tJT_rollno.setText(BindList().get(index).getRollno());\n JT_name.setText(BindList().get(index).getName());\n JT_category.setText(BindList().get(index).getCategory());\n JT_year.setText(BindList().get(index).getYear());\n JT_sponsor.setText(BindList().get(index).getSponsor());\n //JT_mob.setText(BindList().get(index).getMob());\n //JT_emailid.setText(BindList().get(index).getEmailid());\n }",
"public static Scene ReporterPage (Stage stage)\n {\n \tstage.setTitle(\"Reporter Page\");\n \n GridPane grid = new GridPane(); // Setup the grid background\n grid.setAlignment(Pos.TOP_LEFT);\n grid.setHgap(30);\n grid.setVgap(10);\n grid.setPadding(new Insets(25, 25, 25, 25));\n\n VBox vbox = new VBox();\n vbox.setPadding(new Insets(25, 25, 25, 25));\n vbox.setSpacing(10);\n\n Text title = new Text(\"Reporter's Task\");\n title.setFont(Font.font(\"Arial\", FontWeight.BOLD, 20));\n vbox.getChildren().add(title);\n\n Hyperlink options[] = new Hyperlink[] \n {\n new Hyperlink(\"Report Bug\"),\n new Hyperlink(\"View Bugs Reported\"),\n new Hyperlink(\"Search Bugs\"),\n new Hyperlink(\"Comment on Bugs\")\n //any more you can add in \n };\n \n // i<2 (the number 2 will change if more hyperlinks is added to options[])\n for (int i=0; i<4; i++) \n {\n VBox.setMargin(options[i], new Insets(0, 0, 0, 8));\n vbox.getChildren().add(options[i]);\n\n if (options[i].onMouseClickedProperty() != null && options[i].getText() == \"Report Bug\") \n {\n options[i].setOnAction(new EventHandler<ActionEvent>() \n {\n @Override\n public void handle(ActionEvent t) \n {stage.setScene(BugReportPageUI.create(stage));} \n });\n }\n else if (options[i].onMouseClickedProperty() != null && options[i].getText() == \"View Bugs Reported\")\n {\n options[i].setOnAction(new EventHandler<ActionEvent>() \n {\n @Override\n public void handle(ActionEvent t) \n {stage.setScene(ReporterBugListUI.create(stage));} \n });\n }\n else if (options[i].onMouseClickedProperty() != null && options[i].getText() == \"Search Bugs\")\n {\n options[i].setOnAction(new EventHandler<ActionEvent>() \n {\n @Override\n public void handle(ActionEvent t) \n {\n \tstage.setScene(SearchPage(stage));\n } \n });\n }\n else if (options[i].onMouseClickedProperty() != null && options[i].getText() == \"Comment on Bugs\")\n {\n options[i].setOnAction(new EventHandler<ActionEvent>() \n {\n @Override\n public void handle(ActionEvent t) \n {\n \tstage.setScene(BugCommentUI.create(stage));\n } \n });\n }\n }\n\n Button logoutBtn = new Button(\"Logout\"); // Logout Button\n logoutBtn.setOnAction(new EventHandler<ActionEvent>() \n {// Handles what actions happend when the button is clicked. \n @Override\n public void handle(ActionEvent event) \n {\n stage.setScene(UserLogoutUI.create(stage));\n }\n });\n grid.add(vbox, 0, 0);\n grid.add(logoutBtn, 0, 1);\n\n BackgroundFill background_fill = new BackgroundFill(Color.ALICEBLUE, CornerRadii.EMPTY, Insets.EMPTY);\n Background background = new Background(background_fill);\n grid.setBackground(background);\n\n Scene scene2= new Scene(grid, 550, 500);\n return scene2;\n }",
"public void showInformation() {\n\t\tSystem.out.println(\"Title: \" + getTitle());\n\t\tSystem.out.println(\"Time: \" + getTime());\n\t\tSystem.out.println(\"Number: \" + getNumber());\n\t}",
"public void showDetails (EventTable details) {\n\t\tdetailDisplay.show(\"details\");\n\t\tthis.details.showDetails(details);\n\t}",
"@FXML\n void displayPH() {\n generalTextArea.clear();\n clearEverything();\n String employeeListPH = company.printByDate();\n generalTextArea.appendText(employeeListPH);\n\n }",
"public int getPostId() {\r\n\t\treturn postId;\r\n\t}",
"public Integer getPostId() {\n return postId;\n }",
"public void setPostId(int postId) {\r\n\t\tthis.postId = postId;\r\n\t}",
"Achievements getPostDetails();",
"@Override public void run() {\n DisplayAllUsersPosts();\n swipe.setRefreshing(false);\n }",
"private Widget getTitle(DatabaseObject databaseObject) {\n HorizontalPanel titlePanel = new HorizontalPanel();\n titlePanel.setStyleName(\"elv-Details-Title\");\n try{\n ImageResource img = InstanceTypeIconProvider.getItemIcon(databaseObject.getSchemaClass());\n String helpTitle = databaseObject.getSchemaClass().name;\n HTMLPanel helpContent = new HTMLPanel(InstanceTypeExplanation.getExplanation(databaseObject.getSchemaClass()));\n titlePanel.add(new HelpPopupImage(img, helpTitle, helpContent));\n }catch (Exception e){\n// e.printStackTrace();\n Console.error(getClass() + \": \" + e.getMessage());\n //ToDo: Enough?\n }\n HTMLPanel title = new HTMLPanel(databaseObject.getDisplayName());\n title.getElement().getStyle().setMarginLeft(10, Style.Unit.PX);\n titlePanel.add(title);\n\n return titlePanel;\n }",
"private void view() {\n\n\t\ttry {\n\t\t\tString databaseUser = \"blairuser\";\n\t\t\tString databaseUserPass = \"password!\";\n\t\t\tClass.forName(\"org.postgresql.Driver\");\n\t\t\tConnection connection = null;\n\t\t\tString url = \"jdbc:postgresql://13.210.214.176/test\";\n\t\t\tconnection = DriverManager.getConnection(url, databaseUser, databaseUserPass);\n//\t\t\tStatement s = connection.createStatement();\n\t\t\ts = connection.createStatement();\n\t\t\tResultSet rs = s.executeQuery(\"select * from account;\");\n\t\t\t// while (rs.next()) {\n\t\t\tString someobject = rs.getString(\"name\") + \" \" + rs.getString(\"password\");\n\t\t\tSystem.out.println(someobject);\n\t\t\toutput.setText(someobject);\n\t\t\t// output.setText(rs);\n\t\t\t// System.out.println(rs.getString(\"name\")+\" \"+rs.getString(\"message\"));\n\t\t\t// rs.getStatement();\n\t\t\t// }\n\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(e.getMessage());\n\t\t}\n\t\tPostgresJDBC();\n\t}",
"public void buildDisplay() {\n ColorMap map = new ColorMap();\n\n for (int i = 1; i <= maxGrassPerCell; i++) {\n map.mapColor(i, new Color(0, Math.max(256 - i * 12, 50), 0));\n }\n map.mapColor(0, Color.white);\n\n Value2DDisplay displayMoney =\n new Value2DDisplay(space.getCurrentGrassSpace(), map);\n\n Object2DDisplay displayRabbits = new Object2DDisplay(space.getCurrentRabbitSpace());\n displayRabbits.setObjectList(rabbitList);\n\n displaySurf.addDisplayableProbeable(displayMoney, \"Grass\");\n displaySurf.addDisplayableProbeable(displayRabbits, \"Rabbits\");\n\n populationPlot.addSequence(\"Number of Rabbits\", new rabbitCount(), Color.BLUE);\n populationPlot.addSequence(\"Number of Grass\", new grassCount(), new Color(0, 150, 0));\n }",
"@Override\n public int getItemCount() {\n return posts.size();\n }",
"@Override\n public int getItemCount() {\n return posts.size();\n }",
"private void loadDetails() {\n TextView tvName = (TextView) findViewById(R.id.tvPropertyName);\n TextView tvAddress = (TextView) findViewById(R.id.tvFullAddress);\n TextView tvCategory = (TextView) findViewById(R.id.tvPropCategory);\n TextView tvSize = (TextView) findViewById(R.id.tvRoomSize);\n TextView tvPrice = (TextView) findViewById(R.id.tvPropPrice);\n\n tvName.setText(name);\n tvAddress.setText(address);\n tvCategory.setText(category);\n tvSize.setText(size + \"m2\");\n tvPrice.setText(\"R\" + price + \".00 pm\");\n getImage();\n }",
"public interface PostsListView extends LoadDataView {\n void renderList(Collection<Post> postCollection);\n\n void viewPostDetails(Post post);\n\n}",
"public String toString(){\r\n return \"Title: \" + title + \"\\nBody: \" + body;\r\n }",
"public void setData(Post item) {\n a.setText(points + \" points\");\n this.dataItem = item;\n title.setText(item.getTitle());\n desc.setText(item.getDesc());\n upvoted.setEnabled(!item.isUpvoted());\n downvoted.setEnabled(!item.isDownvoted());\n // Picasso.with(itemView.getContext()).load(item.getImg()).into(img);\n // Picasso.with(itemView.getContext()).load(item.getImg()).into(img);\n\n\n\n }",
"public void insetPostConImg(Post post) {\n\t\tpm.insert(post);\r\n\t}",
"public static void show() {\n\t\tcadastrados = new DaoPagadores();\n\t\t\n\t\tstagePrimary = new Stage();\n\t\tstagePrimary.initModality(Modality.WINDOW_MODAL);\n\t\tstagePrimary.setTitle(\"Mostra Pagadores\");\n\t\tstagePrimary.setMinWidth(900);\n\t\tstagePrimary.setMaxWidth(900);\n\t\tstagePrimary.setMaxHeight(900);\n\t\t\n\t\t// ---------------------- Linha 1\n\t\ttbvPagadoresAtivos = new TableView<Pagadores>();\n\t\tdadosPagadores = cadastrados.carregaPagadores();\n\t\ttbvPagadoresAtivos = tablePagadoresAtivos(dadosPagadores);\n\t\ttbvPagadoresAtivos.getSelectionModel().selectedItemProperty().addListener((v, oldValue, newValue) -> tbvPagadoresAtivos_Change());\n\t\t\n\t\tpaneLinha1 = new HBox(tbvPagadoresAtivos);\n\t\tpaneLinha1.setPrefHeight(400);\n\t\tpaneLinha1.setPrefWidth(850);\n\t\tpaneLinha1.setPadding(new Insets(30,0,0,30));\n \n\t\t// ----------------------- Linha 2\n\t\tlblFonte = new Label(\"Fonte Pagadora : \");\n\t\tlblFonte.setFont(Font.font(\"Arial\", 16));\n\t\tlblFonte.setPrefWidth(150);\n\t\t\n\t\tlblPagFonte = new Label(\"\");\n\t\tlblPagFonte.setFont(Font.font(\"Arial\", 16));\n\t\tpaneLinha2 = new HBox(lblFonte,lblPagFonte);\n\t\tpaneLinha2.setPadding(new Insets(30, 0, 50, 30));\n\t\t\n\t\t// -------------------------\n\t\tgrupo = Ini.loadProps(\"CentroReceb\", \"RecCen\"); // passar esta linha para baixo\n\t\t\n\t\tpanePrimary = new VBox(paneLinha1, paneLinha2);\n\t\tscenePrimary = new Scene(panePrimary);\n\t\tstagePrimary.setScene(scenePrimary);\n\t\tstagePrimary.showAndWait();\n\t}",
"@Override\n\tpublic void getPostByMemberId() {\n\t\tArrayList<Post> list = new ArrayList<Post>();\n\t\tlist = dao.selectPostByMemberId(cur.getId());\n\t\t\n\t\tfor (Post p : list) {\n\t\t\tSystem.out.println(p.getPostId() + \" \" + p.getPostName());\n\t\t}\n\t}"
] | [
"0.6705479",
"0.6677153",
"0.66252214",
"0.66221464",
"0.6606093",
"0.6498634",
"0.6134316",
"0.60797566",
"0.5999843",
"0.5955827",
"0.5942468",
"0.59243673",
"0.58998954",
"0.58811414",
"0.5791189",
"0.5786492",
"0.56229097",
"0.55149144",
"0.5498204",
"0.5449209",
"0.5394561",
"0.5335757",
"0.53040516",
"0.52887136",
"0.52813053",
"0.5255098",
"0.5231739",
"0.52309626",
"0.5224234",
"0.5214256",
"0.5192119",
"0.5190037",
"0.51861024",
"0.5185741",
"0.5185476",
"0.51838744",
"0.5170032",
"0.5158439",
"0.512945",
"0.5124075",
"0.5116701",
"0.5110753",
"0.5106441",
"0.51029164",
"0.5098369",
"0.5091584",
"0.50914294",
"0.50897044",
"0.50764036",
"0.5074477",
"0.5071483",
"0.5067403",
"0.5067403",
"0.5062183",
"0.50575244",
"0.5050294",
"0.50461",
"0.5040956",
"0.503565",
"0.50254697",
"0.5016846",
"0.5015931",
"0.4995718",
"0.4976819",
"0.4972275",
"0.49721482",
"0.49636012",
"0.49612",
"0.4959684",
"0.49574712",
"0.49530438",
"0.4938497",
"0.49378708",
"0.49369222",
"0.4931082",
"0.49291316",
"0.49233183",
"0.49213496",
"0.49202028",
"0.49188757",
"0.49159756",
"0.4915936",
"0.4914608",
"0.4908723",
"0.490468",
"0.49031705",
"0.48766315",
"0.48764652",
"0.4870795",
"0.48695934",
"0.4855939",
"0.48535514",
"0.48535514",
"0.48523894",
"0.4850462",
"0.48469314",
"0.4845458",
"0.48453635",
"0.48322028",
"0.4830673"
] | 0.8444555 | 0 |
Refreshes the content of Post Details View | public static void refreshPostDetails(Post post) {
bp.setCenter(showPostDetails(post));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void onRefresh() {\n\t\tmodel.getPostsByType(userId, 0, method, postListiner);\n\t\tcurrentPage = 0;\n\n\t}",
"@Override\n public void onRefresh() {\n viewModel.fetchAllPostsASync();\n }",
"@Override\n public void onRefresh() {\n fetchPosts();\n }",
"@Override\n\tprotected void refreshView() {\n\t\t\n\t}",
"@Override\n\tpublic void refreshView() {\n\n\t}",
"@Override\n\tprotected void RefreshView() {\n\t\t\n\t}",
"@Override\n public void onRefresh() {\n synchronizeContent();\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 refreshView() {\n Comment comment;\n \n /**\n * Displayed data is based on either a new, default comment or one that is \n * selected in the list of comments.\n */\n if (isNewComment) {\n comment = new Comment(0, new Date(), currentUser, \"\");\n view.clearCommentSelection();\n }\n else {\n comment = this.selectedComment;\n }\n \n view.setReportIdLabelText(\"(Report ID: \" + report.getId() + \") \" + report.getTitle());\n view.setCommentIdLabel(\"Comment ID: \" + comment.getId());\n view.setCommentDate(new SimpleDateFormat(\"dd MMM YYYY\").format(comment.getDate()));\n view.setUsername(comment.getUser().getName());\n view.setContent(comment.getContent());\n view.setPanelVisibility(isNewComment || view.getSelectedComment().getId() > 0);\n }",
"void doRefreshContent();",
"@Override\r\n public void onRefresh() {\n\r\n refreshContent();\r\n\r\n }",
"private void refreshContent() {\n\n mSwipeRefreshLayout.setRefreshing(false);\n }",
"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 }",
"@Override\n\t\t\t\t\tpublic void onRefresh() {\n\t\t\t\t\t\tisRefreshing = true;\n\t\t\t\t\t\tsyncArticle();\n\t\t\t\t\t}",
"public abstract void refreshView();",
"public void refreshNoHidePublicUpdate() {\n empty();\n loadPosts();\n }",
"@Override\n public void onRefresh() {\n refreshData();\n }",
"public void refresh() {\n\t\tthis.viewer.refresh();\n\t}",
"public void refresh() { \r\n FacesContext context = FacesContext.getCurrentInstance(); \r\n Application application = context.getApplication(); \r\n ViewHandler viewHandler = application.getViewHandler(); \r\n UIViewRoot viewRoot = viewHandler.createView(context, context.getViewRoot().getViewId()); \r\n context.setViewRoot(viewRoot); \r\n context.renderResponse(); \r\n }",
"public void refresh() {\n\t\tgetData();\n\t\trender();\n\t}",
"protected void refresh() {\n\t}",
"@Override\n public void onRefresh() {\n loadData();\n }",
"protected void refreshView() {\r\n\t\tFacesContext context = FacesContext.getCurrentInstance();\r\n\t\tApplication application = context.getApplication();\r\n\t\tViewHandler viewHandler = application.getViewHandler();\r\n\t\tUIViewRoot viewRoot = viewHandler.createView(context, context.getViewRoot().getViewId());\r\n\t\tcontext.setViewRoot(viewRoot);\r\n\t\tcontext.renderResponse();\r\n\t}",
"public void updateContent(){\r\n\t\tthis.initRecords();\r\n\t\tlist.show(records);\r\n\t}",
"public void refresh()\n {\n refresh( null );\n }",
"@Override\n public void refresh() {\n }",
"@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_posts_details, container, false);\r\n\r\n vm = new ViewModelProvider(requireActivity()).get(MainActivityVM.class);\r\n\r\n title = view.findViewById(R.id.title);\r\n body = view.findViewById(R.id.body);\r\n\r\n Post post = vm.getPostDetails();\r\n\r\n title.setText(post.getTitle());\r\n body.setText(post.getBody());\r\n\r\n\r\n// vm.getPostDetails().observe(getActivity(), new Observer<Post>() {\r\n// @Override\r\n// public void onChanged(Post post) {\r\n// title.setText(post.getTitle());\r\n// body.setText(post.getBody());\r\n// }\r\n// });\r\n\r\n return view;\r\n }",
"public PostDTO refreshPost(PostDTO currentPost) {\n postId = currentPost.getId();\n this.currentPost = ctrl.getPost(postId);\n return this.currentPost;\n }",
"public void refresh() {\n }",
"public void refresh() {\n\n odp.refresh();\n\n\n }",
"@Override\n public void onResume() {\n super.onResume();\n refreshContent();\n }",
"@Override\n\tpublic void refresh() {\n\n\t}",
"@Override\n public void onRefresh() {\n }",
"@Override\n public void onRefresh() {\n getData();\n }",
"private void refreshData() {\n Query query = databaseReferenceAllPosts.orderByChild(Key.POST_TIMESTAMP).limitToFirst(Default.IMAGE_LOAD_COUNT);\n query.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n /*\n * Notify that all RecyclerView data will be cleared and then clear all data structures\n * Iterate through the DataSnapshot and add all new data to the data structures\n * Notify RecyclerView after items are added to data structures\n */\n\n prismPostArrayList.clear();\n getActivity().runOnUiThread(new Runnable() {\n @Override\n public void run() {\n mainContentRecyclerViewAdapter.notifyDataSetChanged();\n }\n });\n\n if (dataSnapshot.exists()) {\n for (DataSnapshot postSnapshot : dataSnapshot.getChildren()) {\n PrismPost prismPost = Helper.constructPrismPostObject(postSnapshot);\n prismPostArrayList.add(prismPost);\n }\n noMainPostsRelativeLayout.setVisibility(View.GONE);\n populateUserDetailsForAllPosts(true);\n } else {\n Log.i(Default.TAG_DB, Message.NO_DATA);\n noMainPostsRelativeLayout.setVisibility(View.VISIBLE);\n mainContentSwipeRefreshLayout.setRefreshing(false);\n mainContentProgressBar.setVisibility(View.GONE);\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n Log.e(Default.TAG_DB, databaseError.getMessage(), databaseError.toException());\n }\n });\n }",
"public void refreshView(){\n\t\tView v = getView();\n\t\tif(v != null){\n\t\t\tv.invalidate();\n\t\t}\n\t}",
"public void refresh();",
"public void refresh();",
"public void refresh();",
"public void refresh();",
"public void refresh();",
"public void refresh();",
"public void refresh();",
"@Override\n\tpublic void refresh() {\n\t\t\n\t}",
"@Override\n\tpublic void refresh() {\n\t\t\n\t}",
"@Override\n public void onRefresh() {\n reloadList();\n swipeContainer.setRefreshing(true);\n\n }",
"private void refreshDetails() {\r\n\t\tdetailsLabel.setText( getSummary() );\r\n\t\tdetailsLabel.repaint();\r\n\t}",
"@Override\r\n\tpublic void onRefresh() {\n\r\n\t}",
"@Override\n public List<Post> refresh() {\n try {\n this.posts = manager.refreshFeed(this.user.getEmail());\n } catch (RemoteException e) {\n e.printStackTrace();\n }\n return posts;\n }",
"@Override\n public void onRefresh() {\n load_remote_data();\n }",
"@Override\n public void onRefresh() {\n }",
"public void updateViews() {\n updateViews(null);\n }",
"@Override\n\t\t\tpublic void onRefresh() {\n\t\t\t\tif(isRefreshEnabled()){\n\t\t\t\t\tsetRefreshEnabled(false);\n\t\t\t\t\tfetchGardenDetails(homeFrgRootView,true);\n\t\t\t\t}\n\t\t\t}",
"public void refresh() {\n\t\tgetTableViewer().refresh();\n\t}",
"@Override\n\tpublic void onRefresh() {\n\n\t}",
"@Override\n public void onRefresh() {\n fetchNews();\n }",
"@Override\n public void refreshFragment() {\n }",
"@Override\n public void refresh() {\n refresher.enqueueRefresh();\n }",
"public void refresh() {\n // The actual work is in refreshInernal(), but we don't call it directly here, because:\n // 1. refresh() is called very often.\n // 2. to avoid nested fragment transaction.\n // refresh is often called during a fragment transaction, but updateTitle() may call\n // a callback which would initiate another fragment transaction.\n mDelayedOperations.removeCallbacks(mRefreshRunnable);\n mDelayedOperations.post(mRefreshRunnable);\n }",
"public void refresh() {\n if (!postLoaderMethodList.interpretAsGlobalPosts()) {\n refreshWithHidePublicUpdate();\n } else {\n refreshNoHidePublicUpdate();\n }\n }",
"public void Refresh()\n\t{\n\t}",
"@Override\n\t\tpublic void onRefresh() {\n\t\t\tloadInfo(1, 0);\n\t\t}",
"@Override\r\n\t\t\tpublic void onRefresh() {\n\r\n\t\t\t}",
"public void reloadView() {\n container.revalidate();\n container.repaint();\n }",
"public void reload(){\n populateList();\n }",
"@Override\n public void onRefresh() {\n max_id = 0;\n populateCurrentUser();\n populateTimeline();\n }",
"public void help (ArrayList<Post> post)\n {\n adminRecView = findViewById(R.id.adminRecView);\n posts = post;\n ModRecAdapter adapt = new ModRecAdapter(posts, this);\n adminRecView.setAdapter(adapt);\n adminRecView.setLayoutManager(new LinearLayoutManager(this));\n }",
"public void showPosts() {\n\t\tpostsList.getItems().clear();\n\t\tList<Text> toPost = getPosts();\n\t\tfor(Text text : toPost) {\n\t\t\tSystem.out.println(text);\n\t\t\ttext.wrappingWidthProperty().bind(postsList.widthProperty());\n\t\t\tpostsList.getItems().add(text);\n\t\t}\n\t}",
"@Override\n\tpublic void onRefresh() {\n\t\tpage = 1;\n\t\tSystem.out.println(\"onRefresh1\");\n\t\tmyList.clear();\n\t\tSystem.out.println(\"onRefresh2\");\n\t\tgetData();\n\t}",
"public void updateDetailWindow();",
"@Override\r\n\t\t\tpublic void onRefresh() {\n\t\t\t\tgetLichHoc();\r\n\t\t\t}",
"public void refresh() {\n\t\tscroll.refresh();\n\n\t}",
"public void refresh(){\n // close loading dialogs if they are open\n Fragment dialog = getSupportFragmentManager().findFragmentByTag(\"loading\");\n if (dialog != null) {\n loadingDialog.dismiss();\n }\n\n // update timestamp\n if (timestamp != null) {\n TextView time = findViewById(R.id.result_time_text);\n time.setText(getString(R.string.last_result, timestamp));\n }\n\n // destroy and recreate fragments with latest data\n Fragment loadedFragment = getSupportFragmentManager().findFragmentById(R.id.fragment_container);\n Fragment newFragment;\n FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();\n\n if (loadedFragment instanceof PsiFragment) {\n newFragment = PsiFragment.newInstance(psiValues);\n }\n else if (loadedFragment instanceof Pm25Fragment) {\n newFragment = Pm25Fragment.newInstance(pm25Values);\n }\n else{\n newFragment = HomeFragment.newInstance(psiValues,pm25Values);\n }\n transaction.replace(R.id.fragment_container, newFragment);\n transaction.commit();\n }",
"public abstract void refresh();",
"public abstract void refresh();",
"public abstract void refresh();",
"@Override\n public void onRefresh() {\n\n GetFirstData();\n }",
"protected void refresh()\n {\n refresh(System.currentTimeMillis());\n }",
"public void refresh_and_back_to_tourspane() {\n\t\tSceneController.pop();\n\t\tSceneController.pop_title();\n\t\tFadeOutRight anim1 = new FadeOutRight(HomeController.instance.PANE);\n\t\tanim1.play();\n\t\tanim1.setResetOnFinished(true);\n\t\tanim1.setOnFinished(event1 -> {\n\t\t\tSelectedCity_ToursController LookupForm = new SelectedCity_ToursController();\n\n\t\t\ttry {\n\t\t\t\tLookupForm.start(HomeController.instance.PANE);\n\n\t\t\t\tclient.requestHandler.Catalog.getAllTours(GeneralValues.CITY);\n\t\t\t\t\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t});\n\t\t\n\t}",
"@Override\n protected void forceRefresh() {\n if (getEntity() != null) {\n super.forceRefresh();\n }\n }",
"public void refresh() {\n this.removeAll();\n init();\n this.revalidate();\n }",
"@Override\n public void onRefresh() {\n swipeRefreshLayout.setRefreshing(false);\n heroList.clear();\n loadRecyclerViewData();\n }",
"public void refresh() {\r\n\t\tinit();\r\n\t}",
"public void clear() {\n posts.clear();\n notifyDataSetChanged();\n }",
"public void clear() {\n posts.clear();\n notifyDataSetChanged();\n }",
"public void clear() {\n posts.clear();\n notifyDataSetChanged();\n }",
"public void clear() {\n posts.clear();\n notifyDataSetChanged();\n }",
"public void clear() {\n posts.clear();\n notifyDataSetChanged();\n }",
"public void clear() {\n posts.clear();\n notifyDataSetChanged();\n }",
"public void clear() {\n posts.clear();\n notifyDataSetChanged();\n }",
"@Override\n public void onViewCreated(View view, Bundle savedInstanceState) {\n super.onViewCreated(view, savedInstanceState);\n mPostsRecyclerView = view.findViewById(R.id.rvPosts);\n mSwipeContainer = view.findViewById(R.id.swipeContainer);\n\n mSwipeContainer.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {\n @Override\n public void onRefresh() {\n mAdapter.clear();\n queryPosts();\n mSwipeContainer.setRefreshing(false);\n }\n });\n\n mPosts = new ArrayList<>();\n\n mAdapter = new PostsAdapter(getContext(), mPosts, false);\n mPostsRecyclerView.setAdapter(mAdapter);\n\n setLayout();\n\n queryPosts();\n }",
"@Override\r\n\tpublic void onRefresh() {\n\t\tloadFourmData(true);\r\n\t}",
"@Override\n\tpublic void refreshData(){\n\t\tpageNum = 1;\n\t\tlist.clear();\n\t\tloadData();\n\t}",
"public void seeFreshContent();",
"public void refresh(){\n\n data2.clear();\n data2=getActionsList(\"\");\n //actionsAdapter=new ActionsAdapter(data2,getContext());\n //myList.setAdapter(actionsAdapter);\n //actionsAdapter.notifyDataSetChanged();\n }",
"@Override\n public void onRefresh() {\n getGroupList();\n }",
"public void reload() {\r\n\t\tif(!this.isVisible()){\r\n\t\t\tthis.list.show(new Vector<Record>());\r\n\t\t\tpanForm.clear();\r\n\t\t}else{\r\n\t\t\tthis.list.show(new Vector<Record>());\r\n\t\t\tperformSearch();\r\n\t\t}\r\n\t\tpanForm.reload();\r\n\t}",
"@Override public void run() {\n DisplayAllUsersPosts();\n swipe.setRefreshing(false);\n }",
"public void backToPosters(){\n //check if favorite list is going to be displayed or if favorite list has changed\n if(mMovieType == PosterHelper.NAME_ID_FAVORITE && mFavoriteChanged){\n //refresh favorite list\n showMovieList(mMovieStaff.getMovies(PosterHelper.NAME_ID_FAVORITE),\n PosterHelper.NAME_ID_FAVORITE);\n }\n }",
"@Override\r\n\tpublic List<Post> refreshResult() {\n\t\tpostDao=new PostDaoImpl(TransactionManager.connection);\r\n\t\tList<Post> list=new ArrayList<Post>();\r\n\t\treturn postDao.refreshResult();\r\n\t\t\r\n\t}"
] | [
"0.7111272",
"0.69850457",
"0.6859844",
"0.67468476",
"0.6714722",
"0.66555303",
"0.66277933",
"0.66260594",
"0.6615243",
"0.6566589",
"0.6556046",
"0.6472091",
"0.63339573",
"0.6202221",
"0.6180332",
"0.6156532",
"0.6153058",
"0.61529374",
"0.6135263",
"0.6114261",
"0.6096842",
"0.60811",
"0.6030297",
"0.6026667",
"0.6007229",
"0.59840506",
"0.59760445",
"0.5957861",
"0.59536743",
"0.59382963",
"0.5908581",
"0.5904824",
"0.58986026",
"0.5897181",
"0.58638465",
"0.58628356",
"0.58546126",
"0.58546126",
"0.58546126",
"0.58546126",
"0.58546126",
"0.58546126",
"0.58546126",
"0.58426464",
"0.58426464",
"0.5794275",
"0.5789078",
"0.5773513",
"0.5761054",
"0.5754731",
"0.575398",
"0.5751858",
"0.57438594",
"0.5743033",
"0.5741621",
"0.5739649",
"0.57285786",
"0.57195365",
"0.5699104",
"0.5685721",
"0.56748986",
"0.56708026",
"0.56671536",
"0.566703",
"0.5658888",
"0.56344223",
"0.56313443",
"0.561433",
"0.56030893",
"0.55901444",
"0.55814534",
"0.5579624",
"0.55765235",
"0.55749786",
"0.55749786",
"0.55749786",
"0.55711",
"0.55564016",
"0.5555049",
"0.55402124",
"0.5534525",
"0.5525259",
"0.55174685",
"0.5510497",
"0.5510497",
"0.5510497",
"0.5510497",
"0.5510497",
"0.5510497",
"0.5510497",
"0.5507754",
"0.5504749",
"0.550463",
"0.5502953",
"0.549856",
"0.5490185",
"0.5488709",
"0.54807675",
"0.54749227",
"0.5474305"
] | 0.70799905 | 1 |
Displays the title pf the Post | private HBox showTitle(Post post) {
Button backMenu = new Button("Back To Main Window");
backMenu.setOnAction(PostDetailsController.backMenuhandler());
Region region1 = new Region();
HBox.setHgrow(region1, Priority.ALWAYS);
Region region2 = new Region();
HBox.setHgrow(region2, Priority.ALWAYS);
Text title = new Text(post.getId() + " - " + post.getTitle() + " : Post Details");
title.setFont(Font.font("Tahoma", FontWeight.SEMI_BOLD, 30));
HBox titleBox = new HBox(backMenu, region1, title, region2);
return titleBox;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setTitle(String postTitle) {\n\t\tthis.postTitle = postTitle;\n\t}",
"@Override\n\tpublic java.lang.String getTitle() {\n\t\treturn _news_Blogs.getTitle();\n\t}",
"@Override\r\n\tpublic String getTitle() {\n\t\treturn title;\r\n\t}",
"@Override\r\n public String getTitle() {\n return title;\r\n }",
"public String title()\n\t{\n\t\treturn title;\n\t}",
"public String getTitle()\r\n\t{\r\n\t\treturn TITLE;\r\n\t}",
"@Override\r\n public String getTitle() {\r\n return title;\r\n }",
"public String getTitle() {\n \t\treturn title;\n \t}",
"@Override\n public String getTitle() {\n return title;\n }",
"public String getTitle()\n\t{\n\t\treturn title;\n\t}",
"public String getTitle()\n\t{\n\t\treturn title;\n\t}",
"public String getTitle()\n {\n return title;\n }",
"public String title() {\n\t\treturn title;\n\t}",
"public String getTitle()\r\n {\r\n return title;\r\n }",
"public String getTitle()\r\n {\r\n return title;\r\n }",
"public String getTitle() {\r\n\t\treturn title;\r\n\t}",
"public String getTitle() {\r\n\t\treturn title;\r\n\t}",
"public String getTitle() {\r\n\t\treturn title;\r\n\t}",
"public String getTitle() {\r\n\t\treturn title;\r\n\t}",
"public String getTitle() {\r\n\t\treturn title;\r\n\t}",
"public String getTitle() {\r\n\t\treturn title;\r\n\t}",
"public String getTitle() {\r\n\t\treturn title;\r\n\t}",
"public java.lang.String getTitle() {\n return title;\n }",
"public String getTitle()\n {\n return title;\n }",
"public String getTitle()\n {\n return title;\n }",
"public String getTitle()\n {\n return title;\n }",
"public String getTitle()\n {\n return title;\n }",
"public String getTitle()\n {\n return title;\n }",
"public String getTitle()\n {\n return title;\n }",
"public String getTitle() {\r\n return title;\r\n }",
"public String getTitle() { return title; }",
"public java.lang.String getTitle() {\n return title;\n }",
"public java.lang.String getTitle() {\n return title;\n }",
"public java.lang.String getTitle() {\n return title;\n }",
"public String getTitle() {\r\n return title;\r\n }",
"public String getTitle() {\r\n return title;\r\n }",
"public String getTitle() {\r\n return title;\r\n }",
"public String getTitle() {\r\n return title;\r\n }",
"public String getTitle() {\r\n return title;\r\n }",
"public String getTitle() {\r\n return title;\r\n }",
"public String getTitle() {\r\n return title;\r\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public java.lang.String getTitle() {\n return title;\n }",
"public String getTitle(){\n\n\t\treturn title;\n\t}",
"public String getTitle() \r\n\t{\r\n\t\treturn this.title;\r\n\t}",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }"
] | [
"0.770738",
"0.74908453",
"0.74208474",
"0.7317269",
"0.73166",
"0.72781473",
"0.7278093",
"0.7250678",
"0.72392714",
"0.72389865",
"0.72389865",
"0.7212313",
"0.72053707",
"0.7193175",
"0.7193175",
"0.71704507",
"0.71704507",
"0.71704507",
"0.71704507",
"0.71704507",
"0.71704507",
"0.71704507",
"0.7169179",
"0.7165864",
"0.7165864",
"0.7165864",
"0.7165864",
"0.7165864",
"0.7165864",
"0.7157732",
"0.7156778",
"0.7148822",
"0.7148822",
"0.7148822",
"0.7147601",
"0.7147601",
"0.7147601",
"0.7147601",
"0.7147601",
"0.7147601",
"0.7147601",
"0.7145843",
"0.7145843",
"0.7145843",
"0.7145843",
"0.7145843",
"0.71456236",
"0.7144497",
"0.7138398",
"0.71356356",
"0.71356356",
"0.71310246",
"0.71310246",
"0.71310246",
"0.71310246",
"0.71310246",
"0.71310246",
"0.71310246",
"0.71310246",
"0.71310246",
"0.71310246",
"0.71310246",
"0.71310246",
"0.71310246",
"0.71310246",
"0.71310246",
"0.71310246",
"0.71310246",
"0.71310246",
"0.71310246",
"0.71310246",
"0.71310246",
"0.71310246",
"0.71310246",
"0.71310246",
"0.71310246",
"0.71310246",
"0.71310246",
"0.71310246",
"0.71310246",
"0.71310246",
"0.71310246",
"0.71310246",
"0.71310246",
"0.71310246",
"0.71310246",
"0.71310246",
"0.71310246",
"0.71310246",
"0.71310246",
"0.71310246",
"0.71310246",
"0.71310246",
"0.71310246",
"0.71310246",
"0.71310246",
"0.71310246",
"0.71310246",
"0.71310246",
"0.71310246"
] | 0.7446014 | 2 |
Creates a label with given message and Value along with its corresponding TextField | private static GridPane getLabel(String message, String value, boolean editable, String type) {
value = postDetailsController.lineBreaker(value);
GridPane grid = new GridPane();
Label label = new Label (message);
label.setFont(Font.font("Tahoma", FontWeight.SEMI_BOLD, 14));
TextField tf = new TextField();
tf.setText(value);
tf.setEditable(editable);
tf.focusedProperty().addListener((observableValue, oldValue, newValue) -> {
if(!newValue) {
if(type.equalsIgnoreCase("int")) {
if(!Pattern.matches("^[1-9]\\d*$", tf.getText().trim())) {
Alert invalidInput = AlertController.pushAlerts("WARNING", new InvalidInputException(" Enter a valid integer!").toString());
invalidInput.show();
}
}
else if(type.equalsIgnoreCase("date")) {
if(!Pattern.matches("^(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.](19|20)\\d\\d$", tf.getText().trim())) {
Alert invalidInput = AlertController.pushAlerts("WARNING", new InvalidInputException(" Enter a valid date!").toString());
invalidInput.show();
}
}
else if(type.equalsIgnoreCase("double")) {
if(!Pattern.matches("^(-?)(0|([1-9][0-9]*))(\\.[0-9]+)?$", tf.getText().trim())) {
Alert invalidInput = AlertController.pushAlerts("WARNING", new InvalidInputException(" Enter a valid amount!").toString());
invalidInput.show();
}
}
}
});
grid.add(label, 0, 0);
grid.add(tf, 1, 0);
return grid;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static Label createInputLabel(String lblValue) {\n\t\tLabel lbl = new Label(lblValue);\n\t\tlbl.setFont(Font.font(\"Arial\", FontWeight.SEMI_BOLD, 20));\n\t\treturn lbl;\n\t}",
"private void createTextFieldLabels() {\n // initialize empty textfield\n this.name = new TextField();\n this.id = new TextField();\n this.fiber = new TextField();\n this.calories = new TextField();\n this.fat = new TextField();\n this.carbohydrate = new TextField();\n this.protein = new TextField();\n // initialize labels\n this.nameLabel = new Label(\"Name:\");\n this.idLabel = new Label(\"ID:\");\n this.fiberLabel = new Label(\"Fiber:\");\n this.caloriesLabel = new Label(\"Calories:\");\n this.fatLabel = new Label(\"Fat:\");\n this.carbohydrateLabel = new Label(\"Carbohydrate:\");\n this.proteinLabel = new Label(\"Protein:\");\n }",
"private Label createLabel(String text, int offset) {\n\t\tLabel label = new Label(text);\n\t\t//label.setFont(Font.font(40));\n\t\tlabel.setTextFill(Color.YELLOW);\n\t\tlabel.getTransforms().add(new Rotate(-50, 300, 400, 20, Rotate.X_AXIS));\n\t\tlabel.setLayoutX(canvas.getWidth() / 2);\n\t\tlabel.setLayoutY(canvas.getHeight() / 2 + offset);\n\t\tlabel.setId(\"chooseFile\");\n\t\t\n\t\treturn label;\n\n\t}",
"public Field label(String label);",
"public void processAddLabel() {\n AppTextEnterDialogSingleton dialog = AppTextEnterDialogSingleton.getSingleton();\n\n // POP UP THE DIALOG\n dialog.show(\"Add Label\", \"Enter text of the label to add:\");\n \n // CHANGE THE CURSOR\n Scene scene = app.getGUI().getPrimaryScene();\n scene.setCursor(Cursor.CROSSHAIR);\n \n // CHANGE THE STATE\n dataManager.setState(mmmState.ADD_LABEL_MODE);\n }",
"public void setDataIntoField(String fieldLabel, String value){\n reporter.info(\"Set data \"+value+\" into field\"+fieldLabel);\n setText(LOCATORS.getBy(COMPONENT_NAME,\"FIELD_INPUT_BY_NAME\",fieldLabel),value,SHORT_TIMEOUT);\n }",
"public void addTextFieldsAndLabels(){\n this.add(this.firstLabel);\n this.add(firstNameField);\n this.add(this.secondLabel);\n this.add(lastNameField);\n }",
"String addLabel(String label);",
"public LabelValueBean(String label, String value) {\n this.label = label;\n this.value = value;\n }",
"String getFormFieldLabel();",
"private Widget getLabel(String text, final List defList) {\n Image newField = getNewFieldButton(defList);\n\n HorizontalPanel h = new HorizontalPanel();\n h.add(new SmallLabel(text)); h.add(newField);\n return h;\n\t}",
"private void crearLabels(){\n\t\tJLabel label = new JLabel(\" USER \");\n\t\tuser = new JTextField(15);\n\t\tthis.getContentPane().add(label);\n\t\tthis.getContentPane().add(user);\n\t\tJLabel label1 = new JLabel(\"PASSWORD\");\n\t\tpassword = new JPasswordField(15);\n\t\tthis.getContentPane().add(label1);\n\t\tthis.getContentPane().add(password);\n\t}",
"public void setLabelText(String text);",
"public Builder setLabel(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n label_ = value;\n onChanged();\n return this;\n }",
"public abstract void addLabel(String str);",
"public LabelField addLabelField(final String key) {\n String label = key;\n LabelField labelField = new LabelField(getComposite(), _form, key, label, false);\n labelField.adapt(_formToolkit);\n _form.mapField(key, labelField);\n return labelField;\n }",
"protected void createTextfield(CompContainer cc, String name, String type)\r\n\t{\r\n\t\t// create label\r\n\t\tcc.label = new JLabel(localer.getBundleText(name));\r\n\t\tcc.label.setName(\"Label-\" + name);\r\n\t\tcc.label.setFont(cc.label.getFont().deriveFont(Font.PLAIN));\r\n\t\t\r\n\t\t// create component\r\n\t\tif(type.equals(\"JTextField\"))\r\n\t\t\tcc.comp = new JTextField(prefMap.get(name));\r\n\t\telse if(type.equals(\"JPasswordField\"))\r\n\t\t\tcc.comp = new JPasswordField(prefMap.get(name));\r\n\t\telse if(type.equals(\"NumericTextField\"))\r\n\t\t\tcc.comp = new NumericTextField(prefMap.get(name));\r\n\t\tcc.comp.setName(name);\r\n\t}",
"public static JLabel newFormLabel(String text) {\n JLabel label = newLabel(text);\n label.setHorizontalAlignment(SwingConstants.RIGHT);\n label.setForeground(label.getForeground().brighter());\n return label;\n }",
"private InputValueElement getInputValueElementByLabel(String labelText) {\n return new InputValueElement(userPropertiesObjectContainer.findElement(By.xpath(\n \".//*[(self::label or self::span) and normalize-space()='\" + labelText + \"']/..\"\n )), labelText);\n }",
"private Label initLabel(DraftKit_PropertyType labelProperty, String styleClass) {\n PropertiesManager props = PropertiesManager.getPropertiesManager();\n String labelText = props.getProperty(labelProperty);\n Label label = new Label(labelText);\n label.getStyleClass().add(styleClass);\n return label;\n }",
"private void createTextField() {\n textField = new TextField(getString());\n textField.setAlignment(Pos.CENTER);\n textField.focusedProperty().addListener(\n (observable, oldValue, newValue) -> {\n if (!newValue) {\n Integer priority = null;\n if (!(textField.getText() == null || textField.getText().trim().isEmpty())) {\n try {\n priority = Integer.parseInt(textField.getText());\n commitEdit(priority);\n }\n catch (NumberFormatException e) {\n if (Objects.equals(textField.getText(), \"-\") && !popUpIsActive) {\n commitEdit(null);\n }\n else {\n addFormError(textField, \"{NanError}\");\n }\n }\n }\n }\n });\n\n textField.setOnKeyReleased(t -> {\n if (t.getCode() == KeyCode.ENTER) {\n Integer priority = null;\n if (!(textField.getText() == null || textField.getText().trim().isEmpty())) {\n try {\n priority = Integer.parseInt(textField.getText());\n commitEdit(priority);\n }\n catch (NumberFormatException e) {\n if (Objects.equals(textField.getText(), \"-\")) {\n commitEdit(null);\n }\n else {\n addFormError(textField, \"{NanError}\");\n }\n }\n }\n else {\n commitEdit(null);\n }\n }\n if (t.getCode() == KeyCode.ESCAPE) {\n cancelEdit();\n }\n });\n }",
"private String getLabel(String label, String text) {\n\t\tStringBuffer buffer = new StringBuffer(label);\n\t\tif (text != null && !\"\".equals(text)) {\n\t\t\tif (!\"Choose One\".equals(text)) {\n\t\t\t\tbuffer.append(\": '\" + text + \"'\");\n\t\t\t}\n\t\t}\n\n\t\treturn buffer.toString();\n\t}",
"private JComponent addField(FactoryViewPanel panel, ViewModel<?> model)\r\n {\r\n JComponent component = createComponent(model);\r\n panel.addLabelComponent(ControllerFactory.createLabel(model, component), component);\r\n return component;\r\n }",
"public void setLabel(final String labelValue) {\n this.label = labelValue;\n }",
"public void setLabel(final String labelValue) {\n this.label = labelValue;\n }",
"public void setLabel(final String labelValue) {\n this.label = labelValue;\n }",
"com.microsoft.schemas.xrm._2011.contracts.Label addNewLabel();",
"private JComponent createValueComponent(Map<String, String> map, String labText) {\n\t\tJComponent com = null;\n\t\tString tip = map.get(labText);\n\t\tif (tip.startsWith(\"Check \")) {\n\t\t\tcom = new JCheckBox();\n\t\t\tif (entries.get(labText).compareTo(\"0\") == 0) {\n\t\t\t\t((JCheckBox) com).setSelected(false);\n\t\t\t} else {\n\t\t\t\t((JCheckBox) com).setSelected(true);\n\t\t\t}\n\t\t} else {\n\t\t\tcom = new JTextField(entries.get(labText));\n\t\t}\n\t\tcom.setToolTipText(tip);\n\t\treturn com;\n\t}",
"private Label addNewLabel() {\n getElement().getChildren().forEach(e -> getElement().removeChild(e));\n // Create and add a new slotted label\n Label label = new Label();\n label.getElement().setAttribute(\"slot\", \"label\");\n this.getElement().appendChild(label.getElement());\n return label;\n }",
"public abstract Code addLabel(String label);",
"public TextField(String text){\n super(text);\n this.defaultText = text;\n }",
"private void addMembersLabel(String text) {\n Label label = new Label(text);\n label.setStyleName(ValoTheme.LABEL_H2);\n //label.addStyleName(cssTeamMembersList);\n this.addComponent(label);\n }",
"Builder addText(String value);",
"private void createTextField(){\n Font font = new Font(\"Verdana\", Font.BOLD,3*getGameContainer().getWidth()/100);\n TrueTypeFont ttf = new TrueTypeFont(font,true);\n int fieldWidth = getGameContainer().getWidth()/3;\n int fieldHeight = getGameContainer().getHeight()/18;\n nameField = new TextField(getGameContainer(), ttf,43*getGameContainer().getWidth()/100,24*getGameContainer().getHeight()/100, fieldWidth, fieldHeight);\n nameField.setBackgroundColor(Color.white);\n nameField.setTextColor(Color.black);\n passwordField= new TextField(getGameContainer(), ttf,43*getGameContainer().getWidth()/100,32*getGameContainer().getHeight()/100, fieldWidth, fieldHeight);\n passwordField.setBackgroundColor(Color.white);\n passwordField.setTextColor(Color.black);\n }",
"public void changeVarLabel() {\n if (inHouse.isSelected()) {\n varLabel.setText(\"Machine ID\");\n variableTextField.setPromptText(\"Machine ID...\");\n variableTextField.setMaxLength(9);\n int textLength = partId.getText().length();\n variableTextField.setText(variableTextField.getText().replaceAll(\"[^\\\\d.]\", \"\"));\n variableTextField.positionCaret(textLength);\n } else if (outsourced.isSelected()) {\n varLabel.setText(\"Company Name\");\n variableTextField.setPromptText(\"Company Name...\");\n variableTextField.setMaxLength(26);\n }\n }",
"public void setLabel()\r\n {\r\n int i = Converter(Input);\r\n \r\n if(j<i && label.getText().equals(\"Player 1\"))\r\n {\r\n j++;\r\n label.setText(\"Player \"+j);\r\n \r\n }else if(j<i && label.getText().equals(\"Player 2\"))\r\n {\r\n j++;\r\n label.setText(\"Player \"+j);\r\n }else if(j<i && label.getText().equals(\"Player 3\"))\r\n {\r\n j++;\r\n label.setText(\"Player \"+j);\r\n }else if(j==i && label.getText().equals(\"Player \"+j))\r\n {\r\n j=1;\r\n label.setText(\"Player \"+j);\r\n }\r\n \r\n \r\n }",
"@Override\r\n\tpublic JLabel createLabel() {\r\n\t\treturn new JLabel();\r\n\t}",
"public void addToTextbox(String input) {\n\t\tlabel.setText(input.trim());\n\t}",
"void setLabelString() {\n int pad = 5; // fudge to make up for variable width fonts\n float maxVal = Math.max(Math.abs(min), Math.abs(max));\n intDigits = Math.round((float) (Math.log(maxVal) / Math.log(10))) + pad;\n if (min < 0) {\n intDigits++; // add one for the '-'\n }\n // fractDigits is num digits of resolution for fraction. Use base 10 log\n // of scale, rounded up, + 2.\n fractDigits = (int) Math.ceil((Math.log(scale) / Math.log(10)));\n nf.setMinimumFractionDigits(fractDigits);\n nf.setMaximumFractionDigits(fractDigits);\n String value = nf.format(current);\n while (value.length() < (intDigits + fractDigits)) {\n value = value + \" \";\n }\n valueLabel.setText(value);\n }",
"private void createFirstNameBox() {\n firstNameField = new TextField();\n firstNameField.setId(\"Firstname\");\n HBox firstNameBox = new HBox(new Label(\"First name: \"), firstNameField);\n firstNameBox.setAlignment(Pos.CENTER);\n mainBox.getChildren().add(firstNameBox);\n }",
"ReadOnlyStringProperty labelProperty();",
"void addLabel(Object newLabel);",
"void addLabel(Object newLabel);",
"@Override\r\n\t\t\t\tpublic String textFormatter(String value) {\n\t\t\t\t\tString label = \"(\" + value + \")\";\r\n\t\t\t\t\treturn (label);\r\n\t\t\t\t}",
"public LabelValueBean() {\r\n\t\tsuper(\"\", \"\");\r\n\t}",
"private void createLabel(String title, int row, int col, int fontsize) {\n \tLabel label1 = new Label(title);\n \tlabel1.setFont(Font.font(myResources.getString(\"font\"), \n \t\t\tFontWeight.EXTRA_BOLD, FontPosture.ITALIC, fontsize));\n \tlabel1.setTextFill(Color.RED);\n \tstartScreen.add(label1, row, col);\n }",
"Builder addText(Text value);",
"private Label createScoreLabel(){\n Label text;\n Label.LabelStyle textStyle;\n BitmapFont font = new BitmapFont();\n\n textStyle = new Label.LabelStyle();\n textStyle.font = font;\n\n text = new Label(\"Score:\",textStyle);\n text.setAlignment(Align.center);\n text.setFontScale(2f*scale,2f*scale);\n text.setPosition(stage.getViewport().getCamera().viewportWidth * 0.5f,\n stage.getViewport().getCamera().viewportHeight * 0.70f);\n return text;\n }",
"private Label createScoreFloatLabel(){\n Label text;\n Label.LabelStyle textStyle;\n BitmapFont font = new BitmapFont();\n\n textStyle = new Label.LabelStyle();\n textStyle.font = font;\n\n text = new Label(\"\"+Math.round(playerInput.gameScore),textStyle);\n text.setFontScale(2f*scale,2f*scale);\n text.setAlignment(Align.center);\n text.setPosition(stage.getViewport().getCamera().viewportWidth * 0.5f,\n stage.getViewport().getCamera().viewportHeight * 0.60f);\n return text;\n }",
"private void setupLabelUI(Label l, String ff, double f, double w, Pos p, double x, double y) {\n\t\tl.setFont(Font.font(ff, f));\n\t\tl.setMinWidth(w);\n\t\tl.setAlignment(p);\n\t\tl.setLayoutX(x);\n\t\tl.setLayoutY(y);\n\t}",
"private Label createInitializingLabel(Composite parent)\n\t{\n\t\tLabel initializingMessageLabel = new Label(parent, SWT.NONE);\n\t\tinitializationFont = new Font(Display.getDefault(), new FontData(\"Arial\", 20,\n\t\t\t\tSWT.BOLD));\n\t\tinitializingMessageLabel.setFont(initializationFont);\n\t\tinitializingMessageLabel\n\t\t\t\t.setText(\"iDocIt! is initializing at the moment. Please wait ...\");\n\t\tinitializingMessageLabel.setBackground(Display.getDefault().getSystemColor(\n\t\t\t\tSWT.COLOR_WHITE));\n\t\tGridDataFactory.fillDefaults().align(SWT.CENTER, SWT.CENTER).grab(true, true)\n\t\t\t\t.applyTo(initializingMessageLabel);\n\n\t\treturn initializingMessageLabel;\n\t}",
"private void createLabels() {\n addLabels(\"Dog Name:\", 160);\n addLabels(\"Weight:\", 180);\n addLabels(\"Food:\", 200);\n }",
"private void createMessage(String msg) {\n\t\tmessage = new GLabel(msg);\n\t\tmessage.setFont(MESSAGE_FONT);\n\t\tadd(message, getWidth() / 2 - message.getWidth() / 2, getHeight()\n\t\t\t\t- BOTTOM_MESSAGE_MARGIN - message.getHeight());\n\t}",
"public CustomLabel(String text){\n setHorizontalAlignment(JLabel.LEFT);\n Font font = new Font(\"Bold\", Font.BOLD, 20);\n setFont(font);\n setText(\" \" + text);\n }",
"public static void createUI (JTextField fName, JTextField lName, JTextField vDesc, JTextField cLoc,\r\n JTextField dLoc, JTextField pNum, JPanel panel) {\n panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));\r\n panel.setAlignmentX(Component.LEFT_ALIGNMENT);\r\n panel.add(new JLabel(\"First Name:\"));\r\n panel.add(fName);\r\n panel.add(Box.createHorizontalStrut(15)); // a spacer\r\n panel.add(new JLabel(\"Last Name:\"));\r\n panel.add(lName);\r\n panel.add(new JLabel(\"Vehicle Description:\"));\r\n panel.add(vDesc);\r\n panel.add(new JLabel(\"Pick Up Location\"));\r\n panel.add(cLoc);\r\n panel.add(new JLabel(\"Drop Off Location\"));\r\n panel.add(dLoc);\r\n panel.add(new JLabel(\"Phone Number\"));\r\n panel.add(pNum);\r\n }",
"public MyGUIProgram() {\n Label MyLabel = new Label(\"Test string.\", Label.CENTER);\n this.add(MyLabel);\n\n }",
"public abstract String getLabelText();",
"public Label(String name, Integer value)\n {\n this.name = name;\n this.value = value;\n this.size = null; // Size is nonsensical for addresses\n this.type = Type.VALUE;\n }",
"private IMessageLabel buildLabel(final MessageSeverity severity) {\n return new MessageLabel(AppMessageKey.VIEW_MESSAGE_LABEL_TEXT,\n severity, severity);\n }",
"java.lang.String getLabel();",
"private void createUIComponents() {\n valueTextField = new JTextField();\n FixedService f = new FixedService();\n valueTextField.setText(\"£ \" + f.getPrice(\"Fixed\"));\n valueTextField.setBorder(new EmptyBorder(0, 0, 0, 0));\n }",
"private void updateLabel() {\n\t\tString translation = lp.getString(key);\n\t\tsetText(translation);\n\n\t}",
"void setLabel(String label);",
"@Override\n\tpublic void setLabelText(String label) {\n\t}",
"private void checkLabelValue()\n\t{\n\t\tif(labelValue != null && !\"\".equals(labelValue))\n\t\t{\n\t\t\tlabelValue += \": \";\n\t\t}\n\t}",
"public DialogLabel(String text, int posX, int posY, Pos pos) {\n\t\tsuper(text);\n\t\tsetup(posX, posY, pos);\n\t}",
"public FormElement(String labelStr, String valueStr, FormEntryTab parent, int column) {\n\t\tthis.parent = parent;\n\t\tthis.column = column;\n\t\t\n\t\tlabel = new JLabel(labelStr);\n\t\tlabel.setPreferredSize(PART_SIZE);\n\t\tlabel.setMinimumSize(PART_SIZE);\n\t\ttextField = new JTextField(valueStr);\n\t\ttextField.addActionListener(changeListener);\n\t\ttextField.addFocusListener(focusListener);\n\t\ttextField.setPreferredSize(PART_SIZE);\n\t\ttextField.setMinimumSize(PART_SIZE);\n\t\t\n\t\tsetLayout(new BoxLayout(this, BoxLayout.X_AXIS));\n\t\tadd(label);\n\t\tadd(textField);\n\t}",
"public void setLabel(Object value) {\n this.setValue(LABEL_PROPERTY_KEY, value);\n }",
"private JLabel _createNewLabel(String sCaption_) \n{\n Util.panicIf( sCaption_ == null );\n\n JLabel lblNew = new JLabel(sCaption_);\n lblNew.setFont( _pFont );\n \n return lblNew;\n }",
"public WidgetLabelPanel(String labelText, Widget widget){\n\t\tsuper();\n\t\tthis.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);\n\t\tLabel myLabel = new Label(labelText);\n\t\tmyLabel.addStyleName(\"widgetLabel\");\n\t\tthis.add(myLabel);\n\t\tthis.add(widget);\n\t}",
"public void addField (String label, String field) {\n addField (label, field, \"\");\n }",
"private Label initVBoxLabel(VBox container, DraftKit_PropertyType labelProperty, String styleClass) {\n Label label = initLabel(labelProperty, styleClass);\n container.getChildren().add(label);\n return label;\n }",
"public Label(NetworkTable nTable, int x, int y, Color color,\n Font font, double value) {\n super(nTable, \"\", x, y, 0, 0);\n this.color = color;\n this.font = font;\n this.value = value;\n lName = \"\";\n }",
"public ATextField(String value) {\n super();\n if (textField != null) {\n textField.setValue(value);\n }// end of if cycle\n }",
"public Label create(final int userValue) {\n\t\t\treturn new Label(Type.FIXED, userValue);\n\t\t}",
"@Override\n\t\tpublic void addLabel(Label label) {\n\n\t\t}",
"public void\nsetNewLabel()\nthrows Exception\n{\n\tdouble lineLength = this.getNucLabelLineLength();\n\tif (lineLength <= 0.0)\n\t\tlineLength = ComplexDefines.NUCLABEL_LINE_LENGTH;\n\tthis.setNewLabel(\n\t\tnew Font(\"Helvetica\", Font.PLAIN, 12),\n\t\tthis.getParentSSData2D().getNucLabelLineWidth(),\n\t\tlineLength, Color.black, this.getID());\n}",
"public Template_Label(String name, String description, ArrayList<CustomizerControl> controls, JTextComponent target) {\n\n initComponents();\n\n this.customizerName = name;\n this.controls = controls;\n this.controlMap = new HashMap<>();\n ;\n\n //this.descriptionLabel.setText(description);\n //Create a layout for this form\n this.setLayout(new GridBagLayout());\n GridBagConstraints c = new GridBagConstraints();\n\n JLabel formLabel = new JLabel(description);\n c.fill = GridBagConstraints.HORIZONTAL;\n c.weightx = 0.5;\n c.gridx = 0;\n c.gridy = 0;\n c.ipady = 10;\n\n this.add(formLabel, c);\n\n int row = 0;\n for (CustomizerControl control : controls) {\n\n if (control.getClass().isAssignableFrom(CustomizerTextField.class)) {\n //Text Control\n row += 1;\n\n //Add the label first.\n JLabel newLabel = new JLabel(control.getLabel());\n c = new GridBagConstraints(); //Reset constraints\n c.fill = GridBagConstraints.HORIZONTAL;\n c.weightx = 0.5;\n c.gridx = 0;\n c.gridwidth = 1;\n c.gridy = row;\n c.ipady = 10;\n this.add(newLabel, c);\n\n JTextField newTextField = new JTextField((String) control.getValue());\n c = new GridBagConstraints(); //Reset constraints\n c.fill = GridBagConstraints.HORIZONTAL;\n c.weightx = 0.5;\n c.gridx = 1;\n c.gridwidth = 2;\n c.gridy = row;\n controlMap.put(control.getName(), newTextField);\n this.add(newTextField, c);\n\n } else if (control.getClass().isAssignableFrom(CustomizerComboField.class)) {\n //Combo Control\n row += 1;\n //Add the label first.\n JLabel newLabel = new JLabel(control.getLabel());\n c = new GridBagConstraints(); //Reset constraints\n c.fill = GridBagConstraints.HORIZONTAL;\n c.weightx = 0.5;\n c.gridx = 0;\n c.gridwidth = 1;\n c.gridy = row;\n c.ipady = 10;\n this.add(newLabel, c);\n\n //Convert ArrayList to Array\n ArrayList<String> controlValues = (ArrayList<String>) control.getValue();\n String[] valueArray = new String[controlValues.size()];\n valueArray = controlValues.toArray(valueArray);\n\n JComboBox newComboField = new JComboBox(valueArray);\n c = new GridBagConstraints(); //Reset constraints\n c.fill = GridBagConstraints.HORIZONTAL;\n c.weightx = 0.5;\n c.gridx = 1;\n c.gridwidth = 2;\n c.gridy = row;\n controlMap.put(control.getName(), newComboField);\n this.add(newComboField, c);\n\n } else if (control.getClass().isAssignableFrom(CustomizerVariableField.class)) {\n //Variable Field\n\n //Populate variables from code if it hasn't been done already\n if (variableList == null) {\n String code = target.getText();\n JEditorPane codeEditor = (JEditorPane) target;\n String language = codeEditor.getContentType();\n CodeParser parser = new CodeParser(code, language);\n variableList = parser.getVariableList();\n }\n\n //Build the control, it is just a dropdown with the variable list\n //Combo Control\n row += 1;\n //Add the label first.\n JLabel newLabel = new JLabel(control.getLabel());\n c = new GridBagConstraints(); //Reset constraints\n c.fill = GridBagConstraints.HORIZONTAL;\n c.weightx = 0.5;\n c.gridx = 0;\n c.gridwidth = 1;\n c.gridy = row;\n c.ipady = 10;\n this.add(newLabel, c);\n\n //Convert ArrayList to Array\n String[] valueArray = new String[variableList.size()];\n valueArray = variableList.toArray(valueArray);\n\n JComboBox newComboField = new JComboBox(valueArray);\n newComboField.setEditable(true);\n c = new GridBagConstraints(); //Reset constraints\n c.fill = GridBagConstraints.HORIZONTAL;\n c.weightx = 0.5;\n c.gridx = 1;\n c.gridwidth = 2;\n c.gridy = row;\n controlMap.put(control.getName(), newComboField);\n this.add(newComboField, c);\n\n } else if (control.getClass().isAssignableFrom(CustomizerExpressionField.class)) {\n\n }\n }\n\n //Check if we can assign the target JTextComponent to a JEditorPane.\n //row += 1;\n //int lineNum = getRow(target.getCaretPosition(), target);\n //int columnNum = getColumn(target.getCaretPosition(), target);\n this.validate();\n this.repaint();\n\n }",
"public Builder setLabel(String key, String value) {\n data.add(key);\n data.add(value);\n return this;\n }",
"public String getLabelText();",
"private void createLastNameBox() {\n lastNameField = new TextField();\n lastNameField.setId(\"Lastname\");\n HBox lastNameBox = new HBox(new Label(\"Last name: \"), lastNameField);\n lastNameBox.setAlignment(Pos.CENTER);\n mainBox.getChildren().add(lastNameBox);\n\n }",
"public void assignTextLabel(String ID ,String Name, String TrainerID , String ProfessionName, String Price) throws SQLException {\n if(ID != null)\n FieldID.setText(ID );\n FieldName.setText(Name);\n if(Price != null)\n FieldPrice.setText(Price );\n\n if(ID != null)\n FieldIDLabel.setText(ID );\n FieldNameLabel.setText(Name);\n FieldTrainerIDLabel.setText(TrainerID);\n FieldProfessionNameLabel.setText(ProfessionName);\n if(Price != null)\n FieldPriceLabel.setText(Price );\n\n this.createBox();\n }",
"public TextWithLabel(Context context, AttributeSet attrs)\r\n {\r\n \r\n // Call the super class constructor to create a basic Textbox: \r\n super(context, attrs);\r\n \r\n // Generate new TextView for the label: \r\n labelView = new TextView(context, attrs);\r\n \r\n // Get custom attributes from XML file:\r\n getCustomAttributes(attrs);\r\n\r\n \r\n /**** Set some attributes: **********************\r\n * Could add more attributes?\r\n ************************************************/\r\n labelView.setTextSize(android.util.TypedValue.COMPLEX_UNIT_PT, labelSize);\r\n labelView.setGravity( android.view.Gravity.RIGHT );\r\n \r\n /**** Set text colour... ************************/\r\n //Resources res = getResources();\r\n //int color = res.getColor(R.color.normal_text);\r\n //labelView.setTextColor(color);\r\n //itemView.setTextColor(color);\r\n \r\n // Add the new text boxes to this layout: \r\n addView(labelView);\r\n \r\n }",
"private void createStartingLabel() {\n \tcreateLabel(myResources.getString(\"title\"), 1, 0, TITLE_FONT);\n }",
"@Override\n public void showLabel(Message message){\n\n clear(container);\n container.setLayout(new FlowLayout());\n errorLabel = new JLabel(message.toString());\n container.add(errorLabel);\n errorLabel.setLocation(475,108);\n errorLabel.setSize(100,100);\n applyChangesTo(container);\n\n\n }",
"public void addText(String text){\n try{\n FXMLLoader battleLogEntryLoader = new FXMLLoader(getClass().getClassLoader().getResource(\"FXML/BattleLogEntry.fxml\"));\n Label battleLogEntryLabel = battleLogEntryLoader.load();\n battleLogEntryLabel.setText(text);\n if(count % 2 == 0){\n battleLogEntryLabel.setBackground(new Background(new BackgroundFill(Color.LIGHTGRAY, CornerRadii.EMPTY, Insets.EMPTY)));\n } else{\n battleLogEntryLabel.setBackground(new Background(new BackgroundFill(Color.TRANSPARENT, CornerRadii.EMPTY, Insets.EMPTY)));\n }\n textSpace.getChildren().add(battleLogEntryLabel);\n count++;\n } catch(Exception e) {\n\n }\n }",
"private String makeLabel(String label)\n {\n \treturn label + \"$\" + Integer.toString(labelCount++);\n }",
"public void setLabel(Object v) \n {\n this.label = v;\n }",
"public JLabel addLabel(String texte) {\n JLabel label = new JLabel(texte);\n simplePanel.add(label);\n return label;\n }",
"public Label(float x, float y, String text) {\n super(x, y);\n this.text = text;\n this.fontSize = DEFAULT_FONT_SIZE;\n this.font = DEFAULT_FONT;\n this.type = GraphicsObjectType.LABEL;\n }",
"public TimePickerBuilder setLabel(String msgId) {\n\t\treturn configure(timePicker -> timePicker.setLabel(WebEnv.getTranslation(msgId)));\n\t}",
"private Label initHBoxLabel(HBox container, DraftKit_PropertyType labelProperty, String styleClass) {\n Label label = initLabel(labelProperty, styleClass);\n container.getChildren().add(label);\n return label;\n }",
"StringValue createStringValue();",
"StringValue createStringValue();",
"StringValue createStringValue();",
"StringValue createStringValue();",
"void setLabel(Label label);",
"public void addTextField(String label, String fill, int index) {\n //inflater needed to \"inflate\" layouts\n LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n //instantiate our data object.\n ElementTextField elementTextField = new ElementTextField(label, fill);\n //insert element data object in slot on page\n if (isLoading){\n currentPage.addElement(elementTextField);\n }else{\n currentPage.insertElement(index, elementTextField);\n }\n //we need to instantiate our xml fragment (text field) and bind it to the data object\n TextFieldBinding textFieldBinding = TextFieldBinding.inflate(inflater, null,false);\n textFieldBinding.setElementTextField(elementTextField);\n //get new view (our xml fragment -the text field) and add it to current view\n View newView = textFieldBinding.getRoot();\n if (isInspecting){\n EditText editText = newView.findViewById(R.id.label);\n editText.setFocusable(false);\n }\n linearLayoutBody.addView(newView, index);\n Context context = App.getContext();\n LogManager.reportStatus(context, \"INSPECTOR\", \"onTextField\");\n }",
"public void setTextInTextField(String message) {\r\n\t\ttextField.setText(message);\r\n\t}",
"public abstract JLabel createUserWidget(String userName, String host, String chatMessage);"
] | [
"0.6871734",
"0.6842215",
"0.6299033",
"0.62978566",
"0.62972194",
"0.6224885",
"0.61670506",
"0.61624205",
"0.61451757",
"0.61371446",
"0.61151725",
"0.60567373",
"0.6022786",
"0.5994585",
"0.5971556",
"0.590334",
"0.5885131",
"0.58527035",
"0.58471835",
"0.5839525",
"0.58234584",
"0.5811953",
"0.5806343",
"0.5802293",
"0.5802293",
"0.579349",
"0.5787735",
"0.57653433",
"0.5757672",
"0.5754596",
"0.5751682",
"0.5713881",
"0.57111365",
"0.57053894",
"0.5695319",
"0.5691557",
"0.56838477",
"0.5678851",
"0.567819",
"0.56751734",
"0.5675103",
"0.5674421",
"0.5674421",
"0.5673981",
"0.56609106",
"0.56591123",
"0.565305",
"0.56515896",
"0.5650948",
"0.5645171",
"0.5635186",
"0.5628699",
"0.5627251",
"0.56248665",
"0.56064236",
"0.5599978",
"0.55977917",
"0.5591301",
"0.5581248",
"0.55697083",
"0.55692023",
"0.5562157",
"0.5554832",
"0.55515367",
"0.55491865",
"0.5542747",
"0.55331963",
"0.5529328",
"0.55276394",
"0.55274135",
"0.55250835",
"0.552452",
"0.55231184",
"0.5512987",
"0.5511756",
"0.5510802",
"0.55095226",
"0.55051655",
"0.54878634",
"0.54817677",
"0.54749054",
"0.54670095",
"0.54605323",
"0.5448658",
"0.5448371",
"0.54467005",
"0.5446197",
"0.5446098",
"0.5441296",
"0.54367316",
"0.5432032",
"0.54313844",
"0.54287136",
"0.54287136",
"0.54287136",
"0.54287136",
"0.5420131",
"0.53932655",
"0.53894657",
"0.5387852"
] | 0.5984587 | 14 |
Method to fing whether the window is closed | public static boolean isWindowClosed() {
return windowClosed;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void windowClosed();",
"public boolean isCloseRequested(){\n return glfwWindowShouldClose(handle);\n }",
"public boolean requestCloseWindow() \n {\n return true; \n }",
"public boolean onClose() {\n\t\topenScreen(new Noticias());\n\t\treturn true ;\n\t}",
"public void windowClosed(WindowEvent e){}",
"protected void windowClosed() {\r\n\r\n\t\t// Exit\tapplication.\r\n\t\tSystem.exit(0);\r\n\t}",
"public boolean checkAutoClose();",
"boolean isCloseButtonDisplayed();",
"@Override\n\t\t\t\t\tpublic void windowClosed(WindowEvent e) {\n\t\t\t\t\t\tsetStillRunning(false);\n\t\t\t\t\t}",
"public abstract void windowClose(CloseEvent e);",
"public void windowClosed(WindowEvent e) {\n\r\n\t}",
"public void windowClosed(WindowEvent arg0) {\n\n }",
"public void windowClosed(WindowEvent e) {\n\t\t\r\n\t}",
"public boolean canClose(){\n return true;\n }",
"boolean isClosed();",
"boolean isClosed();",
"boolean isClosed();",
"boolean isClosed();",
"public boolean\tisClosed();",
"public void close() {\r\n dispatchEvent(new WindowEvent(this, WindowEvent.WINDOW_CLOSING));\r\n }",
"@Override\n\tpublic void windowClose(CloseEvent e) {\n\t\t\n\t}",
"private void handleWindowClose() {\n if (scrdev().getFullScreenWindow() != null)\n scrdev().getFullScreenWindow().removeAll();\n if (container != null){\n container.setVisible(false);\n container.dispose();\n container.removeKeyListener(this);\n \n //TODO: make a call to finish\n }\n }",
"public void windowClosed(WindowEvent wE) {\n\t\t\t}",
"boolean isCloseRequested()\r\n\t{\r\n\t\treturn this.closeRequested;\r\n\t}",
"@Override\n\tpublic void windowClosed(WindowEvent arg0)\n\t{\n\t\t\n\t}",
"@Override\n\tpublic void windowClosed(WindowEvent arg0)\n\t{\n\t\t\n\t}",
"@Override\n\tpublic void windowClosed(WindowEvent arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void windowClosed(WindowEvent arg0) {\n\t\t\n\t}",
"public boolean closeOnExit() {\n return false;\n }",
"@Override\n\t\t\t\t\tpublic void windowClosing(WindowEvent e) {\n\t\t\t\t\t\tsetStillRunning(false);\n\t\t\t\t\t}",
"@Override\r\n\tpublic void windowClosed(WindowEvent arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void windowClosed(WindowEvent arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void windowClosed(WindowEvent arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void windowClosed(WindowEvent arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void windowClosed(WindowEvent arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void windowClosed(WindowEvent arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void windowClosed(WindowEvent arg0) {\n\t\t\r\n\t}",
"public void windowClosing(WindowEvent arg0) {\n\n }",
"boolean isIsClosable();",
"@Override\r\n\t\t\tpublic void windowClosing(WindowEvent e) {\r\n\t\t\t\tsetVisible(false);\r\n\t\t\t\tzamknij = true;\r\n\t\t\t\tdispose();\r\n\t\t\t\tSystem.exit(0);\r\n\t\t\t}",
"@Override\n public void closeWindow() {\n \n }",
"@Override\n\tpublic void windowClosed(WindowEvent arg0) {\n\n\t}",
"public int windowClosing() {\n if(changed) {\n current = this;\n return JOptionPane.showConfirmDialog(null, \"Do you want to save changes to \" + name + \"?\"); \n }\n return 1;\n }",
"@Override\n\tpublic void windowClosed(WindowEvent e) {\n\t}",
"@Override\n public void windowClosed(WindowEvent we) {\n }",
"private void close() {\n WindowEvent winClose = new WindowEvent(this,WindowEvent.WINDOW_CLOSING);\n Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(winClose);\n \n }",
"@Override\n public void windowClosing(WindowEvent we) {\n finishDialog();\n }",
"@Override\n\t\t\tpublic void windowClosed(WindowEvent arg0) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void windowClosed(WindowEvent arg0) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tpublic void windowClosed(WindowEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void windowClosed(WindowEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void windowClosed(WindowEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void windowClosed(WindowEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void windowClosed(WindowEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void windowClosed(WindowEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void windowClosed(WindowEvent e) {\n\t\t\n\t}",
"public void windowClosing(WindowEvent e) {\n\t\t \t\tif (close){\n\t\t \t\t\tSystem.exit(0);\n\t\t \t\t}\n\t\t \t}",
"@Override\r\n\tpublic void windowClosed(WindowEvent e) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void windowClosed(WindowEvent e) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void windowClosed(WindowEvent e) {\n\t\t\r\n\t}",
"public void finishedWindow() {\n\t\tgameManager.closePiratesEventScreen(this, route);\n\t}",
"private void close() {\n WindowEvent winClosingEvent = new WindowEvent(this,WindowEvent.WINDOW_CLOSING);\nToolkit.getDefaultToolkit().getSystemEventQueue().postEvent(winClosingEvent);\n }",
"@Override\n\t\tpublic void windowClosed(WindowEvent e) {\n\t\t\t\n\t\t}",
"@Override\n\t\tpublic void windowClosed(WindowEvent e) {\n\t\t\t\n\t\t}",
"public boolean doClose() {\n\n if (canChangeDocuments()) {\n setVisible(false);\n dispose();\n fApplication.removeDocumentWindow(this);\n return true;\n }\n else {\n return false;\n }\n }",
"@Override\r\n public void windowClosed(WindowEvent e) {\r\n System.out.println(\"Window closed.\");\r\n }",
"@Override\n\tpublic boolean close(final MWindow window) {\n\t\teventBroker.post(Events.TOPIC_APPLICATION_CLOSE, null);\n\t\treturn false;\n\t}",
"@Override\r\n\tpublic void windowClosed(WindowEvent e) {\n\r\n\t}",
"@Override\n\tpublic void windowClosed( WindowEvent e ) {\n\t\t\n\t}",
"@Override\n\tpublic void windowClosed (WindowEvent e)\n\t{\n\t}",
"private void close() {\n WindowEvent winClosingEvent = new WindowEvent(this,WindowEvent.WINDOW_CLOSING);\n Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(winClosingEvent);\n }",
"@Override\n\tpublic void windowClosed(WindowEvent e) {\n\n\t}",
"@Override\n\tpublic void windowClosed(WindowEvent e) {\n\n\t}",
"@Override\n\tpublic void windowClosed(WindowEvent e) {\n\n\t}",
"@Override\n\tpublic void windowClosed(WindowEvent e) {\n\n\t}",
"@Override\n\tpublic void windowClosed(WindowEvent e) {\n\n\t}",
"@Override\n\tpublic void windowClosed(WindowEvent e) {\n\n\t}",
"@Override\n\tpublic void windowClosed(WindowEvent e) {\n\n\t}",
"public void closeWindow() {\n\t\tframeUnableToBuyPopup.dispose();\n\t}",
"@Override\n public void windowClosed(WindowEvent arg0) {\n\n }",
"@Override\r\n\t\t\tpublic void windowClosed(WindowEvent arg0) {\n\t\t\t\t\r\n\t\t\t}",
"private void close() {\n WindowEvent winClosingEvent = new WindowEvent(this, WindowEvent.WINDOW_CLOSING);\n Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(winClosingEvent);\n }",
"public abstract boolean isClosed();",
"@Override\r\n\tprotected void window_closing(WindowEvent arg0) {\n\t\tLong result = examItemService.countNull(pk.longValue());\r\n\t\tString message = \"\";\r\n\t\tif ((questionNum - result) > 0) {\r\n\t\t\tmessage = \"还有\" + (questionNum - result) + \"道题未写,确认交卷?\";\r\n\t\t} else {\r\n\t\t\tmessage = \"确认交卷?\";\r\n\t\t}\r\n\t\tint option = JOptionPane.showConfirmDialog(null, message, \"系统提示\", JOptionPane.YES_NO_OPTION);\r\n\t\tif (option == JOptionPane.YES_OPTION) {\r\n\t\t\tLong trueItem = examItemService.countTrue(pk.longValue());\r\n\t\t\tLong totalScore = eiList.get(0).getStdScore() * trueItem;\r\n\t\t\tExam exam = examService.load(pk.longValue());\r\n\t\t\texam.setTotalScore(totalScore);\r\n\t\t\tJOptionPane.showMessageDialog(null, \"考试结束,\" + totalScore + \"分\");\r\n\t\t\tif (listFrm != null) {\r\n\t\t\t\tlistFrm.setVisible(true);\r\n\t\t\t\tthis.dispose();\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}",
"@Override\r\n\t\tpublic void windowClosed(WindowEvent e) {\n\t\t}",
"public void close() {\r\n\t\t\r\n\t\tWindowEvent winClosingEvent = new WindowEvent(this,WindowEvent.WINDOW_CLOSING);\r\n\t\tToolkit.getDefaultToolkit().getSystemEventQueue().postEvent(winClosingEvent);\r\n\t}",
"public void exit() {\r\n \t\t// Send a closing signat to main window.\r\n \t\tmainWindow.dispatchEvent(new WindowEvent(mainWindow, WindowEvent.WINDOW_CLOSING));\r\n \t}",
"boolean isNilSearchWindowEnd();",
"public void windowClosing(WindowEvent e) {\n\t\t\t\t\n\t\t\t\tsetVisible(false);\n\t\t\t\tdispose();\n\t\t\t\tSystem.exit(0);\n\t\t\t }",
"@Override\n\t\t\tpublic void windowClosed(WindowEvent arg0) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void windowClosed(WindowEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void windowClosed(WindowEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void windowClosed(WindowEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void windowClosed(WindowEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tpublic void windowClosed(WindowEvent arg0) {\n\t\tSystem.exit(0);\n\t}",
"@Override\n\t\t\tpublic void windowClosed(WindowEvent e) {\n\t\t\t}",
"@Override\r\n\tpublic void windowClosing(WindowEvent arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void windowClosing(WindowEvent arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void windowClosing(WindowEvent arg0) {\n\t\t\r\n\t}",
"boolean isSetSearchWindowEnd();"
] | [
"0.77705216",
"0.7740892",
"0.7705936",
"0.761948",
"0.7310597",
"0.72965956",
"0.7199879",
"0.7113671",
"0.7064343",
"0.70138526",
"0.69958174",
"0.6992868",
"0.69928586",
"0.6954177",
"0.69221723",
"0.69221723",
"0.69221723",
"0.69221723",
"0.6895564",
"0.6882769",
"0.6880264",
"0.6874876",
"0.6852797",
"0.68226755",
"0.6803929",
"0.6803929",
"0.6789426",
"0.6789426",
"0.6769872",
"0.67681473",
"0.67669964",
"0.67669964",
"0.67669964",
"0.67669964",
"0.67669964",
"0.67669964",
"0.67669964",
"0.6760602",
"0.67557126",
"0.6752432",
"0.67509454",
"0.6744053",
"0.67271596",
"0.67267674",
"0.67228365",
"0.67052823",
"0.6704048",
"0.6699895",
"0.6699895",
"0.6698111",
"0.6698111",
"0.6698111",
"0.6698111",
"0.6698111",
"0.6698111",
"0.6698111",
"0.6694807",
"0.66868097",
"0.66868097",
"0.66868097",
"0.66849047",
"0.668326",
"0.66822827",
"0.66822827",
"0.6679512",
"0.66758925",
"0.6669781",
"0.66673774",
"0.6659312",
"0.6656377",
"0.6641323",
"0.6640535",
"0.6640535",
"0.6640535",
"0.6640535",
"0.6640535",
"0.6640535",
"0.6640535",
"0.66390014",
"0.6635418",
"0.6635393",
"0.66346115",
"0.6631437",
"0.66311044",
"0.6630296",
"0.6624242",
"0.6615738",
"0.6615175",
"0.661124",
"0.6594952",
"0.6591909",
"0.6591909",
"0.6591909",
"0.6591909",
"0.6590538",
"0.6588661",
"0.65854776",
"0.65854776",
"0.65854776",
"0.65844715"
] | 0.8178852 | 0 |
PeopleAttribute.java Interface to get the additional attribute of People. | public interface PeopleAttribute {
/**
* Dynamically get the defined additional attribute of People
* depending on their type
*
* @return pair of key indicating the label of the property
* and value as the actual value of the additional attribute
* @see Pair
*/
Pair<String, String> getAdditionalAttribute();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Pair<String, String> getAdditionalAttribute();",
"public PersonAttributeType getAttributeType() {\n return attributeType;\n }",
"IAttributes getAttributes();",
"public org.omg.uml.foundation.core.Attribute getAttribute();",
"public final EObject rulePerson() throws RecognitionException {\n EObject current = null;\n\n Token otherlv_0=null;\n Token otherlv_2=null;\n EObject lv_attribute_1_0 = null;\n\n EObject lv_attribute_3_0 = null;\n\n\n enterRule(); \n \n try {\n // ../dk.itu.smdp.survey.xtext/src-gen/dk/itu/smdp/survey/xtext/parser/antlr/internal/InternalTaco.g:459:28: ( (otherlv_0= 'person' ( (lv_attribute_1_0= rulePersonAttribute ) ) (otherlv_2= ',' ( (lv_attribute_3_0= rulePersonAttribute ) ) )* ) )\n // ../dk.itu.smdp.survey.xtext/src-gen/dk/itu/smdp/survey/xtext/parser/antlr/internal/InternalTaco.g:460:1: (otherlv_0= 'person' ( (lv_attribute_1_0= rulePersonAttribute ) ) (otherlv_2= ',' ( (lv_attribute_3_0= rulePersonAttribute ) ) )* )\n {\n // ../dk.itu.smdp.survey.xtext/src-gen/dk/itu/smdp/survey/xtext/parser/antlr/internal/InternalTaco.g:460:1: (otherlv_0= 'person' ( (lv_attribute_1_0= rulePersonAttribute ) ) (otherlv_2= ',' ( (lv_attribute_3_0= rulePersonAttribute ) ) )* )\n // ../dk.itu.smdp.survey.xtext/src-gen/dk/itu/smdp/survey/xtext/parser/antlr/internal/InternalTaco.g:460:3: otherlv_0= 'person' ( (lv_attribute_1_0= rulePersonAttribute ) ) (otherlv_2= ',' ( (lv_attribute_3_0= rulePersonAttribute ) ) )*\n {\n otherlv_0=(Token)match(input,16,FollowSets000.FOLLOW_16_in_rulePerson932); \n\n \tnewLeafNode(otherlv_0, grammarAccess.getPersonAccess().getPersonKeyword_0());\n \n // ../dk.itu.smdp.survey.xtext/src-gen/dk/itu/smdp/survey/xtext/parser/antlr/internal/InternalTaco.g:464:1: ( (lv_attribute_1_0= rulePersonAttribute ) )\n // ../dk.itu.smdp.survey.xtext/src-gen/dk/itu/smdp/survey/xtext/parser/antlr/internal/InternalTaco.g:465:1: (lv_attribute_1_0= rulePersonAttribute )\n {\n // ../dk.itu.smdp.survey.xtext/src-gen/dk/itu/smdp/survey/xtext/parser/antlr/internal/InternalTaco.g:465:1: (lv_attribute_1_0= rulePersonAttribute )\n // ../dk.itu.smdp.survey.xtext/src-gen/dk/itu/smdp/survey/xtext/parser/antlr/internal/InternalTaco.g:466:3: lv_attribute_1_0= rulePersonAttribute\n {\n \n \t newCompositeNode(grammarAccess.getPersonAccess().getAttributePersonAttributeParserRuleCall_1_0()); \n \t \n pushFollow(FollowSets000.FOLLOW_rulePersonAttribute_in_rulePerson953);\n lv_attribute_1_0=rulePersonAttribute();\n\n state._fsp--;\n\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getPersonRule());\n \t }\n \t\tadd(\n \t\t\tcurrent, \n \t\t\t\"attribute\",\n \t\tlv_attribute_1_0, \n \t\t\"PersonAttribute\");\n \t afterParserOrEnumRuleCall();\n \t \n\n }\n\n\n }\n\n // ../dk.itu.smdp.survey.xtext/src-gen/dk/itu/smdp/survey/xtext/parser/antlr/internal/InternalTaco.g:482:2: (otherlv_2= ',' ( (lv_attribute_3_0= rulePersonAttribute ) ) )*\n loop10:\n do {\n int alt10=2;\n int LA10_0 = input.LA(1);\n\n if ( (LA10_0==17) ) {\n alt10=1;\n }\n\n\n switch (alt10) {\n \tcase 1 :\n \t // ../dk.itu.smdp.survey.xtext/src-gen/dk/itu/smdp/survey/xtext/parser/antlr/internal/InternalTaco.g:482:4: otherlv_2= ',' ( (lv_attribute_3_0= rulePersonAttribute ) )\n \t {\n \t otherlv_2=(Token)match(input,17,FollowSets000.FOLLOW_17_in_rulePerson966); \n\n \t \tnewLeafNode(otherlv_2, grammarAccess.getPersonAccess().getCommaKeyword_2_0());\n \t \n \t // ../dk.itu.smdp.survey.xtext/src-gen/dk/itu/smdp/survey/xtext/parser/antlr/internal/InternalTaco.g:486:1: ( (lv_attribute_3_0= rulePersonAttribute ) )\n \t // ../dk.itu.smdp.survey.xtext/src-gen/dk/itu/smdp/survey/xtext/parser/antlr/internal/InternalTaco.g:487:1: (lv_attribute_3_0= rulePersonAttribute )\n \t {\n \t // ../dk.itu.smdp.survey.xtext/src-gen/dk/itu/smdp/survey/xtext/parser/antlr/internal/InternalTaco.g:487:1: (lv_attribute_3_0= rulePersonAttribute )\n \t // ../dk.itu.smdp.survey.xtext/src-gen/dk/itu/smdp/survey/xtext/parser/antlr/internal/InternalTaco.g:488:3: lv_attribute_3_0= rulePersonAttribute\n \t {\n \t \n \t \t newCompositeNode(grammarAccess.getPersonAccess().getAttributePersonAttributeParserRuleCall_2_1_0()); \n \t \t \n \t pushFollow(FollowSets000.FOLLOW_rulePersonAttribute_in_rulePerson987);\n \t lv_attribute_3_0=rulePersonAttribute();\n\n \t state._fsp--;\n\n\n \t \t if (current==null) {\n \t \t current = createModelElementForParent(grammarAccess.getPersonRule());\n \t \t }\n \t \t\tadd(\n \t \t\t\tcurrent, \n \t \t\t\t\"attribute\",\n \t \t\tlv_attribute_3_0, \n \t \t\t\"PersonAttribute\");\n \t \t afterParserOrEnumRuleCall();\n \t \t \n\n \t }\n\n\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop10;\n }\n } while (true);\n\n\n }\n\n\n }\n\n leaveRule(); \n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }",
"Attributes getAttributes();",
"Attribute getAttribute();",
"Object getAttribute(int attribute);",
"public StructuredData getStructuredDataAttribute();",
"java.lang.String getAttribute();",
"Attribute createAttribute();",
"Attribute createAttribute();",
"public abstract Map getAttributes();",
"ArrayList getAttributes();",
"public abstract Map<String, Object> getAttributes();",
"public java.util.Collection getAttributes();",
"void addAttribute(String attrName, Attribute<?> newAttr);",
"default Attribute getAttribute(AttributeName attributeName) {return (Attribute) attributeName;}",
"Object getAttribute(String name);",
"Object getAttribute(String name);",
"Object getAttribute(String name);",
"com.google.protobuf.ByteString getAttributeBytes();",
"public Object getAttribute(String name);",
"String getAttribute();",
"@Override\n\tpublic Attributes getAttributes() {\n\t\treturn (Attributes)map.get(ATTRIBUTES);\n\t}",
"Map getPassThroughAttributes();",
"String attributeToGetter(String name);",
"Map<String, String> getAttributes();",
"public GenericAttribute getAttribute () {\n return attribute;\n }",
"Map<String, Object> getAttributes();",
"Map<String, Object> getAttributes();",
"Map<String, Object> getAttributes();",
"public String getProfileAttribute() {\r\r\n\t\treturn _profileAttribute;\r\r\n\t}",
"List<Attribute<T, ?>> getAttributes();",
"public interface Attribute {\n\n /**\n * The id of the attribute. This will be unique for all attributes in a\n * graph. However, if an attribute is removed from the graph, future\n * attributes may (and probably will) reuse this id.\n *\n * @return the id of the attribute.\n */\n public int getId();\n\n /**\n * Sets the id of this attribute.\n *\n * @param id the new id of this attribute.\n */\n public void setId(final int id);\n\n /**\n * Returns the element type that this attribute is associated with.\n *\n * @return the element type that this attribute is associated with.\n */\n public GraphElementType getElementType();\n\n /**\n * Sets the element type of this attribute.\n *\n * @param elementType the new element type of this attribute.\n */\n public void setElementType(final GraphElementType elementType);\n\n /**\n * The type of this attribute.\n * <p>\n * This is a String as returned by\n * {@link au.gov.asd.tac.constellation.graph.attribute.AttributeDescription#getName()}\n * from one of the registered AttributeDescription instances.\n *\n * @return The type of this attribute.\n */\n public String getAttributeType();\n\n /**\n * Sets the type of this attribute.\n *\n * @param attributeType the new type of the attribute.\n */\n public void setAttributeType(final String attributeType);\n\n /**\n * Return the name of the attribute. This name will be unique for all\n * attributes associated with the same element type in a graph. This is the\n * value that is presented to the user in the UI and the most common way in\n * which attributes are looked up in the graph.\n *\n * @return the name of the attribute.\n */\n public String getName();\n\n /**\n * Sets a new name for this attribute.\n *\n * @param name the new name for the attribute.\n * @see Attribute#getName()\n */\n public void setName(final String name);\n\n /**\n * Returns the description of an attribute. The description provides more\n * detailed information about the attribute such as how it is being used or\n * and constraints that should be observed.\n *\n * @return the description of an attribute.\n */\n public String getDescription();\n\n /**\n * Sets a new description of an attribute.\n *\n * @param description the new description of the attribute.\n * @see Attribute#getDescription()\n */\n public void setDescription(final String description);\n\n /**\n * Returns the current default value for this attribute. This is the value\n * that new elements will get when they are created.\n *\n * @return the current default value for this attribute.\n */\n public Object getDefaultValue();\n\n /**\n * Sets the new default value for this attribute. This will not change the\n * values of any existing elements but rather the value that new elements\n * will get given when they are created.\n *\n * @param defaultValue the new default value for the attribute.\n */\n public void setDefaultValue(final Object defaultValue);\n\n /**\n * Returns the class of the attribute description that defines this\n * attribute.\n *\n * @return the class of the attribute description that defines this\n * attribute.\n */\n public Class<? extends AttributeDescription> getDataType();\n\n /**\n * Sets the data type of this attribute.\n *\n * @param dataType the new datatype of this attribute.\n */\n public void setDataType(final Class<? extends AttributeDescription> dataType);\n\n /**\n * Returns the attribute merger for this attribute.\n *\n * @return the attribute merger for this attribute.\n */\n public GraphAttributeMerger getAttributeMerger();\n\n /**\n * Sets the attribute merger for this attribute.\n *\n * @param attributeMerger the attribute merger for this attribute.\n */\n public void setAttributeMerger(final GraphAttributeMerger attributeMerger);\n}",
"public Map<String, String> getAttributes();",
"public final EObject entryRulePersonAttribute() throws RecognitionException {\n EObject current = null;\n\n EObject iv_rulePersonAttribute = null;\n\n\n try {\n // ../dk.itu.smdp.survey.xtext/src-gen/dk/itu/smdp/survey/xtext/parser/antlr/internal/InternalTaco.g:1324:2: (iv_rulePersonAttribute= rulePersonAttribute EOF )\n // ../dk.itu.smdp.survey.xtext/src-gen/dk/itu/smdp/survey/xtext/parser/antlr/internal/InternalTaco.g:1325:2: iv_rulePersonAttribute= rulePersonAttribute EOF\n {\n newCompositeNode(grammarAccess.getPersonAttributeRule()); \n pushFollow(FollowSets000.FOLLOW_rulePersonAttribute_in_entryRulePersonAttribute2713);\n iv_rulePersonAttribute=rulePersonAttribute();\n\n state._fsp--;\n\n current =iv_rulePersonAttribute; \n match(input,EOF,FollowSets000.FOLLOW_EOF_in_entryRulePersonAttribute2723); \n\n }\n\n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }",
"public Person getPerson()\r\n\t{\r\n\t\treturn person;\r\n\t}",
"public Map<String, Object> getAttributes();",
"public Map<String, Object> getAttributes();",
"public Number getPersonId() {\n return (Number)getAttributeInternal(PERSONID);\n }",
"public String getattribut() \n\t{\n\t\treturn attribut;\n\t}",
"Map getGenAttributes();",
"public Attribute fetchAttributeById(int attribId);",
"public String getAttribute(String name);",
"AdditionalAttributes setAttribute(String name, Object value, boolean force);",
"@Override\n\t\tpublic void addAttribute(String name, String value) {\n\t\t\t\n\t\t}",
"@Override\n\t\tpublic void addAttribute(String name, String value) {\n\t\t\t\n\t\t}",
"public EnumCreatureAttribute getCreatureAttribute()\n {\n return EnumCreatureAttribute.ILLAGER;\n }",
"public interface TLAttributeOwner extends NamedEntity, TLMemberFieldOwner {\n\n /**\n * Returns the value of the 'attributes' field.\n * \n * @return List<TLAttribute>\n */\n public List<TLAttribute> getAttributes();\n\n /**\n * Returns the attribute with the specified name.\n * \n * @param attributeName the name of the attribute to return\n * @return TLAttribute\n */\n public TLAttribute getAttribute(String attributeName);\n\n /**\n * Adds a <code>TLAttribute</code> element to the current list.\n * \n * @param attribute the attribute value to add\n */\n public void addAttribute(TLAttribute attribute);\n\n /**\n * Adds a <code>TLAttribute</code> element to the current list.\n * \n * @param index the index at which the given attribute should be added\n * @param attribute the attribute value to add\n * @throws IndexOutOfBoundsException thrown if the index is out of range (index < 0 || index > size())\n */\n public void addAttribute(int index, TLAttribute attribute);\n\n /**\n * Removes the specified <code>TLAttribute</code> from the current list.\n * \n * @param attribute the attribute value to remove\n */\n public void removeAttribute(TLAttribute attribute);\n\n /**\n * Moves this attribute up by one position in the list. If the attribute is not owned by this object or it is\n * already at the front of the list, this method has no effect.\n * \n * @param attribute the attribute to move\n */\n public void moveUp(TLAttribute attribute);\n\n /**\n * Moves this attribute down by one position in the list. If the attribute is not owned by this object or it is\n * already at the end of the list, this method has no effect.\n * \n * @param attribute the attribute to move\n */\n public void moveDown(TLAttribute attribute);\n\n /**\n * Sorts the list of attributes using the comparator provided.\n * \n * @param comparator the comparator to use when sorting the list\n */\n public void sortAttributes(Comparator<TLAttribute> comparator);\n\n}",
"trinsic.services.common.v1.CommonOuterClass.JsonPayload getAttributes();",
"public Person[] getPerson() {\n\t\treturn person;\n\t}",
"public List<TLAttribute> getAttributes();",
"public Attributes getAttributes() { return this.attributes; }",
"public TLAttribute getAttribute(String attributeName);",
"public Object getProperty(String attName);",
"public GraphAttributeMerger getAttributeMerger();",
"java.util.Map<java.lang.String, java.lang.String> getAttributesMap();",
"@Override\n public void onRPClassAddAttribute(RPClass rpclass,\n String name, Definition.Type type, byte flags) {\n }",
"protected abstract boolean populateAttributes();",
"@Schema(hidden = true)\n public Person getPerson() {\n return person;\n }",
"public Map<QName, String> getOtherAttributes() {\r\n return otherAttributes;\r\n }",
"private Attributes getAttributes()\r\n\t{\r\n\t return attributes;\r\n\t}",
"@GET\r\n\t@Path(\"/imageattribs\")\r\n\t@Produces(MediaType.APPLICATION_JSON)\r\n\tpublic ImageAttribute getAttribute() {\r\n\t\tString directoryPath = ROOT_PATH_ON_MAC + \"/\" + AuxiliaryHelper.loadServerProperties().getProperty(\"image.folder\") + \"/\" ;\r\n\t\tFile folder = new File(directoryPath);\r\n\t\tFile[] files = folder.listFiles();\r\n\t\tString name = \"\";\r\n\t\tlong space = 0l;\r\n\t\tif(files.length > 0) {\r\n\t\t\tname = files[0].getName();\r\n\t\t\tspace = files[0].getTotalSpace();\r\n\t\t}\r\n\t\tImageAttribute imageAttribute = new ImageAttribute();\r\n\t\timageAttribute.setName(name);\r\n\t\timageAttribute.setSize(space);\r\n\t\treturn imageAttribute;\r\n\r\n\t}",
"public int getAttribute() {\n return Attribute;\n }",
"public gov.nih.nlm.ncbi.www.soap.eutils.efetch_pmc.Attrib getAttrib() {\r\n return attrib;\r\n }",
"@Override\n\tpublic <E> void add(Attr<E> newAttr) {\n\t\t\n\t}",
"public Map<QName, String> getOtherAttributes() {\n return otherAttributes;\n }",
"public Map<QName, String> getOtherAttributes() {\n return otherAttributes;\n }",
"public Map<QName, String> getOtherAttributes() {\n return otherAttributes;\n }",
"public Map<QName, String> getOtherAttributes() {\n return otherAttributes;\n }",
"public Map<QName, String> getOtherAttributes() {\n return otherAttributes;\n }",
"public Map<QName, String> getOtherAttributes() {\n return otherAttributes;\n }",
"public Map<QName, String> getOtherAttributes() {\n return otherAttributes;\n }",
"public Map<QName, String> getOtherAttributes() {\n return otherAttributes;\n }",
"public Map<QName, String> getOtherAttributes() {\n return otherAttributes;\n }",
"public Map<QName, String> getOtherAttributes() {\n return otherAttributes;\n }",
"public Map<QName, String> getOtherAttributes() {\n return otherAttributes;\n }",
"public Map<QName, String> getOtherAttributes() {\n return otherAttributes;\n }",
"public Object get(String aName) { return _attrMap.get(aName); }",
"public Attribute fetchAttribute(String key, String value);",
"public String[] getRelevantAttributes();",
"Object getAttribute(String key);",
"Object getAttribute(String key);",
"@Override\n\tpublic ArrayList<Object> getAttributeList() {\n\t\tArrayList<Object> attributes = new ArrayList<Object>();\n//\t\tattributes.add(\"s2014_age\");\n//\t\tattributes.add(\"s2014_prog_skill\");\n//\t\tattributes.add(\"s2014_uni_yrs\");\n//\t\tattributes.add(\"s2014_os\");\n//\t\tattributes.add(\"s2014_progLangs\");\n//\t\tattributes.add(\"s2014_engSkill\");\n\t\tattributes.add(\"s2014_favAnimal\");\n\t\tattributes.add(\"s2014_MoreMtns\");\n//\t\tattributes.add(\"s2014_winter\");\n\t\tattributes.add(\"s2014_favColor\");\n//\t\tattributes.add(\"s2014_neuralNetwork\");\n//\t\tattributes.add(\"s2014_vectorMachine\");\n//\t\tattributes.add(\"s2014_sql\");\n//\t\tattributes.add(\"s2014_favSQLServ\");\n//\t\tattributes.add(\"s2014_apriori\");\n\t\treturn attributes;\n\t}",
"boolean isAttribute();",
"@XmlTransient\n\t\t\tpublic Person getPerson() {return person;}",
"public Map<QName, String> getOtherAttributes() {\n\t\treturn otherAttributes;\n\t}",
"public Map<QName, String> getOtherAttributes() {\n\t\treturn otherAttributes;\n\t}",
"public Map<QName, String> getOtherAttributes() {\n\t\treturn otherAttributes;\n\t}",
"public Map<QName, String> getOtherAttributes() {\n return otherAttributes;\n }",
"@Override\n public void onRPClassAddAttribute(RPClass rpclass,\n String name, Definition.Type type) {\n }",
"public People getMyPeople()\n {\n return myCamp;\n }",
"public abstract ImportAttributes getAttributes();",
"@Override\n public boolean isAttribute()\n {\n return attribute;\n }",
"@Override\n\tpublic int numberOfAttributes() {\n\t\treturn 2 + numberOfCustomFields();\n\t}",
"@Test\n\tpublic void addAttribute() {\n\t\tXMLTagParser.addNewElement(\"Person\");\n\n\t\tXMLTagParser.editElement(\"Person\", \"name\", \"tony\");\n\t\tassertEquals(XMLTagParser.getTagValueFromElement(\"Person\", \"name\"), \"tony\");\n\t}",
"public PersonType_Tp getPersonType() { return personType; }",
"public tudresden.ocl20.core.jmi.ocl.commonmodel.Attribute lookupAttribute(java.lang.String attName) {\n Iterator featuresIt = getFeature().iterator();\n while(featuresIt.hasNext()){\n Feature feature = (Feature) featuresIt.next();\n if(feature instanceof Attribute && feature.getNameA().equals(attName)){\n return (Attribute) feature;\n }\n }\n Iterator parentsIt = this.getParents().iterator();//getGeneralization().iterator();\n while(parentsIt.hasNext()){\n Classifier parent = (Classifier) parentsIt.next();//((GeneralizationImpl) parentsIt.next()).getParent();\n Attribute a = (Attribute) parent.lookupAttribute(attName);\n if(a != null){\n return a;\n }\n }\n \n return null;\n }",
"public com.zzsong.netty.protobuff.two.ProtoData.Person getPerson() {\n if (dataBodyCase_ == 2) {\n return (com.zzsong.netty.protobuff.two.ProtoData.Person) dataBody_;\n }\n return com.zzsong.netty.protobuff.two.ProtoData.Person.getDefaultInstance();\n }"
] | [
"0.7111916",
"0.62507504",
"0.61414313",
"0.5932971",
"0.59306806",
"0.5928555",
"0.588249",
"0.58748966",
"0.5802332",
"0.57359457",
"0.57016885",
"0.57016885",
"0.5670859",
"0.5625233",
"0.55846107",
"0.5581859",
"0.55697125",
"0.5552445",
"0.55359685",
"0.55359685",
"0.55359685",
"0.55125517",
"0.5511798",
"0.55066043",
"0.5503325",
"0.54549104",
"0.5453104",
"0.5452869",
"0.5448778",
"0.5434439",
"0.5434439",
"0.5434439",
"0.541138",
"0.5404252",
"0.53878284",
"0.53806245",
"0.53674173",
"0.5351134",
"0.5347517",
"0.5347517",
"0.53420657",
"0.53351414",
"0.53316796",
"0.53275615",
"0.5324488",
"0.5323354",
"0.5322878",
"0.5322878",
"0.5322231",
"0.53212804",
"0.53180283",
"0.53101164",
"0.5306111",
"0.53025204",
"0.5290134",
"0.5284349",
"0.5283105",
"0.5274947",
"0.5273909",
"0.5257309",
"0.5242095",
"0.5237852",
"0.5229454",
"0.5221921",
"0.52005774",
"0.5190769",
"0.51890206",
"0.5177075",
"0.5177075",
"0.5177075",
"0.5177075",
"0.5177075",
"0.5177075",
"0.5177075",
"0.5177075",
"0.5177075",
"0.5177075",
"0.5177075",
"0.5177075",
"0.5169192",
"0.5161939",
"0.5156075",
"0.5154513",
"0.5154513",
"0.5153864",
"0.5138148",
"0.51336366",
"0.51310927",
"0.51310927",
"0.51310927",
"0.5130916",
"0.5129628",
"0.51157373",
"0.5112298",
"0.51037186",
"0.50934464",
"0.50916874",
"0.5090536",
"0.50871533",
"0.5085416"
] | 0.7832523 | 0 |
Dynamically get the defined additional attribute of People depending on their type | Pair<String, String> getAdditionalAttribute(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface PeopleAttribute {\n\n /**\n * Dynamically get the defined additional attribute of People\n * depending on their type\n *\n * @return pair of key indicating the label of the property\n * and value as the actual value of the additional attribute\n * @see Pair\n */\n Pair<String, String> getAdditionalAttribute();\n}",
"public PersonType_Tp getPersonType() { return personType; }",
"public PersonAttributeType getAttributeType() {\n return attributeType;\n }",
"boolean hasIsPersonType();",
"public abstract String getBelongsToPersonOrDepartment();",
"public void setPersonType(PersonType_Tp type) { this.personType = type; }",
"private String getAttributeValue(String type, Seeding seed){\n \tif (type.equals(\"vegetable\"))\n \t\treturn seed.vegetable;\n \telse if (type.equals(\"unit\"))\n \t\treturn seed.unit;\n \telse \n \t\tthrow new RuntimeException(\"valueList.getAttributeValue-ERROR: type not allowed: \" + type);\n }",
"void addIsPersonType(Integer newIsPersonType);",
"public Object prop(String name, String type);",
"String getPersonality();",
"Collection<? extends Integer> getIsPersonType();",
"@Test\n public void getOtherPersonTestPerson() throws ParsingException, NoSuchFieldException, ParseException, IllegalAccessException {\n //Init\n Person person = new Person(null);\n Person partner = new Person(null);\n Person otherPerson = new Person(null);\n Union union = new Union(person, partner, new FullDate(\"05 MAR 2020\"), new Town(\"Saintes\", \"Charente-Maritime\"), UnionType.HETERO_MAR);\n\n //Reflection init\n Field idField = person.getClass().getDeclaredField(\"id\");\n idField.setAccessible(true);\n\n //Reflection set\n idField.set(person, \"1\");\n idField.set(partner, \"2\");\n\n //Verification\n assertEquals(partner, union.getOtherPerson(person));\n assertEquals(person, union.getOtherPerson(partner));\n assertNull(union.getOtherPerson(otherPerson));\n }",
"public Class getAttributeType();",
"public String getPersonType() {\r\n return (String) getAttributeInternal(PERSONTYPE);\r\n }",
"Food getByType(String type);",
"@Override\n public java.lang.String getPersonType() {\n return _entityCustomer.getPersonType();\n }",
"public String getType() {\n\t\t\treturn \"person\";\n\t\t}",
"com.zzsong.netty.protobuff.two.ProtoData.Person.Gender getGender();",
"com.demo.springprotobuff.Demoproto.Student.PhoneType getType();",
"List<QueryProperty> getCustomParams(final Class<? extends AbstractEntity<?>> type);",
"AdditionalValuesType getAdditionalValues();",
"com.microsoft.schemas.xrm._2013.metadata.AttributeTypeDisplayName getAttributeTypeDisplayName();",
"@Override\n\tpublic Types getType() {\n\t\treturn GameObject.Types.PERSON;\n\t}",
"public static void personTest(){\n ArrayList<Person> people = new ArrayList<>();\n //people[0] = new Person(\"Fer\", \"Mendoza\", true);\n people.add(new Person(\"Fer\", \"Mendoza\", true));\n people.add(new Person(\"Stacy\", \"Malibu\", false));\n people.add(new Person(\"Ana\", \"Morton\", true));\n\n for (Person person : people) {\n System.out.println(\"person.getFullName() = \" + person.getFullName());\n }\n\n }",
"TypeAssociationEXT getEstPourTypeMateriel();",
"protected abstract boolean populateAttributes();",
"ComplexType getTechnologySpecificComplexType();",
"List<AttributeExtend> selectByExample(AttributeExtendExample example);",
"com.zzsong.netty.protobuff.two.ProtoData.Person getPerson();",
"com.zzsong.netty.protobuff.two.ProtoData.PersonOrBuilder getPersonOrBuilder();",
"Collection<DynamicAttribute> getActiveAttributes(String nodeType, boolean searchableOnly, String[] attributeTypes);",
"public static List<Person> getExamplePeople() {\n return Arrays.asList(\n new Person(\"1230\", \"John\", \"Smith\", LocalDate.of(1965, 1, 20), \"Some Street 3, Some City, Some Country\", \n Arrays.asList(\n new PersonContact(PersonContactType.PHONE, \"Home number\", \"+123 4567890\"),\n new PersonContact(PersonContactType.EMAIL, \"Personal e-mail\", \"[email protected]\")\n )\n ),\n new Person(\"1231\", \"Jack\", \"Tree\", LocalDate.of(1971, 3, 20), \"Some Street 9, Some City, Some Country\", \n Arrays.asList(\n new PersonContact(PersonContactType.MOBILE, \"Personal number\", \"+123 456789011\")\n )\n ),\n new Person(\"1232\", \"Mary\", \"Jones\", LocalDate.of(1980, 2, 20), \"Some Street 7, Some City, Some Country\", \n null\n ),\n new Person(\"1233\", \"Maria\", \"Johnson\", LocalDate.of(1991, 9, 12), \"Some Street 30, Some City, Some Country\", \n Arrays.asList(\n new PersonContact(PersonContactType.PHONE, \"Work number\", \"+123 4634563\")\n )\n ),\n new Person(\"1234\", \"Luke\", \"Miller\", LocalDate.of(1986, 12, 3), \"Some Street 87, Some City, Some Country\", \n Arrays.asList(\n new PersonContact(PersonContactType.PHONE, \"Home number\", \"+123 13433653\"),\n new PersonContact(PersonContactType.EMAIL, \"Personal e-mail\", \"[email protected]\"),\n new PersonContact(PersonContactType.MOBILE, \"Preferred contact\", \"+123 365346456\")\n )\n ),\n new Person(\"1235\", \"Michelle\", \"Smith\", LocalDate.of(1966, 6, 30), \"Some Street 3, Some City, Some Country\", \n Arrays.asList(\n new PersonContact(PersonContactType.PHONE, \"Home number\", \"+123 4567890\"),\n new PersonContact(PersonContactType.EMAIL, \"Personal e-mail\", \"[email protected]\")\n )\n )\n );\n }",
"String getMemberOf();",
"ImmutableList<SchemaOrgType> getAccountablePersonList();",
"Type.Remote<SomeRemoteType, SomeRemoteThing> has(AttributeType<?> attributeType);",
"@Override\r\n\tpublic String getTipoPersona() {\n\t\treturn \"alumno del curso \" + curso + \" de \" + grupo + \" de \" + tipoEstudios ;\r\n\t\t\r\n\t}",
"private Optional<AnnotatedMember> getMemberForType(AnnotatedType annotatedType) {\n\n String currentPropertyName = annotatedType.getPropertyName();\n\n if (currentPropertyName != null && annotatedType.getParent() != null) {\n\n JavaType parentType = definedTypes.get(annotatedType.getParent().getName());\n\n if (parentType != null) {\n\n BeanDescription parentBeanDescription = _mapper.getSerializationConfig().introspect(parentType);\n\n return parentBeanDescription.findProperties().stream()\n .filter(property -> property.getName().equals(currentPropertyName))\n .findFirst()\n .map(BeanPropertyDefinition::getPrimaryMember);\n }\n }\n\n return Optional.empty();\n }",
"public static Map<String, Person> GetPersons()\n {\n List<Person> persons = dataWraper.getAll(FrekenBok.class);\n Map<String, Person> personMap = new HashMap<>();\n\n persons.forEach( (i)->\n personMap.put(i.GetName(), i)\n );\n\n persons = dataWraper.getAll(LitleBoy.class);\n persons.forEach( (i)->\n personMap.put(i.GetName(), i)\n );\n\n return personMap;\n }",
"Object getAttribute(int attribute);",
"com.microsoft.schemas.xrm._2013.metadata.AttributeTypeDisplayName addNewAttributeTypeDisplayName();",
"cb.Careerbuilder.Company.PhoneType getType();",
"int getOneof2098();",
"int getOneof2050();",
"public com.zzsong.netty.protobuff.two.ProtoData.PersonOrBuilder getPersonOrBuilder() {\n if ((dataBodyCase_ == 2) && (personBuilder_ != null)) {\n return personBuilder_.getMessageOrBuilder();\n } else {\n if (dataBodyCase_ == 2) {\n return (com.zzsong.netty.protobuff.two.ProtoData.Person) dataBody_;\n }\n return com.zzsong.netty.protobuff.two.ProtoData.Person.getDefaultInstance();\n }\n }",
"int getOneof2099();",
"String attributeToGetter(String name);",
"Object getOtherprops();",
"public StructuredData getStructuredDataAttribute();",
"public com.zzsong.netty.protobuff.two.ProtoData.PersonOrBuilder getPersonOrBuilder() {\n if (dataBodyCase_ == 2) {\n return (com.zzsong.netty.protobuff.two.ProtoData.Person) dataBody_;\n }\n return com.zzsong.netty.protobuff.two.ProtoData.Person.getDefaultInstance();\n }",
"public ApiPersonDTO getPerson(ApiWrapperSingle<ApiPersonDTO> wrapper, OptionsId options) {\n SqlScalars sqlScalars = generateSqlForPerson(options);\n List<ApiPersonDTO> results = executeQueryWithTransform(ApiPersonDTO.class, sqlScalars, wrapper);\n \n ApiPersonDTO person = null;\n if (CollectionUtils.isNotEmpty(results)) {\n person = results.get(0);\n \n if (options.hasDataItem(DataItem.ARTWORK)) {\n LOG.info(\"Adding photo for '{}'\", person.getName());\n // Add the artwork\n Set<String> artworkRequired = Collections.singleton(ArtworkType.PHOTO.toString());\n Map<Long, List<ApiArtworkDTO>> artworkList = getArtworkForMetadata(PERSON, person.getId(), artworkRequired, options.getArtworksortdir());\n if (artworkList.containsKey(options.getId())) {\n LOG.info(\"Found {} artworks\", artworkList.get(options.getId()).size());\n person.setArtwork(artworkList.get(options.getId()));\n } else {\n LOG.info(\"No artwork found for person ID {}\", options.getId());\n }\n }\n\n if (options.hasDataItem(DataItem.EXTERNALID)) {\n LOG.trace(\"Adding external IDs for ID {}\", options.getId());\n person.setExternalIds(getExternalIdsForMetadata(PERSON, options.getId()));\n }\n\n if (options.hasDataItem(DataItem.FILMOGRAPHY_INSIDE)) {\n LOG.info(\"Adding filmograpghy inside for '{}'\", person.getName());\n person.setFilmography(getPersonFilmographyInside(person.getId(), options));\n } else if (options.hasDataItem(DataItem.FILMOGRAPHY_SCANNED)) {\n LOG.info(\"Adding filmograpghy scanned for '{}'\", person.getName());\n person.setFilmography(getPersonFilmographyScanned(person.getId(), options));\n }\n }\n return person;\n }",
"private MyPersonModelProvider() {\n\t\t\tpersons = new ArrayList<MyPerson>();\n\t\t\tpersons.add(new MyPerson(\"AFirstName1\", \"ALastName1\", \"female\", true));\n\t\t persons.add(new MyPerson(\"CFirstName1\", \"CLastName1\", \"female\", true));\n\t\t persons.add(new MyPerson(\"DFirstName1\", \"DLastName1\", \"male\", true));\n\t\t persons.add(new MyPerson(\"BFirstName1\", \"BLastName1\", \"female\", true));\n\t\t persons.add(new MyPerson(\"AFirstName3\", \"ALastName3\", \"female\", true));\n\t\t persons.add(new MyPerson(\"CFirstName3\", \"CLastName3\", \"female\", true));\n\t\t persons.add(new MyPerson(\"DFirstName3\", \"DLastName3\", \"male\", true));\n\t\t persons.add(new MyPerson(\"BFirstName3\", \"BLastName3\", \"female\", true));\n\t\t persons.add(new MyPerson(\"AFirstName2\", \"ALastName2\", \"male\", false));\n\t\t persons.add(new MyPerson(\"CFirstName2\", \"CLastName2\", \"female\", true));\n\t\t persons.add(new MyPerson(\"DFirstName2\", \"DLastName2\", \"female\", true));\n\t\t persons.add(new MyPerson(\"BFirstName2\", \"BLastName2\", \"female\", true));\n\t\t}",
"public List<PersonAttributeType> getSavedPersonAttributeList(Integer pid){\n\t\tPersonService ps = Context.getPersonService();\n\t\tDeIdentifiedExportService d = Context.getService(DeIdentifiedExportService.class);\n\t\tList<String> list = d.getConceptsByCategoryByPid(\"PersonAttribute\", pid);\n\n\t\tList<PersonAttributeType> attributeTypeList = new Vector<PersonAttributeType>();\n\t\tfor(int i=0; i< list.size();i++){\n\t\t\tchar retval[] = list.get(i).toCharArray();\n\t\t\tfor(int j=0; j<retval.length; j+=2)\n\t\t\t{\n\t\t\t\tInteger t= Character.getNumericValue(retval[j]);\n\t\t\t\tattributeTypeList.add(ps.getPersonAttributeType(t));\n\n\t\t\t}\n\t\t}\n\t\treturn attributeTypeList;\t\n\t}",
"public com.zzsong.netty.protobuff.two.ProtoData.Person getPerson() {\n if (personBuilder_ == null) {\n if (dataBodyCase_ == 2) {\n return (com.zzsong.netty.protobuff.two.ProtoData.Person) dataBody_;\n }\n return com.zzsong.netty.protobuff.two.ProtoData.Person.getDefaultInstance();\n } else {\n if (dataBodyCase_ == 2) {\n return personBuilder_.getMessage();\n }\n return com.zzsong.netty.protobuff.two.ProtoData.Person.getDefaultInstance();\n }\n }",
"public Object getProperty(String attName);",
"int getOneof2045();",
"@SuppressWarnings({\"unchecked\"})\n Map findNameFromNameAndPhoneticNameByIdPerson(int idPerson);",
"int getOneof2033();",
"io.dstore.values.IntegerValue getSearchPersonTypeId();",
"Map getGenAttributes();",
"public final EObject rulePerson() throws RecognitionException {\n EObject current = null;\n\n Token otherlv_0=null;\n Token otherlv_2=null;\n EObject lv_attribute_1_0 = null;\n\n EObject lv_attribute_3_0 = null;\n\n\n enterRule(); \n \n try {\n // ../dk.itu.smdp.survey.xtext/src-gen/dk/itu/smdp/survey/xtext/parser/antlr/internal/InternalTaco.g:459:28: ( (otherlv_0= 'person' ( (lv_attribute_1_0= rulePersonAttribute ) ) (otherlv_2= ',' ( (lv_attribute_3_0= rulePersonAttribute ) ) )* ) )\n // ../dk.itu.smdp.survey.xtext/src-gen/dk/itu/smdp/survey/xtext/parser/antlr/internal/InternalTaco.g:460:1: (otherlv_0= 'person' ( (lv_attribute_1_0= rulePersonAttribute ) ) (otherlv_2= ',' ( (lv_attribute_3_0= rulePersonAttribute ) ) )* )\n {\n // ../dk.itu.smdp.survey.xtext/src-gen/dk/itu/smdp/survey/xtext/parser/antlr/internal/InternalTaco.g:460:1: (otherlv_0= 'person' ( (lv_attribute_1_0= rulePersonAttribute ) ) (otherlv_2= ',' ( (lv_attribute_3_0= rulePersonAttribute ) ) )* )\n // ../dk.itu.smdp.survey.xtext/src-gen/dk/itu/smdp/survey/xtext/parser/antlr/internal/InternalTaco.g:460:3: otherlv_0= 'person' ( (lv_attribute_1_0= rulePersonAttribute ) ) (otherlv_2= ',' ( (lv_attribute_3_0= rulePersonAttribute ) ) )*\n {\n otherlv_0=(Token)match(input,16,FollowSets000.FOLLOW_16_in_rulePerson932); \n\n \tnewLeafNode(otherlv_0, grammarAccess.getPersonAccess().getPersonKeyword_0());\n \n // ../dk.itu.smdp.survey.xtext/src-gen/dk/itu/smdp/survey/xtext/parser/antlr/internal/InternalTaco.g:464:1: ( (lv_attribute_1_0= rulePersonAttribute ) )\n // ../dk.itu.smdp.survey.xtext/src-gen/dk/itu/smdp/survey/xtext/parser/antlr/internal/InternalTaco.g:465:1: (lv_attribute_1_0= rulePersonAttribute )\n {\n // ../dk.itu.smdp.survey.xtext/src-gen/dk/itu/smdp/survey/xtext/parser/antlr/internal/InternalTaco.g:465:1: (lv_attribute_1_0= rulePersonAttribute )\n // ../dk.itu.smdp.survey.xtext/src-gen/dk/itu/smdp/survey/xtext/parser/antlr/internal/InternalTaco.g:466:3: lv_attribute_1_0= rulePersonAttribute\n {\n \n \t newCompositeNode(grammarAccess.getPersonAccess().getAttributePersonAttributeParserRuleCall_1_0()); \n \t \n pushFollow(FollowSets000.FOLLOW_rulePersonAttribute_in_rulePerson953);\n lv_attribute_1_0=rulePersonAttribute();\n\n state._fsp--;\n\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getPersonRule());\n \t }\n \t\tadd(\n \t\t\tcurrent, \n \t\t\t\"attribute\",\n \t\tlv_attribute_1_0, \n \t\t\"PersonAttribute\");\n \t afterParserOrEnumRuleCall();\n \t \n\n }\n\n\n }\n\n // ../dk.itu.smdp.survey.xtext/src-gen/dk/itu/smdp/survey/xtext/parser/antlr/internal/InternalTaco.g:482:2: (otherlv_2= ',' ( (lv_attribute_3_0= rulePersonAttribute ) ) )*\n loop10:\n do {\n int alt10=2;\n int LA10_0 = input.LA(1);\n\n if ( (LA10_0==17) ) {\n alt10=1;\n }\n\n\n switch (alt10) {\n \tcase 1 :\n \t // ../dk.itu.smdp.survey.xtext/src-gen/dk/itu/smdp/survey/xtext/parser/antlr/internal/InternalTaco.g:482:4: otherlv_2= ',' ( (lv_attribute_3_0= rulePersonAttribute ) )\n \t {\n \t otherlv_2=(Token)match(input,17,FollowSets000.FOLLOW_17_in_rulePerson966); \n\n \t \tnewLeafNode(otherlv_2, grammarAccess.getPersonAccess().getCommaKeyword_2_0());\n \t \n \t // ../dk.itu.smdp.survey.xtext/src-gen/dk/itu/smdp/survey/xtext/parser/antlr/internal/InternalTaco.g:486:1: ( (lv_attribute_3_0= rulePersonAttribute ) )\n \t // ../dk.itu.smdp.survey.xtext/src-gen/dk/itu/smdp/survey/xtext/parser/antlr/internal/InternalTaco.g:487:1: (lv_attribute_3_0= rulePersonAttribute )\n \t {\n \t // ../dk.itu.smdp.survey.xtext/src-gen/dk/itu/smdp/survey/xtext/parser/antlr/internal/InternalTaco.g:487:1: (lv_attribute_3_0= rulePersonAttribute )\n \t // ../dk.itu.smdp.survey.xtext/src-gen/dk/itu/smdp/survey/xtext/parser/antlr/internal/InternalTaco.g:488:3: lv_attribute_3_0= rulePersonAttribute\n \t {\n \t \n \t \t newCompositeNode(grammarAccess.getPersonAccess().getAttributePersonAttributeParserRuleCall_2_1_0()); \n \t \t \n \t pushFollow(FollowSets000.FOLLOW_rulePersonAttribute_in_rulePerson987);\n \t lv_attribute_3_0=rulePersonAttribute();\n\n \t state._fsp--;\n\n\n \t \t if (current==null) {\n \t \t current = createModelElementForParent(grammarAccess.getPersonRule());\n \t \t }\n \t \t\tadd(\n \t \t\t\tcurrent, \n \t \t\t\t\"attribute\",\n \t \t\tlv_attribute_3_0, \n \t \t\t\"PersonAttribute\");\n \t \t afterParserOrEnumRuleCall();\n \t \t \n\n \t }\n\n\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop10;\n }\n } while (true);\n\n\n }\n\n\n }\n\n leaveRule(); \n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }",
"private static void LessonComplexProperties() {\n EntityType emailWorkType = new EntityType(\"Work\");\n emailWorkType.setEntityTypeId(1);\n\n //instance of an object using constructor sending email in\n Email myEmail = new Email(\"[email protected]\");\n //setting email type on the Email object that is connected to EntityType Object through an instance\n myEmail.setEmailType(emailWorkType);\n\n //myEmail.getEmailType().getEntityTypeName() object within and object accessed with dot notation\n System.out.println(myEmail.getEmailAddress() + \" Type: \" + myEmail.getEmailType().getEntityTypeName() +\n myEmail.getEmailType().getEntityTypeId());\n\n //collection/list of complex(nested) objects as a property\n Employee myEmployee = new Employee();\n //Employee inherits from Person which has getEmails which sends back a List\n //then you use .add to add more emails to that List and create new Email object in that list\n myEmployee.getEmails().add(new Email(\"[email protected]\"));\n myEmployee.getEmails().add(new Email(\"[email protected]\"));\n myEmployee.getEmails().add(new Email(\"[email protected]\"));\n\n //for each statement reads email with in myEmployee object then list using getEmails\n for(Email email : myEmployee.getEmails()) {\n System.out.println(email.getEmailAddress());\n }\n\n }",
"public String types() { return faker.fakeValuesService().resolve(\"gender.types\", this, faker); }",
"public void setAttributeType(PersonAttributeType attributeType) {\n this.attributeType = attributeType;\n }",
"String getPersonalityIdentifier();",
"io.dstore.values.StringValue getPersonOutputCharacteristics();",
"int getOneof2074();",
"int getOneof1995();",
"int getOneof2059();",
"private void getPersonName(Model model) {\n if(model instanceof Person){\n Person person = (Person)model;\n checkFilterInitNext(person.getName());\n }else {L.e(\"Err, model was not instance of Person but \" + model.getClass()); }\n }",
"int getOneof2095();",
"protected abstract String getFactPropertyType(Object property);",
"public interface IAttributableType {\n\n\t/**\n\t * Gets an attribute definition by its name.\n\t * \n\t * @param name\n\t * the name of the attribute definition\n\t * \n\t * @return the attribute definition, null if not found\n\t * @since 2.0\n\t */\n\tpublic IAttributeType<?> getAttributeType(String name);\n\n//\t/**\n//\t * Gets an attribute definition by its name. If the attribute definition is\n//\t * not found, a new attribute definition set as unresolved can be created.\n//\t * \n//\t * @param name\n//\t * the name of the attribute definition\n//\t * @param createUnresolvedDefinition\n//\t * if true, create an unresolved definition if the attribute\n//\t * definition is not found\n//\t * @return the attribute definition, or null if createUnresolvedDefinition\n//\t * is false and the attribute definition is not found\n//\t * @since 2.2.1\n//\t */\n//\tpublic IAttributeType<?> getAttributeType(String name, boolean createUnresolvedDefinition);\n\n\t/**\n\t * Adds all the attribute definition into the list given into parameter.\n\t * Follows the hierarchy links and returns all the definitions even\n\t * duplicates one.\n\t * \n\t * @param all\n\t * a list\n\t * @since 2.0\n\t */\n\tpublic void getAllAttributeTypes(List<IAttributeType<?>> all);\n\n\t/**\n\t * Adds all the attribute definition into the list given into parameter.\n\t * Follows the hierarchy links and returns only one definition for\n\t * duplicates one.\n\t * \n\t * @param all :\n\t * a given map where put the result\n\t * @param keepLastAttribute\n\t * If true, keep the last definition (on the sub-type). Else keep\n\t * the definition on the super-type\n\t * @since 2.0\n\t */\n\tpublic void getAllAttributeTypes(Map<String, IAttributeType<?>> all, boolean keepLastAttribute);\n\n\t/**\n\t * Adds all the attribute definition into the list given into parameter.\n\t * Follows the hierarchy links and returns all the definitions even\n\t * duplicates one. Only attributes matching filter are added.\n\t * \n\t * @param all\n\t * a given list where to put the result\n\t * @param filter\n\t * A filter to select attribute definition\n\t * @since 2.0\n\t */\n\tpublic void getAllAttributeTypes(List<IAttributeType<?>> all, ItemFilter<IAttributeType<?>> filter);\n\n\t/**\n\t * Returns all the attribute definition. Follows the hierarchy links and\n\t * returns the last definition (on the sub-type).\n\t * \n\t * @return a possibly empty list with all the attribute definition\n\t * @since 2.0\n\t */\n\tpublic IAttributeType<?>[] getAllAttributeTypes();\n\n\t/**\n\t * Adds all the attribute definition into the map given into parameter.\n\t * Follows the hierarchy links and returns only one definition for\n\t * duplicates one. Only attributes matching filter are added.\n\t * \n\t * @param all :\n\t * a given map where to put the result\n\t * @param keepLastAttribute\n\t * If true, keep the last definition (on the sub-type). Else keep\n\t * the definition on the super-type\n\t * @param filter\n\t * A filter to select attribute definition\n\t * @since 2.0\n\t */\n\tpublic void getAllAttributeTypes(Map<String, IAttributeType<?>> all, boolean keepLastAttribute,\n\t\t\tItemFilter<IAttributeType<?>> filter);\n\n\t/**\n\t * Add all the attribute definition names to the Set given into parameter.\n\t * Only attributes matching filter are added.\n\t * \n\t * @param all\n\t * a given set where to put the result\n\t * @param filter\n\t * A filter to select attribute definition\n\t */\n\tpublic void getAllAttributeTypesKeys(Set<String> all, ItemFilter<IAttributeType<?>> filter);\n\n\t/**\n\t * Returns a list with all the attribute definition names.\n\t * \n\t * @return a possibly empty list with all the attribute definition names.\n\t * @since 2.0\n\t */\n\tpublic String[] getAttributeTypeIds();\n\n\t/**\n\t * Adds an attribute definition to this object.\n\t * \n\t * @param type\n\t * the attribute definition to add\n\t * @since 2.0\n\t */\n\tpublic <T> Link addAttributeType(IAttributeType<T> type);\n\n}",
"private com.google.protobuf.SingleFieldBuilderV3<\n com.zzsong.netty.protobuff.two.ProtoData.Person, com.zzsong.netty.protobuff.two.ProtoData.Person.Builder, com.zzsong.netty.protobuff.two.ProtoData.PersonOrBuilder> \n getPersonFieldBuilder() {\n if (personBuilder_ == null) {\n if (!(dataBodyCase_ == 2)) {\n dataBody_ = com.zzsong.netty.protobuff.two.ProtoData.Person.getDefaultInstance();\n }\n personBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<\n com.zzsong.netty.protobuff.two.ProtoData.Person, com.zzsong.netty.protobuff.two.ProtoData.Person.Builder, com.zzsong.netty.protobuff.two.ProtoData.PersonOrBuilder>(\n (com.zzsong.netty.protobuff.two.ProtoData.Person) dataBody_,\n getParentForChildren(),\n isClean());\n dataBody_ = null;\n }\n dataBodyCase_ = 2;\n onChanged();;\n return personBuilder_;\n }",
"int getOneof2071();",
"int getOneof2036();",
"public <T> Link addAttributeType(IAttributeType<T> type);",
"public interface Occupant extends Person {\n\n /* ***************************************************\n * Property http://ontology.cybershare.utep.edu/smart-cities/Mobility#contains\n */\n \n /**\n * Gets all property values for the contains property.<p>\n * \n * @returns a collection of values for the contains property.\n */\n Collection<? extends WrappedIndividual> getContains();\n\n /**\n * Checks if the class has a contains property value.<p>\n * \n * @return true if there is a contains property value.\n */\n boolean hasContains();\n\n /**\n * Adds a contains property value.<p>\n * \n * @param newContains the contains property value to be added\n */\n void addContains(WrappedIndividual newContains);\n\n /**\n * Removes a contains property value.<p>\n * \n * @param oldContains the contains property value to be removed.\n */\n void removeContains(WrappedIndividual oldContains);\n\n\n /* ***************************************************\n * Property http://ontology.cybershare.utep.edu/smart-cities/Mobility#has\n */\n \n /**\n * Gets all property values for the has property.<p>\n * \n * @returns a collection of values for the has property.\n */\n Collection<? extends WrappedIndividual> getHas();\n\n /**\n * Checks if the class has a has property value.<p>\n * \n * @return true if there is a has property value.\n */\n boolean hasHas();\n\n /**\n * Adds a has property value.<p>\n * \n * @param newHas the has property value to be added\n */\n void addHas(WrappedIndividual newHas);\n\n /**\n * Removes a has property value.<p>\n * \n * @param oldHas the has property value to be removed.\n */\n void removeHas(WrappedIndividual oldHas);\n\n\n /* ***************************************************\n * Property http://ontology.cybershare.utep.edu/smart-cities/Mobility#hasAge\n */\n \n /**\n * Gets all property values for the hasAge property.<p>\n * \n * @returns a collection of values for the hasAge property.\n */\n Collection<? extends Integer> getHasAge();\n\n /**\n * Checks if the class has a hasAge property value.<p>\n * \n * @return true if there is a hasAge property value.\n */\n boolean hasHasAge();\n\n /**\n * Adds a hasAge property value.<p>\n * \n * @param newHasAge the hasAge property value to be added\n */\n void addHasAge(Integer newHasAge);\n\n /**\n * Removes a hasAge property value.<p>\n * \n * @param oldHasAge the hasAge property value to be removed.\n */\n void removeHasAge(Integer oldHasAge);\n\n\n\n /* ***************************************************\n * Property http://ontology.cybershare.utep.edu/smart-cities/Mobility#hasAlcohol\n */\n \n /**\n * Gets all property values for the hasAlcohol property.<p>\n * \n * @returns a collection of values for the hasAlcohol property.\n */\n Collection<? extends Object> getHasAlcohol();\n\n /**\n * Checks if the class has a hasAlcohol property value.<p>\n * \n * @return true if there is a hasAlcohol property value.\n */\n boolean hasHasAlcohol();\n\n /**\n * Adds a hasAlcohol property value.<p>\n * \n * @param newHasAlcohol the hasAlcohol property value to be added\n */\n void addHasAlcohol(Object newHasAlcohol);\n\n /**\n * Removes a hasAlcohol property value.<p>\n * \n * @param oldHasAlcohol the hasAlcohol property value to be removed.\n */\n void removeHasAlcohol(Object oldHasAlcohol);\n\n\n\n /* ***************************************************\n * Property http://ontology.cybershare.utep.edu/smart-cities/Mobility#hasAlcoholBloodContent\n */\n \n /**\n * Gets all property values for the hasAlcoholBloodContent property.<p>\n * \n * @returns a collection of values for the hasAlcoholBloodContent property.\n */\n Collection<? extends Object> getHasAlcoholBloodContent();\n\n /**\n * Checks if the class has a hasAlcoholBloodContent property value.<p>\n * \n * @return true if there is a hasAlcoholBloodContent property value.\n */\n boolean hasHasAlcoholBloodContent();\n\n /**\n * Adds a hasAlcoholBloodContent property value.<p>\n * \n * @param newHasAlcoholBloodContent the hasAlcoholBloodContent property value to be added\n */\n void addHasAlcoholBloodContent(Object newHasAlcoholBloodContent);\n\n /**\n * Removes a hasAlcoholBloodContent property value.<p>\n * \n * @param oldHasAlcoholBloodContent the hasAlcoholBloodContent property value to be removed.\n */\n void removeHasAlcoholBloodContent(Object oldHasAlcoholBloodContent);\n\n\n\n /* ***************************************************\n * Property http://ontology.cybershare.utep.edu/smart-cities/Mobility#hasAlcoholResult\n */\n \n /**\n * Gets all property values for the hasAlcoholResult property.<p>\n * \n * @returns a collection of values for the hasAlcoholResult property.\n */\n Collection<? extends Object> getHasAlcoholResult();\n\n /**\n * Checks if the class has a hasAlcoholResult property value.<p>\n * \n * @return true if there is a hasAlcoholResult property value.\n */\n boolean hasHasAlcoholResult();\n\n /**\n * Adds a hasAlcoholResult property value.<p>\n * \n * @param newHasAlcoholResult the hasAlcoholResult property value to be added\n */\n void addHasAlcoholResult(Object newHasAlcoholResult);\n\n /**\n * Removes a hasAlcoholResult property value.<p>\n * \n * @param oldHasAlcoholResult the hasAlcoholResult property value to be removed.\n */\n void removeHasAlcoholResult(Object oldHasAlcoholResult);\n\n\n\n /* ***************************************************\n * Property http://ontology.cybershare.utep.edu/smart-cities/Mobility#hasAlcoholSpecimanType\n */\n \n /**\n * Gets all property values for the hasAlcoholSpecimanType property.<p>\n * \n * @returns a collection of values for the hasAlcoholSpecimanType property.\n */\n Collection<? extends Integer> getHasAlcoholSpecimanType();\n\n /**\n * Checks if the class has a hasAlcoholSpecimanType property value.<p>\n * \n * @return true if there is a hasAlcoholSpecimanType property value.\n */\n boolean hasHasAlcoholSpecimanType();\n\n /**\n * Adds a hasAlcoholSpecimanType property value.<p>\n * \n * @param newHasAlcoholSpecimanType the hasAlcoholSpecimanType property value to be added\n */\n void addHasAlcoholSpecimanType(Integer newHasAlcoholSpecimanType);\n\n /**\n * Removes a hasAlcoholSpecimanType property value.<p>\n * \n * @param oldHasAlcoholSpecimanType the hasAlcoholSpecimanType property value to be removed.\n */\n void removeHasAlcoholSpecimanType(Integer oldHasAlcoholSpecimanType);\n\n\n\n /* ***************************************************\n * Property http://ontology.cybershare.utep.edu/smart-cities/Mobility#hasDeployedAirbag\n */\n \n /**\n * Gets all property values for the hasDeployedAirbag property.<p>\n * \n * @returns a collection of values for the hasDeployedAirbag property.\n */\n Collection<? extends Integer> getHasDeployedAirbag();\n\n /**\n * Checks if the class has a hasDeployedAirbag property value.<p>\n * \n * @return true if there is a hasDeployedAirbag property value.\n */\n boolean hasHasDeployedAirbag();\n\n /**\n * Adds a hasDeployedAirbag property value.<p>\n * \n * @param newHasDeployedAirbag the hasDeployedAirbag property value to be added\n */\n void addHasDeployedAirbag(Integer newHasDeployedAirbag);\n\n /**\n * Removes a hasDeployedAirbag property value.<p>\n * \n * @param oldHasDeployedAirbag the hasDeployedAirbag property value to be removed.\n */\n void removeHasDeployedAirbag(Integer oldHasDeployedAirbag);\n\n\n\n /* ***************************************************\n * Property http://ontology.cybershare.utep.edu/smart-cities/Mobility#hasGender\n */\n \n /**\n * Gets all property values for the hasGender property.<p>\n * \n * @returns a collection of values for the hasGender property.\n */\n Collection<? extends Integer> getHasGender();\n\n /**\n * Checks if the class has a hasGender property value.<p>\n * \n * @return true if there is a hasGender property value.\n */\n boolean hasHasGender();\n\n /**\n * Adds a hasGender property value.<p>\n * \n * @param newHasGender the hasGender property value to be added\n */\n void addHasGender(Integer newHasGender);\n\n /**\n * Removes a hasGender property value.<p>\n * \n * @param oldHasGender the hasGender property value to be removed.\n */\n void removeHasGender(Integer oldHasGender);\n\n\n\n /* ***************************************************\n * Property http://ontology.cybershare.utep.edu/smart-cities/Mobility#hasHelmet\n */\n \n /**\n * Gets all property values for the hasHelmet property.<p>\n * \n * @returns a collection of values for the hasHelmet property.\n */\n Collection<? extends Integer> getHasHelmet();\n\n /**\n * Checks if the class has a hasHelmet property value.<p>\n * \n * @return true if there is a hasHelmet property value.\n */\n boolean hasHasHelmet();\n\n /**\n * Adds a hasHelmet property value.<p>\n * \n * @param newHasHelmet the hasHelmet property value to be added\n */\n void addHasHelmet(Integer newHasHelmet);\n\n /**\n * Removes a hasHelmet property value.<p>\n * \n * @param oldHasHelmet the hasHelmet property value to be removed.\n */\n void removeHasHelmet(Integer oldHasHelmet);\n\n\n\n /* ***************************************************\n * Property http://ontology.cybershare.utep.edu/smart-cities/Mobility#hasInjury\n */\n \n /**\n * Gets all property values for the hasInjury property.<p>\n * \n * @returns a collection of values for the hasInjury property.\n */\n Collection<? extends Integer> getHasInjury();\n\n /**\n * Checks if the class has a hasInjury property value.<p>\n * \n * @return true if there is a hasInjury property value.\n */\n boolean hasHasInjury();\n\n /**\n * Adds a hasInjury property value.<p>\n * \n * @param newHasInjury the hasInjury property value to be added\n */\n void addHasInjury(Integer newHasInjury);\n\n /**\n * Removes a hasInjury property value.<p>\n * \n * @param oldHasInjury the hasInjury property value to be removed.\n */\n void removeHasInjury(Integer oldHasInjury);\n\n\n\n /* ***************************************************\n * Property http://ontology.cybershare.utep.edu/smart-cities/Mobility#hasInjurySeverity\n */\n \n /**\n * Gets all property values for the hasInjurySeverity property.<p>\n * \n * @returns a collection of values for the hasInjurySeverity property.\n */\n Collection<? extends Integer> getHasInjurySeverity();\n\n /**\n * Checks if the class has a hasInjurySeverity property value.<p>\n * \n * @return true if there is a hasInjurySeverity property value.\n */\n boolean hasHasInjurySeverity();\n\n /**\n * Adds a hasInjurySeverity property value.<p>\n * \n * @param newHasInjurySeverity the hasInjurySeverity property value to be added\n */\n void addHasInjurySeverity(Integer newHasInjurySeverity);\n\n /**\n * Removes a hasInjurySeverity property value.<p>\n * \n * @param oldHasInjurySeverity the hasInjurySeverity property value to be removed.\n */\n void removeHasInjurySeverity(Integer oldHasInjurySeverity);\n\n\n\n /* ***************************************************\n * Property http://ontology.cybershare.utep.edu/smart-cities/Mobility#hasRestraintType\n */\n \n /**\n * Gets all property values for the hasRestraintType property.<p>\n * \n * @returns a collection of values for the hasRestraintType property.\n */\n Collection<? extends Integer> getHasRestraintType();\n\n /**\n * Checks if the class has a hasRestraintType property value.<p>\n * \n * @return true if there is a hasRestraintType property value.\n */\n boolean hasHasRestraintType();\n\n /**\n * Adds a hasRestraintType property value.<p>\n * \n * @param newHasRestraintType the hasRestraintType property value to be added\n */\n void addHasRestraintType(Integer newHasRestraintType);\n\n /**\n * Removes a hasRestraintType property value.<p>\n * \n * @param oldHasRestraintType the hasRestraintType property value to be removed.\n */\n void removeHasRestraintType(Integer oldHasRestraintType);\n\n\n\n /* ***************************************************\n * Property http://ontology.cybershare.utep.edu/smart-cities/Mobility#isPersonType\n */\n \n /**\n * Gets all property values for the isPersonType property.<p>\n * \n * @returns a collection of values for the isPersonType property.\n */\n Collection<? extends Integer> getIsPersonType();\n\n /**\n * Checks if the class has a isPersonType property value.<p>\n * \n * @return true if there is a isPersonType property value.\n */\n boolean hasIsPersonType();\n\n /**\n * Adds a isPersonType property value.<p>\n * \n * @param newIsPersonType the isPersonType property value to be added\n */\n void addIsPersonType(Integer newIsPersonType);\n\n /**\n * Removes a isPersonType property value.<p>\n * \n * @param oldIsPersonType the isPersonType property value to be removed.\n */\n void removeIsPersonType(Integer oldIsPersonType);\n\n\n\n /* ***************************************************\n * Common interfaces\n */\n\n OWLNamedIndividual getOwlIndividual();\n\n OWLOntology getOwlOntology();\n\n void delete();\n\n}",
"People getObjUser();",
"public com.zzsong.netty.protobuff.two.ProtoData.Person getPerson() {\n if (dataBodyCase_ == 2) {\n return (com.zzsong.netty.protobuff.two.ProtoData.Person) dataBody_;\n }\n return com.zzsong.netty.protobuff.two.ProtoData.Person.getDefaultInstance();\n }",
"int getOneof2046();",
"int getOneof2037();",
"private void generateProperty2AttributeConversion(final JPAStructuredType ownerType, final boolean ownerISRootEntity,\n final JPAMemberAttribute attribute)\n throws ODataJPAModelException,\n IOException {\n final String memberName = qualifiedName2FirstCharacterUppercasedString(attribute.getInternalName());\n final String propClientType = TypeDtoAPIWriter.determineClientSidePropertyJavaTypeName(attribute, false);\n final String typeMetaName = TypeMetaAPIWriter.determineTypeMetaName(ownerType.getTypeClass().getSimpleName());\n final String odataPropertyGetter = ownerISRootEntity ? \"getProperty\" : \"get\";\n if (attribute.isCollection()) {\n // special handling for collection attributes\n write(NEWLINE + \"\\t\" + \"\\t\" + \"// collection (\" + (attribute.getType().isEnum() ? \"enum\" : attribute.isComplex()\n ? \"complex\" : \"primitive\") + \") attribute value\");\n write(NEWLINE + \"\\t\" + \"\\t\" + \"final \" + ClientProperty.class.getName() + \" prop\" + memberName\n + \" = odataObject.\" + odataPropertyGetter + \"(\" + typeMetaName + \".\" + TypeMetaAPIWriter\n .determineTypeMetaPropertyNameConstantName(attribute.getProperty()) + \");\");\n final String methodName = determineConversionProperty2AttributeValueMethodName(attribute, true);\n write(NEWLINE + \"\\t\" + \"\\t\" + propClientType + \" c\" + memberName + \" = \" + methodName + \"(\" + \"prop\" + memberName\n + \".getName(), \" + \"prop\" + memberName + \".getCollectionValue(), \" + integer2CodeString(\n attribute.getMaxLength()) + \", \" + integer2CodeString(attribute.getPrecision()) + \", \"\n + integer2CodeString(attribute.getScale()) + \");\");\n write(NEWLINE + \"\\t\" + \"\\t\" + \"dtoResult.\" + TypeDtoAPIWriter.determinePropertySetterMethodName(attribute) + \"(\"\n + \"c\"\n + memberName + \");\");\n } else if (attribute.getType().isEnum()) {\n // enums are generated as duplicate on client side (code) so we can reference directly the enum class\n write(NEWLINE + \"\\t\" + \"\\t\" + \"// enum attribute value\");\n write(NEWLINE + \"\\t\" + \"\\t\" + \"final \" + ClientProperty.class.getName() + \" prop\" + memberName\n + \" = odataObject.\" + odataPropertyGetter + \"(\" + typeMetaName + \".\"\n + TypeMetaAPIWriter.determineTypeMetaPropertyNameConstantName(attribute.getProperty()) + \");\");\n write(NEWLINE + \"\\t\" + \"\\t\" + attribute.getType().getName() + \" e\" + memberName + \" = \" + METHOD_EXTRACT_ENUMVALUE\n + \"(prop\"\n + memberName + \".getValue(), \" + attribute.getType().getName() + \".class);\");\n write(NEWLINE + \"\\t\" + \"\\t\" + \"dtoResult.\" + TypeDtoAPIWriter.determinePropertySetterMethodName(attribute) + \"(\"\n + \"e\" + memberName + \");\");\n } else if (attribute.isComplex()) {\n write(NEWLINE + \"\\t\" + \"\\t\" + \"// complex type attribute value\");\n write(NEWLINE + \"\\t\" + \"\\t\" + \"final \" + ClientProperty.class.getName() + \" prop\" + memberName\n + \" = odataObject.\" + odataPropertyGetter + \"(\"\n + typeMetaName + \".\" + TypeMetaAPIWriter.determineTypeMetaPropertyNameConstantName(attribute.getProperty())\n + \");\");\n final String methodName = determineConversionProperty2AttributeValueMethodName(attribute, false);\n write(NEWLINE + \"\\t\" + \"\\t\" + \"final \" + propClientType + \" dto\" + memberName + \" = \" + methodName + \"(\" + \"prop\"\n + memberName + \".getComplexValue()\" + \");\");\n write(NEWLINE + \"\\t\" + \"\\t\" + \"dtoResult.\" + TypeDtoAPIWriter.determinePropertySetterMethodName(attribute) + \"(\"\n + \"dto\"\n + memberName + \");\");\n } else if (TypeMapping.convertToEdmSimpleType(attribute) == EdmPrimitiveTypeKind.Binary) {\n write(NEWLINE + \"\\t\" + \"\\t\" + \"// binary attribute value for '\" + attribute.getInternalName() + \"' is ignored\");\n } else {\n write(NEWLINE + \"\\t\" + \"\\t\" + \"// primitive attribute value\");\n write(NEWLINE + \"\\t\" + \"\\t\" + \"final \" + ClientProperty.class.getName() + \" prop\" + memberName\n + \" = odataObject.\" + odataPropertyGetter + \"(\"\n + typeMetaName + \".\" + TypeMetaAPIWriter.determineTypeMetaPropertyNameConstantName(attribute.getProperty())\n + \");\");\n final String methodName = determineConversionProperty2AttributeValueMethodName(attribute, true);\n write(NEWLINE + \"\\t\" + \"\\t\" + propClientType + \" r\" + memberName + \" = \" + methodName + \"(\" + \"prop\" + memberName\n + \".getName(), \" + \"prop\"\n + memberName + \".getPrimitiveValue(), \" + integer2CodeString(attribute\n .getMaxLength()) + \", \" + integer2CodeString(attribute.getPrecision()) + \", \" + integer2CodeString(\n attribute.getScale()) + \")\" + \";\");\n write(NEWLINE + \"\\t\" + \"\\t\" + \"dtoResult.\" + TypeDtoAPIWriter.determinePropertySetterMethodName(attribute) + \"(\"\n + \"r\" + memberName + \");\");\n }\n }",
"int getOneof1150();",
"int getOneof1998();",
"Object getTipo();",
"Attributes getAttributes();",
"public Person getRandomPerson() {\n //Randomize all characteristics of a person\n int age = (int) (rd.nextDouble() * 100); //within 100y old\n int gd = (int) Math.round(rd.nextDouble() * (Person.Gender.values().length - 1));\n int bt = (int) Math.round(rd.nextDouble() * (Person.BodyType.values().length - 1));\n int pf = (int) Math.round(rd.nextDouble() * (Person.Profession.values().length - 1));\n boolean isPreg = rd.nextBoolean();\n\n //Construct a person with random characteristic\n //Person(int age, Profession profession, Gender gender, BodyType bodytype, boolean isPregnant)\n P = new Person(age, Person.Profession.values()[pf], Person.Gender.values()[gd], Person.BodyType.values()[bt], isPreg);\n return P;\n }",
"int getOneof2069();",
"int getOneof2051();",
"public IAttributeType<?> getAttributeType(String name);",
"private String resolveAttrType(String aType){\n\t\tif(aType == \"int\" || aType == \"Int\") return \"int\";\n\t\telse if(aType == \"String\") return \"String\";\n\t\telse if(aType == \"univ\") assertMessage(\"TODO: Map univ with Java type\");\n\t\telse if(aType == \"none\") assertMessage(\"TODO: Map none with Java type\");\n\t\telse if(aType.contains(\"seq\")) assertMessage(\"TODO: Map seqInt with Java type\");\n\n\t\treturn aType;\n\t}",
"List<LawPerson> selectByExample(LawPersonExample example);",
"int getOneof2009();",
"public abstract Map<String, Object> getAttributes();",
"int getOneof1198();",
"public abstract String getStudentType();",
"trinsic.services.common.v1.CommonOuterClass.JsonPayload getAttributes();",
"int getOneof2070();",
"int getOneof2068();",
"private static CustomItemProperties getCustomItemProperties(ItemStack itemStack, int type) {\n/* 595 */ if (itemProperties == null)\n/* */ {\n/* 597 */ return null;\n/* */ }\n/* 599 */ if (itemStack == null)\n/* */ {\n/* 601 */ return null;\n/* */ }\n/* */ \n/* */ \n/* 605 */ Item item = itemStack.getItem();\n/* 606 */ int itemId = Item.getIdFromItem(item);\n/* */ \n/* 608 */ if (itemId >= 0 && itemId < itemProperties.length) {\n/* */ \n/* 610 */ CustomItemProperties[] cips = itemProperties[itemId];\n/* */ \n/* 612 */ if (cips != null)\n/* */ {\n/* 614 */ for (int i = 0; i < cips.length; i++) {\n/* */ \n/* 616 */ CustomItemProperties cip = cips[i];\n/* */ \n/* 618 */ if (cip.type == type && matchesProperties(cip, itemStack, null))\n/* */ {\n/* 620 */ return cip;\n/* */ }\n/* */ } \n/* */ }\n/* */ } \n/* */ \n/* 626 */ return null;\n/* */ }"
] | [
"0.7225494",
"0.61817765",
"0.58545923",
"0.57666725",
"0.5752372",
"0.5589117",
"0.555414",
"0.54720515",
"0.545585",
"0.543731",
"0.5429581",
"0.53484464",
"0.53414005",
"0.5323454",
"0.5308308",
"0.52709067",
"0.5236744",
"0.5213917",
"0.5121746",
"0.51161444",
"0.5107485",
"0.50860244",
"0.5081066",
"0.5079518",
"0.50663966",
"0.50539315",
"0.5049838",
"0.5040748",
"0.50368875",
"0.5010363",
"0.49873313",
"0.497533",
"0.497355",
"0.4957306",
"0.49542847",
"0.49542576",
"0.4946669",
"0.49451476",
"0.49411988",
"0.49276695",
"0.49215364",
"0.49107718",
"0.48989347",
"0.48985332",
"0.48953763",
"0.4891543",
"0.4878672",
"0.4876534",
"0.48746625",
"0.4874385",
"0.48672906",
"0.48635384",
"0.48615232",
"0.48592344",
"0.4859019",
"0.48537263",
"0.4851914",
"0.4848102",
"0.48444578",
"0.4841322",
"0.48390338",
"0.4835089",
"0.48314586",
"0.4829986",
"0.4827834",
"0.48270196",
"0.48230803",
"0.4801415",
"0.4799218",
"0.479881",
"0.47936338",
"0.47927055",
"0.47898644",
"0.47893867",
"0.47890893",
"0.47872666",
"0.47872123",
"0.4785468",
"0.4783814",
"0.47831222",
"0.47821945",
"0.4780958",
"0.47800764",
"0.47799504",
"0.4777792",
"0.4775906",
"0.4775349",
"0.47726375",
"0.4771866",
"0.47699153",
"0.476528",
"0.47626343",
"0.47597414",
"0.47555906",
"0.47529903",
"0.47529617",
"0.47500312",
"0.47495914",
"0.47486866",
"0.4744874"
] | 0.5568795 | 6 |
Sauvegarde le tableau des records dans un fichier | public static void sauvegarder(TableauRecords tableauRecords) {
File file = new File(HIGHSCORES_FILE);
PrintWriter writer;
try {
if(!file.exists()) {
file.getParentFile().mkdirs();
file.createNewFile();
}
writer = new PrintWriter(file);
}
catch (Exception e) {
e.printStackTrace();
return;
}
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
for(Record record : tableauRecords) {
writer.print(record.getNom() + "\t" + record.getScore() + "\t" + sdf.format(record.getDate()) + "\n");
}
writer.close();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public synchronized void saveTable() \n\t{\n\t\ttry {\n\t\t\tFileOutputStream fos = new FileOutputStream(tableFile);\n\t\t\t\n\t\t\tObjectOutputStream oos = new ObjectOutputStream(fos);\n\t\t\toos.writeObject(htRecords);\n\t\t\toos.close();\n\t\t\tfos.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\tthrow new RuntimeException(\"Cannot save : FileNotFoundException\",e);\n\t\t} catch (IOException e) {\n\t\t\tthrow new RuntimeException(\"Cannot save : IOException\",e);\n\t\t}\n\t}",
"private void processRecords()\n {\n // This is the way to connect the file to an inputstream in android\n InputStream inputStream = getResources().openRawResource(R.raw.products);\n\n Scanner scanner = new Scanner(inputStream);\n\n\n // skipping first row by reading it before loop and displaying it as column names\n String[] tableRow = scanner.nextLine().split(\",\");\n\n //Log.e(\"COLUMN NAMES\", Arrays.toString(tableRow));\n //Log.e(\"COLUMN NAMES SIZE\", String.valueOf(tableRow.length));\n\n\n // --- Truncate table (delete all rows and reset auto increment --\n // this line of code will be useful because for now we are forced to read file\n // everytime we open app, this way we do not have duplicate data.\n db.resetTable();\n\n while (scanner.hasNextLine())\n {\n tableRow = scanner.nextLine().split(\",\");\n //Log.e(\"COLUMN VALUES\", Arrays.toString(tableRow));\n //Log.e(\"COLUMN VALUES SIZE\", String.valueOf(tableRow.length));\n\n /*\n * Possible Change:\n * On each iteration a new Product() can be created and call the setter to set\n * its fields to the elements of the String array, example\n * product = new Product();\n * product.setNumber(tableRow[0]);\n * product.setBusinessName(tableRow[1]);\n * ...\n * db.insertData(product); // because the new insertData method would expect a\n * Product object instead\n *\n */\n\n // insert data\n if (db.insertData(tableRow))\n {\n //Log.e(\"Insert\", \"SUCCESSFUL INSERT AT \" + tableRow[0]);\n }\n else\n {\n //Log.e(\"Insert\", \"UNSUCCESSFUL INSERT\");\n }\n\n }\n }",
"private void buildTable() {\n rowData = new Object[4];\n infoTable = new JTable();\n tableModel = new DefaultTableModel();\n tableModel.setColumnIdentifiers(columnNames);\n infoTable.setModel(tableModel);\n String line;\n \n try {\n FileInputStream fin = new FileInputStream(\"ContactInfo.txt\");\n BufferedReader br = new BufferedReader(new InputStreamReader(fin)); \n \n while((line = br.readLine()) != null)\n {\n rowData[0] = line;\n for(int i = 1; i < 4; i++) {\n rowData[i] = br.readLine();\n }\n tableModel.addRow(rowData);\n } \n br.close();\n }\n catch (FileNotFoundException e) {\n JOptionPane.showMessageDialog(null, e.getMessage());\n }\n catch (IOException e) {\n JOptionPane.showMessageDialog(null, e.getMessage());\n }\n }",
"void exporter(JTable tab, File file) {\n try {\r\n\r\n TableModel model = tab.getModel();\r\n FileWriter out = new FileWriter(file);\r\n for (int i = 0; i < model.getColumnCount(); i++) {\r\n out.write(model.getColumnName(i) + \"\\t\");\r\n }\r\n out.write(\"\\n\");\r\n\r\n for (int i = 0; i < model.getRowCount(); i++) {\r\n for (int j = 0; j < model.getColumnCount(); j++) {\r\n out.write(model.getValueAt(i, j).toString() + \"\\t\");\r\n }\r\n out.write(\"\\n\");\r\n }\r\n\r\n out.close();\r\n } catch (Exception err) {\r\n err.printStackTrace();\r\n }\r\n }",
"public void loadData() {\n Path path= Paths.get(filename);\n Stream<String> lines;\n try {\n lines= Files.lines(path);\n lines.forEach(ln->{\n String[] s=ln.split(\";\");\n if(s.length==3){\n try {\n super.save(new Teme(Integer.parseInt(s[0]),Integer.parseInt(s[1]),s[2]));\n } catch (ValidationException e) {\n e.printStackTrace();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }else\n System.out.println(\"linie corupta in fisierul teme.txt\");});\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public synchronized void writeFromFileIntoDB()throws IOWrapperException, IOIteratorException{\r\n \r\n fromFile_Name=Controller.CLASSES_TMP_FILENAME;\r\n iow_ReadFromFile = new IOWrapper();\r\n \r\n //System.out.println(\"Readin' from \"+fromFile_Name);\r\n \r\n iow_ReadFromFile.setupInput(fromFile_Name,0);\r\n \r\n iter_ReadFromFile = iow_ReadFromFile.getLineIterator();\r\n iow_ReadFromFile.setupOutput(this.dbname,this.username,this.password,this.hostname,this.port);\r\n \r\n iow_ReadFromFile.sendOutputQuery(\"DROP TABLE IF EXISTS \"+outtable);\r\n \r\n iow_ReadFromFile.sendOutputQuery(\r\n \"CREATE TABLE IF NOT EXISTS \"\r\n +outtable+\" (\"\r\n +Controller.COLUMN_NAMES_FOR_DB_OUT[0]+\" int(10) NOT NULL AUTO_INCREMENT, \"//wort_nr\r\n +Controller.COLUMN_NAMES_FOR_DB_OUT[1]+\" varchar(225), \"//wort_alph\r\n +Controller.COLUMN_NAMES_FOR_DB_OUT[2]+\" int(10), \"//krankheit \r\n +Controller.COLUMN_NAMES_FOR_DB_OUT[3]+\" int(10), \"//farbe1 \r\n +Controller.COLUMN_NAMES_FOR_DB_OUT[4]+\" real(8,2), \"//farbe1prozent\r\n +Controller.COLUMN_NAMES_FOR_DB_OUT[5]+\" int(10), \"//farbe2\r\n +Controller.COLUMN_NAMES_FOR_DB_OUT[6]+\" real(8,2), \"//farbe2prozent\r\n +\"PRIMARY KEY (\"+Controller.COLUMN_NAMES_FOR_DB_OUT[0]+\")) \"\r\n +\"ENGINE=MyISAM\"\r\n );\r\n while(iter_ReadFromFile.hasNext()){\r\n singleProgress+=1;\r\n String[] data = (String[])iter_ReadFromFile.next();\r\n \r\n //System.out.println(\"--> processing line \"+data);\r\n //escape quotes ' etc for SQL query\r\n if(data[1].matches(\".*'.*\")||data[1].matches(\".*\\\\.*\")){\r\n int sl = data[1].length();\r\n String escapedString = \"\";\r\n \r\n for (int i = 0; i < sl; i++) {\r\n char ch = data[1].charAt(i);\r\n switch (ch) {\r\n case '\\'':\r\n escapedString +='\\\\';\r\n escapedString +='\\'';\r\n break;\r\n case '\\\\':\r\n escapedString +='\\\\';\r\n escapedString +='\\\\';\r\n break;\r\n default :\r\n escapedString +=ch;\r\n break;\r\n }\r\n }\r\n data[1]=escapedString;\r\n }\r\n \r\n String insertStatement=\"INSERT INTO \"\r\n +outtable+\" (\"\r\n +Controller.COLUMN_NAMES_FOR_DB_OUT[0]+\", \"//node id\r\n +Controller.COLUMN_NAMES_FOR_DB_OUT[1]+\", \"//label\r\n +Controller.COLUMN_NAMES_FOR_DB_OUT[2]+\", \"//class id \r\n +Controller.COLUMN_NAMES_FOR_DB_OUT[3]+\", \"//class id 1 \r\n +Controller.COLUMN_NAMES_FOR_DB_OUT[4]+\", \"//percent\r\n +Controller.COLUMN_NAMES_FOR_DB_OUT[5]+\", \"//class id 2\r\n +Controller.COLUMN_NAMES_FOR_DB_OUT[6]+\") \"//percent \r\n +\"VALUES ('\"\r\n +data[0]+\"', '\"\r\n +data[1]+\"', '\"\r\n +data[2]+\"', '\"\r\n +data[3]+\"', '\"\r\n +data[4]+\"', '\"\r\n +data[5]+\"', '\"\r\n +data[6]+\"')\";\r\n \r\n //System.out.println(\"Sending insert statement:\"+insertStatement);\r\n iow_ReadFromFile.sendOutputQuery(insertStatement);\r\n }\r\n \r\n \r\n //iow_ReadFromFile.closeOutput();\r\n \r\n this.stillWorks=false;\r\n writeIntoDB=false;\r\n System.out.println(\"*\\tData written into database.\");\r\n\t}",
"public void writeTable(Table table, String pathName, String filename){\n\n Record tempRow; \n String tempString;\n FileWriter fw;\n\n //create file\n try {\n fw = new FileWriter(pathName + filename);\n \n //add table name\n fw.write(table.getName());\n fw.write(\"\\n\");\n\n //add each row to a new line\n //get primary keys and loop over to add rows\n List<String> keys = table.getPrimaryKeys();\n for (int i = 0; i < keys.size(); i++){\n tempRow = table.getRow(keys.get(i));\n tempString = tempRow.getAllItemString();\n fw.write(tempString);\n fw.write(\"\\n\");\n }\n\n fw.close();\n } catch (IOException ex){\n System.out.println(\"ERROR: failed to create file \" + filename);\n }\n }",
"public static void writeIntoCSVFromTable() {\n try {\n backItUp(ROOT);\n backItUp(ROOT + Calendar.getInstance().getTime() + \"/\");\n } catch (Throwable e) {\n itsLogger.error(e.getMessage(), e);\n }\n\n }",
"public void toFile (String nameFile)\n {\n //definir dados\n int i, j;\n int lin;\n int col;\n FILE arquivo;\n\n //obter dimensoes\n lin = lines();\n col = columns();\n\n //verificar se as dimensoes sao validas\n if( lin <= 0 || col <= 0 )\n {\n IO.println(\"ERRO: Tamanho(s) invalido(s). \");\n } //end\n else\n {\n //verificar se tabela e' valida\n if( table == null )\n {\n IO.println(\"ERRO: Matriz invalida. \" );\n } //end\n else\n {\n arquivo = new FILE(FILE.OUTPUT, nameFile);\n arquivo.println(\"\"+ lin);\n arquivo.println(\"\"+ col);\n\n //pecorre para preencher a matriz\n for( i = 0; i < lin; i++)\n {\n for(j = 0; j < col; j++)\n {\n arquivo.println(\"\" + table[ i ][ j ]);\n } //end repetir\n } //end repetir\n //fechar arquivo (indispensavel)\n arquivo.close();\n } //end se\n } //end se\n }",
"private void toSave() {\n File file4=new File(\"trial.txt\");\n try\n {\n String row;\n BufferedWriter bw=new BufferedWriter(new FileWriter(file4));\n for(int i=0;i<jt.getRowCount();i++)\n {\n row = \"\";\n for(int j=0;j<jt.getColumnCount();j++)\n {\n row += (jt.getValueAt(i, j) +\",\");\n }\n row = row.substring(0, row.length()-1);\n //System.out.println(row);\n bw.write(row);\n bw.newLine();\n }\n bw.close();\n \n \n JOptionPane.showMessageDialog(rootPane,\"Details saved succesfully\");\n }\n \n catch(Exception ex)\n {\n JOptionPane.showMessageDialog(rootPane,\"Exception occured\");\n }\n }",
"@Override\n\tpublic void exportarData() {\n\t\tDate date=new Date();\n\t\tString nameFile=\"recaudado-\"+date.getTime()+\".xls\";\n\t\tTableToExcel.save(grid,nameFile);\n\t}",
"private static void SaveTable(Class<?> itemClass, List<CSVItem> data) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException, NoSuchFieldException {\n\t\tString tl = (String)itemClass.getMethod(\"readTitle\").invoke(null, null);\n\t\tString val = \"\";\n\t\tString fn = (String)itemClass.getField(\"file\").get(val);\n\t\t\n\t\t\n\t\t\n\t\tfn = \"C:\\\\Users\\\\Chebakov.AA\\\\neo4j\\\\import\\\\pitc\\\\\" + fn + \".csv\";\n\t\ttry (OutputStreamWriter out = new OutputStreamWriter(new FileOutputStream(fn), \"UTF8\")) { //\"cp1251\"\n\t\t\tout.write(tl + \"\\r\\n\");\n\t\t\tdata.stream()\n\t\t\t\t.map(v -> v.readDataRow())\n\t\t\t\t.forEach(v -> {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tout.write(v + \"\\r\\n\");\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (UnsupportedEncodingException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void readTable() {\n DefaultTableModel modelo = (DefaultTableModel) jTable1.getModel();\n modelo.setRowCount(0);\n\n }",
"@PostMapping(\"/importar3\")\r\n String importar3( Map<String, Object> model) {\r\n\r\n iniciarValores();\r\n\r\n ArrayList<String> output = new ArrayList<String>();\r\n try {\r\n Connection connection = dataSource.getConnection();\r\n\r\n //////////////////////////////////\r\n int numArquivos = 1;\r\n int id = this.ID;\r\n while (numArquivos < NUM_ARQUIVOS) {\r\n\r\n StringBuffer conteudo = new StringBuffer();\r\n\r\n //Abre o arquivo\r\n String arq = ARQUIVO_ENTRADA + MIN_INDICE + \"_\" + MAX_INDICE + \".txt\";\r\n //---Local\r\n //BufferedReader file = new BufferedReader(new FileReader(arq));\r\n //---Local/Remote\r\n String linha=\"\";\r\n ClassPathResource resource = new ClassPathResource(arq);\r\n BufferedReader file = new BufferedReader(new InputStreamReader(resource.getInputStream(), StandardCharsets.UTF_8));\r\n\r\n //Primeira linha soh possui os cabecalhos das colunas\r\n linha = file.readLine();\r\n output.add(linha);\r\n\r\n //Proxima linha\r\n linha = file.readLine();\r\n output.add(linha);\r\n System.out.println(linha);\r\n\r\n String[] campo = new String[NUM_CAMPOS];\r\n StringTokenizer token = null;\r\n int numCampos = 0;\r\n int i = 0;\r\n\r\n //Prepara as variaveis para gravacao na BD\r\n Statement stmt = connection.createStatement();\r\n\r\n //id eh um numero sequencial\r\n while (linha != null) {\r\n ///////\r\n //////\r\n\r\n StringBuffer inserirLinha = new StringBuffer();\r\n inserirLinha.append(\"insert into preensao(\"\r\n + \"ladodominante,\"\r\n + \"dir1, \"\r\n + \"esq1, \"\r\n + \"dir2, \"\r\n + \"esq2, \"\r\n + \"dir3, \"\r\n + \"esq3 \"\r\n\r\n + \") values ( \"\r\n +\r\n \"'Esquerdo', \"\r\n + //ladodominante\r\n \"0, \"\r\n + //dir1\r\n \"0, \"\r\n + //esq1\r\n \"0, \"\r\n + //dir2\r\n \"0, \"\r\n + //esq2\r\n \"0, \"\r\n + //dir3\r\n \"0 \"\r\n + //esq3\r\n \")\");\r\n System.out.println(inserirLinha);\r\n output.add(inserirLinha.toString());\r\n stmt.executeUpdate(inserirLinha.toString());\r\n\r\n //Proxima linha do arquivo de cadastros filtrados\r\n linha = file.readLine();\r\n\r\n System.out.println(id + \"-------\");\r\n output.add(id + \"-------\");\r\n\r\n //Incrementa o numero da ficha\r\n id++;\r\n\r\n }//fim while\r\n\r\n /////////////////////////////\r\n MIN_INDICE = MAX_INDICE + 1;\r\n MAX_INDICE += NUM_INDICES;\r\n numArquivos = MAX_INDICE;\r\n\r\n //Proximo arquivo\r\n }//fim while\r\n\r\n output.add(\"Importacao realizada com sucesso!\");\r\n model.put(\"message\", output);\r\n return \"error\";\r\n\r\n } catch (Exception e) {\r\n output.add(\"Excecao1: \" + e.getMessage());\r\n model.put(\"message\", output);\r\n return \"error\";\r\n }\r\n\r\n }",
"private void writeToFile(List<Record> records) {\n try (\n FileWriter writer = new FileWriter(FILE_PATH);\n BufferedWriter bufferedWriter =\n new BufferedWriter(writer);\n PrintWriter out = new PrintWriter(bufferedWriter)\n\n ) {\n\n for (Record record : records) {\n out.format(\"%d;%s;%s;%s;%s;%s\\n\",\n record.getId(),\n record.getFirstName(),\n record.getLastName(),\n record.getPhone().getNumber(),\n record.getPhone().getType(),\n record.getCategory().getId());\n }\n// writer.close();\n out.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n\n\n }",
"private static void populateTable(String name, File fileObj, Statement stat) {\n\t\tString tableName = \"\";\n\t\tScanner scan = null;\n\t\tString line = \"\";\n\t\tString[] splitLine = null;\n\t\t\n\t\ttableName = \"stevenwbroussard.\" + name;\n\t\ttry {\n\t\t\tscan = new Scanner(fileObj);\n\t\t}\n\t\tcatch(IOException e) {\n\t\t\tSystem.out.println(\"Failed make thread with file.\");\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(-1);\n\t\t}\n\t\t\n\t\t//use a for loop to go through, later use a while loop\n\t\twhile (scan.hasNext() != false) {\n\t\t//for (int i = 0; i < 10; i++) {\n\t\t\tline = scan.nextLine();\n\t\t\tsplitLine = line.split(\"\\\\,\");\n\t\t\t\n\t\t\t//if the type for integer column is NULL\n\t\t\tif (splitLine[0].equals(\"NULL\")) {\n\t\t\t\tsplitLine[0] = \"-1\";\n\t\t\t}\n\t\t\tif (splitLine[1].equals(\"NULL\")) {\n\t\t\t\tsplitLine[1] = \"-1\";\n\t\t\t}\n\t\t\tif (splitLine[4].equals(\"NULL\")) {\n\t\t\t\tsplitLine[4] = \"-1\";\n\t\t\t}\n\t\t\tif (splitLine[5].equals(\"NULL\")) {\n\t\t\t\tsplitLine[5] = \"-1\";\n\t\t\t}\n\t\t\tif (splitLine[7].equals(\"NULL\")) {\n\t\t\t\tsplitLine[7] = \"-1\";\n\t\t\t}\n\t\t\tif (splitLine[9].equals(\"NULL\")) {\n\t\t\t\tsplitLine[9] = \"-1\";\n\t\t\t}\n\t\t\tif (splitLine[11].equals(\"NULL\")) {\n\t\t\t\tsplitLine[11] = \"-1\";\n\t\t\t}\n\t\t\tif (splitLine[13].equals(\"NULL\")) {\n\t\t\t\tsplitLine[13] = \"-1\";\n\t\t\t}\n\t\t\t\n\t\t\t//if the type for double column is NULL\n\t\t\tif (splitLine[6].equals(\"NULL\")) {\n\t\t\t\tsplitLine[6] = \"-1.0\";\n\t\t\t}\n\t\t\tif (splitLine[8].equals(\"NULL\")) {\n\t\t\t\tsplitLine[8] = \"-1.0\";\n\t\t\t}\n\t\t\tif (splitLine[10].equals(\"NULL\")) {\n\t\t\t\tsplitLine[10] = \"-1.0\";\n\t\t\t}\n\t\t\tif (splitLine[12].equals(\"NULL\")) {\n\t\t\t\tsplitLine[12] = \"-1.0\";\n\t\t\t}\n\t\t\tif (splitLine[14].equals(\"NULL\")) {\n\t\t\t\tsplitLine[14] = \"-1.0\";\n\t\t\t}\n\t\t\t\n\t\t\ttry {\n\t\t\t\tstat.executeQuery(comd.insert(tableName, \n\t\t\t\t\t \t Integer.parseInt(splitLine[0]), \n\t\t\t\t\t \t Integer.parseInt(splitLine[1]), \n\t\t\t\t\t \t splitLine[2], \n\t\t\t\t\t \t splitLine[3], \n\t\t\t\t\t \t Integer.parseInt(splitLine[4]),\n\t\t\t\t\t \t Integer.parseInt(splitLine[5]),\n\t\t\t\t\t \t Double.parseDouble(splitLine[6]), \n\t\t\t\t\t \t Integer.parseInt(splitLine[7]), \n\t\t\t\t\t \t Double.parseDouble(splitLine[8]), \n\t\t\t\t\t \t Integer.parseInt(splitLine[9]), \n\t\t\t\t\t \t Double.parseDouble(splitLine[10]), \n\t\t\t\t\t \t Integer.parseInt(splitLine[11]), \n\t\t\t\t\t \t Double.parseDouble(splitLine[12]), \n\t\t\t\t\t \t Integer.parseInt(splitLine[13]), \n\t\t\t\t\t \t Double.parseDouble(splitLine[14])));\n\t\t\t}\n\t\t\tcatch(SQLException s) {\n\t\t\t\tSystem.out.println(\"SQL insert statement failed.\");\n\t\t\t\ts.printStackTrace();\n\t\t\t\tSystem.exit(-1);\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"public void dumpTable(File toFile, boolean append, DBSelect<gDBR> dsel, String fldn[])\n throws DBException\n {\n \n /* validate filename */\n if (toFile == null) {\n throw new DBException(\"'To' file not specified\");\n }\n\n /* include header */\n boolean inclHeader = (append && toFile.exists())? false : true;\n\n /* dump to file */\n PrintWriter dumpOutStream = null;\n boolean closeStream = true;\n try {\n\n /* output format */\n String fn = toFile.getName();\n int outputFmt = DUMP_FORMAT_CSV;\n if (fn.endsWith(_DUMP_EXT_CSV)) {\n outputFmt = DUMP_FORMAT_CSV;\n } else \n if (fn.endsWith(_DUMP_EXT_XML)) {\n outputFmt = DUMP_FORMAT_XML;\n } else {\n outputFmt = DUMP_FORMAT_SQL;\n }\n \n /* open output and dump */\n if (fn.startsWith(\"stdout.\")) {\n Print.logDebug(\"Output to STDOUT ...\");\n dumpOutStream = new PrintWriter(System.out, true);\n closeStream = false;\n } else\n if (fn.startsWith(\"stderr.\")) {\n Print.logDebug(\"Output to STDERR ...\");\n dumpOutStream = new PrintWriter(System.err, true);\n closeStream = false;\n } else {\n Print.logDebug(\"Output to File: '%s' ...\", toFile.toString());\n dumpOutStream = new PrintWriter(new FileOutputStream(toFile,append));\n closeStream = true;\n }\n this._dumpTable(dumpOutStream, inclHeader, dsel, fldn, outputFmt);\n \n } catch (IOException ioe) {\n throw new DBException(\"Dumping table\", ioe);\n } finally{\n if (closeStream && (dumpOutStream != null)) { \n try{ dumpOutStream.close(); } catch (Throwable th) {} \n }\n }\n \n }",
"public void getDataFromFile() throws SQLException{\n \n //SQL database\n getGuestDate_DB();\n getHotelRoomData_DB();\n updateRoomChanges_DB();\n \n //this.displayAll();\n //this.displayAllRooms();\n \n }",
"public void exportarapolice(){\n gettableconteudo();\n conexao.Conectar();\n File f = null;\n try {\n conexao.sql = \"SELECT data, nomefile, arquivo FROM arquivo WHERE data = ?\"; \n conexao.ps = conexao.con.prepareStatement(conexao.sql); \n ps.setString(1, id1);\n ResultSet rs = ps.executeQuery(); \n if ( rs.next() ){ \n byte [] bytes = rs.getBytes(\"arquivo\"); \n String nome = rs.getString(\"nomefile\");\n f = new File(\"C:\\\\rubinhosis\\\\exportacoes\\\\\" + nome); \n FileOutputStream fos = new FileOutputStream( f);\n fos.write( bytes ); \n fos.close(); \n }\n rs.close(); \n ps.close(); \n \n \n } catch (SQLException ex) { \n ex.printStackTrace();\n }\n catch (IOException ex) {\n ex.printStackTrace();\n }\n\n}",
"public void writeToCsv()\r\n {\r\n //listeye urunler eklendiginde cagrılacak (Products.csv)\r\n PrintWriter pWrite = null;\r\n try {\r\n pWrite = new PrintWriter(new File(\"Products.csv\"));\r\n }\r\n catch (FileNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n StringBuilder sBuilder = new StringBuilder();\r\n for (Product theProduct : allProducts ) {\r\n if (theProduct.getSize() == null && theProduct.getGender()!= null){\r\n sBuilder.append(theProduct.getName() + \";\" + theProduct.getPrice() + \";\"\r\n + theProduct.getGender() + \";\" + theProduct.getTag() + \";\"\r\n + theProduct.getContent() + \";\" + theProduct.getNumberOfProduct() + \"\\n\");\r\n }\r\n else if(theProduct.getGender() == null && theProduct.getSize() == null){\r\n sBuilder.append( theProduct.getName() + \";\" + theProduct.getPrice() + \";\"\r\n + theProduct.getTag() + \";\"+\r\n theProduct.getContent() + \";\" + theProduct.getNumberOfProduct() + \"\\n\");\r\n }\r\n else {\r\n sBuilder.append( theProduct.getName() + \";\" + theProduct.getPrice() + \";\" + theProduct.getSize() + \";\"\r\n + (theProduct).getGender() + \";\" + theProduct.getTag() + \";\"\r\n + theProduct.getContent() + \";\" + theProduct.getNumberOfProduct() + \"\\n\");\r\n }\r\n\r\n }\r\n pWrite.write(sBuilder.toString());\r\n pWrite.flush();\r\n pWrite.close();\r\n }",
"public void addFile() \n {\n try {\n //JFileChooser jf=new JFileChooser();\n //jf.showOpenDialog(null);\n // String fp=jf.getSelectedFile().getAbsolutePath();\n File file2=new File(\"trial.txt\");\n BufferedReader br=new BufferedReader(new FileReader (file2));\n Object[] tableLines=br.lines().toArray();\n for (Object tableLine : tableLines) {\n String line = tableLine.toString().trim();\n String[] dataRow=line.split(\",\");\n jtModel.addRow(dataRow);\n jtModel.setValueAt(Integer.valueOf(dataRow[2]), jtModel.getRowCount()-1, 2);\n }\n br.close();\n }\n catch(Exception ex) {\n JOptionPane.showMessageDialog(rootPane,\"Nothing was selected\");\n }\n }",
"public void readTable() {\r\n\r\n try ( BufferedReader b = new BufferedReader(new FileReader(\"Hashdata.txt\"))) {\r\n\r\n String line;\r\n ArrayList<String> arr = new ArrayList<>();\r\n while ((line = b.readLine()) != null) {\r\n\r\n arr.add(line);\r\n }\r\n\r\n for (String str : arr) {\r\n this.load(str);\r\n }\r\n this.print();\r\n\r\n } catch (IOException e) {\r\n System.out.println(\"Unable to read file\");\r\n }\r\n\r\n this.userInterface();\r\n\r\n }",
"public void dataFileCreate() {\r\n\t\tString COMMA_DELIMITER = \",\";\r\n\t\tString NEW_LINE_SEPERATOR = \"\\n\";\r\n\t\tString FILE_HEADER = \"Title,First Name,Last Name,Email,Phone Number\";\r\n\t\ttry {\r\n\t\t\tList<Customer> dataList = new ArrayList<Customer>();\r\n\t\t\tdataList.add(\r\n\t\t\t\t\tnew Customer(title, customerFirstName, customerLastName, custromerEmailId, customerPhoneNumber));\r\n\r\n\t\t\tFileWriter fileWriter = new FileWriter(\"CustomerDetails.csv\");\r\n\t\t\tBufferedWriter bufferWriter = new BufferedWriter(fileWriter);\r\n\t\t\tbufferWriter.append(FILE_HEADER);\r\n\r\n\t\t\tfor (Customer c : dataList) {\r\n\t\t\t\tbufferWriter.write(NEW_LINE_SEPERATOR);\r\n\t\t\t\tbufferWriter.write(c.getTitle());\r\n\t\t\t\tbufferWriter.write(COMMA_DELIMITER);\r\n\t\t\t\tbufferWriter.write(c.getFirstName());\r\n\t\t\t\tbufferWriter.write(COMMA_DELIMITER);\r\n\t\t\t\tbufferWriter.write(c.getLastName());\r\n\t\t\t\tbufferWriter.write(COMMA_DELIMITER);\r\n\t\t\t\tbufferWriter.write(c.getEmailAddress());\r\n\t\t\t\tbufferWriter.write(COMMA_DELIMITER);\r\n\t\t\t\tbufferWriter.write(String.valueOf(c.getPhone()));\r\n\t\t\t\tbufferWriter.write(COMMA_DELIMITER);\r\n\t\t\t}\r\n\r\n\t\t\tbufferWriter.close();\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t}\r\n\t}",
"@Override\n\tpublic void exportarData() {\n\t\tDate date=new Date();\n\t\tString nameFile=\"client-\"+date.getTime()+\".xls\";\n\t\tTableToExcel.save(grid,nameFile);\n\t}",
"private void generarListaData() throws FileStructureException {\n CarmasTimbresTemp timbre = null;\n HSSFWorkbook workbook = null;\n HSSFSheet sheet = null;\n Iterator<Row> rowIterator = null;\n Row row = null;\n DataFormatter formatter = new DataFormatter(Locale.getDefault());\n listaData.clear();\n InputStream inputStream = null;\n try {\n if (this.file != null) {\n inputStream = this.file.getInputStream();\n workbook = new HSSFWorkbook(inputStream);\n sheet = workbook.getSheetAt(0);\n rowIterator = sheet.iterator();\n while (rowIterator.hasNext()) {\n row = rowIterator.next();\n if (row.getRowNum() == 0) {\n validarEstructura(row);\n } else if (row != null) {\n if (!isEmptyRow(row)) {\n timbre = new CarmasTimbresTemp();\n timbre.setCajero(formatter.formatCellValue(row.getCell(0)).replaceAll(\"\\\\D+\", \"\"));\n timbre.setProvdiasgteMaq(formatter.formatCellValue(row.getCell(1)).replaceAll(\"\\\\D+\", \"\"));\n timbre.setProvdiasgteLin(formatter.formatCellValue(row.getCell(2)).replaceAll(\"\\\\D+\", \"\"));\n timbre.setDiferencias(formatter.formatCellValue(row.getCell(3)).replaceAll(\"\\\\D+\", \"\"));\n timbre.setObservacion(row.getCell(4) == null ? \"\" : row.getCell(4).toString().toUpperCase().replaceAll(\"\\\\^[a-zA-Z0-9]+$\", \"\"));\n timbre.setOcca(formatter.formatCellValue(row.getCell(5)).replaceAll(\"\\\\D+\", \"\"));\n timbre.setAumento(formatter.formatCellValue(row.getCell(6)).replaceAll(\"\\\\D+\", \"\"));\n timbre.setDisminucion(formatter.formatCellValue(row.getCell(7)).replaceAll(\"\\\\D+\", \"\"));\n timbre.setSobrante(formatter.formatCellValue(row.getCell(8)).replaceAll(\"\\\\D+\", \"\"));\n timbre.setFaltante(formatter.formatCellValue(row.getCell(9)).replaceAll(\"\\\\D+\", \"\"));\n timbre.setNovedad(row.getCell(10) == null ? \"\" : row.getCell(10).toString().toUpperCase().replaceAll(\"\\\\^[a-zA-Z0-9]+$\", \"\"));\n timbre.setAsignadoA(row.getCell(11) == null ? \"\" : row.getCell(11).toString().toUpperCase().replaceAll(\"\\\\^[a-zA-Z0-9]+$\", \"\"));\n timbre.setProveedor(row.getCell(12) == null ? \"\" : row.getCell(12).toString().toUpperCase().replaceAll(\"\\\\^[a-zA-Z0-9]+$\", \"\"));\n timbre.setClasificacion(row.getCell(13) == null ? \"\" : row.getCell(13).toString().toUpperCase().replaceAll(\"\\\\^[a-zA-Z0-9]+$\", \"\"));\n timbre.setTipificacionTransportadora(row.getCell(14) == null ? \"\" : row.getCell(14).toString().toUpperCase().replaceAll(\"\\\\^[a-zA-Z0-9]+$\", \"\"));\n listaData.add(timbre);\n }\n }\n }\n }\n } catch (OfficeXmlFileException ex) {\n abrirModal(\"SARA\", \"Formato Invalido\", ex);\n } catch (IOException ex) {\n abrirModal(\"SARA\", \"Seleccione archivo\", ex);\n } finally {\n if (inputStream != null) {\n try {\n inputStream.close();\n } catch (IOException ex) {\n Logger.getLogger(CargarTimbresMasivosBean.class.getName()).log(Level.SEVERE, null, ex);\n inputStream = null;\n }\n }\n }\n }",
"private void BackupActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_BackupActionPerformed\n try{\n BufferedWriter writer = new BufferedWriter(new FileWriter(\"salvare.sql\"));\n Vector allData = getData(\"\");\n\n for(int row = 0; row < allData.size(); ++row){\n Person data = (Person)allData.elementAt(row);\n\n String sql = \"insert into \" + tableName + \" values ('\" + data.getName() + \"' , '\" +\n data.getCity() + \"' , '\" + data.getPhone() + \"');\";\n writer.write(sql);\n writer.newLine();\n }\n writer.close();\n JOptionPane.showMessageDialog(this, \"Salvare cu succes!\" , \"salvare\", JOptionPane.INFORMATION_MESSAGE);\n }catch(Exception e){\n JOptionPane.showMessageDialog(this, \"O eroare la salvarea fisierului!\" , \"formWindowOpened\", JOptionPane.ERROR_MESSAGE);\n }\n}",
"public void readCompleteTable()\n\t{\n\t\topen();\n\t\tList<Map<Object, String>> tbl = HtmlTable.rowsFrom(table);\n\t\t//System.out.println(tbl);\n\n\t}",
"public void writeFile() {\n\t\ttry {\n\t\t\tFile dir = Environment.getExternalStorageDirectory();\n\t\t\tFile myFile = new File(dir.toString() + File.separator + FILENAME);\n\t\t\tLog.i(\"MyMovies\", \"SeSus write : \" + myFile.toString());\n\t\t\tmyFile.createNewFile();\n\t\t\tFileOutputStream fOut = new FileOutputStream(myFile);\n\t\t\tOutputStreamWriter myOutWriter = \n\t\t\t\t\tnew OutputStreamWriter(fOut);\n\t\t\tfor (Map.Entry<String, ValueElement> me : hm.entrySet()) {\n\t\t\t\tString refs = (me.getValue().cRefMovies>0? \"MOVIE\" : \"\");\n\t\t\t\trefs += (me.getValue().cRefBooks>0? \"BOOK\" : \"\");\n\t\t\t\tString line = me.getKey() + DELIMITER + me.getValue().zweiteZeile \n\t\t\t\t\t\t //+ DELIMITER\n\t\t\t\t\t\t //+ me.getValue().count\n\t\t\t\t\t \t+ DELIMITER\n\t\t\t\t\t \t+ refs\n\t\t\t\t\t \t + System.getProperty(\"line.separator\");\n\t\t\t\t//Log.i(\"MyMovies\", \"SeSus extracted : \" + line);\n\t\t\t\tmyOutWriter.write(line);\n\t\t\t}\n\t\t\tmyOutWriter.close();\n\t\t\tfOut.close();\n\t\t} catch (IOException e) {\n\t\t\t//\n\t\t\tLog.i(\"MyMovies\", \"SeSus write Exception : \");\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void llenadoDeTablas() {\n \n DefaultTableModel modelo1 = new DefaultTableModel();\n modelo1 = new DefaultTableModel();\n modelo1.addColumn(\"ID Usuario\");\n modelo1.addColumn(\"NOMBRE\");\n UsuarioDAO asignaciondao = new UsuarioDAO();\n List<Usuario> asignaciones = asignaciondao.select();\n TablaPerfiles.setModel(modelo1);\n String[] dato = new String[2];\n for (int i = 0; i < asignaciones.size(); i++) {\n dato[0] = (Integer.toString(asignaciones.get(i).getId_usuario()));\n dato[1] = asignaciones.get(i).getNombre_usuario();\n\n modelo1.addRow(dato);\n }\n }",
"private void writeToFile(){\n try(BufferedWriter br = new BufferedWriter(new FileWriter(filename))){\n for(Teme x:getAll())\n br.write(x.toString()+\"\\n\");\n br.close();\n }catch (IOException e){\n e.printStackTrace();\n }\n }",
"public void saveToFile(File file) {\n\t\ttry {\n\t\t\tBufferedWriter out = new BufferedWriter(new FileWriter(file));\n\t\t \t\n\t\t \t// write the column names\n\t\t \twriteStrings(out, colNames);\n\t\t \t\n\t\t \t// write all the data\n\t\t \tfor (int i=0; i<data.size(); i++) {\n\t\t \t\twriteStrings(out, data.get(i));\n\t\t \t}\n\t\t \t\n\t\t \tout.close();\n\t\t }\n\t\t catch (IOException e) {\n\t\t \te.printStackTrace();\n\t\t }\n\t}",
"public void descargarArchivo()throws SQLException, IOException {\n //conexion con el resultset\n st = cn.createStatement();\n\n // consulta de descarga el getId es la variable que utilizo para ubicarme en la base de datos\n ResultSet rs = st.executeQuery(\"select anexo_justi, nombre FROM anexoitem where iditem=\"+rt.getId());\ntry {\n \nrs.next();\n// pone en la variable el nombre del archivo de la base de datos\nnombre= rs.getString(\"nombre\");\n// inserta la ruta completa\nFile file = new File(rt.getPath()+nombre);\n// salida del archivo de flujo\nFileOutputStream output = new FileOutputStream(file);\nBlob archivo = rs.getBlob(1);\nInputStream inStream = archivo.getBinaryStream();\n// almacenamiento del tamaño y descarga byte a byte\nint length= -1;\nint size = (int) archivo.length();\nbyte[] buffer = new byte[size];\nwhile ((length = inStream.read(buffer)) != -1) {\noutput.write(buffer, 0, length);\nJOptionPane.showMessageDialog(null,\"El archivo se descargo correctamente\");\n// output.flush();\n\n}\n// inStream.close();\noutput.close();\n} catch (Exception ioe) {\nthrow new IOException(ioe.getMessage());\n}\n}",
"public AllRecords getAllRecords() {\n\t\treturn fileService.withFile(FILE_NAME, new AllRecords(), file -> {\n\t\t\tvar records = fileService.readFile(file, AllRecords.class);\n\t\t\trecords.easy = sort(records.easy);\n\t\t\trecords.medium = sort(records.medium);\n\t\t\trecords.hard = sort(records.hard);\n\t\t\treturn records;\n\t\t});\n\t}",
"@Override\n public void exportToFile(SpreadsheetTable focusOwner) {\n try {\n File dire = new File(dir);\n File file = new File(dire, filename);\n\n FileWriter writer = new FileWriter(file, false);\n int start = 0;\n if (this.header) {\n start++;\n }\n\n this.selectedCells = focusOwner.getSelectedCells();\n\n for (int i = start; i < selectedCells.length; i++) {\n for (int j = 0; j < selectedCells[i].length; j++) {\n if (j != 0) {\n writer.append(delimiter);\n }\n writer.append(selectedCells[i][j].getContent());\n }\n writer.append('\\r');\n writer.append('\\n');\n }\n writer.flush();\n writer.close();\n } catch (IOException e) {\n System.out.println(\"Error exporting file!\");\n }\n }",
"private void persistTable() {\n\n final EditText edit = findViewById(editId);\n final EditText edit2 = findViewById(editId2);\n String fileName = tableId;\n try {\n FileOutputStream fos = getBaseContext().openFileOutput(fileName, Context.MODE_PRIVATE);\n ObjectOutputStream os = new ObjectOutputStream(fos);\n os.writeObject(table);\n os.close();\n fos.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n edit.setText(table.getSerializedProducts());\n if (lastProductAdded != null)\n edit2.setText(lastProductAdded.getName());\n else\n edit2.setText(\"\");\n\n productNames = table.getProductNames();\n currentlySelectedProduct=0;\n\n refreshPrice();\n\n if (table.map.size() == 0) {\n deleteFile(tableId);\n return;\n }\n }",
"public void initDatabase(HashMap<String, Object> diccionario){\n // Primero comprobamos que el fichero no existe, si existe perfecto ya que simplemente vamos metiendo datos\n File file = new File(fichero_database);\n FileWriter writer = null;\n if(!file.exists()){\n try{\n writer = new FileWriter(file);\n //crea un buffer o flujo intermedio antes de escribir directamente en el archivo\n BufferedWriter bfwriter = new BufferedWriter(writer);\n Iterator it = diccionario.entrySet().iterator();\n while (it.hasNext()) {\n HashMap.Entry pair = (HashMap.Entry)it.next();\n bfwriter.write(pair.getKey() + \",\" );\n it.remove(); // para evitar ConcurrentModificationException\n }\n bfwriter.write(\"\\n\" );\n bfwriter.close();\n }\n catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (writer != null) {\n try {//cierra el flujo principal\n writer.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n }\n\n }",
"private void readData () throws SQLException {\n int currentFetchSize = getFetchSize();\n setFetchSize(0);\n close();\n setFetchSize(currentFetchSize);\n moveToInsertRow();\n\n CSVRecord record;\n\n for (int i = 1; i <= getFetchSize(); i++) {\n lineNumber++;\n try {\n\n if (this.records.iterator().hasNext()) {\n record = this.records.iterator().next();\n\n for (int j = 0; j <= this.columnsTypes.length - 1; j++) {\n\n switch (this.columnsTypes[j]) {\n case \"VARCHAR\":\n case \"CHAR\":\n case \"LONGVARCHAR\":\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateString(j + 1, record.get(j));\n break;\n case \"INTEGER\":\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateInt(j + 1, Integer.parseInt(record.get(j)));\n break;\n case \"TINYINT\":\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateByte(j + 1, Byte.parseByte(record.get(j)));\n break;\n case \"SMALLINT\":\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateShort(j + 1, Short.parseShort(record.get(j)));\n break;\n case \"BIGINT\":\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateLong(j + 1, Long.parseLong(record.get(j)));\n break;\n case \"NUMERIC\":\n case \"DECIMAL\":\n /*\n * \"0\" [0,0]\n * \"0.00\" [0,2]\n * \"123\" [123,0]\n * \"-123\" [-123,0]\n * \"1.23E3\" [123,-1]\n * \"1.23E+3\" [123,-1]\n * \"12.3E+7\" [123,-6]\n * \"12.0\" [120,1]\n * \"12.3\" [123,1]\n * \"0.00123\" [123,5]\n * \"-1.23E-12\" [-123,14]\n * \"1234.5E-4\" [12345,5]\n * \"0E+7\" [0,-7]\n * \"-0\" [0,0]\n */\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateBigDecimal(j + 1, new BigDecimal(record.get(j)));\n break;\n case \"DOUBLE\":\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateDouble(j + 1, Double.parseDouble(record.get(j)));\n break;\n case \"FLOAT\":\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateFloat(j + 1, Float.parseFloat(record.get(j)));\n break;\n case \"DATE\":\n // yyyy-[m]m-[d]d\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateDate(j + 1, Date.valueOf(record.get(j)));\n break;\n case \"TIMESTAMP\":\n // yyyy-[m]m-[d]d hh:mm:ss[.f...]\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateTimestamp(j + 1, Timestamp.valueOf(record.get(j)));\n break;\n case \"TIME\":\n // hh:mm:ss\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateTime(j + 1, Time.valueOf(record.get(j)));\n break;\n case \"BOOLEAN\":\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateBoolean(j + 1, convertToBoolean(record.get(j)));\n break;\n default:\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateString(j + 1, record.get(j));\n break;\n }\n }\n\n insertRow();\n incrementRowCount();\n }\n } catch (Exception e) {\n LOG.error(\"An error has occurred reading line number {} of the CSV file\", lineNumber, e);\n throw e;\n }\n }\n\n moveToCurrentRow();\n beforeFirst(); \n }",
"public void descargarArchivoVeri()throws SQLException, IOException {\n //conexion con el resultset\n st = cn.createStatement();\n\n // consulta de descarga el getId es la variable que utilizo para ubicarme en la base de datos\n ResultSet rs = st.executeQuery(\"select anexo_veri, nombre FROM anexoverificacion where idverificacion=\"+rt.getId());\ntry {\n \nrs.next();\n// pone en la variable el nombre del archivo de la base de datos\nnombre= rs.getString(\"nombre\");\n// inserta la ruta completa\nFile file = new File(rt.getPath()+nombre);\n// salida del archivo de flujo\nFileOutputStream output = new FileOutputStream(file);\nBlob archivo = rs.getBlob(1);\nInputStream inStream = archivo.getBinaryStream();\n// almacenamiento del tamaño y descarga byte a byte\nint length= -1;\nint size = (int) archivo.length();\nbyte[] buffer = new byte[size];\nwhile ((length = inStream.read(buffer)) != -1) {\noutput.write(buffer, 0, length);\nJOptionPane.showMessageDialog(null,\"El archivo se descargo correctamente\");\n// output.flush();\n\n}\n// inStream.close();\noutput.close();\n} catch (Exception ioe) {\nthrow new IOException(ioe.getMessage());\n}\n}",
"private static void fillTableFromFile(HashTable table) {\n Scanner in;\n try {\n in = new Scanner(new FileInputStream(\"File.txt\"));\n } catch (FileNotFoundException e) {\n System.out.println(\"File 'File.txt' not found\");\n return;\n }\n while (in.hasNext()) {\n table.add(in.next());\n }\n }",
"@Override\n public void importCSV(File file) {\n System.out.println(\"oi\");\n System.out.println(file.isFile()+\" \"+file.getAbsolutePath());\n if(file.isFile() && file.getPath().toLowerCase().contains(\".csv\")){\n System.out.println(\"Entro\");\n try {\n final Reader reader = new FileReader(file);\n final BufferedReader bufferReader = new BufferedReader(reader);\n String[] cabecalho = bufferReader.readLine().split(\",\");\n int tipo;\n if(cabecalho.length == 3){\n if(cabecalho[2].equalsIgnoreCase(\"SIGLA\")){\n tipo = 1;\n System.out.println(\"TIPO PAIS\");\n }\n else {\n tipo = 2;\n System.out.println(\"TIPO CIDADE\");\n }\n }else {\n tipo = 3;\n System.out.println(\"TIPO ESTADO\");\n }\n \n while(true){\n String linha = bufferReader.readLine();\n if(linha == null){\n break;\n }\n String[] row = linha.split(\",\");\n switch (tipo) {\n case 1:\n Pais pais = new Pais();\n pais.setId(Long.parseLong(row[0]));\n pais.setNome(row[1]);\n pais.setSigla(row[2]);\n new PaisDaoImpl().insert(pais);\n break;\n case 2:\n Cidade cidade = new Cidade();\n cidade.setId(Long.parseLong(row[0]));\n cidade.setNome(row[1]);\n cidade.setEstado(Long.parseLong(row[2]));\n new CidadeDaoImpl().insert(cidade);\n break;\n default:\n Estado estado = new Estado();\n estado.setId(Long.parseLong(row[0]));\n estado.setNome(row[1]);\n estado.setUf(row[2]);\n estado.setPais(Long.parseLong(row[3]));\n new EstadoDaoImpl().insert(estado);\n break;\n }\n }\n \n } catch (FileNotFoundException ex) {\n Logger.getLogger(SQLUtilsImpl.class.getName()).log(Level.SEVERE, null, ex);\n } catch (IOException ex) {\n Logger.getLogger(SQLUtilsImpl.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }",
"private void export(final TableFacade tableFacade) {\r\n\t\t tableFacade.setColumnProperties(\"id.invPexProductosExistencia.invArtArticulo.artCodigo\",\r\n\t\t\t\t\"id.invPexProductosExistencia.invArtArticulo.artNombre\",\r\n\t\t\t\t\"eboCantidadProducto\",\"eboSaldo\");\r\n\t\tTable table = tableFacade.getTable();\r\n\t\t\r\n\t\t//---- Titulo de la tabla\r\n\t\ttable.setCaptionKey(\"tbl.abo.caption\");\r\n\t\t\r\n\t\tRow row = table.getRow();\r\n\t\tColumn nombreColumna = row.getColumn(\"id.invPexProductosExistencia.invArtArticulo.artCodigo\");\r\n\t\tnombreColumna.setTitleKey(\"tbl.abo.id.invArtArticulo.artCodigo.x\");\r\n\r\n\t\tnombreColumna = row.getColumn(\"id.invPexProductosExistencia.invArtArticulo.artNombre\");\r\n\t\tnombreColumna.setTitleKey(\"tbl.abo.id.invArtArticulo.artNombre.x\");\r\n\t\t\r\n\t\tnombreColumna = row.getColumn(\"eboCantidadProducto\");\r\n\t\tnombreColumna.setTitleKey(\"tbl.abo.eboCantidadProducto\");\r\n\t\t\r\n\t\tnombreColumna = row.getColumn(\"eboSaldo\");\r\n\t\tnombreColumna.setTitleKey(\"tbl.abo.eboSaldo\");\r\n\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\r\n\t\t\tpublic Object getValue(Object item, String property, int rowcount) {\r\n\t\t\t\tObject value = new BasicCellEditor().getValue(item, property,\r\n\t\t\t\t\t\trowcount);\r\n\t\t\t\tInvEboExistenciaBodega existenciaBodega = (InvEboExistenciaBodega) item;\r\n\t\t\t\t\r\n\t\t\t\tvalue = Format.formatDinero(existenciaBodega.getEboSaldo());\r\n\t\t\t\treturn value;\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\ttableFacade.render();\r\n\t}",
"public void parseData(ResultSet rs) throws SQLException{\n\n\t\t\n\t\tResultSetMetaData metaDatos = rs.getMetaData();\n\t\t\n\t\t// Se obtiene el número de columnas.\n\t\tint numeroColumnas = metaDatos.getColumnCount();\n\n\t\t/*// Se crea un array de etiquetas para rellenar\n\t\tObject[] etiquetas = new Object[numeroColumnas];\n\n\t\t// Se obtiene cada una de las etiquetas para cada columna\n\t\tfor (int i = 0; i < numeroColumnas; i++)\n\t\t{\n\t\t // Nuevamente, para ResultSetMetaData la primera columna es la 1.\n\t\t etiquetas[i] = metaDatos.getColumnLabel(i + 1);\n\t\t}\n\t\tmodelo.setColumnIdentifiers(etiquetas);*/\n\t\t\t\t\n\t\ttry {\n\t\t\tthis.doc = SqlXml.toDocument(rs);\t\n\t\t\t//SqlXml.toFile(doc);\n\t\t\t\n\t\t\tmetaDatos = rs.getMetaData();\n\t\n\t\t\t\n\t\t\twhile (rs.next())\n\t\t\t{\n\t\t\t // Se crea un array que será una de las filas de la tabla.\n\t\t\t Object [] fila = new Object[numeroColumnas]; // Hay tres columnas en la tabla\n\n\t\t\t // Se rellena cada posición del array con una de las columnas de la tabla en base de datos.\n\t\t\t for (int i=0;i<numeroColumnas;i++){\n\t\t\t fila[i] = rs.getObject(i+1); // El primer indice en rs es el 1, no el cero, por eso se suma 1.\n\t\t\t \n\t\t\t if(i==2){\n\t\t\t \t \n\t\t\t \t NumberFormat formatter = new DecimalFormat(\"#0.0000\"); \n\t\t\t \t fila[i] = formatter.format(fila[i]);\n\t\t\t \t \n\t\t\t }\n\t\t\t \n\t\t\t modelo.isCellEditable(rs.getRow(), i+1);\n\t\t\t \n\t\t\t }\n\t\t\t // Se añade al modelo la fila completa.\n\t\t\t modelo.addRow(fila);\n\t\t\t}\n\t\t\t\n\t\t\ttabla.setModel(modelo);\n\n\t\t\t\n\t\t} catch (ParserConfigurationException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\t\t\n\t}",
"public void writeToCSV(String path) throws IOException, SQLException {\n\t\tWriter out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(path), \"UTF-8\"));\n\t\t// Title\n\t\tout.write(\"pageId;title;earliest year;latest year;mean year;\");\n\t\t// IBM\n\t\tout.write(\n\t\t\t\t\"Anger;Disgust;Fear;Joy;Sadness;Analytical;Confident;Tentative;Openness;Conscientiousness;Extraversion;Agreeableness;Emotional Range;\");\n\t\t// LIWC\n\t\tout.write(\n\t\t\t\t\"LIWC;Word Count;Analytical thinking;Clout;Authentic;Emotional tone;Dictionary Words;Positive Emotion;Negative Emotion;Anxiety;Anger;Sadness;Tentative;Certainty;Power;Risk;Death;\");\n\t\tout.write(\"AlchemyTone;mixed;score;type;\");\n\t\tout.write(\"\\n\");\n\t\tfor (Page page : this.getExtractsFromDatabase()) {\n\t\t\tint pageId = page.getPageId();\n\t\t\tString title = page.getTitle();\n\t\t\tToneAnalysis ibmTone = page.getIbmTone();\n\t\t\tReceptivitiAnalysis liwcTone = page.getLiwcTone();\n\t\t\tDocumentSentiment docSentiment = page.getDocumentSentiment();\n\t\t\tint earliestYear = page.getEarliestYear();\n\t\t\tint latestYear = page.getLatestYear();\n\t\t\tint meanYear = 0;\n\t\t\tif (earliestYear == 0) {\n\t\t\t\tmeanYear = latestYear;\n\t\t\t} else {\n\t\t\t\tmeanYear = (earliestYear + latestYear) / 2;\n\t\t\t}\n\t\t\tif (ibmTone != null) {\n\t\t\t\tout.write(pageId + \";\" + title + \";\" + earliestYear + \";\" + latestYear + \";\" + meanYear + \";\");\n\t\t\t\tElementTone documentTone = ibmTone.getDocumentTone();\n\t\t\t\tList<ToneCategory> toneCategories = documentTone.getTones();\n\t\t\t\tfor (ToneCategory toneCategory : toneCategories) {\n\t\t\t\t\tList<ToneScore> toneScores = toneCategory.getTones();\n\t\t\t\t\tfor (ToneScore toneScore : toneScores) {\n\t\t\t\t\t\t// String name = toneScore.getName();\n\t\t\t\t\t\tdouble score = toneScore.getScore();\n\t\t\t\t\t\tout.write(String.valueOf(score).replace('.', ','));\n\t\t\t\t\t\tout.write(\";\");\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tout.write(\";\");\n\n\t\t\t\tif (liwcTone != null) {\n\t\t\t\t\tDouble wordCount = liwcTone.getLiwcScores().getWc();\n\t\t\t\t\tDouble analyticalThinking = liwcTone.getLiwcScores().getAnalytic();\n\t\t\t\t\tDouble clout = liwcTone.getLiwcScores().getClout();\n\t\t\t\t\tDouble authentic = liwcTone.getLiwcScores().getAuthentic();\n\t\t\t\t\tDouble emotionalTone = liwcTone.getLiwcScores().getTone();\n\t\t\t\t\tDouble dictionaryWords = liwcTone.getLiwcScores().getDic();\n\n\t\t\t\t\tDouble posEmo = liwcTone.getLiwcScores().getCategories().getPosemo();\n\t\t\t\t\tDouble negEmo = liwcTone.getLiwcScores().getCategories().getNegemo();\n\t\t\t\t\tDouble anxiety = liwcTone.getLiwcScores().getCategories().getAnx();\n\t\t\t\t\tDouble anger = liwcTone.getLiwcScores().getCategories().getAnger();\n\t\t\t\t\tDouble sadness = liwcTone.getLiwcScores().getCategories().getSad();\n\t\t\t\t\tDouble tentative = liwcTone.getLiwcScores().getCategories().getTentat();\n\t\t\t\t\tDouble certainty = liwcTone.getLiwcScores().getCategories().getCertain();\n\t\t\t\t\tDouble power = liwcTone.getLiwcScores().getCategories().getPower();\n\t\t\t\t\tDouble risk = liwcTone.getLiwcScores().getCategories().getRisk();\n\t\t\t\t\tDouble death = liwcTone.getLiwcScores().getCategories().getDeath();\n\n\t\t\t\t\tout.write(wordCount + \";\");\n\t\t\t\t\tout.write(String.valueOf(analyticalThinking).replace('.', ',') + \";\");\n\t\t\t\t\tout.write(String.valueOf(clout).replace('.', ',') + \";\");\n\t\t\t\t\tout.write(String.valueOf(authentic).replace('.', ',') + \";\");\n\t\t\t\t\tout.write(String.valueOf(emotionalTone).replace('.', ',') + \";\");\n\t\t\t\t\tout.write(String.valueOf(dictionaryWords).replace('.', ',') + \";\");\n\t\t\t\t\tout.write(String.valueOf(posEmo).replace('.', ',') + \";\");\n\t\t\t\t\tout.write(String.valueOf(negEmo).replace('.', ',') + \";\");\n\t\t\t\t\tout.write(String.valueOf(anxiety).replace('.', ',') + \";\");\n\t\t\t\t\tout.write(String.valueOf(anger).replace('.', ',') + \";\");\n\t\t\t\t\tout.write(String.valueOf(sadness).replace('.', ',') + \";\");\n\t\t\t\t\tout.write(String.valueOf(tentative).replace('.', ',') + \";\");\n\t\t\t\t\tout.write(String.valueOf(certainty).replace('.', ',') + \";\");\n\t\t\t\t\tout.write(String.valueOf(power).replace('.', ',') + \";\");\n\t\t\t\t\tout.write(String.valueOf(risk).replace('.', ',') + \";\");\n\t\t\t\t\tout.write(String.valueOf(death).replace('.', ',') + \";\");\n\t\t\t\t}\n\t\t\t\tout.write(\";\");\n\t\t\t\tif (docSentiment != null) {\n\t\t\t\t\tString mixed = docSentiment.getSentiment().getMixed();\n\t\t\t\t\tDouble score = docSentiment.getSentiment().getScore();\n\t\t\t\t\tString type = docSentiment.getSentiment().getType().toString();\n\t\t\t\t\tout.write(String.valueOf(mixed).replace('.', ',') + \";\");\n\t\t\t\t\tout.write(String.valueOf(score).replace('.', ',') + \";\");\n\t\t\t\t\tout.write(String.valueOf(type).replace('.', ',') + \";\");\n\t\t\t\t}\n\t\t\t\tout.write(\"\\n\");\n\t\t\t}\n\t\t}\n\t\tout.close();\n\t\tSystem.out.println(\"Export finished.\");\n\n\t}",
"public static void main(String[] args) throws IOException {\n\t\tint id_telefone = 4;\n\t\t\n\t\tFileInputStream fis = new FileInputStream(SAMPLE_CSV_FILE_PATH);\n\t\tInputStreamReader isr = new InputStreamReader(fis, \"UTF-8\");\n\t\t\n\t\t@SuppressWarnings(\"deprecation\")\n\t\tCSVReader reader = new CSVReader(isr, ';' , '\"' , 0);\n \tString[] nextLine;\n \t\n// \tWriter writer = Files.newBufferedWriter(Paths.get(\"saida.csv\"));\n// \tCSVWriter csvWriter = new CSVWriter(writer,\n// CSVWriter.DEFAULT_SEPARATOR,\n// CSVWriter.NO_QUOTE_CHARACTER,\n// CSVWriter.DEFAULT_ESCAPE_CHARACTER,\n// CSVWriter.DEFAULT_LINE_END);\n \t\n \tFile file = new File(\"Clientes.sql\");\n \n BufferedWriter fr = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file),\"UTF-8\"));\n \t\n \twhile ((nextLine = reader.readNext()) != null) {\n \t\t\n if (nextLine != null) {\n \t\n// \tSystem.out.println(nextLine.length);\n \t\n \tString id = nextLine[0];\n \tif(!id.isEmpty()) {\n \t\n \t\tid = id.substring(5);\n \t\tid = id.replace(\".\", \"\");\n \t\t\n \t\tboolean temCEP = false;\n \t\t\n \t\tif(nextLine.length > 12) temCEP = true;\n \t\t\n \t\tString CEP = \"\";\n \t\tif(temCEP) {\n \t\t CEP = nextLine[12];\n CEP = CEP.replace(\".\", \"\");\n CEP = CEP.replaceAll(\"-\",\"\");\n CEP = CEP.replaceAll(\" \",\"\");\n \t\t};\n \n \t\n \n \tfr.write(\"INSERT INTO hmprojetos.cliente values (\" \n + id \n + \",'\" + nextLine[1]\n \t\t+ \"','\" + nextLine[2]\n \t\t\t\t+ \"','\" + nextLine[3]\n \t\t\t\t\t\t+ \"','\" + nextLine[4]\n \t\t\t\t\t\t\t\t+ \"','\" + nextLine[5]\n \t\t\t\t\t\t\t\t\t\t+ \"','\" + CEP\n \t\t\t\t\t\t\t\t\t\t\t\t+ \"','\" + nextLine[10]\n \t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \"','\" + nextLine[11]\n \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \"','\" + nextLine[6]\n + \"');\\n\");\n \t\n \t//Criação dos INSERTS dos telefones\n \tif(!nextLine[7].isEmpty()) {\n \tfr.write(\"INSERT INTO hmprojetos.telefone values (\"\n \t\t\t+ id_telefone\n \t\t\t+ \",'','\" + nextLine[7]\n \t\t\t+ \"',\"\n \t\t\t+ id \n \t\t\t+ \");\\n\"\n \t\t\t);\n \t\tid_telefone++;\n \t}\n \tif(!nextLine[8].isEmpty()) {\n \tfr.write(\"INSERT INTO hmprojetos.telefone values (\"\n \t\t\t+ id_telefone\n \t\t\t+ \",'','\" + nextLine[8]\n \t\t\t+ \"',\"\n \t\t\t+ id \n \t\t\t+ \");\\n\"\n \t\t\t);\n \t\tid_telefone++;\n \t}\n \tif(!nextLine[9].isEmpty()) {\n \tfr.write(\"INSERT INTO hmprojetos.telefone values (\"\n \t\t\t+ id_telefone\n \t\t\t+ \",'','\" + nextLine[9]\n \t\t\t+ \"',\"\n \t\t\t+ id \n \t\t\t+ \");\\n\"\n \t\t\t);\n \t\tid_telefone++;\n \t}\n \t\n \t}\n }\n \t}\n \t\n \tfr.close();\n \tSystem.out.println(\"Done\");\n\t}",
"private void exportarDatos() {\r\n // Cabecera\r\n System.out.println(\"Exportación de Datos\");\r\n System.out.println(\"====================\");\r\n\r\n // Acceso al Fichero\r\n try (PrintWriter pr = new PrintWriter(DEF_NOMBRE_FICHERO)) {\r\n // Bucle de Escritura\r\n for (Item item : CARRITO) {\r\n // Generar Linea de Texto\r\n String linea = String.format(Locale.ENGLISH, \"%d%s%s%s%.2f%s%s\",\r\n item.getId(), REG_CSV_ESCR,\r\n item.getNombre(), REG_CSV_ESCR,\r\n item.getPrecio(), REG_CSV_ESCR,\r\n UtilesGraficos.obtenerNombreColor(item.getColor()));\r\n\r\n // Item > Fichero\r\n pr.println(linea);\r\n }\r\n\r\n // Mensaje Informativo\r\n UtilesEntrada.hacerPausa(\"Datos exportados correctamente\");\r\n } catch (NumberFormatException | NullPointerException e) {\r\n // Mensaje Informativo\r\n UtilesEntrada.hacerPausa(\"ERROR: Formato de datos incorrecto\");\r\n\r\n // Vaciado Carrito\r\n CARRITO.clear();\r\n } catch (IOException e) {\r\n // Mensaje Informativo\r\n UtilesEntrada.hacerPausa(\"ERROR: Acceso al fichero\");\r\n }\r\n }",
"public IndexFrame() {\n initComponents();\n \n /*\n * Definition d'un nouveau modele pour la jTable\n */\n \n \n jTable1.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n \n },\n new String [] {\n \"Lemme \", \"Document n° \", \" TF \",\n }){\n boolean[] canEdit = new boolean [] {\n false, false\n };\n \n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n \n DefaultTableModel model = (DefaultTableModel) jTable1.getModel();\n \n \n try{\n FileInputStream fis=new FileInputStream(\"C:/ressources/indexOptim.ser\");\n ObjectInputStream ois= new ObjectInputStream(fis);\n \n HashMap temp=new HashMap();\n \n HashMap h=new HashMap();\n h=(HashMap)ois.readObject();\n for (Object k : h.keySet())\n {\n temp=(HashMap)h.get(k);\n for (Object k2 : temp.keySet())\n {\n model.insertRow(0, new Object [] {(String) k,(Integer )k2,(Integer)temp.get(k2) });\n }\n }\n \n \n }\n catch(Exception e )\n {e.printStackTrace();\n }\n \n }",
"public File getOutputDb();",
"public void exportToCSV();",
"String storeTable(String name) {\n PrintWriter writer = null;\n Table t = tables.get(name);\n\n try {\n\n /** Boolean decides if to overwrite the file if false, or continue if true */\n FileWriter fw = new FileWriter(name + \".tbl\", false);\n writer = new PrintWriter(fw);\n\n writer.println(t.getColString());\n\n int i = 1;\n for (; i < t.rowSize(); i += 1) {\n writer.println(t.getRowString(i));\n }\n\n writer.print(t.getRowString(i));\n writer.close();\n return \"\";\n\n } catch (IOException e) {\n return \"ERROR: Invalid Table\";\n } catch (NullPointerException e) {\n return \"ERROR: Invalid Table\";\n }\n\n\n }",
"public void preenchercomlike(){\n \n \n javax.swing.table.DefaultTableModel dtm4 = (javax.swing.table.DefaultTableModel)jtablearquivos.getModel(); \n dtm4.setNumRows(0); \n \n int k=0;\n try{\n conexao.Conectar();\n conexao.sql = \"SELECT data,nomefile FROM arquivo WHERE nomefile LIKE ? \";\n conexao.ps = conexao.con.prepareStatement(conexao.sql); \n ps.setString(1,\"%\"+jTextField2.getText()+\"%\");\n conexao.rs = conexao.ps.executeQuery();\n \n \n \n while(conexao.rs.next())\n {\n \n dtm4.addRow(new Object[]{\" \",\" \",\" \"}); \n jtablearquivos.setValueAt(conexao.rs.getString(1),k,0); \n jtablearquivos.setValueAt(conexao.rs.getString(2),k,1); \n k++;\n }\n \n \n }catch(SQLException ex){\n JOptionPane.showMessageDialog(rootPane, ex.getMessage(), \"Erro ao popular tabelas!\", JOptionPane.ERROR_MESSAGE);\n }\n \n }",
"protected void reloadAndReformatTableData()\n {\n logTable.loadAndFormatData();\n }",
"private void outputfile() {\n\n ConnectDB dbconnect = new ConnectDB();\n\n try {\n PrintWriter writer = new PrintWriter(\"memberoutput.txt\");\n\n try {\n dbconnect.pst = dbconnect.con.prepareStatement(\"select * from members\");\n dbconnect.rs = dbconnect.pst.executeQuery();\n\n while (dbconnect.rs.next()) {\n writer.println(dbconnect.rs.getString(1) + \",\"\n + dbconnect.rs.getString(2) + \",\"\n + dbconnect.rs.getString(3) + \",\"\n + dbconnect.rs.getString(4) + \",\"\n + dbconnect.rs.getString(5) + \",\"\n + dbconnect.rs.getString(6) + \",\"\n + dbconnect.rs.getString(7) + \",\"\n + dbconnect.rs.getString(8) + \",\"\n + dbconnect.rs.getString(9));\n }\n\n writer.flush();\n } catch (SQLException e) {\n // TODO Auto-generated catch block\n }\n writer.close();\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n\n JOptionPane.showMessageDialog(null, \"File exported\");\n }",
"@Override\r\n\tpublic void serialize() throws Exception {\n\t\tFile dtRowFile = new File(twcnbOutputDir, Constant.TWCNB_META_FILE);\r\n\t\tFileWriter fw = new FileWriter(dtRowFile);\r\n\t\tBufferedWriter bw = new BufferedWriter(fw);\r\n\r\n\t\tbw.write(String.valueOf(this.documentCnt));\r\n\t\tbw.newLine();\r\n\t\tbw.write(String.valueOf(this.labelCnt));\r\n\t\tbw.newLine();\r\n\t\tbw.write(String.valueOf(this.featureCnt));\r\n\t\tbw.newLine();\r\n\r\n\t\tbw.flush();\r\n\t\tbw.close();\r\n\t\tfw.close();\r\n\t}",
"public void importTable(BufferedReader br) {\r\n\t\tString line;\r\n\t\tTable table = null;\r\n\t\ttry {\r\n\t\t\tString tableName = br.readLine();\r\n\t\t\ttable = new Table(tableName);\r\n\t\t\tint[] types = convertTypes(br.readLine().split(\",\"));\r\n\t\t\tString[] names = br.readLine().split(\",\");\r\n\t\t\tassert (types.length == names.length);\r\n\t\t\tfor (int i = 0 ; i < types.length - 1; i++) {\r\n\t\t\t\ttable.newAttribute(names[i], types[i]);\r\n\t\t\t}\r\n\t\t\twhile ((line = br.readLine()) != null) {\r\n\t\t\t\tString[] entries = line.split(\",\");\r\n\t\t\t\tString[] entriesMinusLastModified = new String[entries.length - 1];\r\n\t\t\t\tfor (int i = 0; i < entriesMinusLastModified.length; i++) {\r\n\t\t\t\t\tentriesMinusLastModified[i] = entries[i];\r\n\t\t\t\t\tif (!table.getAttributes(i + 1).checkType(\r\n\t\t\t\t\t\t\tentriesMinusLastModified[i])) {\r\n\t\t\t\t\t\tentriesMinusLastModified[i] = \"--\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\ttable.newEntry(entriesMinusLastModified);\r\n\t\t\t\ttable.getAttributes(table.getAttributeNumber() - 1).\r\n\t\t\t\tchangeField(table.getLines() - 1, entries[entries.length - 1]);\r\n\t\t\t}\r\n\t\t\tbr.close();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\ttable.delete();\r\n\t\t}\r\n\t}",
"public void devolverArchivo(ArrayList<Alumno> lista) // Crea archivo de texto con la lista de datos ya ordenada\n {\n try\n {\n PrintWriter print = new PrintWriter(\"Registros Ordenados.txt\");\n for(int k=0; k<100; k++)\n {\n print.println(F0.get(k).getNombre() + \", \" + F0.get(k).getApellido() + \", \" + F0.get(k).getNoCnt());\n }\n print.close();\n }\n catch(Exception ex)\n {\n System.out.println(ex.getMessage());\n }\n }",
"private static String writeRows(List<StudentRecord> records) {\n\t\tint maxJMBAG = getMax(records, FieldValueGetters.JMBAG);\n\t\tint maxLast = getMax(records, FieldValueGetters.LAST_NAME);\n\t\tint maxFirst = getMax(records, FieldValueGetters.FIRST_NAME);\n\t\tStringBuilder sb = new StringBuilder();\n\n\t\tfor (StudentRecord record : records) {\n\t\t\tsb.append(\"| \");\n\t\t\tsb.append(record.getJmbag() + \" | \");\n\t\t\tfor (int i = 0; i < maxJMBAG - record.getJmbag().length(); i++) {\n\t\t\t\tsb.append(\" \");\n\t\t\t}\n\t\t\tsb.append(record.getLastName());\n\t\t\tfor (int i = 0; i < maxLast - record.getLastName().length(); i++) {\n\t\t\t\tsb.append(\" \");\n\t\t\t}\n\t\t\tsb.append(\" | \");\n\t\t\tsb.append(record.getFirstName());\n\t\t\tfor (int i = 0; i < maxFirst - record.getFirstName().length(); i++) {\n\t\t\t\tsb.append(\" \");\n\t\t\t}\n\t\t\tsb.append(\" | \" + record.getFinalGrade() + \" |\\n\");\n\t\t}\n\t\treturn sb.toString();\n\t}",
"private void export4(final TableFacade tableFacade,final HttpServletRequest request) {\n\t\tif (WICH_ONE.equals(\"E\")) {\n\t\t\ttableFacade.setColumnProperties(\"ascCodigo\", \"ascNacionalidad\",\n\t\t\t\t\t\"ascJefeInmediato\");\n\t\t}\n\t\tif (WICH_ONE.equals(\"F\")) {\n\t\t\ttableFacade.setColumnProperties(\"ascCodigo\", \"ascNacionalidad\",\n\t\t\t\t\t\"ascJefeInmediato\", \"ascSalario\");\n\t\t}\n\t\tif (WICH_ONE.equals(\"G\")) {\n\t\t\ttableFacade.setColumnProperties(\"ascCodigo\", \"ascNacionalidad\",\n\t\t\t\t\t\"ascJefeInmediato\", \"ascSalario\");\n\t\t}\n\n\t\tTable table = tableFacade.getTable();\n\t\t// ---- Titulo de la tabla\n\t\ttable.setCaptionKey(\"tbl.planilla.caption\");\n\n\t\tRow row = table.getRow();\n\t\tColumn nombreColumna = row.getColumn(\"ascCodigo\");\n\t\tnombreColumna.setTitleKey(\"tbl.planilla.ascCodigo.x\");\n\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\tpublic Object getValue(Object item, String property, int rowcount) {\n\t\t\t\tObject value = new BasicCellEditor().getValue(item, property,\n\t\t\t\t\t\trowcount);\n\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\tString codigo = \"'\" + asociado.getAscCodigo();\n\t\t\t\treturn codigo;\n\t\t\t}\n\n\t\t});\n\n\t\tif (WICH_ONE.equals(\"E\")) {\n\t\t\tnombreColumna = row.getColumn(\"ascNacionalidad\");\n\t\t\tnombreColumna.setTitleKey(\"tbl.planilla.ahoYApor\");\n\t\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\t\tpublic Object getValue(Object item, String property,\n\t\t\t\t\t\tint rowcount) {\n\t\t\t\t\tObject value = new BasicCellEditor().getValue(item,\n\t\t\t\t\t\t\tproperty, rowcount);\n\t\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\t\tdouble descAportaciones = 0.0;\n\t\t\t\t\tdescAportaciones += obtenerDescuentos(asociado, \"B\", \"A\",\n\t\t\t\t\t\t\tdescAportaciones,request);\n\n\t\t\t\t\tdouble descAhorros = 0.0;\n\t\t\t\t\tdescAhorros += obtenerDescuentos(asociado, \"B\", \"B\",\n\t\t\t\t\t\t\tdescAhorros,request);\n\n\t\t\t\t\treturn descAportaciones + descAhorros;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tnombreColumna = row.getColumn(\"ascJefeInmediato\");\n\t\t\tnombreColumna.setTitleKey(\"tbl.planilla.presYSeg\");\n\t\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\t\tpublic Object getValue(Object item, String property,\n\t\t\t\t\t\tint rowcount) {\n\t\t\t\t\tObject value = new BasicCellEditor().getValue(item,\n\t\t\t\t\t\t\tproperty, rowcount);\n\t\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\t\tCtaCasCuentaAsociadoDAO casDAO = new CtaCasCuentaAsociadoDAO(getSessionHibernate(request));\n\n\t\t\t\t\tdouble descPrestamos = 0.0;\n\t\t\t\t\tdescPrestamos += obtenerDescuentos(asociado, \"C\", \"\",\n\t\t\t\t\t\t\tdescPrestamos,request);\n\n\t\t\t\t\tdouble descSeguros = 0.0;\n\t\t\t\t\tdescSeguros += obtenerDescuentos(asociado, \"D\", \"\",\n\t\t\t\t\t\t\tdescSeguros,request);\n\t\t\t\t\treturn descPrestamos + descSeguros;\n\t\t\t\t}\n\t\t\t});\n\n\t\t}\n\t\tif (WICH_ONE.equals(\"F\")) {\n\t\t\tnombreColumna = row.getColumn(\"ascNacionalidad\");\n\t\t\tnombreColumna.setTitleKey(\"tbl.planilla.aportaciones\");\n\t\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\t\tpublic Object getValue(Object item, String property,\n\t\t\t\t\t\tint rowcount) {\n\t\t\t\t\tObject value = new BasicCellEditor().getValue(item,\n\t\t\t\t\t\t\tproperty, rowcount);\n\t\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\t\tdouble descAportaciones = 0.0;\n\t\t\t\t\tdescAportaciones += obtenerDescuentos(asociado, \"B\", \"A\",\n\t\t\t\t\t\t\tdescAportaciones,request);\n\t\t\t\t\treturn descAportaciones;\n\t\t\t\t}\n\n\t\t\t});\n\n\t\t\tnombreColumna = row.getColumn(\"ascJefeInmediato\");\n\t\t\tnombreColumna.setTitleKey(\"tbl.planilla.ahorros\");\n\t\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\t\tpublic Object getValue(Object item, String property,\n\t\t\t\t\t\tint rowcount) {\n\t\t\t\t\tObject value = new BasicCellEditor().getValue(item,\n\t\t\t\t\t\t\tproperty, rowcount);\n\t\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\t\tdouble descAportaciones = 0.0;\n\t\t\t\t\tdescAportaciones += obtenerDescuentos(asociado, \"B\", \"B\",\n\t\t\t\t\t\t\tdescAportaciones,request);\n\t\t\t\t\treturn descAportaciones;\n\t\t\t\t}\n\n\t\t\t});\n\n\t\t\tnombreColumna = row.getColumn(\"ascSalario\");\n\t\t\tnombreColumna.setTitleKey(\"tbl.planilla.presYSeg\");\n\t\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\t\tpublic Object getValue(Object item, String property,\n\t\t\t\t\t\tint rowcount) {\n\t\t\t\t\tObject value = new BasicCellEditor().getValue(item,\n\t\t\t\t\t\t\tproperty, rowcount);\n\t\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\t\tCtaCasCuentaAsociadoDAO casDAO = new CtaCasCuentaAsociadoDAO(getSessionHibernate(request));\n\n\t\t\t\t\tdouble descPrestamos = 0.0;\n\t\t\t\t\tdescPrestamos += obtenerDescuentos(asociado, \"C\", \"\",\n\t\t\t\t\t\t\tdescPrestamos,request);\n\n\t\t\t\t\tdouble descSeguros = 0.0;\n\t\t\t\t\tdescSeguros += obtenerDescuentos(asociado, \"D\", \"\",\n\t\t\t\t\t\t\tdescSeguros,request);\n\t\t\t\t\treturn descPrestamos + descSeguros;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tif (WICH_ONE.equals(\"G\")) {\n\t\t\tnombreColumna = row.getColumn(\"ascNacionalidad\");\n\t\t\tnombreColumna.setTitleKey(\"tbl.planilla.ahoYApor\");\n\t\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\t\tpublic Object getValue(Object item, String property,\n\t\t\t\t\t\tint rowcount) {\n\t\t\t\t\tObject value = new BasicCellEditor().getValue(item,\n\t\t\t\t\t\t\tproperty, rowcount);\n\t\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\t\tdouble descAportaciones = 0.0;\n\t\t\t\t\tdescAportaciones += obtenerDescuentos(asociado, \"B\", \"A\",\n\t\t\t\t\t\t\tdescAportaciones,request);\n\n\t\t\t\t\tdouble descAhorros = 0.0;\n\t\t\t\t\tdescAhorros += obtenerDescuentos(asociado, \"B\", \"B\",\n\t\t\t\t\t\t\tdescAhorros,request);\n\n\t\t\t\t\treturn descAportaciones + descAhorros;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tnombreColumna = row.getColumn(\"ascJefeInmediato\");\n\t\t\tnombreColumna.setTitleKey(\"tbl.planilla.prestamos\");\n\t\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\t\tpublic Object getValue(Object item, String property,\n\t\t\t\t\t\tint rowcount) {\n\t\t\t\t\tObject value = new BasicCellEditor().getValue(item,\n\t\t\t\t\t\t\tproperty, rowcount);\n\t\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\t\tdouble descPrestamos = 0.0;\n\t\t\t\t\tdescPrestamos += obtenerDescuentos(asociado, \"C\", \"\",\n\t\t\t\t\t\t\tdescPrestamos,request);\n\t\t\t\t\treturn descPrestamos;\n\t\t\t\t}\n\n\t\t\t});\n\n\t\t\tnombreColumna = row.getColumn(\"ascSalario\");\n\t\t\tnombreColumna.setTitleKey(\"tbl.planilla.seguros\");\n\t\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\t\tpublic Object getValue(Object item, String property,\n\t\t\t\t\t\tint rowcount) {\n\t\t\t\t\tObject value = new BasicCellEditor().getValue(item,\n\t\t\t\t\t\t\tproperty, rowcount);\n\t\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\t\tdouble descSeguros = 0.0;\n\t\t\t\t\tdescSeguros += obtenerDescuentos(asociado, \"D\", \"\",\n\t\t\t\t\t\t\tdescSeguros,request);\n\t\t\t\t\treturn descSeguros;\n\t\t\t\t}\n\n\t\t\t});\n\t\t}\n\t\ttableFacade.render();\n\t}",
"private void loadTable() {\n model.getDataVector().removeAllElements();\n model.fireTableDataChanged();\n try {\n String sql = \"select * from tb_mahasiswa\";\n Statement n = a.createStatement();\n ResultSet rs = n.executeQuery(sql);\n while (rs.next()) {\n Object[] o = new Object[6];\n o[0] = rs.getString(\"id_mahasiswa\");\n o[1] = rs.getString(\"nama\");\n o[2] = rs.getString(\"tempat\");\n o[3] = rs.getString(\"waktu\");\n o[4] = rs.getString(\"status\");\n model.addRow(o);\n }\n } catch (Exception e) {\n }\n }",
"public void exportShowingsToCsv() {\n filmEdit.exportShowingsToCsv();\n }",
"void insertCSV(String file_path) {\n try {\n InputStream fileStream = new FileInputStream(file_path);\n Reader decoder = new InputStreamReader(fileStream, \"UTF-8\");\n BufferedReader buffered = new BufferedReader(decoder);\n\n for (String line = buffered.readLine(); line != null; line = buffered.readLine()) {\n // process line\n String[] tokens = line.trim().split(\"\\\\s+\"); // split line into different fields\n\n // valid table row should have 16 fields\n if (tokens.length == 16) {\n insertSingleRow(tokens);\n } else {\n continue;\n }\n }\n } catch (Exception e) {\n logger.log(Level.WARNING, \"insertGZip error \", e);\n }\n }",
"private String getFileTableQuery() {\n \t\tfinal StringBuilder builder = new StringBuilder();\n \n \t\tbuilder.append(\"create table FILE(\");\n \t\tbuilder.append(\"FILE_ID LONG PRIMARY KEY,\");\n \t\tbuilder.append(\"FILE_PATH TEXT,\");\n \t\tbuilder.append(\"START_REVISION_ID LONG,\");\n \t\tbuilder.append(\"END_REVISION_ID LONG\");\n \t\tbuilder.append(\")\");\n \n \t\treturn builder.toString();\n \t}",
"private void addRows() {\n this.SaleList.forEach(Factura -> {\n this.modelo.addRow(new Object[]{\n Factura.getId_Factura(),\n Factura.getPersona().getNombre(),\n Factura.getFecha().getTimestamp(),\n Factura.getCorreo(),\n Factura.getGran_Total()});\n });\n }",
"public void exportMap(){\n\t\tString toSave = \"\";\r\n\t\tfor(int i=0;i<map.getH();i++){\r\n\t\t\tfor(int j=0;j<map.getL();i++){\r\n\t\t\t\tif(j == map.getL()-2)\r\n\t\t\t\t\ttoSave += map.getCase(i, j).toString();\r\n\t\t\t\telse\r\n\t\t\t\t\ttoSave += map.getCase(i, j).toString()+\"|\";\r\n\t\t\t}\r\n\t\t\ttoSave += \"\\n\";\r\n\t\t}\r\n\t\t//ecriture d'un fichier\r\n\t}",
"public void doConvertion() throws IOException{\n String filename = \"test\";\n writer = new PrintWriter(new FileWriter(filename));\n writer.write(\"\\\"token\\\",\\\"prev_word\\\",\\\"next_word\\\",\\\"tag\\\",\\\"prev_tag\\\",\\\"next_tag\\\",\\\"is_number\\\",\\\"is_punctuation\\\",\\\"is_place_directive\\\",\\\"is_url\\\",\\\"is_twitter_account\\\",\\\"is_hashtag\\\",\\\"is_month_name\\\",\\\"is_gazeteer\\\",\\\"label\\\"\");\n // write header first.. \n \n // Select from db.\n// ArrayList<String> tweets = selectTweet();\n// for (int i = 0; i < tweets.size(); i++) {\n// String tobewriten = parseTweet(tweets.get(i));\n// writer.write(tobewriten);\n// }\n // put arff header in bottom but next to be moved to top..\n writer.write(parseTweet());\n //writer.write(getArffHeader());\n \n writer.close();\n // write to external file\n \n }",
"private static void writeRecords(Collection<Record> values)\n throws IOException {\n for (Record record : values) {\n writer2.writeRecord(record.makeup());\n // over write, update writer\n // System.out.println(lineNum);\n if (++lineNum > Merge.lineNumbers.get(fileNum)) {\n writer2.flush();\n writer2.close();\n\n fileNum++;\n lineNum = 0;\n writer2 = new CsvWriter(new OutputStreamWriter(\n new FileOutputStream(SORT_USER_FN + fileNum + \".csv\"),\n \"UTF-8\"), ',');\n }\n }\n\n }",
"private void arrangeData() {\r\n\t\ttry {\r\n\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/yyyy HH:mm:ss\"), literalSdf = new SimpleDateFormat(\"EEE MMM dd HH:mm:ss zzz yyyy\", Locale.ENGLISH);\r\n\t\t\tList<Csv> list = HibernateUtil.readAllCsv();\r\n\t\t\tfor (Csv csv : list) {\r\n\t\t\t\t// Se non esiste il progetto lo creo\r\n\t\t\t\tProject pForName = HibernateUtil.readProjectForName(csv.getProgettoPolarion());\r\n\t\t\t\tif (pForName == null) {\r\n\t\t\t\t\tpForName = new Project();\r\n\t\t\t\t\tpForName.setNome(csv.getProgettoPolarion());\r\n\t\t\t\t\tHibernateUtil.save(pForName);\r\n\t\t\t\t}\r\n\t\t\t\tRelease releaseDiProgetto = null;\r\n\t\t\t\tif (csv.getColonnaB() != null && csv.getColonnaB().length() > 0) {\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * ColonnaB\r\n\t\t\t\t\t * \r\n\t\t\t\t\t * idReleaseDiProgetto; titleReleaseDiProgetto;\r\n\t\t\t\t\t * priorityReleaseDiProgetto; severityReleaseDiProgetto;\r\n\t\t\t\t\t * progettoPolarion; versione; link; release;\r\n\t\t\t\t\t * dataCreazioneReleaseDiProgetto;\r\n\t\t\t\t\t * dataUltimoAggiornamentoReleaseDP\r\n\t\t\t\t\t */\r\n\t\t\t\t\tString[] bElements = csv.getColonnaB().split(Pattern.quote(\";\"));\r\n\t\t\t\t\treleaseDiProgetto = HibernateUtil.readRelease(bElements[0].trim());\r\n\t\t\t\t\tboolean toUpdate = false, toSave = false;\r\n\r\n\t\t\t\t\tif (releaseDiProgetto == null) {\r\n\t\t\t\t\t\treleaseDiProgetto = new Release();\r\n\t\t\t\t\t\treleaseDiProgetto.setIdPolarion(bElements[0].trim());\r\n\t\t\t\t\t\ttoSave = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (releaseDiProgetto.getTitolo() == null\r\n\t\t\t\t\t\t\t|| !releaseDiProgetto.getTitolo().equals(bElements[1].trim())) {\r\n\t\t\t\t\t\treleaseDiProgetto.setTitolo(bElements[1].trim());\r\n\t\t\t\t\t\tif (!toSave)\r\n\t\t\t\t\t\t\ttoUpdate = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (bElements[2] != null && bElements[2].trim().length() > 0) {\r\n\t\t\t\t\t\tif (!toSave && releaseDiProgetto.getPriority() != null\r\n\t\t\t\t\t\t\t\t&& releaseDiProgetto.getPriority().getValore() != Float.parseFloat(bElements[2].trim()))\r\n\t\t\t\t\t\t\ttoUpdate = true;\r\n\t\t\t\t\t\tif (toSave || toUpdate)\r\n\t\t\t\t\t\t\treleaseDiProgetto\r\n\t\t\t\t\t\t\t\t\t.setPriority(HibernateUtil.readPriority(Float.parseFloat(bElements[2].trim())));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (bElements[3] != null && bElements[3].trim().length() > 0) {\r\n\t\t\t\t\t\tif (!toSave && releaseDiProgetto.getSeverity() != null\r\n\t\t\t\t\t\t\t\t&& !releaseDiProgetto.getSeverity().getNome().equals(bElements[3].trim()))\r\n\t\t\t\t\t\t\ttoUpdate = true;\r\n\t\t\t\t\t\tif (toSave || toUpdate)\r\n\t\t\t\t\t\t\treleaseDiProgetto.setSeverity(HibernateUtil.readSeverity(bElements[3].trim()));\r\n\t\t\t\t\t}\r\n\t\t\t\t\treleaseDiProgetto.setProject(pForName);\r\n\t\t\t\t\tif (bElements[5] != null && bElements[5].trim().length() > 0) {\r\n\t\t\t\t\t\tif (!toSave && releaseDiProgetto.getVersione() != null\r\n\t\t\t\t\t\t\t\t&& !releaseDiProgetto.getVersione().equals(bElements[5].trim()))\r\n\t\t\t\t\t\t\ttoUpdate = true;\r\n\t\t\t\t\t\treleaseDiProgetto.setVersione(bElements[5].trim());\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (bElements[6] != null && bElements[6].trim().length() > 0) {\r\n\t\t\t\t\t\tif (!toSave && releaseDiProgetto.getLink() != null\r\n\t\t\t\t\t\t\t\t&& !releaseDiProgetto.getLink().equals(bElements[6].trim()))\r\n\t\t\t\t\t\t\ttoUpdate = true;\r\n\t\t\t\t\t\treleaseDiProgetto.setLink(bElements[6].trim());\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (bElements[7] != null && bElements[7].trim().length() > 0) {\r\n\t\t\t\t\t\tif (!toSave && releaseDiProgetto.getType() != null\r\n\t\t\t\t\t\t\t\t&& !releaseDiProgetto.getType().equals(bElements[6].trim()))\r\n\t\t\t\t\t\t\ttoUpdate = true;\r\n\t\t\t\t\t\treleaseDiProgetto.setType(bElements[7].trim());\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (bElements[8] != null && bElements[8].trim().length() > 0) {\r\n\t\t\t\t\t\tDate dataCreazione = sdf.parse(bElements[8].trim());\r\n\t\t\t\t\t\tif (!toSave && releaseDiProgetto.getDataCreazione() != null\r\n\t\t\t\t\t\t\t\t&& !releaseDiProgetto.getDataCreazione().equals(dataCreazione))\r\n\t\t\t\t\t\t\ttoUpdate = true;\r\n\t\t\t\t\t\treleaseDiProgetto.setDataCreazione(dataCreazione);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (bElements[9] != null && bElements[9].trim().length() > 0) {\r\n\t\t\t\t\t\tDate dataUltimoAggiornamento = sdf.parse(bElements[9].trim());\r\n\t\t\t\t\t\tif (!toSave && releaseDiProgetto.getDataUpdate() != null\r\n\t\t\t\t\t\t\t\t&& !releaseDiProgetto.getDataUpdate().equals(dataUltimoAggiornamento))\r\n\t\t\t\t\t\t\ttoUpdate = true;\r\n\t\t\t\t\t\treleaseDiProgetto.setDataUpdate(dataUltimoAggiornamento);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (toSave)\r\n\t\t\t\t\t\tHibernateUtil.save(releaseDiProgetto);\r\n\t\t\t\t\telse if (toUpdate)\r\n\t\t\t\t\t\tHibernateUtil.update(Release.class, releaseDiProgetto);\r\n\r\n\t\t\t\t}\r\n\t\t\t\tif (csv.getColonnaC() != null && csv.getColonnaC().length() > 0) {\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * ColonnaC\r\n\t\t\t\t\t * \r\n\t\t\t\t\t * progettoRelease\r\n\t\t\t\t\t */\r\n\t\t\t\t\tString regex = Pattern.quote(\"(\") + \"(.*?)\" + Pattern.quote(\")\");\r\n\t\t\t\t\tPattern pattern = Pattern.compile(regex);\r\n\t\t\t\t\tMatcher matcher = pattern.matcher(csv.getColonnaC());\r\n\t\t\t\t\twhile (matcher.find()) {\r\n\t\t\t\t\t\tString[] history = matcher.group(1).split(Pattern.quote(\"^\"));\r\n\r\n\t\t\t\t\t\tStatus status = null;\r\n\t\t\t\t\t\tif (history.length > 0)\r\n\t\t\t\t\t\t\tstatus = HibernateUtil.readStatus(history[0].trim());\r\n\t\t\t\t\t\tDate dataUpdate = null;\r\n\t\t\t\t\t\tif (history.length > 1)\r\n\t\t\t\t\t\t\tdataUpdate = sdf.parse(history[1]);\r\n\t\t\t\t\t\tUser user = null;\r\n\t\t\t\t\t\tif (history.length > 2)\r\n\t\t\t\t\t\t\tuser = HibernateUtil.readUser(history[2].trim());\r\n\r\n\t\t\t\t\t\tReleaseHistory rHistory = HibernateUtil.readReleaseHistory(releaseDiProgetto, status,\r\n\t\t\t\t\t\t\t\tdataUpdate, user);\r\n\t\t\t\t\t\tif (rHistory == null) {\r\n\t\t\t\t\t\t\trHistory = new ReleaseHistory();\r\n\t\t\t\t\t\t\trHistory.setRelease(releaseDiProgetto);\r\n\t\t\t\t\t\t\trHistory.setStatus(status);\r\n\t\t\t\t\t\t\trHistory.setDataUpdate(dataUpdate);\r\n\t\t\t\t\t\t\trHistory.setUser(user);\r\n\t\t\t\t\t\t\tHibernateUtil.save(rHistory);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (csv.getColonnaD() != null && csv.getColonnaD().length() > 0) {\r\n\t\t\t\t\t// TODO D\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * ColonnaD\r\n\t\t\t\t\t * \r\n\t\t\t\t\t * progettoSviluppo\r\n\t\t\t\t\t */\r\n\t\t\t\t}\r\n\t\t\t\tif (csv.getColonnaE() != null && csv.getColonnaE().length() > 0) {\r\n\t\t\t\t\t// TODO E\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * ColonnaE\r\n\t\t\t\t\t * \r\n\t\t\t\t\t * progettoMev\r\n\t\t\t\t\t */\r\n\t\t\t\t}\r\n\t\t\t\tif (csv.getColonnaF() != null && csv.getColonnaF().length() > 0) {\r\n\t\t\t\t\t// TODO F\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * ColonnaF\r\n\t\t\t\t\t * \r\n\t\t\t\t\t * progettoDocumento\r\n\t\t\t\t\t */\r\n\t\t\t\t}\r\n\t\t\t\tif (csv.getColonnaG() != null && csv.getColonnaG().length() > 0) {\r\n\t\t\t\t\t// TODO G\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * ColonnaG\r\n\t\t\t\t\t * \r\n\t\t\t\t\t * progettoRds\r\n\t\t\t\t\t */\r\n\t\t\t\t}\r\n\t\t\t\tif (csv.getColonnaH() != null && csv.getColonnaH().length() > 0) {\r\n\t\t\t\t\t// TODO H\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * ColonnaH\r\n\t\t\t\t\t * \r\n\t\t\t\t\t * progettoDefect\r\n\t\t\t\t\t */\r\n\t\t\t\t}\r\n\t\t\t\tif (csv.getColonnaI() != null && csv.getColonnaI().length() > 0) {\r\n\t\t\t\t\t// TODO I\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * ColonnaI\r\n\t\t\t\t\t * \r\n\t\t\t\t\t * progettoAnomalia\r\n\t\t\t\t\t */\r\n\t\t\t\t}\r\n\t\t\t\tReleaseIt releaseIT = null;\r\n\t\t\t\tif (csv.getColonnaJ() != null && csv.getColonnaJ().length() > 0) {\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * ColonnaJ\r\n\t\t\t\t\t * \r\n\t\t\t\t\t * progettoReleaseIt\r\n\t\t\t\t\t */\r\n\t\t\t\t\tboolean hasLinkedItem = false;\r\n\t\t\t\t\tif (csv.getColonnaJ().startsWith(\"<\") && csv.getColonnaJ().endsWith(\">\")) {\r\n\t\t\t\t\t\tcsv.setColonnaJ(csv.getColonnaJ().substring(1, csv.getColonnaJ().length() - 1));\r\n\t\t\t\t\t\thasLinkedItem = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tString[] elements = csv.getColonnaJ().split(Pattern.quote(\"|\"));\r\n\t\t\t\t\tif (hasLinkedItem) {\r\n\t\t\t\t\t\tLinkedItemId lIId = new LinkedItemId();\r\n\t\t\t\t\t\tlIId.setIdPolarionPadre(releaseDiProgetto.getIdPolarion());\r\n\t\t\t\t\t\tlIId.setIdPolarionFiglio(elements[1]);\r\n\t\t\t\t\t\tLinkedItem li = HibernateUtil.readLinkedItem(lIId);\r\n\t\t\t\t\t\tif (li == null) {\r\n\t\t\t\t\t\t\tli = new LinkedItem();\r\n\t\t\t\t\t\t\tli.setId(lIId);\r\n\t\t\t\t\t\t\tHibernateUtil.save(li);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treleaseIT = HibernateUtil.readReleaseIT(elements[1].trim());\r\n\t\t\t\t\tboolean toSave = false;\r\n\t\t\t\t\tif (releaseIT == null || !releaseIT.getTitolo().equals(elements[2].trim())) {\r\n\t\t\t\t\t\tif (releaseIT == null) {\r\n\t\t\t\t\t\t\treleaseIT = new ReleaseIt();\r\n\t\t\t\t\t\t\treleaseIT.setIdPolarion(elements[1].trim());\r\n\t\t\t\t\t\t\ttoSave = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\treleaseIT.setTitolo(elements[2].trim());\r\n\t\t\t\t\t\tif (elements[3] != null && elements[3].trim().length() > 0){\r\n\t\t\t\t\t\t\tDate d = null;\r\n\t\t\t\t\t\t\ttry{ \r\n\t\t\t\t\t\t\t\td = sdf.parse(elements[3].trim());\r\n\t\t\t\t\t\t\t}catch(ParseException pe){\r\n\t\t\t\t\t\t\t\td = literalSdf.parse(elements[3].trim());\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\treleaseIT.setDataInizio(d);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (elements[4] != null && elements[4].trim().length() > 0){\r\n\t\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\t\treleaseIT.setDataFine(sdf.parse(elements[4].trim()));\r\n\t\t\t\t\t\t\t}catch(ParseException pe){\r\n\t\t\t\t\t\t\t\treleaseIT.setDataFine(literalSdf.parse(elements[4].trim()));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (toSave)\r\n\t\t\t\t\t\t\tHibernateUtil.save(releaseIT);\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tHibernateUtil.update(ReleaseIt.class, releaseIT);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (elements.length > 5 && elements[5] != null && elements[5].trim().length() > 0) {\r\n\t\t\t\t\t\tString regex = Pattern.quote(\"(\") + \"(.*?)\" + Pattern.quote(\")\");\r\n\t\t\t\t\t\tPattern pattern = Pattern.compile(regex);\r\n\t\t\t\t\t\tMatcher matcher = pattern.matcher(elements[5].trim());\r\n\t\t\t\t\t\tboolean isFirstRow = true;\r\n\t\t\t\t\t\t// formato sdf per Thu Feb 18 00:00:00 CET 2016\r\n\t\t\t\t\t\twhile (matcher.find()) {\r\n\t\t\t\t\t\t\tString[] history = matcher.group(1).split(Pattern.quote(\"^\"));\r\n\t\t\t\t\t\t\tStatus status = HibernateUtil.readStatus(history[0].trim());\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tDate dataUpdate = null;\r\n\t\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\t\tdataUpdate = sdf.parse(history[1]);\r\n\t\t\t\t\t\t\t}catch(ParseException pe){\r\n\t\t\t\t\t\t\t\tdataUpdate = literalSdf.parse(history[1]);\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tif (isFirstRow && releaseIT.getDataCreazione() == null) {\r\n\t\t\t\t\t\t\t\treleaseIT.setDataCreazione(dataUpdate);\r\n\t\t\t\t\t\t\t\tHibernateUtil.update(ReleaseIt.class, releaseIT);\r\n\t\t\t\t\t\t\t\tisFirstRow = false;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tReleaseitHistory rItHistory = null;\r\n\t\t\t\t\t\t\tif (history.length > 2) {\r\n\t\t\t\t\t\t\t\tUser user = HibernateUtil.readUser(history[2].trim());\r\n\t\t\t\t\t\t\t\trItHistory = HibernateUtil.readReleaseItHistory(releaseIT, status, dataUpdate,\r\n\t\t\t\t\t\t\t\t\t\tuser);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif (rItHistory == null) {\r\n\t\t\t\t\t\t\t\trItHistory = new ReleaseitHistory();\r\n\t\t\t\t\t\t\t\trItHistory.setReleaseIt(releaseIT);\r\n\t\t\t\t\t\t\t\trItHistory.setStatus(status);\r\n\t\t\t\t\t\t\t\trItHistory.setDataUpdate(dataUpdate);\r\n\t\t\t\t\t\t\t\tHibernateUtil.save(rItHistory);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (csv.getColonnaK() != null && csv.getColonnaK().length() > 0) {\r\n\t\t\t\t\t// TODO K\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * ColonnaK\r\n\t\t\t\t\t * \r\n\t\t\t\t\t * taskInfo\r\n\t\t\t\t\t */\r\n\t\t\t\t}\r\n\t\t\t\tif (csv.getColonnaL() != null && csv.getColonnaL().length() > 0) {\r\n\t\t\t\t\t// TODO L\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * ColonnaL\r\n\t\t\t\t\t * \r\n\t\t\t\t\t * workRecordInfo\r\n\t\t\t\t\t */\r\n\t\t\t\t}\r\n\t\t\t\tif (csv.getColonnaM() != null && csv.getColonnaM().length() > 0) {\r\n\t\t\t\t\t// TODO M\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * ColonnaM\r\n\t\t\t\t\t * \r\n\t\t\t\t\t * infoTestcase\r\n\t\t\t\t\t */\r\n\t\t\t\t}\r\n\t\t\t\tif (csv.getColonnaN() != null && csv.getColonnaN().length() > 0) {\r\n\t\t\t\t\t// TODO N\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * ColonnaN\r\n\t\t\t\t\t * \r\n\t\t\t\t\t * infoChecklist\r\n\t\t\t\t\t */\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tLogger.getLogger(Scheduler.class.getName()).log(Level.SEVERE, null, e);\r\n\t\t}\r\n\t}",
"public void initLoadTable(){\n movies.clear();\n try {\n Connection conn = ConnectionFactory.getConnection();\n try (Statement stmt = conn.createStatement()) {\n String str=\"select title,director,prodYear,lent,lentCount,original,storageType,movieLength,mainCast,img from movies \";\n ResultSet rs= stmt.executeQuery(str);\n while(rs.next()){\n String title=rs.getString(\"title\");\n String director=rs.getString(\"director\");\n int prodYear=rs.getInt(\"prodYear\");\n boolean lent=rs.getBoolean(\"lent\"); \n int lentCount=rs.getInt(\"lentCount\");\n boolean original=rs.getBoolean(\"original\");\n String storageType=rs.getString(\"storageType\");\n int movieLength=rs.getInt(\"movieLength\");\n String mainCast=rs.getString(\"mainCast\");\n Blob blob = rs.getBlob(\"img\");\n InputStream inputStream = blob.getBinaryStream();\n OutputStream outputStream = new FileOutputStream(\"resources/\"+title+director+\".jpg\");\n int bytesRead = -1;\n byte[] buffer = new byte[1];\n while ((bytesRead = inputStream.read(buffer)) != -1) {\n outputStream.write(buffer, 0, bytesRead);\n }\n inputStream.close();\n outputStream.close();\n System.out.println(\"File saved\"); \n File image = new File(\"resources/\"+title+director+\".jpg\");\n \n movies.add(new Movie(title,director,prodYear,lent,lentCount,original,storageType,movieLength,mainCast,image));\n }\n rs.close();\n stmt.close(); \n }\n conn.close();\n } catch (Exception ex) {\n System.err.println(ex.toString());\n } \n \n fireTableDataChanged();\n }",
"private void writeData(JTable table, String value){\n\t\ttry{\n\t\t\tObjectOutputStream obj = new ObjectOutputStream(new FileOutputStream(value+\"_Details.sce\"));\n\t\t\tobj.writeObject(table);\n\t\t\tobj.close();\n\t\t}catch(IOException ex){\n\t\t\tSystem.out.println(ex.getMessage());\n\t\t}\n\t}",
"private static void loadTableData() {\n\n\t\tBufferedReader in = null;\n\t\ttry {\n\t\t\tin = new BufferedReader(new FileReader(dataDir + tableInfoFile));\n\n\t\t\twhile (true) {\n\n\t\t\t\t// read next line\n\t\t\t\tString line = in.readLine();\n\t\t\t\tif (line == null) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tString[] tokens = line.split(\" \");\n\t\t\t\tString tableName = tokens[0];\n\t\t\t\tString tableFileName = tokens[1];\n\n\t\t\t\ttableNameToSchema.put(tableName, new HashMap<String, Type>());\n\t\t\t\ttableNameToOrdredSchema.put(tableName,\n\t\t\t\t\t\tnew ArrayList<ColumnInfo>());\n\n\t\t\t\t// attributes data\n\t\t\t\tfor (int i = 2; i < tokens.length;) {\n\n\t\t\t\t\tString attName = tokens[i++];\n\t\t\t\t\tString attTypeName = (tokens[i++]);\n\n\t\t\t\t\tType attType = null;\n\n\t\t\t\t\t/*\n\t\t\t\t\t * Undefined, how to represent dates, crazy longs probably\n\t\t\t\t\t * won't need this for now...\n\t\t\t\t\t */\n\t\t\t\t\tif (attTypeName.equals(\"CHAR\")) {\n\t\t\t\t\t\tattType = Types.getCharType(Integer\n\t\t\t\t\t\t\t\t.valueOf(tokens[i++]));\n\t\t\t\t\t} else if (attTypeName.equals(\"DATE\")) {\n\t\t\t\t\t\tattType = Types.getDateType();\n\t\t\t\t\t} else if (attTypeName.equals(\"DOUBLE\")) {\n\t\t\t\t\t\tattType = Types.getDoubleType();\n\t\t\t\t\t} else if (attTypeName.equals(\"FLOAT\")) {\n\t\t\t\t\t\tattType = Types.getFloatType();\n\t\t\t\t\t} else if (attTypeName.equals(\"INTEGER\")) {\n\t\t\t\t\t\tattType = Types.getIntegerType();\n\t\t\t\t\t} else if (attTypeName.equals(\"LONG\")) {\n\t\t\t\t\t\tattType = Types.getLongType();\n\t\t\t\t\t} else if (attTypeName.equals(\"VARCHAR\")) {\n\t\t\t\t\t\tattType = Types.getVarcharType();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new RuntimeException(\"Invalid type: \"\n\t\t\t\t\t\t\t\t+ attTypeName);\n\t\t\t\t\t}\n\n\t\t\t\t\ttableNameToSchema.get(tableName).put(attName, attType);\n\n\t\t\t\t\tColumnInfo ci = new ColumnInfo(attName, attType);\n\t\t\t\t\ttableNameToOrdredSchema.get(tableName).add(ci);\n\n\t\t\t\t}\n\n\t\t\t\t// at this point, table info loaded.\n\n\t\t\t\t// Create table\n\t\t\t\tmyDatabase.getQueryInterface().createTable(tableName,\n\t\t\t\t\t\ttableNameToSchema.get(tableName));\n\n\t\t\t\t// Now, load data into newly created table\n\t\t\t\treadTable(tableName, tableFileName);\n\n\t\t\t}\n\n\t\t\tin.close();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tHelpers.print(e.getStackTrace().toString(),\n\t\t\t\t\tutil.Consts.printType.ERROR);\n\t\t}\n\n\t}",
"public void insertdata(String file) {\n\r\n\r\n final String csvFile = file;\r\n\r\n try (BufferedReader br = new BufferedReader(new FileReader(csvFile))) {\r\n\r\n\r\n while ((line = br.readLine()) != null) {\r\n\r\n\r\n // use comma as separator\r\n String[] country = line.split(\",\");\r\n\r\n if (country.length == 12) {\r\n model_lacakMobil = new Model_LacakMobil();\r\n realmHelper = new RealmHelper(realm);\r\n\r\n model_lacakMobil.setNama_mobil(country[1]);\r\n model_lacakMobil.setNo_plat(country[2]);\r\n model_lacakMobil.setNamaunit(country[3]);\r\n model_lacakMobil.setFinance(country[4]);\r\n model_lacakMobil.setOvd(country[5]);\r\n model_lacakMobil.setSaldo(country[6]);\r\n model_lacakMobil.setCabang(country[7]);\r\n model_lacakMobil.setNoka(country[8]);\r\n model_lacakMobil.setNosin(country[9]);\r\n model_lacakMobil.setTahun(country[10]);\r\n model_lacakMobil.setWarna(country[11]);\r\n realmHelper.save(model_lacakMobil);\r\n\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n } finally {\r\n// fixing_data();\r\n\r\n }\r\n }",
"public void rellenarDatos(){\t\r\n\t//======================================ELEGIMOS MEDIANTE FILECHOOSER EL CSV==============================================//\r\n\tvista.getMntmAbrirCsv().addActionListener(r->{\t\r\n\tJFileChooser jchooser= new JFileChooser();\r\n\tvista.setjFileChooserCSV(jchooser);\r\n\tlistaArte= new ArrayList<ObraArte>();\r\n\t//==================================CREAMOS LAS TABLAS EN LA BASE DE DATOS SQLite========================================//\r\n\tCrearTablaHistorial.crearTablaObraArte(con);\r\n\tCrearTablas.crearTablaObraArte(con);\r\n\tCrearTriggers.createTrigger(con);\r\n\tint returnJChooser= jchooser.showOpenDialog(vista.getContentPane());\r\n\tif (returnJChooser==JFileChooser.APPROVE_OPTION){\r\n\t\tFile file= new File(jchooser.getSelectedFile(),\"\");\r\n\t\tScanner sc;\r\n\t\t\r\n\t\ttry {\r\n\t\t\tsc = new Scanner(file);\r\n\t\t\tString cabecero = sc.nextLine(); \r\n\t\t\twhile(sc.hasNextLine()){ \r\n\t\t\t\tString[] textoEnLineas = sc.nextLine().split(\",\");\r\n\t\t\t\tlistaArte.add(new ObraArte(textoEnLineas[0], textoEnLineas[1], textoEnLineas[2], textoEnLineas[4], textoEnLineas[3]));\r\n\t\t\t}\t\t\t\r\n\t\t} catch (FileNotFoundException | NoSuchElementException o) {\t\r\n\t\t\tJOptionPane.showMessageDialog(vista.getFrame(), \"Archivo de datos incorrecto\", \"Error de lectura\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t//====================CARGAMOS LOS DATOS EN LA TABLA Y BORRAMOS LA LISTA, CARGANDO LA DE LA BD=================//\r\n\t\t\r\n\t\tInsertarDatos.addListaRegistroArte(con, listaArte);\r\n\t\tlistaArte.removeAll(listaArte);\r\n\t\tlistaArte=SeleccionarDatos.getTodosRegistros(con);\r\n\t\tvista.getTable().setModel(new TableModelArte(listaArte, CABECERA));\r\n\t\t\r\n\t\tvista.getLabelSize().setText(vista.getTable().getRowCount()+\" elementos.\");\r\n\t\tvista.getTxtBarraStatus().setText(\"TABLA CREADA\");\r\n\t\tvista.getButton_Modificar().setEnabled(true);\r\n\t\tvista.getButtonBorrar().setEnabled(true);\r\n\t\tvista.getButtonInsertarNuevo().setEnabled(true);\r\n\t\tvista.getMntmBorrarFila().setEnabled(true);\r\n\t\t//comprobarID();\r\n\t\t}\r\n});\t\t\t\r\n}",
"@Override\r\n public void updateTable() {\n FileManager fileManager = new FileManager();\r\n InputStream input = fileManager.readFileFromRAM(fileManager.XML_DIR, FILE_NAME);\r\n if(input != null){\r\n dropTable();\r\n createTable();\r\n parserXml(input); \r\n }else{\r\n Log.i(FILE_NAME,\"file is null\");\r\n }\r\n \r\n }",
"private void load_table() {\n DefaultTableModel model = new DefaultTableModel();\n model.addColumn(\"ID\");\n model.addColumn(\"NIM\");\n model.addColumn(\"Nama\");\n model.addColumn(\"Kelamin\");\n model.addColumn(\"Phone\");\n model.addColumn(\"Agama\");\n model.addColumn(\"Status\");\n\n //menampilkan data database kedalam tabel\n try {\n String sql = \"SELECT * FROM mhs\";\n java.sql.Connection koneksi = (Connection) Koneksi.KoneksiDB();\n java.sql.Statement stm = koneksi.createStatement();\n java.sql.ResultSet res = stm.executeQuery(sql);\n\n while (res.next()) {\n model.addRow(new Object[]{res.getString(1), res.getString(2),\n res.getString(3), res.getString(4), res.getString(5),\n res.getString(6), res.getString(7)});\n }\n tabelMahasiswa.setModel(model);\n } catch (Exception e) {\n JOptionPane.showMessageDialog(this, e.getMessage());\n }\n\n }",
"private void importData(Connection conn,String filename)\n {\n\t\t\n Statement stmt;\n String query;\n try {\n\t\t\t\t// Step 1: Allocate a database \"Connection\" object\n\t\t\t\tconn = DriverManager.getConnection(\"jdbc:mysql://localhost:\" + PORT_NUMBER + \"/Experiences?user=root&password=root\"); // MySQL\n\t\t\t\t// Step 2: Allocate a \"Statement\" object in the Connection\n\t\t\t\t stmt = conn.createStatement();\n\t\t\t\t {\n\t\t\t\n\n\t\t} }catch(SQLException ex) {\n\t\t\tex.printStackTrace();\n\t\t\t\n\t\t}\n \n \n try\n {\n stmt = conn.createStatement(\n ResultSet.TYPE_SCROLL_SENSITIVE,\n ResultSet.CONCUR_UPDATABLE);\n \n \n query = \"LOAD DATA LOCAL INFILE '\"+filename+\"' INTO TABLE t1 FIELDS TERMINATED BY ',' (question1,question2,question3,question4,question5,question6,question7,question8,question9)\";\n \n stmt.executeUpdate(query);\n \n }\n catch(Exception e)\n {\n e.printStackTrace();\n stmt = null;\n }\n }",
"public static void inicializaMedicosText() {\n \n try (BufferedWriter bw = new BufferedWriter(new FileWriter(\"medicos.txt\"))) {\n for (Medico m : medicos) {\n if(m.getPuesto()==null)\n bw.write(m.getCedula() + \",\" + m.getNombres() + \",\" + m.getApellidos() + \",\" + m.getEdad() + \",0\");\n else\n bw.write(m.getCedula() + \",\" + m.getNombres() + \",\" + m.getApellidos() + \",\" + m.getEdad() + \",\" + m.getPuesto().getId());\n bw.newLine();\n }\n }\n catch (IOException ex) {\n Logger.getLogger(StageAdmin.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"public void database() throws IOException\n {\n \tFile file =new File(\"data.txt\");\n\t if(!file.exists())\n\t {\n\t \tSystem.out.println(\"File 'data.txt' does not exit\");\n\t System.out.println(file.createNewFile());\n\t file.createNewFile();\n\t databaseFileWrite(file);//call the databaseFileRead() method, to initialize data from ArrayList and write data into data.txt\n\t }\n\t else\n\t {\n\t \tdatabaseFileRead();//call the databaseFileRead() method, to load data directly from data.txt\n\t }\n }",
"public void outputByRows(String filename) throws IOException {\n BufferedWriter rowsWriter = new BufferedWriter(new FileWriter(new File(filename)));\n for (int i = 0; i < this.numRows; i++) {\n for (int j = 0; j < this.rows[i].length; j++) {\n if (j > 0) {\n rowsWriter.write(\" \");\n }\n // Add 1 to get back 1-indexing\n rowsWriter.write(Integer.toString(this.rows[i][j] + 1));\n }\n rowsWriter.newLine();\n }\n rowsWriter.close();\n }",
"public void convertCsvDataToSQLScrip(List<CorruptionIndex> data, String destinationFile){\n\n }",
"public void writeTable(){\n\n PersistenceUtil pu= PersistenceUtil.getInstance();\n EntityManagerFactory emf =pu.getEmf();\n EntityManager em = emf.createEntityManager();\n\n\n\n final Integer[] i = {0};\n\n tabela.getColumns().forEach((Consumer<TableColumn<Map, String>>) col -> {\n col.setCellValueFactory(new MapValueFactory<>(\"column\" + (i[0]).toString()));\n\n\n if(alegereBD!=\"0\")\n switch(alegereTabela){\n case \"Artists\":\n\n if(i[0]==0)\n col.setText(\"id\");\n if(i[0]==1)\n col.setText(\"Name\");\n if(i[0]==2)\n col.setText(\"Country\");\n if(i[0]==3)\n col.setText(\"\");\n if(i[0]==4)\n col.setText(\"\");\n textField1.disableProperty().setValue(false);\n textField2.disableProperty().setValue(false);\n\n textField3.disableProperty().setValue(true);\n textField4.disableProperty().setValue(true);\n textField5.disableProperty().setValue(true);\n\n\n\n\n break;\n case \"Albums\":\n if(i[0]==0)\n col.setText(\"id\");\n if(i[0]==1)\n col.setText(\"Name\");\n if(i[0]==2)\n col.setText(\"Genre\");\n if(i[0]==3)\n col.setText(\"Artist\");\n if(i[0]==4)\n col.setText(\"Realease\");\n\n textField3.disableProperty().setValue(false);\n textField4.disableProperty().setValue(false);\n textField5.disableProperty().setValue(false);\n\n textField1.disableProperty().setValue(true);\n textField2.disableProperty().setValue(true);\n\n\n break;\n case \"Genres\":\n if(i[0]==0)\n col.setText(\"id\");\n if(i[0]==1)\n col.setText(\"Name\");\n if(i[0]==2)\n col.setText(\"\");\n if(i[0]==3)\n col.setText(\"\");\n if(i[0]==4)\n col.setText(\"\");\n\n textField1.disableProperty().setValue(true);\n textField2.disableProperty().setValue(true);\n textField3.disableProperty().setValue(true);\n textField4.disableProperty().setValue(true);\n textField5.disableProperty().setValue(true);\n\n break;\n case \"Charts\":\n if(i[0]==0)\n col.setText(\"id\");\n if(i[0]==1)\n col.setText(\"Album\");\n if(i[0]==2)\n col.setText(\"Artist\");\n if(i[0]==3)\n col.setText(\"Position\");\n if(i[0]==4)\n col.setText(\"\");\n\n textField1.disableProperty().setValue(true);\n textField2.disableProperty().setValue(true);\n textField3.disableProperty().setValue(true);\n textField4.disableProperty().setValue(true);\n textField5.disableProperty().setValue(true);\n\n break;\n }\n\n\n System.out.println(i[0]);\n i[0]++;\n });\n\n\n\n tabela.setItems(generateDataInMap());\n }",
"public static void populateTable(Connection conn,\n String fileName)\n throws SQLException {\n ArrayList<Customer> people = new ArrayList<Customer>();\n try {\n BufferedReader br = new BufferedReader(new FileReader(fileName));\n String line;\n while ((line = br.readLine()) != null) {\n String[] split = line.split(\",\");\n people.add(new Customer(split));\n }\n br.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n String sql = createInsertSQL(people);\n\n /**\n * Create and execute an SQL statement\n *\n * execute only returns if it was successful\n */\n Statement stmt = conn.createStatement();\n stmt.execute(sql);\n }",
"public static void PrintToCsv() throws Exception {\n\t\tBufferedWriter bw1 = new BufferedWriter(new FileWriter(\"./data/output1.csv\"));\n\t\tBufferedWriter bw2 = new BufferedWriter(new FileWriter(\"./data/output2.csv\"));\n\t\tBufferedWriter bw3 = new BufferedWriter(new FileWriter(\"./data/output3.csv\"));\n\t\tBufferedWriter bw4 = new BufferedWriter(new FileWriter(\"./data/output4.csv\"));\n\t\t\n\t\t//print the name of attributes in Table\n\t\tPrint_attribute(bw1,bw2,bw3,bw4);\n\t\tIterator<String> iter = BugDBConnection.Domain.keySet().iterator();\n\t\ttry{\n\t\t\twhile(iter.hasNext()){\n\t\t\t\tString key = iter.next();\n\t\t\t\tdomain = key.split(\"-\")[0];\n\t\t\t\tproject = key.split(\"-\")[1];\n\n\t\t\t\tFieldSet fieldset = BugDBConnection.Domain.get(key);\n\t\t\t\tPrintQ1(bw1,fieldset.field);\n\t\t\t\tPrintQ2(bw2, fieldset.refield);\n\t\t\t\tPrintQ3(bw3, fieldset.f1, fieldset.f2, fieldset.f3, fieldset.f4);\n\t\t\t\tPrintQ4(bw4, fieldset.avg, fieldset.min, fieldset.max);\n\t\t\t\t\n\t\t\t}\n\t\t\tbw1.close();\n\t\t\tbw2.close();\n\t\t\tbw3.close();\n\t\t\tbw4.close();\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public static void backup() throws FileNotFoundException, SQLException {\n\n // Laver en dato til vores End Of Days filer i filnavnet\n Date date = new Date();\n String dagensDato = date.toString();\n dagensDato = dagensDato.replaceAll(\" \", \"_\");\n dagensDato = dagensDato.replaceAll(\":\", \"_\");\n\n File file = new File(\"End_Of_Days/End_Of_Day_\" + dagensDato + \".txt\");\n\n try (\n // Laver filen\n PrintWriter output = new PrintWriter(file);\n ) {\n // Initialiserer varibler der skal bruges\n String sql, hentetFnavn, hentetLnavn, hentetAdresse, hentetKonto_type, hentetOvertraeks, hentetUsername;\n int hentetPerson_id, hentetReg_nr, hentetKonto_nr, hentetRentesats, hentetSaldo, hentetOvertraeksgebyr, hentetId, hentetFra_Konto, hentetTil_Konto, hentetPassword;\n double hentetTrukketbelob, hentetIndfortbelob;\n Timestamp hentetTimestamp;\n\n\n output.println(\"Person_id \\t\\t fnavn \\t\\t lnavn \\t\\t adresse\");\n output.println(\"------------------------------------------------\");\n\n // Henter bruger tabelen\n stmt = con.createStatement();\n sql = \"SELECT * FROM bruger\";\n ResultSet rs = stmt.executeQuery(sql);\n while (rs.next()) { // Indsaetter raekkerne fra bruger tabelen ind i tekstfilen\n hentetPerson_id = rs.getInt(1);\n hentetFnavn = rs.getNString(2);\n hentetLnavn = rs.getNString(3);\n hentetAdresse = rs.getNString(4);\n output.print(hentetPerson_id + \"\\t\\t\" + hentetFnavn + \"\\t\\t\" + hentetLnavn + \"\\t\\t\" + hentetAdresse + \"\\n\");\n }\n\n output.println();\n output.println(\"Konto_type \\t\\t reg_nr \\t\\t konto_nr \\t\\t rentesats \\t\\t saldo \\t\\t overtraeksgebyr \\t\\t overtraek \\t\\t id\");\n output.println(\"------------------------------------------------------------------------------------------------------------------------------------\");\n\n // Henter konto tabelen\n stmt = con.createStatement();\n sql = \"SELECT * FROM konto\";\n rs = stmt.executeQuery(sql);\n while (rs.next()) { // Indsaetter raekkerne fra konto tabelen ind i tekstfilen\n hentetKonto_type = rs.getNString(1);\n hentetReg_nr = rs.getInt(2);\n hentetKonto_nr = rs.getInt(3);\n hentetRentesats = rs.getInt(4);\n hentetSaldo = rs.getInt(5);\n hentetOvertraeksgebyr = rs.getInt(6);\n hentetOvertraeks = rs.getNString(7);\n hentetId = rs.getInt(8);\n output.print(hentetKonto_type + \"\\t\\t\" + hentetReg_nr + \"\\t\\t\" + hentetKonto_nr + \"\\t\\t\" + hentetRentesats + \"\\t\\t\" + hentetSaldo + \"\\t\\t\" + hentetOvertraeksgebyr + \"\\t\\t\" + hentetOvertraeks + \"\\t\\t\" + hentetId + \"\\n\");\n }\n\n output.println();\n output.println(\"id \\t\\t Fra_Konto \\t\\t Trukketbeløb \\t\\t Til_kontoNr \\t\\t Indførtbeløb \\t\\t Timestamp\");\n output.println(\"------------------------------------------------------------------------------------------------------------------------------------\");\n\n // Henter transactioner tabelen\n stmt = con.createStatement();\n sql = \"SELECT * FROM transactioner\";\n rs = stmt.executeQuery(sql);\n while (rs.next()) { // Indsaetter raekkerne fra transactioner tabelen ind i tekstfilen\n hentetId = rs.getInt(1);\n hentetFra_Konto = rs.getInt(2);\n hentetTrukketbelob = rs.getDouble(3);\n hentetTil_Konto = rs.getInt(4);\n hentetIndfortbelob = rs.getDouble(5);\n hentetTimestamp = rs.getTimestamp(6);\n output.print(hentetId + \"\\t\\t\" + hentetFra_Konto + \"\\t\\t\" + hentetTrukketbelob + \"\\t\\t\" + hentetTil_Konto + \"\\t\\t\" + hentetIndfortbelob + \"\\t\\t\" + hentetTimestamp + \"\\n\");\n }\n\n output.println();\n output.println(\"username \\t\\t password\");\n output.println(\"------------------------------------------------------------------------------------------------------------------------------------\");\n\n // Henter login tabelen\n stmt = con.createStatement();\n sql = \"SELECT * FROM login\";\n rs = stmt.executeQuery(sql);\n while (rs.next()) { // Indsaetter raekkerne fra login tabelen ind i tekstfilen\n hentetUsername = rs.getNString(1);\n hentetPassword = rs.getInt(2);\n output.print(hentetUsername + \"\\t\\t\" + hentetPassword + \"\\n\");\n }\n\n }\n System.out.println(\"End Of Days backup successful!\");\n }",
"private void loadData(){\n try (BufferedReader br = new BufferedReader(new FileReader(this.fileName))) {\n String line;\n while((line=br.readLine())!=null){\n E e = createEntity(line);\n super.save(e);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\tpublic void migrateDataByBatch() {\n\t\tpool = new HTablePool(conf, 1024);\n\t\tSQLExporter sqlExporter = \n\t\t\tnew SQLExporter(url, username, password, catalog);\n\t\twhile(sqlExporter.hasNextDataTable()) {\n\t\t\tEntry entry = sqlExporter.next();\n\t\t\tString tableName = REGION + \".\" + (String) entry.getKey();\n\t\t\tList<Map<String, Object>> list = (List<Map<String, Object>>) entry.getValue();\n\t\t\t/**\n\t\t\t * table to migrate data.\n\t\t\t */\n\t\t\tHTable table = (HTable) pool.getTable(tableName);\n\t\t\t\n\t\t\t/**\n\t\t\t * set write buffer size.\n\t\t\t */\n\t\t\ttry {\n\t\t\t\ttable.setWriteBufferSize(WRITE_BUFFER_SIZE);\n\t\t\t\ttable.setAutoFlush(false);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tint counter = 0;\n\t\t\tList<Put> puts = new ArrayList<Put>();\n\t\t\tint size = list.size();\n\t\t\tfor (int i = 0; i < size; i++) {\n\t\t\t\t\n\t\t\t\tPut put = new Put((new Integer(i)).toString().getBytes());\n\t\t\t\t\n\t\t\t\tMap<String, Object> map = list.get(i);\n\t\t\t\tcounter ++;\n\t\t\t\t/**\n\t\t\t\t * add one row to be put.\n\t\t\t\t */\n\t\t\t\tfor (Map.Entry<String, Object> m : map.entrySet()) {\t\n\t\t\t\t\tput.add(FAMILY.getBytes(), m.getKey().getBytes(), \n\t\t\t\t\t\t\tm.getValue().toString().getBytes());\t\n\t\n\t\t\t\t}\n\t\t\t\t/**\n\t\t\t\t * add `put` to list puts. \n\t\t\t\t */\n\t\t\t\tputs.add(put);\n\t\t\t\t\n\t\t\t\tif ((counter % LIST_PUTS_COUNTER == 0) || (i == size - 1)) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\ttable.put(puts);\n\t\t\t\t\t\ttable.flushCommits();\n\t\t\t\t\t\tputs.clear();\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t} else continue;\n\t\t\t}\n\t\t}\n\t}",
"private void writeAll(){\n try (BufferedWriter ignored = new BufferedWriter(new FileWriter(this.fileName))) {\n Iterable<E> values=entities.values();\n values.forEach(this::writeToFile);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void dumpTable(File toFile, boolean append, DBSelect<gDBR> dsel)\n throws DBException\n {\n this.dumpTable(toFile, append, dsel, /*String[]*/null);\n }",
"public void export(final String filepath) throws IOException {\n File outputFile = new File(filepath);\n outputFile.delete();\n outputFile = null;\n\n FileOutputStream fout = null;\n\n try {\n fout = new FileOutputStream(filepath);\n\n for(int i = 0; i < rows; ++i) {\n for(int j = 0; j < cols; ++j) {\n\n //Handle null tableArray[][] values\n if(tableArray[i][j] == null) {\n String formatError = \"ERROR: tableArray[%d][%d] is null\\n\";\n System.out.println(String.format(formatError, i, j));\n fout.close();\n return;\n }\n\n if(j != cols -1)\n fout.write((tableArray[i][j] + DELIMITER).getBytes());\n else\n fout.write(tableArray[i][j].getBytes());\n\n }\n if(i != rows - 1)\n fout.write(\"\\n\".getBytes());\n }\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n finally {\n if(fout != null)\n fout.close();\n }\n }",
"public void recordOrder(){ \n PrintWriter output = null;\n try{\n output = \n new PrintWriter(new FileOutputStream(\"record.txt\", true));\n }\n catch(Exception e){\n System.out.println(\"File not found\");\n System.exit(0);\n }\n output.println(Tea);//writes into the file contents of String Tea\n output.close();//closes file\n }",
"public Table readTable(String pathName, String filename){\n File file = new File(pathName + filename);\n Table newTable = null;\n Scanner sc; \n //foreign key aspects\n Boolean hasForeignKey = false;\n ArrayList<String> FKIndex; \n String[] line; \n String primaryTableName = \"\", primaryColName = \"\", colName = \"\"; \n String name = \"\";\n\n try {\n sc = new Scanner(file);\n } catch(FileNotFoundException ex) {\n System.out.println(\"ERROR: file not found\");\n return null;\n }\n\n //get table name - always first line\n if (sc.hasNextLine()){\n name = sc.nextLine();\n }\n\n FKIndex = getForeignKeyIndex(pathName);\n //loop over all rows in FKIndex, and check if table has a foreign key\n if(!FKIndex.isEmpty()){\n for(int i = 0; i < FKIndex.size(); i++){\n line = FKIndex.get(i).split(\"\\\\s\"); \n if (line[2].equals(name)){\n hasForeignKey = true;\n primaryTableName = line[0];\n primaryColName = line[1];\n colName = line[3];\n }\n }\n }\n\n //get col names - always second line\n if (sc.hasNextLine()){\n String colNamesString = sc.nextLine();\n //split colNames into individual words as Strings based on whitespace\n String[] colNames = colNamesString.split(\"\\\\s\");\n\n //make table with column names\n if (hasForeignKey){\n newTable = new Table(name, primaryTableName, primaryColName, colName, true, colNames);\n } else {\n newTable = new Table(name, colNames);\n }\n\n //add rows from file (each line)\n while(sc.hasNextLine()){\n String newRowString = sc.nextLine();\n String[] newRow = newRowString.split(\"\\\\s\");\n newTable.addRow(newRow);\n }\n }\n\n sc.close();\n return newTable;\n }",
"private void loadDataFromFile() {\n boolean isLoggedInNew = na.isLoggedIn();\n boolean isLoggedIn = uL.isLoggedIn();\n // load data for new users after sucsessful new account creation\n if (isLoggedInNew) {\n String username = na.getUsername();\n String fileExt = \"_data.txt\";\n String workingDirectory = System.getProperty(\"user.dir\");\n String filePath = workingDirectory + \"\\\\\" + username + fileExt;\n File file = new File(filePath);\n try {\n FileReader fr = new FileReader(file);\n BufferedReader br = new BufferedReader(fr);\n DefaultTableModel model = (DefaultTableModel) remindersTable.getModel();\n Object[] lines = br.lines().toArray();\n for (int i = 0; i < lines.length; i++) {\n String[] row = lines[i].toString().split(\"\\t\");\n model.addRow(row);\n }\n } catch (FileNotFoundException ex) {\n Logger.getLogger(MoneyMinderDesktopMainGui.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n // load data for existing users after sucsessful login\n if (isLoggedIn) {\n String username = uL.getUsername();\n String fileExt = \"_data.txt\";\n String workingDirectory = System.getProperty(\"user.dir\");\n String filePath = workingDirectory + \"\\\\\" + username + fileExt;\n File file = new File(filePath);\n try {\n FileReader fr = new FileReader(file);\n BufferedReader br = new BufferedReader(fr);\n DefaultTableModel model = (DefaultTableModel) remindersTable.getModel();\n Object[] lines = br.lines().toArray();\n for (int i = 0; i < lines.length; i++) {\n String[] row = lines[i].toString().split(\"\\t\");\n model.addRow(row);\n }\n } catch (FileNotFoundException ex) {\n Logger.getLogger(MoneyMinderDesktopMainGui.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }",
"private static void Worker(Connection con, String d1, String d2) throws SQLException, IOException {\n var id = 0;\n var CREATE_USER_ID = 0;\n long CREATE_USER_DATE = 0;\n var url = \"\";\n\n Path path = Paths.get(userHome + \"/photos.txt\");\n var content = \"\";\n\n PreparedStatement ps = con.prepareStatement(\"select id, url, foto, CREATE_USER_ID, CREATE_USER_DATE from lksz.fotok where CREATE_USER_DATE>='\" + d1 + \"' and CREATE_USER_DATE<'\" + d2 + \"' order by id\");\n ResultSet rs = ps.executeQuery();\n while (rs.next()) {\n id = rs.getInt(1);\n url = rs.getString(2);\n CREATE_USER_ID = rs.getInt(4);\n CREATE_USER_DATE = rs.getLong(5);\n\n try {\n Blob b = rs.getBlob(3); //2 means 2nd column data\n if (b != null) {\n byte barr[] = b.getBytes(1, (int) b.length()); //1 means first image\n\n FileOutputStream fout = new FileOutputStream(\"/export/exp/\" + url);\n fout.write(barr);\n\n fout.close();\n }\n } catch (Exception e) {\n System.out.println(e.getMessage());\n }\n System.out.println(ind + \": \" + \"/export/exp/\" + url);\n ind++;\n content = id + \"|\" + url + \"|\" + CREATE_USER_ID + \"|\" + CREATE_USER_DATE + \"\\n\";\n try {\n Files.write(path, content.getBytes(), StandardOpenOption.APPEND);\n } catch (Exception e) {\n System.out.println(e.getMessage());\n }\n }\n rs.close();\n ps.close();\n }",
"public void save() {\n\t\tInputManager.resetWriter(false);\n\t\tInputManager.writer(InputManager.newDelimeterOne + \" \" + InputManager.newDelimeterTwo);\n\t\tfor(Row r: rows) {\n\t\t\tInputManager.writer(r.toString());\n\t\t}\n\t}",
"private void export2(final TableFacade tableFacade,final HttpServletRequest request) {\n\t\ttableFacade.setColumnProperties(\"ascCodigo\", \"ascIngresoCoope\",\n\t\t\t\t\"ascAsociadoPadre\");\n\t\tTable table = tableFacade.getTable();\n\t\t// ---- Titulo de la tabla\n\t\ttable.setCaptionKey(\"tbl.planilla.caption\");\n\n\t\tRow row = table.getRow();\n\t\tColumn nombreColumna = row.getColumn(\"ascCodigo\");\n\t\tnombreColumna.setTitleKey(\"tbl.planilla.ascCodigo.x\");\n\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\tpublic Object getValue(Object item, String property, int rowcount) {\n\t\t\t\tObject value = new BasicCellEditor().getValue(item, property,\n\t\t\t\t\t\trowcount);\n\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\tString codigo = \"'\" + asociado.getAscCodigo();\n\t\t\t\treturn codigo;\n\t\t\t}\n\n\t\t});\n\n\t\tnombreColumna = row.getColumn(\"ascIngresoCoope\");\n\t\tnombreColumna.setTitleKey(\"tbl.planilla.empresa\");\n\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\tpublic Object getValue(Object item, String property, int rowcount) {\n\t\t\t\tObject value = new BasicCellEditor().getValue(item, property,\n\t\t\t\t\t\trowcount);\n\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\tString empresa = \"\";\n\t\t\t\tif (asociado.getAscDirTrabajo() == null\n\t\t\t\t\t\t|| asociado.getAscDirTrabajo().equals(\"\")) {\n\t\t\t\t\tCtaDptDepartamentoTrabajo departamentoTrabajo = asociado\n\t\t\t\t\t\t\t.getCtaDptDepartamentoTrabajo();\n\t\t\t\t\tCtaEtrEmpresaTrabajoDAO empresaTrabajoDAO = new CtaEtrEmpresaTrabajoDAO(getSessionHibernate(request));\n\t\t\t\t\tCtaEtrEmpresaTrabajo empresaTrabajo = empresaTrabajoDAO\n\t\t\t\t\t\t\t.findById(departamentoTrabajo\n\t\t\t\t\t\t\t\t\t.getCtaEtrEmpresaTrabajo().getEtrId());\n\t\t\t\t\tempresa = empresaTrabajo.getEtrNombre();\n\t\t\t\t} else {\n\t\t\t\t\tempresa = asociado.getAscDirTrabajo();\n\t\t\t\t}\n\t\t\t\treturn empresa;\n\t\t\t}\n\n\t\t});\n\n\t\tnombreColumna = row.getColumn(\"ascAsociadoPadre\");\n\t\tnombreColumna.setTitleKey(\"tbl.planilla.total\");\n\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\tpublic Object getValue(Object item, String property, int rowcount) {\n\t\t\t\tObject value = new BasicCellEditor().getValue(item, property,\n\t\t\t\t\t\trowcount);\n\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\tdouble descAportaciones = 0.0;\n\t\t\t\tdescAportaciones += obtenerDescuentos(asociado, \"B\", \"A\",\n\t\t\t\t\t\tdescAportaciones,request);\n\n\t\t\t\tdouble descAhorros = 0.0;\n\t\t\t\tdescAhorros += obtenerDescuentos(asociado, \"B\", \"B\",\n\t\t\t\t\t\tdescAhorros,request);\n\n\t\t\t\tdouble descPrestamos = 0.0;\n\t\t\t\tdescPrestamos += obtenerDescuentos(asociado, \"C\", \"\",\n\t\t\t\t\t\tdescPrestamos,request);\n\n\t\t\t\tdouble descSeguros = 0.0;\n\t\t\t\tdescSeguros += obtenerDescuentos(asociado, \"D\", \"\", descSeguros,request);\n\n\t\t\t\treturn descAportaciones + descAhorros + descPrestamos\n\t\t\t\t\t\t+ descSeguros;\n\t\t\t}\n\t\t});\n\n\t\ttableFacade.render();\n\t}",
"public void savePartialMatrizInFile(String nameFile, int lStart, int cStart, int lAmount, int cAmount)\n {\n //definir dados\n int lin;\n int col;\n int i, j;\n FILE arquivo;\n String linha;\n\n //obter dimensoes de linha e coluna\n lin = lines();\n col = columns();\n\n //abrir arquivo para gravar\n arquivo = new FILE(FILE.OUTPUT, nameFile);\n\n //verificar se arquivo e' valido\n if( arquivo == null )\n {\n IO.println(\"ERRO: Arquivo invalido. \");\n } //end se\n else\n {\n //verificar se dimensoes e table (matriz) e' valida\n if( table == null || lin <= 0 || col <= 0 )\n {\n IO.println(\"ERRO: Matriz invalida. \");\n } //end\n else\n {\n //verificar se a quantidade de linhas e/ou colunas sao validas\n if( lAmount <= 0 || lAmount > lin ||\n cAmount <= 0 || cAmount > col )\n {\n IO.println(\"ERRO: Quantidade de linhas/colunas invalida(s). \");\n } //end\n else\n {\n //verificar se posicao inicial e' valida\n if( lStart < 0 || lStart > lin || lStart > (lin - lAmount) ||\n cStart < 0 || cStart > col || cStart > (col - cAmount))\n {\n IO.println(\"ERRO: Posicoe(s) iniciais invalida(s). \");\n } //end\n else\n {\n //gravar a quantidade\n arquivo.println(\"\" + lAmount);\n arquivo.println(\"\" + cAmount);\n\n //repete para gravar os dados\n for( i = 0; i < lAmount; i++)\n {\n for(j = 0; j < cAmount; j++)\n {\n arquivo.println(\"\"+ table[ i ][ j ]);\n } //end repetir\n } //end repetir\n //fechar arquivo (indispensavel)\n arquivo.close();\n } //end se\n } //end se\n } //end se\n } //end se\n }",
"public static void LineArchive() throws ClassNotFoundException, SQLException {\r\n Statement s1 = DBConnect.connection.createStatement();\r\n String writeLine = \"INSERT INTO completed_lines \"\r\n + \"(Line, Sku, Qty, Description1, Orig_Sku, Description2, Attribute2, Size2, Orig_Retail, Manuf_Inspection, New_Used, Reason, \"\r\n + \"Desc_Damage, Cust_Satisf, Warranty, Second_Cost, Form_Name, Ln_Date, Second_Sku_Vendor, Second_Sku_VPNum, Ord_C$, New_Sku, \"\r\n + \"First_DCS, Second_DCS) SELECT * FROM \" + InvAdj_Admin.frmNm + \" WHERE Sku IS NOT NULL\";\r\n \r\n // This inserts store and form name because I could not figure out how to include it in the insert statement above\r\n String setStrFmNm = \"UPDATE completed_lines \"\r\n // + \"SET Form_Name = '\" + InvAdj_Admin.frmNm + \"'\" + \",\"\r\n + \"SET Store = '\" + InvAdj_Admin.frmNm.split(\"_\")[1] + \"' \"\r\n + \"WHERE Sku IS NOT NULL AND Form_Name = '\"+ InvAdj_Admin.frmNm +\"'\";\r\n s1.execute(writeLine); \r\n s1.execute(setStrFmNm);\r\n }",
"protected void _dumpTable(PrintWriter dumpOutStream, boolean inclHeader, DBSelect<gDBR> dsel, String fldn[], int outFmt)\n throws DBException\n { // rs\n\n /* validate filename */\n if (dumpOutStream == null) {\n throw new DBException(\"Output stream not specified\");\n }\n\n /* validate DBSelect */\n if (dsel == null) {\n //throw new DBException(\"DBSelect must not be null\");\n dsel = new DBSelect<gDBR>(this);\n } else\n if (!this.equals(dsel.getFactory())) {\n // DBFactory instances do not match\n throw new DBException(\"DBSelect factory does not match this factory\");\n }\n\n /* dump to PrintWriter */\n DBConnection dbc = null;\n Statement stmt = null;\n ResultSet rs = null;\n DBField fields[] = this.getFields(fldn);\n try {\n StringBuffer sbData = new StringBuffer();\n\n /* field header */\n if (inclHeader) {\n sbData.setLength(0);\n if (outFmt == DUMP_FORMAT_CSV) {\n // .CSV format\n for (int i = 0; i < fields.length; i++) {\n if (i > 0) { sbData.append(\",\"); }\n sbData.append(\"\\\"\" + fields[i].getName() + \"\\\"\");\n }\n sbData.append(\"\\n\");\n } else\n if (outFmt == DUMP_FORMAT_XML) {\n // .XML format\n sbData.append(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n\");\n sbData.append(\"<\" + TAG_Records);\n sbData.append(\" \" + ATTR_table + \"=\\\"\" + this.getUntranslatedTableName() + \"\\\"\");\n sbData.append(\">\\n\");\n } else\n if (outFmt == DUMP_FORMAT_SQL) {\n // .SQL format\n sbData.append(\"# \");\n for (int i = 0; i < fields.length; i++) {\n if (i > 0) { sbData.append(\", \"); }\n sbData.append(fields[i].getName());\n }\n sbData.append(\"\\n\");\n } else {\n // ??? format\n }\n dumpOutStream.write(sbData.toString());\n }\n sbData.setLength(0);\n\n /* get result set */\n // MySQL can create/cause an OutOfMemoryError here (and has):\n // http://forums.mysql.com/read.php?39,152636,153012#msg-153012\n // http://forums.mysql.com/read.php?39,152636,153560#msg-153560\n try {\n // Retrieved rowByRow: \"http://forums.mysql.com/read.php?39,152636,153012#msg-153012\"\n dbc = DBConnection.getDBConnection_read();\n stmt = dbc.execute(dsel.toString(), true); // row by row\n rs = stmt.getResultSet();\n } catch (OutOfMemoryError oome) {\n Print.logException(\"Out of memory\", oome);\n throw new DBException(\"Out of memeory\", oome);\n } // dbc released below\n\n /* iterate through result set */\n long recordCount = 0L;\n while (rs.next()) {\n recordCount++;\n //Print.logInfo(\"Record #\" + recordCount);\n sbData.setLength(0);\n if (outFmt == DUMP_FORMAT_CSV) {\n // .CSV format\n for (int i = 0; i < fields.length; i++) {\n if (i > 0) { sbData.append(\",\"); }\n String n = fields[i].getName();\n Object r = fields[i].getResultSetValue(rs);\n String v = (r != null)? r.toString() : \"\";\n //String v = rs.getString(n);\n sbData.append(fields[i].getQValue(v));\n }\n sbData.append(\"\\n\");\n } else\n if (outFmt == DUMP_FORMAT_XML) {\n // .XML format\n int indent = 3;\n String prefix = StringTools.replicateString(\" \", indent);\n sbData.append(prefix).append(\"<\"+TAG_Record+\" \" + ATTR_sequence + \"=\\\"\" + recordCount + \"\\\">\\n\");\n for (int i = 0; i < fields.length; i++) {\n String value = DBFieldValues.toStringValue(fields[i].getResultSetValue(rs));\n DBFactory.writeXML_DBField(sbData, 2*indent, fields[i], false/*inclInfo*/, value);\n }\n sbData.append(prefix).append(\"</\"+TAG_Record+\">\\n\");\n } else\n if (outFmt == DUMP_FORMAT_SQL) {\n // .SQL format\n for (int i = 0; i < fields.length; i++) {\n if (i > 0) { sbData.append(\", \"); }\n String n = fields[i].getName();\n Object r = fields[i].getResultSetValue(rs);\n String v = (r != null)? r.toString() : \"\";\n //String v = rs.getString(n);\n sbData.append(fields[i].getQValue(v));\n }\n sbData.append(\"\\n\");\n } else {\n // ??? format\n }\n dumpOutStream.write(sbData.toString());\n }\n\n /* field footer */\n sbData.setLength(0);\n if (outFmt == DUMP_FORMAT_CSV) {\n // .CSV format\n // (nothing need be done here)\n } else\n if (outFmt == DUMP_FORMAT_XML) {\n // .XML format\n sbData.append(\"</\" + TAG_Records + \">\\n\");\n } else\n if (outFmt == DUMP_FORMAT_SQL) {\n // .SQL format\n // (nothing need be done here)\n } else {\n // ??? format\n }\n dumpOutStream.write(sbData.toString());\n dumpOutStream.flush();\n\n } catch (DBException dbe) {\n throw dbe; // re-throw\n } catch (SQLException sqe) {\n throw new DBException(\"Dumping table\", sqe);\n } catch (Throwable th) {\n throw new DBException(\"Dumping table\", th);\n } finally {\n if (rs != null) { try{ rs.close(); } catch (SQLException sqe) {} }\n if (stmt != null) { try{ stmt.close(); } catch (SQLException sqe) {} }\n DBConnection.release(dbc);\n }\n \n }",
"public static void save() {\r\n\t\ttry {\r\n\t\t\tFile csv = new File(\"src/transaction.csv\");\r\n\t\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(csv, false));\r\n\t\t\tbw.write(\"type,account number,amount,year,month,date,cleared\");\r\n\t\t\tbw.newLine();\r\n\t\t\tfor (int i = 0; i < transList.size(); i++) {\r\n\t\t\t\tbw.write(transList.get(i).toFile());\r\n\t\t\t\tbw.newLine();\r\n\t\t\t}\r\n\t\t\tbw.close();\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"@Override\n public File importCSV(String query) {\n String retorno = executeQuery(query);\n File file = new File(\"export.csv\");\n try {\n file.createNewFile();\n if(file.exists()){\n try (Writer writer = new FileWriter(file)) {\n writer.append(retorno);\n writer.flush();\n }\n }\n } catch (IOException ex) {\n Logger.getLogger(SQLUtilsImpl.class.getName()).log(Level.SEVERE, null, ex);\n }\n return file;\n }",
"public void reloadTable() {\n\n this.removeAllData();// borramos toda la data \n for (int i = 0; i < (list.size()); i++) { // este for va de la primera casilla hast ael largo del arreglo \n Balanza object = list.get(i);\n this.AddtoTable(object);\n }\n\n }",
"private void cargarTabla() {\n\t\tObject[] fila = new Object[7];\r\n\t\tfila[1] = txtCedula.getText();\r\n\t\tfila[2] = txtFuncionario.getText();\r\n\t\tfila[3] = util.getDateToString(dcDesde.getDate());\r\n\t\tif (cbTipo.getSelectedIndex() == 1 || cbTipo.getSelectedIndex() == 2) {\r\n\t\t\tfila[4] = util.getDateToString(dcDesde.getDate());\r\n\t\t} else {\r\n\t\t\tfila[4] = util.getDateToString(dcHasta.getDate());\r\n\t\t}\r\n\t\tfila[5] = cbTipo.getSelectedItem();\r\n\t\tfila[6] = txtMotivo.getText().toUpperCase();\r\n\t\tthis.modelo.addRow(fila);\r\n\t\ttbJustificaciones.setModel(this.modelo);\r\n\t}"
] | [
"0.6205184",
"0.61504096",
"0.6086403",
"0.6054687",
"0.6021693",
"0.5952179",
"0.5929593",
"0.5908672",
"0.5847858",
"0.5826207",
"0.5805761",
"0.57974434",
"0.5794769",
"0.57822824",
"0.57728004",
"0.57680744",
"0.5752242",
"0.57479596",
"0.57456326",
"0.5737319",
"0.57251406",
"0.56996125",
"0.5698882",
"0.5686298",
"0.56684417",
"0.5650901",
"0.56352973",
"0.5620443",
"0.5603086",
"0.5590564",
"0.55838096",
"0.55818117",
"0.5578492",
"0.5572447",
"0.5559366",
"0.5555949",
"0.55557287",
"0.55498683",
"0.55453545",
"0.55367297",
"0.552478",
"0.55003",
"0.5490844",
"0.548602",
"0.54752433",
"0.5468496",
"0.545077",
"0.5445526",
"0.54451954",
"0.5440787",
"0.5440471",
"0.54369533",
"0.54192203",
"0.541892",
"0.5405091",
"0.540068",
"0.5393584",
"0.5388658",
"0.53865767",
"0.53788924",
"0.5378228",
"0.5375732",
"0.53729457",
"0.5369907",
"0.5367656",
"0.53638",
"0.53596663",
"0.5353397",
"0.5352841",
"0.53504395",
"0.5348469",
"0.5347898",
"0.53459555",
"0.53417504",
"0.5341394",
"0.5338309",
"0.5335539",
"0.53181815",
"0.5315555",
"0.530972",
"0.53087866",
"0.5304268",
"0.53016365",
"0.52988607",
"0.52963513",
"0.5292559",
"0.529083",
"0.52894664",
"0.5288115",
"0.52862215",
"0.52847207",
"0.5282834",
"0.5275876",
"0.52646506",
"0.526451",
"0.52629733",
"0.5261387",
"0.5257848",
"0.525659",
"0.52556765"
] | 0.61551934 | 1 |
Add a selected part to the current product | @FXML
void onActionAddPart(ActionEvent event) {
Part part = TableView1.getSelectionModel().getSelectedItem();
if(part == null)
return;
else {
product.getAllAssociatedParts().add(part);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@FXML void onActionModifyProductAdd(ActionEvent event) {\n Part selectedPart = partTableView.getSelectionModel().getSelectedItem();\n tmpAssociatedParts.add(selectedPart);\n }",
"@Override\r\n\tpublic void BulidPartA() {\n\t product.add(\"part A\");\r\n\r\n\t}",
"public void addPart() {\n\n if(isValidPart()) {\n double price = Double.parseDouble(partPrice.getText());\n String name = partName.getText();\n int stock = Integer.parseInt(inventoryCount.getText());\n int id = Integer.parseInt(partId.getText());\n int minimum = Integer.parseInt(minimumInventory.getText());\n int maximum = Integer.parseInt(maximumInventory.getText());\n String variableText = variableTextField.getText();\n\n if (inHouse.isSelected()) {\n InHouse newPart = new InHouse(id,name,price,stock,minimum,maximum,Integer.parseInt(variableText));\n if (PassableData.isModifyPart()) {\n Controller.getInventory().updatePart(PassableData.getPartIdIndex(), newPart);\n } else {\n Controller.getInventory().addPart(newPart);\n }\n\n } else if (outsourced.isSelected()) {\n Outsourced newPart = new Outsourced(id,name,price,stock,minimum,maximum,variableText);\n if (PassableData.isModifyPart()) {\n Controller.getInventory().updatePart(PassableData.getPartIdIndex(), newPart);\n } else {\n Controller.getInventory().addPart(newPart);\n }\n }\n try {\n InventoryData.getInstance().storePartInventory();\n InventoryData.getInstance().storePartIdIndex();\n } catch (IOException e) {\n e.printStackTrace();\n }\n exit();\n\n }\n }",
"public void addPart(Part newPart) {\n allParts.add(newPart);\n }",
"public void getSelectedPart(Part selectedPart){\n this.part = selectedPart;\n if(selectedPart instanceof InHouse){\n labelPartSource.setText(\"Machine ID\");\n InHouse inHouse = (InHouse)selectedPart;\n ModPartIDField.setText(Integer.toString(inHouse.getId()));\n ModPartNameField.setText(inHouse.getName());\n ModPartInventoryField.setText(Integer.toString(inHouse.getStock()));\n ModPartPriceField.setText(Double.toString(inHouse.getPrice()));\n ModPartMaxField.setText(Integer.toString(inHouse.getMax()));\n ModPartMinField.setText(Integer.toString(inHouse.getMin()));\n partSourceField.setText(Integer.toString(inHouse.getMachineId()));\n inHouseRadBtn.setSelected(true);\n } else if (selectedPart instanceof Outsourced){\n labelPartSource.setText(\"Company Name\");\n Outsourced outsourced = (Outsourced) selectedPart;\n ModPartIDField.setText(Integer.toString(outsourced.getId()));\n ModPartNameField.setText(outsourced.getName());\n ModPartInventoryField.setText(Integer.toString(outsourced.getStock()));\n ModPartPriceField.setText(Double.toString(outsourced.getPrice()));\n ModPartMaxField.setText(Integer.toString(outsourced.getMax()));\n ModPartMinField.setText(Integer.toString(outsourced.getMin()));\n partSourceField.setText(outsourced.getCompanyName());\n OutsourcedRadBtn.setSelected(true);\n }\n }",
"@FXML private void handleAddProdAdd(ActionEvent event) {\n if (fxidAddProdAvailableParts.getSelectionModel().getSelectedItem() != null) {\n //get the selected part from the available list\n Part tempPart = fxidAddProdAvailableParts.getSelectionModel().getSelectedItem();\n //save it to our temporary observable list\n partToSave.add(tempPart);\n //update the selected parts list\n fxidAddProdSelectedParts.setItems(partToSave); \n } else {\n Alert partSearchError = new Alert(Alert.AlertType.INFORMATION);\n partSearchError.setHeaderText(\"Error!\");\n partSearchError.setContentText(\"Please select a part to add.\");\n partSearchError.showAndWait();\n }\n }",
"@Override\r\n\tpublic void BulidPartB() {\n\t\tproduct.add(\"part B\");\r\n\t}",
"public void add(Product p) {\r\n\t\tparts.add(p);\r\n\t}",
"public void addPart(Part part) {\n allParts.add(part);\n }",
"public static void addPart(Part newpart){\r\n System.out.println(\"Adding Part...\" + newpart.getPartName());\r\n Part.partsMap.put(partInvMap.size(),newpart);\r\n\r\n }",
"public static void addPart(Part newPart) {\n allParts.add(newPart);\n }",
"public void addPart() {\n\t\tengineCat.addPart(eg100);\n\t\tengineCat.addPart(eg133);\n\t\tengineCat.addPart(eg210);\n\t\tengineCat.addPart(ed110);\n\t\tengineCat.addPart(ed180);\n\t\tengineCat.addPart(eh120);\n\t\t\n\t\ttransCat.addPart(tm5);\n\t\ttransCat.addPart(tm6);\n\t\ttransCat.addPart(ta5);\n\t\ttransCat.addPart(ts6);\n\t\ttransCat.addPart(tsf7);\n\t\ttransCat.addPart(tc120);\n\t\t\n\t\textCat.addPart(xc);\n\t\textCat.addPart(xm);\n\t\textCat.addPart(xs);\n\t\t\n\t\tintCat.addPart(in);\n\t\tintCat.addPart(ih);\n\t\tintCat.addPart(is);\n\t}",
"@FXML\r\n private void addPartAction() throws IOException {\r\n \r\n generateScreen(\"AddModifyPartScreen.fxml\",\"Add Part\");\r\n updatePartsTable(stock.getAllParts());\r\n \r\n }",
"public void addProduct(){\n\t\tSystem.out.println(\"Company:\");\n\t\tSystem.out.println(theHolding.fabricationCompanies());\n\t\tint selected = reader.nextInt();\n\t\treader.nextLine();\n\t\tif(selected > theHolding.getSubordinates().size()-1){\n\t\t\tSystem.out.println(\"Please select a correct option\");\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"Name:\");\n\t\t\tString name = reader.nextLine();\n\t\t\tSystem.out.println(\"Code:\");\n\t\t\tString code = reader.nextLine();\n\t\t\tSystem.out.println(\"Water quantity require:\");\n\t\t\tdouble waterQuantity = reader.nextDouble();\n\t\t\treader.nextLine();\n\t\t\tSystem.out.println(\"Inventory:\");\n\t\t\tint inventory = reader.nextInt();\n\t\t\treader.nextLine();\n\t\t\tProduct toAdd = new Product(name, code, waterQuantity, inventory);\n\t\t\ttheHolding.addProduct(selected, toAdd);\n\t\t\tSystem.out.println(\"The product were added successfuly\");\n\t\t}\n\t}",
"public void addPart(int number, GUI_Part p) {\r\n \t\tstands[number].kit.addPart(p);\r\n \t}",
"ProductView addProduct(ProductBinding productToAdd) throws ProductException;",
"void setData(Part selectedPart) {\n\n this.selectedPart = selectedPart;\n partIDTextField.setText(String.valueOf(selectedPart.getPartsID())); // Setting value of part id to the Modify window\n partNameTextField.setText(\"\" + selectedPart.getPartsName()); // Setting value of part name to the Modify window\n partLnvField.setText(\"\" + selectedPart.getPartsLevel()); // Setting value of part lnv to the Modify window\n partPriceField.setText(\"\" + selectedPart.getPartsCost()); // Setting value of part price to the Modify window\n editData = true; // Setting value of editData boolean flas to true for the Modify window to activate\n partMaxField.setText(\"\" + selectedPart.getPartMax());\n partMinField.setText(\"\" + selectedPart.getPartMin());\n if (selectedPart.inHouse) {\n inHouseButtonAction(null);\n partMachineIDField.setText(\"\" + selectedPart.getCompanyNameOrMachineID()); // setting machineid for inhouse parts\n } else {\n outsourceButtonPress(null);\n partCompanyNameField.setText(\"\" + selectedPart.getCompanyNameOrMachineID()); // setting company name for outsourced parts\n }\n }",
"public void addToOrder() {\n OrderLine orderLine = new OrderLine(order.lineNumber++, sandwhich, sandwhich.price());\n order.add(orderLine);\n ObservableList<Extra> selected = extraSelected.getItems();\n orderPrice.clear();\n String price = new DecimalFormat(\"#.##\").format(sandwhich.price());\n orderPrice.appendText(\"$\"+price);\n extraOptions.getItems().addAll(selected);\n extraSelected.getItems().removeAll(selected);\n pickSandwhich();\n\n\n\n }",
"@FXML\n\tprivate void addButtonAction(ActionEvent clickEvent) {\n\t\t\n\t\tPart addPartToProduct = partSearchProductTable.getSelectionModel().getSelectedItem();\n\t\t\n\t\tif (addPartToProduct != null) {\n\t\t\t\n\t\t\tif(dummyList.contains(addPartToProduct) == false) {\n\t\t\t\t\n\t\t\t\tdummyList.add(addPartToProduct);\n\t\t\t}\n\t\t}\n\t}",
"@Override\n\tpublic void buildPartA() {\n\t\tproduct.add(\"部件X\");\n\t}",
"@FXML\n void addButton(ActionEvent event) {\n\n Part selectedPart = partTableView.getSelectionModel().getSelectedItem();\n\n if (selectedPart == null) {\n AlartMessage.displayAlertAdd(6);\n } else {\n assocParts.add(selectedPart);\n assocPartTableView.setItems(assocParts);\n }\n }",
"public void addAssociatedPart(ActionEvent actionEvent) {\n Part selectedAssociatedPart;\n selectedAssociatedPart = (Part) partsTableView.getSelectionModel().getSelectedItem();\n associatedPartTableViewHolder.add(selectedAssociatedPart);\n\n associatedPartsTableView.setItems(associatedPartTableViewHolder);\n }",
"Builder addHasPart(CreativeWork value);",
"@Override\r\n\tpublic void buildPart1() {\n\t\tproduct.setPart1(\"ASPEC1\");\r\n\t}",
"public void addAssociatedPart(Part part) {\n associatedParts.add(part);\n }",
"public void addAssociatedPart(Part part) {\n associatedParts.add(part);\n }",
"@Override\r\n\tpublic void buildPart3() {\n\t\tproduct.setPart3(\"ASPEC3\");\r\n\t}",
"public void handleAddParts()\n {\n FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource(\"/UI/Views/parts.fxml\"));\n Parent root = null;\n try {\n root = (Parent) fxmlLoader.load();\n\n // Get controller and configure controller settings\n PartController partController = fxmlLoader.getController();\n partController.setModifyParts(false);\n partController.setInventory(inventory);\n partController.setHomeController(this);\n\n // Spin up part form\n Stage stage = new Stage();\n stage.initModality(Modality.APPLICATION_MODAL);\n stage.initStyle(StageStyle.DECORATED);\n stage.setTitle(\"Add Parts\");\n stage.setScene(new Scene(root));\n stage.show();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void updatePart(int index, Part selectedPart) {\n Part part = allParts.get(index);\n part.setId(selectedPart.getId());\n part.setName(selectedPart.getName());\n part.setPrice(selectedPart.getPrice());\n part.setStock(selectedPart.getStock());\n part.setMin(selectedPart.getMin());\n part.setMax(selectedPart.getMax());\n if(part instanceof InHousePart) {\n ((InHousePart)part).setMachineId(((InHousePart)selectedPart).getMachineId());\n } else if(part instanceof OutSourcedPart) {\n ((OutSourcedPart)part).setCompanyName(((OutSourcedPart)part).getCompanyName());\n }\n }",
"public void replacePart(Part modifiedPart) {\r\n Part newPart;\r\n String name, compName;\r\n double price;\r\n int id, inv, max, min, machId;\r\n //Gets the ID of the last part in the inventory and adds 1 to it \r\n id = Inventory.getAllParts().get(Inventory.getAllParts().size() - 1).getId() + 1;\r\n name = nameField.getText();\r\n inv = Integer.parseInt(invField.getText());\r\n price = Double.parseDouble(priceField.getText());\r\n max = Integer.parseInt(maxField.getText());\r\n min = Integer.parseInt(minField.getText());\r\n\r\n if (inHouseSelected) {\r\n machId = Integer.parseInt(machineOrCompanyField.getText());\r\n newPart = new InHouse(id, name, price, inv, min, max, machId);\r\n } else {\r\n compName = machineOrCompanyField.getText();\r\n newPart = new Outsourced(id, name, price, inv, min, max, compName);\r\n }\r\n newPart.setId(modifiedPart.getId());\r\n Inventory.updatePart(Inventory.getAllParts().indexOf(modifiedPart), newPart);\r\n }",
"public void addExtras() {\n ObservableList<Extra> selected = extraOptions.getSelectionModel().getSelectedItems();\n if(extraSelected.getItems().size() > 5 || selected.size() > 6){\n Alert alert = new Alert(Alert.AlertType.WARNING);\n alert.setTitle(\"Warning!!\");\n alert.setHeaderText(\"No more than 6 toppings allowed!\");\n alert.setContentText(\"Please select 6 or less toppings.\");\n alert.showAndWait();\n } else {\n sandwhich.add(selected);\n extraSelected.getItems().addAll(selected);\n extraOptions.getItems().removeAll(selected);\n orderPrice.clear();\n String price = new DecimalFormat(\"#.##\").format(sandwhich.price());\n orderPrice.appendText(\"$\"+price);\n }\n }",
"public addproduct() {\n\t\tsuper();\n\t}",
"public void addProduct(Product p) {\n c.addProduct(p);\n }",
"@FXML\r\n private void modifyPartAction() throws IOException {\r\n \r\n if (!partsTbl.getSelectionModel().isEmpty()) {\r\n Part selected = partsTbl.getSelectionModel().getSelectedItem();\r\n partToMod = selected.getId();\r\n generateScreen(\"AddModifyPartScreen.fxml\", \"Modify Part\");\r\n }\r\n else {\r\n displayMessage(\"No part selected for modification\");\r\n }\r\n \r\n }",
"public void addPartNumber(String partNumber){partNumbers.add(partNumber);}",
"@Override\r\n\tpublic void buildPart2() {\n\t\tproduct.setPart2(\"ASPEC2\");\r\n\t}",
"public static ArrayList<Product> addNewProduct() {\r\n\r\n\t\tSupplier selectedSup = Part02Tester.getSupplier();\r\n\r\n\t\tArrayList<Product> newProductArray = addProduct();\r\n\r\n\t\tProduct newProduct = newProductArray.get(0);\r\n\r\n\t\tArrayList<Product> prodList = selectedSup.getSupProducts();\r\n\r\n\t\tprodList.add(newProduct);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//The product is then added to the array list for the specified supplier\r\n\t\treturn newProductArray;\r\n\r\n\t}",
"public void addProduct(Product product);",
"void addProduct(Product product);",
"public void registraPart(Part part) throws RemoteException, PartRegistradaException;",
"@Override\r\n\tpublic void buildPart() {\n\t\t\r\n\t}",
"public void add() {\n preAdd();\n EntitySelect<T> entitySelect = getEntitySelect();\n entitySelect.setMultiSelect(true);\n getEntitySelect().open();\n }",
"public void addSelectionToRetained() {\n retained_nodes.addAll(getRTParent().getSelectedEntities());\n newBundlesRoot(getRTParent().getRootBundles());\n }",
"public void addProduct() throws Throwable\r\n\t{\r\n\t\tgoToProductsSection();\r\n\t\tverifyProduct();\r\n\t\tselPproductBtn.click();\r\n\t\twdlib.verify(wdlib.getPageTitle(),flib.getPropKeyValue(PROP_PATH, \"ProductsPage\") , \"Products Page \");\r\n\t\tProductsPage pdpage=new ProductsPage();\r\n\t\tpdpage.selectProducts();\r\n\t}",
"public boolean addChildPart( T part ) {\r\n\t\treturn _parts.add( part );\r\n\t}",
"private void addProduct() {\n String type = console.readString(\"type (\\\"Shirt\\\", \\\"Pant\\\" or \\\"Shoes\\\"): \");\n String size = console.readString(\"\\nsize: \");\n int qty = console.readInt(\"\\nQty: \");\n int sku = console.readInt(\"\\nSKU: \");\n Double price = console.readDouble(\"\\nPrice: \");\n int reorderLevel = console.readInt(\"\\nReorder Level: \");\n daoLayer.addProduct(type, size, qty, sku, price, reorderLevel);\n\n }",
"public void saveExisting() {\r\n Part modifiedPart = null;\r\n for (Part part : Inventory.getAllParts()) {\r\n if (Integer.parseInt(iDfield.getText()) == part.getId()) {\r\n modifiedPart = part;\r\n }\r\n }\r\n if (modifiedPart instanceof Outsourced && inHouseSelected) {\r\n replacePart(modifiedPart);\r\n\r\n } else if (modifiedPart instanceof InHouse && !inHouseSelected) {\r\n replacePart(modifiedPart);\r\n } else {\r\n modifiedPart.setName(nameField.getText());\r\n modifiedPart.setStock(Integer.parseInt(invField.getText()));\r\n modifiedPart.setPrice(Double.parseDouble(priceField.getText()));\r\n modifiedPart.setMax(Integer.parseInt(maxField.getText()));\r\n modifiedPart.setMin(Integer.parseInt(minField.getText()));\r\n if (inHouseSelected) {\r\n ((InHouse) modifiedPart).setMachineId(Integer.parseInt(machineOrCompanyField.getText()));\r\n } else {\r\n ((Outsourced) modifiedPart).setCompanyName(machineOrCompanyField.getText());\r\n }\r\n\r\n Inventory.updatePart(Inventory.getAllParts().indexOf(modifiedPart), modifiedPart);\r\n }\r\n\r\n }",
"public void addChildToShoppingCart() {\n System.out.println(this.offerTable.getSelectionModel().getSelectedItem());\n // TODO [assignment_final] pridani aktualniho vyberu do kosiku\n // - pri pridani prvku do kosiku aktualizuji hodnotu \"budgetu\" v UI\n }",
"@FXML\n void saveModifyProductButton(ActionEvent event) throws IOException {\n\n try {\n int id = selectedProduct.getId();\n String name = productNameText.getText();\n Double price = Double.parseDouble(productPriceText.getText());\n int stock = Integer.parseInt(productInventoryText.getText());\n int min = Integer.parseInt(productMinText.getText());\n int max = Integer.parseInt(productMaxText.getText());\n\n if (name.isEmpty()) {\n AlartMessage.displayAlertAdd(5);\n } else {\n if (minValid(min, max) && inventoryValid(min, max, stock)) {\n\n Product newProduct = new Product(id, name, price, stock, min, max);\n\n assocParts.forEach((part) -> {\n newProduct.addAssociatedPart(part);\n });\n\n Inventory.addProduct(newProduct);\n Inventory.deleteProduct(selectedProduct);\n mainScreen(event);\n }\n }\n } catch (IOException | NumberFormatException e){\n AlartMessage.displayAlertAdd(1);\n }\n }",
"QuestionPick addPickDetail(Question question);",
"public void associateProductTemplate() {\n productToolOperation.addChildProductTree(selectProductNode, selectTemplateNode, planConfigBehavior);\n }",
"private void addProduct()\n {\n System.out.println(\"|➕| Add new Product:\\n\");\n System.out.println(\"|➕| Enter ID\\n\");\n int id = Integer.parseInt(reader.getInput());\n System.out.println(\"|➕| Enter Name\\n\");\n String name = reader.getInput();\n manager.addProduct(id, name);\n }",
"@Override\n\tpublic void buildPartB() {\n\t\tproduct.add(\"部件Y\");\n\t}",
"public static void updatePart(int index, Part selectedPart) {\n allParts.set(index, selectedPart);\n }",
"Builder addHasPart(CreativeWork.Builder value);",
"public void setProduct(Product selectedProduct) {\n\t\t\n\t\tthis.modifiedProduct = selectedProduct;\n\n\t\tidField.setText(Integer.toString(modifiedProduct.getId()));\n\t\tproductNameField.setText(modifiedProduct.getName());\n\t\tpriceField.setText(Double.toString(modifiedProduct.getPrice()));\n\t\tinvField.setText(Integer.toString(modifiedProduct.getStock()));\n\t\tmaxField.setText(Integer.toString(modifiedProduct.getMax()));\n\t\tminField.setText(Integer.toString(modifiedProduct.getMin()));\n\t\t\t\t\n\t\tdummyList = modifiedProduct.getAllAssociatedParts();\n\t\tpartListProductTable.setItems(dummyList);\n\t}",
"public void addProduct() {\n Product result;\n String prodName = getToken(\"Enter product name: \");\n double price = getDouble(\"Enter price per unit: $\");\n result = warehouse.addProduct(prodName, price);\n if (result != null) {\n System.out.println(result);\n }\n else {\n System.out.println(\"Product could not be added.\");\n }\n }",
"public void Addproduct(Product objproduct) {\n\t\t\n\t}",
"public void addSelectedElement(ReportElement el, boolean fireEvent) {\r\n if (selectedElements.contains(el)) return;\r\n\r\n if (isDefaultCellMode() != (el.getCell().getType() == CrosstabCell.NODATA_CELL)) return;\r\n //label1.setText(\"ADDED\");\r\n // Faccio una corona non selected attorno al nuovo elemento...\r\n Rectangle rect = new Rectangle(el.position.x-5,el.position.y-5,el.width+10, el.height+10);\r\n selectedElements.addElement(el);\r\n\r\n this.repaint();\r\n if (fireEvent) {\r\n fireSelectionChangedEvent();\r\n }\r\n\r\n getMainFrame().setCutCopyEnabled(true);\r\n }",
"public void addProduct(String name, double val, int q) {\n\t\tproducts.add(new Products(name, val, q));\n\t}",
"@FXML\n\tpublic void addIngredientToProduct(ActionEvent event) {\n\t\tIngredient ingredient = restaurant.returnIngredient(ChoiceIngredients.getValue());\n\t\tboolean ingredientExists = false;\n\n\t\tfor (int i = 0; i < selectedIngredients.size() && ingredientExists == false; i++) {\n\t\t\tif (selectedIngredients.get(i).equalsIgnoreCase(ChoiceIngredients.getValue())) {\n\t\t\t\tingredientExists = true;\n\t\t\t}\n\t\t}\n\t\tif (ingredientExists == false) {\n\t\t\tif (ChoiceIngredients.getValue() != null) {\n\t\t\t\tif (ingredient.getCondition() == Condition.ACTIVE) {\n\t\t\t\t\tselectedIngredients.add(ChoiceIngredients.getValue());\n\t\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\t\tdialog.setContentText(\n\t\t\t\t\t\t\t\"Ingrediente \" + ChoiceIngredients.getValue() + \" ha sido añadido al producto\");\n\t\t\t\t\tdialog.setTitle(\"Adicion de Ingrediente satisfactoria\");\n\t\t\t\t\tdialog.show();\n\t\t\t\t} else {\n\t\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\t\tdialog.setContentText(\"El ingrediente ha sido deshabilitado por lo que no puede ser utilizado\");\n\t\t\t\t\tdialog.setTitle(\"Error, ingrediente Deshabilitado\");\n\t\t\t\t\tdialog.show();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\tdialog.setContentText(\"Debe escoger algun ingrediente para que pueda ser añadido\");\n\t\t\t\tdialog.setTitle(\"Campo requerido\");\n\t\t\t\tdialog.show();\n\t\t\t}\n\t\t} else {\n\t\t\tDialog<String> dialog = createDialog();\n\t\t\tdialog.setContentText(\"El ingrediente con el nombre \" + ChoiceIngredients.getValue() + \" ya existe\");\n\t\t\tdialog.setTitle(\"Error, Ingrediente existente\");\n\t\t\tdialog.show();\n\t\t}\n\n\t}",
"public void selectProduct() {\n\t\tActions obj = new Actions(driver);\n\t\tobj.moveToElement(driver.findElements(By.xpath(\".//*[@id='center_column']/ul/li\")).get(0)).build().perform();\n\t\tdriver.findElement(By.xpath(\".//*[@id='center_column']/ul/li[1]/div/div[2]/div[2]/a[1]/span\")).click();\n\t}",
"public void pickUp(Product product) {\n\t\tgetProductsOnFork().add(product);\n\t}",
"public void saveNew() {\r\n String name, compName;\r\n double price;\r\n int id, inv, max, min, machId;\r\n //Gets the ID of the last part in the inventory and adds 1 to it \r\n id = Inventory.getAllParts().get(Inventory.getAllParts().size() - 1).getId() + 1;\r\n name = nameField.getText();\r\n inv = Integer.parseInt(invField.getText());\r\n price = Double.parseDouble(priceField.getText());\r\n max = Integer.parseInt(maxField.getText());\r\n min = Integer.parseInt(minField.getText());\r\n\r\n if (inHouseSelected) {\r\n machId = Integer.parseInt(machineOrCompanyField.getText());\r\n Part newPart = new InHouse(id, name, price, inv, min, max, machId);\r\n Inventory.addPart(newPart);\r\n } else {\r\n compName = machineOrCompanyField.getText();\r\n Part newPart = new Outsourced(id, name, price, inv, min, max, compName);\r\n Inventory.addPart(newPart);\r\n }\r\n\r\n }",
"public void addClicked(View v){\n android.util.Log.d(this.getClass().getSimpleName(), \"add Clicked. Adding: \" + this.nameET.getText().toString());\n try{\n PartnerDB db = new PartnerDB((Context)this);\n SQLiteDatabase plcDB = db.openDB();\n ContentValues hm = new ContentValues();\n hm.put(\"name\", this.nameET.getText().toString());\n double hours = Double.parseDouble(this.tippableHoursET.getText().toString());\n hm.put(\"tippableHours\", hours);\n double tipsPerHour = Double.parseDouble(this.tipsPerHourET.getText().toString());\n hm.put(\"tipsPerHour\", tipsPerHour);\n //double tips = Double.parseDouble(this.tipsET.getText().toString());\n //hm.put(\"tips\", tips);\n plcDB.insert(\"partner\",null, hm);\n plcDB.close();\n db.close();\n String addedName = this.nameET.getText().toString();\n setupselectSpinner1();\n this.selectedPartner = addedName;\n this.selectSpinner1.setSelection(Arrays.asList(partners).indexOf(this.selectedPartner));\n } catch (Exception ex){\n android.util.Log.w(this.getClass().getSimpleName(),\"Exception adding partner information: \"+\n ex.getMessage());\n }\n }",
"public String addProduct() throws Exception {\r\n\t\t\r\n\t\t//content spot entity\r\n\t\tSpotBean spotBean = new SpotBean();\r\n\t\tspotBean.setId(this.getContentSpot().getId());\r\n\t\tspotBean = contentSpotService.load(spotBean);\r\n\t\t\r\n\t\t//main content spot\r\n\t\tContentSpot content = spotBean.getContentSpot();\r\n\t\tthis.products = content.getProducts();\r\n\r\n\t\t//configure products list attribute\r\n\t\tcontent.setProducts(extractProducts());\r\n\t\t\r\n\t\treturn update(spotBean);\r\n\t}",
"void addHasPart(WrappedIndividual newHasPart);",
"@FXML\n private void addNewPartType(ActionEvent event) {\n String name = nameText.getText();\n name = name.trim();\n if(name.equals(\"\")){\n showAlert(\"No Name\", \"This part type has no name, please input a name\");\n return;\n }\n \n String costText = this.costText.getText();\n costText = costText.trim();\n if(costText.equals(\"\")){\n showAlert(\"No Cost\", \"This part type has no cost, please input a cost.\");\n return;\n }\n \n String quantityText = this.quantityText.getText();\n quantityText = quantityText.trim();\n if(quantityText.equals(\"\")){\n showAlert(\"No Quantity\", \"This part type has no quantity, please input a quantity.\");\n return;\n }\n \n String description = descriptionText.getText();\n description = description.trim();\n if(description.equals(\"\")){\n showAlert(\"No Description\", \"This part type has no decription, please input a description.\");\n return;\n }\n \n double cost = Double.parseDouble(costText);\n int quantity = Integer.parseInt(quantityText);\n boolean success = partInventory.addNewPartTypeToInventory(name, \n description, cost, quantity);\n if(success){\n showAlert(\"Part Type Sucessfully Added\", \"The new part type was sucessfully added\");\n }else{\n showAlert(\"Part Type Already Exists\", \"This part already exists. If you would like to add stock, please select \\\"Add Stock\\\" on the righthand side of the screen.\\n\" \n + \"If you would like to edit this part, please double click it in the table.\");\n }\n // gets the popup window and closes it once part added\n Stage stage = (Stage) ((Node) event.getSource()).getScene().getWindow();\n stage.close();\n }",
"public void partActivated(IWorkbenchPartReference partRef) {\n\t\t\t\t\n\t\t\t}",
"public void goToAddPartScene(ActionEvent event) throws IOException {\n Parent addPartParent = FXMLLoader.load(getClass().getResource(\"AddPart.fxml\"));\n Scene addPartScene = new Scene(addPartParent);\n\n Stage window = (Stage) ((Node)event.getSource()).getScene().getWindow();\n\n window.setScene(addPartScene);\n window.show();\n }",
"public void addPart(ArrayList<Part> pList) {\n\t\tpartsCollected.addAll(pList);\n\t}",
"public void selectAProduct() {\n specificProduct.click();\n }",
"x0401.oecdStandardAuditFileTaxPT1.ProductDocument.Product addNewProduct();",
"@FXML void but_AddProduct(ActionEvent event) {\n\n productLine.add(new Widget(txtProductName.getText(), txtManufacturer.getText(),\n choiceType.getValue())); //Adding test product in observable list\n\n productTable.setItems(productLine); //Adds product to table\n listProduce.setItems(productLine); //Adds product to produce list\n\n addToDatabaseProduct();\n\n System.out.println(\"Product added\");\n }",
"public importProduct() {\n initComponents();\n Sql s = new Sql();\n\n s.Select_MaterialItem(Materials_combox);\n s.loadcombo(item_combox);\n s.Select_BigItem(Bigitem_combox);\n }",
"public void addSelectedObject(GameObject g) {\n\t\tselectedObjects.add(g);\n\t}",
"public void consumePart(Lot lot, Part part) {\n\r\n\t}",
"public void addProduct(Product p){\n stock.add(p);\n }",
"public void setItems() {\n if (partSelected instanceof OutSourced) { // determines if part is OutSourced\n outSourcedRbtn.setSelected(true);\n companyNameLbl.setText(\"Company Name\");\n OutSourced item = (OutSourced) partSelected;\n idTxt.setText(Integer.toString(item.getPartID()));\n idTxt.setEditable(false);\n nameTxt.setText(item.getPartName());\n invTxt.setText(Integer.toString(item.getPartInStock()));\n costTxt.setText(Double.toString(item.getPartPrice()));\n maxTxt.setText(Integer.toString(item.getMax()));\n minTxt.setText(Integer.toString(item.getMin()));\n idTxt.setText(Integer.toString(item.getPartID()));\n companyNameTxt.setText(item.getCompanyName());\n }\n if (partSelected instanceof InHouse) { // determines if part Is InHouse\n inHouseRbtn.setSelected(true);\n companyNameLbl.setText(\"Machine ID\");\n InHouse itemA = (InHouse) partSelected;\n idTxt.setText(Integer.toString(itemA.getPartID()));\n idTxt.setEditable(false);\n nameTxt.setText(itemA.getPartName());\n invTxt.setText(Integer.toString(itemA.getPartInStock()));\n costTxt.setText(Double.toString(itemA.getPartPrice()));\n maxTxt.setText(Integer.toString(itemA.getMax()));\n minTxt.setText(Integer.toString(itemA.getMin()));\n idTxt.setText(Integer.toString(itemA.getPartID()));\n companyNameTxt.setText(Integer.toString(itemA.getMachineID()));\n\n }\n }",
"@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\n\t\t\t\tInputDialog id1=new InputDialog(sShell,\"新增商品\",\"输入商品信息,用空格分开,例如:001 方便面 6.8\",\"\",null);\r\n\t\t\t\tif(id1.open()==0){\r\n\t\t\t\t\tinput=id1.getValue();\r\n\t\t\t\t\tif(input.equals(\"\")) return;\r\n\t\t\t\t}\r\n\t\t\t\telse return;\r\n\t\t\t\tString str[]=input.split(\" \");\r\n\t\t\t\tCommonADO ado=CommonADO.getCommonADO();\r\n\t\t\t\tString sql=\"insert into Goods values('\"+str[0]+\"','\"+str[1]+\"','\"+str[2]+\"')\";\r\n\t\t\t\tado.executeUpdate(sql);\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tcompositeGoodsShow.dispose();\t\t\t\t\r\n\t\t\t\tcreateCompositeGoodsShow();\r\n\t\t\t\t\r\n\t\t\t\tcompositeGoodsMange.layout(true);\r\n\t\t\t\t//compositeGoodsShow.layout(true);\r\n\t\t\r\n\t\t\t}",
"public void afficherPartie() throws SQLException{\n this.partie.maj();\n VBox fp = ((VBox) windows.getRoot());\n fp.getChildren().remove(1);\n fp.getChildren().add(partie);\n }",
"protected static void addElec(Electronics toAdd) {\n ProductGUI.Display(\"addElec function\\n\");\n if (toAdd == null) {\n ProductGUI.Display(\"Elec not added\\n\");\n } else {\n try {\n if (!(toAdd.isAvailable(toAdd.getID(), productList))) {\n ProductGUI.Display(\"Sorry. this product already exists\\n\");\n return;\n } else {\n ProductGUI.Display(\"new electronic Product\\n\");\n }\n\n myProduct = new Electronics(toAdd.getID(), toAdd.getName(), toAdd.getYear(), toAdd.getPrice(), toAdd.getMaker());\n productList.add(myProduct);\n\n //itemName = itemName.toLowerCase();\n //System.out.println(itemName);\n addToMap(toAdd.getName()); // adding the product name to the hashmap\n System.out.println(\"elec added to all\");\n ProductGUI.fieldReset();\n } catch (Exception e) {\n ProductGUI.Display(e.getMessage());\n }\n }\n }",
"public String editProduct() {\n ConversationContext<Product> ctx = ProductController.newEditContext(products.getSelectedRow());\n ctx.setLabelWithKey(\"part_products\");\n ctx.setCallBack(editProductCallBack);\n getCurrentConversation().setNextContextSub(ctx);\n return ctx.view();\n }",
"public void addProduct(Product pProduct)\n\t{\n\t\tmyProductInventory.add(pProduct);\n\n\n\t}",
"public void handleAddProducts()\n {\n FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource(\"/UI/Views/product.fxml\"));\n Parent root = null;\n try {\n root = (Parent) fxmlLoader.load();\n\n // Get controller and configure controller settings\n ProductController productController = fxmlLoader.getController();\n productController.setModifyProducts(false);\n productController.setInventory(inventory);\n productController.setHomeController(this);\n productController.updateParts();\n\n // Spin up product form\n Stage stage = new Stage();\n stage.initModality(Modality.APPLICATION_MODAL);\n stage.initStyle(StageStyle.DECORATED);\n stage.setTitle(\"Add Products\");\n stage.setScene(new Scene(root));\n stage.show();\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void addProduct(Product toAdd) {\n\t\tthis.products.add(toAdd);\n\t}",
"@Override\r\n\t\t\tpublic void partActivated(IWorkbenchPartReference partRef) {\n\t\t\t\t\r\n\t\t\t}",
"public void addProduct(Product item){\n inventory.add(item);\n }",
"public abstract void addAttachmentPart(AttachmentPart attachmentpart);",
"public void addVariant(Feature feature){\r\n\t\tthis.alternativeFeatureGroup.get(0).addFeature(feature);\r\n\t}",
"static void addProduct(int choice) {\n\n switch (choice) { // select add method based on user choice\n\n case 1: // Scenario 1 : choice = 1, User wants to add a phone\n\n addPhone(); // run addPhone method to add new phone to the Product DB\n break;\n case 2: // Scenario 2 : choice = 2, User wants to add a TV\n\n addTV(); // run addTV method to add new tv to the Product DB\n break;\n }\n }",
"private static void addPart(Element parent, Node partValue) {\n Element element = DomUtil.createElement(parent,\n CxfJbiConstants.WSDL11_WRAPPER_PART);\n element.appendChild(element.getOwnerDocument().importNode(partValue,\n true));\n }",
"public void modifyPartData(Part part) {\r\n modifyingPart = true;\r\n nameField.setText(part.getName());\r\n iDfield.setText(Integer.toString(part.getId()));\r\n invField.setText(Integer.toString(part.getStock()));\r\n priceField.setText(Double.toString(part.getPrice()));\r\n maxField.setText(Integer.toString(part.getMax()));\r\n minField.setText(Integer.toString(part.getMin()));\r\n if (part instanceof InHouse) {\r\n machineOrCompanyField.setText(Integer.toString(((InHouse) part).getMachineId()));\r\n inHouseSelected = true;\r\n } else if (part instanceof Outsourced) {\r\n inHouseSelected = false;\r\n machineOrCompanyField.setText(((Outsourced) part).getCompanyName());\r\n radioToggleGroup.selectToggle(outsourcedRadio);\r\n toggleSwitch();\r\n }\r\n }",
"@Override\r\n\tpublic String addItem(Product pro, String filePath) {\r\n\t\treturn productDetailsRepository.addItem(pro, filePath);\r\n\t}",
"public void setPart(java.lang.String part)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(PART$2, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(PART$2);\n }\n target.setStringValue(part);\n }\n }",
"public void addSelect(String selectSegment) {\r\n\t\taddSelect(true, selectSegment);\r\n\t}",
"public void addNewCharacterAndSelect() {\n\t\tPathfinderCharacter newChar = new PathfinderCharacter(\"New Adventurer\");\n\t\tlong id = addCharacterToDB(newChar);\n\t\tif (id != -1) {\n\t\t\tsetSelectedCharacter(id);\n\t\t} else {\n\t\t\tToast.makeText(getContext(), \"Error creating new character. Please contact developers for support if issue persists.\", Toast.LENGTH_LONG).show();\n\t\t}\n\t\tperformUpdateReset();\n\t}",
"public void xsetPart(org.apache.xmlbeans.XmlNCName part)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlNCName target = null;\n target = (org.apache.xmlbeans.XmlNCName)get_store().find_element_user(PART$2, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.XmlNCName)get_store().add_element_user(PART$2);\n }\n target.set(part);\n }\n }",
"public void insertAtCurrentPos(String part)\n {\n StringBuffer newLine = new StringBuffer( this.getLine() );\n\n newLine.insert( this.getPos(), part + ' ' );\n this.line = newLine.toString();\n }",
"public void addItem(Product p, int qty){\n //store info as an InventoryItem and add to items array\n this.items.add(new InventoryItem(p, qty));\n }"
] | [
"0.7010928",
"0.6795738",
"0.6718567",
"0.66646194",
"0.66245425",
"0.65783066",
"0.64848745",
"0.64675426",
"0.64120144",
"0.6324593",
"0.6311102",
"0.6304607",
"0.6247398",
"0.6231162",
"0.6194093",
"0.61244637",
"0.6082852",
"0.6080242",
"0.60636324",
"0.59831625",
"0.5965965",
"0.59634733",
"0.59583014",
"0.5891002",
"0.58855855",
"0.58855855",
"0.58665174",
"0.5833644",
"0.57888156",
"0.5755678",
"0.57397115",
"0.57334226",
"0.57226163",
"0.57145804",
"0.5711263",
"0.56497765",
"0.56454194",
"0.5637453",
"0.5602208",
"0.55979836",
"0.5586397",
"0.5565526",
"0.5556481",
"0.55406827",
"0.5524571",
"0.5518126",
"0.55165434",
"0.5513692",
"0.54927117",
"0.54905707",
"0.5482742",
"0.5471972",
"0.547047",
"0.5468262",
"0.5464574",
"0.54628736",
"0.5453579",
"0.5453127",
"0.54526937",
"0.5442719",
"0.5434596",
"0.5433885",
"0.5427407",
"0.54222745",
"0.5414333",
"0.5414097",
"0.54140264",
"0.5412378",
"0.54066527",
"0.54007876",
"0.5398615",
"0.5391434",
"0.53872335",
"0.5376852",
"0.5376026",
"0.5368327",
"0.5355736",
"0.5348636",
"0.5339883",
"0.533593",
"0.5335768",
"0.533275",
"0.5308022",
"0.52955943",
"0.52920884",
"0.5285379",
"0.52721626",
"0.52685434",
"0.5246725",
"0.52401733",
"0.52386796",
"0.52187556",
"0.5218588",
"0.52180576",
"0.5215545",
"0.52056724",
"0.51882136",
"0.5172103",
"0.5158681",
"0.5149746"
] | 0.70300275 | 0 |
Delete selected part from the current product | @FXML
void onActionDeletePart(ActionEvent event) {
Part part = TableView2.getSelectionModel().getSelectedItem();
if(part == null)
return;
//EXCEPTION SET 2 REQUIREMENT
Alert alert = new Alert(Alert.AlertType.CONFIRMATION);
alert.setHeaderText("You are about to delete the product you have selected!");
alert.setContentText("Are you sure you wish to continue?");
Optional<ButtonType> result = alert.showAndWait();
if (result.get() == ButtonType.OK){
product.deleteAssociatedPart(part.getId());
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void deletePart()\n {\n ObservableList<Part> partRowSelected;\n partRowSelected = partTableView.getSelectionModel().getSelectedItems();\n if(partRowSelected.isEmpty())\n {\n alert.setAlertType(Alert.AlertType.ERROR);\n alert.setContentText(\"Please select the Part you want to delete.\");\n alert.show();\n } else {\n int index = partTableView.getSelectionModel().getFocusedIndex();\n Part part = Inventory.getAllParts().get(index);\n alert.setAlertType(Alert.AlertType.CONFIRMATION);\n alert.setContentText(\"Are you sure you want to delete this Part?\");\n alert.showAndWait();\n ButtonType result = alert.getResult();\n if (result == ButtonType.OK) {\n Inventory.deletePart(part);\n }\n }\n }",
"@FXML void onActionModifyProductRemovePart(ActionEvent event) {\n Part selectedPart = associatedPartTableView.getSelectionModel().getSelectedItem();\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION, \"Do you want to delete this part?\");\n Optional<ButtonType> result = alert.showAndWait();\n if(result.isPresent() && result.get() == ButtonType.OK) {\n tmpAssociatedParts.remove(selectedPart);\n }\n }",
"public void deleteSelection() {\n deleteFurniture(Home.getFurnitureSubList(this.home.getSelectedItems())); \n }",
"public void deleteProduct()\n {\n ObservableList<Product> productRowSelected;\n productRowSelected = productTableView.getSelectionModel().getSelectedItems();\n int index = productTableView.getSelectionModel().getFocusedIndex();\n Product product = productTableView.getItems().get(index);\n if(productRowSelected.isEmpty())\n {\n alert.setAlertType(Alert.AlertType.ERROR);\n alert.setContentText(\"Please select the Product you want to delete.\");\n alert.show();\n } else if (!product.getAllAssociatedParts().isEmpty())\n {\n alert.setAlertType(Alert.AlertType.ERROR);\n alert.setContentText(\"This Product still has a Part associated with it. \\n\" +\n \"Please modify the Product and remove the Part.\");\n alert.show();\n } else {\n alert.setAlertType(Alert.AlertType.CONFIRMATION);\n alert.setContentText(\"Are you sure you want to delete this Product?\");\n alert.showAndWait();\n ButtonType result = alert.getResult();\n if(result == ButtonType.OK)\n {\n Inventory.deleteProduct(product);\n }\n }\n }",
"@FXML\r\n private void deletePartAction() throws IOException {\r\n \r\n if (!partsTbl.getSelectionModel().isEmpty()) {\r\n Part selected = partsTbl.getSelectionModel().getSelectedItem();\r\n \r\n Alert message = new Alert(Alert.AlertType.CONFIRMATION);\r\n message.setTitle(\"Confirm delete\");\r\n message.setHeaderText(\" Are you sure you want to delete part ID: \" + selected.getId() + \", name: \" + selected.getName() + \"?\" );\r\n message.setContentText(\"Please confirm your selection\");\r\n \r\n Optional<ButtonType> response = message.showAndWait();\r\n if (response.get() == ButtonType.OK)\r\n {\r\n stock.deletePart(selected);\r\n partsTbl.setItems(stock.getAllParts());\r\n partsTbl.refresh();\r\n displayMessage(\"The part \" + selected.getName() + \" was successfully deleted\");\r\n }\r\n else {\r\n displayMessage(\"Deletion cancelled by user. Part not deleted.\");\r\n }\r\n }\r\n else {\r\n displayMessage(\"No part selected for deletion\");\r\n }\r\n }",
"public static boolean deletePart(Part selectedPart) {\n // The for loop variable to the left of the colon is a temporary variable containing a single element from the collection on the right\n // With each iteration through the loop, Java pulls the next element from the collection and assigns it to the temp variable.\n for (Part currentPart : Inventory.getAllParts()) {\n if (currentPart.getId() == selectedPart.getId()) {\n return Inventory.getAllParts().remove(currentPart);\n }\n }\n return false;\n }",
"@Override\n public void deletePartida(String idPartida) {\n template.opsForHash().delete(idPartida, \"jugador1\");\n template.opsForHash().delete(idPartida, \"jugador2\");\n template.opsForSet().remove(\"partidas\",idPartida);\n }",
"public void handleDeleteParts()\n {\n Part partToDelete = getPartToModify();\n\n if (partToDelete != null) {\n\n // Ask user for confirmation to remove the product from part table\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\n alert.setTitle(\"Confirmation\");\n alert.setHeaderText(\"Delete Confirmation\");\n alert.setContentText(\"Are you sure you want to delete this part?\");\n ButtonType confirm = new ButtonType(\"Yes\", ButtonBar.ButtonData.YES);\n ButtonType deny = new ButtonType(\"No\", ButtonBar.ButtonData.NO);\n ButtonType cancel = new ButtonType(\"Cancel\", ButtonBar.ButtonData.CANCEL_CLOSE);\n alert.getButtonTypes().setAll(confirm, deny, cancel);\n alert.showAndWait().ifPresent(type ->{\n if (type == confirm)\n {\n inventory.deletePart(partToDelete);\n updateParts();\n }\n });\n\n } else {\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setTitle(\"Input Invalid\");\n alert.setHeaderText(\"No part was selected!\");\n alert.setContentText(\"Please select a part to delete from the part table!\");\n alert.show();\n }\n // Unselect parts in table after part is deleted\n partTable.getSelectionModel().clearSelection();\n }",
"@FXML\n void removeAssociatedPart(ActionEvent event) {\n\n Part selectedPart = assocPartTableView.getSelectionModel().getSelectedItem();\n\n if (selectedPart == null) {\n AlartMessage.displayAlertAdd(6);\n } else {\n\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\n alert.setTitle(\"Alert\");\n alert.setContentText(\"Are you sure you want to remove the selected part?\");\n Optional<ButtonType> result = alert.showAndWait();\n\n if (result.isPresent() && result.get() == ButtonType.OK) {\n assocParts.remove(selectedPart);\n assocPartTableView.setItems(assocParts);\n }\n }\n }",
"@FXML\n\tprivate void deleteButtonAction(ActionEvent clickEvent) {\n\t\t\n\t\tPart deletePartFromProduct = partListProductTable.getSelectionModel().getSelectedItem();\n\t\t\n\t\tif (deletePartFromProduct != null) {\n\t\t\t\n\t\t\tAlert alert = new Alert(Alert.AlertType.CONFIRMATION, \"Pressing OK will remove the part from the product.\\n\\n\" + \"Are you sure you want to remove the part?\");\n\t\t\n\t\t\tOptional<ButtonType> result = alert.showAndWait();\n\t\t\n\t\t\tif (result.isPresent() && result.get() == ButtonType.OK) {\n\t\t\t\n\t\t\t\tdummyList.remove(deletePartFromProduct);\n\n\t\t\t}\n\t\t}\n\t}",
"private void delete() {\n\t\tComponents.questionDialog().message(\"Are you sure?\").callback(answeredYes -> {\n\n\t\t\t// if confirmed, delete the current product PropertyBox\n\t\t\tdatastore.delete(TARGET, viewForm.getValue());\n\t\t\t// Notify the user\n\t\t\tNotification.show(\"Product deleted\", Type.TRAY_NOTIFICATION);\n\n\t\t\t// navigate back\n\t\t\tViewNavigator.require().navigateBack();\n\n\t\t}).open();\n\t}",
"public boolean deletePart(Part selectedPart) {\n for(Part part: allParts) {\n if (part.getId() == selectedPart.getId() &&\n part.getName().equals(selectedPart.getName()) &&\n part.getPrice() == selectedPart.getPrice() &&\n part.getStock() == selectedPart.getStock() &&\n part.getMin() == selectedPart.getMin() &&\n part.getMax() == selectedPart.getMax()) {\n if(selectedPart instanceof InHousePart &&\n ((InHousePart) part).getMachineId() == ((InHousePart) selectedPart).getMachineId()) {\n return allParts.remove(part);\n } else if(selectedPart instanceof OutSourcedPart &&\n ((OutSourcedPart)part).getCompanyName().equals(((OutSourcedPart) selectedPart).getCompanyName())) {\n return allParts.remove(part);\n }\n }\n }\n System.out.println(\"No matching part was found\");\n return false;\n }",
"@Override\n public void onClick(View v) {\n ((CreateDocketActivityPart2) activity).deleteSpareParts(pos);\n }",
"private void deleteProduct() {\n // Only perform the delete if this is an existing product.\n if (currentProductUri != null) {\n // Call the ContentResolver to delete the product at the given content URI.\n // Pass in null for the selection and selection args because the currentProductUri\n // content URI already identifies the product that we want.\n int rowsDeleted = getContentResolver().delete(currentProductUri, null, null);\n // Show a toast message depending on whether or not the delete was successful.\n if (rowsDeleted == 0) {\n // If no rows were deleted, then there was an error with the delete.\n Toast.makeText(this, getString(R.string.no_deleted_products),\n Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the delete was successful and we can display a toast.\n Toast.makeText(this, getString(R.string.editor_delete_product_successful), Toast.LENGTH_SHORT).show();\n }\n }\n finish();\n }",
"private void deleteProduct() {\n // Only perform the delete if this is an existing Product.\n if (mCurrentProductUri != null) {\n // Call the ContentResolver to delete the pet at the given content URI.\n // Pass in null for the selection and selection args because the mCurrentProductUri\n // content URI already identifies the pet that we want.\n int rowsDeleted = getContentResolver().delete(mCurrentProductUri, null, null);\n\n // Show a toast message depending on whether or not the delete was successful.\n if (rowsDeleted == 0) {\n // If no rows were deleted, then there was an error with the delete.\n Toast.makeText(this, getString(R.string.editor_delete_product_failed),\n Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the delete was successful and we can display a toast.\n Toast.makeText(this, getString(R.string.editor_delete_product_successful),\n Toast.LENGTH_SHORT).show();\n }\n }\n\n // Close the activity\n finish();\n }",
"public void deleteAssociatedPart(Part part) {\n associatedParts.remove(part);\n }",
"public boolean deleteAssociatedPart(Part selectedAssociatedPart) {\n return associatedParts.remove(selectedAssociatedPart);\n }",
"public void removeAssociatedPart(ActionEvent actionEvent) {\n Part selectedAssociatedPart;\n selectedAssociatedPart = (Part) partsTableView.getSelectionModel().getSelectedItem();\n associatedPartTableViewHolder.remove(selectedAssociatedPart);\n\n associatedPartsTableView.setItems(associatedPartTableViewHolder);\n }",
"public void Remove_button() {\n\t\tProduct product = (Product) lsvProduct.getSelectionModel().getSelectedItem();\n\t\tif (product!=null) {\n\t\t\tint ind = lsvProduct.getSelectionModel().getSelectedIndex();\n\t\t\tcart.removeProduct(product);\n\t\t\tcart.removePrice(ind);\n\t\t\tcart.removeUnit(ind);\n\t\t}\n\t\tthis.defaultSetup();\n\t}",
"private void delete() {\n AltDatabase.getInstance().getAlts().remove(getCurrentAsEditable());\n if (selectedAccountIndex > 0)\n selectedAccountIndex--;\n updateQueried();\n updateButtons();\n }",
"@FXML private void handleAddProdDelete(ActionEvent event) {\n Part partDeleting = fxidAddProdSelectedParts.getSelectionModel().getSelectedItem();\n \n if (partDeleting != null) {\n //Display Confirm Box\n Alert confirmDelete = new Alert(Alert.AlertType.CONFIRMATION);\n confirmDelete.setHeaderText(\"Are you sure?\");\n confirmDelete.setContentText(\"Are you sure you want to remove the \" + partDeleting.getName() + \" part?\");\n Optional<ButtonType> result = confirmDelete.showAndWait();\n //If they click OK\n if (result.get() == ButtonType.OK) {\n //Delete the part.\n partToSave.remove(partDeleting);\n //Refresh the list view.\n fxidAddProdSelectedParts.setItems(partToSave);\n\n Alert successDelete = new Alert(Alert.AlertType.CONFIRMATION);\n successDelete.setHeaderText(\"Confirmation\");\n successDelete.setContentText(partDeleting.getName() + \" has been removed from product.\");\n successDelete.showAndWait();\n }\n } \n }",
"public void deleteProduct(Product product_1) {\n\r\n\t}",
"public void deleteSelectedWord()\r\n {\n ArrayList al = crossword.getWords();\r\n al.remove(selectedWord);\r\n repopulateWords();\r\n }",
"@Override\n\tpublic void deleteSelected() {\n\n\t}",
"public void handleDeleteProducts()\n {\n Product productToDelete = getProductToModify();\n\n if (productToDelete != null)\n {\n // Ask user for confirmation to remove the product from product table\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\n alert.setTitle(\"Confirmation\");\n alert.setHeaderText(\"Delete Confirmation\");\n alert.setContentText(\"Are you sure you want to delete this product?\");\n ButtonType confirm = new ButtonType(\"Yes\", ButtonBar.ButtonData.YES);\n ButtonType deny = new ButtonType(\"No\", ButtonBar.ButtonData.NO);\n ButtonType cancel = new ButtonType(\"Cancel\", ButtonBar.ButtonData.CANCEL_CLOSE);\n alert.getButtonTypes().setAll(confirm, deny, cancel);\n alert.showAndWait().ifPresent(type ->{\n if (type == confirm)\n {\n // User cannot delete products with associated parts\n if (productToDelete.getAllAssociatedParts().size() > 0)\n {\n Alert alert2 = new Alert(Alert.AlertType.ERROR);\n alert2.setTitle(\"Action is Forbidden!\");\n alert2.setHeaderText(\"Action is Forbidden!\");\n alert2.setContentText(\"Products with associated parts cannot be deleted!\\n \" +\n \"Please remove associated parts from product and try again!\");\n alert2.show();\n }\n else\n {\n // delete the product\n inventory.deleteProduct(productToDelete);\n updateProducts();\n productTable.getSelectionModel().clearSelection();\n }\n }\n });\n }\n else\n {\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setTitle(\"Input Invalid\");\n alert.setHeaderText(\"No product was selected!\");\n alert.setContentText(\"Please select a product to delete from the part table!\");\n alert.show();\n }\n this.productTable.getSelectionModel().clearSelection();\n }",
"public void deletPart(Part part) {\n allParts.remove(part);\n }",
"public boolean deleteProduct(Product selectedProduct) {\n for(Product product: allProducts) {\n if (product.getId() == selectedProduct.getId() &&\n product.getName().equals(selectedProduct.getName()) &&\n product.getPrice() == selectedProduct.getPrice() &&\n product.getStock() == selectedProduct.getStock() &&\n product.getMin() == selectedProduct.getMin() &&\n product.getMax() == selectedProduct.getMax()) {\n return allProducts.remove(product);\n }\n }\n System.out.println(\"No matching part was found\");\n return false;\n }",
"public void Deleteproduct(Product objproduct) {\n\t\t\n\t}",
"public void removeExtras() {\n Object selected = extraSelected.getSelectionModel().getSelectedItem();\n sandwhich.remove(selected);\n orderPrice.clear();\n String price = new DecimalFormat(\"#.##\").format(sandwhich.price());\n orderPrice.appendText(\"$\"+price);\n extraSelected.getItems().remove(selected);\n extraOptions.getItems().add(selected);\n }",
"@FXML\n\tpublic void deleteProduct(ActionEvent event) {\n\t\tif (!txtDeleteProductName.getText().equals(\"\")) {\n\t\t\ttry {\n\n\t\t\t\tList<Product> productToDelete = restaurant.findSameProduct(txtDeleteProductName.getText());\n\t\t\t\tboolean delete = restaurant.deleteProduct(txtDeleteProductName.getText());\n\t\t\t\tif (delete == true) {\n\t\t\t\t\tfor (int i = 0; i < productOptions.size(); i++) {\n\t\t\t\t\t\tfor (int j = 0; j < productToDelete.size(); j++) {\n\t\t\t\t\t\t\tif (productOptions.get(i) != null && productOptions.get(i)\n\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(productToDelete.get(j).getReferenceId())) {\n\t\t\t\t\t\t\t\tproductOptions.remove(productToDelete.get(j).getReferenceId());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\ttxtDeleteProductName.setText(\"\");\n\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\tdialog.setContentText(\"No se pudo guardar la actualización de los productos\");\n\t\t\t\tdialog.setTitle(\"Error guardar datos\");\n\t\t\t\tdialog.show();\n\t\t\t}\n\t\t} else {\n\t\t\tDialog<String> dialog = createDialog();\n\t\t\tdialog.setContentText(\"Los campos deben ser llenados\");\n\t\t\tdialog.setTitle(\"Error, Campo sin datos\");\n\t\t\tdialog.show();\n\t\t}\n\t}",
"public void removeClicked(View v){\n android.util.Log.d(this.getClass().getSimpleName(), \"remove Clicked\");\n String delete = \"delete from partner where partner.name=?;\";\n try {\n PartnerDB db = new PartnerDB((Context) this);\n SQLiteDatabase plcDB = db.openDB();\n plcDB.execSQL(delete, new String[]{this.selectedPartner});\n plcDB.close();\n db.close();\n }catch(Exception e){\n android.util.Log.w(this.getClass().getSimpleName(),\" error trying to delete partner\");\n }\n this.selectedPartner = this.setupselectSpinner1();\n this.loadFields();\n }",
"@FXML\r\n public void onActionDeletePart(ActionEvent actionEvent) throws IOException {\r\n\r\n try {\r\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION, \"Are you sure you want to delete the selected item?\");\r\n\r\n Optional<ButtonType> result = alert.showAndWait();\r\n if (result.isPresent() && result.get() == ButtonType.OK) {\r\n\r\n\r\n if(partsTableView.getSelectionModel().getSelectedItem() != null) {\r\n Inventory.deletePart(partsTableView.getSelectionModel().getSelectedItem());\r\n Parent root = FXMLLoader.load(getClass().getResource(\"/View_Controller/mainScreen.fxml\"));\r\n Stage stage = (Stage) ((Button) actionEvent.getSource()).getScene().getWindow();\r\n Scene scene = new Scene(root, 1062, 498);\r\n stage.setTitle(\"Main Screen\");\r\n stage.setScene(scene);\r\n stage.show();\r\n }\r\n else {\r\n Alert alert2 = new Alert(Alert.AlertType.ERROR);\r\n alert2.setContentText(\"Click on an item to delete.\");\r\n alert2.showAndWait();\r\n }\r\n }\r\n }\r\n catch (NullPointerException n) {\r\n //ignore\r\n }\r\n }",
"public void deleteProduct(Product product) throws BackendException;",
"private void cmd_deleteSelection(){\n\t\tm_frame.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));\n\t\tif (ADialog.ask(getWindowNo(), m_frame.getContainer(), \"DeleteSelection\"))\n\t\t{\t\n\t\t\tint records = deleteSelection(detail);\n\t\t\tsetStatusLine(Msg.getMsg(Env.getCtx(), \"Deleted\") + records, false);\n\t\t}\t\n\t\tm_frame.setCursor(Cursor.getDefaultCursor());\n\t\tbDelete.setSelected(false);\n\t\texecuteQuery();\n\t\t\n\t}",
"public void deleteEquipoComunidad(EquipoComunidad equipoComunidad);",
"@Override\n\tpublic void deleteProduct(int product_id) {\n\n\t}",
"@Transactional\n\tpublic void eliminaPartita(Long idPartita) {\n\t\tpartitaRepository.deleteById(idPartita);\n\t}",
"void deleteProduct(Integer productId);",
"void deleteProduct(Long id);",
"@Override\r\n\tpublic int deleteProduct(Product product) {\n\t\treturn 0;\r\n\t}",
"@Override\n\tpublic void doDelete(String product) throws SQLException {\n\t\t\n\t}",
"public void deleteCt() {\n\t\tlog.info(\"-----deleteCt()-----\");\n\t\t//int index = selected.getCtXuatKho().getCtxuatkhoThutu().intValue() - 1;\n\t\tlistCtKhoLeTraEx.remove(selected);\n\t\tthis.count = listCtKhoLeTraEx.size();\n\t\ttinhTien();\n\t}",
"void removeProduct(int position) throws ProductNotFoundException;",
"public void unsetPart()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(PART$2, 0);\n }\n }",
"void removeProduct(Product product);",
"public static boolean deletePart(Part removePart){\r\n for(Part part : allParts){\r\n if(part.getPartID() == removePart.getPartID()){\r\n allParts.remove(removePart);\r\n return true;\r\n } \r\n }\r\n return false;\r\n }",
"public void clickedPresentationDelete() {\n\t\tif(mainWindow.getSelectedRowPresentation().length <= 0) ApplicationOutput.printLog(\"YOU DID NOT SELECT ANY PRESENTATION\");\n\t\telse if(mainWindow.getSelectedRowPresentation().length > 1) ApplicationOutput.printLog(\"Please select only one presentation to edit\");\n\t\telse {\n\t\t\tint tmpSelectedRow = mainWindow.getSelectedRowPresentation()[0];\n\t\t\tPresentations tmpPresentation = presentationList.remove(tmpSelectedRow);\t\t\t\n\t\t\tappDriver.hibernateProxy.deletePresentation(tmpPresentation);\t\n\t\t\trefreshPresentationTable();\t\t\t\n\t\t}\n\t}",
"public static void confirmSingleDeletion(final Context context, final Uri selectedProduct) {\n // create a dialog builder\n AlertDialog.Builder builder = new AlertDialog.Builder(context);\n\n // set the correct message\n builder.setMessage(context.getResources().getString(R.string.catalog_confirmation_delete_single));\n\n // delete on positive response\n builder.setPositiveButton(context.getResources().getString(R.string.catalog_confirmation_delete_single_pos), new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n int rowsDeleted = context.getContentResolver().delete(selectedProduct, null, null);\n // Show a toast message depending on whether or not the delete was successful.\n if (rowsDeleted == 0) {\n // If no rows were deleted, then display an error\n Toast.makeText(context, context.getResources().getString(R.string.catalog_data_clear_failed_toast),\n Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, display a success messaGE\n Toast.makeText(context, context.getResources().getString(R.string.catalog_data_cleared_toast),\n Toast.LENGTH_SHORT).show();\n }\n // finish activity\n ((Activity) context).finish();\n }\n });\n\n // return on negative response\n builder.setNegativeButton(R.string.confirmation_dialog_cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }",
"@FXML\n\t private void deleteProduct (ActionEvent actionEvent) throws SQLException, ClassNotFoundException {\n\t try {\n\t ProductDAO.deleteProdWithId(prodIdText.getText());\n\t resultArea.setText(\"Product deleted! Product id: \" + prodIdText.getText() + \"\\n\");\n\t } catch (SQLException e) {\n\t resultArea.setText(\"Problem occurred while deleting product \" + e);\n\t throw e;\n\t }\n\t }",
"public void deleteOffice(Office office) {\n this.getSessionFactory().getCurrentSession().delete(office);\n\t\t//getSession().createQuery(\"delete from ProductLine where pid >=8\").executeUpdate();\n\t}",
"void deleteCategoryParameterProductDetails(long id);",
"public void deleteProduct(Supplier entity) {\n\t\t\r\n\t}",
"private void deleteCourse() {\n // Only perform the delete if this is an existing pet.\n if (mCurrentCourseUri != null) {\n // Call the ContentResolver to delete the pet at the given content URI.\n // Pass in null for the selection and selection args because the mCurrentPetUri\n // content URI already identifies the pet that we want.\n int rowsDeleted = getContentResolver().delete(mCurrentCourseUri, null, null);\n\n // Show a toast message depending on whether or not the delete was successful.\n if (rowsDeleted == 0) {\n // If no rows were deleted, then there was an error with the delete.\n Toast.makeText(this, getString(R.string.editor_delete_course_failed),\n Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the delete was successful and we can display a toast.\n Toast.makeText(this, getString(R.string.editor_delete_course_successful),\n Toast.LENGTH_SHORT).show();\n }\n }\n\n // Close the activity\n finish();\n }",
"public synchronized void deleteItem(Product product){\n carrito.set(product.getId(), null);\n }",
"public void onActionDeleteProduct(ActionEvent actionEvent) throws IOException {\r\n\r\n try {\r\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION, \"Are you sure you want to delete the selected item?\");\r\n\r\n Optional<ButtonType> result = alert.showAndWait();\r\n if (result.isPresent() && result.get() == ButtonType.OK) {\r\n\r\n if (productsTableView.getSelectionModel().getSelectedItem() != null) {\r\n Product product = productsTableView.getSelectionModel().getSelectedItem();\r\n if (product.getAllAssociatedParts().size() == 0) {\r\n\r\n Inventory.deleteProduct(productsTableView.getSelectionModel().getSelectedItem());\r\n Parent root = FXMLLoader.load(getClass().getResource(\"/View_Controller/mainScreen.fxml\"));\r\n Stage stage = (Stage) ((Node) actionEvent.getSource()).getScene().getWindow();\r\n Scene scene = new Scene(root, 1062, 498);\r\n stage.setTitle(\"Main Screen\");\r\n stage.setScene(scene);\r\n stage.show();\r\n } else {\r\n Alert alert2 = new Alert(Alert.AlertType.ERROR);\r\n alert2.setContentText(\"Products with associated parts cannot be deleted.\");\r\n alert2.showAndWait();\r\n }\r\n }\r\n else {\r\n Alert alert3 = new Alert(Alert.AlertType.ERROR);\r\n alert3.setContentText(\"Click on an item to delete.\");\r\n alert3.showAndWait();\r\n }\r\n }\r\n }\r\n catch (NullPointerException n) {\r\n //ignore\r\n }\r\n }",
"@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\n\t\t\t\tInputDialog id1=new InputDialog(sShell,\"删除商品\",\"输入商品编号\",\"\",null);\r\n\t\t\t\tif(id1.open()==0){\r\n\t\t\t\t\tinput=id1.getValue();\r\n\t\t\t\t\tif(input.equals(\"\")) return;\r\n\t\t\t\t}\r\n\t\t\t\telse return;\r\n\t\t\t\t\r\n\t\t\t\tCommonADO ado=CommonADO.getCommonADO();\r\n\t\t\t\tString sql=\"delete from Goods where GoodsNo='\"+input+\"'\";\r\n\t\t\t\tado.executeUpdate(sql);\r\n\t\t\t\t//createCompositeGoodsShow();\r\n\t\t\t\tcompositeGoodsShow.dispose();\t\t\t\t\r\n\t\t\t\tcreateCompositeGoodsShow();\r\n\t\t\t\t\r\n\t\t\t\tcompositeGoodsMange.layout(true);\r\n\t\t\t}",
"public JavaproductModel deleteproduct(JavaproductModel oJavaproductModel){\n\n \t\t/* Create a new hibernate session and begin the transaction*/\n Session hibernateSession = HibernateUtil.getSessionFactory().openSession();\n Transaction hibernateTransaction = hibernateSession.beginTransaction();\n\n /* Retrieve the existing product from the database*/\n oJavaproductModel = (JavaproductModel) hibernateSession.get(JavaproductModel.class, oJavaproductModel.getproductId());\n\n /* Delete any collection related with the existing product from the database.\n Note: this is needed because some hibernate versions do not handle correctly cascade delete on collections.*/\n oJavaproductModel.deleteAllCollections(hibernateSession);\n\n /* Delete the existing product from the database*/\n hibernateSession.delete(oJavaproductModel);\n\n /* Commit and terminate the session*/\n hibernateTransaction.commit();\n hibernateSession.close();\n return oJavaproductModel;\n }",
"private void deleteProduct(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException, SQLException {\n\t\tString theProduct=request.getParameter(\"deleteProduct\");\n\t\tdaoPageAdmin.DeleteProduct(theProduct);\n\t\tloadProduct(request, response);\n\t}",
"void removePickDetail(Question question);",
"private void deleteSelectedFile() {\r\n\t\tString sel = this.displayFileNames.getSelectedValue();\r\n\t\tif(sel != null) {\r\n\t\t\tFileModel model = FileData.getFileModel(sel);\r\n\t\t\tFileType type = model.getFileType();\r\n\t\t\tFileData.deleteFileModel(type);\r\n\t\t\tthis.setButtonEnabled(type);\r\n\t\t\tthis.loadFileNames();\r\n\t\t\tthis.updateColumnSelections(type);\r\n\t\t\tColumnData.clearMatchedCells(type);\r\n\t\t}\r\n\t}",
"@Override\n public void onClick(View v) {\n\n ((CreateDocketActivityPart2) activity).deleteMachineItem(position);\n }",
"private void supprimerParametre() {\n if (getSelectedParamatre() == null) return;\n parametreListView.getItems().remove(parametreListView.getSelectionModel().getSelectedItem());\n }",
"@FXML\n\tprivate void deleteSelected(ActionEvent event) {\n\t\tint selectedIndex = taskList.getSelectionModel().getSelectedIndex();\n\t\tString task = taskList.getItems().get(selectedIndex);\n\t\ttaskList.getSelectionModel().clearSelection();\n\t\ttaskList.getItems().remove(task);\n\t\tchatView.setText(\"\");\n\t\ttaskList.getItems().removeAll();\n\t\tString task_split[] = task.split(\" \", 2);\n\t\tString removeTask = task_split[1];\n\t\tif (task.contains(\"due by\")) {\n\t\t\tString[] taskDate = task_split[1].split(\"\\\\s+\");\n\t\t\tSystem.out.println(taskDate);\n\t\t\tString end = taskDate[taskDate.length - 3];\n\t\t\tSystem.out.println(end);\n\t\t\tremoveTask = task_split[1].substring(0, task_split[1].indexOf(end)).trim();\n\t\t\tSystem.out.println(removeTask);\n\n\t\t}\n\t\tclient.removeTask(removeTask.replace(\"\\n\", \"\"));\n\t}",
"public void eliminar(Producto producto) throws BusinessErrorHelper;",
"private void eliminarProducto(HttpServletRequest request, HttpServletResponse response) {\n\t\tString codArticulo = request.getParameter(\"cArticulo\");\n\t\t// Borrar producto de la BBDD\n\t\ttry {\n\t\t\tmodeloProductos.borrarProducto(codArticulo);\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t// Volver al listado con la info actualizada\n\t\tobtenerProductos(request, response);\n\n\t}",
"public void delete(SpecificProduct specificProduct) {\n specific_product_dao.delete(specificProduct);\n }",
"void delete(Product product) throws IllegalArgumentException;",
"public void deleteProduct() throws ApplicationException {\n Menu deleteProduct = new Menu();\n deleteProduct.setIdProduct(menuFxObjectPropertyEdit.getValue().getIdProduct());\n\n Session session = HibernateUtil.getSessionFactory().getCurrentSession();\n\n try {\n session.beginTransaction();\n session.delete(deleteProduct);\n session.getTransaction().commit();\n } catch (RuntimeException e) {\n session.getTransaction().rollback();\n SQLException sqlException = getCauseOfClass(e, SQLException.class);\n throw new ApplicationException(sqlException.getMessage());\n }\n\n initMenuList();\n }",
"@Override\r\n\tpublic GlobalResult deleteEquip(String mspno) {\n\t\treturn null;\r\n\t}",
"void deleteProduct(Product product) throws ServiceException;",
"private void btnRemoveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnRemoveActionPerformed\n if(tblOrders.getSelectedRow() == -1)\n {\n lblMessage.setText(\"Select Product First\");\n }\n else\n {\n DefaultTableModel model = (DefaultTableModel)tblOrders.getModel();\n int productId = \n Integer.parseInt(String.valueOf(model.getValueAt(tblOrders.getSelectedRow(), 0)));\n \n loggedInCustomer.findLatestOrder().removeOrderLine(productId);\n \n model.removeRow(tblOrders.getSelectedRow());\n \n lblMessage.setText(\"Product Has Been Removed\");\n lblTotalCost.setText(\"£\" + String.format(\"%.02f\",loggedInCustomer.findLatestOrder().getOrderTotal()));\n }\n }",
"public void buttonDelete(ActionEvent event) {\n\t\tObservableList<Player> allProduct, SinglePlayer;\n\t\tallProduct = tableview.getItems();\n\t\tSinglePlayer = tableview.getSelectionModel().getSelectedItems();\n\t\tSinglePlayer.forEach(allProduct::remove);\n\t}",
"@Override\n\tpublic int deleteProduct(String productNo) {\n\t\treturn 0;\n\t}",
"public static boolean deleteProduct(Product selectedProduct) {\n // The for loop variable to the left of the colon is a temporary variable containing a single element from the collection on the right\n // With each iteration through the loop, Java pulls the next element from the collection and assigns it to the temp variable.\n for (Product currentProduct : Inventory.getAllProducts()) {\n if (currentProduct.getId() == selectedProduct.getId()) {\n return Inventory.getAllProducts().remove(currentProduct);\n }\n }\n return false;\n }",
"public void getSelectedPart(Part selectedPart){\n this.part = selectedPart;\n if(selectedPart instanceof InHouse){\n labelPartSource.setText(\"Machine ID\");\n InHouse inHouse = (InHouse)selectedPart;\n ModPartIDField.setText(Integer.toString(inHouse.getId()));\n ModPartNameField.setText(inHouse.getName());\n ModPartInventoryField.setText(Integer.toString(inHouse.getStock()));\n ModPartPriceField.setText(Double.toString(inHouse.getPrice()));\n ModPartMaxField.setText(Integer.toString(inHouse.getMax()));\n ModPartMinField.setText(Integer.toString(inHouse.getMin()));\n partSourceField.setText(Integer.toString(inHouse.getMachineId()));\n inHouseRadBtn.setSelected(true);\n } else if (selectedPart instanceof Outsourced){\n labelPartSource.setText(\"Company Name\");\n Outsourced outsourced = (Outsourced) selectedPart;\n ModPartIDField.setText(Integer.toString(outsourced.getId()));\n ModPartNameField.setText(outsourced.getName());\n ModPartInventoryField.setText(Integer.toString(outsourced.getStock()));\n ModPartPriceField.setText(Double.toString(outsourced.getPrice()));\n ModPartMaxField.setText(Integer.toString(outsourced.getMax()));\n ModPartMinField.setText(Integer.toString(outsourced.getMin()));\n partSourceField.setText(outsourced.getCompanyName());\n OutsourcedRadBtn.setSelected(true);\n }\n }",
"public void delete(MainItemOrdered mainItemOrdered);",
"@Override\r\n\tpublic void deleteItem() {\n\t\taPList.remove();\r\n\t}",
"public void partDeactivated(IWorkbenchPartReference partRef) {\n\t\t\t\t\n\t\t\t}",
"public void clickedSpeakerDelete() {\n\t\tif(mainWindow.getSelectedRowSpeaker().length <= 0) ApplicationOutput.printLog(\"YOU DID NOT SELECT ANY PRESENTATION\");\n\t\telse if(mainWindow.getSelectedRowSpeaker().length > 1) ApplicationOutput.printLog(\"Please select only one presentation to edit\");\n\t\telse {\n\t\t\tint tmpSelectedRow = mainWindow.getSelectedRowSpeaker()[0];\n\t\t\tSpeakers tmpSpeaker = speakersList.remove(tmpSelectedRow);\t\t\t\n\t\t\tappDriver.hibernateProxy.deleteSpeaker(tmpSpeaker);\t\n\t\t\trefreshSpeakerTable();\t\t\t\n\t\t}\n\t}",
"void deleteProduct(int productId) throws ProductException;",
"@Override\r\n public void onClick(View view) {\n productsRef.child(selectedProduct.getProductId()).removeValue().addOnCompleteListener(new OnCompleteListener<Void>() {\r\n @Override\r\n public void onComplete(@NonNull Task<Void> task) {\r\n alertDialog.dismiss();\r\n }\r\n });\r\n }",
"private void deletePet() {\r\n // Only perform the delete if this is an existing pet.\r\n// if (mCurrentPetUri != null) {\r\n// // Call the ContentResolver to delete the pet at the given content URI.\r\n// // Pass in null for the selection and selection args because the mCurrentPetUri\r\n// // content URI already identifies the pet that we want.\r\n// int rowsDeleted = getContentResolver().delete(mCurrentPetUri, null, null);\r\n// // Show a toast message depending on whether or not the delete was successful.\r\n// if (rowsDeleted == 0) {\r\n// // If no rows were deleted, then there was an error with the delete.\r\n// Toast.makeText(this, getString(R.string.editor_delete_pet_failed),\r\n// Toast.LENGTH_SHORT).show();\r\n// } else {\r\n// // Otherwise, the delete was successful and we can display a toast.\r\n// Toast.makeText(this, getString(R.string.editor_delete_pet_successful),\r\n// Toast.LENGTH_SHORT).show();\r\n// }\r\n// }\r\n\r\n }",
"public void eliminar(Producto producto) throws IWDaoException;",
"public void deleteButtonClicked(View view) {\n String inputText = johnsInput.getText().toString();\n dbHandler.deleteProduct(inputText);\n printDatabase();\n }",
"public void deleteNote() {\n if (cursor == 0) {\n JOptionPane.showMessageDialog(null, \"There's no note to delete!\", \"Invalid Delete\", JOptionPane.WARNING_MESSAGE);\n } else {\n if (sequence.getNote(cursor) == REST) {\n cursor--;\n controller.setSelected(cursor);\n\n sequence = sequence.withNote(REST, cursor);\n controller.setMidiSequence(sequence);\n } else {\n sequence = sequence.withNote(REST, cursor);\n controller.setMidiSequence(sequence);\n }\n }\n }",
"private void deletePet() {\n if (mCurrentPetUri != null) {\n // Call the ContentResolver to delete the pet at the given content URI.\n // Pass in null for the selection and selection args because the mCurrentPetUri\n // content URI already identifies the pet that we want.\n int rowsDeleted = getContentResolver().delete(mCurrentPetUri, null, null);\n\n // Show a toast message depending on whether or not the delete was successful.\n if (rowsDeleted == 0) {\n // If no rows were deleted, then there was an error with the delete.\n Toast.makeText(this, getString(R.string.editor_delete_pet_failed),\n Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the delete was successful and we can display a toast.\n Toast.makeText(this, getString(R.string.editor_delete_pet_successful),\n Toast.LENGTH_SHORT).show();\n }\n }\n\n // Close the activity\n finish();\n }",
"public void delete() {\r\n if (this.selectedTag != null) {\r\n for (int i = uploads.size() -1; i >= 0 ; i--) {\r\n if (this.selectedTag.equals(uploads.get(i).getTag())) {\r\n FileUtil.deleteFile(uploads.get(i).getFilepath());\r\n uploads.remove(i);\r\n break;\r\n }\r\n }\r\n }\r\n }",
"private void toDelete() {\n if(toCount()==0)\n {\n JOptionPane.showMessageDialog(rootPane,\"No paint detail has been currently added\");\n }\n else\n {\n String[] choices={\"Delete First Row\",\"Delete Last Row\",\"Delete With Index\"};\n int option=JOptionPane.showOptionDialog(rootPane, \"How would you like to delete data?\", \"Delete Data\", WIDTH, HEIGHT,null , choices, NORMAL);\n if(option==0)\n {\n jtModel.removeRow(toCount()-toCount());\n JOptionPane.showMessageDialog(rootPane,\"Successfully deleted first row\");\n }\n else if(option==1)\n {\n jtModel.removeRow(toCount()-1);\n JOptionPane.showMessageDialog(rootPane,\"Successfully deleted last row\");\n }\n else if(option==2)\n {\n toDeletIndex();\n }\n else\n {\n \n }\n }\n }",
"@Override\n\tpublic void deleteCpteEpargne(CompteEpargne cpt) {\n\t\t\n\t}",
"public void deleteProveedor (Long id_proveedor){\n proveedorPersistence.delete(id_proveedor);\n }",
"public void DeleteProductById(String pid) {\r\n String query = \"delete from Trungnxhe141261_Product\\n\"\r\n + \"where id=?\";\r\n\r\n try {\r\n conn = new DBContext().getConnection();//mo ket noi voi sql\r\n ps = conn.prepareStatement(query);\r\n ps.setString(1, pid);\r\n ps.executeUpdate();\r\n } catch (Exception e) {\r\n }\r\n\r\n }",
"public void deletePartitura(final Partitura partitura, final String documentId) {\n AlertDialog.Builder dialog = new AlertDialog.Builder(getContext());\n dialog.setTitle(R.string.Aviso);\n dialog.setMessage(R.string.avisoBorrar);\n\n dialog.setPositiveButton(android.R.string.yes, (dialogInterface, i) -> {\n // if ok\n StorageReference sRef = mStorageReference.child(FirebaseContract.PartituraEntry.STORAGE_PATH_UPLOADS + partitura.getPdf());\n sRef.delete()\n .addOnSuccessListener(taskSnapshot -> {\n mDatabaseReference.collection(FirebaseContract.PartituraEntry.DATABASE_PATH_UPLOADS).document(documentId).delete();\n Intent intent = new Intent(getContext(), PrincipalActivity.class);\n startActivity(intent);\n Toast.makeText(getContext(), getString(R.string.borradoCorrecto),Toast.LENGTH_LONG).show();\n })\n .addOnFailureListener(exception -> Toast.makeText(getContext(), exception.getMessage(), Toast.LENGTH_LONG).show());\n });\n //If cancel don't delete\n dialog.setNegativeButton(android.R.string.no, (dialogInterface, i) -> {\n\n });\n dialog.show();\n }",
"void deleteArt(Art art);",
"@Command(\"delete\")\n @NotifyChange({\"events\", \"selectedEvent\"})\n public void delete() {\n if(this.selectedEvent != null) {\n eventDao.delete(this.selectedEvent);\n this.selectedEvent = null;\n }\n }",
"@FXML\n public void deleteSet(MouseEvent e) {\n //confirm first\n Alert confirmAlert = new Alert(AlertType.CONFIRMATION, \"\", ButtonType.YES, ButtonType.NO);\n confirmAlert.setHeaderText(\"Are you sure you want to delete this set?\");\n Optional<ButtonType> result = confirmAlert.showAndWait();\n if (result.get() == ButtonType.YES) {\n //delete from database\n try (\n Connection conn = dao.getConnection();\n PreparedStatement stmt = conn.prepareStatement(\"DELETE FROM Theory WHERE Title = ?\");\n ) {\n conn.setAutoCommit(false);\n stmt.setString(1, txtTitle.getText());\n stmt.executeUpdate();\n conn.commit();\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n\n //delete from interface\n VBox vbxCards = (VBox) apnSetRow.getParent();\n vbxCards.getChildren().remove(apnSetRow);\n }\n }",
"@Test\n\tpublic void deleteOrderLineProduct() {\n\t\t// TODO: JUnit - Populate test inputs for operation: deleteOrderLineProduct \n\t\tInteger orderline_id_1 = 0;\n\t\tInteger related_product_id = 0;\n\t\tOrderLine response = null;\n\t\tresponse = service.deleteOrderLineProduct(orderline_id_1, related_product_id);\n\t\t// TODO: JUnit - Add assertions to test outputs of operation: deleteOrderLineProduct\n\t}",
"@FXML\r\n public void deleteTreatmentButton(){\r\n int sIndex = treatmentTabletv.getSelectionModel().getSelectedIndex();\r\n String sID = treatmentData.get(sIndex).getIdProperty();\r\n\r\n String deleteTreatment = \"delete from treatment where treatmentID = ?\";\r\n try{\r\n ps = mysql.prepareStatement(deleteTreatment);\r\n ps.setString(1,sID);\r\n ps.executeUpdate();\r\n ps.close();\r\n ps = null;\r\n\r\n } catch (SQLException e) {\r\n e.printStackTrace();\r\n //maybe more in this exception\r\n }\r\n\r\n treatmentData.remove(sIndex);\r\n }",
"public void delete(SgfensPedidoProductoPk pk) throws SgfensPedidoProductoDaoException;",
"@FXML\n\tprivate void handleDeleteTaxi() {\n\t\tint selectedIndex = TaxiTable.getSelectionModel().getSelectedIndex();\n\t\tif (selectedIndex >= 0) {\n\t\t\tTaxiTable.getItems().remove(selectedIndex);\n\t\t} else {\n\t\t\t// Nothing selected.\n\t\t}\n\t}",
"protected void deleteClicked(View view){\n PriceFinder pf = new PriceFinder();\n pf = this.itm.getItem(this.position);\n this.itm.removeItem(pf);\n try {\n save();\n } catch (IOException e) {\n e.printStackTrace();\n }\n finish();\n }"
] | [
"0.7831314",
"0.7224282",
"0.721199",
"0.7199201",
"0.71844757",
"0.70818007",
"0.70762306",
"0.7010362",
"0.69632685",
"0.6957476",
"0.6945326",
"0.6903465",
"0.6807709",
"0.6708588",
"0.67023176",
"0.6699",
"0.66728336",
"0.6547586",
"0.64520043",
"0.64442116",
"0.64178413",
"0.6416539",
"0.64105666",
"0.6407036",
"0.640478",
"0.63590634",
"0.63435143",
"0.63424224",
"0.63247544",
"0.6286381",
"0.6246937",
"0.62235177",
"0.6212912",
"0.61796105",
"0.61501694",
"0.6131856",
"0.6126479",
"0.611786",
"0.61147755",
"0.60964257",
"0.60866165",
"0.6063656",
"0.60530514",
"0.6041702",
"0.6041648",
"0.60413796",
"0.6032507",
"0.59983927",
"0.5991004",
"0.5989433",
"0.59695315",
"0.596602",
"0.5956524",
"0.5953218",
"0.59448314",
"0.592656",
"0.59201",
"0.59085214",
"0.5907777",
"0.5871457",
"0.5859874",
"0.5850483",
"0.58499676",
"0.58478093",
"0.58444476",
"0.5843027",
"0.58372694",
"0.58337176",
"0.5832461",
"0.5816872",
"0.58141434",
"0.58123404",
"0.58052826",
"0.5795051",
"0.57889783",
"0.5788887",
"0.57865614",
"0.5773609",
"0.5772793",
"0.57419914",
"0.5740137",
"0.5739645",
"0.57392025",
"0.5736661",
"0.5736031",
"0.5734298",
"0.5729934",
"0.57249814",
"0.57201415",
"0.5719494",
"0.57123876",
"0.5703518",
"0.5702946",
"0.5701279",
"0.56982523",
"0.56932735",
"0.56874245",
"0.56852514",
"0.56695694",
"0.56679523"
] | 0.7195604 | 4 |
Save the product method | @FXML
void onActionSaveProduct(ActionEvent event) throws IOException {
int id = Inventory.ProductCounter();
String name = AddProductName.getText();
int stock = Integer.parseInt(AddProductStock.getText());
Double price = Double.parseDouble(AddProductPrice.getText());
int max = Integer.parseInt(AddProductMax.getText());
int min = Integer.parseInt(AddProductMin.getText());
Inventory.addProduct(new Product(id, name, price, stock, min, max, product.getAllAssociatedParts()));
//EXCEPTION SET 1 REQUIREMENT
if(min > max){
Alert alert = new Alert(Alert.AlertType.ERROR);
alert.setTitle("ERROR");
alert.setContentText("Quantity minimum is larger than maximum.");
alert.showAndWait();
return;
} if (stock > max){
Alert alert = new Alert(Alert.AlertType.ERROR);
alert.setTitle("ERROR");
alert.setContentText("Inventory quantity exceeds maximum stock allowed.");
alert.showAndWait();
return;
}
changeScreen(event, "MainScreen.fxml");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void saveProduct(Product product);",
"public void saveProduct(Product product);",
"@Override\r\n\tpublic void saveProduct(Product product) throws Exception {\n\r\n\t}",
"public boolean save(Product product);",
"Product save(Product product);",
"public void save() {\n ProductData.saveData(tree);\n }",
"private void saveProduct() {\n //Delegating to the Presenter to trigger focus loss on listener registered Views,\n //in order to persist their data\n mPresenter.triggerFocusLost();\n\n //Retrieving the data from the views and the adapter\n String productName = mEditTextProductName.getText().toString().trim();\n String productSku = mEditTextProductSku.getText().toString().trim();\n String productDescription = mEditTextProductDescription.getText().toString().trim();\n ArrayList<ProductAttribute> productAttributes = mProductAttributesAdapter.getProductAttributes();\n mCategoryOtherText = mEditTextProductCategoryOther.getText().toString().trim();\n\n //Delegating to the Presenter to initiate the Save process\n mPresenter.onSave(productName,\n productSku,\n productDescription,\n mCategoryLastSelected,\n mCategoryOtherText,\n productAttributes\n );\n }",
"void saveOrUpdate(Product product);",
"@Override\n\tpublic void saveProduct(Product product) {\n\t\t productRepository.save(product);\n\t\t\n\t}",
"public void saveNewProduct(Product product) throws BackendException;",
"private void saveProduct() {\n Product product;\n String name = productName.getText().toString();\n if (name.isEmpty()) {\n productName.setError(getResources().getText(R.string.product_name_error));\n return;\n }\n String brandStr = brand.getText().toString();\n String brandOwnerStr = brandOwner.getText().toString();\n if (dbProduct == null) {\n product = new Product();\n product.setGtin(gtin);\n product.setLanguage(language);\n } else {\n product = dbProduct;\n }\n if (!name.isEmpty()) {\n product.setName(name);\n }\n if (!brandStr.isEmpty()) {\n product.setBrand(brandStr);\n }\n if (!brandOwnerStr.isEmpty()) {\n product.setBrandOwner(brandOwnerStr);\n }\n product.setCategory(selectedCategoryKey);\n LoadingIndicator.show();\n // TODO enable/disable save button\n PLYCompletion<Product> completion = new PLYCompletion<Product>() {\n @Override\n public void onSuccess(Product result) {\n Log.d(\"SavePDetailsCallback\", \"Product details saved\");\n dbProduct = result;\n LoadingIndicator.hide();\n if (isNewProduct) {\n SnackbarUtil.make(getActivity(), getView(), R.string.product_saved, Snackbar\n .LENGTH_LONG).show();\n DataChangeListener.productCreate(result);\n } else {\n SnackbarUtil.make(getActivity(), getView(), R.string.product_edited, Snackbar\n .LENGTH_LONG).show();\n DataChangeListener.productUpdate(result);\n }\n }\n\n @Override\n public void onPostSuccess(Product result) {\n FragmentActivity activity = getActivity();\n if (activity != null) {\n activity.onBackPressed();\n }\n }\n\n @Override\n public void onError(PLYAndroid.QueryError error) {\n Log.d(\"SavePDetailsCallback\", error.getMessage());\n if (isNewProduct || !error.isHttpStatusError() || !error.hasInternalErrorCode\n (PLYStatusCodes.OBJECT_NOT_UPDATED_NO_CHANGES_CODE)) {\n SnackbarUtil.make(getActivity(), getView(), error.getMessage(), Snackbar.LENGTH_LONG)\n .show();\n }\n LoadingIndicator.hide();\n }\n\n @Override\n public void onPostError(PLYAndroid.QueryError error) {\n if (!isNewProduct && error.isHttpStatusError() && error.hasInternalErrorCode(PLYStatusCodes\n .OBJECT_NOT_UPDATED_NO_CHANGES_CODE)) {\n FragmentActivity activity = getActivity();\n if (activity != null) {\n activity.onBackPressed();\n }\n }\n }\n };\n if (dbProduct == null) {\n ProductService.createProduct(sequentialClient, product, completion);\n } else {\n ProductService.updateProduct(sequentialClient, product, completion);\n }\n }",
"Product storeProduct(Product product);",
"public void saveButtonPressed(ActionEvent actionEvent) throws IOException{\n validateInputs(actionEvent);\n\n if (isInputValid) {\n //creates a new Product object with identifier currentProduct\n currentProduct = new Product(productNameInput, productInventoryLevel, productPriceInput, maxInventoryLevelInput, minInventoryLevelInput);\n\n //passes currentProduct as the argument for the .addMethod.\n Inventory.getAllProducts().add(currentProduct);\n\n //utilizes the associatedPartsTableviewHolder wiht a for loop to pass each element as an argument\n //for the .addAssociatedPart method.\n for (Part part : associatedPartTableViewHolder) {\n currentProduct.addAssociatedPart(part);\n }\n\n //calls the returnToMainMen() method.\n mainMenuWindow.returnToMainMenu(actionEvent);\n }\n else {\n isInputValid = true;\n }\n\n }",
"public void save() {\n }",
"@Override\r\n\tpublic void save(Plate tipo) {\n\t\t\r\n\t}",
"@Override\n\tpublic Result saveProduct(Product p) {\n\t\tproeductDao.save(p);\n\t\treturn new Result(0,\"success\");\n\t}",
"public void saveJpmProductSaleNew(JpmProductSaleNew jpmProductSaleNew);",
"@Override\n\tpublic void save() {\n\t\tSystem.out.println(\"save method\");\n\t}",
"Product postProduct(Product product);",
"private void saveProduct() {\n // Read from input fields\n // Use trim to eliminate leading or trailing white space\n String nameString = mNameEditText.getText().toString().trim();\n String InfoString = mDescriptionEditText.getText().toString().trim();\n String PriceString = mPriceEditText.getText().toString().trim();\n String quantityString = mQuantityEditText.getText().toString().trim();\n\n // Check if this is supposed to be a new Product\n // and check if all the fields in the editor are blank\n if (mCurrentProductUri == null &&\n TextUtils.isEmpty(nameString) && TextUtils.isEmpty(InfoString) &&\n TextUtils.isEmpty(PriceString) && TextUtils.isEmpty(quantityString)) {\n // Since no fields were modified, we can return early without creating a new Product.\n // No need to create ContentValues and no need to do any ContentProvider operations.\n return;\n }\n\n // Create a ContentValues object where column names are the keys,\n // and Product attributes from the editor are the values.\n ContentValues values = new ContentValues();\n values.put(ProductContract.productEntry.COLUMN_product_NAME, nameString);\n values.put(ProductContract.productEntry.COLUMN_Product_description, InfoString);\n\n int price = 0;\n if (!TextUtils.isEmpty(PriceString)) {\n price = Integer.parseInt(PriceString);\n }\n values.put(ProductContract.productEntry.COLUMN_product_price, price);\n int quantity = 0;\n if (!TextUtils.isEmpty(quantityString)) {\n quantity = Integer.parseInt(quantityString);\n }\n values.put(productEntry.COLUMN_product_Quantity, quantity);\n\n // image\n Bitmap icLanucher = BitmapFactory.decodeResource(getResources(), R.mipmap.ic_launcher);\n Bitmap bitmap = ((BitmapDrawable) mImageView.getDrawable()).getBitmap();\n if (!equals(icLanucher, bitmap) && mImageURI != null) {\n values.put(ProductContract.productEntry.COLUMN_product_image, mImageURI.toString());\n }\n // validate all the required information\n if (TextUtils.isEmpty(nameString) || (quantityString.equalsIgnoreCase(\"0\")) || TextUtils.isEmpty(PriceString)) {\n Toast.makeText(this, getString(R.string.insert_Product_failed), Toast.LENGTH_SHORT).show();\n } else {\n // Determine if this is a new or existing Product by checking if mCurrentProductUri is null or not\n if (mCurrentProductUri == null) {\n // This is a NEW Product, so insert a new pet into the provider,\n // returning the content URI for the new Product.\n Uri newUri = getContentResolver().insert(ProductContract.productEntry.CONTENT_URI, values);\n\n // Show a toast message depending on whether or not the insertion was successful.\n if (newUri == null) {\n // If the new content URI is null, then there was an error with insertion.\n Toast.makeText(this, getString(R.string.editor_insert_Product_failed),\n Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the insertion was successful and we can display a toast.\n Toast.makeText(this, getString(R.string.editor_insert_Product_successful),\n Toast.LENGTH_SHORT).show();\n }\n } else {\n // Otherwise this is an EXISTING Product, so update the Product with content URI: mCurrentProductUri\n // and pass in the new ContentValues. Pass in null for the selection and selection args\n // because mCurrentProductUri will already identify the correct row in the database that\n // we want to modify.\n int rowsAffected = getContentResolver().update(mCurrentProductUri, values, null, null);\n\n // Show a toast message depending on whether or not the update was successful.\n if (rowsAffected == 0) {\n // If no rows were affected, then there was an error with the update.\n Toast.makeText(this, getString(R.string.editor_update_Product_failed),\n Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the update was successful and we can display a toast.\n Toast.makeText(this, getString(R.string.editor_update_Product_successful),\n Toast.LENGTH_SHORT).show();\n }\n }\n }\n }",
"@ServiceMethod(name = \"SaveStoreProduct\")\r\n\tpublic IResponseHandler saveStoreProduct(StoreProductDTO dto)\r\n\t{\t\r\n\t\t if(validate(dto))\r\n\t\t {\r\n\t\t\t \tStore store = StoreDAO.getInstance(getSession()).findByPrimaryKey(dto.getStoreID());\r\n\t\t\t\tProduct product = ProductDAO.getInstance(getSession()).findByPrimaryKey(dto.getProductID());\r\n\t\t\t\t\r\n\t\t\t\tStoreProduct sp = DomainFactory.getInstance().newStoreProduct(store, product);\r\n\t\t\t\t\r\n\t\t\t\tsp.setInstock(dto.isInstock());\r\n\t\t\t\tsp.setInTransit(dto.getInTransit());\r\n\t\t\t\tsp.setQuantity(dto.getQuantity());\r\n\t\t\t\tsp.setReorderPoint(dto.getReorderPoint());\r\n\t\t\t\t\r\n\t\t\t\tgetSession().persist(sp); \r\n\t\t }\r\n\t\t\r\n\t\t\r\n\t\treturn dto;\r\n\t}",
"@Test\n\tpublic void saveOrderLineProduct() {\n\t\t// TODO: JUnit - Populate test inputs for operation: saveOrderLineProduct \n\t\tInteger id_1 = 0;\n\t\tProduct related_product = new ecom.domain.Product();\n\t\tOrderLine response = null;\n\t\tresponse = service.saveOrderLineProduct(id_1, related_product);\n\t\t// TODO: JUnit - Add assertions to test outputs of operation: saveOrderLineProduct\n\t}",
"public void save(Veranstaltung veranstaltung) throws RuntimeException;",
"@Override\n public void save() {\n \n }",
"@Override\n public void save()\n {\n \n }",
"public void save() {\t\n\t\n\t\n\t}",
"@Override\n public void Save() {\n\t \n }",
"public void save();",
"public void save();",
"public void save();",
"public void save();",
"public void saveProduit(Produit theProduit);",
"@Override\r\n\tpublic void save() {\n\r\n\t\ts.save();\r\n\r\n\t}",
"@Override\n\tpublic void save() {\n\t\t\n\t}",
"@Override\n\tpublic void save() {\n\t\t\n\t}",
"public JavaproductModel postproduct(JavaproductModel oJavaproductModel){\n\n \t/* Create a new hibernate session and begin the transaction*/\n Session hibernateSession = HibernateUtil.getSessionFactory().openSession();\n Transaction hibernateTransaction = hibernateSession.beginTransaction();\n\n /* Insert the new product to database*/\n int productId = (Integer) hibernateSession.save(oJavaproductModel);\n\n /* Commit and terminate the session*/\n hibernateTransaction.commit();\n hibernateSession.close();\n\n /* Return the JavaproductModel with updated productId*/\n oJavaproductModel.setproductId(productId);\n return oJavaproductModel;\n }",
"private void updateDatFile() {\n\t\tIOService<?> ioManager = new IOService<Entity>();\n\t\ttry {\n\t\t\tioManager.writeToFile(FileDataWrapper.productMap.values(), new Product());\n\t\t\tioManager = null;\n\t\t} catch (Exception ex) {\n\t\t\tDisplayUtil.displayValidationError(buttonPanel, StoreConstants.ERROR + \" saving new product\");\n\t\t\tioManager = null;\n\t\t}\n\t}",
"@Override\n public void save() {\n\n }",
"public void operationSave() {\n\r\n\t\tstatusFeldSave();\r\n\t}",
"public void saveInformation(){\n market.saveInformationOfMarket();\n deckProductionCardOneBlu.saveInformationOfProductionDeck();\n deckProductionCardOneGreen.saveInformationOfProductionDeck();\n deckProductionCardOneViolet.saveInformationOfProductionDeck();\n deckProductionCardOneYellow.saveInformationOfProductionDeck();\n deckProductionCardThreeBlu.saveInformationOfProductionDeck();\n deckProductionCardThreeGreen.saveInformationOfProductionDeck();\n deckProductionCardThreeYellow.saveInformationOfProductionDeck();\n deckProductionCardThreeViolet.saveInformationOfProductionDeck();\n deckProductionCardTwoBlu.saveInformationOfProductionDeck();\n deckProductionCardTwoGreen.saveInformationOfProductionDeck();\n deckProductionCardTwoViolet.saveInformationOfProductionDeck();\n deckProductionCardTwoYellow.saveInformationOfProductionDeck();\n\n\n }",
"@Override\r\n\tpublic void save() {\n\r\n\t}",
"@Override\r\n\tpublic void save() {\n\r\n\t}",
"Product addNewProductInStore(Product newProduct);",
"@Override\n\tpublic void save(Product product) throws SQLException {\n\t\tproductDao.save(product);\n\t}",
"Product updateProductInStore(Product product);",
"@FXML\n void saveModifyProductButton(ActionEvent event) throws IOException {\n\n try {\n int id = selectedProduct.getId();\n String name = productNameText.getText();\n Double price = Double.parseDouble(productPriceText.getText());\n int stock = Integer.parseInt(productInventoryText.getText());\n int min = Integer.parseInt(productMinText.getText());\n int max = Integer.parseInt(productMaxText.getText());\n\n if (name.isEmpty()) {\n AlartMessage.displayAlertAdd(5);\n } else {\n if (minValid(min, max) && inventoryValid(min, max, stock)) {\n\n Product newProduct = new Product(id, name, price, stock, min, max);\n\n assocParts.forEach((part) -> {\n newProduct.addAssociatedPart(part);\n });\n\n Inventory.addProduct(newProduct);\n Inventory.deleteProduct(selectedProduct);\n mainScreen(event);\n }\n }\n } catch (IOException | NumberFormatException e){\n AlartMessage.displayAlertAdd(1);\n }\n }",
"@Override\n public void save(Promocion prm) {\n promocionRepository.save(prm);\n }",
"@Override\n\tpublic void saveOrUpdate(Product p) {\n\t\tproductDao.saveOrUpdate(p);\n\t}",
"public void save(){\n\t\tlowresModelManager.save();\n\t}",
"public void saveOrUpdate(AircraftProductParam app);",
"@Override\n\tpublic ProductDto saveProduct(ProductDto product) {\n\t\treturn null;\n\t}",
"Product saveProduct (Long categoryId, Long productId);",
"protected abstract void doSave();",
"public void save()throws Exception{\n if(!pname1.getText().isEmpty() && !qty1.getText().isEmpty() && !prc1.getText().isEmpty() && !rsp1.getText().isEmpty() ){\r\n s_notif1.setId(\"hide\");\r\n ArrayList<Product> ar = new ArrayList<>();\r\n com.mysql.jdbc.Connection conn = db.getConnection();\r\n Statement stm = conn.createStatement();\r\n int rs = stm.executeUpdate(\"UPDATE products SET \"\r\n + \"name='\"+pname1.getText()+\"', \"\r\n + \"qty='\"+qty1.getText()+\"', \"\r\n + \"price='\"+prc1.getText()+\"',\"\r\n + \"re_stock_point='\"+rsp1.getText()+\"' WHERE ID ='\"+S_ID+\"';\");\r\n if(rs > 0){\r\n s_notif1.setId(\"show\");\r\n }\r\n }\r\n loadData();\r\n }",
"public void saveProduct(Product product) {\n\t\tProduct is_product = productDAO.getProductByPrimaryKey(product.getTid());\r\n\t\tif (is_product != null) {//보존될 값은 새로 정의한다.\r\n\t\t\tis_product\t= product;\r\n\t\t\tis_product.setTid(product.getTid());\r\n\t\t\tis_product.setHit(product.getHit());\r\n\t\t\tproductDAO.updateProduct(is_product);\r\n\t\t} else {\r\n\t\t\t/*\r\n\t\t\t\tDate date = new Date();\r\n\t\t\t\tCalendar cal = Calendar.getInstance();\r\n\t\t\t\tcal.setTime(date);\r\n\t\t\t\tdate = cal.getTime();\r\n\t\t\t\tproduct.setWdate(cal.getTime());\r\n\t\t\t*/\r\n\t\t\tproduct.setHit(0);\r\n\t\t\tproductDAO.saveProduct(product);\r\n\t\t}\r\n\t\t//productDAO.flush();\r\n\t}",
"void save();",
"void save();",
"void save();",
"public String productOpenNewSave() {\n\t\tactionStartTime = new Date();\n\t\ttry {\n\t\t\tpromotionProgramMgr.saveListPromotionProductOpen(promotionId, listProductOpen, getLogInfoVO());\n\t\t} catch (Exception e) {\n\t\t\tLogUtility.logErrorStandard(e, R.getResource(\"web.log.message.error\", \"vnm.web.action.program.PromotionCatalogAction.productOpenNewSave\"), createLogErrorStandard(actionStartTime));\n\t\t\tresult.put(\"errMsg\", ValidateUtil.getErrorMsg(ConstantManager.ERR_SYSTEM));\n\t\t\tresult.put(ERROR, true);\n\t\t}\n\t\treturn SUCCESS;\n\t}",
"x0401.oecdStandardAuditFileTaxPT1.ProductDocument.Product addNewProduct();",
"public void doSave(VideogameBean prod) throws SQLException {\n\n\t\tDatabaseConnector connector = new DatabaseConnector();\n\t\tconnector.startConnection();\n\t\tPreparedStatement state = null;\n\t\tstate = connector.getJdbcConnection()\n\t\t\t\t.prepareStatement(\"insert into Videogioco values (?, ?, ?, ?, ?, ?, ?, ?)\");\n\n\t\tstate.setInt(1, prod.getVideogameCode());\n\t\tstate.setString(2, prod.getTitle());\n\t\tstate.setString(3, prod.getDescription());\n\t\tstate.setString(4, prod.getConsole());\n\t\tstate.setDouble(5, prod.getPrice());\n\t\tstate.setInt(6, prod.getAvailability());\n\t\tstate.setInt(7, prod.getShipment());\n\t\tstate.setString(8, prod.getImgPath());\n\t\tstate.executeUpdate();\n\t\tconnector.closeConnection();\n\n\t}",
"private void saveNewCatalog() {\n\n\t}",
"@Override\n @Transactional\n public Producto save(Producto producto) {\n Presentacion presentacion = presentacionDao.findById(producto.getPresentacion().getId());\n producto.setPresentacion(presentacion);\n return productoDao.save(producto);\n }",
"@Override\r\n\tpublic void save() throws SaveException {\n\t\t\r\n\t}",
"public String saveProductConvert() {\n\t\tactionStartTime = new Date();\n\t\tresetToken(result);\n\t\ttry {\n\t\t\tif (listConvertGroup != null && listConvertGroup.size() > 0) {\n\t\t\t\tfor (PPConvertVO vo : listConvertGroup) {\n\t\t\t\t\tif (null == vo.getId()) {\n\t\t\t\t\t\tList<PPConvertVO> __result = promotionProgramMgr.listPromotionProductConvertVO(promotionId, vo.getName());\n\t\t\t\t\t\tif (__result.size() > 0) {\n\t\t\t\t\t\t\tresult.put(ERROR, true);\n\t\t\t\t\t\t\tresult.put(\"errMsg\", Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"promotion.product.convert.duplicate.group.error\", vo.getName()));\n\t\t\t\t\t\t\treturn SUCCESS;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t/** @author update nhutnn, @since 14/05/2015 */\n\t\t\t\t\t\tif (vo.getListDetail() != null) {\n\t\t\t\t\t\t\tfor (int i = 0, sz = vo.getListDetail().size(); i < sz; i++) {\n\t\t\t\t\t\t\t\tif (vo.getListDetail().get(i) != null) {\n\t\t\t\t\t\t\t\t\tString proCode = vo.getListDetail().get(i).getProductCode();\n\t\t\t\t\t\t\t\t\tif (!StringUtil.isNullOrEmpty(proCode)) {\n\t\t\t\t\t\t\t\t\t\tProduct product = productMgr.getProductByCode(proCode);\n\t\t\t\t\t\t\t\t\t\tif (product == null) {\n\t\t\t\t\t\t\t\t\t\t\tresult.put(ERROR, true);\n\t\t\t\t\t\t\t\t\t\t\tresult.put(\"errMsg\", R.getResource(\"catalog.display.program.update.sale.product.product.not.exists\", proCode));\n\t\t\t\t\t\t\t\t\t\t\treturn SUCCESS;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tresult.put(ERROR, true);\n\t\t\t\t\t\t\t\t\t\tresult.put(\"errMsg\", R.getResource(\"price.manage.err.imp.product.isnull\"));\n\t\t\t\t\t\t\t\t\t\treturn SUCCESS;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tpromotionProgramMgr.savePPConvert(promotionId, listConvertGroup, getLogInfoVO());\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tLogUtility.logErrorStandard(e, R.getResource(\"web.log.message.error\", \"vnm.web.action.program.PromotionCatalogAction.saveProductConvert\"), createLogErrorStandard(actionStartTime));\n\t\t\tresult.put(\"errMsg\", ValidateUtil.getErrorMsg(ConstantManager.ERR_SYSTEM));\n\t\t\tresult.put(ERROR, true);\n\t\t}\n\t\treturn SUCCESS;\n\t}",
"private void saveData() {\n }",
"public void save(ZpEvaluateDegreeVersionEntity entity) {\n\t\tdao.save(entity);\n\t}",
"public boolean save();",
"private void saveChanges() {\n product.setName(productName);\n product.setPrice(price);\n\n viewModel.updateProduct(product, new OnAsyncEventListener() {\n @Override\n public void onSuccess() {\n Log.d(TAG, \"updateProduct: success\");\n Intent intent = new Intent(EditProductActivity.this, MainActivity.class);\n startActivity(intent);\n }\n\n @Override\n public void onFailure(Exception e) {\n Log.d(TAG, \"updateProduct: failure\", e);\n final androidx.appcompat.app.AlertDialog alertDialog = new androidx.appcompat.app.AlertDialog.Builder(EditProductActivity.this).create();\n alertDialog.setTitle(\"Can not save\");\n alertDialog.setCancelable(true);\n alertDialog.setMessage(\"Cannot edit this product\");\n alertDialog.setButton(androidx.appcompat.app.AlertDialog.BUTTON_NEGATIVE, \"ok\", (dialog, which) -> alertDialog.dismiss());\n alertDialog.show();\n }\n });\n }",
"@Test\n public void saveProduct_should_update_product_with_new_product_fields() {\n final Product product = productStorage.saveProduct(new Product(1, \"Oranges\", 150, 3));\n\n //get product with id = 1\n final Product updatedProduct = productStorage.getProduct(1);\n\n assertThat(product, sameInstance(updatedProduct));\n }",
"@PostMapping(\"/products\") \nprivate int saveProduct(@RequestBody Products products) \n{ \nproductsService.saveOrUpdate(products); \nreturn products.getProductid(); \n}",
"public void saveShoppingCart() throws BackendException;",
"public JavaproductModel putproduct(JavaproductModel oJavaproductModel){\n\n \t/* Create a new hibernate session and begin the transaction*/\n Session hibernateSession = HibernateUtil.getSessionFactory().openSession();\n Transaction hibernateTransaction = hibernateSession.beginTransaction();\n\n /* Update the existing product of the database*/\n hibernateSession.update(oJavaproductModel);\n\n /* Commit and terminate the session*/\n hibernateTransaction.commit();\n hibernateSession.close();\n return oJavaproductModel;\n }",
"public static void saveReview(Review r, Product p, String overall, String price, String packaging, String quality, String environment, String productName){\n\t\t\t\t\n\t\t\t\tr.overallRate = Integer.parseInt(overall);\n\t\t\t\tr.priceRate = Integer.parseInt(price);\n\t\t\t\tr.packagingRate = Integer.parseInt(packaging);\n\t\t\t\tr.qualityRate = Integer.parseInt(quality);\n\t\t\t\tr.environmentRate = Integer.parseInt(environment);\n\t\t\t\t\n\t\t\t\tList <Product> prod = Product.find(\"productName\", productName).fetch();\n\t\t\t\t\n\t\t\t\tr.p = prod.get(0);\n\t\t\t\t\n\t\t\t\tif(Security.isConnected()){\n\t\t\t\t\tMember m = Member.find(\"byEmail\", Security.connected()).first();\n\t\t\t\t\t\n\t\t\t\t\tr.m = m;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tr.save();\n\t\t\t\treviewsList();\n\t\t\t}",
"public void save(PtJJdwcy entity);",
"public boolean update(Product product);",
"Product addOneProduct(String name, String imgNameBarcode, String imgName, String barcode) throws Exception;",
"public void addProduct(Product product);",
"protected void save() {\n close();\n if(saveAction != null) {\n saveAction.accept(getObject());\n }\n }",
"private void saveFunction() {\n }",
"@Override\n\t@Transactional\n\tpublic Boolean saveImportPro(List<FormProduct> formProduct) {\n\t\treturn importDao.saveImportPro(formProduct);\n\t}",
"public void saveAll(Collection<Product> products);",
"public void saveProduct(View view) {\n String name = this.name.getText().toString();\n String desc = this.desc.getText().toString();\n String ref = this.ref.getText().toString();\n // Validamos que los campos del form no esten vacios\n if (name.equals(\"\")) {\n this.name.setError(\"Campo obligatorio\");\n } else if (desc.equals(\"\")) {\n this.desc.setError(\"Campo obligatorio\");\n } else if (ref.equals(\"\")) {\n this.ref.setError(\"Campo obligatorio\");\n } else {\n progressDialog.setTitle(\"Cargando...\");\n progressDialog.setMessage(\"Subiendo producto\");\n progressDialog.setCancelable(false);\n progressDialog.show();\n // Creamos un producto y le asignamos los valores del formulario\n final Product product = new Product();\n product.setId(UUID.randomUUID().toString());\n product.setName(name.toLowerCase());\n product.setDescription(desc);\n product.setRef(ref);\n // Si la uri de la imagen no esta vacia, guardamos la imagen en el store de la base de datos\n if (uriImage != null) {\n final StorageReference filePath = storageReference.child(\"images\").child(uriImage.getLastPathSegment());\n filePath.putFile(uriImage).addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n // Si se ha subido la imagen correctamente, sacamos la url de descarga y se la setteamos a nuestro producto, y guardamos el producto en la base de datos\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n filePath.getDownloadUrl().addOnCompleteListener(new OnCompleteListener<Uri>() {\n @Override\n public void onComplete(@NonNull Task<Uri> task) {\n String downloadUrl = task.getResult().toString();\n product.setImage(downloadUrl);\n databaseReference.child(\"productos\").child(product.getId()).setValue(product);\n progressDialog.dismiss();\n Intent mainActivityView = new Intent(AddProduct.this, MainActivity.class);\n AddProduct.this.startActivity(mainActivityView);\n Toast.makeText(AddProduct.this, \"¡Producto guardado con éxito!\", Toast.LENGTH_LONG).show();\n }\n });\n }\n });\n }\n }\n }",
"@PostMapping(\"/save\")\r\n\tpublic String save(@ModelAttribute Product product,Model model) \r\n\t{\r\n\t\tservice.saveProduct(product);\r\n\t\tmodel.addAttribute(\"info\", \"Product '\"+product.getProdId()+\"' saved!\");\r\n\t\treturn \"ProductRegister\";\r\n\t}",
"public void save(){\r\n\t\tmanager.save(this);\r\n\t}",
"public void save() {\n //write lift information to datastore\n LiftDataAccess lda = new LiftDataAccess();\n ArrayList<Long>newKeys = new ArrayList<Long>();\n for (Lift l : lift) {\n newKeys.add(lda.insert(l));\n }\n\n //write resort information to datastore\n liftKeys = newKeys;\n dao.update(this);\n }",
"public void save() {\n super.storageSave(listPedidosAssistencia.toArray());\n }",
"@Override\r\n\tpublic int save() throws NotesApiException {\n\t\treturn 0;\r\n\t}",
"@Override\n\tpublic void save(EhmoPackage ehmoPackage) {\n\t\t\n\t\t\n\t\tehmoPackageDao.save(ehmoPackage);\n\t\t\n\t}",
"public void saveAlgorithm(){\r\n \tthis.getLog().info(\" saveAlgorithm()\");\r\n \tif(selectedAlgorithmID>=0){\r\n \t\t// edited existing algorithm\r\n \t\talgorithmList.updateAlgorithmToDB(selectedAlgorithm);\r\n \t}else{\r\n \t\t// new algorithm\r\n \t}\r\n \tinitAlgorithmList(selectedAlgorithmID);\r\n }",
"public abstract String doSave() throws Exception;",
"public void save(){\r\n\t\t//System.out.println(\"call save\");\r\n\t\tmodel.printDoc();\r\n\t}",
"private void writeNewProduct(Product product) {\n database.child(\"user-groceries\").child(LoginRepository.activeUserId()).child(product.name).setValue(product);\n }",
"public void saveData(){\r\n file.executeAction(modelStore);\r\n }",
"public SavableFieldMethod(Method method, Class<?> type) {\n\t\tLOGGER.trace(\"Creating a new SaveMethod, checking validity\");\n\n\t\tif (method == null) {\n\n\t\t\tSaveException sEx = new SaveException(\"Method is null\");\n\t\t\tLOGGER.error(\"The Method is null!\", sEx);\n\t\t\tthrow sEx;\n\n\t\t} else if (!Modifier.isStatic(method.getModifiers())) {\n\n\t\t\t// That is ironic! :)) ... Ahem, method must be static.\n\t\t\tSaveException sEx = new SaveException(String.format(\"Saving Method %s is not static!\", method.getName()));\n\t\t\tLOGGER.error(String.format(\"Method %s is not static!\", method.getName()), sEx);\n\t\t\tthrow sEx;\n\n\t\t} else if (!method.isAccessible()) {\n\n\t\t\t// Can't stop laughing about that name XD ... Ahem, method must be accessible\n\t\t\tSaveException sEx =\n\t\t\t\t\t\tnew SaveException(String.format(\"Saving Method %s is not accessible\", method.getName()));\n\t\t\tLOGGER.error(String.format(\"Method %s is not accessible\", method.getName()), sEx);\n\t\t\tthrow sEx;\n\n\t\t} else if (!validMethod(method)) {\n\n\t\t\t// LMAO... ahem, if the method does not have proper parameters or returns, throw SaveException.\n\t\t\tSaveException sEx =\n\t\t\t\t\t\tnew SaveException(String.format(\"Saving Method %s does not have valid paramters or return\",\n\t\t\t\t\t\t\t\t\tmethod.getName()));\n\t\t\tLOGGER.error(String.format(\"Method %s is not valid\", sEx));\n\t\t\tthrow sEx;\n\n\t\t}\n\n\t\tLOGGER.trace(\"Let's make sure that the Type is valid\");\n\n\t\tif (type == null) {\n\n\t\t\t// Really only have to make sure that it isn't null\n\t\t\tSaveException sEx = new SaveException(\"field is null\");\n\t\t\tLOGGER.error(\"Invalid type... null\");\n\t\t\tthrow sEx;\n\n\t\t}\n\n\t\tLOGGER.trace(\"Validity passes checked, assigning variables\");\n\n\t\t// Save full qualified name\n\t\tthis.methodName = this.saveMethod.getDeclaringClass().getName() + this.saveMethod.getName();\n\n\t\t// Save type name\n\t\tthis.typeName = type.getName();\n\n\t\t// Save type\n\t\tthis.type = type;\n\n\t\t// Lets set the method now\n\t\tthis.saveMethod = method;\n\t}",
"public void save()\n\t{\t\n\t\tfor (Preis p : items) {\n\t\t\titmDAO.create(p.getItem());\n\t\t\tprcDAO.create(p);\n\t\t}\n\t\tstrDAO.create(this);\n\t}",
"void saveShipment(Shipment shipment);",
"@Override\n\tpublic int saveObject(Evaluate entity) {\n\t\treturn evaluateMapper.saveObject(entity)\n\t\t\t\t;\n\t}",
"@Override\n public void saveButtonListener() {\n // Resets Error Label for resubmit.\n productErrorLabel.setVisible(false);\n productErrorLabel.setText(\"\");\n // If super's error checks are true for any changes to text fields.\n // Then set new values and update product.\n if (getFieldValues()) {\n this.product.setName(this.productName);\n this.product.setPrice(this.productPrice);\n this.product.setStock(this.productInv);\n this.product.setMax(this.productMax);\n this.product.setMin(this.productMin);\n Inventory.updateProduct(productIndex, this.product);\n // Close window\n Stage stage = (Stage) productSaveButton.getScene().getWindow();\n stage.close();\n }\n }",
"void addProduct(Product product);",
"public abstract void saveOrder(Order order);"
] | [
"0.75219506",
"0.74355346",
"0.7177909",
"0.7176308",
"0.6937885",
"0.6932502",
"0.6851578",
"0.6582494",
"0.6466794",
"0.64560765",
"0.6376024",
"0.62911445",
"0.6278309",
"0.62382966",
"0.61910623",
"0.6177321",
"0.61766493",
"0.60811603",
"0.60275215",
"0.6023106",
"0.59898823",
"0.59759843",
"0.5973129",
"0.5968896",
"0.5963554",
"0.5946058",
"0.5935519",
"0.591402",
"0.591402",
"0.591402",
"0.591402",
"0.58964324",
"0.5891179",
"0.58889776",
"0.58889776",
"0.58886",
"0.58649784",
"0.5862468",
"0.5861264",
"0.58308446",
"0.58221525",
"0.58221525",
"0.5799905",
"0.5791124",
"0.5789789",
"0.577913",
"0.5775902",
"0.5765325",
"0.57503456",
"0.57331824",
"0.57204485",
"0.5718639",
"0.5716826",
"0.57076377",
"0.5697657",
"0.56945586",
"0.56945586",
"0.56945586",
"0.5694456",
"0.56713766",
"0.56663054",
"0.5662982",
"0.5653645",
"0.5653369",
"0.5641848",
"0.5603877",
"0.5596297",
"0.5596128",
"0.55860543",
"0.5582496",
"0.55778337",
"0.5563587",
"0.55619144",
"0.5539859",
"0.5534972",
"0.5524666",
"0.5523254",
"0.5514592",
"0.5513979",
"0.5511346",
"0.55105567",
"0.5504766",
"0.5503062",
"0.5487803",
"0.548172",
"0.54802346",
"0.54681224",
"0.5467917",
"0.5449796",
"0.54418224",
"0.54382384",
"0.54375553",
"0.5431695",
"0.54288334",
"0.5423418",
"0.5421066",
"0.5420914",
"0.5419634",
"0.54188114",
"0.54045683",
"0.53980047"
] | 0.0 | -1 |
Exit to the main screen | @FXML
void onActionDisplayMainScreen(ActionEvent event) throws IOException {
//EXCEPTION SET 2 REQUIREMENT
Alert alert = new Alert(Alert.AlertType.CONFIRMATION);
alert.setTitle("Confirmation Dialog");
alert.setHeaderText("Changes not Saved");
alert.setContentText("Would you like to continue?");
Optional<ButtonType> result = alert.showAndWait();
if (result.get() == ButtonType.OK){
stage = (Stage)((Button)event.getSource()).getScene().getWindow();
scene = FXMLLoader.load(getClass().getResource("MainScreen.fxml"));
stage.setScene(new Scene(scene));
stage.show();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void exit() {\n Intent intent = new Intent(this, MainActivity.class);\n this.startActivity(intent);\n }",
"public void exit()\r\n\t{\r\n\t\tmainFrame.exit();\r\n\t}",
"private void Exit() {\r\n this.dispose();\r\n app.setVisible(true);\r\n }",
"public void exitToMain(View view) {\n Intent exitToMain = new Intent(getApplicationContext(), MainActivity.class);\n startActivity(exitToMain);\n }",
"private static void exit(){\n\t\t\n\t\tMain.run=false;\n\t\t\n\t}",
"public void showExit();",
"public void exitButtonClicked() {\r\n\t\tSystem.exit(0); \r\n\t\treturn;\r\n\t}",
"private void exitGame() {\n System.exit(0);\n }",
"public void exit() {\r\n \t\t// Send a closing signat to main window.\r\n \t\tmainWindow.dispatchEvent(new WindowEvent(mainWindow, WindowEvent.WINDOW_CLOSING));\r\n \t}",
"protected abstract void quitToMainMenu();",
"public void exit() {\r\n\t\tdispose();\r\n\t}",
"public void gotoMain(View view) {\n finish();\n }",
"private void exitApp()\n {\n if(spider.isCrawling())\n {\n stopCrawler();\n showTransition(1000);\n Timer task = new Timer(1000, (ActionEvent e)->\n {\n System.exit(0);\n });\n\n task.setRepeats(false);\n task.start();\n }\n \n else System.exit(0);\n }",
"public void menu()\r\n\t{\r\n\t\t//TODO\r\n\t\t//Exits for now\r\n\t\tSystem.exit(0);\r\n\t}",
"private static void exit(){\r\n try{\r\n mainFrame.exiting();\r\n\r\n // Save the l&f class name\r\n setProperty(\"default.lf\", UIManager.getLookAndFeel().getClass().getName());\r\n\r\n\r\n boolean isFrameOK = true;\r\n Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\r\n Rectangle frameBounds = mainFrame.getBounds();\r\n if (frameBounds.x+frameBounds.width < 50)\r\n isFrameOK = false;\r\n if (frameBounds.y < -10)\r\n isFrameOK = false;\r\n if (frameBounds.width < 30)\r\n isFrameOK = false;\r\n if (frameBounds.height < 40)\r\n isFrameOK = false;\r\n if (frameBounds.x > screenSize.width - 10)\r\n isFrameOK = false;\r\n if (frameBounds.y > screenSize.height - 20)\r\n isFrameOK = false;\r\n\r\n // Save the bounds of the main frame.\r\n if (isFrameOK)\r\n setProperty(\"frame.bounds\", StringEncoder.encodeRectangle(frameBounds));\r\n\r\n OutputStream propsOut = new FileOutputStream(new File(jinUserHome, \"user.properties\"));\r\n userProps.save(propsOut, \"Jin chess client properties\");\r\n propsOut.close();\r\n System.exit(0);\r\n } catch (IOException e){\r\n System.err.println(\"Unable to complete exit procedure:\");\r\n e.printStackTrace();\r\n }\r\n }",
"public void quitnow(View view){\n finish();\n System.exit(0);\n }",
"public void exitWindow()\n {\n //hide all windows except intro screen\n introScreen.setVisible(true);\n optionsScreen.setVisible(false);\n instructionScreen.setVisible(false);\n gameSelectScreen.setVisible(false);\n lobbyScreen.setVisible(false);\n revealedCardsScreen.setVisible(false);\n accusationScreen.setVisible(false);\n mainGameScreen.setVisible(false);\n\n clientController.leaveLobby();\n\n //set state to INTRO\n state = CurrentWindow.INTRO;\n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n System.exit(1);\n }",
"@FXML\n private void handleExit() {\n GuiSettings guiSettings = new GuiSettings(primaryStage.getWidth(), primaryStage.getHeight(),\n (int) primaryStage.getX(), (int) primaryStage.getY());\n logic.setGuiSettings(guiSettings);\n logic.displayAllTasks();\n resultDisplay.setFeedbackToUser(\"\");\n primaryStage.hide();\n }",
"private void exitAction() {\n\t}",
"@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}",
"private void quit()\n\t{\n\t\tapplicationView.showChatbotMessage(quitMessage);\n\t\tSystem.exit(0);\n\t\t\n\t}",
"protected void quit() {\n if (display != null) {\n display.close();\n }\n System.exit(0);\n }",
"@Override\n\tpublic void goToMainMenu() {\n\t\tfinish();\n\t}",
"@Override\n public void actionPerformed(ActionEvent e) {\n System.exit(0);\n }",
"public void exitApp() {\n\t\tSystem.out.println(\"Exiting PhoneBook\");\n\n\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tSystem.exit(0);\n\n\t\t\t}",
"private void returnToMain() {\n Intent intent = new Intent(this, MainActivity.class);\n startActivity(intent);\n }",
"public void quit() {\r\n\t\tSystem.out.println(\"Quitting Game\");\r\n\t\tMain.setModel(new Model());\r\n\t\tMain.changeScene(Main.getMainMenu());\r\n\t}",
"@Override\r\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tSystem.exit(0);\r\n\t\t\t\t\t\r\n\t\t\t\t}",
"private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {\n System.exit(0);\r\n }",
"public void actionPerformed(ActionEvent e) {\n System.exit(0);\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tSystem.exit(0);\n\t\t\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tSystem.exit(0);\n\t\t\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tSystem.exit(0);\n\t\t\t}",
"private void exitApplication()\r\n {\r\n System.exit(0);\r\n }",
"private void sairButtonActionPerformed(java.awt.event.ActionEvent evt) {\n System.exit(0);\n }",
"private void jMenuItem4ActionPerformed(java.awt.event.ActionEvent evt) {\n System.exit(0);\n }",
"public void exit();",
"public void exitGame() {\n System.out.println(\"Thank you and good bye!\");\n System.exit(0);\n }",
"public void backToMainMenu()\n {\n primaryStage.close();\n }",
"private void btnExitActionPerformed(java.awt.event.ActionEvent evt) {\n System.exit(0);\n }",
"public void exitProgram() {\n\t\tgoOffline();\n\t\tmainWindow.dispose();\n\t\tif (config_ok)\n\t\t\tsaveConnectionConfiguration();\n\t\tSystem.exit(0);\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tSystem.exit(0);\r\n\t\t\t}",
"private void exitApplication() {\n Button exit = (Button) findViewById(R.id.activity_one_exit_button); // exit button declaration\n exit.setOnClickListener(new View.OnClickListener() { //set listener for exit button\n @Override\n public void onClick(View v) {\n finish();//close the activity\n\n }\n });\n }",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\r\n\t\t\t\tSystem.exit(0);\r\n\r\n\t\t\t}",
"private void backToMain() {\n // https://stackoverflow.com/questions/5446565\n // Checks to see if they are still on this activity\n if (getWindow().getDecorView().getRootView().isShown()) {\n onBackPressed();\n }\n }",
"public void Exit_button() {\n\t \t Stage stage = (Stage) btnExit.getScene().getWindow();\n\t \t \n\t \t stage.close();\n\t }",
"public void actionPerformed(ActionEvent e) {\r\n System.exit(0);\r\n }",
"public void quit(){\n\t\tSystem.out.println(\"Quitting game\");\n\t\tSystem.exit(0);\n\t}",
"@Override\n\t\t\tpublic void onClick(View view) {\n\t\t\t\t\n\t\t\t\tfinish();\n\t\t\t\t\n\t\t\t\tmApplication.exit();\n\t\t\t}",
"public void exit() {\n System.out.println(\"Thank you for playing Nim\");\n }",
"public void exit(ActionEvent actionEvent) {\r\n //Closes hibernate and then the program.\r\n controller.exit();\r\n System.exit(0);\r\n }",
"@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\texit();\r\n\t\t\t}",
"public void quitGame() {\n\t\t\tdisplay(\"Goodbye!\");\n\t\t\tSystem.exit(0);\n\t\t}",
"@Override\r\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tSystem.exit(0);\r\n\t\t}",
"protected void exit() {\n\t\tSystem.exit(0);\n\t}",
"private void btnKeluarActionPerformed(java.awt.event.ActionEvent evt) {\n System.exit(0);\n }",
"public void exit() {\n\t\tSystem.exit(0);\n\t}",
"public void exit() {\n\t\tSystem.exit(0);\n\t}",
"private void ending() {\n\t\tstartView.ending();\n\t\tSystem.exit(-1);\n\t}",
"private void exitApplication() {\n\t\tBPCC_Logger.logInfoMessage(classNameForLogger, logMessage_applicationFrameClosed);\r\n\t\tSystem.exit(0);\r\n\t}",
"private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {\n System.exit(0);\n }",
"public void exitToMenu()\n {\n exitToMenuFlag = true;\n }",
"private void returnToMainScreen(ActionEvent event) throws IOException {\r\n\r\n Parent parent = FXMLLoader.load(getClass().getResource(\"../view/MainScreen.fxml\"));\r\n Scene scene = new Scene(parent);\r\n Stage stage = (Stage) ((Node) event.getSource()).getScene().getWindow();\r\n stage.setScene(scene);\r\n stage.show();\r\n }",
"public void onExit() {\n Intent homeIntent = new Intent(Intent.ACTION_MAIN);\n homeIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n homeIntent.addCategory(Intent.CATEGORY_HOME);\n startActivity(homeIntent);\n finish();\n }",
"private void doExit() {\n\n AlertDialog.Builder alertDialog = new AlertDialog.Builder(\n BookingActivity.this);\n\n alertDialog.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int which) {\n //finish();\n //System.exit(0);\n goBack();\n }\n });\n\n alertDialog.setNegativeButton(\"No\", null);\n\n alertDialog.setMessage(\"Do you want to exit?\");\n alertDialog.setTitle(\" \");\n alertDialog.show();\n }",
"@Override\n public void onClick(View v) {\n System.exit(0);\n }",
"public void terminate() {\n screen.closeScreen();\n }",
"private void exitHandler() {\n JOptionPane.showMessageDialog(this.getParent(), \"Thanks for leaving\"\n + \", quitter! >:(\");\n Component possibleFrame = this;\n while (possibleFrame != null && !(possibleFrame instanceof JFrame)) {\n possibleFrame = possibleFrame.getParent();\n }\n JFrame frame = (JFrame) possibleFrame;\n frame.setVisible(false);\n frame.dispose();\n }",
"public void Exit(){\n\t\t\t\tclose();\n\t\t\t}",
"private void actionOnClicExit() {\r\n\t\tframe.setVisible(false);\r\n\t\tframe.dispose();\r\n\t}",
"private void printExitMenu() {\n System.out.println(\"Goodbye! Thanks for using the app!\");\n }",
"@Override\r\n\tpublic void exit() {\n\t\t\r\n\t}",
"public void exit() {\n loader.getApplet().stop();\n loader.getApplet().destroy();\n }",
"public void doExit(View view) {\n mainHelper.restart();\n setContentView(R.layout.fragment_main_activity_ttt);\n }",
"@Override\n public void onClick(View v) {\n finish();\n System.exit(0);\n }",
"@Override\n public void onClick(View v) {\n finish();\n System.exit(0);\n }",
"private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {\n System.exit(0);\n }",
"public void returnToMainScreen(ActionEvent event) throws IOException {\n Parent root = FXMLLoader.load(getClass().getResource(\"/view/MainScreen.fxml\"));\n Scene scene = new Scene(root);\n Stage window = (Stage) ((Node)event.getSource()).getScene().getWindow();\n window.setScene(scene);\n window.show();\n }",
"static void quit()\n {\n clrscr();\n System.out.println(\"You don't suck in life human. Life sucks you in.\");\n System.exit(0);\n }",
"private void menuitemExitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menuitemExitActionPerformed\n if ( mainApp != null ) {\n mainApp.btnExitActionPerformed(); // note call to method in Main class\n } else {\n System.exit( 0 );\n }\n }",
"public void clickedQuitButton(Button button) {\r\n System.exit(0);\r\n }",
"private void jmiExitActionPerformed(java.awt.event.ActionEvent evt) {\n System.exit(0);\r\n }",
"private void goToMainPage() {\n mAppModel.getErrorBus().removePropertyChangeListener(this);\n mAppModel.removePropertyChangeListener(this);\n mNavigationHandler.goToMainPage();\n }",
"public void returnToMenu(){\n client.moveToState(ClientState.WELCOME_SCREEN);\n }",
"private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {\n System.exit(0);\n }",
"@Override\n public void exit() {\n super.exit();\n }",
"public void Exit() {\r\n \tsuper.onBackPressed();\r\n }",
"public void exit() {\n\t\tnextPlace = exitName;\n\t\tOrganizer.getOrganizer().deleteSuspended();\n\t\texit(Values.LANDSCAPE);\n\t}",
"public void requestExit()\r\n {\r\n // WE MAY HAVE TO SAVE CURRENT WORK\r\n boolean continueToExit = true;\r\n if (!saved)\r\n {\r\n // THE USER CAN OPT OUT HERE\r\n continueToExit = promptToSave();\r\n }\r\n \r\n // IF THE USER REALLY WANTS TO EXIT THE APP\r\n if (continueToExit)\r\n {\r\n // EXIT THE APPLICATION\r\n System.exit(0);\r\n }\r\n }",
"public abstract void exit();",
"private void redirectToMain() {\n\t\tIntent intent = new Intent(this, Main.class);\r\n\t\tstartActivity(intent);\r\n\t\tfinish();\r\n\t}",
"private void exitProgram() {\n try {\n logic.updateInventory();\n } catch (FileIOException e) {\n view.displayExceptionMessage(\"Error updating inventory file: \" + e.getMessage());\n view.waitOnUser();\n }\n view.showExitMessage();\n }",
"static void exit()\r\n\t {\n\t\t System.exit(0);\r\n\t }",
"public void actionPerformed(ActionEvent ae) {\n controller.beforeQuit();\n System.exit(-1);\n }",
"private void shopExitButtonClicked() {\n finish();\n }",
"private void closeProgram() {\n\t\tSystem.out.println(\"Cancel Button clicked\");\n\t\tif (ConfirmBox.display( \"Exit\", \"Are you sure you want to exit?\")) {\n\t\t\tSystem.exit(0);\n\t\t}\n\t}",
"@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\tSystem.exit(0);\n\t\t\t}",
"void goMainScreen(){\n\t\tcheckSavePwd();\n\t\tActionEvent e = new ActionEvent();\n\t\te.sender = this;\n\t\te.action = ActionEventConstant.ACTION_SWITH_TO_CATEGORY_SCREEN;\n\t\tUserController.getInstance().handleSwitchActivity(e);\n\t}",
"public void quit()\r\n {\r\n brokerage.logout(this);\r\n myWindow = null;\r\n }"
] | [
"0.7974104",
"0.77808374",
"0.75397533",
"0.7536224",
"0.7421128",
"0.7335452",
"0.73157513",
"0.7264323",
"0.7214802",
"0.719996",
"0.71793425",
"0.7174651",
"0.7155703",
"0.71520156",
"0.714857",
"0.7145228",
"0.71408427",
"0.71390826",
"0.71235543",
"0.71203434",
"0.7109914",
"0.7107352",
"0.71025354",
"0.71003807",
"0.7071841",
"0.706772",
"0.7063005",
"0.70594674",
"0.70496243",
"0.70382243",
"0.7037374",
"0.70363355",
"0.7034908",
"0.7034908",
"0.7034908",
"0.7021953",
"0.70087427",
"0.6999965",
"0.69981456",
"0.69933677",
"0.6988851",
"0.69867915",
"0.6964254",
"0.69599813",
"0.69578683",
"0.69505423",
"0.69337577",
"0.693375",
"0.69336563",
"0.6921702",
"0.6913869",
"0.6908241",
"0.6905992",
"0.69053966",
"0.6901505",
"0.68963367",
"0.6889124",
"0.6861665",
"0.68564534",
"0.68564534",
"0.6856408",
"0.6852392",
"0.68293613",
"0.6827383",
"0.68202645",
"0.68193114",
"0.6814393",
"0.681215",
"0.6812007",
"0.67952824",
"0.67831814",
"0.6782682",
"0.67798144",
"0.67738897",
"0.6770058",
"0.6769695",
"0.6763601",
"0.6763601",
"0.676015",
"0.6758453",
"0.67541426",
"0.674346",
"0.6743019",
"0.6737066",
"0.672936",
"0.6728288",
"0.6727488",
"0.67184293",
"0.671781",
"0.6717505",
"0.6715826",
"0.6714513",
"0.66999924",
"0.6697731",
"0.6685432",
"0.6683084",
"0.668134",
"0.66756684",
"0.6674741",
"0.6670624",
"0.66552305"
] | 0.0 | -1 |
Evam Website Contact Form Automation | public static void main(String[] args) {
System.setProperty("webdriver.gecko.driver","C:\\geckodriver.exe");
WebDriver driver = new FirefoxDriver();
String baseUrl = "https://evam.com/";
// STEP 1 - launch Firefox and Visit EVAM Website
driver.get(baseUrl);
// Step 2 - Go to Contact tab
//Find Contact Link (HTML Element) with the help of xPath and then perform click operation to open the contact page
driver.findElement(By.xpath("(//span[contains(.,'Contact')])[1]")).click();
// Step 3- Copy all EVAM office addresses and paste them into the Message field of the form by pressing enter between each of them to make it easy to read.
// 1) Find out Span (HTML Element)t with xpath and get USA office address with getText method and finally store the text into a string variable called AddressUSA
String AddressUSA = driver.findElement(By.xpath("/html/body/div[2]/div/div[1]/div/div/div/div/div/div[10]/div[1]/div/div[1]/div/div[2]/p[2]/span")).getText();
// 2) Find the Message Text Area Element and then send the USA address value to Message with the help of sendkeys() method
driver.findElement(By.xpath("//textarea[@name='textarea-274']")).sendKeys(AddressUSA);
// 3) Finally to introduce a new line by replicating/impersonating the ENTER button I use Keys.ENTER in sendKeys() method
driver.findElement(By.xpath("//textarea[@name='textarea-274']")).sendKeys(Keys.ENTER);
// 1) Find out Span (HTML Element) with xpath and get Netherland office address with getText() method and finally store the text into a string variable called AddressNetherland
String AddressNetherland = driver.findElement(By.xpath("/html/body/div[2]/div/div[1]/div/div/div/div/div/div[10]/div[1]/div/div[2]/div/div[2]/p[2]/span")).getText();
// 2) Find the Message Text Area Element and then send the Netherland address value to Message with the help of sendkeys() method
driver.findElement(By.xpath("//textarea[@name='textarea-274']")).sendKeys(AddressNetherland);
// 3) Finally to introduce a new line by replicating/impersonating the ENTER button I use Keys.ENTER in sendKeys() method
driver.findElement(By.xpath("//textarea[@name='textarea-274']")).sendKeys(Keys.ENTER);
// 1) Find out Span (HTML Element) with xpath and get Turkey office address with getText() method and finally store the text into a string variable called AddressTurkey
String AddressTurkey = driver.findElement(By.xpath("/html/body/div[2]/div/div[1]/div/div/div/div/div/div[10]/div[1]/div/div[1]/div/div[3]/div/div/div[2]/p[2]/span")).getText();
// 2) Find the Message Text Area Element and then send the Turkey address value to Message with the help of sendkeys() method
driver.findElement(By.xpath("//textarea[@name='textarea-274']")).sendKeys(AddressTurkey);
// 3) Finally to introduce a new line by replicating/impersonating the ENTER button I use Keys.ENTER in sendKeys() method
driver.findElement(By.xpath("//textarea[@name='textarea-274']")).sendKeys(Keys.ENTER);
// 1) Find out Span (HTML Element) with xpath and get Russian office address with getText() method and finally store the text into a string variable called AddressRussia
String AddressRussia = driver.findElement(By.xpath("/html/body/div[2]/div/div[1]/div/div/div/div/div/div[10]/div[1]/div/div[2]/div/div[4]/p[2]/span")).getText();
// 2) Find the Message Text Area Element and then send the Russian address value to Message with the help of sendkeys() method
driver.findElement(By.xpath("//textarea[@name='textarea-274']")).sendKeys(AddressRussia);
// 3) Finally to introduce a new line by replicating/impersonating the ENTER button I use Keys.ENTER in sendKeys() method
driver.findElement(By.xpath("//textarea[@name='textarea-274']")).sendKeys(Keys.ENTER);
// Step 4 - Fill out Name, Email, Phone and Company Information
// First of all find HTML Elements one by one for (Name, Email, Phone and Company) and then use sendKeys() method to send the values in the text fields
driver.findElement(By.xpath("//input[@name='text-925']")).sendKeys("Hammad Afzal");
driver.findElement(By.xpath("//input[@name='email-705']")).sendKeys("[email protected]");
driver.findElement(By.xpath("//input[@type='tel']")).sendKeys("066987452");
driver.findElement(By.xpath("//input[contains(@name,'text-926')]")).sendKeys("Test Company");
try {
Thread.sleep(5000);
} catch (InterruptedException e) {
System.err.println("There was some error in Thread.sleep()");
}
// Step 5 - Find Span (HTML Element) with xpath for send button and then use to click() to submit the form
driver.findElement(By.xpath("(//input[contains(@type,'submit')])[2]")).click();
//close Firefox
driver.close();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void contactUs() {\n }",
"@Override\n public void onClick(View view) {\n final EditText name= (EditText) findViewById(R.id.namebox);\n String nam= name.getText().toString();\n final EditText message= (EditText) findViewById(R.id.messagebox);\n String messag= message.getText().toString();\n final EditText phone= (EditText) findViewById(R.id.phonebox);\n String phon= phone.getText().toString();\n final EditText company= (EditText) findViewById(R.id.companyname);\n String compan= company.getText().toString();\n\n\n if (nam.trim().length() == 0 || messag.trim().length() == 0 )\n {\n// This is done to make the phone vibrate for some milliseconds, and you need to also add it to the manifest...\n Vibrator vibrator = (Vibrator)getSystemService(Context.VIBRATOR_SERVICE);\n vibrator.vibrate(300);\n Toast.makeText(MsgActivity.this, \"All * are required\", Toast.LENGTH_SHORT).show();\n }else {\n\n\n startEmailActivity(\"[email protected]\", \"Enquiries / FeedBack\", \"===============================\" + \"\\n\" + \"Name: \" + nam + \"\\n\" + \"===============================\"\n + \"\\n\" + \"Company Name: \" + compan.trim() + \"\\n\" + \"===============================\" + \"\\n\" + \"Phone No: \" + phon + \"\\n\"\n + \"===============================\" + \"\\n\" + \"Message: \" + messag.trim() + \"\\n\" + \"===============================\" + \"\\n\"\n + \"===============================\" + \"\\n\"+ \"==========INFOMATRIX========== \"\n + \"\\n\" + \"Android version: \" + versionCode + \"\\n\" + \"DEVICE MODEL: \" + model + \"\\n\" + \"ANDROID OS: \"\n + os + \"\\n\" + \"API level: \" + api + \"\\n\" + \"TimeZone: \" + gmt + \"\\n\" + \"TZ: \" + gmt1 + \"\\n\" + \"Location: \" + tz.getID() + \"\\n\" + \"===============================\"+ \"\\n\" + \"===============================\" );\n Toast.makeText(MsgActivity.this, \"Your Feedback has been generated.\", Toast.LENGTH_LONG).show();\n// Toast.makeText(MsgActivity.this, \"Click Send\", Toast.LENGTH_LONG).show();\n }\n\n\n\n }",
"public void emailFieldTest() {\r\n\t\tif(Step.Wait.forElementVisible(QuoteForm_ComponentObject.emailFieldLocator, \"Email input field\", 5)) {\r\n\t\t\tStep.Action.typeText(QuoteForm_ComponentObject.emailFieldLocator, \"Email input field\", \"[email protected]\");\r\n\t\t}\r\n\t}",
"public void contact(User seller, String form){\n Contact contact = new Contact(this.user, seller);\n Message message = new Message(contact, form);\n //when other user sees message\n message.setMessageRead();\n }",
"public void sendMail() {\n String sub;\n String message;\n\n sub = \"Welcome\";\n message = \"Thank you for choosing us as your healthcare partners. Here we strive hard to ensure that\\n\"\n + \"you remain in good health. Not only we boast of an exellent team of doctors but also world class operational \\n\"\n + \"infrastructure in place. For any other information or details contact our reg desk. You can access\\n\"\n + \"your account with the Username:\" + txtUserName.getText()+ \"and your password:\" + txtPassword.getPassword().toString()+ \".\\n\\t\\t\\t -Team MVP\";\n\n SendEmail SE = new SendEmail(txtEmail.getText(), sub, message);\n }",
"public void openSpamPage() {\n WebDriverWait wait = new WebDriverWait(driver, 20);\n wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(\"//div[text()='COMPOSE']\")));\n inputSearch.clear();\n inputSearch.sendKeys(\"in:spam\");\n buttonSearch.click();\n }",
"public void inputRandomEmailToTextbox() {\r\n\t\twaitElementVisible(driver, RegisterForm.EMAIL_TEXTBOX);\r\n\t\tString emailAddress = \"auto06\" + getTodayString(\"ddMMyyHHmmss\")+\"@lv.com\";\r\n\t\tsendKeyElement(driver,RegisterForm.EMAIL_TEXTBOX, emailAddress);\r\n\t}",
"@Test\n public void TC2(){\n TryCloudUtil.clickContactsModule(driver);\n\n // 3.Click “New Contact” button\n // 4.Fill out the contact info like : Title, Phone, email, address , etc\n TryCloudUtil.CreatingNewContact(driver);\n\n // 5.Verify the contact name is added to the contact list\n WebElement newContact=driver.findElement(By.xpath(\"//body[@id='body-user']\"));\n Assert.assertTrue(newContact.isDisplayed());\n }",
"@Step\n public void assertContactUs(){\n contactusPages.assertContactUs();\n }",
"@Test\n @DisplayName(\"Test: check if 'Mail' action works.\")\n public void testSetMailAction() throws InterruptedException, ClientException {\n FormContainerEditDialog dialog = formComponents.openEditDialog(containerPath);\n dialog.setMailActionFields(from,subject,new String[] {mailto1,mailto2}, new String[] {cc1, cc2});\n Commons.saveConfigureDialog();\n JsonNode formContentJson = authorClient.doGetJson(containerPath , 1, HttpStatus.SC_OK);\n assertTrue(formContentJson.get(\"from\").toString().equals(\"\\\"\"+from+\"\\\"\"));\n assertTrue(formContentJson.get(\"subject\").toString().equals(\"\\\"\"+subject+\"\\\"\"));\n assertTrue(formContentJson.get(\"mailto\").get(0).toString().equals(\"\\\"\"+mailto1+\"\\\"\"));\n assertTrue(formContentJson.get(\"mailto\").get(1).toString().equals(\"\\\"\"+mailto2+\"\\\"\"));\n assertTrue(formContentJson.get(\"cc\").get(0).toString().equals(\"\\\"\"+cc1+\"\\\"\"));\n assertTrue(formContentJson.get(\"cc\").get(1).toString().equals(\"\\\"\"+cc2+\"\\\"\"));\n }",
"public void contact(View view){\n Intent emailIntent = new Intent(Intent.ACTION_SENDTO, Uri.parse(\"mailto:\" + \"[email protected]\"));\n emailIntent.putExtra(Intent.EXTRA_SUBJECT, \"Complaint: MLS App\");\n\n//emailIntent.putExtra(Intent.EXTRA_HTML_TEXT, body); //If you are using HTML in your body text\n\n startActivity(Intent.createChooser(emailIntent, \"What App would you like?\"));\n }",
"@When(\"^Click on Contactus Option$\")\r\n\tpublic void click_on_Contactus_Option() {\n\t\tnop.click(\"//*[@id=\\\"contact-link\\\"]/a\"); //clicking contact us option\r\n\t\t\r\n\t}",
"@Test(groups={\"Smoke\"})\n public static void Contactus() throws IOException{\n\t\t\t\tProperties prop=new Properties();\n\t\t\t\tFileInputStream ip= new FileInputStream(System.getProperty(\"user.dir\")+\"/src/main/resources/data.properties\");\n\t\t\t\tprop.load(ip);\n\t\t\n\t\t\t\t// Launching Browser\n\t\ttry{\n\t launchBrowser(BrowserName);\t\n\t \n\t // passing the URL\n\t \n\t\t sendURL(prop.getProperty(\"BaseUrl\"));\n\t\t\n\t\t // Performing Click on element\n click(Contactus);\n logger.info(\"Click on ContactUs Sucessfully\");\n \n // Performing Click on element\n \n Basetest.click(Home); \n logger.info(\"Navigating to Home \");\n \t\n // Closing the browser \n\t\t}catch (Exception e) {\n\t\t\t\n\n\t\t\t /* logger.error(\"Test Fail\", e);*/\n\t\t\t onTestFailure();\n\t\t\t driver.quit();\n\t\t\t Assert.fail(\"\");\n\t\t\t\t\n\t\t\t}\n\t \n\t \n\t // closing the browser\n\t \n\t quitBrowser();\n\t \n\t\t}",
"public static void main(String[] args) {\n\t\t\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"./Drivers/chromedriver.exe\");\r\n\t\tChromeDriver driver = new ChromeDriver();\r\n\t\tdriver.get(\"http://leaftaps.com/opentaps/control/main\");\r\n\t\tdriver.manage().window().maximize();\r\n\t\tdriver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\r\n\t\tdriver.findElementById(\"username\").sendKeys(\"DemoSalesManager\");\r\n\t\tdriver.findElementById(\"password\").sendKeys(\"crmsfa\");\r\n\t\tdriver.findElementByClassName(\"decorativeSubmit\").click();\r\n\t\tdriver.findElementByLinkText(\"CRM/SFA\").click();\r\n\t\t//find leads Tab\r\n\t\tdriver.findElementByXPath(\"//a[text()='Leads']\").click();\r\n\t\t//Leads LHS\r\n\t\tdriver.findElementByXPath(\"//a[text()='Find Leads']\").click();\r\n\t\tdriver.findElementByXPath(\"(//input[@name='firstName'])[3]\").sendKeys(\"Lakshmikanth\");\r\n\t\t//Clicking Find Leads button \r\n\t\tdriver.findElementByXPath(\"//button[text()='Find Leads']\").click();\r\n\t\tdriver.findElementByXPath(\"(//a[text()='Lakshmikanth'])[1]\").click();\r\n\t\t//click the Email\r\n\t\t//driver.findElementByXPath(\"//span[text()='Email']\").click();\r\n\t\t//driver.findElementByXPath(\"(//a[text()='Edit'])[1]\").click();\r\n\t\t\r\n\t\tWebElement Createnew = driver.findElementById(\"createNewContactMechTarget\");\r\n\t\tSelect sc = new Select(Createnew);\r\n\t\tList<WebElement> list = sc.getOptions();\r\n\t\tint size = list.size();\r\n\t\tSystem.out.println(size);\r\n\t\tlist.get(size-3);\r\n\t\tsc.selectByVisibleText(\"Email\");\r\n\t\tdriver.findElementByXPath(\"(//input[@class='inputBox'])[1]\").sendKeys(\"[email protected]\");\r\n\t\tdriver.findElementByXPath(\"(//a[@class='buttontext'])[1]\").click();\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\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\t\r\n\t\t\r\n\r\n\t}",
"@Test\n public void TC3(){\n TryCloudUtil.clickContactsModule(driver);\n\n // 3.Verify the contact names are in the list (Pre-condition: there should be at least 2 contact names are displayed On the contact list)\n\n //Creating 2 contacts\n TryCloudUtil.CreatingNewContact(driver);\n WebElement company=driver.findElement(By.xpath(\"//input[@id='contact-org']\"));\n company.sendKeys(\"Test1\");\n BrowserUtils.wait(5);\n\n TryCloudUtil.CreatingNewContact(driver);\n company.sendKeys(\"Test2\");\n BrowserUtils.wait(5);\n\n Assert.assertTrue(driver.getPageSource().contains(\"Test1\"));\n Assert.assertTrue(driver.getPageSource().contains(\"Test2\"));\n\n }",
"public void initContactCreation() {\n click(By.linkText(\"add new\"));\n //wd.findElement(By.linkText(\"add new\")).click();\n }",
"private void displayEmailFields() {\n FieldRelatedLabel emailLabel = new FieldRelatedLabel(\"Email\", 750, 270);\n\n invalidEmailLabel = new InvalidFormEntryLabel(\"Email must follow the format:\\[email protected]\", 910, 290, false);\n\n emailTF = new TextField();\n emailTF.relocate(750, 300);\n emailTF.textProperty().addListener(e->{FormValidatorPokeMongo.handleEmail(emailTF, invalidEmailLabel); });\n\n sceneNodes.getChildren().addAll(emailLabel, invalidEmailLabel, emailTF);\n }",
"public void email() {\n\t\t\t\temailGUI = new EmailGUI();\n\t\t\t\tpopUpWindow = emailGUI.getFrame();\n\t\t\t\tpopUpWindow.setVisible(true);\n\t\t\t\temailGUI.setListeners(new mailListener());\n\t\t\t}",
"public static void main(String[] args) throws InterruptedException {\n\t\tWebDriver dr = new FirefoxDriver();\r\n\t\t//Open a browser\r\n\t\tdr.get(\"https://training-support.net/selenium/simple-form\");\r\n\t\t//Get the title of the page\r\n\t\tString pageTitle = dr.getTitle();\r\n\t\tSystem.out.println(\"The title of the page is: \" +pageTitle);\r\n\t\t// Find element Firstname\r\n\t\t//WebElement Firstname = dr.findElement(By.id(\"firstName\"));\r\n\t\t//WebElement Firstname = dr.findElement(By.xpath(\"//*[@id=\\\"firstName\\\"]\"));\r\n\t\tWebElement Firstname = dr.findElement(By.cssSelector(\"#firstName\"));\r\n\t\tFirstname.sendKeys(\"Athiyan\");\r\n\t\tThread.sleep(1000);\r\n\t\t// Find element Lastname\r\n\t\tWebElement Lastname = dr.findElement(By.id(\"lastName\"));\r\n\t\tLastname.sendKeys(\"Anbarasan\");\r\n\t\tThread.sleep(1000);\r\n\t\t// Find element Email\r\n\t\tWebElement email = dr.findElement(By.id(\"email\"));\r\n\t\temail.sendKeys(\"[email protected]\");\r\n\t\tThread.sleep(1000);\r\n\t\t// Find element ContactNumber\r\n\t\tWebElement contactNumber = dr.findElement(By.id(\"number\"));\r\n\t\tcontactNumber.sendKeys(\"8667487219\");\r\n\t\tThread.sleep(1000);\r\n\t\t// Find element Message\r\n\t\tWebElement message = dr.findElement(By.xpath(\"//*[@id='simpleForm']/div/div[5]/textarea\"));\r\n\t\tmessage.sendKeys(\"Test Message\");\r\n\t\tThread.sleep(2000);\r\n\t\t //Click Submit\r\n dr.findElement(By.cssSelector(\"input[type='submit']\")).click();\r\n //dr.findElement(By.cssSelector(\"\")).click();\r\n \tThread.sleep(3000);\r\n \t\r\n \t//Switch to alert window\r\n\t\tAlert SimpleAlert = dr.switchTo().alert();\r\n\t\t\r\n\t\t//Get text in the alert box and print it\r\n\t\tString alerttext = SimpleAlert.getText();\r\n\t\tSystem.out.println(\"Alert text is: \" + \talerttext);\r\n\t\tAssert.assertEquals(alerttext, \"Thank You for reaching out to us, Athiyan Anbarasan\");\r\n\t\tThread.sleep(2000);\r\n\t\t\r\n\t\t//Close the alert box\r\n\t\tSimpleAlert.accept();\r\n \t\r\n\t\t\r\n //Close the browser\r\n dr.close();\r\n\t}",
"@Test(dependsOnMethods = {\"register\"})\n void confirmEmailAddressByCaptcha() {\n common.findWebElementByXpath(\"//*[@id=\\\"content\\\"]/fieldset/label/div\").click();\n\n //Click on Send captcha button\n common.timeoutSeconds(2);\n common.findWebElementById(\"send-captcha-button\").click();\n\n //No magic code is set\n common.verifyStatusMessage(\"Det uppstod ett problem med verifieringen av att du är en människa. \" +\n \"Var god försök igen.\");\n }",
"public void ClickAgentContactInformationPage() {\r\n\t\tagentcontactinfo.click();\r\n\t\t\tLog(\"Clicked the \\\"Agent Contact Information\\\" button on the Birthdays page\");\r\n\t}",
"private void checkFields() {\n\t\t\n\t\tboolean errors = false;\n\t\t\n\t\t// contact name\n\t\tString newName = ((TextView) findViewById(R.id.tvNewContactName)).getText().toString();\n\t\tTextView nameErrorView = (TextView) findViewById(R.id.tvContactNameError);\n\t\tif(newName == null || newName.isEmpty()) {\n\t\t\terrors = true;\n\t\t\tnameErrorView.setText(\"Contact must have a name!\");\n\t\t} else {\n\t\t\tnameErrorView.setText(\"\");\n\t\t}\n\t\t\n\t\t// contact phone number\n\t\tString newPhone = ((TextView) findViewById(R.id.tvNewContactPhone)).getText().toString();\n\t\tTextView phoneNumberErrorView = (TextView) findViewById(R.id.tvContactPhoneError);\n\t\tif(newPhone == null || newPhone.isEmpty()) {\n\t\t\terrors = true;\n\t\t\tphoneNumberErrorView.setText(\"Contact must have a phone number!\");\n\t\t} else {\n\t\t\tphoneNumberErrorView.setText(\"\");\n\t\t}\n\t\t\n\t\t// contact e-mail\n\t\tString newEmail= ((TextView) findViewById(R.id.tvNewContactEmail)).getText().toString();\n\t\tTextView emailErrorView = (TextView) findViewById(R.id.tvContactEmailError);\n\t\tif(newEmail == null || newEmail.isEmpty()) {\n\t\t\terrors = true;\n\t\t\temailErrorView.setText(\"Contact must have an E-mail!\");\n\t\t} else if (!newEmail.matches(\".+@.+\\\\..+\")) {\n\t\t\terrors = true;\n\t\t\temailErrorView.setText(\"Invalid E-mail address! Example:\"\n\t\t\t\t\t+ \"[email protected]\");\n\t\t} else {\n\t\t\temailErrorView.setText(\"\");\n\t\t}\n\t\t\n\t\t// contact note\n\t\tString newNote = ((TextView) findViewById(R.id.tvNewContactNote)).getText().toString();\n\t\t\n\t\t// contact Facebook profile address\n\t\tString newAddress = ((TextView) findViewById(R.id.tvNewContactAddress)).getText().toString();\n\t\t\n\t\t// save the new contact if all the required fields are filled out\n\t\tif(!errors) {\n\t\t\tif(newNote == null || newNote.isEmpty()) {\n\t\t\t\tnewNote = \"No note.\";\n\t\t\t}\n\t\t\t\n\t\t\tif(newAddress == null || newAddress.isEmpty()) {\n\t\t\t\tnewAddress = \"No address.\";\n\t\t\t}\n\t\t\tHomeActivity.listOfContacts.add(new Contact(newName, newPhone, newEmail, \n\t\t\t\t\tnewNote, newAddress));\n\t\t\tIntent intent = new Intent(AddContactActivity.this, HomeActivity.class);\n\t\t\tstartActivity(intent);\n\t\t}\n\t}",
"private void sendEmail() {\n String email = emailInput.getText().toString();\n String title = titleInput.getText().toString();\n String message = messageInput.getText().toString();\n\n if(email.isEmpty() ||title.isEmpty() ||message.isEmpty()){\n Toast.makeText(this, R.string.field_not_empty, Toast.LENGTH_SHORT).show();\n return;\n }\n\n if(!checkEmailPattern(email)){\n Toast.makeText(this,R.string.invalid_email,Toast.LENGTH_SHORT).show();\n return;\n }\n\n\n Intent emailIntent = new Intent(Intent.ACTION_SEND);\n\n emailIntent.putExtra(Intent.EXTRA_EMAIL, new String[]{email});\n emailIntent.putExtra(Intent.EXTRA_CC, new String[]{CC_CUPIC, CC_BAOTIC});\n emailIntent.putExtra(Intent.EXTRA_SUBJECT, title);\n emailIntent.putExtra(Intent.EXTRA_TEXT, message);\n\n emailIntent.setType(\"message/rfc822\");\n\n try{\n startActivity(Intent.createChooser(emailIntent,\"\"));\n finish();\n }catch(ActivityNotFoundException ex){\n Toast.makeText(this,R.string.cant_send,Toast.LENGTH_SHORT).show();\n }\n }",
"public void enterRandomEmailId() {\n String email = \"test\" + Utility.getRandomString(3) + \"@gmail.com\";\n Reporter.addStepLog(\"Enter email \" + email + \" to email field \" + _emailField.toString());\n sendTextToElement(_emailField, email);\n log.info(\"Enter email \" + email + \" to email field \" + _emailField.toString());\n }",
"public void navigateToWeb() throws Exception {\n\n server.setCurrentItem(1, HOME_URL);\n\n // Navegate to HOME_URL address\n browser.navigate(HOME_URL);\n\n //Tihis command is uses to make visible in the desktop the page (IExplore issue)\n if (browserType.equals(\"IE\")) {\n client.clickOnCenter();\n client.pause(3000);\n }\n\n By lName = By.xpath(\"/html/body/div/div/div[1]/form/table/tbody/tr[1]/td/div/input\");\n By dob = By.xpath(\"/html/body/div/div/div[1]/form/table/tbody/tr[2]/td/div/input\");\n By accNumber = By.xpath(\"/html/body/div/div/div[1]/form/table/tbody/tr[3]/td/div/input\");\n By sortCd = By.xpath(\"/html/body/div/div/div[1]/form/table/tbody/tr[4]/td/div/input\");\n By pCode = By.xpath(\"/html/body/div/div/div[1]/form/table/tbody/tr[5]/td/div/input\");\n browser.textFieldSet(lName,lastName,true);\n browser.textFieldSet(dob,dateOfBirth,true);\n browser.textFieldSet(accNumber,accountNumber,true);\n browser.textFieldSet(sortCd,sortCode,true);\n browser.textFieldSet(pCode,postCode,true);\n\n browser.clickOnElement(By.xpath(\"/html/body/div/div/div[1]/form/div/input\"));\n\n By message = By.id(\"message\");\n\n boolean isMessageExists = browser.existsElement(message);\n\n if(!isMessageExists) {\n\n By tableId = By.id(\"customer\");\n WebElement table = browser.getElement(tableId);\n\n List<WebElement> th = table.findElements(By.tagName(\"th\"));\n\n int lastNamePos = 0;\n int postCodePos = 0;\n int dobPos = 0;\n int accountNoPos = 0;\n int sortCodePos = 0;\n\n for (int i = 0; i < th.size(); i++) {\n if (\"Last Name\".equalsIgnoreCase(th.get(i).getText())) {\n lastNamePos = i + 1;\n } else if (\"Date of Birth\".equalsIgnoreCase(th.get(i).getText())) {\n dobPos = i + 1;\n } else if (\"Account Number\".equalsIgnoreCase(th.get(i).getText())) {\n accountNoPos = i + 1;\n } else if (\"Sort Code\".equalsIgnoreCase(th.get(i).getText())) {\n sortCodePos = i + 1;\n } else if (\"Post Code\".equalsIgnoreCase(th.get(i).getText())) {\n postCodePos = i + 1;\n }\n }\n\n List<WebElement> lastNameElements = table.findElements(By.xpath(\"//tr/td[\" + lastNamePos + \"]\"));\n List<WebElement> dobElements = table.findElements(By.xpath(\"//tr/td[\" + dobPos + \"]\"));\n List<WebElement> accountElements = table.findElements(By.xpath(\"//tr/td[\" + accountNoPos + \"]\"));\n List<WebElement> sortCodeElements = table.findElements(By.xpath(\"//tr/td[\" + sortCodePos + \"]\"));\n List<WebElement> postCodeElements = table.findElements(By.xpath(\"//tr/td[\" + postCodePos + \"]\"));\n\n for (int i = 0; i < lastNameElements.size(); i++) {\n WebElement e = lastNameElements.get(i);\n if (e.getText().trim().equalsIgnoreCase(lastName)) {\n if (dobElements.get(i).getText().trim().equalsIgnoreCase(dateOfBirth)\n && accountElements.get(i).getText().trim().equalsIgnoreCase(accountNumber)\n && sortCodeElements.get(i).getText().trim().equalsIgnoreCase(sortCode)\n && postCodeElements.get(i).getText().trim().equalsIgnoreCase(postCode)) {\n resultMap.put(\"matchFound\", \"true\");\n break;\n }\n }\n }\n } else\n resultMap.put(\"matchFound\", \"false\");\n\n\n }",
"public void clickContactUS() {\n\t\tSystem.out.println(\"Clicked contactus link\");\n\t}",
"public void viewContact() \n\t{\n\t\tSystem.out.printf(\"%n--[ View Contact ]--%n\");\n\t\tScanner s = new Scanner(System.in);\n\t\tshowContactIndex();\n\t\tSystem.out.printf(\"%n%nClient Number: \");\n\t\tint index = s.nextInt();\n\t\tdisplayAll(index - 1);\n\t}",
"private void sendFeedback() {\n final String technicalInfo = commonsLogSender.getExtraInfo();\n\n final Intent feedbackIntent = new Intent(Intent.ACTION_SENDTO);\n feedbackIntent.setType(\"message/rfc822\");\n feedbackIntent.setData(Uri.parse(\"mailto:\"));\n feedbackIntent.putExtra(Intent.EXTRA_EMAIL,\n new String[]{CommonsApplication.FEEDBACK_EMAIL});\n feedbackIntent.putExtra(Intent.EXTRA_SUBJECT,\n CommonsApplication.FEEDBACK_EMAIL_SUBJECT);\n feedbackIntent.putExtra(Intent.EXTRA_TEXT, String.format(\n \"\\n\\n%s\\n%s\", CommonsApplication.FEEDBACK_EMAIL_TEMPLATE_HEADER, technicalInfo));\n try {\n startActivity(feedbackIntent);\n } catch (final ActivityNotFoundException e) {\n Toast.makeText(getActivity(), R.string.no_email_client, Toast.LENGTH_SHORT).show();\n }\n }",
"protected void TextHttp() {\n\t\tLoginBean loginb = new LoginBean();\n\t\tloginb.setPhone(\"15236290644\");\n\t\tActivityDataRequest.getLoginCheck(TagConfig.TAG_MSG,this, loginb);\n\t\t\n\t\tLoginBean loginb2 = new LoginBean();\n\t\tloginb2.setPhone(\"15631001601\");\n\t\tActivityDataRequest.getLoginCheck(2,this, loginb2);\n\t\t\n\t}",
"private static void signInCorpMailApp()\n\t{\n\t\t\n\t\tif(driver==null)\n\t\t\tlaunchBrowser();\n\t\t\n\t\tdriver.get(\"https://mail.nagra.com/\");\n\t\t\n\t\tCommonUtil.sleep(30);\n\t\t\n\t\t/*WebElement txtUserName = driver.findElement(By.id(\"username\"));\n\t\tWebElement txtPassword = driver.findElement(By.id(\"password\"));\n\t\t\n\t\tdriver.getTitle()\n\t\t\n\t\t//Input user name\n\t\ttxtUserName.clear();\n\t\ttxtUserName.sendKeys(username);\n\t\t\n\t\t//Input password\n\t\ttxtPassword.clear();\n\t\ttxtPassword.sendKeys(password);\n\t\t\n\t\t//Click login\n\t\tdriver.findElement(By.id(\"SubmitCreds\")).click();*/\n\t}",
"public static void goToFormPage() throws MalformedURLException {\n\t\tCommonUtils.homeFabClick();\n\t\tHomepageAction.select_dialog_list(\"Form\");\n\t}",
"SendEmail() {\t\n\t}",
"boolean sendUserMail(FormEditor target, String recipient, String formData, List<FormElement<?>> elements, List<MultipartFile> files);",
"public void launchContact(){\n\t\tIntent sendIntent = new Intent(Intent.ACTION_VIEW);\n \tsendIntent.setType(ContactsContract.Contacts.CONTENT_TYPE);\n\n if (sendIntent.resolveActivity(pacman) != null) {\n \tstartActivity(sendIntent);\n \treturn;\n } else {\n \tToast.makeText(context, \"No Texting App Availible\", Toast.LENGTH_SHORT).show();\n \treturn;\n }\n\t}",
"void submitBug() {\n\n Intent intent = new Intent(Intent.ACTION_SEND);\n intent.setType(\"plain/text\");\n intent.putExtra(Intent.EXTRA_EMAIL, new String[] { \"[email protected]\" });\n intent.putExtra(Intent.EXTRA_SUBJECT, \"36-3 Bug Report\");\n intent.putExtra(Intent.EXTRA_TEXT, \"The following question is incorrect: \\n\\n\" + \"Question Number: \" + currentQ.getID() + \"\\n\\n\" + currentQ.getQUESTION() + \"\\n\\n\" + \"Choice A: \"+ currentQ.getOPTA() + \"\\n\\n\" + \"Choice B: \"+ currentQ.getOPTB() + \"\\n\\n\" + \"Choice C: \" + currentQ.getOPTC() + \"\\n\\n\" + \"Choice D: \" + currentQ.getOPTD() + \"\\n\\n Additional Information: \\n\");\n startActivity(Intent.createChooser(intent, \"\"));\n\n\n }",
"public JoinNowPage enterEmailID() {\n\t\temail.sendKeys(\"[email protected]\");\n\t\treturn this;\n\t}",
"private void processEmails(ConnectionVO cvo, ActionRequest req) throws ActionException {\n\t\tCampaignMessageSender emailer = new CampaignMessageSender(getAttributes());\n\t\tSiteVO site = (SiteVO) req.getAttribute(Constants.SITE_DATA);\n\t\tRezDoxNotifier notifyUtil = new RezDoxNotifier(site, getDBConnection(), getCustomSchema());\n\n\t\t//not yet approved and we have either a sending member or sending business.\n\t\tif (cvo.getApprovedFlag() == 0 && (!StringUtil.isEmpty(cvo.getSenderMemberId()) || !StringUtil.isEmpty(cvo.getSenderBusinessId()))) {\n\t\t\tsendRequestEmail(cvo, emailer, notifyUtil);\n\n\t\t} else if (cvo.getApprovedFlag() == 1) {\n\t\t\tsendApprovedEmail(cvo, emailer, notifyUtil);\n\n\t\t\t//award 25 points to the members involved in this transaction - we do not award points to businesses.\n\t\t\tRewardsAction ra = new RewardsAction(getDBConnection(), getAttributes());\n\t\t\tif (!StringUtil.isEmpty(cvo.getSenderMemberId()))\n\t\t\t\tra.applyReward(Reward.CONNECT.name(), cvo.getSenderMemberId(), req);\n\t\t\tif (!StringUtil.isEmpty(cvo.getRecipientMemberId()))\n\t\t\t\tra.applyReward(Reward.CONNECT.name(), cvo.getRecipientMemberId(), req);\n\t\t}\n\t}",
"public void onClick(View arg0) {\n\t\t\t\tString emailAddress = \"[email protected]\";\r\n\t\t\t\tString emailSubject = edittextEmailSubject.getText().toString();\r\n\t\t\t\tString emailText = edittextEmailText.getText().toString();\r\n\t\t\t\tString emailAddressList[] = {emailAddress};\r\n\r\n\t\t\t\tIntent intent = new Intent(Intent.ACTION_SEND); \r\n\t\t\t\tintent.setType(\"plain/text\");\r\n\t\t\t\tintent.putExtra(Intent.EXTRA_EMAIL, emailAddressList); \r\n\t\t\t\tintent.putExtra(Intent.EXTRA_SUBJECT, emailSubject); \r\n\t\t\t\tintent.putExtra(Intent.EXTRA_TEXT, emailText); \r\n\t\t\t\tstartActivity(Intent.createChooser(intent, \"Choice App to send email:\"));\r\n\t\t\t}",
"public void enterEmailInAboutMe(String email) throws UIAutomationException{\r\n\t\r\n\t\telementController.requireElementSmart(fileName,\"Email Text Field In About Me\",GlobalVariables.configuration.getAttrSearchList(), \"Email Address\");\r\n\t\tUIActions.click(fileName,\"Email Text Field In About Me\",GlobalVariables.configuration.getAttrSearchList(), \"Email Address\");\r\n\t\tUIActions.clearTextBox(fileName,\"Email Text Field In About Me\",GlobalVariables.configuration.getAttrSearchList(), \"Email Address\");\r\n\t\tUIActions.enterValueInTextBox(email,fileName,\"Email Text Field In About Me\",GlobalVariables.configuration.getAttrSearchList(), \"Email Address\");\r\n\t\tUIActions.enterKey(Keys.TAB);\r\n\t\r\n\t}",
"void getEmergencyContact();",
"public static WebElement txtbx_PAEnhancedEntrance_EnterBusinessEmail() throws Exception{\r\n \ttry{\r\n \t\telement = driver.findElement(By.id(\"paLiteTxt\"));\r\n \t\tAdd_Log.info(\"User is enter text for Business Email field.\");\r\n \t\t\r\n \t}catch(Exception e){\r\n \t\tAdd_Log.error(\"PA Enhanced Entrance Business Email field is NOT found on the page.\");\r\n \t\tthrow(e);\r\n \t}\r\n \treturn element;\r\n }",
"public void setContactEmail(String contactEmail) {\n this.contactEmail = contactEmail;\n }",
"private static void Automata() throws InterruptedException, AWTException {\n\r\n\t\t// TODO Auto-generated method stub\r\n\t\tMap<String, Object> prefs = new HashMap<String, Object>();\r\n\t\tprefs.put(\"profile.default_content_setting_values.notifications\", 2);\r\n \r\n\r\n\t\t//Create an instance of ChromeOptions \r\n\t\tChromeOptions options = new ChromeOptions();\r\n\t\toptions.setExperimentalOption(\"prefs\", prefs);\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:\\\\Program Files\\\\chromedriver_win32\\\\chromedriver.exe\");\r\n\t\t\r\n\t\tWebDriver driver = new ChromeDriver(options);\r\n\t\tSystem.out.println(\"Driver initiated\");\r\n\t\tSystem.out.println(\"//////////////////////////////////////////\");\r\n\t\tSystem.out.println(\"//////////////////////////////////////////\");\r\n\t\tSystem.out.println(\"//////////////////////////////////////////\");\r\n\t\tSystem.out.println(\"//////////////////////////////////////////\");\r\n\t\t\r\n\t\t//Loading the website\r\n\t\tdriver.get(\"https://apps.google.com/meet/\");\r\n\t\tdriver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);\r\n\t\tSystem.out.println(\"//////////////////////////////////////////\");\r\n\t\tSystem.out.println(\"//////////////////////////////////////////\");\r\n\t\tSystem.out.println(\"//////////////////////////////////////////\");\r\n\t\tSystem.out.println(\"//////////////////////////////////////////\");\r\n\t\tSystem.out.println(\"Website loaded.\");\r\n\t\t\r\n\t\t//Clicks on the sign in button \r\n\t\tdriver.findElement(By.xpath(\"/html/body/header/div[1]/div/div[3]/div[1]/div/span[1]/a\")).click();\r\n\t\tdriver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);\r\n\t\tSystem.out.println(\"//////////////////////////////////////////\");\r\n\t\tSystem.out.println(\"//////////////////////////////////////////\");\r\n\t\tSystem.out.println(\"//////////////////////////////////////////\");\r\n\t\tSystem.out.println(\"//////////////////////////////////////////\");\r\n\t\tSystem.out.println(\"Sign in page loaded.\");\r\n\t\t\r\n\t\t//Clicks on the email field\r\n\t\tThread thread = new Thread();\r\n\t\t\r\n\t\tif(driver.findElement(By.xpath(\"/html/body/div[1]/div[1]/div[2]/div/div[2]/div/div/div[2]/div/div[1]/div/form/span/section/div/div/div[1]/div/div[1]/div/div[1]/input\")) == null)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Email\");\r\n\t\t\tWebElement email =driver.findElement(By.id(\"Email\"));\r\n\t\t\temail.sendKeys(\"<Enter Email Here>\");\r\n\t\t\temail.sendKeys(Keys.ENTER);\r\n\t\t}\r\n\t\t\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Email2\");\r\n\t\t\tWebElement email1=driver.findElement(By.xpath(\"/html/body/div[1]/div[1]/div[2]/div/div[2]/div/div/div[2]/div/div[1]/div/form/span/section/div/div/div[1]/div/div[1]/div/div[1]/input\"));\r\n\t\t\temail1.sendKeys(\"<Enter Email Here>\");\r\n\t\t\temail1.sendKeys(Keys.ENTER);\r\n\t\t\tdriver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);\r\n\t\t\tthread.sleep(2000);\r\n\t\t\tSystem.out.println(\"Thread slept\");// Thread slept due to password enter issues \r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\tthread.run();// Thread resumed\r\n\t\tSystem.out.println(\"Thread run\");\r\n\t\tdriver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);\r\n\t\tSystem.out.println(\"//////////////////////////////////////////\");\r\n\t\tSystem.out.println(\"//////////////////////////////////////////\");\r\n\t\tSystem.out.println(\"//////////////////////////////////////////\");\r\n\t\tSystem.out.println(\"//////////////////////////////////////////\");\r\n\t\tSystem.out.println(\"Password time!!!!\");\r\n\t\t// Password entered\r\n\t\tWebElement password = driver.findElement(By.xpath(\"/html/body/div[1]/div[1]/div[2]/div/div[2]/div/div/div[2]/div/div[1]/div/form/span/section/div/div/div[1]/div[1]/div/div/div/div/div[1]/div/div[1]/input\"));\r\n\t\tpassword.sendKeys(\"<Enter Password Here>\");\r\n\t\tpassword.sendKeys(Keys.ENTER);// Enter key\r\n\t\tSystem.out.println(\"Password entered\");\r\n\t\tdriver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);\r\n\t\t\r\n\t\t// Enter meeting ID\r\n\t\tSystem.out.println(\"Meeting ID\");\r\n\t\tdriver.findElement(By.xpath(\"/html/body/div[1]/c-wiz/div/div/div/div[2]/div[2]/div[2]/div/c-wiz/div[1]/div/div/div[1]/div\")).click();\r\n\t\tWebElement meetID=driver.findElement(By.xpath(\"/html/body/div[1]/div[3]/div/div[2]/span/div/div[2]/div[1]/div[1]/input\"));\r\n\t\tmeetID.sendKeys(\"seitaat\");\r\n\t\tSystem.out.println(\"ID Entered\");\r\n\t\tdriver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);\r\n\t\tthread.sleep(2000);\r\n\t\tthread.run();\r\n\t\tmeetID.sendKeys(Keys.ENTER);\r\n\t\tSystem.out.println(\"Key Enter\");\r\n\t\t\r\n\t\tthread.sleep(5000);\r\n\t\tSystem.out.println(\"Thread slept\");\r\n\t\tthread.run();\r\n\t\tSystem.out.println(\"thread running\");\r\n\t\t\r\n\t\t\r\n\t\t//alert.dismiss();\r\n\t\t\r\n\t\tthread.sleep(5000);\r\n\t\tthread.run();\r\n\t\r\n\t\tRobot robo = new Robot();\r\n\t\tthread.sleep(5000);\r\n\t\tthread.run();\r\n\t\trobo.keyPress(KeyEvent.VK_TAB);\r\n\t\tthread.sleep(1000);\r\n\t\tthread.run();\r\n\t\trobo.keyPress(KeyEvent.VK_TAB);\r\n\t\tthread.sleep(1000);\r\n\t\tthread.run();\r\n\t\trobo.keyPress(KeyEvent.VK_TAB);\r\n\t\tthread.sleep(1000);\r\n\t\tthread.run();\r\n\t\trobo.keyPress(KeyEvent.VK_ENTER);\r\n\t\tthread.sleep(1000);\r\n\t\tthread.run();\r\n\t\t\r\n\t\tdriver.findElement(By.xpath(\"/html/body/div/c-wiz/div/div/div[8]/div[3]/div/div/div[2]/div/div[1]/div[2]/div/div[2]/div/div[1]/div[1]/span/span\")).click();\r\n\t\t\r\n\t\tthread.sleep(3900000);\r\n\t\tdriver.close();\r\n\t\r\n\t}",
"private void composeEmail() {\n Intent intent = new Intent(Intent.ACTION_SENDTO);\n intent.setData(Uri.parse(\"mailto:[email protected]\"));\n if (intent.resolveActivity(getActivity().getPackageManager()) != null) {\n startActivity(intent);\n }\n }",
"public static void main(String[] args) throws InterruptedException {\n\t\tBrowserUtil br=new BrowserUtil();\n\t\tWebDriver driver=br.int_driver(\"chrome\");\n\t\tbr.launchurl(\"https://www.orangehrm.com/\");\n\t\tString title=br.getpagetitle();\n\t\tSystem.out.println(title);\n\t\t\n\t\t\n\t\tBy link_trial=By.linkText(\"FREE 30 Day Trial\");\n\t\tBy valid_url=By.id(\"Form_submitForm_subdomain\");\n\t\tBy name=By.id(\"Form_submitForm_FirstName\");\n\t\tBy last_name=By.id(\"Form_submitForm_LastName\");\n\t\tBy email=By.id(\"Form_submitForm_Email\");\n\t\tBy job_title=By.id(\"Form_submitForm_JobTitle\");\n\t\tBy employees=By.id(\"Form_submitForm_NoOfEmployees\");\n\t\tBy company_name=By.id(\"Form_submitForm_CompanyName\");\n\t\tBy industry=By.id(\"Form_submitForm_Industry\");\n\t\tBy contact_no=By.id(\"Form_submitForm_Contact\");\n\t\tBy country=By.id(\"Form_submitForm_Country\");\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tElementUtil ul=new ElementUtil(driver);\n\t\tul.getelement(link_trial).click();\n\t\tThread.sleep(3000);\n\t\tul.doSendKeys(valid_url, \"mohsin@123\");\n\t\tul.doSendKeys(name, \"mohsin\");\n\t\tul.doSendKeys(last_name, \"mansoori\");\n\t\tul.doSendKeys(email, \"[email protected]\");\n\t\tul.doSendKeys(job_title, \"test engineer\");\n\t\tul.doSendKeys(employees, \"151-200\");\n\t\tul.doSendKeys(company_name , \"TCS\");\n\t\tul.doSendKeys(industry, \"Travel\");\n\t\tul.doSendKeys(contact_no, \"888971852\");\n\t\tul.doSendKeys(country, \"India\");\n\t\tif(ul.doisdisplayed(name)) {\n\t\t\tSystem.out.println(\"element is present\");\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\tbr.quitbrowser();\n\t\t\n\t\t\n\t}",
"public static void main(String[] args) throws InterruptedException {\n\t\tWebDriver driver = new FirefoxDriver();\r\n\r\n\t\tdriver.get(\"http://alchemy.hguy.co/crm\");\r\n\t\t\r\n\t\tdriver.findElement(By.id(\"user_name\")).sendKeys(\"admin\");\r\n\t\tdriver.findElement(By.id(\"username_password\")).sendKeys(\"pa$$w0rd\");\r\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\'bigbutton\\']\")).click();\r\n\t driver.findElement(By.id(\"grouptab_0\")).click();\r\n\t driver.findElement(By.id(\"moduleTab_9_Leads\")).click();\r\n\t driver.manage().window().maximize();\r\n\t \r\n\t \r\n\t WebDriverWait wait = new WebDriverWait(driver,50);\r\n\t wait.until(ExpectedConditions.elementToBeClickable(By.xpath(\"//span[@id='adspan_1e367a61-8a0f-33f3-4e6f-5db0c113de32']/child::*\")));\r\n WebElement AdditionalInfo=driver.findElement(By.xpath(\"//span[@id='adspan_1e367a61-8a0f-33f3-4e6f-5db0c113de32']/child::*\"));\r\n AdditionalInfo.click();\r\n wait.until(ExpectedConditions.presenceOfElementLocated(By.cssSelector(\"span.phone\")));\r\n System.out.println(\"Phone no details: \"+driver.findElement(By.cssSelector(\"span.phone\")).getText());\r\n }",
"public PDContactSend(VContact vc) {\n this.name = vc.getName();\n this.email = vc.getEmailDetail();\n this.phone = vc.getPhoneDetail();\n this.visible_to = 3;\n this.active_flag = true;\n }",
"public static void main(String[] args) {\n\n\t\t\tScanner scanner = new Scanner(System.in);\n\t\t\t\n\t\t\tSystem.out.println(\"From Name: \");\n\t\t\tString name = scanner.nextLine();\t\n\t\t\tSystem.out.println(\"From Address Line 1: \");\n\t\t\tString line1 = scanner.nextLine();\n\t\t\tSystem.out.println(\"From Address Line 2: \");\t\t\n\t\t\tString line2 = scanner.nextLine();\n\t\t\tSystem.out.println(\"From City: \");\n\t\t\tString city = scanner.nextLine();\n\t\t\tSystem.out.println(\"From State: \");\n\t\t\tString state = scanner.nextLine();\n\t\t\tSystem.out.println(\"From Country: \");\n\t\t\tString country = scanner.nextLine();\n\t\t\tSystem.out.println(\"From Zip Code: \");\n\t\t\tString zip = scanner.nextLine();\n\t\t\tSystem.out.println(\"From Message: \");\n\t\t\tString message = scanner.nextLine();\n\t\t\t\n\t\t\tscanner.close(); \n\t\t\t\n\t\t\t// Basic conditions to test whether the input is valid\n\t\t\tif(name.length() > 0 && country.length() > 0 && zip.matches(\"[0-9]{5}|([0-9]{5}-[0-9]{4})\")\n\t\t\t\t\t&& city.length() > 0 && line1.length() > 0 && message.length() > 0 && state.matches(\"[a-zA-z]{2}\")) {\n\t\t\t\t\n\t\t\t\t// Constructs the from address object and html message\n\t\t\t\tfrom = new Address(name, country, zip, city, state, line2, line1);\n\t\t\t\thtml += message + \"</html>\";\n\n\t\t\t\ttry {\n\t\t\t\t\t// Fetches the address of the closest official with input address\n\t\t\t\t\tto = getOfficialByAddress(line1 + \" \" + line2 + \" \" + city);\n\t\t\t\t\t\n\t\t\t\t\tLetter toSend = new Letter(from, to, message);\n\t\t\t\t\t\n\t\t\t\t\t// PDF of letter if all fields are valid\n\t\t\t\t\tpdfUrl = sendLetterGeneratePDF(toSend);\n\t\t\t\t\t\n\t\t\t\t\tif(pdfUrl != null && pdfUrl.length() > 0)\n\t\t\t\t\t\tSystem.out.println(\"Success! Generated PDF below:\\n\" + pdfUrl);\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t//e.printStackTrace();\n\t\t\t\t\tSystem.out.println(\"Error. Input address was invalid. Please try again.\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Error. There was a problem with the given input. Please\"\n\t\t\t\t\t\t+ \" check all fields and try again.\");\n\t\t\t}\n\t}",
"@Click public void aboutEmailButton() {\n\n Intent emailIntent = new Intent(\n Intent.ACTION_SENDTO, Uri.parse(\"mailto:\" + Uri.encode(EMAIL))\n );\n //emailIntent.putExtra(Intent.EXTRA_SUBJECT, subject);\n //emailIntent.putExtra(Intent.EXTRA_TEXT, body);\n\n //startActivity(emailIntent);\n //startActivity(Intent.createChooser(emailIntent, \"Send an email\"));\n\n try {\n startActivity(emailIntent);\n } catch (ActivityNotFoundException e) {\n app.toasty(R.string.error_no_email_client);\n e.printStackTrace();\n }\n }",
"public static void createTicket(String toT){\n\r\n\t\tTicket total=new Ticket();\r\n\r\n\t\tif (toT.equalsIgnoreCase(\"Phone\")){\t\t\t\t\t\t\t\t\t\t\t\t\t//type of ticket is phone\r\n\r\n\t\t\tPhoneCall pc = new PhoneCall();\t\t\t\t\t\t\t\t\t\t\t\t\t//Creating a phone object\r\n\t\t\tSystem.out.println(\"\\n Assign Ticket Details\\n\");\t\t\t\t\t\t\t\t\r\n\t\t\tassignTicket(pc,toT);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//assigning the basic ticket details\r\n\r\n\t\t\ttotal=pc.contactHandler();\t\t\t\t\t\t\t\t\t\t\t\t\t\t//calling the contact handler method\r\n\r\n\t\t\tT.add(total);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//adding the details in transcript\r\n\t\t\t//System.out.println(\"Testing\");\r\n\t\t\treturn;\r\n\r\n\t\t}\r\n\r\n\t\telse if (toT.equalsIgnoreCase(\"inperson\")){\t\t\t\t\t\t\t\t\t\t\t//type of ticket is inperson\r\n\r\n\r\n\t\t\tInPerson ip=new InPerson();\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Creating a inperson object\r\n\t\t\tassignTicket(ip,toT);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//assigning the basic ticket details\r\n\t\t\ttotal=ip.contactHandler();\t\t\t\t\t\t\t\t\t\t\t\t\t\t//calling the contact handler method\r\n\r\n\t\t\tT.add(total);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//adding the details in transcript\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\telse if (toT.equalsIgnoreCase(\"email\"));{\t\t\t\t\t\t\t\t\t\t\t//type of ticket is email\r\n\r\n\t\t\tString email=\"\";\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\tString line=\"\";\r\n\t\t\tSystem.out.println(\"Enter the email Provided\\n\");\r\n\t\t\tSystem.out.println(\"Please enter your ID, name,phoneNumber,Address,serviceID,ServiceStartDate,ServiceEndDate , rest of email\\n\");\r\n\t\t\twhile(true){ // For taking input.Each sentence should end with \".\" and Representative goes to next line by pressing enter. \"Exit\" is used to get out of loop\r\n\t\t\t\t/*\r\n\t\t\t\t * Please enter the Email in ID,Name,PhnNumber,Address,ServiceID,ServiceStartDate,ServiceEndDate and rest of mail with \".\" after each line\r\n\t\t\t\t */\r\n\r\n\t\t\t\tline=Sc.nextLine(); // Infinite loop till \"exit\" is pressed\r\n\t\t\t\temail+=line;\r\n\t\t\t\tif(line.equalsIgnoreCase(\"\"))\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tArrayList<String>sentenceList=new ArrayList<String>(Arrays.asList(email.split(\"\\\\.\")));\t\t\t\t\t\t//splitting the email based on \".\"\t\t\t\r\n\r\n\t\t\tString ID=sentenceList.get(0);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//get first element from Sentencelist\t\t\t\t\t\t\t\t\t\r\n\t\t\tsentenceList.remove(0);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//remove the first element\r\n\t\t\tString Name=sentenceList.get(0);\r\n\t\t\tsentenceList.remove(0);\r\n\t\t\tint PhnNumber=Integer.parseInt(sentenceList.get(0));\r\n\t\t\tsentenceList.remove(0);\r\n\t\t\tString Address=sentenceList.get(0);\r\n\t\t\tsentenceList.remove(0);\r\n\t\t\tString ServiceID=sentenceList.get(0);\r\n\t\t\tsentenceList.remove(0);\r\n\t\t\tString ServiceStartDate=sentenceList.get(0);\r\n\t\t\tsentenceList.remove(0);\r\n\t\t\tString ServiceEndDate=sentenceList.get(0);\r\n\t\t\tsentenceList.remove(0);\r\n\t\t\tString Email=String.join(\". \",sentenceList);\r\n\r\n\r\n\t\t\tEmail em=new Email(ID,Name,PhnNumber,Address,ServiceID,ServiceStartDate,ServiceEndDate);\t\t\t\t\t//creating the email object\r\n\t\t\tassignTicket(em,toT);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//assigning the ticket\r\n\t\t\ttotal=em.contactHandler(Email);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//calling the email contacthandler\r\n\t\t\tT.add(total);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//adding the ticket to arraylist\r\n\t\t}\r\n\t\treturn ;\r\n\t\t//updateTicket();\r\n\r\n\t}",
"@Step\n public WrikeResendPage startFreeForTodayWithEmail(WrikeMainPage mainPage, String email) {\n mainPage.click(WrikeMainPage.getStartedForFreeBtn);\n // Fill email form\n mainPage.writeText(WrikeMainPage.newEmailModalText, email);\n // Click submit\n mainPage.click(WrikeMainPage.newEmailSubmitModalBtn);\n // Wait for resend page to load\n return new WrikeResendPage(webDriver);\n\n }",
"public void validate_the_Preferred_Contact_Method_in_Contact_Details_of_Customer_Tab_Email(boolean status)throws Exception {\n\t\t\t\n\t\t\tboolean checked=VerifyElementPresentAndGetCheckBoxStatus(Desktop_XPATH_Verify_Customer_Page_MarketingPreferences.replaceAll(\"M_Header\", \"Contact Details\").replaceAll(\"M_Category\", \"Preferred Contact Method\").replaceAll(\"M_InnerText\", \"Email\"), \"Preferred Contact Method on Email \");\n\t\t\t\n\t\t\tif(checked==status)\n\t\t\t\tReport.fnReportPass(\"Preferred Contact Method - Email : Checked status = \"+status+\"Display Status\"+checked, driver);\n\t\t\t\telse\n\t\t\t\tReport.fnReportFail(\"Preferred Contact Method - Email : Checked status = \"+status+\"Display Status\"+checked, driver);\n\t\t\t\n\t\t\n\t}",
"public void contactInfo(String email1, String first, String last, String address, String city, String phone,\r\n\t\t\tString zip1) {\r\n\t\tfillText(email, email1);\r\n\t\tfillText(firstName, first);\r\n\t\tfillText(lastName, last);\r\n\t\tfillText(address1, address);\r\n\t\tfillText(city1, city);\r\n\t\tfillText(phone1, phone);\r\n\t\tfillText(zip, zip1);\r\n\t\tsleep(2000);\r\n\r\n\t}",
"@Parameters(\"browser\")\r\n\t@Test\r\n\tpublic void TC101_CreateNewContact(String BrowserName)\r\n\t{\r\n\t\tWebDriver driver = launchBrowser(BrowserName); \r\n\t\tdriver = SetImplicitWait( 5, driver);\r\n\t\t \r\n\t\tstepstatus = OpenUrl (driver); \r\n\t\tplog = \"Able to launch Application\"; \r\n\t\tflog = \"Unable to launch Application\";\r\n\t\tlogEvent(stepstatus, plog, flog, driver, true); // false means don't take screenshot.\r\n\t\twait(5);\r\n\t\t\r\n\t\t\r\n\t\tstepstatus = login(getdata(\"UserName\"), getdata(\"Password\"), driver);\r\n\t\tplog = \"login is successful\"; \r\n\t\tflog = \"login is not successful\";\r\n\t\tlogEvent(stepstatus, plog, flog, driver, true);\r\n\t\twait(5);\r\n\t\t//driver.switchTo().frame(\"mainpanel\");\r\n\t\tswitchToframe(By.name(\"mainpanel\"), driver);\r\n\t\thighlight(pgHome.LnkCONTACTS, driver);\r\n\t\tstepstatus = clickElement((By.xpath(\"//a[@title='Contacts']\")), driver) ; \r\n\t\tplog = \"Able to clik CONTACTS\"; \r\n\t\tflog = \"Unable to clik CONTACTS\";\r\n\t\tlogEvent(stepstatus, plog, flog, driver, false); // True means take screenshot\r\n\t\t\r\n\t\t\r\n\t\thighlight(By.xpath(\"//td[contains(text(), 'User: bhaskar khimania')]\"), driver);\r\n\t\tstepstatus = verifyElementPresent((By.xpath(\"//td[contains(text(), 'User: bhaskar khimania')]\")), driver);\r\n\t\tplog = \"Able to verify CONTACTS lable\"; \r\n\t\tflog = \"Unable to verify CONTACTS lable\";\r\n\t\tlogEvent(stepstatus, plog, flog, driver, true); // True means take screenshot\r\n\t\t\r\n\t\tstepstatus = quitDriver(driver);\r\n\t\tplog = \"Able to quit browser\"; \r\n\t\tflog = \"Unable to quit browser\";\r\n\t\tlogEvent(stepstatus, plog, flog, driver, false); \r\n\t\t\t\t\r\n\t}",
"private void sendEmail() {\n\n // Set up an intent object to send email and fill it out\n Intent emailIntent = new Intent(Intent.ACTION_SEND);\n emailIntent.setData(Uri.parse(\"mailto:\"));\n emailIntent.setType(\"text/plain\");\n\n // An array of string addresses\n String[] toAddress = new String[]{getString(R.string.email_company_contact)};\n emailIntent.putExtra(Intent.EXTRA_EMAIL, toAddress);\n emailIntent.putExtra(Intent.EXTRA_SUBJECT, getString(R.string.email_subject));\n emailIntent.putExtra(Intent.EXTRA_TEXT, getString(R.string.email_default_text));\n\n // Error handler, try to execute code\n try {\n // Starts a new screen to send email\n startActivity(Intent.createChooser(emailIntent, getString(R.string.email_prompt)));\n finish();\n } catch (android.content.ActivityNotFoundException ex) {\n // An error occurred trying to use the activity\n Toast.makeText(this,\n getString(R.string.error_send_email), Toast.LENGTH_SHORT).show();\n // Missing a finally that closes the activity?\n }\n }",
"@Test(priority = 13)\n @Parameters(\"browser\")\n public void TC13_VERIFY_INPUT_EMAIL (String browser) throws IOException {\n String excel_txtboxEmail = null;\n String excel_btnTieptheo = null;\n excel_txtboxEmail = global.Read_Data_From_Excel(excelPath,\"ELEMENTS\",3,3);\n excel_btnTieptheo = global.Read_Data_From_Excel(excelPath, \"ELEMENTS\", 7,2);\n if(excel_txtboxEmail == null || excel_btnTieptheo == null){\n System.out.println(\"ERROR - Cell or Row No. is wrong.\");\n exTest.log(LogStatus.ERROR, \"ERROR - Cell or Row No. is wrong.\");\n }\n // Locate element by Xpath\n WebElement ele_txtboxEmail = null;\n WebElement ele_btnTieptheo = null;\n ele_txtboxEmail = global.Find_Element_By_Css_Selector(driver,excel_txtboxEmail);\n ele_btnTieptheo = global.Find_Element_By_XPath(driver, excel_btnTieptheo);\n if(ele_txtboxEmail == null){\n exTest.log(LogStatus.FAIL,\"::[\" + browser + \"]:: TC13 - Textbox EMAIL is not displayed.\");\n } else {\n exTest.log(LogStatus.PASS,\"::[\" + browser + \"]:: TC13 - Textbox EMAIL is displayed.\");\n }\n if (ele_btnTieptheo == null){\n exTest.log(LogStatus.FAIL,\"::[\" + browser + \"]:: TC13 - Button Tiep theo is not displayed.\");\n } else {\n exTest.log(LogStatus.PASS,\"::[\" + browser + \"]:: TC13 - Button Tiep theo is displayed.\");\n }\n // Input value from Array to Email\n for(int i = 0; i <= global.INPUT_VALIDATION.length; i++){\n global.Send_Keys(ele_txtboxEmail, global.INPUT_VALIDATION[i]);\n System.out.println(\"DEBUG --- Input Validation: \" + global.INPUT_VALIDATION[i]);\n global.Click(ele_btnTieptheo);\n ele_txtboxEmail.clear();\n }\n global.Processing_Time();\n }",
"protected void contactBuyer(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tif(request.getParameter(\"buyer_id\") != null){\n\t\t\tlong buyer_id = Long.parseLong(request.getParameter(\"buyer_id\"));\n\t\t\tlong seller_id = Long.parseLong(request.getParameter(\"seller_id\"));\n\t\t\tString subject = request.getParameter(\"subject\"),\n\t\t\t\t message = request.getParameter(\"message\");\n\t\t\tif(subject == null) subject = \"\";\n\t\t\tif(message == null) message = \"\";\n\t\t\t\n\t\t\tString buyer_username = \"\",\n\t\t\t\t TO=\"\",\n\t\t\t\t seller_username=\"\",\n\t\t\t\t seller_firstname=\"\",\n\t\t\t\t seller_lastname=\"\",\n\t\t\t\t seller_email=\"\";\n\t\t\t\n\t\t\tIterator<BuyerVO> buyer_itr = BuyerDAO.getBuyerById(buyer_id).iterator();\n\t\t\twhile(buyer_itr.hasNext()){\n\t\t\t\tBuyerVO bvo = buyer_itr.next();\n\t\t\t\tbuyer_username = bvo.getUsername();\n\t\t\t\tTO = bvo.getEmail();\n\t\t\t}\n\t\t\t\n\t\t\tIterator<SellerVO> seller_itr = SellerDAO.getSellerById(seller_id).iterator();\n\t\t\twhile(seller_itr.hasNext()){\n\t\t\t\tSellerVO svo = seller_itr.next();\n\t\t\t\tseller_firstname = svo.getFirstname();\n\t\t\t\tseller_lastname = svo.getLastname();\n\t\t\t\tseller_email = svo.getEmail();\n\t\t\t}\n\t\t\t\n\t\t\tfinal String FROM = \"[email protected]\";\t// Basic details of my account\n\t\t String USERNAME = \"[email protected]\";\n\t\t String PASSWORD = \"samarthshah\";\n\t\t final String HOST = \"smtp.gmail.com\";\n\n\t\t // Get system properties\n\t Properties props = new Properties();\n\t props.put(\"mail.smtp.auth\", \"true\");\n\t props.put(\"mail.smtp.starttls.enable\", \"true\");\n\t props.put(\"mail.smtp.host\", HOST);\n\t props.put(\"mail.smtp.port\", \"587\");\n\t\t \n\t // Get the default Session object.\n\t Session msg_session = Session.getInstance(props,\n\t \t\tnew javax.mail.Authenticator() {\n\t \t\t protected PasswordAuthentication getPasswordAuthentication() {\n\t \t\t return new PasswordAuthentication(USERNAME, PASSWORD);\n\t \t\t }\n\t\t });\n\n\t\t try{\n\t\t \t// Create a default MimeMessage object.\n\t\t MimeMessage msg2buyer = new MimeMessage(msg_session);\n\n\t\t // Set From: header field of the header.\n\t\t\t\tmsg2buyer.setFrom(new InternetAddress(FROM, seller_username));\t// Shows that it is sent by sellers username\n\n\t\t // Set To: header field of the header.\n\t\t msg2buyer.setRecipient(Message.RecipientType.TO, new InternetAddress(TO));\n\t\t\t \n\t \t// Set Subject: header field\n\t\t msg2buyer.setSubject(subject);\t// Subject set by the seller.\n\t\t msg2buyer.setContent(\"<h1>Dear \"+buyer_username+\",</h1>\"\n \t\t\t\t\t\t\t\t+ \"<p>The following message is sent to you by \"+seller_firstname+\" \"+seller_lastname+\".</p><hr/>\"\n \t\t\t\t\t\t\t\t+ \"<p><strong>\"+ message +\"</strong></p><hr/>\"\n \t\t\t\t\t\t\t\t+ \"<p>Please contact him back on \"+seller_email+\"</p>\"\n \t\t\t\t\t\t\t\t+ \"<br/><p>Happy Gaming.<br/>\"\n \t\t\t\t\t\t\t\t+ \"<strong>Game-Zone Team</strong></p>\", \"text/html\");\t// The message written by seller.\n\t\t msg2buyer.saveChanges();\n\t\t Transport.send(msg2buyer); // Send message\n\t\t }\n\t\t \n\t\t catch (MessagingException mex) {\n\t\t mex.printStackTrace();\n\t\t }\n\t\t \n\t\t\tHttpSession session = request.getSession();\n\t\t\tsession.setAttribute(\"msg\", \"The message has been sent successfully.\");\n\t\t}\n\t\telse{\n\t\t\tHttpSession session = request.getSession();\n\t\t\tsession.setAttribute(\"msg\", \"Please select a buyer first!\");\n\t\t}\n\t\tresponse.sendRedirect(request.getContextPath()+\"/Seller_Buyer/seller_messageBuyer.jsp\");\n\t}",
"public void onClick(View v) {\n\t\t\t\tfname = edt_fname.getText().toString();\n\t\t\t\tlname = edt_lname.getText().toString();\n\t\t\t\tcontactno = edt_contactno.getText().toString();\n\t\t\t\temail = edt_email.getText().toString();\n\t\t\t\tpassword = edt_password.getText().toString();\n\t\t\t\tconfirmpassword = edt_confirmpassword.getText().toString();\n\n\t\t\t\tpattern = Pattern.compile(EMAIL_PATTERN);\n\t\t\t\tmatcher = pattern.matcher(email);\n\t\t\t\tif (fname.equals(\"\")\n\t\t\t\t\t\t|| !fname.matches(\"[a-zA-z]+([ '-][a-zA-Z]+)*\")) {\n\n\t\t\t\t\tedt_fname.setError(\"Enter valid firstname format\");\n\n\t\t\t\t}\n\n\t\t\t\telse if (lname.equals(\"\")\n\t\t\t\t\t\t|| !lname.matches(\"[a-zA-z]+([ '-][a-zA-Z]+)*\")) {\n\n\t\t\t\t\tedt_lname.setError(\"Enter valid lastname format\");\n\n\t\t\t\t} else if (contactno.equals(\"\")\n\t\t\t\t\t\t|| !contactno.matches(MobilePattern)) {\n\n\t\t\t\t\tedt_contactno.setError(\"Enter valid contact number\");\n\n\t\t\t\t} else if (email.equals(\"\")) {\n\n\t\t\t\t\tedt_email.setError(\"Please enter email\");\n\n\t\t\t\t}\n\n\t\t\t\telse if (!matcher.matches()) {\n\t\t\t\t\tedt_email.setError(\"Enter valid email.\");\n\t\t\t\t}\n\n\t\t\t\telse if (password.equals(\"\")) {\n\n\t\t\t\t\tedt_password.setError(\"Please enter password\");\n\n\t\t\t\t} else if (password.length() < 6) {\n\n\t\t\t\t\tedt_password\n\t\t\t\t\t\t\t.setError(\"Choose password length minimum 6 character.\");\n\n\t\t\t\t} else if (confirmpassword.equals(\"\")\n\t\t\t\t\t\t|| !password.matches(confirmpassword)) {\n\n\t\t\t\t\tedt_confirmpassword.setError(\"Password mismatch\");\n\n\t\t\t\t}\n\n\t\t\t\telse if (StaticData.isNetworkAvailable(getApplicationContext())) {\n\n\t\t\t\t\tgetlocation();\n\n\t\t\t\t} else {\n\t\t\t\t\tToast.makeText(getApplicationContext(),\n\t\t\t\t\t\t\t\"Internet not connected\", Toast.LENGTH_SHORT)\n\t\t\t\t\t\t\t.show();\n\t\t\t\t}\n\n\t\t\t}",
"private static boolean metodoAutenticacionEmail(Properties prop, Persona persona) {\n\r\n Scanner scanner = new Scanner(System.in);\r\n\r\n System.out.println(\"Metodo Envio de Correo electronico\");\r\n\r\n // capturando informacion de Persona desde teclado\r\n System.out.println(\"Ingrese Nombre de Usuario\");\r\n String nombreUsuario = scanner.nextLine();\r\n System.out.println(\"Ingrese direccion de Correo Electronico\");\r\n String correoUsuario = scanner.nextLine();\r\n // guardando los datos ingresados por consola\r\n persona.setNombreUsuario(nombreUsuario);\r\n persona.setEmail(correoUsuario);\r\n\r\n // Genero un numero random como clave secreta\r\n Random rand = new Random();\r\n String textoDescripcion = \"Codigo de Confirmacion es: \";\r\n String codigoConfirmacion = \"\" + rand.nextInt(10000);\r\n\r\n // enviando correo con codigoSecreto\r\n enviarCorreoElectronico(persona, textoDescripcion + codigoConfirmacion, prop);\r\n\r\n // comprobando el codigo enviado al correo\r\n // Validacion CODIGO ingresado desde teclado es el mismo que se envio al correo\r\n boolean banderaEmail = true;\r\n boolean banderaAutIN = false;\r\n short contadorOut = 1;\r\n do {\r\n System.out.println(\"Ingrese su codigo Secreto: \");\r\n String respCodigo = scanner.nextLine();\r\n if (codigoConfirmacion.equals(respCodigo)) {\r\n System.out.println(\"Bienvenido AppJava... Ejecutando Menu...\");\r\n banderaEmail = false;\r\n banderaAutIN = true;\r\n } else if (contadorOut < 5) {\r\n System.out.println(\"Codigo No valido, Revise su correo...\");\r\n contadorOut += contadorOut;\r\n } else {\r\n System.out.println(\"Numero de intentos alcanzado. Contacte con Soporte Tecnico\");\r\n banderaAutIN = false;\r\n banderaEmail = false;\r\n break;\r\n }\r\n } while (banderaEmail);\r\n\r\n return banderaAutIN;\r\n }",
"@GetMapping(\"/add-contact\")\n\tpublic String openAddContactForm(Model model) {\n\t\tmodel.addAttribute(\"title\",\"Add Contact\");\n\t\tmodel.addAttribute(\"contact\",new Contact());\n\t\treturn \"normal/add_contact_form\";\n\t}",
"@When(\"Enter customer EMail\")\npublic void enter_customer_e_mail() {\n\tlogger.info(\"******Searching customer by email id********\");\n searchCust = new SearchCustomerPage(driver);\n searchCust.setEmail(\"[email protected]\");\n}",
"public static void signUp(String username, String password, String alternativeEmail, String firstName, String lastName) {\n click(REGISTRATION_LINK);\n type(REG_FLOW_USERNAME_FIELD, username);\n click(REG_FLOW_CHECK_BUTTON);\n// if (!REG_FLOW_USERNAME_FREE_MESSAGE.toString().contains(\"Потребителското име е свободно\")) {\n// System.out.println(\"Try another username - the entered one is already in use\");\n// }\n type(REG_FLOW_PASSWORD_FIELD, password);\n type(REG_FLOW_PASSWORD_REENTER_FIELD, password);\n WebElement phoneCheckbox = Browser.driver.findElement(REG_FLOW_PHONE_CHECKBOX);\n if (phoneCheckbox.isEnabled()) {\n phoneCheckbox.click(); //that's how we disable it\n }\n type(REG_FLOW_ALTERNATIVE_EMAIL_FIELD, alternativeEmail);\n type(REG_FLOW_QUESTION_FIELD, \"To be or not to be?\");\n type(REG_FLOW_ANSWER_FIELD, \"To beeee.\");\n type(REG_FLOW_FNAME_FIELD, firstName);\n type(REG_FLOW_LNAME_FIELD, lastName);\n Browser.driver.switchTo().frame(\"abv-GDPR-frame\").manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\n // Manually to tap ACCEPT on the GDPR window\n Browser.driver.switchTo().defaultContent();\n click(REG_FLOW_GENDER_RADIOBUTTON); //to choose male\n click(REG_FLOW_DAY_DROPDOWN);\n click(REG_FLOW_DAY_3); // to choose 3th\n click(REG_FLOW_MONTH_DROPDOWN);\n click(REG_FLOW_MONTH_5); // to choose May\n click(REG_FLOW_YEAR_DROPDOWN);\n click(REG_FLOW_YEAR_1998); // to choose 1998\n\n findElement(REG_FLOW_CAPTCHA_FIELD);\n click(REG_FLOW_CAPTCHA_FIELD);\n // Timeout to enter the CAPTCHA manually\n // EXPLICIT WAIT DA MU TURYA\n click(REG_FLOW_CREATE_BUTTON);\n String successfulRegMessage = Browser.driver.findElement(REG_SUCCESS_MESSAGE).getText().trim();\n assertTrue(successfulRegMessage.contains(\"Успешна регистрация.\"), \"No SUCCESS message\");\n click(LOGIN_TO_YOUR_EMAIL_BUTTON);\n }",
"public static void validate() {\r\n\t\tfrmMfhEmailer.validate();\r\n\t}",
"private static void PL() throws InterruptedException, AWTException {\n\r\n\t\t// TODO Auto-generated method stub\r\n\t\tMap<String, Object> prefs = new HashMap<String, Object>();\r\n\t\tprefs.put(\"profile.default_content_setting_values.notifications\", 2);\r\n \r\n\r\n\t\t//Create an instance of ChromeOptions \r\n\t\tChromeOptions options = new ChromeOptions();\r\n\t\toptions.setExperimentalOption(\"prefs\", prefs);\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:\\\\Program Files\\\\chromedriver_win32\\\\chromedriver.exe\");\r\n\t\tWebDriver driver = new ChromeDriver(options);\r\n\t\tSystem.out.println(\"Driver initiated\");\r\n\t\tSystem.out.println(\"//////////////////////////////////////////\");\r\n\t\tSystem.out.println(\"//////////////////////////////////////////\");\r\n\t\tSystem.out.println(\"//////////////////////////////////////////\");\r\n\t\tSystem.out.println(\"//////////////////////////////////////////\");\r\n\t\t\r\n\t\t//Loading the website\r\n\t\tdriver.get(\"https://apps.google.com/meet/\");\r\n\t\tdriver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);\r\n\t\tSystem.out.println(\"//////////////////////////////////////////\");\r\n\t\tSystem.out.println(\"//////////////////////////////////////////\");\r\n\t\tSystem.out.println(\"//////////////////////////////////////////\");\r\n\t\tSystem.out.println(\"//////////////////////////////////////////\");\r\n\t\tSystem.out.println(\"Website loaded.\");\r\n\t\t\r\n\t\t//Clicks on the sign in button \r\n\t\tdriver.findElement(By.xpath(\"/html/body/header/div[1]/div/div[3]/div[1]/div/span[1]/a\")).click();\r\n\t\tdriver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);\r\n\t\tSystem.out.println(\"//////////////////////////////////////////\");\r\n\t\tSystem.out.println(\"//////////////////////////////////////////\");\r\n\t\tSystem.out.println(\"//////////////////////////////////////////\");\r\n\t\tSystem.out.println(\"//////////////////////////////////////////\");\r\n\t\tSystem.out.println(\"Sign in page loaded.\");\r\n\t\t\r\n\t\t//Clicks on the email field\r\n\t\tThread thread = new Thread();\r\n\t\t\r\n\t\tif(driver.findElement(By.xpath(\"/html/body/div[1]/div[1]/div[2]/div/div[2]/div/div/div[2]/div/div[1]/div/form/span/section/div/div/div[1]/div/div[1]/div/div[1]/input\")) == null)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Email\");\r\n\t\t\tWebElement email =driver.findElement(By.id(\"Email\"));\r\n\t\t\temail.sendKeys(\"<Enter Email Here>\");\r\n\t\t\temail.sendKeys(Keys.ENTER);\r\n\t\t}\r\n\t\t\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Email2\");\r\n\t\t\tWebElement email1=driver.findElement(By.xpath(\"/html/body/div[1]/div[1]/div[2]/div/div[2]/div/div/div[2]/div/div[1]/div/form/span/section/div/div/div[1]/div/div[1]/div/div[1]/input\"));\r\n\t\t\temail1.sendKeys(\"<Enter Email Here>\");\r\n\t\t\temail1.sendKeys(Keys.ENTER);\r\n\t\t\tdriver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);\r\n\t\t\tthread.sleep(2000);\r\n\t\t\t\r\n\t\t}\r\n\t\tthread.run();// Thread resumed\r\n\t\tSystem.out.println(\"Thread run\");\r\n\t\tdriver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);\r\n\t\tSystem.out.println(\"//////////////////////////////////////////\");\r\n\t\tSystem.out.println(\"//////////////////////////////////////////\");\r\n\t\tSystem.out.println(\"//////////////////////////////////////////\");\r\n\t\tSystem.out.println(\"//////////////////////////////////////////\");\r\n\t\tSystem.out.println(\"Password time!!!!\");\r\n\t\t// Password entered\r\n\t\tWebElement password = driver.findElement(By.xpath(\"/html/body/div[1]/div[1]/div[2]/div/div[2]/div/div/div[2]/div/div[1]/div/form/span/section/div/div/div[1]/div[1]/div/div/div/div/div[1]/div/div[1]/input\"));\r\n\t\tpassword.sendKeys(\"<Enter Password Here>\");\r\n\t\tpassword.sendKeys(Keys.ENTER);// Enter key\r\n\t\tSystem.out.println(\"Password entered\");\r\n\t\tdriver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);\r\n\t\t\r\n\t\t// Enter meeting ID\r\n\t\tSystem.out.println(\"Meeting ID\");\r\n\t\tdriver.findElement(By.xpath(\"/html/body/div[1]/c-wiz/div/div/div/div[2]/div[2]/div[2]/div/c-wiz/div[1]/div/div/div[1]/div\")).click();\r\n\t\tWebElement meetID=driver.findElement(By.xpath(\"/html/body/div[1]/div[3]/div/div[2]/span/div/div[2]/div[1]/div[1]/input\"));\r\n\t\tmeetID.sendKeys(\"seitapl\");\r\n\t\tSystem.out.println(\"ID Entered\");\r\n\t\tdriver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);\r\n\t\tthread.sleep(2000);\r\n\t\tthread.run();\r\n\t\tmeetID.sendKeys(Keys.ENTER);\r\n\t\tSystem.out.println(\"Key Enter\");\r\n\t\t\r\n\t\tthread.sleep(5000);\r\n\t\tSystem.out.println(\"Thread slept\");\r\n\t\tthread.run();\r\n\t\tSystem.out.println(\"thread running\");\r\n\t\t\r\n\t\t\r\n\t\t//alert.dismiss();\r\n\t\t\r\n\t\tthread.sleep(5000);\r\n\t\tthread.run();\r\n\t\r\n\t\tRobot robo = new Robot();\r\n\t\tthread.sleep(5000);\r\n\t\tthread.run();\r\n\t\trobo.keyPress(KeyEvent.VK_TAB);\r\n\t\tthread.sleep(1000);\r\n\t\tthread.run();\r\n\t\trobo.keyPress(KeyEvent.VK_TAB);\r\n\t\tthread.sleep(1000);\r\n\t\tthread.run();\r\n\t\trobo.keyPress(KeyEvent.VK_TAB);\r\n\t\tthread.sleep(1000);\r\n\t\tthread.run();\r\n\t\trobo.keyPress(KeyEvent.VK_ENTER);\r\n\t\tthread.sleep(1000);\r\n\t\tthread.run();\r\n\t\t\r\n\t\tdriver.findElement(By.xpath(\"/html/body/div/c-wiz/div/div/div[8]/div[3]/div/div/div[2]/div/div[1]/div[2]/div/div[2]/div/div[1]/div[1]/span/span\")).click();\r\n\t\tthread.sleep(3900000);\r\n\t\tdriver.close();\r\n\t\t\r\n\t}",
"private static void COA() throws InterruptedException, AWTException {\n\r\n\t\t// TODO Auto-generated method stub\r\n\t\tMap<String, Object> prefs = new HashMap<String, Object>();\r\n\t\tprefs.put(\"profile.default_content_setting_values.notifications\", 2);\r\n \r\n\r\n\t\t//Create an instance of ChromeOptions \r\n\t\tChromeOptions options = new ChromeOptions();\r\n\t\toptions.setExperimentalOption(\"prefs\", prefs);\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:\\\\Program Files\\\\chromedriver_win32\\\\chromedriver.exe\");\r\n\t\tWebDriver driver = new ChromeDriver();\r\n\t\tSystem.out.println(\"Driver initiated\");\r\n\t\tSystem.out.println(\"//////////////////////////////////////////\");\r\n\t\tSystem.out.println(\"//////////////////////////////////////////\");\r\n\t\tSystem.out.println(\"//////////////////////////////////////////\");\r\n\t\tSystem.out.println(\"//////////////////////////////////////////\");\r\n\t\t\r\n\t\t//Loading the website\r\n\t\tdriver.get(\"https://apps.google.com/meet/\");\r\n\t\tdriver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);\r\n\t\tSystem.out.println(\"//////////////////////////////////////////\");\r\n\t\tSystem.out.println(\"//////////////////////////////////////////\");\r\n\t\tSystem.out.println(\"//////////////////////////////////////////\");\r\n\t\tSystem.out.println(\"//////////////////////////////////////////\");\r\n\t\tSystem.out.println(\"Website loaded.\");\r\n\t\t\r\n\t\t//Clicks on the sign in button \r\n\t\tdriver.findElement(By.xpath(\"/html/body/header/div[1]/div/div[3]/div[1]/div/span[1]/a\")).click();\r\n\t\tdriver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);\r\n\t\tSystem.out.println(\"//////////////////////////////////////////\");\r\n\t\tSystem.out.println(\"//////////////////////////////////////////\");\r\n\t\tSystem.out.println(\"//////////////////////////////////////////\");\r\n\t\tSystem.out.println(\"//////////////////////////////////////////\");\r\n\t\tSystem.out.println(\"Sign in page loaded.\");\r\n\t\t\r\n\t\t//Clicks on the email field\r\n\t\tThread thread = new Thread();\r\n\t\t\r\n\t\tif(driver.findElement(By.xpath(\"/html/body/div[1]/div[1]/div[2]/div/div[2]/div/div/div[2]/div/div[1]/div/form/span/section/div/div/div[1]/div/div[1]/div/div[1]/input\")) == null)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Email\");\r\n\t\t\tWebElement email =driver.findElement(By.id(\"Email\"));\r\n\t\t\temail.sendKeys(\"<Enter Email Here>\");\r\n\t\t\temail.sendKeys(Keys.ENTER);\r\n\t\t}\r\n\t\t\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Email2\");\r\n\t\t\tWebElement email1=driver.findElement(By.xpath(\"/html/body/div[1]/div[1]/div[2]/div/div[2]/div/div/div[2]/div/div[1]/div/form/span/section/div/div/div[1]/div/div[1]/div/div[1]/input\"));\r\n\t\t\temail1.sendKeys(\"<Enter Email Here>\");\r\n\t\t\temail1.sendKeys(Keys.ENTER);\r\n\t\t\tdriver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);\r\n\t\t\tthread.sleep(2000);\r\n\t\t\tSystem.out.println(\"Thread slept\");// Thread slept due to password enter issues \r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\tthread.run();// Thread resumed\r\n\t\tSystem.out.println(\"Thread run\");\r\n\t\tdriver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);\r\n\t\tSystem.out.println(\"//////////////////////////////////////////\");\r\n\t\tSystem.out.println(\"//////////////////////////////////////////\");\r\n\t\tSystem.out.println(\"//////////////////////////////////////////\");\r\n\t\tSystem.out.println(\"//////////////////////////////////////////\");\r\n\t\tSystem.out.println(\"Password time!!!!\");\r\n\t\t// Password entered\r\n\t\tWebElement password = driver.findElement(By.xpath(\"/html/body/div[1]/div[1]/div[2]/div/div[2]/div/div/div[2]/div/div[1]/div/form/span/section/div/div/div[1]/div[1]/div/div/div/div/div[1]/div/div[1]/input\"));\r\n\t\tpassword.sendKeys(\"<Enter Password Here>\");\r\n\t\tpassword.sendKeys(Keys.ENTER);// Enter key\r\n\t\tSystem.out.println(\"Password entered\");\r\n\t\tdriver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);\r\n\t\t\r\n\t\t// Enter meeting ID\r\n\t\tSystem.out.println(\"Meeting ID\");\r\n\t\tdriver.findElement(By.xpath(\"/html/body/div[1]/c-wiz/div/div/div/div[2]/div[2]/div[2]/div/c-wiz/div[1]/div/div/div[1]/div\")).click();\r\n\t\tWebElement meetID=driver.findElement(By.xpath(\"/html/body/div[1]/div[3]/div/div[2]/span/div/div[2]/div[1]/div[1]/input\"));\r\n\t\tmeetID.sendKeys(\"seitacoa\");\r\n\t\tSystem.out.println(\"ID Entered\");\r\n\t\tdriver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);\r\n\t\tthread.sleep(2000);\r\n\t\tthread.run();\r\n\t\tmeetID.sendKeys(Keys.ENTER);\r\n\t\tSystem.out.println(\"Key Enter\");\r\n\t\t\r\n\t\tthread.sleep(5000);\r\n\t\tSystem.out.println(\"Thread slept\");\r\n\t\tthread.run();\r\n\t\tSystem.out.println(\"thread running\");\r\n\t\t\r\n\t\t\r\n\t\t//alert.dismiss();\r\n\t\t\r\n\t\tthread.sleep(5000);\r\n\t\tthread.run();\r\n\t\r\n\t\tRobot robo = new Robot();\r\n\t\tthread.sleep(5000);\r\n\t\tthread.run();\r\n\t\trobo.keyPress(KeyEvent.VK_TAB);\r\n\t\tthread.sleep(1000);\r\n\t\tthread.run();\r\n\t\trobo.keyPress(KeyEvent.VK_TAB);\r\n\t\tthread.sleep(1000);\r\n\t\tthread.run();\r\n\t\trobo.keyPress(KeyEvent.VK_TAB);\r\n\t\tthread.sleep(1000);\r\n\t\tthread.run();\r\n\t\trobo.keyPress(KeyEvent.VK_ENTER);\r\n\t\tthread.sleep(5000);\r\n\t\tthread.run();\r\n\t\t\r\n\t\tdriver.findElement(By.xpath(\"/html/body/div/c-wiz/div/div/div[8]/div[3]/div/div/div[2]/div/div[1]/div[2]/div/div[2]/div/div[1]/div[1]/span/span\")).click();\r\n\t\tthread.sleep(3900000);\r\n\t\tdriver.close();\r\n\t\r\n\t}",
"void send(Email email);",
"@Override\n\tpublic Contact handRequest() {\n\t\tIvalidation valid = new ValidContact();\n\t\t\n\t\t\n\t\tContact newContact = new Contact(this.name, this.noPhone, this.email);\t//create new contact\n\t\t\n\t\tvalid = new ValidContact();\n\t\tif(valid.valid(newContact)) {\n\t\t\tAppContact2Data.addContactToData(newContact);\n\t\t\tSystem.out.print(\"\\nSuccessfull!\\n\");\n\t\t\treturn newContact;\n\t\t}\n\t\treturn null;\n\t}",
"void send(String emailName);",
"private void jbuttonAddGuestActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbuttonAddGuestActionPerformed\n String fnGuest = JTextFirstNameGuest.getText().toLowerCase();\n String lnGuest = JTextLastNameGuest.getText().toLowerCase();\n String emGuest = JTextEmailGuest.getText().toLowerCase(); //??\n boolean succes = false;\n int phoneNr = 0;\n \n try{\n phoneNr = Integer.parseInt(JTextPhoneGuest.getText());\n }\n catch(java.lang.NullPointerException ex){\n jLabelAddGuestStatus.setText(\"Missing phone number\");\n }\n if(fnGuest.isEmpty()){\n jLabelAddGuestStatus.setText(\"Missing Firstname\");\n }\n if(lnGuest.isEmpty()){\n jLabelAddGuestStatus.setText(\"Missing Lastname\");\n }\n if(emGuest.isEmpty()){\n jLabelAddGuestStatus.setText(\"Missing Email\");\n }\n \n if(!fnGuest.isEmpty() && !lnGuest.isEmpty() && phoneNr != 0 ){\n try{ \n succes = conIf.addGuestEmail(fnGuest, lnGuest, phoneNr, emGuest); //emguest? \n }catch(Exception ex){\n succes = false;\n }\n }\n if(succes == true){\n JTextFirstNameGuest.setText(\"\");\n JTextLastNameGuest.setText(\"\");\n JTextPhoneGuest.setText(\"\");\n JTextEmailGuest.setText(\"\");\n \n int reply = JOptionPane.showConfirmDialog(\n fr1,\n \"Would you like to add another guest?\",\n \"Guest added successfully\",\n JOptionPane.YES_NO_OPTION);\n \n if(reply == JOptionPane.NO_OPTION){\n fr1.setVisible(true);\n this.setVisible(false);\n }\n \n \n \n }else{\n jLabelAddGuestStatus.setText(\"guest not added\");\n }\n }",
"@Step\n public void clickContactUsPage(){\n contactusPages.clickContactUsPage();\n }",
"public static void formfill() throws InterruptedException, MalformedURLException, ParseException {\n\t\t// get all formfields elements xpath \n\t\t\n\t\tList<MobileElement> formFields1 = AndroidLocators.findElements_With_Xpath(\n\t\t\t\t\"//*[@resource-id='in.spoors.effortplus:id/formLinearLayout']/android.widget.LinearLayout/android.widget.LinearLayout/android.widget.LinearLayout/android.widget.TextView\");\n\t\t\n\t\t//get count of list\n\t\tint countOfFields = formFields1.size();\n\t\t\n\t\t//removing elements from list\n\t\tformFields1.clear();\n\n\t\t// get last element text\n\t\tString lastTxtElement = null;\n\t\tMobileActionGesture.flingVerticalToBottom_Android();\n\t\t\n\t\t//add elements to list\n\t\tformFields1.addAll(AndroidLocators.findElements_With_Xpath(\n\t\t\t\t\"//*[@resource-id='in.spoors.effortplus:id/formLinearLayout']/android.widget.LinearLayout/android.widget.LinearLayout/android.widget.LinearLayout/android.widget.TextView\"));\n\t\t\n\t\t//get last element from list\n\t\tlastTxtElement = formFields1.get(formFields1.size() - 1).getText().replaceAll(\"[!@#$%&*(),.?\\\":{}|<>]\", \"\");\n\t\tSystem.out.println(\"===== Get the last element text ===== : \" + lastTxtElement);\n\t \n\t\t//removing elements from list\n\t\tformFields1.clear();\n\t\tMobileActionGesture.flingToBegining_Android();\n\n\t\t// add the elements to list present in first screen\n\t\tformFields1.addAll(AndroidLocators.findElements_With_Xpath(\n\t\t\t\t\"//*[@resource-id='in.spoors.effortplus:id/formLinearLayout']/android.widget.LinearLayout/android.widget.LinearLayout/android.widget.LinearLayout/android.widget.TextView\"));\n\t\t//get count\n\t\tcountOfFields = formFields1.size();\n\t\tSystem.out.println(\"----- Before swiping, fields count is ----- : \" + countOfFields);\n\t\t\n\t\t// scroll and add elements to list until the lastelement\n\t\twhile (!formFields1.isEmpty()) {\n\t\t\tboolean flag = false;\n\t\t\tMobileActionGesture.verticalSwipeByPercentages(0.8, 0.2, 0.5);\n\t\t\tformFields1.addAll(AndroidLocators.findElements_With_Xpath(\n\t\t\t\t\t\"//*[@resource-id='in.spoors.effortplus:id/formLinearLayout']/android.widget.LinearLayout/android.widget.LinearLayout/android.widget.LinearLayout/android.widget.TextView\"));\n\t\t\t\n\t\t\t// get count\n\t\t\tcountOfFields = formFields1.size();\n\t\t\tSystem.out.println(\"***** After swiping, fields count ***** : \" + countOfFields);\n\t\t\t\n\t\t\t// iterate and break the loop when last element found\n\t\t\tfor (int j = 0; j < countOfFields; j++) {\n\t\t\t\t// printing the elements in the list\n\t\t\t\tSystem.out.println(\"===== Form fields text ===== : \" + formFields1.get(j).getText());\n\t\t\t\tif (formFields1.get(j).getText().replaceAll(\"[!@#$%&*(),.?\\\":{}|<>]\", \"\").equals(lastTxtElement)) {\n\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t.println(\"----- Form fields text inside elements ----- : \" + formFields1.get(j).getText());\n\t\t\t\t\tflag = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (flag == true)\n\t\t\t\tbreak;\n\t\t}\n\t\tMobileActionGesture.flingToBegining_Android();\n\t\t// insert form data\n\t\tform_data_insertion(formFields1, countOfFields);\n\t}",
"public void reviewBooking() {\n\t\telementUtil.doSendKeys(email, \"[email protected]\");\n\t\telementUtil.doSendKeys(mobile, \"83292382349\");\n\t\telementUtil.doSendKeys(name, \"sciripappa\");\n\t\telementUtil.doSelectValuesByIndex(gender, 1);\n\t\telementUtil.doSelectValuesByVisibleText(age, \"19\");\n\t\telementUtil.doClick(proceed);\n\t\t\n\t\ttry {\n\t\t\tThread.sleep(10000);\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\t\n\t}",
"public static void main(String[] args) {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"E:\\\\Softwares\\\\Drivers\\\\chromedriver.exe\");\n\t\tWebDriver driver= new ChromeDriver();\n\n\t\tdriver.get(\"https://www.facebook.com/\");\n\t\t\n\t\t//Enter data in fields using ID and name locator\n\t\tdriver.findElement(By.id(\"email\")).sendKeys(\"Enter email\");\n\t\tdriver.findElement(By.name(\"pass\")).sendKeys(\"Provide password\");\n\t\t\n\t\t//Click using linkText\n\t\tdriver.findElement(By.linkText(\"Forgot account?\")).click();\n\t\t\n\t\t//Enter data in fields using xPath and cssSelector locator | Get text of Error message from div.\n\t\tdriver.get(\"https://login.salesforce.com/\");\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\'username\\']\")).sendKeys(\"User Name\");\n\t\tdriver.findElement(By.cssSelector(\"#password\")).sendKeys(\"Password\");\n\t\tdriver.findElement(By.id(\"Login\")).click();\n\t\tSystem.out.println(driver.findElement(By.cssSelector(\"div#error.loginError\")).getText());\n\t}",
"@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif(EmailSender.fr.getText().equals(\"\"))\r\n\t\t{\r\n\t\t\tJOptionPane.showMessageDialog(EmailSender.ES,\"Please Enter A Valid Email Address To Send From!\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tif(EmailSender.t.getText().equals(\"\"))\r\n\t\t{\r\n\t\t\tJOptionPane.showMessageDialog(EmailSender.ES, \"Please Enter A Valid Email Address To Send To!\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tif(EmailSender.subj.getText().contentEquals(\"\"))\r\n\t\t{\r\n\t\t\tint b = JOptionPane.showConfirmDialog(EmailSender.ES, \"Are you sure you want to send this without a subject?\");\r\n\t\t\t\r\n\t\t\tif(b==0)\r\n\t\t\t\tJOptionPane.showMessageDialog(EmailSender.ES, \"Email Sent\");\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tint a = JOptionPane.showConfirmDialog(EmailSender.ES, \"Are you sure you want to send?\");\r\n\t\tif(a==0)// If yes button is pressed a is 0\r\n\t\tJOptionPane.showMessageDialog(EmailSender.ES, \"Email Sent\");\r\n\t\t\r\n\t\t\r\n\t}",
"public ActionForward dispatchSurvey(ActionMapping mapping, ActionForm form,\n\t\t\tHttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows Exception {\n\t\tString msg = request.getParameter(\"userMsg\");\n\t\tint surveyId = StringUtil.parseInt(request.getParameter(\"surveyId\"));\n//\t\tint surveyId = 233;\n\t\tString path = request.getContextPath();\n\t\tString[] emp=msg.split(\";\");\n\t\tString empNums=\"\";\n\t\tfor(int i=0;i<emp.length;i++)\n\t\t{\n\t\t\tString[] empNum=emp[i].split(\",\");\n\t\t\tempNums+=\"'\"+empNum[0]+\"',\";\n\t\t}\n\t\tempNums=empNums.substring(0,empNums.length()-1);\n\t\t List missionList=ms.getMissionList(surveyId, empNums);\n\t\t String[] msgArray=msg.split(\";\");\n\t\tif(missionList.size()!=0)\n\t\t{\n\t\t\tfor(int j=0;j<missionList.size();j++)\n\t\t\t{\n\t\t\t\tMissionVO mv=(MissionVO)missionList.get(j);\n\t\t\t\tfor(int z=0;z<msgArray.length;z++)\n\t\t\t\t{\n\t\t\t\t\tString msg1=msgArray[z];\n\t\t\t\t\tString msg2=msg1.substring(0,msg1.length()-2);\n\t\t\t\t\tif(mv.getEmployeeNumber().equals(msg2))\n\t\t\t\t\t\tmsg=msg.replace(msg1+\";\", \"\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(msg!=\"\" && msg.length()!=0){\n\t\t\tString noEmail = dispatchService.dispatchSurvey(msg, surveyId,path);\n\t\t}\n\t\t//保存下发邮件设置\n\t\tDynaActionForm af = (DynaActionForm) form; \n\t\tSurvey s = (Survey) af.get(\"survey\");\n\t\tSurvey survey = surveyService.getSurveyById(surveyId);\n\t\tint isOpen = StringUtil.parseInt(request.getParameter(\"isOpen\"));\n\t\tint hurryTimes=StringUtil.parseInt(request.getParameter(\"hurryTimes\"));\n\t\t//添加问卷信息和邮件提示信息\n\t\tString mailTips = request.getParameter(\"mailTips\");\n\t\tString closeTips =request.getParameter(\"closeTips\");\n\t\tString hurryTips = survey.getHurryTips();\n\t\tString tips = survey.getTips();\n\t\t\n\t\tif(tips!=null){\n\t\t\ttips = tips.replace(\"\\n\", \"\");\n\t\t\ttips = tips.replace(\"\\r\", \"\");\n\t\t\ttips = tips.replace(\" \", \" \");\n\t\t}\n\t\tif(mailTips!=null){\n\t\t\tmailTips = mailTips.replace(\"\\n\", \"\");\n\t\t\tmailTips = mailTips.replace(\"\\r\", \"\");\n\t\t\tmailTips = mailTips.replace(\" \", \" \");\n\t\t}\n\t\tif(hurryTips!=null){\n\t\t\thurryTips = hurryTips.replace(\"\\n\", \"\");\n\t\t\thurryTips = hurryTips.replace(\"\\r\", \"\");\n\t\t\thurryTips = hurryTips.replace(\" \", \" \");\n\t\t}\n\t\t\n\t\tif(closeTips!=null){\n\t\t\tcloseTips = closeTips.replace(\"\\n\", \"\");\n\t\t\tcloseTips = closeTips.replace(\"\\r\", \"\");\n\t\t\tcloseTips = closeTips.replace(\" \", \" \");\n\t\t}\n\t\t\n\t\tsurvey.setIsOpen(isOpen);\n\t\tsurvey.setHurryTimes(hurryTimes);\n\t\tsurveyService.updateSurveySet(survey,tips,mailTips,hurryTips,closeTips);\n\t\t return mapping.findForward(\"done\");\n\t}",
"public static void main(String[] args) throws InterruptedException \n\t\n\t{\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"E:\\\\Installation Stuff\\\\Exe Files\\\\chromedriver.exe\");\n\t\tWebDriver driver = new ChromeDriver();\n\t\t\n\t\t\n driver.get(\"https://www.facebook.com/\");\n\t\t\n driver.findElement(By.xpath(\"//*[@id='email']\")).sendKeys(\"Priya\");\n\n \n \n \n \n \n \n \n \n \n /*\n\t\tdriver.findElement(By.id(\"u_0_d\")).sendKeys(\"Priya\");\n\t\t\n\t\tdriver.findElement(By.name(\"lastname\")).sendKeys(\"Singh\");\n\t\t\n\t\tdriver.findElement(By.className(\"inputtext _58mg _5dba _2ph-\")).sendKeys(\"1234567890\");\n\t\t\n\n\t\t\n\t\tdriver.findElement(By.linkText(\"Forgot account?\")).click();\n\t\t\n\t\tdriver.navigate().back();\n\t\t\n\t\tdriver.findElement(By.partialLinkText(\"Forgot\")).click();\n\t\n \n Thread.sleep(3000);\n \n driver.findElement(By.cssSelector(\"#u_0_a\")).click();\n*/\n \n \n\t}",
"public void emailResult(View view) {\n // Getting username only\n Intent myIntent = getIntent();\n String nameOfUser = myIntent.getStringExtra(\"EditTextValue\");\n\n String result = \"Name: \" + nameOfUser;\n result += \"\\nMy score: \" + score;\n\n // Create a new intent to send information to any mailing app\n Intent myResult = new Intent(Intent.ACTION_SENDTO);\n myResult.setData(Uri.parse(\"mailto:\"));\n myResult.putExtra(Intent.EXTRA_SUBJECT, \"Quiz result for \" + nameOfUser);\n myResult.putExtra(Intent.EXTRA_TEXT, result);\n if (myResult.resolveActivity(getPackageManager()) != null) {\n startActivity(myResult);\n }\n }",
"@When(\"I enter a valid email {string}\")\n public void i_enter_a_valid_email(String em) {\n BasePage.driverUtils.waitForPresenceOFElementLocatedBy(By.id(\"FriendEmail\"));\n BasePage.productEmailAfirendPage.getFriendEmailTextBox().sendKeys(em);\n }",
"public void enviarAlertaDeQueEstaOnline(){\n //mandaria un mail a los usuarios avisando que ya esta disponible para ver.\n System.out.println(\"Enviando mail con url \" + this.url);\n }",
"@Test\n public void getAppSubmissionFormTest() throws ApiException {\n String appId = null;\n String naked = null;\n // String response = api.getAppSubmissionForm(appId, naked);\n\n // TODO: test validations\n }",
"public void onClick(View v) {\n if (validateContact(name.getText().toString(), email.getText().toString(), phone.getText().toString())) {\n goBack();\n }\n }",
"public void run() throws Exception {\n\t\tweb.window(2,\n\t\t\t\t\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.web_window}}\").navigate(\n\t\t\t\t\t\t\"http://riyoramgbm02.maaden.com:8050/OA_HTML/OA.jsp?OAFunc=OAHOMEPAGE\");\n\t\tweb.window(4,\n\t\t\t\t\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.web_window}}\").waitForPage(180, true);\n\t\t\n\t\tweb.textBox(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.web_input_text_unamebean}}\").click();\n\t\t\n\t\tweb.textBox(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.web_input_text_unamebean}}\").setText(\"PEETHAMBARANS\");\n\t\t\t\t\n\t\tweb.textBox(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.web_input_password_pwdbean}}\")\n\t\t\t\t.setPassword(deobfuscate(\"vWeMH+MT9Gy3Y8SojsL+Mg==\"));\n\t\n\t\tweb.button(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.web_button_SubmitButton}}\").click();\n\t\tweb.window(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.web_window}}\").waitForPage(180, true);\n\t\t\n\t\tweb.link(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.MWSPC_PURCHASING_SUPERUSE}}\").click();\n\t\tweb.window(17,\n\t\t\t\t\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.web_window}}\").waitForPage(180, true);\n\t\n\t\n\t\tweb.link(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.Purchase_Order}}\").click();\n\t\tweb.window(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.web_window}}\").waitForPage(180, true);\n\t\t\n\t\tweb.link(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.Purchase_Order_Summary}}\").click();\n\t\tweb.window(28,\n\t\t\t\t\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.web_window_1}}\")\n\t\t\t\t.waitForPage(180,true);\n\t\tforms.captureScreenshot(33);\n\t\t\n\t\t//forms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_FIND_OPERATING_UNIT_0}}\").setFocus();\n\t\tif(forms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_FIND_PO_NUM_0}}\").exists(60, TimeUnit.SECONDS)){\n\t\tforms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_FIND_PO_NUM_0}}\").setText(\"741903172\");\n\t\t}\n\t\t\n\t\tString PO_Number = forms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_FIND_PO_NUM_0}}\").getText();\n\t\tinfo(\"PO_Number ->\"+PO_Number);\n\t\t\n\t\tforms.button(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_button_FIND_FIND_0}}\").click();\n\t\tforms.captureScreenshot(38);\n\t\n\t\tforms.button(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.Lines}}\").click();\n\t\tforms.captureScreenshot(41);\n\t\t\n\t\tforms.button(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.Shipment}}\").click();\n\t\tforms.captureScreenshot(44);\n\t\t\n\t\tforms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_SHIPMENTS_FOLDER_PO_NUM_0}}\").invokeSoftKey(\"NEXT_FIELD\");\n\t\t\n\t\tforms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_SHIPMENTS_FOLDER_RELEASE_}}\").invokeSoftKey(\"NEXT_FIELD\");\n\t\t\n\t\tforms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_SHIPMENTS_FOLDER_LINE_NUM}}\").invokeSoftKey(\"NEXT_FIELD\");\n\t\t\n\t\tforms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_SHIPMENTS_FOLDER_SHIPMENT}}\").invokeSoftKey(\"NEXT_FIELD\");\n\t\n\t\tforms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_SHIPMENTS_FOLDER_ITEM_NUM}}\").invokeSoftKey(\"NEXT_FIELD\");\n\t\n\t\tforms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_SHIPMENTS_FOLDER_UNIT_MEA}}\").invokeSoftKey(\"NEXT_FIELD\");\n\t\t\n\t\tforms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_SHIPMENTS_FOLDER_SHIP_TO_}}\").invokeSoftKey(\"NEXT_FIELD\");\n\t\n\t\tforms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_SHIPMENTS_FOLDER_SHIPMENT_1}}\").invokeSoftKey(\"NEXT_FIELD\");\n\t\t\n\t\tforms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_SHIPMENTS_FOLDER_START_DA}}\").invokeSoftKey(\"NEXT_FIELD\");\n\t\n\t\tforms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_SHIPMENTS_FOLDER_END_DATE}}\").invokeSoftKey(\"NEXT_FIELD\");\n\t\t\n\t\tforms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_SHIPMENTS_FOLDER_QUANTITY}}\").invokeSoftKey(\"NEXT_FIELD\");\n\t\n\t\tforms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_SHIPMENTS_FOLDER_QUANTITY}}\").setFocus();\n\t\n\t\tforms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_SHIPMENTS_FOLDER_QUANTITY_1}}\").invokeSoftKey(\"NEXT_FIELD\");\n\t\t\n\t\tforms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_SHIPMENTS_FOLDER_QUANTITY_1}}\").setFocus();\n\t\tinfo(\"Quantity Due is : \"+forms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_SHIPMENTS_FOLDER_QUANTITY_1}}\").getText() );\n\t\t\n\t\tforms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_SHIPMENTS_FOLDER_QUANTITY_2}}\").setFocus();\n\t\tinfo(\"Quantity Received is : \"+forms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_SHIPMENTS_FOLDER_QUANTITY_2}}\").getText());\n\t\tforms.captureScreenshot();\n\t\tforms.window(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_window_SHIPMENTS_FOLDER}}\").close();\n\t\tforms.captureScreenshot(63);\n\t\t\n\t\tforms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_LINES_FOLDER_PURCHASING_O}}\").setFocus();\n\t\t\n//\t\tforms.button(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.Shipment}}\").click();\n//\t\t\n//\t\tforms.window(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_window_SHIPMENTS_FOLDER}}\").activate(true);\n//\t\tforms.captureScreenshot(68);\n//\t\t\n//\t\tforms.window(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_window_SHIPMENTS_FOLDER}}\").close();\n//\t\tforms.captureScreenshot(71);\n//\t\t\n\t\tforms.window(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_window_LINES_FOLDER}}\").close();\n\t\tforms.captureScreenshot(74);\n\t\t\n\t\tforms.window(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_window_HEADERS_FOLDER}}\").close();\n\t\tforms.captureScreenshot(77);\n\t\t\n\t\tforms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_FIND_OPERATING_UNIT_0}}\").setFocus();\n\t\tforms.captureScreenshot(80);\n\t\t\n\t\tforms.close(81);\n\t\tforms.captureScreenshot(83);\n\t\t\n\t\tforms.choiceBox(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_choiceBox}}\").clickButton(\"OK\");\n\t\t\n\t\t\n\n\t}",
"public static void main(String[] args) throws Exception \r\n\t{\r\n\t\t\r\n\t\tSystem.setProperty(\"webdriver.gecko.driver\", \"Drivers\\\\geckodriver.exe\");\r\n\t\tWebDriver driver=new FirefoxDriver();\r\n\t\tdriver.get(\"http://outlook.com\");\r\n\t\tdriver.manage().window().maximize();\r\n\t\t\r\n\t\r\n\t\t//Identify Signin Button\r\n\t\tWebElement Signin_btn=driver.findElement(By.xpath(\"(//a[contains(.,'Sign in')])[1]\"));\r\n\t\tSignin_btn.click();\r\n\t\t\r\n\t\r\n\t\t//Identify email \r\n\t\tWebElement Email_editbox=driver.findElement(By.xpath(\"//input[@id='i0116']\"));\r\n\t\tEmail_editbox.clear();\r\n\t\tEmail_editbox.sendKeys(\"[email protected]\"); //Entered valid email\r\n\t\t\r\n\t\t//Click Next button\r\n\t\tWebElement Next_btn=driver.findElement(By.xpath(\"//input[contains(@id,'idSIButton9')]\"));\r\n\t\tNext_btn.click();\r\n\t\tThread.sleep(5000);\r\n\t\t\r\n\t\t\r\n\t\t//Identify webpage\r\n\t\tWebElement Page=driver.findElement(By.tagName(\"body\"));\r\n\t\tString Page_Visible_text=Page.getText();\r\n\t\tSystem.out.println(Page_Visible_text);\r\n\t\t\r\n\t\t\r\n\t\t//Write decision to verify expected text visible at webpage\r\n\t\tif(Page_Visible_text.contains(\"Enter password\"))\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Testpass, Expected text visible at webapge\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Expected text not visible at webpage\");\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\r\n\t}",
"public TafResp validate(LifeForm reading, HttpServletRequest req, final HttpServletResponse resp) {\n\t\tString attessec = null;\n\t\tString atteshr = null;\n\t\tString authHeader = req.getHeader(\"Authorization\");\n\t\tString requestURL = req.getRequestURL().toString();\n\t\tif(authHeader!=null && authHeader.startsWith(\"CSP \")) {\n\t\t\tattessec = authHeader.substring(4);\n\t\t} else {\n\t\t\tCookie[] cookies = req.getCookies();\n\t\t\tif(cookies!=null) {\n\t\t\t\tfor(Cookie cookie : cookies) {\n\t\t\t\t\tString cookieName = cookie.getName();\n\t\t\t\t\tif(\"attESSec\".equalsIgnoreCase(cookieName)) {\n\t\t\t\t\t\tattessec = cookie.getValue();\n\t\t\t\t\t} else if(\"attESHr\".equalsIgnoreCase(cookieName)) {\n\t\t\t\t\t\tatteshr = cookie.getValue();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(attessec != null) { // atteshr can be null\n\t\t\treturn validate(\n\t\t\t\t\tnew Creator() {\n//\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic TafResp create(Access access, Principal principal, String desc, String remdialURL) {\n\t\t\t\t\t\t\treturn new CSPHttpTafResp(access,principal,desc, resp, remdialURL);\n\t\t\t\t\t\t}},\n\t\t\t\t\tattessec,\n\t\t\t\t\trequestURL, // Note: since we are taking the URL from the Request, we assume encoded correctly\n\t\t\t\t\tatteshr // this can be null\n\t\t\t\t\t);\n\t\t} else {\n\t\t\t//access.log(\"Cookie not found\");\n\t\t\t// If no cookie, and it's a Silicon Based Lifeform, punt now, because we can't do webpage redirects...\n\t\t\tif(reading == LifeForm.SBLF)return PuntTafResp.singleton();\n\t\t\t\t// Normally, we don't accept incoming Localhost Web Pages, because CSP loops (infinite?)\n\t\t\t\t// However, we must allow Developers to utilize creating an entry in \n\t\t\t\t// /etc/hosts file: 127.0.0.1 <mymachine>.att.com\n\t\t\t\t// So we'll allow something that resolves to 127... if they have it there, but they must use that\n\t\t\t\t// name or CSP will loop\n\t\t\tif(acceptLocalhost) {\n\t\t\t\tif(requestURL.contains(\"localhost\") || requestURL.contains(\"127.0.0.1\") || requestURL.contains(\"::1\")) \n\t\t\t\t\treturn PuntTafResp.singleton();\n\t\t\t} else if(LocalhostTaf.isLocalAddress(req.getRemoteAddr()))\t// normal mode... punt any incoming localhost\n\t\t\t\treturn PuntTafResp.singleton();\n\n\t\t\t// Need full URI for CSP... However, ServletRequest doesn't expose, so we'll have to rebuild it... sigh.\n\t\t\tString remedialURL = requestURL;\n\t\t\tString qs;\n\t\t\tif((qs = req.getQueryString())!=null) {\n\t\t\t\ttry {\n\t\t\t\t\tremedialURL = URLEncoder.encode(requestURL+'?'+qs,Config.UTF_8);\n\t\t\t\t} catch (UnsupportedEncodingException e) {\n\t\t\t\t\t// Not a real possibility after initial Development... not worth trying to log\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\n\t\t\treturn new CSPHttpTafResp(\n\t\t\t\t\taccess,\n\t\t\t\t\tnull, // no principal\n\t\t\t\t\t\"attESSec cookie does not exist\",\n\t\t\t\t\tresp,\n\t\t\t\t\tcspurl + \"/?retURL=\" + remedialURL + \"&sysName=\" + hostname);\n\t\t}\n\n\t}",
"public void setContact(String email){ contact = email; }",
"@Test\n @DisplayName(\"Test: check if invalid 'Mail' validation messages are displayed.\")\n public void testInvalidEmailValidationMessages() throws InterruptedException, ClientException {\n FormContainerEditDialog dialog = formComponents.openEditDialog(containerPath);\n dialog.setMailActionFields(from,subject,new String[] {invalidMailto}, new String[] {invalidCC});\n Commons.saveConfigureDialog();\n String mailToErrorMessage = \"coral-multifield-item-content input[name='./mailto'] + coral-tooltip[variant='error']\";\n String ccErrorMessage = \"coral-multifield-item-content input[name='./mailto'] + coral-tooltip[variant='error']\";\n assertTrue($(mailToErrorMessage).isDisplayed());\n assertEquals($(mailToErrorMessage).getText(), \"Error: Invalid Email Address.\");\n assertTrue($(ccErrorMessage).isDisplayed());\n assertEquals($(ccErrorMessage).getText(), \"Error: Invalid Email Address.\");\n }",
"public void onClick(View v) {\n if (validateContact(name.getText().toString(), email.getText().toString(), phone.getText().toString())) {\n save();\n }\n }",
"public void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\t///// ENVOI FICHIER TRACE AU SUPPORT A LA FERMETURE//\r\n\t\t\t\t\t/////////////////////////////////////////////////////\r\n\t\t\t\t\t\r\n\t\t\t\t\tString [] destinataire = {\"[email protected]\"};\r\n\t\t\t\t\tString from = \"[email protected]\";\r\n\t\t\t\t\tString password = \"gouranga08\";\r\n\t\t\t\t\tString [] Files = {GestionRepertoire.RecupRepTravail()+\"\\\\historique.txt\",GestionRepertoire.RecupRepTravail()+\"\\\\IniFile\\\\version.ini\",GestionRepertoire.RecupRepTravail()+\"\\\\IniFile\\\\AccesBdd.ini\"};\r\n\t\t\t\t\tString Sujet = \"Utilisation carnet client\";\r\n\t\t\t\t\t\r\n\t\t\t\t\tString MACHINE_NAME=VariableEnvironement.VarEnvSystem(\"COMPUTERNAME\");\r\n\t\t\t\t\tString USERNAME=VariableEnvironement.VarEnvSystem(\"USERNAME\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tConfigMgt config = null;\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tconfig = new ConfigMgt(\"version.ini\",GestionRepertoire.RecupRepTravail()+\"\\\\IniFile\\\\\",'[');\r\n\t\t\t\t\t} catch (NullPointerException e1) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t\t} catch (IOException e1) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tString VERSION = config.getValeurDe(\"version\");\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tString Message = \"L'ordinateur \"+ MACHINE_NAME + \"à utilisé ce logiciel.\\n\\r\" +\r\n\t\t\t\t\t\t\t\"L'utilisateur qui a lancé le logiciel est : \" + USERNAME +\"\\n\\r\" +\r\n\t\t\t\t\t\t\t\t\t\"La version utlilisée est : \"+VERSION;\r\n\t\t\t\t\tSendMailUsingAuthenticationWithAttachement smtpMailSender = new SendMailUsingAuthenticationWithAttachement();\r\n\t\t\t\t boolean succesEnvoiMail = false;\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tsuccesEnvoiMail = smtpMailSender.postMail( destinataire, Sujet, Message, from, password, Files);\r\n\t\t\t\t\t} catch (MessagingException e2) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\te2.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (succesEnvoiMail==false){//il y a eu un pb lors de l'envoi, on re essaye une fois\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tsuccesEnvoiMail = smtpMailSender.postMail( destinataire, Sujet, Message, from, password, Files);\r\n\t\t\t\t\t\t} catch (MessagingException e2) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\te2.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tnew Fen_Fermeture ();\r\n\t\t\t\t\t\r\n\t\t\t\t}",
"@Test\n\tpublic void createContactWithoutMandatoryDetailsTest() throws Throwable {\n\t\tHome homePage = PageFactory.initElements(driver, Home.class);\n\t\thomePage.getContactsLnk().click();\n\t\t\n\t\t/*navigate to Create New Contact Page*/\n\t\tContacts contactPage = PageFactory.initElements(driver, Contacts.class);\n\t\tcontactPage.getCreateContactImg().click();\n\t\t\n\t\t/*creating contact without details*/\n\t\tCreatingNewContact createNewContPage = PageFactory.initElements(driver, CreatingNewContact.class);\n\t\tcreateNewContPage.getSaveBtn().click();\n\t\t\n\t\t/*capture alert popup message*/\n\t\tString actAlertMsg = utils.alertPopUpMsg();\n\t\tString expAlertMsg = fLib.getExcelData(\"Sheet1\", 4, 3);\n\t\t\n\t\t/*Validation*/\n\t\tAssert.assertEquals(actAlertMsg, expAlertMsg);\n\t\tReporter.log(\"CreateContactWithoutMandatoryDetails successfully Validated === PASS\", true);\n\t\t\n\t}",
"public void setContactEmail(String contactEmail) {\n this.contactEmail = contactEmail;\n }",
"@And(\"^I enter the plenti phone number using mobile website$\")\n public void I_enter_the_plenti_phone_number_using_mobile_website() throws Throwable {\n TextBoxes.typeTextbox(Elements.element(\"plenti_enroll.phone_number\"), TestUsers.getuslCustomer(null).getUser().getProfileAddress().getBestPhone());\n }",
"private static void CompsNet() throws InterruptedException, AWTException \r\n\t{\n\r\n\t\tMap<String, Object> prefs = new HashMap<String, Object>();\r\n\t\tprefs.put(\"profile.default_content_setting_values.notifications\", 2);\r\n \r\n\r\n\t\t//Create an instance of ChromeOptions \r\n\t\tChromeOptions options = new ChromeOptions();\r\n\t\toptions.setExperimentalOption(\"prefs\", prefs);\r\n\t\t\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:\\\\Program Files\\\\chromedriver_win32\\\\chromedriver.exe\");\r\n\t\tWebDriver driver = new ChromeDriver(options);\r\n\t\tSystem.out.println(\"Driver initiated\");\r\n\t\tSystem.out.println(\"//////////////////////////////////////////\");\r\n\t\tSystem.out.println(\"//////////////////////////////////////////\");\r\n\t\tSystem.out.println(\"//////////////////////////////////////////\");\r\n\t\tSystem.out.println(\"//////////////////////////////////////////\");\r\n\t\t\r\n\t\t//Loading the website\r\n\t\tdriver.get(\"https://apps.google.com/meet/\");\r\n\t\tdriver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);\r\n\t\tSystem.out.println(\"//////////////////////////////////////////\");\r\n\t\tSystem.out.println(\"//////////////////////////////////////////\");\r\n\t\tSystem.out.println(\"//////////////////////////////////////////\");\r\n\t\tSystem.out.println(\"//////////////////////////////////////////\");\r\n\t\tSystem.out.println(\"Website loaded.\");\r\n\t\t\r\n\t\t//Clicks on the sign in button \r\n\t\tdriver.findElement(By.xpath(\"/html/body/header/div[1]/div/div[3]/div[1]/div/span[1]/a\")).click();\r\n\t\tdriver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);\r\n\t\tSystem.out.println(\"//////////////////////////////////////////\");\r\n\t\tSystem.out.println(\"//////////////////////////////////////////\");\r\n\t\tSystem.out.println(\"//////////////////////////////////////////\");\r\n\t\tSystem.out.println(\"//////////////////////////////////////////\");\r\n\t\tSystem.out.println(\"Sign in page loaded.\");\r\n\t\t\r\n\t\t//Clicks on the email field\r\n\t\tThread thread = new Thread();\r\n\t\t\r\n\t\tif(driver.findElement(By.xpath(\"/html/body/div[1]/div[1]/div[2]/div/div[2]/div/div/div[2]/div/div[1]/div/form/span/section/div/div/div[1]/div/div[1]/div/div[1]/input\")) == null)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Email\");\r\n\t\t\tWebElement email =driver.findElement(By.id(\"Email\"));\r\n\t\t\temail.sendKeys(\"<Enter Email Here>\");\r\n\t\t\temail.sendKeys(Keys.ENTER);\r\n\t\t}\r\n\t\t\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Email2\");\r\n\t\t\tWebElement email1=driver.findElement(By.xpath(\"/html/body/div[1]/div[1]/div[2]/div/div[2]/div/div/div[2]/div/div[1]/div/form/span/section/div/div/div[1]/div/div[1]/div/div[1]/input\"));\r\n\t\t\temail1.sendKeys(\"<Enter Email Here>\");\r\n\t\t\temail1.sendKeys(Keys.ENTER);\r\n\t\t\tdriver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);\r\n\t\t\tthread.sleep(2000);\r\n\t\t\tSystem.out.println(\"Thread slept\");// Thread slept due to password enter issues \r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\tthread.run();// Thread resumed\r\n\t\tSystem.out.println(\"Thread run\");\r\n\t\tdriver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);\r\n\t\tSystem.out.println(\"//////////////////////////////////////////\");\r\n\t\tSystem.out.println(\"//////////////////////////////////////////\");\r\n\t\tSystem.out.println(\"//////////////////////////////////////////\");\r\n\t\tSystem.out.println(\"//////////////////////////////////////////\");\r\n\t\tSystem.out.println(\"Password time!!!!\");\r\n\t\t// Password entered\r\n\t\tWebElement password = driver.findElement(By.xpath(\"/html/body/div[1]/div[1]/div[2]/div/div[2]/div/div/div[2]/div/div[1]/div/form/span/section/div/div/div[1]/div[1]/div/div/div/div/div[1]/div/div[1]/input\"));\r\n\t\tpassword.sendKeys(\"<Enter Password Here>\");\r\n\t\tpassword.sendKeys(Keys.ENTER);// Enter key\r\n\t\tSystem.out.println(\"Password entered\");\r\n\t\tdriver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);\r\n\t\t\r\n\t\t// Enter meeting ID\r\n\t\tSystem.out.println(\"Meeting ID\");\r\n\t\tdriver.findElement(By.xpath(\"/html/body/div[1]/c-wiz/div/div/div/div[2]/div[2]/div[2]/div/c-wiz/div[1]/div/div/div[1]/div\")).click();\r\n\t\tWebElement meetID=driver.findElement(By.xpath(\"/html/body/div[1]/div[3]/div/div[2]/span/div/div[2]/div[1]/div[1]/input\"));\r\n\t\tmeetID.sendKeys(\"seitacn\");\r\n\t\tSystem.out.println(\"ID Entered\");\r\n\t\tdriver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);\r\n\t\tthread.sleep(2000);\r\n\t\tthread.run();\r\n\t\tmeetID.sendKeys(Keys.ENTER);\r\n\t\tSystem.out.println(\"Key Enter\");\r\n\t\t\r\n\t\tthread.sleep(2000);\r\n\t\tSystem.out.println(\"Thread slept\");\r\n\t\tthread.run();\r\n\t\tSystem.out.println(\"thread running\");\r\n\t\t\r\n\t\r\n\t\tRobot robo = new Robot();\r\n\t\tthread.sleep(5000);\r\n\t\tthread.run();\r\n\t\trobo.keyPress(KeyEvent.VK_TAB);\r\n\t\tthread.sleep(1000);\r\n\t\tthread.run();\r\n\t\trobo.keyPress(KeyEvent.VK_TAB);\r\n\t\tthread.sleep(1000);\r\n\t\tthread.run();\r\n\t\trobo.keyPress(KeyEvent.VK_TAB);\r\n\t\tthread.sleep(1000);\r\n\t\tthread.run();\r\n\t\trobo.keyPress(KeyEvent.VK_ENTER);\r\n\t\tthread.sleep(1000);\r\n\t\tthread.run();\r\n\t\t\r\n\t\tthread.sleep(5000);\r\n\t\tthread.run();\r\n\t\t\r\n\t\tdriver.findElement(By.xpath(\"/html/body/div/c-wiz/div/div/div[8]/div[3]/div/div/div[2]/div/div[1]/div[2]/div/div[2]/div/div[1]/div[1]/span/span\")).click();\r\n\t\t\r\n\t\tthread.sleep(3900000);\r\n\t\tdriver.close();\r\n\t\t\r\n\t}",
"public static void main(String[] args) {\n try {\r\n System.out.println(\"We are trying to do something cool\");\r\n System.setProperty(\"webdriver.chrome.driver\", \"C://chromedriver.exe\");\r\n WebDriver driver = new ChromeDriver();\r\n String gmail = \"https://accounts.google.com/signin/v2/identifier?service=mail&passive=true&rm=false&continue=https%3A%2F%2Fmail.google.com%2Fmail%2F&ss=1&scc=1<mpl=default<mplcache=2&emr=1&osid=1&flowName=GlifWebSignIn&flowEntry=ServiceLogin\";\r\n\r\n driver.get(gmail);\r\n\r\n driver.findElement(By.xpath(\"//*[@id=\\\"identifierId\\\"]\")).sendKeys(\"[email protected]\"); //[email protected]\r\n\r\n Thread.sleep(1000);\r\n //This is to click next\r\n driver.findElement(By.xpath(\"//*[@id=\\\"identifierNext\\\"]\")).click();\r\n\r\n Thread.sleep(1000);\r\n //This is to put in the password Cairo2000\r\n driver.findElement(By.cssSelector(\".aCsJod.oJeWuf div div input\" )).sendKeys(\"Cairo2000\");\r\n driver.findElement(By.cssSelector(\"#passwordNext\")).click();\r\n //tempGmail.sendKeys(Keys.SHIFT, Keys.TAB);\r\n //driver.findElement(By.xpath(\"//*[@id=\\\"passwordNext\\\"]\")).sendKeys(\"Awad9911677\");\r\n //driver.findElement(By.xpath(\"//*[@id=\\\"identifierNext\\\"]\")).click();\r\n\r\n\r\n Thread.sleep(1000);\r\n WebElement PageChecker = (new WebDriverWait(driver, 10000)).until(ExpectedConditions.elementToBeClickable(By.xpath(\"//*[@id=\\\":ha\\\"]/div/div\")));\r\n\r\n System.out.println(\"We should be in the email now to check the stuff\");\r\n\r\n\r\n for(int x = 0; x <= 17; x++){\r\n String ca = \"a\";\r\n\r\n switch (x) {\r\n case 0: ca = \"0\";\r\n break;\r\n case 1: ca = \"1\";\r\n break;\r\n case 2: ca = \"2\";\r\n break;\r\n case 3: ca = \"3\";\r\n break;\r\n case 4: ca = \"4\";\r\n break;\r\n case 5: ca = \"5\";\r\n break;\r\n case 6: ca = \"6\";\r\n break;\r\n case 7: ca = \"7\";\r\n break;\r\n case 8: ca = \"8\";\r\n break;\r\n case 9: ca = \"9\";\r\n break;\r\n case 10: ca = \"a\";\r\n break;\r\n case 11: ca = \"b\";\r\n break;\r\n case 12: ca = \"c\";\r\n break;\r\n case 13: ca = \"d\";\r\n break;\r\n case 14: ca = \"e\";\r\n break;\r\n case 15: ca = \"f\";\r\n break;\r\n case 16: ca = \"g\";\r\n break;\r\n default: ca = \"g\";\r\n break;\r\n }\r\n //This is the innerloop\r\n for(int y = 0; y <= 36; y++){\r\n\r\n String da;\r\n //da = checkYValue(y);\r\n switch (y) {\r\n case 0: da = \"0\";\r\n break;\r\n case 1: da = \"1\";\r\n break;\r\n case 2: da = \"2\";\r\n break;\r\n case 3: da = \"3\";\r\n break;\r\n case 4: da = \"4\";\r\n break;\r\n case 5: da = \"5\";\r\n break;\r\n case 6: da = \"6\";\r\n break;\r\n case 7: da = \"7\";\r\n break;\r\n case 8: da = \"8\";\r\n break;\r\n case 9: da = \"9\";\r\n break;\r\n case 10: da = \"a\";\r\n break;\r\n case 11: da = \"b\";\r\n break;\r\n case 12: da = \"c\";\r\n break;\r\n case 13: da = \"d\";\r\n break;\r\n case 14: da = \"e\";\r\n break;\r\n case 15: da = \"f\";\r\n break;\r\n case 16: da = \"g\";\r\n break;\r\n case 17: da = \"h\";\r\n break;\r\n case 18: da = \"i\";\r\n break;\r\n case 19: da = \"j\";\r\n break;\r\n case 20: da = \"k\";\r\n break;\r\n case 21: da = \"l\";\r\n break;\r\n case 22: da = \"m\";\r\n break;\r\n case 23: da = \"n\";\r\n break;\r\n case 24: da = \"o\";\r\n break;\r\n case 25: da = \"p\";\r\n break;\r\n case 26: da = \"q\";\r\n break;\r\n case 27: da = \"r\";\r\n break;\r\n case 28: da = \"s\";\r\n break;\r\n case 29: da = \"t\";\r\n break;\r\n case 30: da = \"u\";\r\n break;\r\n case 31: da = \"v\";\r\n break;\r\n case 32: da = \"w\";\r\n break;\r\n case 33: da = \"x\";\r\n break;\r\n case 34: da = \"y\";\r\n break;\r\n case 35: da = \"z\";\r\n break;\r\n default: da = \"g\";\r\n break;\r\n }\r\n\r\n // System.out.println(\"Check CA and DA \" + ca + \" X\" );\r\n\r\n if( x >= 3 && y >= 2){ // if ID = 31 skip it duh\r\n\r\n if( driver.findElements(By.xpath(\"//*[@id=\\\":\" + ca + da + \"\\\"]\")).size() != 0){\r\n\r\n //System.out.println(\"Check CA and DA\" + ca + \" \" + da);\r\n //*[@id=\":6t\"]\r\n //TODO: Search based on sender of email //*[@id=\\\":\" + ca + da + \"\\\"]\" //*[@id=\":v7\"]/b/text()\r\n\r\n // System.out.println(driver.findElement(By.id(\":\" + ca + da)).getText());\r\n // System.out.println(\"We are here\");\r\n\r\n //if(driver.findElement(By.cssSelector(\".zA.zE\")).getCssValue(gmail)){ //this is to find if it is unread //Old Code .getText().contains(\"Instant payment received from\")\r\n if(driver.findElement(By.id(\":\" + ca + da)).getText().contains(\"Instant payment received from\")) {\r\n WebElement currentEmail = driver.findElement(By.id(\":\" + ca + da));\r\n System.out.println(currentEmail.getCssValue(\"background\"));\r\n if(currentEmail.getCssValue(\"background\").contains(\"rgba(255, 255, 255, 0.9)\")){\r\n //unread click it\r\n System.out.println(\"We are unread now click\");\r\n driver.findElement(By.xpath(\"//*[@id=\\\":\" + ca + da + \"\\\"]\")).click();\r\n System.out.println(\"You Luckly basters\");\r\n }\r\n break;\r\n }\r\n }\r\n }\r\n if(x == 16 && y == 16){ //stop at gg\r\n break;\r\n }\r\n }\r\n if(x == 16){ //stop at gg\r\n break;\r\n }\r\n }\r\n\r\n System.out.println(\"We are in the RIGHT EMAIL ADDRESS\");\r\n Thread.sleep(1000);\r\n WebElement insideEmail = driver.findElement(By.cssSelector(\".acX .aaq, .acX .bsQ\"));\r\n //driver.findElement(By.xpath(\"//*[@id=\\\":k8\\\"]/div[1]/div[2]/div[1]/table/tbody/tr[1]/td[4]/div[1]\")).click();\r\n insideEmail.click();\r\n //insideEmail.sendKeys(\"This is a test\");\r\n driver.findElement(By.cssSelector(\".aO7\")).sendKeys(\"We made it\");\r\n\r\n\r\n } catch (InterruptedException ex) {\r\n Logger.getLogger(Ebay.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n\r\n\r\n }",
"public void fillForm(String firstName, String lastName, String companyName, String countryName, String email, String mobileNumber, String enquiryDetails, boolean checkboxStatus)\n\t{\n\t\tenterDetail(formFirstName, firstName);\n\t\tenterDetail(formLastName,lastName);\n\t\tenterDetail(formCompanyName, companyName);\n\t\tselectCountryDropdown(countryName);\n\t\tenterDetail(formEmail, email);\n\t\t\n\t\t// Mobile phone number and enquiry details are not mandatory. Hence a condition has been added to type these details only if value is passed.\n\t\t// Test cases without these details can be added and tested\n\t\tif(mobileNumber != null)\n\t\t{\n\t\t\tenterDetail(formMobileNumber,mobileNumber);\n\t\t}\n\t\t\n\t\tif(enquiryDetails != null)\n\t\t{\n\t\t\tenterDetail(formEnquiryDetails, enquiryDetails);\n\t\t}\n\t\t\n\t\t//Tick the checkbox only if checkboxStatus is true\n\t\tif(checkboxStatus == true)\n\t\t{\n\t\t\tclickAgreeCheckbox();\n\t\t}\n\t}",
"public Contact(String nameInput, String phoneInput, String emailInput){\n this.name = nameInput;\n this.phone = phoneInput;\n this.email = emailInput;\n }",
"@OnClick(R.id.rltContact)\n public void contact() {\n Intent cancel = new Intent(getApplicationContext(), ContactActivity.class);\n cancel.putExtra(\"status\", acceptDetailsModel.getStatus());\n cancel.putExtra(\"restaurantname\", acceptDetailsModel.getRestaurantName());\n cancel.putExtra(\"restaurantnumber\", acceptDetailsModel.getRestaurantMobileNumber());\n cancel.putExtra(\"eatername\", acceptDetailsModel.getEaterName());\n cancel.putExtra(\"eaternumber\", acceptDetailsModel.getEaterMobileNumber());\n startActivity(cancel);\n }",
"public static WebElement txtbx_PACatfishBanner_EnterBusinessEmail() throws Exception{\r\n \ttry{\r\n \t\t// Locate the PA Catfish Banner area\r\n \t\tWebElement imgHover = driver.findElement(By.name(\"PAinline\"));\r\n\t\t\t\r\n \t\t// Hover mouse above the image but DONT click\r\n \t\tActions builder = new Actions(driver);\r\n \t\tbuilder.moveToElement(imgHover).build().perform();\r\n \t\t\r\n \t//\telement = driver.findElement(By.xpath(\"//*[@id='catfishAd']//input[@name='email']\"));\r\n \t\telement = driver.findElement(By.xpath(\"//*[@name='PAemail']//input[@name='email']\"));\r\n \t}catch(Exception e){\r\n \t\tthrow(e);\r\n \t}\r\n \treturn element;\r\n }",
"public void launchEmail(){\n\t\tIntent sendIntent = new Intent(Intent.ACTION_MAIN); \n \tsendIntent.addCategory(Intent.CATEGORY_APP_EMAIL);\n\n if (sendIntent.resolveActivity(pacman) != null) {\n \tstartActivity(sendIntent);\n \treturn;\n } else {\n \tToast.makeText(context, \"No Email App Availible\", Toast.LENGTH_SHORT).show();\n \treturn;\n }\n\t}",
"public void setContactEmail(String contactEmail) {\r\n this.contactEmail = contactEmail;\r\n }",
"public void img_email(View view) {\n try {\n String txt = \"Good morning \\n\" + \"My suggestion is\";\n Intent sendemail = new Intent(Intent.ACTION_SEND);\n sendemail.setData( Uri.parse(\"mailto:\"));\n sendemail.setType((\"message/rfc822\"));\n sendemail.putExtra(Intent.EXTRA_EMAIL, \"[email protected]\");\n sendemail.putExtra(Intent.EXTRA_SUBJECT, \"Application Issam Drmas\");\n sendemail.putExtra(Intent.EXTRA_TEXT, txt);\n startActivity(sendemail);\n }catch (Exception e) {\n Toast.makeText(this,\"Sorry cannot find the application\", Toast.LENGTH_LONG).show();\n }\n }"
] | [
"0.5863956",
"0.558643",
"0.55632174",
"0.54946375",
"0.5475692",
"0.54412675",
"0.5359625",
"0.535896",
"0.5351976",
"0.53328305",
"0.53154063",
"0.5273816",
"0.52711535",
"0.5235",
"0.52237093",
"0.5209095",
"0.5194641",
"0.5184695",
"0.5179626",
"0.5174834",
"0.51664263",
"0.51569957",
"0.5154703",
"0.5150092",
"0.5141008",
"0.51317734",
"0.5131021",
"0.5125035",
"0.511225",
"0.51109815",
"0.508798",
"0.508294",
"0.5082897",
"0.50775766",
"0.5076442",
"0.5064172",
"0.5047047",
"0.50456005",
"0.50354195",
"0.50324875",
"0.50281656",
"0.50250125",
"0.5017927",
"0.5017098",
"0.5016668",
"0.5011889",
"0.50111884",
"0.5004875",
"0.5004409",
"0.49954373",
"0.49926785",
"0.49886686",
"0.4984576",
"0.4979484",
"0.49752152",
"0.49740154",
"0.49705452",
"0.4969472",
"0.4959903",
"0.495989",
"0.4952636",
"0.49502373",
"0.49493653",
"0.49454054",
"0.49339768",
"0.49307248",
"0.49187246",
"0.49147788",
"0.4914465",
"0.49104443",
"0.49077114",
"0.49061358",
"0.49047622",
"0.49038014",
"0.49035192",
"0.49033663",
"0.48994213",
"0.48903632",
"0.4871517",
"0.48660278",
"0.48624635",
"0.48514947",
"0.48506847",
"0.4847142",
"0.48320746",
"0.48277175",
"0.48267612",
"0.48261768",
"0.4824204",
"0.48162797",
"0.48146555",
"0.4814216",
"0.48110974",
"0.4810051",
"0.48072422",
"0.48028606",
"0.48015577",
"0.48015127",
"0.4800935",
"0.4797874"
] | 0.62772876 | 0 |
create a cursor of batch size 1 with 4 results | @Test
public void cursorDirtyRead() throws IOException {
final ArangoCursor<VPackSlice> cursor = arango.db().query("FOR i IN 1..4 RETURN i",
new AqlQueryOptions().batchSize(1).allowDirtyRead(true), VPackSlice.class);
// get the initial result
assertThat(cursor.hasNext(), is(true));
assertThat(cursor.next().isInteger(), is(true));
// get the second batch
assertThat(cursor.hasNext(), is(true));
assertThat(cursor.next().isInteger(), is(true));
// close the cursor before fetching the all batches
cursor.close();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private CompletableFuture<Iterator<T>> batch() {\n return batch.thenCompose(iterator -> {\n if (iterator != null && !iterator.hasNext()) {\n batch = fetch(iterator.position());\n return batch.thenApply(Function.identity());\n }\n return CompletableFuture.completedFuture(iterator);\n });\n }",
"OResultSet fetchNext(int n);",
"public Cursor getCursorWithRows() {\n Cursor cursor = new SimpleCursor(Query.QueryResult.newBuilder()\n .addFields(Query.Field.newBuilder().setName(\"col1\").setType(Query.Type.INT8).build())\n .addFields(Query.Field.newBuilder().setName(\"col2\").setType(Query.Type.UINT8).build())\n .addFields(Query.Field.newBuilder().setName(\"col3\").setType(Query.Type.INT16).build())\n .addFields(Query.Field.newBuilder().setName(\"col4\").setType(Query.Type.UINT16).build())\n .addFields(Query.Field.newBuilder().setName(\"col5\").setType(Query.Type.INT24).build())\n .addFields(Query.Field.newBuilder().setName(\"col6\").setType(Query.Type.UINT24).build())\n .addFields(Query.Field.newBuilder().setName(\"col7\").setType(Query.Type.INT32).build())\n .addFields(Query.Field.newBuilder().setName(\"col8\").setType(Query.Type.UINT32).build())\n .addFields(Query.Field.newBuilder().setName(\"col9\").setType(Query.Type.INT64).build())\n .addFields(Query.Field.newBuilder().setName(\"col10\").setType(Query.Type.UINT64).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col11\").setType(Query.Type.FLOAT32).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col12\").setType(Query.Type.FLOAT64).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col13\").setType(Query.Type.TIMESTAMP).build())\n .addFields(Query.Field.newBuilder().setName(\"col14\").setType(Query.Type.DATE).build())\n .addFields(Query.Field.newBuilder().setName(\"col15\").setType(Query.Type.TIME).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col16\").setType(Query.Type.DATETIME).build())\n .addFields(Query.Field.newBuilder().setName(\"col17\").setType(Query.Type.YEAR).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col18\").setType(Query.Type.DECIMAL).build())\n .addFields(Query.Field.newBuilder().setName(\"col19\").setType(Query.Type.TEXT).build())\n .addFields(Query.Field.newBuilder().setName(\"col20\").setType(Query.Type.BLOB).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col21\").setType(Query.Type.VARCHAR).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col22\").setType(Query.Type.VARBINARY).build())\n .addFields(Query.Field.newBuilder().setName(\"col23\").setType(Query.Type.CHAR).build())\n .addFields(Query.Field.newBuilder().setName(\"col24\").setType(Query.Type.BINARY).build())\n .addFields(Query.Field.newBuilder().setName(\"col25\").setType(Query.Type.BIT).build())\n .addFields(Query.Field.newBuilder().setName(\"col26\").setType(Query.Type.ENUM).build())\n .addFields(Query.Field.newBuilder().setName(\"col27\").setType(Query.Type.SET).build())\n .addRows(Query.Row.newBuilder().addLengths(\"-50\".length()).addLengths(\"50\".length())\n .addLengths(\"-23000\".length()).addLengths(\"23000\".length())\n .addLengths(\"-100\".length()).addLengths(\"100\".length()).addLengths(\"-100\".length())\n .addLengths(\"100\".length()).addLengths(\"-1000\".length()).addLengths(\"1000\".length())\n .addLengths(\"24.52\".length()).addLengths(\"100.43\".length())\n .addLengths(\"2016-02-06 14:15:16\".length()).addLengths(\"2016-02-06\".length())\n .addLengths(\"12:34:56\".length()).addLengths(\"2016-02-06 14:15:16\".length())\n .addLengths(\"2016\".length()).addLengths(\"1234.56789\".length())\n .addLengths(\"HELLO TDS TEAM\".length()).addLengths(\"HELLO TDS TEAM\".length())\n .addLengths(\"HELLO TDS TEAM\".length()).addLengths(\"HELLO TDS TEAM\".length())\n .addLengths(\"N\".length()).addLengths(\"HELLO TDS TEAM\".length())\n .addLengths(\"1\".length()).addLengths(\"val123\".length())\n .addLengths(\"val123\".length()).setValues(ByteString\n .copyFromUtf8(\"-5050-2300023000-100100-100100-1000100024.52100.432016-02-06 \" +\n \"14:15:162016-02-0612:34:562016-02-06 14:15:1620161234.56789HELLO TDS TEAMHELLO TDS TEAMHELLO\"\n +\n \" TDS TEAMHELLO TDS TEAMNHELLO TDS TEAM1val123val123\"))).build());\n return cursor;\n }",
"public abstract Cursor buildCursor();",
"DBCursor execute();",
"@Override\n public int[] executeBatch() {\n if (this.batchPos == 0) {\n return new int[0];\n }\n try {\n int[] arrn = this.db.executeBatch(this.pointer, this.batchPos / this.paramCount, this.batch);\n return arrn;\n }\n finally {\n this.clearBatch();\n }\n }",
"public QueryResultIterator(DBApiLayer db, DBCollectionImpl collection, Response res, int batchSize, int limit,\n int options, DBDecoder decoder){\n this._db = db;\n _collection = collection;\n _batchSize = batchSize;\n _limit = limit;\n _options = options;\n _host = res._host;\n _decoder = decoder;\n _res = res;\n initFromQueryResponse(res);\n _optionalFinalizer = getOptionalFinalizer(collection);\n }",
"public Cursor getCursorWithRowsAsNull() {\n Cursor cursor = new SimpleCursor(Query.QueryResult.newBuilder()\n .addFields(Query.Field.newBuilder().setName(\"col1\").setType(Query.Type.INT8).build())\n .addFields(Query.Field.newBuilder().setName(\"col2\").setType(Query.Type.UINT8).build())\n .addFields(Query.Field.newBuilder().setName(\"col3\").setType(Query.Type.INT16).build())\n .addFields(Query.Field.newBuilder().setName(\"col4\").setType(Query.Type.UINT16).build())\n .addFields(Query.Field.newBuilder().setName(\"col5\").setType(Query.Type.INT24).build())\n .addFields(Query.Field.newBuilder().setName(\"col6\").setType(Query.Type.UINT24).build())\n .addFields(Query.Field.newBuilder().setName(\"col7\").setType(Query.Type.INT32).build())\n .addFields(Query.Field.newBuilder().setName(\"col8\").setType(Query.Type.UINT32).build())\n .addFields(Query.Field.newBuilder().setName(\"col9\").setType(Query.Type.INT64).build())\n .addFields(Query.Field.newBuilder().setName(\"col10\").setType(Query.Type.UINT64).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col11\").setType(Query.Type.FLOAT32).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col12\").setType(Query.Type.FLOAT64).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col13\").setType(Query.Type.TIMESTAMP).build())\n .addFields(Query.Field.newBuilder().setName(\"col14\").setType(Query.Type.DATE).build())\n .addFields(Query.Field.newBuilder().setName(\"col15\").setType(Query.Type.TIME).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col16\").setType(Query.Type.DATETIME).build())\n .addFields(Query.Field.newBuilder().setName(\"col17\").setType(Query.Type.YEAR).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col18\").setType(Query.Type.DECIMAL).build())\n .addFields(Query.Field.newBuilder().setName(\"col19\").setType(Query.Type.TEXT).build())\n .addFields(Query.Field.newBuilder().setName(\"col20\").setType(Query.Type.BLOB).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col21\").setType(Query.Type.VARCHAR).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col22\").setType(Query.Type.VARBINARY).build())\n .addFields(Query.Field.newBuilder().setName(\"col23\").setType(Query.Type.CHAR).build())\n .addFields(Query.Field.newBuilder().setName(\"col24\").setType(Query.Type.BINARY).build())\n .addFields(Query.Field.newBuilder().setName(\"col25\").setType(Query.Type.BIT).build())\n .addFields(Query.Field.newBuilder().setName(\"col26\").setType(Query.Type.ENUM).build())\n .addFields(Query.Field.newBuilder().setName(\"col27\").setType(Query.Type.SET).build())\n .addRows(Query.Row.newBuilder().addLengths(\"-50\".length()).addLengths(\"50\".length())\n .addLengths(\"-23000\".length()).addLengths(\"23000\".length())\n .addLengths(\"-100\".length()).addLengths(\"100\".length()).addLengths(\"-100\".length())\n .addLengths(\"100\".length()).addLengths(\"-1000\".length()).addLengths(\"1000\".length())\n .addLengths(\"24.52\".length()).addLengths(\"100.43\".length())\n .addLengths(\"2016-02-06 14:15:16\".length()).addLengths(\"2016-02-06\".length())\n .addLengths(\"12:34:56\".length()).addLengths(\"2016-02-06 14:15:16\".length())\n .addLengths(\"2016\".length()).addLengths(\"1234.56789\".length())\n .addLengths(\"HELLO TDS TEAM\".length()).addLengths(\"HELLO TDS TEAM\".length())\n .addLengths(\"HELLO TDS TEAM\".length()).addLengths(\"HELLO TDS TEAM\".length())\n .addLengths(\"N\".length()).addLengths(\"HELLO TDS TEAM\".length())\n .addLengths(\"1\".length()).addLengths(\"val123\".length()).addLengths(-1).setValues(\n ByteString.copyFromUtf8(\n \"-5050-2300023000-100100-100100-1000100024.52100.432016-02-06 \" +\n \"14:15:162016-02-0612:34:562016-02-06 14:15:1620161234.56789HELLO TDS TEAMHELLO TDS \"\n +\n \"TEAMHELLO TDS TEAMHELLO TDS TEAMNHELLO TDS TEAM1val123\"))).build());\n return cursor;\n }",
"public Cursor getCursor()\n {\n// Object localObject1;\n// if (!this.mCursorValid)\n// {\n// this.mCursor = new EsMatrixCursor(PROJECTION);\n// this.mCursorValid = true;\n// if ((this.mLocalProfilesLoaded) && (this.mGaiaIdsAndCirclesLoaded))\n// {\n// localObject1 = new HashSet();\n// HashSet localHashSet = new HashSet();\n// Object localObject3 = this.mLocalProfiles.iterator();\n// while (true)\n// {\n// long l1;\n// if (!((Iterator)localObject3).hasNext())\n// {\n// localObject5 = this.mContacts.iterator();\n// while (true)\n// {\n// if (!((Iterator)localObject5).hasNext())\n// {\n// localObject2 = this.mPublicProfiles.iterator();\n// while (true)\n// {\n// if (!((Iterator)localObject2).hasNext())\n// {\n// localObject3 = this.mPublicProfiles.iterator();\n// while (true)\n// {\n// if (!((Iterator)localObject3).hasNext())\n// {\n// localObject1 = this.mCursor;\n// break;\n// }\n// localObject4 = (PublicProfile)((Iterator)localObject3).next();\n// localObject2 = ((PublicProfile)localObject4).gaiaId;\n// if (((HashSet)localObject1).contains(localObject2))\n// continue;\n// localObject5 = this.mCursor;\n// arrayOfObject = new Object[11];\n// l1 = this.mNextId;\n// this.mNextId = (1L + l1);\n// arrayOfObject[0] = Long.valueOf(l1);\n// arrayOfObject[1] = ((PublicProfile)localObject4).personId;\n// arrayOfObject[2] = null;\n// arrayOfObject[3] = localObject2;\n// arrayOfObject[4] = ((PublicProfile)localObject4).name;\n// arrayOfObject[5] = null;\n// arrayOfObject[6] = null;\n// arrayOfObject[7] = null;\n// arrayOfObject[8] = null;\n// arrayOfObject[9] = null;\n// arrayOfObject[10] = ((PublicProfile)localObject4).snippet;\n// ((EsMatrixCursor)localObject5).addRow(arrayOfObject);\n// }\n// }\n// localObject3 = (PublicProfile)((Iterator)localObject2).next();\n// localObject5 = ((PublicProfile)localObject3).gaiaId;\n// localObject4 = (String)this.mGaiaIdsAndCircles.get(localObject5);\n// if ((((HashSet)localObject1).contains(localObject5)) || (TextUtils.isEmpty((CharSequence)localObject4)))\n// continue;\n// ((HashSet)localObject1).add(localObject5);\n// localObject6 = this.mCursor;\n// Object[] arrayOfObject = new Object[11];\n// l1 = this.mNextId;\n// this.mNextId = (1L + l1);\n// arrayOfObject[0] = Long.valueOf(l1);\n// arrayOfObject[1] = ((PublicProfile)localObject3).personId;\n// arrayOfObject[2] = null;\n// arrayOfObject[3] = localObject5;\n// arrayOfObject[4] = ((PublicProfile)localObject3).name;\n// arrayOfObject[5] = localObject4;\n// arrayOfObject[6] = null;\n// arrayOfObject[7] = null;\n// arrayOfObject[8] = null;\n// arrayOfObject[9] = null;\n// arrayOfObject[10] = null;\n// ((EsMatrixCursor)localObject6).addRow(arrayOfObject);\n// }\n// }\n// localObject3 = (Contact)((Iterator)localObject5).next();\n// if (l1.contains(((Contact)localObject3).name))\n// continue;\n// localObject2 = this.mCursor;\n// localObject4 = new Object[11];\n// l2 = this.mNextId;\n// this.mNextId = (1L + l2);\n// localObject4[0] = Long.valueOf(l2);\n// localObject4[1] = ((Contact)localObject3).personId;\n// localObject4[2] = ((Contact)localObject3).lookupKey;\n// localObject4[3] = null;\n// localObject4[4] = ((Contact)localObject3).name;\n// localObject4[5] = null;\n// localObject4[6] = null;\n// localObject4[7] = ((Contact)localObject3).email;\n// localObject4[8] = ((Contact)localObject3).phoneNumber;\n// localObject4[9] = ((Contact)localObject3).phoneType;\n// localObject4[10] = null;\n// ((EsMatrixCursor)localObject2).addRow(localObject4);\n// }\n// }\n// Object localObject6 = (LocalProfile)((Iterator)localObject3).next();\n// Object localObject2 = ((LocalProfile)localObject6).gaiaId;\n// ((HashSet)localObject1).add(localObject2);\n// l1.add(((LocalProfile)localObject6).name);\n// Object localObject4 = this.mCursor;\n// Object localObject5 = new Object[11];\n// long l2 = this.mNextId;\n// this.mNextId = (1L + l2);\n// localObject5[0] = Long.valueOf(l2);\n// localObject5[1] = ((LocalProfile)localObject6).personId;\n// localObject5[2] = null;\n// localObject5[3] = localObject2;\n// localObject5[4] = ((LocalProfile)localObject6).name;\n// localObject5[5] = ((LocalProfile)localObject6).packedCircleIds;\n// localObject5[6] = ((LocalProfile)localObject6).email;\n// localObject5[7] = null;\n// localObject5[8] = ((LocalProfile)localObject6).phoneNumber;\n// localObject5[9] = ((LocalProfile)localObject6).phoneType;\n// localObject5[10] = null;\n// ((EsMatrixCursor)localObject4).addRow(localObject5);\n// }\n// }\n// localObject1 = this.mCursor;\n// }\n// else\n// {\n// localObject1 = this.mCursor;\n// }\n// return (Cursor)(Cursor)(Cursor)(Cursor)(Cursor)(Cursor)localObject1;\n return null;\n }",
"@Options(fetchSize = Integer.MIN_VALUE)\n @Select(\"SELECT * FROM USERS\")\n Cursor<User> listUsersWithFetchSize();",
"public void fetch(){ \n for(int i = 0; i < this.queries.size(); i++){\n fetch(i);\n }\n }",
"public int[] executeBatch() throws SQLException {\n return null;\r\n }",
"private static Cursor makePoiCursor(int count) {\n Random random = new Random();\n long id, radius;\n double lat, lgt;\n String poi, poiType, cellTowers, connectedWifi, wifiSsid;\n final int maxRadius = 2000;\n // COL_ID, COL_POI, COL_LAT, COL_LGT, COL_RADIUS, COL_POI_TYPE, COL_CELL_TOWERS, COL_CONNECTED_WIFI, COL_WIFI_SSID\n MatrixCursor cursor = new MatrixCursor(PoiTuple.COLUMNS);\n for (int i = 0; i < count; i++) {\n id = random.nextLong();\n if (id < 0) {\n id = id * -1L;\n } else if (id == 0) {\n id = 1L;\n }\n poi = String.valueOf(random.nextGaussian());\n lat = random.nextDouble();\n lgt = random.nextDouble();\n radius = random.nextInt(maxRadius) + 1;\n poiType = String.valueOf(random.nextGaussian());\n cellTowers = String.valueOf(random.nextGaussian());\n connectedWifi = String.valueOf(random.nextGaussian());\n wifiSsid = String.valueOf(random.nextGaussian());\n cursor.newRow().add(id).add(poi).add(lat).add(lgt).add(radius).add(poiType)\n .add(cellTowers).add(connectedWifi).add(wifiSsid);\n }\n cursor.moveToFirst();\n\n return cursor;\n }",
"public int getCursor() { return curs; }",
"Itr(int batch) {\n this.batch = batch;\n }",
"@Override\n\tpublic final Iterable<R> execute() {\n\t\t\n\t\treturn new Iterable<R>() {\n\t\t\t\n\t\t\t@Override \n\t\t\tpublic Iterator<R> iterator() {\n\t\t\t\t\n\t\t\t\treturn AbstractMultiQuery.this.iterator();\n\t\t\t\t\n\t\t\t}\n\t\t};\n\t\t\n\t}",
"public ClusterCursor nextCursor(ClusterCursor clusterCursor) {\n //clear out keyValueList first\n clusterCursor.resetCursorParaList();\n if ( clusterCursor.isEnd()) {\n logger.info(\"isEnd true for clusterCursor size \"+clusterCursor.getCursorParaList().size());\n return clusterCursor;\n }\n int size = clusterCursor.getKeyClusterList().size();\n CountDownLatch countDownLatch = new CountDownLatch(size);\n ExecutorService executor = Executors.newFixedThreadPool(size);\n List<Runnable> runnableList = new ArrayList<Runnable>(size);\n for ( int i = 0; i < size ; i++ ) {\n //create request for nextCursor\n Request request = createCursorRequest( clusterCursor.getCursorParaList().get(i));\n RunThread runThread = new RunThread(request, clusterCursor.getKeyClusterList().get(i), countDownLatch, OpType.Scan);\n runnableList.add( runThread);\n executor.submit( runThread );\n }\n try {\n // add 5 times to handle large package for store proc\n countDownLatch.await(timeout *5, TimeUnit.MILLISECONDS);\n } catch (InterruptedException ex) {\n logger.warn(ex.getMessage(), ex);\n } finally {\n executor.shutdown();\n return mergeCluster(runnableList, clusterCursor);\n }\n }",
"private CompletableFuture<AtomicMultimapService.Batch<T>> fetch(int position) {\n return getProxyClient().applyOn(partitionId, service -> nextFunction.apply(service, position))\n .thenCompose(batch -> {\n if (batch == null) {\n return close().thenApply(v -> null);\n }\n return CompletableFuture.completedFuture(batch);\n });\n }",
"public QueryResultIterator(DBObject cursorDocument, DBApiLayer db, DBCollectionImpl collection, int batchSize, DBDecoder decoder,\n final ServerAddress serverAddress) {\n this._db = db;\n _collection = collection;\n _batchSize = batchSize;\n _host = serverAddress;\n _limit = 0;\n _options = 0;\n _decoder = decoder;\n initFromCursorDocument(cursorDocument);\n _optionalFinalizer = getOptionalFinalizer(collection);\n }",
"public abstract long getCursor();",
"public ClusterCursor openKeyValueCursor(short batchSize) {\n return opeCursorType(batchSize, CursorPara.CursorType.KeyValueSet);\n }",
"Data<List<Pins>> getPinsCursor(String cursor, Integer limit);",
"public static interface Cursor {\n\t\tpublic void open() throws RelationException;\n\n\t\t//the hasNext() method actually loads the object, so don't skip it\n\t\tpublic boolean hasNext() throws RelationException;\n\n\t\t//this retrieves the next object. use in confunction with hasNext();\n\t\tpublic Tuple next() throws RelationException;\n\n\t\tpublic void close() throws RelationException;\n\t}",
"public static QueryableTable processCursor( final int offset, final Enumerable<Object[]> a ) {\n return new AbstractQueryableTable( Object[].class ) {\n @Override\n public AlgDataType getRowType( AlgDataTypeFactory typeFactory ) {\n return typeFactory.builder()\n .add( \"result\", null, PolyType.INTEGER )\n .build();\n }\n\n\n @Override\n public <T> Queryable<T> asQueryable( DataContext dataContext, SchemaPlus schema, String tableName ) {\n final Enumerable<Integer> enumerable = a.select( a0 -> offset + ((Integer) a0[0]) );\n //noinspection unchecked\n return (Queryable) enumerable.asQueryable();\n }\n };\n }",
"public int getBatchSize();",
"public int cursor();",
"@Override\n public void insert(Iterator<Object[]> batch) {\n while (batch.hasNext()) {\n BoundStatement boundStatement = statement.bind(batch.next());\n ResultSetFuture future = session.executeAsync(boundStatement);\n Futures.addCallback(future, callback, executor);\n }\n }",
"DataFrameCursor<R,C> cursor();",
"public RowDataCursor(MysqlIO ioChannel, ServerPreparedStatement creatingStatement, Field[] metadata) {\n/* 112 */ this.currentPositionInEntireResult = -1;\n/* 113 */ this.metadata = metadata;\n/* 114 */ this.mysql = ioChannel;\n/* 115 */ this.statementIdOnServer = creatingStatement.getServerStatementId();\n/* 116 */ this.prepStmt = creatingStatement;\n/* 117 */ this.useBufferRowExplicit = MysqlIO.useBufferRowExplicit(this.metadata);\n/* */ }",
"int insertBatch(List<Basicinfo> list);",
"private void resetCursorToMaxBufferedRowsPlus1() {\n if (cursorPosition > rows.size() + 1) {\n cursorPosition = rows.size() + 1;\n }\n }",
"@Override\n public int[] executeBatch() throws SQLException {\n throw new SQLException(\"tinySQL does not support executeBatch.\");\n }",
"Data<List<Boards>> getFollowersBoardsCursor(String cursor, Integer limit);",
"protected byte[] serializeCursor(int offset, int pageSize, Serializable[] tuple) {\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n try (ObjectOutputStream oos = new ObjectOutputStream(baos)) {\n oos.write(offset);\n oos.write(pageSize);\n oos.writeObject(tuple);\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n return baos.toByteArray();\n }",
"Data<List<Boards>> getSearchBoardsCursor(String query, String cursor);",
"public DbIterator iterator() {\n \tTupleDesc td = generateTupleDesc();\n List<Tuple> tuples = new ArrayList<Tuple>();\n if(gbField == NO_GROUPING){\n \tTuple tuple = new Tuple(td);\n \ttuple.setField(0, new IntField(tupleCounts.get(null)));\n \ttuples.add(tuple);\n } else {\n \tfor(Object key : tupleCounts.keySet()){\n \t\tTuple tuple = new Tuple(td);\n \t\ttuple.setField(0, (Field)key);\n \t\ttuple.setField(1, new IntField(tupleCounts.get(key)));\n \t\ttuples.add(tuple);\n \t}\n }\n return new TupleIterator(td, tuples);\n }",
"@Override\r\n protected TupleBatch fetchNextReady() throws DbException {\r\n final Operator child = getChild();\r\n\r\n if (child.eos()) {\r\n return getResultBatch();\r\n }\r\n\r\n TupleBatch tb = child.nextReady();\r\n while (tb != null) {\r\n for (int row = 0; row < tb.numTuples(); ++row) {\r\n int rowHash = HashUtils.hashSubRow(tb, gfields, row);\r\n IntArrayList hashMatches = groupKeyMap.get(rowHash);\r\n if (hashMatches == null) {\r\n hashMatches = newKey(rowHash);\r\n newGroup(tb, row, hashMatches);\r\n continue;\r\n }\r\n boolean found = false;\r\n for (int i = 0; i < hashMatches.size(); i++) {\r\n int value = hashMatches.get(i);\r\n if (TupleUtils.tupleEquals(tb, gfields, row, groupKeys, grpRange, value)) {\r\n updateGroup(tb, row, aggStates.get(value));\r\n found = true;\r\n break;\r\n }\r\n }\r\n\r\n if (!found) {\r\n newGroup(tb, row, hashMatches);\r\n }\r\n Preconditions.checkState(groupKeys.numTuples() == aggStates.size());\r\n }\r\n tb = child.nextReady();\r\n }\r\n\r\n /*\r\n * We know that child.nextReady() has returned <code>null</code>, so we have processed all tuple we can. Child is\r\n * either EOS or we have to wait for more data.\r\n */\r\n if (child.eos()) {\r\n return getResultBatch();\r\n }\r\n\r\n return null;\r\n }",
"Data<List<Boards>> getSearchBoardsCursor(String query, String cursor, String fields);",
"Data<List<Pins>> getPinsCursor(String cursor, Integer limit, String fields);",
"<H extends ResponseHandler<Result[]>> H nextBatch(H handler);",
"public static QueryableTable processCursors( final int offset, final Enumerable<Object[]> a, final Enumerable<IntString> b ) {\n return new AbstractQueryableTable( Object[].class ) {\n @Override\n public AlgDataType getRowType( AlgDataTypeFactory typeFactory ) {\n return typeFactory.builder()\n .add( \"result\", null, PolyType.INTEGER )\n .build();\n }\n\n\n @Override\n public <T> Queryable<T> asQueryable( DataContext dataContext, SchemaPlus schema, String tableName ) {\n final Enumerable<Integer> enumerable = a.zip( b, ( v0, v1 ) -> ((Integer) v0[1]) + v1.n + offset );\n //noinspection unchecked\n return (Queryable) enumerable.asQueryable();\n }\n };\n }",
"DataBaseReadStream createNewStream(Cursor beginCursor) throws SQLException;",
"public void setFetchSize(int rows) throws SQLException {\n\r\n }",
"public DbIterator iterator() {\n // some code goes here\n ArrayList<Tuple> tuples = new ArrayList<Tuple>();\n for (Field key : m_aggregateData.keySet()) {\n \tTuple nextTuple = new Tuple(m_td);\n \tint recvValue;\n \t\n \tswitch (m_op) {\n \tcase MIN: case MAX: case SUM:\n \t\trecvValue = m_aggregateData.get(key);\n \t\tbreak;\n \tcase COUNT:\n \t\trecvValue = m_count.get(key);\n \t\tbreak;\n \tcase AVG:\n \t\trecvValue = m_aggregateData.get(key) / m_count.get(key);\n \t\tbreak;\n \tdefault:\n \t\trecvValue = setInitData(); // shouldn't reach here\n \t}\n \t\n \tField recvField = new IntField(recvValue);\n \tif (m_gbfield == NO_GROUPING) {\n \t\tnextTuple.setField(0, recvField);\n \t}\n \telse {\n \t\tnextTuple.setField(0, key);\n \t\tnextTuple.setField(1, recvField);\n \t}\n \ttuples.add(nextTuple);\n }\n return new TupleIterator(m_td, tuples);\n }",
"public DbIterator iterator() {\n // some code goes here\n //throw new UnsupportedOperationException(\"please implement me for proj2\");\n List<Tuple> tuparr = new ArrayList<Tuple>();\n Type[] typearr = new Type[]{gbfieldtype, Type.INT_TYPE};\n TupleDesc fortup = new TupleDesc(typearr, new String[]{null, null});\n Object[] keys = groups.keySet().toArray();\n for (int i = 0; i < keys.length; i++) {\n \n int key = (Integer) keys[i];\n \n Tuple tup = new Tuple(fortup);\n if (gbfieldtype == Type.STRING_TYPE) {\n tup.setField(0, hashstr.get(key));\n }\n else {\n tup.setField(0, new IntField(key));\n }\n //tup.setField(0, new IntField(key));\n tup.setField(1, new IntField(groups.get(key)));\n tuparr.add(tup); \n\n }\n List<Tuple> immutable = Collections.unmodifiableList(tuparr);\n TupleIterator tupiter = new TupleIterator(fortup, immutable);\n if (gbfield == NO_GROUPING) {\n List<Tuple> tuparr1 = new ArrayList<Tuple>();\n TupleDesc fortup1 = new TupleDesc(new Type[]{Type.INT_TYPE}, new String[]{null});\n Tuple tup1 = new Tuple(fortup1);\n tup1.setField(0, new IntField(groups.get(-1)));\n tuparr1.add(tup1);\n List<Tuple> immutable1 = Collections.unmodifiableList(tuparr1);\n TupleIterator tupiter1 = new TupleIterator(fortup1, immutable1);\n \n return (DbIterator) tupiter1;\n }\n return (DbIterator) tupiter;\n }",
"private void processResult(String sql, Consumer<ResultSet> resultSetConsumer, final int maxCount, final int fetchSize, final int fetchDirn) throws SQLException {\n processResult(sql, resultSetConsumer, (x) -> x < maxCount, fetchSize, fetchDirn);\n }",
"public Batch(int numtuple) {\n\t\tMAX_SIZE = numtuple;\n\t\tsetTuples(new Vector(MAX_SIZE));\n\t}",
"public FeatureCursor queryFeaturesForChunk(String[] columns, int limit,\n long offset) {\n return queryFeaturesForChunk(columns, getPkColumnName(), limit, offset);\n }",
"public DbIterator iterator() {\n // some code goes here\n if (gbfield == Aggregator.NO_GROUPING) {\n Type[] tp = new Type[1];\n tp[0] = Type.INT_TYPE;\n String[] fn = new String[1];\n fn[0] = aop.toString();\n TupleDesc td = new TupleDesc(tp, fn);\n Tuple t = new Tuple(td);\n t.setField(0, new IntField(gbCount.get(null)));\n ArrayList<Tuple> a = new ArrayList<>();\n a.add(t);\n return new TupleIterator(td, a);\n } else {\n Type[] tp = new Type[2];\n tp[0] = gbfieldtype;\n tp[1] = Type.INT_TYPE;\n String[] fn = new String[2];\n fn[0] = gbname;\n fn[1] = aop.toString();\n TupleDesc td = new TupleDesc(tp, fn);\n ArrayList<Tuple> a = new ArrayList<>();\n for (Field f : gbCount.keySet()) {\n Tuple t = new Tuple(td);\n t.setField(0, f);\n t.setField(1, new IntField(gbCount.get(f)));\n a.add(t);\n }\n return new TupleIterator(td, a);\n }\n }",
"Data<List<Pins>> getSearchPinsCursor(String query, String cursor, Integer limit);",
"public List<RecordReturn> findAllRecordReturns(Integer startResult, Integer maxRows);",
"int batchSize();",
"public FeatureCursor queryFeaturesForChunk(String[] columns,\n Map<String, Object> fieldValues, int limit, long offset) {\n return queryFeaturesForChunk(columns, fieldValues, getPkColumnName(),\n limit, offset);\n }",
"Data<List<Boards>> getFollowersBoardsCursor(String cursor, Integer limit, String fields);",
"public Batch next() {\n\n // exit if all partitions have been tackled\n if (partitionPointer == this.numBuffers-1) {\n return null;\n }\n\n // for each partition, dedup\n TupleReader reader = new TupleReader(getTmpFileName(this.partitionPointer), this.batchsize);\n reader.open(); \n\n Batch[] slots = new Batch[this.numBuffers-1]; \n for (int j=0; j<this.numBuffers-1; j++) {\n // Assumption: no slot overflows during probing\n // TODO: make partition recursive\n slots[j] = new Batch(this.batchsize); \n }\n \n while (!reader.isEOF()) {\n Tuple tup = reader.next(); \n int candidate = this.hashTupleH2(tup)%(this.numBuffers-1); \n if (!(slots[candidate].contains(tup))) {\n slots[candidate].add(tup);\n } \n }\n \n reader.close(); \n\n outbatch = new Batch(batchsize);\n\n for (int i=0; i<this.numBuffers-1; i++) {\n for (int k = 0; k < slots[i].size(); k++) {\n outbatch.add(slots[i].get(k));\n }\n }\n\n partitionPointer++; \n slots = null; \n \n return outbatch;\n }",
"String getCursorLoopStartSql(String name, String cursorSql, DataSet dataSet);",
"private void dbFirstGetNextChunk(SortBy sort) throws ServiceException {\n DbSearchConstraints.Leaf sc = getTopLeafConstraint();\n sc.hasIndexId = Boolean.TRUE;\n\n do {\n // (1) Get the next chunk of results from the DB\n List<DbSearch.Result> dbResults = new ArrayList<DbSearch.Result>();\n dbSearch(dbResults, sort, dbOffset, MAX_HITS_PER_CHUNK);\n\n if (dbResults.size() < MAX_HITS_PER_CHUNK) {\n endOfHits = true;\n }\n\n if (dbResults.size() > 0) {\n dbOffset += dbResults.size();\n\n // (2) for each of the results returned in (1), do a lucene search\n // for \"ORIGINAL-LUCENE-PART AND id:(RESULTS-FROM-1-ABOVE)\"\n try {\n // For each search result, do two things:\n // -- remember the indexId in a hash, so we can find the SearchResult later\n // -- add that indexId to our new booleanquery\n Map<Integer, List<DbSearch.Result>> mailItemToResultsMap = new HashMap<Integer, List<DbSearch.Result>>();\n\n for (DbSearch.Result sr : dbResults) {\n List<DbSearch.Result> results = mailItemToResultsMap.get(sr.getIndexId());\n if (results == null) {\n results = new LinkedList<DbSearch.Result>();\n mailItemToResultsMap.put(sr.getIndexId(), results);\n }\n results.add(sr);\n // add the new query to the mLuceneOp's query\n luceneOp.addFilterClause(new Term(LuceneFields.L_MAILBOX_BLOB_ID,\n String.valueOf(sr.getIndexId())));\n }\n\n boolean hasMore = true;\n\n // we have to get ALL of the lucene hits for these ids. There can very likely be more\n // hits from Lucene then there are DB id's, so we just ask for a large number.\n while (hasMore) {\n luceneChunk = luceneOp.getNextResultsChunk(MAX_HITS_PER_CHUNK);\n Set<Integer> indexIds = luceneChunk.getIndexIds();\n if (indexIds.size() < MAX_HITS_PER_CHUNK) {\n hasMore = false;\n }\n for (int indexId : indexIds) {\n List<DbSearch.Result> results = mailItemToResultsMap.get(indexId);\n if (results != null) {\n for (DbSearch.Result sr : results) {\n dbHits.add(sr);\n }\n } else {\n ZmailLog.search.warn(\"Lucene returned item ID %d but wasn't in resultMap\", indexId);\n throw ServiceException.FAILURE(\n \"Inconsistent DB/Index query results: Text Index returned item ID \" +\n indexId + \" but wasn't in resultMap\", null);\n }\n }\n }\n } finally {\n luceneOp.clearFilterClause();\n }\n }\n\n } while (dbHits.size() ==0 && !endOfHits);\n }",
"protected List<Long> getMoreIds(int requestSize) {\n\n String sql = getSql(requestSize);\n\n Connection connection = null;\n PreparedStatement statement = null;\n ResultSet resultSet = null;\n try {\n connection = dataSource.getConnection();\n\n statement = connection.prepareStatement(sql);\n resultSet = statement.executeQuery();\n\n List<Long> newIds = readIds(resultSet, requestSize);\n if (newIds.isEmpty()) {\n throw new PersistenceException(\"Always expecting more than 1 row from \" + sql);\n }\n\n return newIds;\n\n } catch (SQLException e) {\n if (e.getMessage().contains(\"Database is already closed\")) {\n String msg = \"Error getting SEQ when DB shutting down \" + e.getMessage();\n log.log(ERROR, msg);\n System.out.println(msg);\n return Collections.emptyList();\n } else {\n throw new PersistenceException(\"Error getting sequence nextval\", e);\n }\n } finally {\n closeResources(connection, statement, resultSet);\n }\n }",
"public FeatureCursor queryFeaturesForChunk(String[] columns,\n BoundingBox boundingBox, Projection projection,\n Map<String, Object> fieldValues, int limit, long offset) {\n return queryFeaturesForChunk(columns, boundingBox, projection,\n fieldValues, getPkColumnName(), limit, offset);\n }",
"Data<List<Pins>> getLikeCursor(String cursor, Integer limit);",
"public FeatureCursor queryFeaturesForChunk(String[] columns,\n BoundingBox boundingBox, Projection projection, int limit,\n long offset) {\n return queryFeaturesForChunk(columns, boundingBox, projection,\n getPkColumnName(), limit, offset);\n }",
"@Override\n protected List<WriteStatus> computeNext() {\n BoundedInMemoryExecutor<HoodieRecord<T>, HoodieInsertValueGenResult<HoodieRecord>, List<WriteStatus>> bufferedIteratorExecutor =\n null;\n try {\n final Schema schema = new Schema.Parser().parse(hoodieConfig.getSchema());\n bufferedIteratorExecutor =\n new SparkBoundedInMemoryExecutor<>(hoodieConfig, inputItr, getInsertHandler(), getTransformFunction(schema));\n final List<WriteStatus> result = bufferedIteratorExecutor.execute();\n assert result != null && !result.isEmpty() && !bufferedIteratorExecutor.isRemaining();\n return result;\n } catch (Exception e) {\n throw new HoodieException(e);\n } finally {\n if (null != bufferedIteratorExecutor) {\n bufferedIteratorExecutor.shutdownNow();\n }\n }\n }",
"ListIter (int index){\n int blockNum=0;\n int aggSize=0;\n while (aggSize+dataBlocks[blockNum].getSize() <= index){\n aggSize+=dataBlocks[blockNum].getSize();\n blockNum++;\n }\n cursorBlock = blockNum;\n cursorElement = index-aggSize;\n cursor = index;\n }",
"public AllByRowsIterator() {\n\t\t\tsuper();\n\t\t\tlastIndex = numCols * numRows;\n\t\t}",
"void setFirstResult(int offset);",
"public FeatureCursor queryFeaturesForChunk(boolean distinct,\n String[] columns, BoundingBox boundingBox, Projection projection,\n Map<String, Object> fieldValues, int limit, long offset) {\n return queryFeaturesForChunk(distinct, columns, boundingBox, projection,\n fieldValues, getPkColumnName(), limit, offset);\n }",
"public FeatureCursor queryFeaturesForChunk(GeometryEnvelope envelope,\n int limit, long offset) {\n return queryFeaturesForChunk(envelope, getPkColumnName(), limit,\n offset);\n }",
"public void setResultCursor() {\r\n getParameterTypes().set(0, OUT_CURSOR); \r\n setIsCursorOutputProcedure(!hasOutputCursors());\r\n setIsMultipleCursorOutputProcedure(hasOutputCursors());\r\n }",
"public FeatureCursor queryFeaturesForChunk(int limit, long offset) {\n return queryFeaturesForChunk(getPkColumnName(), limit, offset);\n }",
"@Override\n protected Iterator<? extends Map<String, AttributeValue>> nextIterator(final int count) {\n if (count == 1) {\n return currentResult.getItems().iterator();\n }\n // subsequent chained iterators will be obtained from dynamoDB\n // pagination\n if ((currentResult.getLastEvaluatedKey() == null)\n || currentResult.getLastEvaluatedKey().isEmpty()) {\n return null;\n } else {\n request.setExclusiveStartKey(currentResult.getLastEvaluatedKey());\n currentResult = dynamoDBClient.query(request);\n return currentResult.getItems().iterator();\n }\n }",
"public FeatureCursor queryFeaturesForChunk(String[] columns,\n GeometryEnvelope envelope, int limit, long offset) {\n return queryFeaturesForChunk(columns, envelope, getPkColumnName(),\n limit, offset);\n }",
"public FeatureCursor queryFeaturesForChunk(boolean distinct,\n String[] columns, BoundingBox boundingBox, Projection projection,\n int limit, long offset) {\n return queryFeaturesForChunk(distinct, columns, boundingBox, projection,\n getPkColumnName(), limit, offset);\n }",
"private void collectResultSet(Cursor cursor, ArrayList<String> result_list) {\n\n\t\t//\n\t\t// are there any data sets\n\t\t//\n\t\tif (!cursor.moveToFirst())\n\t\t\treturn;\n\n\t\t//\n\t\t// add the result\n\t\t//\n\t\tdo {\n\t\t\tresult_list.add(cursor.getString(0));\n\t\t} while (cursor.moveToNext());\n\t}",
"protected abstract List<Long> readIds(ResultSet resultSet, int loadSize) throws SQLException;",
"public FeatureCursor queryFeaturesForChunk(\n Map<String, Object> fieldValues, int limit, long offset) {\n return queryFeaturesForChunk(fieldValues, getPkColumnName(), limit,\n offset);\n }",
"public List<Lot> getAllLots(int start, int numOfRows) throws MiddlewareQueryException;",
"@SuppressLint(\"NewApi\")\n private ObjectNode getRowsResultFromQuery(Cursor cur) {\n ObjectNode rowsResult = objectMapper.createObjectNode();\n\n ArrayNode rowsArrayResult = rowsResult.putArray(\"rows\");\n\n if (cur.moveToFirst()) {\n // query result has rows\n int colCount = cur.getColumnCount();\n \n // Build up JSON result object for each row\n do {\n ObjectNode row = objectMapper.createObjectNode();\n for (int i = 0; i < colCount; ++i) {\n String key = cur.getColumnName(i);\n \n // for old Android SDK remove lines from HERE:\n if (android.os.Build.VERSION.SDK_INT >= 11) {\n putValueBasedOnType(cur, row, key, i);\n // to HERE.\n } else {\n row.put(key, cur.getString(i));\n }\n }\n \n rowsArrayResult.add(row);\n \n } while (cur.moveToNext());\n }\n\n return rowsResult;\n }",
"@GuardedBy(\"this\")\n private Cursor createMergedCursor() {\n try {\n final boolean hasNewCalls = mNewCallsCursor.getCount() != 0;\n final boolean hasOldCalls = mOldCallsCursor.getCount() != 0;\n \n if (!hasNewCalls) {\n // Return only the old calls, without the header.\n MoreCloseables.closeQuietly(mNewCallsCursor);\n return mOldCallsCursor;\n }\n \n if (!hasOldCalls) {\n // Return only the new calls.\n MoreCloseables.closeQuietly(mOldCallsCursor);\n return new MergeCursor(\n new Cursor[]{ createNewCallsHeaderCursor(), mNewCallsCursor });\n }\n \n return new MergeCursor(new Cursor[]{\n createNewCallsHeaderCursor(), mNewCallsCursor,\n createOldCallsHeaderCursor(), mOldCallsCursor});\n } finally {\n // Any cursor still open is now owned, directly or indirectly, by the caller.\n mNewCallsCursor = null;\n mOldCallsCursor = null;\n }\n }",
"void insertBatch(List<TABLE41> recordLst);",
"private void batchExecution(List<String[]> rowBatch, int columnCount, int[] mapcols, String chunkId, int noOfChunks,\n int maxRetryCount, int retryTimeout) throws SQLException {\n int k = 0; //retry count\n boolean retry = false;\n int rowBatchSize = rowBatch.size();\n do {\n k++;\n try {\n if (connection == null || connection.isClosed()) {\n getJdbcConnection(maxRetryCount, retryTimeout);\n }\n if (preparedStatement == null || preparedStatement.isClosed()) {\n preparedStatement = connection.prepareStatement(jdbcConfig.getJdbcQuery(),\n ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);\n }\n for (int i = 0; i < rowBatchSize; i++) {\n psLineEndWithSeparator(mapcols, columnCount, rowBatch.get(i));\n preparedStatement.addBatch();\n }\n // ++batch_no;\n executeBatch(rowBatchSize, maxRetryCount, retryTimeout);\n batch_records = 0;\n k = 0;\n retry = false;\n datarowstransferred = datarowstransferred + update;\n update = 0;\n not_update = 0;\n } catch (AnaplanRetryableException ae) {\n retry = true;\n }\n } while (k < maxRetryCount && retry);\n // not successful\n if (retry) {\n throw new AnaplanAPIException(\"Could not connect to the database after \" + maxRetryCount + \" retries\");\n }\n }",
"@Override\n\tpublic Row next(){\n\t\treturn res;\n\t}",
"void addBatch() throws SQLException;",
"private ResultBatch queryBatchPrepared(String statementName,\n FieldFormatRef[] paramFormats, ByteBuf[] paramBuffers,\n ResultField[] resultFields, long timeout) throws IOException {\n\n ExecuteResult handler = new ExecuteResult(resultFields);\n\n serverConnection.getRequestExecutor()\n .execute(null, statementName, paramFormats, paramBuffers, resultFields, 0, handler);\n\n handler.await(timeout, MILLISECONDS);\n\n return handler.getBatch();\n }",
"private Artista loadNext(ResultSet resultSet)\r\n\t\t\tthrows SQLException {\n\t\tint i = 1;\r\n\t\tLong codArtista = resultSet.getLong(i++);\t \r\n\t\tString nomeArtista = resultSet.getString(i++);\r\n\r\n\t\t// Rellena el objeto\r\n\t\tArtista a = new Artista();\r\n\t\ta.setCodArtista(codArtista);\r\n\t\ta.setNomeArtista(nomeArtista);\r\n\t\treturn a;\r\n\t}",
"@Generated\n @Selector(\"fetchBatchSize\")\n @NUInt\n public native long fetchBatchSize();",
"@Override\n protected Cursor buildCursor() {\n return(db.getReadableDatabase().rawQuery(rawQuery, args));\n }",
"public FeatureCursor queryFeaturesForChunk(GeometryEnvelope envelope,\n Map<String, Object> fieldValues, int limit, long offset) {\n return queryFeaturesForChunk(envelope, fieldValues, getPkColumnName(),\n limit, offset);\n }",
"List<String[]> consumeQueryResult(ExecutionContext context, int startRow, int endRow) throws ExecutorException;",
"public FeatureCursor queryFeaturesForChunk(String[] columns,\n GeometryEnvelope envelope, Map<String, Object> fieldValues,\n int limit, long offset) {\n return queryFeaturesForChunk(columns, envelope, fieldValues,\n getPkColumnName(), limit, offset);\n }",
"Data<List<Pins>> getSearchPinsCursor(String query, String cursor, Integer limit, String fields);",
"public void setFirstResult(int begin) {\n\r\n\t}",
"protected void appendSelectRange(SQLBuffer buf, long start, long end) {\n buf.append(\" FETCH FIRST \").append(Long.toString(end)).\r\n append(\" ROWS ONLY\");\r\n }",
"public interface CursorModel {\n boolean hasMore();\n}",
"public void cursorOn();",
"public FeatureCursor queryFeaturesForChunk(String[] columns,\n BoundingBox boundingBox, int limit, long offset) {\n return queryFeaturesForChunk(columns, boundingBox, getPkColumnName(),\n limit, offset);\n }",
"Data<List<User>> getfollowingUsersCursor(String cursor, Integer limit);",
"public FeatureCursor queryFeaturesForChunk(BoundingBox boundingBox,\n Projection projection, int limit, long offset) {\n return queryFeaturesForChunk(boundingBox, projection, getPkColumnName(),\n limit, offset);\n }",
"@Override\n public Iterator<NFetchMode> iterator() {\n return Arrays.asList(all).iterator();\n }",
"public void prepareCursorSelectAllRows() {\n setCallFromStatement();\n // The statement is no longer require so can be released.\n clearStatement();\n\n super.prepareCursorSelectAllRows();\n }",
"public FeatureCursor queryFeaturesForChunk(String[] columns,\n String where, String[] whereArgs, int limit, long offset) {\n return queryFeaturesForChunk(columns, where, whereArgs,\n getPkColumnName(), limit, offset);\n }"
] | [
"0.6362847",
"0.6227794",
"0.6123314",
"0.6031825",
"0.6004282",
"0.59581715",
"0.57572895",
"0.5666443",
"0.566261",
"0.56387955",
"0.56340957",
"0.56116587",
"0.55920005",
"0.55785185",
"0.55530477",
"0.55111635",
"0.55066663",
"0.5486087",
"0.5469905",
"0.5447607",
"0.53838027",
"0.5352207",
"0.53514796",
"0.534535",
"0.5341144",
"0.5335893",
"0.5325143",
"0.53160936",
"0.52998847",
"0.528712",
"0.52543634",
"0.5247233",
"0.524324",
"0.52416074",
"0.523679",
"0.5215237",
"0.52072734",
"0.52035815",
"0.5180194",
"0.5180163",
"0.51782995",
"0.5157582",
"0.5153637",
"0.5152969",
"0.51396203",
"0.5123285",
"0.5106713",
"0.5103252",
"0.51023996",
"0.50947475",
"0.5089945",
"0.5086727",
"0.50796884",
"0.50759643",
"0.5067472",
"0.5054907",
"0.50509363",
"0.504646",
"0.5041016",
"0.5036541",
"0.5035427",
"0.5030946",
"0.5022736",
"0.5008493",
"0.500437",
"0.49846452",
"0.4973914",
"0.49697632",
"0.49688828",
"0.49685252",
"0.49684668",
"0.49673244",
"0.49662718",
"0.49653575",
"0.49624893",
"0.4951082",
"0.4948256",
"0.49463648",
"0.49462467",
"0.4946233",
"0.4943357",
"0.4942862",
"0.4937",
"0.49353158",
"0.49349898",
"0.49342465",
"0.49327576",
"0.4930386",
"0.49298212",
"0.49293175",
"0.49269438",
"0.49261782",
"0.49196216",
"0.49170363",
"0.49005157",
"0.4899379",
"0.48966274",
"0.48955536",
"0.48891905",
"0.4889032"
] | 0.5841132 | 6 |
constructors Construct the ObservableHashMap. | public ObservableHashMap()
{
super();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public MyHashMap() {\n\n }",
"public MyHashMap() {\n\n }",
"public MyHashMap() {\n map = new HashMap();\n }",
"public TimeMap2() {\n map = new HashMap<>();\n }",
"public OwnMap() {\n super();\n keySet = new OwnSet();\n }",
"public MyHashMap() {\n hashMap = new ArrayList<>();\n }",
"public CjtMap(){\r\n cjtMap = new TreeMap();\r\n sequence = new Sequence(1, 0, 1, false);\r\n }",
"private static <K, V> Map<K, V> newHashMap() {\n return new HashMap<K, V>();\n }",
"public ScopedMap() {\n\t\tmap = new ArrayList<HashMap<K, V>>();\n\n\t}",
"public Q706DesignHashMap() {\n keys = new ArrayList<>();\n values = new ArrayList<>();\n\n }",
"public ArrayHashMap() {\n super();\n }",
"public TimeMap() {\n timeMap = new HashMap<>();\n }",
"public TimeMap() {\n hashMap = new HashMap<String, List<Data>>();\n }",
"public ObservableHashMap(int cInitialBuckets, float flLoadFactor, float flGrowthRate)\n {\n super(cInitialBuckets, flLoadFactor, flGrowthRate);\n }",
"public HashEntityMap()\n\t\t{\n\t\t\tmapNameToValue = new HashMap<String, Integer>();\n\t\t}",
"public MyHashMap() {\n\t\tthis(INIT_CAPACITY);\n\t}",
"public CountingMap() {\n this( new HashMap<K, Integer>() );\n }",
"public Hashtable<String,Stock> createMap(){\n\tHashtable table = new Hashtable<String, Stock>();\n\treturn table;\n}",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic HashMap()\r\n\t{\r\n\t\ttable = new MapEntry[7];\r\n\t\tcount = 0;\r\n\t\tmaxCount = table.length - table.length/3;\r\n\t\tDUMMY = new MapEntry<>(null, null);\r\n\t}",
"public Map() {\n\n\t\t}",
"public HashMap(){\n\t\tthis.numOfBins=10;\n\t\tthis.size=0;\n\t\tinitializeMap();\n\t}",
"public static <K, V> HashMap<K, V> initHashMap() {\n\t\treturn new HashMap<K, V>();\n\t}",
"public MagicDictionary() {\n this.map = new HashMap<>();\n }",
"public FactoryMapImpl()\n {\n super();\n }",
"public MyHashMap() {\r\n data = new Node[DEFAULT_CAPACITY];\r\n }",
"protected MapImpl() {\n }",
"public Observable()\n {\n observers = new HashSet<>();\n }",
"public MapBuilder() {\r\n map = new Map();\r\n json = new Gson();\r\n }",
"public IntObjectHashMap() {\n resetToDefault();\n }",
"public MyHashMap() {\n keys = new MapNode[n];\n vals = new MapNode[n];\n for (int i=0; i < n ; ++i) {\n keys[i] = new MapNode();\n vals[i] = new MapNode();\n }\n }",
"void setHashMap();",
"private DependencyManager(Map<TypedKey<?>, Object> inputs)\n\t{\n\t\tmap.putAll(inputs);\n\t}",
"private static <K, V> Map<K, V> newConcurrentHashMap() {\n return new ConcurrentHashMap<K, V>();\n }",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic HashTableMap() {\r\n\t\tK = new LinkedList[10];\r\n\t\tV = new LinkedList[10];\r\n\t}",
"@Override\n public Map makeMap() {\n Map<Integer,String> testMap = new HashingMap<>();\n return testMap;\n }",
"public void initMap() {\n\t\tmap = new Map();\n\t\tmap.clear();\n\t\tphase = new Phase();\n\t\tmap.setPhase(phase);\n\t\tmapView = new MapView();\n\t\tphaseView = new PhaseView();\n\t\tworldDomiView = new WorldDominationView();\n\t\tcardExchangeView = new CardExchangeView();\n\t\tphase.addObserver(phaseView);\n\t\tphase.addObserver(cardExchangeView);\n\t\tmap.addObserver(worldDomiView);\n\t\tmap.addObserver(mapView);\n\t}",
"public ConnectedMap() {\n }",
"public OmaHashMap() {\n this.values = new OmaLista[32];\n this.numberOfValues = 0;\n }",
"protected Map<E, ListenerEntry<? extends E>> createMap() {\n\t\treturn new WeakHashMap<>();\n\t}",
"public HashMapStack()\n {\n this.hashMap = new HashMap<>();\n }",
"public Map() {\n\t\t//intially empty\n\t}",
"protected SafeHashMap.Entry<K, V> instantiateEntry()\n {\n return new Entry<>();\n }",
"public MagicDictionary() {\n\n }",
"MAP createMAP();",
"IcedHM() { _m = new NonBlockingHashMap<>(); }",
"public RBTMap() {\n RBT = new TreeMap<K,V>();\n \n }",
"public Map initMap(){\n\t\tif (map == null){\n\t\t\tmap = createMap();\n\t\t}\n\t\treturn map;\n\t}",
"@SuppressWarnings(\"unused\")\n private MyPropertiesMapEntry() {\n this.key = null;\n this.value = null;\n }",
"private void initMaps()\r\n\t{\r\n\t\tenergiesForCurrentKOppParity = new LinkedHashMap<Integer, Double>();\r\n\t\tinputBranchWithJ = new LinkedHashMap<Integer, Double>();\r\n\t\tassociatedR = new LinkedHashMap<Integer, Double>();\r\n\t\tassociatedP = new LinkedHashMap<Integer, Double>();\r\n\t\tassociatedQ = new LinkedHashMap<Integer, Double>();\r\n\t\ttriangularP = new LinkedHashMap<Integer, Double>();\r\n\t\ttriangularQ = new LinkedHashMap<Integer, Double>();\r\n\t\ttriangularR = new LinkedHashMap<Integer, Double>();\r\n\t\tupperEnergyValuesWithJ = new LinkedHashMap<Integer, Double>();\r\n\t}",
"public abstract void createMap();",
"public HashMapValueComparator(Map<Object, Object> m){\n\t\tsuper();\n\t\tthis.map = m;\n\t}",
"public static MapObject createMapObject(){\n\t\treturn new MapObject();\n\t}",
"protected SafeHashMap.Entry instantiateEntry()\n {\n return new Entry();\n }",
"public DescriptorCacheImpl() {\n super();\n \n LOG2.debug(\"New instance!\");\n \n _typeMap = new HashMap();\n _xmlNameMap = new HashMap();\n _missingTypes = new ArrayList();\n }",
"public HashMapValueComparator() {\n\t\tsuper();\n\t}",
"public MyHashMap() {\r\n\t\tloadFactor = DEFAULT_LOAD_FACTOR;\r\n\t\tcapacity = DEFAULT_CAPACITY;\r\n\t\thashMapArray = new LinkedList[capacity];\r\n\t}",
"@Test\n public void hashMapInitialised()\n {\n Map<Integer, String> strings = MapUtil.<Integer, String>hashMap().keyValue(1, \"Me\").keyValue(2, \"You\");\n // Is this really better than calling strings.put(..)?\n\n assertEquals(\"You\", strings.get(2));\n }",
"public StrStrMap() {\n }",
"public MyHashMap() {\n map = new ArrayList<>();\n for (int i = 0;i<255;i++)\n map.add(new Entry());\n }",
"public TimeMap() {\n\n }",
"public MultiKeyMap() {\n this.map = new java.util.HashMap<String,V>();\n return;\n }",
"public Twitter() {\n map = new HashMap<>();\n }",
"public TreeDictionary() {\n\t\t\n\t}",
"@Contract(value = \" -> new\", pure = true)\n @Nonnull\n public static <K, V> Map<K, V> createSoftMap() {\n return Maps.newSoftHashMap();\n }",
"public AgentBuilderDictionary(Map m) {\n\t\tsuper(m);\n\t}",
"public OwnMap(int capacity) {\n super(capacity);\n keySet = new OwnSet();\n }",
"protected WumpusMap() {\n\t\t\n\t}",
"public TestBinaryCacheStore(ObservableMap mapStorage)\n {\n super(mapStorage);\n }",
"public static <T, K> ConcurrentHashMap<T, K> createConcurrentHashMap() {\n \t\treturn new ConcurrentHashMap<T, K>();\n \t}",
"private static void initializeMaps()\n\t{\n\t\taddedPoints = new HashMap<String,String[][][]>();\n\t\tpopulatedList = new HashMap<String,Boolean>();\n\t\tloadedAndGenerated = new HashMap<String,Boolean>();\n\t}",
"public AttributeMap()\r\n\t{\r\n\t\tsuper();\r\n\t}",
"protected Map createPropertiesMap() {\n return new HashMap();\n }",
"public MyHashMap() {\n this.key_space = 2069;\n this.hash_table = new ArrayList<Bucket>();\n for (int i = 0; i < this.key_space; ++i) {\n this.hash_table.add(new Bucket());\n }\n }",
"public CompactHashMap() {\n\t\tthis(INITIAL_SIZE);\n\t}",
"private InfoTable(Map<Integer, Vehicle> vehiclesDic) {\n\t\t\n\t\t//Set Vehicles dictionaries\n\t\tthis.vehiclesDic = vehiclesDic;\n\t\t\n\t\t// initialize Dictionary for info table\n\t\ttableDic = new ConcurrentHashMap<Integer, Object[]>();\n\t}",
"MyHashMap(int initialCapacity) {\r\n data = new Node[initialCapacity];\r\n }",
"public void method_9396() {\r\n super();\r\n this.field_8914 = Maps.newConcurrentMap();\r\n }",
"@Override\n public void create() {\n theMap = new ObjectSet<>(2048, 0.5f);\n generate();\n }",
"public StockRoom()\n\t{\n\t\tstorage = new HashMap<String, Object>();\n\t}",
"public static <K, V> MapBuilder<HashMap<K, V>, K, V> hashMap()\n {\n return new MapBuilder<HashMap<K, V>, K, V>(new HashMap<K, V>());\n }",
"private DataCache() {\n this.people = new HashMap<>();\n this.events = new HashMap<>();\n this.personEvents = new HashMap<>();\n this.currentPersonEvents = new HashMap<>();\n this.eventTypes = new ArrayList<>();\n this.childrenMap = new HashMap<>();\n this.maleSpouse = new HashSet<>();\n this.femaleSpouse = new HashSet<>();\n this.paternalAncestorsMales = new HashSet<>();\n this.paternalAncestorsFemales = new HashSet<>();\n this.maternalAncestorsMales = new HashSet<>();\n this.maternalAncestorsFemales = new HashSet<>();\n }",
"public GenericDomainObject() {\n\tkeys = new LinkedHashMap<String, Object>();\n\tattributes = new LinkedHashMap<String, Object>();\n }",
"private Map(int id) {\n\t\tthis.id = Integer.valueOf(id);\n\t\tSystem.out.println(\"Initializing map: \" + this.toString() + \" (\" + this.id + \")\");\n\t}",
"private MapTransformer(Map map) {\n super();\n iMap = map;\n }",
"public HashMap() {\n this.capacity = 100;\n this.hashMap = new LinkedList[capacity];\n }",
"public Model() {\n\t\tthis.map = new Map(37, 23);\n\t}",
"public HashMap(Map<? extends K,? extends V> map) {\r\n\t\tthis();\r\n\t\tthis.putAll(map);\r\n\t}",
"public void createHashMap() {\n myList = new HashMap<>();\n scrabbleList = new HashMap<>();\n }",
"public JSONNode() {\n map = new HashMap<>();\n }",
"public MyHashMap() {\n array = new TreeNode[1024];\n\n }",
"void initCaches(Map<EObject, String> eObjectToIdMap, Map<String, EObject> idToEObjectMap);",
"public DictionaryAdapter(Map<String,String> dict) {\n mData = new ArrayList();\n mData.addAll(dict.entrySet());\n }",
"public SimpleDataStore () {\n\t\tmessageMap = new HashMap<String , List<Message>>() ;\n\t}",
"public AbstractIntHashMap() {\n this(DEFAULT_CAPACITY, DEFAULT_LOADFACTOR);\n }",
"@Override\n public void init(HashMap<String, Object> map) {\n this.title = (String) map.get(\"title\");\n this.url = (String) map.get(\"url\");\n }",
"public CitiesMap(){\r\n\t\tmap=new Graph<City>();\r\n\t}",
"public ArrayMap() {\n this(DEFAULT_INITIAL_CAPACITY);\n }",
"@PostConstruct\n public void initCache() {\n cache = Collections.synchronizedMap(new HashMap<>(cacheCapacity, 1));\n }",
"public BasePresenter() {\n if (sHashMaps == null) {\n sHashMaps = new LinkedList<>();\n }\n }",
"public PurchaseHistory() {\n this.purchaseHistory = new HashMap<>();\n }"
] | [
"0.7098961",
"0.70490575",
"0.7047082",
"0.6729185",
"0.6596694",
"0.65026563",
"0.6468164",
"0.6461102",
"0.6450804",
"0.6446489",
"0.6441768",
"0.6430716",
"0.6408592",
"0.6316406",
"0.63020545",
"0.629755",
"0.6291719",
"0.6281322",
"0.6276204",
"0.6270558",
"0.6258586",
"0.6251439",
"0.6217103",
"0.62046707",
"0.61513317",
"0.6133235",
"0.6113316",
"0.610308",
"0.6098451",
"0.6080093",
"0.60741985",
"0.6071646",
"0.60578614",
"0.60481894",
"0.6012089",
"0.6011324",
"0.6002767",
"0.5971754",
"0.5960782",
"0.59570414",
"0.59204406",
"0.59103554",
"0.5895916",
"0.58927345",
"0.5885936",
"0.58841807",
"0.5879375",
"0.5870112",
"0.5851135",
"0.5844815",
"0.5844494",
"0.5841153",
"0.58223134",
"0.581454",
"0.5814401",
"0.58010954",
"0.57949936",
"0.5781059",
"0.5771621",
"0.57583046",
"0.57566136",
"0.5752468",
"0.5744502",
"0.57425916",
"0.57404125",
"0.573384",
"0.57065165",
"0.5696738",
"0.5692291",
"0.5686326",
"0.56739634",
"0.5672152",
"0.5670148",
"0.5668135",
"0.56640726",
"0.5663825",
"0.5660493",
"0.56510365",
"0.5632259",
"0.5621169",
"0.5617037",
"0.5614432",
"0.5614021",
"0.5612316",
"0.56119704",
"0.5603142",
"0.55893445",
"0.55878204",
"0.55871856",
"0.5563018",
"0.55509853",
"0.55490637",
"0.5548867",
"0.5544765",
"0.5542208",
"0.5537408",
"0.5534127",
"0.5530733",
"0.55275273",
"0.55221903"
] | 0.8671729 | 0 |
Construct an ObservableHashMap using the specified settings. | public ObservableHashMap(int cInitialBuckets, float flLoadFactor, float flGrowthRate)
{
super(cInitialBuckets, flLoadFactor, flGrowthRate);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public ObservableHashMap()\n {\n super();\n }",
"@Override\n public Map makeMap() {\n Map<Integer,String> testMap = new HashingMap<>();\n return testMap;\n }",
"void setHashMap();",
"private static <K, V> Map<K, V> newHashMap() {\n return new HashMap<K, V>();\n }",
"public MyHashMap() {\n map = new HashMap();\n }",
"protected Map createPropertiesMap() {\n return new HashMap();\n }",
"public static <K, V> HashMap<K, V> initHashMap() {\n\t\treturn new HashMap<K, V>();\n\t}",
"public ScopedMap() {\n\t\tmap = new ArrayList<HashMap<K, V>>();\n\n\t}",
"private void setUpHashMap(int number)\n {\n switch (number)\n {\n case 1:\n {\n this.hourly.put(\"Today\",new ArrayList<HourlyForecast>());\n break;\n }\n case 2:\n {\n this.hourly.put(\"Today\",new ArrayList<HourlyForecast>());\n this.hourly.put(\"Tomorrow\", new ArrayList<HourlyForecast>());\n break;\n }\n case 3:\n {\n this.hourly.put(\"Today\", new ArrayList<HourlyForecast>());\n this.hourly.put(\"Tomorrow\", new ArrayList<HourlyForecast>());\n this.hourly.put(\"Day After Tomorrow\", new ArrayList<HourlyForecast>());\n break;\n }default:\n break;\n }\n }",
"public static <K, V> MapBuilder<HashMap<K, V>, K, V> hashMap()\n {\n return new MapBuilder<HashMap<K, V>, K, V>(new HashMap<K, V>());\n }",
"@Contract(value = \" -> new\", pure = true)\n @Nonnull\n public static <K, V> Map<K, V> createSoftMap() {\n return Maps.newSoftHashMap();\n }",
"private static Map<String, PropertyInfo> createPropertyMap()\r\n {\r\n Map<String, PropertyInfo> map = New.map();\r\n PropertyInfo samplingTime = new PropertyInfo(\"http://www.opengis.net/def/property/OGC/0/SamplingTime\", Date.class,\r\n TimeKey.DEFAULT);\r\n PropertyInfo lat = new PropertyInfo(\"http://sensorml.com/ont/swe/property/Latitude\", Float.class, LatitudeKey.DEFAULT);\r\n PropertyInfo lon = new PropertyInfo(\"http://sensorml.com/ont/swe/property/Longitude\", Float.class, LongitudeKey.DEFAULT);\r\n PropertyInfo alt = new PropertyInfo(\"http://sensorml.com/ont/swe/property/Altitude\", Float.class, AltitudeKey.DEFAULT);\r\n map.put(samplingTime.getProperty(), samplingTime);\r\n map.put(lat.getProperty(), lat);\r\n map.put(lon.getProperty(), lon);\r\n map.put(alt.getProperty(), alt);\r\n map.put(\"lat\", lat);\r\n map.put(\"lon\", lon);\r\n map.put(\"alt\", alt);\r\n return Collections.unmodifiableMap(map);\r\n }",
"public MapBuilder() {\r\n map = new Map();\r\n json = new Gson();\r\n }",
"protected Map<E, ListenerEntry<? extends E>> createMap() {\n\t\treturn new WeakHashMap<>();\n\t}",
"@Test\n public void hashMapInitialised()\n {\n Map<Integer, String> strings = MapUtil.<Integer, String>hashMap().keyValue(1, \"Me\").keyValue(2, \"You\");\n // Is this really better than calling strings.put(..)?\n\n assertEquals(\"You\", strings.get(2));\n }",
"@Contract(value = \" -> new\", pure = true)\n @Nonnull\n public static <K, V> Map<K, V> createSoftValueMap() {\n return new SoftValueHashMap<>(canonicalStrategy());\n }",
"public GameMapHashMap() {\n HashMap<String, HashMap<String, String>> temporaryMap = new HashMap<>();\n instantiateIndividualRooms();\n\n temporaryMap.put(\"Atrium\", atrium);\n temporaryMap.put(\"Breakfast Nook\", breakfastNook);\n temporaryMap.put(\"Menagerie\", menagerie);\n temporaryMap.put(\"Conservatory\", conservatory);\n temporaryMap.put(\"Panic Room\", panicRoom);\n\n temporaryMap.put(\"Fire Swamps\", fireSwamps);\n temporaryMap.put(\"Hall\", hall);\n temporaryMap.put(\"Dining Room\", diningRoom);\n temporaryMap.put(\"Arcade\", arcade);\n temporaryMap.put(\"Observatory\", observatory);\n\n temporaryMap.put(\"Courtyard\", courtyard);\n temporaryMap.put(\"Library\", library);\n temporaryMap.put(\"Garden\", garden);\n temporaryMap.put(\"Laboratory\", laboratory);\n temporaryMap.put(\"Kitchen\", kitchen);\n\n rooms = Collections.unmodifiableMap(temporaryMap);\n }",
"public MyHashMap() {\n\n }",
"public static <T, K, V> Observable<Map<K, V>> toMap(\r\n\t\t\tfinal Observable<? extends T> source,\r\n\t\t\tfinal Func1<? super T, ? extends K> keySelector,\r\n\t\t\tfinal Func1<? super T, ? extends V> valueSelector\r\n\t) {\r\n\t\treturn new Observable<Map<K, V>>() {\r\n\t\t\t@Override\r\n\t\t\t@Nonnull \r\n\t\t\tpublic Closeable register(@Nonnull final Observer<? super Map<K, V>> observer) {\r\n\t\t\t\treturn source.register(new Observer<T>() {\r\n\t\t\t\t\t/** The map. */\r\n\t\t\t\t\tfinal Map<K, V> map = new HashMap<K, V>();\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void error(@Nonnull Throwable ex) {\r\n\t\t\t\t\t\tobserver.error(ex);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void finish() {\r\n\t\t\t\t\t\tobserver.next(map);\r\n\t\t\t\t\t\tobserver.finish();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void next(T value) {\r\n\t\t\t\t\t\tmap.put(keySelector.invoke(value), valueSelector.invoke(value));\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}",
"@Contract(value = \" -> new\", pure = true)\n @Nonnull\n @Deprecated\n public static <K, V> Map<K, V> createWeakMap() {\n return Maps.newWeakHashMap(4);\n }",
"public static <T, K, V> Observable<Map<K, V>> toMap(\r\n\t\t\tfinal Observable<? extends T> source,\r\n\t\t\tfinal Func1<? super T, ? extends K> keySelector,\r\n\t\t\tfinal Func1<? super T, ? extends V> valueSelector,\r\n\t\t\tfinal Func2<? super K, ? super K, Boolean> keyComparer\r\n\t) {\r\n\t\treturn new Observable<Map<K, V>>() {\r\n\t\t\t@Override\r\n\t\t\t@Nonnull \r\n\t\t\tpublic Closeable register(@Nonnull final Observer<? super Map<K, V>> observer) {\r\n\t\t\t\treturn source.register(new Observer<T>() {\r\n\t\t\t\t\t/** The key class with custom equality comparer. */\r\n\t\t\t\t\tclass Key {\r\n\t\t\t\t\t\t/** The key value. */\r\n\t\t\t\t\t\tfinal K key;\r\n\t\t\t\t\t\t/**\r\n\t\t\t\t\t\t * Constructor.\r\n\t\t\t\t\t\t * @param key the key\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\tKey(K key) {\r\n\t\t\t\t\t\t\tthis.key = key;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\tpublic boolean equals(Object obj) {\r\n\t\t\t\t\t\t\tif (obj instanceof Key) {\r\n\t\t\t\t\t\t\t\treturn keyComparer.invoke(key, ((Key)obj).key);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\tpublic int hashCode() {\r\n\t\t\t\t\t\t\treturn key != null ? key.hashCode() : 0;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t/** The map. */\r\n\t\t\t\t\tfinal Map<Key, V> map = new HashMap<Key, V>();\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void error(@Nonnull Throwable ex) {\r\n\t\t\t\t\t\tobserver.error(ex);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void finish() {\r\n\t\t\t\t\t\tMap<K, V> result = new HashMap<K, V>();\r\n\t\t\t\t\t\tfor (Map.Entry<Key, V> e : map.entrySet()) {\r\n\t\t\t\t\t\t\tresult.put(e.getKey().key, e.getValue());\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tobserver.next(result);\r\n\t\t\t\t\t\tobserver.finish();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void next(T value) {\r\n\t\t\t\t\t\tKey k = new Key(keySelector.invoke(value));\r\n\t\t\t\t\t\tV v = valueSelector.invoke(value);\r\n\t\t\t\t\t\tmap.put(k, v);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t};\r\n\t}",
"public Map<T, V> populateMap() {\n Map<T, V> map = new HashMap<>();\n for (int i = 0; i < entryNumber; i++) {\n cacheKeys[i] = (T) Integer.toString(random.nextInt(1000000000));\n String key = cacheKeys[i].toString();\n map.put((T) key, (V) Integer.toString(random.nextInt(1000000000)));\n }\n return map;\n }",
"public MyHashMap() {\n\n }",
"public Hashtable<String,Stock> createMap(){\n\tHashtable table = new Hashtable<String, Stock>();\n\treturn table;\n}",
"public CountingMap() {\n this( new HashMap<K, Integer>() );\n }",
"public MyHashMap() {\n hashMap = new ArrayList<>();\n }",
"public Q706DesignHashMap() {\n keys = new ArrayList<>();\n values = new ArrayList<>();\n\n }",
"public Map instantiateBackingMap(String sName);",
"public OwnMap() {\n super();\n keySet = new OwnSet();\n }",
"private static <K, V> Map<K, V> newConcurrentHashMap() {\n return new ConcurrentHashMap<K, V>();\n }",
"public abstract void createMap();",
"public void createHashMap() {\n myList = new HashMap<>();\n scrabbleList = new HashMap<>();\n }",
"public static MapObject createMapObject(){\n\t\treturn new MapObject();\n\t}",
"public HashMap(){\n\t\tthis.numOfBins=10;\n\t\tthis.size=0;\n\t\tinitializeMap();\n\t}",
"@Contract(value = \" -> new\", pure = true)\n @Nonnull\n @Deprecated\n public static <K, V> Map<K, V> createWeakValueMap() {\n return Maps.newWeakValueHashMap();\n }",
"public UIBuilder getNewInstance(Map<String, Object> entries);",
"public interface ObservableMap<K, V> extends Map<K, V>, Observable {\n\n /**\n * Add a listener to this observable map.\n *\n * @param listener\n * the listener for listening to the list changes\n */\n void addListener(MapChangeListener<? super K, ? super V> listener);\n\n /**\n * Tries to removed a listener from this observable map. If the listener is not attached to this map, nothing\n * happens.\n *\n * @param listener\n * a listener to remove\n */\n void removeListener(MapChangeListener<? super K, ? super V> listener);\n\n /**\n * Verify if a {@code MapChangeListener} already exist for this {@code ObservableMap}.\n *\n * @param listener\n * the {@code MapChangeListener} to verify\n *\n * @return {@code true}, if the listener already listens, {@code false} otherwise.\n */\n boolean isMapChangeListenerAlreadyAdded(MapChangeListener<? super K, ? super V> listener);\n\n}",
"public static <K, V> Reference2ObjectMap<K, V> singleton(K key, V value) {\n/* 271 */ return new Singleton<>(key, value);\n/* */ }",
"private void initMaps()\r\n\t{\r\n\t\tenergiesForCurrentKOppParity = new LinkedHashMap<Integer, Double>();\r\n\t\tinputBranchWithJ = new LinkedHashMap<Integer, Double>();\r\n\t\tassociatedR = new LinkedHashMap<Integer, Double>();\r\n\t\tassociatedP = new LinkedHashMap<Integer, Double>();\r\n\t\tassociatedQ = new LinkedHashMap<Integer, Double>();\r\n\t\ttriangularP = new LinkedHashMap<Integer, Double>();\r\n\t\ttriangularQ = new LinkedHashMap<Integer, Double>();\r\n\t\ttriangularR = new LinkedHashMap<Integer, Double>();\r\n\t\tupperEnergyValuesWithJ = new LinkedHashMap<Integer, Double>();\r\n\t}",
"private static <N extends Node> SortedMap<ImmutableContextSet, SortedSet<N>> createMap() {\n return new ConcurrentSkipListMap<>(ContextSetComparator.reverse());\n }",
"public MyHashMap() {\n keys = new MapNode[n];\n vals = new MapNode[n];\n for (int i=0; i < n ; ++i) {\n keys[i] = new MapNode();\n vals[i] = new MapNode();\n }\n }",
"public static void setSettings(final HashMap<String, String> settings) {\n\n m_Settings.putAll(settings);\n\n }",
"private static void initializeMaps()\n\t{\n\t\taddedPoints = new HashMap<String,String[][][]>();\n\t\tpopulatedList = new HashMap<String,Boolean>();\n\t\tloadedAndGenerated = new HashMap<String,Boolean>();\n\t}",
"private static Map<String, String> createPropertiesAttrib() {\r\n Map<String, String> map = new HashMap<String, String>();\r\n map.put(\"Property1\", \"Value1SA\");\r\n map.put(\"Property3\", \"Value3SA\");\r\n return map;\r\n }",
"private static <T> Map<T, String> createSimpleMap(T key, String value) {\n\t\tMap<T, String> map = new HashMap<>();\n\t\tmap.put(key, value);\n\t\treturn map;\n\t}",
"public MyHashMap() {\n\t\tthis(INIT_CAPACITY);\n\t}",
"public IntObjectHashMap() {\n resetToDefault();\n }",
"Observable<Config> observable();",
"public void initEvaluatorMap() {\n putObject(CoreConstants.EVALUATOR_MAP, new HashMap());\n }",
"public Map<K, V> toMutableMap() {\n return new HashMap<>(this);\n }",
"public MapVS(SetVS<T> keys, Map<K, V> entries) {\n this.keys = keys;\n this.entries = entries;\n this.concreteHash = computeConcreteHash();\n }",
"public void buildMap(){\n this.map = new HashMap<String, String>();\n map.put(\"user\", \"user\");\n map.put(\"pw\", \"pass\");\n map.put(\"quit\", \"quit\");\n map.put(\"features\", \"feat\");\n map.put(\"cd\", \"cwd\");\n map.put(\"dir\", \"list\");\n map.put(\"get\", \"retr\");\n }",
"public Map initMap(){\n\t\tif (map == null){\n\t\t\tmap = createMap();\n\t\t}\n\t\treturn map;\n\t}",
"@Override\n public void create() {\n theMap = new ObjectSet<>(2048, 0.5f);\n generate();\n }",
"public static <K, V> Map<K, V> createMap(K key1, V value1, K key2, V value2, K key3, V value3) {\n\t\tMap<K, V> map = new HashMap<K, V>();\n\t\tmap.put(key1, value1);\n\t\tmap.put(key2, value2);\n\t\tmap.put(key3, value3);\n\t\treturn map;\n\t}",
"public TimeMap() {\n hashMap = new HashMap<String, List<Data>>();\n }",
"public static void main(String[] args) {\n Map<String, Set<Integer>> ms = new HashMap<>(); \n Set<Integer> s1 = new HashSet<>(Arrays.asList(1,2,3));\n Set<Integer> s2 = new HashSet<>(Arrays.asList(4,5,6));\n Set<Integer> s3 = new HashSet<>(Arrays.asList(7,8,9));\n ms.put(\"one\", s1);\n ms.put(\"two\", s2);\n ms.put(\"three\", s3);\n System.out.println(ms); \n // ch07.collections.Ch0706InterfacesVsConcrete$1\n // {one=[1, 2, 3], two=[4, 5, 6], three=[7, 8, 9]}\n\n // this is how LinkedHashMap<Integer,Tuple2<String,LinkedHashMap<Double,String>>>\n // can be initially initialized\n LinkedHashMap<Integer,Tuple2<String,LinkedHashMap<Double,String>>> toc =\n new LinkedHashMap<>();\n System.out.println(toc); // just using toc to get rid of eclipse warning about not using it\n \n \n\n\n\n }",
"protected void createLookupCache() {\n }",
"public FactoryMapImpl()\n {\n super();\n }",
"private static Map<DiscreteState,Double> createMap(int vectSize, int mapSize) {\n\t\tMap<DiscreteState,Double> map = new HashMap<DiscreteState,Double>();\n\t\tint n = (int) Math.min(mapSize, Math.pow(2, vectSize));\n\t\twhile (map.size() < n) {\n\t\t\tdouble[] addition = new double[vectSize];\n\t\t\tfor (int i = 0; i < vectSize; i++) addition[i] = Math.round(Math.random());\n\t\t\tmap.put(new DiscreteState(addition), Math.random());\n\t\t}\n\t\treturn map;\n\t}",
"public TimeMap2() {\n map = new HashMap<>();\n }",
"public static <T, K> ConcurrentHashMap<T, K> createConcurrentHashMap() {\n \t\treturn new ConcurrentHashMap<T, K>();\n \t}",
"public void init(Map<String, String> configuration);",
"MAP createMAP();",
"public HashEntityMap()\n\t\t{\n\t\t\tmapNameToValue = new HashMap<String, Integer>();\n\t\t}",
"IcedHM() { _m = new NonBlockingHashMap<>(); }",
"Map<String, String> getAllAsMap() {\n return Collections.unmodifiableMap(settings);\n }",
"Map<String, String> getAllAsMap() {\n return Collections.unmodifiableMap(settings);\n }",
"public static void main(String[] args) {\n\t\tHashMap<String, Integer> map1 = new HashMap<String, Integer> ();\n\t\t\n //2. Creating HashMap with some initial capacity\n\t\tHashMap<String,Integer> map2 = new HashMap<String,Integer> (30);\n\t\t\n\t\t//3. Creating HashMap with some initial capacity and some load factor\n\t\tHashMap<String, Integer> map3 = new HashMap<String, Integer> (30, .60f);\n\t\t\n\t\t//4. Creating HashMap by copying another HashMap\n\t\tHashMap<String, Integer> map4= new HashMap<String, Integer> (map1);\n\t\t\n\t}",
"public void createDictionary() \n {\n dictionary = new HashMap<String, Map<String, String>>();\n \n addTranslations(\n \"EN\", // Language code\n \"OK\", \"Ok\",\n \"UPDATE\", \"Update\",\n \"OPEN\", \"Open\",\n \"CLOSE\", \"Close\",\n \"CANCEL\", \"Cancel\",\n \"MESSAGES\", \"Messages\",\n \"NO_MESSAGES_TO_DISPLAY\", \"No messages to display\",\n \"EVALUATE\", \"Evaluate\",\n \"RUN\", \"Run\",\n \"RUN_AS_ACTIVITY\", \"Run Activity\",\n \"OPEN_SCRIPT\", \"Open script\",\n \"START_SERVER\", \"Start server\",\n \"STOP_SERVER\", \"Stop server\",\n \"SHOW_MESSAGES\", \"Messages\",\n \"UPDATE_APP_SCRIPTS\", \"Update\",\n \"THIS_WILL_OVERWRITE_ALL_APP_SCRIPTS\", \"This will overwrite all application scripts!\",\n \"ENTER_FILE_OR_URL\", \"Enter file or url:\",\n \"UPDATE_APP_SCRIPTS_DONE\", \"Update complete!\",\n \"UPDATE_APP_SCRIPTS_DONE_RESTART\", \"Restart the application to make changes take effect\",\n \"QUIT_APP\", \"Quit\",\n \"CLOSE\", \"Close\",\n \"BE_KIND\", \"Be kind\",\n \"BE_KIND_MESSAGE\", \"Be a kind person\"\n );\n }",
"private static void makeInstance(){\n\n if(settingsFile==null){\n settingsFile = new MetadataFile(SETTINGS_FILE_PATH);\n }\n\n if(!settingsFile.exists()){\n settingsFile.create();\n }\n\n if(tagListeners==null){\n tagListeners= new HashMap<>();\n }\n\n }",
"public void initMap() {\n\t\tmap = new Map();\n\t\tmap.clear();\n\t\tphase = new Phase();\n\t\tmap.setPhase(phase);\n\t\tmapView = new MapView();\n\t\tphaseView = new PhaseView();\n\t\tworldDomiView = new WorldDominationView();\n\t\tcardExchangeView = new CardExchangeView();\n\t\tphase.addObserver(phaseView);\n\t\tphase.addObserver(cardExchangeView);\n\t\tmap.addObserver(worldDomiView);\n\t\tmap.addObserver(mapView);\n\t}",
"public static void fillMap(Map<String, Object> map, TransferObserver observer, boolean isChecked) {\n int progress = (int) ((double) observer.getBytesTransferred() * 100 / observer\n .getBytesTotal());\n map.put(\"id\", observer.getId());\n map.put(\"checked\", isChecked);\n map.put(\"fileName\", observer.getAbsoluteFilePath());\n map.put(\"progress\", progress);\n map.put(\"bytes\",\n getBytesString(observer.getBytesTransferred()) + \"/\"\n + getBytesString(observer.getBytesTotal()));\n map.put(\"state\", observer.getState());\n map.put(\"percentage\", progress + \"%\");\n }",
"static JarCollectorConfigImpl createJarCollectorConfig(Map<String, Object> settings) {\n if (settings == null) {\n settings = Collections.emptyMap();\n }\n return new JarCollectorConfigImpl(settings);\n }",
"public SimpleDataStore () {\n\t\tmessageMap = new HashMap<String , List<Message>>() ;\n\t}",
"void initCaches(Map<EObject, String> eObjectToIdMap, Map<String, EObject> idToEObjectMap);",
"private DependencyManager(Map<TypedKey<?>, Object> inputs)\n\t{\n\t\tmap.putAll(inputs);\n\t}",
"public MapVS(Guard universe) {\n this.keys = new SetVS<>(universe);\n this.entries = new HashMap<>();\n this.concreteHash = computeConcreteHash();\n }",
"public Settings() {\r\n\t\tthis.settings = new HashMap<String, Object>();\r\n\t\tloadDefaults();\r\n\t}",
"public void setUp()\n {\n map = new Map(5, 5, null);\n }",
"private void generateMaps() {\r\n\t\tthis.tablesLocksMap = new LinkedHashMap<>();\r\n\t\tthis.blocksLocksMap = new LinkedHashMap<>();\r\n\t\tthis.rowsLocksMap = new LinkedHashMap<>();\r\n\t\tthis.waitMap = new LinkedHashMap<>();\r\n\t}",
"private DataCache() {\n this.people = new HashMap<>();\n this.events = new HashMap<>();\n this.personEvents = new HashMap<>();\n this.currentPersonEvents = new HashMap<>();\n this.eventTypes = new ArrayList<>();\n this.childrenMap = new HashMap<>();\n this.maleSpouse = new HashSet<>();\n this.femaleSpouse = new HashSet<>();\n this.paternalAncestorsMales = new HashSet<>();\n this.paternalAncestorsFemales = new HashSet<>();\n this.maternalAncestorsMales = new HashSet<>();\n this.maternalAncestorsFemales = new HashSet<>();\n }",
"protected SafeHashMap.Entry<K, V> instantiateEntry()\n {\n return new Entry<>();\n }",
"public ConfigurationHolderImpl(Map<String, String> map) {\n this(map, null);\n }",
"@PostConstruct\n public void initCache() {\n cache = Collections.synchronizedMap(new HashMap<>(cacheCapacity, 1));\n }",
"public MyHashMap() {\r\n\t\tloadFactor = DEFAULT_LOAD_FACTOR;\r\n\t\tcapacity = DEFAULT_CAPACITY;\r\n\t\thashMapArray = new LinkedList[capacity];\r\n\t}",
"InfiniteMap<K,V> build();",
"public static <K, V> MapBuilder<TreeMap<K, V>, K, V> treeMap()\n {\n return new MapBuilder<TreeMap<K, V>, K, V>(new TreeMap<K, V>());\n }",
"private void initializeHeatMapOptions() {\n heatMapOptions = new HashMap<>();\n heatMapOptions.put(\"leftShift\", \"0\");\n heatMapOptions.put(\"rightShift\", \"0\");\n heatMapOptions.put(\"reportColumnDisplayName\", \"\");\n heatMapOptions.put(\"activateHeatMap\", \"false\");\n\n }",
"public HashMap<String, String> toHashMap() {\n\n // Parse if needed\n run();\n\n if (cachedMap == null) {\n cachedMap = new LinkedHashMap<String, String>();\n\n SimpleDateFormat dateFormat = new SimpleDateFormat(\n \"yyyy-MM-dd HH:mm:ss\");\n\n cachedMap.put(\"File name\", fileName);\n cachedMap.put(\"File size\", \"\" + fileSize);\n cachedMap.put(\"PDF version\", pdfVersion);\n cachedMap.put(\"Page count\", \"\" + numberOfPages);\n cachedMap.put(\"Page size\", \"\" + mediaBoxWidthInPoints + \" x \"\n + mediaBoxHeightInPoints + \" points\");\n cachedMap.put(\"Page width\", \"\" + mediaBoxWidthInPoints);\n cachedMap.put(\"Page height\", \"\" + mediaBoxHeightInPoints);\n cachedMap.put(\"Page layout\", pageLayout);\n cachedMap.put(\"Title\", title);\n cachedMap.put(\"Author\", author);\n cachedMap.put(\"Subject\", subject);\n cachedMap.put(\"PDF producer\", producer);\n cachedMap.put(\"Content creator\", contentCreator);\n if (creationDate != null) {\n cachedMap.put(\"Creation date\",\n dateFormat.format(creationDate.getTime()));\n } else {\n cachedMap.put(\"Creation date\", \"\");\n }\n if (modificationDate != null) {\n cachedMap.put(\"Modification date\",\n dateFormat.format(modificationDate.getTime()));\n } else {\n cachedMap.put(\"Modification date\", \"\");\n }\n\n // \"Others\"\n cachedMap.put(\"Encrypted\", \"\" + isEncrypted);\n cachedMap.put(\"Keywords\", keywords);\n cachedMap.put(\"Media box width\", \"\" + mediaBoxWidthInPoints);\n cachedMap.put(\"Media box height\", \"\" + mediaBoxHeightInPoints);\n cachedMap.put(\"Crop box width\", \"\" + cropBoxWidthInPoints);\n cachedMap.put(\"Crop box height\", \"\" + cropBoxHeightInPoints);\n \n if(permissions != null) {\n cachedMap.put(\"Can Print\", Boolean.toString(permissions.canPrint()));\n cachedMap.put(\"Can Modify\", Boolean.toString(permissions.canModify()));\n cachedMap.put(\"Can Extract\", Boolean.toString(permissions.canExtractContent()));\n cachedMap.put(\"Can Modify Annotations\", Boolean.toString(permissions.canModifyAnnotations()));\n cachedMap.put(\"Can Fill Forms\", Boolean.toString(permissions.canFillInForm()));\n cachedMap.put(\"Can Extract for Accessibility\", Boolean.toString(permissions.canExtractForAccessibility()));\n cachedMap.put(\"Can Assemble\", Boolean.toString(permissions.canAssembleDocument()));\n cachedMap.put(\"Can Print Degraded\", Boolean.toString(permissions.canPrintDegraded()));\n }\n }\n\n return cachedMap;\n }",
"public TimeMap() {\n timeMap = new HashMap<>();\n }",
"public TrendrrCache(DynMap config) {\n \t\tthis.config = config;\n \t\t\n \t}",
"public MagicDictionary() {\n this.map = new HashMap<>();\n }",
"public static <K, T> Observable<Map<K, T>> toMap(\r\n\t\t\tfinal Observable<? extends T> source,\r\n\t\t\tfinal Func1<? super T, ? extends K> keySelector,\r\n\t\t\tfinal Func2<? super K, ? super K, Boolean> keyComparer\r\n\t) {\r\n\t\treturn toMap(source, keySelector, Functions.<T>identity(), keyComparer);\r\n\t}",
"protected SafeHashMap.Entry instantiateEntry()\n {\n return new Entry();\n }",
"public CachingAsyncAtomicMap(AsyncAtomicMap<K, V> backingMap, int cacheSize) {\n super(backingMap);\n this.backingMap = backingMap;\n cache = CacheBuilder.newBuilder()\n .maximumSize(cacheSize)\n .build(CacheLoader.from(CachingAsyncAtomicMap.super::get));\n cacheUpdater = event -> {\n Versioned<V> newValue = event.newValue();\n if (newValue == null) {\n cache.invalidate(event.key());\n } else {\n cache.put(event.key(), CompletableFuture.completedFuture(newValue));\n }\n };\n statusListener = status -> {\n log.debug(\"{} status changed to {}\", this.name(), status);\n // If the status of the underlying map is SUSPENDED or INACTIVE\n // we can no longer guarantee that the cache will be in sync.\n if (status == PrimitiveState.SUSPENDED || status == PrimitiveState.CLOSED) {\n cache.invalidateAll();\n }\n };\n super.addListener(cacheUpdater);\n super.addStateChangeListener(statusListener);\n }",
"public Observable<TrackMap> getTrackMap(String paramsKey) {\n return Observable.just(Realm.getDefaultInstance())\n .observeOn(AndroidSchedulers.mainThread())\n .flatMap(realm -> queryTrackMap(realm, paramsKey)\n .<TrackMap>asFlowable()\n .toObservable());\n }",
"@SafeVarargs\n public static <K, V> Map<K, V> mapOf(Map.Entry<K, V>... entries) {\n Map<K, V> map = new LinkedHashMap<>();\n\n for (Map.Entry<K, V> entry : entries) {\n map.put(entry.getKey(), entry.getValue());\n }\n\n return java.util.Collections.unmodifiableMap(map);\n }",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic HashMap()\r\n\t{\r\n\t\ttable = new MapEntry[7];\r\n\t\tcount = 0;\r\n\t\tmaxCount = table.length - table.length/3;\r\n\t\tDUMMY = new MapEntry<>(null, null);\r\n\t}",
"@Override\n public void update(Observable o, Object arg) {\n if (arg instanceof HashMap){\n if(((HashMap<?, ?>) arg).keySet().toArray()[0] instanceof Speaker){\n this.speakerScheduleMap = (HashMap<Speaker, SpeakerScheduleManager>) arg;\n }\n else{this.userScheduleMap = (HashMap<User, UserScheduleManager>) arg;}\n }\n if (arg instanceof MainMenuController){\n this.mainMenuController = (MainMenuController) arg;\n }\n\n }"
] | [
"0.6510632",
"0.5720502",
"0.5676312",
"0.56741154",
"0.55559075",
"0.55417496",
"0.5494256",
"0.54472005",
"0.54246426",
"0.5409511",
"0.52503675",
"0.5217228",
"0.5191282",
"0.5164242",
"0.5155389",
"0.5105572",
"0.50998163",
"0.5092381",
"0.5058808",
"0.5057887",
"0.5054195",
"0.50320995",
"0.5017477",
"0.5016143",
"0.5007138",
"0.50033736",
"0.4998031",
"0.49915984",
"0.4970243",
"0.49426225",
"0.49377686",
"0.49097633",
"0.4904801",
"0.48738185",
"0.4864234",
"0.48543265",
"0.4822329",
"0.48171666",
"0.4812824",
"0.4812191",
"0.4780189",
"0.4769209",
"0.47686854",
"0.476784",
"0.4766945",
"0.47663176",
"0.4765596",
"0.4749909",
"0.4748305",
"0.47477418",
"0.47306362",
"0.47248372",
"0.4711838",
"0.4711002",
"0.4708871",
"0.47056568",
"0.4700533",
"0.4697312",
"0.469721",
"0.4697078",
"0.4696777",
"0.4695868",
"0.46759117",
"0.46720412",
"0.46712023",
"0.46553525",
"0.46537274",
"0.46537274",
"0.46527264",
"0.46507376",
"0.46448505",
"0.46437413",
"0.46381018",
"0.46311164",
"0.46165174",
"0.4610979",
"0.4607837",
"0.46072593",
"0.46066692",
"0.4581328",
"0.45778197",
"0.45723537",
"0.4569515",
"0.45665675",
"0.45664412",
"0.45646018",
"0.45583788",
"0.4553601",
"0.45531443",
"0.45488226",
"0.45487627",
"0.45469648",
"0.45445392",
"0.45434394",
"0.45356685",
"0.45312837",
"0.4529019",
"0.452801",
"0.4525755",
"0.4517157"
] | 0.5108487 | 15 |
Map interface Store a value in the cache. | public synchronized V put(K key, V value)
{
// COH-6009: map mutations must be synchronized with event dispatch
// to ensure in-order delivery
return super.put(key, value);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void cache(String key, T value) throws IOException;",
"@Override\n\tpublic V add(K key, V value) {\n\t\tcheckNullKey(key);\n\t\tcheckNullValue(value);\n\t\twriteLock.lock();\n\t\ttry {\n\t\t\treturn cache.put(key, value);\n\t\t} finally {\n\t\t\twriteLock.unlock();\n\t\t}\n\t}",
"void put(K id, V cacheable);",
"public void put(int key, int value) {\n if(!map.contains(key)){\n // If the cache is full, remove from the end of the deque and the map\n if(deque.size() == cacheSize){\n int lastElement = deque.removeLast();\n map.remove(lastElement);\n }else{\n // The data is found in the cache, but it could be anywhere\n // So iterate the queue and push it forward\n int index = 0, i = 0;\n Iterator<Integer> itr = deque.iterator();\n while(itr.hasNext()){\n if(itr.next() == key){\n index = i;\n break;\n }\n i++;\n }\n // Now index position locates the key in the deque. Remove it and add it\n // to the front of the queue\n deque.remove(index);\n }\n deque.push(key);\n // Add also the key to the map\n map.add(key);\n } \n }",
"public synchronized void storeValue(K key, V value) {\n SoftReference<V> ref = cache.get(key);\n cache.put(key, new SoftReference<V>(value));\n\n // Is the cache unbounded?\n if (size == null) {\n return;\n }\n\n // Was the key already present in the cache?\n if (ref != null) {\n recentlyUsed.remove(key);\n }\n recentlyUsed.add(0, key);\n\n // Is the cache now overflowing?\n if (recentlyUsed.size() > size) {\n cache.remove(recentlyUsed.get(size));\n recentlyUsed.remove((int)size); // Remove by index, not value.\n }\n }",
"public void storeInCache() {\r\n lockValueStored = IN_CACHE;\r\n }",
"public void put(K key, T value) {\n synchronized (cacheMap) {\n cacheMap.put(key, new CacheObject(value));\n }\n }",
"public interface Cache {\r\n\r\n public Object get( Object key);\r\n public void put( Object key, Object value);\r\n}",
"public interface Cache {\n void put(String key, Object value);\n\n Object get(String key);\n}",
"public void put(Object key, Object value) {\n \t\tLog.i(TAG, String.format(\"Cache put key: %s, value: %s\", key, value.toString()));\n \t\tcacheMap.put(key, value);\n \t}",
"public void put(int key, int value) {\n Node node = cache.get(key);\n // Check if the node already exists\n if (node != null) {\n node.value = value;\n // Accessing a node is considered to update LRU cache\n // Remove the node\n remove(node);\n // Add the node\n add(node);\n } else {\n if (cache.size() == capacity) {\n // Remove from the map\n cache.remove(tail.previous.key);\n // Remove from the linked list\n remove(tail.previous);\n }\n // Create a new node\n Node newNode = new Node();\n newNode.key = key;\n newNode.value = value;\n // Add to map\n cache.put(key, newNode);\n // Add to linked list\n add(newNode);\n }\n }",
"public void put(String key, Object value) {\n CacheObject cacheObject = new CacheObject(value, expirationTime);\n WeakReference<CacheObject> weakReference = new WeakReference<CacheObject>(cacheObject);\n cache.put(key, weakReference);\n }",
"public void put(Object key, Object value) {\n Entry entry = this.cache.get(key);\n\n if (entry == null) {\n // cache is fully used\n if (currentSize >= cacheSize) {\n cache.remove(tail.key);\n removeLast();\n }\n else {\n currentSize++;\n }\n\n entry = new Entry();\n }\n\n // update the K/V in the Entry object\n entry.key = key;\n entry.value = value;\n cache.put(key, entry);\n\n // move to the head of list\n moveToHead(entry);\n }",
"protected boolean putIntoCache(String key, String value) throws Exception {\n \t// Ensure the value is in cache. We want to avoid it being in the storage but not\n \t// the cache as this can lead to synchronization errors:\n \tboolean inserted = evictAndReplace(key);\n \t\n \t// Perform an insert:\n map.put(key, value);\n \tusageCounter.put(key, usageCounter.get(key) + 1);\n \t\n \treturn inserted;\n }",
"protected abstract void put(CacheKey cacheKey);",
"public void cache(int variableId, int value) {\n localCache.put(variableId, value);\n }",
"public void put(K key, V value, int containedObjectCount) {\n synchronized(theLock) {\n if (! valueMap.containsKey(key)) {\n currentCacheSize += containedObjectCount;\n }\n valueMap.put(key, new CacheableObject(value, containedObjectCount));\n }\n }",
"@Override\n\tpublic void put(String name, Serializable key, Serializable value) throws CacheException {\n\t\t\n\t}",
"public interface Cache<K, V> {\n\n public V get(K key);\n\n public void put(K key, V value);\n\n public void remove(K key);\n\n}",
"public void put(final Serializable key, final Serializable value) {\n Mutex lock = checkLockExistsForKey(key);\n try {\n if (value != null) {\n final Element element = new Element(key, value);\n cache.put(element);\n } else {\n cache.remove(key);\n }\n } finally {\n //Release the readlock here. This will have been acquired in the get, where the element was null\n lock.release();\n }\n }",
"protected void putDatabaseQueryCache(String key, String value) {\n\t\t\n\t\tSession session = this.openSession();\n\t\tsession.beginTransaction();\n\t\tsession.save( new Metainfo( key, value ) );\n\t\tsession.getTransaction().commit();\n\t\tsession.close();\n\t}",
"<W extends V> void addMeasurement(DataCache<K, W> cache, K key, W value);",
"Object put(Object key, Object value);",
"public void put(String param1, Cache.Entry param2) {\n }",
"public static void putCacheValue(int distanceLeft, long valueToCache, int cacheNumber){\n SuperSavvyTrieHelper2 internalCache = cache.get(cacheNumber).get(distanceLeft);\n if (internalCache != null){\n internalCache.put(valueToCache);\n } else {\n internalCache = new SuperSavvyTrieHelper2(distanceLeft);\n internalCache.put(valueToCache);\n cache.get(cacheNumber).put(distanceLeft, internalCache);\n }\n //statCollector.stopTime(cacheNumber + \": putCacheValue\");\n }",
"public interface ContentCache extends DataCache {\r\n String getValue(String code, Locale locale);\r\n\r\n Boolean containsLocale(Locale locale);\r\n\r\n Boolean containsCodeForLocale(String code, Locale locale);\r\n\r\n Map<String, Map<String, String>> getCachedData();\r\n}",
"public abstract V put(K key, V value);",
"@Override\n public T put(String key, T value) {\n T old = null;\n // Do I have an entry for it already?\n Map.Entry<String, T> entry = entries.get(key);\n // Was it already there?\n if (entry != null) {\n // Yes. Just update it.\n old = entry.setValue(value);\n } else {\n // Add it to the map.\n map.put(prefix + key, value);\n // Rebuild.\n rebuildEntries();\n }\n return old;\n }",
"public interface UserEntityCache {\n int getHitCount();\n int getMissCount();\n\n void put(long key, CacheElement<UserEntity> cacheElement);\n\n CacheElement<UserEntity> get(long key);\n}",
"public interface Cache<K, V> {\n\n /**\n * 通过键值获取获取缓存值\n *\n * @param k k\n * @return\n */\n V get(K k);\n\n /**\n * 通过键值刷新缓存值\n *\n * @param k k\n */\n void refresh(K k);\n}",
"public void put(Object key, Object value) throws Exception {\n CacheEntry entry = (CacheEntry)_hash.get(key);\n if (entry != null) {\n entry.setValue(value);\n touchEntry(entry);\n } else {\n\n if (_hash.size() == _max) {\n // purge and recycle entry\n entry = purgeEntry();\n entry.setKey(key);\n entry.setValue(value);\n } else {\n entry = new CacheEntry(key, value);\n }\n addEntry(entry);\n _hash.put(entry.getKey(), entry);\n }\n }",
"public interface Cache<K,E> {\n\tpublic E getCacheEntry(K id);\n\t\n\tpublic boolean addCacheEntry(K id, E entry);\n\t\n\tpublic void removeCacheEntry(K id);\n\t\n\tpublic Stream<E> getAllEntries();\n}",
"public interface Cache<K,V> {\n\t/**\n\t * Returns the object for the given id from cache, null if no object is in cache.\n\t *\n\t * @param id the id to retrieve\n\t * @return a V object.\n\t */\n\tV get(K id);\n\t\n\t/**\n\t * Puts the cacheable object in cache.\n\t *\n\t * @param id the object id\n\t * @param cacheable the object to cache.\n\t */\n\tvoid put(K id, V cacheable);\n\n\t/**\n\t * Removes an object from the cache.\n\t *\n\t * @param id cache object id.\n\t */\n\tvoid remove(K id);\n\t\n\t/**\n\t * Clears the cache.\n\t */\n\tvoid clear();\n\n\t/**\n\t * Returns the cache stats.\n\t *\n\t * @return a {@link net.anotheria.moskito.core.predefined.CacheStats} object.\n\t */\n\tCacheStats getCacheStats();\n\n /**\n * Return all elements from cache.\n *\n * @return collection\n */\n Collection<V> getAllElements();\n\t\n}",
"public void write(int variableId, int value) {\n localCache.put(variableId, value);\n }",
"void addEntry(String key, Object value) {\n this.storageInputMap.put(key, value);\n }",
"public cacheEntry(int key, String value){\n int key;\n String value;\n cacheEntry(int key){\n this.key = key;\n this.value = value;\n }\n}",
"public interface Map<K, V>\n{\n // Adds the specified key-value pair to the map. Does nothing if the key already\n // exists in the map.\n void add(K key, V value);\n\n // Returns the value associated with the specified key, or null of that key doesn't\n // exist in the map\n V get(K key);\n\t\n // Removes the key-value pair with the specified key from the map. Does nothing if\n // the key doesn't exist in the map.\n void remove(K key);\n}",
"public void testCache() {\n MethodKey m = new MethodKey(\"aclass\", \"amethod\", new Object[]{1, \"fads\", new Object()});\n String mValue = \"my fancy value\";\n MethodKey m1 = new MethodKey(\"aclass\", \"amethod1\", new Object[]{1, \"fads\", new Object()});\n String mValue1 = \"my fancy value1\";\n MethodKey m2 = new MethodKey(\"aclass\", \"amethod2\", new Object[]{1, \"fads\", new Object()});\n String mValue2 = \"my fancy value2\";\n\n GenericCache.setValue(m, mValue);\n GenericCache.setValue(m1, mValue1);\n GenericCache.setValue(m2, mValue2);\n\n assertEquals(GenericCache.getValue(m), mValue);\n assertEquals(GenericCache.getValue(m1), mValue1);\n assertEquals(GenericCache.getValue(m2), mValue2);\n }",
"@Override\n\tpublic V put(K key, V value) {\n\t\tV v = map.put(key, value);\n\t\tif (map.containsKey(key))\n\t\t\tkeys.add(key);\n\t\t\n\t\treturn v;\n\t}",
"protected abstract boolean _setIfAbsent(String key, Object value, Date expires);",
"void put(K key, V value, long expireMs);",
"public void put(String key, T value);",
"@Bean\n public ExpiringMap<String, Integer> cacheMap() {\n final ExpiringMap<String, Integer> map = ExpiringMap.builder().expiration(1, TimeUnit.MINUTES).build();\n return map;\n }",
"public V put(K key, V value) {\n System.out.println(\"SimpleConcurrentHashMap.put()\");\n return mMap.put(key, value);\n }",
"Object getValueFromLocalCache(Object key);",
"public native Map<K, V> set(K key, V value);",
"public V put(K key, V value);",
"@Override\n\t@TimeComplexity(\"O(n)\")\n\tpublic V put(K key, V value) {\n\t/* TCJ\n\t * Binary search operation: log n\n\t * Iterate through new collection: n\n\t */\n\t\t//.getKey().compareTo(null) == 0\n\t\tV oldValue;\n\t\tint j = findIndex(key);\n\t\tif ( map.get(j) == null ) {\n\t\t\toldValue = null;\n\t\t} else {\n\t\t\toldValue = map.get(j).getValue();\n\t\t}\n\t\t\n\t\tif ( j < size() && key.compareTo(map.get(j).getKey()) == 0) {\n\t\t\tmap.get(j).setValue(value);\n\t\t\treturn oldValue;\n\t\t}\n\t\tmap.add(j, new mapEntry<K, V>(key, value));\n\t\treturn null;\n\t}",
"public V put(K key, V value) {\n if (null == key) {\n return isertNullKey(key, value);\n } else {\n // inserting other keys\n int location = hashFunction(key.hashCode());\n if (location / capacity >= loadFactor) {\n resize();\n }\n MyEntry<K, V> entry = null;\n entry = bucket[location];\n //if a value exists with same key, we are not overriding that value, just returning the same,\n //in hashMap they actually override the new value\n if (entry != null && key == entry.getKey()) {\n return entry.getValue();\n } else {\n MyEntry ent = new MyEntry();\n ent.setKey(key);\n ent.setValue(value);\n bucket[location] = ent;\n return value;\n }\n\n }\n }",
"@Override\n public void put(K key, V value) {\n int index = Math.floorMod(key.hashCode(), entryArr.length);\n if(containsKey(key)) {\n LinkedList<Entry<K, V>> pointer = entryArr[index];\n for(int i = 0; i < pointer.size(); i++) {\n if(pointer.get(i).keyEquals(new Entry<K, V>(key, null))) {\n pointer.get(i).value = value;\n break;\n }\n }\n } else {\n if(loadFactor()>maxLoad) {\n resize();\n }\n if (entryArr[index] == null) {\n entryArr[index] = new LinkedList<Entry<K, V>>();\n }\n entryArr[index].addLast(new Entry<K, V>(key, value));\n size++;\n }\n }",
"public void put(Value key, Value value) {\n\t\tstorage.put(key, value);\n\t}",
"protected Object putElement(int key, Object value) {\n int index = key % capacity;\n if (index < 0) {\n index = -index;\n }\n if (map[index] == null) {\n //.... This is a new key since no bucket exists\n objectCounter++;\n map[index] = create(key, value);\n contents++;\n if (contents > maxLoad) {\n rehash();\n }\n return null;\n } else {\n //.... A bucket already exists for this index: check whether \n // we already have a mapping for this key\n MapElement me = map[index];\n while (true) {\n if (me.getKey() == key) {\n return me.atInsert(value);\n } else {\n if (me.getNext() == null) {\n // No next element: so we have no mapping for this key\n objectCounter++;\n MapElement result = create(key, value);\n me.setNext(result);\n contents++;\n if (contents > maxLoad) {\n rehash();\n }\n return null;\n } else {\n me = me.getNext();\n }\n }\n }\n }\n }",
"void put(String key, Object value);",
"ValueType put(long key, ValueType entry);",
"public Value put(Key key, Value thing) ;",
"public interface RedisCacheService {\n void put(Object key , Object value);\n Object get(Object key);\n}",
"@Override\n public synchronized boolean put(String key, String value) throws Exception {\n boolean inserted = this.putIntoCache(key, value);\n return inserted;\n }",
"public interface Mapper {\n /**\n * Map the provided input value to the new output value\n * @param key the key of the input value\n * @param input the actual input value\n * @return the value to store in the datastore\n */\n public Object map(String key, Object input);\n}",
"public void put(Key key, Value val);",
"@Override\n public void put(String key, Object value, long timeOutMs, long timeOutReturnInMs) {\n map.put(key, new ObjectAndTimeOut(value, timeOutMs));\n }",
"public synchronized void put(String key,String val){\n map.put(key, val); \n }",
"public Object setCachedObject(String key, Object obj) {\n return cache.put(key, obj);\n }",
"@Override\n public <T> T save(String correlationId, String key, T value) {\n if (key == null)\n throw new NullPointerException(\"Key cannot be null\");\n\n\n // Cleanup the stored states\n this.cleanup();\n\n // Get the entry\n StateEntry entry = this._states.getOrDefault(key, null);\n\n // Shortcut to remove entry from the cache\n if (value == null) {\n this._states.remove(key);\n return null;\n }\n\n // Update the entry\n if (entry != null) {\n entry.setValue(value);\n }\n // Or create a new entry\n else {\n entry = new StateEntry(key, value);\n this._states.put(key, entry);\n }\n\n return value;\n }",
"@Override\n public void put(String key, String value) {\n database.put(key, value);\n\n String cachedData = cache.get(key);\n if (cachedData != null && !cachedData.equals(value)) {\n this.cache.remove(key);\n }\n }",
"public void put(int key, int value) {\n store[key] = value; // update operation= overwritten \n }",
"@Override\n public boolean put(K key, V object){\n if ((this.maxSize > 0) && !this.cache.containsKey(key) && (this.cache.size() == this.maxSize)){\n // if add new element than exceed maximum limit\n return false;\n }\n\n CacheObject<K, V> cacheObject = new CacheObject<>(key, object);\n this.cache.put(key, cacheObject);\n\n return true;\n }",
"public interface CacheManager {\n\n void init();\n\n void destroy();\n\n void del(String key);\n\n void set(String key, Object value);\n\n void set(String key, Object value, int expireTime);\n\n <T> T get(String key, Class<T> clazz);\n\n void hset(String key, String subKey, Object value);\n\n <T> T hget(String key, String subKey, Class<T> clazz);\n\n <T> Map<String, T> hget(String key, Class<T> clazz);\n\n void hrem(String key, String subKey);\n\n long hincr(String key, String subKey);\n\n void sadd(String key, Object val);\n\n boolean sisMember(String key, Object val);\n\n void srem(String key, Object val);\n\n Set<String> sget(String key);\n\n <T> Set<T> sget(String key, Class<T> clazz);\n\n void zadd(String key, Object val, double score);\n\n boolean zisMember(String key, Object val);\n\n void zrem(String key, Object val);\n\n void zrem(String key, double min, double max);\n\n void zreplace(String key, Object val, double score);\n\n double zincr(String key, Object val, double score);\n\n <T> Set<T> zget(String key, double min, double max, Class<T> clazz);\n\n Set<String> zget(String key, double min, double max);\n}",
"protected abstract void put(K key, V value);",
"public void put(int key, int value) {\n if (!cache.containsKey(key)) {\n // new entry\n if (cache.size() + 1 > capacity) {\n // remove LRU entry\n int lruKey = cache.keySet().iterator().next();\n cache.remove(lruKey);\n }\n } else {\n // existing entry\n cache.remove(key);\n }\n cache.put(key, value);\n }",
"public void put(int key, int value) {\n map.put(key,value);\n }",
"public boolean addCacheElement(K key, V value) {\n\t\tif (cacheMap.containsKey(key)) {\n\t\t\telementHit(key);\n\t\t\tInputUtils.printConsoleMessage(\"Hit\");\n\t\t\treturn false;\n\t\t} else if (maxObjects > cacheMap.size()) {\n\t\t\tcacheMap.put(key, value);\n\t\t\thitMap.put(key, 0);\n\t\t\treturn true;\n\t\t} else {\n\t\t\tInputUtils.printConsoleMessage(\"Miss\");\n\t\t\tint min = Integer.MAX_VALUE;\n\t\t\tK searchedKey = null;\n\t\t\tfor (K i : hitMap.keySet()) {\n\t\t\t\tint val = hitMap.get(i);\n\t\t\t\tif (min > val) {\n\t\t\t\t\tsearchedKey = i;\n\t\t\t\t\tmin = val;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcacheMap.remove(searchedKey);\n\t\t\thitMap.remove(searchedKey);\n\t\t\tcacheMap.put(key, value);\n\t\t\thitMap.put(key, 0);\n\t\t\treturn true;\n\t\t}\n\t}",
"@Test\n public void simpleAPINoGenericsAndNoTypeEnforcementStoreByValue() {\n\n MutableConfiguration config = new MutableConfiguration();\n Cache cache = cacheManager.createCache(cacheName, config);\n Identifier2 one = new Identifier2(\"1\");\n\n //can put different things in\n //But not non-serializable things\n //cache.put(one, \"something\");\n cache.put(1L, \"something\");\n cache.put(pistachio.getName(), pistachio);\n cache.put(tonto.getName(), tonto);\n cache.put(bonzo.getName(), bonzo);\n cache.put(juno.getName(), juno);\n cache.put(talker.getName(), talker);\n\n try {\n cache.put(skinny.getName(), skinny);\n } catch(Exception e) {\n //not serializable expected\n }\n //can get them out\n assertNotNull(cache.get(1L));\n assertNotNull(cache.get(pistachio.getName()));\n\n //can remove them\n assertTrue(cache.remove(1L));\n assertTrue(cache.remove(pistachio.getName()));\n }",
"@Override\n\tpublic void addToCache(T obj) {\n\t\tcache.add(obj);\n\t}",
"public void put(int key, int value) {\n int hashedKey = hash(key);\n Entry entry = map.get(hashedKey);\n if (entry.key == -1){\n // empty entry, insert entry\n entry.key = key;\n entry.value = value;\n }else if (entry.key == key){\n // target entry\n entry.value = value;\n }else{\n // in list, find target entry\n while(entry.key != key && entry.next!=null){\n entry = entry.next;\n }\n if (entry.key == key)\n entry.value = value;\n else\n entry.next = new Entry(key, value);\n }\n }",
"@Override\n public V put(K key, V value) {\n reverseMap.put(value, key);\n return super.put(key, value);\n }",
"void put(@NonNull String key, @NonNull T value, @NonNull LocalDateTime expiresAt);",
"public V put(K key, V value) {\r\n\t\t// if (this.contains(key)){\r\n\t\t// return this.changeValue(key, value);\r\n\t\t// } else {\r\n\t\treturn linearProbing(key, value);\r\n\t}",
"public void put(Object key,Object value) {\n map.put(key,value);\n hashtable.put(key,value);\n }",
"public V put(K key, V value) {\n System.out.println(\"SimpleHashMap.put\");\n return mMap.put(key, value);\n }",
"public boolean put(String key, String value);",
"public interface IMyMap<Key,Value> {\n\n Value getValue(Key key);\n void put(Key key, Value value);\n int size();\n\n\n}",
"public interface ImageCache {\n public Bitmap get(String url);\n public void put(String url,Bitmap bitmap);\n}",
"public interface CustomCache<K, V> {\n\n /**\n * gets a value by key\n * returns null if key is expired\n *\n * @param key\n * @return\n */\n V get(K key);\n\n /**\n * puts into cache with given ttl\n *\n * @param key\n * @param value\n */\n void put(K key, V value);\n\n /**\n * averages out the non expired values in cache.\n * to be discussed in interview\n *\n * @return\n */\n double average();\n}",
"public Object put(Object oKey, Object oValue, long cMillis)\n {\n // check if the cache needs flushing\n checkFlush();\n\n Entry entry;\n Object oOrig;\n\n synchronized (this)\n {\n entry = (Entry) getEntryInternal(oKey);\n if (entry == null)\n {\n // new cache entry\n oOrig = super.put(oKey, oValue);\n }\n else\n {\n // cache entry already exists\n entry.touch();\n\n oOrig = entry.setValue(oValue);\n }\n\n if (cMillis != 0L)\n {\n if (entry == null)\n {\n entry = (Entry) getEntryInternal(oKey);\n }\n if (entry != null)\n {\n entry.setExpiryMillis(cMillis > 0L ?\n Base.getSafeTimeMillis() + cMillis : 0L);\n }\n }\n\n // check the cache size (COH-467, COH-480)\n if (m_cCurUnits > m_cMaxUnits)\n {\n prune();\n\n // could have evicted the item we just inserted/updated\n if (getEntryInternal(oKey) == null)\n {\n oOrig = null;\n }\n }\n }\n\n m_stats.registerPut(0L);\n return oOrig;\n }",
"private CacheWrapper<AccessPointIdentifier, Integer> createCache() {\n return new CacheWrapper<AccessPointIdentifier, Integer>() {\n \n @Override\n public void put(AccessPointIdentifier key, Integer value) {\n cache.put(key, value);\n }\n \n @Override\n public Integer get(AccessPointIdentifier key) {\n if (cache.containsKey(key)) {\n hitRate++;\n }\n return cache.get(key);\n }\n \n \n };\n }",
"public abstract CacheKey put(Vector primaryKey, Object object, Object writeLockValue, long readTime);",
"public Object putTransient(Object key, Object value);",
"@Override\n public void putValue(String key, Object value) {\n\n }",
"V put(K key, V value);",
"public interface EzyerCache {\n class PersistentObject {\n public final byte[] mData;\n public final String mKey;\n public final long mExpireTimeMillis;\n\n public PersistentObject(byte[] data, String key, long expireTimeMillis) {\n mData = data;\n mKey = key;\n mExpireTimeMillis = expireTimeMillis;\n }\n }\n\n class ValueObject {\n public final byte[] mData;\n public final String mKey;\n public final boolean mIsExpired;\n\n public ValueObject(byte[] data, String key, boolean isExpired) {\n mData = data;\n mKey = key;\n mIsExpired = isExpired;\n }\n }\n\n ValueObject get(String key);\n\n List<ValueObject> get(String key, int start, int end);\n\n void set(PersistentObject po);\n\n void add(PersistentObject po);\n\n void remove(String key);\n\n boolean isExpired(String key);\n\n void clear();\n}",
"@Override\r\n\tpublic V putElement(K key, V value) {\n\t\t\r\n\t\tif (capacity == 0)\r\n\t\t\treturn null;\r\n\t\t\r\n\t\tif (hashMap.isEmpty()) {\r\n\t\t\thashMap.put(key, value);\r\n\t\t\tque.add(key);\r\n\t\t\treturn value;\r\n\t\t}\t\t\r\n\t\t\r\n\t\tV element = getElement(key);\r\n\t\tV returnValue = hashMap.get(que.get(0));\r\n\t\t\r\n\t\tif (element == null) {\r\n\t\t\tif (hashMap.size() == capacity){\r\n\t\t\t\tremoveElement(que.get(0));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\thashMap.put(key, value);\r\n\t\t\tque.add(key);\r\n\t\t}\r\n\t\t\r\n\t\treturn returnValue;\r\n\t}",
"public void cacheResult(DataEntry dataEntry);",
"@Nullable\r\n public Object put(String key, @Nullable Object value) {\r\n Object res = attributeMap.put(key, value);\r\n fireStateChanged();\r\n return res;\r\n }",
"@Test\n public void testPutGet() {\n cache.put(\"A\", \"first\");\n cache.put(\"C\", \"second\");\n cache.put(\"C\", \"third\");\n \n assertEquals(\"first\", cache.get(\"A\"));\n assertEquals(\"third\", cache.get(\"C\"));\n }",
"@Override\n public final void onPut(final K key, final V value) {\n if (!freqPutMap.containsKey(key)) {\n freqPutMap.put(key, 1);\n return;\n }\n\n // Add 1 to times used in map\n freqPutMap.put(key, freqPutMap.get(key) + 1);\n }",
"void put(@NonNull String key, @NonNull T value);",
"@Override\n @SuppressWarnings(\"unchecked\")\n public <T> void putEntity(Key<T> key, T entity)\n {\n // Add to both caches\n session.getCache().put((Class<T>)key.getType(), entity, key.getId());\n queryCache.putEntity(key, entity);\n }",
"@Override\n public V put(K key, V value) {\n\n \tV tempValue = get(key);\n \t\n \tLinkedList<Entry> tempBucket = chooseBucket(key);\n \t\n \tif(tempValue != null) {\n \t\tfor(int i=0;i<tempBucket.size();i++) {\n\t \t\tEntry tempEntry = tempBucket.get(i);\n\t \t\t\n\t \t\tif(tempEntry.getKey() == key) {\n\t \t\t\tV returnValue = tempEntry.getValue();\n\t \t\t\ttempEntry.setValue(value);\n\t \t\t\treturn returnValue;\n\t \t\t}\n\t \t}\n \t} else {\n \t\tsize ++;\n \t\ttempBucket.add(new Entry(key, value));\n \t}\n \t\n \tif(size > buckets.length*ALPHA) {\n \t\trehash(GROWTH_FACTOR);\n \t}\n \t\n return tempValue;\n }",
"public void persist(String key, Object value)\r\n\t{\r\n\t\tgetPersistenceMap().put(key, value);\r\n\t}",
"public V put(K key, V value) {\n\t\tint pos = key.hashCode() / numCub;\n\t\tV valor = this.get(key);\n\t\tif (pos < tam) {\n\t\t\tint indice = tabla.get(pos).keySet().indexOf(key);\n\t\t\tif (indice == -1) {\n\t\t\t\ttabla.get(pos).valueSet().add(value);\n\t\t\t\ttabla.get(pos).keySet().add(key);\n\t\t\t} else {\n\t\t\t\ttabla.get(pos).valueSet().set(indice, value);\n\t\t\t\ttabla.get(pos).keySet().set(indice, key);\n\t\t\t}\n\t\t} else { //Mapa demasiado pequeno, redimensiona y vuelve a intentarlo\n\t\t\tthis.redimensionar();\n\t\t\tthis.put(key, value);\n\t\t}\n\t\treturn valor;\n\t}"
] | [
"0.7108277",
"0.68066853",
"0.68052775",
"0.67007554",
"0.66987807",
"0.6698071",
"0.6669664",
"0.66400754",
"0.6635292",
"0.6586619",
"0.6553824",
"0.6499802",
"0.6489612",
"0.64703065",
"0.63690084",
"0.63334996",
"0.6330168",
"0.63099045",
"0.6279285",
"0.62297076",
"0.61842203",
"0.6165253",
"0.6144546",
"0.60998577",
"0.60970587",
"0.6084147",
"0.60819274",
"0.607008",
"0.60634786",
"0.6033986",
"0.6001584",
"0.5997285",
"0.5986751",
"0.59861714",
"0.597574",
"0.5972316",
"0.59718573",
"0.59710014",
"0.59663004",
"0.5961083",
"0.5957103",
"0.5944011",
"0.59377635",
"0.59311557",
"0.5930987",
"0.5922766",
"0.59218943",
"0.5912693",
"0.5909174",
"0.59036404",
"0.58944654",
"0.58944404",
"0.5892329",
"0.588866",
"0.58831275",
"0.5878665",
"0.58747274",
"0.5867714",
"0.586385",
"0.585994",
"0.58536184",
"0.583181",
"0.5825718",
"0.5825053",
"0.5824577",
"0.58228046",
"0.5806855",
"0.5786915",
"0.5783331",
"0.57803375",
"0.57615227",
"0.5758068",
"0.5753889",
"0.57529616",
"0.5748555",
"0.57474905",
"0.57373226",
"0.57351744",
"0.57337767",
"0.573265",
"0.5728651",
"0.57279503",
"0.5726285",
"0.5724965",
"0.5718138",
"0.57069814",
"0.5705945",
"0.5702641",
"0.5697712",
"0.5689119",
"0.568896",
"0.5682595",
"0.5678821",
"0.5678548",
"0.567315",
"0.56725305",
"0.5671534",
"0.5669552",
"0.56561995",
"0.5650769"
] | 0.58339655 | 61 |
Remove an entry from the cache. | public synchronized V remove(Object oKey)
{
// COH-6009: map mutations must be synchronized with event dispatch
// to ensure in-order delivery
Entry<K, V> entry = (Entry<K, V>) getEntryInternal(oKey);
if (entry == null)
{
return null;
}
else
{
removeEntryInternal(entry);
entry.onRemove();
return entry.getValue();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void removeEntry(CacheEntry entry) {\n\t\tmap.remove(entry.getKey());\n\t\tsize.decrementAndGet();\n\t\tindex.remove(entry.getItem());\n\t\tentry.delete();\n\t}",
"final CacheData<K, V> removeEntry(final Object key) {\r\n // find the place to put it and stuff it in, overwriting what was\r\n // previously there\r\n // synchronization is not needed here, if this value changes to null\r\n // either before or after a client looks at it, it's not a problem\r\n int pos = getKeyPosition(key);\r\n CacheData<K, V> cacheData = getCacheData(pos);\r\n setCacheData(pos, null);\r\n return cacheData;\r\n }",
"public abstract Object remove(CacheKey cacheKey);",
"Entry<Key, Value> remove(Entry<Key, Value> entry);",
"@Override\n\tpublic V invalidateEntry(K key) {\n\t\tcheckNullKey(key);\n\t\twriteLock.lock();\n\t\ttry {\n\t\t\treturn cache.remove(key);\n\t\t} finally {\n\t\t\twriteLock.unlock();\n\t\t}\n\t}",
"void removeEntry(K key);",
"public T remove(Object entry) {\n return null;\n }",
"@Override\n\tpublic synchronized void remove(String key) {\n\t\tboolean deleted = getFileForKey(key).delete();\n\t\tremoveEntry(key);\n\t\tif (!deleted) {\n\t\t\tVolleyLog.d(\n\t\t\t\t\t\"Could not delete cache entry for key=%s, filename=%s\",\n\t\t\t\t\tkey, getFilenameForKey(key));\n\t\t}\n\t}",
"private void removeEntry(String key) {\n\t\tCacheHeader entry = mEntries.get(key);\n\t\tif (entry != null) {\n\t\t\tmTotalSize -= entry.size;\n\t\t\tmEntries.remove(key);\n\t\t}\n\t}",
"public static void deleteEntryFromCache(final String key) {\n if (isNull(key)) {\n throw new NullPointerException(\"You can not use a null key\");\n }\n if(cacheKeys.contains(key)) {\n int i = cacheKeys.indexOf(key);\n cacheKeys.remove(i);\n cacheValues.remove(i);\n } else {\n throw new NullPointerException(\"Unable to find key!\");\n }\n }",
"@Override\n\tpublic void removeFromCache(T obj) {\n\t\tcache.remove(obj);\n\t}",
"T decache(String key) throws IOException;",
"public boolean remove(T anEntry);",
"@Override\n public T remove(Object key) {\n // Do I have an entry for it?\n Map.Entry<String, T> entry = entries.get((String) key);\n if (entry != null) {\n entries.remove(key);\n // Change the underlying map.\n return map.remove(prefix + key);\n }\n return null;\n }",
"protected abstract void remove(E entry);",
"public void removeEntry(final String url){\n if(url==null){\n return;\n }\n\n synchronized (mBitmapCache) {\n mBitmapCache.remove(url);\n }\n }",
"void removeValueFromLocalCache(Object key);",
"public Object remove(Object oKey)\n {\n // check if the cache needs flushing\n checkFlush();\n\n synchronized (this)\n {\n // determine if the key is in the cache\n Entry entry = (Entry) getEntryInternal(oKey);\n if (entry == null)\n {\n return null;\n }\n else\n {\n entry.discard();\n removeEntryInternal(entry);\n return entry.getValue();\n }\n }\n }",
"void evictFromCache( Long id );",
"@Override\r\n\tpublic void removeEntry(String key) {\n\t\t\r\n\t}",
"static public void removeEntry(Entry entry){ getEntryList().removeEntry(entry); }",
"public void remove(K key) {\n synchronized (cacheMap) {\n cacheMap.remove(key);\n }\n }",
"@Override\r\n public void remove(IMObject object) {\r\n cache.remove(object);\r\n }",
"public static void remove(String key) {\n try {\n sLruCache.remove(key);\n sDiskLruCache.remove(getKeyByMd5(key));\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"private void removeTimeEntryCache(TimeEntry timeEntry)\n {\n synchronized(timeEntries)\n {\n SoftReference<TimeEntry> timeEntrySoftReference = null;\n ListIterator<SoftReference<TimeEntry>> iterator = timeEntries.listIterator();\n while (iterator.hasNext() && (timeEntrySoftReference == null))\n {\n SoftReference<TimeEntry> softReference = iterator.next();\n if ((softReference != null) && softReference.get() == timeEntry)\n {\n timeEntrySoftReference = softReference;\n }\n }\n if (timeEntrySoftReference != null)\n {\n timeEntries.remove(timeEntrySoftReference);\n }\n }\n }",
"public Entry remove(K key){\r\n int loc = find(key);\r\n if(hashTable[loc]!=null && hashTable[loc].equals(key)){\r\n Entry<K,V> result = hashTable[loc];\r\n hashTable[loc].isDeleted = true;\r\n size--;\r\n return result;\r\n }\r\n else\r\n return null;\r\n }",
"public V remove(final Object key) {\r\n if (key == null) {\r\n return null;\r\n }\r\n\r\n CacheData<K, V> cacheData = removeEntry(key);\r\n if (cacheData != null) {\r\n return cacheData.getValue();\r\n }\r\n return null;\r\n }",
"public V remove(K key) {\n CacheableObject cObj;\n\n synchronized(theLock) {\n cObj = valueMap.remove(key);\n if (null != cObj) {\n currentCacheSize -= cObj.containmentCount;\n }\n }\n\n return (cObj == null) ? null : cObj.cachedObject;\n }",
"@Override\n public void removeFromCache(String sensorID) {\n }",
"public void remove(Object key) {\n CacheEntry entry = (CacheEntry)_hash.get(key);\n if (entry != null) {\n removeEntry(entry);\n _hash.remove(entry.getKey());\n }\n }",
"public Object remove(String key);",
"@Override\n\tpublic void remove(String name, Serializable key) throws CacheException {\n\t\t\n\t}",
"public void removeObject(T object) {\r\n\t\tif(cache.contains(object) == false) //if not found in cache\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Object not found.\");\r\n\t\t}\r\n\t\t\r\n\t\telse\r\n\t\t{\r\n\t\t\tcache.remove(cache.indexOf(object));\r\n\t\t}\r\n\t\t\r\n\t}",
"public void remove(Object key){\n map.remove(key);\n }",
"public void remove( String cacheName, K key, long requesterId )\r\n throws IOException\r\n {\r\n CacheElement ce = new CacheElement( cacheName, key, null );\r\n LateralElementDescriptor led = new LateralElementDescriptor( ce );\r\n led.requesterId = requesterId;\r\n led.command = led.REMOVE;\r\n send( led );\r\n }",
"private void remove(final ProviderIdent ident) {\n final cacheItem cacheItem = cache.get(ident);\n if (null != cacheItem) {\n filecache.remove(cacheItem.getFirst());\n }\n cache.remove(ident);\n }",
"public Object removeItem (String key);",
"public V remove(final K key) {\n expunge();\n final int hash = hash(key);\n final int index = index(hash, entries.length);\n Entry<K, V> temp = entries[index];\n Entry<K, V> previous = temp;\n\n while (temp != null) {\n final Entry<K, V> next = temp.nextEntry;\n if (hash == temp.hash && key == temp.get()) {\n size--;\n if (previous == temp) {\n entries[index] = next;\n } else {\n previous.nextEntry = next;\n }\n return temp.value;\n }\n previous = temp;\n temp = next;\n }\n\n return null;\n }",
"void remove(ThreadLocal<?> key) {\n cleanUp();\n\n for (int index = key.hash & mask;; index = next(index)) {\n Object reference = table[index];\n\n if (reference == key.reference) {\n // Success!\n table[index] = TOMBSTONE;\n table[index + 1] = null;\n tombstones++;\n size--;\n return;\n }\n\n if (reference == null) {\n // No entry found.\n return;\n }\n }\n }",
"public void remove() {\r\n\t\t\trequireModificationCountUnchanged();\r\n\r\n\t\t\tif (currentEntry == null) {\r\n\t\t\t\tthrow new IllegalStateException();\r\n\t\t\t}\r\n\r\n\t\t\tSimpleHashtable.this.remove(currentEntry.key);\r\n\t\t\titeratorModificationCount++;\r\n\t\t\tcurrentEntry = null;\r\n\t\t}",
"public Entry<C> remove(long key) {\n try {\n int index = search(key);\n Entry<C> temp = sequence.get(index);\n sequence.remove(index);\n size--;\n return temp;\n\n } catch (NullPointerException e) {\n System.out.println(\"Key \" + key + \" does not exist\");\n return null;\n }\n }",
"public void remove(K key);",
"V remove(K key);",
"V remove(K key);",
"V remove(K key);",
"public void remove(Value v)\n\t{\n\t\tif (this.cache.containsKey(v.getKey()))\n\t\t{\n\t\t\tthis.cache.remove(v.getKey());\n\t\t}\n\t\telse\n\t\t{\n//\t\t\tthis.lock.writeLock().lock();\n\t\t\tthis.db.remove(v.getKey());\n//\t\t\tthis.lock.writeLock().unlock();\n\t\t}\n//\t\tthis.lock.writeLock().lock();\n\t\tthis.keys.remove(v.getKey());\n//\t\tthis.lock.writeLock().unlock();\n\t}",
"void remove(String key);",
"void remove(String key);",
"void remove(String key);",
"protected void removeEntry(CacheEntry entry) {\n if (entry == _first) {\n _first = entry.getNext();\n }\n if (_last == entry) {\n _last = entry.getPrevious();\n }\n CacheEntry previous = entry.getPrevious();\n CacheEntry next = entry.getNext();\n if (previous != null) {\n previous.setNext(next);\n }\n if (next != null) {\n next.setPrevious(previous);\n }\n entry.setPrevious(null);\n entry.setNext(null);\n }",
"protected void computeEntryRemoved(K key, InternalCacheEntry<K, V> value) {\n // Do nothing by default\n }",
"public void remove( String name )\n {\n LOG.info( \"Removing the cache named {}\", name );\n\n cacheManager.removeCache( name );\n }",
"@Override\n public V remove(K key) {\n Entry<K, V> removed = new Entry<>(null, null);\n if(containsKey(key)) {\n LinkedList<Entry<K, V>> pointer = entryArr[Math.floorMod(key.hashCode(), entryArr.length)];\n for(int i = 0; i < pointer.size(); i++) {\n if(pointer.get(i).keyEquals(new Entry<K, V>(key, null))) {\n removed = pointer.get(i);\n pointer.remove(pointer.get(i));\n break;\n }\n }\n size--;\n }\n return removed.value;\n }",
"@Override\n public void remove( final K name )\n {\n this.getCacheControl().remove( name );\n }",
"public Entry<K, V> remove(K key) {\r\n try {\r\n int hash = key.hashCode();\r\n ListNode<Entry<K, V>> node = table[compFunction(hash)].front();\r\n if (node.isValidNode()) {\r\n Entry<K, V> entry = (Entry<K, V>) node.getItem();\r\n node.remove();\r\n return entry;\r\n }\r\n } catch (Exception e) {\r\n System.out.println(\"Unhashable key: \" + e);\r\n }\r\n return null;\r\n }",
"public void remove( String cacheName, K key )\r\n throws IOException\r\n {\r\n remove( cacheName, key, LateralCacheInfo.listenerId );\r\n }",
"public synchronized Object remove( Object key ) {\n\t\tObject intvalue = mapKeyPos.remove(key);\n\t\tif ( intvalue != null ) {\n\t\t\tint pos = ((Integer)intvalue).intValue();\n\t\t\tObject temp = values[pos];\n\t\t\tkeys[pos] = null;\n\t\t\tvalues[pos] = null;\n\t\t\tstatus[pos] = LRU_OLD;\n\t\t\t//System.out.println(\"CountLimiteLRU: remove(\"+key+\") = \"+temp);\n\t\t\treturn temp;\n\t\t}\n\t\treturn null;\n\t}",
"public Entry remove(Object key) {\n int i = compFunction(key.hashCode());\n SList chain = buckets[i];\n try {\n for (SListNode n = (SListNode) chain.front(); n.isValidNode(); n = (SListNode) n.next()) {\n Entry e = (Entry) n.item();\n if (e.key.equals(key)) {\n n.remove();\n size--;\n return e;\n }\n }\n } catch(InvalidNodeException e) {\n System.out.println(e);\n }\n return null; \n }",
"@Override\n\tpublic V remove(Object key) {\n\t\tkeys.remove(key);\n\t\treturn map.remove(key);\n\t}",
"public boolean removeEntry(Entry entry) {\n\t\t return entries.removeElement(entry);\n\t\t\n\t}",
"public V remove(K key);",
"public V remove(K key);",
"void remove(K key);",
"void remove(K key);",
"void remove(K key);",
"@Override\n\t@CacheEvict(value=CacheName.CACHE_PERSONINFO, key=\"'key_'+#cacheKey\")\n\tpublic void removeCacheByKey(String cacheKey) {\n\t\t\n\t}",
"private void removeTailElement(){\n JavaBaseTask removed = items.remove(tail.getKey());\n System.out.println(\"element with index : \" + removed.getKey() + \"has been deleted doe to cache eviction\");\n tail = tail.previous;\n var headAu = head;\n while (headAu.next != null){\n headAu = headAu.next;\n }\n headAu = headAu.previous;\n headAu.next = null;\n }",
"V remove(Object key);",
"public void remove(long key) {\r\n removeElement(key);\r\n }",
"public static void remove() {\n\t\tTUser_CACHE.remove();\n\t}",
"@Override\n public V remove(Object key) {\n \t\n \tLinkedList<Entry> tempBucket = chooseBucket(key);\n \t\n \tfor(int i=0;i<tempBucket.size();i++) {\n\t \tEntry tempEntry = tempBucket.get(i);\n\t \t\t\n\t \tif(tempEntry.getKey() == key) {\n\t \t\tV returnValue = tempEntry.getValue();\n\t \t\ttempBucket.remove(i);\n\t \t\tsize --;\n\t \t\treturn returnValue;\n\t \t}\n\t }\n \t\n \tif(size < buckets.length*BETA) {\n \t\trehash(SHRINK_FACTOR);\n \t}\n \t\n \treturn null;\n }",
"@Override\n public boolean delete(K key){\n if (this.cache.containsKey(key)){\n this.cache.remove(key);\n return true;\n }\n\n return false;\n }",
"public void remove(AddressEntry entry) {\n addressEntryList.remove(entry);\n }",
"@Override\n\tpublic String remove(String key) {\n\t\tint hashVal = hashFunc(key);\n\t\twhile (hashArray[hashVal] != null) {\n\t\t\tif (hashArray[hashVal].value.equals(key)) {\n\t\t\t\thashArray[hashVal] = deleted;\n\t\t\t\tthis.numOfItems--;\n\t\t\t\treturn key;\n\t\t\t}\n\t\t\thashVal++;\n\t\t\thashVal = hashVal % size;\n\n\t\t}\n\t\treturn null;\n\t}",
"public Object remove();",
"public void remove(int key) {\n int hashedKey = hash(key);\n Entry entry = map.get(hashedKey);\n if (entry.key == -1) {\n return;\n } else if (entry.key == key) {\n if (entry.next != null) map.set(hashedKey, entry.next);\n else entry.key = -1;\n } else if (entry.next != null) {\n Entry pre = entry, cur = entry.next;\n while (cur.next != null && cur.key != key) {\n pre = cur;\n cur = cur.next;\n }\n if (cur.key == key) {\n pre.next = cur.next;\n }\n }\n }",
"void remove(String aKey);",
"@Override\r\n\tpublic void removeElement(K key) {\n\t\tque.remove(key);\r\n\t\thashMap.remove(key);\r\n\t}",
"public void clearCache();",
"public boolean remove(Key key) ;",
"public void remove(int key) {\n\n }",
"public Entry remove(Object key) {\r\n if (find(key) == null) {\r\n return null;\r\n } else { \r\n try{\r\n int index = compFunction(key.hashCode());\r\n if (hash_table[index].size() == 1) {\r\n Entry entry = (Entry)hash_table[index].front().item();\r\n hash_table[index] = null;\r\n return entry;\r\n } else { \r\n DListNode current = (DListNode) hash_table[index].front();\r\n while(current.isValidNode()){\r\n Entry pair = (Entry) current.item();\r\n if(pair.key().equals(key)){\r\n current.remove();\r\n size--;\r\n return pair;\r\n }\r\n current = (DListNode) current.next();\r\n }\r\n \r\n System.out.println(\"Couldn't find the item\");\r\n return null;\r\n }\r\n \r\n }catch(InvalidNodeException e){\r\n return null;\r\n }\r\n }\r\n }",
"@Override\n\t@CacheEvict(value=CacheName.CACHE_PERSONINFO, key=\"'key_'+#cacheId\")\n\tpublic void removeCacheById(Integer cacheId) {\n\t\t\n\t}",
"public DataEntry remove(long dataEntryId) throws NoSuchDataEntryException;",
"public void entryEvicted(EntryEvent<Identifier, SystemMetadata> event) {\n // nothing to do, entry remains in backing store\n\n }",
"public boolean remove(K key);",
"V remove(final K key);",
"void invalidateCache();",
"public void remove(IBasicEntity ent) throws CachingException {\n this.remove(ent.getEntityIdentifier());\n }",
"@Override\n public boolean deleteFromCache(String k)\n {\n if (this.maxCacheSize>0) {\n if ((!this.keyMap.isEmpty()) && (this.keyMap.containsKey(k))) {\n LRUNode ndToDelete = this.keyMap.get(k);\n if ((!this.lruQueue.isEmpty()) && (this.lruQueue.contains(ndToDelete))) {\n this.lruQueue.remove(ndToDelete);//remove from queue\n this.keyMap.remove(ndToDelete.getKey());//remove from map\n\n return true;\n }\n }\n }\n\n return false;\n }",
"public void remove(EntityIdentifier entityID) throws CachingException {\n this.remove(entityID.getType(), entityID.getKey());\n }",
"void removeNode(CacheNode<K, V> node) {\n\n\t\tconcurrentList.remove(node); // O(1) operation.\n\n\t}",
"public void remove(int key) {\n map.remove(key);\n }",
"Object remove();",
"@Override\n\tpublic Entry<K, V> remove(Entry<K, V> e) throws InvalidEntryException {\n\t\treturn null;\n\t}",
"private void removeFromEnd(){\n ListNode tailItem = tail.prev;\n removeFromList(tailItem);\n \n //remove the entry from hashtable\n hashtable.remove(tailItem.key);\n --totalCacheItems;\n }",
"void remove(@NonNull String key);",
"public void remove(String key) throws IOException;",
"public void delete(int curtTime, int key) {\n cache.remove(key);\n }",
"@Override\r\n\tpublic V remove(Object key) {\r\n\t\tint index = key.hashCode() % numBuckets;\r\n\t\treturn ((Bucket) buckets[index]).remove((K) key);\r\n\t}",
"public <K> boolean remove(K key);"
] | [
"0.76227576",
"0.7295699",
"0.7284046",
"0.7281012",
"0.7181602",
"0.70945334",
"0.705839",
"0.699278",
"0.6931236",
"0.6885893",
"0.6879211",
"0.6838496",
"0.67939436",
"0.6753241",
"0.67518985",
"0.67511696",
"0.673605",
"0.6718756",
"0.67111206",
"0.67030054",
"0.6695446",
"0.6662019",
"0.6578822",
"0.65773165",
"0.656304",
"0.6537642",
"0.65103334",
"0.650608",
"0.6499121",
"0.64990115",
"0.64563155",
"0.64432293",
"0.6368887",
"0.6363558",
"0.636142",
"0.63595074",
"0.63579327",
"0.6350776",
"0.63337094",
"0.63322634",
"0.6327193",
"0.6311973",
"0.63088256",
"0.63088256",
"0.63088256",
"0.6307677",
"0.6296251",
"0.6296251",
"0.6296251",
"0.62945473",
"0.6282678",
"0.6279125",
"0.6274011",
"0.6252226",
"0.6250866",
"0.62403977",
"0.62364835",
"0.62316376",
"0.62272114",
"0.62245613",
"0.62109286",
"0.62109286",
"0.6208358",
"0.6208358",
"0.6208358",
"0.62007195",
"0.62002736",
"0.6187288",
"0.6165992",
"0.6165537",
"0.6165261",
"0.6141046",
"0.6139882",
"0.613323",
"0.61272925",
"0.61017394",
"0.6097269",
"0.60967267",
"0.60955316",
"0.60889846",
"0.608652",
"0.606883",
"0.60671973",
"0.60604054",
"0.60586864",
"0.60552025",
"0.60461897",
"0.6045378",
"0.6036559",
"0.603275",
"0.6030307",
"0.6026504",
"0.6025693",
"0.60240006",
"0.602271",
"0.6021189",
"0.6019519",
"0.6018833",
"0.60126585",
"0.601128",
"0.6005172"
] | 0.0 | -1 |
Remove everything from the cache, notifying any registered listeners. | public synchronized void clear()
{
clear(false);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n public void processRemoveAll()\r\n {\r\n final ICacheEvent<String> cacheEvent =\r\n createICacheEvent(getCacheName(), \"all\", ICacheEventLogger.REMOVEALL_EVENT);\r\n try\r\n {\r\n reset();\r\n }\r\n finally\r\n {\r\n logICacheEvent(cacheEvent);\r\n }\r\n }",
"@Override\n public void cleanup() {\n for (String key : cache.keySet()) {\n CacheObject co = cache.get(key).get();\n if (co.isExpired()) {\n synchronized (co) {\n if (co.isExpired()) {\n cache.remove(key);\n queue.add(co);\n }\n }\n }\n }\n\n }",
"public void clearCache();",
"@Override\n\tpublic void clear() {\n\t\twriteLock.lock();\n\t\ttry {\n\t\t\tcache.clear();\n\t\t} finally {\n\t\t\twriteLock.unlock();\n\t\t}\n\t}",
"@Override\n public void clearCache() {\n }",
"void clearCache();",
"void clearCache();",
"public static void clean() {\n keptObservers.put(new Object(), new ArrayList<Runnable>());\n }",
"public void clear() {\n cache.clear();\n }",
"public void clear() {\n this.cache.clear();\n }",
"public void clear()\n {\n pages.stream().forEach((page) -> {\n page.clearCache();\n });\n\n pages.clear();\n listeners.clear();\n occupiedEntries.clear();\n }",
"public void clear() {\n\t\tthis.cache.clear();\n\t}",
"public static void clearAllCache() {\n try {\n sLruCache.evictAll();\n sDiskLruCache.delete();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public abstract void clearCache();",
"private void collectGarbageInCache() {\n CacheReference r;\n while ((r = (CacheReference)queue.poll()) != null) {\n fontCache.remove(r.getKey());\n }\n }",
"private void removeExpired() {\n Map<K,CacheableObject> removeMap = new HashMap<K,CacheableObject>(valueMap.size()/2);\n List<CacheListener<K>> tempListeners = new ArrayList<CacheListener<K>>();\n\n // Retrieve a list of everything that's to be removed\n synchronized(theLock) {\n for (Map.Entry<K,CacheableObject> entry : valueMap.entrySet()) {\n if (isExpired(entry.getValue())) {\n removeMap.put(entry.getKey(), entry.getValue());\n }\n }\n tempListeners.addAll(listeners);\n }\n\n // Remove the entries one-at-a-time, notifying the listener[s] in the process\n for (Map.Entry<K,CacheableObject> entry : removeMap.entrySet()) {\n synchronized(theLock) {\n currentCacheSize -= entry.getValue().containmentCount;\n valueMap.remove(entry.getKey());\n }\n Thread.yield();\n\n for (CacheListener<K> listener : tempListeners) {\n listener.expiredElement(entry.getKey());\n }\n }\n }",
"public void clearObservers(){\r\n\t\tobservers.clear();\r\n\t}",
"public void clearCache() {\n mCache.clear();\n }",
"private void invalidateCache() {\n\t\tLog.d(TAG, \"invalidateCache() is removing in-memory cache\");\n\t\tpackageMapping.clear();\n\t\tvalidCache = false;\n\t}",
"private void clearResetCache() {\n for(IoBuffer buf : resetCache) {\n buf.free();\n }\n resetCache = null;\n }",
"public void invalidateCaches() {\n cfgCache.invalidateAll();\n analysisCache.invalidateAll();\n }",
"private void removeEvicted() {\n Map<K,CacheableObject> removeMap = new HashMap<K,CacheableObject>(valueMap.size()/2);\n List<CacheListener<K>> tempListeners = new ArrayList<CacheListener<K>>();\n\n // Retrieve a list of everything that's to be removed\n synchronized(theLock) {\n removeMap.putAll(toEvictMap);\n toEvictMap.clear();\n tempListeners.addAll(listeners);\n }\n\n // Remove the entries one-at-a-time, notifying the listener[s] in the process\n for (Map.Entry<K,CacheableObject> entry : removeMap.entrySet()) {\n synchronized(theLock) {\n currentCacheSize -= entry.getValue().containmentCount;\n valueMap.remove(entry.getKey());\n }\n Thread.yield();\n\n for (CacheListener<K> listener : tempListeners) {\n listener.evictedElement(entry.getKey());\n }\n }\n }",
"private void invalidateCache() {\n\t}",
"public static void shutdown() {\n resetCache();\n listeningForChanges = false;\n }",
"public static void clearCache() {\n CACHE.remove();\n }",
"public void clearObservers() {\r\n\t\tobservers.clear();\r\n\t}",
"@Override\n\tpublic synchronized void clear() {\n\t\tFile[] files = mRootDirectory.listFiles();\n\t\tif (files != null) {\n\t\t\tfor (File file : files) {\n\t\t\t\tfile.delete();\n\t\t\t}\n\t\t}\n\t\tmEntries.clear();\n\t\tmTotalSize = 0;\n\t\tVolleyLog.d(\"Cache cleared.\");\n\t}",
"public void removeAll() {\n synchronized (mBitmapCache) {\n mBitmapCache.evictAll();\n }\n }",
"public void interestCachePurge()\n\t{\n\t\tdouble currentTime = getTime() ;\n\t\tfor(InterestCacheEntry entry:interestCache.values()){\n\t\t\tentry.setPayable(macroLearner.calcPayable(entry.getInterest(),entry.getMaxGradient().getPayment()));\n\t\t\tentry.gradientListPurge(currentTime) ;\n\t\t\t//microLearner.updateTaskExpectedPrice(entry.getInterest().getTaskId());\n\t\t\t/*if ( entry.IsGradientListEmpty() == true ){\n\t\t\t\tit.remove();\n\t\t\t}\t*/\t\t\n\t\t}\n\t}",
"public void clear()\n {\n // push next flush out to avoid attempts at multiple simultaneous\n // flushes\n deferFlush();\n\n synchronized (this)\n {\n while (true)\n {\n try\n {\n // notify cache entries of their impending removal\n for (Iterator iter = entrySet().iterator(); iter.hasNext(); )\n {\n ((Entry) iter.next()).discard();\n }\n\n // verify that the cache maintains its data correctly\n if (m_cCurUnits != 0)\n {\n // soft assertion\n Base.out(\"Invalid unit count after clear: \" + m_cCurUnits);\n m_cCurUnits = 0;\n }\n break;\n }\n catch (ConcurrentModificationException e)\n {\n }\n }\n\n // reset the cache storage\n super.clear();\n\n // reset hit/miss stats\n resetHitStatistics();\n\n // schedule next flush\n scheduleFlush();\n }\n }",
"public void clearMemoryCache() {\r\n cache.evictAll();\r\n Log.d(TAG, \"Manually cleaned complete cache.\");\r\n }",
"public static void clearCache() {\n cacheKeys.clear();\n cacheValues.clear();\n }",
"public static void clearAllCache() {\n page_cache.clear();\n key_relate.clear();\n }",
"public void detachAllObservers();",
"public void evictAll()\n {\n}",
"public void clearChangeListeners() {\n observer.clear();\n }",
"public static void clearCache() {\n\t\tclassNamesToPersistIds = null;\n\t\tclassesToPersistIds = null;\n\t}",
"private void cleanBuffersFromCache()\n {\n synchronized (myUsedKeys)\n {\n CacheProvider cache = getCache();\n for (PolylineModelData key : myPreviouslyUsedKeys)\n {\n if (!myUsedKeys.contains(key))\n {\n cache.clearCacheAssociation(key, PolylineDataBuffered.class);\n }\n }\n\n myPreviouslyUsedKeys.clear();\n myPreviouslyUsedKeys.addAll(myUsedKeys);\n }\n }",
"public void removeAllData() {\n\t\tList<T> allData = this.getAllData();\r\n\t\t// clean the map\r\n\t\tthis.dataMap.clear();\r\n\t\t\r\n\t\t// notify the subscribers\r\n\t\tthis.notifyDeleted(allData);\r\n\t}",
"void invalidateCache();",
"public static void removeAllObservers() {\n compositeDisposable.clear();\n observersList.clear();\n Timber.i(\"This is the enter point: All live assets and team feed auto refresh DOs are removed\");\n }",
"@SuppressWarnings({\"unchecked\", \"CallToThreadYield\"})\n public void cleanup() {\n\n long now = System.currentTimeMillis();\n ArrayList<K> deleteKey;\n\n synchronized (cacheMap) {\n MapIterator itr = cacheMap.mapIterator();\n\n deleteKey = new ArrayList<>((cacheMap.size() / 2) + 1);\n K key;\n CacheObject c;\n\n while (itr.hasNext()) {\n key = (K) itr.next();\n c = (CacheObject) itr.getValue();\n\n if (c != null && (now > (timeToLive + c.lastAccessed))) {\n deleteKey.add(key);\n }\n }\n }\n\n deleteKey.stream().map((key) -> {\n synchronized (cacheMap) {\n Object remove = cacheMap.remove(key);\n }\n return key;\n }).forEachOrdered((K _item) -> {\n Thread.yield();\n });\n }",
"protected void invalidateAll() {\n\t\tfor (CacheEntry entry : map.values()) {\n\t\t\tentry.getItem().invalidate();\n\t\t}\n\t}",
"public synchronized void deleteCache() {\n\n for (final File f : Constants.CACHE_LOCATION.listFiles()) {\n if (!f.isDirectory()) {\n f.delete();\n }\n }\n\n logsByCharacterMap = Collections.emptyMap();\n }",
"public void clearCache() {\n\t\troutes_.clearCache();\n\t}",
"public void clearCache() {\n\t\tsynchronized(mappingLock) {\n\t\t\tinvalidateCache();\n\t\t}\n\t}",
"public static void clearCache() {\n getPersistence().clearCache();\n }",
"public static void clearCache() {\n getPersistence().clearCache();\n }",
"public static void clearCache() {\n getPersistence().clearCache();\n }",
"public void notifyCacheRemoved(String cacheName) {\n // no-op\n }",
"public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}",
"public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}",
"public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}",
"public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}",
"public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}",
"public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}",
"public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}",
"public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}",
"public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}",
"public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}",
"public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}",
"public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}",
"public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}",
"public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}",
"public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}",
"public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}",
"public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}",
"public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}",
"public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}",
"public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}",
"public static void invalidateCache() {\n\t\tclassCache = new HashMap();\n\t}",
"public void clear()\r\n\t{\r\n\t\t// Simple as calling onExpire!\r\n\t\tonExpire();\r\n\t}",
"public void removeAll( String cacheName )\r\n throws IOException\r\n {\r\n removeAll( cacheName, LateralCacheInfo.listenerId );\r\n }",
"private void resetCache () {\n synchronized (this) {\n resourcesCache = null;\n }\n support.firePropertyChange(PROP_RESOURCES, null, null);\n }",
"private void onCacheFinish(){\n urls = null;\n medias = null;\n }",
"@Override\n\tpublic void invalidateCache() {\n\t\t\n\t}",
"public void invalidateCache(){\n\t\tfor (Realm realm : realms) {\n\t\t\tif(realm instanceof IClearableRealmCache){\n\t\t\t\tIClearableRealmCache ar = (IClearableRealmCache)realm;\n\t\t\t\tar.clearAllCaches();\n\t\t} \n\t\t\t\n\t\t}\n\t}",
"public void flushCaches() {\n LOCAL_SMALL_CACHE.clear();\n LOCAL_LARGE_CACHE.clear();\n }",
"public void clearCache() {\n\n\t\t// clearing form soft reference\n\t\tif (softCache != null) {\n\t\t\tsoftCache.clear();\n\t\t}\n\n\t\t// clearing from cache directory\n\t\tdeleteCacheFiles();\n\n\t}",
"void clearAndNotify();",
"private void cleanup() {\n\t\tTreeSet<CacheEntry> entries = new TreeSet<CacheEntry>(map.values());\n\t\tint i = region.getItemsToEvict();\n\t\tIterator<CacheEntry> it = entries.iterator();\n\t\twhile (it.hasNext() && i > 0) {\n\t\t\tremoveEntry(it.next());\n\t\t\ti--;\n\t\t}\n\t}",
"public void clearCache() {\r\n \t\ttagInfoCache.clear();\r\n \t\ttldElementsByPrefix.clear();\r\n \t}",
"@Override\n\tpublic int removeAllCacheData()\n\t{\n\t\treturn 0;\n\t}",
"public void dereferenceCache() {\n this.cache = null;\n }",
"public synchronized void removeAll() {\r\n\t\tif (trackedResources == null)\r\n\t\t\treturn;\r\n\t\tPair<IPath, IResourceChangeHandler>[] entries = (Pair<IPath, IResourceChangeHandler>[]) trackedResources.toArray(new Pair[trackedResources.size()]);\r\n\t\tfor (Pair<IPath, IResourceChangeHandler> entry : entries) {\r\n\t\t\tremoveResource(entry.first, entry.second);\r\n\t\t}\r\n\t}",
"void destroy() {\n destroyCache();\n }",
"void clearPersistentNotifications();",
"public static void clearCache(){\n cache.clear();\n cache2.clear();\n }",
"public synchronized void clear ()\n {\n for ( final Map.Entry<Object, FolderListener> entry : this.listeners.entrySet () )\n {\n entry.getValue ().changed ( entry.getKey (), new LinkedList<Entry> (), new LinkedList<String> (), true );\n }\n \n for ( final Map.Entry<String, Entry> entry : this.entryMap.entrySet () )\n {\n if ( entry instanceof FolderEntryCommon )\n {\n ( (FolderEntryCommon)entry ).getFolder ().removed ();\n }\n }\n \n this.entryMap.clear ();\n }",
"private void flushCache()\n {\n cachedDecomposition = null;\n cachedCentroid = null;\n cachedBounds = null;\n }",
"void resetCache();",
"public void clearCache() {\n reflectorCache.clear();\n }",
"public void clearCaches() {\n if (mImageCache != null) {\n mImageCache.clearCaches();\n }\n\n // clear the keys of images we've already downloaded\n sKeys.clear();\n }",
"void unsubscribeAll();",
"public void evictAll() {\n cacheManager.getCache(DomainValueRepository.DomainValueCache.DOMAIN_VALUE_BY_DOMAIN_ID).clear();\n }",
"public void clear() throws CacheException {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Cache \" + cache.getName() + \": removing all entries\");\n }\n cache.removeAll();\n }",
"public void clearInactiveCacheRefs()\n {\n for (Iterator<Map> iterByName = m_mapByName.values().iterator(); iterByName.hasNext(); )\n {\n Map mapByLoader = iterByName.next();\n\n synchronized (mapByLoader)\n {\n for (Iterator iter = mapByLoader.entrySet().iterator(); iter.hasNext(); )\n {\n Map.Entry entry = (Map.Entry) iter.next();\n\n Object oHolder = entry.getValue();\n\n if (oHolder instanceof NamedCache)\n {\n NamedCache cache = (NamedCache) entry.getValue();\n\n if (cache.isDestroyed() || cache.isReleased())\n {\n iter.remove();\n internalReleaseCache(cache);\n }\n }\n else if (oHolder instanceof SubjectScopedReference)\n {\n Collection col = ((SubjectScopedReference) oHolder).values();\n\n if (!col.isEmpty())\n {\n // all the entries in the SubjectScopedReference refer\n // to the same NamedCache instance, so we only need to\n // check the first one\n NamedCache cache = (NamedCache) col.iterator().next();\n if (cache.isDestroyed() || cache.isReleased())\n {\n iter.remove();\n internalReleaseCache(cache);\n }\n }\n }\n }\n\n if (mapByLoader.isEmpty())\n {\n iterByName.remove();\n }\n }\n }\n }",
"public void reset() {\n\t\tfor (Entry<TileCoordinate, DijkstraNode> entry: this.cache.entrySet()) {\n\t\t\tentry.getValue().reset();\n\t\t}\n\t}",
"public void clearDataCache() {\n\t\t_cumulativeVolumeTable.clear();\n\t\tbookMap.clear();\n\t\tquoteMap.clear();\n\t\tmillisCST = 0L;\n\t}",
"public void clear() {\n synchronized (mMxEventDispatcher) {\n mIsAlive = false;\n // remove any listener\n mMxEventDispatcher.clearListeners();\n }\n\n // clear the store\n mStore.close();\n mStore.clear();\n\n if (null != mSyncHandlerThread) {\n mSyncHandlerThread.quit();\n mSyncHandlerThread = null;\n }\n }",
"public void clearCache() {\n textureCache.clear();\n modelCache.clear();\n blockModelCache.clear();\n }"
] | [
"0.7459041",
"0.72057265",
"0.7026044",
"0.70079774",
"0.70052475",
"0.7003056",
"0.7003056",
"0.70026183",
"0.696416",
"0.69410115",
"0.68964136",
"0.68450534",
"0.67452353",
"0.67405236",
"0.67080617",
"0.6672596",
"0.66593844",
"0.6658855",
"0.6653267",
"0.66217",
"0.66138244",
"0.6603382",
"0.6602511",
"0.66023195",
"0.6589364",
"0.6570763",
"0.6560288",
"0.65562516",
"0.6552852",
"0.6531092",
"0.65197104",
"0.65153587",
"0.6510798",
"0.65062875",
"0.64956546",
"0.6494826",
"0.648404",
"0.64749706",
"0.64646286",
"0.6462011",
"0.6453154",
"0.64515805",
"0.64474624",
"0.6447417",
"0.64401585",
"0.64351326",
"0.6429426",
"0.6429426",
"0.6429426",
"0.64269465",
"0.6422357",
"0.6422357",
"0.6422357",
"0.6422357",
"0.6422357",
"0.6422357",
"0.6422357",
"0.6422357",
"0.6422357",
"0.6422357",
"0.6422357",
"0.6422357",
"0.6422357",
"0.6422357",
"0.6422357",
"0.6422357",
"0.6422357",
"0.6422357",
"0.6422357",
"0.6422357",
"0.64101267",
"0.6388129",
"0.63832873",
"0.63754296",
"0.63649005",
"0.63633657",
"0.6355497",
"0.63513017",
"0.6344595",
"0.63428855",
"0.6333278",
"0.6321255",
"0.6311029",
"0.63018686",
"0.6300163",
"0.6299654",
"0.6291315",
"0.62835175",
"0.6280958",
"0.62721527",
"0.62660253",
"0.62545276",
"0.6207921",
"0.61792636",
"0.61686003",
"0.6161907",
"0.61533076",
"0.61522055",
"0.614623",
"0.6144827",
"0.6141954"
] | 0.0 | -1 |
ObservableHashMap methods Removes all mappings from this map. Note: the removal of entries caused by this truncate operation will not be observable. | public synchronized void truncate()
{
clear(true);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public final void clear() { _map.clear(); }",
"@Override\r\n public void clear() {\r\n map.clear();\r\n }",
"public void clear() {\n map.clear();\n }",
"public void clear() {\n map.clear();\n }",
"public void clearMap() {\n if (mMap != null) {\n mMap.clear();\n }\n }",
"public void clear() {\n\t\tmap.clear();\n\t}",
"public void clear() {\r\n this.map.clear();\r\n }",
"public void\tclear() {\n\t\tmap.clear();\n\t}",
"public void clear() {\r\n\t\tentryMap.clear();\r\n\t}",
"public void clear() { \r\n\t\tmap.clear();\r\n\t}",
"@Override\n\tpublic void clear() {\n\t\tmap.clear();\n\t\tkeys.clear();\n\t}",
"public void clearMap()\n {\n ++this.versionStamp;\n IntHashMapEntry[] ainthashmapentry = this.slots;\n\n for (int i = 0; i < ainthashmapentry.length; ++i)\n {\n ainthashmapentry[i] = null;\n }\n\n this.count = 0;\n }",
"@Override\n public synchronized void clear() {\n this.keyMap.clear();\n super.clear();\n }",
"public abstract void removeFromMap();",
"public void clear()\n {\n getMap().clear();\n }",
"public void clearMappings() {\n if (mappings != null) {\n mappings.clear();\n }\n }",
"@SuppressWarnings(\"unchecked\")\n protected void onRemove()\n {\n // issue remove notification\n ObservableHashMap map = ObservableHashMap.this;\n if (map.hasListeners())\n {\n map.dispatchEvent(new MapEvent(map, MapEvent.ENTRY_DELETED,\n getKey(), getValue(), null));\n }\n }",
"public void removeAllChildMaps()\n {\n checkState();\n super.removeAllChildMaps();\n }",
"public void removeAllAttributeMaps()\n {\n checkState();\n super.removeAllAttributeMaps();\n }",
"public void clearAll() {\n rangeMap.clear();\n }",
"public void clear()\n\t{\n\t\tthrow new UnsupportedOperationException(\"Read Only Map\");\n\t}",
"@Override\n\tpublic boolean clear() \n\t{\n\t\tthis.map.clear();\n\t\treturn true;\n\t}",
"public void removeAllEntries() {\n }",
"void clearMap() {\n STRING_STATISTICS.clear();\n }",
"public void clear()\r\n {\r\n otherValueMap.clear();\r\n }",
"@Override\n\tpublic void clear() {\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tmap[i] = new LocalEntry<>();\n\t\t}\n\n\t}",
"public void clearMap() {\n\t\tfor (int i = 0; i < parkingsArray.size(); i++)\n\t\t\tparkingsArray.valueAt(i).removeMarker();\n\t\tparkingsArray.clear();\n\t\tmap.clear();\n\t}",
"public void clearMap() {\n this.mSimpleTargetIndexMap.clear();\n this.mSimpleTargetGroupChannelMap.clear();\n this.mChannelImageNumMap.clear();\n this.mChannelImageViewMap.clear();\n this.mChannelBitmapMap.clear();\n }",
"private void cleanup() {\n\t\tTreeSet<CacheEntry> entries = new TreeSet<CacheEntry>(map.values());\n\t\tint i = region.getItemsToEvict();\n\t\tIterator<CacheEntry> it = entries.iterator();\n\t\twhile (it.hasNext() && i > 0) {\n\t\t\tremoveEntry(it.next());\n\t\t\ti--;\n\t\t}\n\t}",
"public void removeAllData() {\n\t\tList<T> allData = this.getAllData();\r\n\t\t// clean the map\r\n\t\tthis.dataMap.clear();\r\n\t\t\r\n\t\t// notify the subscribers\r\n\t\tthis.notifyDeleted(allData);\r\n\t}",
"void removeAllEntries();",
"public void clearCache() {\n\t\tsynchronized(mappingLock) {\n\t\t\tinvalidateCache();\n\t\t}\n\t}",
"@Override\r\n public void clear() {\r\n this.roomMap.clear();\r\n this.buildingMap.clear();\r\n this.roomResponsibleOrgMap.clear();\r\n }",
"public static void clear() {\r\n\t\tdata.set(Collections.<String, String> emptyMap());\r\n\t}",
"@Override\n public void resetMap(){\n segmentList=new ArrayList<>();\n intersectionList=new ArrayList<>();\n this.setChanged();\n this.notifyObservers();\n }",
"public void deleteAllMappings() {\n\t\tSQLiteDatabase db = this.getWritableDatabase();\n\t\tdb.delete(TABLE_APP, null, null);\n\t\t\n\t\tsynchronized(mappingLock) {\n\t\t\tinvalidateCache();\n\t\t}\n\n\t}",
"public void shutdown() {\n map.shutdown();\n }",
"public void removeAllElementInsertionMaps()\n {\n list.removeAllElements();\n }",
"protected void clearNodeMap() {\n\n for (String id : this.nodeMap.keySet()) {\n\n this.ids.remove(id);\n }\n this.nodeMap.clear();\n }",
"public void clear() {\n\t\tentries.clear();\n\t}",
"public void clear() {\n this.entries = new Empty<>();\n }",
"public void clearAllAppMapCaches(){\n\t\tappmaps.clear();\n\t}",
"public void clear() {\r\n messageMap.clear();\r\n }",
"public void clearAll() {\n\t\tuserMap.clear();\n\t}",
"@Override\n public void onDestroy() {\n super.onDestroy();\n\n mMap.onDestroy();\n }",
"@Override\n protected void onDestroy() {\n super.onDestroy();\n gMap.clear();\n }",
"protected void clearHyperEdgeMap() {\n\n for (String id : this.hyperEdgeMap.keySet()) {\n\n this.ids.remove(id);\n }\n this.hyperEdgeMap.clear();\n }",
"@Test\n public void mapRemove() {\n check(MAPREM);\n query(MAPSIZE.args(MAPREM.args(MAPENTRY.args(1, 2), 1)), 0);\n }",
"protected void clearEdgeMap() {\n\n for (String id : this.edgeMap.keySet()) {\n\n this.ids.remove(id);\n }\n this.edgeMap.clear();\n }",
"public void clear() \n { \n int count = 0;\n while (!isEmpty())\n {\n dictionary[count] = null;\n count++;\n numberOfEntries--;\n }\n }",
"public static Boolean clearMap(){\n resultsMap.clear();\n return resultsMap.isEmpty();\n }",
"protected void invalidateAll() {\n\t\tfor (CacheEntry entry : map.values()) {\n\t\t\tentry.getItem().invalidate();\n\t\t}\n\t}",
"private static void clearAll(Map<String, Person> persons) {\n\t\tSet<Map.Entry<String, Person>> totPerson = persons.entrySet();\n\t\tfor(Map.Entry<String, Person> person : totPerson) {\n\t\t\tperson.getValue().clear();\n\t\t}\n\t}",
"public void clearAllDefinitionMappings()\n {\n _lovItemMappings.clear();\n }",
"@Override\n\t\tpublic void remove() {\n\t\t\tif ( _expectedSize != TOrderedHashMap.this.size() ) { throw new ConcurrentModificationException(); }\n\n\t\t\t// Disable auto compaction during the remove. This is a workaround\n\t\t\t// for bug 1642768.\n\t\t\ttry {\n\t\t\t\tTOrderedHashMap.this.tempDisableAutoCompaction();\n\t\t\t\tTOrderedHashMap.this.removeAt(_indicesByInsertOrder[_index]);\n\t\t\t} finally {\n\t\t\t\tTOrderedHashMap.this.reenableAutoCompaction(false);\n\t\t\t}\n\n\t\t\t_expectedSize--;\n\t\t}",
"@Override\n public void clear() {\n reference.dropColumnFamily(mapName);\n columnFamilyHandle = reference.getOrCreateColumnFamily(mapName);\n size.set(0L);\n updateLastModifiedTime();\n }",
"@Override\r\n\tpublic int delete(HashMap<String, Object> map) {\n\t\treturn 0;\r\n\t}",
"public synchronized void clearScanMap() {\n scanMap = null;\n }",
"public Object remove(Map<Prop, Object> map) {\n return map.remove(this);\n }",
"@Override\n public void removeAllValues() {\n Map<String, ?> map = preferences.getAll();\n Iterator<String> iterator = map.keySet().iterator();\n while (iterator.hasNext()) {\n removeValue(iterator.next());\n }\n }",
"public void clearAll() {\r\n msgMapping.clear();\r\n }",
"@Override\n public void clear() {\n for (LinkedList<Entry<K,V>> list : table) {\n list = null;\n }\n }",
"public void clear() {\n //construct(initialCap, loadFactor);\n \n //MapElement me = null;\n\n for (int i = 0; i < capacity; i++) {\n if (map[i] != null) {\n /*me = map[i];\n for (int j = 0; j < count[i]; j++) {\n MapElement release = me;\n me = me.getNext();\n releaseMapElement(release);\n }*/ \n map[i] = null;\n }\n }\n contents = 0;\n }",
"protected void clearGraphMap() {\n\n for (String id : this.graphMap.keySet()) {\n\n this.ids.remove(id);\n }\n this.graphMap.clear();\n }",
"@Test\n public void testClear_WithItems() {\n Map<String, String> toAdd = fillMap(1, 10);\n\n map.putAll(toAdd);\n\n configureAnswer();\n\n testObject.clear();\n\n for (Entry<String, String> entry : toAdd.entrySet()) {\n verify(helper).fireRemove(entry);\n }\n verifyNoMoreInteractions(helper);\n }",
"public void clear() {\n helpers.clear();\n islandKeysCache.clear();\n setDirty();\n }",
"public void clear() {\n\t\tthis.classMap.clear();\n\t}",
"private void clear() {\n\t\t\tkeySet.clear();\n\t\t\tvalueSet.clear();\n\t\t\tsize = 0;\n\t\t}",
"MapComp<K, V> removeAll(Predicate<K> p);",
"public void clearChangeSet()\r\n\t{\n\t\toriginal = new Hashtable(10);\r\n\t\t//System.out.println(\"111111 in clearChangeSet()\");\r\n\t\tins_mov = new Hashtable(10);\r\n\t\tdel_mod = new Hashtable(10);\r\n\r\n\t\tfor (int i = 0; i < seq.size(); i++) {\r\n\t\t\tReplicated elt = (Replicated) seq.elementAt(i);\r\n\t\t\toriginal.put(elt.getObjectID(), elt);\r\n\t\t}\r\n\t}",
"private void clearAll( )\n {\n for( Vertex v : vertexMap.values( ) )\n v.reset( );\n }",
"public void clearAppMapCache(String mapname){\n\t\tApplicationMap map = getAppMap(mapname);\n\t\tif (map instanceof ApplicationMap){\n\t\t\tmap.clearMap();\n\t\t}\n\t}",
"public Builder clearMapID() {\n bitField0_ = (bitField0_ & ~0x00000010);\n mapID_ = 0;\n onChanged();\n return this;\n }",
"public Builder clearMapID() {\n bitField0_ = (bitField0_ & ~0x00000008);\n mapID_ = 0;\n onChanged();\n return this;\n }",
"public Builder clearMapID() {\n bitField0_ = (bitField0_ & ~0x00000008);\n mapID_ = 0;\n onChanged();\n return this;\n }",
"public Builder clearMapID() {\n bitField0_ = (bitField0_ & ~0x00000008);\n mapID_ = 0;\n onChanged();\n return this;\n }",
"public Builder clearMapID() {\n bitField0_ = (bitField0_ & ~0x00000001);\n mapID_ = 0;\n onChanged();\n return this;\n }",
"public Builder clearMapID() {\n bitField0_ = (bitField0_ & ~0x00000001);\n mapID_ = 0;\n onChanged();\n return this;\n }",
"public Builder clearMapID() {\n bitField0_ = (bitField0_ & ~0x00000001);\n mapID_ = 0;\n onChanged();\n return this;\n }",
"public Builder clearMapID() {\n bitField0_ = (bitField0_ & ~0x00000001);\n mapID_ = 0;\n onChanged();\n return this;\n }",
"public Builder clearMapID() {\n bitField0_ = (bitField0_ & ~0x00000001);\n mapID_ = 0;\n onChanged();\n return this;\n }",
"public Builder clearMapID() {\n bitField0_ = (bitField0_ & ~0x00000004);\n mapID_ = 0;\n onChanged();\n return this;\n }",
"public Builder clearMapID() {\n bitField0_ = (bitField0_ & ~0x00000004);\n mapID_ = 0;\n onChanged();\n return this;\n }",
"public void clearCustomDictionaries () {\n\t\tcustomDictionaries.clear();\n\t}",
"protected void discard()\n {\n if (!isDiscarded())\n {\n OldOldCache map = OldOldCache.this;\n synchronized (map)\n {\n int cUnits = m_cUnits;\n if (cUnits == -1)\n {\n // entry is discarded; avoid repetitive events\n return;\n }\n\n if (cUnits > 0)\n {\n map.adjustUnits(-cUnits);\n }\n\n m_cUnits = -1;\n }\n\n // issue remove notification\n if (map.hasListeners())\n {\n map.dispatchEvent(map.instantiateMapEvent(\n MapEvent.ENTRY_DELETED, getKey(), getValue(), null));\n }\n }\n }",
"public synchronized void clear ()\n {\n for ( final Map.Entry<Object, FolderListener> entry : this.listeners.entrySet () )\n {\n entry.getValue ().changed ( entry.getKey (), new LinkedList<Entry> (), new LinkedList<String> (), true );\n }\n \n for ( final Map.Entry<String, Entry> entry : this.entryMap.entrySet () )\n {\n if ( entry instanceof FolderEntryCommon )\n {\n ( (FolderEntryCommon)entry ).getFolder ().removed ();\n }\n }\n \n this.entryMap.clear ();\n }",
"void clearShapeMap();",
"public Builder clearMapID() {\n bitField0_ = (bitField0_ & ~0x00000400);\n mapID_ = 0;\n onChanged();\n return this;\n }",
"public void clear()\r\n {\r\n for (int i = 0; i < values.length; i++)\r\n keys[i] = null;\r\n size = 0;\r\n }",
"private void removeEvicted() {\n Map<K,CacheableObject> removeMap = new HashMap<K,CacheableObject>(valueMap.size()/2);\n List<CacheListener<K>> tempListeners = new ArrayList<CacheListener<K>>();\n\n // Retrieve a list of everything that's to be removed\n synchronized(theLock) {\n removeMap.putAll(toEvictMap);\n toEvictMap.clear();\n tempListeners.addAll(listeners);\n }\n\n // Remove the entries one-at-a-time, notifying the listener[s] in the process\n for (Map.Entry<K,CacheableObject> entry : removeMap.entrySet()) {\n synchronized(theLock) {\n currentCacheSize -= entry.getValue().containmentCount;\n valueMap.remove(entry.getKey());\n }\n Thread.yield();\n\n for (CacheListener<K> listener : tempListeners) {\n listener.evictedElement(entry.getKey());\n }\n }\n }",
"public Builder clearMapID() {\n bitField0_ = (bitField0_ & ~0x00000002);\n mapID_ = 0;\n onChanged();\n return this;\n }",
"public void remove(Object key){\n map.remove(key);\n }",
"@SuppressWarnings({\"unchecked\", \"CallToThreadYield\"})\n public void cleanup() {\n\n long now = System.currentTimeMillis();\n ArrayList<K> deleteKey;\n\n synchronized (cacheMap) {\n MapIterator itr = cacheMap.mapIterator();\n\n deleteKey = new ArrayList<>((cacheMap.size() / 2) + 1);\n K key;\n CacheObject c;\n\n while (itr.hasNext()) {\n key = (K) itr.next();\n c = (CacheObject) itr.getValue();\n\n if (c != null && (now > (timeToLive + c.lastAccessed))) {\n deleteKey.add(key);\n }\n }\n }\n\n deleteKey.stream().map((key) -> {\n synchronized (cacheMap) {\n Object remove = cacheMap.remove(key);\n }\n return key;\n }).forEachOrdered((K _item) -> {\n Thread.yield();\n });\n }",
"public void removeMaps(GridMap map){\n mapsList.remove(map);\n //Observer pattern\n setChanged();\n notifyObservers(this);\n }",
"public void clearRealmCollection() {\n if (mRvHistoryAdapter.getData() != null) {\n mRealm.beginTransaction();\n for (TranslationInfo translationInfo : mRvHistoryAdapter.getData()) {\n translationInfo.getTranslation().deleteFromRealm();\n translationInfo.getDictionary().getDefinitionsList().deleteAllFromRealm();\n translationInfo.getDictionary().deleteFromRealm();\n }\n mRvHistoryAdapter.getData().deleteAllFromRealm();\n mRealm.commitTransaction();\n }\n }",
"public void clearObservers(){\r\n\t\tobservers.clear();\r\n\t}",
"public void mo110858c() {\n HashMap hashMap = this.f90728d;\n if (hashMap != null) {\n hashMap.clear();\n }\n }",
"public Configuration clearPropertiesEntries() {\n this.properties = null;\n return this;\n }",
"private void removeMappings() {\n\t\tfor (final VisualMappingFunction<?, ?> vm : validMappings)\n\t\t\tstyle.removeVisualMappingFunction(vm.getVisualProperty());\n\t}",
"@SuppressWarnings(\"unchecked\") // Needed to stop Eclipse whining\n private void resetWithHole() {\n Entry<K, V>[] entries = new Entry[] {a, c};\n super.resetMap(entries);\n navigableMap = (NavigableMap<K, V>) getMap();\n }",
"public void removeAll() {\n _hash = new Hashtable();\n _first = null;\n _last = null;\n }"
] | [
"0.7233048",
"0.7203419",
"0.7165494",
"0.7061087",
"0.6992358",
"0.696973",
"0.6966147",
"0.69412744",
"0.6929842",
"0.69247454",
"0.6898066",
"0.6893612",
"0.687557",
"0.6615736",
"0.64882874",
"0.6486082",
"0.64858085",
"0.64391994",
"0.63667667",
"0.63451856",
"0.6341516",
"0.63170797",
"0.62777466",
"0.62611836",
"0.62500244",
"0.6223899",
"0.62141824",
"0.6204752",
"0.61970156",
"0.6190266",
"0.6185594",
"0.6172558",
"0.6080616",
"0.6067473",
"0.6048206",
"0.6014646",
"0.5999329",
"0.5977011",
"0.5954828",
"0.59509027",
"0.5922988",
"0.58861226",
"0.5882641",
"0.58515626",
"0.5838243",
"0.58172685",
"0.58047515",
"0.5771255",
"0.5769608",
"0.57689095",
"0.5745073",
"0.5740451",
"0.5733754",
"0.5732271",
"0.5716319",
"0.5693888",
"0.5693408",
"0.56697804",
"0.56555545",
"0.5623751",
"0.5619692",
"0.56129825",
"0.5608699",
"0.5600319",
"0.55883944",
"0.55751246",
"0.5558527",
"0.55350477",
"0.5524902",
"0.5513999",
"0.5513838",
"0.55107546",
"0.5505287",
"0.5501298",
"0.5501298",
"0.5500114",
"0.5496374",
"0.5496374",
"0.54959476",
"0.54959476",
"0.54959476",
"0.5495271",
"0.5495271",
"0.5491574",
"0.5487893",
"0.5484171",
"0.5480228",
"0.54796404",
"0.54706293",
"0.54663306",
"0.5464216",
"0.5445547",
"0.5441489",
"0.54405284",
"0.5435833",
"0.5414493",
"0.5412268",
"0.5409302",
"0.5384576",
"0.5364976",
"0.5361859"
] | 0.0 | -1 |
event dispatching Accessor for the MapListenerSupport for subclasses. | protected MapListenerSupport getMapListenerSupport()
{
return m_listenerSupport;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface MapDrawableAdapterListener extends EventListener\r\n{\r\n /**\r\n * Signaled when an MapDrawableAdapters object is removed.\r\n *\r\n * @param drawableAdapter the MapDrawableAdapter whose object is being removed.\r\n */\r\n public abstract void mapDrawableAdapterRemoved(MapDrawableAdapter drawableAdapter);\r\n \r\n /**\r\n * Signaled when displaylists in an MapDrawableAdapter needs to be\r\n * recompiled.\r\n *\r\n * @param drawableAdapter the MapDrawableAdapter that needs to be updated.\r\n */\r\n public abstract void mapDrawableAdapterUpdated(MapDrawableAdapter drawableAdapter);\r\n\r\n /**\r\n * Signaled when an object is added to an MapDrawableAdapters object.\r\n *\r\n * @param object the new object.\r\n */\r\n public abstract void mapDrawableAdapterChildAdded(StratmasObject object);\r\n}",
"interface MapListener\n extends HuaweiMap.OnCameraMoveListener,\n HuaweiMap.OnCameraMoveStartedListener,\n HuaweiMap.OnCameraIdleListener,\n HuaweiMap.OnMarkerClickListener,\n HuaweiMap.OnMarkerDragListener,\n HuaweiMap.OnInfoWindowClickListener,\n HuaweiMap.OnPolylineClickListener,\n HuaweiMap.OnPolygonClickListener,\n HuaweiMap.OnCircleClickListener,\n HuaweiMap.OnMapClickListener,\n HuaweiMap.OnMapLongClickListener {\n}",
"public interface MapEvent extends GameEvent {\n GameMap getMap();\n}",
"public interface TrackerListener {\n /**\n * Provide Location Updates to parent classes (E.g. Map Provider's LocationDataSource class)<br>\n * The implementation of Tracker Interface should call this method when they receive new location updates.\n * @param coords\n * @see Tracker\n */\n void onNewCoords(Coords coords);\n\n /**\n * Provide Event updates to parent classes (E.g. Map Provider's LocationDataSource class)<br>\n * The implementation of Tracker Interface should call this method when they receive event info that they want to pass on to the parent classes.\n * @param event\n * @see Tracker\n */\n void onNewEvent(Event event);\n}",
"void addListener(MapDelegateEventListener<K, V> listener);",
"public interface IMapDetailsEvent {\n\n void onMapClick();\n\n void onPolylineClick(int roadPos);\n\n\n}",
"public interface Inner_3dMap_locationListener\n{\n\n\tpublic abstract void onLocationChanged(Inner_3dMap_location inner_3dmap_location);\n}",
"public interface IBaseListener {\n}",
"void addListener(MapChangeListener<? super K, ? super V> listener);",
"@Override\n public void addListener(Class<? extends EventListener> listenerClass) {\n\n }",
"public void handleMapEvent(MapEvent event);",
"public abstract void addListener(EventListener eventListener, String componentName);",
"public abstract void registerListeners();",
"protected abstract void collectFires(Collection<Object> evAndListeners);",
"@Override\n\tpublic void getListener(){\n\t}",
"public interface MapRenderer {\n\n AnnotationView viewForAnnotation(Annotation annotation);\n\n void annotationViewWillBeRemoved(AnnotationView annotationView);\n void annotationViewDidRemove(AnnotationView annotationView);\n\n void annotationViewWillBeAdded(AnnotationView annotationView);\n void annotationViewDidAdd(AnnotationView annotationView);\n\n}",
"public interface ZoneClickedEventListener extends EventListener {\n\n void handleClick(ZoneClickedEvent event);\n}",
"public interface MapReadyListener {\n\n void mapIsReady();\n}",
"public void init(Map<Class, List<?>> listenersMap) {\n for (Map.Entry<Class, List<?>> entry : listenersMap.entrySet()) {\n Class eventClass = entry.getKey();\n boolean includeOnlyImplementations = true;\n for (Object implClass : entry.getValue()) {\n if (!eventClass.isAssignableFrom(implClass.getClass())) {\n includeOnlyImplementations = false;\n logger.error(\"List of implClasses must include only implementations of event interface, problem in key \" + eventClass.getName());\n break;\n }\n }\n if (includeOnlyImplementations) {\n eventListeners.put(eventClass, entry.getValue());\n }\n }\n }",
"public interface DispatchListener {\n void onDispatchClickListener(Dispatch dispatch);\n}",
"public abstract Map<String, Event> getEvents();",
"@Override\n\tpublic void eventSelectTracker() {\n\t\t\n\t}",
"public interface RehaTPEventListener extends EventListener {\npublic void rehaTPEventOccurred(RehaTPEvent evt );\n/*public void RehaTPEventOccurred(TerminFenster evt );\npublic void RehaTPEventOccurred(Container evt );\npublic void RehaTPEventOccurred(Object evt );\npublic void RehaTPEventOccurred(SystemLookAndFeel evt );\n*/\n}",
"public interface EventEmitter\n{\n\n public abstract void disable();\n\n public abstract void emit(String s);\n\n public abstract void emit(String s, Map map);\n\n public abstract void enable();\n\n public abstract void off();\n\n public abstract void off(String s, int i);\n\n public abstract int on(String s, EventListener eventlistener);\n\n public abstract int once(String s, EventListener eventlistener);\n\n public abstract void request(String s, EventListener eventlistener);\n\n public abstract void request(String s, Map map, EventListener eventlistener);\n\n public abstract void respond(Event event);\n\n public abstract void respond(Map map);\n}",
"@Override\n public void addListener(String className) {\n\n }",
"public interface OnEventControlListener {\r\n\tvoid onEvent(int eventType, View control, Object data);\r\n}",
"@EventName(\"targetInfoChanged\")\n EventListener onTargetInfoChanged(EventHandler<TargetInfoChanged> eventListener);",
"public void addMapListener(MapListener listener) {\n if(internalNative == null) {\n if(internalLightweightCmp != null) {\n internalLightweightCmp.addMapListener(listener);\n } else {\n // TODO: Browser component \n }\n return;\n }\n if(listeners == null) {\n listeners = new ArrayList<MapListener>();\n }\n listeners.add(listener);\n }",
"@Override\n public <T extends EventListener> void addListener(T t) {\n\n }",
"public interface IFightEvent {\n AbstractStageEventListener stageListener = StageManager.getInstance().getStageEventListener();\n EventManager eventManager = EventManager.getInstance();\n default void gainHealth(FightRole role, int val) {\n stageListener.onGainHealth(role, val);\n }\n\n default void loseHealth(FightRole role, int val) {\n\n }\n\n default void causeDamage(FightRole role, int val) {\n\n }\n\n default void beDamaged(FightRole role, int val) {\n\n }\n\n default void getHurt(FightRole role, int val) {\n stageListener.onGetHurt(role, val);\n // FIXME\n\n }\n\n void on(FightEvent event, Callback callback);\n\n void one(FightEvent event, Callback callback);\n\n void triggle(FightEvent event);\n\n void triggle(StageEvent event);\n}",
"private void dispatchEvent(final Class<? extends Geometry> targetClass) {\n\n\t\tfor (TargetLayerListener listener : this.listeners) {\n\n\t\t\tlistener.newGeometrySelected(targetClass);\n\t\t\tlistener.validateTargetLayer();\n\t\t}\n\t}",
"@FutureRelease(version = \"3.0.0\")//$NON-NLS-1$\r\npublic interface ATEListener extends EventListener {\r\n\r\n\t/**\r\n\t * Indicates that the list of Java classes has changed.\r\n\t */\r\n\tpublic void classListChanged();\r\n\r\n\t/**\r\n\t * Indicates that a maze has changed.\r\n\t * \r\n\t * @param maze\r\n\t * \t\t\tThe changed maze.\r\n\t */\r\n\tpublic void mazeChanged(Maze maze);\r\n\r\n\t/**\r\n\t * Indicates that a scenario has changed.\r\n\t * \r\n\t */\r\n\tpublic void scenarioChanged();\r\n\r\n}",
"@Override\r\n public void processEvent(IAEvent e) {\n\r\n }",
"public interface ObservableMap<K, V> extends Map<K, V>, Observable {\n\n /**\n * Add a listener to this observable map.\n *\n * @param listener\n * the listener for listening to the list changes\n */\n void addListener(MapChangeListener<? super K, ? super V> listener);\n\n /**\n * Tries to removed a listener from this observable map. If the listener is not attached to this map, nothing\n * happens.\n *\n * @param listener\n * a listener to remove\n */\n void removeListener(MapChangeListener<? super K, ? super V> listener);\n\n /**\n * Verify if a {@code MapChangeListener} already exist for this {@code ObservableMap}.\n *\n * @param listener\n * the {@code MapChangeListener} to verify\n *\n * @return {@code true}, if the listener already listens, {@code false} otherwise.\n */\n boolean isMapChangeListenerAlreadyAdded(MapChangeListener<? super K, ? super V> listener);\n\n}",
"public interface OnBaseUIListener {\n}",
"abstract public void addListener(Listener listener);",
"public interface ManagerListener extends EventListener {\r\n\t\r\n\t/**\r\n\t * Method to notify that a manager has joined the application.\r\n\t *\r\n\t * @param e the event\r\n\t */\r\n\tpublic void managerAdded(ManagerEvent e);\r\n\t\r\n\t/**\r\n\t * Method to notify that a manager's active model has been modified\r\n\t * to reflect a new design task.\r\n\t *\r\n\t * @param e the event\r\n\t */\r\n\tpublic void managerModelModified(ManagerEvent e);\r\n\t\r\n\t/**\r\n\t * Method to notify that a manager's output has been modified to \r\n\t * reflect a new set of inputs from designers.\r\n\t *\r\n\t * @param e the event\r\n\t */\r\n\tpublic void managerOutputModified(ManagerEvent e);\r\n\t\r\n\t/**\r\n\t * Method to notify that a manger has left the application.\r\n\t *\r\n\t * @param e the event\r\n\t */\r\n\tpublic void managerRemoved(ManagerEvent e);\r\n}",
"@SuppressWarnings(\"unchecked\")\n protected void onAdd()\n {\n // issue add notification\n ObservableHashMap map = ObservableHashMap.this;\n if (map.hasListeners())\n {\n map.dispatchEvent(new MapEvent(map, MapEvent.ENTRY_INSERTED,\n getKey(), null, getValue()));\n }\n }",
"@Override\r\n\tpublic void onEvent(Object e) {\n\t}",
"public interface ActiveEvent {\n\n /**\n * Dispatch the event to its target, listeners of the events source,\n * or do whatever it is this event is supposed to do.\n */\n public void dispatch();\n}",
"public interface GamePanelListener {}",
"public interface BaseMapActivityInterface {\n\n void onMapReadyNext();\n\n int initMapType();\n\n int initContainerId();\n}",
"protected Listener(){super();}",
"@Override\r\n\tprotected void bindEvents() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void bindEvents() {\n\t\t\r\n\t}",
"public interface EventHandler\n{\n\t/**\n\t * Process the given event. Called by the EventMonitor when an event occurs.\n\t * \n\t * @param event\n\t * @throws Exception if something goes wrong\n\t */\n\tpublic void handle(TogglesEvent event)\n\tthrows Exception;\n\t\n\t/**\n\t * Answers whether this EventHandler can handle events of the given type.\n\t * If true is returned, the EventMonitor will call handle(), otherwise,\n\t * the EventMonitor will not ask this event handler to process the event.\n\t * \n\t * @param eventClass\n\t * @return\n\t */\n\tpublic boolean handles(Class<? extends TogglesEvent> eventClass);\n}",
"public interface ApplicationListener extends EventListener {\n\n /**\n * Handle an application event\n *\n * @param e event to respond to\n */\n void onApplicationEvent(ApplicationEvent e);\n\n}",
"public interface IFeatureDrawEventListener extends IEventListener<FeatureDrawEvent> {\n \n}",
"public interface EventListener {\n\t/**\n\t * Add an EventHandler to handle events for processing.\n\t * @param handler the EventHandler to add\n\t */\n\tpublic void addHandler(EventHandler handler);\n}",
"private EventNotifier<OIFitsCollectionManagerEvent, OIFitsCollectionManagerEventType, Object> getOiFitsCollectionChangedEventNotifier() {\n return this.oiFitsCollectionManagerEventNotifierMap.get(OIFitsCollectionManagerEventType.COLLECTION_CHANGED);\n }",
"@Override\n\tpublic synchronized void registerEventListeners() {\n\t\tif (eventListeners != null) // already called\n\t\t\treturn;\n\t\teventListeners = EventListenerManagers.wrap(this);\n\t\tSelectionUpdateListener selectionUpdateListener = new SelectionUpdateListener();\n\t\tselectionUpdateListener.setHandler(this);\n\t\teventListeners.register(SelectionUpdateEvent.class, selectionUpdateListener);\n\n\t\tSelectionCommandListener selectionCommandListener = new SelectionCommandListener();\n\t\tselectionCommandListener.setHandler(this);\n\t\t// selectionCommandListener.setDataDomainID(dataDomain.getDataDomainID());\n\t\teventListeners.register(SelectionCommandEvent.class, selectionCommandListener);\n\n\t\tsuper.registerEventListeners();\n\n\n\t}",
"public interface TouchEventListener extends SgEventListener<TouchEvent> {\n}",
"@Override\r\n\tpublic void onEvent(Event arg0) {\n\r\n\t}",
"public interface OnLoadMapListener {\n public void onLoadMapSelected(String mapFilePath);\n }",
"public interface Listener {}",
"private void setListeners() {\n\n }",
"public interface EventListener<E extends EventObject> extends java.util.EventListener {\n\n void postEvent(E event);\n}",
"@Override\r\n\tprotected void setListeners() {\n\t\t\r\n\t}",
"public interface EventListener {\n\n\t/**\n\t * Called when a task event has occurred.\n\t * \n\t * @param event\n\t * the task event which has occurred\n\t */\n\tvoid eventOccurred(AbstractTaskEvent event);\n}",
"public interface DefaultEventManager {\n /**\n * Throw the events store in the manager\n */\n void throwEvents();\n \n /**\n * Add an observer of goal event\n * @param obs\n */\n void addGoalObserver(GoalObserver obs);\n \n /**\n * Add an observer of paddle contact event\n * @param obs\n */\n void addPaddleContactObserver(PaddleContactObserver obs);\n \n /**\n * Add an observer of border contact event\n * @param observer\n */\n void addBorderContactObserver(BorderObserver observer);\n \n /**\n * Add an observer of player -> ball contact\n * @param observer\n */\n void addPlayerObserver(PlayerObserver observer);\n \n /**\n * Adds an observer for the power up contact event.\n * @param observer\n */\n void addPowerUpContactObserver(PowerUpObserver observer);\n \n /**\n * Add an event which will be thrown\n * @param goal\n * @param ball\n */\n void addEventGoal(DefaultGoal goal, DefaultBall ball);\n\n /**\n * Add an event which will be thrown\n * @param player\n * @param team\n */\n void addEventPlayers(Player player, boolean team);\n\n /**\n * Add an event which will be thrown\n * @param player\n * @param ball\n */\n void addEventPaddle(DefaultPlayer player, DefaultBall ball);\n\n /**\n * Add an event which will be thrown\n * @param border\n * @param ball\n */\n void addEventBorder(DefaultBorder border, DefaultBall ball);\n \n /**\n * Adds a power up event to be thrown.\n * @param powerUp\n */\n void addEventPowerUp(DefaultPowerUp powerUp);\n}",
"public interface Listener {\n /**\n * Called when the user has performed a double tap and then held down\n * the second tap.\n *\n * @param event The most recent MotionEvent received.\n * @param policyFlags The policy flags of the most recent event.\n */\n void onDoubleTapAndHold(MotionEvent event, int policyFlags);\n\n /**\n * Called when the user lifts their finger on the second tap of a double\n * tap.\n *\n * @param event The most recent MotionEvent received.\n * @param policyFlags The policy flags of the most recent event.\n *\n * @return true if the event is consumed, else false\n */\n boolean onDoubleTap(MotionEvent event, int policyFlags);\n\n /**\n * Called when the system has decided the event stream is a gesture.\n *\n * @return true if the event is consumed, else false\n */\n boolean onGestureStarted();\n\n /**\n * Called when an event stream is recognized as a gesture.\n *\n * @param gestureId ID of the gesture that was recognized.\n *\n * @return true if the event is consumed, else false\n */\n boolean onGestureCompleted(int gestureId);\n\n /**\n * Called when the system has decided an event stream doesn't match any\n * known gesture.\n *\n * @param event The most recent MotionEvent received.\n * @param policyFlags The policy flags of the most recent event.\n *\n * @return true if the event is consumed, else false\n */\n public boolean onGestureCancelled(MotionEvent event, int policyFlags);\n }",
"private void addDefaultHandlers()\n\t{\n\t\t\t\tthis.openLayersMap.getMap().addMapZoomListener(new MapZoomListener()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic void onMapZoom(MapZoomEvent eventObject)\n\t\t\t{\n\t\t\t\t//TODO - Do nothing for now, leaving in for testing.\n\t\t\t}\n\t\t});\n\t\t\n\t\t/**\n\t\t This event register is neeeded, because in case the user resizes the browser window, openlayer for some reason\n\t\t\tzooms in. So when it does that, we get back to the default zoom by using the zoomTo method.\n\t\t */\n\t\tthis.openLayersMap.getMap().getEvents().register(\"zoomend\", this.openLayersMap.getMap(), new EventHandler() \n\t\t{\n @Override\n public void onHandle(EventObject eventObject)\n {\n \t\t/**\n \t\t\tUsing this technique here, because, in the event that the user double clicks on the map\n\t \t\twe need to wait till this action has completed and then revert to the default map zoom.\n\t \t\tIf we didn't have this, the \"revert\" would not be successful.\n\t \t\thttp://dantwining.co.uk/2010/03/01/gwt-openlayers-and-full-screen-maps/\n \t\t */\n \t\t\t\t Scheduler.get().scheduleDeferred(new ScheduledCommand() \n \t\t\t {\n \t\t\t\t \t@Override\n \t\t\t\t \tpublic void execute()\n \t\t\t\t \t{\n \t\t\t\t \t\topenLayersMap.getMap().zoomTo(ZOOM_LEVEL);\n \t\t\t \t\t\t\tSystem.out.println(\"@MapComponent, @zoomend, Reverting to Map Zoom: \"+openLayersMap.getMap().getZoom());\n \t\t\t\t \t}\n \t\t\t });\n }\n });\n\t\t\n\t\t/**\n\t\t * This event register is needed because, on mobile devices (tested on ipad2 and ipad mini), after the update size\n\t\t * triggered when the screen went from landscape to portait (in MainAppView) the upper tiles were white. In other\n\t\t * words, the transition did not update the map-tiles-in-view to the new map size. So, by doing this, the map zooms in \n\t\t * when the update size is triggered, which \"enforces\" the updating of the map tiles. Also, because of the \"zoomend\"\n\t\t * event the map will revert to the default zoom level after this.\n\t\t */\n\t\tthis.openLayersMap.getMap().getEvents().register(\"updatesize\", this.openLayersMap.getMap(), new EventHandler() \n\t\t{\n @Override\n public void onHandle(EventObject eventObject)\n {\n \t\t\t\t Scheduler.get().scheduleDeferred(new ScheduledCommand() \n \t\t\t {\n \t\t\t\t \t@Override\n \t\t\t\t \tpublic void execute()\n \t\t\t\t \t{\n \t\t\t\t \t\topenLayersMap.getMap().zoomTo(ZOOM_LEVEL+1);\n \t\t\t \t\t\t\tSystem.out.println(\"@MapComponent, @updatesize, Re-zooming after size update: \"+openLayersMap.getMap().getZoom());\n \t\t\t\t \t}\n \t\t\t });\n }\n });\n\t\t\n\t\t/**\n\t\tThe following is useful if we want to convert map coordinates to pixel x,y coordinates.\n\t\tSo, if we want to draw on top of a map layer, this seems to be a good way to do it.\n\t\thttp://stackoverflow.com/questions/6032460/mousemove-events-in-gwt-openlayers \n\t\t \n\t\tthis.openLayersMap.getMap().getEvents().register(\"mousemove\", this.openLayersMap.getMap(), new EventHandler() \n\t\t{\n @Override\n public void onHandle(EventObject eventObject)\n {\n JSObject xy = eventObject.getJSObject().getProperty(\"xy\");\n Pixel px = Pixel.narrowToPixel(xy);\n LonLat lonlat = openLayersMap.getMap().getLonLatFromPixel(px);\n System.out.println(\"Caught mousemove event: \"+lonlat);\n }\n });\n\t\t*/\n\t}",
"public void enableMultiTouchElementListeners() {\r\n\t\tif (itemListeners == null) {\r\n\t\t\titemListeners = new ArrayList<ItemListener>();\r\n\t\t}\r\n\t\tif (screenCursorListeners == null) {\r\n\t\t\tscreenCursorListeners = new ArrayList<ScreenCursorListener>();\r\n\t\t}\r\n\t\tif (orthoControlPointRotateTranslateScaleListeners == null) {\r\n\t\t\torthoControlPointRotateTranslateScaleListeners = new ArrayList<OrthoControlPointRotateTranslateScaleListener>();\r\n\t\t}\r\n\t\tif (bringToTopListeners == null) {\r\n\t\t\tbringToTopListeners = new ArrayList<BringToTopListener>();\r\n\t\t}\r\n\t\tif (orthoSnapListeners == null) {\r\n\t\t\torthoSnapListeners = new ArrayList<OrthoSnapListener>();\r\n\t\t}\r\n\t\tif (flickListeners == null) {\r\n\t\t\tflickListeners = new ArrayList<OrthoFlickListener>();\r\n\t\t}\r\n\t\t\r\n\t\t((IOrthoContentItemImplementation) this.contentItemImplementation)\r\n\t\t\t\t.addBringToTopListener(this);\r\n\t\t((IOrthoContentItemImplementation) this.contentItemImplementation)\r\n\t\t\t\t.addItemListener(this);\r\n\t\t((IOrthoContentItemImplementation) this.contentItemImplementation)\r\n\t\t\t\t.addOrthoControlPointRotateTranslateScaleListener(this);\r\n\t\t((IOrthoContentItemImplementation) this.contentItemImplementation)\r\n\t\t\t\t.addSnapListener(this);\r\n\t\t((IOrthoContentItemImplementation) this.contentItemImplementation)\r\n\t\t\t\t.addFlickListener(this);\r\n\t}",
"public interface Listener{\n\t\tpublic void notify(Map<String,Serializable> datas);\n\t}",
"@Override\n\tpublic void addListener() {\n\t\t\n\t}",
"public abstract List getRootListeners();",
"@Override\r\n\tpublic void setListener() {\n\r\n\t}",
"@Override\r\n\tpublic void setListener() {\n\r\n\t}",
"private void setupEventHandlers() {\n myMap.addEventHandler(MapViewEvent.MAP_CLICKED, event -> {\n event.consume();\n final Coordinate newPosition = event.getCoordinate().normalize();\n latitude.setText(newPosition.getLatitude().toString());\n longitude.setText(newPosition.getLongitude().toString());\n\n this.markerClick.setPosition(newPosition);\n this.myMap.addMarker(this.markerClick);\n });\n }",
"public interface ListenerSupport<T> {\n\n /**\n * register new listener\n */\n public void addListener(T listener);\n\n /**\n * removed already added listener\n */\n public void removeListener(T listener);\n\n}",
"@Override\n public void handleMarkersListener(GoogleMap googleMap) {\n this.addMarkersListener(googleMap);\n }",
"public interface OnEventAvailableListener {\n\tpublic void OnEventAvailable(Message msg);\n}",
"public interface StationMarkerListener {\n void onNewMarkers(List<StationMarker> markers);\n}",
"@Override\n\tpublic void processEvent(Event e) {\n\n\t}",
"public interface HitNotifier {\n\n /**\n * Add hl as a listener to hit events.\n * @param hl the hit listener\n */\n void addHitListener(HitListener hl);\n\n /**\n * Remove hl from the list of listeners to hit events.\n * @param hl the hit listener\n */\n void removeHitListener(HitListener hl);\n}",
"@Override\n\tpublic void setListener() {\n\n\t}",
"public interface WFEventListener extends ActivityInsEventListener, ProcessInsEventListener {\r\n\r\n /**\r\n * called when a timer event is fired;\r\n */\r\n public void onTimerEvent();\r\n\r\n public void addECAList(ECAList list);\r\n\r\n}",
"public interface HitNotifier {\r\n\r\n /**\r\n * @param hl a hit listener\r\n * Add hl as a listener to hit events.\r\n */\r\n void addHitListener(HitListener hl);\r\n}",
"public interface Listener {\n}",
"public interface Listener {\n}",
"@Override\n public synchronized void processEvent(GovernanceEngineEvent event)\n {\n if ((listenerMap != null) && (event != null))\n {\n for (String connectorId : listenerMap.keySet())\n {\n if (connectorId != null)\n {\n WatchdogListener watchdogListener = listenerMap.get(connectorId);\n\n if (watchdogListener != null)\n {\n watchdogListener.processEvent(event);\n }\n }\n }\n }\n }",
"public abstract void addListener(RegistryChangeListener listener);",
"public ListenerSet(Class<E> iface, Executor executor) {\n\t\tmap = new ListenerMap<E, E, E>(iface, executor) {\n\t\t\t@Override\n\t\t\tprotected Map<E, ListenerEntry<? extends E>> createMap() {\n\t\t\t\treturn ListenerSet.this.createMap();\n\t\t\t};\n\t\t};\n\t\tfire = map.fire;\n\t}",
"public interface EldersInfoListener {\n void eldersInfoListener(int position);\n}",
"public interface IEvenListener {\n}",
"public interface IController extends GoogleMap.OnPolygonClickListener, GoogleMap.OnMarkerClickListener, GoogleMap.OnCameraChangeListener {\n public enum Location{\n START,END\n }\n public void focusOn(Location location);\n\n public void add();\n\n public void weight(String newWeight);\n\n public void goInside();\n\n public void startUp();\n\n public void setLevel(int level);\n}",
"public interface Event {\n\n}",
"public interface Event {\n\n}",
"private EventNotifier<OIFitsCollectionManagerEvent, OIFitsCollectionManagerEventType, Object> getPlotListChangedEventNotifier() {\n return this.oiFitsCollectionManagerEventNotifierMap.get(OIFitsCollectionManagerEventType.PLOT_LIST_CHANGED);\n }",
"public AttributeMapBindingListener getListener() {\r\n\t\treturn listener;\r\n\t}",
"public interface JoystickListener {\n\n public void setOnTouchListener(int xValue, int yValue);\n\n public void setOnMovedListener(int xValue, int yValue);\n\n public void setOnReleaseListener(int xValue, int yValue);\n\n}",
"public EventNotifier<OIFitsCollectionManagerEvent, OIFitsCollectionManagerEventType, Object> getPlotChangedEventNotifier() {\n return this.oiFitsCollectionManagerEventNotifierMap.get(OIFitsCollectionManagerEventType.PLOT_CHANGED);\n }",
"@Override\n\t\tpublic void onMapStatusChange(MapStatus arg0) {\n\n\t\t}",
"public interface ISemanticEventListener {\n\n\t/**\n\t * Notifies this listener that a semantic event has happened.\n\t * @param event - the semantic event\n\t */\n\tvoid notify(IUISemanticEvent event);\n \n\t////////////////////////////////////////////////////////////////////////////\n\t//\n\t// Meta events\n\t//\n\t////////////////////////////////////////////////////////////////////////////\n\n\t//TODO: maybe these meta-notifications should not have there own methods?\n\t\n /**\n * Notifies this listener that event recording has started.\n */\n void notifyStart();\n \n /**\n * Notifies this listener that event recording has stopped.\n */\n void notifyStop();\n\n /**\n * Notifies this listener that the event stream is to be written.\n */\n void notifyWrite();\n \n /**\n * Notifies this listener that root display has been disposed (effectively, recording is terminated).\n */ \n void notifyDispose();\n\n\t/**\n\t * Notifies this listener that the event stream is to be flushed and restarted.\n\t */\n\tvoid notifyRestart();\n\n\t/**\n\t * Notifies this listener that the event stream is to be paused.\n\t */\n\tvoid notifyPause();\n\t\n\t/**\n\t * Notifies this listener that an error occured during recording.\n\t * @param event - the error event\n\t */\n\tvoid notifyError(RecorderErrorEvent event);\n\n\t/**\n\t * Notifies this listener that a trace event was sent during recording.\n\t * @param event - the trace event\n\t */\n\tvoid notifyTrace(RecorderTraceEvent event);\n\n\t/**\n\t * Notifies this listener that a hook added vent was sent during recording.\n\t * @param hookName \n\t */\n\tvoid notifyAssertionHookAdded(String hookName);\n\t\n\t/**\n\t * Notifies that Recorder Controller was started and listens on specific port \n\t * @param port the port number that this controller started listen on\n\t */\n\tpublic void notifyControllerStart(int port);\n\t\n\t/**\n\t * Notifies this listener that Display instance was not found in the application process\n\t */\n\tpublic void notifyDisplayNotFound();\n\n\t/**\n\t * Notifies the listener that spy mode has been toggled.\n\t */\n\tvoid notifySpyModeToggle();\n}",
"@Override\n\tprotected void setListener() {\n\n\t}",
"@Override\n\tprotected void setListener() {\n\n\t}",
"public void testAddActionEventListener2_Accuracy() {\n eventManager.addActionEventListener(actionEventListener1);\n eventManager.addActionEventListener(actionEventListener2);\n eventManager.addActionEventListener(actionEventListener3);\n\n Map<Class, Set<ActionEventListener>> map = (Map<Class, Set<ActionEventListener>>)\n getPrivateField(EventManager.class, eventManager, \"actionEventListeners\");\n // Check all the validators have been added correctly\n assertTrue(\"Test method for 'EventManager.addActionEventListener(ActionEventListener, Class)' failed.\",\n containsInMap(map, null, actionEventListener1));\n assertTrue(\"Test method for 'EventManager.addActionEventListener(ActionEventListener, Class)' failed.\",\n containsInMap(map, null, actionEventListener2));\n assertTrue(\"Test method for 'EventManager.addActionEventListener(ActionEventListener, Class)' failed.\",\n containsInMap(map, null, actionEventListener3));\n }",
"@Override\n\tprotected void initListeners() {\n\t\t\n\t}",
"@Override\n\t@SuppressWarnings(\"unchecked\")\n\tpublic <E> void onEvent(E event) {\n\t\tif (clazz.isInstance(event)) {\n\t\t\tonEvent((T) event);\n\t\t}\n\t}"
] | [
"0.67193687",
"0.6579881",
"0.634513",
"0.63082254",
"0.618145",
"0.6085692",
"0.6004714",
"0.5994349",
"0.596766",
"0.5966964",
"0.5899998",
"0.587233",
"0.5830482",
"0.5779031",
"0.57572776",
"0.57527065",
"0.573627",
"0.5692909",
"0.56202084",
"0.55597353",
"0.5559469",
"0.5559121",
"0.5552262",
"0.5549831",
"0.5548141",
"0.5527557",
"0.5527425",
"0.55051416",
"0.5504533",
"0.5496383",
"0.547442",
"0.54706347",
"0.54683125",
"0.5464384",
"0.54587257",
"0.5458055",
"0.54548365",
"0.5450054",
"0.54423714",
"0.5438881",
"0.5434555",
"0.5431394",
"0.54267603",
"0.54267454",
"0.54267454",
"0.54266727",
"0.5414824",
"0.5395582",
"0.53747666",
"0.53681386",
"0.5366457",
"0.5366442",
"0.53611165",
"0.53572387",
"0.53424716",
"0.5335004",
"0.53319895",
"0.53247166",
"0.5324501",
"0.53223085",
"0.532117",
"0.5316011",
"0.53109115",
"0.52953213",
"0.5294211",
"0.52921",
"0.5285196",
"0.5285196",
"0.5279644",
"0.5272256",
"0.5264962",
"0.52644974",
"0.52607805",
"0.5254908",
"0.5253725",
"0.52493477",
"0.5246239",
"0.5242846",
"0.5242366",
"0.5242366",
"0.5228066",
"0.52165145",
"0.5208589",
"0.520383",
"0.52008045",
"0.5196603",
"0.51950383",
"0.51950383",
"0.519262",
"0.51863205",
"0.51838094",
"0.5182779",
"0.51763564",
"0.5176007",
"0.5172484",
"0.5172484",
"0.5172469",
"0.5170085",
"0.5167474"
] | 0.7188532 | 0 |
Determine if the OverflowMap has any listeners at all. | protected boolean hasListeners()
{
// m_listenerSupport defaults to null, and it is reset to null when
// the last listener unregisters
return m_listenerSupport != null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean hasListeners() {\n return !listeners.isEmpty();\n }",
"public boolean hasListeners() {\n return !listeners.isEmpty();\n }",
"protected boolean isBound(){\n\t\treturn !listeners.isEmpty();\n\t}",
"protected boolean isBound(){\n\t\treturn !listeners.isEmpty();\n\t}",
"public synchronized boolean hasSubscribers ()\n {\n return !this.listeners.isEmpty ();\n }",
"public boolean hasTraceListeners()\r\n {\r\n return (null != m_traceListeners);\r\n }",
"public boolean hasRequestListeners(TransportAddress localAddr) {\n if (!messageListeners.isEmpty()) {\n // there is a generic listener\n return true;\n }\n if (!children.isEmpty()) {\n EventDispatcher child = children.get(localAddr);\n if (child != null) {\n return !child.messageListeners.isEmpty();\n }\n }\n return false;\n }",
"boolean hasEvents() {\n return !currentSegment.isEmpty() || !historySegments.isEmpty();\n }",
"@SuppressWarnings(\"WeakerAccess\")\n public boolean hasObservers() {\n return mObservers.size() > 0;\n }",
"public boolean isSetEvents() {\n return this.events != null;\n }",
"public boolean isInOverflow() {\n \tif (overflow == true){\n \t\treturn true;\n \t}\n \telse{\n \t\treturn false;\n \t}\n }",
"public boolean isEventsSuppressed() {\r\n\t\treturn eventsSuppressed;\r\n\t}",
"boolean hasEvent();",
"public boolean hasActionListeners() {\n return true;\n }",
"public boolean hasSubscribers() {\n return state.current.psm.array().length > 0;\n }",
"private boolean hasDecorations() {\n \t\tsynchronized (fDecorationMapLock) {\n \t\t\treturn !fDecorationsMap.isEmpty();\n \t\t}\n \t}",
"public synchronized boolean hasListeners(java.lang.String propertyName) {\r\n\treturn getPropertyChange().hasListeners(propertyName);\r\n}",
"public boolean isOverflow() {\n\t\treturn (children.size() >= degree + 1) || (data.size() >= degree);\n\t}",
"@java.lang.Override\n public boolean hasMasksCount() {\n return masksCount_ != null;\n }",
"public boolean emptyBuffer() {\n if(eventBeans.size() == 0)\n return true;\n else return false;\n }",
"public boolean isEmpty() {\n return indexedEvents.isEmpty();\n }",
"public boolean isListenerAvailable() {\n return mListener != null;\n }",
"public boolean isListenerAvailable() {\n return mListener != null;\n }",
"public boolean hasPushEvent();",
"public synchronized boolean hasListeners(java.lang.String propertyName) {\n\t\treturn getPropertyChange().hasListeners(propertyName);\n\t}",
"@java.lang.Override\n public boolean hasSpeechEventOffset() {\n return speechEventOffset_ != null;\n }",
"boolean hasActionListener() {\n // Guaranteed to return a non-null array\n Object[] listeners = listenerList.getListenerList();\n // Process the listeners last to first, notifying\n // those that are interested in this event\n for (int i = listeners.length-2; i>=0; i-=2) {\n if (listeners[i]==ActionListener.class) {\n return true;\n } \n }\n return false;\n }",
"public boolean hasMasksCount() {\n return masksCountBuilder_ != null || masksCount_ != null;\n }",
"public boolean isEmpty(){return numEvents==0;}",
"@Override\r\n\tpublic boolean isAllHit() {\r\n\t\treturn priorityElements.isEmpty();\r\n\t}",
"public boolean isEmpty() {\n\t\treturn callbacks.isEmpty();\n\t}",
"public boolean isEmpty() {\n return gestures.isEmpty();\n\n }",
"public synchronized boolean hasMetrics() {\n return !metrics.isEmpty();\n }",
"public boolean hasChanged()\n {\n return map.hasChanged();\n }",
"public boolean isEmpty() {\n return this.extMap.isEmpty();\n }",
"@java.lang.Override\n public boolean hasPointsCount() {\n return pointsCount_ != null;\n }",
"public boolean hasNonEscapingEdges() {\n return addedEdges != null;\n }",
"abstract boolean isOverflow();",
"public boolean isSmapSuppressed();",
"public boolean hasMessages()\r\n {\r\n return !mailbox.isEmpty();\r\n }",
"public boolean forceEvents() {\n if (!isStarted()) {\n return false;\n }\n\n if (listeners.isEmpty()) {\n return false;\n }\n\n LOG.debug(\"Force events for all currently connected devices\");\n\n deviceDetector.resetRoots();\n\n return true;\n }",
"private final boolean m118788w() {\n return getAdapter() != null && getAdapter().getCount() > 0;\n }",
"public boolean contains(L listener) {\r\n synchronized (this) {\r\n return listeners.containsKey(listener) || weak.containsKey(listener);\r\n }\r\n }",
"@java.lang.Override\n public boolean hasBoundingBoxesCount() {\n return boundingBoxesCount_ != null;\n }",
"boolean isBound();",
"boolean hasUpdateMask();",
"boolean hasUpdateMask();",
"boolean hasUpdateMask();",
"boolean hasUpdateMask();",
"public boolean hasOverflow() {\r\n\t\t\treturn (data.size() > 3);\r\n\t\t}",
"private boolean hasPinnedStack() {\n return this.mTaskStackContainers.getPinnedStack() != null;\n }",
"public boolean isSelfMessageProcessingEvent();",
"public boolean\tisEmpty() {\n\t\treturn map.isEmpty();\n\t}",
"boolean isOverflow() {\r\n\r\n if (children.size() > branchingFactor) {\r\n return true;\r\n }\r\n return false;\r\n }",
"@java.lang.Override\n public boolean hasStats() {\n return stats_ != null;\n }",
"public boolean isSuppressed();",
"public boolean hasLiveCalls() {\n if (this.mCallMapById.isEmpty()) {\n return false;\n }\n for (Integer num : this.mCallMapById.keySet()) {\n Call callById = getCallById(num);\n if (!(callById == null || callById.getState() == 10 || callById.getState() == 7)) {\n HiLog.info(LOG_LABEL, \"hasLiveCalls.\", new Object[0]);\n return true;\n }\n }\n return false;\n }",
"public final synchronized boolean isEmpty() {\n\t\treturn map.isEmpty();\n\t}",
"@Override\n public boolean isDisplayAllEvents() {\n return PreferencesManager.displayAllEvents(getActivity());\n }",
"public boolean hasSpeechEventOffset() {\n return ((bitField0_ & 0x00000004) != 0);\n }",
"@Override\n\tpublic boolean isEmpty() \n\t{\n\t\treturn this.map.isEmpty();\n\t}",
"public boolean hasListener(int type) {\n assert type > 0 : \"Invalid event type: \" + type;\n\n Listeners listeners = lsnrs.get(type);\n\n return (listeners != null) && (!F.isEmpty(listeners.highPriorityLsnrs) || !F.isEmpty(listeners.lsnrs));\n }",
"public boolean isEmpty() {\r\n return this.map.isEmpty();\r\n }",
"boolean hasChangeEvent();",
"public boolean isMiniMapChanged() {\n return minimapChanged;\n }",
"boolean isSetEvent();",
"public boolean hasPendingBindings() {\n synchronized (this) {\n long l10 = this.H;\n long l11 = 0L;\n long l12 = l10 == l11 ? 0 : (l10 < l11 ? -1 : 1);\n if (l12 == false) return false;\n return (boolean)((long)1);\n }\n }",
"boolean hasOffset();",
"@Override\n\tpublic boolean isEmpty() {\n\t\treturn map.isEmpty();\n\t}",
"public boolean hasListener(TransferListener listener) {\n return listeners.contains(listener);\n }",
"boolean isOverflow() {\r\n\r\n if (values.size() > branchingFactor - 1) {\r\n return true;\r\n }\r\n return false;\r\n }",
"public boolean isSetOffsets() {\n return this.offsets != null;\n }",
"public boolean hasNotifications()\n {\n return !this.notifications.isEmpty();\n }",
"public boolean hasPointsCount() {\n return pointsCountBuilder_ != null || pointsCount_ != null;\n }",
"@Override\n public boolean isEmpty() {\n return map.isEmpty();\n }",
"public boolean isEmpty() {\n return map.isEmpty();\n }",
"public boolean isSetErrorMap() {\n return this.errorMap != null;\n }",
"public boolean hasBoundingBoxesCount() {\n return boundingBoxesCountBuilder_ != null || boundingBoxesCount_ != null;\n }",
"public boolean hasPendingBindings() {\n synchronized (this) {\n long l10 = this.m;\n long l11 = 0L;\n long l12 = l10 == l11 ? 0 : (l10 < l11 ? -1 : 1);\n if (l12 == false) return false;\n return (boolean)((long)1);\n }\n }",
"public boolean isSetDataMap() {\n return this.dataMap != null;\n }",
"public boolean isSetDataMap() {\n return this.dataMap != null;\n }",
"public boolean isSetDataMap() {\n return this.dataMap != null;\n }",
"public boolean isSetDataMap() {\n return this.dataMap != null;\n }",
"public boolean isSetDataMap() {\n return this.dataMap != null;\n }",
"public boolean isSetDataMap() {\n return this.dataMap != null;\n }",
"public boolean isSetDataMap() {\n return this.dataMap != null;\n }",
"public boolean isSetDataMap() {\n return this.dataMap != null;\n }",
"public boolean isSetDataMap() {\n return this.dataMap != null;\n }",
"@java.lang.Override\n public boolean hasFrameInputsCount() {\n return frameInputsCount_ != null;\n }",
"public boolean isEmpty() {\n return map.isEmpty();\n }",
"public boolean isEmpty() {\n\t\treturn map.isEmpty();\n\t}",
"public boolean hasPositionCall() {\n if (_left.hasPositionCall()) return true;\n if (_right.hasPositionCall()) return true;\n return false;\n }",
"public boolean hasPop() {\n return popBuilder_ != null || pop_ != null;\n }",
"private boolean needsToRecalcStats() {\n\n return this.equipsChanged;\n }",
"public boolean hasPendingBindings() {\n synchronized (this) {\n long l10 = this.u;\n long l11 = 0L;\n long l12 = l10 == l11 ? 0 : (l10 < l11 ? -1 : 1);\n if (l12 == false) return false;\n return (boolean)((long)1);\n }\n }",
"boolean hasMetrics();",
"boolean hasMetrics();",
"public boolean isSet() {\n return nViewportUpdates > 0 && nWindowUpdates > 0;\n }",
"public boolean hasAnyMessages(int[] what) {\n synchronized (mHandler.getLooper().getQueue()) {\n for (int i : what) {\n if (mHandler.hasMessages(i)) {\n return true;\n }\n }\n }\n return false;\n }"
] | [
"0.7390836",
"0.7390836",
"0.70138043",
"0.70138043",
"0.6655281",
"0.6541489",
"0.6431672",
"0.62609917",
"0.6226593",
"0.6187231",
"0.6163014",
"0.61068666",
"0.6086787",
"0.6066765",
"0.59027535",
"0.57910013",
"0.5786527",
"0.57831985",
"0.57811147",
"0.57551056",
"0.5745979",
"0.5733347",
"0.5733347",
"0.570824",
"0.57080364",
"0.5674088",
"0.566375",
"0.5652392",
"0.56315225",
"0.5610071",
"0.5608088",
"0.5606868",
"0.5535128",
"0.5531299",
"0.5519164",
"0.55065054",
"0.5495382",
"0.548998",
"0.54675853",
"0.5467332",
"0.54654247",
"0.5459368",
"0.5455497",
"0.5453336",
"0.5450218",
"0.5444686",
"0.5444686",
"0.5444686",
"0.5444686",
"0.5427449",
"0.54104424",
"0.54052466",
"0.54019153",
"0.5399033",
"0.53969723",
"0.5392572",
"0.53902185",
"0.53875405",
"0.5383865",
"0.5367213",
"0.5361314",
"0.5357901",
"0.53550166",
"0.5350271",
"0.53409755",
"0.53252405",
"0.531914",
"0.5309334",
"0.5308933",
"0.53077096",
"0.53045106",
"0.5294933",
"0.5276933",
"0.5276878",
"0.5274502",
"0.52704895",
"0.5268158",
"0.5264584",
"0.5258569",
"0.5257447",
"0.5257447",
"0.5257447",
"0.5257447",
"0.5257447",
"0.5257447",
"0.5257447",
"0.5257447",
"0.5257447",
"0.5255005",
"0.52516556",
"0.52395254",
"0.52283156",
"0.5218019",
"0.5216418",
"0.5213457",
"0.5202155",
"0.5202155",
"0.52015966",
"0.51969"
] | 0.6971299 | 4 |
Dispatch the passed event. | protected void dispatchEvent(MapEvent evt)
{
MapListenerSupport listenerSupport = getMapListenerSupport();
if (listenerSupport != null)
{
// the events can only be generated while the current thread
// holds the monitor on this map
synchronized (this)
{
listenerSupport.fireEvent(evt, false);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void dispatchEvent(AWTEvent event) {\n Object src = event.getSource();\n if (event instanceof ActiveEvent) {\n // This could become the sole method of dispatching in time.\n ((ActiveEvent)event).dispatch();\n } else if (src instanceof Component) {\n ((Component)src).dispatchEvent(event);\n } else if (src instanceof MenuComponent) {\n ((MenuComponent)src).dispatchEvent(event);\n } else {\n System.err.println(\"unable to dispatch event: \" + event);\n }\n }",
"public final void dispatchEvent(AWTEvent e) {\n dispatchEventImpl(e);\n }",
"void dispatchEvent(DistributedEvent event);",
"void invoke(T event);",
"public X dispatch(AWTEvent event) {\n component.dispatchEvent(event);\n return (X) this;\n }",
"public abstract void handle(Object event);",
"@SuppressWarnings(\"unchecked\")\n public void fireEvent(final Event event) {\n try {\n final List<EventListener<? extends Event>> eventListeners = this.eventListeners.get(event.getType());\n eventListeners.forEach(listener -> {\n final HandleEventTask task = new HandleEventTask(event, listener);\n this.taskRunner.submitTask(task);\n });\n } catch (Exception e) {\n logger.error(\"Unexpected error when firing event: {}\", event, e);\n }\n }",
"void dispatchEvent(DeferredKeyEvent event);",
"public synchronized void dispatchEvent(Event event) {\n // Loop through all registered Listener\n \n for (Entry<Listener, HashMap<Class, Collection<Method>>> eventMethodMap : permanentEventMethodCache.entrySet()) {\n // Loop through all methods accepting this class\n HashMap<Class, Collection<Method>> listenerMethods = eventMethodMap.getValue();\n if (!listenerMethods.containsKey(event.getClass())) {\n continue;\n }\n for (Method method : listenerMethods.get(event.getClass())) {\n try {\n method.invoke(eventMethodMap.getKey(), event);\n } catch (Exception e) {\n System.err.println(\"Could not invoke event handler!\");\n e.printStackTrace(System.err);\n }\n }\n }\n }",
"public void dispatch(T param) {\n for (EventCallback<T> callback : callbacks) {\n callback.handle(param);\n }\n }",
"public void dispatch();",
"public synchronized void dispatch(IpcEvent event) {\n\t\tfor (IIpcEventListener listener : listeners) {\n\t\t\tlistener.handleEvent(event);\n\t\t}\n\t}",
"Answer perform(final String event);",
"protected void dispatchEvent(GraphEvent event) {\n synchronized (listenerConfigs) {\n Iterator<ListenerConfiguration> iter = listenerConfigs.iterator();\n while (iter.hasNext()) {\n ListenerConfiguration config = iter.next();\n GraphListener registeredListener = config.getListener();\n if (registeredListener == null) {\n iter.remove();\n continue;\n }\n if (config.getFilter().match(event.getTriple())) {\n delayedNotificator.sendEventToListener(registeredListener, event);\n }\n }\n }\n }",
"public abstract void processEvent(Object event);",
"public Response fire(EventI event);",
"public void sendEvent(Event event);",
"public void post(Object event);",
"public void trigger(Event event);",
"public void dispatched(MonitorEvent event)\n {\n }",
"public abstract void dispatch(ExchangeContext context);",
"public final void fire(Object event) {\n manager.fire(event);\n }",
"public abstract void onEvent(T event);",
"public void submit(Event event) {\n\t\tthis.eventManager.submit(event);\n\t}",
"void dispatch(Object event, List<Subscriber> eventSubscribers) {\n for (Subscriber subscriber : eventSubscribers) {\n Dispatcher dispatcher = findDispatcher(subscriber.subscribeMethod.info.dispatcher);\n if (dispatcher != null) {\n dispatcher.dispatch(new DispatchAction(subscriber, event));\n } else {\n throw new RuntimeException(\"dispatcher not found!\");\n }\n }\n }",
"@Override\n\tprotected void dispatch(ExecuteProjectEventHandler handler) {\n\t\thandler.executeProjectEvent(this);\n\t}",
"abstract public void fireEvent(String eventkey, Object listener, Object event);",
"public void handleEvent(Event event) {\n\t\t\t\t}",
"void handleActionEvent(ActionEvent event);",
"@Override\r\n public void onEvent(FlowableEvent event) {\n }",
"protected void fireEvent(ZEvent aEvent) {\n if (fListenerList == null) {\n return;\n }\n\n aEvent.setSource(this);\n\n Object[] listeners = fListenerList.getListenerList();\n for (int i = listeners.length - 2; i >= 0; i -= 2) {\n if (listeners[i] == aEvent.getListenerType()) {\n aEvent.dispatchTo(listeners[i + 1]);\n }\n if (aEvent.isConsumed())\n return;\n }\n }",
"public void asyncFire(EventI event);",
"public void fireAll(EventI event);",
"public void postEventSafely(final Object event) {\n new Handler(Looper.getMainLooper()).post(new Runnable() {\n @Override\n public void run() {\n mBus.post(event);\n }\n });\n }",
"protected void execute(Runnable evt) {\n executor.execute(evt);\n }",
"@Override\n public void handle(Event event) {\n }",
"void event(Event e) throws Exception;",
"public void postEvent(Event event) {\n eventQueue.postEvent(event);\n }",
"public void handle(Object e){\n\t\tif(e.getClass().equals(GetResultRequestEvent.class)){\n\t\t\tgetResults((GetResultRequestEvent)e);\n\t\t}else if(e.getClass().equals(RefreshAllDataEvent.class)){\n\t\t\ttf.getData(app);\n\t\t}else if(e.getClass().equals(ExportDataEvent.class)){\n\t\t\ttf.exportItemDB();\n\t\t}\n\t}",
"void eventOccurred(AbstractTaskEvent event);",
"public void dispatchEventToEditor(final PInputEvent e) {\n SwingUtilities.invokeLater(new Runnable() {\n public void run() {\n SwingUtilities.invokeLater(new Runnable() {\n public void run() {\n MouseEvent me = new MouseEvent(node.getEditor(), MouseEvent.MOUSE_PRESSED, e.getWhen(), e.getModifiers() | InputEvent.BUTTON1_MASK, (int) (e.getCanvasPosition().getX() - node.getEditor().getX()), (int) (e.getCanvasPosition().getY() - node.getEditor().getY()), 1, false);\n node.getEditor().dispatchEvent(me);\n }\n });\n }\n });\n }",
"@Override\r\n\t\t\tpublic void execute(LiftEvent e) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void execute(LiftEvent e) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\tpublic void performAction(Event e) {\n\r\n\t}",
"protected final void postEvent(Object event) {\n mEventBridge.post(event);\n }",
"protected void handleEvent(MouseEvent ev) {\n\t}",
"private void fireEvent(CardView cardView, EventType<CardEvent> eventType) {\n if (cardEventHandler != null) {\n cardEventHandler.handle(new CardEvent(cardView, eventType));\n }\n }",
"public void runEvent();",
"public void notifyEvent(Event event) {\n _brain.getGameManager().takeAction(event);\n }",
"public abstract void resolve(Event e);",
"@Override\n\tpublic void handleEvent(Event arg0) {\n\t\t\n\t}",
"protected final void fireEvent(T data) {\n\t\t\ttry {\n\t\t\t\tevent.fire(data);\n\t\t\t} catch (Exception e) {\t\t\t\t\n\t\t\t\tlog.error(e);\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}\n\t\t}",
"@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t}",
"@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t}",
"@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t}",
"public void processEvent(Event event) {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void handleEvent(Event event) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void handleEvent(Event event) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void handleEvent(Event event) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void handleEvent(Event event) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void handleEvent(Event event) {\n\n\t\t\t}",
"@Override\n\tpublic void fireEvent(EventObject event, boolean blocked) {\n\t\tSystem.out.println(event);\n\t}",
"@Override\r\n\tpublic void onEvent(Event arg0) {\n\r\n\t}",
"@Override\n\t@SuppressWarnings(\"unchecked\")\n\tpublic <E> void onEvent(E event) {\n\t\tif (clazz.isInstance(event)) {\n\t\t\tonEvent((T) event);\n\t\t}\n\t}",
"public void accept(ActionEvent event) {\r\n \tgetController().accept(event);\r\n }",
"@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\t \n\t\t\t}",
"@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\t \n\t\t\t}",
"private void dispatchEvent(final ILayer layer) {\n\n\t\tif (layer == null) {\n\t\t\treturn;\n\t\t}\n\t\tfor (TargetLayerListener listener : this.listeners) {\n\n\t\t\tlistener.targetLayerSelected(layer);\n\t\t\tlistener.validateTargetLayer();\n\t\t}\n\t}",
"public void handle(String target, HttpServletRequest request,\r\n\t\t\tHttpServletResponse response, int dispatch) throws IOException,\r\n\t\t\tServletException {\n\t\t\r\n\t}",
"public interface ActiveEvent {\n\n /**\n * Dispatch the event to its target, listeners of the events source,\n * or do whatever it is this event is supposed to do.\n */\n public void dispatch();\n}",
"@Override\n\t\t\t\tpublic void handle(ActionEvent event) {\n\n\t\t\t\t}",
"public void invoke(Event ev){\n try{\n boolean wasAccessible = method.isAccessible();\n method.setAccessible(true);\n method.invoke(listener, ev);\n method.setAccessible(wasAccessible);\n }catch(IllegalAccessException ex){\n Commons.log.log(Level.WARNING, toString()+\" Failed to invoke method for \"+ev, ex);\n }catch(IllegalArgumentException ex){\n Commons.log.log(Level.WARNING, toString()+\" Failed to invoke method for \"+ev, ex);\n }catch(InvocationTargetException ex){\n Commons.log.log(Level.WARNING, toString()+\" Failed to invoke method for \"+ev, ex);\n }catch(SecurityException ex){\n Commons.log.log(Level.WARNING, toString()+\" Failed to invoke method for \"+ev, ex);\n }\n }",
"@Override\n public void onEvent(Event event) {\n lock.lock();\n\n try {\n runtime.onEvent(event);\n } finally {\n lock.unlock();\n }\n }",
"@Override\n\tpublic boolean dispatchTouchEvent(MotionEvent ev) {\n\t\tLog.i(\"TestEvent\", \"activity->dispatchTouchEvent \" + TouchEventUtil.getTouchAction(ev.getAction()));\n\t\treturn super.dispatchTouchEvent(ev);\n\t}",
"public void actionPerformed(ActionEvent event) {\n this.actionPerformed(event);\n\n }",
"public void run()\n {\n Event event = request.getEvent();\n if (logger.isDebugEnabled())\n logger.debug(\"Processing event: \"\n + event.getClass().getSimpleName());\n\n EventStatus status = null;\n try\n {\n if (request.isCancelRequested())\n {\n // If the event is cancelled note it.\n status = new EventStatus(false, true, null);\n if (logger.isDebugEnabled())\n logger.debug(\"Skipped cancelled event: \"\n + event.getClass().getSimpleName());\n }\n else\n {\n // Mark the request as started and submit to state machine.\n request.started();\n sm.applyEvent(event);\n status = new EventStatus(true, false, null);\n if (logger.isDebugEnabled())\n logger.debug(\"Applied event: \"\n + event.getClass().getSimpleName());\n }\n }\n catch (InterruptedException e)\n {\n // Handle an interruption, which could happen if we are cancelled\n // while executing.\n status = new EventStatus(false, true, e);\n logger.debug(String.format(\"Failed to apply event %s, reason=%s\",\n event, e.getLocalizedMessage()));\n }\n catch (Throwable e)\n {\n // Handle a failure.\n status = new EventStatus(false, false, e);\n logger.debug(String.format(\"Failed to apply event %s, reason=%s\",\n event, e.getLocalizedMessage()));\n }\n finally\n {\n // We need to store the status and call the completion\n // listener, if any. This must happen regardless of any\n // exception that occurs.\n try\n {\n if (listener != null)\n request.setAnnotation(listener.onCompletion(event, status));\n }\n catch (InterruptedException e)\n {\n // Do nothing; this is the end of the road for this task.\n }\n catch (Throwable e)\n {\n logger.error(\"Unexpected failure while calling listener\", e);\n }\n finally\n {\n // Make sure we record the request state no matter what to\n // prevent hangs.\n request.setStatus(status);\n }\n }\n }",
"void onBusEvent(Event event);",
"@Override\n\tpublic <E extends Event> void trigger(final E event) {\n//\t\tgetLogger().trace(new FormatterLoggable(\"trigger {0}\", new Object[] { event }));\n\t\tfinal EventExecutorFactory factory = getExecutorFactory();\n\t\tExecutor executor = factory.getLookupExecutor(event);\n\t\tif (executor == null)\n\t\t\texecutor = new DirectExecutor();\n\t\tfinal Executor lookupExecutor = executor;\n\t\tlookupExecutor.execute(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\tint handlerCount = 0;\n\t\t\t\ttry {\n\t\t\t\t\teventLookupStarted();\n\t\t\t\t\tList<EventHandler<? extends Event>> handlers = lookupHandlers(event);\n\t\t\t\t\tif (handlers == null) {\n\t//\t\t\t\t\tgetLogger().trace(new SimpleLoggable(\"no handlers\"));\n//\t\t\t\t\t\trecordStat(event.getEventName(), 0);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tList<EventHandler<? extends Event>> handlersCopy = null;\n\t\t\t\t\tsynchronized(handlers) {\n\t\t\t\t\t\thandlersCopy = new ArrayList<EventHandler<? extends Event>>(handlers);\n\t\t\t\t\t}\n\t\t\t\t\tExecutor processExecutor = factory.getProcessExecutor(event);\n\t\t\t\t\tif (processExecutor == null)\n\t\t\t\t\t\tprocessExecutor = lookupExecutor;\n\t\t\t\t\tif (processExecutor == lookupExecutor && handlersCopy.size() == 1) {\n\t\t\t\t\t\thandlerCount++;\n\t\t\t\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\t\t\t\tfinal EventHandler<Event> handler = (EventHandler<Event>) handlersCopy.get(0);\n\t\t\t\t\t\tgetLogger().trace(new SimpleLoggable(\"calling event \" + event + \" handler \" + handler));\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\teventProcessingStarted();\n\t\t\t\t\t\t\thandler.on(event);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch(Throwable ex) {\n\t\t\t\t\t\t\tgetLogger().warn(new SimpleLoggable(ex, \"exception in handler: \" + ex));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfinally {\n\t\t\t\t\t\t\teventProcessingCompleted();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t@SuppressWarnings(\"rawtypes\")\n\t\t\t\t\t\tIterator iterator = handlersCopy.listIterator();\n\t\t\t\t\t\twhile (iterator.hasNext()) {\n\t\t\t\t\t\t\thandlerCount++;\n\t\t\t\t\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\t\t\t\t\tfinal EventHandler<Event> handler = (EventHandler<Event>) iterator.next();\n\t\t\t\t\t\t\tgetLogger().trace(new SimpleLoggable(\"calling event \" + event + \" handler \" + handler));\n\t\t\t\t\t\t\tprocessExecutor.execute(new Runnable() {\n\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\teventProcessingStarted();\n\t\t\t\t\t\t\t\t\t\thandler.on(event);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tcatch(Throwable ex) {\n\t\t\t\t\t\t\t\t\t\tgetLogger().warn(new SimpleLoggable(ex, \"exception in handler: \" + ex));\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tfinally {\n\t\t\t\t\t\t\t\t\t\teventProcessingCompleted();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfinally {\n\t\t\t\t\trecordStat(event.getEventName(), handlerCount);\n\t\t\t\t\teventLookupCompleted();\n\t\t\t\t}\n\t\t\t}\n\n\t\t});\n\t}",
"public void fireEvent(String eventName){\n\t\teventManager.fireEvent(this, eventName);\n\t}",
"public String execute() {\n\t\ttry {\n\t\t\treturnMsg = MESSAGE_EVENT_ADDED;\n\t\t\tcheckEventClash();\n\t\t\tstoreEvent();\n\t\t\treturn returnMsg;\n\t\t} catch (IOException e) {\n\t\t\treturn MESSAGE_EVENT_ERROR;\n\t\t} finally {\n\t\t\tupdateView();\n\t\t\tMagical.setCurrentTab(\"events\");\n\t\t}\n\t}",
"public void postEvent(Runnable event) {\n\t\t\tfirebaseEventHandler.post(event) ;\n\t\t}",
"@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 }",
"@SuppressWarnings(\"unchecked\")\n public <T> void fire(T event) {\n handlersByEventType.entrySet().stream()\n .filter(e -> e.getKey().isAssignableFrom(event.getClass()))\n .map(Entry::getValue)\n .flatMap(Collection::stream)\n .collect(Collectors.toList())\n .forEach(c -> ((Consumer<T>)c).accept(event));\n }",
"@Override\r\n\tpublic void handleEvent(Event event) {\n\r\n\t}",
"@Override\n\t\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t}",
"@Override\r\n\tpublic boolean dispatchTouchEvent( MotionEvent e ) {\n\t\tint action = e.getAction();\r\n\t\tfloat x = e.getRawX();\r\n\t\tfloat y = e.getRawY();\r\n\t\tLog.d(TAG, \"onTouch dev:\" + e.getDeviceId() + \" act:\" + action + \" ind:\" + e.getActionIndex() + \" @ \"+ x + \",\" + y );\r\n\t\tnativeTouch( appPtr, action, x, y );\r\n\t\treturn true;\r\n\t}",
"@Override\n public void postEvent(Event event)\n {\n normalQueue.offer(event);\n }",
"@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t}",
"private void execute(String eventName, Change<Departure, String> changePayload, String context)\n {\n if (!events.containsKey(eventName)) {\n throw new UnknownEventException(eventName + \", \" + getClass());\n }\n\n events.get(eventName).execute(changePayload, context);\n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n handleAction();\n }",
"public void frameworkEvent(FrameworkEvent event);",
"protected void fireActionEvent() {\n if (actionListener != null) {\n ActionEvent ae = new ActionEvent(this, ActionEvent.ACTION_PERFORMED, command);\n actionListener.actionPerformed(ae);\n }\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 void deliverEvent(AbstractTaskEvent event) {\n\n\t\tsynchronized (this.subscriptions) {\n\n\t\t\tList<EventListener> subscribers = this.subscriptions.get(event.getClass());\n\t\t\tif (subscribers == null) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfinal Iterator<EventListener> it = subscribers.iterator();\n\t\t\twhile (it.hasNext()) {\n\t\t\t\tit.next().eventOccurred(event);\n\t\t\t}\n\t\t}\n\t}",
"@EncoderThread\n protected void onEvent(@NonNull String event, @Nullable Object data) {}",
"@Override\n public void onEvent(Event event) {\n if (event.getClass() != MessageReceivedEvent.class)\n return;\n MessageReceivedEvent msgEvent = (MessageReceivedEvent) event;\n\n String threadName = Thread.currentThread().getName();\n\n for (Command command : commands) {\n if (!command.match(msgEvent))\n continue;\n\n LOG.info(\"Dispatching event to command {}\", command);\n\n // Metrics\n METRICS_RUNNING.labels(command.toString(), threadName)\n .inc();\n Histogram.Timer timer = METRICS_LATENCY.labels(command.toString(), threadName)\n .startTimer();\n\n // Invoke\n Object ret = null;\n try {\n ret = command.getMethod().invoke(command.getInstance(), event);\n } catch (InvocationTargetException ex) {\n // Exception in listener's code\n //todo better logging\n LOG.error(ex.getTargetException());\n continue;\n } catch (IllegalAccessException ex) {\n // Should never happen\n throw new RuntimeException(ex);\n } finally {\n // Metrics\n Runnable endMetrics = () -> {\n LOG.debug(\"Finished dispatching event for {}\", command);\n METRICS_RUNNING.labels(command.toString(), threadName)\n .dec();\n timer.observeDuration();\n };\n\n if (ret instanceof CompletionStage) {\n CompletionStage<?> future = (CompletionStage<?>) ret;\n future.thenRunAsync(endMetrics);\n } else {\n endMetrics.run();\n }\n }\n }\n }",
"public void process(WatchedEvent event) {\n\t\t\n\t}",
"public void dispatchSubmit(Action action) {\n this.handler.sendMessage(this.handler.obtainMessage(1, action));\n }",
"protected void fireEventOccurred(EventType e) {\n if (listeners.size() > 0) {\n ONDEXEvent oe = new ONDEXEvent(this, e);\n Iterator<ONDEXListener> it = listeners.iterator();\n while (it.hasNext()) {\n it.next().eventOccurred(oe);\n }\n }\n }"
] | [
"0.7904768",
"0.7272571",
"0.72512305",
"0.68494",
"0.6786171",
"0.6597427",
"0.6574",
"0.6509961",
"0.6502295",
"0.6479338",
"0.6468188",
"0.646444",
"0.6435914",
"0.6385975",
"0.63650674",
"0.6336792",
"0.63338035",
"0.63295764",
"0.63194656",
"0.6287242",
"0.6264493",
"0.62550706",
"0.6222769",
"0.6178705",
"0.61274105",
"0.61123526",
"0.61076957",
"0.6047358",
"0.60337603",
"0.60311705",
"0.6016262",
"0.59904665",
"0.5961742",
"0.59504074",
"0.59482104",
"0.59448636",
"0.5939936",
"0.5919556",
"0.59022576",
"0.5901681",
"0.5875232",
"0.5866267",
"0.5866267",
"0.5854338",
"0.583027",
"0.58297133",
"0.58241624",
"0.58087546",
"0.57727134",
"0.5760547",
"0.5741817",
"0.5740613",
"0.5732411",
"0.5732411",
"0.5732411",
"0.5684951",
"0.5681487",
"0.5681487",
"0.5681487",
"0.5681487",
"0.5681487",
"0.56696385",
"0.56675833",
"0.56245965",
"0.5609371",
"0.5608412",
"0.5608412",
"0.5577532",
"0.55716217",
"0.55677754",
"0.5557025",
"0.55474114",
"0.55458283",
"0.55439734",
"0.55393744",
"0.55337065",
"0.5529141",
"0.5527975",
"0.5520594",
"0.5514112",
"0.5513387",
"0.55105865",
"0.55091035",
"0.5508874",
"0.5503726",
"0.55027294",
"0.5480963",
"0.5472489",
"0.5470397",
"0.54695034",
"0.5460565",
"0.5452781",
"0.54477155",
"0.5447612",
"0.5445052",
"0.5429975",
"0.5429297",
"0.5412806",
"0.5401199"
] | 0.66816604 | 6 |
inner class: Entry Factory method. This method exists to allow the Cache class to be easily inherited from by allowing the Entry class to be easily subclassed. | protected SafeHashMap.Entry<K, V> instantiateEntry()
{
return new Entry<>();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected SafeHashMap.Entry instantiateEntry()\n {\n return new Entry();\n }",
"protected Entry(){}",
"public interface IEntryFactory\n\t{\n\t\t/** \n\t\t Create an entry based on name alone\n\t\t \n\t\t @param name\n\t\t Name of the new EntryPointNotFoundException to create\n\t\t \n\t\t @return created TarEntry or descendant class\n\t\t*/\n\t\tTarEntry CreateEntry(String name);\n\n\t\t/** \n\t\t Create an instance based on an actual file\n\t\t \n\t\t @param fileName\n\t\t Name of file to represent in the entry\n\t\t \n\t\t @return \n\t\t Created TarEntry or descendant class\n\t\t \n\t\t*/\n\t\tTarEntry CreateEntryFromFile(String fileName);\n\n\t\t/** \n\t\t Create a tar entry based on the header information passed\n\t\t \n\t\t @param headerBuffer\n\t\t Buffer containing header information to create an an entry from.\n\t\t \n\t\t @return \n\t\t Created TarEntry or descendant class\n\t\t \n\t\t*/\n\t\tTarEntry CreateEntry(byte[] headerBuffer);\n\t}",
"protected SafeHashMap.EntrySet instantiateEntrySet()\n {\n return new EntrySet();\n }",
"public Entry() {\n }",
"public Set<Map.Entry<K, V>> entrySet() {\r\n return new CacheEntrySet<K, V>(this);\r\n }",
"public Entry()\n {\n this(null, null, true);\n }",
"public CacheFeeder(int entryNumber) {\n this.entryNumber = entryNumber;\n // Array that keeps the keys to all the maps, for further picking a random key out of it, that will be\n // requested from cacheProcessor.\n cacheKeys = (T[]) new Object[entryNumber];\n keysToObjectsMap = populateMap();\n }",
"public cacheEntry(int key, String value){\n int key;\n String value;\n cacheEntry(int key){\n this.key = key;\n this.value = value;\n }\n}",
"public KeyedEntry() { }",
"public Entry(DirCacheEntry aDCE, String aPath) { _entry = aDCE; _path = aPath; }",
"public Cache createCache() throws Exception {\n return createCache(maxEntries, DEFAULT_CACHE_CLASSNAME);\n }",
"public CacheEntry() {\n response = null;\n }",
"public Entry()\n {\n m_dtLastUse = m_dtCreated = getSafeTimeMillis();\n }",
"public CacheEntry getEntry(String key) {\n\t\tCacheEntry entry = map.get(key);\n\t\tif (entry == null) {\n\t\t\ttry {\n\t\t\t\tCacheEntry newEntry = new CacheEntry(key);\n\t\t\t\tCacheEntry oldEntry = map.putIfAbsent(key, newEntry);\n\t\t\t\tif (oldEntry == null) {\n\t\t\t\t\tsize.incrementAndGet();\n\t\t\t\t\tcheckCapacity();\n\t\t\t\t\treturn newEntry;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\treturn oldEntry;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\t//log.error(\"Error creating CacheItem\", e);\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\treturn entry;\n\t\t}\n\t}",
"public interface Cache<K,E> {\n\tpublic E getCacheEntry(K id);\n\t\n\tpublic boolean addCacheEntry(K id, E entry);\n\t\n\tpublic void removeCacheEntry(K id);\n\t\n\tpublic Stream<E> getAllEntries();\n}",
"public EvEntry() {\n\t}",
"private CacheWrapper<AccessPointIdentifier, Integer> createCache() {\n return new CacheWrapper<AccessPointIdentifier, Integer>() {\n \n @Override\n public void put(AccessPointIdentifier key, Integer value) {\n cache.put(key, value);\n }\n \n @Override\n public Integer get(AccessPointIdentifier key) {\n if (cache.containsKey(key)) {\n hitRate++;\n }\n return cache.get(key);\n }\n \n \n };\n }",
"protected void createLookupCache()\n/* */ {\n/* 1260 */ this.lookup = new SimpleCache(1, Math.max(getSize() * 2, 64));\n/* */ }",
"public final TarEntry CreateEntry(String name)\n\t\t{\n\t\t\treturn TarEntry.CreateTarEntry(name);\n\t\t}",
"interface Cache {\n\n /** @return A cache entry for given path string or <code>null</code> (if file cannot be read or too large to cache).\n * This method increments CacheEntry reference counter, caller must call {@link #checkIn(CacheEntry)} to release returned entry (when not null). */\n CacheEntry checkOut(CacheEntryLoader cacheEntryLoader);\n\n /**\n * Method to release cache entry previously obtained from {@link #checkOut(CacheEntryLoader)} call.\n * This method decrements CacheEntry reference counter.\n */\n void checkIn(CacheEntry key);\n\n /** Invalidates cached entry for given path string (if it is cached) */\n void invalidate(String pathString);\n\n void rename(String fromPathString, String toPathString);\n\n// /** Preload given file path in cache (if cache has vacant spot). Preloading happens in background. Preloaded pages initially have zero reference counter. */\n// void preload (String pathString);\n\n /** Clears the cache of all entries (even if some entries are checked out) */\n void clear();\n\n /** Allocates entry of given size for writing.\n * It will not be visible to others until caller calls {@link #update(String, CacheEntry)}.*/\n CacheEntry alloc(long size);\n\n /** Registers recently writtien cache entry as available for reading */\n void update(String pathString, CacheEntry cacheEntry);\n}",
"private static Cache getCacheInstance() {\r\n\t\tif( cache == null ) {\r\n\t\t\ttry {\r\n\t\t\t\tCacheFactory cf = CacheManager.getInstance().getCacheFactory();\r\n\t\t\t\tcache = cf.createCache(Collections.emptyMap());\r\n\t\t\t} catch (CacheException e) {\r\n\t\t\t\tlog.log(Level.SEVERE, \"can not initialize cache\", e);\r\n\t\t\t\tcache = null;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn cache;\r\n\t}",
"protected StandardEntrySet() {}",
"public Map.Entry<K, V> forEntry(int i) {\n return new EntryForKey(i);\n }",
"public Entry(String n)\n {\n name = n;\n }",
"protected void createLookupCache() {\n }",
"private Entry createEntry(String pattern) {\n\t\tEntry entry = null;\n\n\t\tif (pattern != null) {\n\t\t\tString item = pattern.trim();\n\t\t\tif (item.length() > 0) {\n\t\t\t\tentry = new Entry();\n\t\t\t\tentry.result = !item.startsWith(\"-\");\n\t\t\t\tentry.partial = item.endsWith(\".\");\n\t\t\t\tentry.classpath = entry.result ? item : item.substring(1).trim();\n\t\t\t}\n\t\t}\n\t\treturn entry;\n\t}",
"public final TarEntry CreateEntry(byte[] headerBuffer)\n\t\t{\n\t\t\treturn new TarEntry(headerBuffer);\n\t\t}",
"@Override\n\t\tprotected SLEntry leafNodeFactory(java.nio.ByteBuffer entryStream)\n\t\tthrows\n\t\t\tjava.io.IOException\n\t\t{\n\t\t\treturn new SLEntry(this, entryStream);\n\t\t}",
"public HotrodCacheFactory() {\n }",
"private FileEntry() {\n // intentionally empty\n }",
"public PQEntry() {}",
"public Cache createCache(int cacacity, String className) \n throws Exception {\n\n // use the context class loader to load class so that any\n // user-defined classes in WEB-INF can also be loaded.\n ClassLoader cl = Thread.currentThread().getContextClassLoader();\n Class cacheClass = cl.loadClass(className);\n\n Cache cacheImpl = (Cache)cacheClass.newInstance();\n cacheImpl.init(maxEntries, cacheProps);\n\n return cacheImpl;\n }",
"public HashEntry( AnyType e )\n {\n \tkey = e;\n }",
"private Node getEntryNode(IStatementContainer nd) {\n Node entry = entryNodeCache.get(nd);\n if (entry == null) {\n entry =\n new Node(\n \"Entry\", new SourceLocation(\"\", nd.getLoc().getStart(), nd.getLoc().getStart())) {\n @Override\n public <Q, A> A accept(Visitor<Q, A> v, Q q) {\n return null;\n }\n };\n entryNodeCache.put(nd, entry);\n Label lbl = trapwriter.localID(entry);\n trapwriter.addTuple(\n \"entry_cfg_node\", lbl, nd instanceof Program ? toplevelLabel : trapwriter.localID(nd));\n locationManager.emitNodeLocation(entry, lbl);\n }\n return entry;\n }",
"@Override\n\tpublic synchronized Entry get(String key) {\n\t\tCacheHeader entry = mEntries.get(key);\n\t\t// if the entry does not exist, return.\n\t\tif (entry == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tFile file = getFileForKey(key);\n\t\tCountingInputStream cis = null;\n\t\ttry {\n\t\t\tcis = new CountingInputStream(new FileInputStream(file));\n\t\t\tCacheHeader.readHeader(cis); // eat header\n\t\t\tbyte[] data = streamToBytes(cis,\n\t\t\t\t\t(int) (file.length() - cis.bytesRead));\n\t\t\treturn entry.toCacheEntry(data);\n\t\t} catch (IOException e) {\n\t\t\tVolleyLog.d(\"%s: %s\", file.getAbsolutePath(), e.toString());\n\t\t\tremove(key);\n\t\t\treturn null;\n\t\t} finally {\n\t\t\tif (cis != null) {\n\t\t\t\ttry {\n\t\t\t\t\tcis.close();\n\t\t\t\t} catch (IOException ioe) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public Set<Map.Entry<K, V>> entrySet() {\n return new EntrySet();\n }",
"public Entry getEntry(String aPath)\n {\n if(getRepo()==null) return null;\n \n // Handle root special\n if(aPath.equals(\"/\")) return new Entry(null, aPath);\n \n // Get repository index and entry for path\n DirCache index = getIndex(); String path = aPath.substring(1);\n DirCacheEntry entry = index.getEntry(aPath.substring(1));\n boolean isDir = entry==null && index.getEntriesWithin(path).length>0;\n if(entry==null && !isDir) return null;\n \n // Create file for path and index entry\n return new Entry(entry, aPath);\n }",
"public AbstractCache() {\n }",
"public interface Entry {\n\n}",
"public Object createEntry(Object key) throws Exception {\n\r\n\t\t\r\n\t\t\r\n\t\tConnection connect = null;\r\n\t Statement st = null;\r\n\t ResultSet rs = null;\r\n\t String url = \"jdbc:mysql://localhost:3306/\";\r\n\t String db = \"ehcache\";\r\n\t String driver = \"com.mysql.jdbc.Driver\";\r\n\t String user = \"ehcache\";\r\n\t String pass = \"terracotta\";\r\n\t customer mc = new customer();\r\n\t \r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tClass.forName(driver);\r\n\t\t\tconnect = DriverManager\r\n\t\t\t .getConnection(url + db, user, pass);\r\n\t\t\t\r\n\t\t\tst = connect.createStatement();\r\n\t\t rs = st.executeQuery(\"select * from customers where ID='\" + key + \"'\");\r\n\t\t // rs = st.executeQuery(\"select * from customers where ID='1'\");\r\n\t\t \r\n\t\t System.out.println(\"(dbReadThrough) Retrieving customer \" + key + \" from DB ... \");\r\n\t\t \r\n\t\t while (rs.next()) {\r\n\t\t \t\r\n\t\t \t\r\n\t\t \tint ID = rs.getInt(\"ID\");\r\n\t\t \tString FIRSTNAME = rs.getString(\"FIRSTNAME\");\r\n\t\t \tString LASTNAME = rs.getString(\"LASTNAME\");\r\n\t\t \tString REGION = rs.getString(\"REGION\");\r\n\t\t \tString ADDRESS = rs.getString(\"ADDRESS\");\r\n\t\t \r\n\t\t \tSystem.out.println(\"(dbReadThrough) Found customer: \" + ID + \" -- \" + FIRSTNAME + \" \" + LASTNAME + \" \" + REGION + \" \" + ADDRESS);\r\n\t\t \t\t\t \t\r\n\t \t\tmc.setID(ID);\r\n\t \t\tmc.setFIRSTNAME(FIRSTNAME);\r\n\t \t\tmc.setLASTNAME(LASTNAME);\r\n\t \t\tmc.setREGION(REGION);\r\n\t \t\tmc.setADDRESS(ADDRESS); \t\r\n\t\t \t\t\t \t\r\n\t\t }\r\n\t\t \r\n\t\t System.out.println(\"(dbReadThrough) Writing object for customer \" + key + \" to the cache ... \");\r\n\t return mc;\r\n\t\t\r\n\t\t} finally {\r\n\t\t\tconnect.close();\r\n\t\t}\r\n\r\n\t}",
"EntryNotFoundException() {\n super();\n }",
"static <K extends Comparable<? super K>, V> Iterator<Map.Entry<K, V>> create(\n @Nullable Node<K, V> root) {\n if (root == null) {\n return Collections.emptyIterator();\n } else {\n return new EntryInOrderIterator<>(\n root, null, /* pLowInclusive= */ false, null, /* pHighInclusive= */ false);\n }\n }",
"public static Entry getEntry(String entry)\r\n\t{\n\t\tEntry batchEntry = new Entry(entry.substring(0, entry.length() - 1), entry.substring(entry.length() - 1));\r\n\t\treturn batchEntry;\r\n\t}",
"private FactoryCacheValet() {\n\t\tsuper();\n\t}",
"public interface CacheManager {\n\n void init();\n\n void destroy();\n\n void del(String key);\n\n void set(String key, Object value);\n\n void set(String key, Object value, int expireTime);\n\n <T> T get(String key, Class<T> clazz);\n\n void hset(String key, String subKey, Object value);\n\n <T> T hget(String key, String subKey, Class<T> clazz);\n\n <T> Map<String, T> hget(String key, Class<T> clazz);\n\n void hrem(String key, String subKey);\n\n long hincr(String key, String subKey);\n\n void sadd(String key, Object val);\n\n boolean sisMember(String key, Object val);\n\n void srem(String key, Object val);\n\n Set<String> sget(String key);\n\n <T> Set<T> sget(String key, Class<T> clazz);\n\n void zadd(String key, Object val, double score);\n\n boolean zisMember(String key, Object val);\n\n void zrem(String key, Object val);\n\n void zrem(String key, double min, double max);\n\n void zreplace(String key, Object val, double score);\n\n double zincr(String key, Object val, double score);\n\n <T> Set<T> zget(String key, double min, double max, Class<T> clazz);\n\n Set<String> zget(String key, double min, double max);\n}",
"static <K extends Comparable<? super K>, V> Iterator<Map.Entry<K, V>> create(\n @Nullable Node<K, V> root) {\n if (root == null) {\n return Collections.emptyIterator();\n } else {\n return new DescendingEntryInOrderIterator<>(\n root, null, /* pLowInclusive= */ false, null, /* pHighInclusive= */ false);\n }\n }",
"@Override\n\tpublic Set<Map.Entry<K, V>> entrySet() {\n\t\t// TODO\n\t\treturn new EntryView();\n\t}",
"public Entry(K key, V value) {\r\n this.key = key;\r\n this.value = value;\r\n }",
"public Entry(K key, V value) {\r\n this.key = key;\r\n this.value = value;\r\n }",
"public DescriptorCacheImpl() {\n super();\n \n LOG2.debug(\"New instance!\");\n \n _typeMap = new HashMap();\n _xmlNameMap = new HashMap();\n _missingTypes = new ArrayList();\n }",
"public Entry(K key, V value) {\n this.key = key;\n this.value = value;\n }",
"public Entry(K key, V value) {\n this.key = key;\n this.value = value;\n }",
"public Cache() {\n this(null);\n }",
"public SearchCache() {\n this(CAPACITY, new Ticker());\n }",
"public ua.org.gostroy.guestbook.model.Entry3 create(long entryId);",
"public interface Entry extends Serializable {\n Identifier getIdentifier();\n\n void setIdentifier(Identifier id);\n\n Shape getShape();\n\n void setShape(Shape s);\n\n void setIdentifier(long id);\n\n byte[] getData();\n\n void setData(byte[] data);\n\n long getDataLength();\n\n static Entry create(Identifier identifier, Shape shape, byte[] data) {\n return new EntryImpl(identifier, shape, data);\n }\n}",
"public Entry(K key, V value)\r\n\t\t{\r\n\t\t\tthis.key = key;\r\n\t\t\tthis.value = value;\r\n\t\t}",
"private static Entry<String, Item> entry(String fileName) {\n Entry<String, Item> entry = new Entry<String, Item>();\n entry.setKey(fileName);\n entry.setData(item(fileName));\n return entry;\n }",
"protected abstract S get(E entry);",
"protected abstract T createNewEntry(PersistentEntity persistentEntity);",
"protected abstract AbstractShapeData createCacheEntry(DrawContext dc);",
"public MainAPI (com.intersys.objects.Database db) throws com.intersys.objects.CacheException {\n super (((com.intersys.cache.SysDatabase)db).newCacheObject (CACHE_CLASS_NAME));\n }",
"private UtilsCache() {\n\t\tsuper();\n\t}",
"public Cache.Entry get(String param1) {\n }",
"public Entry create(int compoID,\n\t\t\tint entryID,\n\t\t\tString entryName,\n\t\t\tString entryDesc,\n\t\t\tString entryAuthor) throws CreateException, RemoteException;",
"TarEntry CreateEntry(String name);",
"@Override HashMapEntry<K, V> constructorNewEntry(\n K key, V value, int hash, HashMapEntry<K, V> next) {\n LinkedEntry<K, V> header = this.header;\n LinkedEntry<K, V> oldTail = header.prv;\n LinkedEntry<K, V> newTail\n = new LinkedEntry<K,V>(key, value, hash, next, header, oldTail);\n return oldTail.nxt = header.prv = newTail;\n }",
"public Cache getCache(String name)\r\n/* 39: */ {\r\n/* 40:64 */ return (Cache)this.cacheMap.get(name);\r\n/* 41: */ }",
"public static EntryList getEntryList(){\n if (entryList == null){\n entryList = new EntryList();\n\n }\n return entryList;\n }",
"@Override\r\n public Entry<K, V> floorEntry(final K key) {\n return null;\r\n }",
"void load (CacheEntry entry) throws IOException;",
"protected Entry(int key, Entry next) {\n// this.hash = hash;\n this.key = key;\n this.next = next;\n }",
"DuplicateEntryException() {\n super();\n }",
"final CacheData<K, V> getEntry(final Object key) {\r\n // validateKey the key in the buckets\r\n\r\n // synchronization is not a problem here\r\n // if someone changes or resets a key/value right before this\r\n // it will be properly handled, either it won't find a validateKey in the if or the\r\n // obj being returned will be null, that is fine and expected for a no-validateKey\r\n // then the client will just validateKey whatever data he was looking for in the buckets\r\n return getCacheData(getKeyPosition(key));\r\n }",
"public Entry(int field) {\n this.field = field;\n }",
"public interface Entry {\n // TODO: constraint, depends on event.isRelayEvent / isIndividualEvent\n @NotNull\n MeetAthlete getAthlete();\n RelayTeam getRelayTeam();\n\n Club getClub();\n\n @NotNull\n Event getEvent();\n // TODO: if relay event, constraint: event.swimstyle.relayscount = relayteam.getSize()\n\n /**\n * This is used for the entry status information.\n */\n EntryStatus getStatus();\n\n Duration getEntryTime();\n\n // TODO: qualifying time?\n\n // TODO: PreparedHeat, not null\n @Nullable\n Heat getHeat();\n @Nullable\n Integer getLane();\n\n /**\n * @return true if heat and lane are set, false otherwise\n */\n boolean isHeatPrepared();\n\n AgeGroup getAgeGroup();\n\n // TODO: not null, throw exception\n @Nullable\n Result getResult();\n}",
"public static EntryDatabase getInstance(Context context) {\n if (EntryDatabase.instance != null) {\n return EntryDatabase.instance;\n } else {\n EntryDatabase.instance = new EntryDatabase(context, \"entries\", null, 1);\n return EntryDatabase.instance;\n }\n }",
"public DataObjectEntry getDataObjectEntry(String entryKey);",
"public qEntry() { }",
"public CacheObject(String pn, Runner runner) throws IOException, BadPathnameException {\n pathname = pn;\n // also sets server_checkin_time\n last_known_edit_time = get_server_edit_time(runner);\n content = new HashMap<>();\n final_block = -1;\n }",
"protected abstract Map.Entry<Sheet, EvaluationSheet> getInstance();",
"protected Reservation factory(int id, Reservation entry) {\r\n \t\treturn new Reservation(id, entry.customer, entry.period, entry.vehicle);\r\n \t}",
"interface Entry {\n\n /** The entry name separator as a string. */\n String SEPARATOR = ArchiveEntry.SEPARATOR;\n\n /** The entry name separator as a character. */\n char SEPARATOR_CHAR = ArchiveEntry.SEPARATOR_CHAR;\n\n /**\n * Denotes the entry name of the virtual root directory.\n * This name is used as the value of the <code>innerEntryName</code>\n * property if a <code>File</code> instance denotes an archive file.\n * <p>\n * This constant may be safely used for identity comparison.\n */\n String ROOT_NAME = \"\";\n}",
"public CacheTracabilityFactoryImpl() {\n\t\tsuper();\n\t}",
"public static <T extends Entity> EntityCache<T> getDiskEntityCache(DB db, String name) {\n\t\tEntityMap<T> entityMap = new DiskEntityMap<T>(db, name);\n\t\treturn new EntityCache<T>(entityMap);\n\t}",
"public AddressCacheImpl() {\n\t\tthis(CACHE_SIZE_DEFAULT, 0L);\n\t}",
"public Node<E> createNode(E e) {\n Node<E> nodeFromCache = getNodeFromCache();\n if (nodeFromCache == null) {\n return super.createNode(e);\n }\n nodeFromCache.setValue(e);\n return nodeFromCache;\n }",
"TreeMap_Entry(Object key, Object value, TreeMap_Entry parent/*F=this.F*/) {\n this.key = key;\n this.value = value;\n this.parent = parent;\n }",
"@Test\n public void simpleAPIWithGenericsAndNoTypeEnforcement() {\n\n MutableConfiguration config = new MutableConfiguration<String, Integer>();\n Cache<Identifier, Dog> cache = cacheManager.createCache(cacheName, config);\n\n\n //Types are restricted\n //Cannot put in wrong types\n //cache.put(1, \"something\");\n\n //can put in\n cache.put(pistachio.getName(), pistachio);\n cache.put(tonto.getName(), tonto);\n\n //cannot get out wrong key types\n //assertNotNull(cache.get(1));\n assertNotNull(cache.get(pistachio.getName()));\n assertNotNull(cache.get(tonto.getName()));\n\n //cannot remove wrong key types\n //assertTrue(cache.remove(1));\n assertTrue(cache.remove(pistachio.getName()));\n assertTrue(cache.remove(tonto.getName()));\n\n }",
"public SafeHashMap.Entry getEntry(Object oKey)\n {\n // check if the cache needs flushing\n checkFlush();\n\n Entry entry = (Entry) getEntryInternal(oKey);\n if (entry == null)\n {\n m_stats.registerMiss();\n }\n else\n {\n m_stats.registerHit();\n entry.touch();\n }\n\n return entry;\n }",
"public Entry() {\n this(GtkEntry.createEntry());\n }",
"public Map.Entry<V, K> forEntry(int i) {\n return new EntryForValue(this.biMap, i);\n }",
"<T> AbstractMultiTenantPool.Entry<T> getEntry();",
"public static <K, V> Map.Entry<K, V> entry(K key, V value) {\n return new AbstractMap.SimpleImmutableEntry<>(key, value);\n }",
"public MainAPI (com.intersys.cache.CacheObject ref) throws com.intersys.objects.CacheException {\n super (ref);\n }",
"public Entry(String name, String shortName, String wkn)\r\n\t{\r\n\t\tthis.name = name;\r\n\t\tthis.shortName = shortName;\r\n\t\tthis.wkn = wkn;\r\n\t\tdeletedFlag = false;\r\n\t}",
"public Cache(final Element cacheInfo, final Byte version,\n\t\t\tfinal String indexdir) {\n\t\tif (version == 0) {\n\t\t\treadInfo0(cacheInfo, indexdir);\n\t\t} else if (version == 3) {\n\t\t\treadInfo3(cacheInfo, indexdir);\n\t\t} else {\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"unsupported version \" + version);\n\t\t}\n\t}",
"public LogEntry () {\n }",
"public static FileCache getInstance() {\n\t\tif (instance == null){\r\n\t\t\ttry {\r\n\t\t\t\tinstance = new FileCache();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn instance;\r\n\t}"
] | [
"0.7681215",
"0.7289853",
"0.69751114",
"0.6892142",
"0.66820604",
"0.656961",
"0.6464069",
"0.64534056",
"0.6452454",
"0.63194704",
"0.63051903",
"0.62765366",
"0.6274644",
"0.62711453",
"0.621328",
"0.6197454",
"0.612877",
"0.6126041",
"0.61137617",
"0.6056163",
"0.6006508",
"0.5993943",
"0.59862876",
"0.5919047",
"0.5916259",
"0.5896982",
"0.58720446",
"0.5869462",
"0.5866511",
"0.58408976",
"0.582813",
"0.5824905",
"0.5797498",
"0.5728931",
"0.5723274",
"0.5722184",
"0.57090867",
"0.5683105",
"0.5675429",
"0.5666996",
"0.5665385",
"0.5654376",
"0.5646306",
"0.5640693",
"0.5637935",
"0.5621532",
"0.56207544",
"0.5603334",
"0.56009024",
"0.56009024",
"0.55986476",
"0.55956525",
"0.55956525",
"0.55951667",
"0.5583324",
"0.558054",
"0.55658126",
"0.5562519",
"0.55552894",
"0.55537146",
"0.5553274",
"0.5536651",
"0.5527791",
"0.5512123",
"0.55090225",
"0.55053717",
"0.5492867",
"0.54850835",
"0.5458701",
"0.5445107",
"0.5444771",
"0.54419816",
"0.5407959",
"0.5403842",
"0.53858465",
"0.5383929",
"0.53813726",
"0.5369705",
"0.5364607",
"0.53429854",
"0.53397924",
"0.53222394",
"0.5312795",
"0.53060937",
"0.5302208",
"0.5297513",
"0.52944493",
"0.5293895",
"0.5284641",
"0.52793515",
"0.52766734",
"0.526767",
"0.5267395",
"0.526661",
"0.5262128",
"0.5261767",
"0.5260122",
"0.5259658",
"0.5256783",
"0.5253267"
] | 0.7462897 | 1 |
Map.Entry interface This method is invoked when the containing Map has actually added this Entry to itself. | @SuppressWarnings("unchecked")
protected void onAdd()
{
// issue add notification
ObservableHashMap map = ObservableHashMap.this;
if (map.hasListeners())
{
map.dispatchEvent(new MapEvent(map, MapEvent.ENTRY_INSERTED,
getKey(), null, getValue()));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n synchronized public void addEntry(Entry e) throws RemoteException {\n if (this.map.containsKey(e.getHash())) {\n return;\n }\n //System.out.println(\"Mapper.addEntry() :: entry=\"+e.getHash()+\",\"+e.getLocation());\n this.map.put(e.getHash(), e.getLocation());\n printAct(\">added entry:\" + e.hash);\n }",
"protected void onAdd()\n {\n scheduleExpiry();\n\n // update units\n int cNewUnits = calculateUnits(m_oValue);\n OldOldCache map = OldOldCache.this;\n synchronized (map)\n {\n int cOldUnits = m_cUnits;\n if (cOldUnits == -1)\n {\n // entry is discarded; avoid exception\n return;\n }\n\n if (cNewUnits != cOldUnits)\n {\n map.adjustUnits(cNewUnits - cOldUnits);\n m_cUnits = cNewUnits;\n }\n }\n\n // issue add notification\n if (map.hasListeners())\n {\n map.dispatchEvent(map.instantiateMapEvent(\n MapEvent.ENTRY_INSERTED, getKey(), null, getValue()));\n }\n }",
"void onEntryAdded(Entry entry);",
"public void onEntry()\n\t{\n\t}",
"public void postEntry(Entry entry) {\n\t\tentries.addFirstElement(entry);\n\t}",
"protected void touchEntry(CacheEntry entry) {\n if (_last == entry) {\n return;\n }\n removeEntry(entry);\n addEntry(entry);\n }",
"@Override\r\n\tpublic void entryAdded(EntryEvent<Object, Object> event) {\r\n\t\t//\r\n\t\ttry {\r\n\t\t\ttopologyMap = readTopologyMap();\r\n\t\t\t\r\n\t\t\tsetOwnDataNodeGroup();\r\n\t\t\t\r\n\t\t} catch (ExceptionHazelcastServerAlreadyClosed | ExceptionHazelcastIMapNotFound | ExceptionHazelcastServerConfigError e) {\r\n\t\t\tlogger.error(\"[MainNodeManager].entryAdded : error = \" + e);\r\n\t\t}\r\n\t}",
"public void entryAdded(EntryEvent<Identifier, SystemMetadata> event) {\n\n if (ComponentActivationUtility.replicationIsActive()) {\n log.info(\"Received entry added event on the hzSystemMetadata map for pid: \"\n + event.getKey().getValue());\n\n if (isAuthoritativeReplicaValid(event.getValue())) {\n createReplicationTask(event.getKey());\n } else {\n log.info(\"Authoritative replica is not valid, not queueing to replication for pid: \"\n + event.getKey().getValue());\n }\n }\n }",
"@Override\r\n\tpublic void addToMap(MapView arg0) {\n\t\tsuper.addToMap(arg0);\r\n\t}",
"@SuppressWarnings(\"unchecked\")\n protected void onRemove()\n {\n // issue remove notification\n ObservableHashMap map = ObservableHashMap.this;\n if (map.hasListeners())\n {\n map.dispatchEvent(new MapEvent(map, MapEvent.ENTRY_DELETED,\n getKey(), getValue(), null));\n }\n }",
"@SuppressWarnings(\"unchecked\")\n public MapEntryImpl addEntry(MapEntryImpl newEntry, Object key, int hash) {\n int i = indexOfKey(key, hash);\n MapEntryImpl entry = entries[i];\n if (entry != null) return entry; // Entry exists\n entries[i] = newEntry;\n newEntry.key = key;\n newEntry.hash = hash;\n // Check if we need to resize.\n if ((++count << EMPTINESS_LEVEL) > entries.length) {\n resize(entries.length << 1);\n }\n return newEntry;\n }",
"@Override\n public void accept(final Visitor v) {\n v.visitStackMapEntry(this);\n }",
"private void put(PrimitiveEntry entry) {\n int hashIndex = findHashIndex(entry.getKey());\n entries[hashIndex] = entry;\n }",
"@Override\n public void insertEntry(Entry entry) {\n members.add(entry);\n\n }",
"public boolean add(T entry) {\n return false;\n }",
"@Override\n\t\tpublic boolean add(java.util.Map.Entry<F, Double> arg0) {\n\t\t\tthrow new UnsupportedOperationException(\"Not yet implemented!\");\n\t\t}",
"protected void addEntries() {\r\n\t\t// default is to do nothing;\r\n\t}",
"@Override\n\tpublic void entry() {\n\n\t}",
"void sendEntry(Entry e) {\n // System.out.println(\"Mapper.sendEntry()\");\n RemoteMapper dest = findMapper(e.getHash());\n try {\n if (predKey != 0) {\n removeKey(e.getHash());\n }\n dest.addEntry(e);\n } catch (RemoteException ex) {\n ex.printStackTrace();\n }\n\n }",
"@Override\n synchronized public void addMap(TreeMap toAdd) {\n this.map.putAll(toAdd);\n printAct(\"added a whole map with keys from:\" + toAdd.firstKey() + \" up to:\" + toAdd.lastKey());\n }",
"void visit(Entry entry);",
"public void addEntry(Entry e) {\n entries.put(e.getName(), e);\n }",
"public boolean addEntry(AddressEntry addressEntry) {\n return this.entrySet.add(addressEntry);\n }",
"public void onTileEntry(Tile tile) {}",
"public boolean addEntry(@NotNull Entry<T> entry) {\n if (entries.contains(entry)) {\n return false;\n }\n\n entries.add(entry);\n entry.addValueChangedListener(entryValueChangedListener);\n return true;\n }",
"public void entryAdded (TudeySceneModel.Entry entry)\n {\n setVisibility(entry);\n }",
"public void addEntry(Entry entry) {\n entries.add(entry);\n }",
"@Override\n\tpublic void addEntry(E entry) {\n\n\t\t// Determine if the entry already exists in the list\n\t\tE current = this.getHead();\n\t\twhile (current != null) {\n\t\t\tif (this.isEqual(current, entry)) {\n\t\t\t\t// Already in list\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tcurrent = current.getNext();\n\t\t}\n\n\t\t// Not in list, so add the entry\n\t\tsuper.addEntry(entry);\n\t}",
"public void entryTouched(OldOldCache.Entry entry);",
"private static void\n extraWrite (final Map.Entry <String, VersionedValue> entry, State self)\n {\n self.putString (entry.getKey ());\n self.putNumber4 (entry.getValue ().getVersion ());\n self.putString (entry.getValue ().getValue ());\n }",
"public void entryUpdated(EntryEvent<Identifier, SystemMetadata> event) {\n\n if (ComponentActivationUtility.replicationIsActive()) {\n log.info(\"Received entry updated event on the hzSystemMetadata map for pid: \"\n + event.getKey().getValue());\n\n if (isAuthoritativeReplicaValid(event.getValue())) {\n createReplicationTask(event.getKey());\n } else {\n log.info(\"Authoritative replica is not valid, not queueing to replication for pid: \"\n + event.getKey().getValue());\n }\n }\n }",
"public boolean add(T newEntry);",
"@Override\n public void addMapInfo(GameMapInfo mapInfo) {\n }",
"public void goToEntry() {\n this.step(GameMap.instance().getEntryTile());\n }",
"protected void computeEntryWritten(K key, InternalCacheEntry<K, V> value) {\n // Do nothing by default\n }",
"public void addEntry(NameSurferEntry entry) {\r\n\t\tentryGraph.add(entry);\r\n\t}",
"public void notifyMapLoaded();",
"protected Entry(){}",
"TreeMap_Entry(Object key, Object value, TreeMap_Entry parent/*F=this.F*/) {\n this.key = key;\n this.value = value;\n this.parent = parent;\n }",
"protected ForwardingMapEntry() {}",
"public void add(T newEntry) {\r\n add(size(), newEntry);\r\n }",
"void onEntryMoved(Entry entry);",
"public void addEntry(@NotNull Entry entry) {\n for (String name : entry.names) {\n mappingByName.put(name, entry);\n }\n }",
"protected SafeHashMap.Entry instantiateEntry()\n {\n return new Entry();\n }",
"protected UUID add(E entry) {\n\t\treturn add(entry, true);\n\t}",
"@Override\n public Set<Map.Entry<K, V>> entrySet() {\n return new EntrySet();\n }",
"void addEntry(String key, Object value) {\n this.storageInputMap.put(key, value);\n }",
"@CalledByNative\n public void onDictionaryAdded() {\n // Left blank;\n }",
"public void push(T newEntry) {\n\t\tcheckInitialization();\n\t\tvector.addElement(newEntry);\n\t}",
"protected SafeHashMap.Entry<K, V> instantiateEntry()\n {\n return new Entry<>();\n }",
"@Test\n public void entrySetTest()\n {\n map.putAll(getAMap());\n assertNotNull(map.entrySet());\n }",
"public void push(T newEntry);",
"public void addEntry(Entry entry) {\n getEntryList().addEntry(entry);\n }",
"public void onOrderAdded(OrderEntry orderEntry);",
"public void add(FileSystemEntry entry);",
"@Override\n\t\t\t\t\tpublic Element handleMap(ElementContainer<?> parent,\n\t\t\t\t\t\t\tFMapType src) {\n\t\t\t\t\t\treturn super.handleMap(parent, src);\n\t\t\t\t\t}",
"@Override\n\t\tpublic List<? extends MyHashMap.Entry<K, V>> getEntries() {\n\t\t\treturn e;\n\t\t}",
"@Override\n\tpublic Set<Map.Entry<K, V>> entrySet() {\n\t\t// TODO\n\t\treturn new EntryView();\n\t}",
"@Override\n public void handleMarkersListener(GoogleMap googleMap) {\n this.addMarkersListener(googleMap);\n }",
"@Override\n\tpublic EntryMessage traceEntry() {\n\t\treturn null;\n\t}",
"@Override\r\n\tpublic void flushEntry(String key) {\n\t\t\r\n\t}",
"@Override\n\tpublic Set<Entry<K, V>> entrySet() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic Set<Entry<K, V>> entrySet() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic Set<Entry<K, V>> entrySet() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic Set<Entry<K, V>> entrySet() {\n\t\treturn null;\n\t}",
"public void addEntry(NameSurferEntry entry) {\r\n\t\tentries.add(entry);\r\n\t}",
"public void addEntry(EventDataEntry entry) {\r\n eventFields.add(entry);\r\n }",
"@Override\n\tpublic void entriesAdded(Collection<String> arg0) {\n\n\t}",
"void addEntry(ReadOnlyEntry entry) throws DuplicateEntryException, OverlappingEventException,\n OverlappingAndOverdueEventException, EntryOverdueException;",
"public HashEntry( AnyType e )\n {\n \tkey = e;\n }",
"@Override\r\n public void updateEntryValue(Object key, Object value) throws Exception\r\n {\n }",
"protected Object processEntry(InvocableMap.Entry<K, V> entry, Map<? extends K, ? extends V> mapAll,\n boolean fInsert, boolean fReturn)\n {\n K oKey = entry.getKey();\n\n if (mapAll.containsKey(oKey))\n {\n V oValueCur = entry.getValue();\n V oValueNew = mapAll.get(oKey);\n boolean fMatch;\n\n if (oValueCur == null)\n {\n fMatch = fInsert;\n }\n else\n {\n Comparable verCur = oValueCur.getVersionIndicator();\n Comparable verNew = oValueNew.getVersionIndicator();\n\n fMatch = verCur.compareTo(verNew) == 0;\n }\n\n if (fMatch)\n {\n oValueNew.incrementVersion();\n entry.setValue(oValueNew, false);\n return NO_RESULT;\n }\n return fReturn ? oValueCur : NO_RESULT;\n }\n\n return NO_RESULT;\n }",
"@Override\n\tpublic Set<java.util.Map.Entry<String, String>> entrySet() {\n\t\treturn null;\n\t}",
"private HashEntry(K insertKey, V insertValue)\r\n\t\t{\r\n\t\t\tkey = insertKey;\r\n\t\t\tvalue.add(insertValue);\r\n\t\t}",
"boolean appendEntry(final LogEntry entry);",
"void insert(EntryPair entry);",
"protected boolean keepEntry(ShapeEntry shapeEntry, Map<String, Object> data) {\n\t\treturn true;\n\t}",
"public void addEntry(KantoDex entry)\n {\n if(entries.isEmpty())\n {\n entries.add(entry);\n }\n else\n {\n boolean notFound = true;\n for(KantoDex entryInit : entries)\n {\n if(entry.getDexNumInt() == entryInit.getDexNumInt())\n {\n System.out.println(\"Error: Attempted to add an entry that already exists, or should not exist.\");\n notFound = false;\n }\n }\n if(notFound)\n {\n entries.add(entry);\n }\n }\n }",
"public int size ()\n {\n return this.entryMap.size ();\n }",
"public boolean contains(T entry) {\n return false;\n }",
"public void entryUpdated (TudeySceneModel.Entry oentry, TudeySceneModel.Entry nentry)\n {\n setVisibility(nentry);\n }",
"public void entryScanned(final T entry, final R row);",
"@Override\r\n public Entry<K, V> floorEntry(final K key) {\n return null;\r\n }",
"public void in(food entry)\n\t{\n\t\titems.add(entry);\n\t}",
"public E getEntry() {\n return _entry;\n }",
"@Override\n public void onAdded() {\n }",
"public void push(T entry)\n { \n first = push(entry, first);\n }",
"public void addEntry(NameSurferEntry entry) {\r\n\t\tdisplayEntries.add(entry);\r\n\t\tupdate();\r\n\t}",
"public void setEntry(Set<AddressEntry> entry) {\n this.entrySet = entry;\n }",
"@Override\n\tpublic void update(Entry entry) {\n\t\tentryDAO.save(entry);\n\t}",
"public void addEntry(NameSurferEntry entry) {\n\t\tentries.add(entry);\n\t}",
"@SuppressWarnings(\"unchecked\")\n public V setValue(V oValue)\n {\n ObservableHashMap map = ObservableHashMap.this;\n synchronized (map)\n {\n // perform the entry update\n V oPrev = super.setValue(oValue);\n\n // note: previous to Coherence 3.1, there was an optimization\n // that would only raise an event if the reference was changing,\n // i.e. if (oPrev != oValue) {..}\n\n // issue update notification\n if (map.hasListeners())\n {\n map.dispatchEvent(new MapEvent(map, MapEvent.ENTRY_UPDATED,\n getKey(), oPrev, oValue));\n }\n\n return oPrev;\n }\n }",
"public Set<Map.Entry<K, V>> entrySet() {\n System.out.println(\"SimpleTreeMap.entrySet()\");\n return mMap.entrySet();\n }",
"public MapEntry(K k, V v)\r\n\t\t{\r\n\t\t\tkey = k;\r\n\t\t\tval = v;\r\n\t\t}",
"@Override\n\tpublic Marker addMarker() {\n\t\treturn null;\n\t}",
"void addTransientEntry(K key, V value);",
"@Override\r\n public Entry<K, V> lastEntry() {\n return null;\r\n }",
"public void enterMap(Map map, int layer, int i, int j) {\n //1. add the tile to the map\n map.addTile( layer, i, j, this);\n }",
"public Set<Map.Entry<K, V>> entrySet() {\n System.out.println(\"SimpleHashMap.entrySet()\");\n return mMap.entrySet();\n }",
"@Override\n\tpublic EntryMessage traceEntry(Message message) {\n\t\treturn null;\n\t}"
] | [
"0.7157696",
"0.69664335",
"0.68268424",
"0.64508003",
"0.62716293",
"0.6252456",
"0.6204809",
"0.60835713",
"0.60419935",
"0.603209",
"0.602097",
"0.6014933",
"0.6010725",
"0.59871286",
"0.59638083",
"0.59441227",
"0.5941583",
"0.5908171",
"0.5905217",
"0.5900621",
"0.58537465",
"0.57813066",
"0.5780465",
"0.57629865",
"0.57346046",
"0.5730665",
"0.5723182",
"0.57206327",
"0.57143927",
"0.5691597",
"0.5678265",
"0.56450105",
"0.56070954",
"0.55598956",
"0.5508702",
"0.5483476",
"0.54811794",
"0.54765046",
"0.5474907",
"0.5471261",
"0.54684234",
"0.5465899",
"0.5465336",
"0.5454198",
"0.54480076",
"0.54358673",
"0.543452",
"0.54165167",
"0.5415825",
"0.5412532",
"0.54018176",
"0.53989977",
"0.53770024",
"0.5362429",
"0.535907",
"0.5353465",
"0.5348851",
"0.53380865",
"0.53336245",
"0.5330196",
"0.5330171",
"0.53177243",
"0.53177243",
"0.53177243",
"0.53177243",
"0.5310721",
"0.5308597",
"0.53009003",
"0.5300416",
"0.5298785",
"0.5297447",
"0.52876246",
"0.5277721",
"0.5257733",
"0.5255881",
"0.52534044",
"0.52487075",
"0.52426225",
"0.5242256",
"0.5242052",
"0.52416337",
"0.5234084",
"0.52335393",
"0.5230192",
"0.52250534",
"0.522221",
"0.5221292",
"0.52188164",
"0.5218585",
"0.5216745",
"0.5215064",
"0.520285",
"0.519171",
"0.51838166",
"0.51821333",
"0.5176184",
"0.51745915",
"0.51689255",
"0.5167132",
"0.51647305"
] | 0.7509798 | 0 |
Update the cached value. | @SuppressWarnings("unchecked")
public V setValue(V oValue)
{
ObservableHashMap map = ObservableHashMap.this;
synchronized (map)
{
// perform the entry update
V oPrev = super.setValue(oValue);
// note: previous to Coherence 3.1, there was an optimization
// that would only raise an event if the reference was changing,
// i.e. if (oPrev != oValue) {..}
// issue update notification
if (map.hasListeners())
{
map.dispatchEvent(new MapEvent(map, MapEvent.ENTRY_UPDATED,
getKey(), oPrev, oValue));
}
return oPrev;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void update(String pathString, CacheEntry cacheEntry);",
"public void update() {\n\t\tmLast = mNow;\n\t\tmNow = get();\n\t}",
"public void storeInCache() {\r\n lockValueStored = IN_CACHE;\r\n }",
"@Override\n\t\tpublic void update() {\n\n\t\t}",
"@Override\n\t\tpublic void update() {\n\n\t\t}",
"@Override\n\t\tpublic void update() {\n\n\t\t}",
"public void setCached() {\n }",
"public void update(){}",
"public void update(){}",
"public Value getCachedValue() {\n return cachedValue;\n }",
"@Override\n public void update(IBasicEntity ent) throws CachingException {\n EntityCachingServiceLocator.getEntityCachingService().update(ent);\n }",
"@Override\r\n\t\tpublic void update() {\n\t\t\t\r\n\t\t}",
"@Override\r\n\t\tpublic void update() {\n\t\t\t\r\n\t\t}",
"public void update() {}",
"public void update(Runnable onChange) {\n HashMap<String, Double> newExchangeRates = new HashMap<>(networkEnterprise.getAllExchangeRates());\n if (allExchangeRates != null && newExchangeRates.toString().equals(allExchangeRates.toString()))\n return;\n\n Log.d(\"cache\", \"OLD: \" + allExchangeRates);\n Log.d(\"cache\", \"NEW: \" + newExchangeRates);\n allExchangeRates = newExchangeRates;\n\n if (onChange != null)\n onChange.run();\n }",
"void updateCacheEntry(CacheKey key, Query query, QueryResultPacket resultPacket) {\n long oldTimestamp;\n if (!activeCache) return;\n\n PacketWrapper wrapper = lookup(key, query);\n if (wrapper == null) return;\n\n // The timestamp is owned by the QueryResultPacket, this is why this\n // update method puts entries into the cache differently from elsewhere\n oldTimestamp = wrapper.getTimestamp();\n wrapper = (PacketWrapper) wrapper.clone();\n wrapper.addResultPacket(resultPacket);\n synchronized (packetCache) {\n packetCache.put(key, wrapper, oldTimestamp);\n }\n }",
"@Override\r\n public void update() {\r\n this.total = calculateTotal();\r\n }",
"public void updateCache() {\n\n log.info(\"Updating solar flare cache\");\n Date fallbackStartDate = DateHelper.getFallbackDate();\n solarFlareRepository.count()\n .map(total -> {\n if (total > 0) {\n solarFlareRepository.findTopByBeginTimeIsNotNullOrderByBeginTimeDesc()\n .map(solarFlare -> {\n log.info(\"Entries exist, performing incremental update\");\n log.info(\n \"Last entry found at {}\",\n DateHelper.getPrintableString(solarFlare.getBeginTime())\n );\n collectForRange(solarFlare.getBeginTime(), null);\n return solarFlare;\n })\n .subscribe();\n } else {\n log.info(\"No entries found, performing a full import\");\n collectForRange(fallbackStartDate, null);\n }\n return total;\n })\n .subscribe();\n }",
"@Override\n\tpublic void update() {\n\t\tobj.update();\n\t}",
"private void pageCacheChanged() {\n // Ok to have a race here, see the field javadoc.\n if (!pageCacheChanged)\n pageCacheChanged = true;\n }",
"public final void update(){\n if(waitingToExecute){\n execute();\n waitingToExecute = false;\n }\n }",
"public void updateData() {}",
"@Override\n\tpublic void update() {}",
"@Override\n\tpublic void update() {}",
"@Override\n public void update() {\n updateBuffs();\n }",
"public void update() {\n\t}",
"public void update() {\n\t}",
"public void update() {\n\t}",
"public void update() {\n\t}",
"@Override\r\n\tpublic void update() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void update() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void update() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void update() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void update() {\n\t\t\r\n\t}",
"abstract protected DataValue updateValue(String key);",
"@Override\n\tpublic int updateCacheData(String paramString1, String paramString2,\n\t\t\tString paramString3)\n\t{\n\t\treturn 0;\n\t}",
"@Override\n\tpublic CacheData updateByTimestamp(String timestamp) {\n\t\treturn null;\n\t}",
"public void cacheResult(DataEntry dataEntry);",
"public void update() {\n \t\tissueHandler.checkAllIssues();\n \t\tlastUpdate = System.currentTimeMillis();\n \t}",
"public void update() {\n\t\tupdate(1);\n\t}",
"public void update() {\n\t\t\n\t}",
"public void updateCache(Player player) {\n\t\tif (this.caching.contains(player)) {\n\t\t\tPlayerState state = new PlayerState();\n\t\t\tstate.setLocation(player.getLocation());\n\t\t\tstate.setVelocity(player.getVelocity());\n\t\t\tstate.setArmorContents(player.getEquipment().getArmorContents());\n\t\t\tstate.setInventoryContents(player.getInventory().getContents());\n\t\t\tstate.setSlot(player.getInventory().getHeldItemSlot());\n\t\t\tstate.setGameMode(player.getGameMode());\n\n\t\t\tPlayerContinuousSnap snap = this.cached.get(player);\n\t\t\tsynchronized (snap) {\n\t\t\t\tsnap.getCachedStates().add(state);\n\t\t\t}\n\t\t}\n\t}",
"@Override\n\tpublic int update() {\n\t\treturn 0;\n\t}",
"private void invalidateCache() {\n\t}",
"public static void update() \r\n {\r\n lastTime = currentTime; \r\n currentTime = getTime(); \r\n }",
"@Override\n\tpublic void invalidateCache() {\n\t\t\n\t}",
"public void put(Object key, Object value) {\n Entry entry = this.cache.get(key);\n\n if (entry == null) {\n // cache is fully used\n if (currentSize >= cacheSize) {\n cache.remove(tail.key);\n removeLast();\n }\n else {\n currentSize++;\n }\n\n entry = new Entry();\n }\n\n // update the K/V in the Entry object\n entry.key = key;\n entry.value = value;\n cache.put(key, entry);\n\n // move to the head of list\n moveToHead(entry);\n }",
"@Override\n\tpublic void update() { }",
"@Override\r\n\tpublic void update() {\r\n\t}",
"public void refreshObjectCache();",
"@Override\r\n\tpublic int update() throws Exception {\n\t\treturn 0;\r\n\t}",
"public LocalCacheValue updateInternalValue(Object internalValue, long ldtModification, ExpiryPolicy policy)\n {\n m_metaInf.modified(ldtModification, policy);\n m_syntheticKind = JCacheSyntheticKind.JCACHE_SYNTHETIC_NONE;\n m_internalValue = internalValue;\n return this;\n }",
"public void update() {\n }",
"public void willbeUpdated() {\n\t\t\n\t}",
"@Override\r\n\tpublic void update() {\n\t\tsuper.update();\r\n\t}",
"@Override\r\n\tpublic void update() {\r\n\r\n\t}",
"@Override\r\n\tpublic void update() {\n\t}",
"@Override\r\n\tpublic void update() {\n\t}",
"public void update() {\n manager.update();\n }",
"@Override\n\tpublic void update() {\n\n\t}",
"@Override\n\tpublic void update() {\n\n\t}",
"@Override\n\tpublic void update() {\n\n\t}",
"@Override\n\tpublic void update() {\n\n\t}",
"@Override\n\tpublic void update() {\n\n\t}",
"@Override\n\tpublic void update() {\n\n\t}",
"public String put(String key, String value)\n {\n String previousValue = getMap().put(key, value);\n if (value != previousValue && (value == null || !value.equals(previousValue))) {\n cacheable.setPropertyBoolean(PROPERTY_DIRTY, true);\n updater.deferUpdate();\n }\n return previousValue;\n }",
"public void cache(int variableId, int value) {\n localCache.put(variableId, value);\n }",
"private boolean updateCache(String type) {\n\t\treturn false;\n\t}",
"public void update( ICacheElement<K, V> item, byte requesterId )\r\n throws IOException\r\n {\r\n LateralElementDescriptor led = new LateralElementDescriptor( item );\r\n led.requesterId = requesterId;\r\n led.command = led.UPDATE;\r\n send( led );\r\n }",
"private final void updateCache(User user) throws Exception {\r\n if (user.getLastMod() == null) {\r\n user.setLastMod(Tstamp.makeTimestamp());\r\n }\r\n updateCache(user, this.makeUser(user), this.makeUserRefString(user));\r\n }",
"public Object setCachedObject(String key, Object obj) {\n return cache.put(key, obj);\n }",
"public void incrMetaCacheHit() {\n metaCacheHits.inc();\n }",
"public void update(int value) {\n\t\tupdate((long) value);\n\t}",
"@Override\n\tpublic int update(Object ob) {\n\t\treturn 0;\n\t}",
"public void updateCache(MetadataSource source, MetadataCache cache, byte[] document) throws InvalidMetadataException;",
"@Override\n\tpublic void update() {\n\t}",
"@Override\n\tpublic void update() {\n\t}",
"@Override\n\tpublic void update() {\n\t}",
"public void update (String key_val, String val)\n {\n }",
"void invalidateCache();",
"public void update()\n\t{\n\t\tsuper.update();\n\t}",
"public void update( long timestamp, Number value );",
"public synchronized void updateData() {\n updateDataFields(this::defaultFetcher);\n }",
"long getUpdated();",
"void updateData();",
"@Override\r\n public void setCaching(int parseInt) {\n\r\n }",
"@Override\n public void update() {\n }",
"public Boolean updateCache(String type) throws Exception {\n //Updating the same policy\n System.out.println(\"Updating Cache after a record is \"+type);\n JSONObject currentPolicy = policy.getCachePolicy();\n return updateCache(currentPolicy);\n }",
"public synchronized void storeValue(K key, V value) {\n SoftReference<V> ref = cache.get(key);\n cache.put(key, new SoftReference<V>(value));\n\n // Is the cache unbounded?\n if (size == null) {\n return;\n }\n\n // Was the key already present in the cache?\n if (ref != null) {\n recentlyUsed.remove(key);\n }\n recentlyUsed.add(0, key);\n\n // Is the cache now overflowing?\n if (recentlyUsed.size() > size) {\n cache.remove(recentlyUsed.get(size));\n recentlyUsed.remove((int)size); // Remove by index, not value.\n }\n }",
"@Override\n\tpublic void updateSession(CacheHttpSession httpSession) {\n\t\t\n\t}",
"public void update() {\r\n\t\t\r\n\t}",
"@Override\r\n public void updateEntryValue(Object key, Object value) throws Exception\r\n {\n }",
"public void update() {\n\n }",
"public void update() {\n\n }",
"@Override\n\tpublic void updateIfNeeded() {\n\t\tif(needToUpdate){\n\t\t\tinit();\n\t\t\tneedToUpdate = false;\n\t\t}\n\t}",
"public Object setValue(Object oValue)\n {\n // optimization - verify that the entry is still valid\n if (m_cUnits == -1)\n {\n // entry is discarded; avoid exception\n super.setValue(oValue);\n return null;\n }\n\n // perform the entry update\n Object oPrev;\n int cNewUnits = calculateUnits(oValue);\n OldOldCache map = OldOldCache.this;\n synchronized (map)\n {\n int cOldUnits = m_cUnits;\n if (cOldUnits == -1)\n {\n // entry is discarded; avoid repetitive events\n super.setValue(oValue);\n return null;\n }\n\n if (cNewUnits != cOldUnits)\n {\n map.adjustUnits(cNewUnits - cOldUnits);\n m_cUnits = cNewUnits;\n }\n\n oPrev = super.setValue(oValue);\n }\n\n scheduleExpiry();\n\n // issue update notification\n if (map.hasListeners())\n {\n map.dispatchEvent(map.instantiateMapEvent(\n MapEvent.ENTRY_UPDATED, getKey(), oPrev, oValue));\n }\n\n return oPrev;\n }",
"@Override\r\n\tpublic void updateData() {\n\t\t\r\n\t}",
"private void update(int frameNo)\n {\n //This function is to be used for LRU and MRU\n }",
"@Override\n\tpublic void update() {\n\t\t\n\t}",
"@Override\n\tpublic void update() {\n\t\t\n\t}",
"@Override\n\tpublic void update() {\n\t\t\n\t}"
] | [
"0.68370837",
"0.6688399",
"0.6575055",
"0.63207376",
"0.63207376",
"0.63207376",
"0.630782",
"0.62783366",
"0.62783366",
"0.6269303",
"0.6122008",
"0.6096775",
"0.6096775",
"0.60916555",
"0.6077011",
"0.60612077",
"0.6040238",
"0.6014929",
"0.5993407",
"0.5970619",
"0.5962799",
"0.5899192",
"0.5898947",
"0.5898947",
"0.5871815",
"0.5871391",
"0.5871391",
"0.5871391",
"0.5871391",
"0.58696234",
"0.58696234",
"0.58696234",
"0.58696234",
"0.58696234",
"0.58655494",
"0.58567804",
"0.583453",
"0.5830078",
"0.58244246",
"0.5819073",
"0.58170927",
"0.5801161",
"0.5797184",
"0.5792936",
"0.5768513",
"0.57616246",
"0.5757521",
"0.57500815",
"0.5749324",
"0.57447505",
"0.57380044",
"0.57335734",
"0.57307655",
"0.572505",
"0.5716188",
"0.5714521",
"0.5710141",
"0.5710141",
"0.57016593",
"0.56937087",
"0.56937087",
"0.56937087",
"0.56937087",
"0.56937087",
"0.56937087",
"0.5692438",
"0.56924224",
"0.5687201",
"0.56868494",
"0.5678168",
"0.56723225",
"0.56540775",
"0.5650312",
"0.5639774",
"0.5638584",
"0.5635543",
"0.5635543",
"0.5635543",
"0.5627622",
"0.5627053",
"0.561881",
"0.56048214",
"0.56037885",
"0.5590109",
"0.5579741",
"0.5579501",
"0.5576526",
"0.55740017",
"0.55727863",
"0.5572377",
"0.55685574",
"0.5562409",
"0.55590713",
"0.55590713",
"0.5544779",
"0.5544447",
"0.5522964",
"0.55109555",
"0.55089676",
"0.55089676",
"0.55089676"
] | 0.0 | -1 |
Called to inform the Entry that it has been removed. | @SuppressWarnings("unchecked")
protected void onRemove()
{
// issue remove notification
ObservableHashMap map = ObservableHashMap.this;
if (map.hasListeners())
{
map.dispatchEvent(new MapEvent(map, MapEvent.ENTRY_DELETED,
getKey(), getValue(), null));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void entryRemoved (TudeySceneModel.Entry oentry)\n {\n // nada\n }",
"static public void removeEntry(Entry entry){ getEntryList().removeEntry(entry); }",
"protected abstract void remove(E entry);",
"public void removed() {\n }",
"protected void discard()\n {\n if (!isDiscarded())\n {\n OldOldCache map = OldOldCache.this;\n synchronized (map)\n {\n int cUnits = m_cUnits;\n if (cUnits == -1)\n {\n // entry is discarded; avoid repetitive events\n return;\n }\n\n if (cUnits > 0)\n {\n map.adjustUnits(-cUnits);\n }\n\n m_cUnits = -1;\n }\n\n // issue remove notification\n if (map.hasListeners())\n {\n map.dispatchEvent(map.instantiateMapEvent(\n MapEvent.ENTRY_DELETED, getKey(), getValue(), null));\n }\n }\n }",
"@Override\r\n\tpublic void removeEntry(String key) {\n\t\t\r\n\t}",
"public void deleteEntry(Entry e) {\n entries.remove(e.getName());\n }",
"@Override\n public void remove() {\n }",
"public void remove() {\r\n super.remove();\r\n }",
"@Override\r\n\t\tpublic void remove() {\r\n\t\t\t// YOU DO NOT NEED TO WRITE THIS\r\n\t\t}",
"public void remove() {\n\t }",
"public void remove() {\n\t }",
"public void remove() {\n\t }",
"@Override\r\n\tpublic void remove() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void remove() {\n\t\t\r\n\t}",
"public final void remove () {\r\n }",
"@Override\n public void 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 }",
"public void remove() {\n super.remove();\n }",
"public void entryRemoved(EntryEvent<Identifier, SystemMetadata> event) {\n // we don't remove replicas (do we?)\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}",
"@Override\n\tpublic void remove() { }",
"public void remove() {\r\n\t\t\trequireModificationCountUnchanged();\r\n\r\n\t\t\tif (currentEntry == null) {\r\n\t\t\t\tthrow new IllegalStateException();\r\n\t\t\t}\r\n\r\n\t\t\tSimpleHashtable.this.remove(currentEntry.key);\r\n\t\t\titeratorModificationCount++;\r\n\t\t\tcurrentEntry = null;\r\n\t\t}",
"@Override\n public boolean isEntryRemovedInContext(Object key) {\n return true;\n }",
"@Override\n\t\t\t\tpublic void remove() {\n\t\t\t\t\t\n\t\t\t\t}",
"public boolean remove(T anEntry);",
"@Override\n\tpublic void remove() {\n\t\t\n\t}",
"@Override\n\tpublic void remove() {\n\t\t\n\t}",
"@Override\n\tpublic void remove() {\n\t\t\n\t}",
"@Override\n\tpublic void remove() {\n\t\t\n\t}",
"@Override\n\tpublic void remove() {\n\t\t\n\t}",
"@Override\n\tpublic void remove() {\n\t\t\n\t}",
"@Override\n\tpublic void remove() {\n\t\t\n\t}",
"@Override\n\tpublic void remove() {\n\t\t\n\t}",
"public void remove() {\r\n return;\r\n }",
"public void remove() {\n\n }",
"private void removeEntry(CacheEntry entry) {\n\t\tmap.remove(entry.getKey());\n\t\tsize.decrementAndGet();\n\t\tindex.remove(entry.getItem());\n\t\tentry.delete();\n\t}",
"public void remove(AddressEntry entry) {\n addressEntryList.remove(entry);\n }",
"public void remove() {\r\n //\r\n }",
"void removeEntry(K key);",
"public void remove () {}",
"@Override\r\n\t\tpublic void remove() {\n\r\n\t\t}",
"public void entryEvicted(EntryEvent<Identifier, SystemMetadata> event) {\n // nothing to do, entry remains in backing store\n\n }",
"private final void removeTrackedEntry(NotificationEntry notificationEntry) {\n this.states.remove(notificationEntry.getKey());\n }",
"public void remove() {\n\t}",
"public void remove() {\n\t}",
"Entry<Key, Value> remove(Entry<Key, Value> entry);",
"@Override\n\tpublic void onRemove() {\n\n\t}",
"public void remove();",
"public void remove();",
"public void remove();",
"public void remove();",
"public void remove();",
"public abstract void onRemove();",
"protected void computeEntryRemoved(K key, InternalCacheEntry<K, V> value) {\n // Do nothing by default\n }",
"public boolean removeEntry(Entry entry) {\n\t\t return entries.removeElement(entry);\n\t\t\n\t}",
"public void remove() {\r\n setRemovable(true);\r\n }",
"public void entityRemoved() {}",
"protected synchronized void remove_entry( final EntryStorage entry )\r\n throws NotFound\r\n {\r\n\t if( entry == null ) throw new NullPointerException(\r\n\t\t\"Illegal attempt to remove a null entry from a list.\");\r\n\r\n EntryStorage header = header();\r\n if( header == null ) throw new NotFound();\r\n\r\n synchronized( entry )\r\n {\r\n\r\n\t\t// We have a list with at least one entry. Check \r\n\t // if we are removing the header entry or an entry in the \r\n\t\t// body of the list.\r\n\r\n synchronized( header )\r\n {\r\n if( header.equals( entry ) )\r\n {\r\n \r\n // Client is requesting the removal of the header\r\n\t\t\t // which means that either the next entry becomes the \r\n\t // header, or, if no next entry, the header is set to null.\r\n\r\n if( size() == 1 )\r\n {\r\n header( (EntryStorageRef) null );\r\n size( 0 );\r\n }\r\n else\r\n {\r\n EntryStorage next = header.next();\r\n if( next != null ) synchronized( next )\r\n {\r\n // There is a valid next entry in the current header\r\n // which needs to assigned as the new header.\r\n \r\n EntryStorage last = header.prev();\r\n if( last != null ) synchronized( last )\r\n {\r\n next.prev( last.reference() );\r\n header( next.reference() );\r\n size( size() - 1 );\r\n }\r\n\t\t\t else\r\n\t\t\t\t { \r\n\t\t throw new RuntimeException(\r\n\t \"Unexpected null prev entry in list header. \\n\" + this );\r\n\t\t\t\t }\r\n }\r\n }\r\n }\r\n else\r\n {\r\n // Client is requesting the removal of an entry somewhere in the\r\n // list beyond the header position. This means that there is\r\n // valid prev entry to be updated, and possibly a next entry unless\r\n // the entry being removed is the last entry in which case we need\r\n // update the header as well.\r\n \r\n EntryStorage prev = entry.prev();\r\n synchronized( prev )\r\n {\r\n EntryStorage next = entry.next();\r\n if( next != null ) synchronized( next )\r\n {\r\n prev.next( next.reference() );\r\n next.prev( prev.reference() );\r\n }\r\n else\r\n {\r\n prev.next( (EntryStorageRef) null );\r\n\t\t\t\t header.prev( prev.reference() );\r\n }\r\n size( size() - 1 );\r\n }\r\n }\r\n entry.destroy_object();\r\n }\r\n }\r\n }",
"public void remove() {\n btRemove().push();\n }",
"public void remove() {\n btRemove().push();\n }",
"@Override\n public void remove() {\n Entry<T> prev = ((Entry<T>) cursor).prev;\n super.remove();\n if(cursor!=tail){\n ((Entry<T>) cursor.next).prev = prev;\n }\n }",
"public T remove(Object entry) {\n return null;\n }",
"@Override\r\n\tpublic void onRemove() {\n\r\n\t}",
"@Override\n\tpublic Entry<K, V> remove(Entry<K, V> e) throws InvalidEntryException {\n\t\treturn null;\n\t}",
"protected synchronized void removeExpired(Entry entry, boolean fRemoveInternal)\n {\n entry.discard();\n if (fRemoveInternal)\n {\n super.removeEntryInternal(entry);\n }\n }",
"public void undoRemove() {\n // Makes the removal dialogue invisible.\n mRemovalDialogue.setAlpha(0.0f);\n mRemovalDialogue.setVisibility(GONE);\n\n // Animates back the favorite contact card.\n final ObjectAnimator fadeIn = ObjectAnimator.ofFloat(mFavoriteContactCard, \"alpha\", 1.f).\n setDuration(mAnimationDuration);\n final ObjectAnimator moveBack = ObjectAnimator.ofFloat(mFavoriteContactCard, \"translationX\",\n 0.f).setDuration(mAnimationDuration);\n\n final AnimatorSet animSet = new AnimatorSet();\n\n animSet.playTogether(fadeIn, moveBack);\n\n animSet.addListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationStart(Animator animation) {\n mParentRow.setHasTransientState(true);\n }\n @Override\n public void onAnimationEnd(Animator animation) {\n if (mParentRow.getItemViewType() == ViewTypes.FREQUENT) {\n SwipeHelper.setSwipeable(mParentRow, true);\n } else {\n SwipeHelper.setSwipeable(PhoneFavoriteTileView.this, true);\n }\n mParentRow.setHasTransientState(false);\n }\n });\n animSet.start();\n // Signals the PhoneFavoritesTileAdapter to undo the potential delete.\n mParentRow.getTileAdapter().undoPotentialRemoveEntryIndex();\n }",
"public void itemRemoved(E item);",
"private boolean remove() {\r\n\t\t\treturn removed = true;\r\n\t\t}",
"public void deleteEntry(int entryIndex) {\n\t\ttoDoList.remove(entryIndex);\n\t}",
"public void remove () { this.setAsDown(); n.remove(); }",
"public void removeAllEntries() {\n }",
"public void remove(){\n }",
"public void notifyRemoved(String publicID) {\n }",
"public void removeEntry(AddressEntry contact) {\r\n contacts.remove(contact);\r\n }",
"public void remove(){throw new RuntimeException(\"Removing() is not implemented\");\r\n\t\t}",
"@Override\n\tpublic void remove(Element e) {\n\t\t\n\t}",
"void actuallyRemove() {\n /*\n * // Set the TextViews View v = mListView.getChildAt(mRemovePosition -\n * mListView.getFirstVisiblePosition()); TextView nameView =\n * (TextView)(v.findViewById(R.id.sd_name));\n * nameView.setText(R.string.add_speed_dial);\n * nameView.setEnabled(false); TextView labelView =\n * (TextView)(v.findViewById(R.id.sd_label)); labelView.setText(\"\");\n * labelView.setVisibility(View.GONE); TextView numberView =\n * (TextView)(v.findViewById(R.id.sd_number)); numberView.setText(\"\");\n * numberView.setVisibility(View.GONE); ImageView removeView =\n * (ImageView)(v.findViewById(R.id.sd_remove));\n * removeView.setVisibility(View.GONE); ImageView photoView =\n * (ImageView)(v.findViewById(R.id.sd_photo));\n * photoView.setVisibility(View.GONE); // Pref\n */\n mPrefNumState[mRemovePosition + 1] = \"\";\n mPrefMarkState[mRemovePosition + 1] = -1;\n SharedPreferences.Editor editor = mPref.edit();\n editor.putString(String.valueOf(mRemovePosition + 1), mPrefNumState[mRemovePosition + 1]);\n editor.putInt(String.valueOf(offset(mRemovePosition + 1)),\n mPrefMarkState[mRemovePosition + 1]);\n editor.apply();\n startQuery();\n }",
"private void removeContactFromRoster(RosterEntry entryToBeRemoved) {\r\n\t\ttry {\r\n\t\t\tMainService.mService.connection.getRoster().removeEntry(entryToBeRemoved);\r\n\t\t} catch (XMPPException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"@Override\n\tpublic void removeUpdate(DocumentEvent e) {\n\t\tif(!listenChange) return;\n\t\tdisplaySelf = false;\n\t\tint offset = e.getOffset();\n\t\tfor (int i = 0; i < e.getLength(); ++i) {\n\t\t\tthis.processRemove(offset);\n\t\t}\n\t}",
"public String clearEntry();",
"protected abstract void deleteEntry(K key);",
"public void tagAsRemoved() {\n\t levelOfRemoval ++;\n\t}",
"@Override\n public void delete() {\n this.parent.handleRemoveSignal(this.deadline.getCourseName(),\n this.deadline.getName(),\n this.deadline.getYear(),\n this.deadline.getMonth(),\n this.deadline.getDay());\n }",
"public void remove() {\n\n\t\t\tsuprimirNodo(anterior);\n\n\t\t}",
"public void deleteGlossaryEntry(final Field entryToDelete) {\n\t\tif (_glossary.contains(entryToDelete)) {\n\t\t\t_glossary.removeChild(entryToDelete);\n\t\t}\n\t}",
"@Override\n\t\tpublic void remove() {\n\t\t\tif ( _expectedSize != TOrderedHashMap.this.size() ) { throw new ConcurrentModificationException(); }\n\n\t\t\t// Disable auto compaction during the remove. This is a workaround\n\t\t\t// for bug 1642768.\n\t\t\ttry {\n\t\t\t\tTOrderedHashMap.this.tempDisableAutoCompaction();\n\t\t\t\tTOrderedHashMap.this.removeAt(_indicesByInsertOrder[_index]);\n\t\t\t} finally {\n\t\t\t\tTOrderedHashMap.this.reenableAutoCompaction(false);\n\t\t\t}\n\n\t\t\t_expectedSize--;\n\t\t}",
"protected abstract void checkRemoved();",
"public void untagAsRemoved() {\n\t levelOfRemoval --;\n\t}",
"public void removeEntry(int docID){\n this.docToEntities.remove(docID);\n }",
"protected void removeEntry(LinkedEntry<K, V> entry) {\n final LinkedEntry<K, V> prev = entry.previous();\n final LinkedEntry<K, V> next = entry.next();\n\n if (head() == entry) {\n setHead(next);\n }\n\n if (tail() == entry) {\n setTail(prev);\n }\n\n if (prev != null) {\n prev.setNext(next);\n }\n\n if (next != null) {\n next.setPrevious(prev);\n }\n }",
"public Object remove();",
"@Override\n\tpublic void elementRemoved(int anIndex, Object aNewValue) {\n\t\tListEditObserved.newCase(OperationName.DELETE, anIndex, aNewValue,\n\t\t\t\tApplicationTags.EDITOR, this);\n\t\tdisplayOutput();\n\t\tListEditDisplayed.newCase(OperationName.DELETE, anIndex, aNewValue,\n\t\t\t\tApplicationTags.EDITOR, this);\n\t}",
"private void removeEntry(String key) {\n\t\tCacheHeader entry = mEntries.get(key);\n\t\tif (entry != null) {\n\t\t\tmTotalSize -= entry.size;\n\t\t\tmEntries.remove(key);\n\t\t}\n\t}"
] | [
"0.72532624",
"0.7227854",
"0.7206407",
"0.71031",
"0.69909936",
"0.6911158",
"0.6842402",
"0.67983437",
"0.67851657",
"0.67587036",
"0.6741633",
"0.6741633",
"0.6741633",
"0.6738853",
"0.6738853",
"0.6738334",
"0.67319274",
"0.6725675",
"0.6725675",
"0.6725675",
"0.6725675",
"0.6725675",
"0.6725675",
"0.6725675",
"0.6725422",
"0.67244345",
"0.67244345",
"0.6667595",
"0.6657846",
"0.6634642",
"0.65843654",
"0.65830755",
"0.6573861",
"0.6573861",
"0.6573861",
"0.6573861",
"0.6573861",
"0.6573861",
"0.6573861",
"0.6573861",
"0.6557476",
"0.6554595",
"0.6528983",
"0.65233415",
"0.6520321",
"0.65095794",
"0.6498043",
"0.6468694",
"0.6450041",
"0.64368993",
"0.6419597",
"0.6419597",
"0.6389903",
"0.6375249",
"0.635109",
"0.635109",
"0.635109",
"0.635109",
"0.635109",
"0.63497984",
"0.6342975",
"0.63387996",
"0.6331107",
"0.6319964",
"0.62977856",
"0.62961566",
"0.62961566",
"0.6292733",
"0.6280451",
"0.626309",
"0.6234833",
"0.6223891",
"0.6220219",
"0.6209086",
"0.6186236",
"0.61807287",
"0.6175434",
"0.6150273",
"0.6149859",
"0.61440605",
"0.61384434",
"0.6126631",
"0.6085976",
"0.6084899",
"0.60716116",
"0.6070786",
"0.6056955",
"0.60551685",
"0.6020991",
"0.60176724",
"0.6016439",
"0.59976923",
"0.59956956",
"0.5978902",
"0.59695977",
"0.5947495",
"0.5944043",
"0.5943661",
"0.5937982",
"0.5931224"
] | 0.68135685 | 7 |
/ generateDestroyHelper Generates a helper function which, when / invoked, destroys the given object. The address of the object / should be in global memory. | @Converted(kind = Converted.Kind.AUTO,
source = "${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp", line = 601,
FQN="clang::CodeGen::CodeGenFunction::generateDestroyHelper", NM="_ZN5clang7CodeGen15CodeGenFunction21generateDestroyHelperENS0_7AddressENS_8QualTypeEPFvRS1_S2_S3_EbPKNS_7VarDeclE",
cmd="jclank.sh -java-options=${SPUTNIK}/modules/org.clang.codegen/llvmToClangType -split-class=clang::CodeGen::CodeGenFunction@this ${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp -nm=_ZN5clang7CodeGen15CodeGenFunction21generateDestroyHelperENS0_7AddressENS_8QualTypeEPFvRS1_S2_S3_EbPKNS_7VarDeclE")
//</editor-fold>
public final Function /*P*/ generateDestroyHelper(Address addr, QualType type, CodeGenFunction.AddressQualType2Void destroyer,
boolean useEHCleanupForArray, /*const*/ VarDecl /*P*/ VD) {
FunctionArgList args = null;
ImplicitParamDecl dst = null;
try {
args/*J*/= new FunctionArgList();
dst/*J*/= new ImplicitParamDecl($this().getContext(), (DeclContext /*P*/ )null, new SourceLocation(), (IdentifierInfo /*P*/ )null,
$this().getContext().VoidPtrTy.$QualType());
args.push_back($AddrOf(dst));
final /*const*/ CGFunctionInfo /*&*/ FI = $this().CGM.getTypes().arrangeBuiltinFunctionDeclaration($this().getContext().VoidTy.$QualType(), args);
org.llvm.ir.FunctionType /*P*/ FTy = $this().CGM.getTypes().GetFunctionType(FI);
Function /*P*/ fn = $this().CGM.CreateGlobalInitOrDestructFunction(FTy, new Twine(/*KEEP_STR*/"__cxx_global_array_dtor"), FI, VD.getLocation());
$this().CurEHLocation.$assignMove(VD.getLocStart());
$this().StartFunction(new GlobalDecl(VD), $this().getContext().VoidTy.$QualType(), fn, FI, args);
$this().emitDestroy(new Address(addr), new QualType(type), destroyer, useEHCleanupForArray);
$this().FinishFunction();
return fn;
} finally {
if (dst != null) { dst.$destroy(); }
if (args != null) { args.$destroy(); }
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void destroyImplObject(Object obj)\n {\n }",
"public abstract void destroy();",
"public void destroy() {}",
"public void destroy() {}",
"default void destroy() {}",
"public static void destroy() {\n\t}",
"public void destroy() {\n \n }",
"public void destroy() {\n }",
"public void destroy() {\n }",
"public void destroy();",
"public void destroy();",
"public void destroy();",
"public void destroy();",
"public void destroy();",
"public void destroy();",
"public void destroy();",
"public void destroy();",
"public void destroy() { \n }",
"public void destroy() {\n }",
"public interface IHelper {\n void destroy();\n}",
"public void destroy() {\n }",
"public void destroy() {\n }",
"public void destroy() {\n }",
"public void destroy() {\n }",
"public void destroy() {\n }",
"public void destroy() {\n }",
"public void destroy() {\n }",
"public void destroy() {\n }",
"public void destroy() {\n }",
"public void destroy() {\n }",
"public void destroy() {\n }",
"public void destroy() {\r\n }",
"private native void simpleOnDestroy();",
"public void destroy()\r\n {\r\n }",
"public void destroy()\r\n {\n }",
"public void destroy() {\n\r\n }",
"public static native void Destroy(long lpjFbxDataType);",
"private static native void nativeDestroy(long handle) throws UnicornException;",
"public void destroy() {\n // NO OPERATION\n }",
"void destroy();",
"void destroy();",
"void destroy();",
"void destroy();",
"void destroy();",
"void destroy();",
"void destroy();",
"void destroy();",
"void destroy();",
"void destroy();",
"void destroy();",
"void destroy();",
"public void destroy()\n\t{\n\t}",
"void destroy(PooledObject<T> t);",
"public void destroy() {\n\t}",
"public void destroy() {\n\t}",
"public void destroy() {\n\t}",
"public void destroy() {\n\t}",
"public void destroy() {\n\t}",
"public void destroy() {\n\t}",
"public void destroy() {\n\t}",
"public void destroy() {\n\t}",
"public void destroy() {\n\t}",
"public void destroy() {\n\t}",
"public void destroy() {\n\t}",
"public void destroy() {\n\t}",
"public void destroy() {\n\t}",
"public void destroy() {\n\t}",
"public void destroy() {\n\t}",
"@Override\r\n public void destroy() {\n }",
"@Override\r\n public void destroy() {\n }",
"public abstract void destroy(String name);",
"public void destroy() {\n\n\t}",
"public void destroy() {\n\n\t}",
"public void destroy() {\n\n\t}",
"public void destroy() {\n\n\t}",
"public void destroy() {\n\n\t}",
"public void destroy() {\n\n\t}",
"public void destroy ()\n {\n // do nothing\n }",
"public abstract void destroy(T object) throws PoolException;",
"@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:58:16.380 -0500\", hash_original_method = \"F2C45513A57BFF3B5C76E0152AB1D6FE\", hash_generated_method = \"DD976DED76E20815A49CC0DC51F1BCDD\")\n \n public boolean eglDestroyContext(EGLDisplay display, EGLContext context){\n \taddTaint(display.getTaint());\n \taddTaint(context.getTaint());\n \treturn getTaintBoolean();\n }",
"@Override\n @Destroy\n\n public void destroy() {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"destroy\");\n }\n\n }",
"@Override\n @Destroy\n\n public void destroy() {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"destroy\");\n }\n\n }",
"public void destroy() {\n \t\n }",
"public void destroy() {\n\t\t\n\t}",
"public void destroy() {\n\t\t\n\t}",
"public void destroy() {\n\t\t\n\t}",
"public void destroy() {\n\t\t\n\t}",
"public void destroy() {\n\t\t\n\t}",
"public void destroy() {\n\t\t\n\t}",
"@Override\n\tpublic void destroy() {\n\t\t\n\t}",
"@Override\n\tpublic void destroy() {\n\t\t\n\t}",
"@Override\n\tpublic void destroy() {\n\t\t\n\t}",
"@Override\n\tpublic void destroy() {\n\t\t\n\t}",
"@Override\n\tpublic void destroy() {\n\t\t\n\t}",
"@Override\n\tpublic void destroy() {\n\t\t\n\t}",
"@Override\n\tpublic void destroy() {\n\t\t\n\t}",
"@Override\n\tpublic void destroy() {\n\t\t\n\t}",
"@Override\n\tpublic void destroy() {\n\t\t\n\t}",
"@Override\n\tpublic void destroy() {\n\t\t\n\t}",
"@Override\n\tpublic void destroy() {\n\t\t\n\t}",
"@Override\n\tpublic void destroy() {\n\t\t\n\t}"
] | [
"0.6287933",
"0.61348635",
"0.6112061",
"0.6112061",
"0.6063535",
"0.6024669",
"0.60243905",
"0.6012457",
"0.6012457",
"0.6011932",
"0.6011932",
"0.6011932",
"0.6011932",
"0.6011932",
"0.6011932",
"0.6011932",
"0.6011932",
"0.5998542",
"0.5976537",
"0.5975431",
"0.5943009",
"0.5943009",
"0.5943009",
"0.5943009",
"0.5943009",
"0.5943009",
"0.5943009",
"0.5943009",
"0.5943009",
"0.5943009",
"0.5943009",
"0.59253204",
"0.59195817",
"0.59159297",
"0.5912227",
"0.5886726",
"0.5819936",
"0.57934475",
"0.5780589",
"0.5766711",
"0.5766711",
"0.5766711",
"0.5766711",
"0.5766711",
"0.5766711",
"0.5766711",
"0.5766711",
"0.5766711",
"0.5766711",
"0.5766711",
"0.5766711",
"0.57450044",
"0.57330614",
"0.5728397",
"0.5728397",
"0.5728397",
"0.5728397",
"0.5728397",
"0.5728397",
"0.5728397",
"0.5728397",
"0.5728397",
"0.5728397",
"0.5728397",
"0.5728397",
"0.5728397",
"0.5728397",
"0.5728397",
"0.57214063",
"0.57214063",
"0.5709592",
"0.57052934",
"0.57052934",
"0.57052934",
"0.57052934",
"0.57052934",
"0.57052934",
"0.57038224",
"0.56965154",
"0.5696225",
"0.5694404",
"0.5694404",
"0.5694256",
"0.56900054",
"0.56900054",
"0.56900054",
"0.56900054",
"0.56900054",
"0.56900054",
"0.5678807",
"0.5678807",
"0.5678807",
"0.5678807",
"0.5678807",
"0.5678807",
"0.5678807",
"0.5678807",
"0.5678807",
"0.5678807",
"0.5678807",
"0.5678807"
] | 0.0 | -1 |
/ EmitCXXGlobalVarDeclInit Create the initializer for a C++ / variable with global storage. | @Converted(kind = Converted.Kind.AUTO,
source = "${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp", line = 140,
FQN="clang::CodeGen::CodeGenFunction::EmitCXXGlobalVarDeclInit", NM="_ZN5clang7CodeGen15CodeGenFunction24EmitCXXGlobalVarDeclInitERKNS_7VarDeclEPN4llvm8ConstantEb",
cmd="jclank.sh -java-options=${SPUTNIK}/modules/org.clang.codegen/llvmToClangType -split-class=clang::CodeGen::CodeGenFunction@this ${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp -nm=_ZN5clang7CodeGen15CodeGenFunction24EmitCXXGlobalVarDeclInitERKNS_7VarDeclEPN4llvm8ConstantEb")
//</editor-fold>
public final void EmitCXXGlobalVarDeclInit(final /*const*/ VarDecl /*&*/ D,
Constant /*P*/ DeclPtr,
boolean PerformInit) {
/*const*/ Expr /*P*/ Init = D.getInit$Const();
QualType T = D.getType();
// The address space of a static local variable (DeclPtr) may be different
// from the address space of the "this" argument of the constructor. In that
// case, we need an addrspacecast before calling the constructor.
//
// struct StructWithCtor {
// __device__ StructWithCtor() {...}
// };
// __device__ void foo() {
// __shared__ StructWithCtor s;
// ...
// }
//
// For example, in the above CUDA code, the static local variable s has a
// "shared" address space qualifier, but the constructor of StructWithCtor
// expects "this" in the "generic" address space.
/*uint*/int ExpectedAddrSpace = $this().getContext().getTargetAddressSpace(new QualType(T));
/*uint*/int ActualAddrSpace = DeclPtr.getType().getPointerAddressSpace();
if (ActualAddrSpace != ExpectedAddrSpace) {
org.llvm.ir.Type /*P*/ LTy = $this().CGM.getTypes().ConvertTypeForMem(new QualType(T));
org.llvm.ir.PointerType /*P*/ PTy = org.llvm.ir.PointerType.get(LTy, ExpectedAddrSpace);
DeclPtr = ConstantExpr.getAddrSpaceCast(DeclPtr, PTy);
}
ConstantAddress DeclAddr/*J*/= new ConstantAddress(DeclPtr, $this().getContext().getDeclAlign($AddrOf(D)));
if (!T.$arrow().isReferenceType()) {
if (($this().getLangOpts().OpenMP != 0) && D.hasAttr(OMPThreadPrivateDeclAttr.class)) {
/*J:(void)*/$this().CGM.getOpenMPRuntime().emitThreadPrivateVarDefinition($AddrOf(D), new Address(DeclAddr), D.getAttr(OMPThreadPrivateDeclAttr.class).getLocation(),
PerformInit, $this());
}
if (PerformInit) {
CGDeclCXXStatics.EmitDeclInit(/*Deref*/$this(), D, new ConstantAddress(DeclAddr));
}
if ($this().CGM.isTypeConstant(D.getType(), true)) {
CGDeclCXXStatics.EmitDeclInvariant(/*Deref*/$this(), D, DeclPtr);
} else {
CGDeclCXXStatics.EmitDeclDestroy(/*Deref*/$this(), D, new ConstantAddress(DeclAddr));
}
return;
}
assert (PerformInit) : "cannot have constant initializer which needs destruction for reference";
RValue RV = $this().EmitReferenceBindingToExpr(Init);
$this().EmitStoreOfScalar(RV.getScalarVal(), new Address(DeclAddr), false, new QualType(T));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp\", line = 495,\n FQN=\"clang::CodeGen::CodeGenFunction::GenerateCXXGlobalVarDeclInitFunc\", NM=\"_ZN5clang7CodeGen15CodeGenFunction32GenerateCXXGlobalVarDeclInitFuncEPN4llvm8FunctionEPKNS_7VarDeclEPNS2_14GlobalVariableEb\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.clang.codegen/llvmToClangType -split-class=clang::CodeGen::CodeGenFunction@this ${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp -nm=_ZN5clang7CodeGen15CodeGenFunction32GenerateCXXGlobalVarDeclInitFuncEPN4llvm8FunctionEPKNS_7VarDeclEPNS2_14GlobalVariableEb\")\n//</editor-fold>\npublic final void GenerateCXXGlobalVarDeclInitFunc(Function /*P*/ Fn, \n /*const*/ VarDecl /*P*/ D, \n GlobalVariable /*P*/ Addr, \n boolean PerformInit) {\n JavaCleaner $c$ = $createJavaCleaner();\n try {\n // Check if we need to emit debug info for variable initializer.\n if (D.hasAttr(NoDebugAttr.class)) {\n $this().DebugInfo = null; // disable debug info indefinitely for this function\n }\n \n $this().CurEHLocation.$assignMove(D.getLocStart());\n \n $this().StartFunction(new GlobalDecl(D), $this().getContext().VoidTy.$QualType(), Fn, \n $this().getTypes().arrangeNullaryFunction(), \n $c$.track(new FunctionArgList()), D.getLocation(), \n D.getInit$Const().getExprLoc()); $c$.clean();\n \n // Use guarded initialization if the global variable is weak. This\n // occurs for, e.g., instantiated static data members and\n // definitions explicitly marked weak.\n if (Addr.hasWeakLinkage() || Addr.hasLinkOnceLinkage()) {\n $this().EmitCXXGuardedInit($Deref(D), Addr, PerformInit);\n } else {\n $this().EmitCXXGlobalVarDeclInit($Deref(D), Addr, PerformInit);\n }\n \n $this().FinishFunction();\n } finally {\n $c$.$destroy();\n }\n}",
"@Override\n public CodeFragment visitVarDecStat(AlangParser.VarDecStatContext ctx) {\n String name = ctx.ID().getText();\n if (this.variableExists(name)) {\n this.addError(ctx, name, \"Variable already declared\");\n return new CodeFragment(\"\");\n }\n\n String alangvartype = ctx.var_type().getText();\n String llvmvartype = Types.getLLVMDefineVartype(alangvartype);\n\n String reg = this.generateNewRegister(true);\n Variable v = new Variable(reg, alangvartype, llvmvartype);\n\n int arity = ctx.index_to_global_array().size();\n v.setArity(arity);\n if (arity > 0) {\n v.setGlobalArray();\n }\n\n for (int i = 0; i < arity; i++) {\n v.addLevel(Integer.valueOf(ctx.index_to_global_array(i).INT().getText()));\n }\n\n this.globals.put(name, v);\n\n return new CodeFragment(\"\");\n }",
"public final GlobalVariable global_variable() throws RecognitionException {\r\n GlobalVariable globalVariable = null;\r\n\r\n\r\n Token GLOBAL_VARIABLE7=null;\r\n Token LINKAGE8=null;\r\n Type derived_type9 =null;\r\n\r\n Constant initializer10 =null;\r\n\r\n String section11 =null;\r\n\r\n int align12 =0;\r\n\r\n\r\n\r\n String name;\r\n String linkage = null;\r\n boolean isThreadLocal = false;\r\n boolean isConstant = false;\r\n Type type = null; \r\n Constant initializer = null;\r\n String section = null;\r\n int align = -1;\r\n\r\n try {\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:70:5: ( GLOBAL_VARIABLE '=' ( LINKAGE )? ( 'thread_local' )? ( 'global' | 'constant' ) derived_type ( initializer ( ',' section )? ( ',' align )? )? )\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:71:5: GLOBAL_VARIABLE '=' ( LINKAGE )? ( 'thread_local' )? ( 'global' | 'constant' ) derived_type ( initializer ( ',' section )? ( ',' align )? )?\r\n {\r\n GLOBAL_VARIABLE7=(Token)match(input,GLOBAL_VARIABLE,FOLLOW_GLOBAL_VARIABLE_in_global_variable261); \r\n\r\n name = (GLOBAL_VARIABLE7!=null?GLOBAL_VARIABLE7.getText():null); name = name.substring(1, name.length());\r\n\r\n match(input,47,FOLLOW_47_in_global_variable270); \r\n\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:72:9: ( LINKAGE )?\r\n int alt6=2;\r\n int LA6_0 = input.LA(1);\r\n\r\n if ( (LA6_0==LINKAGE) ) {\r\n alt6=1;\r\n }\r\n switch (alt6) {\r\n case 1 :\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:72:10: LINKAGE\r\n {\r\n LINKAGE8=(Token)match(input,LINKAGE,FOLLOW_LINKAGE_in_global_variable273); \r\n\r\n linkage = (LINKAGE8!=null?LINKAGE8.getText():null);\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:73:5: ( 'thread_local' )?\r\n int alt7=2;\r\n int LA7_0 = input.LA(1);\r\n\r\n if ( (LA7_0==86) ) {\r\n alt7=1;\r\n }\r\n switch (alt7) {\r\n case 1 :\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:73:6: 'thread_local'\r\n {\r\n match(input,86,FOLLOW_86_in_global_variable285); \r\n\r\n isThreadLocal= true;\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:74:5: ( 'global' | 'constant' )\r\n int alt8=2;\r\n int LA8_0 = input.LA(1);\r\n\r\n if ( (LA8_0==67) ) {\r\n alt8=1;\r\n }\r\n else if ( (LA8_0==58) ) {\r\n alt8=2;\r\n }\r\n else {\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 8, 0, input);\r\n\r\n throw nvae;\r\n\r\n }\r\n switch (alt8) {\r\n case 1 :\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:74:6: 'global'\r\n {\r\n match(input,67,FOLLOW_67_in_global_variable297); \r\n\r\n }\r\n break;\r\n case 2 :\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:74:17: 'constant'\r\n {\r\n match(input,58,FOLLOW_58_in_global_variable301); \r\n\r\n isConstant = true;\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n pushFollow(FOLLOW_derived_type_in_global_variable311);\r\n derived_type9=derived_type();\r\n\r\n state._fsp--;\r\n\r\n\r\n type = derived_type9;\r\n\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:76:5: ( initializer ( ',' section )? ( ',' align )? )?\r\n int alt11=2;\r\n int LA11_0 = input.LA(1);\r\n\r\n if ( (LA11_0==BINARY_OP||LA11_0==BOOLEAN||LA11_0==CONVERSION_OP||LA11_0==FLOATING_POINT||LA11_0==HEX||LA11_0==INTEGER||LA11_0==NULL||LA11_0==46||LA11_0==49||LA11_0==56||(LA11_0 >= 65 && LA11_0 <= 66)||LA11_0==68||(LA11_0 >= 92 && LA11_0 <= 93)) ) {\r\n alt11=1;\r\n }\r\n else if ( (LA11_0==GLOBAL_VARIABLE) ) {\r\n int LA11_2 = input.LA(2);\r\n\r\n if ( (LA11_2==GLOBAL_VARIABLE||LA11_2==44||(LA11_2 >= 60 && LA11_2 <= 61)) ) {\r\n alt11=1;\r\n }\r\n }\r\n switch (alt11) {\r\n case 1 :\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:76:6: initializer ( ',' section )? ( ',' align )?\r\n {\r\n pushFollow(FOLLOW_initializer_in_global_variable320);\r\n initializer10=initializer();\r\n\r\n state._fsp--;\r\n\r\n\r\n initializer = initializer10;\r\n\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:77:7: ( ',' section )?\r\n int alt9=2;\r\n int LA9_0 = input.LA(1);\r\n\r\n if ( (LA9_0==44) ) {\r\n int LA9_1 = input.LA(2);\r\n\r\n if ( (LA9_1==SECTION) ) {\r\n alt9=1;\r\n }\r\n }\r\n switch (alt9) {\r\n case 1 :\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:77:8: ',' section\r\n {\r\n match(input,44,FOLLOW_44_in_global_variable332); \r\n\r\n pushFollow(FOLLOW_section_in_global_variable334);\r\n section11=section();\r\n\r\n state._fsp--;\r\n\r\n\r\n section = section11;\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:79:7: ( ',' align )?\r\n int alt10=2;\r\n int LA10_0 = input.LA(1);\r\n\r\n if ( (LA10_0==44) ) {\r\n alt10=1;\r\n }\r\n switch (alt10) {\r\n case 1 :\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:79:8: ',' align\r\n {\r\n match(input,44,FOLLOW_44_in_global_variable355); \r\n\r\n pushFollow(FOLLOW_align_in_global_variable357);\r\n align12=align();\r\n\r\n state._fsp--;\r\n\r\n\r\n align = align12;\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n globalVariable = valueFactory.createGlobalVariable(name, linkage, isThreadLocal, isConstant, type, \r\n initializer, section, align);\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n return globalVariable;\r\n }",
"VarDecl createVarDecl();",
"@Override\n public CodeFragment visitBlockVarDec(AlangParser.BlockVarDecContext ctx) {\n String name = ctx.ID().getText();\n\n if (this.variableExists(name)) {\n this.addError(ctx, name, \"Variable already declared\");\n return new CodeFragment(\"\");\n }\n\n int arity = ctx.index_to_array().size();\n\n String alangvartype = ctx.var_type().getText();\n String llvmvartype = Types.getLLVMDefineVartype(alangvartype);\n String reg = this.generateNewRegister(false);\n\n Variable v = new Variable(reg, alangvartype, llvmvartype);\n v.setArity(arity);\n this.vars.get(this.scope).put(name, v);\n\n CodeFragment result = new CodeFragment();\n result.setRegister(reg);\n if (llvmvartype.equals(Types.LLVMZNAK))\n result.setCharRegister();\n\n if (arity > 0) {\n /* alloca n-dimensional array[a1]...[an] on stack with size a1*a2*...*an */\n v.setLocalArray();\n String prevreg = this.generateNewRegister(false);\n String newreg;\n result.addCode(String.format(\"%s = add i32 0, 1\\n\", prevreg));\n for (int i = 0; i < arity; i++) {\n CodeFragment exp = visit(ctx.index_to_array(i).expression());\n result.addCode(exp);\n v.addLevelReg(exp.getRegister());\n\n newreg = this.generateNewRegister(false);\n result.addCode(String.format(\"%s = mul i32 %s, %s\\n\", newreg, prevreg, exp.getRegister()));\n prevreg = newreg;\n }\n result.addCode(String.format(\"%s = alloca %s, i32 %s\\n\", reg, llvmvartype, prevreg));\n return result;\n }\n\n return this.generateNewDeclaration(reg, v.getLLVMDeclareType());\n }",
"protected void sequence_VarDecl(ISerializationContext context, VarDecl semanticObject) {\r\n\t\tgenericSequencer.createSequence(context, semanticObject);\r\n\t}",
"@Override\n\tpublic Integer visitGlobal_var_decl(ClangParser.Global_var_declContext ctx)\n {\n \treturn null;\n }",
"public void addGlobalVariable(int adr, int x){\n initInstructions.add(\"# adding a global variable\");\n initInstructions.add(\"li $a0, \" + x);\n initInstructions.add(\"sw $a0, \" + adr + \"($gp)\");\n initInstructions.add(\"# end of adding a global variable\");\n }",
"public GlobalVariable defineGlobal(QName qname, SequenceType type)\n {\n GlobalVariable g = declareGlobal(qname, type);\n addDeclaration(g); // otherwise cant be initialized\n return g;\n }",
"public final PythonParser.global_stmt_return global_stmt() throws RecognitionException {\n PythonParser.global_stmt_return retval = new PythonParser.global_stmt_return();\n retval.start = input.LT(1);\n\n PythonTree root_0 = null;\n\n Token GLOBAL121=null;\n Token COMMA122=null;\n Token n=null;\n List list_n=null;\n\n PythonTree GLOBAL121_tree=null;\n PythonTree COMMA122_tree=null;\n PythonTree n_tree=null;\n RewriteRuleTokenStream stream_NAME=new RewriteRuleTokenStream(adaptor,\"token NAME\");\n RewriteRuleTokenStream stream_GLOBAL=new RewriteRuleTokenStream(adaptor,\"token GLOBAL\");\n RewriteRuleTokenStream stream_COMMA=new RewriteRuleTokenStream(adaptor,\"token COMMA\");\n\n try {\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:850:5: ( GLOBAL n+= NAME ( COMMA n+= NAME )* -> ^( GLOBAL[$GLOBAL, actions.makeNames($n)] ) )\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:850:7: GLOBAL n+= NAME ( COMMA n+= NAME )*\n {\n GLOBAL121=(Token)match(input,GLOBAL,FOLLOW_GLOBAL_in_global_stmt3265); if (state.failed) return retval; \n if ( state.backtracking==0 ) stream_GLOBAL.add(GLOBAL121);\n\n n=(Token)match(input,NAME,FOLLOW_NAME_in_global_stmt3269); if (state.failed) return retval; \n if ( state.backtracking==0 ) stream_NAME.add(n);\n\n if (list_n==null) list_n=new ArrayList();\n list_n.add(n);\n\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:850:22: ( COMMA n+= NAME )*\n loop59:\n do {\n int alt59=2;\n int LA59_0 = input.LA(1);\n\n if ( (LA59_0==COMMA) ) {\n alt59=1;\n }\n\n\n switch (alt59) {\n \tcase 1 :\n \t // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:850:23: COMMA n+= NAME\n \t {\n \t COMMA122=(Token)match(input,COMMA,FOLLOW_COMMA_in_global_stmt3272); if (state.failed) return retval; \n \t if ( state.backtracking==0 ) stream_COMMA.add(COMMA122);\n\n \t n=(Token)match(input,NAME,FOLLOW_NAME_in_global_stmt3276); if (state.failed) return retval; \n \t if ( state.backtracking==0 ) stream_NAME.add(n);\n\n \t if (list_n==null) list_n=new ArrayList();\n \t list_n.add(n);\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop59;\n }\n } while (true);\n\n\n\n // AST REWRITE\n // elements: GLOBAL\n // token labels: \n // rule labels: retval\n // token list labels: \n // rule list labels: \n // wildcard labels: \n if ( state.backtracking==0 ) {\n retval.tree = root_0;\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n\n root_0 = (PythonTree)adaptor.nil();\n // 851:4: -> ^( GLOBAL[$GLOBAL, actions.makeNames($n)] )\n {\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:851:7: ^( GLOBAL[$GLOBAL, actions.makeNames($n)] )\n {\n PythonTree root_1 = (PythonTree)adaptor.nil();\n root_1 = (PythonTree)adaptor.becomeRoot(new Global(GLOBAL, GLOBAL121, actions.makeNames(list_n)), root_1);\n\n adaptor.addChild(root_0, root_1);\n }\n\n }\n\n retval.tree = root_0;}\n }\n\n retval.stop = input.LT(-1);\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (PythonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n }\n\n catch (RecognitionException re) {\n errorHandler.reportError(this, re);\n errorHandler.recover(this, input,re);\n retval.tree = (PythonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n }\n finally {\n }\n return retval;\n }",
"public LocalVariableGen addLocalVariable(String name, Type type, InstructionHandle start, InstructionHandle end) {\n/* 170 */ return this._allocatorInit ? addLocalVariable2(name, type, start) : super.addLocalVariable(name, type, start, end);\n/* */ }",
"public Variable(boolean vInitialized, boolean vFinal, Keywords.Type Vtype) {\n\t\tisInitialized = vInitialized;\n\t\tisFinal = vFinal;\n\t\ttype = Vtype;\n\t}",
"@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp\", line = 245,\n FQN=\"clang::CodeGen::CodeGenFunction::EmitCXXGuardedInit\", NM=\"_ZN5clang7CodeGen15CodeGenFunction18EmitCXXGuardedInitERKNS_7VarDeclEPN4llvm14GlobalVariableEb\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.clang.codegen/llvmToClangType -split-class=clang::CodeGen::CodeGenFunction@this ${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp -nm=_ZN5clang7CodeGen15CodeGenFunction18EmitCXXGuardedInitERKNS_7VarDeclEPN4llvm14GlobalVariableEb\")\n//</editor-fold>\npublic final void EmitCXXGuardedInit(final /*const*/ VarDecl /*&*/ D, \n GlobalVariable /*P*/ DeclPtr, \n boolean PerformInit) {\n // If we've been asked to forbid guard variables, emit an error now.\n // This diagnostic is hard-coded for Darwin's use case; we can find\n // better phrasing if someone else needs it.\n if ($this().CGM.getCodeGenOpts().ForbidGuardVariables) {\n $this().CGM.Error(D.getLocation(), \n new StringRef(/*KEEP_STR*/\"this initialization requires a guard variable, which the kernel does not support\"));\n }\n \n $this().CGM.getCXXABI().EmitGuardedInit(/*Deref*/$this(), D, DeclPtr, PerformInit);\n}",
"void initGlobals(EvalContext context, HashMap globals)\n throws EvaluationException\n {\n if (predefined != null)\n predefined.initGlobals(context, globals);\n\n for (int g = 0, G = declarations.size(); g < G; g++)\n {\n if (declarations.get(g) instanceof ModuleImport) {\n ModuleImport mimport = (ModuleImport) declarations.get(g);\n ModuleContext module = mimport.imported;\n // recursive descent to imported modules.\n // CAUTION lock modules to avoid looping on circular imports\n // Hmmm well, circular imports are no more allowed anyway...\n if (globals.get(module) == null) { // not that beautiful but\n globals.put(module, module);\n module.initGlobals(context, globals);\n globals.remove(module);\n }\n }\n }\n \n // Globals added by API in context are not declared: do it first\n for (Iterator iter = globalMap.values().iterator(); iter.hasNext();) {\n GlobalVariable var = (GlobalVariable) iter.next();\n XQValue init = (XQValue) globals.get(var.name);\n \n if(init == null)\n continue;\n // unfortunately required:\n init = init.bornAgain();\n // check the type if any\n if(var.declaredType != null)\n init = init.checkTypeExpand(var.declaredType, context, \n false, true);\n context.setGlobal(var, init);\n }\n \n //\n for (int g = 0, G = declarations.size(); g < G; g++)\n {\n if (!(declarations.get(g) instanceof GlobalVariable))\n continue;\n GlobalVariable var = (GlobalVariable) declarations.get(g);\n XQType declaredType = var.declaredType;\n curInitVar = var;\n if (var.init != null) {\n XQValue v = var.init.eval(null, context);\n try { // expand with type checking\n v = v.checkTypeExpand(declaredType, context, false, true);\n if (v instanceof ErrorValue)\n context.error(Expression.ERRC_BADTYPE,\n var.init, \n ((ErrorValue) v).getReason());\n }\n catch (XQTypeException tex) {\n context.error(var, tex);\n }\n context.setGlobal(var, v);\n curInitVar = null;\n }\n\n QName gname = var.name;\n // is there a value specified externally? \n // use the full q-name of the variable\n // (possible issue if $local:v allowed in modules)\n Object initValue = globals.get(gname);\n XQValue init = null;\n if(initValue instanceof ResultSequence) {\n ResultSequence seq = (ResultSequence) initValue;\n init = seq.getValues();\n }\n else \n init = (XQValue) initValue;\n\n // glitch for compatibility: if $local:var, look for $var\n if (init == null && \n gname.getNamespaceURI() == NamespaceContext.LOCAL_NS) {\n QName redName = IQName.get((gname.getLocalPart()));\n init = (XQValue) globals.get(redName);\n }\n if (init == null) {\n // - System.err.println(\"no extern init for \"+global.name);\n continue;\n }\n init = init.bornAgain(); // in case several executions\n if (declaredType != null) {\n try { // here we can promote: it helps with string values\n init =\n init.checkTypeExpand(declaredType, context, true,\n true);\n if (init instanceof ErrorValue)\n context.error(Expression.ERRC_BADTYPE, var,\n ((ErrorValue) init).getReason());\n }\n catch (XQTypeException tex) {\n context.error(var, tex);\n }\n }\n context.setGlobal(var, init);\n }\n }",
"public GlobalVariable() {\n }",
"public ConsistentVariable(String name, Class<V> type, V initValue) {\n this(name, type, initValue, 0);\n }",
"@Override\n\tpublic void enterStart(AplusplusParser.StartContext ctx) {\n\t\tglobalScope = new GlobalScope();\n\t\tcurrentScope = globalScope;\n\t\tsaveScope(ctx, currentScope);\n\t}",
"public void declare (String name, StatementParse node, Closure parent){\n if (contains(name)){\n throw new VariableAlreadyDefined();\n }\n Value newClosure;\n if (node.getName().equals(\"function\")){\n newClosure = new Closure(parent, node);\n } else {\n newClosure = new Environment(parent, node);\n }\n\n this.values.put(name, newClosure);\n }",
"@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp\", line = 522,\n FQN=\"clang::CodeGen::CodeGenFunction::GenerateCXXGlobalInitFunc\", NM=\"_ZN5clang7CodeGen15CodeGenFunction25GenerateCXXGlobalInitFuncEPN4llvm8FunctionENS2_8ArrayRefIS4_EENS0_7AddressE\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.clang.codegen/llvmToClangType -split-class=clang::CodeGen::CodeGenFunction@this ${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp -nm=_ZN5clang7CodeGen15CodeGenFunction25GenerateCXXGlobalInitFuncEPN4llvm8FunctionENS2_8ArrayRefIS4_EENS0_7AddressE\")\n//</editor-fold>\npublic final void GenerateCXXGlobalInitFunc(Function /*P*/ Fn, \n ArrayRef<Function /*P*/ > Decls) {\n GenerateCXXGlobalInitFunc(Fn, \n Decls, \n Address.invalid());\n}",
"extern(int i) {\n var = i;\n }",
"private Stmt varDeclaration() {\n Token name = consume(IDENTIFIER, \"Expect variable name.\");\n Expr initializer = null;\n // Parse the initializer if an '=' is present. This branching allows initialization without declaration.\n if(match(EQUAL)) {\n initializer = expression();\n }\n\n consumeSemi(\"Expect ';' after variable declaration.\");\n return new Stmt.Var(name, initializer);\n }",
"public GlobalScope() {\n super(null);\n }",
"public void actionVAR_DECL(Node<TokenAttributes> node) {\n String tmapCode = BIB.getTmapCodeFromFile(auxTmapsDir, \"globalVarCtoJava.tmap\");\n List<Node<TokenAttributes>> nodes = BIB.tmapOneRuleCodeCall(tmapCode, node);\n if (!nodes.isEmpty()) {\n nodes.get(0).setParent(node.getParent());\n BIB.replaceNode(node, nodes.get(0));\n } else {\n tmapCode = BIB.getTmapCodeFromFile(auxTmapsDir, \"arrayCtoJava.tmap\");\n nodes = BIB.tmapOneRuleCodeCall(tmapCode, node);\n if (!nodes.isEmpty()) {\n nodes.get(0).setParent(node.getParent());\n BIB.replaceNode(node, nodes.get(0));\n }\n }\n }",
"@Override\r\n public ASTNode visitVarDef(CoolParser.VarDefContext ctx) {\n if (ctx.init != null) {\r\n return new VarDef(ctx.getStart(), new Id(ctx.name), new Type(ctx.type), (Expression) visit(ctx.init));\r\n }\r\n\r\n return new VarDef(ctx.getStart(), new Id(ctx.name), new Type(ctx.type), null);\r\n }",
"public static void addGlobal(String s, Ident i) {\n\t\t\tglobaux.put(s, i);\n\t\t}",
"@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/lib/IR/Module.cpp\", line = 209,\n FQN=\"llvm::Module::getGlobalVariable\", NM=\"_ZN4llvm6Module17getGlobalVariableENS_9StringRefEb\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/Module.cpp -nm=_ZN4llvm6Module17getGlobalVariableENS_9StringRefEb\")\n //</editor-fold>\n public GlobalVariable /*P*/ getGlobalVariable(StringRef Name) {\n return getGlobalVariable(Name, false);\n }",
"public final void rule__VarDecl__Group__1__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:9251:1: ( ( 'var' ) )\r\n // InternalGo.g:9252:1: ( 'var' )\r\n {\r\n // InternalGo.g:9252:1: ( 'var' )\r\n // InternalGo.g:9253:2: 'var'\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getVarDeclAccess().getVarKeyword_1()); \r\n }\r\n match(input,76,FOLLOW_2); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getVarDeclAccess().getVarKeyword_1()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"private ConsistentVariable(String name, Class<V> type, V initValue, long initVersion) {\n super(name, type);\n versionedValue = new AtomicReference<>(new VersionedValue<>(initVersion, initValue));\n }",
"public VarDecl(List<Token> identifiers, Type varType, ScopeLevel scopeLevel)\n {\n super(null, varType);\n\n singleVarDecls = new ArrayList<>(identifiers.size());\n for (Token id : identifiers)\n singleVarDecls.add(new SingleVarDecl(id, varType, scopeLevel));\n }",
"public ScopeManager(){\n globalConstants = new HashMap<>();\n globalVariables = new HashMap<>();\n\n currentConstants = null;\n currentVariables = null;\n\n temporaryConstants = new ArrayList<>();\n temporaryVariables = new ArrayList<>();\n\n localVariableScopes = new HashMap<>();\n localConstantScopes = new HashMap<>();\n }",
"public List<Identifier> getGlobalVars(){\n final List<Identifier> globs = new ArrayList<>();\n\n globalVariables.keySet().stream()\n .map(x -> new Identifier(Scope.GLOBAL, Type.VARIABLE, x, globalVariables.get(x)))\n .forEach(globs::add);\n\n return globs;\n }",
"public VariableIF createVariable(VariableDecl decl);",
"public void addInitializer(IASTInitializer initializer);",
"public void defineVariable(final GlobalVariable variable) {\n globalVariables.define(variable.name(), new IAccessor() {\n public IRubyObject getValue() {\n return variable.get();\n }\n \n public IRubyObject setValue(IRubyObject newValue) {\n return variable.set(newValue);\n }\n });\n }",
"public void defineVariable(final GlobalVariable variable) {\n globalVariables.define(variable.name(), new IAccessor() {\n public IRubyObject getValue() {\n return variable.get();\n }\n \n public IRubyObject setValue(IRubyObject newValue) {\n return variable.set(newValue);\n }\n });\n }",
"@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/lib/IR/Module.cpp\", line = 223,\n FQN=\"llvm::Module::getOrInsertGlobal\", NM=\"_ZN4llvm6Module17getOrInsertGlobalENS_9StringRefEPNS_4TypeE\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/Module.cpp -nm=_ZN4llvm6Module17getOrInsertGlobalENS_9StringRefEPNS_4TypeE\")\n //</editor-fold>\n public Constant /*P*/ getOrInsertGlobal(StringRef Name, Type /*P*/ Ty) {\n // See if we have a definition for the specified global already.\n GlobalVariable /*P*/ GV = dyn_cast_or_null_GlobalVariable(getNamedValue(new StringRef(Name)));\n if (!(GV != null)) {\n // Nope, add it\n GlobalVariable /*P*/ New = /*NEW_EXPR [GlobalVariable::new]*/GlobalVariable.$new_GlobalVariable((type$ptr<?> New$Mem)->{\n return new GlobalVariable(/*Deref*/this, Ty, false, GlobalVariable.LinkageTypes.ExternalLinkage, \n (Constant /*P*/ )null, new Twine(Name));\n });\n return New; // Return the new declaration.\n }\n \n // If the variable exists but has the wrong type, return a bitcast to the\n // right type.\n Type /*P*/ GVTy = GV.getType();\n PointerType /*P*/ PTy = PointerType.get(Ty, GVTy.getPointerAddressSpace());\n if (GVTy != PTy) {\n return ConstantExpr.getBitCast(GV, PTy);\n }\n \n // Otherwise, we just found the existing function or a prototype.\n return GV;\n }",
"private void init() {\n\t\t\n\t\ttry{\t\t\t\n\t\t\tinfos = new HashMap<String, VariableInfo>();\n\t\t\t\n\t\t\tfor(String var : this.problem.getMyVars()){\n\t\t\t\t\n\t\t\t\tif(this.problem.getNbrNeighbors(var) != 0){ // an isolated variable doesn't need a CryptoScheme and therefore no VariableInfo either\n\t\t\t\t\t\n\t\t\t\t\tVariableInfo info = new VariableInfo(var);\n\t\t\t\t\tinfos.put(var, info);\n\t\t\t\t\t\n\t\t\t\t\tinfo.cs = cryptoConstr.newInstance(this.cryptoParameter);\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//initialize request counter for my own variables\n\t\t\trequestCount = new HashMap<String,Integer>(); \n\t\t\tfor(String var : this.problem.getMyVars()){\n\t\t\t\trequestCount.put(var, 0);\n\t\t\t}\n\t\t\t\n\t\t\tthis.started = true;\t\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\t\t\n\t}",
"@Override\n public String generate() {\n var variableType = this.variable.getType();\n var variableSymbol = this.variable.getSymbol();\n var variableLLVMType = JavaTypeToLLVMType.getLLVMType(variableType);\n return \"\\t%\" + variableSymbol + \" = alloca \" + variableLLVMType + \"\\n\";\n }",
"DynamicVariable createDynamicVariable();",
"private static boolean VarDecl_1_0(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"VarDecl_1_0\")) return false;\n boolean r;\n Marker m = enter_section_(b);\n r = MarklogicAnnotation(b, l + 1);\n if (!r) r = CompatibilityAnnotation(b, l + 1);\n if (!r) r = Annotation(b, l + 1);\n exit_section_(b, m, null, r);\n return r;\n }",
"public LocalVariableGen addLocalVariable2(String name, Type type, InstructionHandle start) {\n/* 177 */ return addLocalVariable(name, type, this._slotAllocator.allocateSlot(type), start, null);\n/* */ }",
"Expression getInitializer();",
"public TypeVarWithInitializerElements getTypeVarWithInitializerAccess() {\r\n\t\treturn pTypeVarWithInitializer;\r\n\t}",
"void initGlobalAttributes() {\n\n\t}",
"protected Object LOADVAR(final Frame cf, final int varScope, final int pos){\n\t\treturn CodeBlock.isMaxArg2(pos) ? LOADVARMODULE(cf, varScope) : LOADVARSCOPED(cf, varScope, pos);\n\t}",
"@Override\r\n\tpublic void initVariables() {\n\t\t\r\n\t}",
"ContextVariable createContextVariable();",
"SimpleContextVariable createSimpleContextVariable();",
"public void typeCheck(/*@NotNull*/ ExpressionVisitor visitor) throws XPathException {\n Expression value = getSelectExpression();\n if (value != null) {\n value.checkForUpdatingSubexpressions();\n if (value.isUpdatingExpression()) {\n throw new XPathException(\n \"Initializing expression for global variable must not be an updating expression\", \"XUST0001\");\n }\n RoleDiagnostic role = new RoleDiagnostic(\n RoleDiagnostic.VARIABLE, getVariableQName().getDisplayName(), 0);\n ContextItemStaticInfo cit = new ContextItemStaticInfo(AnyItemType.getInstance(), true);\n Expression value2 = TypeChecker.strictTypeCheck(\n value.simplify().typeCheck(visitor, cit),\n getRequiredType(), role, visitor.getStaticContext());\n value2 = value2.optimize(visitor, cit);\n setSelectExpression(value2);\n // the value expression may declare local variables\n SlotManager map = getConfiguration().makeSlotManager();\n int slots = ExpressionTool.allocateSlots(value2, 0, map);\n if (slots > 0) {\n setContainsLocals(map);\n }\n\n if (getRequiredType() == SequenceType.ANY_SEQUENCE && !(this instanceof GlobalParam)) {\n // no type was declared; try to deduce a type from the value\n try {\n final ItemType itemType = value.getItemType();\n final int cardinality = value.getCardinality();\n setRequiredType(SequenceType.makeSequenceType(itemType, cardinality));\n GroundedValue constantValue = null;\n if (value2 instanceof Literal) {\n constantValue = ((Literal) value2).getValue();\n }\n for (BindingReference reference : references) {\n if (reference instanceof VariableReference) {\n ((VariableReference) reference).refineVariableType(\n itemType, cardinality, constantValue, value.getSpecialProperties());\n }\n }\n } catch (Exception err) {\n // exceptions can happen because references to variables and functions are still unbound\n }\n }\n\n\n }\n }",
"public interface Scope {\n public Object getVar(String varName);\n\n public Scope defineVar(String varName, Object value);\n\n public Scope defineConst(String varName, Object value);\n\n public Scope setVar(String varName, Object value);\n\n public Scope delVar(String varName);\n}",
"public void setGlobalVariables(GlobalVariables globalVariables);",
"private void declareLocals() {\r\n\t\t// declare locals\r\n\t\tfor(Local local: method.retrieveActiveBody().getLocals()) {\r\n\t\t\tString cType = null;\r\n\t\t\t// null types need special treatment, we don't output them\r\n\t\t\t// we also won't generate statements that use a nullType\r\n\t\t\t// as a target.\r\n\t\t\tif(local.getType() instanceof NullType) {\r\n\t\t\t\tcType = \"java_lang_Object*\";\r\n\t\t\t} else {\r\n\t\t\t\tcType = CTypes.toCType(local.getType());\r\n\t\t\t}\r\n\t\t\twriter.wl(cType + \" \" + local.getName() + \" = 0;\");\r\n\t\t}\r\n\t\twriter.wl(\"java_lang_Object* _exception = 0;\");\r\n\t}",
"private void initInstanceVars() {\n\t\tglobalSymTab = new Hashtable<String,ClassDecl>();\n\t\tcurrentClass = null;\n\t}",
"VarReference createVarReference();",
"public void var_decl(VarDeclList vd, Integer lg) {\n if (lexer.token == Symbol.FLOAT || lexer.token == Symbol.INT) {\n String temp = lexer.getStringValue();\n lexer.nextToken();\n IdList list = id_list(lg);\n ArrayList<Ident> iter = list.getIdList();\n \n //entra aqui se nenhuma variavel declarada em id_list já existe\n for(Ident x: iter){\n switch(lg) {\n case 1:\n symbolTable.putInGlobal(x.getName(), new Type(temp, false));\n break;\n case 2:\n symbolTable.putInLocal(x.getName(), temp);\n break;\n }\n }\n vd.addDecl(new VarDecl(temp, list));\n if (lexer.token != Symbol.SEMICOLON) {\n error.signal(\"Missing end of declaration at variable declaration\");\n }\n lexer.nextToken();\n }\n }",
"protected void initVars() {}",
"public void addNewScope(){\n List<String> varScope = new ArrayList<>();\n newVarInCurrentScope.add(varScope);\n\n List<String> objScope = new ArrayList<>();\n newObjInCurrentScope.add(objScope);\n }",
"public ScriptContext(Context context, Scriptable global)\n\t{\n\t\tthis.context = context;\n\t\tthis.global = global;\n//\t\tSystem.out.println(\"Creating new ScriptContext \" + this);\n\t}",
"SharedVarsDeclRule createSharedVarsDeclRule();",
"public Code visitVariableNode(ExpNode.VariableNode node) {\n beginGen(\"Variable\");\n SymEntry.VarEntry var = node.getVariable();\n Code code = new Code();\n code.genMemRef(staticLevel - var.getLevel(), var.getOffset());\n endGen(\"Variable\");\n return code;\n }",
"public final void variableDeclarator() throws RecognitionException {\n int variableDeclarator_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"variableDeclarator\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(384, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 43) ) { return ; }\n // Java.g:385:5: ( variableDeclaratorId ( '=' variableInitializer )? )\n dbg.enterAlt(1);\n\n // Java.g:385:9: variableDeclaratorId ( '=' variableInitializer )?\n {\n dbg.location(385,9);\n pushFollow(FOLLOW_variableDeclaratorId_in_variableDeclarator1682);\n variableDeclaratorId();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(385,30);\n // Java.g:385:30: ( '=' variableInitializer )?\n int alt58=2;\n try { dbg.enterSubRule(58);\n try { dbg.enterDecision(58);\n\n int LA58_0 = input.LA(1);\n\n if ( (LA58_0==51) ) {\n alt58=1;\n }\n } finally {dbg.exitDecision(58);}\n\n switch (alt58) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:385:31: '=' variableInitializer\n {\n dbg.location(385,31);\n match(input,51,FOLLOW_51_in_variableDeclarator1685); if (state.failed) return ;\n dbg.location(385,35);\n pushFollow(FOLLOW_variableInitializer_in_variableDeclarator1687);\n variableInitializer();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(58);}\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 43, variableDeclarator_StartIndex); }\n }\n dbg.location(386, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"variableDeclarator\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }",
"public Global(String globalName, Subscript ...subscripts)\n\t{\n\t\tthis.globalName=globalName;\n\t\tthis.subscripts=subscripts;\n\t}",
"void initFunDecl() {\n\t\t_localVarID = 0;\r\n\t\t_labelID = 0;\r\n\t\t_tempVarID = 32;\r\n\t\t_lsymtable.clear();\r\n\t}",
"protected void visitVariableDeclInfoAfterAddedToScope(VariableDeclInfo declInfo) {\n // Deliberately empty - to be optionally overridden by subclasses.\n }",
"VariableDeclarationWithInitCS getResultVariable();",
"@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp\", line = 227,\n FQN=\"clang::CodeGen::CodeGenFunction::registerGlobalDtorWithAtExit\", NM=\"_ZN5clang7CodeGen15CodeGenFunction28registerGlobalDtorWithAtExitERKNS_7VarDeclEPN4llvm8ConstantES7_\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.clang.codegen/llvmToClangType -split-class=clang::CodeGen::CodeGenFunction@this ${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp -nm=_ZN5clang7CodeGen15CodeGenFunction28registerGlobalDtorWithAtExitERKNS_7VarDeclEPN4llvm8ConstantES7_\")\n//</editor-fold>\npublic final void registerGlobalDtorWithAtExit(final /*const*/ VarDecl /*&*/ VD, \n Constant /*P*/ dtor, \n Constant /*P*/ addr) {\n // Create a function which calls the destructor.\n Constant /*P*/ dtorStub = $this().createAtExitStub(VD, dtor, addr);\n \n // extern \"C\" int atexit(void (*f)(void));\n org.llvm.ir.FunctionType /*P*/ atexitTy = org.llvm.ir.FunctionType.get(IntTy, new ArrayRef<org.llvm.ir.Type /*P*/ >(dtorStub.getType(), true), false);\n \n Constant /*P*/ atexit = $this().CGM.CreateRuntimeFunction(atexitTy, new StringRef(/*KEEP_STR*/\"atexit\"));\n {\n Function /*P*/ atexitFn = dyn_cast_Function(atexit);\n if ((atexitFn != null)) {\n atexitFn.setDoesNotThrow();\n }\n }\n \n $this().EmitNounwindRuntimeCall(atexit, new ArrayRef<Value /*P*/ >(dtorStub, true));\n}",
"public final Constant initializer() throws RecognitionException {\r\n Constant constant = null;\r\n\r\n\r\n Token STRING176=null;\r\n Token GLOBAL_VARIABLE178=null;\r\n Constant constant177 =null;\r\n\r\n\r\n try {\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:1034:5: ( 'zeroinitializer' | 'c' STRING | constant | GLOBAL_VARIABLE )\r\n int alt262=4;\r\n switch ( input.LA(1) ) {\r\n case 92:\r\n {\r\n alt262=1;\r\n }\r\n break;\r\n case 56:\r\n {\r\n alt262=2;\r\n }\r\n break;\r\n case BINARY_OP:\r\n case BOOLEAN:\r\n case CONVERSION_OP:\r\n case FLOATING_POINT:\r\n case HEX:\r\n case INTEGER:\r\n case NULL:\r\n case 46:\r\n case 49:\r\n case 65:\r\n case 66:\r\n case 68:\r\n case 93:\r\n {\r\n alt262=3;\r\n }\r\n break;\r\n case GLOBAL_VARIABLE:\r\n {\r\n alt262=4;\r\n }\r\n break;\r\n default:\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 262, 0, input);\r\n\r\n throw nvae;\r\n\r\n }\r\n\r\n switch (alt262) {\r\n case 1 :\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:1034:7: 'zeroinitializer'\r\n {\r\n match(input,92,FOLLOW_92_in_initializer7793); \r\n\r\n constant = valueFactory.createConstantValue(SimpleConstantValue.nullConst, \"null\");\r\n\r\n }\r\n break;\r\n case 2 :\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:1035:7: 'c' STRING\r\n {\r\n match(input,56,FOLLOW_56_in_initializer7803); \r\n\r\n STRING176=(Token)match(input,STRING,FOLLOW_STRING_in_initializer7805); \r\n\r\n constant = valueFactory.createConstantValue(SimpleConstantValue.nullConst, (STRING176!=null?STRING176.getText():null));\r\n\r\n }\r\n break;\r\n case 3 :\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:1036:7: constant\r\n {\r\n pushFollow(FOLLOW_constant_in_initializer7815);\r\n constant177=constant();\r\n\r\n state._fsp--;\r\n\r\n\r\n constant = constant177;\r\n\r\n }\r\n break;\r\n case 4 :\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:1037:7: GLOBAL_VARIABLE\r\n {\r\n GLOBAL_VARIABLE178=(Token)match(input,GLOBAL_VARIABLE,FOLLOW_GLOBAL_VARIABLE_in_initializer7825); \r\n\r\n constant = valueFactory.createVariable((GLOBAL_VARIABLE178!=null?GLOBAL_VARIABLE178.getText():null));\r\n\r\n }\r\n break;\r\n\r\n }\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n return constant;\r\n }",
"public final void entryRuleVarDecl() throws RecognitionException {\r\n try {\r\n // InternalGo.g:1655:1: ( ruleVarDecl EOF )\r\n // InternalGo.g:1656:1: ruleVarDecl EOF\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getVarDeclRule()); \r\n }\r\n pushFollow(FOLLOW_1);\r\n ruleVarDecl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getVarDeclRule()); \r\n }\r\n match(input,EOF,FOLLOW_2); if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n }\r\n return ;\r\n }",
"public void visit(VariableInitializer n) {\n n.f0.accept(this);\n }",
"public final GlobalAlias aliases_variable() throws RecognitionException {\r\n GlobalAlias globalAlias = null;\r\n\r\n\r\n Token g1=null;\r\n Token g2=null;\r\n Token LINKAGE13=null;\r\n Token VISIBILITY14=null;\r\n Type derived_type15 =null;\r\n\r\n\r\n\r\n String name;\r\n String linkage = null;\r\n String visibility = null;\r\n Type type;\r\n String gVarName;\r\n\r\n try {\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:93:5: (g1= GLOBAL_VARIABLE '=' 'alias' ( LINKAGE )? ( VISIBILITY )? derived_type g2= GLOBAL_VARIABLE )\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:94:5: g1= GLOBAL_VARIABLE '=' 'alias' ( LINKAGE )? ( VISIBILITY )? derived_type g2= GLOBAL_VARIABLE\r\n {\r\n g1=(Token)match(input,GLOBAL_VARIABLE,FOLLOW_GLOBAL_VARIABLE_in_aliases_variable402); \r\n\r\n name = (g1!=null?g1.getText():null); name = name.substring(1, name.length());\r\n\r\n match(input,47,FOLLOW_47_in_aliases_variable412); \r\n\r\n match(input,51,FOLLOW_51_in_aliases_variable414); \r\n\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:95:17: ( LINKAGE )?\r\n int alt12=2;\r\n int LA12_0 = input.LA(1);\r\n\r\n if ( (LA12_0==LINKAGE) ) {\r\n alt12=1;\r\n }\r\n switch (alt12) {\r\n case 1 :\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:95:18: LINKAGE\r\n {\r\n LINKAGE13=(Token)match(input,LINKAGE,FOLLOW_LINKAGE_in_aliases_variable417); \r\n\r\n linkage = (LINKAGE13!=null?LINKAGE13.getText():null);\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:96:5: ( VISIBILITY )?\r\n int alt13=2;\r\n int LA13_0 = input.LA(1);\r\n\r\n if ( (LA13_0==VISIBILITY) ) {\r\n alt13=1;\r\n }\r\n switch (alt13) {\r\n case 1 :\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:96:6: VISIBILITY\r\n {\r\n VISIBILITY14=(Token)match(input,VISIBILITY,FOLLOW_VISIBILITY_in_aliases_variable430); \r\n\r\n visibility = (VISIBILITY14!=null?VISIBILITY14.getText():null);\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n pushFollow(FOLLOW_derived_type_in_aliases_variable441);\r\n derived_type15=derived_type();\r\n\r\n state._fsp--;\r\n\r\n\r\n type = derived_type15;\r\n\r\n g2=(Token)match(input,GLOBAL_VARIABLE,FOLLOW_GLOBAL_VARIABLE_in_aliases_variable454); \r\n\r\n gVarName = (g2!=null?g2.getText():null); gVarName = gVarName.substring(1, gVarName.length());\r\n\r\n }\r\n\r\n\r\n globalAlias = valueFactory.createGlobalAlias(name, linkage, visibility, type, gVarName);\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n return globalAlias;\r\n }",
"VarAssignment createVarAssignment();",
"@Override\n public CodeFragment visitAssignmentStat(AlangParser.AssignmentStatContext ctx) {\n String name = ctx.ID().getText();\n if (!variableExists(name)) {\n this.addError(ctx, name, \"Assignment to undeclared variable\");\n return new CodeFragment(\"\");\n }\n\n Variable v = this.globals.get(name);\n v.setValue(ctx.global_expression().getText());\n v.setHasValue();\n\n return new CodeFragment(\"\");\n }",
"public void variableInit(HashSet<MJVariable> initialized)\n\t\t\tthrows TypeCheckerException {\n\t\t\n\t\tif (!(this.init instanceof MJNoExpression)) {\n\t\t\tinitialized.add(this);\n\t\t}\n\n\t}",
"public final void rule__AstInitialize__Group_7__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:14037:1: ( ( 'var' ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:14038:1: ( 'var' )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:14038:1: ( 'var' )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:14039:1: 'var'\n {\n before(grammarAccess.getAstInitializeAccess().getVarKeyword_7_0()); \n match(input,63,FOLLOW_63_in_rule__AstInitialize__Group_7__0__Impl28401); \n after(grammarAccess.getAstInitializeAccess().getVarKeyword_7_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public IVariable createInternalVariable(String name, IJavaType referencType) {\n IVariable var = new InterpreterVariable(name, referencType, fContext.getVM());\n fInternalVariables.put(name, var);\n return var;\n }",
"@Override\n public void enterVar_assign(FSMParser.Var_assignContext ctx) {\n if (findComp(ctx.var().NAME().getText()) == null) {\n Var temp = new Var(\n ctx.var().NAME().getText(),\n Integer.parseInt(ctx.var().INT().getText()),\n false, false, false);\n this.comps.add(temp);\n\n }\n }",
"public final void addGlobalAttributeDecl(XSAttributeDecl decl) {\n fGlobalAttrDecls.put(decl.fName, decl);\n }",
"String getVarDeclare();",
"String generateRuntimeInitialization();",
"StaticVar(final Var var, final Expr expr, final AnnList anns, final String doc,\n final boolean external, final VarScope vs) {\n super(var.name, var.declType, anns, doc, vs, var.info);\n this.expr = expr;\n this.external = external;\n lazy = anns.contains(Annotation._BASEX_LAZY);\n }",
"public String generate(String registerName) {\n var variableType = this.variable.getType();\n var variableSymbol = this.variable.getSymbol();\n var variableLLVMType = JavaTypeToLLVMType.getLLVMType(variableType);\n return \"\\t%\" + registerName + \" = alloca \" + variableLLVMType + \"\\n\";\n }",
"Variable createVariable();",
"Variable createVariable();",
"public default AddressEnvironment makeGlobalVector(Assembler assembler, AddressEnvironment rho, int stackDistance, AddressEnvironment rhoInner)\r\n\t{\n\t\tSet<String> freeVariables = getFreeVariables();\r\n\t\tint globalVariableIndex = 0;\r\n\t\tfor(String globalVariable : freeVariables)\r\n\t\t{\r\n\t\t\trho.appendGetvar(assembler, globalVariable, stackDistance + globalVariableIndex);\r\n\t\t\trhoInner = rhoInner.withGlobalVariable(globalVariable, globalVariableIndex);\r\n\t\t\tglobalVariableIndex ++;\r\n\t\t}\r\n\t\tassembler.append(mkvec, globalVariableIndex);\r\n\t\treturn rhoInner;\r\n\t}",
"private void forInit(Modifier x, Scope scope, Vector queue)\r\n {\r\n if (isLocalVarDecl(true))\r\n localVariableDeclaration(new Modifier(x), scope, queue);\r\n else\r\n {\r\n Operation ret = moreStatementExpression(statementExpression(scope, queue), scope, queue);\r\n\r\n while(ret != null)\r\n {\r\n if (ret.left != null)\r\n queue.add(ret.left);\r\n\r\n ret = ret.right;\r\n\r\n Operation ptr = new Operation();\r\n ptr.operator = Keyword.CLEARSY;\r\n queue.add(ptr);\r\n }\r\n }\r\n }",
"public final Constant variable() throws RecognitionException {\r\n Constant expr = null;\r\n\r\n\r\n Token GLOBAL_VARIABLE90=null;\r\n Token LOCAL_VARIABLE91=null;\r\n Token UNDEF92=null;\r\n\r\n try {\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:568:5: ( GLOBAL_VARIABLE | LOCAL_VARIABLE | UNDEF )\r\n int alt75=3;\r\n switch ( input.LA(1) ) {\r\n case GLOBAL_VARIABLE:\r\n {\r\n alt75=1;\r\n }\r\n break;\r\n case LOCAL_VARIABLE:\r\n {\r\n alt75=2;\r\n }\r\n break;\r\n case UNDEF:\r\n {\r\n alt75=3;\r\n }\r\n break;\r\n default:\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 75, 0, input);\r\n\r\n throw nvae;\r\n\r\n }\r\n\r\n switch (alt75) {\r\n case 1 :\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:568:7: GLOBAL_VARIABLE\r\n {\r\n GLOBAL_VARIABLE90=(Token)match(input,GLOBAL_VARIABLE,FOLLOW_GLOBAL_VARIABLE_in_variable3086); \r\n\r\n expr = valueFactory.createVariable((GLOBAL_VARIABLE90!=null?GLOBAL_VARIABLE90.getText():null));\r\n\r\n }\r\n break;\r\n case 2 :\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:569:7: LOCAL_VARIABLE\r\n {\r\n LOCAL_VARIABLE91=(Token)match(input,LOCAL_VARIABLE,FOLLOW_LOCAL_VARIABLE_in_variable3096); \r\n\r\n expr = valueFactory.createVariable((LOCAL_VARIABLE91!=null?LOCAL_VARIABLE91.getText():null));\r\n\r\n }\r\n break;\r\n case 3 :\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:570:7: UNDEF\r\n {\r\n UNDEF92=(Token)match(input,UNDEF,FOLLOW_UNDEF_in_variable3106); \r\n\r\n expr = valueFactory.createVariable((UNDEF92!=null?UNDEF92.getText():null));\r\n\r\n }\r\n break;\r\n\r\n }\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n return expr;\r\n }",
"private void initVariables(){\n int counter = 1;\n for (int vCount = 0; vCount < vertexCount; vCount++){\n for (int pCount = 0; pCount < positionCount; pCount++){\n variables[vCount][pCount] = counter++;\n }\n }\n }",
"public Object visitStmtVarDecl(StmtVarDecl stmt)\n {\n \tList<Type> types = isReplacer? new ArrayList<Type>() : null;\n \tList<String> names = isReplacer? new ArrayList<String>() : null;\n \tList<Expression> inits = isReplacer? new ArrayList<Expression>() : null;\n for (int i = 0; i < stmt.getNumVars(); i++)\n {\n String nm = stmt.getName(i);\n Type vt = (Type)stmt.getType(i).accept(this);\n //Variable declaration not needed.\n Expression ninit = null;\n if( stmt.getInit(i) != null ){\n \tabstractValue init = (abstractValue) stmt.getInit(i).accept(this);\n \tninit = exprRV;\n \tstate.setVarValue(nm, init);\n }\n if( isReplacer ){\n \ttypes.add(vt);\n \tnames.add(transName(nm));\n \tinits.add(ninit);\n }\n }\n return isReplacer? new StmtVarDecl(stmt, types, names, inits) : stmt;\n }",
"public void assign (String name, StatementParse node, Closure parent){\n Closure exist = find_var(name);\n Value newClosure;\n if (node.getName().equals(\"function\")){\n newClosure = new Closure(parent, node);\n } else {\n newClosure = new Environment(parent, node);\n }\n exist.getValues().put(name, newClosure);\n }",
"private SWRLVariable initalizeVariable(String name, SWRLVariable var1) {\n\n if (literalVocabulary.containsKey(name)) {\n var1 = factory.getSWRLVariable(IRI.create(manager.getOntologyDocumentIRI(domainOntology) + \"#\" + literalVocabulary.get(name)));\n } else {\n char variable = this.generateVariable();\n literalVocabulary.put(name, String.valueOf(variable));\n var1 = factory.getSWRLVariable(IRI.create(manager.getOntologyDocumentIRI(domainOntology) + \"#\" + variable));\n }\n\n return var1;\n }",
"public LocalVar(java.lang.System[] $dummy) {\n super($dummy);\n }",
"@Override\n public Void visitVariableAntecedent(GraafvisParser.VariableAntecedentContext ctx) {\n variables.add(ctx.HID().getText());\n return null;\n }",
"public void setGlobalVariableValue(java.lang.String globalVariableValue) {\r\n this.globalVariableValue = globalVariableValue;\r\n }",
"public void setGlobalVariables(GlobalVariables globalVariables) {\n this.globalVariables = globalVariables;\n }",
"c(a aVar) {\n super(0);\n this.this$0 = aVar;\n }",
"public void setGlobalVariableType(java.lang.Short globalVariableType) {\r\n this.globalVariableType = globalVariableType;\r\n }",
"public static boolean VarDecl(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"VarDecl\")) return false;\n if (!nextTokenIs(b, K_DECLARE)) return false;\n boolean r, p;\n Marker m = enter_section_(b, l, _NONE_, VAR_DECL, null);\n r = consumeToken(b, K_DECLARE);\n r = r && VarDecl_1(b, l + 1);\n r = r && consumeTokens(b, 1, K_VARIABLE, DOLLAR_SIGN);\n p = r; // pin = 3\n r = r && report_error_(b, VarName(b, l + 1));\n r = p && report_error_(b, VarDecl_5(b, l + 1)) && r;\n r = p && report_error_(b, VarDecl_6(b, l + 1)) && r;\n r = p && Separator(b, l + 1) && r;\n exit_section_(b, l, m, r, p, null);\n return r || p;\n }",
"public Scriptable construct(Context cx, Scriptable scope, Object[] args);",
"public interface GlobalNode extends Node{\n\n VariableName[] getVariableNames();\n\n}",
"public void varDecl(StmtVarDecl stmt)\n {\n for (int i = 0; i < stmt.getNumVars(); i++)\n {\n String nm = stmt.getName(i);\n Type vt = (Type)stmt.getType(i).accept(this);\n state.varDeclare(nm, vt);\n }\n }"
] | [
"0.6587048",
"0.59449697",
"0.57122225",
"0.5668691",
"0.54665685",
"0.53914326",
"0.53791976",
"0.53133667",
"0.5273163",
"0.52150166",
"0.5214498",
"0.51609904",
"0.51585066",
"0.51406115",
"0.5123291",
"0.50941366",
"0.5091355",
"0.50849694",
"0.5077798",
"0.50497735",
"0.5046787",
"0.5021024",
"0.5019322",
"0.5015962",
"0.49930725",
"0.49048945",
"0.48701325",
"0.48689312",
"0.484171",
"0.4811083",
"0.48018187",
"0.47847733",
"0.47727785",
"0.47692305",
"0.47692305",
"0.47078407",
"0.47049353",
"0.47003046",
"0.46999052",
"0.4682273",
"0.46746486",
"0.46725318",
"0.46569133",
"0.46051627",
"0.4601738",
"0.45968837",
"0.45954663",
"0.459152",
"0.4587119",
"0.45815578",
"0.4581509",
"0.4570179",
"0.45621118",
"0.45610854",
"0.45547864",
"0.4522521",
"0.4521329",
"0.4520566",
"0.45171115",
"0.45087793",
"0.45072466",
"0.4484855",
"0.44845504",
"0.44789562",
"0.44569823",
"0.44551295",
"0.44486043",
"0.4448264",
"0.44477007",
"0.4440975",
"0.44352114",
"0.44296923",
"0.44119036",
"0.441139",
"0.44112065",
"0.44057566",
"0.43968987",
"0.43837282",
"0.4374087",
"0.43735984",
"0.43724445",
"0.43721604",
"0.43721604",
"0.43663332",
"0.43635252",
"0.43588477",
"0.43563616",
"0.43548307",
"0.4352615",
"0.4352477",
"0.43231684",
"0.43205383",
"0.43195996",
"0.43168262",
"0.43089092",
"0.4296483",
"0.42964244",
"0.42910787",
"0.42896563",
"0.42807582"
] | 0.60745394 | 1 |
/ Create a stub function, suitable for being passed to atexit, / which passes the given address to the given destructor function. | @Converted(kind = Converted.Kind.AUTO,
source = "${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp", line = 194,
FQN="clang::CodeGen::CodeGenFunction::createAtExitStub", NM="_ZN5clang7CodeGen15CodeGenFunction16createAtExitStubERKNS_7VarDeclEPN4llvm8ConstantES7_",
cmd="jclank.sh -java-options=${SPUTNIK}/modules/org.clang.codegen/llvmToClangType -split-class=clang::CodeGen::CodeGenFunction@this ${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp -nm=_ZN5clang7CodeGen15CodeGenFunction16createAtExitStubERKNS_7VarDeclEPN4llvm8ConstantES7_")
//</editor-fold>
public final Constant /*P*/ createAtExitStub(final /*const*/ VarDecl /*&*/ VD,
Constant /*P*/ dtor,
Constant /*P*/ addr) {
CodeGenFunction CGF = null;
JavaCleaner $c$ = $createJavaCleaner();
try {
// Get the destructor function type, void(*)(void).
org.llvm.ir.FunctionType /*P*/ ty = org.llvm.ir.FunctionType.get($this().CGM.VoidTy, false);
SmallString/*<256>*/ FnName/*J*/= new SmallString/*<256>*/(256);
{
raw_svector_ostream Out = null;
try {
Out/*J*/= new raw_svector_ostream(FnName);
$this().CGM.getCXXABI().getMangleContext().mangleDynamicAtExitDestructor($AddrOf(VD), Out);
} finally {
if (Out != null) { Out.$destroy(); }
}
}
final /*const*/ CGFunctionInfo /*&*/ FI = $this().CGM.getTypes().arrangeNullaryFunction();
Function /*P*/ fn = $this().CGM.CreateGlobalInitOrDestructFunction(ty, new Twine(FnName.str()),
FI,
VD.getLocation());
CGF/*J*/= new CodeGenFunction($this().CGM);
CGF.StartFunction(new GlobalDecl($AddrOf(VD)), $this().CGM.getContext().VoidTy.$QualType(), fn, FI, $c$.track(new FunctionArgList())); $c$.clean();
CallInst /*P*/ call = CGF.Builder.CreateCall_Value$P_ArrayRef$Value$P_Twine$C_MDNode$P(dtor, new ArrayRef<Value /*P*/ >(addr, true));
{
// Make sure the call and the callee agree on calling convention.
Function /*P*/ dtorFn = dyn_cast_Function(dtor.stripPointerCasts());
if ((dtorFn != null)) {
call.setCallingConv(dtorFn.getCallingConv());
}
}
CGF.FinishFunction();
return fn;
} finally {
if (CGF != null) { CGF.$destroy(); }
$c$.$destroy();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp\", line = 227,\n FQN=\"clang::CodeGen::CodeGenFunction::registerGlobalDtorWithAtExit\", NM=\"_ZN5clang7CodeGen15CodeGenFunction28registerGlobalDtorWithAtExitERKNS_7VarDeclEPN4llvm8ConstantES7_\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.clang.codegen/llvmToClangType -split-class=clang::CodeGen::CodeGenFunction@this ${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp -nm=_ZN5clang7CodeGen15CodeGenFunction28registerGlobalDtorWithAtExitERKNS_7VarDeclEPN4llvm8ConstantES7_\")\n//</editor-fold>\npublic final void registerGlobalDtorWithAtExit(final /*const*/ VarDecl /*&*/ VD, \n Constant /*P*/ dtor, \n Constant /*P*/ addr) {\n // Create a function which calls the destructor.\n Constant /*P*/ dtorStub = $this().createAtExitStub(VD, dtor, addr);\n \n // extern \"C\" int atexit(void (*f)(void));\n org.llvm.ir.FunctionType /*P*/ atexitTy = org.llvm.ir.FunctionType.get(IntTy, new ArrayRef<org.llvm.ir.Type /*P*/ >(dtorStub.getType(), true), false);\n \n Constant /*P*/ atexit = $this().CGM.CreateRuntimeFunction(atexitTy, new StringRef(/*KEEP_STR*/\"atexit\"));\n {\n Function /*P*/ atexitFn = dyn_cast_Function(atexit);\n if ((atexitFn != null)) {\n atexitFn.setDoesNotThrow();\n }\n }\n \n $this().EmitNounwindRuntimeCall(atexit, new ArrayRef<Value /*P*/ >(dtorStub, true));\n}",
"public void removeFunction(Address entryPoint);",
"public void destructor()\n//\n////////////////////////////////////////////////////////////////////////\n{\n if (setFunction) state.pop();\n //super.destructor();\n}",
"private native void simpleOnDestroy();",
"private static native boolean shutdown(long pointer);",
"Stub createStub();",
"private native void finalize(long pointer);",
"private static native void hook_del(long handle) throws UnicornException;",
"void exit(String invocationId, Object returnValue);",
"public void exit () {\r\n System.out.println(\"Desligando aplicação...\");\r\n this.stub.killStub();\r\n }",
"private native int close0(int port, int handle, int deRegister);",
"public void close() {\n/* 167 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"public static void bgfx_shutdown() {\n long __functionAddress = Functions.shutdown;\n invokeV(__functionAddress);\n }",
"public interface exitCallBack {\n /**\n *当调用退出软件时,需要做的操作\n */\n public void onExit();\n}",
"private static native void nativeDestroy(long handle) throws UnicornException;",
"public static native void meDestroy(long lpjFbxStatistics);",
"@Test\n public void testShutdownHook() {\n JVMUtils.closeAtShutdown(() -> {\n });\n }",
"default void destroy() {}",
"private native void finaliseHandle();",
"public static native void meDestroy(long lpjFbxLocalTime);",
"public void end() {\n/* 179 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"public abstract void destroy();",
"public static native void Destroy(long lpjFbxDataType);",
"public void destroy() {}",
"public void destroy() {}",
"public static native void destroyHandle();",
"public void tearDown(boolean systemExit) {\n int status = 0;\n \n while (!atExitBlocks.empty()) {\n RubyProc proc = atExitBlocks.pop();\n try {\n proc.call(getCurrentContext(), IRubyObject.NULL_ARRAY);\n } catch (RaiseException rj) {\n RubyException raisedException = rj.getException();\n if (!getSystemExit().isInstance(raisedException)) {\n status = 1;\n printError(raisedException);\n } else {\n IRubyObject statusObj = raisedException.callMethod(\n getCurrentContext(), \"status\");\n if (statusObj != null && !statusObj.isNil()) {\n status = RubyNumeric.fix2int(statusObj);\n }\n }\n }\n }\n \n if (finalizers != null) {\n synchronized (finalizersMutex) {\n for (Iterator<Finalizable> finalIter = new ArrayList<Finalizable>(finalizers.keySet()).iterator(); finalIter.hasNext();) {\n Finalizable f = finalIter.next();\n if (f != null) {\n- f.finalize();\n+ try {\n+ f.finalize();\n+ } catch (Throwable t) {\n+ // ignore\n+ }\n }\n finalIter.remove();\n }\n }\n }\n \n synchronized (internalFinalizersMutex) {\n if (internalFinalizers != null) {\n for (Iterator<Finalizable> finalIter = new ArrayList<Finalizable>(\n internalFinalizers.keySet()).iterator(); finalIter.hasNext();) {\n Finalizable f = finalIter.next();\n if (f != null) {\n- f.finalize();\n+ try {\n+ f.finalize();\n+ } catch (Throwable t) {\n+ // ignore\n+ }\n }\n finalIter.remove();\n }\n }\n }\n \n getThreadService().disposeCurrentThread();\n \n getBeanManager().unregisterCompiler();\n getBeanManager().unregisterConfig();\n getBeanManager().unregisterParserStats();\n getBeanManager().unregisterClassCache();\n getBeanManager().unregisterMethodCache();\n \n if (systemExit && status != 0) {\n throw newSystemExit(status);\n }\n }",
"public void destruct() {\n\t\tif (super.getUsia() == 0) {\n\t\t\t// destructor Singa\n\t\t\tSystem.gc();\n\t\t\ttry {\n\n\t\t\t\tfinalize();\n\t\t\t} catch (Throwable throwable) {\n\t\t\t\tthrowable.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"public void doMyStartupStuffDestroy() {\n System.out.println(\"destroy method\");\n }",
"@Override\n\tpublic void registerDestructionCallback(String name, Runnable callback)\n\t{\n\t}",
"default void cleanup() {}",
"@Override\n\tpublic void registerDestructionCallback(String name, Runnable callback) {\n\n\t}",
"public static void destroy() {\n\t}",
"public void onExit();",
"public int getObjectHandle() {\n/* 72 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"public static void bgfx_destroy_program(@NativeType(\"bgfx_program_handle_t\") short _handle) {\n long __functionAddress = Functions.destroy_program;\n invokeCV(_handle, __functionAddress);\n }",
"private native static void free(long instance);",
"public void destroy() { \n }",
"public static void setDestroyedCallback(final OutputDestroyedCallback cb) {\n\t\tAssert.assertNotNull(cb);\n\n\t\tJWLC.nativeHandler()\n\t\t\t\t.wlc_set_output_destroyed_cb(new handle_callback_void() {\n\n\t\t\t\t\tpublic void callback(Pointer handle) {\n\t\t\t\t\t\tcb.onDestroyed(Output.from(handle));\n\t\t\t\t\t}\n\t\t\t\t});\n\t}",
"default void onDestruct(@Nonnull A annotation, @Nonnull C instance) {\n }",
"public abstract void exit();",
"abstract public void exit();",
"public static native void unexport(int pin) throws RuntimeException;",
"public void mo9198a() {\n nativeDestroyWhenAppropriate(this.f2197b);\n }",
"public native void destroyARX();",
"public abstract void destroy() throws Exception;",
"void destroy();",
"void destroy();",
"void destroy();",
"void destroy();",
"void destroy();",
"void destroy();",
"void destroy();",
"void destroy();",
"void destroy();",
"void destroy();",
"void destroy();",
"void destroy();",
"FunCall createFunCall();",
"public static void bgfx_destroy_indirect_buffer(@NativeType(\"bgfx_indirect_buffer_handle_t\") short _handle) {\n long __functionAddress = Functions.destroy_indirect_buffer;\n invokeCV(_handle, __functionAddress);\n }",
"static final int destroyJavaVM0X(Object throwableObj,\n int isInInitializer) /* hard-coded method signature */\n {\n try\n {\n Thread thread = currentThread();\n VMThread vt;\n if (thread == null || (vt = thread.vmThread) == null || /* hack */\n nonDaemonLock == null || mainVMThread == null ||\n Runtime.getRuntime() == null || ThreadGroup.root == null) /* hack */\n throw new InternalError(\"VMThread class not initialized\");\n if (throwableObj != null)\n {\n if (throwableObj instanceof ThreadDeath)\n throwableObj = null;\n else\n {\n if (!ExitMain.initialized)\n throw new InternalError(\"VMThread class not initialized\");\n Throwable throwable = (Throwable) throwableObj;\n if (isInInitializer != 0 && !(throwable instanceof LinkageError) &&\n !(throwable instanceof VirtualMachineError))\n {\n try\n {\n throwable = new ExceptionInInitializerError(throwable);\n }\n catch (Error e)\n {\n throwable = e;\n }\n }\n printUncaughtException(thread, throwable);\n }\n }\n Thread cleanupThread = null;\n if (hasThreads && !(throwableObj instanceof Error))\n {\n cleanupThread =\n new Thread((VMThread) null, \"VM cleanup\", Thread.NORM_PRIORITY, true)\n {\n \n public void run()\n {\n synchronized (nonDaemonLock)\n {\n while (nonDaemonCnt != 0)\n {\n try\n {\n VMThread.wait(nonDaemonLock, 0L, 0);\n }\n catch (InterruptedException e) {}\n }\n }\n flushSystemOut();\n Runtime.getRuntime().runShutdownHooks();\n flushSystemOut();\n }\n };\n rootGroupAdd(cleanupThread);\n try\n {\n cleanupThread.start();\n }\n catch (OutOfMemoryError e)\n {\n cleanupThread = null;\n }\n }\n if (cleanupThread == null)\n {\n flushSystemOut();\n Runtime.getRuntime().runShutdownHooks();\n flushSystemOut();\n }\n vt.threadStatus = STATE_TERMINATED;\n thread.die();\n if (cleanupThread != null)\n {\n synchronized (vt)\n {\n notify(vt, true);\n }\n try\n {\n cleanupThread.join();\n }\n catch (InterruptedException e) {}\n }\n if (throwableObj != null)\n VMThrowable.exit(254);\n }\n catch (OutOfMemoryError e)\n {\n throw e;\n }\n catch (Error e)\n {\n if (throwableObj instanceof OutOfMemoryError)\n throw (OutOfMemoryError) throwableObj;\n throw e;\n }\n catch (RuntimeException e)\n {\n if (throwableObj instanceof OutOfMemoryError)\n throw (OutOfMemoryError) throwableObj;\n throw (Error) (new InternalError(\"VMThread\")).initCause(e);\n }\n return 0;\n }",
"public void destroy();",
"public void destroy();",
"public void destroy();",
"public void destroy();",
"public void destroy();",
"public void destroy();",
"public void destroy();",
"public void destroy();",
"void cleanup();",
"void cleanup();",
"void cleanup();",
"@Override\n public native boolean cleanup();",
"public void recycle() {\n/* 1835 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"void exitConstruct(ConstructNode node);",
"void exit() throws Exception;",
"@Stub\n\tpublic void after()\n\t{\n\t\t//\n\t}",
"public interface IHelper {\n void destroy();\n}",
"protected void onBSDestroy() {\n mCalled = true;\n }",
"public void destroy ()\n {\n // do nothing\n }",
"public void destructor()\n//\n////////////////////////////////////////////////////////////////////////\n{\n // Free up path\n path.unref();\n\n // The SoDetailList destructor deletes all details in the list, so\n // we don't have to do it here\n}",
"@PreDestroy\n void destroy(InvocationContext ctx) throws Exception {\n SuperclassInterceptorMethodsTest.LIFECYCLE_CALLBACKS.add(\"c\");\n ctx.proceed();\n }",
"@Override\n public void close() {\n this.destructorHandler.close();\n }",
"void onExit();",
"native void nativeClose(long nativeHandler);",
"private native void nativeFinalize();",
"@Override\n\tpublic void destroy() {\n\t\tSystem.out.println(\"destroy\");\n\t}",
"public void unlock() {\n/* 246 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"public void memcached_quit(memcached_st ptr);",
"public void destroy() {\n }",
"public void destroy() {\n }",
"public void xxxtestDestroy() throws Exception\n {\n fail(\"Unimplemented test\");\n }",
"@Test\r\n\tpublic void testEXIT(){\n\t}",
"public void destroy() {\n }",
"public void destroy() {\n }",
"public void destroy() {\n }",
"public void destroy() {\n }",
"public void destroy() {\n }",
"public void destroy() {\n }",
"public void destroy() {\n }"
] | [
"0.57639104",
"0.5547018",
"0.5515339",
"0.5432642",
"0.53477544",
"0.53300613",
"0.52285606",
"0.5213514",
"0.51984376",
"0.5172296",
"0.5153668",
"0.50932",
"0.5090839",
"0.50601536",
"0.5051726",
"0.5041886",
"0.5031887",
"0.50267965",
"0.5021799",
"0.49506038",
"0.4944038",
"0.48837352",
"0.48768768",
"0.4845437",
"0.4845437",
"0.4839634",
"0.48073024",
"0.4795357",
"0.47943896",
"0.47783417",
"0.47625762",
"0.47346318",
"0.47326896",
"0.4709162",
"0.46969792",
"0.46918702",
"0.46863917",
"0.46761337",
"0.46715838",
"0.4663917",
"0.46530402",
"0.4642473",
"0.4635927",
"0.46354884",
"0.46305782",
"0.46288982",
"0.46214062",
"0.46214062",
"0.46214062",
"0.46214062",
"0.46214062",
"0.46214062",
"0.46214062",
"0.46214062",
"0.46214062",
"0.46214062",
"0.46214062",
"0.46214062",
"0.46144858",
"0.46136746",
"0.46071744",
"0.46059275",
"0.46059275",
"0.46059275",
"0.46059275",
"0.46059275",
"0.46059275",
"0.46059275",
"0.46059275",
"0.46008122",
"0.46008122",
"0.46008122",
"0.45953417",
"0.45952365",
"0.45909992",
"0.45885372",
"0.45852116",
"0.45802197",
"0.45782146",
"0.4576844",
"0.45750585",
"0.45713273",
"0.45695397",
"0.45692563",
"0.45682222",
"0.45653427",
"0.45616755",
"0.4561417",
"0.45546627",
"0.4551632",
"0.4551632",
"0.45455536",
"0.45415416",
"0.45392615",
"0.4528257",
"0.4528257",
"0.4528257",
"0.4528257",
"0.4528257",
"0.4528257"
] | 0.56153697 | 1 |
/ Call atexit() with a function that passes the given argument to / the given function. / Register a global destructor using the C atexit runtime function. | @Converted(kind = Converted.Kind.AUTO,
source = "${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp", line = 227,
FQN="clang::CodeGen::CodeGenFunction::registerGlobalDtorWithAtExit", NM="_ZN5clang7CodeGen15CodeGenFunction28registerGlobalDtorWithAtExitERKNS_7VarDeclEPN4llvm8ConstantES7_",
cmd="jclank.sh -java-options=${SPUTNIK}/modules/org.clang.codegen/llvmToClangType -split-class=clang::CodeGen::CodeGenFunction@this ${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp -nm=_ZN5clang7CodeGen15CodeGenFunction28registerGlobalDtorWithAtExitERKNS_7VarDeclEPN4llvm8ConstantES7_")
//</editor-fold>
public final void registerGlobalDtorWithAtExit(final /*const*/ VarDecl /*&*/ VD,
Constant /*P*/ dtor,
Constant /*P*/ addr) {
// Create a function which calls the destructor.
Constant /*P*/ dtorStub = $this().createAtExitStub(VD, dtor, addr);
// extern "C" int atexit(void (*f)(void));
org.llvm.ir.FunctionType /*P*/ atexitTy = org.llvm.ir.FunctionType.get(IntTy, new ArrayRef<org.llvm.ir.Type /*P*/ >(dtorStub.getType(), true), false);
Constant /*P*/ atexit = $this().CGM.CreateRuntimeFunction(atexitTy, new StringRef(/*KEEP_STR*/"atexit"));
{
Function /*P*/ atexitFn = dyn_cast_Function(atexit);
if ((atexitFn != null)) {
atexitFn.setDoesNotThrow();
}
}
$this().EmitNounwindRuntimeCall(atexit, new ArrayRef<Value /*P*/ >(dtorStub, true));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void onExit();",
"void onExit();",
"void onExit(FilterContext ctx)throws SoaException;",
"void exit();",
"public void exit();",
"void cleanup();",
"void cleanup();",
"void cleanup();",
"public abstract void exit();",
"public interface exitCallBack {\n /**\n *当调用退出软件时,需要做的操作\n */\n public void onExit();\n}",
"abstract public void exit();",
"public static void killFinallyWithSystemExit(){\n try {\n System.exit(42);\n } finally {\n System.err.println(\"finally\");\n }\n }",
"void exit() throws Exception;",
"@Override\n\tpublic void onExit() {\n\t\t\n\t}",
"@Override\n\tpublic void exit() {\n\t\t\n\t}",
"@Override\n\tpublic void exit() {\n\t\t\n\t}",
"void exit(String invocationId, Object returnValue);",
"@Override\r\n\tpublic void exit() {\n\r\n\t}",
"default void cleanup() {}",
"@Override\n\tpublic void exit() {\n\n\t}",
"private native void simpleOnDestroy();",
"@Override\r\n\tpublic void exit() {\n\t\t\r\n\t}",
"public void a_exit() {\r\n\t\tSystem.exit(0);\r\n\t}",
"public static final void onExit() {\r\n isShutdown = true;\r\n if (instance != null) {\r\n if (instance.logBase.isInfoEnabled()) {\r\n instance.logBase.info(\"LogUtil.onExit : free singleton : \" + SingletonSupport.getSingletonLogName(instance));\r\n }\r\n\r\n // After the Log4J shutdown, Loggers are no more usable :\r\n\r\n // Release Log4J resources :\r\n Log4JCleaner.shutdown();\r\n\r\n // Classloader unload problem with commons-logging :\r\n LogFactory.release(Thread.currentThread().getContextClassLoader());\r\n // force GC :\r\n instance.log = null;\r\n instance.logBase = null;\r\n instance.logDev = null;\r\n instance.logs.clear();\r\n\r\n // free singleton :\r\n instance = null;\r\n }\r\n\r\n // clean up custom logger instances associated with eclipseLink :\r\n CommonsLoggingSessionLog.onExit();\r\n }",
"public void exit() throws DynamicCallException, ExecutionException{\n call(\"exit\").get();\n }",
"public void cleanup();",
"public static void destroy() {\n\t}",
"public void destructor()\n//\n////////////////////////////////////////////////////////////////////////\n{\n if (setFunction) state.pop();\n //super.destructor();\n}",
"private void exit() {\n dispose();\r\n }",
"@Override\n\t public void onExit() {\n\t\t super.onExit();\n\t }",
"public static void ender()\n{\n\tSystem.exit(0); \n}",
"public static native void meDestroy(long lpjFbxStatistics);",
"public final void destroy() {\n requestExit();\n }",
"@Override\n\tpublic void exit() {\n\t\t//do nothing\n\t}",
"public static native void meDestroy(long lpjFbxLocalTime);",
"static public void callPluginDestroy(Object plugin)\n {\n callSpecialFunc(plugin, \"destroy\");\n }",
"void exit(String page, String uid);",
"public void destruct() {\n\t\tif (super.getUsia() == 0) {\n\t\t\t// destructor Singa\n\t\t\tSystem.gc();\n\t\t\ttry {\n\n\t\t\t\tfinalize();\n\t\t\t} catch (Throwable throwable) {\n\t\t\t\tthrowable.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public void exit() {\n super.exit();\n }",
"@Override\n public void exit(EventObject event)\n {\n shutdown();\n }",
"public void exit () {\r\n System.out.println(\"Desligando aplicação...\");\r\n this.stub.killStub();\r\n }",
"static final int destroyJavaVM0X(Object throwableObj,\n int isInInitializer) /* hard-coded method signature */\n {\n try\n {\n Thread thread = currentThread();\n VMThread vt;\n if (thread == null || (vt = thread.vmThread) == null || /* hack */\n nonDaemonLock == null || mainVMThread == null ||\n Runtime.getRuntime() == null || ThreadGroup.root == null) /* hack */\n throw new InternalError(\"VMThread class not initialized\");\n if (throwableObj != null)\n {\n if (throwableObj instanceof ThreadDeath)\n throwableObj = null;\n else\n {\n if (!ExitMain.initialized)\n throw new InternalError(\"VMThread class not initialized\");\n Throwable throwable = (Throwable) throwableObj;\n if (isInInitializer != 0 && !(throwable instanceof LinkageError) &&\n !(throwable instanceof VirtualMachineError))\n {\n try\n {\n throwable = new ExceptionInInitializerError(throwable);\n }\n catch (Error e)\n {\n throwable = e;\n }\n }\n printUncaughtException(thread, throwable);\n }\n }\n Thread cleanupThread = null;\n if (hasThreads && !(throwableObj instanceof Error))\n {\n cleanupThread =\n new Thread((VMThread) null, \"VM cleanup\", Thread.NORM_PRIORITY, true)\n {\n \n public void run()\n {\n synchronized (nonDaemonLock)\n {\n while (nonDaemonCnt != 0)\n {\n try\n {\n VMThread.wait(nonDaemonLock, 0L, 0);\n }\n catch (InterruptedException e) {}\n }\n }\n flushSystemOut();\n Runtime.getRuntime().runShutdownHooks();\n flushSystemOut();\n }\n };\n rootGroupAdd(cleanupThread);\n try\n {\n cleanupThread.start();\n }\n catch (OutOfMemoryError e)\n {\n cleanupThread = null;\n }\n }\n if (cleanupThread == null)\n {\n flushSystemOut();\n Runtime.getRuntime().runShutdownHooks();\n flushSystemOut();\n }\n vt.threadStatus = STATE_TERMINATED;\n thread.die();\n if (cleanupThread != null)\n {\n synchronized (vt)\n {\n notify(vt, true);\n }\n try\n {\n cleanupThread.join();\n }\n catch (InterruptedException e) {}\n }\n if (throwableObj != null)\n VMThrowable.exit(254);\n }\n catch (OutOfMemoryError e)\n {\n throw e;\n }\n catch (Error e)\n {\n if (throwableObj instanceof OutOfMemoryError)\n throw (OutOfMemoryError) throwableObj;\n throw e;\n }\n catch (RuntimeException e)\n {\n if (throwableObj instanceof OutOfMemoryError)\n throw (OutOfMemoryError) throwableObj;\n throw (Error) (new InternalError(\"VMThread\")).initCause(e);\n }\n return 0;\n }",
"public void doMyStartupStuffDestroy() {\n System.out.println(\"destroy method\");\n }",
"static void exit()\r\n\t {\n\t\t System.exit(0);\r\n\t }",
"void onDFSExit();",
"public void finalize(World world) { }",
"private static void exit(int i) {\n\t\t\n\t}",
"@PreDestroy\n\tpublic void doMyCleanupStfff() {\n\t\tSystem.out.println(\">> TennisCoach: inside of doMyCleanupStuff\");\n\t}",
"default void destroy() {}",
"@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\tSystem.exit(0);\n\t}",
"public boolean deleteOnExit();",
"@Override\n\tpublic void exit() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}",
"public void finish() {\n System.out.println(name + \": Call explicit destroy()\");\n }",
"@PreDestroy\r\n\tpublic void doMyCleanupStuff() {\r\n\t\tSystem.out.println(\">> TennisCoach: inside of doMyCleanupStuff()\");\r\n\t}",
"public Future<Void> exit() throws DynamicCallException, ExecutionException{\n return call(\"exit\");\n }",
"public void memcached_quit_server(memcached_server_st ptr, boolean io_death);",
"public static void exit() {\n\t\t\n\t\t//\tlog out\n\t\tlogout();\n\t\t\n\t\t//\tclean up\n\t\taccountNames.clear();\n\t\taccountsByName.clear();\n\t\tdataProvider = null;\n\t\trememberedUserNames = null;\n\t}",
"abstract void onDestroy();",
"public void exit() {\r\n\t\tdispose();\r\n\t}",
"protected abstract void cleanup();",
"public void tearDown(boolean systemExit) {\n int status = 0;\n \n while (!atExitBlocks.empty()) {\n RubyProc proc = atExitBlocks.pop();\n try {\n proc.call(getCurrentContext(), IRubyObject.NULL_ARRAY);\n } catch (RaiseException rj) {\n RubyException raisedException = rj.getException();\n if (!getSystemExit().isInstance(raisedException)) {\n status = 1;\n printError(raisedException);\n } else {\n IRubyObject statusObj = raisedException.callMethod(\n getCurrentContext(), \"status\");\n if (statusObj != null && !statusObj.isNil()) {\n status = RubyNumeric.fix2int(statusObj);\n }\n }\n }\n }\n \n if (finalizers != null) {\n synchronized (finalizersMutex) {\n for (Iterator<Finalizable> finalIter = new ArrayList<Finalizable>(finalizers.keySet()).iterator(); finalIter.hasNext();) {\n Finalizable f = finalIter.next();\n if (f != null) {\n- f.finalize();\n+ try {\n+ f.finalize();\n+ } catch (Throwable t) {\n+ // ignore\n+ }\n }\n finalIter.remove();\n }\n }\n }\n \n synchronized (internalFinalizersMutex) {\n if (internalFinalizers != null) {\n for (Iterator<Finalizable> finalIter = new ArrayList<Finalizable>(\n internalFinalizers.keySet()).iterator(); finalIter.hasNext();) {\n Finalizable f = finalIter.next();\n if (f != null) {\n- f.finalize();\n+ try {\n+ f.finalize();\n+ } catch (Throwable t) {\n+ // ignore\n+ }\n }\n finalIter.remove();\n }\n }\n }\n \n getThreadService().disposeCurrentThread();\n \n getBeanManager().unregisterCompiler();\n getBeanManager().unregisterConfig();\n getBeanManager().unregisterParserStats();\n getBeanManager().unregisterClassCache();\n getBeanManager().unregisterMethodCache();\n \n if (systemExit && status != 0) {\n throw newSystemExit(status);\n }\n }",
"public static void bgfx_shutdown() {\n long __functionAddress = Functions.shutdown;\n invokeV(__functionAddress);\n }",
"@Override\n\tpublic int exit() {\n\t\treturn 0;\n\t}",
"public void destroy() {}",
"public void destroy() {}",
"public void cleanup() {\r\n }",
"@Override\n\tpublic void onExit() {\n\t\tlabelHelp = null;\n\t\tlayer_force = null;\n\t\tmSoundBtn = null;\n\t\tboxMessage = null;\n\n\t\tSystem.gc();\n\t\tsuper.onExit();\n\t}",
"@Test\n public void testShutdownHook() {\n JVMUtils.closeAtShutdown(() -> {\n });\n }",
"@Override\n public void exitMetas(final ProgramParser.MetasContext ctx) {\n }",
"private static void exit()\n {\n System.out.println(\"Graceful exit\");\n System.exit(0);\n }",
"private static void exit() {\n dvm.exit();\n stop = true;\n }",
"public static void setContextDestroyedCallback(\n\t\t\tfinal OutputContextDestroyedCallback cb) {\n\t\tAssert.assertNotNull(cb);\n\n\t\tJWLC.nativeHandler().wlc_set_output_context_destroyed_cb(\n\t\t\t\tnew handle_callback_void() {\n\n\t\t\t\t\tpublic void callback(Pointer handle) {\n\t\t\t\t\t\tcb.onContextDestroyed(Output.from(handle));\n\t\t\t\t\t}\n\t\t\t\t});\n\t}",
"Node exit();",
"void destroy(HandlerContext context);",
"@Override\n\tpublic void cleanup() {\n\t\t\n\t}",
"@Override\n\tpublic void cleanup() {\n\t\t\n\t}",
"@Override\n\tpublic void cleanup() {\n\t\t\n\t}",
"public void destroy();",
"public void destroy();",
"public void destroy();",
"public void destroy();",
"public void destroy();",
"public void destroy();",
"public void destroy();",
"public void destroy();",
"@Override\r\n public void onCleanup() {\n }",
"private native void finalize(long pointer);",
"public void cleanup() {\n\t}",
"public void cleanup() {\n }",
"@Override\n public void exitObject(final ProgramParser.ObjectContext ctx) {\n }",
"public void memcached_quit(memcached_st ptr);",
"public void destroyOsgi();",
"public void exitPit();",
"private static native void hook_del(long handle) throws UnicornException;",
"void exitConstruct(ConstructNode node);",
"private static void exit(){\n\t\t\n\t\tMain.run=false;\n\t\t\n\t}",
"@Override\n\tpublic void destroy() {\n\t\tSystem.out.println(\"destroy\");\n\t}",
"public static void exiting(Object object) {\n if (!getLogger().isLoggable(Level.FINER)) {\n return;\n }\n FrameInfo fi = getLoggingFrame();\n getLogger().exiting(fi.className, fi.methodName, object);\n }",
"static void goodbye() {\n printGoodbyeMessage();\n System.exit(0);\n }",
"protected void exit() {\n\t\tSystem.exit(0);\n\t}"
] | [
"0.6524555",
"0.63998103",
"0.6206953",
"0.6131773",
"0.6108075",
"0.5963104",
"0.5963104",
"0.5963104",
"0.59434944",
"0.593265",
"0.5882383",
"0.58271164",
"0.58256966",
"0.5797216",
"0.57943517",
"0.57943517",
"0.57874274",
"0.5734675",
"0.5734224",
"0.5731098",
"0.57224894",
"0.57126987",
"0.5710648",
"0.56710535",
"0.5631632",
"0.56100136",
"0.5606533",
"0.55991846",
"0.559255",
"0.5584826",
"0.5557765",
"0.5544622",
"0.5518957",
"0.55064887",
"0.5504682",
"0.547488",
"0.54569036",
"0.5428833",
"0.5425905",
"0.5399937",
"0.5383675",
"0.5380652",
"0.5376866",
"0.53749347",
"0.53657144",
"0.5364744",
"0.53493434",
"0.5346828",
"0.5345952",
"0.53435504",
"0.53391355",
"0.5339046",
"0.5328661",
"0.5315151",
"0.53121513",
"0.53103495",
"0.529928",
"0.5293674",
"0.5288704",
"0.52822244",
"0.52801377",
"0.5275056",
"0.52538323",
"0.5252937",
"0.5252937",
"0.5207557",
"0.51950544",
"0.5191587",
"0.51878655",
"0.518397",
"0.51820046",
"0.5175842",
"0.5163772",
"0.5159649",
"0.515749",
"0.515749",
"0.515749",
"0.51570886",
"0.51570886",
"0.51570886",
"0.51570886",
"0.51570886",
"0.51570886",
"0.51570886",
"0.51570886",
"0.5156667",
"0.51489466",
"0.51468176",
"0.5141128",
"0.51404965",
"0.5137551",
"0.51371086",
"0.51343846",
"0.5130673",
"0.5128719",
"0.5126016",
"0.5122089",
"0.51161164",
"0.51148194",
"0.5112999"
] | 0.6208365 | 2 |
/ Emit code in this function to perform a guarded variable / initialization. Guarded initializations are used when it's not / possible to prove that an initialization will be done exactly / once, e.g. with a static local variable or a static data member / of a class template. | @Converted(kind = Converted.Kind.AUTO,
source = "${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp", line = 245,
FQN="clang::CodeGen::CodeGenFunction::EmitCXXGuardedInit", NM="_ZN5clang7CodeGen15CodeGenFunction18EmitCXXGuardedInitERKNS_7VarDeclEPN4llvm14GlobalVariableEb",
cmd="jclank.sh -java-options=${SPUTNIK}/modules/org.clang.codegen/llvmToClangType -split-class=clang::CodeGen::CodeGenFunction@this ${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp -nm=_ZN5clang7CodeGen15CodeGenFunction18EmitCXXGuardedInitERKNS_7VarDeclEPN4llvm14GlobalVariableEb")
//</editor-fold>
public final void EmitCXXGuardedInit(final /*const*/ VarDecl /*&*/ D,
GlobalVariable /*P*/ DeclPtr,
boolean PerformInit) {
// If we've been asked to forbid guard variables, emit an error now.
// This diagnostic is hard-coded for Darwin's use case; we can find
// better phrasing if someone else needs it.
if ($this().CGM.getCodeGenOpts().ForbidGuardVariables) {
$this().CGM.Error(D.getLocation(),
new StringRef(/*KEEP_STR*/"this initialization requires a guard variable, which the kernel does not support"));
}
$this().CGM.getCXXABI().EmitGuardedInit(/*Deref*/$this(), D, DeclPtr, PerformInit);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private synchronized void makeSureInitialized() {\n if (!initialized) {\n init();\n initialized = true;\n }\n }",
"boolean isOnlyAssignedInInitializer();",
"protected void naiveLazyInitailizaton() {\n\t\tisNaiveInitialized = true;\n\t}",
"void initSafeties(){\n gyroSafety();\n tensorFlowSafety();\n\n telemetry.addLine(\"Init finalized successfully\");\n telemetry.update();\n }",
"protected void initVars() {}",
"public static String lazyInit(){\n\t\tthrow new IllegalStateException(\"Lombok were supposed to inject this variable\");\n\t}",
"public static synchronized void init()\n {\n lazyinit();\n }",
"public void initialize() {\n\t\tloadRaces();\n\t\tloadBets();\n\t\tgenerateRaces(NUMBER_RACES - races.size());\n\t\t\n\t\traces.stream().forEach(race -> {\n\t\t\texecutor.submit(new RaceWorker(race, this));\n\t\t});\n\t\t\n\t\tinitialized = true;\n\t}",
"@Test\n public void testStaticFieldWithInitializationStaticClassKept() throws Exception {\n Class<?> mainClass = MainGetStaticFieldInitialized.class;\n String proguardConfiguration = keepMainProguardConfiguration(\n mainClass,\n ImmutableList.of(\n \"-keep class \" + getJavacGeneratedClassName(StaticFieldInitialized.class) + \" {\",\n \"}\"));\n runTest(\n mainClass,\n ImmutableList.of(mainClass, StaticFieldInitialized.class),\n proguardConfiguration,\n this::checkAllClassesPresentWithDefaultConstructor);\n }",
"private void init() {\n if (placeholder == null) {\n IdentificationManager.getInstance().registerIdentification(this);\n Optional<Identification> identification = IdentificationManager.getInstance().getIdentification(this);\n if (!identification.isPresent()) {\n throw new IllegalStateException(\"Unable to obtain Identification\");\n } else {\n placeholder = identification.get();\n }\n }\n }",
"public void variableInit(HashSet<MJVariable> initialized)\n\t\t\tthrows TypeCheckerException {\n\t\t\n\t\tif (!(this.init instanceof MJNoExpression)) {\n\t\t\tinitialized.add(this);\n\t\t}\n\n\t}",
"protected void ensureIsInitialized() {\n\t\tif (initialized) {\n\t\t\treturn;\n\t\t}\n\t\tencapsulatedObjectValueAccessor = new Accessor<Object>() {\n\n\t\t\tObject object = ErrorOccurrence.tryCatch(new Accessor<Object>() {\n\t\t\t\t@Override\n\t\t\t\tpublic Object get() {\n\t\t\t\t\tinitialObjectValue = null;\n\t\t\t\t\treturn initialObjectValue = loadValue();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t@Override\n\t\t\tpublic Object get() {\n\t\t\t\treturn ErrorOccurrence.rethrow(object);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void set(Object o) {\n\t\t\t\tobject = o;\n\t\t\t}\n\n\t\t};\n\t\tinitialized = true;\n\t}",
"@Override\n\tpublic void initialize() {\n\t\tthis.begin = System.currentTimeMillis();\n\t\taccumulatorController.setState(AccumulatorState.EJECTING);\n\t}",
"private TwoPassPartialConstant(boolean shouldVisitGlobals) {\r\n\t\tthis.shouldVisitGlobals = shouldVisitGlobals;\r\n\t}",
"protected void initialize() {\n\t\tright = left = throttle = turn = forward = 0;\n\t}",
"public void initialize() {\n\t\tinitialize(seedValue0, seedValue1);\n\t}",
"protected void checkInitialized() {\n \tcheckState(this.breeder!=null && this.threads!=null, \"Local state was not correctly set after being deserialized.\");\n }",
"@Test\n public void testStaticFieldWithoutInitializationStaticClassKept() throws Exception {\n Class<?> mainClass = MainGetStaticFieldNotInitialized.class;\n String proguardConfiguration = keepMainProguardConfiguration(\n mainClass,\n ImmutableList.of(\n \"-keep class \" + getJavacGeneratedClassName(StaticFieldNotInitialized.class) + \" {\",\n \"}\"));\n runTest(\n mainClass,\n ImmutableList.of(mainClass, StaticFieldNotInitialized.class),\n proguardConfiguration,\n this::checkAllClassesPresentWithDefaultConstructor);\n }",
"private TwoPassPartialConstant() {\r\n\t\tthis(true);\r\n\t}",
"private zzfl$zzg$zzc() {\n void var3_1;\n void var2_-1;\n void var1_-1;\n this.value = var3_1;\n }",
"private AirforceOne_lazy() {\n }",
"private void initSharedPre() {\n\t}",
"@Override\r\n\tpublic void initVariables() {\n\t\t\r\n\t}",
"private void maybeReportNoInitializer(TokenType token, ParseTree lvalue) {\n if (token == TokenType.CONST) {\n reportError(\"const variables must have an initializer\");\n } else if (lvalue.isPattern()) {\n reportError(\"destructuring must have an initializer\");\n }\n }",
"private EagerInitializedSingleton() {\n\t}",
"private EagerInitializedSingleton() {\n\t}",
"protected void randInitialize(Variable variable) {\n if (variable instanceof Combining) {\n Combining comb = (Combining) variable;\n comb.setValue(pprng.nextInt(comb.getNumberOfAlternatives()));\n } else if (variable instanceof Assigning) {\n //this covers initialization for both assigning and connecting\n Assigning assign = (Assigning) variable;\n for (int i = 0; i < assign.getNumberOfLHS(); i++) {\n for (int j = 0; j < assign.getNumberOfRHS(); j++) {\n if(pprng.nextBoolean())\n assign.connect(i,j);\n }\n }\n// assign.connect(0,0);\n// assign.connect(6,0);\n// assign.connect(7,0);\n// assign.connect(11,0);\n// assign.connect(1,1);\n// assign.connect(6,1);\n// assign.connect(10,1);\n// assign.connect(5,2);\n// assign.connect(6,2);\n// assign.connect(4,3);\n// assign.connect(5,3);\n// assign.connect(11,3);\n// assign.connect(5,4);\n// assign.connect(7,4);\n// assign.connect(8,4);\n// assign.connect(9,4);\n// assign.connect(10,4);\n \n } else {\n System.err.println(\"can not initialize unknown type\");\n }\n }",
"private void init() {\n\t\t\n\t\ttry{\t\t\t\n\t\t\tinfos = new HashMap<String, VariableInfo>();\n\t\t\t\n\t\t\tfor(String var : this.problem.getMyVars()){\n\t\t\t\t\n\t\t\t\tif(this.problem.getNbrNeighbors(var) != 0){ // an isolated variable doesn't need a CryptoScheme and therefore no VariableInfo either\n\t\t\t\t\t\n\t\t\t\t\tVariableInfo info = new VariableInfo(var);\n\t\t\t\t\tinfos.put(var, info);\n\t\t\t\t\t\n\t\t\t\t\tinfo.cs = cryptoConstr.newInstance(this.cryptoParameter);\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//initialize request counter for my own variables\n\t\t\trequestCount = new HashMap<String,Integer>(); \n\t\t\tfor(String var : this.problem.getMyVars()){\n\t\t\t\trequestCount.put(var, 0);\n\t\t\t}\n\t\t\t\n\t\t\tthis.started = true;\t\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\t\t\n\t}",
"protected void initialize() {\n\t\televator.zeroEncoder();\n\t}",
"private EagerInitializationSingleton() {\n\t}",
"@EnsuresNonNull({\"field2\", \"field3\"})\n private void init_other_fields(@UnderInitialization(MyClass.class) MyClass this) {\n field2 = new Object();\n field3 = new Object();\n }",
"@SuppressWarnings(\"UnusedDeclaration\")\n public static void __staticInitializer__() {\n }",
"protected void initializeExecutionRandomness() {\r\n\r\n\t}",
"private EagerInitilization(){}",
"private void checkInitialization()\n {\n if (!initialized)\n throw new SecurityException(\"ArrayBag object is not initialized \" +\n \"properly.\");\n }",
"protected void initialize() {\n \t// literally do nothing\n }",
"public void initialize() {\n //TODO: Initialization steps\n\n initialized = true;\n }",
"static boolean isInitializing()\n\t{\n\t\treturn INITIALIZING.get();\n\t}",
"public void init() {\n\t\t\n\t\t\n\t\tprepareGaborFilterBankConcurrent();\n\t\t\n\t\tprepareGaborFilterBankConcurrentEnergy();\n\t}",
"default void acquirePermit() {\n acquirePermits(1);\n }",
"private ConsistentVariable(String name, Class<V> type, V initValue, long initVersion) {\n super(name, type);\n versionedValue = new AtomicReference<>(new VersionedValue<>(initVersion, initValue));\n }",
"private void checkInitialization()\n {\n if (!initialized)\n throw new SecurityException(\"VectorStack object is not initialized \" +\n \"properly.\");\n }",
"public void disabledInit()\n\t{\n\t\t\n\t}",
"private void checkInitialization()\n {\n if (!initialized)\n throw new SecurityException(\"ArrayQueue object is corrupt.\");\n }",
"public void initialize() {\r\n\t\tsetValue(initialValue);\r\n\t}",
"public void performInitialisation() {\n \t\t// subclasses can override the behaviour for this method\n \t}",
"public static void randomInit(int r) { }",
"private void initValues() {\n \n }",
"private void forInit(Modifier x, Scope scope, Vector queue)\r\n {\r\n if (isLocalVarDecl(true))\r\n localVariableDeclaration(new Modifier(x), scope, queue);\r\n else\r\n {\r\n Operation ret = moreStatementExpression(statementExpression(scope, queue), scope, queue);\r\n\r\n while(ret != null)\r\n {\r\n if (ret.left != null)\r\n queue.add(ret.left);\r\n\r\n ret = ret.right;\r\n\r\n Operation ptr = new Operation();\r\n ptr.operator = Keyword.CLEARSY;\r\n queue.add(ptr);\r\n }\r\n }\r\n }",
"private static void init() {\n\t\tguess = 0;\n\t\ttries = 10;\n\t\tlen = Random.getRand(4, 8);\n\t\tcorrectGuesses = 0;\n\t\twordGen = new RandomWordGenerator(len);\n\t\twordGen.generate();\n\t\tword = wordGen.getWord();\n\t\tguessesResult = new boolean[word.length()];\n\n\t}",
"@Override // java.lang.ThreadLocal\n public final C02370if initialValue() {\n return new C02370if();\n }",
"public void initialize() {\n\t\tString alphabet = \"abcdefghijklmnopqrstuvwxyz\";\n\t\tint N = alphabet.length();\n\n\t\tRandom r = new Random();\n\t\tString key = \"\";\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\tkey+= alphabet.charAt(r.nextInt(N));\n\t\t}\n\t\tthis.key = key;\n\t}",
"public void startExecuting()\n {\n field_46102_e = 40 + field_46105_a.getRNG().nextInt(40);\n }",
"private void ensureInitialized() {\n if (mIncludes == null) {\n // Initialize\n if (!readSettings()) {\n // Couldn't read settings: probably the first time this code is running\n // so there is no known data about includes.\n\n // Yes, these should be multimaps! If we start using Guava replace\n // these with multimaps.\n mIncludes = new HashMap<String, List<String>>();\n mIncludedBy = new HashMap<String, List<String>>();\n\n scanProject();\n saveSettings();\n }\n }\n }",
"private static void Initialize()\n\t{\n\t\tcurrentPC = 3996;\n\t\tcurrentFilePointer = 0;\n\t\tmemoryBlocks = new int[4000];\n\t\tregisterFile = new HashMap<String, Integer>();\n\t\tstages = new HashMap<String, Instruction>();\n\t\tlatches = new HashMap<String, Instruction>();\n\t\tspecialRegister = 0;\n\t\tisComplete = false;\n\t\tisValidSource = true;\n\t\tSystem.out.println(\"-----Initialization Completed------\");\n\t}",
"public boolean initialized() {\n return true;\r\n }",
"@Override\n\tpublic double initialize() {\n\n\t\treturn calculate();\n\t\t\n\t}",
"public void initialize() throws IllegalActionException {\n\t\tsuper.initialize();\n\n\t\tlong seedValue = ((LongToken) (seed.getToken())).longValue();\n\n\t\tif (seedValue != 0) {\n\t\t\t_random.setSeed(seedValue);\n\t\t} else {\n\t\t\t_random.setSeed(System.currentTimeMillis() + hashCode());\n\t\t}\n\t}",
"public void init()\r\n {\r\n ;\r\n }",
"public void autonomousInit() {\n }",
"public void autonomousInit() {\n }",
"protected void init()\n {\n crypterString = crypterLong = crypterDouble = crypterBytes = new MauiCrypterEngineNull();\n }",
"protected static boolean isInitialized(){\n return initialized;\n }",
"public static void init() {}",
"@Override\n public boolean visit(VariableDeclarationFragment node) {\n Expression initializer = node.getInitializer();\n VariableElement var = node.getVariableElement();\n if (initializer != null) {\n initializer.accept(this);\n handleRetainedLocal(var, node.getInitializer());\n }\n if (!var.asType().getKind().isPrimitive()) {\n retainedLocalCandidates.add(var);\n }\n return false;\n }",
"private void checkInitialization()\r\n\t{\r\n\t\tif ( !initialized )\r\n\t\t{\r\n\t\t\tthrow new SecurityException( \"Calculator is not properly initialized.\" );\r\n\t\t}//end if\r\n\t}",
"public void autonomousInit() {\n \n }",
"public MathEval setVariableRequired(boolean val) {\r\n relaxed=(!val);\r\n return this;\r\n }",
"private void _init() {\n }",
"public static void initial(){\n\t}",
"public void initialAssignment(Agent owner, int forces){\n this.owner = owner;\n this.troops = forces;\n inGameInvariant(); //A game has begun. Start enforcing the invariant.\n }",
"static void setInitializing(boolean initFlag)\n\t{\n\t\tINITIALIZING.set(initFlag);\n\t}",
"private RandomData() {\n initFields();\n }",
"public void disabledInit(){\n\n }",
"public void disabledInit(){\n\n }",
"public void disabledInit(){\n\n }",
"public void disabledInit(){\n\n }",
"public void disabledInit(){\n\n }",
"public int getInitialValue()\n {\n return _init;\n }",
"public void init() {\n synchronized(lock) {\n if(set != null) throw new IllegalStateException(\"already initialized\");\n set = new MySet();\n }\n }",
"private boolean initializationRule(\r\n\t\t\tfinal List<Rule> sequence, \r\n\t\t\tfinal Graph g) {\r\n\t\t\r\n\t\tboolean result = sequence.isEmpty();\r\n\t\tif (result) {\r\n\t\t\tsetApplicabilityResult(true, ApplicabilityConstants.INITIALIZATION);\r\n\t\t} else {\r\n\t\t\tfinal Rule r = sequence.get(0);\r\n\t\t\t\r\n\t\t\tfinal Pair<Boolean, List<String>> \r\n\t\t\truleRes = this.ruleSequence.getRuleResult(0, r.getName(), ApplicabilityConstants.INITIALIZATION);\r\n\t\t\tif (ruleRes != null) {\r\n\t\t\t\tresult = ruleRes.first.booleanValue();\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif (g != null) {\r\n\t\t\t\t\tresult = initializationCheck(0, r, g);\t\r\n\t\t\t\t} else {\r\n\t\t\t\t\tresult = true; // TODO: implementation\t\t\t\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (result) {\r\n\t\t\t\tSystem.out.println(\"=== >>> ApplicabilityChecker.initialization: rule: \"+r.getName()+\" applicable\");\r\n\t\t\t\tsetApplicabilityResult(true, ApplicabilityConstants.INITIALIZATION);\t\t\t\t\r\n\t\t\t\tsetNonApplicabilityResult(false, ApplicabilityConstants.INITIALIZATION_ERROR);\r\n\t\t\t\t\r\n\t\t\t\tsetRuleResult(0, r.getName(), true, ApplicabilityConstants.INITIALIZATION, \"\");\t\t\r\n\t\t\t\tsetRuleResult(0, r.getName(), false, ApplicabilityConstants.INITIALIZATION_ERROR, \"\");\r\n\t\t\t} else {\r\n\t\t\t\tsetApplicabilityResult(false, ApplicabilityConstants.INITIALIZATION);\r\n\t\t\t\tsetNonApplicabilityResult(true, ApplicabilityConstants.INITIALIZATION_ERROR);\r\n\t\t\t\t\r\n\t\t\t\tsetRuleResult(0, r.getName(), false, ApplicabilityConstants.INITIALIZATION, \"\");\t\t\t\t\r\n\t\t\t\tsetRuleResult(0, r.getName(), true, ApplicabilityConstants.INITIALIZATION_ERROR, \"\");\r\n\t\t\t} \r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"protected void initialize() {\n\t\tint position = Robot.wrist.getCurrentPosition();\n\t\tSystem.out.println(\"Wrist position: \" + position);\n\t\tif (position < safePosition) {\n\t\t\tisSafe = false;\n\t\t\tRobot.wrist.setTargetPosition(homePosition);\n\t\t} else {\n\t\t\tisSafe = true;\n\t\t}\n\t\tSystem.out.println(\"Wrist is safe: \" + isSafe);\n\t}",
"protected void initialize() {\n \twrist.rotateWrist(0);\n }",
"public void autonomousInit() {\n\t\t\n\t}",
"public void init () {\n\t\tshaderProgram.addUniform(TEXTURE_UNIFORM_KEY);\n\t\tshaderProgram.addUniform(SCALING_UNIFORM_KEY);\n\t\tshaderProgram.addUniform(TRANSLATION_UNIFORM_KEY);\n\t\tshaderProgram.addUniform(POSITION_UNIFORM_KEY);\n\t}",
"@objid (\"4bb3363c-38e1-48f1-9894-6dceea1f8d66\")\n public void init() {\n }",
"void doDummyComputation() {\n\t\tlong dummyValue = 0;\n\t\t// We use a random number and a subsequent check to avoid smart\n\t\t// compilers\n\t\tRandom rand = new Random();\n\t\tint seed = rand.nextInt(10) + 1;\n\t\tfor (int i = 0; i < 10000000; i++) {\n\t\t\tdummyValue = 10 + ((31 * (dummyValue + seed)) % 1234567);\n\t\t}\n\t\tif (dummyValue < 10) {\n\t\t\tthrow new RuntimeException(\n\t\t\t\t\t\"This never happens, but let's pretend the value matters to avoid this being complied away.\");\n\t\t}\n\t\ttry {\n\t\t\tThread.sleep(50);\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 final void initialize() {\n initialize(0);\n }",
"private DiscretePotentialOperations() {\r\n\t}",
"@Override\n\tpublic synchronized void init() {\n\t}",
"public void initialiseValues() {\n\t\tif (validationRule == null) { // NOSONAR\n\t\t\tvalidationRule = Optional.empty();\n\t\t}\n\t}",
"private SingletonDoubleCheck() {}",
"private void init(){\n \tdimension.set(0.5f, 0.5f);\n \tsetAnimation(Assets.instance.goldCoin.animGoldCoin);\n \tstateTime = MathUtils.random(0.0f,1.0f);\n \t\n \t//regGoldCoin = Assets.instance.goldCoin.goldCoin;\n \t // Set bounding box for collision detection\n \tbounds.set(0,0,dimension.x, dimension.y);\n \tcollected = false;\n }",
"String generateRuntimeInitialization();",
"@Override\n public boolean visit(JsPropertyInitializer x,\n JsContext<JsPropertyInitializer> ctx) {\n x.setValueExpr(accept(x.getValueExpr()));\n return false;\n }",
"String getInitCond();",
"abstract public boolean init();",
"@Override\n public void initialize() {\n counter = 0;\n }",
"@Override\n public void initialize() {\n counter = 0;\n }",
"private void checkVanillaForInitializers(VariableDeclarationListTree variables) {\n for (VariableDeclarationTree declaration : variables.declarations) {\n if (declaration.initializer == null) {\n maybeReportNoInitializer(variables.declarationType, declaration.lvalue);\n }\n }\n }"
] | [
"0.6099803",
"0.56746936",
"0.55990624",
"0.549648",
"0.54719",
"0.52297366",
"0.52159965",
"0.52011955",
"0.5195153",
"0.51858604",
"0.5150535",
"0.5123601",
"0.50677556",
"0.50608295",
"0.5052104",
"0.5030015",
"0.50167185",
"0.496827",
"0.49306926",
"0.49092624",
"0.48985842",
"0.48922342",
"0.48779798",
"0.48755673",
"0.48733735",
"0.48733735",
"0.48728517",
"0.48725614",
"0.486468",
"0.4842188",
"0.48417276",
"0.48221153",
"0.47976136",
"0.47969484",
"0.47829172",
"0.47809252",
"0.47726765",
"0.47614938",
"0.47608903",
"0.47360185",
"0.47227252",
"0.47191694",
"0.47076404",
"0.4685839",
"0.46723405",
"0.4659088",
"0.46464124",
"0.46410167",
"0.46330354",
"0.46287245",
"0.46223503",
"0.4616254",
"0.46080008",
"0.4602098",
"0.45993477",
"0.45897034",
"0.4572618",
"0.4570881",
"0.4556658",
"0.45414957",
"0.45414957",
"0.45371154",
"0.4533613",
"0.45324826",
"0.4525341",
"0.4516615",
"0.4499613",
"0.44956425",
"0.44802317",
"0.44722134",
"0.44658327",
"0.44650614",
"0.44632787",
"0.4461562",
"0.4461562",
"0.4461562",
"0.4461562",
"0.4461562",
"0.44554695",
"0.4453476",
"0.44514114",
"0.4448692",
"0.44462156",
"0.4444049",
"0.4442792",
"0.4441418",
"0.44365886",
"0.4435109",
"0.4433773",
"0.4433503",
"0.4432818",
"0.4432227",
"0.44313434",
"0.4427421",
"0.44272247",
"0.44267422",
"0.4423323",
"0.441535",
"0.441535",
"0.4412146"
] | 0.5708255 | 1 |
/ GenerateCXXGlobalInitFunc Generates code for initializing global / variables. | @Converted(kind = Converted.Kind.AUTO,
source = "${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp", line = 522,
FQN="clang::CodeGen::CodeGenFunction::GenerateCXXGlobalInitFunc", NM="_ZN5clang7CodeGen15CodeGenFunction25GenerateCXXGlobalInitFuncEPN4llvm8FunctionENS2_8ArrayRefIS4_EENS0_7AddressE",
cmd="jclank.sh -java-options=${SPUTNIK}/modules/org.clang.codegen/llvmToClangType -split-class=clang::CodeGen::CodeGenFunction@this ${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp -nm=_ZN5clang7CodeGen15CodeGenFunction25GenerateCXXGlobalInitFuncEPN4llvm8FunctionENS2_8ArrayRefIS4_EENS0_7AddressE")
//</editor-fold>
public final void GenerateCXXGlobalInitFunc(Function /*P*/ Fn,
ArrayRef<Function /*P*/ > Decls) {
GenerateCXXGlobalInitFunc(Fn,
Decls,
Address.invalid());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp\", line = 495,\n FQN=\"clang::CodeGen::CodeGenFunction::GenerateCXXGlobalVarDeclInitFunc\", NM=\"_ZN5clang7CodeGen15CodeGenFunction32GenerateCXXGlobalVarDeclInitFuncEPN4llvm8FunctionEPKNS_7VarDeclEPNS2_14GlobalVariableEb\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.clang.codegen/llvmToClangType -split-class=clang::CodeGen::CodeGenFunction@this ${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp -nm=_ZN5clang7CodeGen15CodeGenFunction32GenerateCXXGlobalVarDeclInitFuncEPN4llvm8FunctionEPKNS_7VarDeclEPNS2_14GlobalVariableEb\")\n//</editor-fold>\npublic final void GenerateCXXGlobalVarDeclInitFunc(Function /*P*/ Fn, \n /*const*/ VarDecl /*P*/ D, \n GlobalVariable /*P*/ Addr, \n boolean PerformInit) {\n JavaCleaner $c$ = $createJavaCleaner();\n try {\n // Check if we need to emit debug info for variable initializer.\n if (D.hasAttr(NoDebugAttr.class)) {\n $this().DebugInfo = null; // disable debug info indefinitely for this function\n }\n \n $this().CurEHLocation.$assignMove(D.getLocStart());\n \n $this().StartFunction(new GlobalDecl(D), $this().getContext().VoidTy.$QualType(), Fn, \n $this().getTypes().arrangeNullaryFunction(), \n $c$.track(new FunctionArgList()), D.getLocation(), \n D.getInit$Const().getExprLoc()); $c$.clean();\n \n // Use guarded initialization if the global variable is weak. This\n // occurs for, e.g., instantiated static data members and\n // definitions explicitly marked weak.\n if (Addr.hasWeakLinkage() || Addr.hasLinkOnceLinkage()) {\n $this().EmitCXXGuardedInit($Deref(D), Addr, PerformInit);\n } else {\n $this().EmitCXXGlobalVarDeclInit($Deref(D), Addr, PerformInit);\n }\n \n $this().FinishFunction();\n } finally {\n $c$.$destroy();\n }\n}",
"String generateRuntimeInitialization();",
"void initGlobalAttributes() {\n\n\t}",
"void initGlobals(EvalContext context, HashMap globals)\n throws EvaluationException\n {\n if (predefined != null)\n predefined.initGlobals(context, globals);\n\n for (int g = 0, G = declarations.size(); g < G; g++)\n {\n if (declarations.get(g) instanceof ModuleImport) {\n ModuleImport mimport = (ModuleImport) declarations.get(g);\n ModuleContext module = mimport.imported;\n // recursive descent to imported modules.\n // CAUTION lock modules to avoid looping on circular imports\n // Hmmm well, circular imports are no more allowed anyway...\n if (globals.get(module) == null) { // not that beautiful but\n globals.put(module, module);\n module.initGlobals(context, globals);\n globals.remove(module);\n }\n }\n }\n \n // Globals added by API in context are not declared: do it first\n for (Iterator iter = globalMap.values().iterator(); iter.hasNext();) {\n GlobalVariable var = (GlobalVariable) iter.next();\n XQValue init = (XQValue) globals.get(var.name);\n \n if(init == null)\n continue;\n // unfortunately required:\n init = init.bornAgain();\n // check the type if any\n if(var.declaredType != null)\n init = init.checkTypeExpand(var.declaredType, context, \n false, true);\n context.setGlobal(var, init);\n }\n \n //\n for (int g = 0, G = declarations.size(); g < G; g++)\n {\n if (!(declarations.get(g) instanceof GlobalVariable))\n continue;\n GlobalVariable var = (GlobalVariable) declarations.get(g);\n XQType declaredType = var.declaredType;\n curInitVar = var;\n if (var.init != null) {\n XQValue v = var.init.eval(null, context);\n try { // expand with type checking\n v = v.checkTypeExpand(declaredType, context, false, true);\n if (v instanceof ErrorValue)\n context.error(Expression.ERRC_BADTYPE,\n var.init, \n ((ErrorValue) v).getReason());\n }\n catch (XQTypeException tex) {\n context.error(var, tex);\n }\n context.setGlobal(var, v);\n curInitVar = null;\n }\n\n QName gname = var.name;\n // is there a value specified externally? \n // use the full q-name of the variable\n // (possible issue if $local:v allowed in modules)\n Object initValue = globals.get(gname);\n XQValue init = null;\n if(initValue instanceof ResultSequence) {\n ResultSequence seq = (ResultSequence) initValue;\n init = seq.getValues();\n }\n else \n init = (XQValue) initValue;\n\n // glitch for compatibility: if $local:var, look for $var\n if (init == null && \n gname.getNamespaceURI() == NamespaceContext.LOCAL_NS) {\n QName redName = IQName.get((gname.getLocalPart()));\n init = (XQValue) globals.get(redName);\n }\n if (init == null) {\n // - System.err.println(\"no extern init for \"+global.name);\n continue;\n }\n init = init.bornAgain(); // in case several executions\n if (declaredType != null) {\n try { // here we can promote: it helps with string values\n init =\n init.checkTypeExpand(declaredType, context, true,\n true);\n if (init instanceof ErrorValue)\n context.error(Expression.ERRC_BADTYPE, var,\n ((ErrorValue) init).getReason());\n }\n catch (XQTypeException tex) {\n context.error(var, tex);\n }\n }\n context.setGlobal(var, init);\n }\n }",
"public void setGlobalVariables(GlobalVariables globalVariables);",
"public final GlobalVariable global_variable() throws RecognitionException {\r\n GlobalVariable globalVariable = null;\r\n\r\n\r\n Token GLOBAL_VARIABLE7=null;\r\n Token LINKAGE8=null;\r\n Type derived_type9 =null;\r\n\r\n Constant initializer10 =null;\r\n\r\n String section11 =null;\r\n\r\n int align12 =0;\r\n\r\n\r\n\r\n String name;\r\n String linkage = null;\r\n boolean isThreadLocal = false;\r\n boolean isConstant = false;\r\n Type type = null; \r\n Constant initializer = null;\r\n String section = null;\r\n int align = -1;\r\n\r\n try {\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:70:5: ( GLOBAL_VARIABLE '=' ( LINKAGE )? ( 'thread_local' )? ( 'global' | 'constant' ) derived_type ( initializer ( ',' section )? ( ',' align )? )? )\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:71:5: GLOBAL_VARIABLE '=' ( LINKAGE )? ( 'thread_local' )? ( 'global' | 'constant' ) derived_type ( initializer ( ',' section )? ( ',' align )? )?\r\n {\r\n GLOBAL_VARIABLE7=(Token)match(input,GLOBAL_VARIABLE,FOLLOW_GLOBAL_VARIABLE_in_global_variable261); \r\n\r\n name = (GLOBAL_VARIABLE7!=null?GLOBAL_VARIABLE7.getText():null); name = name.substring(1, name.length());\r\n\r\n match(input,47,FOLLOW_47_in_global_variable270); \r\n\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:72:9: ( LINKAGE )?\r\n int alt6=2;\r\n int LA6_0 = input.LA(1);\r\n\r\n if ( (LA6_0==LINKAGE) ) {\r\n alt6=1;\r\n }\r\n switch (alt6) {\r\n case 1 :\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:72:10: LINKAGE\r\n {\r\n LINKAGE8=(Token)match(input,LINKAGE,FOLLOW_LINKAGE_in_global_variable273); \r\n\r\n linkage = (LINKAGE8!=null?LINKAGE8.getText():null);\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:73:5: ( 'thread_local' )?\r\n int alt7=2;\r\n int LA7_0 = input.LA(1);\r\n\r\n if ( (LA7_0==86) ) {\r\n alt7=1;\r\n }\r\n switch (alt7) {\r\n case 1 :\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:73:6: 'thread_local'\r\n {\r\n match(input,86,FOLLOW_86_in_global_variable285); \r\n\r\n isThreadLocal= true;\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:74:5: ( 'global' | 'constant' )\r\n int alt8=2;\r\n int LA8_0 = input.LA(1);\r\n\r\n if ( (LA8_0==67) ) {\r\n alt8=1;\r\n }\r\n else if ( (LA8_0==58) ) {\r\n alt8=2;\r\n }\r\n else {\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 8, 0, input);\r\n\r\n throw nvae;\r\n\r\n }\r\n switch (alt8) {\r\n case 1 :\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:74:6: 'global'\r\n {\r\n match(input,67,FOLLOW_67_in_global_variable297); \r\n\r\n }\r\n break;\r\n case 2 :\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:74:17: 'constant'\r\n {\r\n match(input,58,FOLLOW_58_in_global_variable301); \r\n\r\n isConstant = true;\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n pushFollow(FOLLOW_derived_type_in_global_variable311);\r\n derived_type9=derived_type();\r\n\r\n state._fsp--;\r\n\r\n\r\n type = derived_type9;\r\n\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:76:5: ( initializer ( ',' section )? ( ',' align )? )?\r\n int alt11=2;\r\n int LA11_0 = input.LA(1);\r\n\r\n if ( (LA11_0==BINARY_OP||LA11_0==BOOLEAN||LA11_0==CONVERSION_OP||LA11_0==FLOATING_POINT||LA11_0==HEX||LA11_0==INTEGER||LA11_0==NULL||LA11_0==46||LA11_0==49||LA11_0==56||(LA11_0 >= 65 && LA11_0 <= 66)||LA11_0==68||(LA11_0 >= 92 && LA11_0 <= 93)) ) {\r\n alt11=1;\r\n }\r\n else if ( (LA11_0==GLOBAL_VARIABLE) ) {\r\n int LA11_2 = input.LA(2);\r\n\r\n if ( (LA11_2==GLOBAL_VARIABLE||LA11_2==44||(LA11_2 >= 60 && LA11_2 <= 61)) ) {\r\n alt11=1;\r\n }\r\n }\r\n switch (alt11) {\r\n case 1 :\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:76:6: initializer ( ',' section )? ( ',' align )?\r\n {\r\n pushFollow(FOLLOW_initializer_in_global_variable320);\r\n initializer10=initializer();\r\n\r\n state._fsp--;\r\n\r\n\r\n initializer = initializer10;\r\n\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:77:7: ( ',' section )?\r\n int alt9=2;\r\n int LA9_0 = input.LA(1);\r\n\r\n if ( (LA9_0==44) ) {\r\n int LA9_1 = input.LA(2);\r\n\r\n if ( (LA9_1==SECTION) ) {\r\n alt9=1;\r\n }\r\n }\r\n switch (alt9) {\r\n case 1 :\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:77:8: ',' section\r\n {\r\n match(input,44,FOLLOW_44_in_global_variable332); \r\n\r\n pushFollow(FOLLOW_section_in_global_variable334);\r\n section11=section();\r\n\r\n state._fsp--;\r\n\r\n\r\n section = section11;\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:79:7: ( ',' align )?\r\n int alt10=2;\r\n int LA10_0 = input.LA(1);\r\n\r\n if ( (LA10_0==44) ) {\r\n alt10=1;\r\n }\r\n switch (alt10) {\r\n case 1 :\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:79:8: ',' align\r\n {\r\n match(input,44,FOLLOW_44_in_global_variable355); \r\n\r\n pushFollow(FOLLOW_align_in_global_variable357);\r\n align12=align();\r\n\r\n state._fsp--;\r\n\r\n\r\n align = align12;\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n globalVariable = valueFactory.createGlobalVariable(name, linkage, isThreadLocal, isConstant, type, \r\n initializer, section, align);\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n return globalVariable;\r\n }",
"public GlobalVariable() {\n }",
"public /*static*/ native void init();",
"void initFunDecl() {\n\t\t_localVarID = 0;\r\n\t\t_labelID = 0;\r\n\t\t_tempVarID = 32;\r\n\t\t_lsymtable.clear();\r\n\t}",
"public static void init() {\n FunctionRegistry reg = new FunctionRegistry() ;\n ARQFunctions.load(reg);\n StandardFunctions.loadStdDefs(reg) ;\n StandardFunctions.loadOtherDefs(reg) ;\n set(ARQ.getContext(), reg) ;\n }",
"void init() {\n\t\tinitTypes();\n\t\tinitGlobalFunctions();\n\t\tinitFunctions();\n\t\tinitClasses();\n\t}",
"private static native void init();",
"protected native void init();",
"public static void init() {}",
"public void setGlobalVariables(GlobalVariables globalVariables) {\n this.globalVariables = globalVariables;\n }",
"@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp\", line = 245,\n FQN=\"clang::CodeGen::CodeGenFunction::EmitCXXGuardedInit\", NM=\"_ZN5clang7CodeGen15CodeGenFunction18EmitCXXGuardedInitERKNS_7VarDeclEPN4llvm14GlobalVariableEb\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.clang.codegen/llvmToClangType -split-class=clang::CodeGen::CodeGenFunction@this ${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp -nm=_ZN5clang7CodeGen15CodeGenFunction18EmitCXXGuardedInitERKNS_7VarDeclEPN4llvm14GlobalVariableEb\")\n//</editor-fold>\npublic final void EmitCXXGuardedInit(final /*const*/ VarDecl /*&*/ D, \n GlobalVariable /*P*/ DeclPtr, \n boolean PerformInit) {\n // If we've been asked to forbid guard variables, emit an error now.\n // This diagnostic is hard-coded for Darwin's use case; we can find\n // better phrasing if someone else needs it.\n if ($this().CGM.getCodeGenOpts().ForbidGuardVariables) {\n $this().CGM.Error(D.getLocation(), \n new StringRef(/*KEEP_STR*/\"this initialization requires a guard variable, which the kernel does not support\"));\n }\n \n $this().CGM.getCXXABI().EmitGuardedInit(/*Deref*/$this(), D, DeclPtr, PerformInit);\n}",
"public Global() {\r\n }",
"private static native long init();",
"private void initialize() {//GEN-END:|0-initialize|0|0-preInitialize\n // write pre-initialize user code here\n//GEN-LINE:|0-initialize|1|0-postInitialize\n // write post-initialize user code here\n }",
"private void initialize() {//GEN-END:|0-initialize|0|0-preInitialize\n // write pre-initialize user code here\n//GEN-LINE:|0-initialize|1|0-postInitialize\n // write post-initialize user code here\n }",
"@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp\", line = 574,\n FQN=\"clang::CodeGen::CodeGenFunction::GenerateCXXGlobalDtorsFunc\", NM=\"_ZN5clang7CodeGen15CodeGenFunction26GenerateCXXGlobalDtorsFuncEPN4llvm8FunctionERKSt6vectorISt4pairINS2_6WeakVHEPNS2_8ConstantEESaISA_EE\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.clang.codegen/llvmToClangType -split-class=clang::CodeGen::CodeGenFunction@this ${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp -nm=_ZN5clang7CodeGen15CodeGenFunction26GenerateCXXGlobalDtorsFuncEPN4llvm8FunctionERKSt6vectorISt4pairINS2_6WeakVHEPNS2_8ConstantEESaISA_EE\")\n//</editor-fold>\npublic final void GenerateCXXGlobalDtorsFunc(Function /*P*/ Fn, \n final /*const*/std.vector<std.pair<WeakVH, Constant /*P*/ >> /*&*/ DtorsAndObjects) {\n {\n ApplyDebugLocation NL = null;\n ApplyDebugLocation AL = null;\n JavaCleaner $c$ = $createJavaCleaner();\n try {\n NL = ApplyDebugLocation.CreateEmpty(/*Deref*/$this());\n $this().StartFunction(new GlobalDecl(), $this().getContext().VoidTy.$QualType(), Fn, \n $this().getTypes().arrangeNullaryFunction(), $c$.track(new FunctionArgList())); $c$.clean();\n // Emit an artificial location for this function.\n AL = ApplyDebugLocation.CreateArtificial(/*Deref*/$this());\n \n // Emit the dtors, in reverse order from construction.\n for (/*uint*/int i = 0, e = DtorsAndObjects.size(); i != e; ++i) {\n Value /*P*/ Callee = DtorsAndObjects.$at$Const(e - i - 1).first.$Value$P();\n CallInst /*P*/ CI = $this().Builder.CreateCall_Value$P_ArrayRef$Value$P_Twine$C_MDNode$P(Callee, \n new ArrayRef<Value /*P*/ >(DtorsAndObjects.$at$Const(e - i - 1).second, true));\n {\n // Make sure the call and the callee agree on calling convention.\n Function /*P*/ F = dyn_cast_Function(Callee);\n if ((F != null)) {\n CI.setCallingConv(F.getCallingConv());\n }\n }\n }\n } finally {\n if (AL != null) { AL.$destroy(); }\n if (NL != null) { NL.$destroy(); }\n $c$.$destroy();\n }\n }\n \n $this().FinishFunction();\n}",
"private void initialize () {//GEN-END:|0-initialize|0|0-preInitialize\n // write pre-initialize user code here\n//GEN-LINE:|0-initialize|1|0-postInitialize\n // write post-initialize user code here\n}",
"static void init() {}",
"public Global() {\n }",
"private void addGlobalNodes() {\n for (Procedure proc : globalProcSet) {\n CFGraph cfg = cfgMap.get(proc);\n// System.out.println(\"ExitNode Size: \" + cfg.getExitNodes().size() + \", proc: \" + proc.getSymbolName());\n DFANode node = cfg.getEntry();\n // entry cfgNode\n DFANode entryNode = new DFANode();\n entryNode.putData(\"cfg_node\", node);\n entryNode.putData(\"psg_type\", \"entry\");\n accessIdxMap.put(\"entry_\" + proc.getSymbolName(), entryNode);\n node.putData(\"psg_entry_global\", entryNode);\n // exit cfgNode\n List<DFANode> exitNodeList = cfg.getExitNodes();\n int idx = 0;\n for (DFANode dfaNode : exitNodeList) {\n DFANode exitNode = new DFANode();\n exitNode.putData(\"cfg_node\", dfaNode);\n exitNode.putData(\"psg_type\", \"exit\");\n accessIdxMap.put(\"exit_\" + proc.getSymbolName() + idx++, exitNode);\n dfaNode.putData(\"psg_exit_global\", exitNode);\n }\n }\n\n // add call and return cfgNode (must check all the procs)\n for (Procedure proc : procList) {\n CFGraph cfg = cfgMap.get(proc);\n Iterator cfgIter = cfg.iterator();\n while (cfgIter.hasNext()) {\n DFANode node = (DFANode) cfgIter.next();\n Traversable currentIR = (Traversable) CFGraph.getIR(node);\n if (currentIR == null) {\n continue;\n }\n List<FunctionCall> fcList = IRTools.getFunctionCalls(currentIR);\n if (fcList == null || fcList.size() == 0) {\n continue;\n }\n Set<DFANode> callList = new HashSet<DFANode>();\n Set<DFANode> returnList = new HashSet<DFANode>();\n for (FunctionCall fc : fcList) {\n Procedure callee = fc.getProcedure();\n if (callee == null) {\n continue;\n }\n if (globalProcSet.contains(callee) == false) {\n continue;\n }\n DFANode callNode = new DFANode();\n callNode.putData(\"cfg_node\", node);\n callNode.putData(\"psg_type\", \"call\");\n callNode.putData(\"proc\", callee);\n callList.add(callNode);\n DFANode entryNode = accessIdxMap.get(\"entry_\" + callee.getSymbolName());\n if (entryNode == null) {\n throw new RuntimeException(\"No Entry Node found: \" + \"entry_\" + callee.getSymbolName());\n }\n callNode.addSucc(entryNode);\n entryNode.addPred(callNode);\n // return\n DFANode returnNode = new DFANode();\n returnNode.putData(\"cfg_node\", node);\n returnNode.putData(\"psg_type\", \"return\");\n returnNode.putData(\"proc\", callee);\n returnList.add(returnNode);\n CFGraph cfgCallee = cfgMap.get(callee);\n List<DFANode> calleeExitList = cfgCallee.getExitNodes();\n for (int idx = 0; idx < calleeExitList.size(); idx++) {\n DFANode exitNode = accessIdxMap.get(\"exit_\" + callee.getSymbolName() + idx);\n if (exitNode == null) {\n throw new RuntimeException(\"No Exit Node found: \" + \"exit_\" + callee.getSymbolName());\n }\n returnNode.addPred(exitNode);\n exitNode.addSucc(returnNode);\n }\n }\n if (callList.size() > 0) {\n node.putData(\"psg_call_global\", callList);\n }\n if (returnList.size() > 0) {\n node.putData(\"psg_return_global\", returnList);\n }\n }\n }\n }",
"private Map<String, Object> collectGlobals() {\n ImmutableMap.Builder<String, Object> envBuilder = ImmutableMap.builder();\n MethodLibrary.addBindingsToBuilder(envBuilder);\n Runtime.addConstantsToBuilder(envBuilder);\n return envBuilder.build();\n }",
"String getInitCond();",
"private native String native_init();",
"public /* synthetic */ String mo15511g(Void __) {\n boolean[] $jacocoInit = $jacocoInit();\n String string = getArguments().getString(\"package_name\");\n $jacocoInit[218] = true;\n return string;\n }",
"private native String native_clinit();",
"@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp\", line = 140,\n FQN=\"clang::CodeGen::CodeGenFunction::EmitCXXGlobalVarDeclInit\", NM=\"_ZN5clang7CodeGen15CodeGenFunction24EmitCXXGlobalVarDeclInitERKNS_7VarDeclEPN4llvm8ConstantEb\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.clang.codegen/llvmToClangType -split-class=clang::CodeGen::CodeGenFunction@this ${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp -nm=_ZN5clang7CodeGen15CodeGenFunction24EmitCXXGlobalVarDeclInitERKNS_7VarDeclEPN4llvm8ConstantEb\")\n//</editor-fold>\npublic final void EmitCXXGlobalVarDeclInit(final /*const*/ VarDecl /*&*/ D, \n Constant /*P*/ DeclPtr, \n boolean PerformInit) {\n \n /*const*/ Expr /*P*/ Init = D.getInit$Const();\n QualType T = D.getType();\n \n // The address space of a static local variable (DeclPtr) may be different\n // from the address space of the \"this\" argument of the constructor. In that\n // case, we need an addrspacecast before calling the constructor.\n //\n // struct StructWithCtor {\n // __device__ StructWithCtor() {...}\n // };\n // __device__ void foo() {\n // __shared__ StructWithCtor s;\n // ...\n // }\n //\n // For example, in the above CUDA code, the static local variable s has a\n // \"shared\" address space qualifier, but the constructor of StructWithCtor\n // expects \"this\" in the \"generic\" address space.\n /*uint*/int ExpectedAddrSpace = $this().getContext().getTargetAddressSpace(new QualType(T));\n /*uint*/int ActualAddrSpace = DeclPtr.getType().getPointerAddressSpace();\n if (ActualAddrSpace != ExpectedAddrSpace) {\n org.llvm.ir.Type /*P*/ LTy = $this().CGM.getTypes().ConvertTypeForMem(new QualType(T));\n org.llvm.ir.PointerType /*P*/ PTy = org.llvm.ir.PointerType.get(LTy, ExpectedAddrSpace);\n DeclPtr = ConstantExpr.getAddrSpaceCast(DeclPtr, PTy);\n }\n \n ConstantAddress DeclAddr/*J*/= new ConstantAddress(DeclPtr, $this().getContext().getDeclAlign($AddrOf(D)));\n if (!T.$arrow().isReferenceType()) {\n if (($this().getLangOpts().OpenMP != 0) && D.hasAttr(OMPThreadPrivateDeclAttr.class)) {\n /*J:(void)*/$this().CGM.getOpenMPRuntime().emitThreadPrivateVarDefinition($AddrOf(D), new Address(DeclAddr), D.getAttr(OMPThreadPrivateDeclAttr.class).getLocation(), \n PerformInit, $this());\n }\n if (PerformInit) {\n CGDeclCXXStatics.EmitDeclInit(/*Deref*/$this(), D, new ConstantAddress(DeclAddr));\n }\n if ($this().CGM.isTypeConstant(D.getType(), true)) {\n CGDeclCXXStatics.EmitDeclInvariant(/*Deref*/$this(), D, DeclPtr);\n } else {\n CGDeclCXXStatics.EmitDeclDestroy(/*Deref*/$this(), D, new ConstantAddress(DeclAddr));\n }\n return;\n }\n assert (PerformInit) : \"cannot have constant initializer which needs destruction for reference\";\n RValue RV = $this().EmitReferenceBindingToExpr(Init);\n $this().EmitStoreOfScalar(RV.getScalarVal(), new Address(DeclAddr), false, new QualType(T));\n}",
"public void init() {\r\n\tlog.info(\"OsylManagerServiceImpl service init() \");\r\n\t// register functions\r\n\tfor (Iterator<String> i = functionsToRegister.iterator(); i.hasNext();) {\r\n\t String function = i.next();\r\n\t functionManager.registerFunction(function);\r\n\t}\r\n }",
"public void autonomousInit() {\n }",
"public void autonomousInit() {\n }",
"public static void initOCL() {\n\t\tString oclDelegateURI = OCLConstants.OCL_DELEGATE_URI;\n\t\tEOperation.Internal.InvocationDelegate.Factory.Registry.INSTANCE.put(oclDelegateURI,\n\t\t\tnew OCLInvocationDelegateFactory.Global());\n\t\tEStructuralFeature.Internal.SettingDelegate.Factory.Registry.INSTANCE.put(oclDelegateURI,\n\t\t\tnew OCLSettingDelegateFactory.Global());\n\t\tEValidator.ValidationDelegate.Registry.INSTANCE.put(oclDelegateURI,\n\t\t\tnew OCLValidationDelegateFactory.Global());\n\t\t\n\t\tOCLDelegateDomain.initialize(null);\n\t\t\n\t\torg.eclipse.ocl.xtext.essentialocl.EssentialOCLStandaloneSetup.doSetup();\n\n\t\tOCLstdlib.install();\n\t\t//-------------\t\t\n\t}",
"public static void initOCL() {\n\t\tString oclDelegateURI = OCLConstants.OCL_DELEGATE_URI;\n\t\tEOperation.Internal.InvocationDelegate.Factory.Registry.INSTANCE.put(oclDelegateURI,\n\t\t\tnew OCLInvocationDelegateFactory.Global());\n\t\tEStructuralFeature.Internal.SettingDelegate.Factory.Registry.INSTANCE.put(oclDelegateURI,\n\t\t\tnew OCLSettingDelegateFactory.Global());\n\t\tEValidator.ValidationDelegate.Registry.INSTANCE.put(oclDelegateURI,\n\t\t\tnew OCLValidationDelegateFactory.Global());\n\t\t\n\t\tOCLDelegateDomain.initialize(null);\n\t\t\n\t\torg.eclipse.ocl.xtext.essentialocl.EssentialOCLStandaloneSetup.doSetup();\n\n\t\tOCLstdlib.install();\n\t\t//-------------\t\t\n\t}",
"public static void init() {\n\n }",
"void init();",
"void init();",
"void init();",
"void init();",
"void init();",
"void init();",
"void init();",
"void init();",
"void init();",
"void init();",
"void init();",
"void init();",
"void init();",
"public void initialize(Context context, String[] packedGCO, String languageName) throws MCADException {\n try {\n this.globalConfigObject = (MCADGlobalConfigObject) JPO.unpackArgs(packedGCO);\n this.resourceBundle = new MCADServerResourceBundle(languageName);\n this.cache = new IEFGlobalCache();\n this.util = new MCADMxUtil(context, resourceBundle, cache);\n } catch (Exception e) {\n System.out.println(\"[initialize]: Exception while initializating JPO\" + e.getMessage());\n MCADServerException.createException(e.getMessage(), e);\n }\n }",
"public static void init() {\n }",
"public static void init() {\n }",
"private void initializeGlobalVariables()\n\t{\n\t\t_continue = (Button) findViewById(R.id.es_continue);\n\t\t\n\t\t_points = (CheckBox) findViewById(R.id.es_points);\n\t\t_score = (CheckBox) findViewById(R.id.es_score);\n\t}",
"public static void bgfx_init_ctor(@NativeType(\"bgfx_init_t *\") BGFXInit _init) {\n nbgfx_init_ctor(_init.address());\n }",
"public final PythonParser.global_stmt_return global_stmt() throws RecognitionException {\n PythonParser.global_stmt_return retval = new PythonParser.global_stmt_return();\n retval.start = input.LT(1);\n\n PythonTree root_0 = null;\n\n Token GLOBAL121=null;\n Token COMMA122=null;\n Token n=null;\n List list_n=null;\n\n PythonTree GLOBAL121_tree=null;\n PythonTree COMMA122_tree=null;\n PythonTree n_tree=null;\n RewriteRuleTokenStream stream_NAME=new RewriteRuleTokenStream(adaptor,\"token NAME\");\n RewriteRuleTokenStream stream_GLOBAL=new RewriteRuleTokenStream(adaptor,\"token GLOBAL\");\n RewriteRuleTokenStream stream_COMMA=new RewriteRuleTokenStream(adaptor,\"token COMMA\");\n\n try {\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:850:5: ( GLOBAL n+= NAME ( COMMA n+= NAME )* -> ^( GLOBAL[$GLOBAL, actions.makeNames($n)] ) )\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:850:7: GLOBAL n+= NAME ( COMMA n+= NAME )*\n {\n GLOBAL121=(Token)match(input,GLOBAL,FOLLOW_GLOBAL_in_global_stmt3265); if (state.failed) return retval; \n if ( state.backtracking==0 ) stream_GLOBAL.add(GLOBAL121);\n\n n=(Token)match(input,NAME,FOLLOW_NAME_in_global_stmt3269); if (state.failed) return retval; \n if ( state.backtracking==0 ) stream_NAME.add(n);\n\n if (list_n==null) list_n=new ArrayList();\n list_n.add(n);\n\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:850:22: ( COMMA n+= NAME )*\n loop59:\n do {\n int alt59=2;\n int LA59_0 = input.LA(1);\n\n if ( (LA59_0==COMMA) ) {\n alt59=1;\n }\n\n\n switch (alt59) {\n \tcase 1 :\n \t // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:850:23: COMMA n+= NAME\n \t {\n \t COMMA122=(Token)match(input,COMMA,FOLLOW_COMMA_in_global_stmt3272); if (state.failed) return retval; \n \t if ( state.backtracking==0 ) stream_COMMA.add(COMMA122);\n\n \t n=(Token)match(input,NAME,FOLLOW_NAME_in_global_stmt3276); if (state.failed) return retval; \n \t if ( state.backtracking==0 ) stream_NAME.add(n);\n\n \t if (list_n==null) list_n=new ArrayList();\n \t list_n.add(n);\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop59;\n }\n } while (true);\n\n\n\n // AST REWRITE\n // elements: GLOBAL\n // token labels: \n // rule labels: retval\n // token list labels: \n // rule list labels: \n // wildcard labels: \n if ( state.backtracking==0 ) {\n retval.tree = root_0;\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n\n root_0 = (PythonTree)adaptor.nil();\n // 851:4: -> ^( GLOBAL[$GLOBAL, actions.makeNames($n)] )\n {\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:851:7: ^( GLOBAL[$GLOBAL, actions.makeNames($n)] )\n {\n PythonTree root_1 = (PythonTree)adaptor.nil();\n root_1 = (PythonTree)adaptor.becomeRoot(new Global(GLOBAL, GLOBAL121, actions.makeNames(list_n)), root_1);\n\n adaptor.addChild(root_0, root_1);\n }\n\n }\n\n retval.tree = root_0;}\n }\n\n retval.stop = input.LT(-1);\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (PythonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n }\n\n catch (RecognitionException re) {\n errorHandler.reportError(this, re);\n errorHandler.recover(this, input,re);\n retval.tree = (PythonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n }\n finally {\n }\n return retval;\n }",
"void preInit();",
"void preInit();",
"public static void init() {\n\t\t\n\t}",
"void initialize(C config);",
"@Test(description = \"positive test with add of an global attribute\")\n public void t20b_positiveTestGlobalAttributeAdded()\n throws Exception\n {\n this.createNewData(\"Test\")\n .defData(\"attribute\", new AttributeData(this, \"Test Attribute 1\").setSingle(\"kind\", \"string\"))\n .create()\n .defData(\"attribute\", new AttributeData(this, \"Test Attribute 2\").setSingle(\"kind\", \"string\"))\n .createDependings()\n .update(\"\")\n .checkExport();\n }",
"@PostConstruct\n\tpublic void init()\n\t{\n\t\tlogModule.info(TaskGenerator.class, \"初始化 Task generator...\");\n\t}",
"public void autonomousInit() {\n\t\t\n\t}",
"public void init();",
"public void init();",
"public void init();",
"public void init();",
"abstract public void init(GL gl);",
"@BeforeClass\n public static void initGlobal()\n {\n Locale.setDefault(Locale.ENGLISH);\n\n ValidatorFactory factory = Validation.buildDefaultValidatorFactory();\n validator = factory.getValidator();\n }",
"public void autonomousInit() {\n \n }",
"@Stub\n\tpublic void init()\n\t{\n\t\t//\n\t}",
"public void init(GL2 gl) {\n\t}",
"private List<GlobalState> generateGlobalStates(List<Node> nodes) {\n // Creating a list of global states with an empty state\n List<GlobalState> gStates = new ArrayList();\n gStates.add(new GlobalState(nodes,binding));\n \n // Generating all possible global states\n for(Node n : nodes) {\n // Generating a new list of global states by adding a new pair\n // for each state of current node to those already generated\n List<GlobalState> newGStates = new ArrayList();\n for(String s : n.getProtocol().getStates()) {\n for(GlobalState g : gStates) {\n GlobalState newG = new GlobalState(nodes,binding);\n newG.addMapping(g);\n newG.addMapping(n.getName(),s);\n newGStates.add(newG);\n }\n }\n // Updating the list of global states with the new one\n gStates = newGStates;\n }\n return gStates;\n }",
"private Globals() {\n\n\t}",
"private static long getGlobalId() {\n return globalId++;\n }",
"private void initGP() {\n log.info(\"Initializing GP\");\n geneticProgram.addPopulationObserver(this);\n geneticProgram.initialize();\n frontRunner = geneticProgram.getProgram(0); // A safe default\n }",
"void initFunctions() {\n\t\tif (programUnit == null) return;\n\n\t\t// Add all functions\n\t\tList<BdsNode> fdecls = BdsNodeWalker.findNodes(programUnit, StatementFunctionDeclaration.class, true, true);\n\t\tfor (BdsNode n : fdecls) {\n\t\t\tFunctionDeclaration fd = (FunctionDeclaration) n;\n\t\t\tbdsvm.addFunction(fd);\n\t\t}\n\t}",
"public native void initNativeCallback();",
"private static native long nativeInitialize(int arch, int mode) throws UnicornException;",
"@Override\n\tpublic ServerServices upstreamGlobalVarsInit() throws Exception {\n\t\treturn null;\n\t}",
"public static GlobalParam globalSetup(int lambda) {\n //官方文档中rbits=160,lambda=512\n GlobalParam params = new GlobalParam();\n\n params.setPairingParameters(new TypeACurveGenerator(160, lambda).generate());//rbits 是Zp中阶数p的位数 ,qbits G中阶数的位数\n Pairing pairing = PairingFactory.getPairing(params.getPairingParameters());\n\n params.setG(pairing.getG1().newRandomElement().getImmutable());\n Element a=pairing.getZr().newRandomElement().getImmutable();\n Element ga=params.getG().powZn(a).getImmutable();\n params.setGa(ga.toBytes());\n params.setA(a);\n\n return params;\n }",
"private void myInit() {\n init_key();\n }",
"private static native int ptInitLibrary0(String lang);",
"void Initialize();",
"com.google.protobuf.ByteString\n getInitCondBytes();",
"private Map<String, Object> collectBzlGlobals() {\n ImmutableMap.Builder<String, Object> envBuilder = ImmutableMap.builder();\n TopLevelBootstrap topLevelBootstrap =\n new TopLevelBootstrap(\n new FakeBuildApiGlobals(),\n new FakeSkylarkAttrApi(),\n new FakeSkylarkCommandLineApi(),\n new FakeSkylarkNativeModuleApi(),\n new FakeSkylarkRuleFunctionsApi(Lists.newArrayList(), Lists.newArrayList()),\n new FakeStructProviderApi(),\n new FakeOutputGroupInfoProvider(),\n new FakeActionsInfoProvider(),\n new FakeDefaultInfoProvider());\n AndroidBootstrap androidBootstrap =\n new AndroidBootstrap(\n new FakeAndroidSkylarkCommon(),\n new FakeApkInfoProvider(),\n new FakeAndroidInstrumentationInfoProvider(),\n new FakeAndroidDeviceBrokerInfoProvider(),\n new FakeAndroidResourcesInfoProvider(),\n new FakeAndroidNativeLibsInfoProvider());\n AppleBootstrap appleBootstrap = new AppleBootstrap(new FakeAppleCommon());\n ConfigBootstrap configBootstrap =\n new ConfigBootstrap(new FakeConfigSkylarkCommon(), new FakeConfigApi(),\n new FakeConfigGlobalLibrary());\n CcBootstrap ccBootstrap = new CcBootstrap(new FakeCcModule());\n JavaBootstrap javaBootstrap =\n new JavaBootstrap(\n new FakeJavaCommon(),\n new FakeJavaInfoProvider(),\n new FakeJavaProtoCommon(),\n new FakeJavaCcLinkParamsProvider.Provider());\n PlatformBootstrap platformBootstrap = new PlatformBootstrap(new FakePlatformCommon());\n PyBootstrap pyBootstrap =\n new PyBootstrap(new FakePyInfoProvider(), new FakePyRuntimeInfoProvider());\n RepositoryBootstrap repositoryBootstrap =\n new RepositoryBootstrap(new FakeRepositoryModule(Lists.newArrayList()));\n TestingBootstrap testingBootstrap =\n new TestingBootstrap(\n new FakeTestingModule(),\n new FakeCoverageCommon(),\n new FakeAnalysisFailureInfoProvider(),\n new FakeAnalysisTestResultInfoProvider());\n\n topLevelBootstrap.addBindingsToBuilder(envBuilder);\n androidBootstrap.addBindingsToBuilder(envBuilder);\n appleBootstrap.addBindingsToBuilder(envBuilder);\n ccBootstrap.addBindingsToBuilder(envBuilder);\n configBootstrap.addBindingsToBuilder(envBuilder);\n javaBootstrap.addBindingsToBuilder(envBuilder);\n platformBootstrap.addBindingsToBuilder(envBuilder);\n pyBootstrap.addBindingsToBuilder(envBuilder);\n repositoryBootstrap.addBindingsToBuilder(envBuilder);\n testingBootstrap.addBindingsToBuilder(envBuilder);\n\n return envBuilder.build();\n }",
"private native static void initIDs();",
"@CompilerDirectives.TruffleBoundary\n public void initializeBuiltinsIr(FreshNameSupply freshNameSupply, Passes passes) {\n try {\n var builtinsModuleBytes =\n Objects.requireNonNull(\n getClass().getClassLoader().getResourceAsStream(Builtins.SOURCE_NAME))\n .readAllBytes();\n String source = new String(builtinsModuleBytes, StandardCharsets.UTF_8);\n module.setLiteralSource(source);\n BuiltinsIrBuilder.build(module, freshNameSupply, passes);\n } catch (IOException e) {\n throw new CompilerError(\"Fatal, unable to read Builtins source file.\");\n }\n }",
"public List<Identifier> getGlobalVars(){\n final List<Identifier> globs = new ArrayList<>();\n\n globalVariables.keySet().stream()\n .map(x -> new Identifier(Scope.GLOBAL, Type.VARIABLE, x, globalVariables.get(x)))\n .forEach(globs::add);\n\n return globs;\n }",
"public void init() throws BuildException {\n setJavaVersionProperty();\n \n ComponentHelper.getComponentHelper(this).initDefaultDefinitions();\n \n setSystemProperties();\n }",
"protected void initVars() {}",
"public void init() {\n\t\tM_log.info(\"initialization...\");\n\t\t\n\t\t// register as an entity producer\n\t\tm_entityManager.registerEntityProducer(this, SakaiGCalendarServiceStaticVariables.REFERENCE_ROOT);\n\t\t\n\t\t// register functions\n\t\tfunctionManager.registerFunction(SakaiGCalendarServiceStaticVariables.SECURE_GCAL_VIEW);\n\t\tfunctionManager.registerFunction(SakaiGCalendarServiceStaticVariables.SECURE_GCAL_VIEW_ALL);\n\t\tfunctionManager.registerFunction(SakaiGCalendarServiceStaticVariables.SECURE_GCAL_EDIT);\n\t\t\n \t\t//Setup cache. This will create a cache using the default configuration used in the memory service.\n \t\tcache = memoryService.newCache(CACHE_NAME);\n\t}",
"private static void init() {\n __lib = new JnaGmpLib();\n }",
"private void myInit() {\n init_key();\n\n }",
"private Globals() {}",
"private Globals(){}",
"public abstract void init();",
"public abstract void init();",
"public abstract void init();",
"public abstract void init();"
] | [
"0.60304475",
"0.5563568",
"0.55588216",
"0.52458906",
"0.50985456",
"0.5040119",
"0.49778023",
"0.49650502",
"0.49562806",
"0.48837128",
"0.4852633",
"0.48451895",
"0.4796443",
"0.47709915",
"0.47638395",
"0.47540334",
"0.47482973",
"0.4746139",
"0.47272074",
"0.47272074",
"0.471003",
"0.4679133",
"0.46781164",
"0.46750423",
"0.46251673",
"0.46157864",
"0.46129817",
"0.4603002",
"0.45919907",
"0.45915607",
"0.45853567",
"0.45831236",
"0.4558842",
"0.4558842",
"0.45587716",
"0.45587716",
"0.4553573",
"0.45290008",
"0.45290008",
"0.45290008",
"0.45290008",
"0.45290008",
"0.45290008",
"0.45290008",
"0.45290008",
"0.45290008",
"0.45290008",
"0.45290008",
"0.45290008",
"0.45290008",
"0.45219392",
"0.4519533",
"0.4519533",
"0.45167246",
"0.45029613",
"0.4500832",
"0.4499833",
"0.4499833",
"0.44945836",
"0.44852433",
"0.44747773",
"0.44719508",
"0.44629633",
"0.44470134",
"0.44470134",
"0.44470134",
"0.44470134",
"0.4427702",
"0.4419662",
"0.4417374",
"0.4410065",
"0.4402288",
"0.44012403",
"0.43994707",
"0.43768442",
"0.4376099",
"0.4373822",
"0.43714103",
"0.43613058",
"0.4360456",
"0.4328351",
"0.4327516",
"0.4318614",
"0.43158963",
"0.43113282",
"0.43026415",
"0.42942318",
"0.42922184",
"0.42914256",
"0.4290155",
"0.4290115",
"0.4285667",
"0.42792955",
"0.4260444",
"0.42535973",
"0.42482978",
"0.42480224",
"0.42480224",
"0.42480224",
"0.42480224"
] | 0.6264184 | 0 |
/ GenerateCXXGlobalDtorsFunc Generates code for destroying global / variables. | @Converted(kind = Converted.Kind.AUTO,
source = "${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp", line = 574,
FQN="clang::CodeGen::CodeGenFunction::GenerateCXXGlobalDtorsFunc", NM="_ZN5clang7CodeGen15CodeGenFunction26GenerateCXXGlobalDtorsFuncEPN4llvm8FunctionERKSt6vectorISt4pairINS2_6WeakVHEPNS2_8ConstantEESaISA_EE",
cmd="jclank.sh -java-options=${SPUTNIK}/modules/org.clang.codegen/llvmToClangType -split-class=clang::CodeGen::CodeGenFunction@this ${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp -nm=_ZN5clang7CodeGen15CodeGenFunction26GenerateCXXGlobalDtorsFuncEPN4llvm8FunctionERKSt6vectorISt4pairINS2_6WeakVHEPNS2_8ConstantEESaISA_EE")
//</editor-fold>
public final void GenerateCXXGlobalDtorsFunc(Function /*P*/ Fn,
final /*const*/std.vector<std.pair<WeakVH, Constant /*P*/ >> /*&*/ DtorsAndObjects) {
{
ApplyDebugLocation NL = null;
ApplyDebugLocation AL = null;
JavaCleaner $c$ = $createJavaCleaner();
try {
NL = ApplyDebugLocation.CreateEmpty(/*Deref*/$this());
$this().StartFunction(new GlobalDecl(), $this().getContext().VoidTy.$QualType(), Fn,
$this().getTypes().arrangeNullaryFunction(), $c$.track(new FunctionArgList())); $c$.clean();
// Emit an artificial location for this function.
AL = ApplyDebugLocation.CreateArtificial(/*Deref*/$this());
// Emit the dtors, in reverse order from construction.
for (/*uint*/int i = 0, e = DtorsAndObjects.size(); i != e; ++i) {
Value /*P*/ Callee = DtorsAndObjects.$at$Const(e - i - 1).first.$Value$P();
CallInst /*P*/ CI = $this().Builder.CreateCall_Value$P_ArrayRef$Value$P_Twine$C_MDNode$P(Callee,
new ArrayRef<Value /*P*/ >(DtorsAndObjects.$at$Const(e - i - 1).second, true));
{
// Make sure the call and the callee agree on calling convention.
Function /*P*/ F = dyn_cast_Function(Callee);
if ((F != null)) {
CI.setCallingConv(F.getCallingConv());
}
}
}
} finally {
if (AL != null) { AL.$destroy(); }
if (NL != null) { NL.$destroy(); }
$c$.$destroy();
}
}
$this().FinishFunction();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp\", line = 601,\n FQN=\"clang::CodeGen::CodeGenFunction::generateDestroyHelper\", NM=\"_ZN5clang7CodeGen15CodeGenFunction21generateDestroyHelperENS0_7AddressENS_8QualTypeEPFvRS1_S2_S3_EbPKNS_7VarDeclE\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.clang.codegen/llvmToClangType -split-class=clang::CodeGen::CodeGenFunction@this ${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp -nm=_ZN5clang7CodeGen15CodeGenFunction21generateDestroyHelperENS0_7AddressENS_8QualTypeEPFvRS1_S2_S3_EbPKNS_7VarDeclE\")\n//</editor-fold>\npublic final Function /*P*/ generateDestroyHelper(Address addr, QualType type, CodeGenFunction.AddressQualType2Void destroyer, \n boolean useEHCleanupForArray, /*const*/ VarDecl /*P*/ VD) {\n FunctionArgList args = null;\n ImplicitParamDecl dst = null;\n try {\n args/*J*/= new FunctionArgList();\n dst/*J*/= new ImplicitParamDecl($this().getContext(), (DeclContext /*P*/ )null, new SourceLocation(), (IdentifierInfo /*P*/ )null, \n $this().getContext().VoidPtrTy.$QualType());\n args.push_back($AddrOf(dst));\n \n final /*const*/ CGFunctionInfo /*&*/ FI = $this().CGM.getTypes().arrangeBuiltinFunctionDeclaration($this().getContext().VoidTy.$QualType(), args);\n org.llvm.ir.FunctionType /*P*/ FTy = $this().CGM.getTypes().GetFunctionType(FI);\n Function /*P*/ fn = $this().CGM.CreateGlobalInitOrDestructFunction(FTy, new Twine(/*KEEP_STR*/\"__cxx_global_array_dtor\"), FI, VD.getLocation());\n \n $this().CurEHLocation.$assignMove(VD.getLocStart());\n \n $this().StartFunction(new GlobalDecl(VD), $this().getContext().VoidTy.$QualType(), fn, FI, args);\n \n $this().emitDestroy(new Address(addr), new QualType(type), destroyer, useEHCleanupForArray);\n \n $this().FinishFunction();\n \n return fn;\n } finally {\n if (dst != null) { dst.$destroy(); }\n if (args != null) { args.$destroy(); }\n }\n}",
"@External\r\n\t@ClientFunc\r\n\tpublic MetaVar __gc();",
"@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp\", line = 227,\n FQN=\"clang::CodeGen::CodeGenFunction::registerGlobalDtorWithAtExit\", NM=\"_ZN5clang7CodeGen15CodeGenFunction28registerGlobalDtorWithAtExitERKNS_7VarDeclEPN4llvm8ConstantES7_\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.clang.codegen/llvmToClangType -split-class=clang::CodeGen::CodeGenFunction@this ${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp -nm=_ZN5clang7CodeGen15CodeGenFunction28registerGlobalDtorWithAtExitERKNS_7VarDeclEPN4llvm8ConstantES7_\")\n//</editor-fold>\npublic final void registerGlobalDtorWithAtExit(final /*const*/ VarDecl /*&*/ VD, \n Constant /*P*/ dtor, \n Constant /*P*/ addr) {\n // Create a function which calls the destructor.\n Constant /*P*/ dtorStub = $this().createAtExitStub(VD, dtor, addr);\n \n // extern \"C\" int atexit(void (*f)(void));\n org.llvm.ir.FunctionType /*P*/ atexitTy = org.llvm.ir.FunctionType.get(IntTy, new ArrayRef<org.llvm.ir.Type /*P*/ >(dtorStub.getType(), true), false);\n \n Constant /*P*/ atexit = $this().CGM.CreateRuntimeFunction(atexitTy, new StringRef(/*KEEP_STR*/\"atexit\"));\n {\n Function /*P*/ atexitFn = dyn_cast_Function(atexit);\n if ((atexitFn != null)) {\n atexitFn.setDoesNotThrow();\n }\n }\n \n $this().EmitNounwindRuntimeCall(atexit, new ArrayRef<Value /*P*/ >(dtorStub, true));\n}",
"@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp\", line = 522,\n FQN=\"clang::CodeGen::CodeGenFunction::GenerateCXXGlobalInitFunc\", NM=\"_ZN5clang7CodeGen15CodeGenFunction25GenerateCXXGlobalInitFuncEPN4llvm8FunctionENS2_8ArrayRefIS4_EENS0_7AddressE\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.clang.codegen/llvmToClangType -split-class=clang::CodeGen::CodeGenFunction@this ${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp -nm=_ZN5clang7CodeGen15CodeGenFunction25GenerateCXXGlobalInitFuncEPN4llvm8FunctionENS2_8ArrayRefIS4_EENS0_7AddressE\")\n//</editor-fold>\npublic final void GenerateCXXGlobalInitFunc(Function /*P*/ Fn, \n ArrayRef<Function /*P*/ > Decls) {\n GenerateCXXGlobalInitFunc(Fn, \n Decls, \n Address.invalid());\n}",
"@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp\", line = 495,\n FQN=\"clang::CodeGen::CodeGenFunction::GenerateCXXGlobalVarDeclInitFunc\", NM=\"_ZN5clang7CodeGen15CodeGenFunction32GenerateCXXGlobalVarDeclInitFuncEPN4llvm8FunctionEPKNS_7VarDeclEPNS2_14GlobalVariableEb\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.clang.codegen/llvmToClangType -split-class=clang::CodeGen::CodeGenFunction@this ${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp -nm=_ZN5clang7CodeGen15CodeGenFunction32GenerateCXXGlobalVarDeclInitFuncEPN4llvm8FunctionEPKNS_7VarDeclEPNS2_14GlobalVariableEb\")\n//</editor-fold>\npublic final void GenerateCXXGlobalVarDeclInitFunc(Function /*P*/ Fn, \n /*const*/ VarDecl /*P*/ D, \n GlobalVariable /*P*/ Addr, \n boolean PerformInit) {\n JavaCleaner $c$ = $createJavaCleaner();\n try {\n // Check if we need to emit debug info for variable initializer.\n if (D.hasAttr(NoDebugAttr.class)) {\n $this().DebugInfo = null; // disable debug info indefinitely for this function\n }\n \n $this().CurEHLocation.$assignMove(D.getLocStart());\n \n $this().StartFunction(new GlobalDecl(D), $this().getContext().VoidTy.$QualType(), Fn, \n $this().getTypes().arrangeNullaryFunction(), \n $c$.track(new FunctionArgList()), D.getLocation(), \n D.getInit$Const().getExprLoc()); $c$.clean();\n \n // Use guarded initialization if the global variable is weak. This\n // occurs for, e.g., instantiated static data members and\n // definitions explicitly marked weak.\n if (Addr.hasWeakLinkage() || Addr.hasLinkOnceLinkage()) {\n $this().EmitCXXGuardedInit($Deref(D), Addr, PerformInit);\n } else {\n $this().EmitCXXGlobalVarDeclInit($Deref(D), Addr, PerformInit);\n }\n \n $this().FinishFunction();\n } finally {\n $c$.$destroy();\n }\n}",
"@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/tools/clang/lib/AST/DeclTemplate.cpp\", line = 934,\n FQN=\"clang::VarTemplateDecl::DeallocateCommon\", NM=\"_ZN5clang15VarTemplateDecl16DeallocateCommonEPv\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.clang.ast/llvmToClangType ${LLVM_SRC}/llvm/tools/clang/lib/AST/DeclTemplate.cpp -nm=_ZN5clang15VarTemplateDecl16DeallocateCommonEPv\")\n //</editor-fold>\n private static void DeallocateCommon(Object/*void P*/ Ptr) {\n ((/*static_cast*/Common /*P*/ )(Ptr)).$destroy();\n }",
"public default AddressEnvironment makeGlobalVector(Assembler assembler, AddressEnvironment rho, int stackDistance, AddressEnvironment rhoInner)\r\n\t{\n\t\tSet<String> freeVariables = getFreeVariables();\r\n\t\tint globalVariableIndex = 0;\r\n\t\tfor(String globalVariable : freeVariables)\r\n\t\t{\r\n\t\t\trho.appendGetvar(assembler, globalVariable, stackDistance + globalVariableIndex);\r\n\t\t\trhoInner = rhoInner.withGlobalVariable(globalVariable, globalVariableIndex);\r\n\t\t\tglobalVariableIndex ++;\r\n\t\t}\r\n\t\tassembler.append(mkvec, globalVariableIndex);\r\n\t\treturn rhoInner;\r\n\t}",
"public void removeGeneratedCode(String rootDir) {\n\n\t Parser creatorCreatorParser = this.getOrCreateCreatorCreator(this.getModel(), rootDir);\n\t \n\t String className = StrUtil.upFirstChar(this.getModel().getName());\n\t \n\t this.removeLineFromFragment(creatorCreatorParser, Parser.METHOD + \":createIdMap(String)\", className, className);\n\t \n\t this.removeLineFromFragment(creatorCreatorParser, Parser.METHOD + \":createIdMap(String)\", className, className);\n\t \n\t CGUtil.printFile(creatorCreatorParser);\n\t \n\t this.removeAllGeneratedCode(rootDir, rootDir, rootDir);\n\t \n }",
"@Test(description = \"positive test if an global attribute is removed\")\n public void t20e_positiveTestGlobalAttributesRemoved()\n throws Exception\n {\n this.createNewData(\"Test\")\n .defData(\"attribute\", new AttributeData(this, \"Test Attribute\").setSingle(\"kind\", \"string\"))\n .create();\n this.createNewData(\"Test\")\n .update(\"\", ValueKeys.DMRelationAttrRemove.name(), \"*\")\n .checkExport();\n }",
"public void removeLocalVariable(LocalVariableGen lvg) {\n/* 183 */ this._slotAllocator.releaseSlot(lvg);\n/* 184 */ super.removeLocalVariable(lvg);\n/* */ }",
"@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp\", line = 194,\n FQN=\"clang::CodeGen::CodeGenFunction::createAtExitStub\", NM=\"_ZN5clang7CodeGen15CodeGenFunction16createAtExitStubERKNS_7VarDeclEPN4llvm8ConstantES7_\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.clang.codegen/llvmToClangType -split-class=clang::CodeGen::CodeGenFunction@this ${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp -nm=_ZN5clang7CodeGen15CodeGenFunction16createAtExitStubERKNS_7VarDeclEPN4llvm8ConstantES7_\")\n//</editor-fold>\npublic final Constant /*P*/ createAtExitStub(final /*const*/ VarDecl /*&*/ VD, \n Constant /*P*/ dtor, \n Constant /*P*/ addr) {\n CodeGenFunction CGF = null;\n JavaCleaner $c$ = $createJavaCleaner();\n try {\n // Get the destructor function type, void(*)(void).\n org.llvm.ir.FunctionType /*P*/ ty = org.llvm.ir.FunctionType.get($this().CGM.VoidTy, false);\n SmallString/*<256>*/ FnName/*J*/= new SmallString/*<256>*/(256);\n {\n raw_svector_ostream Out = null;\n try {\n Out/*J*/= new raw_svector_ostream(FnName);\n $this().CGM.getCXXABI().getMangleContext().mangleDynamicAtExitDestructor($AddrOf(VD), Out);\n } finally {\n if (Out != null) { Out.$destroy(); }\n }\n }\n \n final /*const*/ CGFunctionInfo /*&*/ FI = $this().CGM.getTypes().arrangeNullaryFunction();\n Function /*P*/ fn = $this().CGM.CreateGlobalInitOrDestructFunction(ty, new Twine(FnName.str()), \n FI, \n VD.getLocation());\n \n CGF/*J*/= new CodeGenFunction($this().CGM);\n \n CGF.StartFunction(new GlobalDecl($AddrOf(VD)), $this().CGM.getContext().VoidTy.$QualType(), fn, FI, $c$.track(new FunctionArgList())); $c$.clean();\n \n CallInst /*P*/ call = CGF.Builder.CreateCall_Value$P_ArrayRef$Value$P_Twine$C_MDNode$P(dtor, new ArrayRef<Value /*P*/ >(addr, true));\n {\n \n // Make sure the call and the callee agree on calling convention.\n Function /*P*/ dtorFn = dyn_cast_Function(dtor.stripPointerCasts());\n if ((dtorFn != null)) {\n call.setCallingConv(dtorFn.getCallingConv());\n }\n }\n \n CGF.FinishFunction();\n \n return fn;\n } finally {\n if (CGF != null) { CGF.$destroy(); }\n $c$.$destroy();\n }\n}",
"public final void cleanUp() {\n\t\tmgdmfunctions = null;\n\t\tmgdmlabels = null;\n\t\theap.finalize();\n\t\theap = null;\n\t\tSystem.gc();\n\t}",
"public native void destruirDatosTracker();",
"void decoller();",
"void initFunDecl() {\n\t\t_localVarID = 0;\r\n\t\t_labelID = 0;\r\n\t\t_tempVarID = 32;\r\n\t\t_lsymtable.clear();\r\n\t}",
"List<String> generateDeleteAllScript();",
"@Override\n protected void codeGenMain(DecacCompiler compiler, Registres regs, Pile p) {\n }",
"public void setGlobalVariables(GlobalVariables globalVariables);",
"public static void cleanUp() {\n\t\tHashDecay.stopAll();\n\t\tSystem.gc();\n\t}",
"@PreDestroy\n public void foo()\n {\n for (int i = 0; i < 10; i++)\n {\n for (int k = 0; k < 20; i++)\n {\n }\n }\n }",
"@Override\n\tpublic Integer visitGlobal_var_decl(ClangParser.Global_var_declContext ctx)\n {\n \treturn null;\n }",
"public void gc();",
"@Test(description = \"negative test if an global attribute is removed\")\n public void t20c_negativeTestGlobalAttributesRemoved()\n throws Exception\n {\n this.createNewData(\"Test\")\n .defData(\"attribute\", new AttributeData(this, \"Test Attribute\").setSingle(\"kind\", \"string\"))\n .create();\n this.createNewData(\"Test\")\n .failureUpdate(ErrorKey.DM_RELATION_REMOVE_GLOBAL_ATTRIBUTE);\n }",
"private static void gc() {\n System.gc();\n System.gc();\n }",
"@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 remDefinedInModule(){\n ((MvwDefinitionDMO) core).remDefinedInModule();\n }",
"public void fixupVariables(List<QName> vars, int globalsSize)\n {\n // no-op\n }",
"public static native void deleteAllTempArrays();",
"public void mergeGlobal() {\n if (global == null) return;\n // merge global nodes.\n Set set = Collections.singleton(GlobalNode.GLOBAL);\n global.replaceBy(set, true);\n nodes.remove(global);\n unifyAccessPaths(new LinkedHashSet(set));\n if (VERIFY_ASSERTIONS) {\n verifyNoReferences(global);\n }\n global = null;\n }",
"@Override\r\n\tpublic void debit() {\n\t\tSystem.out.println(\"Core Method of GC\");\r\n\t}",
"public static void main(String[] args) {\n\t\tAuto miAuto=new Auto(); // 3388\n\t\tAuto miOtroAuto=miAuto; // 3388\n\t\t\n\t\tmiAuto=new Auto();\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tSystem.gc();\n\t\t\n\t}",
"@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:32:47.222 -0500\", hash_original_method = \"0FC7F7395F602EA6BDC8C8831D80FE6E\", hash_generated_method = \"039E305D22D1CDB49DB823CD35120623\")\n \npublic void clearAll() {\n // Called on the UI thread.\n postMessage(Message.obtain(null, CLEAR_ALL));\n }",
"final void cleanUp() {\r\n\t\t\tfor (Variable var : varRefs.keySet()) {\r\n\t\t\t\tvar.deleteObserver(this);\r\n\t\t\t}\r\n\t\t\tvarRefs.clear();\r\n\t\t}",
"public void tearDown(boolean systemExit) {\n int status = 0;\n \n while (!atExitBlocks.empty()) {\n RubyProc proc = atExitBlocks.pop();\n try {\n proc.call(getCurrentContext(), IRubyObject.NULL_ARRAY);\n } catch (RaiseException rj) {\n RubyException raisedException = rj.getException();\n if (!getSystemExit().isInstance(raisedException)) {\n status = 1;\n printError(raisedException);\n } else {\n IRubyObject statusObj = raisedException.callMethod(\n getCurrentContext(), \"status\");\n if (statusObj != null && !statusObj.isNil()) {\n status = RubyNumeric.fix2int(statusObj);\n }\n }\n }\n }\n \n if (finalizers != null) {\n synchronized (finalizersMutex) {\n for (Iterator<Finalizable> finalIter = new ArrayList<Finalizable>(finalizers.keySet()).iterator(); finalIter.hasNext();) {\n Finalizable f = finalIter.next();\n if (f != null) {\n- f.finalize();\n+ try {\n+ f.finalize();\n+ } catch (Throwable t) {\n+ // ignore\n+ }\n }\n finalIter.remove();\n }\n }\n }\n \n synchronized (internalFinalizersMutex) {\n if (internalFinalizers != null) {\n for (Iterator<Finalizable> finalIter = new ArrayList<Finalizable>(\n internalFinalizers.keySet()).iterator(); finalIter.hasNext();) {\n Finalizable f = finalIter.next();\n if (f != null) {\n- f.finalize();\n+ try {\n+ f.finalize();\n+ } catch (Throwable t) {\n+ // ignore\n+ }\n }\n finalIter.remove();\n }\n }\n }\n \n getThreadService().disposeCurrentThread();\n \n getBeanManager().unregisterCompiler();\n getBeanManager().unregisterConfig();\n getBeanManager().unregisterParserStats();\n getBeanManager().unregisterClassCache();\n getBeanManager().unregisterMethodCache();\n \n if (systemExit && status != 0) {\n throw newSystemExit(status);\n }\n }",
"@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 13:00:49.364 -0500\", hash_original_method = \"2A27A75937E4BE02DA5FD7B031C4079A\", hash_generated_method = \"23BC72FFEAC2A16A0D3A8E2F49EBED8E\")\n \npublic void reset ()\n {\n contexts = new Context[32];\n namespaceDeclUris = false;\n contextPos = 0;\n contexts[contextPos] = currentContext = new Context();\n currentContext.declarePrefix(\"xml\", XMLNS);\n }",
"@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:59:45.509 -0500\", hash_original_method = \"C231E33C68F8FEC3C6EDCF993CA1BD7A\", hash_generated_method = \"60AE8F641AB448C2AE7DFA7C6F9FF823\")\n \npublic void disconnected() {\n mSrcContext = null;\n mSrcHandler = null;\n mSrcMessenger = null;\n mDstMessenger = null;\n mConnection = null;\n }",
"public static void gbpusdDErand(String dir) {\n \n /**\n * Settings of the evolutionary algorithm - Differential Evolution\n */\n \n Algorithm de;\n int dimension = dim; //Length of an individual - when using functions in GFS with maximum number of required arguments max_arg = 2, 2/3 are designated for program, 1/3 for constant values - for 60 it is 40 and 20\n int NP = 75; //Size of the population - number of competitive solutions\n int generations = gen; //Stopping criterion - number of generations in evolution\n int MAXFES = generations * NP; //Number of fitness function evaluations\n double f = 0.5, cr = 0.8; //Scaling factor f and crossover rate cr\n AP.util.random.Random generator = new AP.util.random.UniformRandom(); //Random number generator\n \n /**\n * Symbolic regression part\n * \n * Settings of the dataset which is regressed\n * Example: Sextic problem\n */\n \n // 50 points from range <-1, 1>, another type of data providing is possible\n double[][] dataset_points = dataset;\n ArrayList<AP_object> GFS = new ArrayList<>();\n GFS.add(new AP_Plus()); //Addition\n GFS.add(new AP_Sub()); //Subtraction\n GFS.add(new AP_Multiply()); //Mulitplication\n GFS.add(new AP_Div()); //Divison\n GFS.add(new AP_Abs());\n GFS.add(new AP_Cos());\n GFS.add(new AP_Cubic());\n GFS.add(new AP_Exp());\n GFS.add(new AP_Ln());\n GFS.add(new AP_Log10());\n GFS.add(new AP_Mod());\n GFS.add(new AP_Quad());\n GFS.add(new AP_Sin());\n GFS.add(new AP_Sigmoid());\n GFS.add(new AP_Sqrt());\n GFS.add(new AP_Tan());\n GFS.add(new AP_aTOb());\n GFS.add(new AP_x1()); //Independent variable x1\n// GFS.add(new AP_Const_static()); //Constant object - value is evolved in the extension of the individuals\n //More functions and terminals for GFS can be found or added to model.ap.objects\n \n double const_min = -10; //Minimum value of constants\n double const_max = 10; //Maximum value of constants\n \n APtf tf = new APdataset(dataset_points, GFS, const_min, const_max); //Dataset constructor\n\n /**\n * Additional variables\n */\n \n int runs = run_count; //Number of runs of the regression\n \n double min; //Helping variable for best individual in terms of fitness function value\n double[] bestArray = new double[runs]; //Array for statistics\n int i, best; //Additional helping variables\n\n /**\n * Runs of the algorithm with statistical analysis\n */\n for (int k = 0; k < runs; k++) {\n\n best = 0;\n i = 0;\n min = Double.MAX_VALUE;\n \n de = new AP_DErand1bin(dimension, NP, MAXFES, tf, generator, f, cr);\n\n de.run();\n\n PrintWriter writer;\n \n try {\n writer = new PrintWriter(dir + tf.name() + \"-DErand\" + k + \".txt\", \"UTF-8\");\n\n writer.print(\"{\");\n \n for (int ii = 0; ii < ((AP_DErand1bin)de).getBestHistory().size(); ii++) {\n\n writer.print(String.format(Locale.US, \"%.10f\", ((AP_DErand1bin)de).getBestHistory().get(ii).fitness));\n\n if (ii != ((AP_DErand1bin)de).getBestHistory().size() - 1) {\n writer.print(\",\");\n }\n\n }\n\n writer.print(\"}\");\n\n writer.close();\n\n } catch (FileNotFoundException | UnsupportedEncodingException ex) {\n Logger.getLogger(AP_LSHADE.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n bestArray[k] = de.getBest().fitness - tf.optimum();\n\n /**\n * AP best result value and equation.\n */\n\n System.out.println(\"=================================\");\n System.out.println(\"Best obtained fitness function value: \\n\" + (de.getBest().fitness - tf.optimum()));\n System.out.println(\"Equation: \\n\" + ((AP_Individual) de.getBest()).equation);\n System.out.println(\"Vector: \\n\" + Arrays.toString(((AP_Individual) de.getBest()).vector));\n System.out.println(\"=================================\");\n \n for(AP_Individual ind : ((AP_DErand1bin)de).getBestHistory()){\n i++;\n if(ind.fitness < min){\n min = ind.fitness;\n best = i;\n }\n if(ind.fitness == 0){\n System.out.println(\"Solution found in \" + i + \" CFE\");\n break;\n }\n }\n System.out.println(\"Best solution found in \" + best + \" CFE\");\n \n System.out.println(\"\\nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\\n\");\n \n \n }\n\n System.out.println(\"=================================\");\n System.out.println(\"Min: \" + DoubleStream.of(bestArray).min().getAsDouble());\n System.out.println(\"Max: \" + DoubleStream.of(bestArray).max().getAsDouble());\n System.out.println(\"Mean: \" + new Mean().evaluate(bestArray));\n System.out.println(\"Median: \" + new Median().evaluate(bestArray));\n System.out.println(\"Std. Dev.: \" + new StandardDeviation().evaluate(bestArray));\n System.out.println(\"=================================\");\n \n }",
"private void addGlobalNodes() {\n for (Procedure proc : globalProcSet) {\n CFGraph cfg = cfgMap.get(proc);\n// System.out.println(\"ExitNode Size: \" + cfg.getExitNodes().size() + \", proc: \" + proc.getSymbolName());\n DFANode node = cfg.getEntry();\n // entry cfgNode\n DFANode entryNode = new DFANode();\n entryNode.putData(\"cfg_node\", node);\n entryNode.putData(\"psg_type\", \"entry\");\n accessIdxMap.put(\"entry_\" + proc.getSymbolName(), entryNode);\n node.putData(\"psg_entry_global\", entryNode);\n // exit cfgNode\n List<DFANode> exitNodeList = cfg.getExitNodes();\n int idx = 0;\n for (DFANode dfaNode : exitNodeList) {\n DFANode exitNode = new DFANode();\n exitNode.putData(\"cfg_node\", dfaNode);\n exitNode.putData(\"psg_type\", \"exit\");\n accessIdxMap.put(\"exit_\" + proc.getSymbolName() + idx++, exitNode);\n dfaNode.putData(\"psg_exit_global\", exitNode);\n }\n }\n\n // add call and return cfgNode (must check all the procs)\n for (Procedure proc : procList) {\n CFGraph cfg = cfgMap.get(proc);\n Iterator cfgIter = cfg.iterator();\n while (cfgIter.hasNext()) {\n DFANode node = (DFANode) cfgIter.next();\n Traversable currentIR = (Traversable) CFGraph.getIR(node);\n if (currentIR == null) {\n continue;\n }\n List<FunctionCall> fcList = IRTools.getFunctionCalls(currentIR);\n if (fcList == null || fcList.size() == 0) {\n continue;\n }\n Set<DFANode> callList = new HashSet<DFANode>();\n Set<DFANode> returnList = new HashSet<DFANode>();\n for (FunctionCall fc : fcList) {\n Procedure callee = fc.getProcedure();\n if (callee == null) {\n continue;\n }\n if (globalProcSet.contains(callee) == false) {\n continue;\n }\n DFANode callNode = new DFANode();\n callNode.putData(\"cfg_node\", node);\n callNode.putData(\"psg_type\", \"call\");\n callNode.putData(\"proc\", callee);\n callList.add(callNode);\n DFANode entryNode = accessIdxMap.get(\"entry_\" + callee.getSymbolName());\n if (entryNode == null) {\n throw new RuntimeException(\"No Entry Node found: \" + \"entry_\" + callee.getSymbolName());\n }\n callNode.addSucc(entryNode);\n entryNode.addPred(callNode);\n // return\n DFANode returnNode = new DFANode();\n returnNode.putData(\"cfg_node\", node);\n returnNode.putData(\"psg_type\", \"return\");\n returnNode.putData(\"proc\", callee);\n returnList.add(returnNode);\n CFGraph cfgCallee = cfgMap.get(callee);\n List<DFANode> calleeExitList = cfgCallee.getExitNodes();\n for (int idx = 0; idx < calleeExitList.size(); idx++) {\n DFANode exitNode = accessIdxMap.get(\"exit_\" + callee.getSymbolName() + idx);\n if (exitNode == null) {\n throw new RuntimeException(\"No Exit Node found: \" + \"exit_\" + callee.getSymbolName());\n }\n returnNode.addPred(exitNode);\n exitNode.addSucc(returnNode);\n }\n }\n if (callList.size() > 0) {\n node.putData(\"psg_call_global\", callList);\n }\n if (returnList.size() > 0) {\n node.putData(\"psg_return_global\", returnList);\n }\n }\n }\n }",
"public GlobalVariable() {\n }",
"public interface IGlobals {\n public void reset();\n}",
"private List<GlobalState> generateGlobalStates(List<Node> nodes) {\n // Creating a list of global states with an empty state\n List<GlobalState> gStates = new ArrayList();\n gStates.add(new GlobalState(nodes,binding));\n \n // Generating all possible global states\n for(Node n : nodes) {\n // Generating a new list of global states by adding a new pair\n // for each state of current node to those already generated\n List<GlobalState> newGStates = new ArrayList();\n for(String s : n.getProtocol().getStates()) {\n for(GlobalState g : gStates) {\n GlobalState newG = new GlobalState(nodes,binding);\n newG.addMapping(g);\n newG.addMapping(n.getName(),s);\n newGStates.add(newG);\n }\n }\n // Updating the list of global states with the new one\n gStates = newGStates;\n }\n return gStates;\n }",
"public static void Finalize() {\n isReady = false;\n\n try {\n for (RemoteField f : exported)\n UnicastRemoteObject.unexportObject(f, true);\n if (registry != null)\n UnicastRemoteObject.unexportObject(registry, true);\n } catch (Exception e) {\n e.printStackTrace();\n System.exit(-1);\n }\n }",
"public static void generateTiny(boolean regalloc){\n\t\tRegisterHandler regHand = null;\n\t\tif (regalloc){\n\t\t\tregHand = new RegisterHandler(4, allTables);\n\t\t}else{\n\t\t\tregHand = new RegisterHandler(0, allTables);\n\t\t}\n\t\t// int to keep track of liveness line within function\n\t\tint liveLine = -1;\n\t\t// cfgraph of the function in use\n\t\tCFGraph liveness = null;\n\t\t// linked list for tiny code generated by the Register Handler\n\t\tLinkedList<String> regcode = null;\n\t\tString fname = \"Global\";\n\t\tregHand.setFunctionName(fname);\n\t\t// reserve variables\n\t\tSymbolTable globTable = allTables.getSymbolTable(\"Global\");\n\t\tArrayList<Symbol> symbols = globTable.getSymbols();\n\t\tfor (int i=0; i<symbols.size();i++){\n\t\t\tif (symbols.get(i).getType().equalsIgnoreCase(\"string\")){\n\t\t\t\ttinycode.add(\"str \" + symbols.get(i).getName() + \" \" + symbols.get(i).getString());\n\t\t\t}else{\n\t\t\t\ttinycode.add(\"var \"+symbols.get(i).getName());\n\t\t\t}\n\t\t}\n\n\t\t// push registers on to stack\n\t\ttinycode.add(\"push\");\n\t\ttinycode.add(\"push r0\");\n\t\ttinycode.add(\"push r1\");\n\t\ttinycode.add(\"push r2\");\n\t\ttinycode.add(\"push r3\");\n\t\ttinycode.add(\"jsr main\");\n\t\ttinycode.add(\"sys halt\");\n\t\t// ArrayList to keep track of the temporaries in use\n\t\tArrayList<String> temps = new ArrayList<String>();\n\n\t\t// Loop through IR code generating tiny code\n\t\tListIterator<ThreeOpCode> iter = ircode.listIterator();\n\n\t\twhile (iter.hasNext()){\n\t\t\tThreeOpCode topcode = iter.next();\n\t\t\t//System.out.println(topcode.opcode + topcode.op1);\n\t\t\tif (topcode.opcode.equals(\"RET\")){ // Function definition (Main only for this step)\n\t\t\t\tregHand.setMyRegistersFree();\n\t\t\t\ttinycode.add(\"unlnk\");\n\t\t\t\ttinycode.add(\"ret\"); //create function label\n\t\t\t\t// reset the liveness line variable\n\t\t\t\tliveLine = -1;\n\t\t\t}\n\t\t\telse if (topcode.opcode.equals(\"POP\")){\n\t\t\t\tif (topcode.op1 != null){\n\t\t\t\t\ttinycode.add(\"pop r\" + regHand.ensure(topcode.op1));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\ttinycode.add(\"pop\");\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (topcode.opcode.equals(\"PUSH\")){\n\t\t\t\tif (topcode.op1 != null){\n\t\t\t\t\ttinycode.add(\"push \" + allTables.getTinyVar(fname, topcode.op1));\n\t\t\t\t}else {\n\t\t\t\t\ttinycode.add(\"push\");\n\t\t\t\t}\n\t\t\t} // catch store instructions, map temperatires to registers or copy op\n\t\t\telse if (topcode.opcode.equals(\"READR\") || topcode.opcode.equals(\"READI\")){\n\t\t\t\ttinycode.add(\"sys \" + topcode.opcode.toLowerCase() + \" \" + allTables.getTinyVar(fname,topcode.op1));\n\t\t\t} \n\t\t\telse if (topcode.opcode.contains(\"JSR\")){\n\t\t\t\t// jsr from main, add function calls generated by FunctionTree(main)\n\t\t\t\tif (!topcode.op1.contains(\"main\")){\n\t\t\t\t\t//System.out.println(\"jsr: \" + topcode.op1+\" \"+ funcTrees.containsKey(topcode.op1.trim()));\n\t\t\t\t\tregHand.setMyRegistersFree();\n\n\n\t\t\t\t\tArrayList<String>fcall = funcTrees.get(\"main\").generateTinyFunctionCall(funcTrees.get(topcode.op1), funcTrees.get(fname));\n\n\n\t\t\t\t\tfor (int i=0; i<fcall.size(); i++){\n\t\t\t\t\t\ttinycode.add(fcall.get(i));\n\t\t\t\t\t}\n\t\t\t\t\t//\t\t\t\t\tif (fcall.get(fcall.size()-1) != null){\n\t\t\t\t\t//\t\t\t\t\t\tint r = regHand.ensure(funcTrees.get(topcode.op1).getReturnValue());\n\t\t\t\t\t//\t\t\t\t\t\t//tinycode.add(fcall.get(fcall.size()-1).concat(Integer.toString(temps.size())));\n\t\t\t\t\t//\t\t\t\t\t\ttinycode.add(fcall.get(fcall.size()-1).concat(Integer.toString(r)));\n\t\t\t\t\t//\t\t\t\t\t}\n\t\t\t\t\t//temps.add(funcTrees.get(topcode.op1).getReturnValue());\n\t\t\t\t}\n\n\t\t\t}// test for conditional branch\n\t\t\telse if (topcode.opcode.equals(\"STOREI\") || topcode.opcode.equals(\"STOREF\")){\n\n\n\t\t\t\t//only one op is memory or stack variable\n\n\t\t\t\tif (topcode.op1.contains(\"$\")){\n\t\t\t\t\ttinycode.add(\"move r\" + regHand.ensure(topcode.op1) + \" \" + allTables.getTinyVar(fname, topcode.op2));\n\t\t\t\t}else if (!topcode.op2.equals(\"$R\")){\n\n\t\t\t\t\tif (allTables.isGlobal(topcode.op2)){\n\t\t\t\t\t\ttinycode.add(\"move \" + topcode.op1 + \" \" + topcode.op2);\n\t\t\t\t\t}else {\n\t\t\t\t\t\ttinycode.add(\"move \" + topcode.op1 + \" r\" + regHand.ensure(topcode.op2));\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\t//System.out.println(regHand.ensure(topcode.op1));\n\t\t\t\t//System.out.println(allTables.getTinyVar(fname, topcode.op2));\n\t\t\t\tif (topcode.op2.equals(\"$R\")){\n\t\t\t\t\tif (!allTables.getTinyVar(fname, topcode.op1).equals(\"0\") ){\n\t\t\t\t\t\ttinycode.add(\"move \" + allTables.getTinyVar(fname, topcode.op1) + \" r\" + regHand.ensure(\"$S\"));\n\t\t\t\t\t}else{\n\t\t\t\t\t\ttinycode.add(\"move \" + topcode.op1 + \" r\" + regHand.ensure(\"$S\"));\n\t\t\t\t\t}\n\t\t\t\t\ttinycode.add(\"move r\" + regHand.ensure(\"$S\") + \" $\" + Integer.toString(6+allTables.getNumberOfParameters(fname)));\n\t\t\t\t}\n\n\t\t\t\t/*String s =\"move \";\n\t\t\t\tif (!topcode.op1.contains(\"$\")){\n\t\t\t\t\tLinkedList<String> scode = regHand.ensureStore(topcode.op1);\n\t\t\t\t\tif (scode != null){\n\t\t\t\t\t\t// tiny code has been generated to mov op1 into register\n\t\t\t\t\t\tfor (int h=0; h<scode.size(); h++){\n\t\t\t\t\t\t\ttinycode.add(scode.get(h));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\ts = s.concat(\"r\"+Integer.toString(regHand.ensure(topcode.op1)) + \" \");\n\t\t\t\t// if second op is a temp (already in a register) set its register to op1s value\n\t\t\t\tif (topcode.op2.contains(\"$\")){\n\t\t\t\t\tregHand.setRegisterVarName(regHand.ensure(topcode.op1), topcode.op2);\n\t\t\t\t\ts = s.concat(\"r\"+ regHand.ensure(topcode.op2));\n\t\t\t\t}\n\t\t\t\telse{\n\n\t\t\t\t}*/\n\t\t\t\t//\t\t\t\tif (topcode.op1.contains(\"$\")){\n\t\t\t\t////\t\t\t\t\tif (temps.indexOf(topcode.op1) == -1){ // same temperary that is in use\n\t\t\t\t////\t\t\t\t\t\ttemps.add(topcode.op1);\n\t\t\t\t////\t\t\t\t\t}\n\t\t\t\t////\t\t\t\t\ts = s.concat(\"r\"+ temps.indexOf(topcode.op1) +\" \");//could mess up if regnum is currently 0\n\t\t\t\t//\t\t\t\t\tLinkedList<String> scode = regHand.ensureStore(topcode.op1);\n\t\t\t\t//\t\t\t\t\tif (scode != null){\n\t\t\t\t//\t\t\t\t\t\t// tiny code has been generated to mov op1 into register\n\t\t\t\t//\t\t\t\t\t\tfor (int h=0; h<scode.size(); h++){\n\t\t\t\t//\t\t\t\t\t\t\ttinycode.add(scode.get(h));\n\t\t\t\t//\t\t\t\t\t\t}\n\t\t\t\t//\t\t\t\t\t}\n\t\t\t\t//\t\t\t\t\ts = s.concat(\"r\"+Integer.toString(regHand.ensure(topcode.op1)) + \" \");\n\t\t\t\t//\t\t\t\t} // didn't find it in symbol tables, number\n\t\t\t\t//\t\t\t\telse if (allTables.getTinyVar(fname,topcode.op1) == \"0\"){\n\t\t\t\t//\t\t\t\t\ts = s.concat(topcode.op1 + \" \");\n\t\t\t\t//\t\t\t\t}\n\t\t\t\t//\t\t\t\telse{ // string or global variable matched \n\t\t\t\t//\t\t\t\t\tLinkedList<String> scode = regHand.ensureStore(topcode.op1);\n\t\t\t\t//\t\t\t\t\tif (scode != null){\n\t\t\t\t//\t\t\t\t\t\t// tiny code has been generated to mov op1 into register\n\t\t\t\t//\t\t\t\t\t\tfor (int h=0; h<scode.size(); h++){\n\t\t\t\t//\t\t\t\t\t\t\ttinycode.add(scode.get(h));\n\t\t\t\t//\t\t\t\t\t\t}\n\t\t\t\t//\t\t\t\t\t}\n\t\t\t\t//\t\t\t\t\ts = s.concat(allTables.getTinyVar(fname,topcode.op1) + \" \");\n\t\t\t\t//\t\t\t\t}\n\t\t\t\t//\t\t\t\t// op2\n\t\t\t\t//\t\t\t\tif (topcode.op2.contains(\"$\")){ \n\t\t\t\t//\t\t\t\t\t//System.out.println(topcode.op2 +\"regnum: \" + Integer.toString(regnum));\n\t\t\t\t////\t\t\t\t\tif (temps.indexOf(topcode.op2) == -1){ // same temperary that is in use\n\t\t\t\t////\t\t\t\t\t\ttemps.add(topcode.op2);\n\t\t\t\t////\t\t\t\t\t}\t\n\t\t\t\t////\t\t\t\t\ts = s.concat(\"r\"+ temps.indexOf(topcode.op2));\n\t\t\t\t//\t\t\t\t\tLinkedList<String> scode = regHand.ensureStore(topcode.op2);\n\t\t\t\t//\t\t\t\t\tif (scode != null){\n\t\t\t\t//\t\t\t\t\t\t// tiny code has been generated to mov op1 into register\n\t\t\t\t//\t\t\t\t\t\tfor (int h=0; h<scode.size(); h++){\n\t\t\t\t//\t\t\t\t\t\t\ttinycode.add(scode.get(h));\n\t\t\t\t//\t\t\t\t\t\t}\n\t\t\t\t//\t\t\t\t\t}\n\t\t\t\t//\t\t\t\t\ts = s.concat(\"r\"+Integer.toString(regHand.ensure(topcode.op2)));\n\t\t\t\t//\t\t\t\t}else{ //variable\n\t\t\t\t//\t\t\t\t\tLinkedList<String> scode = regHand.ensureStore(topcode.op2);\n\t\t\t\t//\t\t\t\t\tif (scode != null){\n\t\t\t\t//\t\t\t\t\t\t// tiny code has been generated to mov op1 into register\n\t\t\t\t//\t\t\t\t\t\tfor (int h=0; h<scode.size(); h++){\n\t\t\t\t//\t\t\t\t\t\t\ttinycode.add(scode.get(h));\n\t\t\t\t//\t\t\t\t\t\t}\n\t\t\t\t//\t\t\t\t\t}\n\t\t\t\t//\t\t\t\t\ts = s.concat(\"r\"+Integer.toString(regHand.ensure(topcode.op2)));\n\t\t\t\t//\t\t\t\t\t// s = s.concat(allTables.getTinyVar(fname,topcode.op2));\n\t\t\t\t//\t\t\t\t}\n\n\t\t\t} // Catch Write statements\n\t\t\telse if (topcode.opcode.equals(\"WRITEI\") || topcode.opcode.equals(\"WRITER\")|| topcode.opcode.equals(\"WRITES\")){\n\t\t\t\ttinycode.add(\"sys \" + topcode.opcode.toLowerCase() + \" \" + allTables.getTinyVar(fname,topcode.op1));\n\t\t\t\t//System.out.println(topcode.op1 + \": \"+allTables.getTinyVar(fname,topcode.op1));\n\t\t\t}// catch add statements\n\t\t\telse if (topcode.opcode.contains(\"ADD\") || topcode.opcode.contains(\"MUL\") || topcode.opcode.contains(\"DIV\") || topcode.opcode.contains(\"SUB\")){\n\t\t\t\t// where it was\n\t\t\t\tboolean temp1 = topcode.op1.contains(\"$\");\n\t\t\t\tboolean temp2 = topcode.op2.contains(\"$\");\n\n\t\t\t\tString s = \"\";\n\n\t\t\t\t//reg\n\t\t\t\ts = topcode.opcode.toLowerCase() + \" r\" + Integer.toString(regHand.ensure(topcode.op2)) + \" r\" + Integer.toString(regHand.ensure(topcode.op1));\n\n\t\t\t\ttinycode.add(s);\n\n\t\t\t\ttinycode.add(\"move r\" + Integer.toString(regHand.ensure(topcode.op1)) + \" r\" + Integer.toString(regHand.ensure(topcode.op3)));\n\t\t\t} \n\t\t\telse if (topcode.opcode.contains(\"LABEL\")){\n\t\t\t\ttinycode.add(\"label \" + topcode.op1);\n\t\t\t}\n\t\t\telse if (topcode.opcode.contains(\"LINK\")){\n\t\t\t\tfname = ircode.get(iter.previousIndex()-1).op1;\n\t\t\t\tregHand.setFunctionName(fname);\n\t\t\t\ttinycode.add(\"link \" + Integer.toString(funcTrees.get(fname).getLink()));\n\t\t\t\t//set liveness for the new function\n\t\t\t\t// search for function in CFGraphs and set liveness to that function's\n\t\t\t\tfor (int g = 0; g < cfgraphs.size(); g++){\n\t\t\t\t\t// found it, set liveness to match the function's liveness\n\t\t\t\t\tif (cfgraphs.get(g).getFname().equals(fname)){\n\t\t\t\t\t\tliveness = cfgraphs.get(g);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}// test for conditional branch\n\t\t\telse if (topcode.opcode.contains(\"NE\") || topcode.opcode.contains(\"EQ\") || topcode.opcode.contains(\"GE\") || topcode.opcode.contains(\"LE\")){\n\t\t\t\t// compare incremented variable (op1) to the register of op2\n\t\t\t\ttinycode.add(\"cmpi \" + allTables.getTinyVar(fname,topcode.op1) + \" r\" + regHand.ensure(topcode.op2));\n\t\t\t\ttinycode.add(\"j\".concat(topcode.opcode.toLowerCase()) + \" label\".concat(topcode.op3.substring(5)));\n\t\t\t}\n\t\t\t//Allen TODO unconditional jumps weren't accounted for, but they directly translate\n\t\t\telse if (topcode.opcode.contains(\"JUMP\")){\n\t\t\t\ttinycode.add(\"jmp \" + topcode.op1);\n\t\t\t}\n\t\t\t// if register allocation is enabled update temps to reflect variables in registers\n\t\t\tif (regalloc && (liveLine > -1) && (liveLine < liveness.getSize())){\n\t\t\t\t// process the next instruction, if register allocation code is needed add to tinycode\n\t\t\t\t//System.out.println(topcode.opcode + \" \"+ircode.get(iter.nextIndex()).opcode);\n\n\t\t\t\tregcode = regHand.processThreeOpCode(ircode.get(iter.nextIndex()),liveness.getLiveness(liveLine));\n\t\t\t\t//System.out.println(\"regcode: \" + regcode);\n\t\t\t\t// add the register code to tinycode list, add the return value to list of vals in registers\n\n\t\t\t\tif (regcode != null){\n\t\t\t\t\tfor (int t=0; t<regcode.size()-1; t++){\n\t\t\t\t\t\ttinycode.add(regcode.get(t));\n\t\t\t\t\t}\n\t\t\t\t\t// index in temps is equal to the register the value is assigned to, put the return\n\t\t\t\t\t// in the proper place in temps\n\t\t\t\t\t//temps.set(Integer.parseInt(regcode.get(regcode.size()-1)), ircode.get(iter.nextIndex()).op3);\n\t\t\t\t}\n\t\t\t\t//\t\t\t\ttemps.clear();\n\t\t\t\t//\t\t\t\ttemps = regHand.getTemps();z\n\t\t\t}\n\n\t\t\tliveLine++;\n\n\t\t}\n\n\t\t// add the final return code for the program\n\t\ttinycode.add(\"unlnk\");\n\t\ttinycode.add(\"ret\");\n\t\ttinycode.add(\"end\");\n\t\t//tinycode.add(\"\");\n\t}",
"@AfterClass\n\tpublic static void teardown() {\n\t\tmatrixAdditionCalculator = null;\n\n\t}",
"public static void main(String[] args) {\n\r\n\t\tGarbagecollection g1 = new Garbagecollection();\r\n\t\t\r\n\t\tGarbagecollection g2 = new Garbagecollection();\r\n\t\t\r\n\t\tg1=null;\r\n\t\tg2=null;\r\n\t\tSystem.gc();\r\n\t}",
"public static String _process_globals() throws Exception{\n_vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv5 = new anywheresoftware.b4a.objects.Timer();\n //BA.debugLineNum = 10;BA.debugLine=\"Private TimerAnimacionEntrada As Timer\";\n_vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv6 = new anywheresoftware.b4a.objects.Timer();\n //BA.debugLineNum = 11;BA.debugLine=\"End Sub\";\nreturn \"\";\n}",
"private void worldTimerDecrementer() {\n worldTimer--;\n }",
"@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/tools/clang/include/clang/AST/DeclTemplate.h\", line = 2755,\n FQN=\"clang::VarTemplateDecl::Common::~Common\", NM=\"_ZN5clang15VarTemplateDecl6CommonD0Ev\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.clang.ast/llvmToClangType ${LLVM_SRC}/llvm/tools/clang/lib/AST/DeclTemplate.cpp -nm=_ZN5clang15VarTemplateDecl6CommonD0Ev\")\n //</editor-fold>\n public /*inline*/ void $destroy() {\n //START JDestroy\n PartialSpecializations.$destroy();\n Specializations.$destroy();\n super.$destroy();\n //END JDestroy\n }",
"void initGlobalAttributes() {\n\n\t}",
"private static void cleanUpGlobalStateAndFileStore() {\n FileUtils.deleteDirectory(Paths.get(GLOBAL_STATE_DIR));\n }",
"public void internal_dispose_GC (int phGC, GCData data) {\n\tOS.PgDestroyGC(phGC);\r\n}",
"public static EvalEnv genExampleEnv2()\n {\n EvalEnv result = new EvalEnv();\n result.createVariable(Boolean.class, true);\n result.createVariable(Boolean.class, true);\n for (int x = 0; x < Environment.HalfObsWidth * 2; x++)\n {\n for (int y = 0; y < Environment.HalfObsHeight * 2; y++)\n {\n result.createVariable(Integer.class, 0);\n }\n }\n\n for (int i = 0; i < 5; i++)\n {\n result.createVariable(Integer.class, -1);\n result.createVariable(Float.class, -100.0);\n result.createVariable(Float.class, 10.0);\n }\n return result;\n }",
"@DSComment(\"Private Method\")\n @DSBan(DSCat.PRIVATE_METHOD)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:32:42.000 -0500\", hash_original_method = \"46D026C452E34CB5D17D4D7413C83210\", hash_generated_method = \"78C5016E7109D19F8AD63CF42C68ACE4\")\n \n private void nativeFinalize(){\n }",
"void cleanup();",
"void cleanup();",
"void cleanup();",
"@AfterClass // codigo que se ejecuta una unica vez al final de la clase\r\n\tpublic static void afterClass() {\n\t\tSystem.out.println(\"AfterClass()\");\r\n\t\tcalc.clear();\r\n\t}",
"abstract public void deleteAfterBetaReduction();",
"public void cleanup();",
"@After\r\n\tpublic void cleanup() {\n\t}",
"void generateGC(UDPAddress sender, int gcNum) {\n // PRAGMA [DEBUG] Debug.out.println(\"Sending GC message to \" + sender + \" with val \" + gcNum);\n generateControlMessage(sender, gcNum, UDPTransportLayer.MESSAGE_TYPE_GC);\n }",
"private Map<String, Object> collectGlobals() {\n ImmutableMap.Builder<String, Object> envBuilder = ImmutableMap.builder();\n MethodLibrary.addBindingsToBuilder(envBuilder);\n Runtime.addConstantsToBuilder(envBuilder);\n return envBuilder.build();\n }",
"public void setGlobalVariables(GlobalVariables globalVariables) {\n this.globalVariables = globalVariables;\n }",
"public native void destruirTracker();",
"@Override\n\tpublic void onDestroy() {\n\t\tsuper.DeInit();\n\t\tsuper.onDestroy();\n\t}",
"public static void gc() {\n // Collecting RAM before collecting EEPROM means that only live objects\n // in RAM with pointers to EEPROM will be considered as roots while\n // marking EEPROM objects.\n Native.gc();\n\n int wordSize = Native.getPersistentMemorySize()/4;\n try {\n int[] bitVector = new int[(wordSize / 32) + 2];\n int[] markingStack = new int[GC_MARK_STACK_SIZE];\n Native.gcPersistentMemory(bitVector, markingStack);\n } catch (OutOfMemoryError oome) {\n throw new OutOfMemoryError(\"Cannot allocate auxillary data structures for persistent gc\");\n }\n }",
"public static native void OpenMM_AmoebaGeneralizedKirkwoodForce_destroy(PointerByReference target);",
"@AfterMethod(alwaysRun = true)\n\tpublic void tearDown_global() throws Exception {\n\n\t\ttry {\n\t\t\tpassed = AssertionHelper.assertValue(this.checkpoints);\n\t\t\tpassed = true;\n\n\t\t} catch (Exception e) {\n\t\t} finally {\n\t\t\tHelper.pause(1000);\n\t\t\tswitch (sBrowser) {\n\t\t\tcase \"FireFox\":\n\t\t\t\tSeleniumBrowsers.quitDriver();\n\t\t\t\tbreak;\n\t\t\tcase \"Chrome\":\n\t\t\t\tSeleniumBrowsers.quitDriver();\n\t\t\t\tbreak;\n\t\t\tcase \"IE\":\n\t\t\t\tSeleniumBrowsers.quitDriver();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tSeleniumBrowsers.closeBrowser();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tString verificationErrorString = verificationErrors.toString();\n\t\tif (!\"\".equals(verificationErrorString)) {\n\t\t\tAssert.fail(verificationErrorString);\n\t\t}\n\t}",
"public void deleteGeneratedFiles();",
"public Builder clearBbgGlobalId() {\n bitField0_ = (bitField0_ & ~0x00000800);\n bbgGlobalId_ = getDefaultInstance().getBbgGlobalId();\n onChanged();\n return this;\n }",
"public static void destroy() {\n\t}",
"@Override\n\tpublic void cleanup() {\n\t\t\n\t}",
"@Override\n\tpublic void cleanup() {\n\t\t\n\t}",
"@Override\n\tpublic void cleanup() {\n\t\t\n\t}",
"boolean mo4832a(C0167gc gcVar);",
"public void removeGlobalObject(String uniqueId) {\n\t\tfor (int index = 0; index < objects.size(); index++) {\n\t\t\tif (objects.get(index).doorUniqueId.equals(uniqueId)) {\n\t\t\t\tobjects.remove(index);\n\t\t\t\tindex--;\n\t\t\t}\n\t\t}\n\t}",
"public void delContextNodes();",
"@AfterClass\n public void cleanUp() {\n }",
"public static native void meDestroy(long lpjFbxStatistics);",
"public static void bgfx_shutdown() {\n long __functionAddress = Functions.shutdown;\n invokeV(__functionAddress);\n }",
"public static native void Destroy(long lpjFbxDataType);",
"@After\n public void destroyCalc(){\n calculator = null;\n System.out.println(\"I am AfterMethod\");\n }",
"private Globals() {\n\n\t}",
"@DSSafe(DSCat.SAFE_OTHERS)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2014-02-25 10:38:11.973 -0500\", hash_original_method = \"1269355D60D7190EAE617D5C71982259\", hash_generated_method = \"5E1FC5222F1D24E03DD02D8882E1411F\")\n \npublic CharGenUDPClient()\n {\n // CharGen return packets have a maximum length of 512\n __receiveData = new byte[512];\n __receivePacket = new DatagramPacket(__receiveData, 512);\n __sendPacket = new DatagramPacket(new byte[0], 0);\n }",
"public void cleanup() {\n\t}",
"public void switchToGlobalContext(){\n currentConstants = null;\n currentVariables = null;\n\n temporaryConstants = null;\n temporaryVariables = null;\n }",
"public static void main(String[] args) {\nGarbagecollection s1=new Garbagecollection();\r\nGarbagecollection s2=new Garbagecollection();\r\ns1=null;\r\ns2=null;\r\nSystem.gc();\r\n\t}",
"@After\n public void teardown() {\n RoboGuice.Util.reset();\n }",
"void unregisterAll();",
"public void cleanup() {\r\n }",
"@Override // ohos.agp.render.render3d.impl.CoreComponentManager\r\n public void delete() {\r\n synchronized (this.delLock) {\r\n if (this.agpCptrMorphComponentMgr != 0) {\r\n if (!this.isAgpCmemOwn) {\r\n this.agpCptrMorphComponentMgr = 0;\r\n } else {\r\n this.isAgpCmemOwn = false;\r\n throw new UnsupportedOperationException(\"C++ destructor does not have public access\");\r\n }\r\n }\r\n super.delete();\r\n }\r\n }",
"void destroyWithClearVisitorData();",
"@Override\n\tpublic void cleanup() {\n\n\t}",
"@Override\n\tpublic void cleanup() {\n\n\t}",
"void endGeneration();",
"@AfterClass\n\tpublic static void tearDownAfterClass() throws Exception {\n\t\tydelseService = null;\n\t}",
"public static void onVMDeath() {\n \tDeferredExecution.stopProcessors();\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}",
"@AfterClass\n\tpublic static void teardown() {\n\t\tdataMunger = null;\n\n\t}",
"@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/lib/IR/Constants.cpp\", line = 1351,\n FQN=\"llvm::UndefValue::destroyConstantImpl\", NM=\"_ZN4llvm10UndefValue19destroyConstantImplEv\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/Constants.cpp -nm=_ZN4llvm10UndefValue19destroyConstantImplEv\")\n //</editor-fold>\n /*friend*//*package*//*private*/ void destroyConstantImpl() {\n // Free the constant and any dangling references to it.\n getContext().pImpl.UVConstants.erase(getType());\n }"
] | [
"0.5641969",
"0.5533469",
"0.53554654",
"0.499161",
"0.49759528",
"0.48253208",
"0.48081535",
"0.48057768",
"0.4782918",
"0.47495493",
"0.47186756",
"0.46901846",
"0.46815702",
"0.46690407",
"0.46600297",
"0.46533918",
"0.46347457",
"0.46275482",
"0.45911294",
"0.45793512",
"0.4571777",
"0.45672205",
"0.45657793",
"0.45584348",
"0.45351157",
"0.4516284",
"0.45003757",
"0.44764492",
"0.44727373",
"0.4466171",
"0.4465495",
"0.44568107",
"0.4451845",
"0.4449432",
"0.4412974",
"0.44115365",
"0.44103155",
"0.4406946",
"0.4399828",
"0.43974972",
"0.43892038",
"0.43766356",
"0.43723494",
"0.43676814",
"0.4362767",
"0.43498203",
"0.43461308",
"0.43434066",
"0.43422374",
"0.43415013",
"0.433987",
"0.43255967",
"0.4324129",
"0.43047947",
"0.43047947",
"0.43047947",
"0.42977098",
"0.4286321",
"0.42858",
"0.4282268",
"0.42813495",
"0.42731977",
"0.42713922",
"0.42681322",
"0.4266377",
"0.4263906",
"0.42582494",
"0.42482013",
"0.42469206",
"0.424685",
"0.42419958",
"0.4237014",
"0.4237014",
"0.4237014",
"0.4236106",
"0.42340672",
"0.42287782",
"0.42283693",
"0.42210695",
"0.42181405",
"0.42177576",
"0.4210829",
"0.4207724",
"0.42068854",
"0.4206375",
"0.41976643",
"0.4197488",
"0.41958365",
"0.41952997",
"0.41897967",
"0.41889885",
"0.4188248",
"0.41844168",
"0.41844168",
"0.41841903",
"0.41831422",
"0.41798007",
"0.41759485",
"0.41751525",
"0.41736594"
] | 0.5930132 | 0 |
/ Emit the code necessary to initialize the given global variable. | @Converted(kind = Converted.Kind.AUTO,
source = "${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp", line = 495,
FQN="clang::CodeGen::CodeGenFunction::GenerateCXXGlobalVarDeclInitFunc", NM="_ZN5clang7CodeGen15CodeGenFunction32GenerateCXXGlobalVarDeclInitFuncEPN4llvm8FunctionEPKNS_7VarDeclEPNS2_14GlobalVariableEb",
cmd="jclank.sh -java-options=${SPUTNIK}/modules/org.clang.codegen/llvmToClangType -split-class=clang::CodeGen::CodeGenFunction@this ${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp -nm=_ZN5clang7CodeGen15CodeGenFunction32GenerateCXXGlobalVarDeclInitFuncEPN4llvm8FunctionEPKNS_7VarDeclEPNS2_14GlobalVariableEb")
//</editor-fold>
public final void GenerateCXXGlobalVarDeclInitFunc(Function /*P*/ Fn,
/*const*/ VarDecl /*P*/ D,
GlobalVariable /*P*/ Addr,
boolean PerformInit) {
JavaCleaner $c$ = $createJavaCleaner();
try {
// Check if we need to emit debug info for variable initializer.
if (D.hasAttr(NoDebugAttr.class)) {
$this().DebugInfo = null; // disable debug info indefinitely for this function
}
$this().CurEHLocation.$assignMove(D.getLocStart());
$this().StartFunction(new GlobalDecl(D), $this().getContext().VoidTy.$QualType(), Fn,
$this().getTypes().arrangeNullaryFunction(),
$c$.track(new FunctionArgList()), D.getLocation(),
D.getInit$Const().getExprLoc()); $c$.clean();
// Use guarded initialization if the global variable is weak. This
// occurs for, e.g., instantiated static data members and
// definitions explicitly marked weak.
if (Addr.hasWeakLinkage() || Addr.hasLinkOnceLinkage()) {
$this().EmitCXXGuardedInit($Deref(D), Addr, PerformInit);
} else {
$this().EmitCXXGlobalVarDeclInit($Deref(D), Addr, PerformInit);
}
$this().FinishFunction();
} finally {
$c$.$destroy();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String generateRuntimeInitialization();",
"protected void initVars() {}",
"public static void init() {}",
"void initFunDecl() {\n\t\t_localVarID = 0;\r\n\t\t_labelID = 0;\r\n\t\t_tempVarID = 32;\r\n\t\t_lsymtable.clear();\r\n\t}",
"public static void init() {\n\t\t\n\t}",
"@Override\r\n\tpublic void initVariables() {\n\t\t\r\n\t}",
"public GlobalVariable() {\n }",
"public void init() {}",
"public void init() {}",
"public static void init() {\n }",
"public static void init() {\n }",
"public void init() {\n // message = \"Hello World!\";\n }",
"static void init() {}",
"public static void __init() {\r\n\t\t__name__ = new str(\"code\");\r\n\r\n\t\t/**\r\n\t\t copyright Sean McCarthy, license GPL v2 or later\r\n\t\t*/\r\n\t\tdefault_0 = null;\r\n\t\tcl_Code = new class_(\"Code\");\r\n\t}",
"public static void init() {\n\n }",
"private void init() {\n }",
"private void init() {\n }",
"private void init() {\n }",
"private void init() {\n }",
"private void init() {\n }",
"public void init() {\n System.out.println(\"init\");\n }",
"public void init()\r\n {\r\n ;\r\n }",
"private void _init() {\n }",
"protected void initialize () {\r\n if (initCommand!=null) matlabEng.engEvalString (id,initCommand);\r\n }",
"@Stub\n\tpublic void init()\n\t{\n\t\t//\n\t}",
"public void init(){}",
"public Codegen() {\n assembler = new LinkedList<LlvmInstruction>();\n symTab = new SymTab();\n }",
"public void init() {\n System.out.println(name + \": Call explicit init()\");\n }",
"private void init() {\n\t\t\n\t\ttry{\t\t\t\n\t\t\tinfos = new HashMap<String, VariableInfo>();\n\t\t\t\n\t\t\tfor(String var : this.problem.getMyVars()){\n\t\t\t\t\n\t\t\t\tif(this.problem.getNbrNeighbors(var) != 0){ // an isolated variable doesn't need a CryptoScheme and therefore no VariableInfo either\n\t\t\t\t\t\n\t\t\t\t\tVariableInfo info = new VariableInfo(var);\n\t\t\t\t\tinfos.put(var, info);\n\t\t\t\t\t\n\t\t\t\t\tinfo.cs = cryptoConstr.newInstance(this.cryptoParameter);\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//initialize request counter for my own variables\n\t\t\trequestCount = new HashMap<String,Integer>(); \n\t\t\tfor(String var : this.problem.getMyVars()){\n\t\t\t\trequestCount.put(var, 0);\n\t\t\t}\n\t\t\t\n\t\t\tthis.started = true;\t\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\t\t\n\t}",
"public void init() { }",
"public void init() { }",
"extern(int i) {\n var = i;\n }",
"private void setUp() {\r\n\tvariables = new Vector();\r\n\tstatements = new Vector();\r\n\tconstraints = new Vector();\r\n\tvariableGenerator = new SimpleVariableGenerator(\"v_\");\r\n }",
"private void init() {\n\n\t}",
"public void init() {\n\t}",
"public void init() {\n\t}",
"public void init() {\n\t}",
"@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp\", line = 245,\n FQN=\"clang::CodeGen::CodeGenFunction::EmitCXXGuardedInit\", NM=\"_ZN5clang7CodeGen15CodeGenFunction18EmitCXXGuardedInitERKNS_7VarDeclEPN4llvm14GlobalVariableEb\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.clang.codegen/llvmToClangType -split-class=clang::CodeGen::CodeGenFunction@this ${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp -nm=_ZN5clang7CodeGen15CodeGenFunction18EmitCXXGuardedInitERKNS_7VarDeclEPN4llvm14GlobalVariableEb\")\n//</editor-fold>\npublic final void EmitCXXGuardedInit(final /*const*/ VarDecl /*&*/ D, \n GlobalVariable /*P*/ DeclPtr, \n boolean PerformInit) {\n // If we've been asked to forbid guard variables, emit an error now.\n // This diagnostic is hard-coded for Darwin's use case; we can find\n // better phrasing if someone else needs it.\n if ($this().CGM.getCodeGenOpts().ForbidGuardVariables) {\n $this().CGM.Error(D.getLocation(), \n new StringRef(/*KEEP_STR*/\"this initialization requires a guard variable, which the kernel does not support\"));\n }\n \n $this().CGM.getCXXABI().EmitGuardedInit(/*Deref*/$this(), D, DeclPtr, PerformInit);\n}",
"public void setInit(ContainerProgram init)\n {\n _init = init;\n }",
"public void init() {\n\t\n\t}",
"private void initialize() {\n }",
"public void init() {\n\n\t}",
"public void init() {\n\n\t}",
"public void init() {\n\n\t}",
"public void initialize() {\n //TODO: Initialization steps\n\n initialized = true;\n }",
"public void init() {\n\t\t\n\t}",
"private void init() {\n\n\n\n }",
"public void init() {\n }",
"public void init() {\n }",
"public void init() {\n }",
"public void init() {\n }",
"public void init() {\n\t\t}",
"void initGlobalAttributes() {\n\n\t}",
"private void initVar() {\n tvHello.setText(stringFromJNI());\n }",
"@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp\", line = 140,\n FQN=\"clang::CodeGen::CodeGenFunction::EmitCXXGlobalVarDeclInit\", NM=\"_ZN5clang7CodeGen15CodeGenFunction24EmitCXXGlobalVarDeclInitERKNS_7VarDeclEPN4llvm8ConstantEb\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.clang.codegen/llvmToClangType -split-class=clang::CodeGen::CodeGenFunction@this ${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp -nm=_ZN5clang7CodeGen15CodeGenFunction24EmitCXXGlobalVarDeclInitERKNS_7VarDeclEPN4llvm8ConstantEb\")\n//</editor-fold>\npublic final void EmitCXXGlobalVarDeclInit(final /*const*/ VarDecl /*&*/ D, \n Constant /*P*/ DeclPtr, \n boolean PerformInit) {\n \n /*const*/ Expr /*P*/ Init = D.getInit$Const();\n QualType T = D.getType();\n \n // The address space of a static local variable (DeclPtr) may be different\n // from the address space of the \"this\" argument of the constructor. In that\n // case, we need an addrspacecast before calling the constructor.\n //\n // struct StructWithCtor {\n // __device__ StructWithCtor() {...}\n // };\n // __device__ void foo() {\n // __shared__ StructWithCtor s;\n // ...\n // }\n //\n // For example, in the above CUDA code, the static local variable s has a\n // \"shared\" address space qualifier, but the constructor of StructWithCtor\n // expects \"this\" in the \"generic\" address space.\n /*uint*/int ExpectedAddrSpace = $this().getContext().getTargetAddressSpace(new QualType(T));\n /*uint*/int ActualAddrSpace = DeclPtr.getType().getPointerAddressSpace();\n if (ActualAddrSpace != ExpectedAddrSpace) {\n org.llvm.ir.Type /*P*/ LTy = $this().CGM.getTypes().ConvertTypeForMem(new QualType(T));\n org.llvm.ir.PointerType /*P*/ PTy = org.llvm.ir.PointerType.get(LTy, ExpectedAddrSpace);\n DeclPtr = ConstantExpr.getAddrSpaceCast(DeclPtr, PTy);\n }\n \n ConstantAddress DeclAddr/*J*/= new ConstantAddress(DeclPtr, $this().getContext().getDeclAlign($AddrOf(D)));\n if (!T.$arrow().isReferenceType()) {\n if (($this().getLangOpts().OpenMP != 0) && D.hasAttr(OMPThreadPrivateDeclAttr.class)) {\n /*J:(void)*/$this().CGM.getOpenMPRuntime().emitThreadPrivateVarDefinition($AddrOf(D), new Address(DeclAddr), D.getAttr(OMPThreadPrivateDeclAttr.class).getLocation(), \n PerformInit, $this());\n }\n if (PerformInit) {\n CGDeclCXXStatics.EmitDeclInit(/*Deref*/$this(), D, new ConstantAddress(DeclAddr));\n }\n if ($this().CGM.isTypeConstant(D.getType(), true)) {\n CGDeclCXXStatics.EmitDeclInvariant(/*Deref*/$this(), D, DeclPtr);\n } else {\n CGDeclCXXStatics.EmitDeclDestroy(/*Deref*/$this(), D, new ConstantAddress(DeclAddr));\n }\n return;\n }\n assert (PerformInit) : \"cannot have constant initializer which needs destruction for reference\";\n RValue RV = $this().EmitReferenceBindingToExpr(Init);\n $this().EmitStoreOfScalar(RV.getScalarVal(), new Address(DeclAddr), false, new QualType(T));\n}",
"private static void Initialize()\n\t{\n\t\tcurrentPC = 3996;\n\t\tcurrentFilePointer = 0;\n\t\tmemoryBlocks = new int[4000];\n\t\tregisterFile = new HashMap<String, Integer>();\n\t\tstages = new HashMap<String, Instruction>();\n\t\tlatches = new HashMap<String, Instruction>();\n\t\tspecialRegister = 0;\n\t\tisComplete = false;\n\t\tisValidSource = true;\n\t\tSystem.out.println(\"-----Initialization Completed------\");\n\t}",
"public void init() {\r\n\r\n\t}",
"public void init() {\n log.info(\"initialization\");\n }",
"@Override\n\tpublic void init() {\n\t\t// Nothing to do in this example\n\t}",
"private void initialize() {\n\t}",
"private void initVar() {\n\n sTextLD = sTextMLD;\n\n }",
"public void init() {\n \n }",
"public static void init() {\n\t\tif(Options.OUTPUT_64BIT) {\n\t\t\tSIZE = 8;\n\t\t\t\n\t\t\tOBJECT = \"16(%rbp)\";\n\t\t\tRET = \"-8(%rbp)\";\n\t\t\tPUSH = \"pushq\";\n\t\t\tPOP = \"popq\";\n\t\t\tEAX = \"%rax\";\n\t\t\tEBX = \"%rbx\";\n\t\t\tECX = \"%rcx\";\n\t\t\tEDX = \"%rdx\";\n\t\t\tEBP = \"%rbp\";\n\t\t\tESP = \"%rsp\";\n\t\t\tMOV = \"movq\";\n\t\t\tZMOV = \"movzbq\";\n\t\t\tADD = \"addq\";\n\t\t\tSUB = \"subq\";\n\t\t\tCMP = \"cmpq\";\n\t\t\tMUL = \"imulq\";\n\t\t\tDIV = \"idivq\";\n\t\t\tXOR = \"xorq\";\n\t\t\tNEG = \"negq\";\n\t\t\tOR = \"orq\";\n\t\t\tAND = \"andq\";\n\t\t\tVCALL = \"*\" + EBX;\n\t\t}\n\t}",
"public /* synthetic */ String mo15496a(Void __) {\n boolean[] $jacocoInit = $jacocoInit();\n String string = getArguments().getString(\"package_name\");\n $jacocoInit[217] = true;\n return string;\n }",
"public void init()\n {\n }",
"void init();",
"void init();",
"void init();",
"void init();",
"void init();",
"void init();",
"void init();",
"void init();",
"void init();",
"void init();",
"void init();",
"void init();",
"void init();",
"public void initialize() {\n\t}",
"public void initialize() {\n\t}",
"protected void initialize() {\n\t\televator.zeroEncoder();\n\t}",
"public void init() {\n // These data structures are initialized here because other\n // module's startUp() might be called before ours\n this.systemStartTime = System.currentTimeMillis();\n }",
"private void initialize() {\n\t\t\n\t}",
"public void init();",
"public void init();",
"public void init();",
"public void init();",
"private void initialize() {//GEN-END:|0-initialize|0|0-preInitialize\n // write pre-initialize user code here\n//GEN-LINE:|0-initialize|1|0-postInitialize\n // write post-initialize user code here\n }",
"private void initialize() {//GEN-END:|0-initialize|0|0-preInitialize\n // write pre-initialize user code here\n//GEN-LINE:|0-initialize|1|0-postInitialize\n // write post-initialize user code here\n }",
"public static void initial(){\n\t}",
"private static void init() {\n __lib = new JnaGmpLib();\n }",
"public void initialize() {\n }",
"@objid (\"4bb3363c-38e1-48f1-9894-6dceea1f8d66\")\n public void init() {\n }",
"@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp\", line = 522,\n FQN=\"clang::CodeGen::CodeGenFunction::GenerateCXXGlobalInitFunc\", NM=\"_ZN5clang7CodeGen15CodeGenFunction25GenerateCXXGlobalInitFuncEPN4llvm8FunctionENS2_8ArrayRefIS4_EENS0_7AddressE\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.clang.codegen/llvmToClangType -split-class=clang::CodeGen::CodeGenFunction@this ${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp -nm=_ZN5clang7CodeGen15CodeGenFunction25GenerateCXXGlobalInitFuncEPN4llvm8FunctionENS2_8ArrayRefIS4_EENS0_7AddressE\")\n//</editor-fold>\npublic final void GenerateCXXGlobalInitFunc(Function /*P*/ Fn, \n ArrayRef<Function /*P*/ > Decls) {\n GenerateCXXGlobalInitFunc(Fn, \n Decls, \n Address.invalid());\n}",
"protected void _init(){}",
"void initialize();",
"void initialize();",
"public void init(){\n System.out.println(\"调用init\");\n }",
"public void init() { \n System.out.println(\"Inside the init() method.\"); \n }",
"public void autonomousInit() {\n }"
] | [
"0.61679506",
"0.614978",
"0.60799",
"0.6034827",
"0.5923772",
"0.5910298",
"0.587184",
"0.5864473",
"0.5864473",
"0.58488536",
"0.58488536",
"0.583322",
"0.58280915",
"0.58128107",
"0.579541",
"0.5749473",
"0.5748904",
"0.5748904",
"0.5748904",
"0.5748904",
"0.57453316",
"0.57366025",
"0.5729125",
"0.5717854",
"0.5707406",
"0.57047385",
"0.5701792",
"0.5697887",
"0.5683025",
"0.5641496",
"0.5641496",
"0.56322366",
"0.56306505",
"0.56060755",
"0.5592216",
"0.5592216",
"0.5592216",
"0.55902386",
"0.558602",
"0.5578029",
"0.5573281",
"0.55640006",
"0.55640006",
"0.55640006",
"0.555916",
"0.55535513",
"0.5552373",
"0.5549421",
"0.5549421",
"0.5549421",
"0.5549421",
"0.5533446",
"0.5531122",
"0.5530625",
"0.5524594",
"0.5522878",
"0.551626",
"0.55067444",
"0.5498932",
"0.5495039",
"0.54937536",
"0.54934806",
"0.5486693",
"0.54811186",
"0.5474592",
"0.5468977",
"0.5468977",
"0.5468977",
"0.5468977",
"0.5468977",
"0.5468977",
"0.5468977",
"0.5468977",
"0.5468977",
"0.5468977",
"0.5468977",
"0.5468977",
"0.5468977",
"0.54622793",
"0.54622793",
"0.5457234",
"0.5456923",
"0.54499316",
"0.544385",
"0.544385",
"0.544385",
"0.544385",
"0.54426485",
"0.54426485",
"0.5431592",
"0.54276276",
"0.54254425",
"0.5423492",
"0.5422141",
"0.5410528",
"0.54087204",
"0.54087204",
"0.54032475",
"0.54001945",
"0.5399264"
] | 0.62142926 | 0 |
by Jackie using DP, time complexity O(n) | public int wiggleMaxLength3(int[] nums) {
if(nums == null || nums.length == 0){
return 0;
} else if(nums.length == 1){
return 1;
}
int len = nums.length;
int[] tempNums = new int[len - 1];
int maxLen = 0;
int preFlag = 0;
for(int i = 0; i < len - 1; i++){
if(nums[i] - nums[i + 1] > 0){
tempNums[i] = 1;
} else if(nums[i] - nums[i + 1] < 0){
tempNums[i] = -1;
} else {
tempNums[i] = 0;
}
}
for(int i = 0; i < len - 1; i++){
if(tempNums[i] != 0){
if(preFlag == 0){
preFlag = tempNums[i];
maxLen++;
} else if(preFlag * tempNums[i] == -1){
preFlag = tempNums[i];
maxLen++;
}
}
}
return maxLen + 1;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void dp() {\n\t\tm[0] = 0;\n\t\tk[0] = 0;\n\n\t\t// base case 1:for 1 cent we need give 1 cent\n\t\tm[1] = 1;\n\t\tk[1] = 1;\n\n\t\tfor (int i = 2; i <= n; i++) {\n\t\t\tint min = Integer.MAX_VALUE;\n\t\t\tint sel = -1;\n\t\t\tfor (int j = 0; j < sd; j++) {\n\t\t\t\tint a = d[j];\n\t\t\t\tif (a > i) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tint v = 1 + m[i - a];\n\t\t\t\tif (v < min) {\n\t\t\t\t\tmin = v;\n\t\t\t\t\tsel = a;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (sel == -1)\n\t\t\t\tthrow new NullPointerException(\"sel != -1\");\n\t\t\tm[i] = min;\n\t\t\tk[i] = sel;\n\t\t}\n\t}",
"public static void main(String[] args) {\n\t\tScanner s = new Scanner(System.in);\n\t\tint t = s.nextInt();\n\t\twhile(t-->0)\n\t\t{\n\t\t\tint n = s.nextInt();\n\t\t\tint k = s.nextInt();\n\t\t\tint[] arr = new int[n];\n\t\t\tfor(int i=0;i<n;i++)\n\t\t\t\tarr[i] = s.nextInt();\n\t\t\tArrays.sort(arr);\n\t\t\tint[][] dp = new int[k+1][n+1];\n\t\t\tfor(int i=0;i<=k;i++)\n\t\t\t\tfor(int j=0;j<=n;j++)\n\t\t\t\t{\n\t\t\t\t\tif(i==0)\n\t\t\t\t\t\tdp[i][j] = 0;\n\t\t\t\t\telse if(j==0)\n\t\t\t\t\t\tdp[i][j] = -1;\n\t\t\t\t\telse if(i-arr[j-1]>=0)\n\t\t\t\t\t{\n\t\t\t\t\t\tint val1 = dp[i-arr[j-1]][j-1];\n\t\t\t\t\t\tint val2 = dp[i][j-1];\n\t\t\t\t\t\tif(val1!=-1 && val2!=-1)\n\t\t\t\t\t\t\tdp[i][j] = Math.min(1+val1,val2);\n\t\t\t\t\t\telse if(val1!=-1)\n\t\t\t\t\t\t\tdp[i][j] = 1+val1;\n\t\t\t\t\t\telse if(val2!=-1)\n\t\t\t\t\t\t\tdp[i][j] = val2;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tdp[i][j] = -1;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tif(dp[i][j-1]==-1)\n\t\t\t\t\t\t\tdp[i][j] = -1;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tdp[i][j] = dp[i][j-1];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tif(dp[k][n]!=-1)\n\t\t\t\tSystem.out.println(dp[k][n]);\n\t\t\telse\n\t\t\t\tSystem.out.println(\"impossible\");\n\t\t}\n\t}",
"public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int N = scanner.nextInt(), M = scanner.nextInt();\n int[][] graph = new int[N + 1][N + 1];\n\n for (int i = 0; i < M; i++) {\n int from = scanner.nextInt(), to = scanner.nextInt();\n int weight = scanner.nextInt();\n graph[from][to] = weight;\n }\n \n int[][][] dp = new int[N + 1][N + 1][N + 1];\n\n for (int i = 1; i <= N; i++) {\n for (int j = 1; j <= N; j++) {\n if (graph[i][j] != 0) {\n dp[0][i][j] = graph[i][j];\n } else {\n dp[0][i][j] = Integer.MAX_VALUE;\n }\n }\n }\n \n for (int k = 0; k <= N; k++) {\n for (int i = 1; i <= N; i++) {\n dp[k][i][i] = 0;\n }\n }\n\n for (int k = 1; k <= N; k++) {\n for (int i = 1; i <= N; i++) {\n for (int j = 1; j <= N; j++) {\n if (dp[k - 1][i][k] != Integer.MAX_VALUE && dp[k - 1][k][j] != Integer.MAX_VALUE) {\n dp[k][i][j] = Math.min(dp[k - 1][i][j], dp[k -1][i][k] + dp[k -1][k][j]);\n } else {\n dp[k][i][j] = dp[k - 1][i][j];\n }\n }\n }\n }\n\n int Q = scanner.nextInt();\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < Q; i++) {\n int from = scanner.nextInt(), to = scanner.nextInt();\n int res = dp[N][from][to] == Integer.MAX_VALUE ? -1 : dp[N][from][to];\n sb.append(res).append('\\n');\n }\n System.out.println(sb.toString());\n }",
"int solve() {\n dp[0][0] = 1;\n IntStream.rangeClosed(1, m).forEach(i ->\n IntStream.rangeClosed(0, n).forEach(j ->\n dp[i][j] = j - i >= 0 ?\n (dp[i - 1][j] + dp[i][j - i]) % M :\n dp[i - 1][j]));\n return dp[m][n];\n }",
"public boolean canPartition(int[] nums) {\n int sum = 0;\n int n = nums.length;\n for (int num : nums) sum += num;\n // sum cannot be splitted evenly\n if ((sum & 1) == 1) return false;\n int target = sum / 2;\n \n // dp[i][j] represents whether 0~i-1 numbers can reach\n // weight capacity j\n boolean[][] dp = new boolean[n+1][target+1];\n \n for (int i = 1; i <= n; i++) dp[i][0] = true;\n for (int j = 1; j <= target; j++) dp[0][j] = false;\n dp[0][0] = true;\n \n for (int i = 1; i <= n; i++) {\n for (int j = 1; j <= target; j++) {\n // if don't pick current number\n dp[i][j] = dp[i-1][j];\n if (j >= nums[i-1]) {\n dp[i][j] = dp[i][j] || dp[i-1][j-nums[i-1]];\n }\n }\n }\n return dp[n][target];\n \n \n // Solution2: optimizing to save space\n // https://leetcode.com/problems/partition-equal-subset-sum/discuss/90592/01-knapsack-detailed-explanation/94996\n int sum = 0;\n int n = nums.length;\n for (int num : nums) sum += num;\n if ((sum & 1) == 1) return false;\n int target = sum / 2;\n boolean[] dp = new boolean[target+1];\n dp[0] = true;\n for (int num : nums) {\n // here is the trick to save space\n // because we have to update dp[j] based on \n // previous dp[j-num] and dp[j] from previous loop.\n // if we update dp from left to right\n // we first update smaller dp which is dp[j-num]\n // then we won't be able to get original dp[j-num] and dp[j]\n // from previous loop, and eventually we get the wrong\n // answer. But if we update dp from right to left\n // we can assure everything is based on previous state\n for (int j = target; j >= num; j--) {\n // if (j >= num) {\n dp[j] = dp[j] || dp[j-num];\n // }\n }\n }\n return dp[target];\n }",
"public static void main(String[] args) {\n\t\t\r\n\t\tint n = 6;\r\n\t\t\r\n\t\t// Using recursion(top-down DP) with TIme O(n) Space O(n)+StackSpace\r\n\t\t\r\n//\t\tint[] dp = new int[n+1];\r\n//\t\tint res = getNumberOfWays(n,dp);\r\n//\t\tSystem.out.println(res);\r\n\t\t\r\n\t\t\r\n\t\t// Using recursion(bottom-up DP) with TIme O(n) Space O(n)\r\n\t\t\r\n\t\tint[ ] dp = new int[n+1];\r\n\t\t\r\n\t\tdp[0] = 0;\r\n\t\tdp[1] = 1;\r\n\t\tdp[2] = 2;\r\n\t\t\r\n\t\tfor(int i =3;i<=n;i++) {\r\n\t\t\tdp[i] = dp[i-1]+dp[i-2];\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(dp[n]);\r\n\r\n\t}",
"private int DP(int dp)\n\t{\n\t\tint result = DP(DENSITY, dp);\n\t\treturn result;\n\t}",
"public static void main(String[] args)\n {\n Scanner sc = new Scanner(System.in);\n int sum = sc.nextInt();\n int N = sc.nextInt();\n sc.nextLine();\n int [][] arr = new int[N][2];\n for(int i = 0;i<N;i++)\n {\n arr[i][0] = sc.nextInt();\n arr[i][1] = sc.nextInt();\n sc.nextLine();\n }\n //Arrays.sort(arr, new Comparator<int[]>() {\n // @Override\n // public int compare(int[] o1, int[] o2) {\n // return o1[1]-o2[1]; //按第二列价值排个序。\n // }\n //});\n int [][] dp = new int[N+1][sum+1];\n int [][] path = new int[N+1][sum+1];\n for(int i = 1;i<=N;i++)\n {\n for(int j = 1;j<=sum;j++)\n {\n if(j<arr[i-1][0])\n dp[i][j] = dp[i-1][j];\n else\n {\n if(dp[i-1][j]<dp[i-1][j-arr[i-1][0]]+arr[i-1][1])\n path[i][j] = 1;\n dp[i][j] = Math.max(dp[i-1][j],dp[i-1][j-arr[i-1][0]]+arr[i-1][1]);\n }\n }\n }\n System.out.println(dp[N][sum]);\n\n int i = N;\n int j = sum;\n while (i>0&&j>0)\n {\n if(path[i][j]==1)\n {\n System.out.print(1+\" \");\n j -=arr[i-1][0];\n }\n else\n {\n i--;\n System.out.print(0+\" \");\n }\n }\n\n\n // 改进版。只使用一维数组。\n // int [] f = new int[sum+1];\n // for(int i = 0;i<N;i++)\n // {\n // for (int j = sum;j>=0;j--)\n // {\n // if(j>=arr[i][0])\n // f[j] = Math.max(f[j], f[j-arr[i][0]]+arr[i][1]);\n // }\n // }\n // System.out.println(f[sum]);\n\n }",
"static public int solve(int n,int A[])\n {\n int freqArr[] = new int[1001];\n int dp[] = new int[1001];\n\n for(int i=0; i<n; i++){\n freqArr[A[i]]++;\n }\n\n dp[0] = 0;\n dp[1] = freqArr[1] > 0 ? freqArr[1] : 0;\n\n for(int i=2; i<=1000; i++){\n dp[i] = Math.max(dp[i-2] + i*freqArr[i], dp[i-1]);\n }\n return dp[1000];\n }",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint[] arr = new int[n+1];\n\t\tint[] dp = new int[n+1];\n\t\tfor (int i = 1; i < arr.length; i++) {\n\t\t\tarr[i] = sc.nextInt();\n\t\t}\n\t\t\n\t\tfor (int i = 1; i < arr.length; i++) {\n\t\t\tfor (int j = 1; j <= i; j++) {\n\t\t\t\tdp[i] = Math.max(dp[i], dp[i-j] + arr[j]);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(dp[arr.length-1]);\n\t}",
"public static int solution(int[] arr) {\n int n = arr.length;\n for (int i = 0; i < n; i++) {\n while (arr[i] != i + 1 && arr[i] < n && arr[i] > 0) {\n int temp = arr[i];\n if (temp == arr[temp - 1])\n break;\n arr[i] = arr[temp - 1];\n arr[temp - 1] = temp;\n }\n }\n for (int i = 0; i < n; i++)\n if (arr[i] != i + 1)\n return i + 1;\n return n + 1;\n }",
"static int solveMemo(int n) \n\t{ \n\t // base case \n\t if (n < 0) \n\t return 0; \n\t if (n == 0) \n\t return 1; \n\t \n\t // checking if already calculated \n\t if (dp[n]!=-1) \n\t return dp[n]; \n\t \n\t // storing the result and returning \n\t return dp[n] = solveMemo(n-1) + solveMemo(n-3) + solveMemo(n-5); \n\t}",
"static int solve(int n) \n\t{ \n\t // base case \n\t if (n < 0) \n\t return 0; \n\t if (n == 0) \n\t return 1; \n\t \n\t return solve(n-1) + solve(n-3) + solve(n-5); \n\t}",
"int catalanDP(int n) {\n int[] catalan = new int[n+1]; \n \n // Initialize first two values in table \n catalan[0] = catalan[1] = 1; \n\n // Fill entries in catalan[] using recursive formula \n for (int i=2; i<=n; i++) { \n catalan[i] = 0; \n for (int j=0; j<i; j++) \n catalan[i] += catalan[j] * catalan[i-j-1]; \n } \n \n // Return last entry \n return catalan[n]; \n }",
"public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n int [] dp = new int [n+1];\n \n dp[0] = 0;\n dp[1] = 0;\n \n for(int i=2; i<=n; i++) {\n dp[i] = dp[i-1]+1; //n이 나누어떨어지는 것과 관계없는 n-1을 일단 dp[i]에 넣어둔다.\n if(i%2 == 0) dp[i] = Math.min(dp[i/2]+1, dp[i]); \n if(i%3 == 0) dp[i] = Math.min(dp[i/3]+1, dp[i]);\n }\n System.out.println(dp[n]);\n\n\n\t}",
"private boolean dfs(int n, int[] P) { // 0 is empty, 1 is false, 2 is true\n if (P[n] != 0) {\n if (P[n] == 1) {\n return false;\n }\n else {\n return true;\n }\n }\n\n if (n == 1) {\n P[1] = 2;\n //return true;\n }\n else if (n == 2) {\n P[2] = 2;\n //return true;\n }\n else if (n == 3) {\n P[3] = 1;\n //return false;\n }\n else {\n boolean res = dfs(n-2, P) && dfs(n-3, P) || dfs(n-3, P) && dfs(n-4, P);\n P[n] = res ? 2 : 1;\n }\n\n return P[n] == 2;\n\n //P[n] = P[n-2] + P[n-3] == 4 || P[n-3] + P[n-4] == 4 ? 2 : 1;\n //boolean res = dfs(n-2, P) && dfs(n-3, P) || dfs(n-3, P) && dfs(n-4, P);\n //P[n] = res ? 2 : 1;\n //return res;\n }",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tint n = sc.nextInt();\n\t\t\n\t\tint arr[] = new int[n+1];\n\t\t\n\t\tint dp[] =new int[n+1];\n\t\t\n\t\t\n\t\tfor(int i =1; i<=n; i++){\n\t\t\tarr[i]=sc.nextInt();\n\t\t}\n\t\t\n\t\tdp[1]=arr[1];\n\t\t\n\t\tif(n>=2) {\n\t\tdp[2]=dp[1]+arr[2];\n\t\t}\n\t\t\n\t\tfor(int i=3; i<=n; i++){\n\t\t\t\n\t\t\tdp[i] = Math.max(dp[i-2]+arr[i], dp[i-3]+arr[i-1]+arr[i]);\n\t\t}\n\t\t\n\t\tSystem.out.println(dp[n]);\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint m = sc.nextInt();\n\t\tint [][][] dp = new int[n+1][m+1][m+1];\n\t\tint [][] arr = new int[n+1][m+1];\n\t\tint max = 1;\n\t\tfor (int i = 1; i <= n; i++) {\n\t\t\tfor (int j = 1; j <= m; j++) {\n\t\t\t\tarr[i][j] = sc.nextInt();\n\t\t\t}\n\t\t}\n\t\tfor (int i = 1; i <= n; i++) {\n\t\t\tfor (int j = 1; j <= m; j++) {\n\t\t\t\tif (arr[i][j] == 1) {\n\t\t\t\t\tfor (int z = j; z <= m && arr[i][z] == 1; z++) {\n\t\t\t\t\t\tdp[i][j][z] = dp[i-1][j][z] + 1;\n\t\t\t\t\t\tmax = Math.max(max, Math.min(dp[i][j][z], z-j+1));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(max);\n\t}",
"private static int getNumberOfWays(int n, int[] dp) {\n\t\t\r\n\t\tif(n==0) {\r\n\t\t\tdp[n] = 0; \r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\t\r\n\t\tif(n == 1) {\r\n\t\t\tdp[1] = 1;\r\n\t\t\treturn 1;\r\n\t\t}\r\n\t\t\r\n\t\tif(n == 2) {\r\n\t\t\tdp[2] = 2;\r\n\t\t\treturn 2;\r\n\t\t}\r\n\t\t\r\n\t\tif(dp[n] == 0){\r\n\t\t\tdp[n] = getNumberOfWays(n-1, dp) + getNumberOfWays(n-2, dp);\r\n\t\t}\r\n\t\treturn dp[n];\r\n\t}",
"static long numWays(int index, int m, int n, int[] arr) {\n long count = 0;\n\n\n if (n == 0 || index == (m - 1)) {\n if (index == (m - 1)) {\n arr[index] = n;\n }\n// for (int x : arr) {\n// System.out.print(x + \",\");\n// }\n// System.out.println();\n return 1;\n }\n\n if (n < 0 || index >= m) {\n return 0;\n }\n\n\n String key = index(arr, index, m, n);\n if (dp.containsKey(key)) {\n return dp.get(key);\n }\n\n\n for (int i = 0; i <= n; i++) {\n arr[index] = i;\n count += numWays(index + 1, m, n - i, arr);\n// for (int j = index + 1; j < arr.length; j++) {\n// arr[j] = 0;\n// }\n }\n\n dp.put(key, count % prime);\n return count % prime;\n }",
"private static int recursiveFibDP(int n) {\n\n Integer[] table = new Integer[n + 1];\n if(table[n]==null){\n if (n <= 1) {\n table[n] = n;\n }\n else {\n table[n] =recursiveFibDP(n-1)+recursiveFibDP(n-2);\n }\n }\n return table[n];\n }",
"public static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\n\t\tint a[] = {2,1,3,-4,-2};\n\t\t//int a[] = {1 ,2, 3, 7, 5};\n\t\tboolean found = false;\n\t\t\n\t\t//this will solve in o n^2\n\t\tfor(int i = 0 ; i < a.length ; i++){\n\t\t\tint sum = 0;\n\t\t\tfor(int j = i ; j< a.length ; j++){\n\t\t\t\tsum += a[j] ;\n\t\t\t\tif(sum == 0){\n\t\t\t\t\tfound = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tif(found)\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t\n\t\t// link : https://www.youtube.com/watch?v=PSpuM9cimxA&list=PLKKfKV1b9e8ps6dD3QA5KFfHdiWj9cB1s&index=49\n\t\tSystem.out.println(found + \" found\");\n\t\tfound = false;\n\t\t//solving with O of N with the help sets\n\t\t// x + 0 = y\n\t\tSet<Integer> set = new HashSet<>();\n\t\tint sum = 0;\n\t\tfor(int element : a){\n\t\t\tset.add(sum);\n\t\t\tsum += element;\n\t\t\tif(set.contains(sum)){\n\t\t\t\tfound = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println();\n\t\tSystem.out.println(set);\n\t\t\n\t\tSystem.out.println(found + \" found\");\n\t\t\n\t\t\n\t\tfound = false;\n\t\t// when the sum of subarray is K\n\t\t\n\t\t//solving with O of N with the help sets\n\t\t//x + k = y >>>\n\t\tSet<Integer> set1 = new HashSet<>();\n\t\tint k = 12;\n\t\tint summ = 0;\n\t\tfor(int element : a){\n\t\t\tset1.add(summ);\n\t\t\tsumm += element;\n\t\t\tif(set1.contains(summ - k)){ // y - k = x(alredy presnt or not)\n\t\t\t\tfound = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(set1);\n\t\tSystem.out.println();\n\t\tSystem.out.println(found + \" found\");\n\t\t\n\t\t\n\t}",
"private final int m()\n\t { int n = 0;\n\t int i = 0;\n\t while(true)\n\t { if (i > j) return n;\n\t if (! cons(i)) break; i++;\n\t }\n\t i++;\n\t while(true)\n\t { while(true)\n\t { if (i > j) return n;\n\t if (cons(i)) break;\n\t i++;\n\t }\n\t i++;\n\t n++;\n\t while(true)\n\t { if (i > j) return n;\n\t if (! cons(i)) break;\n\t i++;\n\t }\n\t i++;\n\t }\n\t }",
"private static int betterSolution(int n) {\n return n*n*n;\n }",
"private static int coinChange(int[] arr,int n, int sum) {\n\t\tint[][] dp = new int[n+1][sum+1];\n\t\tfor(int i=0;i<n+1;i++) {\n\t\t\tdp[i][0]=1;\n\t\t}\n\t\tfor(int i=0;i<sum+1;i++) {\n\t\t\t\n\t\t\tif(i%arr[0]==0)\n\t\t\tdp[0][i]=i/arr[0];\n\t\t\telse\n\t\t\t\tdp[0][i]=0;\n\t\t}\n\t\t\n\t\tfor(int i=1;i<n+1;i++) {\n\t\t\tfor(int j=1;j<sum+1;j++) {\n\t\t\t\tif(arr[i-1]>j)\n\t\t\t\t\tdp[i][j]=dp[i-1][j];\n\t\t\t\telse\n\t\t\t\t\tdp[i][j]=Math.min(dp[i-1][j], dp[i][j-arr[i-1]]+1);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn dp[n][sum];\n\t}",
"private static long calc1()\n {\n final int min = 1000;\n final int max = 10000;\n\n // initialize\n List<List<Integer>> m = new ArrayList<>();\n for (int k = 0; k < end; k++) {\n List<Integer> list = new ArrayList<Integer>();\n int n = 1;\n while (k >= start) {\n int p = pkn(k, n);\n if (p >= max) {\n break;\n }\n if (p >= min) {\n list.add(p);\n }\n n++;\n }\n m.add(list);\n }\n\n boolean[] arr = new boolean[end];\n arr[start] = true;\n\n List<Integer> solutions = new ArrayList<>();\n List<Integer> list = m.get(start);\n for (Integer first : list) {\n LinkedList<Integer> values = new LinkedList<>();\n values.add(first);\n f(m, arr, values, 1, solutions);\n // we stop at the first solution found\n if (!solutions.isEmpty()) {\n break;\n }\n }\n\n // solutions.stream().forEach(System.out::println);\n int res = solutions.stream().reduce(0, Integer::sum);\n return res;\n }",
"public static int degreeOfArray(List<Integer> arr) { arr.length = n\n // num of Keys = k\n // O(n + k)\n // max value count = m\n //\n PriorityQueue<Node> pq = new PriorityQueue<>((i, j)-> j.count - i.count);\n Map<Integer, NodePosition> posMap = new HashMap<>();\n Map<Integer, Node> countMap = new HashMap<>();\n // [1, 2, 3, 4, 5, 6]\n for (int i = 0; i < arr.size(); i++) {\n int cur = arr.get(i);\n\n if (!countMap.containsKey(cur)) {\n countMap.put(cur, new Node(cur, 1));\n } else {\n Node curNode = countMap.get(cur);\n curNode.count++;\n countMap.put(cur, curNode);\n }\n\n if (!posMap.containsKey(cur)) {\n posMap.put(cur, new NodePosition(i, i));\n } else {\n NodePosition curNodePos = posMap.get(cur);\n curNodePos.endIndex = i;\n posMap.put(cur, curNodePos);\n }\n }\n //Iterator<Map.Entry<Integer, Node> it = new Iterator<>(countMap);\n for (Map.Entry<Integer, Node> e : countMap.entrySet()) {\n pq.add(e.getValue());\n }\n\n // [1, 2, 1, 3 ,2]\n // 1 , 2 , 3\n Node curNode = pq.remove();\n int maxCount = curNode.count;\n\n int minRange = posMap.get(curNode.num).endIndex - posMap.get(curNode.num).startIndex;\n\n while (!pq.isEmpty() && maxCount == pq.peek().count) {\n curNode = pq.remove();\n NodePosition nPos = posMap.get(curNode.num);\n minRange = Math.min(minRange, nPos.endIndex - nPos.startIndex);\n }\n\n return minRange + 1;\n }",
"public static void main(String[] args) throws Exception {\n Scanner scn = new Scanner(System.in);\n int n = scn.nextInt();\n int[] arr = new int[n];\n \n for(int i = 0; i< n; i++){\n arr[i] = scn.nextInt();\n }\n \n int[] dp = new int[n];\n dp[0] = 1;\n int maxLen = 1;\n // traversing from 1 to jth position starting from 0\n for(int i = 1; i<n; i++){\n for(int j = 0; j<i; j++){\n \n if(arr[i] > arr[j]){\n dp[i] = Math.max(dp[i],dp[j]);\n }\n }\n dp[i] += 1;\n \n if(maxLen < dp[i]){\n maxLen = dp[i];\n }\n }\n System.out.println(maxLen);\n //System.out.println(Arrays.toString(dp));\n\n }",
"int solve(int p, int current) {\n int id = getId(p, current);\n if (p >= 0 && memo.containsKey(id)) {\n return memo.get(id);\n }\n List<Integer> adjList = adj.get(current);\n int n = adjList.size();\n if (n == 0) {\n throw new RuntimeException();\n }\n if ((n == 2 && p >= 0) || (n == 1 && p < 0)) {\n // should cut the nodes under current\n int ans = getDepth(p, current) - 1;\n // System.out.println(\"ans(\" + p + \",\" + current + \")=\" + ans);\n memo.put(id, ans);\n return ans;\n }\n if (n == 1) {\n // System.out.println(\"ans(\" + p + \",\" + current + \")=nochild\");\n return 0;\n }\n int ans = Integer.MAX_VALUE;\n\n for (int i = 0; i < n; i++) {\n int a = adjList.get(i);\n if (a == p) {\n continue;\n }\n for (int j = i + 1; j < n; j++) {\n int b = adjList.get(j);\n if (b == p) {\n continue;\n }\n // try a & b combo\n int tmp = solve(current, a);\n tmp += solve(current, b);\n for (int k = 0; k < n; k++) {\n int c = adjList.get(k);\n if (c != a && c != b && c != p) {\n tmp += getDepth(current, c);\n }\n }\n ans = Math.min(ans, tmp);\n }\n }\n memo.put(id, ans);\n // System.out.println(\"ans(\" + p + \",\" + current + \")=\" + ans);\n return ans;\n }",
"public static void solve(int n, List<Integer> a) {\n Collections.sort(a);\n Collections.reverse(a);\n double sum = a.stream().mapToDouble(num -> Double.valueOf(num)).sum();\n double currentN = Double.valueOf(n);\n double currentSum = sum;\n for(Integer next : a)\n {\n double nextDouble = Double.valueOf(next);\n if(nextDouble<=currentSum/currentN)\n {\n break;\n }\n currentSum -= nextDouble;\n currentN--;\n }\n System.out.println(currentSum/currentN);\n\n\n }",
"private long solveHelper(BitSet S){\n if(dp.containsKey(S))\n return dp.get(S);\n\n boolean allset = true;\n for(int i=0; i<SLen; ++i)\n allset = allset && S.get(i);\n\n if(allset)\n return 0;\n\n long minflip = INF;\n\n int idx = 0;\n for(; idx<=SLen-K; ++idx)\n if(!S.get(idx))\n break;\n\n if(idx <= SLen-K){\n track.add(S);\n S.flip(idx, idx+K);\n minflip = Math.min(minflip, solveHelper(S) + 1);\n }\n\n /*for(; idx<=SLen-K; ++idx){\n S.flip(idx, idx+K);\n if(!track.contains(S)) {\n\n track.remove(S);\n }\n S.flip(idx, idx+K);\n }*/\n\n dp.put(S, minflip);\n return minflip;\n }",
"int DFS(int i, int j) {\n if (dp[i][j] != 0)\n return dp[i][j];\n\n int steps = 0;\n int trial = 0;\n if (i < dp.length - 1 && matrix[i][j] < matrix[i+1][j]) {\n trial = DFS(i + 1, j);\n if (trial > steps)\n steps = trial;\n }\n if (i > 0 && matrix[i][j] < matrix[i-1][j]) {\n trial = DFS(i - 1, j);\n if (trial > steps)\n steps = trial;\n }\n if (j < dp[0].length - 1 && matrix[i][j] < matrix[i][j+1]) {\n trial = DFS(i, j + 1);\n if (trial > steps)\n steps = trial;\n }\n if (j > 0 && matrix[i][j] < matrix[i][j-1]) {\n trial = DFS(i, j - 1);\n if (trial > steps)\n steps = trial;\n }\n\n dp[i][j] = steps + 1;\n return dp[i][j];\n }",
"public static int iterativeFactDP(int n){\n int[] table = new int[n+1];\n table[0] = 0;\n table[1] = 1;\n for (int i = 2; i <=n ; i++) {\n table[i] = table[i-2]+table[i-1];\n }\n return table[n];\n }",
"public static int frog(int n, int [] h){\n\n int dp[] = new int [n];\n\n dp[0] = 0;\n dp[1] = Math.abs(h[1] - h[0]);\n\n for(int i = 2; i < n ; i ++){\n\n dp[i] = Math.min(dp [i - 2] + Math.abs(h[i] - h[i - 2]), dp[i - 1] + Math.abs(h[i] - h[i - 1]));\n\n\n\n }\n //print(dp);\n return dp[n - 1];\n }",
"static long dp(int a, int b, int c, int d, int e, int k) {\n if(f[a][b][c][d][e] > 0) {\n return f[a][b][c][d][e];\n }\n if(!v[k]) {\n return dp(a, b, c, d, e, k + 1);\n }\n if(a < 5 && k > maxr[0] && k > maxc[a]) {\n f[a][b][c][d][e] += dp(a + 1, b, c, d, e, k + 1);\n }\n if(b < a && k > maxr[1] && k > maxc[b]) {\n f[a][b][c][d][e] += dp(a, b + 1, c, d, e, k + 1);\n }\n if(c < b && k > maxr[2] && k > maxc[c]) {\n f[a][b][c][d][e] += dp(a, b, c + 1, d, e, k + 1);\n }\n if(d < c && k > maxr[3] && k > maxc[d]) {\n f[a][b][c][d][e] += dp(a, b, c, d + 1, e, k + 1);\n }\n if(e < d && k > maxr[4] && k > maxc[e]) {\n f[a][b][c][d][e] += dp(a, b, c, d, e + 1, k + 1);\n }\n return f[a][b][c][d][e];\n }",
"private int dp(String s){\n\n int n = s.length();\n boolean[][] dp = new boolean[n][n];\n int[] cuts = new int[n];\n\n for(int i = 0; i < n; i ++){\n int min = i;\n for(int j = 0; j <= i; j ++){\n if(s.charAt(i) == s.charAt(j) && ( i - j < 2 || dp[i - 1][j + 1])){\n // String(j~i) is a palindrom\n //\n dp[i][j] = true;\n min = j == 0? 0 : Math.min(min, cuts[j - 1] + 1);\n }\n }\n cuts[i] = min;\n }\n return cuts[n - 1];\n }",
"public static void main(String[] args) {\n \tlong[] fact = new long[MAXDOMINOES+1];\r\n \tfact[0] = 1;\r\n \tfor (int i=1; i<=MAXDOMINOES; i++)\r\n \t\tfact[i] = (fact[i-1]*i)%MOD;\r\n\r\n Scanner stdin = new Scanner(System.in);\r\n int numCases = stdin.nextInt();\r\n\r\n // Process each case.\r\n for (int loop=0; loop<numCases; loop++) {\r\n\r\n // Read in this case.\r\n n = stdin.nextInt();\r\n list = new int[n][2];\r\n for (int i=0; i<n; i++)\r\n for (int j=0; j<2; j++)\r\n list[i][j] = stdin.nextInt();\r\n\r\n // Special case - if all the dominoes are the same, all orderings work.\r\n if (same(list)) {\r\n \tSystem.out.println(fact[n]);\r\n \tcontinue;\r\n }\r\n\r\n // dp[mask][last][orientation] will store the number of permutations using the dominoes indicated by\r\n // mask, with the last domino last facing in the direction dictated by orientation. If orientation is 0,\r\n // this is the original input orientation, if it is 1, it's flipped.\r\n long[][][] dp = new long[1<<n][n][2];\r\n\r\n // Always 1 way to place one domino in a fixed orientation.\r\n for (int i=0; i<n; i++) {\r\n dp[1<<i][i][0] = 1;\r\n dp[1<<i][i][1] = 1;\r\n }\r\n\r\n // Outer DP loop, solve all problem instances for each subset of dominoes.\r\n for (int mask=3; mask<(1<<n); mask++) {\r\n\r\n // Now, try each domino as the last domino in mask.\r\n for (int last=0; last<n; last++) {\r\n\r\n // Not a valid state.\r\n if ((mask&(1<<last)) == 0) continue;\r\n\r\n int prevmask = mask - (1<<last);\r\n\r\n for (int i=0; i<n; i++) {\r\n\r\n if ((prevmask&(1<<i)) == 0) continue;\r\n\r\n // Both i and last are in regular orientation.\r\n if (list[i][1] == list[last][0])\r\n dp[mask][last][0] = (dp[mask][last][0]+dp[prevmask][i][0])%MOD;\r\n\r\n // Here i is flipped and last is regular.\r\n else if (list[i][0] == list[last][0])\r\n dp[mask][last][0] = (dp[mask][last][0]+dp[prevmask][i][1])%MOD;\r\n\r\n // i is regular but last is flipped.\r\n if (list[i][1] == list[last][1])\r\n dp[mask][last][1] = (dp[mask][last][1]+dp[prevmask][i][0])%MOD;\r\n\r\n // Both i and last are flipped.\r\n else if (list[i][0] == list[last][1])\r\n dp[mask][last][1] = (dp[mask][last][1]+dp[prevmask][i][1])%MOD;\r\n }\r\n } // end last loop\r\n } // end mask loop\r\n\r\n // Sum up result - all ways to place all dominoes over all possible last dominoes in either orientation.\r\n // Since we screened out our special case, no over-counting will occur here.\r\n long res = 0L;\r\n for (int last=0; last<n; last++) {\r\n \tres = (res + dp[(1<<n)-1][last][0])%MOD;\r\n \tif (list[last][0] != list[last][1])\r\n \t\tres = (res + dp[(1<<n)-1][last][1])%MOD;\r\n }\r\n System.out.println(res);\r\n }\r\n }",
"static int[] find2(int a[]){\r\n int sum = a[0];\r\n int pro = a[0];\r\n for(int i=1;i<a.length;i++){\r\n sum += a[i];\r\n pro += a[i]*a[i];\r\n }\r\n int s = (n*(n+1))/2 - sum;\r\n int p = (n*(n+1)*(2*n+1))/6 - pro;\r\n return solveSP(s, p);\r\n }",
"static int[] sol1(int[]a, int n){\r\n\t\tMap <Integer,Integer> map= new HashMap();\r\n\t\tfor (int i = 0; i< a.length; i++){\r\n\t\t\tmap.put(a[i],i);\r\n\t\t}\r\n\t\tArrays.sort(a);\r\n\t\tint i = 0; \r\n\t\tint j = a.length -1;\r\n\t\twhile (i <= j){\r\n\t\t\tif(a[i]+a[j]>n) j--;\r\n\t\t\telse if (a[i]+a[j]<n) i++;\r\n\t\t\telse break;\r\n\t\t}\r\n\t\tint[] ans= {map.get(a[i]),map.get(a[j])};\r\n\t\treturn ans;\r\n\t}",
"static int recurseMaxStolenValue(int[] values,int i){\r\n\t if(i >= values.length) return 0;\r\n\t if(i == values.length -1) return values[values.length-1];\r\n\t \r\n\t return Math.max( values[i] + recurseMaxStolenValue(values,i+2)\r\n\t ,values[i+1] + recurseMaxStolenValue(values,i+3)\r\n\t );\r\n\t /*\r\n\t *Approach #2 for Recursion --> This approach won't work to convert to DP,but recursion yields right result\r\n\t */\r\n\t \r\n\t /*\r\n\t if(i >= values.length) return 0; \r\n\t int result1 = values[i]+recurseMaxStolenValue(values,i+2);\r\n\t int result2 = recurseMaxStolenValue(values,i+1);\r\n\t return (Math.max(result1,result2));\r\n\t */\r\n\t \r\n\t }",
"public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n int n = in.nextInt();\n int k = in.nextInt();\n ArrayList<Integer> list = new ArrayList<>();\n for(int arr_i=0; arr_i < n; arr_i++){\n int integer = in.nextInt();\n list.add(new Integer(integer));\n }\n in.close();\n\n\n\n if(k == 1){\n System.out.println(k);\n return;\n }\n\n for(int i = 0;i < list.size();i ++){\n int x = list.get(i) % k;\n list.set(i, x);\n }\n\n int[] kx = new int[k];\n for(int i = 0;i < k;i ++){\n kx[i] = 0;\n }\n for(int i = 0;i < list.size();i ++){\n int x = list.get(i);\n kx[x] ++;\n }\n\n\n int num = 0;\n int A = 0;\n if(k % 2 == 0){\n A = k / 2 - 1;\n }else{\n A = k / 2;\n }\n if(kx[0] != 0){\n num += 2;\n }\n for(int i = 1; i <= A;i ++){\n if(kx[i] >= kx[k - i]){\n num += kx[i];\n }else {\n\n num += kx[k - i];\n }\n\n }\n System.out.println(num);\n }",
"static int recursion(int steps, int arrLen, int index, int[][] dp) {\n\n if (steps == 0 && index == 0) {\n return 1;\n }\n\n // extra base condition is index> steps , because we cannot return from there at all.\n if (steps == 0 || index < 0 || index >= arrLen || index > steps) return 0;\n\n if (dp[steps][index] != -1) return dp[steps][index];\n\n int ans = 0;\n\n // we can go either left , right or stay there itself.\n ans = (ans + recursion(steps - 1, arrLen, index, dp)) % MOD;\n ans = (ans + recursion(steps - 1, arrLen, index + 1, dp)) % MOD;\n ans = (ans + recursion(steps - 1, arrLen, index - 1, dp)) % MOD;\n dp[steps][index] = ans % MOD;\n return dp[steps][index];\n }",
"static int padovan(int n){\n if(n>=0 && n<=2)\n return 1;\n return padovan(n-2) + padovan(n-3);\n }",
"public static int f2(int N) { \n int x = 0; //O(1)\n for(int i = 0; i < N; i++) // O(n)\n // O(n)`\n for(int j = 0; j < i; j++) \n x++;\n return x;\n }",
"int countSusbset(int n, int w){\n int dp[][] = new int[n+1][w+1];\n for(int i=0;i<=n;i++){\n for(int j=0;j<=w;j++){\n //when no items are there and target sum is 0, only one empty subset is possible\n if(i == 0 && j == 0){\n dp[i][j] = 1;\n }\n //no items left and target sum is greater than 0, no set is possible\n else if(i == 0 && j > 0){\n dp[i][j] = 0; \n }\n //if target sum is 0, no matter how many items we have , only one empty subset is possible\n else if(j == 0){\n dp[i][j] = 1;\n }\n //since item > target sum, so exclude\n else if(arr[i-1] > j){\n dp[i][j] = dp[i-1][j];\n }else{\n //two cases include and exclude\n dp[i][j] = dp[i-1][j] + dp[i-1][j - arr[i-1]];\n }\n }\n }\n return dp[n][w];\n}",
"public int solution(int[] A) {\n int sum = 0;\n int max = 0;\n Map<Integer, Integer> countMap = new HashMap<>();\n for (int i = 0; i < A.length; i++) {\n int val = Math.abs(A[i]);\n sum += val;\n A[i] = val;\n max = Math.max(val, max);\n countMap.put(val, countMap.getOrDefault(val, 0) + 1);\n }\n int[] dp = new int[sum + 1];\n for (int i = 1; i < dp.length; i++) {\n dp[i] = -1;\n }\n int[] count = new int[max + 1];\n for (Map.Entry<Integer, Integer> countMapEntry : countMap.entrySet()) {\n count[countMapEntry.getKey()] = countMapEntry.getValue();\n }\n for (int i = 1; i < max + 1; i++) {\n if (count[i] > 0) {\n for (int j = 0; j < dp.length; j++) {\n if (dp[j] >= 0) {\n dp[j] = count[i];\n } else if (j >= i && dp[j - i] > 0) {\n dp[j] = dp[j - i] - 1;\n }\n }\n }\n }\n int half = sum / 2;\n for (int i = half; i >= 0; i--) {\n if (dp[i] >= 0) {\n return Math.abs((sum - i) - i);\n }\n }\n return -1;\n }",
"public static void main(String[] args) {\n\t\tScanner scan=new Scanner(System.in);\n\t\tint N=scan.nextInt();\n\t\tint a=scan.nextInt();\n\t\tint b=scan.nextInt();\n\t\tint[] nums=new int[N];\n\t\tint[][] weight=new int[N][N];\n\t\tfor(int i=0;i<N;i++){\n\t\t\tnums[i]=scan.nextInt();\n\t\t\tweight[i][i]=nums[i];\n\t\t}\n\t\tfor(int i=0;i<N;i++){\n\t\t\tfor(int j=i+1;j<N;j++){\n\t\t\t\tweight[i][j]=weight[i][j-1]+nums[j];\n\t\t\t}\n\t\t}\n\t\tlong[][] dp=new long[N][N];\n\t\tfor(int i=2;i<=N;i++){//dis\n\t\t\tfor(int j=0;j<=N-i;j++){//start\n\t\t\t\tint end=j+i-1;\n\t\t\t\tlong min=Integer.MAX_VALUE;\n\t\t\t\tfor(int k=j;k<end;k++){\n\t\t\t\t\tmin=Math.min(min, dp[j][k]+dp[k+1][end]+weight[j][k]*a+weight[k+1][end]*b);\n\t\t\t\t}\n\t\t\t\tdp[j][end]=min;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(dp[0][N-1]);\n\t\tscan.close();\n\t}",
"private static int numWaysDP(int N, ArrayList<Integer> x) {\n /* Base Cases */\n if (N == 0) {\n return 1;\n }\n\n int count;\n int[] counts = new int[N + 1];\n counts[0] = 1;\n for (int i = 1; i <= N; i++) {\n count = 0;\n for (int num : x) {\n if (i - num >= 0) {\n count += counts[i - num];\n }\n }\n counts[i] = count;\n }\n\n return counts[N];\n }",
"private static int DP(String[] arr, int[] len, int i) {\n int min = Integer.MAX_VALUE;\n int minPointer = Integer.MAX_VALUE;\n for (int k = i + 1; k < arr.length; k++) {\n int badness = badness(len, i, k, PAGE_WIDTH);\n if (badness == Integer.MAX_VALUE) {\n break;\n } else if (badness < min) {\n min = badness;\n minPointer = k;\n } // TODO: if badness max value then k is already +1\n }\n\n if (minPointer == arr.length - 1) {\n minPointer = arr.length;\n }\n return minPointer;\n }",
"public static void main(String[] args) {\n\t\tint width=35;\n\t\tint length=31;\n\t\tlong[][] dp = new long[width+1][length+1];\n\t\tdp[0][0]=0;\n\t\tfor(int i=1;i<length+1;i++){\n\t\t\tif(badCheck(0,i,0,i-1)){\n\t\t\t\tdp[0][i]=0;\n\t\t\t\tfor(int k=i+1;k<length+1;k++){\n\t\t\t\t\tdp[0][k]=0;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}else{\n\t\t\t\tdp[0][i]=1;\n\t\t\t}\n\t\t}\n\t\tfor(int i=1;i<width+1;i++){\n\t\t\tif(badCheck(i,0,i-1,0)){\n\t\t\t\tdp[i][0]=0;\n\t\t\t\tfor(int k=i+1;k<width+1;k++){\n\t\t\t\t\tdp[k][0]=0;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}else{\n\t\t\t\tdp[i][0]=1;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\tfor(int i=1;i<=width;i++){\n\t\t\tfor(int j=1;j<=length;j++){\n\t\t\t\tif(!badCheck(i-1,j,i,j)){\n\t\t\t\t\tdp[i][j]+=dp[i-1][j];\n\t\t\t\t}\n\t\t\t\tif(!badCheck(i,j-1,i,j)){\n\t\t\t\t\tdp[i][j]+=dp[i][j-1];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//System.out.println(dp[6][6]);\n\t\t//System.out.println(dp[2][2]);\n\t\t//System.out.println(dp[1][1]);\n\t\tSystem.out.println(dp[35][31]);\n\t}",
"private int optimize() {\n\t\t// items: Items sorted by value-to-weight ratio for linear relaxation\n\t\t// t: the decision vector being tested at each node\n\t\t// ws, vs, is, bs: stacks of weight, value, item id, whether bring item\n\t\t// p: stack pointer; i, b, weight, value: loop caches; best: max search\n\t\t// ss: stack size: Always <=2 children on stack for <=n-1 parents\n\t\tItem[] items = new Item[n];\n\t\tint ss = 2 * n;\n\t\tint[] itemsSorted = new int[n], t = new int[n], ws = new int[ss],\n\t\t\tvs = new int[ss], is = new int[ss], bs = new int[ss];\n\t\tint i, b, weight, value, best = 0, p = 0;\n\n\t\tfor (int j = 0; j < n; j++)\n\t\t\titems[j] = new Item(j);\n\t\tArrays.sort(items);\n\t\tfor (int j = 0; j < n; j++)\n\t\t\titemsSorted[j] = items[j].i();\n\t\titems = null; // For garbage collection.\n\n\t\t// Push item 0 onto the stack with and without bringing it.\n\t\tws[p] = 0; vs[p] = 0; is[p] = 0; bs[p] = 1; p++;\n\t\tws[p] = 0; vs[p] = 0; is[p] = 0; bs[p] = 0; p++;\n\n\t\twhile (p > 0) {\n\t\t\tp--; // Pop the latest item off the stack\n\t\t\ti = is[p]; b = bs[p];\n\t\t\tweight = ws[p] + w[i] * b;\n\t\t\tif (weight > k)\n\t\t\t\tcontinue;\n\t\t\tvalue = vs[p] + v[i] * b;\n\t\t\tif (bound(i, weight, value, itemsSorted) < best)\n\t\t\t\tcontinue;\n\t\t\tbest = Math.max(value, best);\n\t\t\tt[i] = b;\n\t\t\tif (i < n - 1) { // Push children onto stack w/ & w/o bringing item\n\t\t\t\tws[p] = weight; vs[p] = value; is[p] = i + 1; bs[p] = 1; p++;\n\t\t\t\tws[p] = weight; vs[p] = value; is[p] = i + 1; bs[p] = 0; p++;\n\t\t\t}\n\t\t\telse if (value >= best)\n\t\t\t\tSystem.arraycopy(t, 0, x, 0, n);\n\t\t}\n\t\treturn best;\n\t}",
"public static void main(String[] args) throws IOException{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint m = sc.nextInt();\n\t\tint[] array = new int[n];\n\t\tfor(int i=0;i<n;i++)\n\t\t{\n\t\t\tarray[i] = sc.nextInt();\n\t\t}\n\t\tint[][] dp = new int[n][n];\n\t\tint[][] c = new int[n][n];\n\t\tfor(int i=0;i<n;i++)\n\t\t{\n\t\t\tint count=0,max=0;\n\t\t\tfor(int j=i;j<n;j++)\n\t\t\t{\n\t\t\t\tif(j==i){\n\t\t\t\t\tdp[i][j]=array[j];\n\t\t\t\t\tcount++;\n\t\t\t\t\tc[i][j]=count;\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\telse{\n\t\t\t\t\tif(array[j]==array[j-1]){\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t\tif(max<count) {\n\t\t\t\t\t\t\tmax =count;\n\t\t\t\t\t\t\tdp[i][j]=array[j];\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\tdp[i][j]=dp[i][j-1];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tc[i][j]=count;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tcount =1;\n\t\t\t\t\t\tdp[i][j] = dp[i][j-1];\n\t\t\t\t\t\tc[i][j]=count;\n\t\t\t\t\t\t\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t\t//System.out.print(dp[i][j]+\" \");\n\t\t\t}\n\t\t\t//System.out.println();\n\t\t}\n\t\t\n\t\tfor(int i=0;i<m;i++)\n\t\t{\n\t\t\tint l = sc.nextInt()-1;\n\t\t\tint r = sc.nextInt()-1;\n\t\t\tint k = sc.nextInt();\n\t\t\tif(c[l][r]>k)\n\t\t\t{\n\t\t\t\tSystem.out.println(dp[l][r]);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.println(-1);\n\t\t\t}\n\t\t}\n\t}",
"public int[] squareUp(int n) {\r\n int[]arreglo=new int[(n*n)]; // O(1)\r\n if(n==0){ // O(1)\r\n return arreglo; // O(1)\r\n }\r\n for(int i=n-1;i<arreglo.length;i=i+n){ // O(n)\r\n for (int j=i;j>=i-(i/n);j--){ // O(1)\r\n arreglo[j]=1+(i-j); // O(1)\r\n }\r\n }\r\n return arreglo; // O(1)\r\n}",
"static int coinChangeProblem1(int[] coins,int sum){\n int n = coins.length;\n int[][] dp = new int[n+1][sum+1];\n\n for(int j = 1;j<=sum;j++){\n dp[0][j] = 0;\n }\n for(int i = 0;i<=n;i++){\n dp[i][0] = 1;\n }\n\n for(int i = 1;i<=n;i++){\n for(int j = 1;j<=sum;j++){\n if(coins[i-1]<=j){\n dp[i][j] = dp[i-1][j] + dp[i][j-coins[i-1]];\n }else dp[i][j] = dp[i-1][j];\n }\n }\n return dp[n][sum];\n }",
"public int findPairsTwoPointers(int[] nums, int k) {\n if (k < 0) {\n return 0;\n }\n Arrays.sort(nums); // O(N*logN)\n\n int i = 0;\n int j = 1;\n int count = 0;\n while (j < nums.length) { // O(N)\n if (i == j || nums[j] - nums[i] < k) {\n j++;\n } else if (nums[j] - nums[i] > k) {\n i++;\n } else {\n count += 1;\n j++;\n while (j < nums.length && nums[j] == nums[j - 1]) {\n j++;\n }\n }\n }\n return count;\n }",
"public int numTrees(int n) {\n if(n<=1)\n return 1;\n int[] dp = new int[n+1];\n dp[0] = 1;\n dp[1] = 1;\n dp[2] = 2;\n \n for(int i=3;i<=n;i++){\n int sum = 0;\n for(int a=0;a<i;a++){\n sum+=dp[0+a]*dp[i-1-a];\n }\n dp[i] = sum;\n //if i is odd then add the i/2 dp after you multiply by 2\n }\n return dp[n];\n }",
"static int expt(int n,int k) {\n\t\tif (k==0)\n\t\t\treturn 1;\n\t\telse\n\t\t\treturn n*expt(n,k-1);\n\t}",
"private static int findMax(int[] A, int len, int[] dp) {\r\n\t\t\r\n\t\tif(len < 0)\r\n\t\t\treturn 0;\r\n\t\t\t\r\n\t\tif(len == 0)\r\n\t\t\treturn A[0];\r\n\t\t\r\n\t\tif(len == 1)\r\n\t\t\treturn Math.max(A[0], A[1]);\r\n\t\t\r\n\t\tif(dp[len] != 0)\r\n\t\t\treturn dp[len];\r\n\t\t\r\n\t\tdp[len] = Math.max((A[len] + findMax(A, len-2, dp)), findMax(A, len-1, dp));\r\n\t\treturn dp[len];\r\n\t\t\r\n\t}",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint arr[] = new int[n];\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tarr[i] = sc.nextInt();\n\t\t}\n\t\tint sum = sc.nextInt();\n\t\tHashMap<Integer,Integer> map = new HashMap<>();\n \t\tArrays.sort(arr);\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tint temp = arr[i];\n\t\t\tint reqSum = sum-temp;\n\t\t\tarr[i]=0;\n\t\t\tint l=0;\n\t\t\tint r = n-1;\n\t\t\twhile(l<r) {\n\t\t\t\t//System.out.println(\"l \" + l + \" r \" + r + \" i = \"+ i);\n\t\t\t\tif(arr[l] + arr[r]==reqSum && arr[l]!=0 && arr[r]!=0 ) {\n\t\t\t\t\tint arr2[] = new int[3];\n\t\t\t\t\tarr2[0] = temp;\n\t\t\t\t\tarr2[1] = arr[l];\n\t\t\t\t\tarr2[2] = arr[r];\n\t\t\t\t\tif(map.containsKey(arr2[0]) || map.containsKey(arr2[1]) || map.containsKey(arr2[2])) {\n\t\t\t\t\t\t\n\t\t\t\t\t}else {\n\t\t\t\t\t\tArrays.sort(arr2);\n\t\t\t\t\t\tSystem.out.println(arr2[0] + \" \" + arr2[1] + \" \" + arr2[2]);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tl++;\n\t\t\t\t}else if(arr[l] + arr[r] < reqSum) {\n\t\t\t\t\tl++;\n\t\t\t\t\t\n\t\t\t\t}else {\n\t\t\t\t\tr--;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\tarr[i] = temp;\t\n\t\t\tmap.put(arr[i], 1);\n\t\t}\n\t}",
"private int dfs(int[][] matrix, int i, int j, int d) {\n if (i < 0 || j < 0 || i == matrix.length || j == matrix[0].length || matrix[i][j] != 0)\n return 0;\n if (dp[i][j][d] > 0) return dp[i][j][d];\n timeComplexityCount++;\n maxI = Math.max(maxI, i);\n int res;\n if (d == 1)\n res = Math.max(dfs(matrix, i, j + 1, 1), dfs(matrix, i, j + 1, 2));\n else if (d == 0)\n res = Math.max(dfs(matrix, i, j - 1, 0), dfs(matrix, i, j - 1, 2));\n else\n res = Math.max(dfs(matrix, i + 1, j, 0), Math.max(dfs(matrix, i + 1, j, 1), dfs(matrix, i + 1, j, 2)));\n dp[i][j][d] = res + 1;\n return res + 1;\n }",
"public int kSum(int[] A, int k, int target) {\n\t\tint res=0;\r\n\t\t//考虑k=1的情况\r\n//\t\tif (k==1) {\r\n//\t\t\tfor(int i=0;i<A.length;i++) {\r\n//\t\t\t\tif (A[i]==target) {\r\n//\t\t\t\t\tres++;\r\n//\t\t\t\t}\r\n//\t\t\t}\r\n//\t\t\treturn res;\r\n//\t\t}\r\n//\t\tint sum_k_1=0;\r\n//\t\tint sum=target-sum_k_1;\r\n//\t\tif (k>1 && k<A.length) {\r\n//\t\t\tfor(int i=0;i<A.length-1;i++) {\r\n//\t\t\t\tfor(int j=i+1;j<A.length;j++) {\r\n//\t\t\t\t\t\r\n//\t\t\t\t}\r\n//\t\t\t}\r\n//\t\t}\r\n\t\t//动态规划\r\n\t\tint n=A.length;\r\n\t\tint[][][] f=new int[n+1][k+1][target+1];\r\n\t\tfor(int i=0;i<n+1;i++) {\r\n\t\t\tf[i][0][0]=1;\r\n\t\t}\r\n\t\tfor(int i=1;i<=n;i++) {\r\n\t\t\tfor(int j=1;j<=k && j<=i;j++) {\r\n\t\t\t\tfor(int t=1;t<=target;t++) {\r\n\t\t\t\t\tf[i][j][t]=0;\r\n\t\t\t\t\tif (t>=A[i-1]) {\r\n\t\t\t\t\t\tf[i][j][t]=f[i-1][j-1][t-A[i-1]];\r\n\t\t\t\t\t}\r\n\t\t\t\t\tf[i][j][t]+=f[i-1][j][t];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn f[n][k][target];\r\n }",
"public static int calculate()\n {\n final List<Integer> oneToNine = IntStream.iterate(1, n -> n + 1)\n .limit(9)\n .boxed()\n .collect(toList());\n final List<List<Integer>> permutations = HeapPermutations.of(oneToNine);\n\n // System.out.println(permutations.size());\n //2- for each permutation\n // a. find all breaking 2 points to break\n // b. check first two sections' third is equal to the last section\n // c. if yes, add combintion to result, otherwise skip\n\n return permutations.stream()\n .flatMap(toTriples()) //find all combinations xx X yy = zz\n .filter(isPandigital()) // allow pandigital tripes through\n .map(Triple::getThird) // get the product\n .distinct() // get distinct products only given the problem statement does not allow repetition (see hint)\n .mapToInt(i -> i) // convert to primitive\n .sum(); // and finally get the sum\n }",
"public static int countUniqueCombinationsDP(int score) {\r\n /*\r\n * Return Type of DP array is same as return type of the recursive function\r\n * Dimensions of DP array is the number of non constant parameters to the recursive function\r\n */\r\n \t\r\n \t/*\r\n \t * Fn(s) = Fn(s-7) [if(s>=7)] + Fn(s-3) [if(s>=3)] + Fn(s-2) [if(s>=2)]\r\n\t\t * Fn(0) = 1\r\n\t\t * \r\n * F(11) = F(4) + F(8) + F(9)\r\n */\r\n \tint[][] comb = new int[score + 1][3];\r\n // int[] points = {2,3,7};\r\n \r\n // Halting Conditions\r\n comb[0][0] = 1;\r\n comb[0][1] = 1;\r\n comb[0][2] = 1;\r\n \r\n /*\r\n * Loop goes in the direction opposite to that of the recursion \r\n */\r\n for (int s = 1; s <= score; ++s) {\t\t// s is the score of the recursion\r\n \tfor (int p = 0; p < 3; ++p) {\r\n\t \tint total = 0;\r\n\t if (s >= 2 && p == 0)\r\n\t \ttotal = total + comb[s - 2][0];\r\n\t if (s >= 3 && p <= 1)\r\n\t \ttotal = total + comb[s - 3][1];\r\n\t if (s >= 7)\t\t\t// No need of condition p<=2; as it will always be true\r\n\t \ttotal = total + comb[s - 7][2];\r\n\t comb[s][p] = total;\r\n \t}\r\n }\r\n\r\n return comb[score][0];\r\n }",
"public static int f1(int N) {\n int x = 0; //O(1)\n for(int i = 0; i < N; i++) // O(n) \n x++; \n return x; \n \n }",
"public static int example3(int[] arr) { // O(n)\r\n\t\tint n = arr.length, total = 0; // O(1)\r\n\t\tfor (int j = 0; j < n; j++) // loop from 0 to n-1 // O(n^2)\r\n\t\t\tfor (int k = 0; k <= j; k++) // loop from 0 to j\r\n\t\t\t\ttotal += arr[j];\r\n\t\treturn total;\r\n\r\n\t\t/*\r\n\t\t * Explanation: Since we have nested for loop which dominates here and it is\r\n\t\t * O(n^2) and we always take the maximum. so the answer is quadratic time O(n^2)\r\n\t\t * \r\n\t\t */\r\n\t}",
"void solve() throws IOException {\n int[] nk = ril(2);\n int n = nk[0];\n int k = nk[1];\n int[] p = ril(n);\n int[] b = ril(k);\n for (int i = 0; i < n; i++) p[i]--;\n for (int i = 0; i < k; i++) b[i]--;\n\n int[] numToIdx = new int[n];\n for (int i = 0; i < n; i++) numToIdx[p[i]] = i;\n\n boolean[] remove = new boolean[n];\n Arrays.fill(remove, true);\n for (int bi : b) remove[bi] = false;\n List<Integer> toRemove = new ArrayList<>(n - k);\n for (int i = 0; i < n; i++) if (remove[i]) toRemove.add(i);\n Collections.sort(toRemove);\n\n int[] prevSmaller = new int[n];\n prevSmaller[0] = -1;\n int prevIdx = remove[p[0]] ? -1 : 0;\n for (int i = 1; i < n; i++) {\n int j = prevIdx;\n while (j != -1 && p[i] < p[j]) j = prevSmaller[j];\n prevSmaller[i] = j;\n if (!remove[p[i]]) prevIdx = i;\n }\n int[] nextSmaller = new int[n];\n nextSmaller[n-1] = n;\n prevIdx = remove[p[n-1]] ? n : n-1;\n for (int i = n-2; i >= 0; i--) {\n int j = prevIdx;\n while (j != n && p[i] < p[j]) j = nextSmaller[j];\n nextSmaller[i] = j;\n if (!remove[p[i]]) prevIdx = i;\n }\n\n int[] init = new int[n];\n Arrays.fill(init, 1);\n SegmentTree st = new SegmentTree(init);\n long ans = 0;\n for (int x : toRemove) {\n int idx = numToIdx[x];\n int l = prevSmaller[idx] + 1;\n int r = nextSmaller[idx] - 1;\n ans += st.query(l, r+1);\n st.modify(idx, 0);\n }\n pw.println(ans);\n }",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int T = sc.nextInt();\n for(int i = 0 ; i < T; i++) {\n int n = sc.nextInt();\n int a = sc.nextInt();\n int b = sc.nextInt();\n PriorityQueue<Integer> queue = new PriorityQueue<Integer>();\n int[][] m = new int[n][n];\n //n^2 * log(n)\n for(int row = 0; row < n; row++) {\n for(int col = 0; col < n; col++) {\n if(row == 0 && col == 0 && n != 1) {\n continue;\n }else if(row == 0) {\n m[row][col] = m[row][col - 1] + a;\n }else if(col == 0) {\n m[row][col] = m[row-1][col] + b;\n }else {\n m[row][col] = m[row-1][col-1] + a + b;\n }\n\n if(row + col == (n -1)) {\n pool.add(m[row][col]); //log(n)\n }\n }\n }\n //O(n*log(n))\n for (Integer item:pool) {\n queue.add(item); //O(logn)\n }\n while(!queue.isEmpty()) {\n System.out.print(queue.poll() + \" \"); //O(1)\n }\n System.out.println();\n queue.clear();\n pool.clear();\n }\n }",
"static long solve(long[] d) {\n int len = d.length;\n long[] dp = new long[len];\n\n Set<Long> set = new HashSet<>();\n\n for (int index1 = len - 1; index1 >= 0; index1--) {\n int count = 0;\n for (int index2 = index1 + 1; index2 < len; index2++) {\n if (d[index2] > d[index1]) {\n if( set.contains(d[index2] ) )continue;\n set.add(d[index2]);\n count++;\n }\n }\n set = new HashSet<>();\n dp[index1] = count;\n }\n\n long res = 0;\n Set<Long> distinct = new HashSet<>();\n for (int index1 = 0; index1 < len; index1++) {\n long curr = d[index1];\n if (distinct.contains(curr)) {\n continue;\n } else distinct.add(curr);\n for (int index2 = index1 + 1; index2 < len; index2++) {\n if (d[index2] > curr) {\n if (set.contains(d[index2])) continue;\n res += dp[index2];\n set.add(d[index2]);\n }\n }\n set = new HashSet<>();\n }\n\n return res;\n\n }",
"static int trappingWater(int arr[], int n) {\r\n\r\n // Your code here\r\n /** *** tle\r\n for(int i=1;i<n-1;i++){\r\n int l=arr[i];\r\n for (int j = 0; j < i; j++) {\r\n l=l < arr[j] ? arr[j] : l;\r\n }\r\n int r=arr[i];\r\n for (int j = i+1; j <n ; j++) {\r\n r=r < arr[j] ? arr[j] : r;\r\n }\r\n\r\n s=s+(l>r? r:l) -arr[i];\r\n }\r\n return s;\r\n\r\n //////////////////////////////////////////////\r\n SC=O(N)\r\n if(n<=2)\r\n return 0;\r\n int[] left=new int[n];\r\n int[] right=new int[n];\r\n left[0]=0;\r\n int leftmax=arr[0];\r\n for (int i = 1; i <n ; ++i) {\r\n left[i]=leftmax;\r\n leftmax=Math.max(leftmax,arr[i]);\r\n }\r\n right[n-1]=0;\r\n int mxright=arr[n-1];\r\n for (int i = n-2; i >=0 ; --i) {\r\n right[i]=mxright;\r\n mxright=Math.max(mxright,arr[i]);\r\n }\r\n int s=0;\r\n for (int i = 1; i < n-1; ++i) {\r\n if(arr[i]<left[i] && arr[i]<right[i]){\r\n s+=Math.min(left[i],right[i])-arr[i];\r\n }\r\n }\r\n return s;\r\n /////////////////////////////////////////////////////\r\n **/\r\n\r\n if(n<=2)\r\n return 0;\r\n\r\n int leftMax = arr[0];\r\n int rightMax = arr[n-1];\r\n\r\n int left = 1;\r\n int right = n-2;\r\n int water = 0;\r\n\r\n while(left <= right) {\r\n if (leftMax < rightMax) {\r\n if (arr[left] >= leftMax) {\r\n leftMax = arr[left];\r\n } else\r\n water = water + (leftMax - arr[left]);\r\n\r\n //leftMax = Math.max(leftMax, arr[left]);\r\n left++;\r\n } else {\r\n if (arr[right] > rightMax) {\r\n rightMax = arr[right];\r\n }\r\n\r\n water = water + (rightMax - arr[right]);\r\n right--;\r\n }\r\n }\r\n return water;\r\n\r\n }",
"static int gen(int n)\n{ \n int []S = new int [n + 1];\n \n S[0] = 0;\n if(n != 0)\n S[1] = 1;\n \n for (int i = 2; i <= n; i++)\n { \n \n // S(2 * n) = 4 * S(n)\n if (i % 2 == 0)\n S[i] = 4 * S[i / 2];\n \n // S(2 * n + 1) = 4 * S(n) + 1\n else\n S[i] = 4 * S[i/2] + 1;\n }\n \n return S[n];\n}",
"int countSusbset(int n, int w){\n //i.e target sum achieved\n if(w == 0){\n return 1;\n }\n \n //if sum not achieved and no items left\n if(n == 0){\n return 0;\n }\n \n //if item is gretart than target weight, we have to exclude it\n if(arr[n-1] > w){\n return countSusbset(n-1, w)\n }else{ \n return countSusbset(n-1, w) + countSusbset(n-1, w - arr[n-1]);\n }\n}",
"public static long journeyToMoon(int n, List<List<Integer>> astronaut) {\n // Write your code here\n Map<Integer, Node<Integer>> countryMap = new HashMap<>();\n for(List<Integer> pairs: astronaut) {\n Node<Integer> node1 = countryMap.computeIfAbsent(pairs.get(0), Node::new);\n Node<Integer> node2 = countryMap.computeIfAbsent(pairs.get(1), Node::new);\n node1.connected.add(node2);\n node2.connected.add(node1);\n }\n\n List<Integer> countryCluster = new ArrayList<>();\n for(Node<Integer> node: countryMap.values()) {\n if(node.connected.size() == 0) {\n countryCluster.add(1);\n } else if(!node.visited){\n countryCluster.add(getNodeCount3(node));\n }\n }\n List<Integer> countryNodes = countryMap.values().stream().map(nn -> nn.value).collect(Collectors.toList());\n List<Integer> missingNodes = new ArrayList<>();\n for(int i=0; i < n; i++) {\n if(!countryNodes.contains(i))\n missingNodes.add(i);\n }\n\n for(int i=0; i < missingNodes.size(); i++) {\n countryCluster.add(1);\n }\n\n long ans = 0;\n //For one country we cannot pair with any other astronauts\n if(countryCluster.size() >= 2) {\n ans = (long) countryCluster.get(0) * countryCluster.get(1);\n if(countryCluster.size() > 2) {\n int sum = countryCluster.get(0) + countryCluster.get(1);\n for(int i=2; i < countryCluster.size(); i++) {\n ans += (long) sum * countryCluster.get(i);\n sum += countryCluster.get(i);\n }\n }\n }\n\n /*\n permutation of two set with size A and B = AxB\n permutation of three set with size A,B,C = AxB + AxC + BxC = AxB + (A+B)xC\n permutation of four set with size A,B,C,D = AxB + AxC + AxD + BxC + BxD + CxD = AxB + (A+B)xC + (A+B+C)xD\n */\n /*\n if(keys.length == 1) {\n ans = keys[0].size();\n } else {\n ans = keys[0].size() * keys[1].size();\n if(keys.length > 2) {\n int sum = keys[0].size() + keys[1].size();\n for (int i = 2; i < keys.length; i++) {\n ans += sum * keys[i].size();\n sum += keys[i].size();\n }\n }\n }\n */\n return ans;\n }",
"public static int solution(int[] arr) {\n int[] dp = new int[arr.length];\n dp[0] = arr[0];\n int max = Integer.MIN_VALUE;\n \n for(int i = 1; i < arr.length; i++){\n if(dp[i - 1] > 0) dp[i] = arr[i] + dp[i - 1];\n else dp[i] = arr[i];\n max = Math.max(max, dp[i]);\n }\n \n return max;\n }",
"private static int solve(int[] wt, int[] val, int n, int w) {\n int[][] dp = new int[n+1][w + 1];\n\n for (int i = 1; i <= n; ++i) {\n for (int j = 1; j <= w; ++j) {\n if (wt[i-1] <= j) dp[i][j] = Math.max(dp[i-1][j] , val[i-1]+dp[i-1][j-wt[i-1]]);\n else dp[i][j] = dp[i-1][j];\n }\n }\n return dp[n][w];\n }",
"public int findPairs(int[] nums, int k) {\n if (k < 0) {\n return 0;\n }\n Set<Integer> unique = new HashSet<>();\n Set<Integer> duplicate = new HashSet<>();\n for (int n : nums) {\n if (!unique.add(n)) {\n duplicate.add(n);\n }\n }\n if (k == 0) {\n return duplicate.size();\n }\n int count = 0;\n for (int v : unique) {\n if (unique.contains(v + k)) {\n count += 1;\n }\n }\n return count;\n }",
"public static int wayToArrangeDP(int n) {\n\t\tint last = 2, secondLast = 1, current = 0;\n\n\t\tif (n == 0 || n == 1 || n == 2) {\n\t\t\treturn n;\n\t\t}\n\n\t\tfor (int i = 3; i <= n; i++) {\n\t\t\tcurrent = last + secondLast;\n\t\t\tsecondLast = last;\n\t\t\tlast = current;\n\t\t}\n\t\treturn current;\n\t}",
"@Override\n public String solve() {\n int LIMIT = 50 * NumericHelper.ONE_MILLION_INT;\n int[] nCount = new int[LIMIT+1];\n for(long y = 1; y<= LIMIT; y++) {\n for(long d= (y+3)/4; d<y; d++) { // +3 is to make d atleast 1\n long xSq = (y+d) * (y+d);\n long ySq = y * y;\n long zSq = (y-d) * (y-d);\n\n long n = xSq - ySq - zSq;\n\n if(n<0) {\n continue;\n }\n\n if(n>=LIMIT) {\n break;\n }\n\n\n nCount[(int)n]++;\n\n }\n }\n\n int ans = 0;\n for(int i = 1; i<LIMIT; i++) {\n if(nCount[i] == 1) {\n //System.out.print(i +\",\");\n ans++;\n }\n }\n\n return Integer.toString(ans);\n }",
"static boolean subSetSumProblem(int[] arr,int sum){\n// init\n int n = arr.length;\n boolean[][] dp = new boolean[n+1][sum+1];\n\n for (int j = 0;j<=sum;j++){\n dp[0][j] = false;\n }\n\n for (int i = 0;i<=n;i++){\n dp[i][0] = true;\n }\n\n for (int i = 1;i<=n;i++){\n for (int j = 1;j<=sum;j++){\n if (arr[i-1] <= j){\n dp[i][j] = dp[i-1][j] || dp[i-1][j-arr[i-1]];\n }else{\n dp[i][j] = dp[i-1][j];\n }\n }\n }\n return dp[n][sum];\n }",
"int help(int n, int k, int[][] map) {\n if (n <= 0 || k < 0) return 0;\n if (0 == k) return 1;\n if (1 == k) return n - 1;\n if (map[n][k] > 0) return map[n][k];\n long sum = 0;\n for (int i = 1; i <= k; i ++) {\n for (int j = 0; j < n; j ++) {\n// System.out.println(\"i = \" + i + \", j = \" + j + \", j - i = \" + (j - i) + \", j + i = \" + (j + i) + \", f0 = \" + (n - j + i - 1) + \", f1 = \" + (n - j - i - 1) + \", k - i = \" + (k - i));\n int g = 0, g0 = 0, g1 = 0;\n if (j - i >= 0) {\n g += help(n - j + i - 1, k - i, map);\n sum += g;\n// System.out.println(\"g0 = \" + g0 + \", g1 = \" + g1 + \", g = \" + g + \", sum = \" + sum);\n// System.out.println(\"-\");\n }\n }\n\n }\n// System.out.println(\"sum = \" + sum + \" ----\");\n map[n][k] = (int)sum;\n return (int)sum;\n }",
"public int jump(int[] nums) {\n int[] dp = new int[nums.length];\n for(int i=1;i<nums.length;i++) {\n dp[i] = Integer.MAX_VALUE;\n }\n for(int start =0 ; start < nums.length-1 ;start++){\n for(int end=start+1; end<=start+nums[start] && end<nums.length; end++){\n dp[end] = Math.min(dp[end], dp[start]+1);\n }\n }\n return dp[nums.length-1];\n }",
"public static int rob(int[] nums) {\n /*int n=nums.length;\n int[] dp = new int[n];\n if(nums.length==1)\n return nums[0];\n dp[0]=nums[0];\n dp[1]=Math.max(nums[0],nums[1]);\n for(int i=2;i<n;i++)\n dp[i]=Math.max(dp[i-1],dp[i-2]+nums[i]);\n System.out.println(Arrays.toString(dp));\n return dp[n-1];*/\n int n= nums.length;\n int[] dp = new int[n+1];\n dp[0]=0;\n dp[1]=nums[0];\n for(int i=2;i<=n;i++){\n dp[i]=Math.max(dp[i-2]+nums[i-1],dp[i-1]);\n }\n\n return dp[n];\n }",
"private void helper(int[] S, int k, int p, ArrayList<ArrayList<Integer>> result, ArrayList<Integer> set) {\n if(k==0) {\n result.add(set);\n return;\n }\n if(S.length-p>=k) {\n ArrayList<Integer> newSet = new ArrayList<Integer>(set);\n newSet.add(S[p]);\n helper(S, k-1, p+1, result, newSet); //if S[p] be choosen\n helper(S, k, p+1, result, set); // if S[p] not be choosen\n }\n\n }",
"public static int findPairs(int[] nums, int k) {\n \tif(k<0){\n \t\treturn 0;\n \t}\n \t\n int re=0;\n Map<Integer, Integer> map=new HashMap<Integer, Integer>();\n for(int num: nums){\n \tif(map.containsKey(num)){\n \t\tif(k==0&&map.get(num)==1){\n \t\t\tre++;\n \t\t\tmap.put(num, 0);\n \t\t}\n \t\tcontinue;\n \t}\n \tif(map.containsKey(num+k)){\n \t\tre++;\n \t}\n \tif(map.containsKey(num-k)){\n \t\tre++;\n \t}\n \tmap.put(num, 1);\n }\n return re;\n }",
"static int paths_dp(int[][] matrix) {\n\t\tint n = matrix.length;\n\t\tint m = matrix[0].length;\n\t\t\n\t\tint[][] dp = new int[n][m];\n\t\tdp[0][0] = matrix[0][0] == 1? 0 : 1;\n\t\t\n\t\tfor(int i = 1; i < m; i++) {\n\t\t\tif(matrix[0][i] == 1) {\n\t\t\t\tdp[0][i] = 0;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tdp[0][i] = dp[0][i-1];\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(int i = 1; i < n; i++) {\n\t\t\tif(matrix[i][0] == 1) {\n\t\t\t\tdp[i][0] = 0;\n\t\t\t} else {\n\t\t\t\tdp[i][0] = dp[i-1][0];\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(int i = 1; i < n; i++) {\n\t\t\tfor(int j = 1; j < m; j++) {\n\t\t\t\tif(matrix[i][j] == 1 ) {\n\t\t\t\t\tdp[i][j] = 0;\n\t\t\t\t} else {\n\t\t\t\t\tdp[i][j] = dp[i-1][j] + dp[i][j+1];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn dp[n-1][m-1];\n\t}",
"static long findSum(int N)\n\t{\n\t\tif(N==0) return 0;\n\t\treturn (long)((N+1)>>1)*((N+1)>>1)+findSum((int)N>>1);\n\t\t\n\t}",
"public int solution(int N) {\n\n int l = 0; // 2*l - r\n int r = 1; // 2*r - l\n\n return search(l, r, N);\n }",
"static int getMaxCoinValGeeks(int arr[], int n)\n {\n // Create a table to store solutions of subproblems\n int table[][] = new int[n][n];\n int gap, gapStartIndx, gapEndIndx, x, y, z;\n\n // Fill table using above recursive formula.\n // Note that the tableis filled in diagonal\n // fashion (similar to http://goo.gl/PQqoS),\n // from diagonal elements to table[0][n-1]\n // which is the result.\n for (gap = 0; gap < n; ++gap)\n {\n // both gapStartIndx and gapEndIndx are incremented in each loop iteration\n // for each gap, gapStartIndx keeps moving\n // gapEndIndx is always gap more than the gapStartIndx\n // when gap == 0, gapStartIndx = gapEndIndx\n // table[i,j] identifies the max value obtained by the player who picks first\n // first player = i to get val[i] , range of coins left = i+1, j\n // second player max value = table[i+1,j], range of coins left = i+2, j\n // first player max value = table[i+2,j]. So total value for player 1 is\n // val[i] + table[i+2, j]\n // first player picks j to get val[j], range of coins left i, j-1.\n // second player max = table[i, j-1] range of coins left i, j-2\n // first player max = table[i,j-2]\n // so for finding max value for a p\n for (gapStartIndx = 0, gapEndIndx = gap; gapEndIndx < n; ++gapStartIndx, ++gapEndIndx)\n {\n // Here x is value of F(i+2, j),\n // y is F(i+1, j-1) and z is\n // F(i, j-2) in above recursive formula\n // if gapStartIndx and gapEndIndx are two or more apart\n x = ((gapStartIndx + 2) <= gapEndIndx) ? table[gapStartIndx + 2][gapEndIndx] : 0;\n y = ((gapStartIndx + 1) <= (gapEndIndx - 1)) ? table[gapStartIndx +1 ][gapEndIndx - 1] : 0;\n z = (gapStartIndx <= (gapEndIndx - 2)) ? table[gapStartIndx][gapEndIndx - 2]: 0;\n\n table[gapStartIndx][gapEndIndx] = Math.max(arr[gapStartIndx] +\n Math.min(x, y), arr[gapEndIndx] +\n Math.min(y, z));\n }\n }\n\n return table[0][n - 1];\n }",
"public static ArrayList<ArrayList<Integer>> fourSum(ArrayList<Integer> a, int k) {\n Collections.sort(a);\n System.out.println(a);\n LinkedHashMap<Integer, List<List<Integer>>> m = new LinkedHashMap<Integer, List<List<Integer>>>();\n for (int i = 0; i <= a.size() - 3; i++) {\n for (int j = i + 1; j <= a.size() - 2; j++) {\n if (m.get(a.get(i) + a.get(j)) == null) {\n ArrayList<List<Integer>> v = new ArrayList<List<Integer>>();\n List<Integer> c = new ArrayList<Integer>();\n c.add(i);\n c.add(j);\n v.add(c);\n m.put(a.get(i) + a.get(j), v);\n } else {\n List<List<Integer>> v = m.get(a.get(i) + a.get(j));\n List<Integer> c = new ArrayList<Integer>();\n c.add(i);\n c.add(j);\n v.add(c);\n m.put(a.get(i) + a.get(j), v);\n }\n\n }\n }\n LinkedHashSet<ArrayList<Integer>> res = new LinkedHashSet<ArrayList<Integer>>();\n for (int i = 2; i <= a.size() - 1; i++) {\n for (int j = i + 1; j < a.size(); j++) {\n List<List<Integer>> v = m.get(k - (a.get(i) + a.get(j)));\n if (v != null && v.size() >= 1) {\n for (List<Integer> l : v) {\n\n if (l.get(0) < l.get(1) && l.get(1) < i && l.get(1) < j) {\n //System.out.println(l.get(0) + \" \" + l.get(1) + \" \" + i + \" \" + j);\n ArrayList<Integer> out = new ArrayList<Integer>();\n out.add(a.get(l.get(0)));\n out.add(a.get(l.get(1)));\n out.add(a.get(i));\n out.add(a.get(j));\n Collections.sort(out);\n //System.out.println(out);\n res.add(out);\n }\n }\n }\n }\n }\n return new ArrayList<ArrayList<Integer>>(res);\n }",
"private void PuzzleSolve(int k, ArrayList<Integer> S, ArrayList<Integer> U) {\n // for every integer value in the array passed in U we will add it to the empty array and remove it from the\n // new array made called list.\n for (Integer s : U) {\n ArrayList<Integer> list = new ArrayList<>(U);\n S.add(s);\n list.remove(s);\n // If we have removed all numbers in the list and S is now full, check the evaluation.\n if (k == 1) {\n Equals(S);\n }\n // else we keep calling this method until U is empty.\n else {\n PuzzleSolve(k - 1, S, list);\n }\n // remove the value from s and then add it back to the list to test a new variation at the end.\n S.remove(s);\n list.add(s);\n }\n }",
"public int solution2(int[] nums, int k) {\n PriorityQueue<Integer> pq = new PriorityQueue<Integer>();\n \n for (int i : nums) {\n pq.offer(i);\n \n if (pq.size() > k) {\n pq.poll();\n }\n }\n \n \n return pq.peek();\n }",
"int backTrack(int[] nums, int targetSum, int startIndex, int computedSum, int[][] dp) {\n if (startIndex == nums.length) {\n if (targetSum == computedSum) {\n return 1;\n\n }\n return 0;\n } else {\n\n int add = backTrack(nums, targetSum, startIndex + 1, computedSum + nums[startIndex], dp);\n\n int subtract = backTrack(nums, targetSum, startIndex + 1, computedSum - nums[startIndex], dp);\n dp[startIndex][computedSum] = add + subtract;\n return dp[startIndex][computedSum];\n }\n\n }",
"public int solution1(int[] nums, int k) {\n final int N = nums.length;\n Arrays.sort(nums);\n \n return nums[N-k];\n }",
"static int recursiva1(int n)\n\t\t{\n\t\tif (n==0)\n\t\t\treturn 10; \n\t\tif (n==1)\n\t\t\treturn 20; \n\t\treturn recursiva1(n-1) - recursiva1 (n-2);\t\t\n\t\t}",
"static int minJumps(int[] arr){\n int n = arr.length;\n int[] dp = new int[n];\n for(int i = 0; i < n; i++) dp[i] = Integer.MAX_VALUE;\n dp[0] = 0;\n for(int i = 1; i < n; i++){\n //checking from 0 to index i that if there is a shorter path for \n //current position to reach from any of the previous indexes\n //also previous index should not be MAX_VALUE as this will show that\n //we were not able to reach this particular index\n for(int j = 0; j < i; j++){\n if(dp[j] != Integer.MAX_VALUE && arr[j] + j >= i){\n if(dp[j] + 1 < dp[i]){\n dp[i] = dp[j] + 1;\n }\n }\n }\n }\n \n if(dp[n - 1] != Integer.MAX_VALUE){\n return dp[n - 1];\n }\n \n return -1;\n }",
"public int calculateMinimumHP(ArrayList<ArrayList<Integer>> grid) {\n\t\t\t\t int m =grid.size(), n = grid.get(0).size();\n\t\t\t\t int[][][] dp = new int[m+1][n+1][2];\n\t\t\t\t \n\t\t\t\t dp[0][0][0] = 0;\n\t\t\t\t dp[0][0][1] = 0;\n\t\t\t\t dp[0][1][0] = 1; // start with life\n\t\t\t\t dp[0][1][1] = 0; // balance life\n\t\t\t\t dp[1][0][0] = 1;\n\t\t\t\t dp[1][0][1] = 0;\n\t\t\t\t for(int i=2;i<dp[0].length;i++){\n\t\t\t\t\t dp[0][i][0] = Integer.MAX_VALUE;\n\t\t\t\t\t dp[0][i][1] = 0;\n\t\t\t\t }\n\t\t\t\t for(int i=2;i<dp.length;i++){\n\t\t\t\t\t dp[i][0][0] = Integer.MAX_VALUE;\n\t\t\t\t\t dp[i][0][1] = 0;\n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t for(int i=1;i<dp.length;i++){\n\t\t\t\t\t for(int j=1;j<dp[0].length;j++){\n\t\t\t\t\t\t \n\t\t\t\t\t\t if(grid.get(i-1).get(j-1) < 0){\n\t\t\t\t\t\t\t int[] fromCell = dp[i-1][j][0]< dp[i][j-1][0]?dp[i-1][j]:dp[i][j-1];\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t dp[i][j][0] = fromCell[0] - grid.get(i-1).get(j-1) - fromCell[1];\n\t\t\t\t\t\t\t dp[i][j][1] = fromCell[1]+ grid.get(i-1).get(j-1)>0?fromCell[1]+ grid.get(i-1).get(j-1):0;\n\t\t\t\t\t\t }else{\n\t\t\t\t\t\t\t int[] fromCell = dp[i-1][j][0]< dp[i][j-1][0]?dp[i-1][j]:dp[i][j-1];\n\t\t\t\t\t\t\t dp[i][j][0] = fromCell[0];\n\t\t\t\t\t\t\t dp[i][j][1] = fromCell[1]+grid.get(i-1).get(j-1);\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t }\n\t\t\t\t\t }\n\t\t\t\t }\n\t\t\t\t return dp[m][n][0];\n\t\t\t\t \n\t\t\t }",
"public static int ulam(int n) {\n\n List<Integer> list = new ArrayList<>();\n list.add(1);\n list.add(2);\n\n int i = 3;\n while (list.size() < n) {\n\n int count = 0;\n for (int j = 0; j < list.size() - 1; j++) {\n\n for (int k = j + 1; k < list.size(); k++) {\n if (list.get(j) + list.get(k) == i)\n count++;\n if (count > 1)\n break;\n }\n if (count > 1)\n break;\n }\n if (count == 1)\n list.add(i);\n i++;\n }\n return list.get(n - 1);\n }",
"void h(List<List<Integer>> r, List<Integer> t, int n, int s){ \n for(int i = s; i*i <= n; i++){\n if(n % i != 0) continue; \n t.add(i);\n t.add(n / i);\n r.add(new ArrayList<>(t));\n t.remove(t.size() - 1);\n h(r, t, n/i, i);\n t.remove(t.size() - 1);\n }\n }",
"static int[] OnepassSol1(int[]a, int n){\r\n Map<Integer, Integer> map = new HashMap<>();\r\n for (int i = 0; i < a.length; i++) {\r\n int complement = n - a[i];\r\n if (map.containsKey(complement)) {\r\n return new int[] { map.get(complement), i };\r\n }\r\n map.put(a[i], i);\r\n }\r\n int[] ans = {-1,-1};\r\n return ans;\r\n }",
"private static Integer packDPRec(Integer capacity, List<Integer> weights, List<ItemDTO> items, Integer n, Integer[][] mem, List<Integer> optimalChoice) {\n // Base condition\n if (n == 0 || capacity <= 0)\n return 0;\n\n if (mem[n][capacity] != -1) {\n return mem[n][capacity];\n }\n\n if (weights.get(n - 1) > capacity) {\n // Store the value of function call\n // stack in table before return\n List<Integer> subOptimalChoice = new ArrayList<>();\n mem[n][capacity] = packDPRec(capacity, weights, items, n - 1, mem, subOptimalChoice);\n optimalChoice.addAll(subOptimalChoice);\n return mem[n][capacity];\n } else {\n // Return value of table after storing\n List<Integer> optimalChoiceIncluded = new ArrayList<>();\n List<Integer> optimalChoiceExcluded = new ArrayList<>();\n Integer valueIncluded = items.get(n - 1).getValue() + packDPRec(capacity - weights.get(n - 1), weights, items, n - 1, mem, optimalChoiceIncluded);\n Integer valueExcluded = packDPRec(capacity, weights, items, n - 1, mem, optimalChoiceExcluded);\n if (valueIncluded > valueExcluded) {\n optimalChoice.addAll(optimalChoiceIncluded);\n optimalChoice.add(items.get(n - 1).getId());\n mem[n][capacity] = valueIncluded;\n }else{\n optimalChoice.addAll(optimalChoiceExcluded);\n mem[n][capacity] = valueExcluded;\n }\n return mem[n][capacity];\n }\n }",
"public int[] solution(String S, int[] P, int[] Q) {\n \n int[][] result = new int[S.length()][4];\n int[] returnResult = new int[P.length];\n \n //how many different solutions exist?\n //'A' [0], [0] - 1 solution\n //'AG' [0, 0, 1], [0, 1, 1] - 3\n // 'AGT' [0,0,0,1,1,2], [0,1,1,2,2,2] - 6\n // 10\n // 15\n // 21\n \n //Prefix Sum - calculation\n \n for (int i = 1; i< S.length()+1; i++){\n \n if (i == 1){\n switch (S.substring(i-1, i)){\n case \"A\": result[i-1][0] = 1;\n break;\n case \"C\": result[i-1][1] = 1;\n break;\n case \"G\": result[i-1][2] = 1;\n break;\n case \"T\": result[i-1][3] = 1;\n break;\n }\n }else{\n int a = 0;\n switch (S.substring(i-1, i)){\n case \"A\": a = 0;\n break;\n case \"C\": a= 1;\n break;\n case \"G\": a =2;\n break;\n case \"T\": a =3;\n break;\n }\n result[i-1][a] = 1 + result[i-2][a];\n result[i-1][(a+1)%4] = result[i-2][(a+1)%4];\n result[i-1][(a+2)%4] = result[i-2][(a+2)%4];\n result[i-1][(a+3)%4] = result[i-2][(a+3)%4];\n }\n\n }\n \n /*\n for (double i : result){\n System.out.println(i);\n }\n */\n \n //A = 1, G = 2, C = 3, T = 4\n //when A found return 1 and move to next computation.\n // P[k] <= Q[K]\n int lowerBound = 0;\n int upperBound = 0;\n for (int i = 0; i < P.length; i++){\n lowerBound = P[i];\n upperBound = Q[i];\n \n int[] toEvaluate = new int[4];\n\n //System.out.println(lowerBound);\n if (lowerBound == 0){\n toEvaluate[0]= result[upperBound][0];\n toEvaluate[1]= result[upperBound][1];\n toEvaluate[2]= result[upperBound][2];\n toEvaluate[3]= result[upperBound][3];\n }else{\n toEvaluate[0]= result[upperBound][0] - result[lowerBound-1][0]; \n toEvaluate[1]= result[upperBound][1] - result[lowerBound-1][1];\n toEvaluate[2]= result[upperBound][2] - result[lowerBound-1][2];\n toEvaluate[3]= result[upperBound][3] - result[lowerBound-1][3];\n }\n \n /*\n for (int eval : toEvaluate){\n System.out.println(eval);\n \n }\n */\n if (toEvaluate[0] > 0) {returnResult[i] = 1;\n }else if (toEvaluate[1] > 0) {returnResult[i] = 2;\n }else if (toEvaluate[2] > 0) {returnResult[i] = 3;\n }else if (toEvaluate[3] > 0) {returnResult[i] = 4;\n }\n \n }\n \n return returnResult; \n }",
"public long fibonacci_with_dp(int n){\n global_dp_count++;\n if(lookup[n] ==0) {\n if (n <= 1) {\n lookup[n] = n;\n } else {\n lookup[n] = fibonacci_with_dp(n - 1) + fibonacci_with_dp(n - 2);\n }\n }\n return lookup[n];\n }"
] | [
"0.7069462",
"0.6922795",
"0.67463905",
"0.67332524",
"0.67100275",
"0.6611003",
"0.6491553",
"0.64787114",
"0.6474729",
"0.6446823",
"0.63109124",
"0.62639505",
"0.6252474",
"0.6222305",
"0.622137",
"0.6219498",
"0.62148046",
"0.62065524",
"0.6201693",
"0.6200031",
"0.61937594",
"0.61862314",
"0.6165636",
"0.6146618",
"0.6142824",
"0.61270654",
"0.61132354",
"0.6106162",
"0.60987335",
"0.6094978",
"0.6093575",
"0.6081746",
"0.60806304",
"0.6080501",
"0.60735816",
"0.60412544",
"0.6006417",
"0.59973747",
"0.59936",
"0.5992066",
"0.5979744",
"0.5979131",
"0.597279",
"0.5963817",
"0.5961406",
"0.5958855",
"0.5952519",
"0.5939475",
"0.5939148",
"0.59217584",
"0.5915484",
"0.5914753",
"0.58988374",
"0.58941376",
"0.5884311",
"0.58807313",
"0.5874696",
"0.5869663",
"0.5866011",
"0.58630854",
"0.5849602",
"0.58334327",
"0.583341",
"0.5822407",
"0.5818331",
"0.58102715",
"0.5808644",
"0.5802953",
"0.58017296",
"0.5800537",
"0.5798189",
"0.57831645",
"0.57820135",
"0.5778652",
"0.57769597",
"0.5768671",
"0.5764732",
"0.57546747",
"0.5754564",
"0.57517004",
"0.5750556",
"0.57444644",
"0.5737114",
"0.5736198",
"0.5720123",
"0.5716276",
"0.57100457",
"0.5709721",
"0.57091093",
"0.57052636",
"0.5703372",
"0.57019544",
"0.5698603",
"0.56966764",
"0.5695823",
"0.56940836",
"0.56921196",
"0.56871545",
"0.5683521",
"0.56808233",
"0.56793284"
] | 0.0 | -1 |
by Jackie using DP, time complexity O(n^2) | public int wiggleMaxLength4(int[] nums) {
if(nums == null || nums.length == 0){
return 0;
} else if(nums.length == 1){
return 1;
}
int len = nums.length;
int[] tempNums = new int[len - 1];
int[] dp = new int[len - 1];
int maxLen = 0;
for(int i = 0; i < len - 1; i++){
if(nums[i] - nums[i + 1] > 0){
tempNums[i] = 1;
} else if(nums[i] - nums[i + 1] < 0){
tempNums[i] = -1;
} else {
tempNums[i] = 0;
}
}
for(int i = 0; i < len - 1; i++){
if(tempNums[i] != 0){
dp[i] = 1;
}
}
maxLen = dp[0];
for(int i = 0; i < len - 1; i++){
for(int j = 0; j < i; j++){
if(tempNums[i] * tempNums[j] == -1){
dp[i] = Math.max(dp[i], dp[j] + 1);
maxLen = Math.max(maxLen, dp[i]);
}
}
}
return maxLen + 1;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void dp() {\n\t\tm[0] = 0;\n\t\tk[0] = 0;\n\n\t\t// base case 1:for 1 cent we need give 1 cent\n\t\tm[1] = 1;\n\t\tk[1] = 1;\n\n\t\tfor (int i = 2; i <= n; i++) {\n\t\t\tint min = Integer.MAX_VALUE;\n\t\t\tint sel = -1;\n\t\t\tfor (int j = 0; j < sd; j++) {\n\t\t\t\tint a = d[j];\n\t\t\t\tif (a > i) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tint v = 1 + m[i - a];\n\t\t\t\tif (v < min) {\n\t\t\t\t\tmin = v;\n\t\t\t\t\tsel = a;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (sel == -1)\n\t\t\t\tthrow new NullPointerException(\"sel != -1\");\n\t\t\tm[i] = min;\n\t\t\tk[i] = sel;\n\t\t}\n\t}",
"public static void main(String[] args) {\n\t\tScanner s = new Scanner(System.in);\n\t\tint t = s.nextInt();\n\t\twhile(t-->0)\n\t\t{\n\t\t\tint n = s.nextInt();\n\t\t\tint k = s.nextInt();\n\t\t\tint[] arr = new int[n];\n\t\t\tfor(int i=0;i<n;i++)\n\t\t\t\tarr[i] = s.nextInt();\n\t\t\tArrays.sort(arr);\n\t\t\tint[][] dp = new int[k+1][n+1];\n\t\t\tfor(int i=0;i<=k;i++)\n\t\t\t\tfor(int j=0;j<=n;j++)\n\t\t\t\t{\n\t\t\t\t\tif(i==0)\n\t\t\t\t\t\tdp[i][j] = 0;\n\t\t\t\t\telse if(j==0)\n\t\t\t\t\t\tdp[i][j] = -1;\n\t\t\t\t\telse if(i-arr[j-1]>=0)\n\t\t\t\t\t{\n\t\t\t\t\t\tint val1 = dp[i-arr[j-1]][j-1];\n\t\t\t\t\t\tint val2 = dp[i][j-1];\n\t\t\t\t\t\tif(val1!=-1 && val2!=-1)\n\t\t\t\t\t\t\tdp[i][j] = Math.min(1+val1,val2);\n\t\t\t\t\t\telse if(val1!=-1)\n\t\t\t\t\t\t\tdp[i][j] = 1+val1;\n\t\t\t\t\t\telse if(val2!=-1)\n\t\t\t\t\t\t\tdp[i][j] = val2;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tdp[i][j] = -1;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tif(dp[i][j-1]==-1)\n\t\t\t\t\t\t\tdp[i][j] = -1;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tdp[i][j] = dp[i][j-1];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tif(dp[k][n]!=-1)\n\t\t\t\tSystem.out.println(dp[k][n]);\n\t\t\telse\n\t\t\t\tSystem.out.println(\"impossible\");\n\t\t}\n\t}",
"int solve() {\n dp[0][0] = 1;\n IntStream.rangeClosed(1, m).forEach(i ->\n IntStream.rangeClosed(0, n).forEach(j ->\n dp[i][j] = j - i >= 0 ?\n (dp[i - 1][j] + dp[i][j - i]) % M :\n dp[i - 1][j]));\n return dp[m][n];\n }",
"public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int N = scanner.nextInt(), M = scanner.nextInt();\n int[][] graph = new int[N + 1][N + 1];\n\n for (int i = 0; i < M; i++) {\n int from = scanner.nextInt(), to = scanner.nextInt();\n int weight = scanner.nextInt();\n graph[from][to] = weight;\n }\n \n int[][][] dp = new int[N + 1][N + 1][N + 1];\n\n for (int i = 1; i <= N; i++) {\n for (int j = 1; j <= N; j++) {\n if (graph[i][j] != 0) {\n dp[0][i][j] = graph[i][j];\n } else {\n dp[0][i][j] = Integer.MAX_VALUE;\n }\n }\n }\n \n for (int k = 0; k <= N; k++) {\n for (int i = 1; i <= N; i++) {\n dp[k][i][i] = 0;\n }\n }\n\n for (int k = 1; k <= N; k++) {\n for (int i = 1; i <= N; i++) {\n for (int j = 1; j <= N; j++) {\n if (dp[k - 1][i][k] != Integer.MAX_VALUE && dp[k - 1][k][j] != Integer.MAX_VALUE) {\n dp[k][i][j] = Math.min(dp[k - 1][i][j], dp[k -1][i][k] + dp[k -1][k][j]);\n } else {\n dp[k][i][j] = dp[k - 1][i][j];\n }\n }\n }\n }\n\n int Q = scanner.nextInt();\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < Q; i++) {\n int from = scanner.nextInt(), to = scanner.nextInt();\n int res = dp[N][from][to] == Integer.MAX_VALUE ? -1 : dp[N][from][to];\n sb.append(res).append('\\n');\n }\n System.out.println(sb.toString());\n }",
"public boolean canPartition(int[] nums) {\n int sum = 0;\n int n = nums.length;\n for (int num : nums) sum += num;\n // sum cannot be splitted evenly\n if ((sum & 1) == 1) return false;\n int target = sum / 2;\n \n // dp[i][j] represents whether 0~i-1 numbers can reach\n // weight capacity j\n boolean[][] dp = new boolean[n+1][target+1];\n \n for (int i = 1; i <= n; i++) dp[i][0] = true;\n for (int j = 1; j <= target; j++) dp[0][j] = false;\n dp[0][0] = true;\n \n for (int i = 1; i <= n; i++) {\n for (int j = 1; j <= target; j++) {\n // if don't pick current number\n dp[i][j] = dp[i-1][j];\n if (j >= nums[i-1]) {\n dp[i][j] = dp[i][j] || dp[i-1][j-nums[i-1]];\n }\n }\n }\n return dp[n][target];\n \n \n // Solution2: optimizing to save space\n // https://leetcode.com/problems/partition-equal-subset-sum/discuss/90592/01-knapsack-detailed-explanation/94996\n int sum = 0;\n int n = nums.length;\n for (int num : nums) sum += num;\n if ((sum & 1) == 1) return false;\n int target = sum / 2;\n boolean[] dp = new boolean[target+1];\n dp[0] = true;\n for (int num : nums) {\n // here is the trick to save space\n // because we have to update dp[j] based on \n // previous dp[j-num] and dp[j] from previous loop.\n // if we update dp from left to right\n // we first update smaller dp which is dp[j-num]\n // then we won't be able to get original dp[j-num] and dp[j]\n // from previous loop, and eventually we get the wrong\n // answer. But if we update dp from right to left\n // we can assure everything is based on previous state\n for (int j = target; j >= num; j--) {\n // if (j >= num) {\n dp[j] = dp[j] || dp[j-num];\n // }\n }\n }\n return dp[target];\n }",
"public static void main(String[] args) {\n\t\t\r\n\t\tint n = 6;\r\n\t\t\r\n\t\t// Using recursion(top-down DP) with TIme O(n) Space O(n)+StackSpace\r\n\t\t\r\n//\t\tint[] dp = new int[n+1];\r\n//\t\tint res = getNumberOfWays(n,dp);\r\n//\t\tSystem.out.println(res);\r\n\t\t\r\n\t\t\r\n\t\t// Using recursion(bottom-up DP) with TIme O(n) Space O(n)\r\n\t\t\r\n\t\tint[ ] dp = new int[n+1];\r\n\t\t\r\n\t\tdp[0] = 0;\r\n\t\tdp[1] = 1;\r\n\t\tdp[2] = 2;\r\n\t\t\r\n\t\tfor(int i =3;i<=n;i++) {\r\n\t\t\tdp[i] = dp[i-1]+dp[i-2];\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(dp[n]);\r\n\r\n\t}",
"private int DP(int dp)\n\t{\n\t\tint result = DP(DENSITY, dp);\n\t\treturn result;\n\t}",
"public static void main(String[] args)\n {\n Scanner sc = new Scanner(System.in);\n int sum = sc.nextInt();\n int N = sc.nextInt();\n sc.nextLine();\n int [][] arr = new int[N][2];\n for(int i = 0;i<N;i++)\n {\n arr[i][0] = sc.nextInt();\n arr[i][1] = sc.nextInt();\n sc.nextLine();\n }\n //Arrays.sort(arr, new Comparator<int[]>() {\n // @Override\n // public int compare(int[] o1, int[] o2) {\n // return o1[1]-o2[1]; //按第二列价值排个序。\n // }\n //});\n int [][] dp = new int[N+1][sum+1];\n int [][] path = new int[N+1][sum+1];\n for(int i = 1;i<=N;i++)\n {\n for(int j = 1;j<=sum;j++)\n {\n if(j<arr[i-1][0])\n dp[i][j] = dp[i-1][j];\n else\n {\n if(dp[i-1][j]<dp[i-1][j-arr[i-1][0]]+arr[i-1][1])\n path[i][j] = 1;\n dp[i][j] = Math.max(dp[i-1][j],dp[i-1][j-arr[i-1][0]]+arr[i-1][1]);\n }\n }\n }\n System.out.println(dp[N][sum]);\n\n int i = N;\n int j = sum;\n while (i>0&&j>0)\n {\n if(path[i][j]==1)\n {\n System.out.print(1+\" \");\n j -=arr[i-1][0];\n }\n else\n {\n i--;\n System.out.print(0+\" \");\n }\n }\n\n\n // 改进版。只使用一维数组。\n // int [] f = new int[sum+1];\n // for(int i = 0;i<N;i++)\n // {\n // for (int j = sum;j>=0;j--)\n // {\n // if(j>=arr[i][0])\n // f[j] = Math.max(f[j], f[j-arr[i][0]]+arr[i][1]);\n // }\n // }\n // System.out.println(f[sum]);\n\n }",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint[] arr = new int[n+1];\n\t\tint[] dp = new int[n+1];\n\t\tfor (int i = 1; i < arr.length; i++) {\n\t\t\tarr[i] = sc.nextInt();\n\t\t}\n\t\t\n\t\tfor (int i = 1; i < arr.length; i++) {\n\t\t\tfor (int j = 1; j <= i; j++) {\n\t\t\t\tdp[i] = Math.max(dp[i], dp[i-j] + arr[j]);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(dp[arr.length-1]);\n\t}",
"static public int solve(int n,int A[])\n {\n int freqArr[] = new int[1001];\n int dp[] = new int[1001];\n\n for(int i=0; i<n; i++){\n freqArr[A[i]]++;\n }\n\n dp[0] = 0;\n dp[1] = freqArr[1] > 0 ? freqArr[1] : 0;\n\n for(int i=2; i<=1000; i++){\n dp[i] = Math.max(dp[i-2] + i*freqArr[i], dp[i-1]);\n }\n return dp[1000];\n }",
"static int solveMemo(int n) \n\t{ \n\t // base case \n\t if (n < 0) \n\t return 0; \n\t if (n == 0) \n\t return 1; \n\t \n\t // checking if already calculated \n\t if (dp[n]!=-1) \n\t return dp[n]; \n\t \n\t // storing the result and returning \n\t return dp[n] = solveMemo(n-1) + solveMemo(n-3) + solveMemo(n-5); \n\t}",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint m = sc.nextInt();\n\t\tint [][][] dp = new int[n+1][m+1][m+1];\n\t\tint [][] arr = new int[n+1][m+1];\n\t\tint max = 1;\n\t\tfor (int i = 1; i <= n; i++) {\n\t\t\tfor (int j = 1; j <= m; j++) {\n\t\t\t\tarr[i][j] = sc.nextInt();\n\t\t\t}\n\t\t}\n\t\tfor (int i = 1; i <= n; i++) {\n\t\t\tfor (int j = 1; j <= m; j++) {\n\t\t\t\tif (arr[i][j] == 1) {\n\t\t\t\t\tfor (int z = j; z <= m && arr[i][z] == 1; z++) {\n\t\t\t\t\t\tdp[i][j][z] = dp[i-1][j][z] + 1;\n\t\t\t\t\t\tmax = Math.max(max, Math.min(dp[i][j][z], z-j+1));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(max);\n\t}",
"private boolean dfs(int n, int[] P) { // 0 is empty, 1 is false, 2 is true\n if (P[n] != 0) {\n if (P[n] == 1) {\n return false;\n }\n else {\n return true;\n }\n }\n\n if (n == 1) {\n P[1] = 2;\n //return true;\n }\n else if (n == 2) {\n P[2] = 2;\n //return true;\n }\n else if (n == 3) {\n P[3] = 1;\n //return false;\n }\n else {\n boolean res = dfs(n-2, P) && dfs(n-3, P) || dfs(n-3, P) && dfs(n-4, P);\n P[n] = res ? 2 : 1;\n }\n\n return P[n] == 2;\n\n //P[n] = P[n-2] + P[n-3] == 4 || P[n-3] + P[n-4] == 4 ? 2 : 1;\n //boolean res = dfs(n-2, P) && dfs(n-3, P) || dfs(n-3, P) && dfs(n-4, P);\n //P[n] = res ? 2 : 1;\n //return res;\n }",
"private static int getNumberOfWays(int n, int[] dp) {\n\t\t\r\n\t\tif(n==0) {\r\n\t\t\tdp[n] = 0; \r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\t\r\n\t\tif(n == 1) {\r\n\t\t\tdp[1] = 1;\r\n\t\t\treturn 1;\r\n\t\t}\r\n\t\t\r\n\t\tif(n == 2) {\r\n\t\t\tdp[2] = 2;\r\n\t\t\treturn 2;\r\n\t\t}\r\n\t\t\r\n\t\tif(dp[n] == 0){\r\n\t\t\tdp[n] = getNumberOfWays(n-1, dp) + getNumberOfWays(n-2, dp);\r\n\t\t}\r\n\t\treturn dp[n];\r\n\t}",
"public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n int [] dp = new int [n+1];\n \n dp[0] = 0;\n dp[1] = 0;\n \n for(int i=2; i<=n; i++) {\n dp[i] = dp[i-1]+1; //n이 나누어떨어지는 것과 관계없는 n-1을 일단 dp[i]에 넣어둔다.\n if(i%2 == 0) dp[i] = Math.min(dp[i/2]+1, dp[i]); \n if(i%3 == 0) dp[i] = Math.min(dp[i/3]+1, dp[i]);\n }\n System.out.println(dp[n]);\n\n\n\t}",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tint n = sc.nextInt();\n\t\t\n\t\tint arr[] = new int[n+1];\n\t\t\n\t\tint dp[] =new int[n+1];\n\t\t\n\t\t\n\t\tfor(int i =1; i<=n; i++){\n\t\t\tarr[i]=sc.nextInt();\n\t\t}\n\t\t\n\t\tdp[1]=arr[1];\n\t\t\n\t\tif(n>=2) {\n\t\tdp[2]=dp[1]+arr[2];\n\t\t}\n\t\t\n\t\tfor(int i=3; i<=n; i++){\n\t\t\t\n\t\t\tdp[i] = Math.max(dp[i-2]+arr[i], dp[i-3]+arr[i-1]+arr[i]);\n\t\t}\n\t\t\n\t\tSystem.out.println(dp[n]);\n\t\t\n\t}",
"static int solve(int n) \n\t{ \n\t // base case \n\t if (n < 0) \n\t return 0; \n\t if (n == 0) \n\t return 1; \n\t \n\t return solve(n-1) + solve(n-3) + solve(n-5); \n\t}",
"public static int solution(int[] arr) {\n int n = arr.length;\n for (int i = 0; i < n; i++) {\n while (arr[i] != i + 1 && arr[i] < n && arr[i] > 0) {\n int temp = arr[i];\n if (temp == arr[temp - 1])\n break;\n arr[i] = arr[temp - 1];\n arr[temp - 1] = temp;\n }\n }\n for (int i = 0; i < n; i++)\n if (arr[i] != i + 1)\n return i + 1;\n return n + 1;\n }",
"int catalanDP(int n) {\n int[] catalan = new int[n+1]; \n \n // Initialize first two values in table \n catalan[0] = catalan[1] = 1; \n\n // Fill entries in catalan[] using recursive formula \n for (int i=2; i<=n; i++) { \n catalan[i] = 0; \n for (int j=0; j<i; j++) \n catalan[i] += catalan[j] * catalan[i-j-1]; \n } \n \n // Return last entry \n return catalan[n]; \n }",
"static long dp(int a, int b, int c, int d, int e, int k) {\n if(f[a][b][c][d][e] > 0) {\n return f[a][b][c][d][e];\n }\n if(!v[k]) {\n return dp(a, b, c, d, e, k + 1);\n }\n if(a < 5 && k > maxr[0] && k > maxc[a]) {\n f[a][b][c][d][e] += dp(a + 1, b, c, d, e, k + 1);\n }\n if(b < a && k > maxr[1] && k > maxc[b]) {\n f[a][b][c][d][e] += dp(a, b + 1, c, d, e, k + 1);\n }\n if(c < b && k > maxr[2] && k > maxc[c]) {\n f[a][b][c][d][e] += dp(a, b, c + 1, d, e, k + 1);\n }\n if(d < c && k > maxr[3] && k > maxc[d]) {\n f[a][b][c][d][e] += dp(a, b, c, d + 1, e, k + 1);\n }\n if(e < d && k > maxr[4] && k > maxc[e]) {\n f[a][b][c][d][e] += dp(a, b, c, d, e + 1, k + 1);\n }\n return f[a][b][c][d][e];\n }",
"static long numWays(int index, int m, int n, int[] arr) {\n long count = 0;\n\n\n if (n == 0 || index == (m - 1)) {\n if (index == (m - 1)) {\n arr[index] = n;\n }\n// for (int x : arr) {\n// System.out.print(x + \",\");\n// }\n// System.out.println();\n return 1;\n }\n\n if (n < 0 || index >= m) {\n return 0;\n }\n\n\n String key = index(arr, index, m, n);\n if (dp.containsKey(key)) {\n return dp.get(key);\n }\n\n\n for (int i = 0; i <= n; i++) {\n arr[index] = i;\n count += numWays(index + 1, m, n - i, arr);\n// for (int j = index + 1; j < arr.length; j++) {\n// arr[j] = 0;\n// }\n }\n\n dp.put(key, count % prime);\n return count % prime;\n }",
"public static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\n\t\tint a[] = {2,1,3,-4,-2};\n\t\t//int a[] = {1 ,2, 3, 7, 5};\n\t\tboolean found = false;\n\t\t\n\t\t//this will solve in o n^2\n\t\tfor(int i = 0 ; i < a.length ; i++){\n\t\t\tint sum = 0;\n\t\t\tfor(int j = i ; j< a.length ; j++){\n\t\t\t\tsum += a[j] ;\n\t\t\t\tif(sum == 0){\n\t\t\t\t\tfound = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tif(found)\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t\n\t\t// link : https://www.youtube.com/watch?v=PSpuM9cimxA&list=PLKKfKV1b9e8ps6dD3QA5KFfHdiWj9cB1s&index=49\n\t\tSystem.out.println(found + \" found\");\n\t\tfound = false;\n\t\t//solving with O of N with the help sets\n\t\t// x + 0 = y\n\t\tSet<Integer> set = new HashSet<>();\n\t\tint sum = 0;\n\t\tfor(int element : a){\n\t\t\tset.add(sum);\n\t\t\tsum += element;\n\t\t\tif(set.contains(sum)){\n\t\t\t\tfound = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println();\n\t\tSystem.out.println(set);\n\t\t\n\t\tSystem.out.println(found + \" found\");\n\t\t\n\t\t\n\t\tfound = false;\n\t\t// when the sum of subarray is K\n\t\t\n\t\t//solving with O of N with the help sets\n\t\t//x + k = y >>>\n\t\tSet<Integer> set1 = new HashSet<>();\n\t\tint k = 12;\n\t\tint summ = 0;\n\t\tfor(int element : a){\n\t\t\tset1.add(summ);\n\t\t\tsumm += element;\n\t\t\tif(set1.contains(summ - k)){ // y - k = x(alredy presnt or not)\n\t\t\t\tfound = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(set1);\n\t\tSystem.out.println();\n\t\tSystem.out.println(found + \" found\");\n\t\t\n\t\t\n\t}",
"int solve(int p, int current) {\n int id = getId(p, current);\n if (p >= 0 && memo.containsKey(id)) {\n return memo.get(id);\n }\n List<Integer> adjList = adj.get(current);\n int n = adjList.size();\n if (n == 0) {\n throw new RuntimeException();\n }\n if ((n == 2 && p >= 0) || (n == 1 && p < 0)) {\n // should cut the nodes under current\n int ans = getDepth(p, current) - 1;\n // System.out.println(\"ans(\" + p + \",\" + current + \")=\" + ans);\n memo.put(id, ans);\n return ans;\n }\n if (n == 1) {\n // System.out.println(\"ans(\" + p + \",\" + current + \")=nochild\");\n return 0;\n }\n int ans = Integer.MAX_VALUE;\n\n for (int i = 0; i < n; i++) {\n int a = adjList.get(i);\n if (a == p) {\n continue;\n }\n for (int j = i + 1; j < n; j++) {\n int b = adjList.get(j);\n if (b == p) {\n continue;\n }\n // try a & b combo\n int tmp = solve(current, a);\n tmp += solve(current, b);\n for (int k = 0; k < n; k++) {\n int c = adjList.get(k);\n if (c != a && c != b && c != p) {\n tmp += getDepth(current, c);\n }\n }\n ans = Math.min(ans, tmp);\n }\n }\n memo.put(id, ans);\n // System.out.println(\"ans(\" + p + \",\" + current + \")=\" + ans);\n return ans;\n }",
"int DFS(int i, int j) {\n if (dp[i][j] != 0)\n return dp[i][j];\n\n int steps = 0;\n int trial = 0;\n if (i < dp.length - 1 && matrix[i][j] < matrix[i+1][j]) {\n trial = DFS(i + 1, j);\n if (trial > steps)\n steps = trial;\n }\n if (i > 0 && matrix[i][j] < matrix[i-1][j]) {\n trial = DFS(i - 1, j);\n if (trial > steps)\n steps = trial;\n }\n if (j < dp[0].length - 1 && matrix[i][j] < matrix[i][j+1]) {\n trial = DFS(i, j + 1);\n if (trial > steps)\n steps = trial;\n }\n if (j > 0 && matrix[i][j] < matrix[i][j-1]) {\n trial = DFS(i, j - 1);\n if (trial > steps)\n steps = trial;\n }\n\n dp[i][j] = steps + 1;\n return dp[i][j];\n }",
"private static int recursiveFibDP(int n) {\n\n Integer[] table = new Integer[n + 1];\n if(table[n]==null){\n if (n <= 1) {\n table[n] = n;\n }\n else {\n table[n] =recursiveFibDP(n-1)+recursiveFibDP(n-2);\n }\n }\n return table[n];\n }",
"public static void main(String[] args) throws Exception {\n Scanner scn = new Scanner(System.in);\n int n = scn.nextInt();\n int[] arr = new int[n];\n \n for(int i = 0; i< n; i++){\n arr[i] = scn.nextInt();\n }\n \n int[] dp = new int[n];\n dp[0] = 1;\n int maxLen = 1;\n // traversing from 1 to jth position starting from 0\n for(int i = 1; i<n; i++){\n for(int j = 0; j<i; j++){\n \n if(arr[i] > arr[j]){\n dp[i] = Math.max(dp[i],dp[j]);\n }\n }\n dp[i] += 1;\n \n if(maxLen < dp[i]){\n maxLen = dp[i];\n }\n }\n System.out.println(maxLen);\n //System.out.println(Arrays.toString(dp));\n\n }",
"private static int coinChange(int[] arr,int n, int sum) {\n\t\tint[][] dp = new int[n+1][sum+1];\n\t\tfor(int i=0;i<n+1;i++) {\n\t\t\tdp[i][0]=1;\n\t\t}\n\t\tfor(int i=0;i<sum+1;i++) {\n\t\t\t\n\t\t\tif(i%arr[0]==0)\n\t\t\tdp[0][i]=i/arr[0];\n\t\t\telse\n\t\t\t\tdp[0][i]=0;\n\t\t}\n\t\t\n\t\tfor(int i=1;i<n+1;i++) {\n\t\t\tfor(int j=1;j<sum+1;j++) {\n\t\t\t\tif(arr[i-1]>j)\n\t\t\t\t\tdp[i][j]=dp[i-1][j];\n\t\t\t\telse\n\t\t\t\t\tdp[i][j]=Math.min(dp[i-1][j], dp[i][j-arr[i-1]]+1);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn dp[n][sum];\n\t}",
"public static void main(String[] args) {\n \tlong[] fact = new long[MAXDOMINOES+1];\r\n \tfact[0] = 1;\r\n \tfor (int i=1; i<=MAXDOMINOES; i++)\r\n \t\tfact[i] = (fact[i-1]*i)%MOD;\r\n\r\n Scanner stdin = new Scanner(System.in);\r\n int numCases = stdin.nextInt();\r\n\r\n // Process each case.\r\n for (int loop=0; loop<numCases; loop++) {\r\n\r\n // Read in this case.\r\n n = stdin.nextInt();\r\n list = new int[n][2];\r\n for (int i=0; i<n; i++)\r\n for (int j=0; j<2; j++)\r\n list[i][j] = stdin.nextInt();\r\n\r\n // Special case - if all the dominoes are the same, all orderings work.\r\n if (same(list)) {\r\n \tSystem.out.println(fact[n]);\r\n \tcontinue;\r\n }\r\n\r\n // dp[mask][last][orientation] will store the number of permutations using the dominoes indicated by\r\n // mask, with the last domino last facing in the direction dictated by orientation. If orientation is 0,\r\n // this is the original input orientation, if it is 1, it's flipped.\r\n long[][][] dp = new long[1<<n][n][2];\r\n\r\n // Always 1 way to place one domino in a fixed orientation.\r\n for (int i=0; i<n; i++) {\r\n dp[1<<i][i][0] = 1;\r\n dp[1<<i][i][1] = 1;\r\n }\r\n\r\n // Outer DP loop, solve all problem instances for each subset of dominoes.\r\n for (int mask=3; mask<(1<<n); mask++) {\r\n\r\n // Now, try each domino as the last domino in mask.\r\n for (int last=0; last<n; last++) {\r\n\r\n // Not a valid state.\r\n if ((mask&(1<<last)) == 0) continue;\r\n\r\n int prevmask = mask - (1<<last);\r\n\r\n for (int i=0; i<n; i++) {\r\n\r\n if ((prevmask&(1<<i)) == 0) continue;\r\n\r\n // Both i and last are in regular orientation.\r\n if (list[i][1] == list[last][0])\r\n dp[mask][last][0] = (dp[mask][last][0]+dp[prevmask][i][0])%MOD;\r\n\r\n // Here i is flipped and last is regular.\r\n else if (list[i][0] == list[last][0])\r\n dp[mask][last][0] = (dp[mask][last][0]+dp[prevmask][i][1])%MOD;\r\n\r\n // i is regular but last is flipped.\r\n if (list[i][1] == list[last][1])\r\n dp[mask][last][1] = (dp[mask][last][1]+dp[prevmask][i][0])%MOD;\r\n\r\n // Both i and last are flipped.\r\n else if (list[i][0] == list[last][1])\r\n dp[mask][last][1] = (dp[mask][last][1]+dp[prevmask][i][1])%MOD;\r\n }\r\n } // end last loop\r\n } // end mask loop\r\n\r\n // Sum up result - all ways to place all dominoes over all possible last dominoes in either orientation.\r\n // Since we screened out our special case, no over-counting will occur here.\r\n long res = 0L;\r\n for (int last=0; last<n; last++) {\r\n \tres = (res + dp[(1<<n)-1][last][0])%MOD;\r\n \tif (list[last][0] != list[last][1])\r\n \t\tres = (res + dp[(1<<n)-1][last][1])%MOD;\r\n }\r\n System.out.println(res);\r\n }\r\n }",
"private long solveHelper(BitSet S){\n if(dp.containsKey(S))\n return dp.get(S);\n\n boolean allset = true;\n for(int i=0; i<SLen; ++i)\n allset = allset && S.get(i);\n\n if(allset)\n return 0;\n\n long minflip = INF;\n\n int idx = 0;\n for(; idx<=SLen-K; ++idx)\n if(!S.get(idx))\n break;\n\n if(idx <= SLen-K){\n track.add(S);\n S.flip(idx, idx+K);\n minflip = Math.min(minflip, solveHelper(S) + 1);\n }\n\n /*for(; idx<=SLen-K; ++idx){\n S.flip(idx, idx+K);\n if(!track.contains(S)) {\n\n track.remove(S);\n }\n S.flip(idx, idx+K);\n }*/\n\n dp.put(S, minflip);\n return minflip;\n }",
"private static int betterSolution(int n) {\n return n*n*n;\n }",
"private final int m()\n\t { int n = 0;\n\t int i = 0;\n\t while(true)\n\t { if (i > j) return n;\n\t if (! cons(i)) break; i++;\n\t }\n\t i++;\n\t while(true)\n\t { while(true)\n\t { if (i > j) return n;\n\t if (cons(i)) break;\n\t i++;\n\t }\n\t i++;\n\t n++;\n\t while(true)\n\t { if (i > j) return n;\n\t if (! cons(i)) break;\n\t i++;\n\t }\n\t i++;\n\t }\n\t }",
"static int recursion(int steps, int arrLen, int index, int[][] dp) {\n\n if (steps == 0 && index == 0) {\n return 1;\n }\n\n // extra base condition is index> steps , because we cannot return from there at all.\n if (steps == 0 || index < 0 || index >= arrLen || index > steps) return 0;\n\n if (dp[steps][index] != -1) return dp[steps][index];\n\n int ans = 0;\n\n // we can go either left , right or stay there itself.\n ans = (ans + recursion(steps - 1, arrLen, index, dp)) % MOD;\n ans = (ans + recursion(steps - 1, arrLen, index + 1, dp)) % MOD;\n ans = (ans + recursion(steps - 1, arrLen, index - 1, dp)) % MOD;\n dp[steps][index] = ans % MOD;\n return dp[steps][index];\n }",
"private int dp(String s){\n\n int n = s.length();\n boolean[][] dp = new boolean[n][n];\n int[] cuts = new int[n];\n\n for(int i = 0; i < n; i ++){\n int min = i;\n for(int j = 0; j <= i; j ++){\n if(s.charAt(i) == s.charAt(j) && ( i - j < 2 || dp[i - 1][j + 1])){\n // String(j~i) is a palindrom\n //\n dp[i][j] = true;\n min = j == 0? 0 : Math.min(min, cuts[j - 1] + 1);\n }\n }\n cuts[i] = min;\n }\n return cuts[n - 1];\n }",
"private static long calc1()\n {\n final int min = 1000;\n final int max = 10000;\n\n // initialize\n List<List<Integer>> m = new ArrayList<>();\n for (int k = 0; k < end; k++) {\n List<Integer> list = new ArrayList<Integer>();\n int n = 1;\n while (k >= start) {\n int p = pkn(k, n);\n if (p >= max) {\n break;\n }\n if (p >= min) {\n list.add(p);\n }\n n++;\n }\n m.add(list);\n }\n\n boolean[] arr = new boolean[end];\n arr[start] = true;\n\n List<Integer> solutions = new ArrayList<>();\n List<Integer> list = m.get(start);\n for (Integer first : list) {\n LinkedList<Integer> values = new LinkedList<>();\n values.add(first);\n f(m, arr, values, 1, solutions);\n // we stop at the first solution found\n if (!solutions.isEmpty()) {\n break;\n }\n }\n\n // solutions.stream().forEach(System.out::println);\n int res = solutions.stream().reduce(0, Integer::sum);\n return res;\n }",
"public static int iterativeFactDP(int n){\n int[] table = new int[n+1];\n table[0] = 0;\n table[1] = 1;\n for (int i = 2; i <=n ; i++) {\n table[i] = table[i-2]+table[i-1];\n }\n return table[n];\n }",
"public static void main(String[] args) {\n\t\tint width=35;\n\t\tint length=31;\n\t\tlong[][] dp = new long[width+1][length+1];\n\t\tdp[0][0]=0;\n\t\tfor(int i=1;i<length+1;i++){\n\t\t\tif(badCheck(0,i,0,i-1)){\n\t\t\t\tdp[0][i]=0;\n\t\t\t\tfor(int k=i+1;k<length+1;k++){\n\t\t\t\t\tdp[0][k]=0;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}else{\n\t\t\t\tdp[0][i]=1;\n\t\t\t}\n\t\t}\n\t\tfor(int i=1;i<width+1;i++){\n\t\t\tif(badCheck(i,0,i-1,0)){\n\t\t\t\tdp[i][0]=0;\n\t\t\t\tfor(int k=i+1;k<width+1;k++){\n\t\t\t\t\tdp[k][0]=0;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}else{\n\t\t\t\tdp[i][0]=1;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\tfor(int i=1;i<=width;i++){\n\t\t\tfor(int j=1;j<=length;j++){\n\t\t\t\tif(!badCheck(i-1,j,i,j)){\n\t\t\t\t\tdp[i][j]+=dp[i-1][j];\n\t\t\t\t}\n\t\t\t\tif(!badCheck(i,j-1,i,j)){\n\t\t\t\t\tdp[i][j]+=dp[i][j-1];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//System.out.println(dp[6][6]);\n\t\t//System.out.println(dp[2][2]);\n\t\t//System.out.println(dp[1][1]);\n\t\tSystem.out.println(dp[35][31]);\n\t}",
"public static int frog(int n, int [] h){\n\n int dp[] = new int [n];\n\n dp[0] = 0;\n dp[1] = Math.abs(h[1] - h[0]);\n\n for(int i = 2; i < n ; i ++){\n\n dp[i] = Math.min(dp [i - 2] + Math.abs(h[i] - h[i - 2]), dp[i - 1] + Math.abs(h[i] - h[i - 1]));\n\n\n\n }\n //print(dp);\n return dp[n - 1];\n }",
"public static int degreeOfArray(List<Integer> arr) { arr.length = n\n // num of Keys = k\n // O(n + k)\n // max value count = m\n //\n PriorityQueue<Node> pq = new PriorityQueue<>((i, j)-> j.count - i.count);\n Map<Integer, NodePosition> posMap = new HashMap<>();\n Map<Integer, Node> countMap = new HashMap<>();\n // [1, 2, 3, 4, 5, 6]\n for (int i = 0; i < arr.size(); i++) {\n int cur = arr.get(i);\n\n if (!countMap.containsKey(cur)) {\n countMap.put(cur, new Node(cur, 1));\n } else {\n Node curNode = countMap.get(cur);\n curNode.count++;\n countMap.put(cur, curNode);\n }\n\n if (!posMap.containsKey(cur)) {\n posMap.put(cur, new NodePosition(i, i));\n } else {\n NodePosition curNodePos = posMap.get(cur);\n curNodePos.endIndex = i;\n posMap.put(cur, curNodePos);\n }\n }\n //Iterator<Map.Entry<Integer, Node> it = new Iterator<>(countMap);\n for (Map.Entry<Integer, Node> e : countMap.entrySet()) {\n pq.add(e.getValue());\n }\n\n // [1, 2, 1, 3 ,2]\n // 1 , 2 , 3\n Node curNode = pq.remove();\n int maxCount = curNode.count;\n\n int minRange = posMap.get(curNode.num).endIndex - posMap.get(curNode.num).startIndex;\n\n while (!pq.isEmpty() && maxCount == pq.peek().count) {\n curNode = pq.remove();\n NodePosition nPos = posMap.get(curNode.num);\n minRange = Math.min(minRange, nPos.endIndex - nPos.startIndex);\n }\n\n return minRange + 1;\n }",
"public static void main(String[] args) throws IOException{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint m = sc.nextInt();\n\t\tint[] array = new int[n];\n\t\tfor(int i=0;i<n;i++)\n\t\t{\n\t\t\tarray[i] = sc.nextInt();\n\t\t}\n\t\tint[][] dp = new int[n][n];\n\t\tint[][] c = new int[n][n];\n\t\tfor(int i=0;i<n;i++)\n\t\t{\n\t\t\tint count=0,max=0;\n\t\t\tfor(int j=i;j<n;j++)\n\t\t\t{\n\t\t\t\tif(j==i){\n\t\t\t\t\tdp[i][j]=array[j];\n\t\t\t\t\tcount++;\n\t\t\t\t\tc[i][j]=count;\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\telse{\n\t\t\t\t\tif(array[j]==array[j-1]){\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t\tif(max<count) {\n\t\t\t\t\t\t\tmax =count;\n\t\t\t\t\t\t\tdp[i][j]=array[j];\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\tdp[i][j]=dp[i][j-1];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tc[i][j]=count;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tcount =1;\n\t\t\t\t\t\tdp[i][j] = dp[i][j-1];\n\t\t\t\t\t\tc[i][j]=count;\n\t\t\t\t\t\t\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t\t//System.out.print(dp[i][j]+\" \");\n\t\t\t}\n\t\t\t//System.out.println();\n\t\t}\n\t\t\n\t\tfor(int i=0;i<m;i++)\n\t\t{\n\t\t\tint l = sc.nextInt()-1;\n\t\t\tint r = sc.nextInt()-1;\n\t\t\tint k = sc.nextInt();\n\t\t\tif(c[l][r]>k)\n\t\t\t{\n\t\t\t\tSystem.out.println(dp[l][r]);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.println(-1);\n\t\t\t}\n\t\t}\n\t}",
"public static void main(String[] args) {\n\t\tScanner scan=new Scanner(System.in);\n\t\tint N=scan.nextInt();\n\t\tint a=scan.nextInt();\n\t\tint b=scan.nextInt();\n\t\tint[] nums=new int[N];\n\t\tint[][] weight=new int[N][N];\n\t\tfor(int i=0;i<N;i++){\n\t\t\tnums[i]=scan.nextInt();\n\t\t\tweight[i][i]=nums[i];\n\t\t}\n\t\tfor(int i=0;i<N;i++){\n\t\t\tfor(int j=i+1;j<N;j++){\n\t\t\t\tweight[i][j]=weight[i][j-1]+nums[j];\n\t\t\t}\n\t\t}\n\t\tlong[][] dp=new long[N][N];\n\t\tfor(int i=2;i<=N;i++){//dis\n\t\t\tfor(int j=0;j<=N-i;j++){//start\n\t\t\t\tint end=j+i-1;\n\t\t\t\tlong min=Integer.MAX_VALUE;\n\t\t\t\tfor(int k=j;k<end;k++){\n\t\t\t\t\tmin=Math.min(min, dp[j][k]+dp[k+1][end]+weight[j][k]*a+weight[k+1][end]*b);\n\t\t\t\t}\n\t\t\t\tdp[j][end]=min;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(dp[0][N-1]);\n\t\tscan.close();\n\t}",
"static int[] find2(int a[]){\r\n int sum = a[0];\r\n int pro = a[0];\r\n for(int i=1;i<a.length;i++){\r\n sum += a[i];\r\n pro += a[i]*a[i];\r\n }\r\n int s = (n*(n+1))/2 - sum;\r\n int p = (n*(n+1)*(2*n+1))/6 - pro;\r\n return solveSP(s, p);\r\n }",
"static int padovan(int n){\n if(n>=0 && n<=2)\n return 1;\n return padovan(n-2) + padovan(n-3);\n }",
"static int coinChangeProblem1(int[] coins,int sum){\n int n = coins.length;\n int[][] dp = new int[n+1][sum+1];\n\n for(int j = 1;j<=sum;j++){\n dp[0][j] = 0;\n }\n for(int i = 0;i<=n;i++){\n dp[i][0] = 1;\n }\n\n for(int i = 1;i<=n;i++){\n for(int j = 1;j<=sum;j++){\n if(coins[i-1]<=j){\n dp[i][j] = dp[i-1][j] + dp[i][j-coins[i-1]];\n }else dp[i][j] = dp[i-1][j];\n }\n }\n return dp[n][sum];\n }",
"int countSusbset(int n, int w){\n int dp[][] = new int[n+1][w+1];\n for(int i=0;i<=n;i++){\n for(int j=0;j<=w;j++){\n //when no items are there and target sum is 0, only one empty subset is possible\n if(i == 0 && j == 0){\n dp[i][j] = 1;\n }\n //no items left and target sum is greater than 0, no set is possible\n else if(i == 0 && j > 0){\n dp[i][j] = 0; \n }\n //if target sum is 0, no matter how many items we have , only one empty subset is possible\n else if(j == 0){\n dp[i][j] = 1;\n }\n //since item > target sum, so exclude\n else if(arr[i-1] > j){\n dp[i][j] = dp[i-1][j];\n }else{\n //two cases include and exclude\n dp[i][j] = dp[i-1][j] + dp[i-1][j - arr[i-1]];\n }\n }\n }\n return dp[n][w];\n}",
"static int recurseMaxStolenValue(int[] values,int i){\r\n\t if(i >= values.length) return 0;\r\n\t if(i == values.length -1) return values[values.length-1];\r\n\t \r\n\t return Math.max( values[i] + recurseMaxStolenValue(values,i+2)\r\n\t ,values[i+1] + recurseMaxStolenValue(values,i+3)\r\n\t );\r\n\t /*\r\n\t *Approach #2 for Recursion --> This approach won't work to convert to DP,but recursion yields right result\r\n\t */\r\n\t \r\n\t /*\r\n\t if(i >= values.length) return 0; \r\n\t int result1 = values[i]+recurseMaxStolenValue(values,i+2);\r\n\t int result2 = recurseMaxStolenValue(values,i+1);\r\n\t return (Math.max(result1,result2));\r\n\t */\r\n\t \r\n\t }",
"private int dfs(int[][] matrix, int i, int j, int d) {\n if (i < 0 || j < 0 || i == matrix.length || j == matrix[0].length || matrix[i][j] != 0)\n return 0;\n if (dp[i][j][d] > 0) return dp[i][j][d];\n timeComplexityCount++;\n maxI = Math.max(maxI, i);\n int res;\n if (d == 1)\n res = Math.max(dfs(matrix, i, j + 1, 1), dfs(matrix, i, j + 1, 2));\n else if (d == 0)\n res = Math.max(dfs(matrix, i, j - 1, 0), dfs(matrix, i, j - 1, 2));\n else\n res = Math.max(dfs(matrix, i + 1, j, 0), Math.max(dfs(matrix, i + 1, j, 1), dfs(matrix, i + 1, j, 2)));\n dp[i][j][d] = res + 1;\n return res + 1;\n }",
"static int[] sol1(int[]a, int n){\r\n\t\tMap <Integer,Integer> map= new HashMap();\r\n\t\tfor (int i = 0; i< a.length; i++){\r\n\t\t\tmap.put(a[i],i);\r\n\t\t}\r\n\t\tArrays.sort(a);\r\n\t\tint i = 0; \r\n\t\tint j = a.length -1;\r\n\t\twhile (i <= j){\r\n\t\t\tif(a[i]+a[j]>n) j--;\r\n\t\t\telse if (a[i]+a[j]<n) i++;\r\n\t\t\telse break;\r\n\t\t}\r\n\t\tint[] ans= {map.get(a[i]),map.get(a[j])};\r\n\t\treturn ans;\r\n\t}",
"public static void solve(int n, List<Integer> a) {\n Collections.sort(a);\n Collections.reverse(a);\n double sum = a.stream().mapToDouble(num -> Double.valueOf(num)).sum();\n double currentN = Double.valueOf(n);\n double currentSum = sum;\n for(Integer next : a)\n {\n double nextDouble = Double.valueOf(next);\n if(nextDouble<=currentSum/currentN)\n {\n break;\n }\n currentSum -= nextDouble;\n currentN--;\n }\n System.out.println(currentSum/currentN);\n\n\n }",
"public static int countUniqueCombinationsDP(int score) {\r\n /*\r\n * Return Type of DP array is same as return type of the recursive function\r\n * Dimensions of DP array is the number of non constant parameters to the recursive function\r\n */\r\n \t\r\n \t/*\r\n \t * Fn(s) = Fn(s-7) [if(s>=7)] + Fn(s-3) [if(s>=3)] + Fn(s-2) [if(s>=2)]\r\n\t\t * Fn(0) = 1\r\n\t\t * \r\n * F(11) = F(4) + F(8) + F(9)\r\n */\r\n \tint[][] comb = new int[score + 1][3];\r\n // int[] points = {2,3,7};\r\n \r\n // Halting Conditions\r\n comb[0][0] = 1;\r\n comb[0][1] = 1;\r\n comb[0][2] = 1;\r\n \r\n /*\r\n * Loop goes in the direction opposite to that of the recursion \r\n */\r\n for (int s = 1; s <= score; ++s) {\t\t// s is the score of the recursion\r\n \tfor (int p = 0; p < 3; ++p) {\r\n\t \tint total = 0;\r\n\t if (s >= 2 && p == 0)\r\n\t \ttotal = total + comb[s - 2][0];\r\n\t if (s >= 3 && p <= 1)\r\n\t \ttotal = total + comb[s - 3][1];\r\n\t if (s >= 7)\t\t\t// No need of condition p<=2; as it will always be true\r\n\t \ttotal = total + comb[s - 7][2];\r\n\t comb[s][p] = total;\r\n \t}\r\n }\r\n\r\n return comb[score][0];\r\n }",
"public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n int n = in.nextInt();\n int k = in.nextInt();\n ArrayList<Integer> list = new ArrayList<>();\n for(int arr_i=0; arr_i < n; arr_i++){\n int integer = in.nextInt();\n list.add(new Integer(integer));\n }\n in.close();\n\n\n\n if(k == 1){\n System.out.println(k);\n return;\n }\n\n for(int i = 0;i < list.size();i ++){\n int x = list.get(i) % k;\n list.set(i, x);\n }\n\n int[] kx = new int[k];\n for(int i = 0;i < k;i ++){\n kx[i] = 0;\n }\n for(int i = 0;i < list.size();i ++){\n int x = list.get(i);\n kx[x] ++;\n }\n\n\n int num = 0;\n int A = 0;\n if(k % 2 == 0){\n A = k / 2 - 1;\n }else{\n A = k / 2;\n }\n if(kx[0] != 0){\n num += 2;\n }\n for(int i = 1; i <= A;i ++){\n if(kx[i] >= kx[k - i]){\n num += kx[i];\n }else {\n\n num += kx[k - i];\n }\n\n }\n System.out.println(num);\n }",
"private static int findMax(int[] A, int len, int[] dp) {\r\n\t\t\r\n\t\tif(len < 0)\r\n\t\t\treturn 0;\r\n\t\t\t\r\n\t\tif(len == 0)\r\n\t\t\treturn A[0];\r\n\t\t\r\n\t\tif(len == 1)\r\n\t\t\treturn Math.max(A[0], A[1]);\r\n\t\t\r\n\t\tif(dp[len] != 0)\r\n\t\t\treturn dp[len];\r\n\t\t\r\n\t\tdp[len] = Math.max((A[len] + findMax(A, len-2, dp)), findMax(A, len-1, dp));\r\n\t\treturn dp[len];\r\n\t\t\r\n\t}",
"private static int DP(String[] arr, int[] len, int i) {\n int min = Integer.MAX_VALUE;\n int minPointer = Integer.MAX_VALUE;\n for (int k = i + 1; k < arr.length; k++) {\n int badness = badness(len, i, k, PAGE_WIDTH);\n if (badness == Integer.MAX_VALUE) {\n break;\n } else if (badness < min) {\n min = badness;\n minPointer = k;\n } // TODO: if badness max value then k is already +1\n }\n\n if (minPointer == arr.length - 1) {\n minPointer = arr.length;\n }\n return minPointer;\n }",
"private int optimize() {\n\t\t// items: Items sorted by value-to-weight ratio for linear relaxation\n\t\t// t: the decision vector being tested at each node\n\t\t// ws, vs, is, bs: stacks of weight, value, item id, whether bring item\n\t\t// p: stack pointer; i, b, weight, value: loop caches; best: max search\n\t\t// ss: stack size: Always <=2 children on stack for <=n-1 parents\n\t\tItem[] items = new Item[n];\n\t\tint ss = 2 * n;\n\t\tint[] itemsSorted = new int[n], t = new int[n], ws = new int[ss],\n\t\t\tvs = new int[ss], is = new int[ss], bs = new int[ss];\n\t\tint i, b, weight, value, best = 0, p = 0;\n\n\t\tfor (int j = 0; j < n; j++)\n\t\t\titems[j] = new Item(j);\n\t\tArrays.sort(items);\n\t\tfor (int j = 0; j < n; j++)\n\t\t\titemsSorted[j] = items[j].i();\n\t\titems = null; // For garbage collection.\n\n\t\t// Push item 0 onto the stack with and without bringing it.\n\t\tws[p] = 0; vs[p] = 0; is[p] = 0; bs[p] = 1; p++;\n\t\tws[p] = 0; vs[p] = 0; is[p] = 0; bs[p] = 0; p++;\n\n\t\twhile (p > 0) {\n\t\t\tp--; // Pop the latest item off the stack\n\t\t\ti = is[p]; b = bs[p];\n\t\t\tweight = ws[p] + w[i] * b;\n\t\t\tif (weight > k)\n\t\t\t\tcontinue;\n\t\t\tvalue = vs[p] + v[i] * b;\n\t\t\tif (bound(i, weight, value, itemsSorted) < best)\n\t\t\t\tcontinue;\n\t\t\tbest = Math.max(value, best);\n\t\t\tt[i] = b;\n\t\t\tif (i < n - 1) { // Push children onto stack w/ & w/o bringing item\n\t\t\t\tws[p] = weight; vs[p] = value; is[p] = i + 1; bs[p] = 1; p++;\n\t\t\t\tws[p] = weight; vs[p] = value; is[p] = i + 1; bs[p] = 0; p++;\n\t\t\t}\n\t\t\telse if (value >= best)\n\t\t\t\tSystem.arraycopy(t, 0, x, 0, n);\n\t\t}\n\t\treturn best;\n\t}",
"public int solution(int[] A) {\n int sum = 0;\n int max = 0;\n Map<Integer, Integer> countMap = new HashMap<>();\n for (int i = 0; i < A.length; i++) {\n int val = Math.abs(A[i]);\n sum += val;\n A[i] = val;\n max = Math.max(val, max);\n countMap.put(val, countMap.getOrDefault(val, 0) + 1);\n }\n int[] dp = new int[sum + 1];\n for (int i = 1; i < dp.length; i++) {\n dp[i] = -1;\n }\n int[] count = new int[max + 1];\n for (Map.Entry<Integer, Integer> countMapEntry : countMap.entrySet()) {\n count[countMapEntry.getKey()] = countMapEntry.getValue();\n }\n for (int i = 1; i < max + 1; i++) {\n if (count[i] > 0) {\n for (int j = 0; j < dp.length; j++) {\n if (dp[j] >= 0) {\n dp[j] = count[i];\n } else if (j >= i && dp[j - i] > 0) {\n dp[j] = dp[j - i] - 1;\n }\n }\n }\n }\n int half = sum / 2;\n for (int i = half; i >= 0; i--) {\n if (dp[i] >= 0) {\n return Math.abs((sum - i) - i);\n }\n }\n return -1;\n }",
"public int findPairsTwoPointers(int[] nums, int k) {\n if (k < 0) {\n return 0;\n }\n Arrays.sort(nums); // O(N*logN)\n\n int i = 0;\n int j = 1;\n int count = 0;\n while (j < nums.length) { // O(N)\n if (i == j || nums[j] - nums[i] < k) {\n j++;\n } else if (nums[j] - nums[i] > k) {\n i++;\n } else {\n count += 1;\n j++;\n while (j < nums.length && nums[j] == nums[j - 1]) {\n j++;\n }\n }\n }\n return count;\n }",
"private static int numWaysDP(int N, ArrayList<Integer> x) {\n /* Base Cases */\n if (N == 0) {\n return 1;\n }\n\n int count;\n int[] counts = new int[N + 1];\n counts[0] = 1;\n for (int i = 1; i <= N; i++) {\n count = 0;\n for (int num : x) {\n if (i - num >= 0) {\n count += counts[i - num];\n }\n }\n counts[i] = count;\n }\n\n return counts[N];\n }",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint arr[] = new int[n];\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tarr[i] = sc.nextInt();\n\t\t}\n\t\tint sum = sc.nextInt();\n\t\tHashMap<Integer,Integer> map = new HashMap<>();\n \t\tArrays.sort(arr);\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tint temp = arr[i];\n\t\t\tint reqSum = sum-temp;\n\t\t\tarr[i]=0;\n\t\t\tint l=0;\n\t\t\tint r = n-1;\n\t\t\twhile(l<r) {\n\t\t\t\t//System.out.println(\"l \" + l + \" r \" + r + \" i = \"+ i);\n\t\t\t\tif(arr[l] + arr[r]==reqSum && arr[l]!=0 && arr[r]!=0 ) {\n\t\t\t\t\tint arr2[] = new int[3];\n\t\t\t\t\tarr2[0] = temp;\n\t\t\t\t\tarr2[1] = arr[l];\n\t\t\t\t\tarr2[2] = arr[r];\n\t\t\t\t\tif(map.containsKey(arr2[0]) || map.containsKey(arr2[1]) || map.containsKey(arr2[2])) {\n\t\t\t\t\t\t\n\t\t\t\t\t}else {\n\t\t\t\t\t\tArrays.sort(arr2);\n\t\t\t\t\t\tSystem.out.println(arr2[0] + \" \" + arr2[1] + \" \" + arr2[2]);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tl++;\n\t\t\t\t}else if(arr[l] + arr[r] < reqSum) {\n\t\t\t\t\tl++;\n\t\t\t\t\t\n\t\t\t\t}else {\n\t\t\t\t\tr--;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\tarr[i] = temp;\t\n\t\t\tmap.put(arr[i], 1);\n\t\t}\n\t}",
"@Override\n public String solve() {\n int LIMIT = 50 * NumericHelper.ONE_MILLION_INT;\n int[] nCount = new int[LIMIT+1];\n for(long y = 1; y<= LIMIT; y++) {\n for(long d= (y+3)/4; d<y; d++) { // +3 is to make d atleast 1\n long xSq = (y+d) * (y+d);\n long ySq = y * y;\n long zSq = (y-d) * (y-d);\n\n long n = xSq - ySq - zSq;\n\n if(n<0) {\n continue;\n }\n\n if(n>=LIMIT) {\n break;\n }\n\n\n nCount[(int)n]++;\n\n }\n }\n\n int ans = 0;\n for(int i = 1; i<LIMIT; i++) {\n if(nCount[i] == 1) {\n //System.out.print(i +\",\");\n ans++;\n }\n }\n\n return Integer.toString(ans);\n }",
"static int paths_dp(int[][] matrix) {\n\t\tint n = matrix.length;\n\t\tint m = matrix[0].length;\n\t\t\n\t\tint[][] dp = new int[n][m];\n\t\tdp[0][0] = matrix[0][0] == 1? 0 : 1;\n\t\t\n\t\tfor(int i = 1; i < m; i++) {\n\t\t\tif(matrix[0][i] == 1) {\n\t\t\t\tdp[0][i] = 0;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tdp[0][i] = dp[0][i-1];\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(int i = 1; i < n; i++) {\n\t\t\tif(matrix[i][0] == 1) {\n\t\t\t\tdp[i][0] = 0;\n\t\t\t} else {\n\t\t\t\tdp[i][0] = dp[i-1][0];\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(int i = 1; i < n; i++) {\n\t\t\tfor(int j = 1; j < m; j++) {\n\t\t\t\tif(matrix[i][j] == 1 ) {\n\t\t\t\t\tdp[i][j] = 0;\n\t\t\t\t} else {\n\t\t\t\t\tdp[i][j] = dp[i-1][j] + dp[i][j+1];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn dp[n-1][m-1];\n\t}",
"public int numTrees(int n) {\n if(n<=1)\n return 1;\n int[] dp = new int[n+1];\n dp[0] = 1;\n dp[1] = 1;\n dp[2] = 2;\n \n for(int i=3;i<=n;i++){\n int sum = 0;\n for(int a=0;a<i;a++){\n sum+=dp[0+a]*dp[i-1-a];\n }\n dp[i] = sum;\n //if i is odd then add the i/2 dp after you multiply by 2\n }\n return dp[n];\n }",
"public static long journeyToMoon(int n, List<List<Integer>> astronaut) {\n // Write your code here\n Map<Integer, Node<Integer>> countryMap = new HashMap<>();\n for(List<Integer> pairs: astronaut) {\n Node<Integer> node1 = countryMap.computeIfAbsent(pairs.get(0), Node::new);\n Node<Integer> node2 = countryMap.computeIfAbsent(pairs.get(1), Node::new);\n node1.connected.add(node2);\n node2.connected.add(node1);\n }\n\n List<Integer> countryCluster = new ArrayList<>();\n for(Node<Integer> node: countryMap.values()) {\n if(node.connected.size() == 0) {\n countryCluster.add(1);\n } else if(!node.visited){\n countryCluster.add(getNodeCount3(node));\n }\n }\n List<Integer> countryNodes = countryMap.values().stream().map(nn -> nn.value).collect(Collectors.toList());\n List<Integer> missingNodes = new ArrayList<>();\n for(int i=0; i < n; i++) {\n if(!countryNodes.contains(i))\n missingNodes.add(i);\n }\n\n for(int i=0; i < missingNodes.size(); i++) {\n countryCluster.add(1);\n }\n\n long ans = 0;\n //For one country we cannot pair with any other astronauts\n if(countryCluster.size() >= 2) {\n ans = (long) countryCluster.get(0) * countryCluster.get(1);\n if(countryCluster.size() > 2) {\n int sum = countryCluster.get(0) + countryCluster.get(1);\n for(int i=2; i < countryCluster.size(); i++) {\n ans += (long) sum * countryCluster.get(i);\n sum += countryCluster.get(i);\n }\n }\n }\n\n /*\n permutation of two set with size A and B = AxB\n permutation of three set with size A,B,C = AxB + AxC + BxC = AxB + (A+B)xC\n permutation of four set with size A,B,C,D = AxB + AxC + AxD + BxC + BxD + CxD = AxB + (A+B)xC + (A+B+C)xD\n */\n /*\n if(keys.length == 1) {\n ans = keys[0].size();\n } else {\n ans = keys[0].size() * keys[1].size();\n if(keys.length > 2) {\n int sum = keys[0].size() + keys[1].size();\n for (int i = 2; i < keys.length; i++) {\n ans += sum * keys[i].size();\n sum += keys[i].size();\n }\n }\n }\n */\n return ans;\n }",
"public int kSum(int[] A, int k, int target) {\n\t\tint res=0;\r\n\t\t//考虑k=1的情况\r\n//\t\tif (k==1) {\r\n//\t\t\tfor(int i=0;i<A.length;i++) {\r\n//\t\t\t\tif (A[i]==target) {\r\n//\t\t\t\t\tres++;\r\n//\t\t\t\t}\r\n//\t\t\t}\r\n//\t\t\treturn res;\r\n//\t\t}\r\n//\t\tint sum_k_1=0;\r\n//\t\tint sum=target-sum_k_1;\r\n//\t\tif (k>1 && k<A.length) {\r\n//\t\t\tfor(int i=0;i<A.length-1;i++) {\r\n//\t\t\t\tfor(int j=i+1;j<A.length;j++) {\r\n//\t\t\t\t\t\r\n//\t\t\t\t}\r\n//\t\t\t}\r\n//\t\t}\r\n\t\t//动态规划\r\n\t\tint n=A.length;\r\n\t\tint[][][] f=new int[n+1][k+1][target+1];\r\n\t\tfor(int i=0;i<n+1;i++) {\r\n\t\t\tf[i][0][0]=1;\r\n\t\t}\r\n\t\tfor(int i=1;i<=n;i++) {\r\n\t\t\tfor(int j=1;j<=k && j<=i;j++) {\r\n\t\t\t\tfor(int t=1;t<=target;t++) {\r\n\t\t\t\t\tf[i][j][t]=0;\r\n\t\t\t\t\tif (t>=A[i-1]) {\r\n\t\t\t\t\t\tf[i][j][t]=f[i-1][j-1][t-A[i-1]];\r\n\t\t\t\t\t}\r\n\t\t\t\t\tf[i][j][t]+=f[i-1][j][t];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn f[n][k][target];\r\n }",
"private static int solve(int[] wt, int[] val, int n, int w) {\n int[][] dp = new int[n+1][w + 1];\n\n for (int i = 1; i <= n; ++i) {\n for (int j = 1; j <= w; ++j) {\n if (wt[i-1] <= j) dp[i][j] = Math.max(dp[i-1][j] , val[i-1]+dp[i-1][j-wt[i-1]]);\n else dp[i][j] = dp[i-1][j];\n }\n }\n return dp[n][w];\n }",
"static int expt(int n,int k) {\n\t\tif (k==0)\n\t\t\treturn 1;\n\t\telse\n\t\t\treturn n*expt(n,k-1);\n\t}",
"public int[] squareUp(int n) {\r\n int[]arreglo=new int[(n*n)]; // O(1)\r\n if(n==0){ // O(1)\r\n return arreglo; // O(1)\r\n }\r\n for(int i=n-1;i<arreglo.length;i=i+n){ // O(n)\r\n for (int j=i;j>=i-(i/n);j--){ // O(1)\r\n arreglo[j]=1+(i-j); // O(1)\r\n }\r\n }\r\n return arreglo; // O(1)\r\n}",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int T = sc.nextInt();\n for(int i = 0 ; i < T; i++) {\n int n = sc.nextInt();\n int a = sc.nextInt();\n int b = sc.nextInt();\n PriorityQueue<Integer> queue = new PriorityQueue<Integer>();\n int[][] m = new int[n][n];\n //n^2 * log(n)\n for(int row = 0; row < n; row++) {\n for(int col = 0; col < n; col++) {\n if(row == 0 && col == 0 && n != 1) {\n continue;\n }else if(row == 0) {\n m[row][col] = m[row][col - 1] + a;\n }else if(col == 0) {\n m[row][col] = m[row-1][col] + b;\n }else {\n m[row][col] = m[row-1][col-1] + a + b;\n }\n\n if(row + col == (n -1)) {\n pool.add(m[row][col]); //log(n)\n }\n }\n }\n //O(n*log(n))\n for (Integer item:pool) {\n queue.add(item); //O(logn)\n }\n while(!queue.isEmpty()) {\n System.out.print(queue.poll() + \" \"); //O(1)\n }\n System.out.println();\n queue.clear();\n pool.clear();\n }\n }",
"public static int calculate()\n {\n final List<Integer> oneToNine = IntStream.iterate(1, n -> n + 1)\n .limit(9)\n .boxed()\n .collect(toList());\n final List<List<Integer>> permutations = HeapPermutations.of(oneToNine);\n\n // System.out.println(permutations.size());\n //2- for each permutation\n // a. find all breaking 2 points to break\n // b. check first two sections' third is equal to the last section\n // c. if yes, add combintion to result, otherwise skip\n\n return permutations.stream()\n .flatMap(toTriples()) //find all combinations xx X yy = zz\n .filter(isPandigital()) // allow pandigital tripes through\n .map(Triple::getThird) // get the product\n .distinct() // get distinct products only given the problem statement does not allow repetition (see hint)\n .mapToInt(i -> i) // convert to primitive\n .sum(); // and finally get the sum\n }",
"public int jump(int[] nums) {\n int[] dp = new int[nums.length];\n for(int i=1;i<nums.length;i++) {\n dp[i] = Integer.MAX_VALUE;\n }\n for(int start =0 ; start < nums.length-1 ;start++){\n for(int end=start+1; end<=start+nums[start] && end<nums.length; end++){\n dp[end] = Math.min(dp[end], dp[start]+1);\n }\n }\n return dp[nums.length-1];\n }",
"public static int wayToArrangeDP(int n) {\n\t\tint last = 2, secondLast = 1, current = 0;\n\n\t\tif (n == 0 || n == 1 || n == 2) {\n\t\t\treturn n;\n\t\t}\n\n\t\tfor (int i = 3; i <= n; i++) {\n\t\t\tcurrent = last + secondLast;\n\t\t\tsecondLast = last;\n\t\t\tlast = current;\n\t\t}\n\t\treturn current;\n\t}",
"private void helper(int[] S, int k, int p, ArrayList<ArrayList<Integer>> result, ArrayList<Integer> set) {\n if(k==0) {\n result.add(set);\n return;\n }\n if(S.length-p>=k) {\n ArrayList<Integer> newSet = new ArrayList<Integer>(set);\n newSet.add(S[p]);\n helper(S, k-1, p+1, result, newSet); //if S[p] be choosen\n helper(S, k, p+1, result, set); // if S[p] not be choosen\n }\n\n }",
"public static int f2(int N) { \n int x = 0; //O(1)\n for(int i = 0; i < N; i++) // O(n)\n // O(n)`\n for(int j = 0; j < i; j++) \n x++;\n return x;\n }",
"public int[] solution(String S, int[] P, int[] Q) {\n \n int[][] result = new int[S.length()][4];\n int[] returnResult = new int[P.length];\n \n //how many different solutions exist?\n //'A' [0], [0] - 1 solution\n //'AG' [0, 0, 1], [0, 1, 1] - 3\n // 'AGT' [0,0,0,1,1,2], [0,1,1,2,2,2] - 6\n // 10\n // 15\n // 21\n \n //Prefix Sum - calculation\n \n for (int i = 1; i< S.length()+1; i++){\n \n if (i == 1){\n switch (S.substring(i-1, i)){\n case \"A\": result[i-1][0] = 1;\n break;\n case \"C\": result[i-1][1] = 1;\n break;\n case \"G\": result[i-1][2] = 1;\n break;\n case \"T\": result[i-1][3] = 1;\n break;\n }\n }else{\n int a = 0;\n switch (S.substring(i-1, i)){\n case \"A\": a = 0;\n break;\n case \"C\": a= 1;\n break;\n case \"G\": a =2;\n break;\n case \"T\": a =3;\n break;\n }\n result[i-1][a] = 1 + result[i-2][a];\n result[i-1][(a+1)%4] = result[i-2][(a+1)%4];\n result[i-1][(a+2)%4] = result[i-2][(a+2)%4];\n result[i-1][(a+3)%4] = result[i-2][(a+3)%4];\n }\n\n }\n \n /*\n for (double i : result){\n System.out.println(i);\n }\n */\n \n //A = 1, G = 2, C = 3, T = 4\n //when A found return 1 and move to next computation.\n // P[k] <= Q[K]\n int lowerBound = 0;\n int upperBound = 0;\n for (int i = 0; i < P.length; i++){\n lowerBound = P[i];\n upperBound = Q[i];\n \n int[] toEvaluate = new int[4];\n\n //System.out.println(lowerBound);\n if (lowerBound == 0){\n toEvaluate[0]= result[upperBound][0];\n toEvaluate[1]= result[upperBound][1];\n toEvaluate[2]= result[upperBound][2];\n toEvaluate[3]= result[upperBound][3];\n }else{\n toEvaluate[0]= result[upperBound][0] - result[lowerBound-1][0]; \n toEvaluate[1]= result[upperBound][1] - result[lowerBound-1][1];\n toEvaluate[2]= result[upperBound][2] - result[lowerBound-1][2];\n toEvaluate[3]= result[upperBound][3] - result[lowerBound-1][3];\n }\n \n /*\n for (int eval : toEvaluate){\n System.out.println(eval);\n \n }\n */\n if (toEvaluate[0] > 0) {returnResult[i] = 1;\n }else if (toEvaluate[1] > 0) {returnResult[i] = 2;\n }else if (toEvaluate[2] > 0) {returnResult[i] = 3;\n }else if (toEvaluate[3] > 0) {returnResult[i] = 4;\n }\n \n }\n \n return returnResult; \n }",
"void solve() throws IOException {\n int[] nk = ril(2);\n int n = nk[0];\n int k = nk[1];\n int[] p = ril(n);\n int[] b = ril(k);\n for (int i = 0; i < n; i++) p[i]--;\n for (int i = 0; i < k; i++) b[i]--;\n\n int[] numToIdx = new int[n];\n for (int i = 0; i < n; i++) numToIdx[p[i]] = i;\n\n boolean[] remove = new boolean[n];\n Arrays.fill(remove, true);\n for (int bi : b) remove[bi] = false;\n List<Integer> toRemove = new ArrayList<>(n - k);\n for (int i = 0; i < n; i++) if (remove[i]) toRemove.add(i);\n Collections.sort(toRemove);\n\n int[] prevSmaller = new int[n];\n prevSmaller[0] = -1;\n int prevIdx = remove[p[0]] ? -1 : 0;\n for (int i = 1; i < n; i++) {\n int j = prevIdx;\n while (j != -1 && p[i] < p[j]) j = prevSmaller[j];\n prevSmaller[i] = j;\n if (!remove[p[i]]) prevIdx = i;\n }\n int[] nextSmaller = new int[n];\n nextSmaller[n-1] = n;\n prevIdx = remove[p[n-1]] ? n : n-1;\n for (int i = n-2; i >= 0; i--) {\n int j = prevIdx;\n while (j != n && p[i] < p[j]) j = nextSmaller[j];\n nextSmaller[i] = j;\n if (!remove[p[i]]) prevIdx = i;\n }\n\n int[] init = new int[n];\n Arrays.fill(init, 1);\n SegmentTree st = new SegmentTree(init);\n long ans = 0;\n for (int x : toRemove) {\n int idx = numToIdx[x];\n int l = prevSmaller[idx] + 1;\n int r = nextSmaller[idx] - 1;\n ans += st.query(l, r+1);\n st.modify(idx, 0);\n }\n pw.println(ans);\n }",
"public static int rob(int[] nums) {\n /*int n=nums.length;\n int[] dp = new int[n];\n if(nums.length==1)\n return nums[0];\n dp[0]=nums[0];\n dp[1]=Math.max(nums[0],nums[1]);\n for(int i=2;i<n;i++)\n dp[i]=Math.max(dp[i-1],dp[i-2]+nums[i]);\n System.out.println(Arrays.toString(dp));\n return dp[n-1];*/\n int n= nums.length;\n int[] dp = new int[n+1];\n dp[0]=0;\n dp[1]=nums[0];\n for(int i=2;i<=n;i++){\n dp[i]=Math.max(dp[i-2]+nums[i-1],dp[i-1]);\n }\n\n return dp[n];\n }",
"int help(int n, int k, int[][] map) {\n if (n <= 0 || k < 0) return 0;\n if (0 == k) return 1;\n if (1 == k) return n - 1;\n if (map[n][k] > 0) return map[n][k];\n long sum = 0;\n for (int i = 1; i <= k; i ++) {\n for (int j = 0; j < n; j ++) {\n// System.out.println(\"i = \" + i + \", j = \" + j + \", j - i = \" + (j - i) + \", j + i = \" + (j + i) + \", f0 = \" + (n - j + i - 1) + \", f1 = \" + (n - j - i - 1) + \", k - i = \" + (k - i));\n int g = 0, g0 = 0, g1 = 0;\n if (j - i >= 0) {\n g += help(n - j + i - 1, k - i, map);\n sum += g;\n// System.out.println(\"g0 = \" + g0 + \", g1 = \" + g1 + \", g = \" + g + \", sum = \" + sum);\n// System.out.println(\"-\");\n }\n }\n\n }\n// System.out.println(\"sum = \" + sum + \" ----\");\n map[n][k] = (int)sum;\n return (int)sum;\n }",
"static boolean subSetSumProblem(int[] arr,int sum){\n// init\n int n = arr.length;\n boolean[][] dp = new boolean[n+1][sum+1];\n\n for (int j = 0;j<=sum;j++){\n dp[0][j] = false;\n }\n\n for (int i = 0;i<=n;i++){\n dp[i][0] = true;\n }\n\n for (int i = 1;i<=n;i++){\n for (int j = 1;j<=sum;j++){\n if (arr[i-1] <= j){\n dp[i][j] = dp[i-1][j] || dp[i-1][j-arr[i-1]];\n }else{\n dp[i][j] = dp[i-1][j];\n }\n }\n }\n return dp[n][sum];\n }",
"static long solve(long[] d) {\n int len = d.length;\n long[] dp = new long[len];\n\n Set<Long> set = new HashSet<>();\n\n for (int index1 = len - 1; index1 >= 0; index1--) {\n int count = 0;\n for (int index2 = index1 + 1; index2 < len; index2++) {\n if (d[index2] > d[index1]) {\n if( set.contains(d[index2] ) )continue;\n set.add(d[index2]);\n count++;\n }\n }\n set = new HashSet<>();\n dp[index1] = count;\n }\n\n long res = 0;\n Set<Long> distinct = new HashSet<>();\n for (int index1 = 0; index1 < len; index1++) {\n long curr = d[index1];\n if (distinct.contains(curr)) {\n continue;\n } else distinct.add(curr);\n for (int index2 = index1 + 1; index2 < len; index2++) {\n if (d[index2] > curr) {\n if (set.contains(d[index2])) continue;\n res += dp[index2];\n set.add(d[index2]);\n }\n }\n set = new HashSet<>();\n }\n\n return res;\n\n }",
"private static Integer packDPRec(Integer capacity, List<Integer> weights, List<ItemDTO> items, Integer n, Integer[][] mem, List<Integer> optimalChoice) {\n // Base condition\n if (n == 0 || capacity <= 0)\n return 0;\n\n if (mem[n][capacity] != -1) {\n return mem[n][capacity];\n }\n\n if (weights.get(n - 1) > capacity) {\n // Store the value of function call\n // stack in table before return\n List<Integer> subOptimalChoice = new ArrayList<>();\n mem[n][capacity] = packDPRec(capacity, weights, items, n - 1, mem, subOptimalChoice);\n optimalChoice.addAll(subOptimalChoice);\n return mem[n][capacity];\n } else {\n // Return value of table after storing\n List<Integer> optimalChoiceIncluded = new ArrayList<>();\n List<Integer> optimalChoiceExcluded = new ArrayList<>();\n Integer valueIncluded = items.get(n - 1).getValue() + packDPRec(capacity - weights.get(n - 1), weights, items, n - 1, mem, optimalChoiceIncluded);\n Integer valueExcluded = packDPRec(capacity, weights, items, n - 1, mem, optimalChoiceExcluded);\n if (valueIncluded > valueExcluded) {\n optimalChoice.addAll(optimalChoiceIncluded);\n optimalChoice.add(items.get(n - 1).getId());\n mem[n][capacity] = valueIncluded;\n }else{\n optimalChoice.addAll(optimalChoiceExcluded);\n mem[n][capacity] = valueExcluded;\n }\n return mem[n][capacity];\n }\n }",
"static int trappingWater(int arr[], int n) {\r\n\r\n // Your code here\r\n /** *** tle\r\n for(int i=1;i<n-1;i++){\r\n int l=arr[i];\r\n for (int j = 0; j < i; j++) {\r\n l=l < arr[j] ? arr[j] : l;\r\n }\r\n int r=arr[i];\r\n for (int j = i+1; j <n ; j++) {\r\n r=r < arr[j] ? arr[j] : r;\r\n }\r\n\r\n s=s+(l>r? r:l) -arr[i];\r\n }\r\n return s;\r\n\r\n //////////////////////////////////////////////\r\n SC=O(N)\r\n if(n<=2)\r\n return 0;\r\n int[] left=new int[n];\r\n int[] right=new int[n];\r\n left[0]=0;\r\n int leftmax=arr[0];\r\n for (int i = 1; i <n ; ++i) {\r\n left[i]=leftmax;\r\n leftmax=Math.max(leftmax,arr[i]);\r\n }\r\n right[n-1]=0;\r\n int mxright=arr[n-1];\r\n for (int i = n-2; i >=0 ; --i) {\r\n right[i]=mxright;\r\n mxright=Math.max(mxright,arr[i]);\r\n }\r\n int s=0;\r\n for (int i = 1; i < n-1; ++i) {\r\n if(arr[i]<left[i] && arr[i]<right[i]){\r\n s+=Math.min(left[i],right[i])-arr[i];\r\n }\r\n }\r\n return s;\r\n /////////////////////////////////////////////////////\r\n **/\r\n\r\n if(n<=2)\r\n return 0;\r\n\r\n int leftMax = arr[0];\r\n int rightMax = arr[n-1];\r\n\r\n int left = 1;\r\n int right = n-2;\r\n int water = 0;\r\n\r\n while(left <= right) {\r\n if (leftMax < rightMax) {\r\n if (arr[left] >= leftMax) {\r\n leftMax = arr[left];\r\n } else\r\n water = water + (leftMax - arr[left]);\r\n\r\n //leftMax = Math.max(leftMax, arr[left]);\r\n left++;\r\n } else {\r\n if (arr[right] > rightMax) {\r\n rightMax = arr[right];\r\n }\r\n\r\n water = water + (rightMax - arr[right]);\r\n right--;\r\n }\r\n }\r\n return water;\r\n\r\n }",
"public static void main(String[] args) {\n\t\tScanner scn = new Scanner(System.in);\n\t\tint t = scn.nextInt();\n\t\twhile (t-- > 0) {\n\t\t\tint n = scn.nextInt();\n\t\t\tint k = scn.nextInt();\n\t\t\tString s = scn.next();\n\t\t\tString s1 = new StringBuilder(s).reverse().toString();\n\t\t\tint[][] dp = new int[n + 1][n + 1];\n\t\t\tfor (int i = 0; i <= n; i++) {\n\t\t\t\tfor (int j = 0; j <= n; j++) {\n\t\t\t\t\tif (i == 0 || j == 0)\n\t\t\t\t\t\tdp[i][j] = 0;\n\t\t\t\t\telse if (s.charAt(i - 1) == s1.charAt(j - 1))\n\t\t\t\t\t\tdp[i][j] = dp[i - 1][j - 1] + 1;\n\t\t\t\t\telse\n\t\t\t\t\t\tdp[i][j] = Math.max(dp[i - 1][j], dp[i][j - 1]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (int[] c : dp) {\n\t\t\t\tfor (int v : c) {\n\t\t\t\t\tSystem.out.print(v + \" \");\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t\tint rem = n - dp[n][n];\n\t\t\tif (rem <= k)\n\t\t\t\tSystem.out.println(\"YES\");\n\t\t\telse\n\t\t\t\tSystem.out.println(\"NO\");\n\t\t}\n\t}",
"public static int solution(int[] arr) {\n int[] dp = new int[arr.length];\n dp[0] = arr[0];\n int max = Integer.MIN_VALUE;\n \n for(int i = 1; i < arr.length; i++){\n if(dp[i - 1] > 0) dp[i] = arr[i] + dp[i - 1];\n else dp[i] = arr[i];\n max = Math.max(max, dp[i]);\n }\n \n return max;\n }",
"static int gen(int n)\n{ \n int []S = new int [n + 1];\n \n S[0] = 0;\n if(n != 0)\n S[1] = 1;\n \n for (int i = 2; i <= n; i++)\n { \n \n // S(2 * n) = 4 * S(n)\n if (i % 2 == 0)\n S[i] = 4 * S[i / 2];\n \n // S(2 * n + 1) = 4 * S(n) + 1\n else\n S[i] = 4 * S[i/2] + 1;\n }\n \n return S[n];\n}",
"int backTrack(int[] nums, int targetSum, int startIndex, int computedSum, int[][] dp) {\n if (startIndex == nums.length) {\n if (targetSum == computedSum) {\n return 1;\n\n }\n return 0;\n } else {\n\n int add = backTrack(nums, targetSum, startIndex + 1, computedSum + nums[startIndex], dp);\n\n int subtract = backTrack(nums, targetSum, startIndex + 1, computedSum - nums[startIndex], dp);\n dp[startIndex][computedSum] = add + subtract;\n return dp[startIndex][computedSum];\n }\n\n }",
"static int getMaxCoinValGeeks(int arr[], int n)\n {\n // Create a table to store solutions of subproblems\n int table[][] = new int[n][n];\n int gap, gapStartIndx, gapEndIndx, x, y, z;\n\n // Fill table using above recursive formula.\n // Note that the tableis filled in diagonal\n // fashion (similar to http://goo.gl/PQqoS),\n // from diagonal elements to table[0][n-1]\n // which is the result.\n for (gap = 0; gap < n; ++gap)\n {\n // both gapStartIndx and gapEndIndx are incremented in each loop iteration\n // for each gap, gapStartIndx keeps moving\n // gapEndIndx is always gap more than the gapStartIndx\n // when gap == 0, gapStartIndx = gapEndIndx\n // table[i,j] identifies the max value obtained by the player who picks first\n // first player = i to get val[i] , range of coins left = i+1, j\n // second player max value = table[i+1,j], range of coins left = i+2, j\n // first player max value = table[i+2,j]. So total value for player 1 is\n // val[i] + table[i+2, j]\n // first player picks j to get val[j], range of coins left i, j-1.\n // second player max = table[i, j-1] range of coins left i, j-2\n // first player max = table[i,j-2]\n // so for finding max value for a p\n for (gapStartIndx = 0, gapEndIndx = gap; gapEndIndx < n; ++gapStartIndx, ++gapEndIndx)\n {\n // Here x is value of F(i+2, j),\n // y is F(i+1, j-1) and z is\n // F(i, j-2) in above recursive formula\n // if gapStartIndx and gapEndIndx are two or more apart\n x = ((gapStartIndx + 2) <= gapEndIndx) ? table[gapStartIndx + 2][gapEndIndx] : 0;\n y = ((gapStartIndx + 1) <= (gapEndIndx - 1)) ? table[gapStartIndx +1 ][gapEndIndx - 1] : 0;\n z = (gapStartIndx <= (gapEndIndx - 2)) ? table[gapStartIndx][gapEndIndx - 2]: 0;\n\n table[gapStartIndx][gapEndIndx] = Math.max(arr[gapStartIndx] +\n Math.min(x, y), arr[gapEndIndx] +\n Math.min(y, z));\n }\n }\n\n return table[0][n - 1];\n }",
"public int numSolutions(int N, int M) {\n HashMap<Integer, Integer> dp = new HashMap<Integer, Integer>();\n dp.put(0, 1);\n for (int i = 0; i < N; ++i) {\n for (int j = 0; j < M; ++j) {\n HashMap<Integer, Integer> nDp = new HashMap<Integer, Integer>();\n for (Integer key : dp.keySet()) {\n int leftCell = getCell(key, j - 1);\n int upCell = getCell(key, j);\n int count = dp.get(key);\n if (upCell != 0) {\n // This is the last chance to fulfill upCell.\n if (upCell == 1 || upCell == 3) {\n // Don't paint this cell.\n int newKey = setCell(key, j, 0);\n addValue(nDp, newKey, count);\n } else {\n // Paint this cell.\n int current = 2 + (leftCell == 0 ? 0 : 1);\n int newKey = setCell(key, j, current);\n if (leftCell != 0) {\n newKey = setCell(newKey, j - 1, leftCell + 1);\n }\n addValue(nDp, newKey, count);\n }\n } else {\n // Don't paint this cell.\n int newKey = setCell(key, j, 0);\n addValue(nDp, newKey, count);\n // Paint this cell.\n if (leftCell == 0) {\n newKey = setCell(key, j, 1);\n } else {\n newKey = setCell(key, j - 1, leftCell + 1);\n newKey = setCell(newKey, j, 2);\n }\n addValue(nDp, newKey, count);\n }\n }\n dp = nDp;\n }\n }\n int result = 0;\n for (Integer key : dp.keySet()) {\n boolean valid = true;\n for (int i = 0; i < M; ++i) {\n int current = getCell(key, i);\n if (current == 2 || current == 4) {\n valid = false;\n break;\n }\n }\n if (valid) {\n result = (result + dp.get(key)) % MOD;\n }\n }\n return result;\n }",
"public int calculateMinimumHP(ArrayList<ArrayList<Integer>> grid) {\n\t\t\t\t int m =grid.size(), n = grid.get(0).size();\n\t\t\t\t int[][][] dp = new int[m+1][n+1][2];\n\t\t\t\t \n\t\t\t\t dp[0][0][0] = 0;\n\t\t\t\t dp[0][0][1] = 0;\n\t\t\t\t dp[0][1][0] = 1; // start with life\n\t\t\t\t dp[0][1][1] = 0; // balance life\n\t\t\t\t dp[1][0][0] = 1;\n\t\t\t\t dp[1][0][1] = 0;\n\t\t\t\t for(int i=2;i<dp[0].length;i++){\n\t\t\t\t\t dp[0][i][0] = Integer.MAX_VALUE;\n\t\t\t\t\t dp[0][i][1] = 0;\n\t\t\t\t }\n\t\t\t\t for(int i=2;i<dp.length;i++){\n\t\t\t\t\t dp[i][0][0] = Integer.MAX_VALUE;\n\t\t\t\t\t dp[i][0][1] = 0;\n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t for(int i=1;i<dp.length;i++){\n\t\t\t\t\t for(int j=1;j<dp[0].length;j++){\n\t\t\t\t\t\t \n\t\t\t\t\t\t if(grid.get(i-1).get(j-1) < 0){\n\t\t\t\t\t\t\t int[] fromCell = dp[i-1][j][0]< dp[i][j-1][0]?dp[i-1][j]:dp[i][j-1];\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t dp[i][j][0] = fromCell[0] - grid.get(i-1).get(j-1) - fromCell[1];\n\t\t\t\t\t\t\t dp[i][j][1] = fromCell[1]+ grid.get(i-1).get(j-1)>0?fromCell[1]+ grid.get(i-1).get(j-1):0;\n\t\t\t\t\t\t }else{\n\t\t\t\t\t\t\t int[] fromCell = dp[i-1][j][0]< dp[i][j-1][0]?dp[i-1][j]:dp[i][j-1];\n\t\t\t\t\t\t\t dp[i][j][0] = fromCell[0];\n\t\t\t\t\t\t\t dp[i][j][1] = fromCell[1]+grid.get(i-1).get(j-1);\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t }\n\t\t\t\t\t }\n\t\t\t\t }\n\t\t\t\t return dp[m][n][0];\n\t\t\t\t \n\t\t\t }",
"private void PuzzleSolve(int k, ArrayList<Integer> S, ArrayList<Integer> U) {\n // for every integer value in the array passed in U we will add it to the empty array and remove it from the\n // new array made called list.\n for (Integer s : U) {\n ArrayList<Integer> list = new ArrayList<>(U);\n S.add(s);\n list.remove(s);\n // If we have removed all numbers in the list and S is now full, check the evaluation.\n if (k == 1) {\n Equals(S);\n }\n // else we keep calling this method until U is empty.\n else {\n PuzzleSolve(k - 1, S, list);\n }\n // remove the value from s and then add it back to the list to test a new variation at the end.\n S.remove(s);\n list.add(s);\n }\n }",
"int countSusbset(int n, int w){\n //i.e target sum achieved\n if(w == 0){\n return 1;\n }\n \n //if sum not achieved and no items left\n if(n == 0){\n return 0;\n }\n \n //if item is gretart than target weight, we have to exclude it\n if(arr[n-1] > w){\n return countSusbset(n-1, w)\n }else{ \n return countSusbset(n-1, w) + countSusbset(n-1, w - arr[n-1]);\n }\n}",
"public static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint t = scanner.nextInt();\n\t\tfor (int i = 0; i < t; i++) {\n\t\t\tint n = scanner.nextInt();\n\t\t\tdp = new int [n+1];\n\t\t\tArrays.fill(dp, -1);\n\t\t\tfor (int j = 1; j <= n; j++) {\n\t\t\t\tint v = scanner.nextInt();\n\t\t\t\tfind(1, j, v);\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"public static void main(String[] args) throws IOException {\n BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));\n String str = bf.readLine();\n int N = Integer.parseInt(str);\n String[] temp = bf.readLine().split(\" \");\n // 숫자들 저장하는 배열\n int[] dp = new int[N];\n int[] data = new int[N];\n\n // 숫자 변형해서 집어넣기\n for (int i = 0; i < N; i++) {\n data[i] = Integer.parseInt(temp[i]);\n }\n // 2중 포문을 이용한 해결방법(O(N^2))\n for (int i = 0; i < N; i++) {\n dp[i] = 1;\n for (int j = 0; j < i; j++) {\n if (data[j] < data[i] && dp[i] < dp[j] + 1) {\n dp[i] = dp[j] + 1;\n // 증가하는 수열 길이를 증가시켜준다\n }\n }\n }\n Arrays.sort(dp);\n System.out.println(dp[N - 1]);\n }",
"public static void dynamicProgramming2(int[][] myArray){ \t\r\n\t\tint countNode = myArray.length;\r\n\t\tint rows = myArray[0].length;\r\n\t\tif(rows != countNode) {\r\n\t\t\tthrow new IllegalArgumentException();\r\n\t\t}\r\n\t\t\r\n \tint[] cost = new int[countNode];\r\n \tint[] prev = new int[countNode];\r\n \tboolean[] visited = new boolean[countNode];\r\n \t\r\n \tfor(int i = 0; i < countNode; i++) {\r\n \t\tcost[i] = myArray[0][i];\r\n \t\tprev[i] = 0;\r\n \t\tvisited[i] = false;\r\n \t}\r\n \t\r\n \tint cur = 0; \t\r\n \twhile(true)\r\n \t{\r\n \t\tfor(int i = cur; i < countNode; i++)\r\n \t\t{\r\n \t\t\tif(myArray[cur][i] + cost[cur] < cost[i])\r\n \t\t\t{\r\n \t\t\t\tcost[i] = myArray[cur][i] + cost[cur];\r\n \t\t\t\tprev[i] = cur;\r\n \t\t\t}\r\n \t\t}\r\n \t\t\r\n \t\tvisited[cur] = true;\r\n \t\tif(AllVisited(visited)) break;\r\n \t\t\r\n \t\t// Choose the node which is not visited yet\r\n \t\t// and has the minimum cost so far.\r\n \t\tint min = Integer.MAX_VALUE;\r\n \t\tfor(int i = 0; i < countNode; i++){\r\n \t\t\tif(!visited[i] && cost[i] < min) {\r\n \t\t\t\tcur = i;\r\n \t\t\t\tmin = cost[i];\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n \tSystem.out.println(\"Dynamic Programming2:\");\r\n \tSystem.out.println(\"Minimum Cost to go from 1 to \" + countNode + \" is \" + cost[countNode - 1]);\r\n \tStack<Integer> s = new Stack<Integer>();\r\n \tint traveller = countNode - 1;\r\n \ts.push(countNode);\r\n \twhile(traveller != 0)\r\n \t{\r\n \t\ts.push(prev[traveller] + 1);\r\n \t\ttraveller = prev[traveller];\r\n \t}\r\n \t\r\n \tStringBuilder sb = new StringBuilder();\r\n \twhile(!s.empty())\r\n \t{\r\n \t\tsb.append(s.pop());\r\n \t\tif (!s.empty()) {\r\n \t\tsb.append(\" -> \");\r\n \t\t}\r\n \t}\r\n \t\r\n \tSystem.out.println(\"Path from 1 to end is \" + sb.toString()); \r\n \tSystem.out.println();\r\n }",
"private int uniquePaths(int x, int y, int[][] dp) {\n \t\tif (x == 0 || y == 0) return 1;\n \t\tif (dp[x][y] == 0)\n \t\t\tdp[x][y] = uniquePaths(x - 1, y, dp) + uniquePaths(x, y - 1, dp);\n \t\treturn dp[x][y];\n \t}",
"public int findPairs(int[] nums, int k) {\n if (k < 0) {\n return 0;\n }\n Set<Integer> unique = new HashSet<>();\n Set<Integer> duplicate = new HashSet<>();\n for (int n : nums) {\n if (!unique.add(n)) {\n duplicate.add(n);\n }\n }\n if (k == 0) {\n return duplicate.size();\n }\n int count = 0;\n for (int v : unique) {\n if (unique.contains(v + k)) {\n count += 1;\n }\n }\n return count;\n }",
"static int minJumps(int[] arr){\n int n = arr.length;\n int[] dp = new int[n];\n for(int i = 0; i < n; i++) dp[i] = Integer.MAX_VALUE;\n dp[0] = 0;\n for(int i = 1; i < n; i++){\n //checking from 0 to index i that if there is a shorter path for \n //current position to reach from any of the previous indexes\n //also previous index should not be MAX_VALUE as this will show that\n //we were not able to reach this particular index\n for(int j = 0; j < i; j++){\n if(dp[j] != Integer.MAX_VALUE && arr[j] + j >= i){\n if(dp[j] + 1 < dp[i]){\n dp[i] = dp[j] + 1;\n }\n }\n }\n }\n \n if(dp[n - 1] != Integer.MAX_VALUE){\n return dp[n - 1];\n }\n \n return -1;\n }",
"public static int findPairs(int[] nums, int k) {\n \tif(k<0){\n \t\treturn 0;\n \t}\n \t\n int re=0;\n Map<Integer, Integer> map=new HashMap<Integer, Integer>();\n for(int num: nums){\n \tif(map.containsKey(num)){\n \t\tif(k==0&&map.get(num)==1){\n \t\t\tre++;\n \t\t\tmap.put(num, 0);\n \t\t}\n \t\tcontinue;\n \t}\n \tif(map.containsKey(num+k)){\n \t\tre++;\n \t}\n \tif(map.containsKey(num-k)){\n \t\tre++;\n \t}\n \tmap.put(num, 1);\n }\n return re;\n }",
"public int solution(int N) {\n\n int l = 0; // 2*l - r\n int r = 1; // 2*r - l\n\n return search(l, r, N);\n }",
"private static int longestBalanced(char[] chars, int start, int delta, int[][] memo) {\n// System.out.println(\"first = \" + first + \"\\tdelta = \" + delta + \" last \" + (first + delta));\n if (memo[start][delta] >= 0) { // subproblem already seen & solved\n return memo[start][delta];\n } else {\n int result;\n if (delta == 1) { // two chars\n result = isBalancing(chars[start], chars[start + 1]) ? 2 : 0;\n } else {\n\n if (isBalancing(chars[start], chars[start + delta])) { // contribution\n final int sub = longestBalanced(chars, start + 1, delta - 2, memo);\n result = sub != 0 ? sub + 2 : 0;\n } else { // not balanced ends\n int smaller = longestBalanced(chars, start + 1, delta - 2, memo);\n if (smaller > 0) {\n result = smaller;\n } else {\n result = 0;\n for (int k = 1; k < delta; k += 2) {\n// System.out.println(\"dividing k = \" + k);\n if (longestBalanced(chars, start, k, memo) > 0 && longestBalanced(chars, start + k + 1, delta - k - 1, memo) > 0) {\n result = delta + 1; // i.e. length\n }\n }\n }\n }\n }\n// System.out.println(\"result = \" + result);\n return memo[start][delta] = result; // store and return\n }\n }",
"public static int example3(int[] arr) { // O(n)\r\n\t\tint n = arr.length, total = 0; // O(1)\r\n\t\tfor (int j = 0; j < n; j++) // loop from 0 to n-1 // O(n^2)\r\n\t\t\tfor (int k = 0; k <= j; k++) // loop from 0 to j\r\n\t\t\t\ttotal += arr[j];\r\n\t\treturn total;\r\n\r\n\t\t/*\r\n\t\t * Explanation: Since we have nested for loop which dominates here and it is\r\n\t\t * O(n^2) and we always take the maximum. so the answer is quadratic time O(n^2)\r\n\t\t * \r\n\t\t */\r\n\t}",
"private static long calculateBestPickWithoutRepetition(int weight, Item[] items, long[][] DP) {\n\n for(int w = 1; w <= weight; w++) {\n for(int i = 1; i <= items.length; i++) {\n DP[w][i] = DP[w][i-1];\n Item item = items[i-1];\n\n if (item.getWeight() <= w) {\n DP[w][i] = Math.max(DP[w][i], DP[w - item.getWeight() ][i-1] + item.getValue());\n }\n }\n }\n\n return DP[DP.length -1][DP[0].length - 1];\n }",
"public long fibonacci_with_dp(int n){\n global_dp_count++;\n if(lookup[n] ==0) {\n if (n <= 1) {\n lookup[n] = n;\n } else {\n lookup[n] = fibonacci_with_dp(n - 1) + fibonacci_with_dp(n - 2);\n }\n }\n return lookup[n];\n }",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tint N = sc.nextInt();\r\n\t\tint[] arr = new int[N+1];\r\n\t\tfor (int i = 1; i < arr.length; i++) {\r\n\t\t\tarr[i] = sc.nextInt();\r\n\t\t}\r\n\r\n\t\tint num = sc.nextInt();\r\n\r\n\t\tfor (int i = 0; i < num; i++) {\r\n\t\t\tint s = sc.nextInt(); // 성별\r\n\t\t\tint n = sc.nextInt(); // 받은 수\r\n\r\n\t\t\tif (s == 1) { // 남자\r\n\t\t\t\tfor (int j = 1; j < arr.length; j++) {\r\n\t\t\t\t\tif (j % n == 0) { // 자기가 받은 수의 배수이면\r\n\t\t\t\t\t\tarr[j] = Math.abs(arr[j] - 1); // 스위치 상태 변경\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else { // 여자\r\n\t\t\t\tarr[n] = Math.abs(arr[n] - 1); // 스위치 상태 변경\r\n\t\t\t\tint left = n - 1;\r\n\t\t\t\tint right = n + 1;\r\n\t\t\t\twhile (true) {\r\n\t\t\t\t\tif (left <= 0 || right >= arr.length || arr[left] != arr[right])\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tarr[left] = Math.abs(arr[left] - 1); // 스위치 상태 변경\r\n\t\t\t\t\tarr[right] = Math.abs(arr[right] - 1); // 스위치 상태 변경\r\n\t\t\t\t\tleft -= 1;\r\n\t\t\t\t\tright += 1;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tfor (int i = 1; i < arr.length; i++) {\r\n\t\t\tSystem.out.print(arr[i] + \" \");\r\n\t\t\tif(i % 20 == 0) {\r\n\t\t\t\tSystem.out.println();\r\n\t\t\t}\r\n\t\t}\r\n\t}"
] | [
"0.70231503",
"0.69944435",
"0.6797297",
"0.6794424",
"0.67116946",
"0.6672354",
"0.6531086",
"0.64935577",
"0.6458117",
"0.64190507",
"0.6290209",
"0.62869793",
"0.6273403",
"0.6271602",
"0.626217",
"0.6240332",
"0.6230144",
"0.62297183",
"0.61937976",
"0.6175117",
"0.6166827",
"0.61530447",
"0.6150609",
"0.6148254",
"0.6139601",
"0.61363816",
"0.61313266",
"0.6117339",
"0.61133343",
"0.6106894",
"0.6083336",
"0.6079722",
"0.6079437",
"0.6072698",
"0.60485953",
"0.6030335",
"0.6025633",
"0.60234547",
"0.6008806",
"0.5991745",
"0.59657776",
"0.5963801",
"0.5962083",
"0.5959822",
"0.595554",
"0.5937392",
"0.59272283",
"0.5916805",
"0.5903943",
"0.5885944",
"0.58807427",
"0.58655936",
"0.5859268",
"0.5858696",
"0.58564055",
"0.5851198",
"0.58438814",
"0.5843166",
"0.58342266",
"0.58175236",
"0.5815383",
"0.580532",
"0.5801656",
"0.57962525",
"0.5795599",
"0.57932675",
"0.57913804",
"0.5774375",
"0.5770937",
"0.5770001",
"0.5763678",
"0.5762509",
"0.5761331",
"0.57568234",
"0.5753501",
"0.57512844",
"0.5742191",
"0.5739665",
"0.57390094",
"0.5737415",
"0.573011",
"0.5727815",
"0.5727725",
"0.5727138",
"0.5726914",
"0.5721801",
"0.57196385",
"0.5710487",
"0.57051575",
"0.56978977",
"0.5692291",
"0.5692148",
"0.5691334",
"0.5686503",
"0.5684774",
"0.56746197",
"0.56732535",
"0.56686115",
"0.5666509",
"0.5666391",
"0.56597483"
] | 0.0 | -1 |
Converts a JSONObject to an XML string. The existing org.json.XML.toString() function does nothing to handle keys which, while valid in JSON, are not valid as XML elements; it just naively jams the key between triangle braces. Leeeeeet's fix it up. | public static String toString(final Object object, final String tagName) throws JSONException {
StringBuilder sb = new StringBuilder();
JSONArray ja;
JSONObject jo;
String string;
if (object instanceof JSONObject) {
// Prepend with tagName.
if (tagName != null) {
sb.append('<');
sb.append(tagName);
sb.append('>');
}
// Loop through the keys.
jo = (JSONObject) object;
for (final String key : jo.keySet()) {
// Sanitize the key using restricted version of the XML spec.
final String sanitizedKey = key.replaceFirst(invalidFirstCharacterRegex, "").replaceAll(invalidCharacterRegex, "");
// Get the value; convert if not JSONObject.
Object value = jo.get(key);
if (value == null) {
value = "";
} else if (value.getClass().isArray()) {
value = new JSONArray(value);
}
// Emit content in body.
if ("content".equals(key)) {
if (value instanceof JSONArray) {
ja = (JSONArray) value;
int i = 0;
for (Object val : ja) {
if (i > 0) {
sb.append('\n');
}
sb.append(escape(val.toString()));
i++;
}
} else {
sb.append(escape(value.toString()));
}
// Emit an array of similar keys.
} else if (value instanceof JSONArray) {
ja = (JSONArray) value;
for (Object val : ja) {
if (val instanceof JSONArray) {
sb.append('<');
sb.append(sanitizedKey);
sb.append('>');
sb.append(toString(val));
sb.append("</");
sb.append(sanitizedKey);
sb.append('>');
} else {
sb.append(toString(val, sanitizedKey));
}
}
// Give us a />'d version of the tag if the value is empty.
} else if ("".equals(value)) {
sb.append('<');
sb.append(sanitizedKey);
sb.append("/>");
// Emit a new tag using the sanitized key.
} else {
sb.append(toString(value, sanitizedKey));
}
}
// Close the tag if we must.
if (tagName != null) {
sb.append("</");
sb.append(tagName);
sb.append('>');
}
// Return the XML string we've built.
return sb.toString();
}
// If this is a JSONArray, create an array of elements.
if (object != null && (object instanceof JSONArray || object.getClass().isArray())) {
if (object.getClass().isArray()) {
ja = new JSONArray(object);
} else {
ja = (JSONArray) object;
}
for (Object val : ja) {
// XML does not have good support for arrays. If an array
// appears in a place where XML is lacking, synthesize an
// <array> element.
sb.append(toString(val, tagName == null ? "array" : tagName));
}
// Return the XML string we've built.
return sb.toString();
}
// If this is just a string, we've hit the bottom of the iterator and can
// just write an element.
string = (object == null) ? "null" : escape(object.toString());
return (tagName == null) ? "\"" + string + "\""
: (string.length() == 0) ? "<" + tagName + "/>" : "<" + tagName
+ ">" + string + "</" + tagName + ">";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String convertToString() {\n return mJSONObject.toString();\n }",
"public static native String serializeToString(JavaScriptObject node) /*-{\n\t\treturn Titanium.XML.serializeToString(node);\n\t}-*/;",
"public static String toXMLString(Object obj) {\r\n if (obj == null) {\r\n return null;\r\n }\r\n\r\n String pkgName = obj.getClass().getPackage().getName();\r\n try {\r\n if (!entityMarshallers.containsKey(pkgName)) {\r\n JAXBContext jc = JAXBContext.newInstance(pkgName);\r\n entityMarshallers.put(pkgName, jc.createMarshaller());\r\n entityMarshallerLock.put(pkgName, new Object());\r\n }\r\n\r\n StringWriter sw = new StringWriter();\r\n Marshaller marshaller = entityMarshallers.get(pkgName);\r\n Object locker = entityMarshallerLock.get(pkgName);\r\n\r\n synchronized (locker) {\r\n marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Configuration.getBoolean(Constant.CONFIG_KEY.PCM_XML_PRETTY_PRINT));\r\n marshaller.marshal(obj, sw);\r\n }\r\n\r\n return sw.toString();\r\n\r\n } catch (Exception e) {\r\n Logger.defaultLogger.error(e.getMessage(), e);\r\n }\r\n return \"\";\r\n }",
"public static String map2XmlStr(Map<String, String> map) {\r\n Document document = DocumentHelper.createDocument();\r\n Element nodeElement = document.addElement(\"xml\");\r\n for (String obj : map.keySet()) {\r\n Element keyElement = nodeElement.addElement(obj);\r\n keyElement.setText(map.get(obj));\r\n }\r\n return document.getRootElement().asXML();\r\n// return doc2String(document);\r\n }",
"public static String writePretty(JsonObject jsonObject) {\n\t\tJsonWriterFactory factory = createPrettyWriterFactory();\n\t\tStringWriter sw = new StringWriter();\n\t\tJsonWriter writer = factory.createWriter(sw);\n\t\twriter.writeObject(jsonObject);\n\t\tString ret = sw.toString();\n\t\twriter.close();\n\t\treturn ret;\n\t}",
"@NonNull\n public static String indent(@Nullable JSONObject jsonObject) {\n if (jsonObject != null) {\n try {\n return jsonObject.toString(INDENTATION_SPACES);\n } catch (JSONException e) {\n return PARSING_ERROR;\n }\n } else {\n return NULL_OBJECT;\n }\n }",
"String toXmlString() throws IOException;",
"@Test\n public final void testJsonStringToCompactedXml() {\n \tString resultat = jtxc.convertJsonStringToCompactedXmlString(text);\n \tassertNotEquals(resultat, \"error\");\n \tassertNotNull(resultat);\n }",
"public String toXML() {\n StringWriter stringWriter = new StringWriter();\n PrintWriter printWriter = new PrintWriter(stringWriter, true);\n toXML(printWriter);\n return stringWriter.toString();\n }",
"String getStringFromDictionary(JSONObject json, String str);",
"public static String toXml(Object root) {\n Class clazz = Reflections.getUserClass(root);\n return toXml(root, clazz, null, true);\n }",
"public static String map2XML(Map src) {\r\n if (src.isEmpty()) {\r\n return \"<Items/>\";\r\n }\r\n Object key;\r\n StringBuffer xml = new StringBuffer();\r\n xml.append(\"<Items>\");\r\n\r\n for (int i = 0; i < src.size(); i++) {\r\n Map item = (Map) src.get(\"ROW\" + i);\r\n Iterator keys = item.keySet().iterator();\r\n xml.append(\"<Item><row>\");\r\n xml.append(i);\r\n xml.append(\"</row>\");\r\n for (; keys.hasNext();) {\r\n key = keys.next();\r\n xml.append(\"<\");\r\n xml.append(key);\r\n xml.append(\">\");\r\n xml.append(escapeXMLTag(item.get(key) + \"\"));\r\n xml.append(\"</\");\r\n xml.append(key);\r\n xml.append(\">\");\r\n }\r\n xml.append(\"</Item>\");\r\n }\r\n xml.append(\"</Items>\");\r\n return xml.toString();\r\n }",
"public String toXML() {\n\t\tString promptNotesXML = \"\";\n\t\tString nonPromptNotesXML = \"\";\n\t\t \n\t\tfor(Note n: notes.keySet()) {\n\t\t\tif(n!=null && notes.get(n).intValue()==Idea.PROMPT_NOTE)\n\t\t\t\tpromptNotesXML += n.toXML() + System.lineSeparator();\n\t\t\telse if(n!=null)\n\t\t\t\tnonPromptNotesXML += n.toXML() + System.lineSeparator();\n\t\t}\n\t\t\t\n\t\t\t\n\t\tString keyWordsXML = \"\";\n\t\tfor(String k: keyWords) {\n\t\t\tif(!k.equals(\"null\"))\n\t\t\t\tkeyWordsXML += k + \",\";\n\t\t}\n\t\tif(keyWords.size()>0)\n\t\t\tkeyWordsXML = keyWordsXML.substring(0,keyWordsXML.length()-1);\n\t\t\n\t\tString finalNoteXML = \"\" ;\n\t\t\n\t\tif(this.finalNote!=null)\n\t\t\tfinalNoteXML = finalNote.toXML();\n\t\t\n\t\t\n\t\tString xml = \"<Idea>\" + System.lineSeparator()\n\t\t\t\t\t\t+ \"<Prompt>\" + this.prompt + \"</Prompt>\" + System.lineSeparator()\n\t\t\t\t\t\t+ \"<ID>\"+this.uniqueID+\"</ID>\"+ System.lineSeparator()\n\t\t\t\t\t\t+ \"<IsPromptKeyWord>\" + this.isPromptKeyWord + \"</IsPromptKeyWord>\" + System.lineSeparator()\n\t\t\t\t\t\t+ \"<KeyWords>\" + keyWordsXML + \"</KeyWords>\" + System.lineSeparator()\n\t\t\t\t\t\t+ \"<PromptNotes>\" + promptNotesXML + \"</PromptNotes>\"\n\t\t\t\t\t\t+ \"<NonPromptNotes>\" + nonPromptNotesXML + \"</NonPromptNotes>\"\n\t\t\t\t\t\t+ \"<FinalNote>\"\n\t\t\t\t\t\t+ finalNoteXML\n\t\t\t\t\t\t+ \"</FinalNote>\" + System.lineSeparator() +\n\t\t\t\t\t\"</Idea>\";\n\t\treturn xml;\n\t\t \n\t}",
"protected String serialize(Map<String, String> map)\n {\n StringBuffer output = new StringBuffer(\"{\");\n String separator = \"\";\n for (Map.Entry<String, String> entry : map.entrySet()) {\n output.append(separator);\n output.append(new JSONString(entry.getKey()));\n output.append(':');\n output.append(new JSONString(entry.getValue()));\n separator = \",\";\n }\n output.append(\"}\");\n return output.toString();\n }",
"public static void main(String[] args) throws JAXBException {\n\r\n\t\t\r\n\t Customer customer = new Customer(2,\"gtw\",22); \r\n\t\r\n\t \r\n\t JAXBContext ctx = JAXBContext.newInstance(Customer.class); \r\n\t StringWriter writer = new StringWriter(); \r\n\t \r\n\t ctx.createMarshaller().marshal(customer, writer); \r\n\t System.out.println(writer.toString());\r\n\t String custString = writer.toString(); \r\n\t customer = (Customer) ctx.createUnmarshaller().unmarshal(new StringReader(custString)); \r\n\t JSONObject jo = JSONObject.fromObject(customer);\r\n\t System.out.println(jo.toString());\r\n\t}",
"public String serialize(TreeNode root) {\n if (root == null) {\n return \"X\";\n }\n return \"(\" + serialize(root.left) + \")\" + root.val + \"(\" + serialize(root.right) + \")\";\n }",
"@SuppressWarnings(\"unchecked\")\n public String convertToMetadataString() {\n JSONObject meta = new JSONObject();\n // TODO: check if this still works under json.simple\n meta.put(\"meta\", mJSONObject);\n\n return meta.toString();\n }",
"public static String getAsPrettyXml(Document document) {\n OutputFormat format = new OutputFormat(\" \", true);\n format.setSuppressDeclaration(true);\n StringWriter out = new StringWriter();\n XMLWriter writer = new XMLWriter(out, format);\n try {\n try {\n writer.write(document);\n } finally {\n writer.close();\n }\n } catch (IOException ioe) {\n throw new RuntimeException(ioe);\n }\n return out.toString().trim();\n }",
"@Override\n\tpublic String toXMLString(Object arg0) {\n\t\treturn null;\n\t}",
"public static String serializeMapToString(Map<String, String> map) {\n if(map == null) return \"\\\\0\";\n Map<String, String> attrNew = new HashMap<String, String>(map);\n Set<String> keys = new HashSet<String>(attrNew.keySet());\n for(String s: keys) {\n attrNew.put(\"<\" + BeansUtils.createEscaping(s) + \">\", \"<\" + BeansUtils.createEscaping(attrNew.get(s)) + \">\");\n attrNew.remove(s);\n }\n return attrNew.toString();\n }",
"public String toXML(final XStream xstream, final Object obj) throws ObjectStreamException {\n final Writer writer = new StringWriter();\n try {\n toXML(xstream, obj, writer);\n } catch (final ObjectStreamException e) {\n throw e;\n } catch (final IOException e) {\n throw new StreamException(\"Unexpected IO error from a StringWriter\", e);\n }\n return writer.toString();\n }",
"private String toXML(){\n\tString buffer = \"<xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\">\\n\";\n\tfor(Room[] r : rooms)\n\t for(Room s : r)\n\t\tif(s != null)\n\t\t buffer += s.toXML();\n\tbuffer += \"</xml>\";\n\treturn buffer;\n }",
"public String convertMapToString(HashMap<String, String> map) {\r\n\t\tString string = \"\";\r\n\t\tfor(String key : map.keySet()) {\r\n\t\t\tstring += \"<\" + key + \">\" + map.get(key) + \"</\" + key + \">\";\r\n\t\t}\r\n\t\treturn string;\r\n\t}",
"public String serialize(TreeNode root) {\n StringBuilder sb = new StringBuilder();\n TreeNode x = root;\n Deque<TreeNode> stack = new LinkedList<>();\n while (x != null || !stack.isEmpty()) {\n if (x != null) {\n sb.append(x.val);\n sb.append(' ');\n stack.push(x);\n x = x.left;\n } else {\n sb.append(\"null \");\n x = stack.pop();\n x = x.right;\n }\n }\n return sb.toString();\n }",
"@Override\n\tpublic String toJSONString(int indentFactor) throws JSONException {\n\t\tStringWriter sw = new StringWriter();\n\t\tsynchronized (sw.getBuffer()) {\n\t\t\treturn this.write(sw, indentFactor, 0).toString();\n\t\t}\n\t}",
"public String serialize(Node15 root) {\n\t if(root == null) return \"\";\n\t serializeT(root);\n\t return sb.toString();\n\t }",
"public String serialize(TreeNode root) {\n \n \tif(root == null) {\n \t\treturn \"\";\n \t}\n \tif(root.left == null && root.right == null) {\n \t\treturn \"\" + root.val;\n \t}\n \tString s = serialize(root.left);\n \ts = \"(\" + s + \")\" + \"(\" + root.val + \")\";\n \ts += \"(\" + serialize(root.right) + \")\";\n \treturn s;\n \t\n }",
"public String toXMLTag() {\n\t\tfinal StringBuffer buffer = new StringBuffer();\n\t\ttoXMLTag(buffer,0);\n\t\treturn buffer.toString();\n\t}",
"public static String prettyXML(String xml) {\n try {\n Source xmlInput = new StreamSource(new StringReader(xml));\n StringWriter stringWriter = new StringWriter();\n StreamResult xmlOutput = new StreamResult(stringWriter);\n TransformerFactory transformerFactory = TransformerFactory.newInstance();\n transformerFactory.setAttribute(\"indent-number\", 2);\n Transformer transformer = transformerFactory.newTransformer();\n transformer.setOutputProperty(OutputKeys.INDENT, \"yes\");\n transformer.transform(xmlInput, xmlOutput);\n return xmlOutput.getWriter().toString();\n } catch (Exception e) {\n Log.error(\"Error generating prettyXML:\");\n e.printStackTrace();\n }\n return \"\";\n }",
"public String serialize(Node root) {\n StringBuilder sb = new StringBuilder();\n serialize_helper(root, sb);\n return sb.toString();\n }",
"public String serialize(TreeNode root) {\n if (root==null){\n return \"\";\n }\n StringBuilder str = new StringBuilder();\n serializeRec(str,root);\n str.deleteCharAt(str.length()-1);\n return str.toString();\n }",
"public String\ttoXML()\t{\n\t\treturn toXML(0);\n\t}",
"public abstract String toXML();",
"public abstract String toXML();",
"public abstract String toXML();",
"public static String toXml(Object root, String encoding) {\n Class clazz = Reflections.getUserClass(root);\n return toXml(root, clazz, encoding, true);\n }",
"public String toXML(Object beanObject) throws XMLUtilityException {\r\n\t\tStringWriter strWriter = new StringWriter();\r\n\t\ttoXML(beanObject, strWriter);\r\n\t\treturn strWriter.toString();\r\n\t}",
"public String serialize(TreeNode root) {\r\n StringBuilder sb = new StringBuilder();\r\n buildString(root, sb);\r\n return sb.toString();\r\n }",
"public String serialize(TreeNode root) {\n StringBuilder sb = new StringBuilder();\n buildString(root, sb);\n return sb.toString();\n }",
"public static String getJsonString(Object obj) {\n\t\tString res = \"{}\";\n\t\tStringWriter out = new StringWriter();\n\t\ttry {\n\t\t\tJSONValue.writeJSONString(obj, out);\n\t\t\tres = out.toString();\n\t\t} catch (IOException e) {\n\t\t\tLOGGER.error(\"Error converting obj to string\", e);\n\t\t}\n\t\treturn res;\n\t}",
"public String serialize(TreeNode root) {\n StringBuilder sb = new StringBuilder();\n build_string(root, sb);\n return String.format(\"[%s]\", sb.substring(0, sb.length() - 1).toString());\n }",
"public static String buildSessionXML() throws JsonProcessingException {\n\t\tSessionBean sBean = new SessionBean();\n\t\tsBean.setClientType(\"REST Client\");\n\t\tXmlMapper mapper = new XmlMapper();\n\t\treturn mapper.writeValueAsString(sBean);\n\t}",
"@Override\n public String toXML() {\n if (_xml == null)\n _xml = String.format(XML, getStanzaId(), to);\n return _xml;\n }",
"public void toXML(XMLWriter xmlWriter, int indent, boolean relative)\n throws IOException {\n xmlWriter.printXMLStartTag(objectXMLTag, indent, relative, true);\n xmlWriter.print(stringApiValue());\n xmlWriter.printXMLEndTag(objectXMLTag, -indent, true);\n }",
"public String toXML()\n {\n /* this is the kind of string that we will be generating here:\n *\n * <presence from='[email protected]/globe'>\n * <c xmlns='http://jabber.org/protocol/caps'\n * hash='sha-1'\n * node='http://jitsi.org'\n * ver='zHyEOgxTrkpSdGcQKH8EFPLsriY='/>\n * </presence>\n */\n\n StringBuilder bldr\n = new StringBuilder(\"<c xmlns='\" + getNamespace() + \"' \");\n\n if(getExtensions() != null)\n bldr.append(\"ext='\" + getExtensions() + \"' \");\n\n bldr.append(\"hash='\" + getHash() + \"' \");\n bldr.append(\"node='\" + getNode() + \"' \");\n bldr.append(\"ver='\" + getVersion() + \"'/>\");\n\n return bldr.toString();\n }",
"public String getHeaderAsXML() {\n\n final String sep = System.getProperty(\"line.separator\");\n StringBuilder builder = new StringBuilder(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\" + sep + \"<meta>\" + sep + \"<fits>\" + sep);\n\n HeaderCard headerCard;\n for (Cursor iter = header.iterator(); iter.hasNext();) {\n headerCard = (HeaderCard) iter.next();\n if (headerCard.getValue() != null) {\n builder.append(\"<\" + headerCard.getKey() + \">\" + headerCard.getValue() + \"</\" + headerCard.getKey() + \">\" + sep);\n }\n }\n\n builder.append(\"</fits>\" + sep + \"</meta>\");\n\n return builder.toString();\n }",
"public String serialize(TreeNode root) {\n if (root == null) {\n return \"\";\n }\n StringBuilder sb = new StringBuilder();\n serialize(root, sb);\n return sb.toString();\n }",
"private String convertXmlToString(Document xmlDoc) {\r\n\r\n\t\tString xmlAsString = \"\";\r\n\t\ttry {\r\n\r\n\t\t\tTransformer transformer;\r\n\t\t\ttransformer = TransformerFactory.newInstance().newTransformer();\r\n\r\n\t\t\ttransformer.setOutputProperty(OutputKeys.STANDALONE, \"yes\");\r\n\t\t\ttransformer.setOutputProperty(OutputKeys.METHOD, \"xml\");\r\n\t\t\ttransformer.setOutputProperty(OutputKeys.INDENT, \"yes\");\r\n\t\t\ttransformer.setOutputProperty(\r\n\t\t\t\t\t\"{http://xml.apache.org/xslt}indent-amount\", \"5\");\r\n\r\n\t\t\tStreamResult result = new StreamResult(new StringWriter());\r\n\r\n\t\t\tDOMSource source = new DOMSource(xmlDoc);\r\n\r\n\t\t\ttransformer.transform(source, result);\r\n\r\n\t\t\txmlAsString = result.getWriter().toString();\r\n\r\n\t\t} catch (TransformerConfigurationException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (TransformerFactoryConfigurationError e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (TransformerException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\treturn xmlAsString;\r\n\r\n\t}",
"public String serialize(TreeNode root) {\n if (root == null) return \"\";\n Queue<TreeNode> qu = new LinkedList<>();\n StringBuilder sb = new StringBuilder();\n qu.offer(root);\n sb.append(root.val);\n sb.append(' ');\n while (!qu.isEmpty()) {\n TreeNode x = qu.poll();\n if (x.left == null) sb.append(\"null \");\n else {\n qu.offer(x.left);\n sb.append(x.left.val);\n sb.append(' ');\n }\n if (x.right == null) sb.append(\"null \");\n else {\n qu.offer(x.right);\n sb.append(x.right.val);\n sb.append(' ');\n }\n }\n return sb.toString();\n }",
"String encodeNS(String doc) {\n\t\tJSONParser parser = new JSONParser();\n\t\tTransformer transformer = new Transformer();\n\t\ttry {\n\t\t\tparser.parse(doc, transformer);\n\t\t\tObject value = transformer.getResult();\n\t\t\treturn value.toString();\n\t\t} catch (ParseException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn \"\";\n\t\t}\n\t}",
"private String makeElementString (Object value, JField jf, MarshalContext context) throws Exception {\n\t\tString result;\n if (jf instanceof JCompositeField) {\n\t\t\tcontext.addDepth ();\n\t\t\tresult = marshal (value, context, jf.getJavaName(),\n\t\t\t\t\t\t\t jf.getObjectType ());\n\t\t\tcontext.removeDepth ();\n\t\t} else\n\t\t\tresult = context.getIndent () + \"\\t<\" + jf.getJavaName() + \">\" + objectOut (jf, value, context)\n\t\t\t\t+ \"</\" + jf.getJavaName() + \">\\n\";\n\t\treturn result;\n }",
"public String serialize(TreeNode root) {\n StringBuilder stringBuilder = new StringBuilder();\n buildString(root, stringBuilder);\n return stringBuilder.toString();\n }",
"@Override\n\t\tpublic String toString() {\n\t\t\treturn \"<\"+key.toString()+\",\"+value.toString()+\">\";\n\t\t}",
"public static String JsonToString(JsonObject jso, String param, String defaulx) {\n try {\n JsonElement res = securGetJSON(jso, param);\n if (res != null) {\n String result = res.getAsString();\n result = result.trim().replace(\"\\n\", \"\\\\n\").replace(\"\\t\", \"\\\\t\").replace(\"'\", \"''\");\n return result;\n } else {\n return defaulx;\n }\n } catch (Exception e) {\n// System.out.println(\"erro json a string\");\n return defaulx;\n }\n }",
"String toJSONString(Object data);",
"public String serialize(TreeNode root) {\n\t\tStringBuilder preorder = new StringBuilder(), inorder = new StringBuilder();\n\t\tinorder(root, inorder);\n\t\tpreorder(root, preorder);\n\t\tStringBuilder serialize = new StringBuilder();\n\t\tserialize.append(preorder);\n\t\tserialize.append(\":\");\n\t\tserialize.append(inorder);\n\t\treturn serialize.toString();\n\t}",
"public final native String toJson() /*-{\n // Safari 4.0.5 appears not to honor the replacer argument, so we can't do this:\n \n // var replacer = function(key, value) {\n // if (key == '__key') {\n // return;\n // }\n // return value;\n // }\n // return $wnd.JSON.stringify(this, replacer);\n \n var key = this.__key;\n delete this.__key;\n var rf = this.__rf;\n delete this.__rf;\n var gwt = this.__gwt_ObjectId;\n delete this.__gwt_ObjectId;\n // TODO verify that the stringify() from json2.js works on IE\n var rtn = $wnd.JSON.stringify(this);\n this.__key = key;\n this.__rf = rf;\n this.__gwt_ObjectId = gwt;\n return rtn;\n }-*/;",
"void generateJSON(JSONObject object, String name);",
"public static String xmlMarshall(Object obj) throws Exception {\n\t\tStringWriter writer = null;\n\t\ttry {\n\t\t\tJAXBContext jaxbContext = JAXBContext.newInstance(obj.getClass());\n\t\t\tMarshaller marshaller = jaxbContext.createMarshaller();\n\t\t\twriter = new StringWriter();\n\n\t\t\tmarshaller.setProperty(Marshaller.JAXB_FRAGMENT, true);\n\t\t\tmarshaller.setProperty(Marshaller.JAXB_ENCODING, \"UTF-8\");\n\t\t\tmarshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);\n\t\t\tmarshaller.marshal(obj, writer);\n\t\t\tString result = writer.toString();\n\t\t\treturn result;\t\t\n\t\t}finally {\n\t\t\tif (writer != null)\n\t\t\t\twriter.close();\n\t\t}\t\t\n\t}",
"public String toXML()\n\t{\n\t\treturn toXML(0);\n\t}",
"public String toXML()\n\t{\n\t\treturn toXML(0);\n\t}",
"public static String escapeXML(String val)\n {\n if (val == null) {\n return \"\";\n } else {\n StringBuffer sb = new StringBuffer();\n for (int i = 0; i < val.length(); i++) {\n char ch = val.charAt(i);\n switch (ch) {\n // -- TODO: must also handle unicode escaping\n case '\\\"':\n sb.append(\""\");\n break;\n case '\\'':\n sb.append(\"'\");\n break;\n case '<':\n sb.append(\"<\");\n break;\n case '>':\n sb.append(\">\");\n break;\n case '&':\n sb.append(\"&\");\n break;\n default:\n sb.append(ch);\n break;\n }\n }\n return sb.toString();\n }\n }",
"private String transformDomToXml(Document document) throws KeyChangeException {\n Transformer transformer;\n try {\n transformer = TransformerFactory.newInstance().newTransformer();\n transformer.setOutputProperty(OutputKeys.INDENT, KeyChangeConstants.YES);\n } catch (TransformerConfigurationException e) {\n throw new KeyChangeException(\"Configuration error occurred while creating new Transformer.\", e);\n }\n\n StringWriter stringWriter = null;\n try {\n stringWriter = new StringWriter();\n StreamResult result = new StreamResult(stringWriter);\n DOMSource source = new DOMSource(document);\n transformer.transform(source, result);\n return stringWriter.toString();\n } catch (TransformerException e) {\n throw new KeyChangeException(\"Error occurred while transforming Document element to XML.\", e);\n } finally {\n if (stringWriter != null) {\n try {\n stringWriter.close();\n } catch (IOException e) {\n throw new KeyChangeException(\"Error closing stream writer.\", e);\n }\n }\n }\n }",
"public XML2JSONObject(String name) {\r\n setName(name);\r\n setType(Type.String);\r\n }",
"String toXML() throws RemoteException;",
"public String serialize(Node root) {\n List<String> childString = new ArrayList<>();\n for (Node node : root.children) {\n childString.add(serialize(node));\n }\n return \"(\" + root.val + String.join(\"\", childString) + \")\";\n }",
"public String serialize(TreeNode root) {\n StringBuilder builder = new StringBuilder();\n serialize(root, builder);\n return builder.toString();\n }",
"public String serialize(TreeNode root) {\r\n\t\tif (root == null)\r\n\t\t\treturn \"null\";\r\n\r\n\t\tStringBuilder ret = new StringBuilder();\r\n\t\tQueue<TreeNodePP> q = new LinkedList<>();\r\n\t\tq.offer(new TreeNodePP(root));\r\n\t\tint qSize = 0;\r\n\r\n\t\twhile (!q.isEmpty()) {\r\n\t\t\tqSize = q.size();\r\n\t\t\tfor (int i = 0; i < qSize; i++) {\r\n\t\t\t\tTreeNodePP pp = q.poll();\r\n\t\t\t\tTreeNode n = pp.n;\r\n\t\t\t\tif (n != null) {\r\n\t\t\t\t\tq.offer(new TreeNodePP(n.left));\r\n\t\t\t\t\tq.offer(new TreeNodePP(n.right));\r\n\t\t\t\t\tret.append(n.val + \",\");\r\n\t\t\t\t} else {\r\n\t\t\t\t\tret.append(\"null,\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tString ans = ret.toString();\r\n\r\n\t\t// remove the last two nulls.\r\n\t\treturn ans.substring(0, ans.length() - 11);\r\n\t}",
"public String serialize(TreeNode root) {\n if (root == null) {\n return \"\";\n }\n Queue<TreeNode> queue = new LinkedList<>();\n StringBuilder builder = new StringBuilder();\n queue.offer(root);\n while (!queue.isEmpty()) {\n TreeNode node = queue.poll();\n if (node == null) {\n builder.append(\"X,\");\n } else {\n builder.append(node.val + \",\");\n queue.offer(node.left);\n queue.offer(node.right);\n }\n }\n return builder.toString();\n }",
"private static String covertDocumentToString(Document document) throws Exception {\n\t\tjava.io.StringWriter sw = new java.io.StringWriter();\n\t\ttry {\n\t\t\tDOMSource domSource = new DOMSource(document);\n\t\t\tTransformerFactory tf = TransformerFactory.newInstance();\n\t\t\tTransformer transformer = tf.newTransformer();\n\n\t\t\ttransformer.setOutputProperty(OutputKeys.METHOD, \"xml\");\n\t\t\t// transformer.setOutputProperty(OutputKeys.ENCODING,\"ISO-8859-1\");\n\t\t\t// transformer.setOutputProperty(\"{http://xml.apache.org/xslt}indent-amount\", \"4\");\n\t\t\t// transformer.setOutputProperty(OutputKeys.INDENT, \"yes\");\n\n\t\t\tStreamResult sr = new StreamResult(sw);\n\t\t\ttransformer.transform(domSource, sr);\n\t\t} catch (TransformerException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn sw.toString();\n\t}",
"public String toXMLString() {\n\t\treturn toXMLString(XML_TAB, XML_NEW_LINE);\n\t}",
"private String encode(APIKey apiKey) {\n if (!signer.sign(apiKey)) {\n return null;\n }\n\n String json = apiKey.toJson();\n String base64 = new String(Base64.getEncoder().encode(json.getBytes()));\n return String.format(\"%s.%s\", base64, apiKey.getApiKeySignature());\n }",
"public static String serialize(TreeNode root) {\n StringBuilder temp = new StringBuilder();\n serializeHelper(root, temp);\n return temp.toString().substring(0, temp.length() - 1);\n }",
"protected String toJSONFragment() {\n StringBuffer json = new StringBuffer();\n boolean first = true;\n if (isSetProductCategoryId()) {\n if (!first) json.append(\", \");\n json.append(quoteJSON(\"ProductCategoryId\"));\n json.append(\" : \");\n json.append(quoteJSON(getProductCategoryId()));\n first = false;\n }\n if (isSetProductCategoryName()) {\n if (!first) json.append(\", \");\n json.append(quoteJSON(\"ProductCategoryName\"));\n json.append(\" : \");\n json.append(quoteJSON(getProductCategoryName()));\n first = false;\n }\n if (isSetParent()) {\n if (!first) json.append(\", \");\n json.append(\"\\\"Parent\\\" : {\");\n Categories parent = getParent();\n\n\n json.append(parent.toJSONFragment());\n json.append(\"}\");\n first = false;\n }\n return json.toString();\n }",
"public String toXml(String tag) {\n\t\tif (tag == null) {\n\t\t\tthrow new NullPointerException(\"null XML tag\");\n\t\t}\n\t\t\n\t\treturn(\"<\" + tag + \">\" + toXml() + \"</\" + tag + \">\");\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn JSON.toJSONString(this,SerializerFeature.WriteMapNullValue,\n\t\t\t\tSerializerFeature.WriteNonStringKeyAsString,\n\t\t\t\tSerializerFeature.WriteNullListAsEmpty,\n\t\t\t\tSerializerFeature.WriteNullNumberAsZero,\n\t\t\t\tSerializerFeature.WriteNullStringAsEmpty);\n\t}",
"public String toXMLFragment() {\n StringBuffer xml = new StringBuffer();\n if (isSetProductCategoryId()) {\n xml.append(\"<ProductCategoryId>\");\n xml.append(escapeXML(getProductCategoryId()));\n xml.append(\"</ProductCategoryId>\");\n }\n if (isSetProductCategoryName()) {\n xml.append(\"<ProductCategoryName>\");\n xml.append(escapeXML(getProductCategoryName()));\n xml.append(\"</ProductCategoryName>\");\n }\n if (isSetParent()) {\n Categories parent = getParent();\n xml.append(\"<Parent>\");\n xml.append(parent.toXMLFragment());\n xml.append(\"</Parent>\");\n } \n return xml.toString();\n }",
"@Override\n\tpublic CharSequence toXML() {\n\t\treturn null;\n\t}",
"public String serialize(TreeNode root) {\n StringBuilder res = mySeri(root, new StringBuilder());\n return res.toString();\n }",
"public String serialize(TreeNode root) {\n StringBuilder sb = new StringBuilder();\n serHelper(root, sb);\n return sb.toString().trim(); \n }",
"public static String serializeToXML( Serializable toSerialize) throws IOException {\r\n\t\tByteArrayOutputStream baos = new ByteArrayOutputStream(1024);\r\n\t\tXMLEncoder oos = new XMLEncoder(baos);\r\n\t\toos.writeObject(toSerialize);\r\n\t\toos.close();\r\n\t\treturn baos.toString(\"UTF-8\");\r\n\t}",
"static String prettyXml(String xml) {\n\t\tDocument doc = null;\n\t\tOutputFormat format = new OutputFormat(\" \", true);\n\t\tformat.setTrimText(true);\n\t\tStringWriter sw = new StringWriter();\n\t\ttry {\n\t\t\txml = SchemEditUtils.expandAmpersands(xml);\n\t\t\tdoc = Dom4jUtils.getXmlDocument(xml);\n\t\t\tXMLWriter prettyWriter = new XMLWriter(sw, format);\n\t\t\tprettyWriter.write(doc);\n\t\t} catch (Throwable e) {\n\t\t\tprtln(\"prettyXml error: \" + e.getMessage());\n\t\t\treturn \"\";\n\t\t}\n\t\treturn sw.toString();\n\t}",
"public String toJSON(){\n Map<String, Object> foo = new HashMap<String, Object>();\n foo.put(\"message\", \"Audit message generated\");\n foo.put(\"eventIndex\", index);\n foo.put(\"eventTimestamp\", Instant.now().toEpochMilli());\n try {\n // Convert the Map to JSON and send the raw JSON as the message.\n // The Audit appender formatter picks that json up and pubishes just the JSON to the topic\n return new ObjectMapper().writeValueAsString(foo);\n } catch (JsonProcessingException e) {\n // should never happen in this example\n throw new RuntimeException(\"impossible error \", e);\n }\n\n }",
"public String serialize(TreeNode root) {\n if(root==null) return \"null\";\n Deque<TreeNode> deque = new LinkedList<>();\n StringBuilder sb = new StringBuilder();\n deque.push(root);\n sb.append(root.val);\n sb.append(',');\n while(!deque.isEmpty()){\n TreeNode current = deque.poll();\n if(current.left!=null){\n deque.addLast(current.left);\n sb.append(current.left.val);\n sb.append(',');\n }\n else sb.append(\"null,\");\n \n if(current.right!=null){\n deque.addLast(current.right);\n sb.append(current.right.val);\n sb.append(',');\n }\n else sb.append(\"null,\");\n }\n \n return sb.toString();\n }",
"public String toJSON() throws JSONException;",
"public String serialize(TreeNode root) {\n if(root == null)\n return \"N\";\n else\n return root.val + \" \"+ serialize(root.left) + \" \"+ serialize(root.right);\n \n }",
"private String escapeXML(String string) {\n if (string == null)\n return \"null\";\n StringBuffer sb = new StringBuffer();\n int length = string.length();\n for (int i = 0; i < length; ++i) {\n char c = string.charAt(i);\n switch (c) {\n case '&':\n sb.append(\"&\");\n break;\n case '<':\n sb.append(\"<\");\n break;\n case '>':\n sb.append(\">\");\n break;\n case '\\'':\n sb.append(\"'\");\n break;\n case '\"':\n sb.append(\""\");\n break;\n default:\n sb.append(c);\n }\n }\n return sb.toString();\n }",
"public String toXmlString() {\r\n String norma = name().toLowerCase();\r\n return norma.replace('_', '-');\r\n }",
"public String serialize(TreeNode root) {\n StringBuilder sb = new StringBuilder();\n serialize(root,sb);\n return sb.toString();\n }",
"public static <T> String toXML(T object, String alias) {\r\n\t\tif (object == null) {\r\n\t\t\tthrow new IllegalArgumentException(\"Object cannot be null\");\r\n\t\t}\r\n\t\tif (alias == null) {\r\n\t\t\tthrow new IllegalArgumentException(\"Alais cannot be null\");\r\n\t\t}\r\n\t\tXStream xStream = new XStream();\r\n\t\txStream.alias(alias, object.getClass());\r\n\t\tStringWriter writer = new StringWriter();\r\n\t\txStream.toXML(object, writer);\r\n\t\treturn writer.toString();\r\n\t}",
"String toJSON();",
"private static String node2Str(JsonNode node) {\n try {\n return jsonWriter.writeValueAsString(node);\n } catch (JsonProcessingException e) {\n throw new IllegalStateException(\"Error writing JsonNode as a String: \" + node.asText(), e);\n }\n }",
"public String serialize(TreeNode root) {\n StringBuilder sb = new StringBuilder();\n buildTree(sb, root);\n return sb.toString();\n }",
"public String serialize(TreeNode root) {\n return serialize(root, \"\");\n }",
"public static String GetJSONString(String resourceString) {\n String retVal = \"\";\n resourceString = resourceString.replaceAll(\"<API_.*?>\", \"\").replaceAll(\"</API_.*?>\", \"\");\n try {\n String json = XML.toJSONObject(resourceString).toString();\n json = \"{\" + json.substring(1, json.length() - 1).replaceAll(\"\\\\{\", \"\\\\[{\").replaceAll(\"\\\\}\", \"\\\\]}\") + \"}\";\n retVal = json;\n } catch (Exception ex) {\n ApiLog.One.WriteException(ex);\n }\n return retVal;\n }",
"@Override\r\n\tpublic String toString() {\r\n\t\tJsonObject jo = new JsonObject();\r\n\t\t\r\n\t\tjo.addProperty(\"IssuerInfo\", issuerInfo.toString());\r\n\t\tjo.addProperty(\"SubjectInfo\", subjectInfo.toString());\r\n\t\tjo.addProperty(\"AccessRights\", accessRights.toString());\r\n\t\tjo.addProperty(\"ResourceID\", resourceId);\r\n\t\tjo.addProperty(\"ValidityCondition\", validityCondition.toString());\r\n\t\tjo.addProperty(\"RevocationURL\", revocationUrl);\r\n\t\tString sig = \"\";\r\n\t\tfor(byte b : digitalSignature){\r\n\t\t\tsig = sig + Integer.toHexString(0xFF & b);\r\n\t\t}\r\n\t\tjo.addProperty(\"DigitalSignature\", sig);\r\n\t\t\r\n\t\treturn jo.toString();\r\n\t}",
"private XmlElement toXmlDict(Map<String, Object> map)\n {\n XmlElement dict = new XmlElement(\"dict\");\n for (Map.Entry<String, Object> entry : map.entrySet())\n {\n dict.add(new XmlElement(\"key\", entry.getKey()));\n dict.add(objectToXml(entry.getValue()));\n }\n return dict;\n }",
"public String serialize(TreeNode root) {\n if (root == null) {\n return \"[]\";\n }\n\n List<String> list = new ArrayList<>();\n Queue<TreeNode> queue = new LinkedList<>();\n queue.offer(root);\n\n while (!queue.isEmpty()) {\n TreeNode node = queue.poll();\n\n if (node == null) {\n list.add(\"null\");\n continue;\n } else {\n list.add(\"\" + node.val);\n }\n\n if (node.left != null) {\n queue.offer(node.left);\n } else {\n queue.offer(null);\n }\n\n if (node.right != null) {\n queue.offer(node.right);\n } else {\n queue.offer(null);\n }\n }\n\n // 移除末尾的 null\n for (int i = list.size() - 1; i >= 0; i--) {\n if (list.get(i).equals(\"null\")) {\n list.remove(i);\n } else {\n break;\n }\n }\n\n StringBuilder sb = new StringBuilder();\n sb.append('[');\n for (int i = 0; i < list.size(); i++) {\n sb.append(list.get(i));\n if (i == list.size() - 1) {\n sb.append(\"]\");\n } else {\n sb.append(\",\");\n }\n }\n\n return sb.toString();\n }",
"public String serialize(TreeNode root) {\n String res = \"\";\n return serializeCore(root,res);\n }",
"public String serialize(TreeNode root) {\n // write your code here\n StringBuilder sb = new StringBuilder();\n ArrayList<TreeNode> queue = new ArrayList<TreeNode>();\n if (root == null) {\n sb.append(\"{}\");\n return sb.toString();\n }\n queue.add(root);\n TreeNode node;\n for(int i = 0; i < queue.size(); i++){\n \tnode = queue.get(i);\n \tif(node != null){\n \t\tqueue.add(node.left);\n \t\tqueue.add(node.right);\n \t}\n }\n while (queue.get(queue.size() - 1) == null) {\n queue.remove(queue.size() - 1);\n }\n\n sb.append(\"{\");\n sb.append(queue.get(0).val);\n for(int i = 1; i < queue.size(); i++){\n \tif (queue.get(i) == null) {\n \t\tsb.append(\",#\");\n \t} else {\n \t\tsb.append(\",\" + queue.get(i).val);\n \t}\n }\n sb.append(\"}\");\n return sb.toString();\n }"
] | [
"0.5520125",
"0.5507274",
"0.5404859",
"0.5284385",
"0.52768177",
"0.5135852",
"0.5119315",
"0.5111154",
"0.50584894",
"0.5051682",
"0.50473285",
"0.50261784",
"0.4895081",
"0.4893039",
"0.48922768",
"0.48639947",
"0.4851793",
"0.48429164",
"0.4831793",
"0.4829951",
"0.48298347",
"0.48291335",
"0.48282972",
"0.48037946",
"0.47994393",
"0.47796342",
"0.4773629",
"0.47497517",
"0.47423118",
"0.47315493",
"0.4699614",
"0.46955112",
"0.46733102",
"0.46733102",
"0.46733102",
"0.4672133",
"0.4669987",
"0.46590587",
"0.46536967",
"0.4651927",
"0.4651835",
"0.46511254",
"0.4645336",
"0.46430108",
"0.4631989",
"0.46266955",
"0.46231216",
"0.4612774",
"0.4609355",
"0.4607159",
"0.46070746",
"0.46000138",
"0.45997235",
"0.4596978",
"0.4593352",
"0.4583837",
"0.45797288",
"0.4573875",
"0.45636594",
"0.45635226",
"0.45635226",
"0.45632267",
"0.4556612",
"0.45546663",
"0.45537686",
"0.4552455",
"0.45471373",
"0.45463073",
"0.45438957",
"0.45431754",
"0.4540532",
"0.4540397",
"0.45396173",
"0.4538144",
"0.45360124",
"0.45315522",
"0.45240095",
"0.45233148",
"0.4520387",
"0.451974",
"0.45169377",
"0.45123568",
"0.45031092",
"0.45008218",
"0.44906548",
"0.44884342",
"0.44843224",
"0.4478674",
"0.4476634",
"0.44765976",
"0.4474286",
"0.4472219",
"0.44695792",
"0.4457737",
"0.44500056",
"0.44417834",
"0.44367433",
"0.44346097",
"0.44336796",
"0.44315904"
] | 0.6497137 | 0 |
We want to process a concept net room concept and construct a folder in the Concepts folder | public static void getRoomConcept(String concept)
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void createOntologyResources(String conceptName, String conditionName, \r\n\t\t\t\t\t\t\t\t\t\tVector<String> syndromeSensDefNames, Vector<String> syndromeSpecDefNames, \r\n\t\t\t\t\t\t\t\t\t\tString relation, String inclusionKeywords, String exclusionKeywords, \r\n\t\t\t\t\t\t\t\t\t\tVector<Coding> codes) throws Exception{\n\t\tOWLDatatypeProperty codeIDProperty = owlModel.getOWLDatatypeProperty(Constants.PROPERTY_CODE_ID);\r\n\t\tOWLDatatypeProperty codeTitleProperty = owlModel.getOWLDatatypeProperty(Constants.PROPERTY_CODE_TITLE);\r\n\t\tOWLDatatypeProperty codingSystemProperty = owlModel.getOWLDatatypeProperty(Constants.PROPERTY_CODESYSTEM_NAME);\r\n\t\tOWLDatatypeProperty nameProperty = owlModel.getOWLDatatypeProperty(Constants.PROPERTY_HAS_NAME);\r\n\t\tOWLObjectProperty externalCodingsProperty = owlModel.getOWLObjectProperty(Constants.PROPERTY_HAS_EXTERNAL_CODES);\r\n\r\n\t\tOWLNamedClass newConcept = null;\r\n\t\tif (conceptName == null) {\r\n\t\t\t// We need to have at least one concept associated with a condition (exact concept),\r\n\t\t\t// so if there isn't one, we need to create it.\r\n\t\t\tSystem.out.println(\"WARNING: Missing concept for condition \" + conditionName + \". A concept with the same name will be created.\");\r\n\r\n\t\t\tconceptName = conditionName.toLowerCase();\r\n\t\t\trelation = \"concept name\";\r\n\t\r\n\t\t\t// check if such concept already exists:\r\n\t\t\tnewConcept = owlModel.getOWLNamedClass(conceptName.replace(' ', '_'));\r\n\t\t}\r\n\t\t\r\n\t\tif (newConcept == null) {\r\n\t\t\t\r\n\t\t\t// 1. Create new subclass(instance) of Concept:\r\n\t\t\tOWLNamedClass conceptClass = owlModel.getOWLNamedClass(Constants.CLASS_CONCEPT);\r\n\t\t\tOWLNamedClass conceptMetaClass = owlModel.getOWLNamedClass(Constants.METACLASS_CONCEPT);\r\n\t\t\tnewConcept = (OWLNamedClass) conceptMetaClass.createInstance(conceptName.replace(' ', '_'));\r\n\t\t\tnewConcept.addSuperclass(conceptClass);\r\n\t\t\tnewConcept.removeSuperclass(owlModel.getOWLThingClass());\r\n\t\t\tnewConcept.setPropertyValue(nameProperty, conceptName);\r\n\t\t\t\r\n\t\t\t// 2. Add external codes:\r\n\t\t\tCoding c = null;\r\n\t\t\tString codeName = null;\r\n\t\t\tOWLIndividual code = null;\r\n\t\t\tOWLNamedClass codeClass = null;\r\n\r\n\t\t\tfor (int i=0; i<codes.size(); i++){\r\n\t\t\t\tc = codes.get(i);\r\n\t\t\t\tcodeName = c.system + \"_\" + c.codeID.trim().replace(' ', '_');\r\n\t\t\t\tcode = owlModel.getOWLIndividual(codeName);\r\n\t\t\t\tif (code == null) {\r\n\t\t\t\t\tcodeClass = owlModel.getOWLNamedClass(c.system);\r\n\t\t\t\t\tcode = codeClass.createOWLIndividual(codeName);\r\n\t\t\t\t\tcode.setPropertyValue(codingSystemProperty, c.system);\r\n\t\t\t\t\tcode.setPropertyValue(codeIDProperty, c.codeID);\r\n\t\t\t\t\tif (c.codeTitle != null) code.setPropertyValue(codeTitleProperty, c.codeTitle);\r\n\t\t\t\t}\r\n\t\t\t\tnewConcept.addPropertyValue(externalCodingsProperty, code);\r\n\t\t\t}\r\n\r\n\t\t\t// 3. Process keywords:\r\n\t\t\tprocessKeywordString(inclusionKeywords, newConcept, Constants.PROPERTY_HAS_INCLUSION_KEYWORDS);\r\n\t\t\tprocessKeywordString(exclusionKeywords, newConcept, Constants.PROPERTY_HAS_EXCLUSION_KEYWORDS);\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"WARNING: Non-unique concept '\" + conceptName + \"' resulting from artificially creating an exact concept for a condition that did not have any associated concepts listed.\");\r\n\t\t}\r\n\t\t \t\t\r\n\t\t// 4. Check if ClinicalCondition exists, if not, create new subclass:\r\n\t\tOWLNamedClass conditionClass = owlModel.getOWLNamedClass(Constants.CLASS_CONDITION);\r\n\t\tOWLNamedClass conditionMetaClass = owlModel.getOWLNamedClass(Constants.METACLASS_CONDITION);\r\n\t\tOWLNamedClass condition = owlModel.getOWLNamedClass(conditionName.replace(' ', '_'));\r\n\r\n\t\tif (condition == null) {\r\n\t\t\tcondition = (OWLNamedClass) conditionMetaClass.createInstance(conditionName.replace(' ', '_'));\r\n\t\t\tcondition.addSuperclass(conditionClass);\r\n\t\t\tcondition.removeSuperclass(owlModel.getOWLThingClass());\r\n\t\t\tcondition.setPropertyValue(nameProperty, conditionName);\r\n\t\t\t\r\n\t\t\t// 5. Add new condition to syndrome definition(s):\r\n\t\t\tOWLObjectProperty sensitiveDefinitionProperty = owlModel.getOWLObjectProperty(Constants.PROPERTY_HAS_SENSITIVE_DEFINITION);\r\n\t\t\tOWLObjectProperty specificDefinitionProperty = owlModel.getOWLObjectProperty(Constants.PROPERTY_HAS_SPECIFIC_DEFINITION);\r\n\t\t\tOWLNamedClass syndromeSens = null; \r\n\t\t\tOWLNamedClass syndromeSpec = null; \r\n\t\t\tif (syndromeSensDefNames != null && syndromeSensDefNames.size() > 0) {\r\n\t\t\t\tfor (int i=0; i<syndromeSensDefNames.size(); i++){\r\n\t\t\t\t\tsyndromeSens = owlModel.getOWLNamedClass(syndromeSensDefNames.get(i));\r\n\t\t\t\t\tsyndromeSens.addPropertyValue(sensitiveDefinitionProperty, condition);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (syndromeSpecDefNames != null && syndromeSpecDefNames.size() > 0) {\r\n\t\t\t\tfor (int i=0; i<syndromeSpecDefNames.size(); i++){\r\n\t\t\t\t\tsyndromeSpec = owlModel.getOWLNamedClass(syndromeSpecDefNames.get(i));\r\n\t\t\t\t\tsyndromeSpec.addPropertyValue(specificDefinitionProperty, condition);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// 6. Add Concept to one of the slots of ClinicalCondition\r\n\t\tOWLObjectProperty p = null;\r\n\t\tif (relation.equalsIgnoreCase(\"concept name\")){\r\n\t\t\tp = owlModel.getOWLObjectProperty(Constants.PROPERTY_HAS_EXACT_CONCEPT);\r\n\t\t} \r\n\t\telse if (relation.substring(0, 7).equalsIgnoreCase(\"related\")){\r\n\t\t\tp = owlModel.getOWLObjectProperty(Constants.PROPERTY_HAS_RELATED_CONCEPTS);\r\n\t\t} \r\n\t\telse if (relation.equalsIgnoreCase(\"synonym\")){\r\n\t\t\tp = owlModel.getOWLObjectProperty(Constants.PROPERTY_HAS_SYNONYMOUS_CONCEPTS);\r\n\t\t}\r\n\t\telse throw new Exception(\"Cannot determine the relation of a concept to clinical condition! Relation specified is '\" + relation + \"'.\");\r\n\t\tcondition.addPropertyValue(p, newConcept);\r\n\t}",
"private ReportConcept createReportConcept(Concept concept) {\n\t\tIClass cls = concept.getConceptClass();\n\t\tString link = null;\n\n\t\t// make sure concept exists\n\t\tif (cls == null) {\n\t\t\tcls = reportInterface.getDomainOntology().getClass(concept.getCode());\n\t\t}\n\n\t\t// if concept came from external source, then\n\t\tMap map = concept.getCodes();\n\t\tif (map != null && !map.isEmpty()) {\n\t\t\tlink = \"\" + map.values().iterator().next();\n\t\t}\n\n\t\t// create concept entry\n\t\tReportConcept r = createReportConcept(cls);\n\n\t\tif (link != null)\n\t\t\tr.setResourceLink(link);\n\n\t\treturn r;\n\t}",
"ConceptsType createConceptsType();",
"String getConcept();",
"private void prepareFolder(String name, String newFolderName) {\n }",
"private void addFolder(){\n }",
"public folderize() {\n }",
"private void prepareStudentDirectories() {\n //---------- get all directories in the top level directory ----------\n ArrayList<File> listOfFiles = getFilesInDirectory(TopAssignmentsDirectory, true);\n\n /* for directories that don't conform to Moodle names, we will label\n them \"anonymous 1\", \"anonymous 2\", etc... */\n int anonymousCounter = 1;\n\n //---------- go through the list and identify subdirectories ----------\n for (File file : listOfFiles) {\n if (file.isDirectory()) { //check that it is a directory\n\n Assignment newAssignment = new Assignment();\n\n //attempt to extract the student's name\n String studentName = extractStudentNameFromMoodleDirectoryName(file.getName());\n newAssignment.assignmentDirectory = file.toString();\n\n\n if (studentName == null) {\n console(\"skipping directory \" + file.getName());\n } else if (studentName.equals(\"\")) {\n newAssignment.studentName = \"Anonymous \" + anonymousCounter;\n anonymousCounter++;\n //add this assignment to the assignments ArrayList\n assignments.add(newAssignment);\n } else {\n //student name successfully extracted: add to the assignmentDirectories dictionary\n newAssignment.studentName = studentName;\n //add this assignment to the assignments ArrayList\n assignments.add(newAssignment);\n }\n\n }\n }\n }",
"private void SetupStoryLocation() {\n\n //Delete previous project directories\n deleteDirectories();\n //ensure that newStoryReady is set to false\n newStoryReady = false;\n //Give story name a unique identifier\n String name = UUID.randomUUID().toString();\n //Set the value of the tag data to be the unique identifier of the story\n tag_data = name;\n //Create new story folder based on the name of the new story - this will be home to the new stories as well as any additional stories recorded\n story_directory = new File (getFilesDir() + File.separator + \"Stories\" + File.separator + name);\n //Create new tag folder based on the name of the new story - this will be home to the stories recorded which are saved to the tags.\n //Currently only a single audio file and picture are associated with one story folder.\n tag_directory = new File (getFilesDir() + File.separator + \"Tag\" + File.separator + name);\n //Create new cover image folder based on the name of the story - this stores the image representing the object.\n cover_directory = new File (getFilesDir() + File.separator + \"Covers\" + File.separator + name);\n //A temporary storage directory for files which are being sent and downloaded from the cloud.\n cloud_directory = new File (getFilesDir() + File.separator + \"Cloud\" + File.separator + name);\n //Make the described directory folders\n story_directory.mkdir();\n tag_directory.mkdir();\n cover_directory.mkdir();\n cloud_directory.mkdir();\n\n /* Example of saving stories to external directories\n\n// String newDirectory = LocalStoryFolder + \"/\" + name;\n// String newDirectory2 = TagFolder + \"/\" + name;\n// String newDirectory3 = CoverFolder + \"/\" + name;\n// story_directory = getExternalFilesDir(newDirectory);\n// tag_directory = getExternalFilesDir(newDirectory2);\n// cover_directory = getExternalFilesDir(newDirectory3);\n\n */\n }",
"private void makeDirectory() {\n String userHome = System.getProperty(\"user.home\");\n wnwData = new File(userHome + \"/.wnwdata\");\n wnwData.mkdirs();\n\n makeCampaignChallengesFile();\n makeCustomChallengesFile();\n makeProgressFile();\n makeSettingsFile();\n }",
"@Test\r\n\tpublic void testVerbFolderParsing() throws FileNotFoundException, IOException{\n\t\tFile inputFile = new File(\"output/100verbs\");\r\n\t\tFile outputFile = new File(\"output/100verbsParsed\");\r\n\t\t\t\t\t\t\r\n\t\tString mtModel = \"models/ger-tagger+lemmatizer+morphology+graph-based-3.6/morphology-ger-3.6.model\";\r\n\t\tString pModel = \"models/ger-tagger+lemmatizer+morphology+graph-based-3.6/parser-ger-3.6.model\";\r\n\t\tDewacDataParser dp = new DewacDataParser();\r\n\t\t\r\n\t\tdp.initialize(mtModel, pModel);\t\t\r\n\t\tdp.parseToFolder(inputFile, outputFile,1000);\r\n\t}",
"public static MElement createConcept(String concept) {\n System.out.println(\"Attempting to create Concept from string \" + concept);\n AbstractMFeature2 sf = AbstractMFeature2.getSemanticFeature(concept);\n return getInstance(sf, MFeatureType.CONCEPT);\n }",
"private void createEssentialDirs() throws TNotFoundEx{\n\t\tFileUtil fT = new FileUtil();\n\t\tfT.createDirOnDevice(TicklerVars.sdCardPath);\n\t\tif (!fT.isExistOnDevice(TicklerVars.sdCardPath))\n\t\t\tthrow new TNotFoundEx(\"Cannot create Tickler directory \"+TicklerVars.sdCardPath+\". Check your configurations in Tickler.conf file\");\n\t\tfT.createDirOnHost(TicklerVars.appTickDir);\n\t\tif (!fT.isExist(TicklerVars.appTickDir))\n\t\t\tthrow new TNotFoundEx(\"Cannot create Tickler directory \"+TicklerVars.appTickDir+\". Check your configurations in Tickler.conf file\");\n\t\t\n\t}",
"@Override\n\tpublic void generateDirectories() {\n\t\tFile file = new File(\"Data/My Contacts/\");\n\n\t\tif (!file.exists()) {\n\t\t\tfile.mkdirs();\n\t\t}\n\t}",
"Folder createFolder();",
"public void createSubfolder(\n String caseFolderPath,\n String subfolderName,\n String TOS) throws Exception {\n UserContext old = UserContext.get();\n CaseMgmtContext oldCmc = null;\n Subject sub = Subject.getSubject(AccessController.getContext());\n String ceURI = null;\n\n try {\n ceURI = filenet.vw.server.Configuration.GetCEURI(null, null);\n Connection connection = Factory.Connection.getConnection(ceURI);\n\n // setting up user context\n UserContext uc = new UserContext();\n uc.pushSubject(sub);\n UserContext.set(uc);\n\n EntireNetwork entireNetwork = Factory.EntireNetwork.fetchInstance(connection, null);\n\n if (entireNetwork == null) {\n Exception e = new Exception(\"Cannot log in to \" + ceURI);\n logException(e);\n }\n\n // retrieve target object store\n Domain domain = entireNetwork.get_LocalDomain();\n ObjectStore targetOS = (ObjectStore) domain.fetchObject(\n ClassNames.OBJECT_STORE,\n TOS,\n null);\n\n // setting up CaseMmgtContext for Case API\n SimpleVWSessionCache vwSessCache = new SimpleVWSessionCache();\n CaseMgmtContext cmc = new CaseMgmtContext(vwSessCache, new SimpleP8ConnectionCache());\n oldCmc = CaseMgmtContext.set(cmc);\n\n ObjectStoreReference targetOsRef = new ObjectStoreReference(targetOS);\n\n\t\t\t/* get case folder */\n Folder folder = Factory.Folder.fetchInstance(targetOsRef.getFetchlessCEObject(),\n caseFolderPath,\n null);\n\n // create a subfolder under case folder\n Folder newSubFolder = Factory.Folder.createInstance(targetOS, \"CmAcmCaseSubfolder\");\n newSubFolder.set_Parent(folder);\n newSubFolder.set_FolderName(subfolderName);\n newSubFolder.getProperties().putValue(\"CmAcmParentCase\", folder);\n newSubFolder.save(RefreshMode.REFRESH);\n } catch (Exception e) {\n logException(e);\n } finally {\n if (oldCmc != null) {\n CaseMgmtContext.set(oldCmc);\n }\n\n if (old != null) {\n UserContext.set(old);\n }\n }\n }",
"private void setupDirectory(String name){\n this.pokemon = toLowerCase(name);\n ServerSmogon sm;\n File folder = new File(getFilesDir() +\n \"/strategy_\" + gen + \"/\");\n File f = new File(getFilesDir() +\n \"/strategy_\" + gen + \"/\" + pokemon + \".txt\");\n //File[] contents = folder.listFiles();\n Thread thread;\n //check if directory is made\n if(folder.exists() && folder.isDirectory() && f.exists()){\n setupArticleandStats();\n refreshlayoutpart2();\n return;\n }\n //if not make it\n\n folder.mkdirs();\n try{\n f.createNewFile();\n } catch(IOException e){\n e.printStackTrace();\n }\n\n\n //download strategy articles\n sm = new ServerSmogon(getBaseContext(), gen, \"strategy\", pokemon, handler);\n thread = new Thread(sm);\n\n thread.start();\n dialog=new ProgressDialog(this);\n dialog.setMessage(\"Downloading \"+pokemon);\n dialog.setCancelable(false);\n dialog.setInverseBackgroundForced(false);\n dialog.show();\n// try{\n//\n// thread.join();\n// }catch (InterruptedException e){\n// e.printStackTrace();\n// }\n\n }",
"public void makeFolder() throws IOException {\n\t\tclientOutput.println(\n\t\t\t\t\">>> Unesite relativnu putanju do destinacije na kojoj pravite folder zajedno sa imenom foldera: \");\n\t\tuserInput = clientInput.readLine();\n\n\t\tuserInput = \"drive/\" + username + \"/\" + userInput;\n\t\tdestinacija = new File(userInput);\n\t\tdestinacija.mkdir();\n\t}",
"void setSystabIOFolderName(String name){\n this.folderName = name + \"\\\\\"; // Append the \\\\ to get inside the folder\n }",
"private void setUpDirectories() {\r\n\t\tFile creation = new File(\"Creations\");\r\n\t\tFile audio = new File(\"Audio\");\r\n\t\tFile quiz = new File(\"Quiz\");\r\n\t\tFile temp = new File(\"Temp\");\r\n\r\n\t\tif (!creation.isDirectory()) {\r\n\t\t\tcreation.mkdir();\r\n\t\t}\r\n\t\tif (!audio.isDirectory()) {\r\n\t\t\taudio.mkdir();\r\n\t\t}\r\n\t\tif (!quiz.isDirectory()) {\r\n\t\t\tquiz.mkdir();\r\n\t\t}\r\n\t\tif (!temp.isDirectory()) {\r\n\t\t\ttemp.mkdir();\r\n\t\t}\r\n\r\n\t}",
"private void manageDirectories() throws IOException {\n\t\tFileManager.copyFolder(RefactoringPlugin.getDynamicRefactoringsDir(),\n\t\t\t\t\"./testdata/XML/Writer/availableRefactorings\");\n\t\tFileManager.emptyDirectories(RefactoringPlugin\n\t\t\t\t.getDynamicRefactoringsDir());\n\t\tFileManager.deleteDirectories(\n\t\t\t\tRefactoringPlugin.getDynamicRefactoringsDir(), false);\n\t}",
"private void createTDenseDirectory() {\n File dense = new File(DenseLayerPath);\n dense.mkdir();\n }",
"private static void createSeededFiles(String type, int seedNum, int trainNum, int testNum, File sourceDirectory,\n File destinationDirectory) {\n\n File trainDirectory = new File(destinationDirectory.getAbsolutePath() + \"/train\");\n if(trainNum > 0 && !trainDirectory.exists()) {\n trainDirectory.mkdir();\n }\n File testDirectory = new File(destinationDirectory.getAbsolutePath() + \"/test\");\n if(testNum > 0 && !testDirectory.exists()) {\n testDirectory.mkdir();\n }\n\n //for each language, we want to create a directory for that language, then parse trees/sentences through each of the novels listed there\n File[] languages = sourceDirectory.listFiles();\n File[] trainDirectoryLanguages = new File[languages.length];\n File[] testDirectoryLanguages = new File[languages.length];\n for (int i = 0; i < languages.length; i++) {\n if (languages[i].getName().startsWith(\".\")) {\n continue;\n }\n trainDirectoryLanguages[i] = new File(trainDirectory.getAbsolutePath() + \"/\" + languages[i].getName());\n testDirectoryLanguages[i] = new File(testDirectory.getAbsolutePath() + \"/\" + languages[i].getName());\n if (trainNum > 0)\n makeNewDirectoryIfNotExists(trainDirectoryLanguages[i]);\n if (testNum > 0)\n makeNewDirectoryIfNotExists(testDirectoryLanguages[i]);\n\n File[] novels = languages[i].listFiles();\n for (int j = 0; j < novels.length; j++) {\n if (novels[j].getName().startsWith(\".\")) {\n continue;\n }\n try {\n BufferedReader read = new BufferedReader(new FileReader(novels[j]));\n //name w/o .txt\n String fileShortName = novels[j].getName().substring(0, novels[j].getName().length()-4);\n String line;\n //max number of stuff we want to read is based on our inputs\n int maxFiles = testNum + trainNum;\n long maxLines = (long) maxFiles * (long) seedNum;\n int lineCount = 0;\n int fileCount = 1;\n //File currentFile = createNewNumberedFile(trainDirectoryLanguages[i].getAbsolutePath() + \"/\" + fileShortName, fileCount);\n String pathToUse = (fileCount <= trainNum) ? trainDirectoryLanguages[i].getAbsolutePath() :\n testDirectoryLanguages[i].getAbsolutePath();\n File currentFile = createNewNumberedFile(pathToUse + \"/\" + fileShortName, fileCount);\n PrintWriter pw = new PrintWriter(currentFile);\n\n //this is the part that varies based on calling for text or trees.\n switch (type) {\n case \"text\":\n while ((line = read.readLine()) != null && lineCount < maxLines ) {\n pw.println(line);\n lineCount++;\n //when our lineCount mod seedNum is 0, we want to create another PrintWriter\n if (lineCount % seedNum == 0) {\n fileCount++;\n //put in train or test, depending on our current file count.\n if (fileCount <= maxFiles) {\n pathToUse = (fileCount <= trainNum) ? trainDirectoryLanguages[i].getAbsolutePath() :\n testDirectoryLanguages[i].getAbsolutePath();\n currentFile = createNewNumberedFile(pathToUse + \"/\" + fileShortName, fileCount);\n pw.flush();\n pw.close();\n pw = new PrintWriter(currentFile);\n }\n }\n }\n break;\n case \"tree\":\n //need to build a Treebank... lifting code from HW 3 to aid in this.\n Options op = new Options();\n op.doDep = false;\n op.doPCFG = true;\n op.setOptions(\"-goodPCFG\", \"-evals\", \"tsv\");\n Treebank treeBank = op.tlpParams.diskTreebank();\n treeBank.loadPath(novels[j]);\n Iterator<Tree> it = treeBank.iterator();\n while((it.hasNext()) && lineCount < maxLines) {\n lineCount++;\n Tree t = it.next();\n t.pennPrint(pw);\n if (lineCount % seedNum == 0) {\n fileCount++;\n //put in train or test, depending on our current file count.\n if (fileCount <= maxFiles) {\n pathToUse = (fileCount <= trainNum) ? trainDirectoryLanguages[i].getAbsolutePath() :\n testDirectoryLanguages[i].getAbsolutePath();\n currentFile = createNewNumberedFile(pathToUse + \"/\" + fileShortName, fileCount);\n pw.flush();\n pw.close();\n pw = new PrintWriter(currentFile);\n }\n }\n }\n break;\n }\n pw.flush();\n pw.close();\n //if numlines is not equal to maxlines then we'll remove the last file.\n if (lineCount != maxLines) {\n currentFile = createNewNumberedFile(pathToUse + \"/\" + fileShortName, fileCount);\n currentFile.delete();\n }\n } catch (IOException e) {\n System.err.println(\"Exception caught while reading \" + novels[j] + \":\");\n e.printStackTrace();\n }\n }\n\n\n }\n\n\n }",
"private static void writeConcepts(XMLStreamWriter w, RepositoryConnection con, IRI pred, String classWrap) \n\t\t\tthrows XMLStreamException {\n\t\t\n\t\tSet<IRI> concepts;\n\t\n\t\ttry (RepositoryResult<Statement> res = con.getStatements(null, pred, null)) {\n\t\t\tconcepts = res.stream()\n\t\t\t\t\t\t\t.map(Statement::getObject)\n\t\t\t\t\t\t\t.filter(IRI.class::isInstance)\n\t\t\t\t\t\t\t.map(IRI.class::cast)\n\t\t\t\t\t\t\t.filter(i -> i.toString().startsWith(\"http\"))\n\t\t\t\t\t\t\t.collect(Collectors.toSet());\t\t\n\t\t}\n\n\t\tif (concepts == null || concepts.isEmpty()) {\n\t\t\treturn;\n\t\t}\n\t\tfor (IRI concept: concepts) {\n\t\t\tw.writeStartElement(classWrap);\n\t\t\tw.writeAttribute(\"rdf:about\", concept.toString());\n\t\t\tif(! classWrap.equals(\"skos:Concept\")) {\n\t\t\t\tw.writeEmptyElement(\"rdf:type\");\n\t\t\t\tw.writeAttribute(\"rdf:resource\", SKOS.CONCEPT.stringValue());\n\t\t\t}\n\t\t\twriteLiterals(w, con, concept, SKOS.PREF_LABEL, \"skos:prefLabel\");\n\t\t\twriteReferences(w, con, concept, SKOS.IN_SCHEME, \"skos:inScheme\");\n\t\t\tw.writeEndElement();\n\t\t}\n\t\tLOG.info(\"Wrote {} {} concepts\", concepts.size(), classWrap);\n\t\t\n\t}",
"private void createFolder(String myFilesystemDirectory) {\n\r\n File file = new File(myFilesystemDirectory);\r\n try {\r\n if (!file.exists()) {\r\n //modified \r\n file.mkdirs();\r\n }\r\n } catch (SecurityException e) {\r\n Utilidades.escribeLog(\"Error al crear carpeta: \" + e.getMessage());\r\n }\r\n }",
"public Generator(File world_path) throws FileNotFoundException, URISyntaxException{\n\t\tif(root_dir == null){\n\t\t\troot_dir = new File(Generator.class.getProtectionDomain().getCodeSource().getLocation().toURI().getPath()).getParentFile();\n\t\t\tSystem.out.println(root_dir.getPath());\n\t\t\tfirst_name_files = new File(root_dir.getPath()+\"/Data/name/first/\").listFiles();\n\t\t\t//System.out.println(first_name_files.getPath());\n\t\t\tlast_name_files = new File(root_dir.getPath()+\"/Data/name/last/\").listFiles();\n\t\t\t//System.out.println(last_name_files.getPath());\n\t\t\ttrait_files = new File(root_dir.getPath()+\"/Data/trait/\").listFiles();\n\t\t\t//System.out.println(root_dir.getPath());\n\t\t}\n\t\tScanner world_file = new Scanner(world_path);\n\t\tString temp = \"\";\n\t\t/*\n\t\t * Load Name files\n\t\t */\n\t\twhile(true){\n\t\t\ttemp = world_file.nextLine();\n\t\t\tString[] curr_line = temp.split(\"\\t+\");\n\t\t\tif(curr_line[0].equals(\"TRAITS:\")) break;\n\t\t\tcurr_line[0]+=\".txt\";\n\t\t\tint prob = curr_line.length > 1 ? Integer.parseInt(curr_line[1]) : 1;\n\t\t\tfor(File i : first_name_files){\n\t\t\t\tif (i.getName().equals(curr_line[0])){\n\t\t\t\t\tFile first = i;\n\t\t\t\t\tFile second = null;\n\t\t\t\t\tfor(File j : last_name_files)\n\t\t\t\t\t\tif(j.getName().equals(curr_line[0])){\n\t\t\t\t\t\t\tsecond = j;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\tnames.addReader(new FileReader.NameReader(first, second), prob);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tattributes.add(\"Name\");\n\t\tattributes.add(\"Gender\");\n\t\tattributes.add(\"Ethnicity\");\n\t\t/*\n\t\t * Load Trait files \n\t\t */\n\t\twhile(world_file.hasNext()){\n\t\t\ttemp =world_file.next();\n\t\t\tattributes.add(temp);\n\t\t\ttemp+=\".txt\";\n\t\t\tfor(File i : trait_files){\n\t\t\t\tif(i.getName().equals(temp)){\n\t\t\t\t\ttraits.add(new FileReader.TraitReader(i));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"private Map<String, String> generateNewResources(VitroRequest vreq) {\n\t\t\tHashMap<String, String> newResources = new HashMap<String, String>();\n\t\t\tnewResources.put(\"conceptNode\", null);\n\t\t\t//There are no new resources here, the concept node uri doesn't\n\t\t\t//get created but already exists, and vocab uri should already exist as well\n\t\t\treturn newResources;\n\t\t}",
"@Test\n\tpublic void createFolderAsAuditorTest() {\n\t\tauthenticate(\"agent2\");\n\t\tint principalId = actorService.findByPrincipal().getId();\n\t\tint numFoldersNow = folderService.findFoldersOfActor(principalId).size();\n\t\tFolderForm folderFormAux = new FolderForm();\n\t\tfolderFormAux.setName(\"New Agent2 Folder for testing its creation\");\n\t\tFolder folder = folderService.reconstruct(folderFormAux,0);\n\t\tfolderService.save(folder);\n\t\tint numFoldersExpected = folderService.findFoldersOfActor(principalId).size();\n\t\tunauthenticate();\t\n\t\t\n\t\tAssert.isTrue(numFoldersNow + 1 == numFoldersExpected);\n\t}",
"Builder addLearningResourceType(String value);",
"private void createRequiredDirectory(String outdir, String className) throws IOException\r\n\t{\n\t\tString workingdirectory = System.getProperty(\"user.dir\");\r\n\t\t\r\n\t\t//used to create directory\r\n\t\tscreenshotDir = new File(workingdirectory +\"/custom-test-report\");\r\n\t\tscreenshotDir.mkdir();\r\n\t\t\r\n\t\tscreenshotDir = new File(workingdirectory +\"/custom-test-report/Failure_Screenshot\");\r\n\t\tscreenshotDir.mkdir();\r\n\t\t\r\n\t\tscreenshotDir = new File(workingdirectory + \"/custom-test-report\" + \"/\" + className);\r\n\t\tscreenshotDir.mkdir();\r\n\t}",
"private void createDataModelFolders() {\n\n File dataFolder = new File(Environment.getExternalStorageDirectory() + \"/AGH_IM_DATA\");\n File modelFolder = new File(Environment.getExternalStorageDirectory() + \"/AGH_IM_MODEL\");\n\n boolean dataSuccess = true;\n boolean modelSuccess = true;\n if (!dataFolder.exists()) {\n try {\n dataSuccess = dataFolder.mkdirs();\n } catch (SecurityException e) {\n dataSuccess = false;\n }\n }\n\n if (!modelFolder.exists()) {\n try {\n modelSuccess = modelFolder.mkdirs();\n } catch (SecurityException e) {\n modelSuccess = false;\n }\n }\n\n String TAG = \"MainScreen\";\n if (dataSuccess) Log.d(TAG, \"Created AGH_IM_DATA folder\");\n else Log.d(TAG, \"Cannot create AGH_IM_DATA Folder\");\n if (modelSuccess) Log.d(TAG, \"Successfully created AGH_IM_MODEL folder\");\n else Log.d(TAG, \"Cannot create AGH_IM_MODEL Folder\");\n\n }",
"AMPLPath createAMPLPath();",
"public void createPatient() throws IOException\n {\n addPatientToList();\n \n //creates the patient's empty folders and files\n File userFolder = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB); \n File patientEvaluation = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm\");\n File patientProgressReports = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/ProgressNotes\"); \n \n try\n \t{\n \tuserFolder.mkdir();\n patientEvaluation.mkdir();\n patientProgressReports.mkdir();\n \t//result = true;\n \t} \n \tcatch(SecurityException se)\n \t{\n \t//handle it\n \t} \n \t\n File listOfProgressReports = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/ProgressReports.txt\");\n FileWriter writer = new FileWriter(listOfProgressReports, true);\t \n BufferedWriter bufferedreader = new BufferedWriter(writer);\n writer.append(\"\");\n bufferedreader.close();\n writer.close();\n \n \n /*if(result) \n \t{ \n \t\tSystem.out.println(\"DIR created\"); \n \t}*/\n \n //creates the patient's empty evaluation form files\n File signedStatus = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/signed.txt\");\n FileWriter w = new FileWriter(signedStatus, true);\t \n BufferedWriter b = new BufferedWriter(w);\n w.append(\"false\");\n b.close();\n w.close();\n \n File firstName = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/first.txt\");\n FileWriter writ = new FileWriter(firstName, true);\t \n BufferedWriter bw = new BufferedWriter(writ);\n writ.append(currentPatientFirstName);\n bw.close();\n writ.close();\n \n File lastName = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/last.txt\");\n FileWriter writ1 = new FileWriter(lastName, true);\t \n BufferedWriter bw1 = new BufferedWriter(writ1);\n writ1.append(currentPatientLastName);\n bw1.close();\n writ1.close();\n \n File age = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/age.txt\");\n FileWriter writ2 = new FileWriter(age, true);\t \n BufferedWriter bw2 = new BufferedWriter(writ2);\n writ2.append(\"\");\n bw2.close();\n writ2.close();\n \n File dob = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/dateofbirth.txt\");\n FileWriter writ3 = new FileWriter(dob, true);\t \n BufferedWriter bw3 = new BufferedWriter(writ3);\n writ3.append(\"\");\n bw3.close();\n writ3.close();\n \n File maritalstatus = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/maritalstatus.txt\");\n FileWriter writ4 = new FileWriter(maritalstatus, true);\t \n BufferedWriter bw4 = new BufferedWriter(writ4);\n writ4.append(\"\");\n bw4.close();\n writ4.close();\n \n File ethnicity = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/ethnicity.txt\");\n FileWriter writ5 = new FileWriter(ethnicity, true);\t \n BufferedWriter bw5 = new BufferedWriter(writ5);\n writ5.append(\"\");\n bw5.close();\n writ5.close();\n\n File ethnicityother = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/ethnicity-other.txt\");\n FileWriter writt = new FileWriter(ethnicityother, true);\t \n BufferedWriter bww = new BufferedWriter(writt);\n writt.append(\"\");\n bww.close();\n writt.close();\n \n File sex = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/sex.txt\");\n FileWriter writ6 = new FileWriter(sex, true);\t \n BufferedWriter bw6 = new BufferedWriter(writ6);\n writ6.append(\"\");\n bw6.close();\n writ6.close();\n \n File referredBy = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/referredby.txt\");\n FileWriter writ7 = new FileWriter(referredBy, true);\t \n BufferedWriter bw7 = new BufferedWriter(writ7);\n writ7.append(\"\");\n bw7.close();\n writ7.close();\n \n File referredByTherapist = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/referredby-therapist.txt\");\n FileWriter writ8 = new FileWriter(referredByTherapist, true);\t \n BufferedWriter bw8 = new BufferedWriter(writ8);\n writ8.append(\"\");\n bw8.close();\n writ8.close();\n \n File referredByOther = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/referredby-other.txt\");\n FileWriter writ9 = new FileWriter(referredByOther, true);\t \n BufferedWriter bw9 = new BufferedWriter(writ9);\n writ9.append(\"\");\n bw9.close();\n writ9.close();\n \n //dr. prince\n File reasonForReferral = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/reasonforreferral.txt\");\n FileWriter writ10 = new FileWriter(reasonForReferral, true);\t \n BufferedWriter bw10 = new BufferedWriter(writ10);\n writ10.append(\"\");\n bw10.close();\n writ10.close();\n \n File sourceOfInformation = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/sourceofinformation.txt\");\n FileWriter writ11 = new FileWriter(sourceOfInformation, true);\t \n BufferedWriter bw11 = new BufferedWriter(writ11);\n writ11.append(\"\");\n bw11.close();\n writ11.close();\n \n File sourceOfInformationOther = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/sourceofinformation-other.txt\");\n FileWriter writ12 = new FileWriter(sourceOfInformationOther, true);\t \n BufferedWriter bw12 = new BufferedWriter(writ12);\n writ12.append(\"\");\n bw12.close();\n writ12.close();\n \n File reliabilityOfInformation = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/reliabilityofinformation.txt\");\n FileWriter writ13 = new FileWriter(reliabilityOfInformation, true);\t \n BufferedWriter bw13 = new BufferedWriter(writ13);\n writ13.append(\"\");\n bw13.close();\n writ13.close();\n \n File reliabilityOfInformationOther = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/reliabilityofinformation-other.txt\");\n FileWriter writ14 = new FileWriter(reliabilityOfInformationOther, true);\t \n BufferedWriter bw14 = new BufferedWriter(writ14);\n writ14.append(\"\");\n bw14.close();\n writ14.close();\n \n File historyOfPresentIllness = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/historyofpresentillness.txt\");\n FileWriter writ15 = new FileWriter(historyOfPresentIllness, true);\t \n BufferedWriter bw15 = new BufferedWriter(writ15);\n writ15.append(\"\");\n bw15.close();\n writ15.close();\n \n File signsSymptoms = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/signsandsymptoms.txt\");\n FileWriter writ16 = new FileWriter(signsSymptoms, true);\t \n BufferedWriter bw16 = new BufferedWriter(writ16);\n writ16.append(\"\");\n bw16.close();\n writ16.close();\n \n File currentMedications = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/currentmedications.txt\");\n FileWriter writ17 = new FileWriter(currentMedications, true);\t \n BufferedWriter bw17 = new BufferedWriter(writ17);\n writ17.append(\"\");\n bw17.close();\n writ17.close();\n \n File pastHistoryOf = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/pasthistoryof.txt\");\n FileWriter writ18 = new FileWriter(pastHistoryOf, true);\t \n BufferedWriter bw18 = new BufferedWriter(writ18);\n writ18.append(\"\");\n bw18.close();\n writ18.close();\n \n File pastHistoryOfText = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/pasthistoryoftext.txt\");\n FileWriter writ19 = new FileWriter(pastHistoryOfText, true);\t \n BufferedWriter bw19 = new BufferedWriter(writ19);\n writ19.append(\"\");\n bw19.close();\n writ19.close();\n \n File medicationTrialsTable = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/medicationtrialstable.txt\");\n FileWriter writ20 = new FileWriter(medicationTrialsTable, true);\t \n BufferedWriter bw20 = new BufferedWriter(writ20);\n writ20.append(\"\");\n bw20.close();\n writ20.close();\n \n File medicationTrialsComments = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/medicationtrialscomments.txt\");\n FileWriter writ21 = new FileWriter(medicationTrialsComments, true);\t \n BufferedWriter bw21 = new BufferedWriter(writ21);\n writ21.append(\"\");\n bw21.close();\n writ21.close();\n \n File substanceUseHistory = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/substanceusehistory.txt\");\n FileWriter writ22 = new FileWriter(substanceUseHistory, true);\t \n BufferedWriter bw22 = new BufferedWriter(writ22);\n writ22.append(\"\");\n bw22.close();\n writ22.close();\n \n File deniesHistoryOf = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/denieshistoryof.txt\");\n FileWriter writ23 = new FileWriter(deniesHistoryOf, true);\t \n BufferedWriter bw23 = new BufferedWriter(writ23);\n writ23.append(\"\");\n bw23.close();\n writ23.close();\n \n File deniesHistoryOfText = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/denieshistoryoftext.txt\");\n FileWriter writ24 = new FileWriter(deniesHistoryOfText, true);\t \n BufferedWriter bw24 = new BufferedWriter(writ24);\n writ24.append(\"\");\n bw24.close();\n writ24.close();\n \n File socialHistoryText = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/socialhistorytext.txt\");\n FileWriter writ25 = new FileWriter(socialHistoryText, true);\t \n BufferedWriter bw25 = new BufferedWriter(writ25);\n writ25.append(\"\");\n bw25.close();\n writ25.close();\n \n File socialHistoryParents = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/socialhistoryparents.txt\");\n FileWriter writ26 = new FileWriter(socialHistoryParents, true);\t \n BufferedWriter bw26 = new BufferedWriter(writ26);\n writ26.append(\"\");\n bw26.close();\n writ26.close();\n \n File socialHistorySiblings = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/socialhistorysiblings.txt\");\n FileWriter writ27 = new FileWriter(socialHistorySiblings, true);\t \n BufferedWriter bw27 = new BufferedWriter(writ27);\n writ27.append(\"\");\n bw27.close();\n writ27.close();\n \n File socialHistoryChildren = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/socialhistorychildren.txt\");\n FileWriter writ28 = new FileWriter(socialHistoryChildren, true);\t \n BufferedWriter bw28 = new BufferedWriter(writ28);\n writ28.append(\"\");\n bw28.close();\n writ28.close();\n \n File familyHistoryOfMentalIllness = new File(installationPath + \"/userdata/\" + currentPatientFirstName + currentPatientLastName + currentPatientDOB + \"/EvaluationForm/familyhistoryofmentalillness.txt\");\n FileWriter writ29 = new FileWriter(familyHistoryOfMentalIllness, true);\t \n BufferedWriter bw29 = new BufferedWriter(writ29);\n writ29.append(\"\");\n bw29.close();\n writ29.close();\n \n }",
"public abstract void overallConcepts(long ms, int n);",
"public synchronized void outputRule() throws IOException\n{\n File f1 = for_program.getUniverse().getBaseDirectory();\n File f2 = new File(f1,RULE_FILE);\n FileWriter fw = new FileWriter(f2,true);\n IvyXmlWriter xw = new IvyXmlWriter(fw);\n\n xw.begin(\"RULE\");\n xw.field(\"WHEN\",at_time);\n xw.field(\"WHENS\",new Date(at_time).toString());\n\n xw.begin(\"WORLD\");\n for (Map.Entry<UpodParameter,Object> ent : from_world.getParameters().entrySet()) {\n UpodParameter pnm = ent.getKey();\n Object pvl = ent.getValue();\n if (pvl == null) continue;\n xw.begin(\"PARAM\");\n xw.field(\"NAME\",pnm.getName());\n xw.field(\"TYPE\",pvl.getClass().toString());\n xw.cdata(pvl.toString());\n xw.end(\"PARAM\");\n }\n xw.end(\"WORLD\");\n\n for (Map.Entry<UpodDevice,Map<UpodParameter,Object>> ent : sensor_values.entrySet()) {\n UpodDevice us = ent.getKey();\n xw.begin(\"SENSOR\");\n xw.field(\"NAME\",us.getName());\n xw.field(\"ID\",us.getUID());\n for (Map.Entry<UpodParameter,Object> pent : ent.getValue().entrySet()) {\n\t xw.begin(\"PARAM\");\n\t xw.field(\"NAME\",pent.getKey().getName());\n\t xw.cdata(pent.getValue().toString());\n\t xw.end(\"PARAM\");\n }\n xw.end(\"SENSOR\");\n }\n for (Map.Entry<UpodDevice,Map<UpodParameter,Object>> ent : entity_values.entrySet()) {\n UpodDevice ue = ent.getKey();\n xw.begin(\"ENTITY\");\n xw.field(\"NAME\",ue.getName());\n xw.field(\"ID\",ue.getUID());\n for (Map.Entry<UpodParameter,Object> pent : ent.getValue().entrySet()) {\n\t xw.begin(\"PARAM\");\n\t xw.field(\"NAME\",pent.getKey().getName());\n\t xw.cdata(pent.getValue().toString());\n\t xw.end(\"PARAM\");\n }\n xw.end(\"ENTITY\");\n }\n\n for (CalendarEvent ce : calendar_events) {\n if (ce.getStartTime() > at_time + 5*T_MINUTE) continue;\n if (ce.getEndTime() < at_time - 5*T_MINUTE) continue;\n xw.begin(\"CALENDAR\");\n xw.field(\"START\",ce.getStartTime());\n xw.field(\"STARTS\",new Date(ce.getStartTime()).toString());\n xw.field(\"END\",ce.getEndTime());\n xw.field(\"ENDS\",new Date(ce.getEndTime()).toString());\n for (Map.Entry<String,String> ent : ce.getProperties().entrySet()) {\n\t xw.begin(\"FIELD\");\n\t xw.field(\"NAME\",ent.getKey());\n\t xw.field(\"VALUE\",ent.getValue());\n\t xw.end(\"FIELD\");\n }\n xw.end(\"CALENDAR\");\n }\n xw.end(\"RULE\");\n xw.close();\n}",
"@Override\n\tpublic String generatePathStr(String component,\n\t\t\tString outputName) throws RemoteException {\n\t\treturn \"/user/\" + userName + \"/tmp/redsqirl_\" + component + \"_\" + outputName\n\t\t\t\t+ \"_\" + RandomString.getRandomName(8)+\".txt\";\n\t}",
"default void putConcept(ConceptName name, Concept concept) {}",
"public void addFolder(String path) {\n\t\tFile f = new File(path);\r\n\t\tif (!f.exists())\r\n\t\t\tSystem.out.println(\"File khong ton tai\");\r\n\t\tString[] flist = f.list();\r\n\r\n\t\tString fname;\r\n\t\tBufferedReader bf;\r\n\t\tString sentence;\r\n\t\tString w[];\r\n\r\n\t\tString D = \"_S2_\"; // dump\r\n\t\tString prev2, prev1;\r\n\t\tprev2 = D;\r\n\t\tprev1 = D;\r\n\t\tfor (int i = 0; i < flist.length; i++) {\r\n\t\t\tfname = flist[i];\r\n\t\t\t// System.out.println(\"process file \" + flist[i]);\r\n\t\t\t// TimePerf.tic();\r\n\t\t\ttry {\r\n\r\n\t\t\t\t// open file for reading\r\n\t\t\t\tbf = new BufferedReader(new InputStreamReader(\r\n\t\t\t\t\t\tnew FileInputStream(path + \"/\" + fname)));\r\n\t\t\t\twhile ((sentence = bf.readLine()) != null) {\r\n\t\t\t\t\t// tokenize to words\r\n\t\t\t\t\tString[] wlist = sentence.split(\"\\\\s+\");\r\n\t\t\t\t\tprev2 = D;\r\n\t\t\t\t\tprev1 = D;\r\n\t\t\t\t\tfor (int j = 0; j < wlist.length; j++) {\r\n\t\t\t\t\t\tw = wlist[j].split(\"/\");\r\n\r\n\t\t\t\t\t\tif (w.length != 2)\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\tw[1] = w[1].toUpperCase();\r\n\r\n\t\t\t\t\t\tif (size == ModelSize.SMALL) {\r\n\t\t\t\t\t\t\tif (w[1].matches(\"[A-Z]+\"))\r\n\t\t\t\t\t\t\t\tw[1] = \"\" + w[1].charAt(0);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// add tag count\r\n\t\t\t\t\t\tuModel.inc(w[1]);\r\n\r\n\t\t\t\t\t\t// add new tags\r\n\t\t\t\t\t\ttags.add(w[1]);\r\n\r\n\t\t\t\t\t\t// add new tag to word\r\n\t\t\t\t\t\taddTagToWord(w[0], w[1]);\r\n\r\n\t\t\t\t\t\t// increase count of word tag\r\n\t\t\t\t\t\twtProb.inc(w[1], w[0]);\r\n\r\n\t\t\t\t\t\t// increase count of bigram\r\n\t\t\t\t\t\t// if (j > 0) {\r\n\t\t\t\t\t\tbiModel.inc(prev1, w[1]);\r\n\t\t\t\t\t\t// }\r\n\r\n\t\t\t\t\t\t// increase count of trigram\r\n\t\t\t\t\t\t// if (j > 1) {\r\n\t\t\t\t\t\ttriModel.inc(prev1 + \" \" + prev2, w[1]);\r\n\t\t\t\t\t\t// }\r\n\r\n\t\t\t\t\t\tprev2 = prev1;\r\n\t\t\t\t\t\tprev1 = w[1];\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tbf.close();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\t// System.out.println(\"Process time \" + TimePerf.toc() + \"ms\");\r\n\t\t}\r\n\t\t// handle unknown word (word which has word count < 5)\r\n\t\tHashSet<String> tmp = new HashSet<String>();\r\n\t\tfor (String wd : wordTags.keySet()) {\r\n\r\n\t\t\tfor (String t : wordTags.get(wd)) {\r\n\t\t\t\tif (t.matches(\"\\\\w+\") && wtProb.getCombinationCount(t, wd) < 5) {\r\n\t\t\t\t\twtProb.inc(t, \"<UNK>\", wtProb.getCombinationCount(t, wd));\r\n\t\t\t\t\ttmp.add(t);\r\n\t\t\t\t\tSystem.out.println(\"<\" + wd + \",\" + t + \">\"\r\n\t\t\t\t\t\t\t+ wtProb.freq(\"UNK\", t));\r\n\t\t\t\t}\r\n\t\t\t\t// addTagToWord(\"<UNK>\", t);\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t\twordTags.put(\"<UNK>\", tmp);\r\n\r\n\t\tSystem.out.println(\"Total of tags : \" + tags.size());\r\n\t\tStringBuffer t = new StringBuffer();\r\n\t\tfor (String s : tags)\r\n\t\t\tif (s.matches(\"\\\\w+\"))\r\n\t\t\t\tt.append(\" \" + s);\r\n\t\tSystem.out.println(t.toString());\r\n\t\tthis.computeLambda();\r\n\t\tSystem.out.println(\"Unkown word type: \");\r\n\t\tfor (String t2 : getPosibleTags(\"<UNK>\"))\r\n\t\t\tSystem.out.println(\"Tag \" + t + \", p= \" + getProbWordGivenTag(\"<UNK>\", t2));\r\n\r\n\t}",
"Builder addLearningResourceType(Text value);",
"private Path initFolder(String folder) throws IOException {\n return Files.createDirectory(Paths.get(uploadFolder + \"/\" + folder));\n }",
"public ResourcePath() {\n //_externalFolder = \"file:///C:/Program%20Files/ESRI/GPT9/gpt/\";\n //_localFolder = \"gpt/\";\n}",
"private void prepareRuleFiles() {\n\n if (IronSyslog.class.getResource(RULE_FOLDER) == null\n || IronSyslog.class.getResource(RULE_FOLDER + \"service/\") == null\n || IronSyslog.class.getResource(RULE_FOLDER + \"publish/\") == null\n || IronSyslog.class.getResource(RULE_FOLDER + \"other/\") == null) {\n LOGGER.error(\"Error while preparing rule files. Broken file system folder structure. \\n\"\n + \"Make sure that: rules/drools/ and its subfolders service/, publish/ and other/ exist\");\n System.exit(1);\n }\n\n // Prepare Configuration\n Yaml yaml = new Yaml();\n InputStream input = IronSyslog.class.getResourceAsStream(RULE_FOLDER\n + \"config.yml\");\n RulesConfiguration config = yaml\n .loadAs(input, RulesConfiguration.class);\n\n try {\n // Add only the service rules (in the service folder) specified in\n // the configuration\n for (String service : config.getServiceInclude()) {\n String fileName = RULE_FOLDER + \"service/\" + service + \".drl\";\n if (IronSyslog.class.getResource(fileName) != null) {\n LOGGER.debug(\"Adding rule file: \" + fileName);\n mRuleFiles.add(RULE_FOLDER + \"service/\" + service + \".drl\");\n } else {\n LOGGER.warn(\"Failed to add rule file: \" + fileName);\n }\n }\n\n // Add all publish rules (in the \"publish\" folder) excluding the one\n // specified on the\n // configuration\n File publishFolder = new File(IronSyslog.class.getResource(\n RULE_FOLDER + \"publish/\").toURI());\n File[] publishFiles = publishFolder.listFiles();\n for (int i = 0; i < publishFiles.length; i++) {\n String fileName = publishFiles[i].getName();\n if (fileName.endsWith(\".drl\")\n && !config.getPublishExclude().contains(\n fileName.substring(0, fileName.length() - 4))) {\n LOGGER.debug(\"Adding rule file: \" + RULE_FOLDER\n + \"publish/\" + fileName);\n mRuleFiles.add(RULE_FOLDER + \"publish/\" + fileName);\n }\n }\n\n // Add all other rules (\"other\" folder, including subfolders)\n addAllRuleFilesInFolder(RULE_FOLDER + \"other/\");\n } catch (URISyntaxException e) {\n LOGGER.debug(\"Error while searching for rule files. \" + e);\n }\n }",
"@Test\n\tpublic void test_Directory_typeFinder_SENG300W18Iter1() {\n\t\tString directory = _TestSuite.TYPE_FINDER_TEST_DIR.concat(\"SENG300W18Iter1/\");\n\t\ttestOutput(directory);\n\t}",
"private String getNewAreaResourceType(String componentPath) {\n Resource componentResource = resolver.getResource(componentPath);\n if (componentResource != null) {\n if (componentResource.getChild(NEWAREA_CHILD_NAME) != null) {\n return componentPath + \"/\" + NEWAREA_CHILD_NAME;\n }\n String resourceSuperType = componentResource.getResourceSuperType();\n if (StringUtils.isNotEmpty(resourceSuperType)) {\n return getNewAreaResourceType(resourceSuperType);\n }\n }\n return FALLBACK_NEWAREA_RESOURCE_TYPE;\n }",
"ConceptType createConceptType();",
"List<Concept2OntClassMapping> lookupConcept2OntClassMappingPairs(Concept concept);",
"public OrganizationConfigManager createSubOrganization(String subOrgName,\n Map attributes) throws SMSException {\n validateConfigImpl();\n /*\n * Since the \"Map attributes\" can contain more than one service name,\n * creation of the sub organization is be achieved in 2 steps. i) create\n * the sub-organization without the attributes ii) for the service names\n * in the Map call setAttributes(...)\n */\n boolean orgExists = false;\n String subOrgDN = normalizeDN(subOrgName, orgDN);\n try {\n // Check if realm exists, this throws SMSException\n // if realm does not exist\n // This is to avoid duplicate creation of realms.\n new OrganizationConfigManager(token, subOrgDN);\n SMSEntry.debug.error(\"OrganizationConfigManager::\"\n + \"createSubOrganization() \" + \"Realm Already Exists.. \"\n + subOrgDN);\n orgExists = true;\n } catch (SMSException smse) {\n // Realm does not exist, create it\n if (SMSEntry.debug.messageEnabled()) {\n SMSEntry.debug.message(\"OrganizationConfigManager::\"\n + \"createSubOrganization() \"\n + \"New Realm, creating realm: \" + subOrgName + \"-\"\n + smse);\n }\n }\n Object args[] = { subOrgName };\n if (orgExists) {\n throw (new SMSException(IUMSConstants.UMS_BUNDLE_NAME,\n \"sms-organization_already_exists1\",\n args));\n }\n StringTokenizer st =\n new StringTokenizer(specialCharsString, SEPERATOR);\n while (st.hasMoreTokens()) {\n String obj = (String) st.nextToken();\n if (subOrgName.indexOf(obj) > -1) {\n SMSEntry.debug.error(\"OrganizationConfigManager::\"+\n \"createSubOrganization() : Invalid realm name: \"+\n subOrgName);\n SMSEntry.debug.error(\"OrganizationConfigManager::\"+\n \"createSubOrganization() : Detected invalid chars: \"+obj);\n Object args1[] = {subOrgName};\n throw (new SMSException(IUMSConstants.UMS_BUNDLE_NAME,\n SMSEntry.bundle.getString(\"sms-invalid-org-name\"),args1));\n }\n }\n \n // If in legacy mode or (realm mode and copy org enabled)\n // Create the AMSDK organization first\n if ((coexistMode) || (realmEnabled && isCopyOrgEnabled())) {\n amsdk.createSubOrganization(subOrgName);\n }\n if ((realmEnabled || subOrgDN.toLowerCase().startsWith(\n SMSEntry.SUN_INTERNAL_REALM_PREFIX))\n && getSubOrganizationNames(subOrgName, false).isEmpty()) {\n CreateServiceConfig.createOrganization(token, subOrgDN);\n }\n // Update the attributes\n // If in coexistMode and serviceName is idRepoService\n // the following call sets the attributes to AMSDK organization also.\n OrganizationConfigManager ocm = getSubOrgConfigManager(subOrgName);\n if ((attributes != null) && (!attributes.isEmpty())) {\n for (Iterator svcNames = attributes.keySet().iterator(); svcNames\n .hasNext();) {\n String serviceName = (String) svcNames.next();\n Map svcAttributes = (Map) attributes.get(serviceName);\n if ((svcAttributes != null) && (!svcAttributes.isEmpty())) {\n ocm.setAttributes(serviceName, svcAttributes);\n }\n }\n }\n \n // If in realm mode and not in legacy mode, default services needs\n // to be added.\n if (realmEnabled && !coexistMode) {\n loadDefaultServices(token, ocm);\n }\n \n // If in realm mode and copy org enabled, default services needs\n // to be registered for the newly created org/suborg and the\n // amSDKOrgName/OpenSSO Organization is updated with the\n // new suborg dn.\n if (realmEnabled && isCopyOrgEnabled()) {\n registerSvcsForOrg(subOrgName, subOrgDN);\n OrganizationConfigManager subOrg =\n getSubOrgConfigManager(subOrgName);\n ServiceConfig s =\n subOrg.getServiceConfig(ServiceManager.REALM_SERVICE);\n if (s != null) {\n try {\n Iterator items = s.getSubConfigNames().iterator();\n while (items.hasNext()) {\n ServiceConfig subConfig =\n s.getSubConfig((String) items.next());\n if (subConfig.getSchemaID().equalsIgnoreCase(\n IdConstants.AMSDK_PLUGIN_NAME)) {\n Map amsdkConfig = new HashMap();\n Set vals = new HashSet();\n vals.add(orgNamingAttrInLegacyMode +\n SMSEntry.EQUALS +\n subOrgName + SMSEntry.COMMA + amSDKOrgDN);\n amsdkConfig.put(\"amSDKOrgName\", vals);\n subConfig.setAttributes(amsdkConfig);\n }\n break;\n }\n } catch (SSOException ssoe) {\n SMSEntry.debug.error(\"OrganizationConfigManager::\"+\n \"createSubOrganization:\", ssoe);\n throw (new SMSException(SMSEntry.bundle.getString(\n \"sms-INVALID_SSO_TOKEN\"), \"sms-INVALID_SSO_TOKEN\"));\n }\n }\n }\n \n // Return the newly created organization config manager\n return (ocm);\n }",
"@Override\n\tpublic FileTreeItem getOntologyInputFileFromTextCaptureOutput(AuthenticationToken token, String textCaptureOutput) {\n\t\tFile file = new File(textCaptureOutput);\n\t\tString prefix = file.getName() + \"_output_by_OB_task_\"; //Thomas question\n\t\tString ontologyPath = null;\n\t\tif(file.exists() && file.isDirectory()) {\n\t\t\tfor(File sibling : file.getParentFile().listFiles()) {\n\t\t\t\tif(sibling.getName().startsWith(prefix)) {\n\t\t\t\t\tontologyPath = sibling.getAbsolutePath();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(ontologyPath==null) return null;\n\t\t\n\t\tFile ontologyFile = new File(ontologyPath);\n\t\tif(ontologyFile.exists() && ontologyFile.isDirectory()) {\n\t\t\tfor(File child : ontologyFile.listFiles()) {\n\t\t\t\tif(child.isDirectory())\n\t\t\t\t\treturn null;\n\t\t\t}\n\t\t\t\n\t\t\tString path = ontologyFile.getAbsolutePath();\n\t\t\tFileSource fileSource = null;\n\t\t\tif(path.startsWith(Configuration.fileBase + File.separator + token.getUserId()))\n\t\t\t\tfileSource = FileSource.OWNED;\n\t\t\tif(path.startsWith(Configuration.publicFolder))\n\t\t\t\tfileSource = FileSource.PUBLIC;\n\t\t\tif(path.startsWith(Configuration.fileBase + File.separator) && !path.startsWith(Configuration.fileBase + File.separator + token.getUserId()))\n\t\t\t\tfileSource = FileSource.SHARED;\n\t\t\tFilePathShortener filePathShortener = new FilePathShortener();\n\t\t\tString displayPath = filePathShortener.shorten(path, fileSource, token.getUserId());\n\t\t\treturn createFolderTreeItem(ontologyFile.getName(), getDisplayName(ontologyFile), \n\t\t\t\t\tontologyFile.getAbsolutePath(), displayPath, null, getOwnerUserId(ontologyFile), false, \n\t\t\t\t\tfalse, false, fileSource);\n\t\t}\n\t\treturn null;\n\t}",
"private static String pickRoom(char type) {\n String path = ROOT_ROOM_PATH;\n switch(type) {\n case(LayoutGenerator.START):\n path += START_ROOM_PATH + LayoutGenerator.START;\n break;\n case(LayoutGenerator.FINISH):\n path += FINISH_ROOM_PATH + LayoutGenerator.FINISH;\n break;\n case(LayoutGenerator.TREASURE):\n path += TREASURE_ROOM_PATH + LayoutGenerator.TREASURE;\n break;\n default: // If somehow a weird char is inputted\n case(LayoutGenerator.NORMAL):\n path += NORMAL_ROOM_PATH + LayoutGenerator.NORMAL;\n break;\n case(LayoutGenerator.ENEMY):\n path += ENEMY_ROOM_PATH + LayoutGenerator.ENEMY;\n break;\n case(LayoutGenerator.DOOR):\n path += DOOR_ROOM_PATH + LayoutGenerator.DOOR;\n break;\n case(LayoutGenerator.KEY):\n path += KEY_ROOM_PATH + LayoutGenerator.KEY;\n break;\n\n }\n\n // At this point, the path should be \"src/rooms/[type]/[type char]\"\n // All files start with the char of its type and a number\n\n int numFiles = new File(path.substring(0, path.length() - 2)).listFiles().length;\n Random rand = new Random();\n path += rand.nextInt(numFiles) + \".txt\";\n\n return path;\n }",
"public void createSubDirData() {\n\t\tFile f = new File(getPFDataPath());\n\t\tf.mkdirs();\n\t}",
"public void createSubDirCameraTaken() {\n\t\tFile f = new File(getPFCameraTakenPath());\n\t\tf.mkdirs();\n\t}",
"@Test\n public void createFile(){\n try\n {\n URI uri = new URI(\"http://www.yu.edu/documents/doc390\");//given the complete uri\n String path = uri.getAuthority() + this.disectURI(uri);//get the Path which is www.yu.edu\\documents\n File file = new File(baseDir.getAbsolutePath() + File.separator + path);//make a File with the full class path and with the \"URI Path\"\n Files.createDirectories(file.toPath());//create the directories we didn't have before, ie not apart of the baseDir\n\n File theFile = new File(file.getAbsolutePath() + File.separator + \"doc390.txt\");//create a new File with the document as the last piece\n //wrap in a try because if the file is already there than we don't need to create a file\n if(!theFile.exists())Files.createFile(theFile.toPath());//create this file in the computer\n\n //write to the file -- in the real application this is the writing of the json\n FileWriter fileWriter = new FileWriter(theFile);\n fileWriter.write(\"HaYom sishi BShabbos\");\n fileWriter.flush();\n fileWriter.close();\n\n }\n catch(Exception e){\n e.printStackTrace();\n }\n }",
"public String getConcept() {\n\t\treturn concept;\n\t}",
"public OWLClass getConceptClass(String concept) {\n return loader.getConceptClass(concept);\n }",
"private static String getNamespaceMappings(String atHomeFullPath) {\n\t\tStringBuilder sb = new StringBuilder(512);\n\t\tFile atHome = new File(atHomeFullPath);\n\t\tString dirs[] = atHome.list();\n\t\tfor( String dir : dirs) {\n\t\t\tFile entry = new File(atHome, dir);\n\t\t\tif (entry.isDirectory() && !entry.isHidden())\n\t\t\t\tsb.append(dir).append('=').append(entry.toString()).append(':');\n\t\t}\n\t\tsb.append(\"tmp=\"+ Constants._ENV_AT_BASE_ + Constants._AT_TEMP_FILES_PATH);\n\t\treturn sb.toString();\n\t}",
"NodeRef getSearchTermsFolder();",
"@SuppressWarnings(\"unused\")\n private void setConceptTerminologyId(String conceptId) {\n if (concept == null) {\n concept = new ConceptJpa();\n }\n concept.setTerminologyId(conceptId);\n concept.setTerminology(getTerminology());\n concept.setTerminologyVersion(getTerminologyVersion());\n }",
"Concept getConceptName();",
"void setSystabRegFolderName(String name){\n this.folderName = name + \"\\\\\"; // Append the \\\\ to get inside the folder\n }",
"public void test_hk_04() {\n OntModel m = ModelFactory.createOntologyModel();\n m.getDocumentManager().addAltEntry(\n \"http://jena.hpl.hp.com/testing/ontology/relativenames\",\n \"file:testing/ontology/relativenames.rdf\");\n \n m.read(\"http://jena.hpl.hp.com/testing/ontology/relativenames\");\n assertTrue(\n \"#A should be a class\",\n m.getResource(\"http://jena.hpl.hp.com/testing/ontology/relativenames#A\").canAs(OntClass.class));\n assertFalse(\n \"file: #A should not be a class\",\n m.getResource(\"file:testing/ontology/relativenames.rdf#A\").canAs(OntClass.class));\n }",
"public static void getRoomsHTML()\n\t{\n\t\t//get all the concept net entries that isa room\n\t\ttry\n\t\t{\n\t\t\tWebClient checkIP = new WebClient(\"http://conceptnet.io/c/en/room/n?rel=/r/IsA&limit=100000\");\n\t\t\tcheckIP.post(\"\");\n\t\t\tlong startIP = System.currentTimeMillis();\n\t\t\t\n\t\t\tfinal int OUTSIDE = 0;\n\t\t\tfinal int INEDGESTART = 1;\n\t\t\tfinal int INEDGEREL = 2;\n\t\t\tfinal int INEDGEEND = 3;\n\t\t\tint state = OUTSIDE;\n\t\t\t\n\t\t\tArrayList<ArrayList<String> > checkq = new ArrayList<ArrayList<String> >();\n\t\t\twhile(true)\n\t\t\t{\n\t\t\t\tcheckIP.getQueue(checkq);\n\t\t\t\tboolean processedsomething = false;\n\t\t\t\tfor (int i = 0; i < checkq.size(); i++) \n\t\t\t\t{\n\t\t\t\t\tArrayList<String> resultlines = checkq.remove(i);\n\t\t\t\t\t\n\t\t\t\t\tString x = null;\n\t\t\t\t\tString relation = null;\n\t\t\t\t\tString relationweight = null;\n\t\t\t\t\tString y = null;\n\n\t\t\t\t\tfor(int li=0;li<resultlines.size();li++)\n\t\t\t\t\t{\t\t\n\t\t\t\t\t\tprocessedsomething = true;\n\t\t\t\t\t\t\n\t\t\t\t\t\tString line = resultlines.get(li);\n\t\t\t\t\t\tline = line.trim();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(state==OUTSIDE)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(line.startsWith(\"<td class=\\\"edge-start\\\">\"))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tstate = INEDGESTART;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\tif(state==INEDGESTART)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(line.startsWith(\"<a href=\\\"\"))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tline = line.substring(\"<a href=\\\"\".length());\n\t\t\t\t\t\t\t\tint ind = line.indexOf(\"\\\"\");\n\t\t\t\t\t\t\t\tline = line.substring(0,ind);\n\t\t\t\t\t\t\t\tx = line;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\tif(line.startsWith(\"<td class=\\\"edge-rel\\\">\"))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tstate = INEDGEREL;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\tif(state==INEDGEREL)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(line.startsWith(\"― <span class=\\\"rel-label\\\">\"))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tline = line.substring(\"― <span class=\\\"rel-label\\\">\".length());\n\t\t\t\t\t\t\t\tint ind = line.indexOf(\"<\");\n\t\t\t\t\t\t\t\tline = line.substring(0,ind);\n\t\t\t\t\t\t\t\trelation = line;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\tif(line.startsWith(\"Weight: \"))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tline = line.substring(\"Weight: \".length());\n\t\t\t\t\t\t\t\trelationweight = line;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\tif(line.startsWith(\"<td class=\\\"edge-end\\\">\"))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tstate = INEDGEEND;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\tif(state==INEDGEEND)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//if(line.startsWith(\"<a href=\\\"\"))\n\t\t\t\t\t\t\t//Grab the supplementary definition so we get the sense of the word i.e. a noun not a verb\n\t\t\t\t\t\t\tif(line.startsWith(\"(<a href=\\\"\"))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tline = line.substring(\"(<a href=\\\"\".length());\n\t\t\t\t\t\t\t\tint ind = line.indexOf(\"\\\"\");\n\t\t\t\t\t\t\t\tline = line.substring(0,ind);\n\t\t\t\t\t\t\t\ty = line;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//can now process the edge information\n\t\t\t\t\t\t\t\t//we only want the things that are a room not things a room is\n\t\t\t\t\t\t\t\tif(y.equalsIgnoreCase(\"/c/en/room/n\"))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tSystem.out.println(x+\" \"+relation+\" \"+y);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\tif(line.startsWith(\"</sup>\"))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tstate = OUTSIDE;\n\t\t\t\t\t\t\t}\n\n\t\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\tif(processedsomething)\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tThread.sleep(16);\n\t\t\t\t\n\t\t\t\tlong time = System.currentTimeMillis();\n//\t\t\t\tif((time-startIP)>1000)\n//\t\t\t\t{\n//\t\t\t\t\t//timeout\n//\t\t\t\t\tbreak;\n//\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\t\n\t\t}\n\t}",
"public static void main(String[] args) {\n\n File file = new File(\"./src/cat.txt\");\n System.out.println(file.exists());\n System.out.println(file.getName());\n System.out.println(file.getAbsolutePath());\n System.out.println(file.isDirectory());\n System.out.println(file.isFile());\n System.out.println(file.length());\n System.out.println(file.renameTo(new File(\"cat.txt\")));\n\n File folder = new File(\"./cat.txt\");\n boolean mkdir = folder.mkdir();\n\n File folderInFolder = new File(\"./folder/unAltFolder\");\n folderInFolder.mkdirs();\n\n System.out.println(file.getParent());\n File srcFile = new File(\"./src/main\");\n File[] filesFromSrc = srcFile.listFiles();\n\n for (File fileSrc : filesFromSrc) {\n System.out.println(fileSrc);\n }\n\n }",
"private int parseOWL(File file) throws FileNotFoundException, BadElementStructureException {\n int nbElement = 0;\n JenaIOHandler jenaIOHandler = new JenaIOHandler(null, BioPAXLevel.L2);\n Model model;\n try {\n model = jenaIOHandler.convertFromOWL(new FileInputStream(file));\n Set<pathway> pathways = model.getObjects(pathway.class);\n\n //Gets all table column names\n ArrayList<String> contextNames = this.getToolResource().getResourceStructure().getContextNames();\n Element element;\n Structure eltStructure = new Structure(contextNames);\n\n for (pathway mypathway : pathways) {\n\n //logger.info(\"NAME: \"+ mypathway.getNAME());\n eltStructure.putContext(contextNames.get(0), mypathway.getNAME());\n\n //Organism Name\n String organismName = EMPTY_STRING;\n if (mypathway.getORGANISM() != null) {\n organismName = mypathway.getORGANISM().getNAME();\n\n if (organismName != null && organismName.trim().length() > 0) {\n organismName = resourceUpdateService.mapTermsToVirtualLocalConceptIDs(organismName, PC_ONTOIDS[1], null);\n // if mapping concepts are null or empty then log message for it.\n if (organismName == null || organismName.trim().length() == 0) {\n logger.error(\"Cannot map Organism '\" + mypathway.getORGANISM().getNAME() + \"' to local concept id.\");\n\n }\n }\n\n }\n //logger.info(\"ORGANISM: \"+ organismName);\n eltStructure.putContext(contextNames.get(1), organismName);\n\n //Comment\n String comments = mypathway.getCOMMENT().toString().substring(1, mypathway.getCOMMENT().toString().length() - 1);\n //logger.info(\"COMMENT: \"+comments);\n eltStructure.putContext(contextNames.get(2), comments);\n\n //path id or local element id\n String[] id = mypathway.getRDFId().split(\"\\\\-\");\n //logger.info(\"ID: \"+ id[id.length-1].trim());\n element = new Element(id[id.length - 1].trim(), eltStructure);\n\n //updating data into OBR_PC_ET table\n if (resourceUpdateService.addElement(element)) {\n nbElement++;\n }\n }\n } catch (FileNotFoundException ex) {\n throw ex;\n } catch (BadElementStructureException ex1) {\n throw ex1;\n }\n return nbElement;\n }",
"public File getWorldFolder(String worldName);",
"private void createFolders() {\n File f = new File(System.getProperty(\"user.dir\") + \"/chatimages/\");\n if (!f.exists()){\n f.mkdir();\n }\n }",
"public void processOWLDefinition(ModuleItem pkg) throws SerializationException, IOException{\n ModelCompiler jarCompiler = ModelCompilerFactory.newModelCompiler(ModelFactory.CompileTarget.JAR);\n JarModel compiledJarModel = (JarModel) jarCompiler.compile(ontoModel);\n byte[] jarBytes = compiledJarModel.buildJar().toByteArray();\n \n //Get the Working-Set from onto-model\n ModelCompiler wsCompiler = ModelCompilerFactory.newModelCompiler(ModelFactory.CompileTarget.WORKSET);\n WorkingSetModel compiledWSModel = (WorkingSetModel) wsCompiler.compile(ontoModel);\n SemanticWorkingSetConfigData semanticWorkingSet = compiledWSModel.getWorkingSet();\n \n //Get the Fact Types DRL from onto-model\n ModelCompiler drlCompiler = ModelCompilerFactory.newModelCompiler(ModelFactory.CompileTarget.DRL);\n DRLModel drlModel = (DRLModel)drlCompiler.compile(ontoModel);\n \n //Get the Fact Types XSD from onto-model\n ModelCompiler xsdCompiler = ModelCompilerFactory.newModelCompiler(ModelFactory.CompileTarget.XSD);\n XSDModel xsdModel = (XSDModel)xsdCompiler.compile(ontoModel);\n \n //convert from semantic to guvnor model\n WorkingSetConfigData workingSetConfigData = this.convertSemanticWorkingSetConfigData(semanticWorkingSet);\n \n //create a second Working-Set for the Configuration (Cohort) Facts\n WorkingSetConfigData cohortWorkingSetConfigData = this.convertSemanticWorkingSetConfigData(\"Configuration Facts\", semanticWorkingSet);\n \n //create categories from working-set data\n this.createCategoryTreeFromWorkingSet(workingSetConfigData);\n \n //create the Jar Model\n this.createJarModelAsset(pkg, jarBytes);\n \n //create the working-set assets\n this.createWSAsset(pkg, workingSetConfigData);\n this.createWSAsset(pkg, cohortWorkingSetConfigData);\n \n //store the fact type drl as a generic resource\n this.storeFactTypeDRL(pkg, drlModel);\n \n //create and store the Fact Type Descriptor\n this.createFactTypeDescriptor(pkg, xsdModel);\n }",
"private Resolution getVocabularyConceptResolution() {\r\n HttpServletRequest httpRequest = getContext().getRequest();\r\n String url = httpRequest.getRequestURL().toString();\r\n // String query = httpRequest.getQueryString();\r\n \r\n String[] parameters = StringUtils.split(StringUtils.substringAfter(url, \"/vocabulary/\"), \"/\");\r\n \r\n if (parameters.length >= 2) {\r\n if (!RESERVED_VOCABULARY_EVENTS.contains(parameters[1])) {\r\n RedirectResolution resolution = new RedirectResolution(VocabularyConceptActionBean.class, \"view\");\r\n resolution.addParameter(\"vocabularyFolder.identifier\", parameters[0]);\r\n resolution.addParameter(\"vocabularyConcept.identifier\", parameters[1]);\r\n resolution.addParameter(\"vocabularyFolder.workingCopy\", vocabularyFolder.isWorkingCopy());\r\n \r\n return resolution;\r\n }\r\n }\r\n \r\n return null;\r\n }",
"public void setConcept(Concept concept) {\n\t\tthis.concept = concept;\n\t}",
"private void createDirectories()\r\n\t{\r\n\t\t// TODO: Do some checks here\r\n\t\tFile toCreate = new File(Lunar.OUT_DIR + Lunar.PIXEL_DIR\r\n\t\t\t\t\t\t\t\t\t+ Lunar.PROCESSED_DIR);\r\n\t\ttoCreate.mkdirs();\r\n\t\ttoCreate = null;\r\n\t\ttoCreate = new File(Lunar.OUT_DIR + Lunar.ROW_DIR + Lunar.PROCESSED_DIR);\r\n\t\ttoCreate.mkdirs();\r\n\t\ttoCreate = null;\r\n\t}",
"protected static void createDirectory(MasterProcedureEnv env, NamespaceDescriptor nsDescriptor)\n throws IOException {\n createDirectory(env.getMasterServices().getMasterFileSystem(), nsDescriptor);\n }",
"public void make_folder(String folder) throws Exception{\n\t\tFile file = new File(folder);\n\t\tfile.mkdirs();\n\t}",
"private void addDoctorToRequirement(NbaTXLife nbaTXLife, NbaRequirement nbaReq, RequirementInfo reqInfo) {\n \tParty doctor; //NBA224\n RequirementInfoExtension reqInfoExt = NbaUtils.getFirstRequirementInfoExtension(reqInfo);\n if (reqInfoExt == null) {\n OLifEExtension olifeExt = NbaTXLife.createOLifEExtension(NbaOliConstants.EXTCODE_REQUIREMENTINFO);\n reqInfo.addOLifEExtension(olifeExt);\n reqInfoExt = olifeExt.getRequirementInfoExtension();\n reqInfoExt.setActionAdd();\n } else {\n reqInfoExt.setActionUpdate();\n }\n // Begin NBA224\n String partyId = nbaReq.getDrPartyId();\n long drRelationRole = nbaReq.getDrPartyType() == NbaOliConstants.OLI_PT_PERSON ? NbaOliConstants.OLI_REL_PHYSICIAN : NbaOliConstants.OLI_REL_MEDPROVIDER; //ALS3872\n boolean isExistingDoctor = partyId.indexOf(NEW_DOCTOR_PARTY) == -1;\n if (partyId != null && isExistingDoctor ) {\n\t\t\treqInfoExt.setPhysicianPartyID(partyId);\n\t\t\tdoctor = nbaTXLife.getParty(partyId).getParty();\n\t\t\tnbaTXLife.createRelation(reqInfo, doctor, drRelationRole);//ALS3872\n\t\t\tNbaRequirementUtils.updateDoctorForRequirement(doctor, nbaReq, getNbaOLifEId(nbaTXLife));\n\t\t\treturn;\n\t\t} \n \tif(getNewDoctorMap().containsKey(partyId)) {\n \t\tdoctor = (Party)getNewDoctorMap().get(partyId);\n \t\tnbaTXLife.createRelation(reqInfo, doctor, drRelationRole);//ALS3872\n reqInfoExt.setPhysicianPartyID(doctor.getId());\n return;\n \t}\n // End NBA224\n OLifE olife = nbaTXLife.getOLifE();\n doctor = NbaRequirementUtils.createDoctorForRequirement(nbaReq, getNbaOLifEId(nbaTXLife)); //NBA224\n olife.addParty(doctor);\n nbaTXLife.createRelation(reqInfo, doctor, drRelationRole);//ALS3872\n reqInfoExt.setPhysicianPartyID(doctor.getId());\n olife.setActionUpdate();\n getNewDoctorMap().put(partyId, doctor); //NBA224\n }",
"public CollectFolderExample() {\n oredCriteria = new ArrayList<Criteria>();\n }",
"@BeforeClass(groups ={\"All\"})\n\tpublic void createFolder() {\n\t\tdciFunctions = new DCIFunctions();\n\t\ttry {\n\t\t\tif(suiteData.getSaasApp().equalsIgnoreCase(\"Salesforce\")){\n\t\t\t\tLogger.info(\"No need to create folder for salesforce\");\n\t\t\t}else{\n\t\t\t\tUserAccount account = dciFunctions.getUserAccount(suiteData);\n\t\t\t\tUniversalApi universalApi = dciFunctions.getUniversalApi(suiteData, account);\n\t\t\t\tfolderInfo = dciFunctions.createFolder(universalApi, suiteData, \n\t\t\t\t\t\tDCIConstants.DCI_FOLDER+uniqueId);\n\t\t\t}\n\t\t} catch (Exception ex) {\n\t\t\tLogger.info(\"Issue with Create Folder Operation \" + ex.getLocalizedMessage());\n\t\t}\n\t}",
"java.lang.String getConceptId();",
"public static void createRequiredDirectories()\n\t{\n\n\t\t/*Input_Files dir creation */\n\t\tFile inpDir = new File(INPUT_DIR_NAME);\n\n\t\t// if the directory does not exist, create it\n\t\tif (!inpDir.exists())\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tinpDir.mkdir();\n\t\t\t} catch (Exception e)\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tLOG_WRITER.write(DIR_CREATION_ERROR + INPUT_DIR_NAME + \"\\nError : \"\n\t\t\t\t\t\t\t+ e.getMessage());\n\t\t\t\t\tSystem.out.println(DIR_CREATION_ERROR + INPUT_DIR_NAME + \"\\nError : \"\n\t\t\t\t\t\t\t+ e.getMessage());\n\t\t\t\t} catch (IOException e1)\n\t\t\t\t{\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t}\n\n\t\t/*Logs dir creation */\n\t\tFile logsDir = new File(LOGS_DIR_NAME);\n\n\t\t// if the directory does not exist, create it\n\t\tif (!logsDir.exists())\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tlogsDir.mkdir();\n\t\t\t} catch (Exception e)\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tLOG_WRITER.write(DIR_CREATION_ERROR + LOGS_DIR_NAME + \"\\nError : \"\n\t\t\t\t\t\t\t+ e.getMessage());\n\t\t\t\t\tSystem.out.println(DIR_CREATION_ERROR + LOGS_DIR_NAME + \"\\nError : \"\n\t\t\t\t\t\t\t+ e.getMessage());\n\t\t\t\t} catch (IOException e1)\n\t\t\t\t{\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t}\n\t}",
"public static void createDocumentDirectory( Path docDir,\n FileSystem fs )\n throws IOException {\n FileSystemHandler fsHandler = new FileSystemHandler( fs );\n\n\n // Create original.txt file\n String original = \"Hello, I'm an original.txt file.\"\n + \"\\n\\nLorem ipsum dolor sit amet, consectetur adipiscing \"\n + \"elit. Nullam eu mauris odio. Vivamus id fermentum\"\n + \"elit. Quisque placerat arcu in nibh tincidunt \"\n + \"consectetur.\\n\\n\"\n + getRandomString() + \"\\n\\n\" + getRandomString();\n Path originalPath = new Path( docDir, \"original.txt\" );\n fsHandler.writeFileToHDFS( original, originalPath );\n\n // Create annotation files\n for( AnnotationMode mode : AnnotationMode.values() ) {\n String annotation = \"Hello, I'm an annotation of type \"\n + mode.toString()\n + \"\\n\\nLorem ipsum dolor sit amet, consectetur \"\n + \"adipiscing elit. Nullam eu mauris odio. Vivamus id \"\n + \"fermentum elit. Quisque placerat arcu in nibh tincidunt \"\n + \"consectetur.\\n\";\n Path annotationPath = new Path( docDir,\n mode.toString() + \".txt\" );\n fsHandler.writeFileToHDFS( annotation, annotationPath );\n }\n }",
"public DocumentListEntry createFolder(String folderName) throws MalformedURLException, IOException, ServiceException;",
"private Collection<ConceptLabel> createConceptLabels(Concept concept, int offset) {\n\t\t//int offset = concept.getOffset();\n\t\tList<ConceptLabel> labels = new ArrayList<ConceptLabel>();\n\t\t// add annotation the new way\n\t\tfor(Annotation a: concept.getAnnotations()){\n\t\t\tConceptLabel lbl = new ConceptLabel(a.getText(), offset + a.getOffset());\n\t\t\tlbl.setConcept(concept);\n\t\t\tlbl.setReportPanel(reportInterface);\n\t\t\tlbl.setColor(Color.black);\n\t\t\tlabels.add(lbl);\n\t\t}\n\t\t\n\t\t\n\t\treturn labels;\n\t}",
"public abstract void newSpeechConcepts(long ms, int n);",
"private void makeFolder(File folderNameFile) {\n\t\tfolderNameFile.mkdir();\n\t}",
"public static void getRoomsAPI()\n\t{\n\t\ttry\n\t\t{\n\t\t\tWebClient checkIP = new WebClient(\"http://api.conceptnet.io/c/en/room/n?offset=0&limit=1000\");\n\t\t\tcheckIP.post(\"\");\n\t\t\tlong startIP = System.currentTimeMillis();\n\t\t\t\n\t\t\tArrayList<ArrayList<String> > checkq = new ArrayList<ArrayList<String> >();\n\t\t\twhile(true)\n\t\t\t{\n\t\t\t\tcheckIP.getQueue(checkq);\n\t\t\t\tboolean processedsomething = false;\n\t\t\t\tfor (int i = 0; i < checkq.size(); i++) \n\t\t\t\t{\n\t\t\t\t\tArrayList<String> resultlines = checkq.remove(i);\n\t\t\t\t\t\n\t\t\t\t\tString x = null;\n\t\t\t\t\tString relation = null;\n\t\t\t\t\tString relationweight = null;\n\t\t\t\t\tString y = null;\n\n\t\t\t\t\tfor(int li=0;li<resultlines.size();li++)\n\t\t\t\t\t{\t\t\n\t\t\t\t\t\tprocessedsomething = true;\n\t\t\t\t\t\t\n\t\t\t\t\t\tString line = resultlines.get(li);\n\t\t\t\t\t\tline = line.trim();\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(line.startsWith(\"\\\"@id\\\": \\\"/a/[\"))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tline = line.substring(\"\\\"@id\\\": \\\"/a/[\".length());\n\t\t\t\t\t\t\tint ind = line.indexOf(\",\");\n\t\t\t\t\t\t\trelation = line.substring(0,ind);\n\t\t\t\t\t\t\tline = line.substring(ind+1);\n\t\t\t\t\t\t\tind = line.indexOf(\",\");\n\t\t\t\t\t\t\tx = line.substring(0,ind);\n\t\t\t\t\t\t\tline = line.substring(ind+1);\n\t\t\t\t\t\t\tind = line.indexOf(\"]\");\n\t\t\t\t\t\t\ty = line.substring(0,ind);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(line.startsWith(\"\\\"weight\\\": \"))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\trelationweight = line.substring(\"\\\"weight\\\": \".length());\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//can now process the edge information\n\t\t\t\t\t\t\t//we only want the things that are a room not things a room is\n\t\t\t\t\t\t\tif(y.equalsIgnoreCase(\"c/en/room/n\"))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tSystem.out.println(x+\" \"+relation+\" \"+y);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif(processedsomething)\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tThread.sleep(16);\n\t\t\t\t\n\t\t\t\tlong time = System.currentTimeMillis();\n//\t\t\t\tif((time-startIP)>1000)\n//\t\t\t\t{\n//\t\t\t\t\t//timeout\n//\t\t\t\t\tbreak;\n//\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\t\n\t\t}\n\t}",
"public void test_sb_01() {\n OntModel model= ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM_RDFS_INF, null);\n \n Resource result= null;\n Resource nullValueForResourceType= null;\n \n result= model.createOntResource( OntResource.class, nullValueForResourceType, \"http://www.somewhere.com/models#SomeResourceName\" );\n assertNotNull( result );\n }",
"NodeRef getCurrentSearchTermsFolder(NodeRef searchTermsFolder);",
"private static void createProjectsFolders() throws IOException {\n /*\n * .sagrada/\n * logs/\n */\n File logFolder = new File(Constants.Paths.LOG_FOLDER.getAbsolutePath());\n\n if (!logFolder.isDirectory() && !logFolder.mkdirs()) {\n throw new IOException(\"Could not directory structure: \" + (Constants.Paths.LOG_FOLDER.getAbsolutePath()));\n }\n }",
"String getAnnotationFile() {\n File imgFile = photos[fileIndex];\n String parentDir = imgFile.getParent();\n String fileName = imgFile.getName();\n String annotationName = fileName.replace(fileName.substring(fileName.lastIndexOf('.') + 1), \"xml\");\n File annotationDir = new File(parentDir.replace(\"images\", \"annotations\"));\n if (!annotationDir.exists()) {\n annotationDir.mkdirs();//create dir if none\n }\n return annotationDir.getAbsolutePath() + File.separator + annotationName;\n }",
"ActivityConcept createActivityConcept();",
"private static String stripIRI (String inputConcept) {\n\n\t\tString returnedConceptName = null;\n\n\t\tif (inputConcept.contains(\"http://manusquare.project.eu/industrial-manusquare#\")) {\n\t\t\treturnedConceptName = inputConcept.replaceAll(\"http://manusquare.project.eu/industrial-manusquare#\", \"\");\n\t\t} else if (inputConcept.contains(\"http://manusquare.project.eu/core-manusquare#\")) {\n\t\t\treturnedConceptName = inputConcept.replaceAll(\"http://manusquare.project.eu/core-manusquare#\", \"\");\n\t\t} else {\n\t\t\treturnedConceptName = inputConcept;\n\t\t}\n\n\t\treturn returnedConceptName;\n\n\t}",
"UMLDomainConcept createUMLDomainConcept();",
"@Override\n\tpublic String getGANModelDirectory() {\n\t\treturn GANProcess.PYTHON_BASE_PATH+\"LodeRunnerGAN\";\n\t}",
"private void findConceptsForInstances() {\n\t\tSet<String> temp = new HashSet<String>();\n\n\t\tfor (String s : taskInput)\n\t\t\ttemp.add(taxonomyMap.get(s).parents.get(0).value);\n\t\ttaskInput.clear();\n\t\ttaskInput.addAll(temp);\n\n\t\ttemp.clear();\n\t\tfor (String s : taskOutput)\n\t\t\ttemp.add(taxonomyMap.get(s).parents.get(0).value);\n\t\ttaskOutput.clear();\n\t\ttaskOutput.addAll(temp);\n\n\t\tfor (Node s : serviceMap.values()) {\n\t\t\ttemp.clear();\n\t\t\tSet<String> inputs = s.getInputs();\n\t\t\tfor (String i : inputs)\n\t\t\t\ttemp.add(taxonomyMap.get(i).parents.get(0).value);\n\t\t\tinputs.clear();\n\t\t\tinputs.addAll(temp);\n\n\t\t\ttemp.clear();\n\t\t\tSet<String> outputs = s.getOutputs();\n\t\t\tfor (String o : outputs)\n\t\t\t\ttemp.add(taxonomyMap.get(o).parents.get(0).value);\n\t\t\toutputs.clear();\n\t\t\toutputs.addAll(temp);\n\t\t}\n\t}",
"private void _generateAFaculty_a(int type, int index, String id) {\n int indexInFaculty;\n int courseNum;\n int courseIndex;\n boolean dup;\n CourseInfo course;\n\n indexInFaculty = instances_[CS_C_FACULTY].count - 1;\n\n writer_.addProperty(CS_P_NAME, _getRelativeName(type, index), false);\n if(globalVersionTrigger){\n \twriter_log.addPropertyInstance(id, ontology+\"#name\", _getRelativeName(type, index), false ); \t\n }\n //undergradutate courses\n courseNum = _getRandomFromRange(FACULTY_COURSE_MIN, FACULTY_COURSE_MAX);\n for (int i = 0; i < courseNum; i++) {\n courseIndex = _AssignCourse(indexInFaculty);\n writer_.addProperty(CS_P_TEACHEROF, _getId(CS_C_COURSE, courseIndex), true);\n if(globalVersionTrigger){\n \twriter_log.addPropertyInstance(id, ontology+\"#teacherOf\", _getId(CS_C_COURSE, courseIndex), true ); \t\n }\n }\n //gradutate courses\n courseNum = _getRandomFromRange(FACULTY_GRADCOURSE_MIN, FACULTY_GRADCOURSE_MAX);\n for (int i = 0; i < courseNum; i++) {\n courseIndex = _AssignGraduateCourse(indexInFaculty);\n writer_.addProperty(CS_P_TEACHEROF, _getId(CS_C_GRADCOURSE, courseIndex), true);\n if(globalVersionTrigger){\n \twriter_log.addPropertyInstance(id, ontology+\"#teacherOf\", _getId(CS_C_GRADCOURSE, courseIndex), true ); \t\n }\n }\n for (int i = 0; i < courseNum; i++) {\n courseIndex = _AssignWebCourse(indexInFaculty);\n writer_.addProperty(CS_P_TEACHEROF, _getId(CS_C_WEBCOURSE, courseIndex), true);\n if(globalVersionTrigger){\n \twriter_log.addPropertyInstance(id, ontology+\"#teacherOf\", _getId(CS_C_WEBCOURSE, courseIndex), true ); \t\n }\n }\n //person properties\n String n = _getId(CS_C_UNIV, random_.nextInt(UNIV_NUM));\n writer_.addProperty(CS_P_UNDERGRADFROM, CS_C_UNIV, n);\n if(globalVersionTrigger){\n \twriter_log.addPropertyInstance(id, ontology+\"#undergraduateDegreeFrom\", n, true ); \t\n }\n n = _getId(CS_C_UNIV, random_.nextInt(UNIV_NUM));\n writer_.addProperty(CS_P_GRADFROM, CS_C_UNIV,\n n);\n if(globalVersionTrigger){\n \twriter_log.addPropertyInstance(id, ontology+\"#mastersDegreeFrom\", n, true ); \t\n }\n n = _getId(CS_C_UNIV, random_.nextInt(UNIV_NUM));\n writer_.addProperty(CS_P_DOCFROM, CS_C_UNIV,\n n);\n if(globalVersionTrigger){\n \twriter_log.addPropertyInstance(id, ontology+\"#doctoralDegreeFrom\", n, true ); \t\n }\n writer_.addProperty(CS_P_WORKSFOR,\n _getId(CS_C_DEPT, instances_[CS_C_DEPT].count - 1), true);\n if(globalVersionTrigger){\n \twriter_log.addPropertyInstance(id, ontology+\"#worksFor\", _getId(CS_C_DEPT, instances_[CS_C_DEPT].count - 1), true ); \t\n }\n writer_.addProperty(CS_P_EMAIL, _getEmail(type, index), false);\n if(globalVersionTrigger){\n \twriter_log.addPropertyInstance(id, ontology+\"#email\", _getEmail(type, index), false ); \t\n }\n writer_.addProperty(CS_P_TELEPHONE, \"xxx-xxx-xxxx\", false);\n if(globalVersionTrigger){\n \twriter_log.addPropertyInstance(id, ontology+\"#telephone\", \"xxx-xxx-xxxx\", false ); \t\n }\n }",
"@Override\n protected NodeInfo createDirectoryEntry(NodeInfo parentEntry, Path dir) throws IOException {\n return drive.createFolder(parentEntry.getId(), toFilenameString(dir));\n }",
"WithCreate withFolderPath(String folderPath);",
"public static void main(String[] args) {\n\t\t\r\n\t\tFile f=new File(\"C:\\\\Users\\\\DELL\\\\Desktop\\\\\",\"CheckFolder\");\r\n\t\t\r\n\t\tf.mkdir();\r\n\t\t\r\n\t\tSystem.out.println(f.isDirectory());\r\n\t\t\r\n\t\tSystem.out.println(f.getName());\r\n\t\t\r\n\t\tSystem.out.println(f.getParent());\r\n\t\t\r\n\t\t\r\n\t\t\r\n\r\n\t}",
"@Override\n public void populate(GDataConf conf, G g) throws SLIB_Exception {\n\n String concept_file = (String) conf.getParameter(ARG_CONCEPT_FILE);\n String relationship_file = (String) conf.getParameter(ARG_RELATIONSHIP_FILE);\n String prefix = (String) conf.getParameter(ARG_PREFIX);\n\n if (conf.existsParam(ARG_LOAD_INACTIVE_CONCEPTS)) {\n String load_inactive_concepts = conf.getParameter(ARG_LOAD_INACTIVE_CONCEPTS).toString();\n\n if (load_inactive_concepts.equalsIgnoreCase(\"true\")) {\n LOAD_ONLY_ACTIVE_CONCEPTS = false;\n }\n }\n\n if (conf.existsParam(ARG_LOAD_INACTIVE_RELATIONSHIPS)) {\n String load_inactive_relationships = conf.getParameter(ARG_LOAD_INACTIVE_RELATIONSHIPS).toString();\n\n if (load_inactive_relationships.equalsIgnoreCase(\"true\")) {\n LOAD_ONLY_ACTIVE_RELATIONSHIPS = false;\n }\n }\n\n logger.info(\"-------------------------------------\");\n logger.info(\"Loading SNOMED-CT [RF2] \");\n logger.info(\"-------------------------------------\");\n logger.info(\"Concept file: \" + concept_file);\n logger.info(\"Relationship file: \" + relationship_file);\n\n if (concept_file == null) {\n throw new SLIB_Ex_Critic(\"Please specify a file containing the concept specification, argument \" + ARG_CONCEPT_FILE);\n }\n if (relationship_file == null) {\n throw new SLIB_Ex_Critic(\"Please specify a file containing the relationship specification, argument \" + ARG_RELATIONSHIP_FILE);\n }\n\n if (prefix == null && g.getURI() != null) {\n prefix = g.getURI().getNamespace();\n }\n\n logger.info(\"Loading concepts\");\n\n DateFormat formatter = new SimpleDateFormat(\"yyyyMMdd\");\n Map<String, ConceptSnomedCT> concepts = new HashMap<String, ConceptSnomedCT>();\n\n FileInputStream fstream;\n try {\n fstream = new FileInputStream(concept_file);\n\n DataInputStream in = new DataInputStream(fstream);\n BufferedReader br = new BufferedReader(new InputStreamReader(in));\n\n String line;\n String[] data;\n boolean header = true;\n\n while ((line = br.readLine()) != null) {\n\n if (header) {\n header = false;\n continue;\n }\n\n data = p_tab.split(line);\n\n Date date = formatter.parse(data[CONCEPT_DATE]);\n\n if (concepts.containsKey(data[CONCEPT_ID])) {\n ConceptSnomedCT cExists = concepts.get(data[CONCEPT_ID]);\n\n if (cExists.date.before(date)) { // the current specification is more recent than the other loaded, we alsways consider the last one\n ConceptSnomedCT newConcept = new ConceptSnomedCT(data[CONCEPT_ID], date, data[CONCEPT_ACTIVE].trim().equals(\"1\"));\n concepts.put(data[CONCEPT_ID], newConcept);\n }\n // else do nothing the current concept is obsolete compared to the one we already strore\n } else {\n ConceptSnomedCT concept = new ConceptSnomedCT(data[CONCEPT_ID], date, data[CONCEPT_ACTIVE].trim().equals(\"1\"));\n concepts.put(data[CONCEPT_ID], concept);\n }\n\n }\n in.close();\n\n long loaded = 0;\n\n for (ConceptSnomedCT concept : concepts.values()) {\n\n if (!LOAD_ONLY_ACTIVE_CONCEPTS || concept.active) {\n URI cURI = repo.getURI(prefix,concept.id);\n conceptMap.put(concept.id, cURI);\n loaded++;\n }\n }\n\n logger.info(\"Number of activeconcepts loaded \" + loaded + \" on \"+concepts.size()+\" concepts\"); \n logger.info(\"Relationship file: \" + relationship_file);\n\n in = new DataInputStream(new FileInputStream(relationship_file));\n br = new BufferedReader(new InputStreamReader(in));\n\n Map<String, RelationshipSnomedCT> relationships = new HashMap<String, RelationshipSnomedCT>();\n\n\n header = true;\n long c = 0;\n\n\n logger.info(\"Loading relationships information... please wait\");\n // Load the relationships information\n while ((line = br.readLine()) != null) {\n\n if (header) {\n header = false;\n continue;\n }\n c++;\n if (c % 100000 == 0) {\n logger.debug(\"Processed \" + c + \"\\t\" + relationships.size() + \" relationships information loaded\");\n }\n data = p_tab.split(line);\n\n Date date = formatter.parse(data[RELATIONSHIP_DATE]);\n\n if (relationships.containsKey(data[RELATIONSHIP_ID])) {\n RelationshipSnomedCT rExists = relationships.get(data[RELATIONSHIP_ID]);\n\n if (!rExists.date.after(date)) { // the current specification is more recent than the other loaded, we only consider the last one\n RelationshipSnomedCT newRelationship = new RelationshipSnomedCT(data[RELATIONSHIP_SOURCE_CONCEPT_ID], data[RELATIONSHIP_TARGET_CONCEPT_ID], data[RELATIONSHIP_TYPE_ID], date, data[RELATIONSHIP_ACTIVE].trim().equals(\"1\"));\n // we replace the older\n relationships.put(data[RELATIONSHIP_ID], newRelationship);\n }\n // else do nothing the current relationship is obsolete regarding th one we already strore\n } else {\n RelationshipSnomedCT newRelationship = new RelationshipSnomedCT(data[RELATIONSHIP_SOURCE_CONCEPT_ID], data[RELATIONSHIP_TARGET_CONCEPT_ID], data[RELATIONSHIP_TYPE_ID], date, data[RELATIONSHIP_ACTIVE].trim().equals(\"1\"));\n\n // we replace the older\n relationships.put(data[RELATIONSHIP_ID], newRelationship);\n }\n }\n\n // Load the relationships and corresponding concepts who are not defined as inactive\n double relationship_count = 0;\n logger.info(\"Adding relationships to the graph... please wait\");\n for (RelationshipSnomedCT r : relationships.values()) {\n\n if (!LOAD_ONLY_ACTIVE_RELATIONSHIPS || r.active) {\n if (conceptMap.containsKey(r.source) && conceptMap.containsKey(r.target)) {\n\n URI src = conceptMap.get(r.source);\n URI tar = conceptMap.get(r.target);\n URI pred;\n\n if (idMapping.containsKey(r.relationshipID)) {\n pred = idMapping.get(r.relationshipID);\n } else {\n pred = repo.getURI(prefix,r.relationshipID);\n }\n E e = new Edge(src, pred, tar);\n\n g.addE(e);\n relationship_count++;\n }\n }\n }\n logger.info(\"Number of relationships loaded: \" + relationship_count);\n logger.info(\"-------------------------------------\");\n \n \n } catch (Exception ex) {\n ex.printStackTrace();\n throw new SLIB_Ex_Critic(ex.getMessage());\n }\n }",
"private String relationGenerator(ArrayList<Verb> candidateRelation){\n String relation = candidateRelation.get(0).token;\n if(candidateRelation.size()>=3){\n if(isBe(candidateRelation.get(0).token) && isAdv(candidateRelation.get(1).type)\n && isVerb(candidateRelation.get(2).type)){\n relation += \" \" + candidateRelation.get(1).token + \" \" + candidateRelation.get(2).token;\n }else if(isBe(candidateRelation.get(0).token) && isPast(candidateRelation.get(1).type)){\n relation += \" \" + candidateRelation.get(1).token;\n }else if(isHave(candidateRelation.get(0).token) && isPast(candidateRelation.get(1).type)){\n relation += \" \" + candidateRelation.get(1).token;\n }\n }\n return relation;\n }",
"private void createRooms()//refactored\n {\n currentRoom = RoomCreator.buildCurrentRooms();//new\n }",
"public static void convertModalMultipleSemanticsOnMultipleDirectoriesTraverseDirectory(Path inPath, String oPath, boolean dotin, boolean dotout, String dotBin, String[] semantics, TransformationParameter... params){\n if (Files.isDirectory(inPath)){\n log.info(\"Input is a directory \" + inPath.toString());\n AtomicInteger problems = new AtomicInteger();\n AtomicInteger problemsParseErrors = new AtomicInteger();\n AtomicInteger problemsOtherErrors = new AtomicInteger();\n List<String> parseErrors = new ArrayList<>();\n List<Pair<String,String>> otherErrors = new ArrayList<>();\n\n if (semantics != null) {\n log.fine(\"Semantics: \" + semantics.length);\n for (String sem : semantics) {\n log.finer(\"Semantics in list: \" + sem);\n }\n } else {\n semantics = new String[1];\n semantics[0] = \"\";\n }\n log.info(\"Embedding.\");\n for (String sem : semantics) {\n log.info(\"Current semantics: \" + sem);\n Path out_s = Paths.get(oPath,SemanticsGenerator.thfName(sem));\n try (Stream<Path> paths = Files.walk(inPath)) {\n\n // create subdirectories\n log.info(\"Creating subdirectories.\");\n paths.filter(Files::isDirectory).forEach(d -> {\n Path newDir = Paths.get(\n out_s.toString(),\n d.toAbsolutePath().toString().replace(inPath.toAbsolutePath().getParent().toString(), \"\"));\n try {\n Files.createDirectories(newDir);\n log.info(\"Created directory \" + newDir.toString());\n } catch (IOException e) {\n log.severe(\"Could not create directory \" + newDir.toString() + \" ::: \" + e.getMessage());\n }\n });\n\n // embed problems\n try (Stream<Path> pathsNew = Files.walk(inPath)) {\n log.info(\"Converting problems.\");\n pathsNew.filter(Files::isRegularFile).filter(f -> f.toString().endsWith(\".p\")).forEach(f -> {\n problems.getAndIncrement();\n log.info(\"Processing \" + String.valueOf(problems.get()) + \": \" + f.toString());\n String subdir = f.toString().substring(inPath.getParent().toString().length());\n Path outPath = Paths.get(out_s.toString(), subdir);\n Path inDot = Paths.get(outPath.toString() + \"-in.dot\");\n Path outDot = Paths.get(outPath.toString() + \"-out.dot\");\n //System.out.println(outPath.toString());\n if (!dotin) inDot = null;\n if (!dotout) outDot = null;\n\n\n // call embedding wrapper\n try {\n boolean success = convertModal(f, outPath, inDot, outDot, dotBin, sem, params);\n if (!success) {\n log.warning(\"ParseError: Could not convert \" + f.toString());\n parseErrors.add(f.toString());\n problemsParseErrors.getAndIncrement();\n }\n } catch (IOException | ParseException | AnalysisException | TransformationException e) {\n String error = \"Could not convert \" + f.toString() + \" ::: \" + e.toString() + \" ::: \" + e.getMessage();\n log.warning(error);\n otherErrors.add(new Pair<String, String>(f.toString(), error));\n problemsOtherErrors.getAndIncrement();\n //e.printStackTrace();\n }\n });\n\n // write errors to file\n try {\n Files.write(Paths.get(out_s.toString(), \"OtherErrors\"), otherErrors.stream()\n .map(p -> p.getKey() + \" ::: \" + p.getValue())\n .collect(Collectors.joining(\"\\n\")).getBytes());\n } catch (IOException e) {\n log.warning(\"Could not write OtherErrors file\");\n e.printStackTrace();\n }\n try {\n Files.write(Paths.get(out_s.toString(), \"ParseErrors\"), parseErrors.stream()\n .collect(Collectors.joining(\"\\n\")).getBytes());\n } catch (IOException e) {\n log.warning(\"Could not write ParseErrors file\");\n e.printStackTrace();\n }\n log.info(\"Problems total:\" + problems.get() + \" parseErrors:\" + problemsParseErrors.get() + \" otherErrors:\" + problemsOtherErrors.get());\n\n } catch (IOException e) {\n log.severe(\"Could not traverse directory \" + inPath.toString() + \" ::: \" + e.getMessage());\n log.severe(\"Exit.\");\n System.exit(1);\n }\n } catch (IOException e) {\n log.severe(\"Could not traverse directory \" + inPath.toString() + \" ::: \" + e.getMessage());\n log.severe(\"Exit.\");\n System.exit(1);\n }\n }\n }\n }",
"private void _generateALecturer(int index) {\n String id = _getId(CS_C_LECTURER, index);\n writer_.startSection(CS_C_LECTURER, id);\n if(globalVersionTrigger){\n \twriter_log.addPropertyInstance(id, RDF.type.getURI(), ontology+\"#Lecturer\", true); \t\n }\n _generateAFaculty_a(CS_C_LECTURER, index, id);\n writer_.endSection(CS_C_LECTURER);\n _assignFacultyPublications(id, LEC_PUB_MIN, LEC_PUB_MAX);\n }"
] | [
"0.5255127",
"0.5238559",
"0.5216838",
"0.5092144",
"0.50905937",
"0.50806373",
"0.5064695",
"0.50374794",
"0.5034844",
"0.5008681",
"0.5003016",
"0.49790528",
"0.4932893",
"0.49031585",
"0.4891217",
"0.48828167",
"0.48602542",
"0.4834457",
"0.4825572",
"0.48205993",
"0.4802409",
"0.47581872",
"0.47545692",
"0.47484308",
"0.47410104",
"0.47260702",
"0.47118306",
"0.47061062",
"0.4704376",
"0.4698297",
"0.46932736",
"0.46754795",
"0.46663332",
"0.4658395",
"0.46568075",
"0.46540084",
"0.46530092",
"0.4647687",
"0.46405035",
"0.4637244",
"0.46371904",
"0.46349996",
"0.46207443",
"0.4617924",
"0.46057957",
"0.4599467",
"0.45971712",
"0.4596562",
"0.45852354",
"0.45750847",
"0.4573871",
"0.45709664",
"0.4569079",
"0.45690742",
"0.45689684",
"0.45677722",
"0.45566338",
"0.45549712",
"0.45516926",
"0.4550086",
"0.45472842",
"0.4544743",
"0.45404124",
"0.45287263",
"0.4525378",
"0.45225316",
"0.45188266",
"0.45171386",
"0.45169535",
"0.45014971",
"0.44956392",
"0.44933337",
"0.44741133",
"0.4471817",
"0.44707063",
"0.44649678",
"0.44626915",
"0.44604507",
"0.44500345",
"0.44478917",
"0.44466546",
"0.44428033",
"0.44427496",
"0.44396666",
"0.44393122",
"0.44226286",
"0.4421832",
"0.44210443",
"0.44202226",
"0.44193643",
"0.4416293",
"0.44127297",
"0.44083112",
"0.43964082",
"0.43963766",
"0.43937418",
"0.43788025",
"0.43780974",
"0.4377948",
"0.43741864"
] | 0.5940343 | 0 |
get all the concept net entries that isa room | public static void getRoomsAPI()
{
try
{
WebClient checkIP = new WebClient("http://api.conceptnet.io/c/en/room/n?offset=0&limit=1000");
checkIP.post("");
long startIP = System.currentTimeMillis();
ArrayList<ArrayList<String> > checkq = new ArrayList<ArrayList<String> >();
while(true)
{
checkIP.getQueue(checkq);
boolean processedsomething = false;
for (int i = 0; i < checkq.size(); i++)
{
ArrayList<String> resultlines = checkq.remove(i);
String x = null;
String relation = null;
String relationweight = null;
String y = null;
for(int li=0;li<resultlines.size();li++)
{
processedsomething = true;
String line = resultlines.get(li);
line = line.trim();
if(line.startsWith("\"@id\": \"/a/["))
{
line = line.substring("\"@id\": \"/a/[".length());
int ind = line.indexOf(",");
relation = line.substring(0,ind);
line = line.substring(ind+1);
ind = line.indexOf(",");
x = line.substring(0,ind);
line = line.substring(ind+1);
ind = line.indexOf("]");
y = line.substring(0,ind);
}
if(line.startsWith("\"weight\": "))
{
relationweight = line.substring("\"weight\": ".length());
//can now process the edge information
//we only want the things that are a room not things a room is
if(y.equalsIgnoreCase("c/en/room/n"))
{
System.out.println(x+" "+relation+" "+y);
}
}
}
}
if(processedsomething)
break;
Thread.sleep(16);
long time = System.currentTimeMillis();
// if((time-startIP)>1000)
// {
// //timeout
// break;
// }
}
}
catch(Exception e)
{
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void getRoomsHTML()\n\t{\n\t\t//get all the concept net entries that isa room\n\t\ttry\n\t\t{\n\t\t\tWebClient checkIP = new WebClient(\"http://conceptnet.io/c/en/room/n?rel=/r/IsA&limit=100000\");\n\t\t\tcheckIP.post(\"\");\n\t\t\tlong startIP = System.currentTimeMillis();\n\t\t\t\n\t\t\tfinal int OUTSIDE = 0;\n\t\t\tfinal int INEDGESTART = 1;\n\t\t\tfinal int INEDGEREL = 2;\n\t\t\tfinal int INEDGEEND = 3;\n\t\t\tint state = OUTSIDE;\n\t\t\t\n\t\t\tArrayList<ArrayList<String> > checkq = new ArrayList<ArrayList<String> >();\n\t\t\twhile(true)\n\t\t\t{\n\t\t\t\tcheckIP.getQueue(checkq);\n\t\t\t\tboolean processedsomething = false;\n\t\t\t\tfor (int i = 0; i < checkq.size(); i++) \n\t\t\t\t{\n\t\t\t\t\tArrayList<String> resultlines = checkq.remove(i);\n\t\t\t\t\t\n\t\t\t\t\tString x = null;\n\t\t\t\t\tString relation = null;\n\t\t\t\t\tString relationweight = null;\n\t\t\t\t\tString y = null;\n\n\t\t\t\t\tfor(int li=0;li<resultlines.size();li++)\n\t\t\t\t\t{\t\t\n\t\t\t\t\t\tprocessedsomething = true;\n\t\t\t\t\t\t\n\t\t\t\t\t\tString line = resultlines.get(li);\n\t\t\t\t\t\tline = line.trim();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(state==OUTSIDE)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(line.startsWith(\"<td class=\\\"edge-start\\\">\"))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tstate = INEDGESTART;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\tif(state==INEDGESTART)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(line.startsWith(\"<a href=\\\"\"))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tline = line.substring(\"<a href=\\\"\".length());\n\t\t\t\t\t\t\t\tint ind = line.indexOf(\"\\\"\");\n\t\t\t\t\t\t\t\tline = line.substring(0,ind);\n\t\t\t\t\t\t\t\tx = line;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\tif(line.startsWith(\"<td class=\\\"edge-rel\\\">\"))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tstate = INEDGEREL;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\tif(state==INEDGEREL)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(line.startsWith(\"― <span class=\\\"rel-label\\\">\"))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tline = line.substring(\"― <span class=\\\"rel-label\\\">\".length());\n\t\t\t\t\t\t\t\tint ind = line.indexOf(\"<\");\n\t\t\t\t\t\t\t\tline = line.substring(0,ind);\n\t\t\t\t\t\t\t\trelation = line;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\tif(line.startsWith(\"Weight: \"))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tline = line.substring(\"Weight: \".length());\n\t\t\t\t\t\t\t\trelationweight = line;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\tif(line.startsWith(\"<td class=\\\"edge-end\\\">\"))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tstate = INEDGEEND;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\tif(state==INEDGEEND)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//if(line.startsWith(\"<a href=\\\"\"))\n\t\t\t\t\t\t\t//Grab the supplementary definition so we get the sense of the word i.e. a noun not a verb\n\t\t\t\t\t\t\tif(line.startsWith(\"(<a href=\\\"\"))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tline = line.substring(\"(<a href=\\\"\".length());\n\t\t\t\t\t\t\t\tint ind = line.indexOf(\"\\\"\");\n\t\t\t\t\t\t\t\tline = line.substring(0,ind);\n\t\t\t\t\t\t\t\ty = line;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//can now process the edge information\n\t\t\t\t\t\t\t\t//we only want the things that are a room not things a room is\n\t\t\t\t\t\t\t\tif(y.equalsIgnoreCase(\"/c/en/room/n\"))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tSystem.out.println(x+\" \"+relation+\" \"+y);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\tif(line.startsWith(\"</sup>\"))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tstate = OUTSIDE;\n\t\t\t\t\t\t\t}\n\n\t\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\tif(processedsomething)\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tThread.sleep(16);\n\t\t\t\t\n\t\t\t\tlong time = System.currentTimeMillis();\n//\t\t\t\tif((time-startIP)>1000)\n//\t\t\t\t{\n//\t\t\t\t\t//timeout\n//\t\t\t\t\tbreak;\n//\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\t\n\t\t}\n\t}",
"public List<Room> findAllRooms();",
"public ArrayList getRooms();",
"public Rooms getRmTable();",
"public List<Room> getRooms() {\n return rooms;\n }",
"@GET\n @Produces(\"application/json\")\n public static List<CRoom> roomAll() {\n return (List<CRoom>) sCrudRoom.findWithNamedQuery(CRoom.FIND_ROOM_BY_ALL);\n }",
"public static void getRoomConcept(String concept)\n\t{\n\t\t\n\t}",
"public List<Room> showAllRoom() {\r\n\t\t\r\n\t\tif(userService.adminLogIn|| userService.loggedIn) {\r\n\t\t\tList<Room> list = new ArrayList<>();\r\n\t\t\troomRepository.findAll().forEach(list::add);\r\n\t\t\treturn list;\r\n\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthrow new UserNotLoggedIn(\"you are not logged in!!\");\r\n\t\t}\r\n\r\n\t}",
"public Set<Room> getRooms() {\n return rooms;\n }",
"@Override\n\tpublic List<RoomInterface> getRooms() {\n\t\treturn rooms;\n\t}",
"public List<Room> getAllRooms(){\n\n List<Room> rooms = null;\n\n EntityManager entityManager = getEntityManagerFactory().createEntityManager();\n entityManager.getTransaction().begin();\n\n try{\n CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();\n CriteriaQuery<Room> roomCriteriaQuery = criteriaBuilder.createQuery(Room.class);\n Root<Room> roomsRoot = roomCriteriaQuery.from(Room.class);\n\n roomCriteriaQuery.select(roomsRoot);\n\n rooms = entityManager.createQuery(roomCriteriaQuery).getResultList();\n }\n catch (Exception ex){\n entityManager.getTransaction().rollback();\n }\n finally {\n entityManager.close();\n }\n\n return rooms;\n }",
"@GetMapping(path = \"/rooms\")\n public List<Room> findAllRooms() {\n return new ArrayList<>(roomService.findAllRooms());\n }",
"Collection<Room> getRooms() throws DataAccessException;",
"Map<String, Collection<String>> getConnectedEntities();",
"java.lang.String getRaceList();",
"public LinkedList getList() {\n\treturn this.roomList;\n}",
"public void listNens() {\n\t\t\tEntityManager em = emf.createEntityManager();\n\t\t\tem.getTransaction().begin();\n\t\t\tList<Nen> result = em.createQuery(\"from nen\", Nen.class)\n\t\t\t\t\t.getResultList();\n\t\t\tfor (Nen a : result) {\n\t\t\t\tSystem.out.println(a.toString());\n\t\t\t}\n\t\t\tem.getTransaction().commit();\n\t\t\tem.close();\t\n\t\t}",
"public List<Registry.Entry> getEntryOrg(int org)\n\t{\n\t\treturn this.reg.get(org);\n\t}",
"public Set<EdifNet> getClockNets(EdifCell cell) { \n\n // Identify the clock clock nets. Iterate over all instances of the cell and select\n // those that are tagged as \"sequential\". For those instances tagged as sequential,\n // find all the input EdifPortRef objects that are attached to it.Of these, find the\n // EdifPortRef objects that are attached to a clock input. Tag such nets as \"clock nets\"\n // (with exception of GND).\n Set<EdifNet> clockNets = new LinkedHashSet<EdifNet>(); \n EdifCellInstanceGraph graph = new EdifCellInstanceGraph(cell);\n for (EdifCellInstance eci : cell.getSubCellList()) {\n if (isSequential(eci.getCellType())) {\n // TODO: Do we really need a graph to compute this? It doesn't seem\n // necessary (i.e., just look at the netlist topology)\n for (EdifPortRef epr : graph.getEPRsWhichReferenceInputPortsOfECI(eci)) {\n if (XilinxTools.isClockPort(epr.getSingleBitPort())) {\n // The following is for a special case which\n // doesn't allow GNDs to drive a clock net\n Iterator<EdifPortRef> it = epr.getNet().getOutputPortRefs().iterator();\n if (!it.hasNext() || !it.next().getCellInstance().getType().toLowerCase().equals(\"gnd\"))\n clockNets.add(epr.getNet());\n }\n }\n }\n }\n return clockNets;\n }",
"@Override\n\tpublic List<Room> getAll() {\n\t\tArrayList<Room> list = new ArrayList<>();\n\t\tConnection cn = ConnectionPool.getInstance().getConnection();\n\t\ttry {\n\t\t\tStatement st = cn.createStatement();\n\t\t\tResultSet rs = st.executeQuery(\"SELECT * FROM room\");\n\t\t\twhile(rs.next()) {\n\t\t\t\tlist.add(new Room(rs.getInt(1), rs.getInt(2)));\n\t\t\t}\n\t\t\treturn list;\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tConnectionPool.getInstance().closeConnection(cn);\n\t\t}\n\t\treturn new ArrayList<Room>();\n\t}",
"java.util.List<com.rpg.framework.database.Protocol.Quest> \n getQuestList();",
"public void getAllSingleRoom() {\n\t\t for(SuiteRoom elem: suiteroom)\n\t {\n\t \t System.out.println (\"capacité : \" +elem.getCapacity());\n\t \t System.out.println (\"prix : \" +elem.getPrice());\n\t \t System.out.println (\"numéro : \" +elem.getIdRoom());\n\t \t System.out.println (\"nom : \" +elem.getName());\n\t \tSystem.out.println (\"-------------------\");\n\t \t \n\t }\n\t}",
"Room getRoom();",
"Room getRoom();",
"public ArrayList<Room> getRooms() {\n return rooms;\n }",
"public Relationship[] getNLM_Rels(int index) {\n if (index % 2 != 0) {\n index -= 1;\n }\n index = index / 2;\n\n Concept concept_1 = (Concept) clusters[index][1];\n Concept concept_2 = (Concept) clusters[index][2];\n\n Relationship[] rels = concept_1.getRelationships();\n\n Vector v = new Vector();\n for (int i = 0; i < rels.length; i++) {\n if (rels[i].getSource().toString().startsWith(\"NLM\") &&\n ( (concept_2 == null) || (rels[i].getRelatedConcept() == concept_2))) {\n v.add(rels[i]);\n }\n }\n\n return (Relationship[]) v.toArray(new Relationship[0]);\n }",
"@CrossOrigin \n\t@GetMapping(\"/all/{building}\")\n\tpublic List<Room> getRooms(@PathVariable String building) {\n\t\tList<Room> returned = new ArrayList<>();\t\t\n\t\tfor (Room room : roomDB)\n\t\t\tif (room.getBuilding().equals(building))\n\t\t\t\treturned.add(room);\n\t\treturn returned;\n\t}",
"@Transactional\r\n\tpublic List<Room> getAllRooms(){\r\n\t\tList<Room> list= new ArrayList<Room>();\r\n\t\tIterable<Room> iterable= this.roomRepository.findAll();\r\n\t\tfor(Room room: iterable)\tlist.add(room);\r\n\t\treturn list;\r\n\t}",
"public ResultSet getAllRooms() {\r\n\r\n try {\r\n\r\n SQL = \"SELECT * FROM ROOMS;\";\r\n rs = stmt.executeQuery(SQL);\r\n return rs;\r\n\r\n } catch (SQLException err) {\r\n\r\n System.out.println(err.getMessage());\r\n return null;\r\n\r\n }\r\n\r\n }",
"public static void showAllRoom(){\n ArrayList<Room> roomList = getListFromCSV(FuncGeneric.EntityType.ROOM);\n displayList(roomList);\n showServices();\n }",
"public ArrayList<Concept> getAllConcepts() {\n \treturn this.concepts.getAllContents();\n }",
"List<Neuron> getDendrites();",
"private List<String> retrieveObjectsInRoom(Room room) {\n List<String> retirevedInRoom = new ArrayList<>();\n for (String object : room.getObjects()) {\n if (wantedObjects.contains(object)) {\n retirevedInRoom.add(object);\n }\n }\n return retirevedInRoom;\n }",
"public static ArrayList<Room> getTypicalRooms() {\n return new ArrayList<>(Arrays.asList(BEST_ROOM, WORST_ROOM));\n }",
"public List<Room> getRooms(){\n ArrayList<Room> returnedList = (ArrayList<Room>) rooms;\n return (ArrayList<Room>) returnedList.clone();\n }",
"public List<Concept> getDiagnoses(){\n \treturn diagnoses;\n }",
"public ChatRoom[] getChatRooms();",
"@Override\n public List<Room> findAll() {\n return roomRepository.findAll();\n }",
"public void getWalls() {\n\t\tRandomMapGenerator rmg = new RandomMapGenerator();\n\n\t\tboolean[][] cm = rmg.cellmap;\n\n\t\tfor (int x = 0; x < rmg.width; x++) {\n\t\t\tfor (int y = 0; y < rmg.height; y++) {\n\t\t\t\tif (cm[x][y]) {\n\t\t\t\t\twallArray.add(new Wall(x * 12, y * 12, mode));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public List<Suspect> getNPCs(Room room) {\n List<Suspect> npcsInRoom = new ArrayList<Suspect>();\n\n for (Suspect s : game.gameSnapshot.getSuspects()) {\n if (s.getRoom().getID() == room.getID()) {\n npcsInRoom.add(s);\n }\n }\n\n return npcsInRoom;\n }",
"public List<Room> unOccupiedRooms() {\n List<Room> rooms = new ArrayList<>();\n for (int i = 0; i < numOfRooms; i++) {\n if (!internalList.get(i).isOccupied()) {\n rooms.add(internalList.get(i));\n }\n }\n return rooms;\n }",
"public Rooms getRooms(int i) {\n\t\t\tRooms buff = RoomDetails.get(i);\r\n\t\t\treturn buff;\r\n\t\t}",
"public List<Room> getByRoomType(String roomType){\r\n\t\tif(userService.adminLogIn||userService.loggedIn) {\r\n\t\t\tList<Optional<Room>> room=new ArrayList<>();\r\n\t\t\troom=roomRepository.findByRoomType(roomType);\r\n\t\t\tif (room.size()==0) {\r\n\t\t\t\tthrow new RoomTypeNotFoundException(\"Room type not available\");\r\n\t\t\t} else {\r\n\t\t\t\tList<Room> newRoom=new ArrayList<Room>();\r\n\t\t\t\tfor(Optional r:room) {\r\n\t\t\t\t\tnewRoom.add((Room) r.get());\r\n\t\t\t\t}\r\n\t\t\t\treturn newRoom;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthrow new UserNotLoggedIn(\"you are not logged in!!\");\r\n\t\t}\r\n\t\t\r\n\t}",
"public List<Room> occupiedRooms() {\n List<Room> rooms = new ArrayList<>();\n for (int i = numOfRooms; i < internalList.size(); i++) {\n if (internalList.get(i).isOccupied()) {\n rooms.add(internalList.get(i));\n }\n }\n\n return rooms;\n }",
"Relations getGroupOfRelations();",
"List<Enrolment> getAll();",
"private Rooms getRooms(boolean sociallyDistanced, LocalDateTime time, LocalDateTime endTime, Modules module) {\n // Get viable rooms\n Session s = HibernateUtil.getSessionFactory().openSession();\n CriteriaBuilder cb = s.getCriteriaBuilder();\n CriteriaQuery<Rooms> cq = cb.createQuery(Rooms.class);\n Root<Rooms> root = cq.from(Rooms.class);\n ParameterExpression<Integer> spacesNeeded = cb.parameter(Integer.class);\n if (sociallyDistanced) {\n cq.select(root).where(cb.greaterThanOrEqualTo(root.get(\"socialDistancingCapacity\"), spacesNeeded));\n } else {\n cq.select(root).where(cb.greaterThanOrEqualTo(root.get(\"maxCapacity\"), spacesNeeded));\n }\n\n root.join(\"bookings\", JoinType.LEFT);\n root.fetch(\"bookings\", JoinType.LEFT);\n\n Query<Rooms> query = s.createQuery(cq);\n query.setParameter(spacesNeeded, module.getStudents().size());\n\n List<Rooms> results = query.getResultList();\n\n s.close();\n\n\n Map<String, Rooms> possibleRooms = new HashMap<>();\n\n for (Rooms room : results) {\n if (room.isAvailable(time, endTime) && !possibleRooms.containsKey(room.getRoomID())) {\n System.out.println(\" \" + room.getRoomID() + \" of type \" + room.getType() + \" is available and meets your capacity needs.\");\n possibleRooms.put(room.getRoomID(), room);\n }\n }\n\n System.out.println(\"Please enter the room ID you would like to book.\");\n String roomKey = sc.next();\n while (!possibleRooms.containsKey(roomKey)) {\n System.out.println(\"That is not a correct ID for a room. Look at the list above.)\");\n roomKey = sc.next();\n }\n sc.nextLine();\n\n return possibleRooms.get(roomKey);\n }",
"Collection getCommunities();",
"private void setupRooms() {\n\t\tthis.listOfCoordinates = new ArrayList<Coordinates>();\r\n\t\tthis.rooms = new HashMap<String,Room>();\r\n\t\t\r\n\t\tArrayList<Coordinates> spaEntrances = new ArrayList<Coordinates>();\r\n\t\tspaEntrances.add(grid[5][6].getCoord());\r\n\r\n\t\tArrayList<Coordinates> theatreEntrances = new ArrayList<Coordinates>();\r\n\t\ttheatreEntrances.add(grid[13][2].getCoord());\r\n\t\ttheatreEntrances.add(grid[10][8].getCoord());\r\n\r\n\t\tArrayList<Coordinates> livingRoomEntrances = new ArrayList<Coordinates>();\r\n\t\tlivingRoomEntrances.add(grid[13][5].getCoord());\r\n\t\tlivingRoomEntrances.add(grid[16][9].getCoord());\r\n\r\n\t\tArrayList<Coordinates> observatoryEntrances = new ArrayList<Coordinates>();\r\n\t\tobservatoryEntrances.add(grid[21][8].getCoord());\r\n\r\n\t\tArrayList<Coordinates> patioEntrances = new ArrayList<Coordinates>();\r\n\t\tpatioEntrances.add(grid[5][10].getCoord());\r\n\t\tpatioEntrances.add(grid[8][12].getCoord());\r\n\t\tpatioEntrances.add(grid[8][16].getCoord());\r\n\t\tpatioEntrances.add(grid[5][18].getCoord());\r\n\r\n\t\t// ...\r\n\t\tArrayList<Coordinates> poolEntrances = new ArrayList<Coordinates>();\r\n\t\tpoolEntrances.add(grid[10][17].getCoord());\r\n\t\tpoolEntrances.add(grid[17][17].getCoord());\r\n\t\tpoolEntrances.add(grid[14][10].getCoord());\r\n\r\n\t\tArrayList<Coordinates> hallEntrances = new ArrayList<Coordinates>();\r\n\t\thallEntrances.add(grid[22][10].getCoord());\r\n\t\thallEntrances.add(grid[18][13].getCoord());\r\n\t\thallEntrances.add(grid[18][14].getCoord());\r\n\r\n\t\tArrayList<Coordinates> kitchenEntrances = new ArrayList<Coordinates>();\r\n\t\tkitchenEntrances.add(grid[6][21].getCoord());\r\n\r\n\t\tArrayList<Coordinates> diningRoomEntrances = new ArrayList<Coordinates>();\r\n\t\tdiningRoomEntrances.add(grid[12][18].getCoord());\r\n\t\tdiningRoomEntrances.add(grid[16][21].getCoord());\r\n\r\n\t\tArrayList<Coordinates> guestHouseEntrances = new ArrayList<Coordinates>();\r\n\t\tguestHouseEntrances.add(grid[20][20].getCoord());\r\n\r\n\t\t// setup entrances map\r\n\t\tthis.roomEntrances = new HashMap<Coordinates, Room>();\r\n\t\tfor (LocationCard lc : this.listOfLocationCard) {\r\n\t\t\tString name = lc.getName();\r\n\t\t\tRoom r;\r\n\t\t\tif (name.equals(\"Spa\")) {\r\n\t\t\t\tr = new Room(name, lc, spaEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : spaEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"Theatre\")) {\r\n\t\t\t\tr = new Room(name, lc,theatreEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : theatreEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"LivingRoom\")) {\r\n\t\t\t\tr = new Room(name, lc,livingRoomEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : livingRoomEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"Observatory\")) {\r\n\t\t\t\tr = new Room(name, lc,observatoryEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : observatoryEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"Patio\")) {\r\n\t\t\t\tr = new Room(name,lc, patioEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : patioEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"Pool\")) {\r\n\t\t\t\tr = new Room(name,lc,poolEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : poolEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"Hall\")) {\r\n\t\t\t\tr = new Room(name, lc,hallEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : hallEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"Kitchen\")) {\r\n\t\t\t\tr = new Room(name, lc,kitchenEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : kitchenEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"DiningRoom\")) {\r\n\t\t\t\tr = new Room(name, lc,diningRoomEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : diningRoomEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"GuestHouse\")) {\r\n\t\t\t\tr = new Room(name, lc,guestHouseEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : guestHouseEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@GetMapping\n public RoomsDto getRooms() {\n return roomsFacade.findRooms();\n }",
"public int getNumOfRooms() {\n return internalList.size();\n }",
"public List<DeclarationNaissance> getAllActe();",
"public Collection<LernStatus> getLernStadi() {\r\n Collection<LernStatus> result;\r\n \r\n String sql = \"select object(ls) from LernStatus ls \"\r\n + \"where THEMA_THEMENID = :TID\";\r\n \r\n Query q = EMH.getEntityManager().createQuery(sql);\r\n \r\n q.setParameter(\"TID\", this.themenID);\r\n \r\n result = q.getResultList();\r\n \r\n return result;\r\n }",
"java.util.List<org.landxml.schema.landXML11.RoadsideDocument.Roadside> getRoadsideList();",
"public List<Agent> listAgentNotMappedwithDevice();",
"public Room getRoom0(){\n return basement;\n }",
"public ArrayList findAllRoomsWSummary(){\n List <Room> allRooms= roomRepository.findAll();\n System.out.println(\"All rooms is:\");\n System.out.println(allRooms.toString());\n//Set an array list that contains all the data to return to the client\n ArrayList<RoomSummaryMap> dataToReturnToClient = new ArrayList<>();\n\n for (Room room : allRooms) {\n// If there is no associated msg, assign an empty array to the lastMsg.\n if(room.getAssociated_messages().size()<1){\n System.out.println(\"size is less than 1\");\n RoomSummaryMap mapObject= new RoomSummaryMap(room.getId(),room.getName(),\n room.getImage(),\n room.getCreatedBy(),\n room.getAssociated_messages(), \"\");\n System.out.println(\"map object is:\");\n System.out.println(mapObject);\n\n dataToReturnToClient.add(mapObject);\n\n continue;\n }\n System.out.println(\"Size is more than 1\");\n// Else, add the last msg\n String lasMsgObjId=\n room.getAssociated_messages().get(room.getAssociated_messages().size()-1).toString();\n//Query the db for this message\n Message messageInstance= messageService.findbyId(lasMsgObjId);\n dataToReturnToClient.add(new RoomSummaryMap(room.getId(),room.getName(),\n room.getImage(),\n room.getCreatedBy(),\n room.getAssociated_messages(), messageInstance.getMessage()));\n }\n\n System.out.println(\"data to return to client inside room service\");\n System.out.println(dataToReturnToClient);\n return dataToReturnToClient;\n }",
"public static void showAllRoomNotDuplicate(){\n showAllNameNotDuplicate(FuncGeneric.EntityType.ROOM);\n }",
"public Collection<GlobalIdEntry> getAllEntries();",
"@Override\r\n\tpublic List<Ngo> getAll() {\n\t\treturn null;\r\n\t}",
"public abstract List<Organism> getOrganisms();",
"public List<Room> getCurrentRooms() {\n return currentRooms;\n }",
"public static List<Enseignant> getAll() {\n\n // Creation de l'entity manager\n EntityManager em = GestionFactory.factory.createEntityManager();\n\n // Recherche\n @SuppressWarnings(\"unchecked\")\n List<Enseignant> list = em.createQuery(\"SELECT e FROM Enseignant e\").getResultList();\n\n return list;\n }",
"public List<Agent> findAgentsInterne() {\n Query q = getEntityManager().createQuery(\"select A from Agent A WHERE A.etat NOT IN('RET','DEM') AND A.lastDirection IN(SELECT D.code FROM Direction D WHERE D.internExtern=?1) ORDER BY A.personne.name\");\n q.setParameter(1, InterneExterne.Interne);\n List<Agent> list = q.getResultList();\n return list;\n }",
"public final Map<Nation, NationState> getNations() {\n return nations;\n }",
"public List<Agent> findAgentsActifs() {\n Query q = getEntityManager().createQuery(\"select A from Agent A WHERE A.etat NOT IN('RET','DEM') ORDER BY A.personne.name\");\n List<Agent> list = q.getResultList();\n return list;\n }",
"@Override\n public List<Obstacle> getObstacals() {\n List<Obstacle> obstacles = new ArrayList<Obstacle>();\n for (Spatial s : obstacleNode.getChildren()) {\n if (s instanceof Vehicle) {\n Vehicle v = (Vehicle) s;\n obstacles.add(v.toObstacle());\n }\n }\n return obstacles;\n }",
"@Override\r\n\tpublic Vector getEntries() throws NotesApiException {\n\t\treturn null;\r\n\t}",
"List<Concept2OntClassMapping> lookupConcept2OntClassMappingPairs(Concept concept);",
"@Override\r\n\tpublic List<Room> listAll() throws SQLException {\n\t\treturn null;\r\n\t}",
"@Override\n\tpublic List<Role> getPeopleInTheBuilding() {\n\t\treturn null;\n\t}",
"public List <reclamation> findall(){\n\t\tList<reclamation> a = reclamationRepository.findAll();\n\t\t\n\t\tfor(reclamation reclamations : a)\n\t\t{\n\t\t\tL.info(\"reclamations :\"+ reclamations);\n\t\t\t\n\t\t}\n\t\treturn a;\n\t\t}",
"public PriorityQueue<Room> getRooms() {\n return this.rooms;\n }",
"List<IViewEntity> getConstraintEntities();",
"@Override\n\tpublic List<T> getAllEntry() {\n\t\treturn this.hibernateTemplate.find(\"from \"+this.classt.getName());\n\t}",
"public ChatRoomTableModel getRoomlist() {\n\t\treturn roomlist;\n\t}",
"private void displayListOfRooms() {\n DatabaseReference roomsRef = FirebaseDatabase.getInstance().getReference(\"Rooms\");\n\n roomsRef.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n // update rooms every time there's a change\n updateRooms(dataSnapshot);\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n }\n });\n }",
"public Room getRoom()\r\n {\r\n return room;\r\n }",
"ImmutableList<SchemaOrgType> getInteractionStatisticList();",
"@Override\n public List<Classroom> getClassesByKinderg(int id) {\n\t\t\t\t\tKinderGarten k = kindergartenRepo.findById(id).get();\n\t\t\t\t\tList<Classroom> c=k.getClassrooms();\n\t\t\t\t\treturn c;\n\t\t\n\t\t\t\t }",
"protected static String availableRooms(ArrayList<Room> roomList,String start_date){\n String stringList = \"\";\n for(Room room : roomList){\n System.out.println(room.getName());\n ArrayList<Meeting> meet = room.getMeetings();\n for(Meeting m : meet){\n stringList += m + \"\\t\";\n }\n System.out.println(\"RoomsList\"+stringList);\n }\n return \"\";\n }",
"@RequestMapping(method = RequestMethod.GET)\n public ResponseEntity<?> getAllGameRooms() {\n try {\n return new ResponseEntity<>(ls.getAllGameRooms(), HttpStatus.ACCEPTED);\n } catch (LacmanNotFoundException e) {\n Logger.getLogger(LacmanController.class.getName()).log(Level.SEVERE, null, e);\n return new ResponseEntity<>(e.getMessage(), HttpStatus.NOT_FOUND);\n }\n }",
"public Iterator getNetworkList(){\n NeutronTest nt=new NeutronTest(this.idsEndpoint,this.tenantName,this.userName,this.password,this.region);\n Networks ns=nt.listNetworks();\n Iterator<Network> itNet=ns.iterator();\n return itNet;\n }",
"public List<Resident> getAllResidents();",
"ImmutableList<SchemaOrgType> getMentionsList();",
"@GetMapping(\"/chat-rooms\")\n public List<ChatRoom> getAllChatRooms() {\n log.debug(\"REST request to get all ChatRooms\");\n return chatRoomRepository.findAll();\n }",
"public int getNumOfRoom() {\n\t\t\treturn RoomDetails.size();\r\n\t\t}",
"private void findConceptsForInstances() {\n\t\tSet<String> temp = new HashSet<String>();\n\n\t\tfor (String s : taskInput)\n\t\t\ttemp.add(taxonomyMap.get(s).parents.get(0).value);\n\t\ttaskInput.clear();\n\t\ttaskInput.addAll(temp);\n\n\t\ttemp.clear();\n\t\tfor (String s : taskOutput)\n\t\t\ttemp.add(taxonomyMap.get(s).parents.get(0).value);\n\t\ttaskOutput.clear();\n\t\ttaskOutput.addAll(temp);\n\n\t\tfor (Node s : serviceMap.values()) {\n\t\t\ttemp.clear();\n\t\t\tSet<String> inputs = s.getInputs();\n\t\t\tfor (String i : inputs)\n\t\t\t\ttemp.add(taxonomyMap.get(i).parents.get(0).value);\n\t\t\tinputs.clear();\n\t\t\tinputs.addAll(temp);\n\n\t\t\ttemp.clear();\n\t\t\tSet<String> outputs = s.getOutputs();\n\t\t\tfor (String o : outputs)\n\t\t\t\ttemp.add(taxonomyMap.get(o).parents.get(0).value);\n\t\t\toutputs.clear();\n\t\t\toutputs.addAll(temp);\n\t\t}\n\t}",
"@SuppressWarnings(\"deprecation\")\n public final void getRoomIdAndNames() {\n List<String> custom_names = getCustomRoomNames();\n TARDISARS[] ars = TARDISARS.values();\n // less non-room types\n int l = (custom_names.size() + ars.length) - 3;\n this.room_ids = new ArrayList<Integer>();\n this.room_names = new ArrayList<String>();\n for (TARDISARS a : ars) {\n if (a.getOffset() != 0) {\n this.room_ids.add(a.getId());\n this.room_names.add(a.getDescriptiveName());\n }\n }\n for (final String c : custom_names) {\n this.room_ids.add(Material.valueOf(plugin.getRoomsConfig().getString(\"rooms.\" + c + \".seed\")).getId());\n final String uc = ucfirst(c);\n this.room_names.add(uc);\n TARDISARS.addNewARS(new ARS() {\n @Override\n public int getId() {\n return Material.valueOf(plugin.getRoomsConfig().getString(\"rooms.\" + c + \".seed\")).getId();\n }\n\n @Override\n public String getActualName() {\n return c;\n }\n\n @Override\n public String getDescriptiveName() {\n return uc;\n }\n\n @Override\n public int getOffset() {\n return 1;\n }\n });\n }\n }",
"public abstract List<GnNotaria> getAllGnNotaria() throws Exception;",
"@CrossOrigin\n\t@GetMapping(\"/INSA/{building}/{room}/floor\")\n\tpublic List<String> getRoomFloor(@PathVariable String building, @PathVariable String room) {\n\t\tList<String> returned = new ArrayList<>();\t\n\t\t\n\t\tfor (Room aRoom : roomDB) {\n\t\t\tif (aRoom.getName().equals(room) && aRoom.getBuilding().equals(building)) {\n\t\t\t\tswitch (aRoom.getFloor()) {\n\t\t\t\t\tcase 0:\n\t\t\t\t\t\treturned.add(\"rdc\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\treturned.add(\"1st\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\treturned.add(\"2nd\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 3:\n\t\t\t\t\t\treturned.add(\"3rd\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturned.add(aRoom.getFloor() + \"th\"); \t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (returned.size() == 0) \n\t\t\treturned.add(\"404\");\n\t\treturn returned;\n\t}",
"public ArrayList<RoomList> getRoomList() {\r\n return RoomList;\r\n }",
"public List<Room> getReservedOn(LocalDate of) {\r\n\t\tList<Room> l= new ArrayList<>(new HashSet<Room>(this.roomRepository.findByReservationsIn(\r\n\t\t\t\tthis.reservationService.getFromTo(of, of))));\r\n\t\treturn l;\r\n\t}",
"private List<Room> addRooms() {\n List<Room> rooms = new ArrayList<>();\n int numRooms = RandomUtils.uniform(random, MINROOMNUM, MAXROOMNUM);\n int playerRoomNum = RandomUtils.uniform(random, 0, numRooms);\n for (int i = 0; i < numRooms; i++) {\n rooms.add(addRandomRoom(random));\n if (i == playerRoomNum) {\n setPlayerInitialPosition(rooms, playerRoomNum);\n }\n }\n return rooms;\n }",
"public List<EntradaDeMaterial> buscarEntradasDisponibles();",
"@Test\r\n\tpublic void testGetRooms() {\r\n\t\tassertEquals(rooms, breaku1.getRooms());\r\n\t\tassertEquals(rooms, externu1.getRooms());\r\n\t\tassertEquals(rooms, meetingu1.getRooms());\r\n\t\tassertEquals(rooms, teachu1.getRooms());\r\n\t}",
"@Override\n public List<Room> findAllRooms() throws AppException {\n log.info(\"RoomDAO#findAllRooms(-)\");\n Connection con = null;\n List<Room> rooms;\n try {\n con = DataSource.getConnection();\n rooms = new ArrayList<>(findAllRooms(con));\n con.commit();\n } catch (SQLException e) {\n rollback(con);\n log.error(\"Problem at findAllRooms(no param)\", e);\n throw new AppException(\"Can not find all rooms, try again\");\n } finally {\n close(con);\n }\n return rooms;\n }",
"public Room getRoomIn() {\n\t\treturn roomIn;\n\t}",
"public static List<Location> generateLocations() {\n\t\tList<Location> locations = new ArrayList<Location>();\n\t\t\n\t\tfor(AREA area : AREA.values()) {\n\t\t\tLocation l = new Location(area);\n\t\t\t\n\t\t\tswitch (area) {\n\t\t\tcase Study:\n\t\t\t\tl.neighbors.add(AREA.HW_SH);\n\t\t\t\tl.neighbors.add(AREA.HW_SL);\n\t\t\t\tl.neighbors.add(AREA.Kitchen);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase Hall:\n\t\t\t\tl.neighbors.add(AREA.HW_SH);\n\t\t\t\tl.neighbors.add(AREA.HW_HL);\n\t\t\t\tl.neighbors.add(AREA.HW_HB);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase Lounge:\n\t\t\t\tl.neighbors.add(AREA.HW_HL);\n\t\t\t\tl.neighbors.add(AREA.HW_LD);\n\t\t\t\tl.neighbors.add(AREA.Conservatory);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase Library:\n\t\t\t\tl.neighbors.add(AREA.HW_SL);\n\t\t\t\tl.neighbors.add(AREA.HW_LB);\n\t\t\t\tl.neighbors.add(AREA.HW_LC);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase BilliardRoom:\n\t\t\t\tl.neighbors.add(AREA.HW_HB);\n\t\t\t\tl.neighbors.add(AREA.HW_LB);\n\t\t\t\tl.neighbors.add(AREA.HW_BD);\n\t\t\t\tl.neighbors.add(AREA.HW_BB);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase DiningRoom:\n\t\t\t\tl.neighbors.add(AREA.HW_LD);\n\t\t\t\tl.neighbors.add(AREA.HW_BD);\n\t\t\t\tl.neighbors.add(AREA.HW_DK);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase Conservatory:\n\t\t\t\tl.neighbors.add(AREA.HW_LC);\n\t\t\t\tl.neighbors.add(AREA.HW_CB);\n\t\t\t\tl.neighbors.add(AREA.Lounge);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase Ballroom:\n\t\t\t\tl.neighbors.add(AREA.HW_BB);\n\t\t\t\tl.neighbors.add(AREA.HW_CB);\n\t\t\t\tl.neighbors.add(AREA.HW_BK);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase Kitchen:\n\t\t\t\tl.neighbors.add(AREA.HW_DK);\n\t\t\t\tl.neighbors.add(AREA.HW_BK);\n\t\t\t\tl.neighbors.add(AREA.Study);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase HW_SH:\n\t\t\t\tl.neighbors.add(AREA.Study);\n\t\t\t\tl.neighbors.add(AREA.Hall);\n\t\t\t\tbreak;\n\t\t\tcase HW_HL:\n\t\t\t\tl.neighbors.add(AREA.Hall);\n\t\t\t\tl.neighbors.add(AREA.Lounge);\n\t\t\t\tbreak;\n\t\t\tcase HW_SL:\n\t\t\t\tl.neighbors.add(AREA.Study);\n\t\t\t\tl.neighbors.add(AREA.Library);\n\t\t\t\tbreak;\n\t\t\tcase HW_HB:\n\t\t\t\tl.neighbors.add(AREA.Hall);\n\t\t\t\tl.neighbors.add(AREA.BilliardRoom);\n\t\t\t\tbreak;\n\t\t\tcase HW_LD:\n\t\t\t\tl.neighbors.add(AREA.Lounge);\n\t\t\t\tl.neighbors.add(AREA.DiningRoom);\n\t\t\t\tbreak;\n\t\t\tcase HW_LB:\n\t\t\t\tl.neighbors.add(AREA.Library);\n\t\t\t\tl.neighbors.add(AREA.BilliardRoom);\n\t\t\t\tbreak;\n\t\t\tcase HW_BD:\n\t\t\t\tl.neighbors.add(AREA.BilliardRoom);\n\t\t\t\tl.neighbors.add(AREA.DiningRoom);\n\t\t\t\tbreak;\n\t\t\tcase HW_LC:\n\t\t\t\tl.neighbors.add(AREA.Library);\n\t\t\t\tl.neighbors.add(AREA.Conservatory);\n\t\t\t\tbreak;\n\t\t\tcase HW_BB:\n\t\t\t\tl.neighbors.add(AREA.BilliardRoom);\n\t\t\t\tl.neighbors.add(AREA.Ballroom);\n\t\t\t\tbreak;\n\t\t\tcase HW_DK:\n\t\t\t\tl.neighbors.add(AREA.DiningRoom);\n\t\t\t\tl.neighbors.add(AREA.Kitchen);\n\t\t\t\tbreak;\n\t\t\tcase HW_CB:\n\t\t\t\tl.neighbors.add(AREA.Conservatory);\n\t\t\t\tl.neighbors.add(AREA.Ballroom);\n\t\t\t\tbreak;\n\t\t\tcase HW_BK:\n\t\t\t\tl.neighbors.add(AREA.Ballroom);\n\t\t\t\tl.neighbors.add(AREA.Kitchen);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlocations.add(l);\n\t\t}\n\t\t\n\t\treturn locations;\n\t}",
"public Map<String, List<IStrategy>> getRnsAct() {\n return rnsAct;\n }"
] | [
"0.6245622",
"0.5814118",
"0.5789173",
"0.5584844",
"0.55250967",
"0.55219626",
"0.54174674",
"0.54167247",
"0.5391125",
"0.53706634",
"0.5362238",
"0.53515726",
"0.53455967",
"0.533061",
"0.53261137",
"0.5291836",
"0.52796996",
"0.52642554",
"0.5261561",
"0.5260166",
"0.5257996",
"0.5245207",
"0.5231226",
"0.5231226",
"0.5221198",
"0.5198732",
"0.518363",
"0.51596266",
"0.51579773",
"0.5153149",
"0.5118445",
"0.51138145",
"0.5098717",
"0.5090935",
"0.5089329",
"0.50833595",
"0.50751287",
"0.5070118",
"0.50636864",
"0.5058219",
"0.5053569",
"0.5044681",
"0.50025094",
"0.5002419",
"0.5000503",
"0.49939507",
"0.49914813",
"0.49748507",
"0.4969813",
"0.49670523",
"0.4956291",
"0.4944564",
"0.4939149",
"0.49385256",
"0.49346152",
"0.49297777",
"0.49137032",
"0.49109617",
"0.4910617",
"0.4908001",
"0.49026185",
"0.48980245",
"0.48939738",
"0.48915222",
"0.4856024",
"0.48441702",
"0.48419154",
"0.48397768",
"0.4834059",
"0.48339757",
"0.4829363",
"0.48180658",
"0.4817465",
"0.4815576",
"0.48099515",
"0.48069116",
"0.48007414",
"0.4800668",
"0.47990647",
"0.4796037",
"0.47953",
"0.47907978",
"0.47849533",
"0.4783057",
"0.47829306",
"0.4782147",
"0.47802216",
"0.47761464",
"0.47760087",
"0.47742605",
"0.4755882",
"0.475167",
"0.47480646",
"0.47478694",
"0.47386268",
"0.4737335",
"0.47339168",
"0.4731964",
"0.4731502",
"0.47306588"
] | 0.5833748 | 1 |
the website is blocking html requests which is a pity as the api doesn't contain all the data available i.e. references to external sites is not included | public static void getRoomsHTML()
{
//get all the concept net entries that isa room
try
{
WebClient checkIP = new WebClient("http://conceptnet.io/c/en/room/n?rel=/r/IsA&limit=100000");
checkIP.post("");
long startIP = System.currentTimeMillis();
final int OUTSIDE = 0;
final int INEDGESTART = 1;
final int INEDGEREL = 2;
final int INEDGEEND = 3;
int state = OUTSIDE;
ArrayList<ArrayList<String> > checkq = new ArrayList<ArrayList<String> >();
while(true)
{
checkIP.getQueue(checkq);
boolean processedsomething = false;
for (int i = 0; i < checkq.size(); i++)
{
ArrayList<String> resultlines = checkq.remove(i);
String x = null;
String relation = null;
String relationweight = null;
String y = null;
for(int li=0;li<resultlines.size();li++)
{
processedsomething = true;
String line = resultlines.get(li);
line = line.trim();
if(state==OUTSIDE)
{
if(line.startsWith("<td class=\"edge-start\">"))
{
state = INEDGESTART;
}
}
else
if(state==INEDGESTART)
{
if(line.startsWith("<a href=\""))
{
line = line.substring("<a href=\"".length());
int ind = line.indexOf("\"");
line = line.substring(0,ind);
x = line;
}
else
if(line.startsWith("<td class=\"edge-rel\">"))
{
state = INEDGEREL;
}
}
else
if(state==INEDGEREL)
{
if(line.startsWith("― <span class=\"rel-label\">"))
{
line = line.substring("― <span class=\"rel-label\">".length());
int ind = line.indexOf("<");
line = line.substring(0,ind);
relation = line;
}
else
if(line.startsWith("Weight: "))
{
line = line.substring("Weight: ".length());
relationweight = line;
}
else
if(line.startsWith("<td class=\"edge-end\">"))
{
state = INEDGEEND;
}
}
else
if(state==INEDGEEND)
{
//if(line.startsWith("<a href=\""))
//Grab the supplementary definition so we get the sense of the word i.e. a noun not a verb
if(line.startsWith("(<a href=\""))
{
line = line.substring("(<a href=\"".length());
int ind = line.indexOf("\"");
line = line.substring(0,ind);
y = line;
//can now process the edge information
//we only want the things that are a room not things a room is
if(y.equalsIgnoreCase("/c/en/room/n"))
{
System.out.println(x+" "+relation+" "+y);
}
}
else
if(line.startsWith("</sup>"))
{
state = OUTSIDE;
}
}
}
}
if(processedsomething)
break;
Thread.sleep(16);
long time = System.currentTimeMillis();
// if((time-startIP)>1000)
// {
// //timeout
// break;
// }
}
}
catch(Exception e)
{
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Document getPageWithRetries(URL url) throws IOException {\n Document doc;\n int retries = 3;\n while (true) {\n sendUpdate(STATUS.LOADING_RESOURCE, url.toExternalForm());\n LOGGER.info(\"Retrieving \" + url);\n doc = Http.url(url)\n .referrer(this.url)\n .cookies(cookies)\n .get();\n if (doc.toString().contains(\"IP address will be automatically banned\")) {\n if (retries == 0) {\n throw new IOException(\"Hit rate limit and maximum number of retries, giving up\");\n }\n LOGGER.warn(\"Hit rate limit while loading \" + url + \", sleeping for \" + IP_BLOCK_SLEEP_TIME + \"ms, \" + retries + \" retries remaining\");\n retries--;\n try {\n Thread.sleep(IP_BLOCK_SLEEP_TIME);\n } catch (InterruptedException e) {\n throw new IOException(\"Interrupted while waiting for rate limit to subside\");\n }\n }\n else {\n return doc;\n }\n }\n }",
"@Override\n\tpublic void run() {\n\t\ttry{\n\t\t\tboolean redirected=false;\n\t\t\tint responseCode=0;\n\t\t\tint tries=0;\n\t\t\tString location=site.getUrl();\n\t\t\tHttpURLConnection urlConnection=null;\n\t\t\tdo{\n\t\t\t\tURL url = new URL(location);\n\t\t\t\turlConnection = (HttpURLConnection) url.openConnection();\n\t\t\t\turlConnection.setRequestProperty(\"User-Agent\", \"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11\");\n\t\t\t\turlConnection.setConnectTimeout(Constants.CONNECTION_TIMEOUT);\n\t\t\t\turlConnection.setReadTimeout(Constants.READ_TIMEOUT);\n\t\t\t\turlConnection.setRequestMethod(\"GET\");\n\t\t\t\turlConnection.setInstanceFollowRedirects(true);\n\t\t\t\turlConnection.setUseCaches(false);\n\t\t\t\turlConnection.setAllowUserInteraction(false);\n\t\t\t\turlConnection.setRequestProperty(\"Content-Type\", \"application/x-www-form-urlencoded\");\n\t\t\t\tresponseCode = urlConnection.getResponseCode();\n\t\t\t\t\n\t\t\t\tif(responseCode==HttpURLConnection.HTTP_MOVED_TEMP || responseCode==HttpURLConnection.HTTP_MOVED_PERM){ //handle 302 and 301 redirect. \n\t\t\t\t\tredirected=true;\n\t\t\t\t\tlocation = urlConnection.getHeaderField(\"Location\");\n\t\t\t\t\ttries++;\n\t\t\t\t}else\n\t\t\t\t\tredirected=false;\n\t\t\t}while(redirected && tries<3);\n\t\t\t\n\t\t\tif (responseCode == HttpURLConnection.HTTP_OK){\n\t\t\t\ttry (InputStream is = urlConnection.getInputStream();\n\t\t BufferedReader br = new BufferedReader(new InputStreamReader(is, StandardCharsets.UTF_8))) {\n\t\t String content = br.lines().collect(Collectors.joining(System.lineSeparator()));\n\t \tthis.callback.webContentCallBack(site, content);\n\t\t } \n\t\t\t}else this.callback.webContentCallBack(site, null); //any other case, null is returned as the content. \n\t\t}catch (Exception e) {\n\t\t\tLogger.getLogger(Fetcher.class.getName()).log(Level.WARNING, \"Site:\"+site.getUrl()+\" failed fetching.\", e);\n\t\t\ttry {\n\t\t\t\tthis.callback.webContentCallBack(site, null); //any exception, null is returned as the content. \n\t\t\t} catch (Exception e1) {\n\t\t\t} \n\t\t}\n\t}",
"private static String useAPI(String urlString) throws IOException {\n String inline = \"\";\n URL url = new URL(urlString);\n HttpURLConnection conn = (HttpURLConnection) url.openConnection();\n conn.setRequestMethod(\"GET\");\n conn.connect();\n\n int responsecode = conn.getResponseCode();\n if(responsecode == 200) {\n Scanner sc = new Scanner(url.openStream());\n while(sc.hasNext()) {\n inline += sc.nextLine();\n }\n sc.close();\n conn.disconnect();\n return inline;\n }\n conn.disconnect();\n return \"[]\";\n }",
"private static void prePageFetch() {\n WEB_CLIENT.getOptions().setJavaScriptEnabled(false);\n WEB_CLIENT.getOptions().setThrowExceptionOnFailingStatusCode(false);\n\n // just turns off all the red stuff from the console\n java.util.logging.Logger.getLogger(\"com.gargoylesoftware.htmlunit\").setLevel(Level.OFF);\n }",
"public void irNoSiteN11 (){\n driver.get(URLbase);\n }",
"private String getContent(String url) throws BoilerpipeProcessingException, IOException {\n int code;\n HttpURLConnection connection = null;\n URL uri;\n do{\n uri = new URL(url);\n if(connection != null)\n connection.disconnect();\n connection = (HttpURLConnection)uri.openConnection();\n connection.setRequestMethod(\"GET\");\n connection.setConnectTimeout(5000);\n connection.setReadTimeout(5000);\n connection.connect();\n code = connection.getResponseCode();\n if(code == 301)\n url = connection.getHeaderField( \"Location\" );\n }while (code == 301);\n\n System.out.println(url + \" :: \" + code);\n String content = null;\n if(code < 400) {\n content = ArticleExtractor.INSTANCE.getText(uri);\n }\n connection.disconnect();\n return content;\n }",
"public String sendGet(String url)\n\t{\n\t\t//Getting most relevant user-agent from robots.txt\n\t\tbest_match = findBestMatch();\n\t\t//Deicing whether or not to skip\n\t\tif (shouldSkip(url))\n\t\t{\n\t\t\treturn \"skipped\";\n\t\t}\n\t\tif (url.startsWith((\"https\")))\n\t\t{\n\t\t\treturn sendGetSecure(url);\n\t\t}\n\t\ttry \n\t\t{\n\t\t\t//Creating URL objects\n\t\t\tURL http_url = new URL(url);\n\t\t\t//Delaying visit if directed to by robots.txt\n\t\t\tcrawlDelay();\n\t\t\tHttpURLConnection secure_connection = (HttpURLConnection)http_url.openConnection();\n\t\t\t//Setting request method\n\t\t\tsecure_connection.setRequestMethod(\"GET\");\n\t\t\t//Sending all headers except for host (since URLConnection will take care of this)\n\t\t\tfor (String h: headers.keySet())\n\t\t\t{\n\t\t\t\tif (!h.equals(\"Host\"))\n\t\t\t\t{\n\t\t\t\t\tsecure_connection.setRequestProperty(h, headers.get(h));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Getting ResponseParser object to read in page content\n\t\t\tp = new ResponseParser(new BufferedReader(new InputStreamReader(secure_connection.getInputStream())));\n\t\t\t\n\t\t\t//Parsing all response headers from returned object\n\t\t\tMap<String,String> p_headers = p.getHeaders();\n\t\t\tMap<String, List<String>> response_headers = secure_connection.getHeaderFields();\n\t\t\tfor (Map.Entry<String, List<String>> entry : response_headers.entrySet()) \n\t\t\t{\n\t\t\t\tif (entry.getKey() == null)\n\t\t\t\t{\n\t\t\t\t\tp.setResponse(entry.getValue().get(0));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tp_headers.put(entry.getKey(),entry.getValue().get(0));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//If we didn't get any headers in the response, the URL was invalid\n\t\t\tif (p.getHeaders().size() == 0)\n\t\t\t{\n\t\t\t\treturn (\"invalid url\");\n\t\t\t}\n\t\t\t\n\t\t\t//Otherwise return the contents of the returned document\n\t\t\treturn p.getData();\n\t\t\t\n\t\t} \n\t\tcatch (IOException | IllegalArgumentException e) \n\t\t{\n\t\t\treturn \"invalid url\";\n\t\t}\t\t\n//\t\ttry\n//\t\t{\n//\t\t\t//Deals with secure request\n//\t\t\tif (url.startsWith((\"https\")))\n//\t\t\t{\n//\t\t\t\treturn sendGetSecure(url);\n//\t\t\t}\n//\t\t\t//Parsing host and port from URL\n//\t\t\tURLInfo url_info = new URLInfo(url);\n//\t\t\thost = url_info.getHostName();\n//\t\t\tport = url_info.getPortNo();\n//\t\t\t\n//\t\t\t//Changing Host header if necessary\n//\t\t\theaders.put(\"Host\", host + \":\" + port);\n//\t\t\t\n//\t\t\t//Getting file path of URL\n//\t\t\tString file_path = url_info.getFilePath();\n//\t\t\t\n//\t\t\t//If we weren't able to find a host, URL is invalid\n//\t\t\tif (host == null)\n//\t\t\t{\n//\t\t\t\treturn \"invalid url\";\n//\t\t\t}\n//\t\t\t\n//\t\t\t//Delaying visits based on robots.txt crawl delay\n//\t\t\tcrawlDelay();\n//\t\t\t\n//\t\t\t//Otherwise, opening up socket and sending request with all headers\n//\t\t\tsocket = new Socket(host, port);\n//\t\t\tout = new PrintWriter(socket.getOutputStream(), true);\n//\t\t\tString message = \"GET \" + file_path + \" HTTP/1.1\\r\\n\";\n//\t\t\tfor (String header: headers.keySet())\n//\t\t\t{\n//\t\t\t\tString head = header + \": \" + headers.get(header) + \"\\r\\n\";\n//\t\t\t\tmessage = message + head;\n//\t\t\t}\n//\t\t\tout.println(message);\n//\n//\t\t\t//Creating ResponseParser object to parse the Response\n//\t\t\tp = new ResponseParser(socket);\n//\t\t\t\n//\t\t\t//If we didn't get any headers in the response, the URL was invalid\n//\t\t\tif (p.getHeaders().size() == 0)\n//\t\t\t{\n//\t\t\t\treturn (\"invalid url\");\n//\t\t\t}\n//\t\t\t//Otherwise return the contents of the returned document\n//\t\t\treturn p.getData();\n//\t\t} \n//\t\tcatch (UnknownHostException e) \n//\t\t{\n//\t\t\tSystem.err.println(\"Unknown Host Exception\");\n//\t\t\tSystem.err.println(\"Problem url is: http://www.youtube.com/motherboardtv?feature=watch&trk_source=motherboard\");\n//\t\t} \n//\t\tcatch (IOException | IllegalArgumentException e) \n//\t\t{\n//\t\t\tSystem.err.println(\"IO Exception\");;\n//\t\t}\n//\t\t//Return null for all caught exceptions (Servlet will deal with this)\n//\t\treturn null;\n\t}",
"@Override\npublic void get(String url) {\n\t\n}",
"public Document fetchDocument(String url) { \n Document doc = new Document(\"\");\n //http://www.oracle.com/technetwork/java/javase/8u111-relnotes-3124969.html\n //Disable basic authentication for HTTPS tunneling \n System.setProperty(\"jdk.http.auth.tunneling.disabledSchemes\", \"''\");\n System.out.println(\"Acessing url \" + url + \" ...\");\n\n try {\n URL robotsTxT = new URL(url);\n\n Proxy proxy = proxies.get(this.rand.nextInt(proxies.size()));\n \n Authenticator authenticator = new Authenticator() {\n @Override\n protected PasswordAuthentication getPasswordAuthentication() {\n return (new PasswordAuthentication(USER, PASS.toCharArray()));\n }\n };\n Authenticator.setDefault(authenticator);\n \n HttpURLConnection httpConn = (HttpURLConnection) robotsTxT.openConnection(proxy);\n httpConn.setRequestProperty(\"User-Agent\", agentValue.get(rand.nextInt(agentValue.size())));\n\n Scanner httpResponse = new Scanner(httpConn.getInputStream());\n\n ByteArrayOutputStream response = new ByteArrayOutputStream();\n while(httpResponse.hasNextLine()) {\n response.write(httpResponse.nextLine().getBytes());\n } \n\n response.close();\n httpResponse.close(); \n\n String robotsData = response.toString();\n\n if(robotsData != null) {\n doc = Jsoup.parse(robotsData);\n }\n\n } catch (Exception ex) {\n System.err.println(\"ERROR: \" + ex.getMessage());\n }\n\n return doc;\n }",
"@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\thandlHttpRequest(url, trackerinfo.get_info_hash(), Settings.PEER_DEFAULT_ID);\n\t\t\t\t\t}",
"static Page Download(){\n // TODO: reference to fetch to download webpages\n WebURL url = queue.poll();\n // call http request to get the web page\n return null;\n }",
"public ArrayList<String> webCrawling(){\n\t\t\tfor(i=780100; i<790000; i++){\r\n\t\t\t\ttry{\r\n\t\t\t\tdoc = insertPage(i);\r\n\t\t\t\t//Thread.sleep(1000);\r\n\t\t\t\t}catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\tif(doc != null){\r\n\t\t\t\t\tElement ele = doc.select(\"div.more_comment a\").first();\r\n\t\t\t\t\t//System.out.println(ele.attr(\"href\"));\r\n\t\t\t\t\tcommentCrawling(ele.attr(\"href\"));//��۸�� ���� ��ũ\r\n\t\t\t\t\tcommentCrawlingList(commentURList);\r\n\t\t\t\t\tcommentURList = new ArrayList<String>();//��ũ ����� �ߺ��ǰ� ���̴� �� �����ϱ� ���� �ʱ�ȭ �۾�\r\n\t\t\t\t\tSystem.out.println(i+\"��° ������\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn replyComment;\r\n\t\t//return urlList.get(0);\r\n\t}",
"private void downloadContent(){\n try {\n URL yahoo = new URL( \"http://api.letsleapahead.com/LeapAheadMultiFreindzy/index.php?action=getLang&langCode=EN&langId=1&appId=6\");\n BufferedReader in = new BufferedReader(\n new InputStreamReader(yahoo.openStream()));\n String inputLine;\n while ((inputLine = in.readLine()) != null)\n Log.e(\"TAG\" , inputLine);\n in.close();\n }catch (Exception e){\n e.printStackTrace();\n }\n\n }",
"WebCrawlerData retrieve(String url);",
"@Override\n public String getWeb() {\n return web;\n }",
"public void get() {\n\t\tdriver.get(\"http://compendiumdev.co.uk/selenium/basic_ajax.html\");\t\n\t}",
"private static void go2(){\n\t\tString concreateURL = \"http://www.yixinhealth.com/%E5%8C%96%E9%AA%8C%E5%92%8C%E6%A3%80%E6%9F%A5/%E5%BF%83%E7%94%B5%E5%9B%BE/\"; \n\t\tConnection c = Jsoup.connect(concreateURL); \n\t\tc.timeout(10000);\n\t\ttry {\n\t\t\tDocument doc = c.get();\n\t\t\t//System.out.println(doc.html()); \n\t\t\t//System.out.println(doc.getElementById(\"content_area\").html());\n\t\t\t//Element eles = doc.getElementById(\"content_area\");\n\t\t\t//System.out.println(eles.html());\n\t\t\t\n\t\t\t//Below code is for the multiple link page\n\t\t\t//Elements eles2 = eles.getElementsByAttributeValue(\"style\", \"text-align: center;\");\n\t\t\t//System.out.println(eles2.html());\n\t\t\t/*for(Element ele: eles2){\n\t\t\t\tElements link = ele.getElementsByTag(\"a\");\n\t\t\t\t//System.out.println(link.html());\n\t\t\t\tfor (int i=0;i<link.size();i++) {\n\t\t\t\t\tSystem.out.println(link.get(i).attr(\"href\"));\n\t\t\t\t}\n\t\t\t}*/\n\t\t\t\n\t\t\t\n\t\t\t//System.out.println(eles2.html());\n\t\t\tElement eles = doc.getElementById(\"content_area\");\n\t\t\tElements eles2 = eles.getElementsByTag(\"img\");\n\t\t\tfor(int i=0;i<eles2.size();i++){\n\t\t\t\teles2.get(i).parent().attr(\"style\", \"text-align:center\");\n\t\t\t\teles2.get(i).parent().parent().nextElementSibling().attr(\"style\", \"text-align:center\");\n\t\t\t\teles2.get(i).attr(\"style\", \"width:50%\");\n\t\t\t}\n\t\t\t\n\t\t\tElements eles3 = eles.getElementsByClass(\"j-header\");\n\t\t\tfor (Element ele : eles3) {\n\t\t\t\tElements eleHeader = ele.getElementsByTag(\"h2\");\n\t\t\t\teleHeader.attr(\"style\", \"text-align:center\");\n\t\t\t}\n\t\t\tSystem.out.println(eles.html());\n\t\t\t\n\t\t\t//Below code is help to clear out the share icon to like Sina weibo\n\t\t\tElements eles4 = eles.getElementsByClass(\"bshare-custom\");\n\t\t\t//eles4.remove();\n\t\t\t\n\t\t\t//Elements eles3 = eles.getElementsByClass(\"n*j-imageSubtitle\");\n\t\t\t//System.out.println(eles3.size());\n\t\t\t/*for(int i=0;i<eles3.size();i++){\n\t\t\t\teles3.get(i).attr(\"style\", \"text-align:center;width:50%\");\n\t\t\t}\n\t\t\tSystem.out.println(eles.html());*/\n\t\t\t//System.out.println(eles2.get(0).attr(\"src\"));\n\t\t\t/*Element eles = doc.getElementById(\"content_area\");\n\t\t\tElements eles2 = eles.getElementsByClass(\"j-header\");\n\t\t\tfor (Element ele : eles2) {\n\t\t\t\tElements eleHeader = ele.getElementsByTag(\"h2\");\n\t\t\t\tSystem.out.println(\"Title---->\"+eleHeader.html()); \n\t\t\t}\n\t\t\tElements elesBody = eles.getElementsByClass(\"j-text\");\n\t\t\tSystem.out.println(\"Body---->\"+elesBody.html()); */\n\t\t\t//System.out.println(eles2.html()); \n /*List<String> nameList = new ArrayList<String>(); \n for (Element ele : eles) {\n \tString text = ele.select(\"h*\").text();\n \tSystem.out.println(text); \n String text = ele.select(\"span\").first().text(); \n if (text.length() > 1 && text.startsWith(\"▲\")) { \n \n if (Integer.parseInt(text.substring(1)) > 30) { \n // 在这里.html()和.text()方法获得的内容是一样的 \n System.out.println(ele.select(\"a\").first().html()); \n nameList.add(ele.select(\"a\").first().text()); \n } \n } \n } */\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private String getURL(String feedUrl) {\n\tStringBuilder sb = null;\n\ttry {\n for(int i = 3; i>0; i--) {\n\t sb = new StringBuilder();\n URL url = new URL(feedUrl);\n//User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.22) Gecko/20110902 Firefox/3.6.22 GTB7.1 ( .NET CLR 3.5.30729)\n//Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\n//Accept-Language: en-us,en;q=0.5\n//Accept-Encoding: gzip,deflate\n//Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\n//Keep-Alive: 115\n//Connection: keep-alive\n//\tHttpsURLConnection uc = (HttpsURLConnection) url.openConnection();\n\tHttpURLConnection uc = (HttpURLConnection) url.openConnection();\n\tuc.setRequestProperty(\"User-Agent\", \"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.22) Gecko/20110902 Firefox/3.6.22 GTB7.1 ( .NET CLR 3.5.30729)\");\n//Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\n\tuc.setRequestProperty(\"Accept\", \"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\");\n\tuc.setRequestProperty(\"Accept-Language\", \"en-us,en;q=0.5\");\n\tuc.setRequestProperty(\"Accept-Encoding\", \"gzip,deflate\");\n\tuc.setRequestProperty(\"Accept-Charset\", \"ISO-8859-1,utf-8;q=0.7,*;q=0.7\");\n\tuc.setRequestProperty(\"Keep-Alive\", \"115\");\n\tuc.setRequestProperty(\"Connection\", \"keep-alive\");\n//Keep-Alive: 115\n//Connection: keep-alive\n//\tif (userName != null && password != null) {\n//\t\tuc.setRequestProperty(\"Authorization\", \"Basic \" + encodedAuthenticationString);\n//\t}\n\t// ori setting??\n//\tuc.setReadTimeout(TIME_OUT);\n//\tuc.setFollowRedirects(true);\n//\tuc.setInstanceFollowRedirects(true);\n//\tuc.setAllowUserInteraction(true);\n\tuc.setDoOutput(true);\n\tuc.setDoInput(true);\n\tuc.setUseCaches(false);\n\tuc.setRequestMethod(\"POST\");\n\tuc.setRequestProperty(\"Content-Type\", \"text/xml\");\n\t\n\tBufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));//uc.getInputStream()\n\tString inputLine;\n//\t'aa7c.com')\" onmouseout=\"menuLayers.hide()\">Available</a>\n\tboolean refreshAgain = false;\n\twhile ((inputLine = in.readLine()) != null) {\n//\t\tSystem.out.println(inputLine);\n\t\tsb.append(inputLine);\n\t\tif( inputLine.contains(\"Refresh\") ) {\n\t\t\trefreshAgain = true;\n\t\t\tSystem.out.println(\"Refresh\");\n\t\t}\n\t}\n\tin.close();\n\tuc.disconnect();\t\t\n//\tRefresh\n\tif( refreshAgain ) {\n\t Thread.sleep(1000);\n\t}\n\telse break;\n }\n }catch(Exception ee){}\nreturn sb.toString();\n}",
"public void getNextPage(String url) {\n String kw = \"flag\";\n client = new OkHttpClient();\n final Request request = new Request.Builder()\n .url(url)\n .build();\n Call call = client.newCall(request);\n call.enqueue(new Callback() {\n @Override\n public void onFailure(Call call, IOException e) {\n System.out.println(e);\n }\n\n @Override\n public void onResponse(Call call, Response response) throws IOException {\n String htmlStr = response.body().string();\n //Type listTpye = new TypeToken<LinkedList<QueryRes>>(){}.getType();\n //System.out.println(htmlStr.toString());\n\n try {\n json = new JSONObject(htmlStr);\n //parsePageJson(json);\n System.out.println(json);\n } catch (Exception e) {\n System.out.println(\"error again\");\n }\n //parseJson(json);\n Message msg = handler.obtainMessage();\n msg.what = 1;\n handler.sendMessage(msg);\n //parsePageJson(page_json);\n }\n });\n }",
"public void run() {\n String naverHtml = httpConnection(\"https://api.openweathermap.org/data/2.5/onecall?lat=\"+lat+\"&lon=\"+lon+\"&exclude=alerts&appid=e9e3ed325461bd506285bdb140285195&lang=kr&units=metric\");\n\n Bundle bun = new Bundle();\n bun.putString(\"HTML_DATA\", naverHtml);\n\n Message msg = handler.obtainMessage();\n msg.setData(bun);\n handler.sendMessage(msg);\n }",
"public void crawl() {\n\t\tOOSpider.create(Site.me().setSleepTime(3000).setRetryTimes(3).setDomain(\"movie.douban.com\")//.setHttpProxy(httpProxy)\n .setUserAgent(\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36\"),\n filmInfoDaoPipeline, DoubanFilm.class)\n .addUrl(\"https://movie.douban.com/top250\")//entry url\n .thread(1)\n .run();\n }",
"private boolean readWebpage()\n {\n String lines = SimpleRequest.readContent(requestUrl);\n if (lines == null) return false;\n\n //\n // updateStreamStatistics ('rtl','sd', 'zeus');\n // updateStreamStatistics ('dmax','sd', 'elmo');\n //\n\n String pm = \"updateStreamStatistics[^']*'\";\n\n String sender = Simple.getMatch(pm + \"([^']*)'\", lines);\n String sdtype = Simple.getMatch(pm + \"[^']*','([^']*)'\", lines);\n String server = Simple.getMatch(pm + \"[^']*','[^']*', '([^']*)'\", lines);\n\n if ((sender != null) && (sdtype != null) && (server != null))\n {\n //\n // Very special server update to get correct streams.\n //\n\n Log.d(LOGTAG, \"===============\" + sender);\n Log.d(LOGTAG, \"===============\" + sdtype);\n Log.d(LOGTAG, \"===============\" + server);\n\n //\n // http://elmo.ucount.in/stats/update/custom/lstv/kabel1/sd&callback=?\n // Referer: http://www.live-stream.tv/online/fernsehen/deutsch/kabel1.html\n //\n\n if (! server.equals(\"zeus\"))\n {\n elmoreferrer = requestUrl;\n elmostring = \"http://\" + server + \".ucount.in\"\n + \"/stats/update/custom/lstv/\"\n + sender + \"/\" + sdtype\n + \"&_=424242&callback=?\";\n\n SimpleRequest.doHTTPGet(elmostring, elmoreferrer);\n }\n }\n\n //\n // type:'html5', config: { file:'http://lstv3.hls1.stream-server.org/live/orf1@sd/index.m3u8' }\n //\n\n String stream = Simple.getMatch(\"type:'html5'.*?file:'([^']*)'\", lines);\n Log.d(LOGTAG,\"=========================================>stream=\" + stream);\n\n if (stream != null) requestUrl = stream;\n\n return (stream != null);\n }",
"public static void leechBBC(Hdict dict)\r\n {\r\n WebDriver driver = new ChromeDriver();\r\n \r\n String baseUrl = \"https://www.bbc.com/\";\r\n driver.get(baseUrl);\r\n \r\n List<WebElement> links = driver.findElements(By.tagName(\"a\"));\r\n \r\n System.out.println(\"There is a total of \" + links.size() + \" frong page news detected on BBC\");\r\n \r\n Hdict titleDicts = new Hdict();\r\n \r\n for(int i = 0; i < links.size(); i++)\r\n {\r\n //get href links\r\n String url = links.get(i).getAttribute(\"href\");\r\n \r\n Words hUrl = new Words(url, 0);\r\n if(titleDicts.hdict_lookup(hUrl) != null) // if this page is already parsed\r\n {\r\n continue;\r\n }\r\n \r\n //if the page is not parsed\r\n titleDicts.hdict_insert(hUrl);\r\n \r\n String urlname = \"https://www.bbc.com/news/\";\r\n \r\n String[] news = url.split(urlname);\r\n if(news.length > 1 && news[1].length() > 10) // if it is .html and has some other shish, shit solution but works\r\n {\r\n //WebDriver driver1 = new ChromeDriver();\r\n //driver1.get(url);\r\n \r\n String[] temp1 = news[1].split(\"-\");\r\n \r\n try{ // if the serial is not attached\r\n Integer.parseInt(temp1[temp1.length-1]);\r\n }\r\n catch(Exception e){ continue; };\r\n \r\n if(temp1.length < 2) // if it is not even a topic\r\n continue;\r\n \r\n //nytimes doesn't have viewers count, so default 2500 effectiveness on all posts\r\n \r\n int reactions = NYTIME_AVG;\r\n \r\n String directory = news[1];\r\n \r\n directory = directory.split(\".html\")[0]; // removes file name and directory\r\n String[] temp = directory.split(\"/\");\r\n String title = temp[temp.length-2]; // get file name, more concise, skip last for CNN, last is index\r\n String[] keys = title.split(\"-\");\r\n \r\n for(String key : keys)\r\n {\r\n if(key.contains(\".html\")) continue; // useless stuff\r\n \r\n boolean integercheck = true;\r\n try{\r\n Integer.parseInt(key);\r\n } catch(Exception e) \r\n {\r\n integercheck = false;\r\n };\r\n if(integercheck) continue; // useless numbers\r\n \r\n if(Arrays.binarySearch(JUNK_WORDS, key) >= 0) continue; // useless words\r\n \r\n Words wkey = new Words(key, reactions * BBC_WORTH);\r\n Words wkey_old = dict.hdict_lookup(wkey);\r\n if(wkey_old == null) dict.hdict_insert(wkey);\r\n else\r\n {\r\n wkey.setPopularity(wkey.getPopularity() + wkey_old.getPopularity());\r\n dict.hdict_insert(wkey);\r\n }\r\n }\r\n }\r\n }\r\n //close Chrome\r\n driver.close();\r\n }",
"private String getUrlContents(String theUrl) {\n StringBuilder content = new StringBuilder();\n try {\n URL url = new URL(theUrl);\n URLConnection urlConnection = url.openConnection();\n //reads the response\n BufferedReader br = new BufferedReader(new InputStreamReader(urlConnection.getInputStream()), 8);\n String line;\n while ((line = br.readLine()) != null) {\n content.append(line + \"\\n\");\n }\n br.close();\n }catch (Exception e) {\n //error occured, usually network related\n e.printStackTrace();\n }\n return content.toString();\n }",
"@Override\n public void onPageFinished(WebView view, String url) {\n\n Log.d(\"webb \", \"onPageFinished \" + url);\n Log.d(\"webb \", \"webview \" + view.toString());\n if (url.equals(\"http://www.mawared.badee.com.sa/api/v1/payment/return\")||url.contains(\".payfort.com/FortAPI/general/backToMerchant\")) {\n // Toast.makeText(activity, \"please wait\", Toast.LENGTH_SHORT).show();\n showDialog();\n //startActivity(new Intent(activity,MainActivity.class));\n }\n\n Log.e(\"console\",\"url is \"+url);\n webView.loadUrl(\"javascript:console.log(document.body.getElementsByTagName('pre')[0].innerHTML);\");\n\n }",
"private WebResponse() {\n initFields();\n }",
"public static void main(String[] args) {\n HttpClient client = new HttpClient();\n\n // Create a method instance.\n GetMethod method = new GetMethod(url);\n\n // Provide custom retry handler is necessary\n method.getParams().setParameter(HttpMethodParams.RETRY_HANDLER,\n new DefaultHttpMethodRetryHandler(3, false));\n\n try {\n // Execute the method.\n int statusCode = client.executeMethod(method);\n\n if (statusCode != HttpStatus.SC_OK) {\n System.err.println(\"Method failed: \" + method.getStatusLine());\n }\n\n // Read the response body.\n byte[] responseBody = method.getResponseBody();\n\n Document doc= Jsoup.parse(new String(responseBody));\n\n Element body = doc.select(\"div.c1-body\").first();\n // 找出定义了 class=masthead 的元素\n Elements contents = body.select(\"div.c1-bline\");\n for (Element content : contents) {\n Element link = content.select(\"div\").select(\"a\").get(1);\n String linkHref = link.attr(\"href\");\n String linkText = link.text();\n System.out.println(\"-------------------------\");\n System.out.println(linkHref+\",\"+linkText);\n// copyTofile(\"------------------------------\");\n// copyTofile(linkHref+\",\"+linkText +\"\\n\");\n// readStatics(linkHref);\n }\n // Deal with the response.\n // Use caution: ensure correct character encoding and is not binary data\n// System.out.println(new String(responseBody));\n\n } catch (HttpException e) {\n System.err.println(\"Fatal protocol violation: \" + e.getMessage());\n e.printStackTrace();\n } catch (IOException e) {\n System.err.println(\"Fatal transport error: \" + e.getMessage());\n e.printStackTrace();\n } finally {\n // Release the connection.\n method.releaseConnection();\n }\n }",
"void getRequests();",
"void getHTML(String req) {\n html = \"\";\n int r;\n BufferedInputStream in = null;\n BufferedInputStream imgIn = null;\n boolean retry;\n Vector imageRd = new Vector(0);\n/*\n do {\n retry = false;\n try {\n\tin = new BufferedInputStream(url.openStream(), 4096);\n\t//\t System.out.println(\"DoneOpening input stream\");\n }\n catch (IOException ioe) {\n\trbe.stats.error(\"Unable to open URL.\" , url.toExternalForm());\n\tioe.printStackTrace();\n\tretry=true;\n System.err.println(\"Set retry=true, then continue...\");\n\tcontinue;\n }\n try {\n\t \n\t //\t while(in.available() == 0){\n\t // System.out.println(\"Nothing available on input stream!\");\n\t //}\n \n\t while ((r = in.read(buffer, 0, buffer.length))!=-1) {\n\t if (r>0) {\n\t\t html = html + new String(buffer, 0, r);\n\t }\n\t //\t System.out.print(\".\");\n\t }\n\t \n }\n catch (IOException ioe) {\n\trbe.stats.error(\"Unable to read HTML from URL.\" , \n\t\t\turl.toExternalForm());\n\tretry=true;\n\tcontinue;\n }\n\n if (retry) {\n\t try {\n\t if (waitKey) {\n\t\t rbe.getKey();\n\t }\n\t else {\n\t\t sleep(1000L);\n\t }\n\t }\n\t catch (InterruptedException inte) {\n\t System.out.println(\"In getHTML, caught interrupted exception!\");\n\t return;\n\t }\t \n }\n } while (retry);\n \n try {\n in.close();\n }\n catch (IOException ioe) {\n rbe.stats.error(\"Unable to close URL.\" , url.toExternalForm());\n }\n*/\n long startTime = System.currentTimeMillis();\n byte[] res = this.clientProxy.getHTMLText(req);\n long endTime = System.currentTimeMillis();\n this.html = new String(res);\n\n //System.out.println(html);\n\n /******\n html =\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"JIGSAW-SESSION-ID=kjfljelejl_343434223_32\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"I_ID=563 \" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"I_ID=534 \" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"I_ID=564 \" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"I_ID=568 \" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\" +\n \"<HTML> AA HTM IM AA HTM IM AA HTM IM AA HTM IM </HTML>\";\n ****/\n\n // Scan for image requests, and request those.\n int cur = 0;\n\n // Suppress image requests.\n if (!RBE.getImage) return;\n\n URL url = null;\n try {\n url = new URL(req);\n } catch (MalformedURLException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n findImg(html, url, imgPat, srcPat, quotePat, imageRd);\n findImg(html, url, inputPat, srcPat, quotePat, imageRd);\n\n if (DEBUG > 2) {\n System.out.println(\"Found \" + imageRd.size() + \" images.\");\n }\n while (imageRd.size() > 0) {\n int max = imageRd.size();\n int min = Math.max(max - rbe.maxImageRd, 0);\n int i;\n try {\n for (i = min; i < max; i++) {\n ImageReader rd = (ImageReader) imageRd.elementAt(i);\n //\tSystem.out.println(\"EB #\" + sessionID+ \"reading image: \" + rd.imgURLStr);\n // TODO TODO FETCHING IMAGES IS BUGGY !!!!!!!\n if (!rd.readImage()) {\n if (DEBUG > 2) {\n System.out.println(\"Read \" + rd.tot + \" bytes from \" +\n rd.imgURLStr);\n }\n imageRd.removeElementAt(i);\n i--;\n max--;\n }\n }\n } catch (Exception inte) {\n System.out.println(\"In getHTML, caught exception!\");\n return;\n }\n }\n }",
"public String sendGetSecure(String url)\n\t{\n\t\ttry \n\t\t{\n\t\t\t//Creating URL objects\n\t\t\tURL https_url = new URL(url);\n\t\t\t//Delaying visit if directed to by robots.txt\n\t\t\tcrawlDelay();\n\t\t\tHttpsURLConnection secure_connection = (HttpsURLConnection)https_url.openConnection();\n\t\t\t//Setting request method\n\t\t\tsecure_connection.setRequestMethod(\"GET\");\n\t\t\t//Sending all headers except for host (since URLConnection will take care of this)\n\t\t\tfor (String h: headers.keySet())\n\t\t\t{\n\t\t\t\tif (!h.equals(\"Host\"))\n\t\t\t\t{\n\t\t\t\t\tsecure_connection.setRequestProperty(h, headers.get(h));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Getting ResponseParser object to read in page content\n\t\t\tp = new ResponseParser(new BufferedReader(new InputStreamReader(secure_connection.getInputStream())));\n\t\t\t\n\t\t\t//Parsing all response headers from returned object\n\t\t\tMap<String,String> p_headers = p.getHeaders();\n\t\t\tMap<String, List<String>> response_headers = secure_connection.getHeaderFields();\n\t\t\tfor (Map.Entry<String, List<String>> entry : response_headers.entrySet()) \n\t\t\t{\n\t\t\t\tif (entry.getKey() == null)\n\t\t\t\t{\n\t\t\t\t\tp.setResponse(entry.getValue().get(0));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tp_headers.put(entry.getKey(),entry.getValue().get(0));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//If we didn't get any headers in the response, the URL was invalid\n\t\t\tif (p.getHeaders().size() == 0)\n\t\t\t{\n\t\t\t\treturn (\"invalid url\");\n\t\t\t}\n\t\t\t\n\t\t\t//Otherwise return the contents of the returned document\n\t\t\treturn p.getData();\n\t\t\t\n\t\t} \n\t\tcatch (IOException | IllegalArgumentException e) \n\t\t{\n\t\t\treturn \"invalid url\";\n\t\t}\t\t\n\t}",
"@Override\n protected URLConnection openConnection(URL url, Proxy proxy) throws IOException {\n\n final HttpsURLConnectionImpl httpsURLConnection = (HttpsURLConnectionImpl) super.openConnection(url, proxy);\n if (\"artisan.okta.com\".equals(url.getHost()) && \"/home/amazon_aws/0oad7khqw5gSO701p0x7/272\".equals(url.getPath())) {\n\n return new URLConnection(url) {\n @Override\n public void connect() throws IOException {\n httpsURLConnection.connect();\n }\n\n public InputStream getInputStream() throws IOException {\n byte[] content = IOUtils.toByteArray(httpsURLConnection.getInputStream());\n String contentAsString = new String(content, \"UTF-8\");\n\n //System.out.println(\"########################## got stream content ##############################\");\n //System.out.println(contentAsString);\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n //contentAsString = contentAsString.replaceAll(\",\\\"ENG_ENABLE_SCRIPT_INTEGRITY\\\"\", \"\"); // nested SRIs?\n baos.write(contentAsString.replaceAll(\"integrity ?=\", \"integrity.disabled=\").getBytes(\"UTF-8\"));\n return new ByteArrayInputStream(baos.toByteArray());\n }\n\n public OutputStream getOutputStream() throws IOException {\n return httpsURLConnection.getOutputStream();\n }\n\n };\n\n } else {\n return httpsURLConnection;\n }\n }",
"public void getData() {\n new DownloadWebpageTask(new AsyncResult() {\n @Override\n public void onResult(JSONObject object) {\n processJson(object);\n }\n }).execute(\"https://spreadsheets.google.com/tq?key=1gGyJS2phIcmiTEEUdUhOsyqekEudBue_NtNkjKsTQrQ\");\n }",
"@Override\n public void crawl() {\n Document doc;\n try {\n\n\n doc = Jsoup.connect(rootURL).userAgent(\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.75.14 (KHTML, like Gecko) Version/7.0.3 Safari/7046A194A\").get();\n\n Elements articles = doc.select(\"section.list article\");\n\n System.out.println(\"Number of articles found:\"+articles.size());\n //list of links found\n for(Element article: articles){\n\n Element titleLink = article.select(\"a\").first();\n System.out.println(titleLink.attr(\"abs:href\"));\n\n //if the url found is in the cache, do not retrieve the url.\n if(urlCache.contains(titleLink.attr(\"abs:href\"))) {\n System.out.println(\"Doucment found in cache, ignoring document\");\n continue;\n }\n\n storeDocument(Jsoup.connect(titleLink.attr(\"abs:href\")).get());\n\n //add the URL to the cache so that we don't retrieve it again.\n urlCache.add(titleLink.attr(\"abs:href\"));\n }\n\n\n } catch (Exception e){\n logger.log(Level.SEVERE, \"Error Retrieving from URL\", e);\n e.printStackTrace();\n }\n }",
"@Override\n\tpublic void process(Page page) {\n\t\tDocument doc = Jsoup.parse(page.getHtml().getFirstSourceText());\n\n\t\tif (isFirst) {\n\t\t\tSystem.out.println(\"添加所有列表链接\");\n\t\t\tArrayList<String> urls = new ArrayList<String>();\n\t\t\t// 33\n\t\t\tfor (int i = 2; i < 30; i++) {\n\t\t\t\turls.add(\"http://zyjy.jiangmen.gov.cn//szqjszbgg/index_\" + i + \".htm\");\n\t\t\t}\n\t\t\tpage.addTargetRequests(urls);\n\t\t\tSystem.out.println(\"这一页一共有 \" + urls.size() + \" 条数据\");\n\n\t\t\tisFirst = false;\n\t\t}\n\n\t\tif (page.getUrl().regex(URL_LIST).match() || page.getUrl().toString().trim().equals(url)) {\n\t\t\tSystem.out.println(\"获取列表数据\");\n\n\t\t\tElements uls = doc.getElementsByAttributeValue(\"class\", \"c1-bline\");\n\t\t\tfor (Element ul : uls) {\n\t\t\t\tString url = ul.getElementsByAttributeValue(\"class\", \"f-left\").get(0).select(\"a\").attr(\"href\").trim();\n\t\t\t\tString title = ul.getElementsByAttributeValue(\"class\", \"f-left\").get(0).text();\n\t\t\t\tString data = ul.getElementsByAttributeValue(\"class\", \"f-right\").get(0).text();\n\t\t\t\tCacheHashMap.cache.put(url, title + \"###\" + data);\n\t\t\t\tMyUtils.addRequestToPage(page, url);\n\t\t\t\tSystem.out.println(url + \" \" + CacheHashMap.cache.get(url));\n\t\t\t}\n\n\t\t}\n\t\tif (page.getUrl().regex(URL_DETAILS).match()) {\n\n\t\t\tProject project = new Project();\n\t\t\tStringBuffer project_article = new StringBuffer();\n\n\t\t\tString urldetails = CacheHashMap.cache.get(page.getUrl().toString().trim());\n\t\t\tSystem.out.println(\"url\" + page.getUrl().toString().trim());\n\t\t\tSystem.out.println(\"urldetails \" + urldetails);\n\n\t\t\tString[] value = urldetails.split(\"###\");\n\t\t\tif (value != null && value.length > 1) {\n\t\t\t\tproject.setProjectName(value[0]);\n\t\t\t\tproject.setPublicStart(value[1]);\n\t\t\t}\n\n\t\t\tElements divs = doc.getElementsByAttributeValue(\"class\", \"contlist minheight\");\n\t\t\tfor (Element div : divs.get(0).children()) {\n\t\t\t\tif (div.nodeName().equals(\"table\")) {\n\t\t\t\t\tElements trs = divs.select(\"tbody\").select(\"tr\");\n\t\t\t\t\tfor (Element tr : trs) {\n\t\t\t\t\t\tproject_article.append(tr.text()).append(\"\\n\");\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tproject_article.append(div.text()).append(\"\\n\");\n\n\t\t\t\t}\n\t\t\t}\n\t\t\tproject.setUrl(page.getUrl().toString().trim());\n\t\t\tproject.setState(0);\n\t\t\tproject.setWebsiteType(\"江门市\");\n\t\t\tproject.setTime(MyUtils.getcurentTime());\n\t\t\tproject.setRawHtml(divs.toString());\n\n\t\t\tproject.setArticle(project_article.toString());\n\t\t\tSystem.out.println(project);\n\n\t\t\tHibernateUtil.save2Hibernate(project);\n\n\t\t}\n\n\t}",
"private String getText(URL url){\n\tString parsedHtml=null;\n\ttry{\n\t\tHttpURLConnection urlConn = (HttpURLConnection) url.openConnection();\n\t\tString line = null;\n\t\tStringBuilder tmp = new StringBuilder();\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(urlConn.getInputStream()));\n\t\twhile ((line = in.readLine()) != null) {\n\t\t tmp.append(line);\n\t\t}\n\t\t \n\t\tDocument doc = Jsoup.parse(tmp.toString());\n\t\tparsedHtml = doc.title() + doc.body().text();\n\t\t\n\t}\n\tcatch(IOException e){\n\t\tSystem.out.println(\"Page not reached for: \"+url );\n\t}\n\tfinally{\n\t\treturn parsedHtml;\n\t}\n\t\n}",
"public static String getWebData(String wepDocumet) {\n\n try {\n Log.d(JsonParse.class.getSimpleName(), \"Start the web-get documnet\");\n // Creates the parameters.\n HttpParams httpParams = new BasicHttpParams();\n // TIMEOUT_MILLISEC sets the timeout. If bad network higher liver is\n // needed.\n HttpConnectionParams.setConnectionTimeout(httpParams, TIMEOUT_MILLISEC);\n HttpConnectionParams.setSoTimeout(httpParams, TIMEOUT_MILLISEC);\n HttpParams p = new BasicHttpParams();\n // Sets parameters. For future use.\n p.setParameter(\"user\", \"1\");\n // Instantiate an HttpClient.\n HttpClient httpclient = new DefaultHttpClient(p);\n // WEBSERVER_ADDRESS, the address to the webserver. DO NOT USE IP!.\n String url = WEBSERVER_ADDRESS + wepDocumet;\n HttpPost httppost = new HttpPost(url);\n // Instantiate a GET HTTP method.\n try {\n ResponseHandler<String> responseHandler = new BasicResponseHandler();\n return httpclient.execute(httppost, responseHandler);\n\n } catch (ClientProtocolException e) {\n Log.e(\"Error\", e.toString());\n // Return a string with error to indicate that an error has\n // happened.\n return \"error\";\n }\n } catch (Exception e) {\n Log.e(\"Error\", e.toString());\n // Return a string with error to indicate that an error has\n // happened.\n return \"error\";\n }\n }",
"private void searchWeb()\n {\n searchWeb = true;\n search();\n }",
"public List<Element> monitorMainPage(){\n\t\tSystem.out.println(\"monitor main Page\");\n\t\tDocument document;\n\t\tList<Element> results = new ArrayList<Element>();\n\t\t// se connecte au site\n\t\tdocument = connectToPage(\"https://www.supremenewyork.com/shop/all\");\n\t\t// liste tous les éléments de la classe inner-article (i.e. tout ce qu'il y a sur la page\n\t\tElements elements = document.getElementsByClass(\"inner-article\");\n\t\tList<Element> articlesGeneral = new ArrayList<Element>();\n\t\tfor (Element element : elements) {\n\t\t\t// extrait chaque link a des articles \n\t\t\tElement link = element.select(\"a\").first();\n\t\t\tarticlesGeneral.add(link);\n\t\t}\n\t\tresults = articlesGeneral;\t\t\n\n\t\treturn results;\n\n\t}",
"GetResponse() {\n\t}",
"public void run()\n\t\t{\n\t\t\tint num = 0;\n\t\t\ttry{\n\t\t\t\tlog.debug(\"Dealing with: \" + url.toString() + \" From : \" + urlp);\n\t\t\t\t\n\t\t\t\tSocket socket = new Socket(url.getHost(), PORT);\n\t\t\t\tPrintWriter writer = new PrintWriter(socket.getOutputStream());\n\t\t\t\tBufferedReader reader = \n\t\t\t\t\tnew BufferedReader(new InputStreamReader(socket.getInputStream()));\n\t\t\t\tString request = \"GET \" + url.getPath() + \" HTTP/1.1\\n\" +\n\t\t\t\t\t\t\t\t\"Host: \" + url.getHost() + \"\\n\" +\n\t\t\t\t\t\t\t\t\"Connection: close\\n\" + \n\t\t\t\t\t\t\t\t\"\\r\\n\";\n\t\t\t\twriter.println(request);\n\t\t\t\twriter.flush();\n\t\t\n\t\t\t\tString line = reader.readLine();\n\t\t\t\t// filter the head message of the response\n\t\t\t\twhile(line != null && line.length() != 0)\n\t\t\t\t{\n\t\t\t\t\tline = reader.readLine();\n\t\t\t\t}\n\t\t\t\t// keep the html context\n\t\t\t\twhile (line != null) \n\t\t\t\t{\n\t\t\t\t\tcontext += line + \"\\n\";\n\t\t\t\t\tline = reader.readLine();\n\t\t\t\t}\n\t\t\t\treader.close();\n\t\t\t\twriter.close();\n\t\t\t\tsocket.close();\n\t\t\t\t//log.debug(context);\n\t\t\t\tstripper = new TagStripper(context);\n\t\t\t\tlog.debug(\"Removing script and style from: \" + url.toString());\n\t\t\t\tstripper.removeComments();\n\t\t\t\tstripper.removeScript();\n\t\t\t\tstripper.removeStyle();\n\t\t\t\tlog.debug(\"Getting links from: \" + url.toString());\n\t\t\t\tArrayList<String> link = new ArrayList<String>();\n\t\t\t\tstripper.buildLinks(url.toString());\n\t\t\t\t\n\t\t\t\tlink = stripper.getLinks();\n\t\t\t\tfor(String tmp : link) {\n\t\t\t\t\tif(getCount() < pageNum ) {\n\t\t\t\t\t\t// find if the link has been already visited\n\t\t\t\t\t\tif(!urlList.contains(tmp)) {\n\t\t\t\t\t\t\tworkers.execute(new SingleHTMLFetcher(new URL(tmp), this.url.toString()));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tString title = stripper.getTitle();\n\t\t\t\tif(title == null)\n\t\t\t\t\ttitle = \"NO title\";\n\t\t\t\ttitle = title.replaceAll(\"&[^;]*;\", \"\");\n\t\t\t\tlog.debug(\"Removing tags from: \" + url.toString());\n\t\t\t\tstripper.removeTags();\n\t\t\t\tstripper.removeSymbol();\n\t\t\t\tString snippet = stripper.getSnippet(title);\n\t\t\t\tdb.savePageInfo(connection, title, snippet, url.toString());\n\t\t\t\tcontext = stripper.getContext();\n\t\t\t\tString[] words = context.toLowerCase().split(\"\\\\s\");\n\t\t\t\tArrayList<String> wordsList = new ArrayList<String>();\n\t\t\t\tfor (int i = 0; i < words.length; i++) {\n\t\t\t\t\t// delete non-word character\n\t\t\t\t\twords[i] = words[i].replaceAll(\"\\\\W\", \"\").replace(\"_\",\n\t\t\t\t\t\t\t\"\");\n\t\t\t\t\tif(words[i].length() != 0)\n\t\t\t\t\t\twordsList.add(words[i]);\n\t\t\t\t}\n\t\t\t\tfor (String w : wordsList) {\n\t\t\t\t\tif (w.length() != 0) {\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tindex.addNum(w, url.toString(), num);\n\t\t\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\tnum++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tlog.debug(\"URL: \" + url.toString() + \" is finished!\");\n\t\t\t\tdecrementPending();\n\t\t\t}catch(Exception ex) {\n\t\t\t\tex.printStackTrace();\n\t\t\t}\n\t\t}",
"@BeforeMethod\n public void beforeMethod() {\n\t\t baseUrl = \"http://10.129.50.4/\";\n driver = new FirefoxDriver();\n driver.manage().window().maximize();\n //Put a Implicit wait, this means that any search for elements on the page could take the time the implicit wait is set for before throwing exception\n\n driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\n //Launch the Online Store Website\n\n driver.get(baseUrl + \"/courses/IITB/ABC101/2015-16/courseware/69e79228b2ee49988900ab45c555eedb/\");\n \n }",
"private void getHtmlCode() {\n\t try {\n\t Document doc = Jsoup.connect(\"http://www.example.com/\").get();\n\t Element content = doc.select(\"a\").first();\n//\t return content.text();\n\t textView.setText(content.text());\n\t } catch (IOException e) {\n\t // Never e.printStackTrace(), it cuts off after some lines and you'll\n\t // lose information that's very useful for debugging. Always use proper\n\t // logging, like Android's Log class, check out\n\t // http://developer.android.com/tools/debugging/debugging-log.html\n\t Log.e(TAG, \"Failed to load HTML code\", e);\n\t // Also tell the user that something went wrong (keep it simple,\n\t // no stacktraces):\n\t Toast.makeText(this, \"Failed to load HTML code\",\n\t Toast.LENGTH_SHORT).show();\n\t }\n\t }",
"@GET(\"v2/top-headlines?country=us&apiKey=\"+ Common.API_KEY)\n Call<Website>getSources();",
"public void geturl() {\n\t \t\n\t \t driver.get(prop.getProperty(\"url\"));\n\t \t \n\t \t String title=driver.getTitle();\n\t \t \n\t \t System.out.println(title);\n\t \t\t\n\t\t\t driver.manage().window().maximize();\n\t\t\t \n\t\t\t driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\n\t\t\t \n\t\t\t driver.manage().deleteAllCookies();\n\t \t\n\t \t\n\t }",
"private void connect() {\n try {\n document = Jsoup.connect(link).get();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"private void loadWeb() {\n\t\tweb.getSettings().setJavaScriptEnabled(true);\r\n\t\t//\r\n\t\tweb.setWebViewClient(new WebViewClient() {\r\n\t\t\t@Override\r\n\t\t\tpublic boolean shouldOverrideUrlLoading(WebView view, String url) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\treturn super.shouldOverrideUrlLoading(web, url);\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onPageFinished(WebView view, String url) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tsuper.onPageFinished(view, url);\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onPageStarted(WebView view, String url, Bitmap favicon) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tsuper.onPageStarted(view, url, favicon);\r\n\t\t\t}\r\n\t\t});\r\n\t\tweb.loadUrl(url);\r\n\t}",
"public static void getFlightSearchData() {\n\t HttpClient httpclient =HttpClientBuilder.create().build();\r\n//\t String url = \"http://finance.yahoo.com/q/hp?s=005930.KS+Historical+Prices\";\r\n\t String url =\"https://www.rome2rio.com/api/json/GetFlightPricesAsyncProgress?id=http%3A%2F%2Fpartners.api.skyscanner.net%2Fapiservices%2Fpricing%2Fuk1%2Fv1.0%2Feca848208a19428887cb0f9acd45798f_ecilpojl_5390203AB08027B40F6AC23E253711B9%20ICN%20OKA%2CICN%2COKA%2CSkyScanner%2Chttp%3A%2F%2Fwww.skyscanner.com%2F&version=201605050453&\";\r\n//\t String url =\"https://www.rome2rio.com/api/json/GetFlightPricesAsyncStart?origins=ICN&destinations=OKA&outDate=5-12-2016&retDate=5-19-2016&adults=1&children=0&infants=0&cabin=e¤cy=KRW&version=201605050453&\";\r\n\t try\r\n\t { \r\n\t \tHttpGet request = new HttpGet(url);\r\n\t\t\tHttpResponse res = httpclient.execute(request);\r\n/*\t \t// Specify values for path parameters (shown as {...}) \r\n\t URIBuilder builder = new URIBuilder(\"http://evaluate.rome2rio.com/api/1.2/json/Search/\");\r\n\t \r\n\t // Specify your developer key \r\n\t builder.setParameter(\"key\", \"Z2CA71LM\"); \r\n\t // Specify values for the following required parameters \r\n\t builder.setParameter(\"oName\", \"ICN\"); \r\n\t builder.setParameter(\"dName\", \"LAX\");\r\n//\t builder.setParameter(\"oPos\", \"New York Kennedy\");\r\n//\t builder.setParameter(\"dPos\", \"40.64441,-73.78275\");\r\n//\t builder.setParameter(\"flags\", \"0x000FFFF0\");\r\n//\t builder.setParameter(\"flags\", \"0x000FFFFE\");\r\n\t builder.setParameter(\"flags\", \"0x000FFFFC\");\r\n\t \r\n//\t URI uri = builder.build(); \r\n\t HttpGet request = new HttpGet(uri); \r\n\t HttpResponse response = httpclient.execute(request); \r\n*/\t \r\n\t\t\tHttpEntity entity = res.getEntity();\r\n\t if (entity != null) { \r\n\t System.out.println(\"EntityUtil:\" + EntityUtils.toString(entity)); \r\n\t }\r\n//\t return EntityUtils.toString(entity);\r\n\t\t\tlogger.info(\"aaa: {}\", entity.toString());\r\n\t }\r\n\t catch(Exception e) \r\n\t { \r\n\t System.out.println(e.getMessage()); \r\n//\t return null;\r\n\t } \r\n\t \r\n\t}",
"public void LoadNews()\n {\n String url = \"https://newsapi.org/v1/articles?source=the-next-web&apiKey=533af958594143758318137469b41ba9\";\n Load_News = new StringRequest(Request.Method.GET,url,Success,Error);\n rQueue = ApplicationSingleton.getInstance().getQueue();\n rQueue.add(Load_News);\n\n\n }",
"public static String getPage(String u) throws IOException {\n\t\tURL url = new URL(u);\n\t\tURLConnection yc = url.openConnection();\n\t\tyc.addRequestProperty(\"User-Agent\", \"Mozilla/4.76\"); \n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(\n\t\t\t\tyc.getInputStream()));\n\t\tString inputLine;\n\t\tString content=\"\";\n\t\twhile ((inputLine = in.readLine()) != null)\n\t\t\tcontent+=inputLine+\"\\n\";\n\t\tin.close();\n\t\treturn content;\n\t}",
"private void startSendHttpRequestThread(final String word)\n {\n\n Thread sendHttpRequestThread = new Thread()\n {\n @Override\n public void run() {\n // using Panel 7.2.21 as a model- The Movie API\n\n //make empty URL and connection\n URL url;\n HttpURLConnection ur1Connection = null; //HttpsURLConnection aiso avaitab1e\n try {\n\n //String service = reqUrl; // call rhymebrain\n String service = \"https://rhymebrain.com/talk?\"; // call rhymebrain\n //String parm = \"getRhymes&word=\" + word;\n //String queryString = URLEncoder.encode(parm, \"UTF-8\");\n String queryString = \"getRhymes&word=\" + word + \"&maxResults=\" + String.valueOf(MAX_RESULTS);\n //try to process url and connect to it\n url = new URL( service + \"function=\" + queryString);\n Log.d(\"which URL: \", String.valueOf(url));\n ur1Connection = (HttpURLConnection)url.openConnection();\n ur1Connection.setRequestMethod(\"GET\");\n\n // Set connection timeout and read timeout value.\n ur1Connection.setConnectTimeout(70000);\n ur1Connection.setReadTimeout(70000);\n\n //create an input stream and stream reader from the connection\n InputStream inputStream = ur1Connection.getInputStream();\n InputStreamReader inputStreamReader = new InputStreamReader(inputStream);\n\n //get some data from the stream\n int data = inputStreamReader.read();\n //string for collecting all output\n output = \"\";\n //if the stream is not empty\n while(data != -1) {\n //turn what we read into a char and print it\n char current = (char) data;\n output += current;\n data = inputStreamReader.read();\n\n //Log.d(\"Network\", output);\n }\n Log.d(\"Network\", output);\n parseJSON(output);\n int i =0;\n }catch (Exception e) {\n Log.d( \"Network\", e.toString());\n }finally {\n if (ur1Connection != null) {\n ur1Connection.disconnect();\n ur1Connection = null;\n }\n }\n }\n\n };\n // Start the child thread to request web page.\n sendHttpRequestThread.start();\n }",
"private void getHTMLOffer(String href, int index){\r\n ArrayList<String> htmlOffer = new ArrayList<>();\r\n \r\n try{\r\n URLConnection connection = new URL(href).openConnection();\r\n connection.setRequestProperty(\"Accept-Charset\", \"UTF-8\");\r\n BufferedReader in = new BufferedReader(\r\n new InputStreamReader(connection.getInputStream()));\r\n\r\n String inputLine;\r\n while ((inputLine = in.readLine()) != null){\r\n htmlOffer.add(inputLine);\r\n }\r\n \r\n in.close();\r\n } catch (MalformedURLException ex) {\r\n Logger.getLogger(OfferGeneralInformation.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (IOException ex) {\r\n Logger.getLogger(OfferGeneralInformation.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n SaveSingleOfferHTML saveOffer = new SaveSingleOfferHTML(htmlOffer, index);\r\n }\r\n }",
"@Override\n protected Void doInBackground(Void... params) {\n try {\n documentoHtml = Jsoup.connect(\"http://eldolarenmexico.com/\").get();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return null;\n }",
"@Override\n public void onResponse(Call call, Response response) throws IOException {\n String html = null;\n try {\n JSONObject jsonObject = new JSONObject(response.body().string()).getJSONObject(\"data\");\n// Log.d(TAG, \"onResponse: \" + jsonObject);\n// OneData.contentData = new Gson().fromJson(jsonObject.toString(), OneContentData.class);\n html = jsonObject.getString(\"html_content\");\n // Todo: Jsoup解析一下\n Log.d(TAG, \"onResponse: \" + html.substring(html.indexOf(\"body\", 0), html.length()));\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }",
"public void LauncUrl(String url) {\ndriver.get(url);\n\t}",
"public void testBrokenLinks() throws InterruptedException {\n\t\tJavascriptExecutor jse = (JavascriptExecutor) (driver);\n\t\ttry {\n\t\t\tThread.sleep(5000);\n\t\t} catch (InterruptedException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tList<WebElement> allLinks = driver.findElements(By.xpath(\"//a\"));\n\n\t\tint totalLinks = 0, failedLinks = 0;\n\n\t\tfor (WebElement link : allLinks) {\n\t\t\tString src = link.getAttribute(\"href\");\n\t\t\t// System.out.println(src);\n\n\t\t\tif (null != src && src.trim().startsWith(\"javascript\")) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (null != src && (!(src.startsWith(\"http://\") || src.startsWith(\"https://\")))) {\n\t\t\t\tsrc = baseUrl + src;\n\n\t\t\t}\n\t\t\t// System.out.println(\"Source:\"+src);\n\t\t\tif (null != src) {\n\t\t\t\ttotalLinks++;\n\t\t\t\tThread.sleep(200);\n\t\t\t\t// String linkName=link.getText();\n\t\t\t\tString linkName = ((String) jse.executeScript(\"var e=arguments[0];return e.innerText;\", link))\n\t\t\t\t\t\t.replaceAll(\"\\n\", \"\").trim();\n\t\t\t\tif (linkName.trim().equals(\"\"))\n\t\t\t\t\tThread.sleep(200);\n\t\t\t\t{\n\t\t\t\t\tlinkName = ((String) jse.executeScript(\"var e=arguments[0];return e.innerHTML;\", link))\n\t\t\t\t\t\t\t.replaceAll(\"\\n\", \"\").trim();\n\t\t\t\t}\n\t\t\t\tURL url;\n\t\t\t\tHttpURLConnection conn;\n\t\t\t\tint response = 0;\n\t\t\t\ttry {\n\t\t\t\t\turl = new URL(src);\n\t\t\t\t\tconn = (HttpURLConnection) url.openConnection();\n\t\t\t\t\tresponse = conn.getResponseCode();\n\t\t\t\t\tif (response != HttpURLConnection.HTTP_OK) {\n\t\t\t\t\t\tSystem.out.println(\"Link: \" + linkName + \"is broken\");\n\t\t\t\t\t\tSystem.out.println(\"Broken URL: \" + src);\n\t\t\t\t\t\tSystem.out.println(\"Resonse is: \" + response);\n\t\t\t\t\t\tfailedLinks++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.out.println(\"Link: \" + linkName + \"is Working\");\n\t\t\t\t\t}\n\t\t\t\t} catch (MalformedURLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tSystem.out.println(\"Link: \" + linkName + \"is broken\");\n\t\t\t\t\tfailedLinks++;\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tSystem.out.println(\"Link: \" + linkName + \"is broken\");\n\t\t\t\t\tfailedLinks++;\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(\"Total Links Verified:\" + totalLinks + \"\\n Failed Links Count :\" + failedLinks);\n\n\t}",
"@RequestMapping(path = \"/lemmieYada\", method = RequestMethod.GET)\n public ResponseEntity<ArrayList<String>> letMeYada(@RequestParam (value = \"url\", required = false) String url) throws IOException {\n\n ArrayList<String> scrapedSite = soupThatSite(url);\n\n return new ResponseEntity<>(scrapedSite, HttpStatus.OK);\n }",
"@Override\n public boolean shouldOverrideUrlLoading(WebView view, String url) {\n try {\n webview.loadUrl(\"http://www.sina.com/\");\n sleep(5);\n webview.loadUrl(\"http://www.163.com/\");\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n return true;\n }",
"private String doHttpClientGet() {\n\t\t\r\n\t\tHttpGet httpGet=new HttpGet(url);\r\n\t\tHttpClient client=new DefaultHttpClient();\r\n\t\ttry {\r\n\t\t\tHttpResponse response=client.execute(httpGet);\r\n\t\t\tif(response.getStatusLine().getStatusCode()==HttpStatus.SC_OK){\r\n\t\t\t\tresult=EntityUtils.toString(response.getEntity());\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"content----->\"+result);\r\n\t\t} catch (ClientProtocolException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"private static String getHTTPResponse(URL url){\n\t\t\n\t\tStringBuilder response = new StringBuilder();\n\t\t\n\t\ttry{\n\t\t\tURLConnection connection = url.openConnection();\n\t\t\tBufferedReader res = new BufferedReader(new InputStreamReader(connection.getInputStream()));\n\t\t\tString responseLine;\n\t\t\t\n\t\t\twhile((responseLine = res.readLine()) != null)\n\t\t\t\tresponse.append(responseLine);\n\t\t\t\n\t\t\t\n\t\t}catch(Exception e){System.out.println(\"Error - wrong input or service down\");}\n\t\t\n\t\treturn response.toString();\n\t}",
"public static String getResponse(String url_string, int cacheTime) {\n long current = System.currentTimeMillis();\n\n // rate limiting\n int timePassed = (int) ((current - LAST_CHECK) / 1000);\n LAST_CHECK = current;\n // unit: seconds\n int PER = 60;\n allowance += timePassed * (REQUEST_RATE / PER);\n if (allowance > REQUEST_RATE) {\n allowance = REQUEST_RATE; // throttle\n }\n while (allowance < 1) {\n try {\n //noinspection BusyWait\n Thread.sleep(10000);\n } catch (InterruptedException e) {\n Thread.currentThread().interrupt();\n }\n // rate limiting\n int timePassedLoop = (int) ((current - LAST_CHECK) / 1000);\n LAST_CHECK = current;\n allowance += timePassed * (REQUEST_RATE / PER);\n if (allowance > REQUEST_RATE) {\n allowance = REQUEST_RATE; // throttle\n }\n }\n allowance -= 1;\n\n\n StringBuffer response;\n HttpURLConnection con = null;\n try {\n URL url = new URL(url_string);\n\n con = (HttpURLConnection) url.openConnection();\n con.setRequestMethod(\"GET\");\n con.setRequestProperty(\"User-Agent\", USER_AGENT);\n\n BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));\n response = new StringBuffer();\n\n String inputLine;\n while ((inputLine = in.readLine()) != null) {\n response.append(inputLine);\n }\n in.close();\n fails = 0;\n return response.toString();\n } catch (IOException ioException) {\n\n int responseCode = -1;\n try {\n if (con != null) responseCode = con.getResponseCode();\n } catch (IOException ex) {\n if (fails > 20) return null;\n fails++;\n if (fails % 10 == 0) {\n AutoWhiteList.logger.warning(\"Failed to connect to the SlothPixel API \" + fails + \" times: \" + ex);\n }\n }\n\n if (responseCode == 429) {\n try {\n Thread.sleep(17000);\n } catch (InterruptedException e) {\n Thread.currentThread().interrupt();\n }\n } else {\n if (fails > 20) return null;\n fails++;\n if (fails % 10 == 0) {\n AutoWhiteList.logger.warning(\"Failed to connect to the Hypixel API \" + fails + \" times: \" + ioException);\n }\n try {\n Thread.sleep((long) Math.min(20, Math.pow(fails, 2)));\n } catch (InterruptedException e) {\n Thread.currentThread().interrupt();\n }\n }\n return getResponse(url_string, cacheTime);\n }\n }",
"public static void main(String[] args) {\n\r\n\t\tMultiValueMap<String, String> s = new LinkedMultiValueMap<String, String>();\r\n\t\tString useragent=\"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36\";\r\n\t\ts.add(\"User-Agent\",useragent);\r\n\t\ts.add(\"Host\",\"https://www.baidu.com\");\r\n\t\tHttpHeaders headers =new HttpHeaders();\r\n\t\theaders.add(\"User-Agent\",useragent);\r\n\t\tString baidu=sendGetRequest(\"https://www.baidu.com\", s, headers);\r\n\t\tSystem.out.println(baidu);\r\n\t}",
"@Override\n protected String doInBackground(String... urls) {\n try {\n try {\n return httpPost(url);\n } catch (JSONException e) {\n e.printStackTrace();\n return \"Error!\";\n }\n } catch (IOException e) {\n return \"Unable to retrieve web page. URL may be invalid.\";\n }\n }",
"public PageTransporter() {\n System.out.println(ReadProperties.getInstance().getUrl());\n driver.get(ReadProperties.getInstance().getUrl());\n }",
"public void run() {\n if(isOnline){\n if(!webView.getUrl().contains(MainActivity.url)){\n webView.loadUrl(url);\n// webView.addJavascriptInterface(new WebAppInterface(context), \"Android\");\n\n }\n }else {\n webView.loadUrl(\"file:///android_asset/noConnection.html\");\n\n }\n }",
"public void internetConnectionProble()\n\t\t{\n\n\n\t\t}",
"private String getResponseFromHttpUrl(URL url) throws IOException {\n HttpsURLConnection urlConnection = (HttpsURLConnection) url.openConnection();\n urlConnection.addRequestProperty(\"Authorization\",\"Bearer JVNDXWXVDDQN2IJUJJY7NQXCPS23M7DX\");\n try{\n InputStream in = urlConnection.getInputStream();\n\n Scanner scanner = new Scanner(in);\n scanner.useDelimiter(\"\\\\A\");\n boolean hasInput = scanner.hasNext();\n if(hasInput){\n return scanner.next();\n }else{\n return null;\n }\n }finally {\n urlConnection.disconnect();\n }\n }",
"@Override\n protected String doInBackground(Void... params) {\n String desc = null;\n try {\n // Connect to the web site - olakšava povezivanje na web stranicu, ali ignoriraj content type (bez raspakiravanja)\n desc = Jsoup.connect(RadioConstants.RS_PLAY_LIST_URI).ignoreContentType(true).execute().body();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return desc;\n }",
"void blocked(HttpServletRequest request, HttpServletResponse response) throws IOException;",
"@Test\n\t \n\t public void getApi() {\n\t\t \n\t\t Response getIt=get(\"https://reqres.in/api/users?page=2\");\n\t\t getIt.prettyPrint();\n\t\t System.out.println(getIt.getStatusCode());\n\t\t System.out.println(getIt.getTime());\n\t\t \n\t\t //to validate\n\t\t int validGstatus=getIt.getStatusCode();\n\t\t Assert.assertEquals(validGstatus,200);\n\t\t \n\t }",
"@Override\n public void onResponse(String response) {\n progressDialog.dismiss();\n Log.d(\"Text on webpage: \", \"\" + response);\n checkResponse(response);\n }",
"@Override\n public void onReceivedError(WebView view, WebResourceRequest request, WebResourceError error) {\n Log.v(\"WVClient.onReceiveError\", \" receieved an error\" + error);\n\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n onSendUpdate(\"WVClient has received an error!\");\n }\n });\n\n //do what would be done in processHTML but avoid anything to do with scraping, move onto next page\n crawlComplete = false;\n\n if (masterEmailSet.size() > 20){\n //if more than twenty emails have been discovered, the crawl is done\n crawlComplete = true;\n }\n\n if (masterEmailSet.size() > 0 && !searchTerm.equals(\"\")){\n //if at least one email with the search term has been found, crawl is done\n crawlComplete = true;\n }\n\n\n if (collectedLinks.iterator().hasNext() && !crawlComplete){\n //if there's another link and crawl isn't deemed complete, hit next URL\n browser.post(new Runnable() {\n @Override\n public void run() {\n Log.v(\"processHTML\", \" loading page on browser:\" + collectedLinks.iterator().next());\n visitedLinks.add(collectedLinks.iterator().next());\n browser.loadUrl(collectedLinks.iterator().next());\n }\n });\n }\n }",
"private String readHTML(URL url) {\n String urlContents = \"\";\n\n try {\n BufferedReader bufferedReader =\n new BufferedReader(new InputStreamReader(url.openStream()));\n StringBuilder stringBuilder = new StringBuilder();\n\n String line;\n while ((line = bufferedReader.readLine()) != null) {\n stringBuilder.append(line).append(\"\\n\");\n }\n\n urlContents = stringBuilder.toString();\n bufferedReader.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return urlContents;\n }",
"private String getResultByUrl(String url) {\r\n\r\n\t\tRequestConfig.Builder requestBuilder = RequestConfig.custom();\r\n\t\trequestBuilder = requestBuilder.setConnectTimeout(75000);\r\n\t\trequestBuilder = requestBuilder.setConnectionRequestTimeout(75000);\r\n\t\trequestBuilder.setSocketTimeout(75000);\r\n\r\n\t\tHttpClientBuilder builder = HttpClientBuilder.create();\r\n\t\tbuilder.setDefaultRequestConfig(requestBuilder.build());\r\n\t\tclient = builder.build();\r\n\r\n\t\trequest = new HttpGet(url);\r\n\t\trequest.addHeader(\"Accept\", \"application/json\");\r\n\r\n\t\tHttpResponse response = null;\r\n\t\tString r = \"\";\r\n\r\n\t\ttry {\r\n\t\t\tfor (int i = 0; i < 7; i++) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tSystem.out.println(\"Sending request: \" + url);\r\n\t\t\t\t\tresponse = client.execute(request);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t} catch (ConnectionPoolTimeoutException e) {\r\n\t\t\t\t\tSystem.out.println(\"Connection timeout. Trying again...\");\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tTimeUnit.SECONDS.sleep(10);\r\n\t\t\t\t\t} catch (InterruptedException ex) {\r\n\t\t\t\t\t\tex.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tSystem.out.println(\"Response Code : \"\r\n\t\t\t\t\t+ response.getStatusLine().getStatusCode());\r\n\r\n\t\t\tbr = new BufferedReader(new InputStreamReader(response.getEntity()\r\n\t\t\t\t\t.getContent()));\r\n\r\n\t\t\tStringBuffer result = new StringBuffer();\r\n\t\t\tString line = \"\";\r\n\t\t\twhile ((line = br.readLine()) != null) {\r\n\t\t\t\tresult.append(line);\r\n\t\t\t}\r\n\t\t\tSystem.out.println(result + \"\\n\");\r\n\t\t\ttry {\r\n\t\t\t\tTimeUnit.SECONDS.sleep(1);\r\n\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tr = result.toString();\r\n\t\t\tGson gson = new GsonBuilder().setPrettyPrinting().create();\r\n\r\n\t\t\tJsonObject jsonResult = gson.fromJson(result.toString(),\r\n\t\t\t\t\tJsonObject.class);\r\n\t\t\tif (jsonResult.get(\"backoff\") != null) {\r\n\t\t\t\tint backoff = (jsonResult.get(\"backoff\")).getAsInt();\r\n\t\t\t\ttry {\r\n\t\t\t\t\tSystem.out.println(\"Received backoff. Waiting for \"\r\n\t\t\t\t\t\t\t+ backoff + \"seconds...\");\r\n\t\t\t\t\tTimeUnit.SECONDS.sleep(backoff + 5);\r\n\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn r;\r\n\t}",
"@Override\n public void onReceivedError(WebView view, WebResourceRequest request, WebResourceError error){\n Toast.makeText(getApplicationContext(), \"Your Internet Connection May not be active Or \" + error , Toast.LENGTH_LONG).show();\n\n }",
"private void getReportReasonApi() {\n if (CommonClass.isNetworkAvailable(mActivity)) {\n String url = ApiUrl.REPORT_USER_REASON + \"?token=\" + mSessionManager.getAuthToken();\n mProgressBar.setVisibility(View.VISIBLE);\n OkHttp3Connection.doOkHttp3Connection(TAG, url, OkHttp3Connection.Request_type.GET, new JSONObject(), new OkHttp3Connection.OkHttp3RequestCallback() {\n @Override\n public void onSuccess(String result, String user_tag) {\n System.out.println(TAG + \" \" + \"get report reason res=\" + result);\n\n mProgressBar.setVisibility(View.GONE);\n System.out.println(TAG + \" \" + \"report post reason res=\" + result);\n\n Gson gson = new Gson();\n ReportProductMain reportProductMain = gson.fromJson(result, ReportProductMain.class);\n\n switch (reportProductMain.getCode()) {\n // success\n case \"200\":\n arrayListReportItem.addAll(reportProductMain.getData());\n if (arrayListReportItem != null && arrayListReportItem.size() > 0) {\n rL_submit.setVisibility(View.VISIBLE);\n ReportItemRvAdapter reportItemRvAdapter = new ReportItemRvAdapter(mActivity, arrayListReportItem, true);\n LinearLayoutManager linearLayoutManager = new LinearLayoutManager(mActivity);\n rV_reportUser.setLayoutManager(linearLayoutManager);\n rV_reportUser.setAdapter(reportItemRvAdapter);\n }\n break;\n\n // auth token expired\n case \"401\":\n CommonClass.sessionExpired(mActivity);\n break;\n\n //error\n default:\n break;\n }\n }\n\n @Override\n public void onError(String error, String user_tag) {\n\n }\n });\n } else\n CommonClass.showSnackbarMessage(rL_rootElement, getResources().getString(R.string.NoInternetAccess));\n }",
"private void parseData(String url, String response) {\n\n if (response.isEmpty()) {\n if (!mErrorMessage.isEmpty()) {\n alertParseErrorAndFinish(mErrorMessage);\n } else {\n renderData();\n }\n } else {\n if (mItemTotal == 0) {\n //---------------------------------------------------------------------------------\n // 목록 파싱하기 - 아메바 블로그의 HTML 코드가 변경됨. 파서 다시 만들어야 함. 2016-09-10\n //---------------------------------------------------------------------------------\n switch (mSiteData.getId()) {\n case Config.BLOG_ID_AKB48_TEAM8:\n Akb48Parser akb48Parser = new Akb48Parser();\n akb48Parser.parseTeam8ReportList(response, mNewDataList);\n break;\n case Config.BLOG_ID_SKE48_SELECTED:\n case Config.BLOG_ID_NMB48_OFFICIAL:\n BaseParser parser = new BaseParser();\n parser.parseAmebaList(response, mNewDataList);\n mItemTotal = mNewDataList.size();\n break;\n case Config.BLOG_ID_NGT48_MANAGER:\n Ngt48Parser ngt48manager = new Ngt48Parser();\n ngt48manager.parseLineBlogList(response, mNewDataList);\n //Collections.sort(mNewDataList);\n //Collections.sort(mNewDataList, Collections.reverseOrder());\n break;\n case Config.BLOG_ID_NGT48_PHOTOLOG:\n Ngt48Parser ngt48photo = new Ngt48Parser();\n ngt48photo.parseMemberBlogList(response, mNewDataList);\n //Collections.sort(mNewDataList);\n Collections.sort(mNewDataList, Collections.reverseOrder());\n break;\n }\n }\n\n //-------------------------------\n // 항목별 사진 파싱하기\n //-------------------------------\n if (mItemTotal > 0) { // && mItemTotal >= mItemCount) {\n if (mItemCount > 0) {\n BaseParser parser = new BaseParser();\n String[] array = parser.parseAmebaArticle(response);\n\n WebData webData = mNewDataList.get(mItemCount - 1);\n webData.setContent(array[0]);\n webData.setImageUrl(array[1]);\n }\n\n if (mItemCount < mItemTotal) {\n WebData webData = mNewDataList.get(mItemCount);\n String reqUrl = webData.getUrl();\n String reqAgent = Config.USER_AGENT_MOBILE;\n\n requestData(reqUrl, reqAgent);\n updateProgress();\n\n mItemCount++;\n } else {\n mItemTotal = 0;\n mItemCount = 0;\n mPbLoadingHorizontalMore.setProgress(0);\n }\n }\n\n if (mItemTotal == 0) {\n renderData();\n }\n }\n }",
"@Override\n\t\t\tpublic boolean shouldOverrideUrlLoading(WebView view, String url) {\n\t\t\t\tif (url.startsWith(\"http://www.cognustechnology.com/\")) {\n\t\t\t\t\t// authorization complete hide webview for now.\n//\t\t\t\t\twebview.setVisibility(View.GONE);\n\n\t\t\t\t\tUri uri = Uri.parse(url);\n\t\t\t\t\tLoader loader = new Loader();\n\t\t\t\t\tloader.execute(uri);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\treturn super.shouldOverrideUrlLoading(view, url);\n\t\t\t}",
"@Test\n public void test() throws IOException {\n String url = \"http://blog.csdn.net/seatomorrow/article/details/48393547\";\n Readability readability = new Readability(getDoc(url)); // URL\n readability.init();\n String cleanHtml = readability.outerHtml();\n System.out.println(cleanHtml);\n }",
"private static String fetchHTML(String link) {\n\t\tStringBuffer buffer = null;\n\t\ttry {\n\t\t\tURL url = new URL(getURL(link));\n\t\t\tInputStream is = url.openStream();\n\t\t\tint ptr = 0;\n\t\t\tbuffer = new StringBuffer();\n\t\t\twhile ((ptr = is.read()) != -1) {\n\t\t\t buffer.append((char)ptr);\n\t\t\t}\n\t\t} catch (Exception ex) {\n\t\t\tSystem.out.println(ex.getMessage());\n\t\t\tex.printStackTrace();\n\t\t}\n\t\treturn buffer.toString();\n\t}",
"private void doGetFromWebsite(HttpServletRequest request, HttpServletResponse response) {\n\t\tString PID = request.getParameter(\"id\");\n\t\tString doctor = request.getParameter(\"doctor\");\n\t\tString reservationType = request.getParameter(\"reservationType\");\n\t\t\n\t\tif(reservationType.equals(\"0\"))\n\t\t\tconnector.writeReservationInformation(PID, \"jason\", \"\");\n\t\telse{\n\t\t\tconnector.writeReservationInformation(PID, \"jason\", doctor);\n\t\t}\n\t\tVector vector = connector.queryReservationInformation(PID);\n\t\tWaitInformation info = new WaitInformation();\n\t\t//可能门诊诊间还没有生成排队信息,如果是这样就先默认几个值\n\t\tif(vector == null){\n\t\t\tinfo.setPeopleCount(0);\n\t\t\tinfo.setSucceed(true);\n\t\t\tinfo.setWaitTime(0);\n\t\t}else{\n\t\t\tint peopleCount = (Integer)vector.get(0);\n\t\t\tinfo.setPeopleCount(peopleCount);\n\t\t\tinfo.setSucceed(true);\n\t\t\t//因为门诊诊间没有提供预计等待时间的功能,所以这里我们假设等待时间是病人数*5\n\t\t\tinfo.setWaitTime(peopleCount * 5);\n\t\t}\n\t\t\n\t\tRequestDispatcher dispatcher = request.getRequestDispatcher(\"show.jsp\");\n\t\trequest.setAttribute(\"data\", info);\n\t\ttry {\n\t\t\tdispatcher.forward(request, response);\n\t\t} catch (ServletException 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}",
"public static void main(String[] args) throws Exception {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:\\\\LOVELY\\\\selenium20\\\\chromedriver_win32 (1)\\\\chromedriver.exe\");\r\n\t\tSystem.setProperty(\"webdriver.chrome.silentOutput\", \"true\");\r\n\t\tChromeDriver driver=new ChromeDriver();\r\n\t\tdriver.manage().window().maximize();\r\n\t\tdriver.manage().timeouts().implicitlyWait(5000, TimeUnit.MILLISECONDS);\r\n\t\tdriver.get(\"https://www.spicejet.com/\");\r\n\t\tint chl=0,cwl=0,cbl=0;\r\n\t\tList<WebElement> l1=driver.findElements(By.xpath(\"(//a)|(//link)|(//script)|(//base)|(//area)|(//href)|(//img)\"));\r\n\t\t\r\n\t\t//List<WebElement> l2=new ArrayList<WebElement>();\r\n\t\t\r\n\t\tfor(WebElement e:l1) {\r\n\t\t\t\r\n\t\t\tif(e.getAttribute(\"href\")!=null) {\r\n\t\t\t\t//l2.add(e);\r\n\t\t\t\tString href_val=e.getAttribute(\"href\");\r\n\t\t\t\tif(!href_val.equals(\"\")) {\r\n\t\t\t\t\tif(href_val.startsWith(\"http\")||href_val.startsWith(\"https\")) {\r\n\t\t\t\t\t\tchl++;\r\n\t\t\t\t\t\tURL url=new URL(href_val);\r\n\t\t\t\t\t\tURLConnection con=url.openConnection();\r\n\t\t\t\t\t\tHttpURLConnection httpCon=(HttpURLConnection) con;\r\n\t\t\t\t\t\t// httpCon.setConnectTimeout(5000);\r\n\t\t\t\t\t\t httpCon.connect();\r\n\t\t\t\t\t\t String res=httpCon.getResponseMessage();\r\n\t\t\t\t\t\t httpCon.disconnect();\r\n\t\t\t\t\t\t if(res.equalsIgnoreCase(\"OK\")||res.equalsIgnoreCase(\"Accepted\")||res.equalsIgnoreCase(\"Found\")||res.equalsIgnoreCase(\"200\")||res.equalsIgnoreCase(\"202\")||res.equalsIgnoreCase(\"302\")) \r\n\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t cwl++;\r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t\t else {\r\n\t\t\t\t\t\t\t cbl++;\r\n\t\t\t\t\t\t\t System.out.println(href_val+\":\"+res);\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\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t}\r\n\t\tSystem.out.println(\"Count all link type elements:\"+chl);\r\n\t\tSystem.out.println(\"Total no of working links: \"+cwl);\r\n\t\tSystem.out.println(\"Total no of broken links: \"+cbl);\r\n\t\tdriver.close();\r\n\t\t\r\n\t\t}",
"public void page()\n {\n com.jayway.restassured.response.Response response= given().relaxedHTTPSValidation().when().get(\"http://18.222.188.206:3333/accounts?_page=3\");\n response.then().assertThat().statusCode(200);\n System.out.println(\"The list of accounts in the page 3 is displayed below:\");\n response.prettyPrint();\n }",
"public void getLinks() {\n\n var client = HttpClient.newBuilder()\n .followRedirects(HttpClient.Redirect.ALWAYS)\n .build();\n\n HttpRequest request = HttpRequest.newBuilder()\n .uri(URI.create(URL_PREFIX))\n .build();\n client.sendAsync(request, HttpResponse.BodyHandlers.ofLines())\n .thenApply(HttpResponse::body)\n .thenApply(this::processLines)\n .thenApply(versions -> tasks(versions))\n .join();\n }",
"public static void main(String[] args) throws InterruptedException, MalformedURLException, IOException {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:\\\\Users\\\\Saurabh\\\\chromedriver.exe\");\n\n\t\tWebDriver driver = new ChromeDriver();\n\t\tdriver.get(\"https://rahulshettyacademy.com/AutomationPractice/\");\n\t\tdriver.manage().window().maximize();\n\t\tdriver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);\n\t\t\n\t\t// Code to get the status of one link\n\t\tString url = driver.findElement(By.cssSelector(\"a[href*='brokenlink']\")).getAttribute(\"href\");\n\t\t\n\t\t// use opeConnection method of URL Class of Java\n\t\t\n\t\tHttpsURLConnection con = (HttpsURLConnection)new URL(url).openConnection();\n\t\tcon.setRequestMethod(\"HEAD\");\n\t\tcon.connect();\n\t\tint responseCode = con.getResponseCode();\n\t\tSystem.out.println(responseCode);\n\t\t\n\t\t\n//\t\tSystem.out.println(columnDriver.findElements(By.tagName(\"a\")).size());\n//\t\tint columnLinkSize = columnDriver.findElements(By.tagName(\"a\")).size();\n//\t\t\n//\t\tList<WebElement> columnLink= columnDriver.findElements(By.tagName(\"a\"));\n//\t\t\n//\t\tString keyAction = Keys.chord(Keys.CONTROL, Keys.ENTER);\n//\t\t\n//\t\tfor(int i=0; i<columnLinkSize ; i++)\n//\t\t{\n//\t\t\tcolumnLink.get(i).sendKeys(keyAction);\n//\t\t\tSystem.out.println(driver.getTitle());\n//\t\t\tThread.sleep(5000);\n//\t\t}\n\t\t \n//\t\tdriver.quit();\n\t\t\n\t}",
"private WebRequest() {\n initFields();\n }",
"@Override\n protected String doInBackground(String... urls) {\n try {\n return downloadUrl(urls[0]);\n } catch (IOException e) {\n return \"Unable to retrieve web page. URL may be invalid.\";\n }\n }",
"@Override\n protected String doInBackground(String... urls) {\n try {\n return downloadUrl(urls[0]);\n } catch (IOException e) {\n return \"Unable to retrieve web page. URL may be invalid.\";\n }\n }",
"@Override\n protected String doInBackground(String... urls) {\n try {\n return downloadUrl(urls[0]);\n } catch (IOException e) {\n return \"Unable to retrieve web page. URL may be invalid.\";\n }\n }",
"@Override\n protected String doInBackground(String... urls) {\n try {\n return downloadUrl(urls[0]);\n } catch (IOException e) {\n return \"Unable to retrieve web page. URL may be invalid.\";\n }\n }",
"@Override\n protected String doInBackground(String... urls) {\n try {\n return downloadUrl(urls[0]);\n } catch (IOException e) {\n return \"Unable to retrieve web page. URL may be invalid.\";\n }\n }",
"@Override\n protected String doInBackground(String... urls) {\n try {\n return downloadUrl(urls[0]);\n } catch (IOException e) {\n return \"Unable to retrieve web page. URL may be invalid.\";\n }\n }",
"@Override\n protected String doInBackground(String... urls) {\n try {\n return downloadUrl(urls[0]);\n } catch (IOException e) {\n return \"Unable to retrieve web page. URL may be invalid.\";\n }\n }",
"@Override\n protected String doInBackground(String... urls) {\n try {\n return downloadUrl(urls[0]);\n } catch (IOException e) {\n return \"Unable to retrieve web page. URL may be invalid.\";\n }\n }",
"@Override\n protected String doInBackground(String... urls) {\n try {\n return downloadUrl(urls[0]);\n } catch (IOException e) {\n return \"Unable to retrieve web page. URL may be invalid.\";\n }\n }",
"@Override\n protected String doInBackground(String... urls) {\n try {\n return downloadUrl(urls[0]);\n } catch (IOException e) {\n return \"Unable to retrieve web page. URL may be invalid.\";\n }\n }",
"public void loadPage(){\r\n\r\n driver.get(getPAGE_Url());\r\n driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);\r\n\r\n }",
"private void fetchNextBlock() {\n try {\n \tSearchClient _client = new SearchClient(\"cubansea-instance\");\n \tWebSearchResults _results = _client.webSearch(createNextRequest());\n \t\tfor(WebSearchResult _result: _results.listResults()) {\n \t\t\tresults.add(new YahooSearchResult(_result, cacheStatus+1));\n \t\t\tcacheStatus++;\n \t\t}\n \t\tif(resultCount == -1) resultCount = _results.getTotalResultsAvailable().intValue();\n } catch (IOException e) {\n\t\t\tthrow new TechnicalError(e);\n\t\t} catch (SearchException e) {\n\t\t\tthrow new TechnicalError(e);\n\t\t}\n\t}",
"public String requestContent(String urlStr) {\n String result = null;\n HttpURLConnection urlConnection;\n try {\n URL url = new URL(urlStr);\n urlConnection = (HttpURLConnection) url.openConnection();\n } catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n try {\n InputStream in = new BufferedInputStream(urlConnection.getInputStream());\n result = convertStreamToString(in);\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n urlConnection.disconnect();\n }\n return result;\n }",
"@Test //ExSkip\r\n public void webRequestTimeout() throws Exception\r\n {\r\n // Create a new HtmlLoadOptions object and verify its timeout threshold for a web request.\r\n HtmlLoadOptions options = new HtmlLoadOptions();\r\n\r\n // When loading an Html document with resources externally linked by a web address URL,\r\n // Aspose.Words will abort web requests that fail to fetch the resources within this time limit, in milliseconds.\r\n Assert.assertEquals(100000, options.getWebRequestTimeout());\r\n\r\n // Set a WarningCallback that will record all warnings that occur during loading.\r\n ListDocumentWarnings warningCallback = new ListDocumentWarnings();\r\n options.setWarningCallback(warningCallback);\r\n\r\n // Load such a document and verify that a shape with image data has been created.\r\n // This linked image will require a web request to load, which will have to complete within our time limit.\r\n String html = $\"\\n <html>\\n <img src=\\\"{ImageUrl}\\\" alt=\\\"Aspose logo\\\" style=\\\"width:400px;height:400px;\\\">\\n </html>\\n \";\r\n\r\n // Set an unreasonable timeout limit and try load the document again.\r\n options.setWebRequestTimeout(0);\r\n Document doc = new Document(new MemoryStream(Encoding.getUTF8().getBytes(html)), options);\r\n Assert.assertEquals(2, warningCallback.warnings().size());\r\n\r\n // A web request that fails to obtain an image within the time limit will still produce an image.\r\n // However, the image will be the red 'x' that commonly signifies missing images.\r\n Shape imageShape = (Shape)doc.getChild(NodeType.SHAPE, 0, true);\r\n Assert.assertEquals(924, imageShape.getImageData().getImageBytes().length);\r\n\r\n // We can also configure a custom callback to pick up any warnings from timed out web requests.\r\n Assert.assertEquals(WarningSource.HTML, warningCallback.warnings().get(0).getSource());\r\n Assert.assertEquals(WarningType.DATA_LOSS, warningCallback.warnings().get(0).getWarningType());\r\n Assert.assertEquals($\"Couldn't load a resource from \\'{ImageUrl}\\'.\", warningCallback.warnings().get(0).getDescription());\r\n\r\n Assert.assertEquals(WarningSource.HTML, warningCallback.warnings().get(1).getSource());\r\n Assert.assertEquals(WarningType.DATA_LOSS, warningCallback.warnings().get(1).getWarningType());\r\n Assert.assertEquals(\"Image has been replaced with a placeholder.\", warningCallback.warnings().get(1).getDescription());\r\n\r\n doc.save(getArtifactsDir() + \"HtmlLoadOptions.WebRequestTimeout.docx\");\r\n }",
"private String gatewayRequest(String url) {\n final ProgressDialog pDialog = new ProgressDialog(mCtx);\n pDialog.setMessage(\"Loading...\");\n pDialog.show();\n\n JsonObjectRequest jsonObjReq = new JsonObjectRequest(Request.Method.GET,\n url, null,\n new Response.Listener<JSONObject>() {\n\n @Override\n public void onResponse(JSONObject response) {\n manageResponse(response);\n //manageResponse(getDevicesMoke());\n\n pDialog.hide();\n }\n }, new Response.ErrorListener() {\n\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.d(TAG, \"Error: \" + error.getMessage());\n // hide the progress dialog\n pDialog.hide();\n }\n });\n HttpHandler.getInstance(mCtx).addToRequestQueue(jsonObjReq);\n return \"\";\n\n }",
"private void fetchEverything() {\n ApiNewsMethods newsEverything = retrofit.create(ApiNewsMethods.class);\n newsEverything.getEverything(\"bitcoin\"/*topic input by user*/, newsApiKey).enqueue(new Callback<NewsModelClass>() {\n @Override\n public void onResponse(Call<NewsModelClass> call, Response<NewsModelClass> response) {\n if(response.isSuccessful()) {\n newsModelBody = response.body();\n Log.d(\"myBODY\", newsModelBody.getStatus());\n //text to speech object of the response fetched\n newsUIChanges();\n } else {\n Log.d(\"mySTRING\", \"DID NOT OCCUR\");\n }\n }\n\n @Override\n public void onFailure(Call<NewsModelClass> call, Throwable t) {\n }\n\n });\n }"
] | [
"0.59304553",
"0.59192413",
"0.5884985",
"0.5862913",
"0.5841572",
"0.57575095",
"0.5698627",
"0.56974316",
"0.56958145",
"0.5675194",
"0.5664991",
"0.5656247",
"0.5638586",
"0.55556595",
"0.5535916",
"0.54672474",
"0.5434251",
"0.54146224",
"0.5408428",
"0.53835803",
"0.53761655",
"0.53612924",
"0.53516966",
"0.5347003",
"0.53395915",
"0.5331319",
"0.5321172",
"0.5319914",
"0.5309369",
"0.5296486",
"0.52837557",
"0.52822316",
"0.5281485",
"0.5279696",
"0.5278964",
"0.5274471",
"0.5262148",
"0.52550393",
"0.5251775",
"0.52392185",
"0.5223688",
"0.5222784",
"0.5219111",
"0.52181745",
"0.5213829",
"0.52115184",
"0.5196335",
"0.5193078",
"0.5185925",
"0.51857954",
"0.5183449",
"0.51735705",
"0.5171312",
"0.5169304",
"0.5151687",
"0.5150265",
"0.5146195",
"0.514597",
"0.5141812",
"0.5138971",
"0.5136727",
"0.5135125",
"0.51294374",
"0.51294106",
"0.5127812",
"0.512705",
"0.5122438",
"0.5115376",
"0.5111558",
"0.51107466",
"0.5109463",
"0.5108493",
"0.51066935",
"0.50982857",
"0.5096054",
"0.5090224",
"0.5086503",
"0.50856644",
"0.5082079",
"0.5071532",
"0.5071344",
"0.50711054",
"0.5070565",
"0.5067915",
"0.50667363",
"0.50662357",
"0.50662357",
"0.50662357",
"0.50662357",
"0.50662357",
"0.50662357",
"0.50662357",
"0.50662357",
"0.50662357",
"0.50662357",
"0.5066008",
"0.5063521",
"0.5062604",
"0.5059075",
"0.50557655",
"0.5055733"
] | 0.0 | -1 |
The average, the minimum, the maximum, and the standard deviation of the number of parades coordinated by the chapters | @Query("select avg((select count(p) from Parade p join p.brotherhood b where b.area.id=a.id)*1.), min((select count(p) from Parade p join p.brotherhood b where b.area.id=a.id)*1.), max((select count(p) from Parade p join p.brotherhood b where b.area.id=a.id)*1.), stddev((select count(p) from Parade p join p.brotherhood b where b.area.id=a.id)*1.) from Chapter c join c.area a")
Double[] avgMinMaxStddevParadesCoordinatedByChapter(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getAverage() { return (int)Math.ceil(getSumOfMarks()/ numberOfCourses); }",
"@Query(\"select c1.name from Chapter c1 join c1.area a1 where ((select count(p) from Parade p join p.brotherhood b where b.area.id=a1.id)*1.) > (select avg((select count(p) from Parade p join p.brotherhood b where b.area.id=a.id)*1.1) from Chapter c join c.area a)\")\n\tCollection<String> chaptersWith10PerCentParadesCoordinateThanAvg();",
"@Query(\"select avg(u.articles.size), stddev(u.articles.size) from User u\")\n\tDouble[] avgstdArticlesPerWriter();",
"double avg(){\n\t\tdouble sum = 0.0;\n\t\tfor(int i=0;i<num.length;i++)\n\t\t\tsum+=num[i].doubleValue();\n\t\treturn sum/num.length;\n\t}",
"public int getAvgSpec() {\n return totalSpec/totalMatches;\n }",
"public double stddev(){\n return StdStats.stddev(percentage);\n }",
"public double sampleStandardDeviation() {\n/* 288 */ return Math.sqrt(sampleVariance());\n/* */ }",
"public void calculateAverage() {\n\n if (turn == 1) {\n p1.setTotalScore(p1.getTotalScore() + turnScore);\n\n p1.setTotalDarts(p1.getTotalDarts() + 1);\n\n float p1Average = p1.getTotalScore() / p1.getTotalDarts();\n p1.setAverage(p1Average);\n\n } else if (turn == 2) {\n p2.setTotalDarts(p2.getTotalDarts() + 1);\n p2.setTotalScore(p2.getTotalScore() + turnScore);\n\n float p2Average = p2.getTotalScore() / p2.getTotalDarts();\n p2.setAverage(p2Average);\n }\n\n\n }",
"double totalMoviesAverageScore() {\n // call totalMovieAverage with no movie name\n // so filter will filter nothing and we'll get all the movies\n return totalMovieAverage(\"\");\n }",
"public double courseAverage()\n\t{\n\t\tdouble dQuiz;\n\t\tdouble dProj;\n\t\tdouble dTest;\n\t\tdouble dFinal;\n\t\tdouble dWeightedAvg;\n\t\t\n\t\tswitch(quizzesGraded)\n\t\t{\n\t\t\t\n\t\t\tcase 1:\n\t\t\t\tdQuiz= (1.0 * quiz1) * pctQ;\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tdQuiz=((1.0 * quiz1+quiz2)/2) * pctQ;\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tdQuiz=((1.0 * quiz1 + quiz2 + quiz3)/3) * pctQ;\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tdQuiz=((1.0 * quiz1 + quiz2 + quiz3 + quiz4)/4) * pctQ;\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\tdQuiz=((1.0 * quiz1 + quiz2 + quiz3 + quiz4 + quiz5)/5) * pctQ;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tdQuiz = 0;\n\t\t}\n\t\tswitch(projGraded)\n\t\t{\n\t\t\t\n\t\t\tcase 1: \n\t\t\t\tdProj=((1.0 * proj1)) * pctP;\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tdProj=((1.0 * proj1 + proj2)/2) * pctP;\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tdProj=((1.0 * proj1 + proj2 + proj3)/3)*pctP;\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tdProj=((1.0 * proj1 + proj2 + proj3 + proj4)/4) * pctP;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tdProj = 0;\n\t\t}\n\t\tswitch(testGraded)\n\t\t{\n\t\t\tcase 1:\n\t\t\t\tdTest=(1.0 * test1) * pctT;\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tdTest=((1.0 * test1+test2)/2) * pctT;\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tdTest=((1.0 * test1 + test2 + test3)/3) * pctT;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tdTest = 0;\n\t\t}\n\t\tif(recordedFinalExam==true)\n\t\t{\n\t\t\tdFinal=finalExam*pctF;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdFinal=0;\n\t\t}\n\t\tdWeightedAvg= (dProj + dTest + dQuiz + dFinal);\n\t\treturn dWeightedAvg;\n\t\t\n\t}",
"public double getAverage(){\n int total = 0; //inicializa o total\n \n //soma notas de um aluno\n for(int grade: grades){\n total += grade;\n }\n \n return (double) total/grades.length;\n }",
"public static int[] getStat() {\n\t\t\n\t\tint[] grades = new int[students.size()];\n\t\tfor(int i=0;i<students.size();i++) {\n\t\t\tgrades[i] = students.get(i).getGrade().getRawGrade();\n\t\t\t\n\t\t}\n\t\tArrays.sort(grades);\n\t\tint median = 0;\n\t\tif((int)grades.length/2 == grades.length/2.0)\n\t\t\tmedian = grades[grades.length/2];\n\t\telse\n\t\t\tmedian = (grades[grades.length/2] + grades[grades.length/2 + 1])/2;\n\t\tint [] ret = {grades[0], grades[grades.length-1], grades[grades.length/4], grades[3*grades.length/4], median};\n\t\treturn ret;\n\t}",
"public static void main(String[] args) {\n\n\n int [][] array = {\n {1, 4, 3, 2, 5},\n {4, 5, 3, 2, 9},\n {4, 7, 8, 1, 4}};\n\n int sum = 0;\n int mean = 0;\n int median = 0;\n double variance = 0;\n double sdev = 0; //Standard deviation\n\n //Make 2d array into 1d array\n int [] list = new int [array.length * array[0].length];\n\n int listnum = 0;\n for (int i = 0; i < array.length; i++){\n for (int j = 0; j < array.length; j++){\n list[listnum++] = array [i][j];\n }\n }\n\n //This is used to find the SUM\n for (int i = 0; i < list.length; i++) {\n sum += list[i];\n }\n System.out.println(\"This is the sum: \" + sum);\n\n //MEAN\n mean = sum/list.length;\n System.out.println(\"Mean: \" + mean);\n\n //This is used to find the MEDIAN\n Arrays.sort(list);\n\n int middle = (list.length / 2);\n if (list.length % 2 == 0) {\n int medium1 = list[middle];\n int medium2 = list[middle - 1];\n median = (medium1 + medium2) / 2;\n } else {\n median = list[middle + 1];\n }\n System.out.println(\"The MEDIAN is: \" + median);\n\n\n //This is the mode\n int[] frequencies = new int[10]; // all zero\n for(int [] row : array){\n for(int val : row){\n frequencies[val]++;\n }\n }\n\n // scan for the largest value\n int largest = 0;\n int mode = -1;\n for (int i = 0; i < 10; ++i) {\n if (frequencies[i] > largest) {\n largest = frequencies[i];\n mode = i;\n }\n }System.out.println(\"Mode: \" + mode);\n\n\n\n //VARIANCE\n double temp = 0;\n for (double a : list) {\n temp += (a - mean) * (a - mean);\n }\n variance = temp / list.length;\n System.out.println(\"Variance:\" + variance);\n\n //Standard deviation\n sdev = Math.sqrt(variance);\n System.out.println(\"Standard Deviation: \" + sdev);\n }",
"public Double getAssignmentCategoryAverageGrade(List<Student> students){\n \tdouble totalStudentPoints = getTotalCategoryStudentPoints(students);\n \tdouble totalMaxPoints = getTotalCategoryWorth(students);\n \treturn (totalStudentPoints / totalMaxPoints * 100);\n }",
"protected abstract double getRefinementStandardDeviation();",
"double getAvgTreatment();",
"@Override\n\tpublic double avg() {\n\t\treturn total()/4.0;\n\t}",
"private void computeStdDevRating() {\n\t\tfor (String productId: products.keySet())\n\t\t{\n\t\t\tdouble above = 0;\n\t\t\tdouble meanValue = products.get(productId).get(TOTALRATINGS) / products.get(productId).get(NUMBEROFREVIEWS);\n\t\t\tfor (Double score: productRatings.get(productId))\n\t\t\t\tabove += Math.pow(score-meanValue, 2);\n\t\t\tproducts.get(productId).put(STDDEV, Math.sqrt(above/(products.get(productId).get(NUMBEROFREVIEWS))));\n\t\t\tproducts.get(productId).put(MEANRATING, meanValue);\n\t\t}\n\t\t\n\t}",
"public double averageArticlesPerNewspaper() {\n\t\tcheckAuthority();\n\t\ttry {\n\t\t\treturn this.administratorRepository.averageArticlesPerNewspaper();\n\t\t} catch (Exception e) {\n\t\t\treturn 0.;\n\t\t}\n\n\t}",
"public double populationStandardDeviation() {\n/* 242 */ return Math.sqrt(populationVariance());\n/* */ }",
"double average();",
"public void getAvg()\n {\n this.avg = sum/intData.length;\n }",
"@Override\n\t\tpublic double getAvgDip() {\n\t\t\treturn 0;\n\t\t}",
"public double getAverage(){\n return getTotal()/array.length;\n }",
"public double stddev() {\n double sum = sampleMean;\n sum = 0;\n for (int i = 0; i < sites.length; i++) {\n// sum += (Double.parseDouble(sites[i] + \"\") / size - sampleMean) \n// * (Double.parseDouble(sites[i] + \"\") / size - sampleMean);\n sum += (sites[i]/size - sampleMean) \n * (sites[i]/size - sampleMean);\n }\n sampleStanDevi = Math.sqrt(sum / (times - 1));\n return sampleStanDevi;\n }",
"private double calcAverage(int startIndex, int endIndex) {\n\t\t\n\t\t// total for the scores\n\t\tdouble total = 0;\n\t\t\n\t\t// loop between indexes and add the scores\n\t\tfor (int i = startIndex; i < endIndex; i++) \n\t\t\ttotal += scores.get(i);\n\t\t\n\t\t// return the average\n\t\treturn total / (endIndex - startIndex);\n\t}",
"public void StandardDeviation(){\r\n\t\tAverage();\r\n\t\tif (count<=1){\r\n\t\t\tSystem.out.println(\"The Standard Deviation is \"+0.0);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tStandardDeviation=(float)Math.sqrt((Total2-Total*Total/count)/(count-1));\r\n\t\t}\r\n\t}",
"@Query(\"select min(s.competitions.size), max(s.competitions.size), avg(s.competitions.size), stddev(s.competitions.size) from Sponsor s\")\n\tDouble[] minMaxAvgStdddevCompetitionsPerSponsor();",
"public double getAverage(){\n double total = 0;\n for(double s : scores)total += s;\n return total/scores.length;\n }",
"public double getQuizAverage() {\r\n \r\n double[] quizScores = getLargestQuizGrades();\r\n double quizSum = 0;\r\n int quizzes = 0;\r\n \r\n for(double score : quizScores) {\r\n quizzes++;\r\n quizSum += score;\r\n }\r\n \r\n quizAverage = quizSum / quizzes; \r\n \r\n return quizAverage;\r\n }",
"public double getAverageMarkPerModule(){\n return achievedMarks\n .stream()\n .mapToDouble(AchievedMark::getMark)\n .average()\n .getAsDouble();\n }",
"@Override\n\tpublic int avg() {\n\t\treturn (this.sum()/3);\n\t}",
"public double getAvg(){\n double avg=0;\n for(int x=0; x<max; x++){\n avg=avg+times[x];\n }\n avg=avg/max;\n return avg;\n }",
"@Override\n public Double average() {\n return (sum() / (double) count());\n }",
"public float getAverageBetweenPoint(){\n return getMetric()/list.size();\n }",
"private void calculateAvg() {\n\t\tDescriptiveStatistics stats = new DescriptiveStatistics();\n\t\tfor (QueryInfo oneQ : this.maxQueries) {\n\t\t\tstats.addValue(oneQ.getGapCount() * oneQ.getFrequency());\n\t\t}\n\t\tthis.avgGain = stats.getMean();\n\t\tthis.medianGain = stats.getPercentile(50);\n\t\tthis.quartiles = stats.getPercentile(75);\n\t}",
"public double averageVolume() {\n if (numberOfIcosahedrons() == 0) {\n return 0;\n }\n else {\n return totalVolume() / numberOfIcosahedrons();\n }\n }",
"double average() { // used double b/c I want decimal places\n\t\tint sum = 0;\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t\tsum = sum + array[i];\n\t\t}\n\t\tdouble average = (double) sum / array.length;\n\t\treturn average;\n\n\t}",
"public int average() {\n int total = 0;\n\n for (int score : scores) {\n total += score;\n }\n\n return total / scores.length;\n }",
"public float averageAnswers() {\n\t\tfloat out = 0;\n\t\t\n\t\tIterator<SolveResult> iter = super.iterator();\n\t\t\n\t\twhile(iter.hasNext()) {\n\t\t\tSolveResult thisResult = iter.next();\n\t\t\tfloat clues = ResultSet.clueCount(thisResult.puzzle);\n\t\t\tfloat cardinality = thisResult.puzzle.getCardinality();\n\t\t\tfloat conflicts = thisResult.puzzle.conflictCount();\n\t\t\t\n\t\t\tif(!(cardinality - clues - conflicts < 0)) {\n\t\t\t\tout += ((cardinality - clues - conflicts) / (81 - clues));\n\t\t\t}\n\t\t}\n\t\treturn out / super.size();\n\t}",
"public static void findMinMax(Student[] student){\n int minMidterm=student[0].getExamGrade().getMidtermExamGrade();//this is first step to find min value of midterm because I describe first index of midterm value in array\n int maxMidterm=student[0].getExamGrade().getMidtermExamGrade();//this is first step to find max value of midterm because I describe first index of midterm value in array\n int minFinal=student[0].getExamGrade().getFinalExamGrade();//this is first step to find min value of final because I describe first index of final value in array\n int maxFinal=student[0].getExamGrade().getFinalExamGrade();//this is first step to find max value of final because I describe first index of final value in array\n\n for(int i=0;i<student.length;i++){\n if(student[i].getExamGrade().getMidtermExamGrade()<minMidterm){ // this condution find min value of midterm until this step \n minMidterm=student[i].getExamGrade().getMidtermExamGrade();\n }\n if(student[i].getExamGrade().getMidtermExamGrade()>maxMidterm){// this condution find max value of midterm until this step \n maxMidterm=student[i].getExamGrade().getMidtermExamGrade();\n }\n if(student[i].getExamGrade().getFinalExamGrade()<minFinal){// this condution find min value of final until this step \n minFinal=student[i].getExamGrade().getFinalExamGrade();\n }\n if(student[i].getExamGrade().getFinalExamGrade()>maxFinal){// this condution find max value of final until this step \n maxFinal=student[i].getExamGrade().getFinalExamGrade();\n }\n }\n\n System.out.println(\"Maximum Midterm Exam Grade: \"+maxMidterm+\" Minumum Midterm Exam Grade: \"+minMidterm);\n System.out.println(\"Maximum Final Exam Grade: \"+maxFinal+\" Minumum Final Exam Grade: \"+minFinal);\n }",
"double getAvgControl();",
"public Double averageArticlesPerNewspaperPrivates() {\n\t\tcheckAuthority();\n\t\tDouble a = this.administratorRepository\n\t\t\t\t.averageArticlesPerNewspaperPrivates();\n\t\tif (a == null) {\n\t\t\ta = 0.;\n\t\t}\n\t\ttry {\n\t\t\treturn a;\n\t\t} catch (Exception e) {\n\t\t\treturn 0.;\n\t\t}\n\n\t}",
"public double stddev() {\n return StdStats.stddev(fraction);\n }",
"public double stddev() {\r\n\t\treturn stddev;\r\n\t}",
"public double getStandardDeviation() {\r\n\t\tdouble standDev=0;\r\n\t\tdouble avgD=getAverageDuration();\r\n\t\tdouble zaehler=0;\r\n\t\tfor(int a=0;a<populationSize();a++) {\r\n\t\t\tzaehler+=Math.pow((avgD-getTour(a).getDuration()), 2);\r\n\t\t}\r\n\t\tstandDev=Math.pow((zaehler/populationSize()), 0.5);\r\n\t\treturn standDev;\r\n\t }",
"public void calculateAverageFmax(){\n ArrayList<Double> fmaxList = new ArrayList<Double>();//Used to determine the SD\n double fmaxSum = 0;\n int profileCount = 0;\n if (averageProfileList == null){\n return;\n }\n for (AverageProfile avProfile: averageProfileList){\n for(Profile profile: avProfile.getReplicateProfileList()){\n if(profile.hasAnLreWindowBeenFound() && !profile.isExcluded()){\n fmaxSum += profile.getFmax();\n profileCount++;\n fmaxList.add(profile.getFmax());\n }\n }\n }\n if (profileCount >= 1 && fmaxSum > 0){\n averageFmax = fmaxSum/profileCount;\n if(fmaxList.size()>1){\n avFmaxCV = MathFunctions.calcStDev(fmaxList)/averageFmax;\n }else{\n avFmaxCV = 0;\n }\n } else {\n averageFmax = 0;\n }\n }",
"private double calculateAverage(Candle[] cd) {\n double sum = 0; \r\n for(Candle c : cd) {\r\n sum += c.getClose();\r\n }\r\n return sum/cd.length;\r\n \r\n }",
"public double average(){\r\n\t\t//create variable to hold the values\r\n\t\tdouble average = 0;\r\n\t\t\r\n\t\tfor (int i = 0; i < this.data.length; i++){\r\n\t\t\t//add current index\r\n\t\t\taverage += this.data[i];\r\n\t\t\t}\r\n\t\treturn (average/this.data.length);\r\n\t}",
"public double stddev(int club) {\n\t\tif (club == 1) {\n\t\t\treturn 30;\n\t\t} else if (club == 2) {\n\t\t\treturn 20;\n\t\t} else if (club == 3) {\n\t\t\treturn 20;\n\t\t} else if (club == 4) {\n\t\t\treturn 17;\n\t\t} else if (club == 5) {\n\t\t\treturn 15;\n\t\t} else if (club == 6) {\n\t\t\treturn 15;\n\t\t} else if (club == 7) {\n\t\t\treturn 15;\n\t\t} else if (club == 8) {\n\t\t\treturn 15;\n\t\t} else if (club == 9) {\n\t\t\treturn 10;\n\t\t} else {\n\t\t\treturn 10;\n\t\t}\n\t}",
"private void calculateRange(){\r\n float minAER = theAccounts.get(0).getAer();\r\n float maxAER = theAccounts.get(accountInTotal-1).getAer();\r\n float averageAER = maxAER-minAER;\r\n float averageBond = startingBonds + (startingBonds*averageAER/100);\r\n\r\n Account averageAccount = new Account(startingBonds,averageBond,averageAER);\r\n System.out.println(averageAccount.toString());\r\n }",
"public double stddev() {\n return stddev;\n }",
"public Double avgCategoriesPerRendezvous() {\n\t\tDouble result;\r\n\t\tDouble sum = 0.0;\r\n\t\tCollection<Category> auxc = new ArrayList<Category>();\r\n\t\tfinal Collection<Rendezvous> auxr = this.rendezvousService.findAll();\r\n\t\tfor (final Rendezvous r : auxr) {\r\n\t\t\tauxc = this.findByRendezvousID(r.getId());\r\n\t\t\tsum = sum + auxc.size();\r\n\t\t}\r\n\t\tresult = sum / auxr.size();\r\n\t\treturn result;\r\n\t}",
"private void calculateOverall()\n {\n ArrayList<Integer> average = new ArrayList<Integer>(1);\n ArrayList<Integer> median = new ArrayList<Integer>(1);\n ArrayList<Integer> mode = new ArrayList<Integer>();\n ArrayList<Integer> stdDev = new ArrayList<Integer>(1);\n \n int avg = 0;\n int med = 90;\n int mod = 90;\n int dev = 0;\n \n int[] modeArray = new int[100];\n \n for (int i = 0; i < 100; i++) {\n \tmodeArray[i] = 0;\n }\n \n for (Integer score : allScores) {\n \tavg += score;\n \tmodeArray[score]++;\n }\n \n for (int i = 0; i < 100; i++) {\n \tif (modeArray[i] > mod) {\n \t\tmod = modeArray[i];\n \t}\n }\n \n avg = avg / allScores.size();\n \n Collections.sort(allScores);\n med = allScores.get(allScores.size() / 2);\n \n for (Integer score : allScores) {\n \tdev += Math.pow(score - avg, 2);\n }\n dev = (int)Math.floor(Math.sqrt(dev / allScores.size()));\n\n // TODO: Perform the actual calculations here\n average.add(avg);\n median.add(med);\n mode.add(mod);\n stdDev.add(dev);\n\n this.overallAnalytics.put(\"Average\", average);\n this.overallAnalytics.put(\"Median\", median);\n this.overallAnalytics.put(\"Mode\", mode);\n this.overallAnalytics.put(\"Standard Deviation\", stdDev);\n }",
"public static void printSummary(double[] m) {\n Arrays.sort(m);\n double min = m[0];\n int len = m.length;\n double max = m[len - 1];\n double avg = StatUtils.mean(m);\n double sd = FastMath.sqrt(StatUtils.variance(m));\n System.out.printf(\"Length %d, Min %.2f, Max %.2f, Avg %.2f, SD %.2f \\n\", len, min, max, avg, sd);\n }",
"private int getTotalVariations(){\r\n\t\tint sumVariations = 0;\r\n\t\tfor (int i = 0; i < ledDisplay.length; i++) {\r\n\t\t\tsumVariations += getLedsVariations (lastLedDisplay[i], ledDisplay[i]);\r\n\t\t}\r\n\t\treturn sumVariations;\r\n\t}",
"public double GetStandardDev();",
"public Double[] findDataNumerParadesCoordinatedByChapters() {\n\t\tDouble[] result;\n\n\t\tresult = this.paradeRepository.findDataNumerParadesCoordinatedByChapters();\n\n\t\treturn result;\n\t}",
"public double stdDev() {\n\t\tif (count() > 0) {\n\t\t\treturn sqrt(variance());\n\t\t}\n\t\treturn 0.0;\n\t}",
"public double stddev() {\n\t\t return StdStats.stddev(results);\n\t }",
"public double calcAvg() {\n\t\treturn (double)calcSum() / data.size();\n }",
"public Double averageArticlesPerNewspaperPublics() {\n\t\tcheckAuthority();\n\t\tDouble a = this.administratorRepository\n\t\t\t\t.averageArticlesPerNewspaperPublics();\n\t\tif (a == null) {\n\t\t\ta = 0.;\n\t\t}\n\t\ttry {\n\t\t\treturn a;\n\t\t} catch (Exception e) {\n\t\t\treturn 0.;\n\t\t}\n\t}",
"public void findAvg()\n {\n for(int i = 0; i <= scores.length-1; i++)\n {\n for (int j = 0; j <= scores[0].length-1; j++)\n {\n total += scores[i][j];\n }\n }\n System.out.println(\"The class average test score is \" + \n total/24 + \".\");\n }",
"public static void promedio(int [] Grado1, int NNEstudent){\nint aux=0;\nfor(int i=0;i<NNEstudent;i++){\naux=Grado1[i]+aux;}\nint promedio;\npromedio=aux/NNEstudent;\nSystem.out.println(aux);\nSystem.out.println(\"el promedio de las edades es:\");\nSystem.out.println(promedio);\n}",
"public double stddev() { \n return StdStats.stddev(result);\n }",
"private double avgNonEmpty() {\n\t\tdouble percent = 0;\n\t\t\n\t\tfor (LinkedList<WordCode<K, V>> ll : myBuckets) {\n\t\t\tif (ll.size() != 0) percent++;\n\t\t}\n\t\treturn (numEntries / percent);\n\t}",
"public double stddev()\n {\n return StdStats.stddev(open);\n// double mean = mean();\n// double sumsq = 0;\n// for (int i = 0; i < count; i++)\n// {\n// sumsq = sumsq + (open[i] - mean) * (open[i] - mean);\n// }\n// return Math.sqrt(sumsq / (count - 1));\n }",
"public double getAverage()\n {\n return getSum() / 2.0;\n }",
"public double stddev() {\n\t\treturn stddev;\n\t}",
"public double stddev() {\n\t\tdouble sum = 0;\n\t\tdouble mean = mean();\n\t\tfor(int i = 0; i<myData.length;i++)\n\t\t\tsum+=(myData[i]-mean)*(myData[i]-mean);\n\t\treturn (double) Math.sqrt(sum/(myData.length-1));\n\t}",
"public static void arrayAttributes(){\n int[] x= {1, 5, 10, -2};\n int[] y={0,0,0};\n int sum=0;\n int avg=0;\n int max=x[0];\n int min=x[0];\n for (int i =0; i<x.length; i++){\n sum=sum+x[i];\n if (x[i]>max){\n max=x[i];\n }\n if (x[i]<min){\n min=x[i];\n }\n }\n avg=sum/x.length;\n y[0]=max;\n y[1]=min;\n y[2]=avg;\n for (int j=0; j<y.length; j++){\n System.out.println(y[j]); \n }\n}",
"public static void main(String[] args){\n// int[] testArray = {82, 95, 71, 6, 34};\n//\n// int min = Aggregate.min(testArray);\n// int max = Aggregate.max(testArray);\n// int sum = Aggregate.sum(testArray);\n// double avg = Aggregate.average(testArray);\n// double div = Aggregate.standardDeviation(testArray);\n//\n// System.out.println(min); // 6\n// System.out.println(max); //95\n// System.out.println(sum); //288\n// System.out.println(avg); //57.6\n// System.out.println(div); //36.719\n\n final int ROCK = 1;\n final int SCISSORS = 2;\n final int PAPER = 3;\n\n int computerDecision = getComputerChoice();\n int userDecision = getUserChoice();\n\n System.out.print(\"user: \" + printChoice(userDecision));\n switch(userDecision) {\n\n case ROCK:\n if(computerDecision == ROCK){\n System.out.println(\"That's a Tie!\");\n }\n else if(computerDecision == SCISSORS ){\n System.out.println(\"Congrats! You won\");\n }\n else{\n System.out.println(\"Sorry,You lost!\");\n }\n break;\n case SCISSORS:\n if(computerDecision == ROCK){\n System.out.println(\"Sorry,You lost!\");\n }\n else if(computerDecision == SCISSORS ){\n System.out.println(\"That's a Tie!\");\n }\n else{\n System.out.println(\"Congrats! You won\");\n }\n break;\n case PAPER:\n if(computerDecision == ROCK){\n System.out.println(\"Congrats! You won\");\n }\n else if(computerDecision == SCISSORS ){\n System.out.println(\"Sorry,You lost!\");\n }\n else{\n System.out.println(\"That's a Tie!\");\n }\n break;\n\n default:\n\n }\n\n\n }",
"public static void main(String[] args) {\n\n\tdouble [] db= new double [200];\n\tdouble sum= 0;\n\tdouble count=0;\n\tdouble average=0;\n\tfor(double i =0; i<=200; i++) {\n\t\tsum=sum+i;\n\t\t\n\t\t\tif(i%2==0) {\n\t\t\t\tSystem.out.println(\"Even numbers: \" +i);\n\t\t\t\tSystem.out.println(\"Average of even numbers: \" + sum/i);\n\t\t\t\n\tArrays.sort(db);\n\t}\n\t//System.out.println(sum);\n\t//System.out.println(Arrays.toString(db));\n\tSystem.out.println(db.length-1);\n}\n}",
"public static void runExercise4() {\n students.stream().mapToInt(student -> student.getAge()).average().ifPresent(System.out::println);\n }",
"public double stddev() {\n return StdStats.stddev(perThreshold);\n }",
"public double getAverage() {\n int total = 0;\n\n // sum grades of the student\n for (int grade : grades)\n total += grade;\n\n // return average of the grade\n return (double) total / grades.length;\n }",
"public static void main( String args[] ) throws Exception\n\t{\n\t\t\tBufferedReader infile = new BufferedReader( new FileReader( \"ExamScores.txt\" ) );\n\n\t\t\t// you declare all needed ArrayLists and other variables from here on.\n\t\t\tArrayList<String> lines = new ArrayList<String>();\n\n\t\t\tSystem.out.println(\"\\nSTEP #1: 50%\"); // 50%\n\t\t\twhile (infile.ready()) {\n\t\t\t\tString line = infile.readLine();\n\t\t\t\tSystem.out.println(line);\n\t\t\t\tlines.add(line);\n\t\t\t}\n\t\t\tinfile.close();\n\n\n\t\t\tSystem.out.println(\"\\nSTEP #2: 25%\"); // 75 %\n\t\t\tCollections.sort(lines);\n\t\t\tfor (String s: lines)\n\t\t\t\tSystem.out.println(s);\n\n\t\t\tSystem.out.println(\"\\nSTEP #3: 10%\"); // 85%\n\n\t\t\tTreeMap<String, ArrayList<Integer>> st2sc = new TreeMap<String, ArrayList<Integer>>();\n\t\t\tTreeMap<Double, String> ave2st = new TreeMap<Double, String>();\n\t\t\tint[] sum = new int[lines.get(0).split(\"\\\\s+\").length-1];\n\t\t\t\n\t\t\tinfile = new BufferedReader ( new FileReader(\"query.txt\") );\n\t\t\tString[] queryS= infile.readLine().split(\" \");\n\t\t\tint[] query = new int[queryS.length];\n\t\t\tfor (int i=0; i<queryS.length; i++)\n\t\t\t\tquery[i]=Integer.parseInt(queryS[i]);\n\t\t\tfor (String s: lines)\n\t\t\t{\t\n\t\t\t\tdouble sumq = 0;\n\t\t\t\tdouble aveq = 0;\n\t\t\t\tString[] tokens = s.split(\"\\\\s+\");\n\t\t\t\tArrayList<Integer> scores = new ArrayList<Integer>();\n\t\t\t\tfor (int t=1; t<tokens.length; t++){\n\t\t\t\t\tscores.add(Integer.parseInt(tokens[t]));\n\t\t\t\t}\n\t\t\t\tst2sc.put(tokens[0], scores);\n\t\t\t\tfor (int q: query)\n\t\t\t\t\tsumq += Integer.parseInt(tokens[q]);\n\t\t\t\tfor (int nth = 0; nth<sum.length; nth++){\n\t\t\t\t\tsum[nth]+= Integer.parseInt(tokens[nth+1]);\n\t\t\t\t}\n\t\t\t\taveq = sumq/3;\n\t\t\t\tave2st.put(aveq, tokens[0]);\n\t\t\t}\n\t\t\tfor (double f: ave2st.keySet())\n\t\t\t\tSystem.out.printf(ave2st.get(f)+\" \"+\"%.2f\\n\", f);\n\n\t\t\tSystem.out.println(\"\\nSTEP #4: 15%\"); // 100%\n\t\t\t\n\t\t\tint lowest = sum[0];\n\t\t\tint which = 0;\n\t\t\tfor (int i=1; i<sum.length; i++)\n\t\t\t{\n\t\t\t\tif (sum[i]<lowest)\n\t\t\t\t{\n\t\t\t\t\tlowest = sum[i];\n\t\t\t\t\twhich = i;\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"exam\"+(which+1)+\" had the lowest average\");\n\n\n\t}",
"double average(double[] doubles) {\n double total = 0.0;\n //int count = 0;\n for (double d: doubles) {\n total = total + d;\n //count = count + 1;\n }\n //return total / count;\n return total / doubles.length;\n }",
"public double averageArticlesPerUser() {\n\t\tcheckAuthority();\n\t\ttry {\n\t\t\treturn this.administratorRepository.averageArticlesPerUser();\n\t\t} catch (Exception e) {\n\t\t\treturn 0.;\n\t\t}\n\n\t}",
"private static double countAverageRun(Runner sportsman) {\n double result = 0;\n for (int i = 0; i < sportsman.getNumberOfRuns(); i++) {\n result += sportsman.getDefiniteRunStat(i);\n }\n\n return result / sportsman.getNumberOfRuns();\n }",
"public double stddev() {\n return StdStats.stddev(stats);\r\n }",
"public double getPrize();",
"public int getAverageScore() {\n\t\treturn totalScore / quizCount;\n\t}",
"public double stddev() {\n return StdStats.stddev(results);\n }",
"public double stddev() {\n\t\tif (experiments == 1)\n\t\t\treturn Double.NaN;\n\t\treturn stddev;\n\t}",
"public void StandardDeviationPair(){\r\n\t\tAveragePair();\r\n\t\tif (count<=1|| Total<=0){\r\n\t\t\tSystem.out.println(\"The Standard Deviation of x and y is \"+0.0);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tStandardDeviation=(float)Math.sqrt((Total2-Total*Total/count)/(count-1));\r\n\t\t\tStandardDeviationY=(float)Math.sqrt((TotalY2-TotalY*TotalY/count)/(count-1));\r\n\t\t\t\r\n\t\t}\r\n\t}",
"public double averageSurfaceToVolumeRatio() {\n int index = 0;\n double total = 0.0;\n if (numberOfIcosahedrons() == 0) {\n return 0;\n }\n else {\n while (index < icosList.size()) {\n total += icosList.get(index).surfaceToVolumeRatio();\n index++;\n }\n }\n return total / icosList.size();\n }",
"public static void main(String[] args) {\n int work=6*5*17;\n System.out.println(work);\n\n // Print the percentage of the coding hours in the semester if the average\n // work hours weekly is 52\n float avrage=52;\n float all =17*24*7;\n float parcantage = (52*17)/all*100;\n System.out.println(parcantage+\"%\");\n\n\n\n }",
"public BigDecimal getRows_examined_avg() {\n return rows_examined_avg;\n }",
"public int average()\n {\n int average = 0;\n int sum = 0;\n\n for ( int index = 0; index < data.length; index++ )\n {\n sum = sum + data[index];\n }\n average = sum / data.length;\n\n return average;\n }",
"public double[] getAverages() {\n\t\t\n\t\t// initialize array\n\t\taverages = new double[5];\n\t\t\n\t\t// used with calcAverage for the startIndex\n\t\tint curIndex = 0;\n\t\taverages[ASSIGNMENTS] = calcAverage(curIndex, curIndex += NUM_ASSIGNMENTS);\n\t\taverages[QUIZZES] = calcAverage(curIndex, curIndex += NUM_QUIZZES);\n\t\taverages[TESTS] = calcAverage(curIndex, curIndex += NUM_TESTS);\n\t\taverages[FINAL] = calcAverage(curIndex, curIndex + 1);\n\t\t\n\t\t// get the overall average\n\t\tdouble quizTestAverage = (averages[QUIZZES] + averages[TESTS]) * PERCENT_QUIZ_AND_TESTS / 2;\n\t\tdouble assignmentAverage = averages[ASSIGNMENTS] * PERCENT_ASSIGNMENTS;\n\t\tdouble finalAverage = averages[FINAL] * PERCENT_FINAL;\n\t\taverages[OVERALL] = quizTestAverage + assignmentAverage + finalAverage;\n\t\t\n\t\t// return the array\n\t\treturn averages;\n\t}",
"public static void main(String[] args) {\n\t\tint a[][]=new int[4][2];\n\t\tfor(int i=0;i<4;i++){\n\t\t\ta[0][0]=78;\n\t\t\ta[1][0]=59;\n\t\t\ta[2][0]=90;\n\t\t\ta[3][0]=65;\n\t\t\ta[0][1]=100;\n\t\t\ta[1][1]=80;\n\t\t\ta[2][1]=70;\n\t\t\ta[3][1]=120;\n\t\t\t}\n\t\tint sumc=0;\n\t\tfor(int i=0;i<2;i++){\n\t\t\tsumc=sumc+a[2][i];\n\t\t}\n\t\tint avec=sumc/2;\n\t\tSystem.out.println(\"丙的平均分數為\"+avec);\n\t\t\n\t\tint sumchi=0;\n\t\tfor(int i=0;i<4;i++){\n\t\t\tsumchi=sumchi+a[i][0];\n\t\t}\n\t\tint avechi=sumchi/4;\n\t\tSystem.out.println(\"國文的平均分數為\"+avechi);\n\t\t\n\t\tint sumt=0;\n\t\tfor(int i=0;i<4;i++){\n\t\t\tfor(int j=0;j<2;j++)\n\t\t\tsumt=sumchi+a[i][j];\n\t\t}\n\t\tint avet=sumt/8;\n\t\tSystem.out.println(\"全班的平均分數為\"+avet);\n\n\t}",
"private void computeAverageDocumentLength(){\n double corpusSize = documentDetails.size();\n double lengthsSum = 0;\n ArrayList<String> docs = new ArrayList<>(documentDetails.keySet());\n\n for(String doc : docs){\n lengthsSum += Integer.valueOf(documentDetails.get(doc)[3]);\n }\n averageDocumentLength = lengthsSum/corpusSize;\n }",
"public double average() {\n double average = 0;\n for (int i = 0; i < studentList.size(); i++) {\n Student student = studentList.get(i);\n average += student.average();\n }\n average /= studentList.size();\n return average;\n }",
"public double average() {\n return average(0.0);\n }",
"protected abstract List<Double> calcScores();",
"public Double getAveragePageviews() {\r\n return averagePageviews;\r\n }",
"public void showAverage() {\n System.out.println(\"Average: \" + createStream().average());\n }",
"@Query(\"select avg(u.chirps.size), stddev(u.chirps.size) from User u\")\n\tDouble[] avgstdChirpsPerUser();",
"public double getAverage() {\n return this.average;\n }"
] | [
"0.6334783",
"0.6003587",
"0.5900748",
"0.572982",
"0.57004726",
"0.56456447",
"0.56424433",
"0.56273586",
"0.56131",
"0.56009847",
"0.5567904",
"0.55627036",
"0.5550625",
"0.553849",
"0.5520902",
"0.5510115",
"0.55063677",
"0.55043876",
"0.5488818",
"0.5487256",
"0.548259",
"0.5481581",
"0.54523396",
"0.5449121",
"0.5446936",
"0.5446311",
"0.5444566",
"0.54406184",
"0.54287225",
"0.5411064",
"0.54014444",
"0.5384839",
"0.537611",
"0.5374541",
"0.5373145",
"0.5361851",
"0.5355458",
"0.5353148",
"0.53521067",
"0.53399056",
"0.5337461",
"0.53267634",
"0.5316915",
"0.53101134",
"0.53089136",
"0.5297947",
"0.5297484",
"0.5293562",
"0.5293187",
"0.5283325",
"0.52831924",
"0.5279904",
"0.5279645",
"0.5273226",
"0.5265712",
"0.5259247",
"0.5254173",
"0.52516073",
"0.52484727",
"0.5247715",
"0.5222768",
"0.5221703",
"0.5216855",
"0.5216527",
"0.5214467",
"0.52076316",
"0.52014697",
"0.51941544",
"0.51862735",
"0.51710355",
"0.51661134",
"0.5164608",
"0.51637477",
"0.5160776",
"0.51555717",
"0.51542646",
"0.51514703",
"0.5149763",
"0.5148236",
"0.51323813",
"0.5129201",
"0.5122931",
"0.5119479",
"0.51160216",
"0.51116484",
"0.51097775",
"0.5099989",
"0.50990653",
"0.50989616",
"0.50986856",
"0.5095589",
"0.5087532",
"0.50870013",
"0.5085695",
"0.50764555",
"0.5072835",
"0.506671",
"0.5065814",
"0.50632733",
"0.5062804"
] | 0.7289172 | 0 |
The chapters that coordinate at least 10% more parades than the average | @Query("select c1.name from Chapter c1 join c1.area a1 where ((select count(p) from Parade p join p.brotherhood b where b.area.id=a1.id)*1.) > (select avg((select count(p) from Parade p join p.brotherhood b where b.area.id=a.id)*1.1) from Chapter c join c.area a)")
Collection<String> chaptersWith10PerCentParadesCoordinateThanAvg(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Query(\"select avg((select count(p) from Parade p join p.brotherhood b where b.area.id=a.id)*1.), min((select count(p) from Parade p join p.brotherhood b where b.area.id=a.id)*1.), max((select count(p) from Parade p join p.brotherhood b where b.area.id=a.id)*1.), stddev((select count(p) from Parade p join p.brotherhood b where b.area.id=a.id)*1.) from Chapter c join c.area a\")\n\tDouble[] avgMinMaxStddevParadesCoordinatedByChapter();",
"@Query(\"select n from Newspaper n where n.articles.size < (select (avg(ne.articles.size)*0.9) from Newspaper ne)\")\n\tCollection<Newspaper> getNewspaperWith10PercentLessArticlesThanAverage();",
"@Query(\"select n from Newspaper n where n.articles.size > (select (avg(ne.articles.size)*1.1) from Newspaper ne)\")\n\tCollection<Newspaper> getNewspaperWith10PercentMoreArticlesThanAverage();",
"public int getAverage() { return (int)Math.ceil(getSumOfMarks()/ numberOfCourses); }",
"boolean hasPercentage();",
"private double avgNonEmpty() {\n\t\tdouble percent = 0;\n\t\t\n\t\tfor (LinkedList<WordCode<K, V>> ll : myBuckets) {\n\t\t\tif (ll.size() != 0) percent++;\n\t\t}\n\t\treturn (numEntries / percent);\n\t}",
"double totalMoviesAverageScore() {\n // call totalMovieAverage with no movie name\n // so filter will filter nothing and we'll get all the movies\n return totalMovieAverage(\"\");\n }",
"int getPercentageHeated();",
"@Query(\"select (select count(u) from User u where u.chirps.size *1.0 > (select avg(u.chirps.size)*1.75 from User u))*1.0/count(u) from User u\")\n\tDouble usersAboveAvgChirps();",
"public int getAvgSpec() {\n return totalSpec/totalMatches;\n }",
"public Double[] findDataNumerParadesCoordinatedByChapters() {\n\t\tDouble[] result;\n\n\t\tresult = this.paradeRepository.findDataNumerParadesCoordinatedByChapters();\n\n\t\treturn result;\n\t}",
"double redPercentage();",
"public double testAccuracy() {\r\n\t\tdouble accuracy = 0;\r\n\t\tint i = 0;\r\n\t\tdouble split = ((float)dataEntries.size()/(float)100)*70;\r\n\t\t\r\n\t\t//Filling arrays with the correct and predicted results to compare.\r\n\t\tfor (i=(int)split; i<dataEntries.size(); i++) {\r\n\t\t\t\tEntry en = dataEntries.get(i);\r\n\t\t\t\tcorrectArray.add(en.getHasCOVID19());\r\n\t\t\t\tdouble diagnosis = calcProbs(new Entry(en.getTemperature(), en.getAches(), en.getCough(), en.getSoreThroat(), en.getSoreThroat()));\r\n\t\t\t\tif (diagnosis>0.5) { predictArray.add(\"yes\"); }\r\n\t\t\t\telse { predictArray.add(\"no\"); }\r\n\t\t}\r\n\t\t\r\n\t\t//Comparing the results of \"hasCOVID19\" to each other.\r\n\t\tfor(i=0;i<correctArray.size();i++) {\r\n\t\t\tif (correctArray.get(i).equals(predictArray.get(i))) {\r\n\t\t\t\taccuracy++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Getting the result as a percentage and returning it.\r\n\t\taccuracy /= correctArray.size();\r\n\t\treturn accuracy * 100;\r\n\t}",
"private double scorePonderated(int i, int total) {\r\n\t\tif (total == 1) {\r\n\t\t\treturn 100.0;\r\n\t\t}\r\n\t\tdouble score = 100.0 / (2.0 * (i + 1));\r\n\t\treturn score;\r\n\t}",
"public void findAvg()\n {\n for(int i = 0; i <= scores.length-1; i++)\n {\n for (int j = 0; j <= scores[0].length-1; j++)\n {\n total += scores[i][j];\n }\n }\n System.out.println(\"The class average test score is \" + \n total/24 + \".\");\n }",
"@Override\n protected double compareScoredCriteria(ScoredCriteriaMap wikiScoredCriteria) {\n double[] preferenceScores = ScoredCriteriaMap.unpackScores(wikiScoredCriteria);\n double[] wikiScores = ScoredCriteriaMap.unpackScores(this.getPreferenceScoredCriteriaMap());\n\n // Calculate the sum\n double sum = 0;\n for (int i = 0; i < Criterion.NUMBER_OF; i++) {\n sum = sum + (preferenceScores[i] - wikiScores[i]) * (preferenceScores[i] - wikiScores[i]);\n }\n return (1 / (1 + Math.sqrt(sum)));\n }",
"public double getMainPercentage(){return mainPercentage;}",
"private double fillPercent() {\n\t\tdouble percent = 0;\n\t\t\n\t\tfor (LinkedList<WordCode<K, V>> ll : myBuckets) {\n\t\t\tif (ll.size() != 0) percent++;\n\t\t}\n\t\treturn (percent / myBuckets.size()) * 100;\n\t}",
"public float averageAnswers() {\n\t\tfloat out = 0;\n\t\t\n\t\tIterator<SolveResult> iter = super.iterator();\n\t\t\n\t\twhile(iter.hasNext()) {\n\t\t\tSolveResult thisResult = iter.next();\n\t\t\tfloat clues = ResultSet.clueCount(thisResult.puzzle);\n\t\t\tfloat cardinality = thisResult.puzzle.getCardinality();\n\t\t\tfloat conflicts = thisResult.puzzle.conflictCount();\n\t\t\t\n\t\t\tif(!(cardinality - clues - conflicts < 0)) {\n\t\t\t\tout += ((cardinality - clues - conflicts) / (81 - clues));\n\t\t\t}\n\t\t}\n\t\treturn out / super.size();\n\t}",
"public float getProgressPct() {\n return (float) currentCompactedKVs / getTotalCompactingKVs();\n }",
"int getRemainderPercent();",
"boolean isPerfect(double score);",
"public double getBestScore();",
"private double gradeQuiz() {\n int numCorrect = getNumberCorrect();\n double percentage = (numCorrect / numQuestions) * 100;\n return percentage;\n }",
"static int workbook(int n, int k, int[] arr) {\n int specialProblems = 0;\n int page = 1;\n for (int i = 0; i < n; i++) {\n for (int j = 1; j <= arr[i]; j++) {\n if (j == page)\n specialProblems++;\n if (j % k == 0)\n page++;\n }\n if (arr[i] % k != 0) page++;\n }\n return specialProblems;\n }",
"java.lang.String getPercentage();",
"@Test\n void adjectivesScoring() {\n NLPAnalyser np = new NLPAnalyser();\n List<CoreMap> sentences = np.nlpPipeline(\"RT This made my day; glad @JeremyKappell is standing up against #ROC’s disgusting mayor. \"\n + \"Former TV meteorologist Jeremy Kappell suing Mayor Lovely Warren\"\n + \"https://t.co/rJIV5SN9vB (Via NEWS 8 WROC)\");\n HashMap<String, Double> as = np.adjectivesScoring(sentences);\n for (String key : as.keySet()) {\n Double value = as.get(key);\n assertTrue(value >= 0 && value <= 4);\n }\n }",
"public double getPercentThreshold()\n {\n return percentThreshold;\n }",
"public void calcAvg(){\n\t\taverage = hits/atbat;\n\t\t\n\t}",
"public double pointsEarned();",
"protected static short getPercentage(HashMap<String, LinkedList<Integer>> fileContent) {\n List<Integer> temp = fileContent.get(wordsOfSearchedSentence.get(0));\n\n if (temp == null) {\n return 0;\n }\n\n short lengthOfFile = (short) wordsOfSearchedSentence.size();\n\n List<Integer> current;\n for(short i=1; i< lengthOfFile; i++) {\n current = fileContent.get(wordsOfSearchedSentence.get(i));\n if (current == null) {\n return Util.calculatePercentage(i, lengthOfFile);\n }\n temp = searchForSequence(temp, current);\n if (temp == null || temp.size() == 0) {\n return Util.calculatePercentage(i, lengthOfFile);\n }\n }\n return 100;\n }",
"public double getCourseworkPercentage(){return courseworkPercentage;}",
"private int totalInfeasibility(int[] chromosome) {\n\t\tint infeasibility = 0;\n\t\tint[] bins = new int[binCount];\n\t\tfor (int i = 0; i < chromosome.length; i++) {\n\t\t\tif (chromosome[i] >= bins.length) {\n\t\t\t\tinfeasibility += 10;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tbins[chromosome[i]] += packageWeights[i]; //put package into bin\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(\"noooo\");\n\t\t\t}\n\n\t\t}\n\n\t\tfor (int i = 0; i < bins.length; i++) {\n\t\t\tif (bins[i] > binSize)\n\t\t\t\tinfeasibility += bins[i] - binSize;\n\t\t}\n\t\treturn infeasibility;\n\t}",
"static Integer getProportion(MarketSegment m) {\n\t return MarketSegment.proportionsMap.get(m);\n }",
"private double calcScorePercent() {\n\t\tdouble adjustedLab = totalPP * labWeight;\n\t\tdouble adjustedProj = totalPP * projWeight;\n\t\tdouble adjustedExam = totalPP * examWeight;\n\t\tdouble adjustedCodeLab = totalPP * codeLabWeight;\n\t\tdouble adjustedFinal = totalPP * finalWeight;\n\n\t\tlabScore = (labScore / labPP) * adjustedLab;\n\t\tprojScore = (projScore / projPP) * adjustedProj;\n\t\texamScore = (examScore / examPP) * adjustedExam;\n\t\tcodeLabScore = (codeLabScore / codeLabPP) * adjustedCodeLab;\n\t\tfinalExamScore = (finalExamScore / finalExamPP) * adjustedFinal;\n\n//\t\tdouble labPercent = labScore / adjustedLab;\n//\t\tdouble projPercent = projScore / adjustedProj;\n//\t\tdouble examPercent = examScore / adjustedExam;\n//\t\tdouble codeLabPercent = codeLabScore / adjustedCodeLab;\n//\t\tdouble finalPercent = finalExamScore / adjustedFinal;\n\n\t\tdouble totalPercent = (labScore + projScore + examScore + codeLabScore + finalExamScore) / totalPP;\n\t\t\n\t\tscorePercent = totalPercent;\n\t\t\n\t\treturn totalPercent;\n\t}",
"public double calcProbs(Entry newEntry) {\r\n\t\ttotal = Collections.frequency(hasCOVID19, \"yes\");\r\n\t\tpIfYes += Collections.frequency(temperatureIfCOVID19,newEntry.getTemperature()) / total;\r\n\t\tpIfYes *= Collections.frequency(achesIfCOVID19,newEntry.getAches()) / total;\r\n\t\tpIfYes *= Collections.frequency(coughIfCOVID19,newEntry.getCough()) / total;\r\n\t\tpIfYes *= Collections.frequency(soreThroatIfCOVID19,newEntry.getSoreThroat()) / total;\r\n\t\tpIfYes *= Collections.frequency(dangerZoneIfCOVID19,newEntry.getDangerZone()) / total;\r\n\t\tpIfYes *= (double) total / dataEntries.size();\r\n\t\t\r\n\t\ttotal = Collections.frequency(hasCOVID19, \"no\");\r\n\t\tpIfNo += (Collections.frequency(temperature,newEntry.getTemperature()) - Collections.frequency(temperatureIfCOVID19,newEntry.getTemperature())) / total;\r\n\t\tpIfNo *= (Collections.frequency(cough,newEntry.getCough()) - Collections.frequency(coughIfCOVID19,newEntry.getCough())) / total;\r\n\t\tpIfNo *= (Collections.frequency(aches,newEntry.getAches()) - Collections.frequency(achesIfCOVID19,newEntry.getAches())) /total;\r\n\t\tpIfNo *= (Collections.frequency(soreThroat,newEntry.getSoreThroat()) - Collections.frequency(soreThroatIfCOVID19,newEntry.getSoreThroat())) /total;\r\n\t\tpIfNo *= (Collections.frequency(dangerZone,newEntry.getDangerZone()) - Collections.frequency(dangerZoneIfCOVID19,newEntry.getDangerZone())) / total;\r\n\t\tpIfNo *= (double) total / dataEntries.size();\r\n\t\t\r\n\t\t//Getting the result as a percentage and returning it.\r\n\t\tprobability = (pIfYes / (pIfYes+pIfNo)) * 100;\r\n\t\treturn probability;\r\n\t}",
"public double[] ratioPrivateNewspaperSubsciptionsVsTotalCustomers() {\n\t\tcheckAuthority();\n\t\tdouble ratio[] = new double[2];\n\t\tdouble res[] = new double[2];\n\t\tres[0] = 0.;\n\t\tres[1] = 0.;\n\t\ttry {\n\t\t\tratio[0] = this.administratorRepository\n\t\t\t\t\t.ratioPrivateNewspaperSubsciptions();\n\t\t\tratio[1] = this.administratorRepository.numberOfCustomers();\n\t\t\treturn ratio;\n\t\t} catch (Exception e) {\n\t\t\treturn res;\n\t\t}\n\n\t}",
"private static Predicate<Courses> numberOfStudentsPredecateMethod(int numberOfStudentsThreshhold) {\n\t\treturn course -> course.getNumberOfStudents() > numberOfStudentsThreshhold;\n\t}",
"public double getScore() {\n double compositeScore = this.normaliseViewingTime();\n if (this.normalisedRating > 0) {\n compositeScore *= this.normalisedRating;\n }\n else {\n compositeScore *= ((double)RANGE / (double)2) / (double)RANGE;\n }\n return compositeScore;\n }",
"private void calcEfficiency() {\n \t\tdouble possiblePoints = 0;\n \t\tfor (int i = 0; i < fermentables.size(); i++) {\n \t\t\tFermentable m = ((Fermentable) fermentables.get(i));\n \t\t\tpossiblePoints += (m.getPppg() - 1) * m.getAmountAs(\"lb\")\n \t\t\t\t\t/ postBoilVol.getValueAs(\"gal\");\n \t\t}\n \t\tefficiency = (estOg - 1) / possiblePoints * 100;\n \t}",
"public void calculateAverage() {\n\n if (turn == 1) {\n p1.setTotalScore(p1.getTotalScore() + turnScore);\n\n p1.setTotalDarts(p1.getTotalDarts() + 1);\n\n float p1Average = p1.getTotalScore() / p1.getTotalDarts();\n p1.setAverage(p1Average);\n\n } else if (turn == 2) {\n p2.setTotalDarts(p2.getTotalDarts() + 1);\n p2.setTotalScore(p2.getTotalScore() + turnScore);\n\n float p2Average = p2.getTotalScore() / p2.getTotalDarts();\n p2.setAverage(p2Average);\n }\n\n\n }",
"public double getPercentRem(){\n return ((double)freeSpace / (double)totalSpace) * 100d;\n }",
"private static Double[] collectWord(HashMap<Integer, ArrayList<Integer>> VtDocTr, int n) {\n\t\tDouble []arr= new Double[3];\r\n\t\tarr[0] = 0.0d ;\r\n\t\tarr[1] = 0.0d ;\r\n\t\tarr[2] = 0.0d ;\r\n\t\tfor (int i = 0; i < VtDocTr.size(); i++) {\r\n\t\t\tif(VtDocTr.get(i).get(n) > 0 && i < 10) {\r\n\t\t\t\t arr[0] += 1;\r\n\t\t\t}else if(VtDocTr.get(i).get(n)> 0 && i < 20) {\r\n\t\t\t\t arr[1] += 1;\r\n\t\t\t}else if(VtDocTr.get(i).get(n)> 0 && i < 30) {\r\n\t\t\t\t arr[2] += 1;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(arr[0] == 0.0d ) {\r\n\t\t\tarr[0] = 0.1d;\r\n\t\t}\r\n\t\tif(arr[1] == 0.0d){\r\n\t\t\tarr[1] = 0.1d;\r\n\t\t}\r\n\t\tif(arr[2] == 0.0d){\r\n\t\t\tarr[2]=0.1d;\r\n\t\t}\r\n\t\treturn arr;\r\n\t}",
"public int gotExtraCredit() {\n int counter = 0;\n\n // goes through each student and checks if best score is 100\n // and student only has 1 submission\n for (int i = 0; i < studentList.size(); i++) {\n if ((studentList.get(i)).getBestScore() == 100 && (studentList.get(i)).getNumberSubmits() == 1) {\n counter++;\n }\n }\n // return accumulated amount of students\n return counter;\n }",
"public void calculateScore() {\n for (Sequence seq: currentSeq) {\n double wordWeight = Retriever.getWeight(seq);\n String token = seq.getToken();\n int size = seq.getRight() - seq.getLeft() + 1;\n int titleCount = getCount(token.toLowerCase(), title.toLowerCase());\n if (titleCount != 0) {\n setMatch(size);\n setTitleContains(true);\n }\n int lowerCount = getCount(token.toLowerCase(), lowerContent);\n if (lowerCount == 0) {\n// scoreInfo += \"Token: \" + token + \" Original=0 Lower=0 WordWeight=\" + wordWeight + \" wordTotal=0\\n\";\n continue;\n }\n int originalCount = getCount(token, content);\n lowerCount = lowerCount - originalCount;\n if (lowerCount != 0 || originalCount != 0) {\n setMatch(size);\n }\n double originalScore = formula(wordWeight, originalCount);\n double lowerScore = formula(wordWeight, lowerCount);\n final double weight = 1.5;\n double addedScore = weight * originalScore + lowerScore;\n// scoreInfo += \"Token: \" + token + \" Original=\" + originalScore + \" Lower=\" + lowerScore +\n// \" WordWeight=\" + wordWeight + \" wordTotal=\" + addedScore + \"\\n\";\n dependencyScore += addedScore;\n }\n currentSeq.clear();\n }",
"public float calcAverage(){\n if(totalReviews > 0)\n return (float) (totalScore*1.0/totalReviews);\n else return 0;\n }",
"public Double avgCategoriesPerRendezvous() {\n\t\tDouble result;\r\n\t\tDouble sum = 0.0;\r\n\t\tCollection<Category> auxc = new ArrayList<Category>();\r\n\t\tfinal Collection<Rendezvous> auxr = this.rendezvousService.findAll();\r\n\t\tfor (final Rendezvous r : auxr) {\r\n\t\t\tauxc = this.findByRendezvousID(r.getId());\r\n\t\t\tsum = sum + auxc.size();\r\n\t\t}\r\n\t\tresult = sum / auxr.size();\r\n\t\treturn result;\r\n\t}",
"@Override\n\tpublic double avg() {\n\t\treturn total()/4.0;\n\t}",
"private boolean checkGreedyDefense() {\r\n return enTotal.get(2)+1 < myTotal.get(2) && enTotal.get(0)+1 < myTotal.get(0);\r\n }",
"protected abstract List<Double> calcScores();",
"@Override\n\tpublic int avg() {\n\t\treturn (this.sum()/3);\n\t}",
"private Double getProzent(Double points)\r\n \t{\r\n \t\treturn points / totalPoints;\r\n \t}",
"public double getAverageDistanceDriven() {\n \tdouble totalDistance = 0;\n \tdouble n = 0;\n \tfor (int i = 0; i<4; i++) {\n \t\tif (module.get(i).getAbsoluteDistanceDriven() > 0.05) {\n \t\t\ttotalDistance += Math.abs(module.get(i).getAbsoluteDistanceDriven());\n \t\t\tn++;\n \t\t}\n \t}\n \tif (n == 0) {\n \t\t//System.out.println(\"no swerve modules have gone more than .3 feet\");\n \t\tn = 1;\n \t}\n \treturn totalDistance / n;\n }",
"public void printAverageRatings(){\n ThirdRatings sr = new ThirdRatings();\n int raters = sr.getRaterSize();\n System.out.println(\"raters: \" + raters);\n System.out.println(\"-------------------------------------\");\n \n //MovieDatabase.initialize(\"ratedmovies_short.csv\");\n MovieDatabase.initialize(\"ratedmoviesfull.csv\");\n System.out.println(\"movies: \" + MovieDatabase.size());\n System.out.println(\"-------------------------------------\");\n \n \n int minRatings = 35;\n ArrayList<Rating> aveRat = sr.getAverageRatings(minRatings);\n System.out.println(\"Number of ratings at least \" + minRatings + \": \" + aveRat.size());\n // sort arraylist\n Collections.sort(aveRat);\n for(Rating r: aveRat){\n System.out.println(r.getValue() + \" : \" + MovieDatabase.getTitle(r.getItem()));\n }\n System.out.println(\"-------------------------------------\");\n \n// Filter f = new AllFilters();\n// f.addFilter(new YearsAfterFilter(2001));\n ArrayList<String> movies = MovieDatabase.filterBy(new YearAfterFilter(2001)); \n int c = 0;\n for(Rating r: aveRat){\n if(movies.contains(r.getItem())){c++;}\n }\n System.out.println(\"Number of ratings at least \" + minRatings + \" and made on or after 2001 : \" + c);\n System.out.println(\"-------------------------------------\");\n \n \n \n }",
"double greenPercentage();",
"public int totalWorth() {\n\t\tint val = 0;\n\t\tfor (Card c : cards) {\n\t\t\tval += c.value();\n\t\t}\n\t\treturn val;\n\t}",
"@Override\n\tpublic double getTotalScore() {\n\t\treturn score;\n\t}",
"void printScore(double sum[]){\n \n if((sum[1] > sum [4]) && (sum[1] > sum[5]) ){\n System.out.println(\"among 1 4 5 => 1\");\n }\n if((sum[4] > sum [1]) && (sum[4] > sum[5]) ){\n System.out.println(\"among 1 4 5 => 4\");\n }\n if((sum[5] > sum [1]) && (sum[5] > sum[4]) ){\n System.out.println(\"among 1 4 5 => 5\");\n }\n if((sum[2] > sum [6]) && (sum[2] > sum[8]) ){\n System.out.println(\"among 2 6 8 => 2\");\n }\n if((sum[6] > sum [2]) && (sum[6] > sum[8]) ){\n System.out.println(\"among 2 6 8 => 6\");\n }\n if((sum[8] > sum [2]) && (sum[8] > sum[6]) ){\n System.out.println(\"among 2 6 8 => 8\");\n }\n if((sum[3] > sum [0]) && (sum[3] > sum[7]) ){\n System.out.println(\"among 3 0 7 => 3\");\n }\n if((sum[0] > sum [3]) && (sum[0] > sum[7]) ){\n System.out.println(\"among 3 0 7 => 0\");\n }\n if((sum[7] > sum [3]) && (sum[7] > sum[0]) ){\n System.out.println(\"among 3 0 7 => 7\");\n }\n }",
"private boolean stepDivision(){\r\n\t\tif(stepNumber == 2){//the first step, k = 2\r\n\t\t\t//do division for all attributes on currentTable\r\n\t\t\tint attrNum = currentTable.getNumberofAttributes();\r\n\t\t\tint caseNum = currentTable.getnumberofCases();\r\n\t\t\tallmaxmin = currentTable.calcuateAllMaxMin();\r\n\t\t\tBigDecimal tempcutPoint;\r\n\t\t\tBigDecimal tempcompare;\r\n\t\t\tfor(int i = 0; i < attrNum; i++){\r\n\t\t\t\ttempcutPoint = allmaxmin[i*2].add(allmaxmin[i*2+1]).multiply(new BigDecimal(0.5));\r\n\t\t\t\tfor(int j = 0;j < caseNum;j++){\r\n\t\t\t\t\ttempcompare = new BigDecimal(originalTable.getItemByIndexinTable(j, i));\r\n\t\t\t\t\tif(tempcompare.compareTo(tempcutPoint) == -1){\r\n\t\t\t\t\t\tcurrentTable.setItemByIndexinTable(j,i,Utils.Round2(allmaxmin[i*2+1])+\"..\"+Utils.Round2(tempcutPoint));\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse{\r\n\t\t\t\t\t\tcurrentTable.setItemByIndexinTable(j,i,Utils.Round2(tempcutPoint)+\"..\"+Utils.Round2(allmaxmin[i*2]));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tcutPointsNumber[i] = 1; //at first, only one cut point for each attribute\r\n\t\t\t}\r\n\t\t}\r\n\t\telse{//only divide the worst case\r\n\t\t\tcutPointsNumber[currentWorstAttribute]++;\r\n\t\t\tint cutSize = cutPointsNumber[currentWorstAttribute];\r\n\t\t\tBigDecimal[] maxmin = originalTable.calcuateMaxandMinAttribute(currentWorstAttribute);\r\n\t\t\tBigDecimal interval = (maxmin[0].subtract(maxmin[1])).divide(new BigDecimal(cutSize+1),3, RoundingMode.HALF_UP);\r\n\t\t\tif(interval.compareTo(new BigDecimal(0)) == 0){\r\n\t\t\t\t//System.out.println();\r\n\t\t\t}\r\n\t\t\tBigDecimal intervalstart,intervalend;\r\n\t\t\tint caseNum = currentTable.getnumberofCases();\r\n\t\t\tBigDecimal tempcompare;\r\n\t\t\tfor(int i = 0;i < caseNum;i++){\r\n\t\t\t\tfor(int j = 0;j < cutSize+1;j++){\r\n\t\t\t\t\ttempcompare = new BigDecimal(originalTable.getItemByIndexinTable(i, currentWorstAttribute));\r\n\t\t\t\t\tintervalstart = maxmin[1].add(interval.multiply(new BigDecimal(j)));\r\n\t\t\t\t\tif(j == cutSize){\r\n\t\t\t\t\t\tintervalend = maxmin[0];\r\n\t\t\t\t\t\tif(tempcompare.compareTo(intervalstart) >= 0&&tempcompare.compareTo(intervalend) <= 0){\r\n\t\t\t\t\t\t\tcurrentTable.setItemByIndexinTable(i, currentWorstAttribute, Utils.Round2(intervalstart)+\"..\"+Utils.Round2(intervalend));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse{\r\n\t\t\t\t\t\tintervalend = intervalstart.add(interval);\r\n\t\t\t\t\t\tif(tempcompare.compareTo(intervalstart) >= 0&&tempcompare.compareTo(intervalend) == -1){\r\n\t\t\t\t\t\t\tcurrentTable.setItemByIndexinTable(i, currentWorstAttribute, Utils.Round2(intervalstart)+\"..\"+Utils.Round2(intervalend));\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\t\t\t}\t\t\t\t\r\n\t\t\t}\t\r\n\t\t\tcurrentTable.printoutDecisionTable();\r\n\t\t\t//System.out.println();\r\n\t\t}\r\n\t\tConsistencyChecker newchecker = new ConsistencyChecker(currentTable);\r\n\t\tif(newchecker.ifConsistency() == true){\r\n\t\t\tSystem.out.println(\"Discretization Succeed!\");\r\n\t\t\t//currentTable.enablePrint = true;\r\n\t\t\tcurrentTable.printoutDecisionTable();\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse{\r\n\t\t\tstepNumber++;\r\n\t\t\tcurrentTable.printoutDecisionTable();\r\n\t\t\tcurrentWorstAttribute = getWorstAttributeNo();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"public double getTotalCellularityPercentage()\r\n \t{\r\n \t\treturn totalCellularityPercentage;\r\n \t}",
"public Double averageArticlesPerNewspaperPrivates() {\n\t\tcheckAuthority();\n\t\tDouble a = this.administratorRepository\n\t\t\t\t.averageArticlesPerNewspaperPrivates();\n\t\tif (a == null) {\n\t\t\ta = 0.;\n\t\t}\n\t\ttry {\n\t\t\treturn a;\n\t\t} catch (Exception e) {\n\t\t\treturn 0.;\n\t\t}\n\n\t}",
"int getRemainPoints();",
"boolean hasTotalBet();",
"boolean hasTotalBet();",
"public Double getTotalAnomalyPercentage();",
"public static int[] mucScore(LeanDocument key, LeanDocument response)\n{\n // System.out.println(\"==========================================================\");\n // System.out.println(\"Key:\\n\"+key.toStringNoSing()+\"\\n*************************\\nResponse:\\n\"+response.toStringNoSing());\n\n Iterator<TreeMap<Integer, Integer>> goldChains = key.chainIterator();\n // double mucRecall = 0.0;\n int mucRecallNom = 0;\n int mucRecallDenom = 0;\n while (goldChains.hasNext()) {\n TreeMap<Integer, Integer> keyChain = goldChains.next();\n if (keyChain.size() > 1) {\n int numInt = numIntersect(key, keyChain, response);\n\n // int numMatched = getNumMatched(key, keyChain);\n // if(numMatched>0){\n // mucRecallNom += numMatched-numInt;\n mucRecallNom += (keyChain.size() - numInt);\n // mucRecallDenom += numMatched-1;\n mucRecallDenom += keyChain.size() - 1;\n\n // System.out.println(keyChain+\"\\n\"+(keyChain.size() - numInt)+\"/\"+(keyChain.size()-1));\n // }\n }\n }\n int[] result = { mucRecallNom, mucRecallDenom };\n\n return result;\n}",
"public double trueCount() {\n\t\t\t\n\t\t\treturn (double)total_count/((double)size/52);\n\t\t}",
"public static void main( String args[] ) throws Exception\n\t{\n\t\t\tBufferedReader infile = new BufferedReader( new FileReader( \"ExamScores.txt\" ) );\n\n\t\t\t// you declare all needed ArrayLists and other variables from here on.\n\t\t\tArrayList<String> lines = new ArrayList<String>();\n\n\t\t\tSystem.out.println(\"\\nSTEP #1: 50%\"); // 50%\n\t\t\twhile (infile.ready()) {\n\t\t\t\tString line = infile.readLine();\n\t\t\t\tSystem.out.println(line);\n\t\t\t\tlines.add(line);\n\t\t\t}\n\t\t\tinfile.close();\n\n\n\t\t\tSystem.out.println(\"\\nSTEP #2: 25%\"); // 75 %\n\t\t\tCollections.sort(lines);\n\t\t\tfor (String s: lines)\n\t\t\t\tSystem.out.println(s);\n\n\t\t\tSystem.out.println(\"\\nSTEP #3: 10%\"); // 85%\n\n\t\t\tTreeMap<String, ArrayList<Integer>> st2sc = new TreeMap<String, ArrayList<Integer>>();\n\t\t\tTreeMap<Double, String> ave2st = new TreeMap<Double, String>();\n\t\t\tint[] sum = new int[lines.get(0).split(\"\\\\s+\").length-1];\n\t\t\t\n\t\t\tinfile = new BufferedReader ( new FileReader(\"query.txt\") );\n\t\t\tString[] queryS= infile.readLine().split(\" \");\n\t\t\tint[] query = new int[queryS.length];\n\t\t\tfor (int i=0; i<queryS.length; i++)\n\t\t\t\tquery[i]=Integer.parseInt(queryS[i]);\n\t\t\tfor (String s: lines)\n\t\t\t{\t\n\t\t\t\tdouble sumq = 0;\n\t\t\t\tdouble aveq = 0;\n\t\t\t\tString[] tokens = s.split(\"\\\\s+\");\n\t\t\t\tArrayList<Integer> scores = new ArrayList<Integer>();\n\t\t\t\tfor (int t=1; t<tokens.length; t++){\n\t\t\t\t\tscores.add(Integer.parseInt(tokens[t]));\n\t\t\t\t}\n\t\t\t\tst2sc.put(tokens[0], scores);\n\t\t\t\tfor (int q: query)\n\t\t\t\t\tsumq += Integer.parseInt(tokens[q]);\n\t\t\t\tfor (int nth = 0; nth<sum.length; nth++){\n\t\t\t\t\tsum[nth]+= Integer.parseInt(tokens[nth+1]);\n\t\t\t\t}\n\t\t\t\taveq = sumq/3;\n\t\t\t\tave2st.put(aveq, tokens[0]);\n\t\t\t}\n\t\t\tfor (double f: ave2st.keySet())\n\t\t\t\tSystem.out.printf(ave2st.get(f)+\" \"+\"%.2f\\n\", f);\n\n\t\t\tSystem.out.println(\"\\nSTEP #4: 15%\"); // 100%\n\t\t\t\n\t\t\tint lowest = sum[0];\n\t\t\tint which = 0;\n\t\t\tfor (int i=1; i<sum.length; i++)\n\t\t\t{\n\t\t\t\tif (sum[i]<lowest)\n\t\t\t\t{\n\t\t\t\t\tlowest = sum[i];\n\t\t\t\t\twhich = i;\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"exam\"+(which+1)+\" had the lowest average\");\n\n\n\t}",
"public double[] proportionPercentage(){\n if(!this.pcaDone)this.pca();\n return this.proportionPercentage;\n }",
"public double courseAverage()\n\t{\n\t\tdouble dQuiz;\n\t\tdouble dProj;\n\t\tdouble dTest;\n\t\tdouble dFinal;\n\t\tdouble dWeightedAvg;\n\t\t\n\t\tswitch(quizzesGraded)\n\t\t{\n\t\t\t\n\t\t\tcase 1:\n\t\t\t\tdQuiz= (1.0 * quiz1) * pctQ;\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tdQuiz=((1.0 * quiz1+quiz2)/2) * pctQ;\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tdQuiz=((1.0 * quiz1 + quiz2 + quiz3)/3) * pctQ;\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tdQuiz=((1.0 * quiz1 + quiz2 + quiz3 + quiz4)/4) * pctQ;\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\tdQuiz=((1.0 * quiz1 + quiz2 + quiz3 + quiz4 + quiz5)/5) * pctQ;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tdQuiz = 0;\n\t\t}\n\t\tswitch(projGraded)\n\t\t{\n\t\t\t\n\t\t\tcase 1: \n\t\t\t\tdProj=((1.0 * proj1)) * pctP;\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tdProj=((1.0 * proj1 + proj2)/2) * pctP;\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tdProj=((1.0 * proj1 + proj2 + proj3)/3)*pctP;\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tdProj=((1.0 * proj1 + proj2 + proj3 + proj4)/4) * pctP;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tdProj = 0;\n\t\t}\n\t\tswitch(testGraded)\n\t\t{\n\t\t\tcase 1:\n\t\t\t\tdTest=(1.0 * test1) * pctT;\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tdTest=((1.0 * test1+test2)/2) * pctT;\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tdTest=((1.0 * test1 + test2 + test3)/3) * pctT;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tdTest = 0;\n\t\t}\n\t\tif(recordedFinalExam==true)\n\t\t{\n\t\t\tdFinal=finalExam*pctF;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdFinal=0;\n\t\t}\n\t\tdWeightedAvg= (dProj + dTest + dQuiz + dFinal);\n\t\treturn dWeightedAvg;\n\t\t\n\t}",
"public double averageArticlesPerNewspaper() {\n\t\tcheckAuthority();\n\t\ttry {\n\t\t\treturn this.administratorRepository.averageArticlesPerNewspaper();\n\t\t} catch (Exception e) {\n\t\t\treturn 0.;\n\t\t}\n\n\t}",
"int calcPlagiarismPercent() throws ParserException;",
"public boolean isDifficult()\n {\n int count = 0;\n for (int i = 1; i < markers.length; i++) {\n if (Math.abs(markers[i] - markers[i-1]) >= 30){\n count++;\n }\n }\n return (count >= 3);\n }",
"private double getAverageScore(String s) {\n\t\tdouble total = 0.0; // the total score of each category\n\t\tdouble pointsPos = 0.0; // The position of the score in the iterator.\n\t\tScore score;// the Score instance\n\t\tScoreIterator cat = scores.iterator(s);\n\t\t// Read all score belongs to the specific category and calculate the\n\t\t// percentage for this work.\n\t\twhile (cat.hasNext()) {\n\t\t\tscore = cat.next();\n\t\t\ttotal += (score.getPercent());\n\t\t\tpointsPos++;\n\t\t}\n\t\treturn total / pointsPos; // return the average score\n\t}",
"public double getHeardPercentSports() {\n return heardPercentSports;\n }",
"static int paintersPartition(int a[], int n, int k)\r\n\t {\r\n\t int start = a[0], end = a[0], minOfMax = -1;\r\n\t \r\n\t //this is to initialise start as max of all array elements and end as sum of all array elements\r\n\t for(int i = 1; i < n; i++)\r\n\t {\r\n\t end += a[i];\r\n\t \r\n\t if(a[i] > start)\r\n\t start = a[i];\r\n\t }\r\n\t \r\n\t while(start <= end)\r\n\t {\r\n\t int mid = start + ((end - start) / 2);\r\n\t \r\n\t if(isValid(a, n, k, mid))\r\n\t {\r\n\t minOfMax = mid; //this will hold one of the valid solution but then to get the most optimal one, we need check further on left side of search space\r\n\t end = mid - 1;\r\n\t }\r\n\t else\r\n\t start = mid + 1;\r\n\t }\r\n\t \r\n\t return minOfMax;\r\n\t }",
"public double averageSurfaceToVolumeRatio() {\n int index = 0;\n double total = 0.0;\n if (numberOfIcosahedrons() == 0) {\n return 0;\n }\n else {\n while (index < icosList.size()) {\n total += icosList.get(index).surfaceToVolumeRatio();\n index++;\n }\n }\n return total / icosList.size();\n }",
"public double calculateGoodness(CongressionalDistrict cd, int year){\n goodness = 0;\r\n Iterator<Constraint> iterate = constraints.iterator();\r\n iterate.forEachRemaining(c -> {\r\n goodness += -10*c.calculateConstraint(stateStats,cd,year);\r\n });\r\n for(int i=0; i<measures.size();i++){\r\n \r\n Integer gc = weights.get(measures.get(i).name);\r\n if(gc != null){\r\n double x = measures.get(i).calculate(stateStats,cd,year);\r\n goodness += gc*x;\r\n }\r\n }\r\n \r\n return goodness;\r\n }",
"private static Double[] collectWord2(HashMap<Integer, ArrayList<Integer>> VtDocTr, int n) {\n\t\tDouble []arr= new Double[3];\r\n\t\tarr[0] = 0.0d ;\r\n\t\tarr[1] = 0.0d ;\r\n\t\tarr[2] = 0.0d ;\r\n\t\tfor (int i = 0; i < VtDocTr.size(); i++) {\r\n\t\t\tif(VtDocTr.get(i).get(n)== 0 && i < 10) {\r\n\t\t\t\t arr[0] += 1;\r\n\t\t\t}else if(VtDocTr.get(i).get(n)== 0 && i < 20) {\r\n\t\t\t\t arr[1] += 1;\r\n\t\t\t}else if(VtDocTr.get(i).get(n)== 0 && i < 30) {\r\n\t\t\t\t arr[2] += 1;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(arr[0] == 0.0d ) {\r\n\t\t\tarr[0] = 0.1d;\r\n\t\t}\r\n\t\tif(arr[1] == 0.0d){\r\n\t\t\tarr[1] = 0.1d;\r\n\t\t}\r\n\t\tif(arr[2] == 0.0d){\r\n\t\t\tarr[2]=0.1d;\r\n\t\t}\r\n\t\t\r\n\t\treturn arr;\r\n\t}",
"public void recommended() {\n MainActivity activity = (MainActivity) getActivity();\n ArrayList<Integer> results = new ArrayList<>();\n int highest = 0;\n for (int i = 0; i < activity.getUserLocations().size(); i++) {\n int lid = activity.database.getLocID(1, activity.userLocations.get(i).getProvider());\n ArrayList<LocationMoodObject> locmood = activity.database.getLocMood(lid);\n int result = 0;\n\n for (int j = 0; j < locmood.size(); j++) {\n switch (locmood.get(j).mood) {\n case (1):\n result = result + 1;\n break;\n case (2):\n result = result + 2;\n break;\n case (3):\n result = result + 3;\n break;\n case (4):\n result = result + 4;\n break;\n case (5):\n result = result + 5;\n break;\n }\n }\n if (locmood.size()>0){\n result = result / locmood.size();\n results.add(result);}\n\n }\n\n for (int i = 0; i < results.size(); i++) {\n if (results.get(i) > highest) {\n highest = results.get(i);\n }\n }\n\n recommended = activity.userLocations.get(highest).getProvider();\n }",
"public int average() {\n int total = 0;\n\n for (int score : scores) {\n total += score;\n }\n\n return total / scores.length;\n }",
"public double getAverageMarkPerModule(){\n return achievedMarks\n .stream()\n .mapToDouble(AchievedMark::getMark)\n .average()\n .getAsDouble();\n }",
"public Double getTotalMatched(){\n return totalMatched;\n }",
"public float getAverageBetweenPoint(){\n return getMetric()/list.size();\n }",
"public void printMarks(Result r) { \n\t\tdouble mark;\n\t\tdouble percentage = 0;\n\t\tSubcomponent sub;\n\t\t\n\t\t// if there are no subcomponents\n\t\tif (!haveSub) {\n\t\t\tfor (int j = 0; j < r.getAllGrades().size(); j++) {\n\t\t\t\tGrade tempG = r.getAllGrades().get(j);\n\t\t\t\tif (Objects.equals(tempG.getType(), gradeType.EXAM)) {\n\t\t\t\t\tSystem.out.println(\"EXAM, marks: \" + tempG.getMark() + \", weightage: \" + (mainPercentage*100) + \"%\");\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println(\"COURSEWORK-TOTAL, marks: \" + tempG.getMark() + \", weightage: \" + (courseworkPercentage*100) + \"%\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tfor (int i = 0; i < r.getAllGrades().size(); i ++) {\n\t\t\t\tGrade tempG = r.getAllGrades().get(i);\n\t\t\t\t// If grade is exam\n\t\t\t\tif (Objects.equals(tempG.getType(), gradeType.EXAM)) {\n\t\t\t\t\tSystem.out.println(\"EXAM, marks: \" + tempG.getMark() + \", weightage: \" + (mainPercentage*100) + \"%\");\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// find the weightage according to the temG.name\n\t\t\t\t\tfor (int j = 0; j < subcomponent.size(); j ++) {\n\t\t\t\t\t\tsub = subcomponent.get(j);\n\t\t\t\t\t\tString subName = sub.getName();\n\t\t\t\t\t\tif (Objects.equals(subName, tempG.getName())) {\n\t\t\t\t\t\t\tpercentage = sub.getPercentage();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(tempG.getType() + \"-\" + tempG.getName() + \", marks: \" \n\t\t\t\t\t\t\t+ tempG.getMark() + \", weightage: \" + (percentage*100) + \"%\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Print total coursework\n\t\t\tSystem.out.println(\"COURSEWORK-TOTAL, marks: \" + getCourseworkMark(r) + \", weightage: \" + (courseworkPercentage*100) + \"%\");\n\t\t}\n\t\n\t}",
"public static float calculatePercent(float numOfSpecificTrees, float totalTrees){\n\t\tfloat percent= numOfSpecificTrees/totalTrees*100;\n\t\treturn percent;\n\t\t\n\t}",
"public double getPercentageOfAvailabilityMeetingSla() {\n final double totalOfAvailabilitySatisfied = getBrokerList()\n .stream()\n .filter(b -> faultInjection.availability(b) * 100 >= getCustomerMinAvailability(b))\n .count();\n return totalOfAvailabilitySatisfied / getBrokerList().size();\n }",
"public List findChapters() {\n chap = new ArrayList();\n int c_count = 0;\n //check if testament is old \n if (testament.equals(\"old\")) {\n //assign the value of the number of chapters to c_count\n c_count = Integer.parseInt(BookModel.old[chapter][1]);\n } //check if testament is new \n else if (testament.equals(\"new\")) {\n //assign the value of the number of chapters to c_count\n c_count = Integer.parseInt(BookModel.newT[chapter][1]);\n }\n\n //add chapter number to a string for each chapter\n for (int y = 1; y <= c_count; y++) {\n chap.add(\"Chapter \" + y);\n }\n //return a list of chapters for the selected book\n return chap;\n }",
"public int totalScore() {\n return 0;\n }",
"public float evaluate(PhraseInfo p) {\n int numChords = p.gen.prog.get(p.gen.progIndex).size();\n int tn = Math.min(phraseLen, (int)Math.round(targetNotes * ((numChords + 1) / 3.0))); // not directly proportional.\n // scores: 50, 49, 46, 41, 34, 25 etc.\n int score = Math.max(0, 50 - (int)Math.round(Math.pow(Math.abs(p.noteCount - tn), 2)));\n return (float)Math.min(1.0f, score/50.0f);\n }",
"public int best(){\n List<Integer> points = count();\n Integer max = 0;\n for (Integer p: points){\n if (p <= 21 && max < p){\n max = p;\n }\n }\n return max;\n }",
"double agression();",
"public int getAverageScore() {\n\t\treturn totalScore / quizCount;\n\t}",
"public int getTotalPoints() {\n \tint total = 0;\n \tfor (int i = 0; i < assignments.size(); i++) {\n \t\ttotal += assignments.get(i).getWorth();\n \t}\n \treturn total;\n }",
"@Override\n public double findAverage() {\n double average = 0;\n for (Student key : map.keySet()) {\n average += map.get(key).getValue();\n }\n average /= map.keySet().size();\n return average;\n }",
"@Override\n\tpublic int findTotalGuide() throws Exception {\n\t\treturn tGuideInfoCustomMapper.findTotalGuide();\n\t}",
"Float getFedAnimalsPercentage();",
"public int getPercentage() {\r\n return Percentage;\r\n }",
"double getCritChance();",
"public BigDecimal getRows_examined_avg() {\n return rows_examined_avg;\n }"
] | [
"0.60869545",
"0.6086452",
"0.6047846",
"0.5879171",
"0.5856739",
"0.57877666",
"0.5674289",
"0.5654524",
"0.54570866",
"0.54166216",
"0.5349154",
"0.52930045",
"0.529291",
"0.5273734",
"0.52660716",
"0.51839006",
"0.5174608",
"0.51667297",
"0.5166624",
"0.51424074",
"0.5136779",
"0.5122682",
"0.5120694",
"0.5120369",
"0.5119768",
"0.51141053",
"0.509452",
"0.5093524",
"0.50771534",
"0.50755525",
"0.5067627",
"0.5066958",
"0.5062631",
"0.5047111",
"0.50458163",
"0.5034778",
"0.5033097",
"0.5028834",
"0.50252455",
"0.502302",
"0.50213045",
"0.5016837",
"0.5016239",
"0.50154215",
"0.50111073",
"0.499374",
"0.49825507",
"0.49788705",
"0.49725968",
"0.49536633",
"0.4952911",
"0.49514627",
"0.49488243",
"0.49473122",
"0.49472302",
"0.493946",
"0.49304152",
"0.49282408",
"0.49257612",
"0.49256468",
"0.49235597",
"0.4922073",
"0.4921873",
"0.4921873",
"0.49214476",
"0.4920002",
"0.49185804",
"0.4918317",
"0.49142903",
"0.49110484",
"0.49006504",
"0.4900057",
"0.48996332",
"0.48911715",
"0.4886178",
"0.48858875",
"0.488163",
"0.48780233",
"0.487192",
"0.48706496",
"0.48697424",
"0.48673454",
"0.48626792",
"0.48595977",
"0.48564002",
"0.4852391",
"0.4849534",
"0.48475212",
"0.48458394",
"0.4837217",
"0.4833964",
"0.48318237",
"0.48316878",
"0.48298553",
"0.48286253",
"0.48285413",
"0.48262185",
"0.48255503",
"0.48242018",
"0.4821118"
] | 0.74238724 | 0 |
Retrieves the chapter associated with a certain area. | @Query("select c from Chapter c where c.area.id=?1")
Chapter getChapterForArea(int id); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Chapter getChapter() {\n return chapter;\n }",
"@Override\n public final Chapter get(int index) {\n return chapterAt(index);\n }",
"public String getChapter(long id) {\n throw new UnsupportedOperationException(\"Not supported yet.\");\n }",
"Section getSection();",
"public final Chapter chapterAt(int index) {\n return children.get(index);\n }",
"@Override protected String getSection(final String param) {\n return getBrowser().getDrbdXML().getSection(param);\n }",
"public String getCourseArea() {\n return courseArea;\n }",
"public Course getCourseById(String id);",
"public Bible findFullVerse(String bookName, int chapterNo, int verseNo);",
"public String getChapterName() {\n return chapterName;\n }",
"private Course getCourse(String courseId) {\n MongoCollection<Course> courseMongoCollection = mongoDatabase.getCollection(\"course\", Course.class);\n return courseMongoCollection.find(eq(\"_id\", new ObjectId(courseId))).first();\n }",
"public Area getArea(Area area) {\r\n\t\treturn this.getArea(area.getId());\r\n\t}",
"public Capitol getCapitol(int indexChapterOne) {\n\t\treturn null;\n\t}",
"Paper getPaperInfo(Long paperId,Long courseId);",
"public Optional<Course> getCourse(String id) {\n//\t\treturn topics.stream().filter(t -> t.getId().equals(id)).findFirst().get();\n\t\treturn courseRepository.findById(id);\n\t}",
"@Override\n\tpublic List<Chapter> findByCourse(Integer idCourse) {\n\t\treturn rDao.findByCourse(idCourse);\n\t}",
"@GET(\"w/api.php?action=parse&format=json&prop=sections\")\n Call<JsonElement> getTocFromPage(@Query(\"pageid\") long pageid);",
"protected String getChapterBlock()\n {\n return \"<chapter></chapter>\";\n }",
"public Course getCourse(String id) {\n int idx = getCourseIdx(id); \r\n if (idx < 0)\r\n return null; \r\n return courses.get(idx);\r\n }",
"Collection<? extends Object> getHadithChapterNo();",
"BookSide getSide();",
"public List findChapters() {\n chap = new ArrayList();\n int c_count = 0;\n //check if testament is old \n if (testament.equals(\"old\")) {\n //assign the value of the number of chapters to c_count\n c_count = Integer.parseInt(BookModel.old[chapter][1]);\n } //check if testament is new \n else if (testament.equals(\"new\")) {\n //assign the value of the number of chapters to c_count\n c_count = Integer.parseInt(BookModel.newT[chapter][1]);\n }\n\n //add chapter number to a string for each chapter\n for (int y = 1; y <= c_count; y++) {\n chap.add(\"Chapter \" + y);\n }\n //return a list of chapters for the selected book\n return chap;\n }",
"private void viewCourse() {\n Scanner sc = new Scanner(System.in);\n System.out.print(\"ID of the course to be viewed: \");\n Long id = Long.parseLong(sc.next());\n\n Course c = ctrl.getCourse(id);\n if (c != null)\n System.out.println(c.toString());\n else\n System.out.println(\"Course with this ID doesn't exist!\");\n }",
"public Optional<Course> getCourse(String id) {\n\t\treturn courseRepository.findById(id);\n\t}",
"public abstract String loadChapterTextLowercasedWithoutSplit(Book book, int chapter_1);",
"@AutoEscape\n\tpublic String getCourse();",
"@Override\n public boolean isChapter() {\n return getType() == BlockType.CHAPTER;\n }",
"public void setCourseArea(String courseArea) {\n this.courseArea = courseArea;\n }",
"public Course getCourse(String courseId) {\n return courses.get(courseId);\n }",
"AreaMaster findById(long areaId) throws NoSuchAreaException;",
"public CatalogDescription getCatalogDescription(String course_id);",
"public Course getCourse() {\n return course; //XXX-CHANGE-XXX\n }",
"public Contest findByTitle(String title);",
"@Override\n\tpublic Course getCourse(String id) {\n\t\treturn null;\n\t}",
"public MangaChapter getChapterByNumber(final int number) {\n if (chapters == null) {\n return null;\n }\n for (MangaChapter chapter : chapters) {\n if (chapter.getNumber() == number) {\n return chapter;\n }\n }\n return null;\n }",
"Book getBookByTitle(String title);",
"public Course getCourse() {\n return course;\n }",
"public Course get(Course course) {\n\t\tString sql = \"SELECT * FROM course WHERE Cour_ID = ?\";\n\t\ttry {\n\t\t\tconn = dataSource.getConnection();\n\t\t\tsmt = conn.prepareStatement(sql);\n\t\t\tsmt.setInt(1, course.getCourId());\n\t\t\trs = smt.executeQuery();\n\t\t\tif(rs.next()){\t\t\t\t\n\t\t\t\tcourse.setCourName(rs.getString(\"Cour_Name\"));\n\t\t\t\tcourse.setCourSemester(rs.getInt(\"Cour_Semester\"));\n\t\t\t\tcourse.setCourObligatory(rs.getString(\"Cour_Obligatory\"));\n\t\t\t\tcourse.setCourBriefIntro(rs.getString(\"Cour_BriefIntro\"));\n//\t\t\t\tcomment.setComUploadDate(rs.getDate(\"Com_Upload_Date\"));\n\t\t\t\tcourse.getCourseCate().setCourCateId(rs.getInt(\"CourCate_ID\"));\n\t\t\t\t\n\t\t\t}\n\t\t\trs.close();\n\t\t\tsmt.close();\n \n\t\t} catch (SQLException e) {\n\t\t\tthrow new RuntimeException(e);\n \n\t\t} finally {\n\t\t\tif (conn != null) {\n\t\t\t\ttry {\n\t\t\t\t\tconn.close();\n\t\t\t\t} catch (SQLException e) {}\n\t\t\t}\n\t\t}\n\t\treturn course;\n\t}",
"String getVenue();",
"public abstract int getGuideTitle();",
"@GET(\"w/api.php?action=parse&format=json&noimage\")\n Call<JsonElement> getSectionFrom(@Query(\"pageid\") long pageid,@Query(\"section\") long section);",
"public Course getCourse(String id) {\n\t\treturn courseRepository.findById(id).orElseThrow(() -> new ResourceNotFoundException(id));\n\t}",
"protected void checkChapter(final Parade parade) {\n\t\tfinal Chapter chapter;\n\t\tfinal Area areaChapter;\n\t\tArea areaParade;\n\n\t\tchapter = this.chapterService.findByPrincipal();\n\t\tareaChapter = chapter.getArea();\n\t\tareaParade = this.areaService.findAreaByParade(parade.getId());\n\n\t\tAssert.isTrue(areaChapter.equals(areaParade));\n\t}",
"public Course getCourse(String id) {\n\t\treturn courseRepo.findById(id).orElse(new Course());\n\t\t\n\t}",
"public Optional<Course> findById(int courseId) {\n\t\treturn crepo.findById(courseId);\r\n\t}",
"public abstract String getArea();",
"public Course getCourseById(int id) {\n\t\treturn this.getHibernateTemplate().get(Course.class, id);\n\t}",
"public Course getCourseById(int id) {\n\t\treturn null;\n\t}",
"public abstract Collection<String> getSections();",
"private void fetchArea() {\n \t\t// Fetch the isNew.\n \t\tIntent i = this.getIntent();\n \t\tthis.isNew = i.getBooleanExtra( EXTRAS_AREA_IS_NEW, true );\n \n \t\t// Fetch ID.\n \t\tint id = i.getIntExtra( EXTRAS_AREA_ID, -1 );\n \t\tif ( id == -1 ) {\n \t\t\tToast.makeText( this, \"No area ID provided, finishing!\", Toast.LENGTH_LONG ).show();\n \t\t\tthis.finish();\n \t\t}\n \n \t\t// Get the set from application.\n \t\tthis.set = SFApplication.get().getGPSSet();\n \n \t\t// For some weird reason, NullPointerException will happen if we don't do this.\n \t\tthis.set.setMessageBus( SFApplication.get().getBus() );\n \n \t\t// Find area in set.\n \t\tthis.area = this.set.getById( id );\n \n \t\tLog.d( TAG, this.area.toString() );\n \n\t\tToast.makeText( this, \"The area ID provided did not exist in set.\", Toast.LENGTH_LONG ).show();\n\t\tthis.finish();\n \t}",
"@Override\n protected void extractChapText(Chapter chapter) {\n StringBuilder chapterText = new StringBuilder();\n\n Elements content = chapter.rawHtml.select(chapTextSelector);\n Iterator<Element> iterator = content.iterator();\n while (iterator.hasNext()) {\n chapterText.append(iterator.next().html());\n if (iterator.hasNext()) chapterText.append(\"<hr />\");\n }\n chapter.contentFromString(chapterText.toString().replace(\"blockquote\", \"div\"));\n }",
"@Override\n\tpublic Map<String, Object> findCourseById(int id) {\n\t\treturn cd.findCourseById(id);\n\t}",
"public String getCourseTitle() {\n return courseTitle;\n }",
"public Course getCourse(int index) {\n return courseList.get(index); \n }",
"@GetMapping(\"/findCourseDetailsWithCourseID/{courseId}\")\n\tpublic ResponseEntity<?> getCourse(@PathVariable(\"courseId\") int id) {\n\t\t// UniversityStaffMember staff=universityService.viewStaff(sid);\n\t\tCourse c = courseService.viewCourse(id);\n\t\tif (c == null)\n\t\t\tthrow new DataNotFoundException(\"Request\", \"course with id \" + id + \" not found.\");\n\t\telse\n\t\t\treturn new ResponseEntity<Course>(c, HttpStatus.OK);\n\t}",
"public static Course get(int index) {\n return courses.get(index);\n }",
"public Section getSection() {\n return _section;\n }",
"public Word getWord(int id);",
"Map<String, String> fetchCourseDetails(String courseId);",
"public abstract int getChapterNumber(XMLObject xml);",
"public MangaChapter getChapterByListPos(final int pos) {\n if (chapters == null) {\n return null;\n }\n if (pos >= chapters.size() || pos < 0) {\n return null;\n }\n return chapters.get(pos);\n }",
"Collection<? extends Object> getHadithChapterIntro();",
"public IPage getPageForPart(IWorkbenchPart part) {\n\t\tPageRec pageRec = getPageRec(part);\n\t\tif (pageRec != null) {\n\t\t\treturn pageRec.page;\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}",
"public Section getSection() {\n\treturn belongedSection.clone();\n }",
"private void getThePage(String location){\r\n try{\r\n //load document and display location\r\n contentsArea.setPage(location);\r\n enterField.setText(location);\r\n }\r\n catch(IOException ioe){\r\n JOptionPane.showMessageDialog(this, \"Error retrieving specified URL\",\"Bad URL\",JOptionPane.ERROR_MESSAGE);\r\n } //end catch\r\n }",
"public com.ms3.training.services.model.Course fetchByPrimaryKey(\n\t\tjava.lang.String title)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;",
"Room getRoom();",
"Room getRoom();",
"public String getCourse() {\n return courseName;\n }",
"public Courses getCourseTable();",
"public Robot getContenu(int x, int y) {\r\n\t\tif(y >= 0 && y < hauteur && x >= 0 && x < largeur)\r\n\t\t\treturn this.plateau[y][x].getContenu();\r\n\t\treturn null;\r\n\t}",
"@Override\n\tpublic Book findBook(String title) throws DAOException {\n\t\treturn null;\n\t}",
"private Course getCourse(int courseOrder) throws IOException {\n URL url = new URL(BASE_URL + courseOrder);\n InputStream input = url.openStream();\n Course course\n = JAXB.unmarshal(new InputStreamReader(input), Course.class);\n return course;\n }",
"public Conference getConference();",
"public interface ChapterService {\n //分页\n Map<String, Object> findByPage(Integer page, Integer rows, String Sid);\n\n //添加\n Map add(Chapter chapter);\n\n //修改\n Map update(Chapter chapter);\n\n //删除\n Map delete(String id);\n\n //修改路径\n void updateUrl(Chapter chapter);\n\n //////////////////////接口////////////////////////////\n List<Chapter> findById(String id);\n}",
"public Page readPage(PageId pid) {\n // some code goes here\n return null;\n }",
"public static void getContinent(Connection conn, String selected, TextArea textArea)\n{\n\tString continent = \"\";\n\t\n\ttry {\n\t\t\n\t\t//works\n\t\t//System.out.println(\"Made it\" + \"***\" + selected);\n\t\n\t\t//getting the countries from the first table by city code\n\t\tStatement stmt = conn.createStatement();\n\t\t\n\t\t//grabbing correct continent :)\n\t\tString sqlStatement = \"SELECT continent FROM Country WHERE Name = '\" + selected +\"'\";\n\t\tResultSet result = stmt.executeQuery(sqlStatement);\n\t\t\n\t\t//this caused a lot of problems -- specifically the invalid cursor state. You must move the cursor up one in a database\n\t\tresult.next();\n\t\t\t\n\t\tcontinent = result.getString(\"continent\");\n\t\t//System.out.println(continent);\n\t\t\t\n\t\t\t\n\n\t\t//System.out.println(result.getString(\"continent\"));\n\t\t\n\t\tString previous = textArea.getText();\n\t\ttextArea.setText(previous +\"\\nContinent: \" + continent);\n\t\tstmt.close();\n\t\t\n\t\n\t\t\n\t} catch (SQLException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\n\t\n\n}",
"public String getCourse() {\n\t\treturn Course;\n\t}",
"Subdivision findByTitle(String title);",
"public com.example.grpc.SimpleServiceOuterClass.Area getArea(int index) {\n if (areaBuilder_ == null) {\n return area_.get(index);\n } else {\n return areaBuilder_.getMessage(index);\n }\n }",
"public com.example.grpc.SimpleServiceOuterClass.Area getArea(int index) {\n if (areaBuilder_ == null) {\n return area_.get(index);\n } else {\n return areaBuilder_.getMessage(index);\n }\n }",
"public com.example.grpc.SimpleServiceOuterClass.Area getArea(int index) {\n if (areaBuilder_ == null) {\n return area_.get(index);\n } else {\n return areaBuilder_.getMessage(index);\n }\n }",
"String getWiki();",
"@Nonnull\r\n private static IHCNode _getMainContent (@Nonnull final LayoutExecutionContext aLEC)\r\n {\n final IMenuItemPage aSelectedMenuItem = ApplicationRequestManager.getInstance ().getRequestMenuItem ();\r\n\r\n // Resolve the page of the selected menu item (if found)\r\n IWebPage aDisplayPage = SystemPageNotFound.getInstance ();\r\n if (aSelectedMenuItem != null)\r\n {\r\n // Only if we have display rights!\r\n if (aSelectedMenuItem.matchesDisplayFilter ())\r\n aDisplayPage = (IWebPage) aSelectedMenuItem.getPage ();\r\n else\r\n {\r\n // No rights -> goto start page\r\n aDisplayPage = (IWebPage) ApplicationRequestManager.getInstance ()\r\n .getMenuTree ()\r\n .getDefaultMenuItem ()\r\n .getPage ();\r\n }\r\n }\r\n\r\n final WebPageExecutionContext aWPEC = new WebPageExecutionContext (aLEC, aDisplayPage);\r\n\r\n // Build page content: header + content\r\n final HCNodeList aPageContainer = new HCNodeList ();\r\n final String sHeaderText = aDisplayPage.getHeaderText (aWPEC);\r\n if (StringHelper.hasText (sHeaderText))\r\n aPageContainer.addChild (new BootstrapPageHeader ().addChild (HCH1.create (sHeaderText)));\r\n // Main fill content\r\n aDisplayPage.getContent (aWPEC);\r\n // Add result\r\n aPageContainer.addChild (aWPEC.getNodeList ());\r\n return aPageContainer;\r\n }",
"public String getcourse() {\n\t\treturn course;\n\t}",
"public void printCourseDetails()\n {\n // put your code here\n System.out.println(\"Course \" + codeNo + \" - \" + title);\n }",
"public Course getCourse() {\n\t\treturn null;\n\t}",
"private Course findCourseByName(String id) {\n for (Course course : mySchool.courses) {\n if (course.courseName.equals(id)) {\n return course;\n }\n }\n return null;\n }",
"public final Chapter newChapter(String title) {\n val chapter = new Chapter(title);\n append(chapter);\n return chapter;\n }",
"public CashDrawer getByCampusCode(String campusCode);",
"@Nullable public abstract String loadVerseText(Book book, int chapter_1, int verse_1);",
"@RequestMapping(\"/courses/{code}\")\n\tpublic ResponseEntity<Course> getCoursebyId(@PathVariable String code) throws SNotFoundException {\n\t\treturn courseService.getCoursebyId(code);\n\t}",
"public String getCourseAcademy() {\n return courseAcademy;\n }",
"String getParagraph();",
"java.lang.String getCourseName();",
"public String getSection(){\n return sectionsText;\n }",
"boolean hasHadithChapterNo();",
"@Override\r\n\tpublic Book getBook(long bookId) {\n\t\treturn bd.getOne(bookId);\r\n\t}",
"public F returnCourse(String studentID){}",
"@Override\n public List<Chapter> getChapters() {\n if (state.get() == LoadingState.NOT_LOADED) {\n // In a new thread, load chapters\n MangaCrawler2.threadPool.submit(() -> {\n try {\n state.set(LoadingState.LOADING);\n loadChapters(chapters);\n state.set(LoadingState.LOADED);\n } catch (Throwable t) {\n state.set(LoadingState.LOAD_FAILED);\n }\n });\n\n // State may be set to LOADING before now, so we must only set\n // WAITING if we're in the NOT_LOADED state\n state.compareAndSet(LoadingState.NOT_LOADED, LoadingState.WAITING);\n }\n\n // Return an unmodifiable view of the list so callers cannot modify chapters\n return Collections.unmodifiableList(chapters);\n }"
] | [
"0.5940393",
"0.5925667",
"0.56726193",
"0.562092",
"0.5588725",
"0.5245007",
"0.52313125",
"0.51359856",
"0.50660855",
"0.50660306",
"0.50573194",
"0.504541",
"0.5030234",
"0.50107694",
"0.4944191",
"0.4931758",
"0.49030083",
"0.48957488",
"0.4867506",
"0.48619372",
"0.48583102",
"0.48101816",
"0.480441",
"0.47872496",
"0.47723007",
"0.4747068",
"0.47383356",
"0.47278208",
"0.47214076",
"0.47168353",
"0.4715587",
"0.47049367",
"0.46953925",
"0.46779624",
"0.46776772",
"0.46726012",
"0.46624967",
"0.46509296",
"0.46374673",
"0.46230635",
"0.46079874",
"0.46054986",
"0.4604582",
"0.45920935",
"0.4579378",
"0.45750612",
"0.4525788",
"0.4519865",
"0.4518047",
"0.45151138",
"0.4513785",
"0.45133138",
"0.4512139",
"0.45096046",
"0.450902",
"0.45082524",
"0.44953343",
"0.44912884",
"0.4489966",
"0.4485428",
"0.44820246",
"0.44678098",
"0.4462755",
"0.44443348",
"0.4443348",
"0.44412348",
"0.44389495",
"0.44389495",
"0.44353166",
"0.44348317",
"0.4434571",
"0.44284463",
"0.44271848",
"0.44252715",
"0.442466",
"0.44235593",
"0.44112745",
"0.44047832",
"0.44034743",
"0.43984562",
"0.43984562",
"0.43984562",
"0.43958366",
"0.4391926",
"0.43874967",
"0.43869755",
"0.43826023",
"0.43712005",
"0.43668002",
"0.43649668",
"0.4361384",
"0.43558475",
"0.4350761",
"0.43464535",
"0.43430525",
"0.43414265",
"0.4339001",
"0.43381563",
"0.43349674",
"0.43263865"
] | 0.69189465 | 0 |
if m_cache contains key | public void set(int key, int value) {
if (m_cache.containsKey(key)) {
m_cache.put(key, value);
m_visitedKeys.remove(new Integer(key)); // remove the current key because it is visited
// add this element to head: shows that this is been visited recently
m_visitedKeys.add(key);
} // if not:
else if (m_cache.size() + 1 <= m_maxCapacity) {
// 1) in capacity do not need to remove it from visitedList.
m_cache.put(key, value);
m_visitedKeys.add(key);
} else { // 2) out of capacity
// Get the oldest key from list
int lastUnUsedKey = m_visitedKeys.get(0);
// Remove this key from list
m_visitedKeys.remove(0);
// Get the oldest key's corresponding value in cache
int lastUnUsedVal = m_cache.get(lastUnUsedKey);
// Remove this value from cache
/*
* PAY ATTENTION !!!!1 Must use remove (key, value) at the same time,
*
* remove(new Integer(key)): can not remove the existed Object key in cache.
*
* */
m_cache.remove(lastUnUsedKey, lastUnUsedVal);
// Finally, insert the new element to cache
m_cache.put(key, value);
// Finally, insert the new element to head of list.
m_visitedKeys.add(key);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean inCache(String key);",
"boolean isKeyInCache(Object key);",
"@Override\n public synchronized boolean containsKey(Object key) {\n if ((System.currentTimeMillis() - this.lastCheck) > this.CACHE_TIME) {\n update();\n }\n if (this.ignoreCase) {\n return this.keyMap.containsKey(key.toString().toLowerCase());\n }\n return super.containsKey(key.toString());\n }",
"@Override\n public Boolean exists(Key<?> key)\n {\n return session.getCache().contains(key) || queryCache.exists(key);\n }",
"@Override\n public boolean isKeyPresent(K key){\n return (this.cache.get(key) != null);\n }",
"public boolean containsKey(String key) {\n return cacheMap.containsKey(key);\n }",
"public boolean containsKey(Object key)\n {\n // check if the cache needs flushing\n checkFlush();\n\n return getEntryInternal(key) != null;\n }",
"@Test\n public void testCoh3710_containsKey()\n {\n doExpiryOpTest(new Runnable()\n {\n public void run()\n {\n assertFalse(getNamedCache(getCacheName0()).containsKey(Integer.valueOf(1)));\n }\n });\n }",
"@Override\n public boolean containsKey(K key) {\n readLock.lock();\n \n try {\n //不存在或已移除\n final CacheObj<K, V> co = cacheMap.get(key);\n if (co == null) {\n return false;\n }\n \n //过期\n if (co.isExpired()) {\n // remove(key); // 此方法无法获得锁\n removeWithoutLock(key);\n missCount++;\n return false;\n }\n \n //命中\n return true;\n } finally {\n readLock.unlock();\n }\n }",
"public boolean contains(Key key);",
"@Override\n\tpublic boolean contains(K key) {\n\t\treturn false;\n\t}",
"public boolean contains (String key)\n {\n use (key);\n return map.containsKey (key);\n }",
"public boolean containCache(Integer cacheKey)\n {\n // Check if the cacheKey is in the reference\n if (mLinkedHashMap.containsKey(cacheKey))\n {\n return true;\n }\n\n // Now check if the actual file is exists\n String cacheKeyStr = String.valueOf(cacheKey);\n String existingFilePath = createFilePath(cacheDirectory, cacheKeyStr);\n Boolean isFileExists = new File(existingFilePath).exists();\n if (isFileExists)\n {\n // If the file is found, we have to update the Reference HashMap.\n referenceAdd(cacheKey, existingFilePath);\n\n return true;\n }\n\n return false;\n }",
"public boolean containsKey(Key key) ;",
"@Test\n public void testCoh3710_keySetContains()\n {\n doExpiryOpTest(new Runnable()\n {\n public void run()\n {\n NamedCache cache = getNamedCache(getCacheName0());\n\n assertFalse(cache.keySet().contains(Integer.valueOf(1)));\n validateIndex(cache);\n }\n });\n }",
"@Override\n public synchronized Object get(Object key) {\n if ((System.currentTimeMillis() - this.lastCheck) > this.CACHE_TIME) {\n update();\n }\n String strkey = key.toString();\n if (this.ignoreCase) {\n strkey = this.keyMap.getProperty(strkey.toLowerCase());\n if (strkey == null)\n return null;\n }\n return super.get(strkey);\n }",
"public boolean inCache(String word){\n\t//\tSystem.out.println(\"checking word is: \"+\"-\"+word+\"-\");\n\t//\tSystem.out.println(source.containsValue(word));\n\t\tif(source.get(word) != null){\n\t//\t\tSystem.out.println(\"This word is in the cache dictionary \");\n\t\t\treturn true;\n\t\t}\n\t//\tSystem.out.println(\"this word is not in the cache dictionary \");\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean contains(T obj) {\n\t\tif (cache.contains(obj))\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}",
"public boolean contains(String key)\r\n { return get(key) != null; }",
"@Override\n public synchronized boolean contains(Object value) {\n if ((System.currentTimeMillis() - this.lastCheck) > this.CACHE_TIME) {\n update();\n }\n return super.contains(value.toString());\n }",
"public boolean containsKey(Object key) {\r\n if (cacheDelegate != null) {\r\n cacheDelegate.keyLookup(key);\r\n }\r\n\r\n if (key == null) {\r\n return false;\r\n }\r\n\r\n CacheData<K, V> cacheData = getEntry(key);\r\n if (cacheData != null) {\r\n // see if the key passed in matches this one\r\n if ((cacheData.validateKey(key, cacheDelegate)) != null) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }",
"public boolean contains(K key){\r\n int loc = find(key);\r\n if((hashTable[loc]!= null) && hashTable[loc].equals(key))\r\n return true;\r\n else\r\n return false;\r\n }",
"public boolean addCacheElement(K key, V value) {\n\t\tif (cacheMap.containsKey(key)) {\n\t\t\telementHit(key);\n\t\t\tInputUtils.printConsoleMessage(\"Hit\");\n\t\t\treturn false;\n\t\t} else if (maxObjects > cacheMap.size()) {\n\t\t\tcacheMap.put(key, value);\n\t\t\thitMap.put(key, 0);\n\t\t\treturn true;\n\t\t} else {\n\t\t\tInputUtils.printConsoleMessage(\"Miss\");\n\t\t\tint min = Integer.MAX_VALUE;\n\t\t\tK searchedKey = null;\n\t\t\tfor (K i : hitMap.keySet()) {\n\t\t\t\tint val = hitMap.get(i);\n\t\t\t\tif (min > val) {\n\t\t\t\t\tsearchedKey = i;\n\t\t\t\t\tmin = val;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcacheMap.remove(searchedKey);\n\t\t\thitMap.remove(searchedKey);\n\t\t\tcacheMap.put(key, value);\n\t\t\thitMap.put(key, 0);\n\t\t\treturn true;\n\t\t}\n\t}",
"@Override\n\tpublic boolean containsKey(Object key) {\n\t\treturn map.containsKey(key);\n\t}",
"@Override\n\t\t\tpublic boolean contains(String key) {\n\t\t\t\treturn false;\n\t\t\t}",
"@Override\n public boolean containsKey(Object key) {\n return entries.containsKey(key);\n }",
"protected boolean evictAndReplace(String key) throws KeyDoesntExistException, Exception {\n \tif (map.containsKey(key)) {\n \t\treturn false; // already in cache so already primed and ready to go; false means update\n \t} else {\n \t\t// If above capacity (incl inserted key), evict LFU:\n\t\t\tif (map.size() + 1 >= capacity) {\n\t\t\t\t// TODO O(n) search for LFU - can easily make more efficient!\n \t\t\tString lfuKey = null;\n \t\t\tInteger lfuCnt = null;\n \t\t\tIterator<String> it = map.keySet().iterator();\n \t\t\twhile (it.hasNext()) {\n \t\t\t\tString k = it.next();\n \t\t\t\tInteger c = usageCounter.get(k);\n \t\t\t\tif (lfuCnt == null || c < lfuCnt ) {\n \t\t\t\t\tlfuKey = k;\n \t\t\t\t\tlfuCnt = c;\n \t\t\t\t}\n \t\t\t}\n \t\t\tif (lfuKey != null) {\n \t\t\t\tevict(lfuKey);\n \t\t\t}\n\t\t\t}\n \t\t\n \t\tif (kvdb.inStorage(key)) { \t\t\t\t// storage hit\n \t\t\tString value = kvdb.get(key);\n \t\t\tmap.put(key, value);\n \t\t\tusageCounter.put(key, 0);\n \t\t\treturn false; // update\n \t\t} else {\t\t\t\t\t\t\t\t// storage miss\n \t\t\t// Create placeholder\n \t\t\tmap.put(key, \"\");\n \t\t\tusageCounter.put(key, 0);\n \t\t\treturn true; // insert\n \t\t}\n \t}\n }",
"public abstract boolean lookup(Key key);",
"public boolean contains(K key);",
"@Override\n\t\t\tpublic boolean containsKey(Object key) {\n\t\t\t\treturn false;\n\t\t\t}",
"boolean has(String key);",
"public boolean containsKey(K key) {\n synchronized(theLock) {\n return valueMap.containsKey(key) && ! isExpired(valueMap.get(key)); \n }\n }",
"protected boolean putIntoCache(String key, String value) throws Exception {\n \t// Ensure the value is in cache. We want to avoid it being in the storage but not\n \t// the cache as this can lead to synchronization errors:\n \tboolean inserted = evictAndReplace(key);\n \t\n \t// Perform an insert:\n map.put(key, value);\n \tusageCounter.put(key, usageCounter.get(key) + 1);\n \t\n \treturn inserted;\n }",
"public boolean contains(String key);",
"public boolean containsKey(Comparable key) { return this.store.containsKey(key); }",
"private boolean contains(String key) {\n return contains(dict, key);\n }",
"public native Boolean has(K key);",
"@Override\n\tpublic boolean contains(String key) {\n\t\tint hashVal = hashFunc(key);\n\t\twhile (hashArray[hashVal] != null) {\n\t\t\tif (hashArray[hashVal].value.equals(key))\n\t\t\t\treturn true;\n\t\t\telse {\n\t\t\t\thashVal++;\n\t\t\t\thashVal = hashVal % size;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n public boolean containsKey(Object key) {\n String fieldName = key.toString();\n ScriptDocValues<?> scriptValues = localCacheFieldData.get(fieldName);\n if (scriptValues == null) {\n MappedFieldType fieldType = mapperService.fieldType(fieldName);\n if (fieldType == null) {\n return false;\n }\n }\n return true;\n }",
"public boolean seen( K key ) {\n return map.containsKey( key );\n }",
"@Override\r\n\tpublic boolean exists(T key) {\r\n\t\treturn existsRec(raiz, key);\r\n\t}",
"public boolean containsKey(DNA key){\n Node actual_node = this.getReference(key);\n\n if(this.debug)\n System.out.println(\"ExtHash::containsKey >> buscando cadena: \" + key.toString() + \", hashCode: \" + key.hashCode());\n\n int reference_page = actual_node.getReference(), hash = key.hashCode();\n ArrayList<Integer> content = this.fm.read(reference_page); this.in_counter++;\n\n boolean res = false;\n\n while(true) {\n int cant = content.get(0);\n\n for(int i=1; i<=cant; i++) {\n if(content.get(i) == hash) {\n res = true;\n }\n }\n\n if(res)\n break;\n\n if(content.size() != B)\n break;\n\n reference_page = content.get(B-1);\n content = this.fm.read(reference_page); this.in_counter++;\n\n }\n if(this.debug)\n System.out.println(\"ExtHash::containsKey >> cadena encontrada: \" + res);\n\n return res;\n }",
"@Override\n\tpublic boolean containsKey(Object key) {\n\t\treturn false;\n\t}",
"public boolean contains( T key )\n {\n if (key == null) return false;\n for ( int i=0 ; i < size() ; ++i )\n if ( get(i).equals( key ) ) \n return true;\n \n return false;\n }",
"public boolean contains(Key key) {\n return get(key) != null;\n }",
"@Override\n public boolean exists(Map<Integer, ArrayList<Crop>> cache, Crop record) {\n for (Integer i : cache.keySet()) {\n for (Crop c : cache.get(i)) {\n if (record.equals(c)) {\n return true;\n }\n }\n }\n return false;\n }",
"@Override\n public boolean hasResource(String resourceKey)\n {\n synchronized(InProcessCache.class) {\n WeakReference reference = (WeakReference)_cache.get(resourceKey);\n //check if the reference is not null\n if(reference != null){\n // if the reference is not null, check if the object was not\n // garbage collected. If it was, remove the reference from the cache,\n // otherwise, return true\n if(reference.get() != null) return true;\n else _cache.remove(resourceKey);\n }\n\n // The reference is not in cache\n return false;\n }\n }",
"public boolean contains(String key){\r\n\t\treturn get(key) != null;\r\n\t}",
"public boolean contains(Key key) {\n\t\treturn get(key) != null;\n\t}",
"public boolean isCached(String platform, String key) throws ExtenderClientException {\n File cachedFile = getCachedBuildFile(platform);\n String previousHash = this.persistentHashes.get(cachedFile.getAbsolutePath());\n return key.equals(previousHash);\n }",
"public abstract boolean containsKey(K key);",
"private boolean cached(int offset, int byte_count) throws BadRangeException {\n check_range(offset, byte_count);\n int start_block = get_start_block(offset);\n int end_block = get_end_block(offset, byte_count);\n for (int i = start_block; i <= end_block; i++) {\n if (!content.containsKey(i)) {\n if (Constants.DEBUG) System.out.println(\"(log) Checking cache: NOT cached\");\n return false;\n }\n }\n if (Constants.DEBUG) System.out.println(\"(log) Checking cache: cached\");\n return true;\n }",
"public final CacheResult<V> check(K key) {\n return this.check(key, Collections.<D> emptySet());\n }",
"@Override\n public boolean containsKey(Object key) {\n LinkedList<Entry> tempBucket = chooseBucket(key);\n \n for(int i=0;i<tempBucket.size();i++) {\n \t\tEntry tempEntry = tempBucket.get(i);\n \t\t\n \t\tif(tempEntry.getKey() == key) {\n \t\t\treturn true;\n \t\t}\n \t}\n \n return false;\n }",
"@Override\r\n\tpublic boolean containsKey(Object key) {\r\n\t\tif (key == null) throw new NullPointerException();\r\n\t\treturn get(key) != null;\r\n\t}",
"boolean containsKey(long key);",
"public boolean containsKey(Object key) {\n\t\treturn false;\r\n\t}",
"public boolean searchCache(String url) {\n\t\tif (imageViewReference != null) {\n\t\t\tImageView imageView = imageViewReference.get();\n\t\t\tif (imageView != null) { \t\n\n\t\t\t\t// check for cached copy\n\t\t\t\tif (cache.containsKey(url)) {\n\n\t\t\t\t\t// set bitmap on image view\n\t\t\t\t\timageView.setImageBitmap(cache.get(url));\n\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn false;\n\t}",
"public boolean containsKey(K key) {\n\t\t\n\t\t\n\t\treturn keySet.contains(key);\n }",
"@Override\n public boolean delete(K key){\n if (this.cache.containsKey(key)){\n this.cache.remove(key);\n return true;\n }\n\n return false;\n }",
"boolean contains(String key);",
"boolean contains(String key);",
"@Override\n\tpublic boolean containsKey(Key k) {\n\t\treturn bst.has(k);\n\t}",
"public boolean containsKey(String key);",
"protected String getFromCache(String key) throws KeyDoesntExistException {\n \tif (!map.containsKey(key)) {\n \t\tthrow new KeyDoesntExistException(\"Key not found: \" + key);\n \t}\n \tif (!usageCounter.containsKey(key)) {\n \t\tthrow new RuntimeException(\"Cache and usageCounter out of sync!\");\n \t}\n \tusageCounter.put(key, usageCounter.get(key) + 1);\n \treturn map.get(key);\n }",
"@Override\r\n public boolean containsKey(K key) {\r\n int index = getIndex(key);\r\n if (index != -1) {\r\n IDictionary<K, V> temp = chains[index];\r\n if (temp!= null && temp.containsKey(key)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }",
"public boolean containsKey(K key)\r\n\t{\r\n\t\treturn data.contains(new Entry(key,null));\r\n\t}",
"public boolean contains(int key) {\n return map.containsKey(key);\n }",
"public boolean existCache() {\n return false;\n }",
"public boolean contains (String key) {\r\n int arrIndex = hash(key);\r\n\r\n if (hashTableArray[arrIndex] == null) {\r\n hashTableArray[arrIndex] = new LinkedList<>();\r\n }\r\n\r\n for (int i = 0; i < hashTableArray[arrIndex].size(); i++) {\r\n if (hashTableArray[arrIndex].get(i).key.equals(key)){\r\n return true; // returns true when a key already exists\r\n }\r\n }\r\n return false; // returns false when a key does not yet exist\r\n }",
"boolean containsKey(int key) throws ContentStoreException;",
"boolean containsInfo(\n int key);",
"@Override\n public boolean containsKey(K key) {\n int index = Math.floorMod(key.hashCode(), entryArr.length);\n if(entryArr[index] == null) {\n return false;\n }\n for(Entry<K, V> entry: entryArr[index]) {\n if(entry.keyEquals(new Entry<K, V>(key, null))) {\n return true;\n }\n }\n return false;\n }",
"public boolean inStorage(String key);",
"public boolean isStoredInCache() {\r\n return lockValueStored == IN_CACHE;\r\n }",
"public boolean isCaching(Player player) {\n\t\treturn this.caching.contains(player);\n\t}",
"public boolean containsKey(Object key)\r\n/* 386: */ {\r\n/* 387:556 */ return this.headers.containsKey(key);\r\n/* 388: */ }",
"Object getValueFromLocalCache(Object key);",
"@Test\n public void testCoh3710_containsValue()\n {\n doExpiryOpTest(new Runnable()\n {\n public void run()\n {\n assertFalse(getNamedCache(getCacheName0()).containsValue(Integer.valueOf(1)));\n }\n });\n }",
"public boolean containsKey(int key) {\r\n\t\ttry {\r\n\t\t\tthis.hashlock.readLock().lock();\r\n\t\t\tint index = index(key);\r\n\t\t\tif (index >= 0) {\r\n\t\t\t\tint pos = (index / FREE.length);\r\n\t\t\t\tthis.claims.position(pos);\r\n\t\t\t\tthis.claims.put((byte) 1);\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t} catch (Exception e) {\r\n\t\t\tSDFSLogger.getLog().fatal(\"error getting record\", e);\r\n\t\t\treturn false;\r\n\t\t} finally {\r\n\t\t\tthis.hashlock.readLock().unlock();\r\n\t\t}\r\n\t}",
"public boolean containsKey(K key) {\r\n\t\tif (get(key) == null) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"@Override\n\tpublic boolean containsKey(Object arg0) {\n\t\treturn false;\n\t}",
"public boolean contains(int key) {\n if(entry[hashCode(key)]==null) return false;\n return entry[hashCode(key)].contains(key);\n }",
"public V getElementByKey(K key) {\n\t\tif (cacheMap.containsKey(key)) {\n\t\t\telementHit(key);\n\t\t}\n\t\treturn cacheMap.get(key);\n\t}",
"@Override\n public boolean equals(Object obj) {\n final CacheKey cache = (CacheKey) obj;\n if (cache==null || this.getType()!=cache.getType()) {\n return false;\n }\n for (int i=size()-1; i>=0; --i) {\n final Object v1 = this.getValue(i);\n final Object v2 = cache.getValue(i);\n if (!v1.equals(v2)) {\n return false;\n }\n }\n return true;\n }",
"public boolean contains(Key key) {\n return auxContains(root, key);\n }",
"boolean containsKey(K key);",
"boolean containsKey(K key);",
"public boolean contains(String key) {\n\t\treturn recContains(head, key);\n\t}",
"public boolean contains(long key){\n for (int i = 0; i < numKeys; i++){\n if (keys[i].key == key){\n return true;\n }\n }\n return false;\n }",
"@Override\n public void notifyExists(Key<?> key, boolean exists)\n {\n // We have no equivalent for this in our sessions, so just pass along directly to the decorated cache\n queryCache.notifyExists(key, exists);\n }",
"boolean containsKeyLocalOnHeap(Object key);",
"public boolean contains(K key)\n\t{\n\t\tcheckForNulls(key);\n\t\tint n = Math.abs(key.hashCode() % entries.length);\n\t\t\n\t\treturn (entries[n] == null) ? false : entries[n].contains(new Entry(key, null));\n\t}",
"public boolean containsKey(Object key) {\n return map.containsKey(key);\n }",
"public boolean containsKey(Object key) {\n return map.containsKey(key);\n }",
"boolean containsKeyLocalOffHeap(Object key);",
"public boolean contains(String key) {\n return find(key) != null;\n }",
"public boolean containsKey(String key) {\n if (!index.containsKey(key)) return false;\n else if (index.get(key).isEmpty()) return false;\n else return true;\n }",
"boolean isCacheable();",
"public boolean contains(int key) {\n int hash = key % 7919;\n if (table[hash] == null)\n {\n return false;\n }\n else\n {\n ArrayList<Integer> al = table[hash].al;\n int size = al.size();\n for (int i = 0; i < size; ++i)\n {\n if (al.get(i) == key)\n {\n return true;\n }\n }\n return false;\n }\n }",
"@Test\n public void testPutGet() {\n cache.put(\"A\", \"first\");\n cache.put(\"C\", \"second\");\n cache.put(\"C\", \"third\");\n \n assertEquals(\"first\", cache.get(\"A\"));\n assertEquals(\"third\", cache.get(\"C\"));\n }"
] | [
"0.8353053",
"0.8027454",
"0.7620448",
"0.75641274",
"0.74081516",
"0.73233736",
"0.72072",
"0.7192561",
"0.71877277",
"0.7008328",
"0.69826907",
"0.6963259",
"0.6870557",
"0.6855788",
"0.68246955",
"0.68181765",
"0.6816783",
"0.68145114",
"0.68067443",
"0.68002486",
"0.6799824",
"0.677345",
"0.6769547",
"0.6764448",
"0.67473435",
"0.67256564",
"0.6683063",
"0.66790605",
"0.6669429",
"0.6635774",
"0.6621753",
"0.66154546",
"0.65857387",
"0.6579338",
"0.6576154",
"0.65711904",
"0.65710336",
"0.65578574",
"0.65535027",
"0.6536776",
"0.6535491",
"0.6529599",
"0.6510413",
"0.64734143",
"0.647146",
"0.6461459",
"0.64576507",
"0.6454016",
"0.6447215",
"0.6443047",
"0.64262986",
"0.64116406",
"0.64112246",
"0.63978076",
"0.6386977",
"0.6380956",
"0.63776594",
"0.63658947",
"0.6349055",
"0.6343083",
"0.6334551",
"0.6334551",
"0.6328507",
"0.6325366",
"0.63212526",
"0.6317692",
"0.6313552",
"0.6295071",
"0.6289866",
"0.6288631",
"0.62652725",
"0.62646705",
"0.6262839",
"0.62625253",
"0.6260912",
"0.6256844",
"0.62547433",
"0.62497365",
"0.62476206",
"0.62430555",
"0.62324107",
"0.62259483",
"0.62181497",
"0.6216148",
"0.6207448",
"0.62015986",
"0.6197425",
"0.6197425",
"0.6188493",
"0.61866343",
"0.6175609",
"0.6173474",
"0.6165268",
"0.61630434",
"0.61630434",
"0.6157446",
"0.6157203",
"0.6144908",
"0.61415935",
"0.6138361",
"0.6134965"
] | 0.0 | -1 |
Create a scene and place the pane in the stage. | @Override
public final void start(final Stage primaryStage) {
Scene scene = new Scene(getPane(), PANE_WIDTH, PANE_HEIGHT);
primaryStage.setTitle("Tic-Tak-Toe"); // Set the stage title.
primaryStage.setScene(scene); // Place the scene in the stage.
primaryStage.show(); // Display the stage.
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void createScene() {\r\n imageView.setFitWidth(400);\r\n imageView.setFitHeight(300);\r\n\r\n Scene scene = new Scene(rootScene(), 700, 600);\r\n\r\n primaryStage.setTitle(TITLE);\r\n primaryStage.setScene(scene);\r\n primaryStage.show();\r\n }",
"void createScene(){\n\t\tmainScene = new Scene(mainPane);\r\n\t\t\r\n\t\t//If keyEvent is not focussed on a node on the scene, you can attach\r\n\t\t//a keyEvent to a scene to be consumed by the screen itself.\r\n\t\tCloser closer = new Closer();\r\n\t\tmainScene.setOnKeyPressed(closer);\r\n\t}",
"private void createScene() \n {\n PlatformImpl.startup(\n new Runnable() {\n public void run() { \n Group root = new Group(); \n Scene scene = new Scene(root, 80, 20); \n SizeView sizeview = createSizeView(scene);\n root.getChildren().add(sizeview);\n jfxPanel.setScene(scene); \n } \n }); \n }",
"public void setupScene() {\n\t\tplayScene = new Scene(new Group());\n\t\tupdateScene(playScene);\n\t\twindow.setScene(playScene);\n\t\twindow.show();\n\t}",
"public void Scene() {\n Scene scene = new Scene(this.root);\n this.stage.setScene(scene);\n this.stage.show();\n }",
"private void setStage() {\n\t\tstage = new Stage();\n\t\tstage.setScene(myScene);\n\t\tstage.setTitle(title);\n\t\tstage.show();\n\t\tstage.setResizable(false);\n//\t\tstage.setOnCloseRequest(e -> {\n//\t\t\te.consume();\n//\t\t});\n\t}",
"public void createScene();",
"@Override\n public void start (Stage stage) throws IOException {\n init.start(stage);\n myScene = view.makeScene(50,50);\n stage.setScene(myScene);\n stage.show();\n }",
"public Scene createScene() {\n root = new Group();\n key = new Group();\n Scene scene = new Scene(root, 500, 500, Color.WHITE);\n addRootNode();\n setupKey();\n getAlreadyConnectedPeers();\n return scene;\n }",
"public void createMainStage(){\n mainStage = new Stage();\n BorderPane mainPageBp = new BorderPane();\n \n String headerTextMain = \"Main menu\";\n setBorderPaneTop(mainPageBp, headerTextMain, mainStage);\n setBorderPaneCenterMain(mainPageBp);\n setBorderPaneBottomMain(mainPageBp);\n \n Scene sceneMain = new Scene(mainPageBp,Constants.SCENEWIDTH, Constants.SCENEHEIGHT);\n sceneMain.getStylesheets().add(\"/styles/aitBank.css\");// add connection to stylesheet per scene\n mainStage.setTitle(bankName);\n mainStage.setScene(sceneMain);\n }",
"private void initStage() {\n stage = new Stage();\n stage.setTitle(\"Attentions\");\n stage.setScene(new Scene(root));\n stage.sizeToScene();\n }",
"void createStage(Stage stage){\n\t\tstage.setHeight(background.getHeight()+25);//displays full image (1)\r\n\t\tstage.setWidth(background.getWidth());\r\n\t\tshowBackground.setFitWidth(stage.getWidth());\r\n\t\tshowBackground.setFitHeight(stage.getHeight()-23);//displays full image (1)\r\n\t\r\n\t\tstage.setAlwaysOnTop(true);\r\n\t\tstage.setResizable(false);\r\n\t\t\r\n\t\t//launches first window in center of screen. \r\n\t\tstage.centerOnScreen();\r\n\t\tstage.setScene(mainScene);\r\n\t\tstage.setTitle(\"Don't Play Games in Class\");\r\n\t\t//supposed to prevent window from being moved\r\n\t\t\r\n\t\t//removes minimize, maximize and close buttons\r\n\t\t//unused because replacing the \r\n\t\t//stage.initStyle(StageStyle.UNDECORATED);\r\n\t\t\r\n\t\t//removes minimize and maximize button\r\n\t\tstage.initStyle(StageStyle.UTILITY);\r\n\t\t\r\n\t\t//replaces the closed window in the center of the screen.\r\n\t\tRespawn launch = new Respawn();\r\n\t\tstage.setOnCloseRequest(launch);\r\n\t}",
"public Scene createScene() {\n\t\tmyRoot = new AnchorPane();\n\t\tmyTabs = new TabPane();\n\t\tButton newTab = new Button(CREATE_NEW_TAB);\n\t\tnewTab.setOnAction(event -> createNewTab());\n\t\t\n\t\tTabMainScreen mainScreen = new TabMainScreen(myResources.getString(WORKSPACE) + (myTabs.getTabs().size()));\n\t\tTabHelp help1 = new TabHelp(myResources.getString(BASIC_COMMANDS), HELP_TAB_TEXT1);\n\t\tTabHelp help2 = new TabHelp(myResources.getString(EXTENDED_COMMANDS), HELP_TAB_TEXT2);\n\t\t\n\t\tmyTabs.getTabs().addAll(mainScreen.getTab(myStage), help1.getTab(), help2.getTab());\n\t\t\n\t\tAnchorPane.setTopAnchor(myTabs, TABS_OFFSET);\n\t\tAnchorPane.setTopAnchor(newTab, NEWTAB_OFFSET);\n\t\t\n\t\tmyRoot.getChildren().addAll(myTabs, newTab);\n\t\n\t\tmyScene = new Scene(myRoot, windowHeight, windowWidth, Color.WHITE);\n\t\treturn myScene;\n\t}",
"private void createFXScene() {\n try {\n Parent root = FXMLLoader.load(getClass().getResource(\"toolBarFXML.fxml\"));\n Scene scene = new Scene(root, Color.LIGHTGREY);\n fxPanel.setScene(scene);\n } catch (IOException e) {\n Exceptions.printStackTrace(e);\n }\n\n }",
"@Override // Override the start method in the Application class\r\n /**\r\n * Start method for layout building\r\n */\r\n public void start(Stage primaryStage)\r\n {\n Scene scene = new Scene(pane, 370, 200);\r\n primaryStage.setTitle(\"Sales Conversion\"); // Set the stage title\r\n primaryStage.setScene(scene); // Place the scene in the stage\r\n primaryStage.show(); // Display the stage\r\n }",
"public void start(Stage stage) {\n stage.setScene(\n //create scene with root and size 250 x 100\n new Scene(\n //add circle to a new Group named root\n new Group(\n //create circle of radius = 30 at x=40, y=40\n new Circle(40, 40, 30)\n ), 250, 100)\n );\n stage.setTitle(\"My JavaFX Application\"); //set the stage\n stage.show();\t\t\t\t\t\t\t\t //made stage visible\n }",
"public void createChequeStage(){\n chequeStage = new Stage();\n BorderPane chequePageBp = new BorderPane();\n \n String headerTextMain = \"Cheque Account\";\n setBorderPaneTop(chequePageBp, headerTextMain, chequeStage);\n setBorderPaneCenterCheque(chequePageBp);\n setBorderPaneBottomCheque(chequePageBp, chequeStage);\n \n Scene sceneCheque = new Scene(chequePageBp,Constants.SCENEWIDTH, Constants.SCENEHEIGHT);\n sceneCheque.getStylesheets().add(\"/styles/aitBank.css\");// add connection to stylesheet per scene\n chequeStage.setTitle(bankName);\n chequeStage.setScene(sceneCheque);\n }",
"@Override\n public void start(Stage primaryStage) throws Exception{\n Parent root = FXMLLoader.load(getClass().getResource(\"Scene.fxml\"));\n primaryStage.setTitle(\"Project 3\");\n primaryStage.setScene(new Scene(root, 600, 600));\n primaryStage.show();\n }",
"@Override\n public void start(Stage primaryStage) {\n\n // Creates the scene and displays it to the main window\n Scene withDrawPaneSetup = new Scene(withDrawPaneSetup(primaryStage), 1024, 768);\n primaryStage.setScene(withDrawPaneSetup);\n }",
"public PaneOrganizer() {\n\t\t_root = new BorderPane(); // new border pane\n\t\t\n\t\tLabel score = new Label(\"Score: 0\"); // score label\n\t\tscore.setTextFill(Color.WHITE); // text color\n\t\t\n\t\tLabel lives = new Label(\"Lives: 3\"); // lives label\n\t\tlives.setTextFill(Color.WHITE); // text color\n\t\t\n\t\tGame game = new Game(score, lives); // game pane\n\t\tHBox hbox = new HBox(); // hbox to organize the quit button\n\n\t\tButton quit = new Button(\"Quit\"); // Creating quit button\n\t\tquit.setOnAction(new QuitHandler()); // add the quit handler\n\t\tquit.minHeight(Constants.QUIT_HEIGHT); // sizing\n\n\t\thbox.getChildren().addAll(quit, score, lives); // add components to hbox\n\t\thbox.setSpacing(20);\n\t\t\n\t\t_root.setCenter(game); // set the game pane\n\t\t_root.setBottom(hbox); // set the hbox\n\t\t_root.setStyle(\"-fx-background-color: black\");\n\t}",
"public PaneOrganizer() {\n\t\t\n\t\t_root = new BorderPane();\n\t\t_game = new Game(_root);\n\t\tthis.setupButton();\n\t\t\n\t}",
"@Override\n public void start(Stage primaryStage) {\n root = new VBox(10);\n root.setPadding(new Insets(30));\n initLabel();\n //set up scene\n Scene scene = new Scene(root);\n primaryStage.setScene(scene);\n primaryStage.sizeToScene();\n primaryStage.setTitle(\"Mastermind\");\n primaryStage.show();\n }",
"@Override\n public void start(Stage stage) throws Exception {\n Parent root = FXMLLoader.load(getClass().getResource(\"Lesson3.fxml\"));\n \n \n // Create Scene with background Color\n Scene scene = new Scene(root, 700, 350, Color.LIGHTYELLOW);\n \n // set scene on stage with title\n stage.setTitle(\"Lesson 3 FXML\");\n stage.setScene(scene);\n stage.show();\n }",
"@Override\n\tpublic void start(Stage stage) throws Exception {\n\t\tStackPane pane = new StackPane();\n\t\tScene scene = new Scene(pane);\n\t\tfirstLevel();\n\t\tpane.getChildren().add(mRoot);\n\t\tstage.setScene(scene);\n\t\t\n\t\t\n\t}",
"public Scene scene() {\n AnchorPane anchorPane = new AnchorPane();\n\n Pane track = raceTrack.trackpainting();\n\n AnchorPane.setTopAnchor(track, 40.0);\n AnchorPane.setLeftAnchor(track, 40.0);\n\n determineStartingLocation(carOne, carTwo, carThree);\n\n carPosition(carOne);\n carPosition(carTwo);\n carPosition(carThree);\n\n AnchorPane.setTopAnchor(btnStartRace, 480.0);\n AnchorPane.setLeftAnchor(btnStartRace, 740.0);\n\n AnchorPane.setTopAnchor(btnEndRace, 480.0);\n AnchorPane.setLeftAnchor(btnEndRace, 730.0);\n\n AnchorPane.setTopAnchor(txtWarning, 600.0);\n AnchorPane.setLeftAnchor(txtWarning, 610.0);\n\n anchorPane.setBackground(\n new Background(new BackgroundFill(Color.rgb(0, 132, 0),\n CornerRadii.EMPTY, Insets.EMPTY)));\n\n anchorPane.getChildren().addAll(track, carOne, carTwo, carThree, btnStartRace, btnEndRace, txtWarning);\n\n Scene scene = new Scene(anchorPane, 1580, 1030);\n return scene;\n }",
"public void start() {\n BorderPane borderPane = new BorderPane();\n VBox centerPane = new VBox();\n\n borderPane.setTop(lobbyMenu());\n\n String TITLE = \"Connect 4\";\n Text title = new Text(TITLE);\n title.setFont(Font.font(\"Arial\", FontWeight.BOLD, 30));\n centerPane.getChildren().add(title);\n centerPane.getChildren().add(lobbyButtons());\n centerPane.setAlignment(Pos.CENTER);\n\n borderPane.setCenter(centerPane);\n\n Scene scene = new Scene(borderPane, 520, 360);\n\n stage.setTitle(TITLE);\n stage.setScene(scene);\n }",
"public void start(Stage myStage) { \n \n System.out.println(\"Inside the start() method.\"); \n \n // Give the stage a title. \n myStage.setTitle(\"JavaFX Skeleton.\"); \n \n // Create a root node. In this case, a flow layout \n // is used, but several alternatives exist. \n FlowPane rootNode = new FlowPane(); \n \n // Create a scene. \n Scene myScene = new Scene(rootNode, 300, 200); \n \n // Set the scene on the stage. \n myStage.setScene(myScene); \n \n // Show the stage and its scene. \n myStage.show(); \n }",
"public void start(Stage stage) {\n Layout layout = new Layout();\n Scene scene = new Scene(layout, 400, 400); \n stage.setScene(scene);\n layout.bindToScene(scene);\n new AppController(layout);\n stage.show();\n showInstructions();\n }",
"public void moveScene(Parent root) {\n Stage stage = new Stage();\n stage.setScene(new Scene(root));\n stage.show();\n }",
"@Override\n public void start (Stage primaryStage) {\n Group root = new Group();\n Scene scene = new Scene(root, AppConstants.STAGE_WIDTH, AppConstants.STAGE_HEIGHT);\n ModulePopulator = new ModuleCreationHelper(root, scene, primaryStage);\n view = new View();\n scene.setFill(AppConstants.BACKGROUND_COLOR);\n // scene.getStylesheets().add(getClass().getResource(\"application.css\").toExternalForm());\n view.init(root, ModulePopulator);\n ModulePopulator.setView(view);\n ModulePopulator.createMainPageModules();\n view.initRunner(root, ModulePopulator);\n primaryStage.setTitle(\"SLogo!\");\n primaryStage.setScene(scene);\n primaryStage.show();\n\n System.out.println(\"App Has Started!\");\n }",
"@Override\n public void start( Stage primaryStage ) throws Exception {\n primaryStage.setTitle(\"Battleship\");\n primaryStage.setScene(createScene());\n primaryStage.show();\n }",
"private Scene createScene() {\r\n\t\tGroup root = new Group();\r\n\t\tScene scene = new Scene(root, this.getWidth(), this.getHeight());\r\n\t\tthis.textfield = new TextField();\r\n\t\ttextfield.setPromptText(this.placeholder);\r\n\t\ttextfield.setPrefWidth(this.getWidth());\r\n\t\ttextfield.setPrefHeight(this.getHeight());\r\n\t\ttextfield.setMinSize(TextField.USE_PREF_SIZE, TextField.USE_PREF_SIZE);\r\n\t\tthis.fixNavigation(textfield);\r\n\t\tthis.node = textfield;\r\n\t\troot.getChildren().add(textfield);\r\n\t\treturn scene;\r\n\t}",
"public void openGamePane() {\n\t\tParent root;\n\t\ttry {\n\t\t\tFXMLLoader loader = new FXMLLoader(getClass().getResource(GAMEPANELOCATION));\n\t\t\tloader.setController(this);\n\t\t\troot = loader.load();\n\t\t\tScene scene = new Scene(root);\n\t\t\tStage stage = new Stage();\n\t\t\tstage.setScene(scene);\n\t\t\tstage.show();\n\t\t} catch (IOException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tgamePane.setBackground(new Background(new BackgroundFill(new Color(195/256.0,222/256.0,250/256.0,1),CornerRadii.EMPTY, Insets.EMPTY)));\n\t\tgameObjects=new HashMap<Integer,GameObjectVisualComponent>();\n\t\tpodium=new ArrayList<Text>();\n\t\tpodium.add(new Text(gamePane.getWidth()-100,15,\"TOP\"));\n\t\tgamePane.getChildren().add(podium.get(0));\n\t}",
"private void setupStage(Scene scene) {\n SystemTray.create(primaryStage, shutDownHandler);\n\n primaryStage.setOnCloseRequest(event -> {\n event.consume();\n stop();\n });\n\n\n // configure the primary stage\n primaryStage.setTitle(bisqEnvironment.getRequiredProperty(AppOptionKeys.APP_NAME_KEY));\n primaryStage.setScene(scene);\n primaryStage.setMinWidth(1020);\n primaryStage.setMinHeight(620);\n\n // on windows the title icon is also used as task bar icon in a larger size\n // on Linux no title icon is supported but also a large task bar icon is derived from that title icon\n String iconPath;\n if (Utilities.isOSX())\n iconPath = ImageUtil.isRetina() ? \"/images/[email protected]\" : \"/images/window_icon.png\";\n else if (Utilities.isWindows())\n iconPath = \"/images/task_bar_icon_windows.png\";\n else\n iconPath = \"/images/task_bar_icon_linux.png\";\n\n primaryStage.getIcons().add(new Image(getClass().getResourceAsStream(iconPath)));\n\n // make the UI visible\n primaryStage.show();\n }",
"protected void buildScene() {\n Geometry cube1 = buildCube(ColorRGBA.Red);\n cube1.setLocalTranslation(-1f, 0f, 0f);\n Geometry cube2 = buildCube(ColorRGBA.Green);\n cube2.setLocalTranslation(0f, 0f, 0f);\n Geometry cube3 = buildCube(ColorRGBA.Blue);\n cube3.setLocalTranslation(1f, 0f, 0f);\n\n Geometry cube4 = buildCube(ColorRGBA.randomColor());\n cube4.setLocalTranslation(-0.5f, 1f, 0f);\n Geometry cube5 = buildCube(ColorRGBA.randomColor());\n cube5.setLocalTranslation(0.5f, 1f, 0f);\n\n rootNode.attachChild(cube1);\n rootNode.attachChild(cube2);\n rootNode.attachChild(cube3);\n rootNode.attachChild(cube4);\n rootNode.attachChild(cube5);\n }",
"@Override\n public void start(Stage primaryStage) {\n\n pStage = primaryStage;\n\n try {\n\n\n Parent root = FXMLLoader.load(getClass().getResource(\"/GUI.fxml\"));\n\n Scene scene = new Scene(root, 600, 400);\n\n primaryStage.setTitle(\"Shopper 5000 Ultimate\");\n\n primaryStage.setResizable(false);\n primaryStage.setScene(scene);\n primaryStage.show();\n\n } catch(Exception e) {\n e.printStackTrace();\n }\n }",
"@Override\n public void start(Stage stage) {\n\n ModelImpl model = new ModelImpl(PuzzleLibrary.create());\n ControllerImpl controller = new ControllerImpl(model);\n Clues clues = model.GetClues();\n PuzzelView puzzle = new PuzzelView(controller, model, stage);\n model.addObserver(puzzle);\n stage.setScene(puzzle.getScene());\n stage.show();\n\n // GridPane g = new GridPane();\n // Scene scene = new Scene(g, 1000, 1000);\n // scene.getStylesheets().add(\"style/stylesheet.css\");\n // stage.setScene(scene);\n\n }",
"@Override\r\n public void start(Stage primaryStage) throws Exception{\n primaryStage.setTitle(\"Color switch\");\r\n Gameplay obj1 = new Gameplay();\r\n obj1.mainmenu(primaryStage);\r\n// pane.getChildren().add(new Polygon(10,20,30,10,20,30));\r\n\r\n }",
"@Override\r\n public void start(Stage stage){\n Text msg = new Text(\"Hola JavaFX\");\r\n \r\n //toplevel node\r\n VBox root = new VBox();\r\n \r\n //add the child node to VBox root node\r\n root.getChildren().add(msg);\r\n \r\n //Create a scene\r\n Scene scene = new Scene(root, 300, 50);\r\n \r\n //set the scene to the stage\r\n stage.setScene(scene);\r\n \r\n //set a title for the stage\r\n stage.setTitle(\"Hola Aplicación JavaFX\");\r\n \r\n //show the stage\r\n stage.show();\r\n }",
"private void createUI() {\n\t\tthis.rootPane = new TetrisRootPane(true);\n\t\tthis.controller = new TetrisController(this, rootPane, getWorkingDirectory());\n\t\tthis.listener = new TetrisActionListener(controller, this, rootPane);\n\t\t\n\t\trootPane.setActionListener(listener);\n\t\trootPane.setGameComponents(controller.getGameComponent(), controller.getPreviewComponent());\n\t\trootPane.initialize();\n\t\t\n\t\tPanelBorder border = controller.getPlayer().getPanel().getPanelBorder(\"Tetris v\" + controller.getVersion());\n\t\tborder.setRoundedCorners(true);\n\t\tJPanel panel = new JPanel(new FlowLayout(FlowLayout.CENTER, 0, 0));\n\t\tpanel.setBackground(getBackgroundColor(border.getLineColor()));\n\t\tpanel.setBorder(border);\n\t\tpanel.setPreferredSize(new Dimension(564, 551));\n\t\tpanel.add(rootPane);\n\t\trootPane.addPanelBorder(border, panel);\n\t\t\n\t\tthis.setContentPane(panel);\n\t\tthis.setSize(564, 550);\n\t\t\n\t\tcontroller.initializeUI();\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 }",
"@Override\r\n public void start(Stage primaryStage) {\n VFlow flow = FlowFactory.newFlow();\r\n\r\n // make it visible\r\n flow.setVisible(true);\r\n\r\n // create two nodes:\r\n // one leaf node and one subflow which is returned by createNodes\r\n createFlow(flow, 3, 6);\r\n\r\n // show the main stage/window\r\n showFlow(flow, primaryStage, \"VWorkflows Tutorial 05: View 1\");\r\n }",
"@Override\n\tpublic void start(Stage stage) throws Exception {\n\t\tSideMenu sidemenu = new SideMenu(canvas);\n\t\tgridpane.add(sidemenu, 0, 0);\n\t\tgridpane.add(canvas, 1, 0);\n\t\t\n\t\tScene scene = new Scene(gridpane);\n\t\t\n\t\tstage.setScene(scene);\n\t\tstage.sizeToScene();\n\t\t\n\t\tstage.setTitle(\"Make your own Dot Drawing - By Joeri\");\n\t\tstage.show();\n\t\t\n\t\tstage.setMinWidth(stage.getWidth());\n\t\tstage.setMinHeight(stage.getHeight());\n\t}",
"@Override\n public void start(Stage primaryStage)\n throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, InstantiationException, IllegalAccessException {\n makeMainGrid();\n Scene myHomeScene = new Scene(myMainGrid, WINDOW_WIDTH, WINDOW_HEIGHT);\n primaryStage.setScene(myHomeScene);\n primaryStage.show();\n }",
"@Override\n\tpublic void start(Stage primaryStage) throws Exception {\n\t\tFXMLLoader loader = new FXMLLoader(getClass().getResource(\"app_layout.fxml\"));\n\t\tVBox rootNode = loader.load();\n\n\t\tScene scene = new Scene(rootNode);\n \n Pane menuPane= (Pane) rootNode.getChildren().get(0);\n\t\tmenuPane.getChildren().add(createMenubar());\n\n\t\tprimaryStage.setScene(scene);\n\t\tprimaryStage.setTitle(\"Temperature Convertor\");\n\t\t//primaryStage.setResizable(false); to make sure application is not resizable\n\t\tprimaryStage.show();\n\t}",
"@Override\n\tpublic void start(Stage stage) throws Exception {\n\t\tStackPane root = new StackPane();\n\t\t\n\t\t// Create drop shadow effect\n\t\tDropShadow dropShadow = new DropShadow();\n\t\tdropShadow.setColor(Color.GRAY);\n\t\tdropShadow.setOffsetY(3.0);\n\t\t\n\t\t// Create a rectangle element\n\t\tRectangle rectangle = new Rectangle(400, 200, Color.AQUA);\n\t\trectangle.setArcHeight(30);\n\t\trectangle.setArcWidth(80);\n\t\trectangle.setEffect(dropShadow);\n\t\t\n\t\t// Create a text that will display on top of the rectangle shape\n\t\tText text = new Text(\"Hello StackPane\");\n\t\ttext.setFill(Color.DARKSLATEGRAY); \n\t\ttext.setFont(Font.font(null, FontWeight.BOLD, 32));\n\t\ttext.setEffect(dropShadow);\n\t\t\n\t\t// Fade the text in and out\n\t\tFadeTransition fade = new FadeTransition(Duration.seconds(1.5), text);\n\t\tfade.setFromValue(1.0);\n\t\tfade.setToValue(0.0);\n\t\tfade.setCycleCount(Animation.INDEFINITE);\n\t\tfade.setAutoReverse(true);\n\t\tfade.play();\n\t\t\n\t\t// Set the Rectangle and Text on the root element of the StackPane\n\t\troot.getChildren().setAll(rectangle, text);\n\t\t\n\t\t// Create scene and set the scene on the stage\n\t\tScene scene = new Scene(root, 600, 300, Color.LIGHTBLUE);\n\t\tstage.setTitle(\"Hello StackPane\");\n\t\tstage.setScene(scene);\n\t\tstage.show();\n\t\t\n\t}",
"@Override\n public void start(Stage primaryStage) throws Exception{\n // Loads the Home view\n Parent root = FXMLLoader.load(getClass().getResource(\"fxml/Home.fxml\"));\n\n primaryStage.setTitle(\"To-Do Manager\"); // Sets the title of the window\n\n // Sets the Home view as the first scene\n Scene scene = new Scene(root, 854, 480);\n\n // Sets the window's scene\n primaryStage.setScene(scene);\n\n // Prevents user from resizing window ( because of UI reasons )\n primaryStage.setResizable(false);\n\n // Displays the window\n primaryStage.show();\n }",
"@Override\r\n\tpublic void start(Stage stage) {\n\r\n scenes.put(SceneName.MAIN, new MainView(stage).getScene());\r\n scenes.put(SceneName.SCENE1, new ViewOne(stage).getScene());\r\n/*\t\tscenes.put(SceneName.SCENE2, new ViewTwo(stage).getScene());\r\n\t\tscenes.put(SceneName.SCENE3, new ViewThree(stage).getScene());\r\n*/\r\n\r\n\t\t// Start with the main scene\r\n\t\tstage.setScene(scenes.get(SceneName.MAIN));\r\n\t\tstage.setTitle(\"Multi-Scene Demo\");\r\n\t\tstage.show();\r\n\t}",
"public void initAndShowStage(Parent root) {\n Scene scene = new Scene(root);\n Stage stage = new Stage();\n stage.initModality(Modality.APPLICATION_MODAL);\n stage.setScene(scene);\n stage.setTitle(\"Ayuda para la Gestion de Usuarios\");\n stage.setResizable(false);\n stage.setMinWidth(800);\n stage.setMinHeight(600);\n stage.setOnShowing(this::handleWindowShowing);\n stage.show();\n }",
"private void showCreateNewPlayer(){\n try{\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(Game.class.getResource(\"view/CreateNewPlayer.fxml\"));\n AnchorPane janela = (AnchorPane) loader.load();\n \n Stage createNewPlayerStage = new Stage();\n createNewPlayerStage.setTitle(\"Create new player\");\n createNewPlayerStage.initModality(Modality.WINDOW_MODAL);\n createNewPlayerStage.initOwner(primaryStage);\n Scene scene = new Scene(janela);\n createNewPlayerStage.setScene(scene);\n \n CreateNewPlayerController controller = loader.getController();\n controller.setGame(this);\n controller.setCreateNewPlayerStage(createNewPlayerStage); \n \n createNewPlayerStage.showAndWait();\n }catch(IOException e){\n }\n }",
"@FXML\r\n private void addPane(ActionEvent e) throws IOException {\r\n\r\n eventDialog(\"New\");\r\n eventLabel.setText(\"Are you want to take a new window?\");\r\n\r\n noButton.setOnAction(event -> {\r\n firstLabel.setVisible(false);\r\n lastLabel.setVisible(false);\r\n lineFirstNodeTF.setVisible(false);\r\n lineLastNodeTF.setVisible(false);\r\n setNodeButton.setVisible(false);\r\n resetNodeButton.setVisible(false);\r\n\r\n graphNodeTextArea.setEditable(true);\r\n graphNodeTextArea.setText(\"\");\r\n eventStage.close();\r\n });\r\n\r\n yesButton.setOnAction(event -> {\r\n Parent root = null;\r\n try {\r\n root = FXMLLoader.load(Objects.requireNonNull(getClass().getResource(\"GUI.fxml\")));\r\n } catch (IOException ioException) {\r\n ioException.printStackTrace();\r\n }\r\n Scene scene = new Scene(root);\r\n\r\n Stage primaryStage = new Stage();\r\n primaryStage.setScene(scene);\r\n primaryStage.setTitle(\"Object Oriented Programming Project - Team 1B\");\r\n primaryStage.show();\r\n eventStage.close();\r\n });\r\n\r\n }",
"@Override\n\tpublic void start(Stage primaryStage) throws Exception {\n\t\tprimaryStage.setTitle(\"MyMoney Application\");\n\t\t// Set the scene of the application to the new Scene\n\t\tprimaryStage.setScene(createScene());\n\t\tprimaryStage.setResizable(true);\n\t\t// Display the Stage\n\t\tprimaryStage.show();\n\t}",
"@Override\n protected void initScene() {\n setupCamera(0xff888888);\n\n /*\n * Create a Cube and display next to the cube\n * */\n setupCube();\n\n\n /*\n * Create a Sphere and place it initially 4 meters next to the cube\n * */\n setupSphere();\n\n\n /*\n * Create a Plane and place it initially 2 meters next to the cube\n * */\n setupPlane();\n setupImage();\n setupText();\n\n }",
"@FXML\n private void startGame(){\n AnchorPane anchorPane = new AnchorPane();\n Scene gameScene = new Scene(anchorPane, 800, 600);\n Stage gameStage = new Stage();\n GameView gameView = new GameView(anchorPane, gameScene, gameStage);\n gameView.gameStart();\n }",
"@Override\n\tpublic Scene giveScene() {\n\t\tLabel SignIn=new Label(\"SIGN IN\");\n\t\tLabel UserName=new Label(\"Username\");\n\t\tLabel Password=new Label(\"Password\");\n\t\tTextField Username=new TextField();\n\t\tTextField PassWord=new TextField();\n\t\tButton SubmitButton=new Button(\"SUBMIT\");\n\t\tButton BackButton=new Button(\"BACK\");\n\t\tBackButton.setOnAction(new EventHandler<ActionEvent>() {\t\n\t\t\t@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\tmyGame.setPrimaryStage(myGame.GetLoginPageScene());\n\t\t\t}\n\t\t});\t\n\t\tSignIn.setId(\"SignInLabel\");\n\t\tUserName.setId(\"UserLabel\");\n\t\tPassword.setId(\"PasswordLabel\");\n\t\tUsername.setId(\"UserText\");\n\t\tPassWord.setId(\"PasswordText\");\n\t\tSubmitButton.setId(\"SubmitButton\");\n\t\tBackButton.setId(\"BackButton\");\n\t\tVBox SignInPageVb=new VBox(50,SignIn,UserName,Username,Password,PassWord,BackButton,SubmitButton);\n\t\tSignInPageVb.setTranslateY(100);\n\t\tSignInPageVb.setAlignment(Pos.TOP_CENTER);\n\t\tStackPane MainPageStackpane=new StackPane(SignInPageVb);\n\t\tMainPageStackpane.getStylesheets().add(getClass().getResource(\"SignInPage.css\").toString());\n\t\tmyScene= new Scene(MainPageStackpane,500,1000);\n\t\tmyScene.setFill(Color.BLACK);\n\t\tSubmitButton.setOnAction(new EventHandler<ActionEvent>() {\t\n\t\t\t@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\tPlayer newPLayer = myGame.getMyDataBase().login(Username.getText(), PassWord.getText());\n\t\t\t\t//System.out.println(newPLayer);\n\t\t\t\tif (newPLayer != null) {\n\t\t\t\t\tmyGame.setCurrentPlayer(newPLayer);\n\t\t\t\t\tmyGame.setPrimaryStage(myGame.GetMainPageScene());\n\t\t\t\t}else {\n\t\t\t\t\tif(NoPlayer==null) {\n\t\t\t\t\t\tNoPlayer=new Label(\"Invalid User/Password\");\n\t\t\t\t\t\tSignInPageVb.getChildren().add(NoPlayer);\n\t\t\t\t\t}//System.out.println(\"katta\");\n\t\t\t\t//myGame.setPrimaryStage(myGame.GetGamePlayScene());\n\t\t\t\t}\n\t\t\t}\n\t\t});\t\n\n\t\treturn myScene;\n\t}",
"@Override\n public void start(Stage stage) throws Exception{\n BorderPane border = new BorderPane();\n\n// HBox hbox = addHBox();\n// border.setTop(hbox);\n border.setLeft(addVBox());\n\n// hbox.setStyle(\"\");\n// addStackPane(hbox);\n border.setCenter(addAnchorPane(addGridPane()));\n\n Scene scene = new Scene(border);\n stage.setScene(scene);\n stage.setTitle(\"Wally Save\");\n stage.show();\n }",
"public Scene Window(){\n Area.setPrefHeight(177);\n Area.setPrefWidth(650);\n Area.setOpacity(0.5);\n Area.setEditable(false);\n Area.setText(\"\\n\\nThe application is used for PV(photovoltaics) sizing to power a RO(Reverse osmosis) desalination unit\" +\n \"\\nThe system depends on batteries to store energy.\" +\n \"\\n\\nTo use this application without problems, you must have the following information\\n\" +\n \"\\t*The location of the desalination unit;\\n\" +\n \"\\t*Amount of power required to operate the unit in kilowatts;\\n\" +\n \"\\t*Time of operating for RO;\\n\" +\n \"\\t*Detailed specification information of the pv modules;\\n\" +\n \"\\t*The number of people the Ro unit will provide water for,and the average water consumption for regular person\");\n\n boxPane.setPrefHeight(44);\n boxPane.setPrefWidth(650);\n\n //Go user map selection interface\n nextWindow.setPrefHeight(30);\n nextWindow.setPrefWidth(300);\n nextWindow.setMnemonicParsing(false);\n nextWindow.setText(\"NEXT\");\n\n\n //HBox.setMargin(nextWindow, new Insets(5,0,5,0));\n // boxPane.getChildren().addAll(nextWindow);\n boxPane.setAlignment(Pos.CENTER);\n\n //Load text area and button to the container\n rootPane.setCenter(Area);\n rootPane.setBottom(boxPane);\n\n scene = new Scene(rootPane,640,300);\n return scene;\n }",
"private Pane createLayout() {\n root = new Pane();\n root.setPrefSize(Main.APP_W, Main.APP_H);\n\n // Logo\n ImageView logoView = new ImageView(new Image(\"res/snake.png\"));\n logoView.setFitHeight(500);\n logoView.setPreserveRatio(true);\n logoView.setLayoutX(40);\n logoView.setLayoutY(40);\n\n // Controls diagram\n ImageView controlsView = new ImageView(new Image(\"res/controls.png\"));\n controlsView.setFitHeight(100);\n controlsView.setPreserveRatio(true);\n controlsView.setLayoutX(350);\n controlsView.setLayoutY(40);\n\n // Control instructions\n Text keys = new Text(\"Use arrow keys to direct the snake \\nspacebar to pause / resume the game\");\n keys.setFont(Font.font(\"Calibri\", FontWeight.BOLD, 20));\n keys.setFill(Color.BLUE);\n keys.setLayoutX(470);\n keys.setLayoutY(90);\n\n // Play button image\n ImageView playView = new ImageView(new Image(\"res/play.png\"));\n playView.setFitHeight(150);\n playView.setPreserveRatio(true);\n playView.setLayoutX(320);\n playView.setLayoutY(170);\n\n // Click here instructions\n // Control instructions\n Text clickHere = new Text(\"Click to play\");\n clickHere.setFont(Font.font(\"Calibri\", FontWeight.BOLD, 20));\n clickHere.setFill(Color.BLUE);\n clickHere.setLayoutX(348);\n clickHere.setLayoutY(348);\n\n // Background\n ImageView backgroundView = new ImageView(Main.BACKGROUND_IMAGE);\n\n // Add elements to the root\n root.getChildren().setAll(backgroundView, logoView, controlsView, keys, playView, clickHere);\n\n return root;\n }",
"@Override\n public void start(Stage primaryStage) throws IOException {\n Parent root = FXMLLoader.load(getClass().getResource(\"/MainMenuLayout.fxml\"));\n primaryStage.setTitle(\"Pairs\");\n primaryStage.setMinHeight(600);\n primaryStage.setMinWidth(600);\n primaryStage.setScene(new Scene(root));\n primaryStage.show();\n }",
"public void start(Stage myStage) { \n \n // Give the stage a title. \n myStage.setTitle(\"Use a JavaFX label.\"); \n \n // Use a FlowPane for the root node. \n FlowPane rootNode = new FlowPane(); \n \n // Create a scene. \n Scene myScene = new Scene(rootNode, 300, 200); \n \n // Set the scene on the stage. \n myStage.setScene(myScene); \n \n // Create a label. \n Label myLabel = new Label(\"JavaFX is a powerful GUI\"); \n \n // Add the label to the scene graph. \n rootNode.getChildren().add(myLabel); \n \n // Show the stage and its scene. \n myStage.show(); \n }",
"@Override\n public void start(Stage primaryStage) throws Exception {\n\n // set up window.\n primaryStage.setWidth(600);\n primaryStage.setHeight(400);\n primaryStage.setResizable(false);\n\n // set up scenes.\n FXMLLoader mainMenuLoader = new FXMLLoader(getClass().getResource(\"FXML/mainMenuLayout.fxml\"));\n Scene mainMenuScene = new Scene(mainMenuLoader.load());\n FXMLLoader gameLoader = new FXMLLoader(getClass().getResource(\"FXML/gameLayout.fxml\"));\n Scene gameScene = new Scene(gameLoader.load());\n\n // set the main menu to load into the game.\n MainMenuController mainMenuController = (MainMenuController) mainMenuLoader.getController();\n mainMenuController.setGameScene(gameScene);\n\n primaryStage.setScene(mainMenuScene);\n\n primaryStage.show();\n\n }",
"@Override\n public void start(Stage primaryStage) throws Exception{\n Parent root = FXMLLoader.load(getClass().getResource(\"mainMenu/mainMenu.fxml\"));\n primaryStage.setTitle(\"Hello World\");\n Scene s =new Scene(root, defaultWindowWidth, defaultWindowHight);\n s.getStylesheets().add(getClass().getResource(\"css/main.css\").toExternalForm());\n primaryStage.setScene(s);\n primaryStage.setMinHeight(480);\n primaryStage.setMinWidth(480);\n primaryStage.show();\n }",
"@Override\r\n\tpublic void start(Stage primaryStage) throws IOException {\n\t Parent root = FXMLLoader.load(getClass().getResource(\"WeatherView.fxml\"));\r\n\t \r\n\t //setting the title of the stage\r\n\t primaryStage.setTitle(\"Weather Forecast\");\r\n\t \r\n\t //Setting the scene in the stage\r\n\t primaryStage.setScene(new Scene(root));\r\n\t \r\n\t //this method shows the stage\r\n\t primaryStage.show();\r\n\t \r\n\t \r\n\t \r\n\t \r\n\t}",
"@Override\n public void start(Stage stage){\n // set the stage\n this.stage = stage;\n\n // set the scenes\n mainScene();\n inputScene();\n\n // set the stage attributes\n stage.setTitle(\"Maze solver\");\n stage.setWidth(VisualMaze.DISPLAY_WIDTH);\n stage.setHeight(VisualMaze.DISPLAY_HEIGHT + 200);\n stage.setScene(main);\n\n // display the app\n stage.show();\n }",
"private void initComponents() {\n\n scenePanel = new javax.swing.JPanel();\n\n setLayout(new javax.swing.BoxLayout(this, javax.swing.BoxLayout.PAGE_AXIS));\n\n scenePanel.setLayout(new javax.swing.BoxLayout(scenePanel, javax.swing.BoxLayout.LINE_AXIS));\n add(scenePanel);\n }",
"private void configureScene() {\n uiController.setTitle(resources.getString(\"Launch\"));\n BorderPane sp = new BorderPane();\n this.fileLoadButton = new Button();\n sp.setCenter(fileLoadButton);\n sp.setTop(createSettings());\n fileLoadButton.setText(resources.getString(\"LoadSimulationXML\"));\n fileLoadButton.setOnAction(event -> uiController.loadNewSimulation());\n sp.setPrefWidth(width);\n sp.setPrefHeight(height);\n renderNode(sp);\n }",
"@Override\n\tpublic void start(Stage primaryStage) throws Exception {\n\t\t\n\t\t//StackPane stackPane = new StackPane();\n\t\t//Button button = new Button(\"Przycisk\");\n\t\t//stackPane.getChildren().add(button);\n\t\t//Scene scene = new Scene(stackPane,400,400);\n\t\t//primaryStage.setScene(scene);\n\t\t\n\t\t\n\t\t//Stack Pane from FXML file\n\t\t//****************************************//\n\t\tFXMLLoader fxmlLoader = new FXMLLoader();\n\t\tfxmlLoader.setLocation(this.getClass().getResource(\"/fxml/MainStackPane.fxml\"));\n\t\tStackPane stackPane = fxmlLoader.load();\n\t\tScene scene = new Scene(stackPane);\n\t\tprimaryStage.setScene(scene);\n\t\t\n\t\tprimaryStage.setTitle(\"First JavaFx app\");\n\t\tprimaryStage.show();\n\t\t\n\t\t\n\t}",
"public void initRootLayout(){\n try{\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(Game.class.getResource(\"view/RootLayout.fxml\"));\n rootLayout = (BorderPane) loader.load();\n\n Scene scene = new Scene(rootLayout);\n \n primaryStage.setScene(scene);\n \n RootLayoutController controller = loader.getController();\n controller.setGame(this);\n \n primaryStage.show(); \n showCreateNewPlayer();\n }catch(IOException e){\n }\n }",
"public void changeScene(Pane pane){\n Platform.runLater(()->{\n dynamicPane.getChildren().clear();\n dynamicPane.getChildren().add(pane);\n });\n }",
"@Override\n public void start(Stage primaryStage) {\n /*\n A JavaFX app defines the user interface container by means of \n a stage and a scene\n \n The JavaFX stage class is the top-level JavaFX container\n \n The JavaFX scene class is the container for all content\n \n */\n Button btn = new Button();\n btn.setText(\"Say 'Hello World'\");\n btn.setOnAction(new EventHandler<ActionEvent>() {\n \n @Override\n public void handle(ActionEvent event) {\n System.out.println(\"Hello World!\");\n }\n });\n /*\n In JavaFX, the content of the scene is represented as a hierarchial\n scene graph of nodes.\n \n In this example, the root node is a StackPane object, which is a \n resizable layout node.\n \n This means that the root node's size tracks the scene's size and \n changes when the stage s resized by the user.\n \n */\n StackPane root = new StackPane();\n root.getChildren().add(btn);\n \n //The root node contains a child node, a button control the text,\n // plus an event handler to print a message when the button is pressed\n \n \n Scene scene = new Scene(root, 300, 250);\n \n // Create a scene for a specific root node with a specific size\n \n primaryStage.setTitle(\"Hello World!\");\n primaryStage.setScene(scene);\n primaryStage.show();\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}",
"private Parent rootScene() {\r\n hBox = new HBox();\r\n hBox.setSpacing(10);\r\n hBox.setStyle(\"-fx-background-color: #082B59;\");\r\n hBox.getChildren().addAll(btnCam, btnManAut);\r\n\r\n root.setBottom(hBox);\r\n root.setCenter(imageView);\r\n root.setStyle(\"-fx-background-color: #0A2D68;\");\r\n\r\n return root;\r\n }",
"private Scene createMainMenuScene() {\n VBox root = new VBox();\n root.setId(\"pane\");\n root.setAlignment(Pos.CENTER);\n root.setSpacing(BUTTON_DISTANCE);\n\n Label lTitle = new Label(\"2048 Fx\");\n lTitle.setId(\"title-label\");\n root.getChildren().add(lTitle);\n\n Button bNewGame = new Button(\"New game\");\n bNewGame.setOnAction(new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent event) {\n Game.board.init();\n }\n });\n bNewGame.setId(\"c16\");\n root.getChildren().add(bNewGame);\n\n Button bLoadGame = new Button(\"Load game\");\n bLoadGame.setId(\"c256\");\n bLoadGame.setOnAction(new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent event) {\n FileChooser fileChooser = new FileChooser();\n fileChooser.setTitle(\"Load saving\");\n File directory = new File(\"./savegames\");\n if (!directory.exists()) {\n directory = new File(\"./\");\n }\n fileChooser.setInitialDirectory(directory);\n FileChooser.ExtensionFilter extFilter =\n new FileChooser.ExtensionFilter(\"Saved 2048 games\", \"*.saving\");\n fileChooser.getExtensionFilters().add(extFilter);\n File file = fileChooser.showOpenDialog(Game.stage);\n if (file != null) {\n Game.board.replay(file);\n }\n }\n });\n root.getChildren().add(bLoadGame);\n\n Button bSettings = new Button(\"Settings\");\n bSettings.setId(\"c4096\");\n bSettings.setOnAction(new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent event) {\n settingsMenu();\n }\n });\n root.getChildren().add(bSettings);\n\n Button bGenerate = new Button(\"Also\");\n bGenerate.setOnAction(new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent event) {\n\tGame.statBoard.statMenu();\n }\n });\n bGenerate.setId(\"c1024\");\n root.getChildren().add(bGenerate);\n\n Button bQuit = new Button(\"Quit\");\n bQuit.setId(\"c65536\");\n bQuit.setOnAction(new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent event) {\n FileHandler.saveSettings(Game.settings);\n Game.stage.close();\n }\n });\n root.getChildren().add(bQuit);\n Scene menuScene = new Scene(root, Game.WINDOW_SIZE_X, Game.WINDOW_SIZE_Y);\n menuScene.getStylesheets().\n addAll(this.getClass().getResource(\"menu.css\").toExternalForm());\n return menuScene;\n }",
"private void initComponents() {\n\t\tstage = new Stage();\n\t\tHBox root = new HBox();\n\t\troot.setPadding(new Insets(10));\n\t\troot.setAlignment(Pos.CENTER);\n\t\tlabel = new Label(\" \");\n\t\tlabel.setPrefWidth(144);\n\t\tlabel.setFont(new Font(\"Arial\", 80.0));\n\t\tlabel.setAlignment(Pos.CENTER);\n\t\troot.getChildren().add(label);\n\t\tScene scene = new Scene(root);\n\t\tstage.setScene(scene);\n\t\tstage.setTitle(\"Count Guest\");\n\t\tstage.sizeToScene();\n\t}",
"@Override\n\tpublic void createScene()\n\t\n\t{\n\t loading = new Sprite (0,0,resourceManager.loadingRegion,vbo); // тупо ставим спрайт с картинкой\n\t\tattachChild(loading);\n\t}",
"public static void newPane(String resourceURL) throws IOException { \n\t\tMain.root = (Pane) FXMLLoader.load(Main.class.getResource(resourceURL));\n\t\t\n\t}",
"@Override\n\tpublic void start(Stage primaryStage) throws IOException {\n\t\t// Create the root of the graph scene. It is mainly used in the updateScene() method.\n\t\troot = new Group();\n\n\t\t// Create a simulation with N elements\n\t\tsimulation = new Simulation();\n\n\t\t// Configure and start periodic scene update: after PERIOD_MS ms, updateScene() is called.\n\t\ttimeline = new Timeline(new KeyFrame(PERIOD_MS, ae -> {\n\t\t\tupdateScene();\n\t\t})); // \"->\" is a Java 8 specific construction\n\t\ttimeline.setCycleCount(Animation.INDEFINITE);\n\t\ttimeline.play();\n\n\n\t\t/** Allows the window to be dragged by the mouse */\n\t root.setOnMousePressed(new EventHandler<MouseEvent>() {\n\t \t@Override\n\t public void handle(MouseEvent event) {\n\t xOffset = primaryStage.getX() - event.getScreenX();\n\t yOffset = primaryStage.getY() - event.getScreenY();\n\t }\n\t });\t \n\t root.setOnMouseDragged(new EventHandler<MouseEvent>() {\n @Override\n public void handle(MouseEvent event) {\n \tprimaryStage.setX(event.getScreenX() + xOffset);\n\t primaryStage.setY(event.getScreenY() + yOffset);\n\t }\n\t });\n\t \n\t \n\t /** Adds the stylesheet for visual effect */\n\t root.getStylesheets().add(\"/stylesheet.css\");\n\t root.getStyleClass().add(\"rootPane\");\n\t \n\t /** Adds icon */\n\t primaryStage.getIcons().add(new Image(\"/icon.png\"));\n\t \n\t Scene scene = new Scene(root, Simulation.SPACE_SIZE, Simulation.SPACE_SIZE, Simulation.BACKGROUND); \n\t primaryStage.setScene(scene);\n \tprimaryStage.setTitle(\"Gabriel's Land\");\n \tprimaryStage.setResizable(false);\n\t primaryStage.getScene().setCursor(Cursor.HAND);\n\t primaryStage.show();\n\n\t}",
"public void start(Stage myStage) {\n myStage.setTitle(\"Character Recognizer\");\r\n\r\n // Create the HBox\r\n HBox rootNode = new HBox(10);\r\n rootNode.setPadding(new Insets(10, 10, 10, 10));\r\n\r\n //Initialize the Grid Canvas\r\n GridCanvas grid = new GridCanvas();\r\n\r\n //Initialize the Recognizer Controller\r\n RecognizerController controller = new RecognizerController(grid);\r\n\r\n // Create a scene.\r\n Scene myScene = new Scene(rootNode);\r\n rootNode.getChildren().addAll(controller, grid);\r\n\r\n // Set the scene on the stage\r\n myStage.setScene(myScene);\r\n\r\n // Parametrize and show the stage and its scene\r\n myStage.sizeToScene();\r\n myStage.setResizable(false);\r\n myStage.show();\r\n }",
"@Override\n public void start(Stage primaryStage) throws Exception{\n Parent root = FXMLLoader.load(getClass().getResource(\"MainForm.fxml\"));\n primaryStage.setTitle(\"Inventory Management System\");\n primaryStage.setMinHeight(500);\n primaryStage.setMinWidth(800);\n primaryStage.setScene(new Scene(root, 1280, 720));\n primaryStage.show();\n\n\n }",
"public void createUI() {\r\n\t\ttry {\r\n\t\t\tJPanel centerPanel = this.createCenterPane();\r\n\t\t\tJPanel westPanel = this.createWestPanel();\r\n\t\t\tm_XONContentPane.add(westPanel, BorderLayout.WEST);\r\n\t\t\tm_XONContentPane.add(centerPanel, BorderLayout.CENTER);\r\n\t\t\tm_XONContentPane.revalidate();\r\n\t\t} catch (Exception ex) {\r\n\t\t\tRGPTLogger.logToFile(\"Exception at createUI \", ex);\r\n\t\t}\r\n\t}",
"private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(100, 100, 800, 800);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t\tJPanel browserPanel = new JPanel();\n\t\tframe.getContentPane().add(browserPanel, BorderLayout.CENTER);\n\t\t\n\t\t// create javafx panel for browser\n browserFxPanel = new JFXPanel();\n browserPanel.add(browserFxPanel);\n \n // create JavaFX scene\n Platform.runLater(new Runnable() {\n public void run() {\n createScene();\n }\n });\n\t}",
"public WorldScene makeScene() {\n // WorldCanvas c = new WorldCanvas(300, 300);\n WorldScene s = new WorldScene(this.width, this.height);\n s.placeImageXY(newImg, this.width / 2, this.height / 2);\n return s;\n }",
"private void initJFX(JFXPanel fxPanel) {\n Group globalRoot = new Group();\n Scene scene = new Scene(globalRoot, getWidth(), getHeight());\n scene.setFill(Color.WHITE);\n\n Group root3D = new Group();\n SubScene scene3D = new SubScene(root3D, getWidth(), getHeight(), true, SceneAntialiasing.BALANCED);\n scene3D.setFill(convertToJFXColour(AIRFIELD_COLOUR));\n globalRoot.getChildren().add(scene3D);\n\n createScene(globalRoot, root3D);\n initCamera(scene3D, root3D);\n\n scene.getStylesheets().add(getClass().getResource(\"customstyles.css\").toExternalForm());\n\n fxPanel.setScene(scene);\n }",
"@Override\n\tpublic void start(Stage primaryStage)\n\t{\n\t\tprimaryStage.setTitle(\"Rolodexy\");\n\n\t\t// BorderLayout layout manager\n\t\tBorderPane mainLayout = new BorderPane();\n\t\tmainLayout.setPadding(new Insets(20, 20, 20, 20));\n\n\t\tmainLayout.setTop(makeTop());\n\t\tmainLayout.setCenter(makeCenter());\n\t\tmainLayout.setBottom(makeBottom());\n\t\tmainLayout.setLeft(makeLeft());\n\t\t// componentLayout.setRight(makeRight()); //didn't use the right side yet\n\n\t\tScene mainScene = new Scene(mainLayout, 1000, 1000);\n\t\tdouble value = 0.3;\n\t\tmediaPlayer.setVolume(value);\n\t\tmediaPlayer.play();\n\n\t\t// Add the Scene to the Stage\n\t\tprimaryStage.setScene(mainScene);\n\t\tprimaryStage.show();\n\t}",
"@Override\n public void start(Stage primaryStage) {\n BorderPane root = new BorderPane();\n\n generateRandomHeights();\n root.setBottom(createSortingDisplay());\n root.setTop(createMenu(root));\n\n primaryStage.setTitle(\"Concurrent Merge Sort Visualizer\");\n primaryStage.setScene(new Scene(root));\n primaryStage.setFullScreen(true);\n primaryStage.show();\n }",
"@Override\r\n public void start(Stage primaryStage) throws Exception {\n Parent root = FXMLLoader.load(getClass().getResource(\"ui/main.fxml\")); //FXMLLoader.load(Utilities.getResourceURL(\"ui/main.fxml\"));\r\n primaryStage.setTitle(\"Custom Groovy Game Engine\");\r\n primaryStage.setScene(new Scene(root, 960, 480));\r\n primaryStage.show();\r\n }",
"public void start(Stage primaryStage)\n {\n \tint wid = 520;\n int hei = 200;\n Text hello = new Text(50, 50, \"Hello, JavaFX!\");\n Text question = new Text(120, 80, \"How's it going?\");\n Text question2 = new Text(120, 160, \"Are you getting any ideas?\");\n \n Line simpleLine = new Line(0, 0, 520, 200);\n \n Circle simpleCircle = new Circle(260,100,20);\n Rectangle simpleRectangle = new Rectangle(200,100,20,30);\n Ellipse e = new Ellipse(200, 30, 10,20);\n \n Group root = new Group(e,simpleRectangle, hello, question, question2, simpleLine, simpleCircle); \n Scene scene = new Scene(root, 520, 200, Color.ANTIQUEWHITE);\n \n primaryStage.setTitle(\"A JavaFX Program\");\n primaryStage.setScene(scene);\n primaryStage.show();\n }",
"public MainPane(BananaBroadcast app, Stage primaryStage) throws IOException {\n\t\tthis.cartouches = app.cartouches;\n\t\tthis.scheduler = app.scheduler;\n\t\tthis.primaryStage = primaryStage;\n\t\tthis.database = app.database;\n\t\tthis.app = app;\n\t\tGuiApp.loadLayout(this, \"MainPane.fxml\");\n\t}",
"@Override\r\n\tpublic void start(Stage stage) throws Exception {\r\n\t\t\r\n\t\tthis.stage = stage;\r\n\t\t\r\n\t\tstage.setTitle(windowName);\r\n\r\n\t\tPlatform.setImplicitExit(false);\r\n\r\n\t\tFXMLLoader loader = new FXMLLoader();\r\n\r\n\t\tloader.setClassLoader(this.getClass().getClassLoader());\r\n\t\t\r\n\t\tParent box = loader.load(new ByteArrayInputStream(fxml.getBytes()));\r\n\t\t\r\n\t\tcontroller = loader.getController();\r\n\t\t\r\n\t\tcontroller.setGUI(this);\r\n\r\n\t\tscene = new Scene(box);\r\n\t\t\r\n\t\tscene.setFill(Color.TRANSPARENT);\r\n\r\n\t\tif (this.customTitleBar)\r\n\t\t\tstage.initStyle(StageStyle.UNDECORATED);\r\n\t\t\r\n\t\tif (this.css != null)\r\n\t\t\tscene.getStylesheets().add(this.css.toExternalForm());\r\n\t\tstage.setScene(scene);\r\n\t\t\r\n\t\tstage.setResizable(false);\r\n\r\n\t\tstage.setOnCloseRequest(new EventHandler<WindowEvent>() {\r\n\r\n\t @Override\r\n\t public void handle(WindowEvent event) {\r\n\t Platform.runLater(new Runnable() {\r\n\r\n\t @Override\r\n\t public void run() {\r\n\t endScript();\r\n\t }\r\n\t });\r\n\t }\r\n\t });\r\n\t\t\r\n\t}",
"public Scene setSigninScene() {\n\t\tBorderPane newUserbp = new BorderPane();\n\n\t\tGridPane createUserGP = new GridPane();\n\t\tcreateUserGP.setPadding(new Insets(20));\n\t\tcreateUserGP.setVgap(10);\n\t\tcreateUserGP.setHgap(20);\n\n\t\tLabel createUser = new Label(\"Write username, min. 4 letters\");\n\t\tTextField usernameInput = new TextField();\n\t\tButton newUserBtn = new Button(\"Create\");\n\t\tButton goBackBtn = new Button(\"Login page\");\n\n\t\tcreateUserGP.add(createUser, 0, 1);\n\t\tcreateUserGP.add(usernameInput, 0, 2);\n\t\tcreateUserGP.add(newUserBtn, 0, 3);\n\t\tcreateUserGP.add(goBackBtn, 2, 3);\n\t\tcreateUserGP.add(userMsg, 0, 0);\n\n\t\tnewUserBtn.setOnAction(e -> {\n\t\t\tString username = usernameInput.getText();\n\t\t\tif (usernameInput.getText().length() <= 3) {\n\t\t\t\tuserMsg.setTextFill(Color.RED);\n\t\t\t\tuserMsg.setText(\"Username is too short, try again\");\n\t\t\t\tusernameInput.setText(\"\");\n\t\t\t} else if (hs.createUser(username)) {\n\t\t\t\tuserMsg.setTextFill(Color.GREEN);\n\t\t\t\tuserMsg.setText(\"New user created successfully, now login!\");\n\t\t\t\tstage.setScene(setLoginScene());\n\t\t\t\tusernameInput.setText(\"\");\n\t\t\t} else {\n\t\t\t\tuserMsg.setTextFill(Color.RED);\n\t\t\t\tuserMsg.setText(\"Username isn't available, try again.\");\n\t\t\t\tusernameInput.setText(\"\");\n\t\t\t}\n\t\t});\n\t\tgoBackBtn.setOnAction(e -> stage.setScene(loginScene));\n\n\t\tnewUserbp.setTop(new Text(\"Create New Username\"));\n\t\tnewUserbp.setCenter(createUserGP);\n\n\t\tnewUserScene = new Scene(newUserbp);\n\n\t\treturn this.newUserScene;\n\t}",
"public void start(Stage stage) {\r\n // Setting our primaryStage variable to the stage given to us by init()\r\n primaryStage = stage;\r\n // Retrieving the primary scene (the first thing we want the user to see)\r\n Scene primaryScene = getPrimaryScene();\r\n // Setting the title of the stage, basically what the window says on the top left\r\n primaryStage.setTitle(\"SeinfeldMemeCycler\");\r\n // Setting the scene\r\n primaryStage.setScene(primaryScene);\r\n // Displaying the stage\r\n primaryStage.show();\r\n }",
"@Override\n public void start(Stage stage) throws IOException {\n logInfo();\n\n scene = new Scene(loadFXML(\"mainView\"));\n stage.setScene(scene);\n stage.setTitle(\"OzoMorph\");\n stage.show();\n }",
"@Override\r\n public void start(Stage primaryStage) {\r\n System.loadLibrary(Core.NATIVE_LIBRARY_NAME);\r\n btnCam = new Button(\"Start camera\");\r\n btnManAut = new Button(\"Manual\");\r\n manualMode = true;\r\n camRunning = false;\r\n this.primaryStage = primaryStage;\r\n root = new BorderPane();\r\n\r\n loadImage();\r\n createScene();\r\n handleUI();\r\n updateGUIStatus();\r\n }",
"public void start(Stage stage) {\n game = new Game();\n\n Scene gameScene = new Scene(game.getVisual().getRoot(), MainGUI.WIDTH, MainGUI.HEIGHT);\n gameScene.setOnKeyPressed(new PressHandler());\n gameScene.setOnKeyReleased(new ReleaseHandler());\n\n createMenu(stage, gameScene);\n Scene menuScene = new Scene(root, MainGUI.WIDTH, MainGUI.HEIGHT);\n stage.setScene(menuScene);\n\n }",
"protected void displayInitialScene() {\n stageManager.switchScene(FxmlView.SPLASH, StageStyle.UNDECORATED);\n }",
"@Override\n public void start(Stage stage) throws IOException {\n try {\n FXMLLoader fxmlLoader = new FXMLLoader(MainScreen.class.getResource(\"MainScreen.fxml\"));\n\n\n Parent root = fxmlLoader.load();\n MainScreen mainScreen = fxmlLoader.getController();\n Scene scene = new Scene(root);\n\n stage.setTitle(\"Inventory Management System\");\n stage.setScene(scene);\n stage.show();\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void showPane(){\n\t\tpane.draw();\n\t}",
"@Override\n public void start(Stage primaryStage) throws Exception {\n Parent root = FXMLLoader.load(getClass().getResource(\"fxml_files/home.fxml\"));\n primaryStage.setScene(new Scene(root, 1000, 700));\n primaryStage.show();\n }",
"protected Scene buildScene() throws FileNotFoundException, NoSuchObjectException {\n SplitPane split = new SplitPane();\n Scene myGameScene = new Scene(split, 800, 600);\n split.setDividerPositions(0.35f, 0.6f);\n attachStyle(myGameScene, \"GameView\");\n\n Pane leftPane = getPane(myGameResourceBundle.getString(\"LeftPaneCss\"));\n buildLeftSplitPane(leftPane);\n SplitPane.setResizableWithParent(leftPane, Boolean.FALSE);\n Pane rightPane = getPane(myGameResourceBundle.getString(\"RightPaneCss\"));\n Entity player = getPlayerEntity();\n background = new ImageView(new Image(new FileInputStream(levelInfoParser.getBackgroundImage())));\n cameraView = new CameraView(player, myGameScene.heightProperty(), myGameScene.widthProperty());\n buildRightSplitPane(rightPane);\n cameraView.bindBackgroundImage(background);\n ImageView playerDisplay = cameraView.createPlayerDisplay(player);\n setUpGameOver(player);\n rightPane.getChildren().add(playerDisplay);\n split.getItems().addAll(leftPane, rightPane);\n SplitPane.setResizableWithParent(leftPane, Boolean.FALSE);\n myGameScene.setOnKeyPressed(e -> handleKeyPressed(e));\n cameraView.handleCamera(rightPane, playerDisplay,background);\n myGameScene.setOnKeyReleased(e->handleKeyReleased(e));\n rightPane.requestFocus();\n rightPane.setFocusTraversable(true);\n return myGameScene;\n }",
"protected Scene createView() {\n\t\treturn null;\n\t}"
] | [
"0.7964293",
"0.7565479",
"0.7493628",
"0.73273",
"0.72806",
"0.7253586",
"0.7184519",
"0.71787935",
"0.7140614",
"0.7099998",
"0.7067838",
"0.7049253",
"0.703541",
"0.698509",
"0.6907364",
"0.6906067",
"0.68039876",
"0.6773329",
"0.67661786",
"0.67519665",
"0.67514026",
"0.6739758",
"0.67188245",
"0.6714513",
"0.6680283",
"0.6665602",
"0.66385424",
"0.6608676",
"0.66064113",
"0.6595964",
"0.6582297",
"0.65673554",
"0.6562471",
"0.6559893",
"0.6558736",
"0.65577596",
"0.6535126",
"0.65155745",
"0.6509917",
"0.64976865",
"0.6491346",
"0.6482177",
"0.64637285",
"0.6458711",
"0.6456651",
"0.6454543",
"0.6449603",
"0.644519",
"0.64383906",
"0.64287853",
"0.6413249",
"0.6412603",
"0.63979805",
"0.6388907",
"0.6383624",
"0.6381115",
"0.63626784",
"0.63589835",
"0.6353764",
"0.6351731",
"0.6333507",
"0.6327132",
"0.63183224",
"0.6292118",
"0.6291774",
"0.62897855",
"0.6289519",
"0.6286744",
"0.628202",
"0.6276195",
"0.6271121",
"0.62696034",
"0.6267198",
"0.62640995",
"0.626073",
"0.62521493",
"0.6249714",
"0.62382275",
"0.6234948",
"0.62218535",
"0.6217382",
"0.62145215",
"0.62134105",
"0.6212809",
"0.6211925",
"0.62060267",
"0.6204675",
"0.620095",
"0.6200373",
"0.6196588",
"0.618513",
"0.6180447",
"0.61771065",
"0.61765426",
"0.61763746",
"0.6175437",
"0.6171773",
"0.6171393",
"0.6166286",
"0.6152184"
] | 0.66364384 | 27 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.